From c10af56d05a313dd74be636764b5cbabeeee3be8 Mon Sep 17 00:00:00 2001 From: Erik Date: Fri, 27 Nov 2026 07:20:24 +0100 Subject: [PATCH 1/6] feat(schema): v1alpha4 schema with conditional and workflow steps v1alpha4 is v1alpha3 plus two additions: an optional `when` condition on every step (AEP-0001) and the step type `workflow`, which starts another workflow of the same scope as a child execution. The schema is a copy of v1alpha3 so that older versions stay unchanged; `type: workflow` requires `workflow` and forbids the payloads of the other step types, which in turn forbid `workflow`. The CRDs now serve v1alpha3 and v1alpha4, each generated from its own schema. v1alpha3 stays the storage version while it is the current draft; the versions differ only by additions. Signed-off-by: Erik --- conformance/crd.mjs | 65 +- schema/awp.v1alpha4.json | 3797 ++++++++++++++++++++++++++++++++++ schema/crd/agents.yaml | 586 +++++- schema/crd/policies.yaml | 633 +++++- schema/crd/workflowruns.yaml | 259 ++- schema/crd/workflows.yaml | 1613 ++++++++++++++- 6 files changed, 6918 insertions(+), 35 deletions(-) create mode 100644 schema/awp.v1alpha4.json diff --git a/conformance/crd.mjs b/conformance/crd.mjs index 02a3f56..9a461b2 100644 --- a/conformance/crd.mjs +++ b/conformance/crd.mjs @@ -1,5 +1,8 @@ #!/usr/bin/env node -// Generates Kubernetes CustomResourceDefinitions from the AWP JSON Schema (v1alpha3 spec 3.10). +// Generates Kubernetes CustomResourceDefinitions from the AWP JSON Schemas (v1alpha3 spec 3.10). +// One CRD per kind serves every version with the Kubernetes resource model (v1alpha3 and later); +// v1alpha3 stays the storage version while it is the current draft. The versions differ only by +// additions, so the API server converts between them by changing apiVersion (strategy None). // // node conformance/crd.mjs write writes schema/crd/.yaml // node conformance/crd.mjs check fails if the files are missing or stale @@ -17,7 +20,8 @@ import { stringify } from 'yaml'; const here = path.dirname(fileURLToPath(import.meta.url)); const root = path.resolve(here, '..'); -const VERSION = 'v1alpha3'; +const VERSIONS = ['v1alpha3', 'v1alpha4']; +const STORAGE_VERSION = 'v1alpha3'; const GROUP = 'awp.agenticworkflowprotocol.org'; const OUT_DIR = path.join(root, 'schema', 'crd'); @@ -112,10 +116,37 @@ function convertObject(schema, node, out, seen) { } } -export function crdFor(schema, { kind, plural, specDef, statusDef, columns }) { +/** One entry of spec.versions: the structural schema of `version` for one kind. */ +function crdVersion(schema, version, { kind, specDef, statusDef, columns }) { const spec = convert(schema, { $ref: `#/$defs/${specDef}` }); // status is typed so that the API server checks runtime writes; unknown fields are kept const status = { ...convert(schema, { $ref: `#/$defs/${statusDef}` }), 'x-kubernetes-preserve-unknown-fields': true }; + return { + name: version, + served: true, + storage: version === STORAGE_VERSION, + subresources: { status: {} }, + additionalPrinterColumns: columns, + schema: { + openAPIV3Schema: { + description: `AWP ${kind} (${GROUP}/${version}). Generated from schema/awp.${version}.json; the JSON Schema is normative.`, + type: 'object', + required: ['spec'], + properties: { + apiVersion: { type: 'string' }, + kind: { type: 'string' }, + metadata: { type: 'object' }, + spec, + status, + }, + }, + }, + }; +} + +/** @param {Map} schemas JSON Schema per version */ +export function crdFor(schemas, entry) { + const { kind, plural } = entry; return { apiVersion: 'apiextensions.k8s.io/v1', kind: 'CustomResourceDefinition', @@ -124,35 +155,15 @@ export function crdFor(schema, { kind, plural, specDef, statusDef, columns }) { group: GROUP, names: { kind, listKind: `${kind}List`, plural, singular: kind.toLowerCase(), categories: ['awp'] }, scope: 'Namespaced', - versions: [{ - name: VERSION, - served: true, - storage: true, - subresources: { status: {} }, - additionalPrinterColumns: columns, - schema: { - openAPIV3Schema: { - description: `AWP ${kind} (${GROUP}/${VERSION}). Generated from schema/awp.${VERSION}.json; the JSON Schema is normative.`, - type: 'object', - required: ['spec'], - properties: { - apiVersion: { type: 'string' }, - kind: { type: 'string' }, - metadata: { type: 'object' }, - spec, - status, - }, - }, - }, - }], + versions: [...schemas].map(([version, schema]) => crdVersion(schema, version, entry)), }, }; } export function renderCrds() { - const schema = JSON.parse(fs.readFileSync(path.join(root, 'schema', `awp.${VERSION}.json`), 'utf8')); - const header = `# Generated by conformance/crd.mjs from schema/awp.${VERSION}.json. Do not edit.\n`; - return KINDS.map(k => ({ file: path.join(OUT_DIR, `${k.plural}.yaml`), text: header + stringify(crdFor(schema, k), { lineWidth: 0 }) })); + const schemas = new Map(VERSIONS.map(v => [v, JSON.parse(fs.readFileSync(path.join(root, 'schema', `awp.${v}.json`), 'utf8'))])); + const header = `# Generated by conformance/crd.mjs from ${VERSIONS.map(v => `schema/awp.${v}.json`).join(', ')}. Do not edit.\n`; + return KINDS.map(k => ({ file: path.join(OUT_DIR, `${k.plural}.yaml`), text: header + stringify(crdFor(schemas, k), { lineWidth: 0 }) })); } /** Returns a list of problems; empty when the committed CRDs match the schema. */ diff --git a/schema/awp.v1alpha4.json b/schema/awp.v1alpha4.json new file mode 100644 index 0000000..58cc0e0 --- /dev/null +++ b/schema/awp.v1alpha4.json @@ -0,0 +1,3797 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://agenticworkflowprotocol.org/schema/awp.v1alpha4.json", + "title": "Agentic Workflow Protocol manifest (v1alpha4)", + "description": "Structural rules of AWP v1alpha4 (spec/v1alpha4/README.md). Rules that JSON Schema cannot express are listed in schema/README.md as semantic validation rules. Per-kind entry points: #/$defs/Workflow, #/$defs/Agent, #/$defs/Policy, #/$defs/WorkflowRun.", + "type": "object", + "required": [ + "kind" + ], + "properties": { + "kind": { + "enum": [ + "Workflow", + "Agent", + "Policy", + "WorkflowRun" + ] + } + }, + "allOf": [ + { + "if": { + "properties": { + "kind": { + "const": "Workflow" + } + }, + "required": [ + "kind" + ] + }, + "then": { + "$ref": "#/$defs/Workflow" + } + }, + { + "if": { + "properties": { + "kind": { + "const": "Agent" + } + }, + "required": [ + "kind" + ] + }, + "then": { + "$ref": "#/$defs/Agent" + } + }, + { + "if": { + "properties": { + "kind": { + "const": "Policy" + } + }, + "required": [ + "kind" + ] + }, + "then": { + "$ref": "#/$defs/Policy" + } + }, + { + "if": { + "properties": { + "kind": { + "const": "WorkflowRun" + } + }, + "required": [ + "kind" + ] + }, + "then": { + "$ref": "#/$defs/WorkflowRun" + } + } + ], + "$defs": { + "Name": { + "description": "Name (spec 3.4).", + "type": "string", + "pattern": "^[a-zA-Z][a-zA-Z0-9_-]{0,62}$" + }, + "Identifier": { + "description": "Identifier (spec 3.4).", + "type": "string", + "pattern": "^[a-z][a-z0-9-]{0,62}$" + }, + "ActionIdentifier": { + "description": "Action identifier (spec 5.5.3).", + "type": "string", + "pattern": "^[a-zA-Z][a-zA-Z0-9_-]*(\\.[a-zA-Z0-9_-]+)+$" + }, + "ActionKey": { + "description": "Action identifier, group identifier or wildcard pattern with a final segment * (spec 5.5.3, 5.5.4).", + "type": "string", + "pattern": "^[a-zA-Z][a-zA-Z0-9_-]*(\\.[a-zA-Z0-9_-]+)*(\\.[a-zA-Z0-9_-]+|\\.\\*)$" + }, + "SemVer": { + "description": "Semantic Version 2.0.0 (spec 3.5).", + "type": "string", + "pattern": "^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(?:-((?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?$" + }, + "Duration": { + "description": "Duration greater than zero (spec 3.6).", + "type": "string", + "pattern": "^(?!(?:0+(?:ms|s|m|h|d|w|y))+$)(?:[0-9]+(?:ms|s|m|h|d|w|y))+$" + }, + "Date": { + "description": "RFC 3339 full-date (spec 3.7). Calendar validity is a semantic rule.", + "type": "string", + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])$" + }, + "Digest": { + "description": "Digest : (spec 3.8). sha256/sha384/sha512 have fixed lengths; other algorithms are accepted syntactically.", + "type": "string", + "pattern": "^(sha256:[0-9a-f]{64}|sha384:[0-9a-f]{96}|sha512:[0-9a-f]{128}|(?!sha256:|sha384:|sha512:)[a-z0-9][a-z0-9_+.-]*:[0-9a-f]+)$" + }, + "HttpsUrl": { + "description": "HTTPS URL.", + "type": "string", + "pattern": "^https://[^\\s/?#]+([/?#]\\S*)?$" + }, + "Classification": { + "description": "Data class (spec 7.2).", + "enum": [ + "public", + "internal", + "confidential", + "personal", + "restricted", + "sensitive", + "secret" + ] + }, + "RiskLevel": { + "enum": [ + "low", + "medium", + "high", + "critical" + ] + }, + "Expression": { + "description": "Expression-enabled string (spec 3.9): only inputs., steps..outputs., execution.id, execution.environment, forEach.item, forEach.item. and forEach.index are allowed inside ${{ }}.", + "type": "string", + "pattern": "^(?:(?!\\$\\{\\{)[\\s\\S]|\\$\\{\\{ *(?:inputs\\.[a-zA-Z][a-zA-Z0-9_-]{0,62}|steps\\.[a-z][a-z0-9-]{0,62}\\.outputs\\.[^\\s.{}$]+|execution\\.id|execution\\.environment|forEach\\.index|forEach\\.item(?:\\.[a-zA-Z0-9_-]{1,63})*) *\\}\\})*$" + }, + "Approver": { + "description": "Exactly one of role or user (spec 7.6).", + "type": "object", + "additionalProperties": false, + "properties": { + "role": { + "type": "string", + "minLength": 1 + }, + "user": { + "type": "string", + "minLength": 1 + }, + "extensions": { + "$ref": "#/$defs/Extensions" + } + }, + "oneOf": [ + { + "required": [ + "role" + ], + "not": { + "required": [ + "user" + ] + } + }, + { + "required": [ + "user" + ], + "not": { + "required": [ + "role" + ] + } + } + ] + }, + "SeparationOfDuties": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean" + }, + "rules": { + "type": "array", + "items": { + "type": "object", + "properties": { + "actorCannotApproveOwnAction": { + "type": "boolean" + }, + "initiatorCannotApprove": { + "type": "boolean" + }, + "distinctApprovers": { + "type": "boolean" + }, + "extensions": { + "$ref": "#/$defs/Extensions" + } + }, + "additionalProperties": false + } + }, + "extensions": { + "$ref": "#/$defs/Extensions" + } + }, + "additionalProperties": false + }, + "Approval": { + "description": "Workflow-level approval configuration (spec 7.6).", + "type": "object", + "properties": { + "requiredFor": { + "type": "array", + "items": { + "$ref": "#/$defs/ActionKey" + } + }, + "approvers": { + "type": "array", + "items": { + "$ref": "#/$defs/Approver" + } + }, + "minApprovals": { + "type": "integer", + "minimum": 1 + }, + "timeout": { + "$ref": "#/$defs/Duration" + }, + "onTimeout": { + "enum": [ + "reject", + "fail" + ] + }, + "message": { + "$ref": "#/$defs/Expression" + }, + "separationOfDuties": { + "$ref": "#/$defs/SeparationOfDuties" + }, + "extensions": { + "$ref": "#/$defs/Extensions" + } + }, + "additionalProperties": false + }, + "ApprovalStep": { + "description": "Payload of an approval step (spec 5.6.1, 7.6): the fields of Approval without requiredFor and separationOfDuties, which apply only at workflow level.", + "type": "object", + "properties": { + "approvers": { + "$ref": "#/$defs/Approval/properties/approvers" + }, + "minApprovals": { + "$ref": "#/$defs/Approval/properties/minApprovals" + }, + "timeout": { + "$ref": "#/$defs/Duration" + }, + "onTimeout": { + "$ref": "#/$defs/Approval/properties/onTimeout" + }, + "message": { + "$ref": "#/$defs/Expression" + }, + "extensions": { + "$ref": "#/$defs/Extensions" + } + }, + "additionalProperties": false + }, + "Budget": { + "description": "Budget (spec 5.7). All limits are positive.", + "type": "object", + "properties": { + "maxCostUsd": { + "type": "number", + "exclusiveMinimum": 0 + }, + "maxSteps": { + "type": "integer", + "minimum": 1 + }, + "maxDuration": { + "$ref": "#/$defs/Duration" + }, + "resources": { + "type": "object", + "properties": { + "maxTokens": { + "type": "integer", + "minimum": 1 + }, + "maxToolCalls": { + "type": "integer", + "minimum": 1 + }, + "maxRetries": { + "type": "integer", + "minimum": 1 + }, + "maxConcurrency": { + "type": "integer", + "minimum": 1 + }, + "extensions": { + "$ref": "#/$defs/Extensions" + } + }, + "additionalProperties": false + }, + "extensions": { + "$ref": "#/$defs/Extensions" + } + }, + "additionalProperties": false + }, + "Permissions": { + "description": "Permissions (spec 7.5).", + "type": "object", + "properties": { + "default": { + "enum": [ + "allow", + "deny" + ] + }, + "tools": { + "type": "object", + "propertyNames": { + "pattern": "^[a-zA-Z][a-zA-Z0-9_-]*(\\.[a-zA-Z0-9_-]+)*(\\.[a-zA-Z0-9_-]+|\\.\\*)$" + }, + "additionalProperties": { + "type": "object", + "properties": { + "allow": { + "type": "boolean" + }, + "resources": { + "type": "array", + "items": { + "$ref": "#/$defs/Expression" + } + }, + "extensions": { + "$ref": "#/$defs/Extensions" + } + }, + "required": [ + "allow" + ], + "additionalProperties": false + } + }, + "network": { + "type": "object", + "properties": { + "egress": { + "enum": [ + "allow", + "deny" + ] + }, + "allowHosts": { + "type": "array", + "items": { + "type": "string", + "minLength": 1 + } + }, + "extensions": { + "$ref": "#/$defs/Extensions" + } + }, + "additionalProperties": false + }, + "filesystem": { + "type": "object", + "properties": { + "read": { + "type": "array", + "items": { + "type": "string", + "minLength": 1 + } + }, + "write": { + "type": "array", + "items": { + "type": "string", + "minLength": 1 + } + }, + "extensions": { + "$ref": "#/$defs/Extensions" + } + }, + "additionalProperties": false + }, + "secrets": { + "type": "array", + "items": { + "$ref": "#/$defs/Name" + } + }, + "environments": { + "type": "array", + "items": { + "type": "string", + "minLength": 1 + } + }, + "extensions": { + "$ref": "#/$defs/Extensions" + } + }, + "additionalProperties": false + }, + "Model": { + "description": "Model object (spec 5.4.3).", + "type": "object", + "properties": { + "provider": { + "type": "string", + "minLength": 1 + }, + "name": { + "type": "string", + "minLength": 1 + }, + "version": { + "type": "string", + "minLength": 1 + }, + "region": { + "type": "string", + "minLength": 1 + }, + "approval": { + "type": "object", + "properties": { + "status": { + "enum": [ + "approved", + "pending", + "rejected", + "revoked" + ] + }, + "expires": { + "$ref": "#/$defs/Date" + }, + "approvedBy": { + "type": "string", + "minLength": 1 + }, + "extensions": { + "$ref": "#/$defs/Extensions" + } + }, + "additionalProperties": false + }, + "riskClassification": { + "$ref": "#/$defs/RiskLevel" + }, + "evaluation": { + "type": "object", + "properties": { + "status": { + "enum": [ + "passed", + "failed", + "pending", + "notEvaluated" + ] + }, + "ref": { + "type": "string", + "minLength": 1 + }, + "extensions": { + "$ref": "#/$defs/Extensions" + } + }, + "additionalProperties": false + }, + "allowedUseCases": { + "type": "array", + "items": { + "type": "string", + "minLength": 1 + } + }, + "extensions": { + "$ref": "#/$defs/Extensions" + } + }, + "required": [ + "provider", + "name" + ], + "additionalProperties": false + }, + "PromptRef": { + "type": "object", + "properties": { + "name": { + "type": "string", + "minLength": 1 + }, + "version": { + "type": "string", + "minLength": 1 + }, + "digest": { + "$ref": "#/$defs/Digest" + }, + "extensions": { + "$ref": "#/$defs/Extensions" + } + }, + "required": [ + "name", + "version" + ], + "additionalProperties": false + }, + "ToolSource": { + "description": "Tool source (spec 5.5.2).", + "type": "object", + "properties": { + "type": { + "enum": [ + "mcp", + "builtin" + ] + }, + "server": { + "$ref": "#/$defs/Name" + }, + "name": { + "type": "string", + "minLength": 1 + }, + "tools": { + "type": "array", + "items": { + "type": "string", + "minLength": 1 + } + }, + "extensions": { + "$ref": "#/$defs/Extensions" + } + }, + "required": [ + "type" + ], + "additionalProperties": false, + "allOf": [ + { + "if": { + "properties": { + "type": { + "const": "mcp" + } + }, + "required": [ + "type" + ] + }, + "then": { + "required": [ + "server" + ] + } + }, + { + "if": { + "properties": { + "type": { + "const": "builtin" + } + }, + "required": [ + "type" + ] + }, + "then": { + "required": [ + "name" + ] + } + } + ] + }, + "McpServer": { + "description": "MCP server (spec 5.5.1).", + "type": "object", + "properties": { + "name": { + "$ref": "#/$defs/Name" + }, + "transport": { + "enum": [ + "stdio", + "streamable-http" + ] + }, + "url": { + "$ref": "#/$defs/HttpsUrl" + }, + "image": { + "type": "string", + "minLength": 1 + }, + "version": { + "type": "string", + "minLength": 1 + }, + "auth": { + "type": "object", + "properties": { + "secretRef": { + "$ref": "#/$defs/Name" + }, + "extensions": { + "$ref": "#/$defs/Extensions" + } + }, + "required": [ + "secretRef" + ], + "additionalProperties": false + }, + "extensions": { + "$ref": "#/$defs/Extensions" + } + }, + "required": [ + "name", + "transport" + ], + "additionalProperties": false, + "if": { + "properties": { + "transport": { + "const": "streamable-http" + } + }, + "required": [ + "transport" + ] + }, + "then": { + "required": [ + "url" + ] + } + }, + "Secret": { + "description": "Secret declaration (spec 7.9). Secret values never appear in manifests.", + "type": "object", + "properties": { + "name": { + "$ref": "#/$defs/Name" + }, + "source": { + "type": "string", + "minLength": 1 + }, + "key": { + "type": "string", + "minLength": 1 + }, + "scope": { + "type": "array", + "items": { + "type": "string", + "minLength": 1 + } + }, + "extensions": { + "$ref": "#/$defs/Extensions" + } + }, + "required": [ + "name", + "source" + ], + "additionalProperties": false + }, + "ActionGroups": { + "description": "Action groups (spec 5.5.4). Nesting is a semantic rule.", + "type": "object", + "propertyNames": { + "pattern": "^[a-zA-Z][a-zA-Z0-9_-]*(\\.[a-zA-Z0-9_-]+)+$" + }, + "additionalProperties": { + "type": "array", + "items": { + "$ref": "#/$defs/ActionIdentifier" + } + } + }, + "InlineAgent": { + "description": "Inline agent (spec 5.4.1).", + "type": "object", + "properties": { + "id": { + "$ref": "#/$defs/Identifier" + }, + "model": { + "$ref": "#/$defs/Model" + }, + "instructions": { + "type": "string" + }, + "promptRef": { + "$ref": "#/$defs/PromptRef" + }, + "tools": { + "type": "array", + "items": { + "$ref": "#/$defs/ToolSource" + } + }, + "permissions": { + "$ref": "#/$defs/Permissions" + }, + "budget": { + "$ref": "#/$defs/Budget" + }, + "humanInput": { + "$ref": "#/$defs/HumanInput" + }, + "extensions": { + "$ref": "#/$defs/Extensions" + } + }, + "required": [ + "id", + "model" + ], + "additionalProperties": false, + "not": { + "required": [ + "instructions", + "promptRef" + ] + } + }, + "AgentReference": { + "description": "Agent reference (spec 5.4.2).", + "type": "object", + "properties": { + "id": { + "$ref": "#/$defs/Identifier" + }, + "ref": { + "type": "object", + "properties": { + "name": { + "$ref": "#/$defs/Name" + }, + "version": { + "$ref": "#/$defs/SemVer" + }, + "digest": { + "$ref": "#/$defs/Digest" + }, + "extensions": { + "$ref": "#/$defs/Extensions" + } + }, + "required": [ + "name", + "version" + ], + "additionalProperties": false + }, + "permissions": { + "$ref": "#/$defs/Permissions" + }, + "budget": { + "$ref": "#/$defs/Budget" + }, + "extensions": { + "$ref": "#/$defs/Extensions" + } + }, + "required": [ + "id", + "ref" + ], + "additionalProperties": false + }, + "RemoteAgent": { + "description": "Remote agent over A2A (spec 5.4.4).", + "type": "object", + "properties": { + "id": { + "$ref": "#/$defs/Identifier" + }, + "protocol": { + "const": "a2a" + }, + "endpoint": { + "$ref": "#/$defs/HttpsUrl" + }, + "agentCard": { + "type": "object", + "properties": { + "url": { + "$ref": "#/$defs/HttpsUrl" + }, + "digest": { + "$ref": "#/$defs/Digest" + }, + "extensions": { + "$ref": "#/$defs/Extensions" + } + }, + "required": [ + "url" + ], + "additionalProperties": false + }, + "auth": { + "type": "object", + "properties": { + "secretRef": { + "$ref": "#/$defs/Name" + }, + "extensions": { + "$ref": "#/$defs/Extensions" + } + }, + "required": [ + "secretRef" + ], + "additionalProperties": false + }, + "extensions": { + "$ref": "#/$defs/Extensions" + } + }, + "required": [ + "id", + "protocol", + "endpoint" + ], + "additionalProperties": false + }, + "AgentEntry": { + "description": "One entry of spec.agents: agent reference if it has ref, remote agent if it has protocol, otherwise inline agent (spec 5.4).", + "type": "object", + "required": [ + "id" + ], + "if": { + "required": [ + "ref" + ] + }, + "then": { + "$ref": "#/$defs/AgentReference" + }, + "else": { + "if": { + "required": [ + "protocol" + ] + }, + "then": { + "$ref": "#/$defs/RemoteAgent" + }, + "else": { + "$ref": "#/$defs/InlineAgent" + } + } + }, + "Trigger": { + "description": "Trigger (spec 5.2).", + "type": "object", + "properties": { + "type": { + "enum": [ + "manual", + "schedule", + "event" + ] + }, + "cron": { + "type": "string", + "pattern": "^\\S+(\\s+\\S+){4}$" + }, + "timezone": { + "type": "string", + "minLength": 1 + }, + "source": { + "type": "string", + "minLength": 1 + }, + "eventType": { + "type": "string", + "minLength": 1 + }, + "filter": { + "type": "object", + "propertyNames": { + "pattern": "^.+$" + }, + "additionalProperties": { + "type": "string" + } + }, + "concurrencyPolicy": { + "enum": [ + "allow", + "forbid", + "replace" + ] + }, + "startingDeadline": { + "$ref": "#/$defs/Duration" + }, + "extensions": { + "$ref": "#/$defs/Extensions" + } + }, + "required": [ + "type" + ], + "additionalProperties": false, + "allOf": [ + { + "if": { + "properties": { + "type": { + "const": "manual" + } + }, + "required": [ + "type" + ] + }, + "then": { + "not": { + "anyOf": [ + { + "required": [ + "cron" + ] + }, + { + "required": [ + "timezone" + ] + }, + { + "required": [ + "source" + ] + }, + { + "required": [ + "eventType" + ] + }, + { + "required": [ + "filter" + ] + }, + { + "required": [ + "concurrencyPolicy" + ] + }, + { + "required": [ + "startingDeadline" + ] + } + ] + } + } + }, + { + "if": { + "properties": { + "type": { + "const": "schedule" + } + }, + "required": [ + "type" + ] + }, + "then": { + "required": [ + "cron" + ], + "not": { + "anyOf": [ + { + "required": [ + "source" + ] + }, + { + "required": [ + "eventType" + ] + }, + { + "required": [ + "filter" + ] + } + ] + } + } + }, + { + "if": { + "properties": { + "type": { + "const": "event" + } + }, + "required": [ + "type" + ] + }, + "then": { + "required": [ + "source", + "eventType" + ], + "not": { + "anyOf": [ + { + "required": [ + "cron" + ] + }, + { + "required": [ + "timezone" + ] + }, + { + "required": [ + "concurrencyPolicy" + ] + }, + { + "required": [ + "startingDeadline" + ] + } + ] + } + } + } + ] + }, + "Input": { + "description": "Workflow input (spec 5.3).", + "type": "object", + "properties": { + "name": { + "$ref": "#/$defs/Name" + }, + "type": { + "enum": [ + "string", + "integer", + "number", + "boolean", + "object", + "array", + "artifact" + ] + }, + "required": { + "type": "boolean" + }, + "default": {}, + "description": { + "type": "string" + }, + "pattern": { + "type": "string" + }, + "enum": { + "type": "array", + "items": {} + }, + "classification": { + "$ref": "#/$defs/Classification" + }, + "extensions": { + "$ref": "#/$defs/Extensions" + } + }, + "required": [ + "name", + "type" + ], + "additionalProperties": false, + "allOf": [ + { + "if": { + "properties": { + "type": { + "const": "string" + } + }, + "required": [ + "type" + ] + }, + "then": { + "properties": { + "default": { + "type": "string" + } + } + } + }, + { + "if": { + "properties": { + "type": { + "const": "integer" + } + }, + "required": [ + "type" + ] + }, + "then": { + "properties": { + "default": { + "type": "integer" + } + } + } + }, + { + "if": { + "properties": { + "type": { + "const": "number" + } + }, + "required": [ + "type" + ] + }, + "then": { + "properties": { + "default": { + "type": "number" + } + } + } + }, + { + "if": { + "properties": { + "type": { + "const": "boolean" + } + }, + "required": [ + "type" + ] + }, + "then": { + "properties": { + "default": { + "type": "boolean" + } + } + } + }, + { + "if": { + "properties": { + "type": { + "const": "object" + } + }, + "required": [ + "type" + ] + }, + "then": { + "properties": { + "default": { + "type": "object" + } + } + } + }, + { + "if": { + "properties": { + "type": { + "const": "array" + } + }, + "required": [ + "type" + ] + }, + "then": { + "properties": { + "default": { + "type": "array" + } + } + } + }, + { + "if": { + "properties": { + "required": { + "const": true + } + }, + "required": [ + "required" + ] + }, + "then": { + "not": { + "required": [ + "default" + ] + } + } + } + ] + }, + "Step": { + "description": "Workflow step (spec 5.6).", + "type": "object", + "properties": { + "id": { + "$ref": "#/$defs/Identifier" + }, + "type": { + "enum": [ + "agent", + "command", + "approval", + "input", + "workflow" + ] + }, + "dependsOn": { + "type": "array", + "items": { + "$ref": "#/$defs/Identifier" + } + }, + "timeout": { + "$ref": "#/$defs/Duration" + }, + "retries": { + "type": "integer", + "minimum": 0 + }, + "when": { + "description": "Condition (spec 3.10): the step runs only if it evaluates to true. The whole field is the expression, without ${{ }}.", + "type": "string", + "minLength": 1, + "maxLength": 512 + }, + "outputs": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "description": "Output name (spec 5.6.1). Also the file name in $AWP_OUTPUTS (spec 5.6.4).", + "type": "string", + "pattern": "^[A-Za-z_][A-Za-z0-9_]{0,62}$" + }, + "classification": { + "$ref": "#/$defs/Classification" + }, + "description": { + "type": "string" + }, + "extensions": { + "$ref": "#/$defs/Extensions" + } + }, + "required": [ + "name" + ], + "additionalProperties": false + } + }, + "budget": { + "$ref": "#/$defs/Budget" + }, + "agent": { + "$ref": "#/$defs/Identifier" + }, + "task": { + "$ref": "#/$defs/Expression" + }, + "command": { + "type": "string", + "minLength": 1 + }, + "image": { + "type": "string", + "minLength": 1 + }, + "env": { + "type": "object", + "propertyNames": { + "pattern": "^[A-Za-z_][A-Za-z0-9_]*$" + }, + "additionalProperties": { + "$ref": "#/$defs/Expression" + } + }, + "workingDir": { + "type": "string", + "minLength": 1 + }, + "approval": { + "$ref": "#/$defs/ApprovalStep" + }, + "input": { + "$ref": "#/$defs/InputStep" + }, + "workflow": { + "$ref": "#/$defs/WorkflowCall" + }, + "forEach": { + "$ref": "#/$defs/ForEach" + }, + "extensions": { + "$ref": "#/$defs/Extensions" + } + }, + "required": [ + "id" + ], + "additionalProperties": false, + "if": { + "required": [ + "type" + ], + "properties": { + "type": { + "const": "workflow" + } + } + }, + "then": { + "required": [ + "workflow" + ], + "not": { + "anyOf": [ + { + "required": [ + "agent" + ] + }, + { + "required": [ + "task" + ] + }, + { + "required": [ + "command" + ] + }, + { + "required": [ + "image" + ] + }, + { + "required": [ + "env" + ] + }, + { + "required": [ + "workingDir" + ] + }, + { + "required": [ + "approval" + ] + }, + { + "required": [ + "input" + ] + }, + { + "required": [ + "forEach" + ] + } + ] + } + }, + "else": { + "if": { + "required": [ + "type" + ], + "properties": { + "type": { + "const": "command" + } + } + }, + "then": { + "required": [ + "command" + ], + "not": { + "anyOf": [ + { + "required": [ + "agent" + ] + }, + { + "required": [ + "task" + ] + }, + { + "required": [ + "approval" + ] + }, + { + "required": [ + "input" + ] + }, + { + "required": [ + "workflow" + ] + } + ] + } + }, + "else": { + "if": { + "required": [ + "type" + ], + "properties": { + "type": { + "const": "approval" + } + } + }, + "then": { + "required": [ + "approval" + ], + "not": { + "anyOf": [ + { + "required": [ + "agent" + ] + }, + { + "required": [ + "task" + ] + }, + { + "required": [ + "command" + ] + }, + { + "required": [ + "image" + ] + }, + { + "required": [ + "env" + ] + }, + { + "required": [ + "workingDir" + ] + }, + { + "required": [ + "input" + ] + }, + { + "required": [ + "forEach" + ] + }, + { + "required": [ + "workflow" + ] + } + ] + } + }, + "else": { + "if": { + "required": [ + "type" + ], + "properties": { + "type": { + "const": "input" + } + } + }, + "then": { + "required": [ + "input" + ], + "not": { + "anyOf": [ + { + "required": [ + "agent" + ] + }, + { + "required": [ + "task" + ] + }, + { + "required": [ + "command" + ] + }, + { + "required": [ + "image" + ] + }, + { + "required": [ + "env" + ] + }, + { + "required": [ + "workingDir" + ] + }, + { + "required": [ + "approval" + ] + }, + { + "required": [ + "forEach" + ] + }, + { + "required": [ + "workflow" + ] + } + ] + } + }, + "else": { + "required": [ + "agent" + ], + "not": { + "anyOf": [ + { + "required": [ + "command" + ] + }, + { + "required": [ + "image" + ] + }, + { + "required": [ + "env" + ] + }, + { + "required": [ + "workingDir" + ] + }, + { + "required": [ + "approval" + ] + }, + { + "required": [ + "input" + ] + }, + { + "required": [ + "workflow" + ] + } + ] + } + } + } + } + } + }, + "DataPolicy": { + "description": "Data policy (spec 7.2, 7.3).", + "type": "object", + "properties": { + "classification": { + "$ref": "#/$defs/Classification" + }, + "inputs": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string", + "minLength": 1 + }, + "classification": { + "$ref": "#/$defs/Classification" + }, + "extensions": { + "$ref": "#/$defs/Extensions" + } + }, + "required": [ + "name", + "classification" + ], + "additionalProperties": false + } + }, + "outputs": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string", + "minLength": 1 + }, + "classification": { + "$ref": "#/$defs/Classification" + }, + "extensions": { + "$ref": "#/$defs/Extensions" + } + }, + "required": [ + "name", + "classification" + ], + "additionalProperties": false + } + }, + "restrictions": { + "type": "object", + "properties": { + "externalTransfer": { + "enum": [ + "allow", + "deny" + ] + }, + "extensions": { + "$ref": "#/$defs/Extensions" + } + }, + "additionalProperties": false + }, + "residency": { + "type": "object", + "properties": { + "allowed": { + "type": "array", + "items": { + "type": "string", + "minLength": 1 + } + }, + "extensions": { + "$ref": "#/$defs/Extensions" + } + }, + "additionalProperties": false + }, + "processing": { + "type": "object", + "properties": { + "allowedProviders": { + "type": "array", + "items": { + "type": "string", + "minLength": 1 + } + }, + "forbiddenProviders": { + "type": "array", + "items": { + "type": "string", + "minLength": 1 + } + }, + "extensions": { + "$ref": "#/$defs/Extensions" + } + }, + "additionalProperties": false + }, + "extensions": { + "$ref": "#/$defs/Extensions" + } + }, + "additionalProperties": false + }, + "ModelPolicy": { + "description": "Model policy (spec 7.4).", + "type": "object", + "properties": { + "allowedProviders": { + "type": "array", + "items": { + "type": "string", + "minLength": 1 + } + }, + "allowedModels": { + "type": "array", + "items": { + "type": "string", + "minLength": 1 + } + }, + "forbiddenModels": { + "type": "array", + "items": { + "type": "string", + "minLength": 1 + } + }, + "requirements": { + "type": "object", + "properties": { + "approvalStatus": { + "enum": [ + "approved", + "pending", + "rejected", + "revoked" + ] + }, + "encryption": { + "type": "boolean" + }, + "region": { + "type": "string", + "minLength": 1 + }, + "evaluationStatus": { + "enum": [ + "passed", + "failed", + "pending", + "notEvaluated" + ] + }, + "extensions": { + "$ref": "#/$defs/Extensions" + } + }, + "additionalProperties": false + }, + "extensions": { + "$ref": "#/$defs/Extensions" + } + }, + "additionalProperties": false + }, + "Policies": { + "description": "Workflow policy shorthands and includes (spec 8.1).", + "type": "object", + "properties": { + "git": { + "type": "object", + "properties": { + "allowPush": { + "type": "boolean" + }, + "allowForcePush": { + "type": "boolean" + }, + "extensions": { + "$ref": "#/$defs/Extensions" + } + }, + "additionalProperties": false + }, + "pullRequest": { + "type": "object", + "properties": { + "allowCreate": { + "type": "boolean" + }, + "extensions": { + "$ref": "#/$defs/Extensions" + } + }, + "additionalProperties": false + }, + "merge": { + "type": "object", + "properties": { + "allow": { + "type": "boolean" + }, + "extensions": { + "$ref": "#/$defs/Extensions" + } + }, + "additionalProperties": false + }, + "production": { + "type": "object", + "properties": { + "allow": { + "type": "boolean" + }, + "extensions": { + "$ref": "#/$defs/Extensions" + } + }, + "additionalProperties": false + }, + "include": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "$ref": "#/$defs/Name" + }, + "version": { + "$ref": "#/$defs/SemVer" + }, + "digest": { + "$ref": "#/$defs/Digest" + }, + "extensions": { + "$ref": "#/$defs/Extensions" + } + }, + "required": [ + "name", + "version" + ], + "additionalProperties": false + } + }, + "extensions": { + "$ref": "#/$defs/Extensions" + } + }, + "additionalProperties": false + }, + "Audit": { + "description": "Audit configuration (spec 10.2).", + "type": "object", + "properties": { + "enabled": { + "type": "boolean" + }, + "payload": { + "enum": [ + "metadata", + "full" + ] + }, + "integrity": { + "type": "object", + "properties": { + "mode": { + "enum": [ + "none", + "hash-chain", + "signed" + ] + }, + "extensions": { + "$ref": "#/$defs/Extensions" + } + }, + "additionalProperties": false + }, + "retention": { + "type": "object", + "properties": { + "duration": { + "$ref": "#/$defs/Duration" + }, + "extensions": { + "$ref": "#/$defs/Extensions" + } + }, + "additionalProperties": false + }, + "extensions": { + "$ref": "#/$defs/Extensions" + } + }, + "additionalProperties": false + }, + "Environments": { + "description": "Environments (spec 7.10). Keys are organizational environment names.", + "type": "object", + "propertyNames": { + "pattern": "^.+$" + }, + "additionalProperties": { + "type": "object", + "properties": { + "autonomy": { + "enum": [ + "unrestricted", + "controlled", + "approval-required", + "prohibited" + ] + }, + "autoApprove": { + "type": "array", + "items": { + "$ref": "#/$defs/ActionKey" + } + }, + "extensions": { + "$ref": "#/$defs/Extensions" + } + }, + "required": [ + "autonomy" + ], + "additionalProperties": false + } + }, + "Owner": { + "description": "Ownership (spec 7.1).", + "type": "object", + "properties": { + "team": { + "type": "string", + "minLength": 1 + }, + "contact": { + "type": "string" + }, + "businessOwner": { + "type": "string" + }, + "technicalOwner": { + "type": "string" + }, + "dataOwner": { + "type": "string" + }, + "extensions": { + "$ref": "#/$defs/Extensions" + } + }, + "required": [ + "team" + ], + "additionalProperties": false + }, + "Metadata": { + "description": "Object metadata (spec 4): the subset of Kubernetes ObjectMeta that authors write. Fields that an object store populates are tolerated and ignored.", + "type": "object", + "properties": { + "name": { + "$ref": "#/$defs/ObjectName" + }, + "namespace": { + "$ref": "#/$defs/ObjectName" + }, + "labels": { + "type": "object", + "propertyNames": { + "pattern": "^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?[A-Za-z0-9]([-A-Za-z0-9_.]{0,61}[A-Za-z0-9])?$", + "maxLength": 316 + }, + "additionalProperties": { + "type": "string", + "pattern": "^(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])?$", + "maxLength": 63 + } + }, + "annotations": { + "type": "object", + "propertyNames": { + "pattern": "^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?[A-Za-z0-9]([-A-Za-z0-9_.]{0,61}[A-Za-z0-9])?$", + "maxLength": 316 + }, + "additionalProperties": { + "type": "string" + } + }, + "uid": { + "type": "string" + }, + "resourceVersion": { + "type": "string" + }, + "generation": { + "type": "integer" + }, + "creationTimestamp": { + "type": "string" + }, + "deletionTimestamp": { + "type": "string" + }, + "deletionGracePeriodSeconds": { + "type": "integer" + }, + "finalizers": { + "type": "array", + "items": { + "type": "string" + } + }, + "ownerReferences": { + "type": "array", + "items": { + "type": "object" + } + }, + "managedFields": { + "type": "array", + "items": { + "type": "object" + } + } + }, + "required": [ + "name" + ], + "additionalProperties": false + }, + "WorkflowSpec": { + "description": "spec of kind Workflow (spec 5.1).", + "type": "object", + "properties": { + "version": { + "$ref": "#/$defs/SemVer" + }, + "description": { + "type": "string" + }, + "owner": { + "$ref": "#/$defs/Owner" + }, + "classification": { + "$ref": "#/$defs/Classification" + }, + "purpose": { + "type": "string" + }, + "risk": { + "type": "object", + "properties": { + "level": { + "$ref": "#/$defs/RiskLevel" + }, + "category": { + "type": "array", + "items": { + "type": "string", + "minLength": 1 + } + }, + "extensions": { + "$ref": "#/$defs/Extensions" + } + }, + "required": [ + "level" + ], + "additionalProperties": false + }, + "integrity": { + "type": "object", + "properties": { + "digest": { + "$ref": "#/$defs/Digest" + }, + "extensions": { + "$ref": "#/$defs/Extensions" + } + }, + "required": [ + "digest" + ], + "additionalProperties": false + }, + "signature": { + "type": "object", + "properties": { + "format": { + "type": "string", + "minLength": 1 + }, + "ref": { + "type": "string", + "minLength": 1 + }, + "identity": { + "type": "string", + "minLength": 1 + }, + "extensions": { + "$ref": "#/$defs/Extensions" + } + }, + "additionalProperties": false + }, + "provenance": { + "type": "object", + "properties": { + "format": { + "type": "string", + "minLength": 1 + }, + "ref": { + "type": "string", + "minLength": 1 + }, + "extensions": { + "$ref": "#/$defs/Extensions" + } + }, + "additionalProperties": false + }, + "triggers": { + "type": "array", + "items": { + "$ref": "#/$defs/Trigger" + } + }, + "inputs": { + "type": "array", + "items": { + "$ref": "#/$defs/Input" + } + }, + "budget": { + "$ref": "#/$defs/Budget" + }, + "agents": { + "type": "array", + "items": { + "$ref": "#/$defs/AgentEntry" + } + }, + "mcpServers": { + "type": "array", + "items": { + "$ref": "#/$defs/McpServer" + } + }, + "actionGroups": { + "$ref": "#/$defs/ActionGroups" + }, + "workflow": { + "type": "array", + "items": { + "$ref": "#/$defs/Step" + } + }, + "secrets": { + "type": "array", + "items": { + "$ref": "#/$defs/Secret" + } + }, + "environment": { + "type": "object", + "properties": { + "name": { + "type": "string", + "minLength": 1 + }, + "extensions": { + "$ref": "#/$defs/Extensions" + } + }, + "required": [ + "name" + ], + "additionalProperties": false + }, + "environments": { + "$ref": "#/$defs/Environments" + }, + "permissions": { + "$ref": "#/$defs/Permissions" + }, + "dataPolicy": { + "$ref": "#/$defs/DataPolicy" + }, + "modelPolicy": { + "$ref": "#/$defs/ModelPolicy" + }, + "approval": { + "$ref": "#/$defs/Approval" + }, + "policies": { + "$ref": "#/$defs/Policies" + }, + "audit": { + "$ref": "#/$defs/Audit" + }, + "extensions": { + "$ref": "#/$defs/Extensions" + } + }, + "required": [ + "version", + "owner", + "agents", + "workflow" + ], + "additionalProperties": false + }, + "AgentSpec": { + "description": "spec of kind Agent (spec 6).", + "type": "object", + "properties": { + "version": { + "$ref": "#/$defs/SemVer" + }, + "description": { + "type": "string" + }, + "owner": { + "$ref": "#/$defs/Owner" + }, + "classification": { + "$ref": "#/$defs/Classification" + }, + "purpose": { + "type": "string" + }, + "risk": { + "type": "object", + "properties": { + "level": { + "$ref": "#/$defs/RiskLevel" + }, + "category": { + "type": "array", + "items": { + "type": "string", + "minLength": 1 + } + }, + "extensions": { + "$ref": "#/$defs/Extensions" + } + }, + "required": [ + "level" + ], + "additionalProperties": false + }, + "integrity": { + "type": "object", + "properties": { + "digest": { + "$ref": "#/$defs/Digest" + }, + "extensions": { + "$ref": "#/$defs/Extensions" + } + }, + "required": [ + "digest" + ], + "additionalProperties": false + }, + "signature": { + "type": "object", + "properties": { + "format": { + "type": "string", + "minLength": 1 + }, + "ref": { + "type": "string", + "minLength": 1 + }, + "identity": { + "type": "string", + "minLength": 1 + }, + "extensions": { + "$ref": "#/$defs/Extensions" + } + }, + "additionalProperties": false + }, + "provenance": { + "type": "object", + "properties": { + "format": { + "type": "string", + "minLength": 1 + }, + "ref": { + "type": "string", + "minLength": 1 + }, + "extensions": { + "$ref": "#/$defs/Extensions" + } + }, + "additionalProperties": false + }, + "model": { + "$ref": "#/$defs/Model" + }, + "instructions": { + "type": "string" + }, + "promptRef": { + "$ref": "#/$defs/PromptRef" + }, + "tools": { + "type": "array", + "items": { + "$ref": "#/$defs/ToolSource" + } + }, + "mcpServers": { + "type": "array", + "items": { + "$ref": "#/$defs/McpServer" + } + }, + "actionGroups": { + "$ref": "#/$defs/ActionGroups" + }, + "permissions": { + "$ref": "#/$defs/Permissions" + }, + "budget": { + "$ref": "#/$defs/Budget" + }, + "secrets": { + "type": "array", + "items": { + "$ref": "#/$defs/Secret" + } + }, + "humanInput": { + "$ref": "#/$defs/HumanInput" + }, + "extensions": { + "$ref": "#/$defs/Extensions" + } + }, + "required": [ + "version", + "owner", + "model" + ], + "additionalProperties": false, + "not": { + "required": [ + "instructions", + "promptRef" + ] + } + }, + "Condition": { + "description": "Policy rule conditions (spec 8.3): each attribute maps to an operator object. Unknown attributes are rejected; ordering operators are limited to data.classification and risk.level.", + "type": "object", + "minProperties": 1, + "additionalProperties": false, + "properties": { + "action": { + "type": "object", + "properties": { + "in": { + "type": "array", + "items": { + "$ref": "#/$defs/ActionKey" + } + }, + "notIn": { + "type": "array", + "items": { + "$ref": "#/$defs/ActionKey" + } + }, + "equals": { + "$ref": "#/$defs/ActionKey" + }, + "notEquals": { + "$ref": "#/$defs/ActionKey" + }, + "extensions": { + "$ref": "#/$defs/Extensions" + } + }, + "additionalProperties": false, + "minProperties": 1 + }, + "environment.name": { + "type": "object", + "properties": { + "in": { + "type": "array", + "items": { + "type": "string", + "minLength": 1 + } + }, + "notIn": { + "type": "array", + "items": { + "type": "string", + "minLength": 1 + } + }, + "equals": { + "type": "string", + "minLength": 1 + }, + "notEquals": { + "type": "string", + "minLength": 1 + }, + "extensions": { + "$ref": "#/$defs/Extensions" + } + }, + "additionalProperties": false, + "minProperties": 1 + }, + "risk.level": { + "type": "object", + "properties": { + "in": { + "type": "array", + "items": { + "$ref": "#/$defs/RiskLevel" + } + }, + "notIn": { + "type": "array", + "items": { + "$ref": "#/$defs/RiskLevel" + } + }, + "equals": { + "$ref": "#/$defs/RiskLevel" + }, + "notEquals": { + "$ref": "#/$defs/RiskLevel" + }, + "gt": { + "$ref": "#/$defs/RiskLevel" + }, + "gte": { + "$ref": "#/$defs/RiskLevel" + }, + "lt": { + "$ref": "#/$defs/RiskLevel" + }, + "lte": { + "$ref": "#/$defs/RiskLevel" + }, + "extensions": { + "$ref": "#/$defs/Extensions" + } + }, + "additionalProperties": false, + "minProperties": 1 + }, + "data.classification": { + "type": "object", + "properties": { + "in": { + "type": "array", + "items": { + "$ref": "#/$defs/Classification" + } + }, + "notIn": { + "type": "array", + "items": { + "$ref": "#/$defs/Classification" + } + }, + "equals": { + "$ref": "#/$defs/Classification" + }, + "notEquals": { + "$ref": "#/$defs/Classification" + }, + "gt": { + "$ref": "#/$defs/Classification" + }, + "gte": { + "$ref": "#/$defs/Classification" + }, + "lt": { + "$ref": "#/$defs/Classification" + }, + "lte": { + "$ref": "#/$defs/Classification" + }, + "extensions": { + "$ref": "#/$defs/Extensions" + } + }, + "additionalProperties": false, + "minProperties": 1 + }, + "destination.provider": { + "type": "object", + "properties": { + "in": { + "type": "array", + "items": { + "type": "string", + "minLength": 1 + } + }, + "notIn": { + "type": "array", + "items": { + "type": "string", + "minLength": 1 + } + }, + "equals": { + "type": "string", + "minLength": 1 + }, + "notEquals": { + "type": "string", + "minLength": 1 + }, + "extensions": { + "$ref": "#/$defs/Extensions" + } + }, + "additionalProperties": false, + "minProperties": 1 + }, + "destination.region": { + "type": "object", + "properties": { + "in": { + "type": "array", + "items": { + "type": "string", + "minLength": 1 + } + }, + "notIn": { + "type": "array", + "items": { + "type": "string", + "minLength": 1 + } + }, + "equals": { + "type": "string", + "minLength": 1 + }, + "notEquals": { + "type": "string", + "minLength": 1 + }, + "extensions": { + "$ref": "#/$defs/Extensions" + } + }, + "additionalProperties": false, + "minProperties": 1 + }, + "model.provider": { + "type": "object", + "properties": { + "in": { + "type": "array", + "items": { + "type": "string", + "minLength": 1 + } + }, + "notIn": { + "type": "array", + "items": { + "type": "string", + "minLength": 1 + } + }, + "equals": { + "type": "string", + "minLength": 1 + }, + "notEquals": { + "type": "string", + "minLength": 1 + }, + "extensions": { + "$ref": "#/$defs/Extensions" + } + }, + "additionalProperties": false, + "minProperties": 1 + }, + "model.name": { + "type": "object", + "properties": { + "in": { + "type": "array", + "items": { + "type": "string", + "minLength": 1 + } + }, + "notIn": { + "type": "array", + "items": { + "type": "string", + "minLength": 1 + } + }, + "equals": { + "type": "string", + "minLength": 1 + }, + "notEquals": { + "type": "string", + "minLength": 1 + }, + "extensions": { + "$ref": "#/$defs/Extensions" + } + }, + "additionalProperties": false, + "minProperties": 1 + }, + "actor.type": { + "type": "object", + "properties": { + "in": { + "type": "array", + "items": { + "enum": [ + "agent", + "human", + "runtime", + "system" + ] + } + }, + "notIn": { + "type": "array", + "items": { + "enum": [ + "agent", + "human", + "runtime", + "system" + ] + } + }, + "equals": { + "enum": [ + "agent", + "human", + "runtime", + "system" + ] + }, + "notEquals": { + "enum": [ + "agent", + "human", + "runtime", + "system" + ] + }, + "extensions": { + "$ref": "#/$defs/Extensions" + } + }, + "additionalProperties": false, + "minProperties": 1 + }, + "workflow.name": { + "type": "object", + "properties": { + "in": { + "type": "array", + "items": { + "type": "string", + "minLength": 1 + } + }, + "notIn": { + "type": "array", + "items": { + "type": "string", + "minLength": 1 + } + }, + "equals": { + "type": "string", + "minLength": 1 + }, + "notEquals": { + "type": "string", + "minLength": 1 + }, + "extensions": { + "$ref": "#/$defs/Extensions" + } + }, + "additionalProperties": false, + "minProperties": 1 + }, + "step.id": { + "type": "object", + "properties": { + "in": { + "type": "array", + "items": { + "type": "string", + "minLength": 1 + } + }, + "notIn": { + "type": "array", + "items": { + "type": "string", + "minLength": 1 + } + }, + "equals": { + "type": "string", + "minLength": 1 + }, + "notEquals": { + "type": "string", + "minLength": 1 + }, + "extensions": { + "$ref": "#/$defs/Extensions" + } + }, + "additionalProperties": false, + "minProperties": 1 + }, + "agent.id": { + "type": "object", + "properties": { + "in": { + "type": "array", + "items": { + "type": "string", + "minLength": 1 + } + }, + "notIn": { + "type": "array", + "items": { + "type": "string", + "minLength": 1 + } + }, + "equals": { + "type": "string", + "minLength": 1 + }, + "notEquals": { + "type": "string", + "minLength": 1 + }, + "extensions": { + "$ref": "#/$defs/Extensions" + } + }, + "additionalProperties": false, + "minProperties": 1 + } + } + }, + "Rule": { + "description": "Policy rule (spec 8.2).", + "type": "object", + "properties": { + "id": { + "$ref": "#/$defs/Identifier" + }, + "when": { + "$ref": "#/$defs/Condition" + }, + "effect": { + "enum": [ + "deny", + "requireApproval" + ] + }, + "approval": { + "type": "object", + "properties": { + "approvers": { + "type": "array", + "items": { + "$ref": "#/$defs/Approver" + } + }, + "minApprovals": { + "type": "integer", + "minimum": 1 + }, + "timeout": { + "$ref": "#/$defs/Duration" + }, + "onTimeout": { + "enum": [ + "reject", + "fail" + ] + }, + "extensions": { + "$ref": "#/$defs/Extensions" + } + }, + "additionalProperties": false + }, + "message": { + "type": "string" + }, + "extensions": { + "$ref": "#/$defs/Extensions" + } + }, + "required": [ + "id", + "when", + "effect" + ], + "additionalProperties": false, + "if": { + "properties": { + "effect": { + "const": "requireApproval" + } + }, + "required": [ + "effect" + ] + }, + "then": { + "required": [ + "approval" + ] + } + }, + "PolicySpec": { + "description": "spec of kind Policy (spec 8.2).", + "type": "object", + "properties": { + "version": { + "$ref": "#/$defs/SemVer" + }, + "description": { + "type": "string" + }, + "owner": { + "$ref": "#/$defs/Owner" + }, + "classification": { + "$ref": "#/$defs/Classification" + }, + "purpose": { + "type": "string" + }, + "risk": { + "type": "object", + "properties": { + "level": { + "$ref": "#/$defs/RiskLevel" + }, + "category": { + "type": "array", + "items": { + "type": "string", + "minLength": 1 + } + }, + "extensions": { + "$ref": "#/$defs/Extensions" + } + }, + "required": [ + "level" + ], + "additionalProperties": false + }, + "integrity": { + "type": "object", + "properties": { + "digest": { + "$ref": "#/$defs/Digest" + }, + "extensions": { + "$ref": "#/$defs/Extensions" + } + }, + "required": [ + "digest" + ], + "additionalProperties": false + }, + "signature": { + "type": "object", + "properties": { + "format": { + "type": "string", + "minLength": 1 + }, + "ref": { + "type": "string", + "minLength": 1 + }, + "identity": { + "type": "string", + "minLength": 1 + }, + "extensions": { + "$ref": "#/$defs/Extensions" + } + }, + "additionalProperties": false + }, + "provenance": { + "type": "object", + "properties": { + "format": { + "type": "string", + "minLength": 1 + }, + "ref": { + "type": "string", + "minLength": 1 + }, + "extensions": { + "$ref": "#/$defs/Extensions" + } + }, + "additionalProperties": false + }, + "rules": { + "type": "array", + "items": { + "$ref": "#/$defs/Rule" + } + }, + "extensions": { + "$ref": "#/$defs/Extensions" + } + }, + "required": [ + "version", + "owner", + "rules" + ], + "additionalProperties": false + }, + "Workflow": { + "description": "A complete manifest of kind Workflow (spec 3.2, 5).", + "type": "object", + "properties": { + "apiVersion": { + "const": "awp.agenticworkflowprotocol.org/v1alpha4" + }, + "kind": { + "const": "Workflow" + }, + "metadata": { + "$ref": "#/$defs/Metadata" + }, + "spec": { + "$ref": "#/$defs/WorkflowSpec" + }, + "status": { + "description": "Written by the runtime or object store (shape: ManifestStatus, spec 3.11). Ignored by validators and excluded from the digest (spec 3.2).", + "type": "object" + } + }, + "required": [ + "apiVersion", + "kind", + "metadata", + "spec" + ], + "additionalProperties": false + }, + "Agent": { + "description": "A complete manifest of kind Agent (spec 3.2, 6).", + "type": "object", + "properties": { + "apiVersion": { + "const": "awp.agenticworkflowprotocol.org/v1alpha4" + }, + "kind": { + "const": "Agent" + }, + "metadata": { + "$ref": "#/$defs/Metadata" + }, + "spec": { + "$ref": "#/$defs/AgentSpec" + }, + "status": { + "description": "Written by the runtime or object store (shape: ManifestStatus, spec 3.11). Ignored by validators and excluded from the digest (spec 3.2).", + "type": "object" + } + }, + "required": [ + "apiVersion", + "kind", + "metadata", + "spec" + ], + "additionalProperties": false + }, + "Policy": { + "description": "A complete manifest of kind Policy (spec 3.2, 8.2).", + "type": "object", + "properties": { + "apiVersion": { + "const": "awp.agenticworkflowprotocol.org/v1alpha4" + }, + "kind": { + "const": "Policy" + }, + "metadata": { + "$ref": "#/$defs/Metadata" + }, + "spec": { + "$ref": "#/$defs/PolicySpec" + }, + "status": { + "description": "Written by the runtime or object store (shape: ManifestStatus, spec 3.11). Ignored by validators and excluded from the digest (spec 3.2).", + "type": "object" + } + }, + "required": [ + "apiVersion", + "kind", + "metadata", + "spec" + ], + "additionalProperties": false + }, + "Extensions": { + "description": "Extension fields (spec 3.3): keys start with x-, values are opaque to AWP. Replaces the x- fields of v1alpha1, which a Kubernetes structural schema cannot express.", + "type": "object", + "propertyNames": { + "pattern": "^x-[a-zA-Z0-9][a-zA-Z0-9_-]*$" + }, + "additionalProperties": {} + }, + "ObjectName": { + "description": "Object name (spec 3.4): a DNS-1123 label.", + "type": "string", + "maxLength": 63, + "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" + }, + "AnswerField": { + "description": "One field of an answer schema (spec 5.8): a primitive value, as in MCP elicitation.", + "type": "object", + "properties": { + "type": { + "enum": [ + "string", + "number", + "integer", + "boolean" + ] + }, + "title": { + "type": "string", + "minLength": 1 + }, + "description": { + "type": "string" + }, + "enum": { + "type": "array", + "minItems": 1, + "items": { + "type": "string" + } + }, + "format": { + "enum": [ + "email", + "uri", + "date", + "date-time" + ] + }, + "minLength": { + "type": "integer", + "minimum": 0 + }, + "maxLength": { + "type": "integer", + "minimum": 1 + }, + "minimum": { + "type": "number" + }, + "maximum": { + "type": "number" + }, + "extensions": { + "$ref": "#/$defs/Extensions" + } + }, + "required": [ + "type" + ], + "additionalProperties": false + }, + "AnswerSchema": { + "description": "Schema of a structured answer (spec 5.8): a flat object of primitive fields, the requested-schema subset of MCP elicitation.", + "type": "object", + "properties": { + "type": { + "const": "object" + }, + "properties": { + "type": "object", + "minProperties": 1, + "propertyNames": { + "pattern": "^[a-zA-Z][a-zA-Z0-9_]{0,62}$" + }, + "additionalProperties": { + "$ref": "#/$defs/AnswerField" + } + }, + "required": { + "type": "array", + "items": { + "type": "string", + "minLength": 1 + } + }, + "extensions": { + "$ref": "#/$defs/Extensions" + } + }, + "required": [ + "type", + "properties" + ], + "additionalProperties": false + }, + "InputStep": { + "description": "Payload of an input step (spec 5.8): ask a person and wait for the answer.", + "type": "object", + "properties": { + "message": { + "$ref": "#/$defs/Expression" + }, + "answerSchema": { + "$ref": "#/$defs/AnswerSchema" + }, + "answerers": { + "type": "array", + "minItems": 1, + "items": { + "$ref": "#/$defs/Approver" + } + }, + "timeout": { + "$ref": "#/$defs/Duration" + }, + "onTimeout": { + "enum": [ + "fail", + "useDefault" + ] + }, + "default": {}, + "classification": { + "$ref": "#/$defs/Classification" + }, + "extensions": { + "$ref": "#/$defs/Extensions" + } + }, + "required": [ + "message", + "answerers" + ], + "additionalProperties": false, + "if": { + "properties": { + "onTimeout": { + "const": "useDefault" + } + }, + "required": [ + "onTimeout" + ] + }, + "then": { + "required": [ + "default" + ] + } + }, + "WorkflowCall": { + "description": "Payload of a workflow step (spec 5.6.6): start another workflow of the same scope as a child execution.", + "type": "object", + "properties": { + "ref": { + "$ref": "#/$defs/ObjectName" + }, + "version": { + "description": "Semantic version range of the child workflow. Default: the version the runtime treats as current.", + "type": "string", + "minLength": 1 + }, + "inputs": { + "description": "Inputs of the child execution; values are expression-enabled (spec 3.9).", + "type": "object", + "additionalProperties": { + "$ref": "#/$defs/Expression" + } + }, + "wait": { + "description": "Wait for the child execution to finish (default true).", + "type": "boolean" + }, + "extensions": { + "$ref": "#/$defs/Extensions" + } + }, + "required": [ + "ref" + ], + "additionalProperties": false + }, + "HumanInput": { + "description": "Lets an agent ask a person during its step (spec 5.8).", + "type": "object", + "properties": { + "answerers": { + "type": "array", + "minItems": 1, + "items": { + "$ref": "#/$defs/Approver" + } + }, + "timeout": { + "$ref": "#/$defs/Duration" + }, + "onTimeout": { + "enum": [ + "return", + "fail" + ] + }, + "maxRequests": { + "type": "integer", + "minimum": 1 + }, + "classification": { + "$ref": "#/$defs/Classification" + }, + "extensions": { + "$ref": "#/$defs/Extensions" + } + }, + "required": [ + "answerers" + ], + "additionalProperties": false + }, + "Timestamp": { + "description": "RFC 3339 timestamp (spec 3.7).", + "type": "string", + "pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}[Tt][0-9]{2}:[0-9]{2}:[0-9]{2}(\\.[0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "StatusCondition": { + "description": "A status condition in the shape of Kubernetes metav1.Condition (spec 3.11).", + "type": "object", + "properties": { + "type": { + "type": "string", + "maxLength": 316, + "pattern": "^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$" + }, + "status": { + "enum": [ + "True", + "False", + "Unknown" + ] + }, + "observedGeneration": { + "type": "integer", + "minimum": 0 + }, + "lastTransitionTime": { + "description": "When status last changed (RFC 3339).", + "$ref": "#/$defs/Timestamp" + }, + "reason": { + "type": "string", + "minLength": 1, + "maxLength": 1024, + "pattern": "^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$" + }, + "message": { + "type": "string", + "maxLength": 32768 + } + }, + "required": [ + "type", + "status", + "lastTransitionTime", + "reason", + "message" + ] + }, + "ManifestStatus": { + "description": "Status a runtime writes on a Workflow, Agent or Policy (spec 3.11). Validators ignore it (spec 3.2).", + "type": "object", + "properties": { + "observedGeneration": { + "type": "integer", + "minimum": 0 + }, + "digest": { + "description": "Digest of the manifest as the runtime validated it (spec 9.1).", + "$ref": "#/$defs/Digest" + }, + "conditions": { + "type": "array", + "items": { + "$ref": "#/$defs/StatusCondition" + } + } + } + }, + "WorkflowRunStatus": { + "description": "Status a runtime writes on a WorkflowRun (spec 10.8). Validators ignore it (spec 3.2).", + "type": "object", + "properties": { + "observedGeneration": { + "type": "integer", + "minimum": 0 + }, + "executionId": { + "type": "string" + }, + "phase": { + "enum": [ + "pending", + "running", + "succeeded", + "failed", + "cancelled", + "rejected" + ] + }, + "reason": { + "type": "string" + }, + "message": { + "type": "string" + }, + "actor": { + "type": "object", + "properties": { + "type": { + "enum": [ + "human", + "system", + "runtime", + "agent" + ] + }, + "id": { + "type": "string" + } + } + }, + "trigger": { + "type": "object", + "properties": { + "type": { + "enum": [ + "manual", + "schedule", + "event" + ] + }, + "index": { + "type": "integer", + "minimum": 0 + }, + "scheduledAt": { + "description": "Tick time for schedule triggers.", + "$ref": "#/$defs/Timestamp" + } + } + }, + "environment": { + "type": "string" + }, + "workflow": { + "description": "The manifest the execution is pinned to (spec 10.1).", + "type": "object", + "properties": { + "name": { + "$ref": "#/$defs/ObjectName" + }, + "version": { + "$ref": "#/$defs/SemVer" + }, + "digest": { + "$ref": "#/$defs/Digest" + } + } + }, + "startedAt": { + "description": "Start of the execution.", + "$ref": "#/$defs/Timestamp" + }, + "finishedAt": { + "description": "End of the execution.", + "$ref": "#/$defs/Timestamp" + }, + "steps": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "$ref": "#/$defs/Identifier" + }, + "status": { + "enum": [ + "pending", + "running", + "waitingForApproval", + "waitingForInput", + "succeeded", + "failed", + "skipped", + "cancelled" + ] + }, + "attempts": { + "type": "integer", + "minimum": 0 + }, + "startedAt": { + "description": "Start of the first attempt.", + "$ref": "#/$defs/Timestamp" + }, + "finishedAt": { + "description": "End of the last attempt.", + "$ref": "#/$defs/Timestamp" + }, + "reason": { + "type": "string" + }, + "message": { + "type": "string" + }, + "outputs": { + "description": "Produced outputs. Values are not stored in status, only references.", + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "digest": { + "$ref": "#/$defs/Digest" + }, + "size": { + "type": "integer", + "minimum": 0 + }, + "classification": { + "$ref": "#/$defs/Classification" + } + }, + "required": [ + "name" + ] + } + } + }, + "required": [ + "id", + "status" + ] + } + }, + "usage": { + "description": "Usage as in workflow.completed (spec 5.7, 10.4).", + "type": "object" + }, + "conditions": { + "type": "array", + "items": { + "$ref": "#/$defs/StatusCondition" + } + } + } + }, + "RunMetadata": { + "description": "Metadata of a WorkflowRun (spec 10.8): as Metadata, but a client MAY set generateName instead of name.", + "type": "object", + "properties": { + "name": { + "$ref": "#/$defs/ObjectName" + }, + "namespace": { + "$ref": "#/$defs/ObjectName" + }, + "labels": { + "type": "object", + "propertyNames": { + "pattern": "^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?[A-Za-z0-9]([-A-Za-z0-9_.]{0,61}[A-Za-z0-9])?$", + "maxLength": 316 + }, + "additionalProperties": { + "type": "string", + "pattern": "^(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])?$", + "maxLength": 63 + } + }, + "annotations": { + "type": "object", + "propertyNames": { + "pattern": "^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?[A-Za-z0-9]([-A-Za-z0-9_.]{0,61}[A-Za-z0-9])?$", + "maxLength": 316 + }, + "additionalProperties": { + "type": "string" + } + }, + "uid": { + "type": "string" + }, + "resourceVersion": { + "type": "string" + }, + "generation": { + "type": "integer" + }, + "creationTimestamp": { + "type": "string" + }, + "deletionTimestamp": { + "type": "string" + }, + "deletionGracePeriodSeconds": { + "type": "integer" + }, + "finalizers": { + "type": "array", + "items": { + "type": "string" + } + }, + "ownerReferences": { + "type": "array", + "items": { + "type": "object" + } + }, + "managedFields": { + "type": "array", + "items": { + "type": "object" + } + }, + "generateName": { + "type": "string", + "maxLength": 58, + "pattern": "^[a-z0-9]([-a-z0-9]*)?$" + } + }, + "anyOf": [ + { + "required": [ + "name" + ] + }, + { + "required": [ + "generateName" + ] + } + ], + "additionalProperties": false + }, + "WorkflowRunSpec": { + "description": "Request for one execution of a workflow (spec 10.8).", + "type": "object", + "properties": { + "workflowRef": { + "description": "The workflow to run, in the namespace of the WorkflowRun. version and digest are assertions, not selectors.", + "type": "object", + "properties": { + "name": { + "$ref": "#/$defs/ObjectName" + }, + "version": { + "$ref": "#/$defs/SemVer" + }, + "digest": { + "$ref": "#/$defs/Digest" + }, + "extensions": { + "$ref": "#/$defs/Extensions" + } + }, + "required": [ + "name" + ], + "additionalProperties": false + }, + "inputs": { + "description": "Input values (spec 5.3).", + "type": "object" + }, + "environment": { + "description": "Environment name (spec 7.10).", + "type": "string", + "minLength": 1 + }, + "cancel": { + "description": "Request to cancel the execution (spec 10.8).", + "type": "boolean" + }, + "extensions": { + "$ref": "#/$defs/Extensions" + } + }, + "required": [ + "workflowRef" + ], + "additionalProperties": false + }, + "WorkflowRun": { + "description": "An execution of a workflow as an object (spec 10.8).", + "type": "object", + "properties": { + "apiVersion": { + "const": "awp.agenticworkflowprotocol.org/v1alpha4" + }, + "kind": { + "const": "WorkflowRun" + }, + "metadata": { + "$ref": "#/$defs/RunMetadata" + }, + "spec": { + "$ref": "#/$defs/WorkflowRunSpec" + }, + "status": { + "description": "Written by the runtime (shape: WorkflowRunStatus). Ignored by validators (spec 3.2).", + "type": "object" + } + }, + "required": [ + "apiVersion", + "kind", + "metadata", + "spec" + ], + "additionalProperties": false + }, + "ForEach": { + "description": "Iteration over a list (spec 5.6.5): the step runs once per item, bounded by maxItems and concurrency.", + "type": "object", + "properties": { + "items": { + "description": "Exactly one reference to an array input or to an output of a step this step depends on.", + "type": "string", + "pattern": "^\\$\\{\\{ *(?:inputs\\.[a-zA-Z][a-zA-Z0-9_-]{0,62}|steps\\.[a-z][a-z0-9-]{0,62}\\.outputs\\.[^\\s.{}$]+) *\\}\\}$" + }, + "maxItems": { + "type": "integer", + "minimum": 1 + }, + "concurrency": { + "type": "integer", + "minimum": 1 + } + }, + "required": [ + "items", + "maxItems" + ], + "additionalProperties": false + } + } +} diff --git a/schema/crd/agents.yaml b/schema/crd/agents.yaml index d47f0e5..8903b26 100644 --- a/schema/crd/agents.yaml +++ b/schema/crd/agents.yaml @@ -1,4 +1,4 @@ -# Generated by conformance/crd.mjs from schema/awp.v1alpha3.json. Do not edit. +# Generated by conformance/crd.mjs from schema/awp.v1alpha3.json, schema/awp.v1alpha4.json. Do not edit. apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: @@ -19,7 +19,7 @@ spec: storage: true subresources: status: {} - additionalPrinterColumns: + additionalPrinterColumns: &a3 - name: Version type: string jsonPath: .spec.version @@ -611,3 +611,585 @@ spec: type: string x-kubernetes-preserve-unknown-fields: true x-kubernetes-preserve-unknown-fields: true + - name: v1alpha4 + served: true + storage: false + subresources: + status: {} + additionalPrinterColumns: *a3 + schema: + openAPIV3Schema: + description: AWP Agent (awp.agenticworkflowprotocol.org/v1alpha4). Generated from schema/awp.v1alpha4.json; the JSON Schema is normative. + type: object + required: + - spec + properties: + apiVersion: + type: string + kind: + type: string + metadata: + type: object + spec: + description: spec of kind Agent (spec 6). + required: + - version + - owner + - model + type: object + properties: + version: + description: Semantic Version 2.0.0 (spec 3.5). + pattern: ^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$ + type: string + description: + type: string + owner: + description: Ownership (spec 7.1). + required: + - team + type: object + properties: + team: + minLength: 1 + type: string + contact: + type: string + businessOwner: + type: string + technicalOwner: + type: string + dataOwner: + type: string + extensions: + description: "Extension fields (spec 3.3): keys start with x-, values are opaque to AWP. Replaces the x- fields of v1alpha1, which a Kubernetes structural schema cannot express." + type: object + additionalProperties: + x-kubernetes-preserve-unknown-fields: true + x-kubernetes-preserve-unknown-fields: true + classification: + description: Data class (spec 7.2). + enum: &a5 + - public + - internal + - confidential + - personal + - restricted + - sensitive + - secret + type: string + purpose: + type: string + risk: + required: + - level + type: object + properties: + level: + enum: &a4 + - low + - medium + - high + - critical + type: string + category: + type: array + items: + minLength: 1 + type: string + extensions: + description: "Extension fields (spec 3.3): keys start with x-, values are opaque to AWP. Replaces the x- fields of v1alpha1, which a Kubernetes structural schema cannot express." + type: object + additionalProperties: + x-kubernetes-preserve-unknown-fields: true + x-kubernetes-preserve-unknown-fields: true + integrity: + required: + - digest + type: object + properties: + digest: + description: Digest : (spec 3.8). sha256/sha384/sha512 have fixed lengths; other algorithms are accepted syntactically. + type: string + extensions: + description: "Extension fields (spec 3.3): keys start with x-, values are opaque to AWP. Replaces the x- fields of v1alpha1, which a Kubernetes structural schema cannot express." + type: object + additionalProperties: + x-kubernetes-preserve-unknown-fields: true + x-kubernetes-preserve-unknown-fields: true + signature: + type: object + properties: + format: + minLength: 1 + type: string + ref: + minLength: 1 + type: string + identity: + minLength: 1 + type: string + extensions: + description: "Extension fields (spec 3.3): keys start with x-, values are opaque to AWP. Replaces the x- fields of v1alpha1, which a Kubernetes structural schema cannot express." + type: object + additionalProperties: + x-kubernetes-preserve-unknown-fields: true + x-kubernetes-preserve-unknown-fields: true + provenance: + type: object + properties: + format: + minLength: 1 + type: string + ref: + minLength: 1 + type: string + extensions: + description: "Extension fields (spec 3.3): keys start with x-, values are opaque to AWP. Replaces the x- fields of v1alpha1, which a Kubernetes structural schema cannot express." + type: object + additionalProperties: + x-kubernetes-preserve-unknown-fields: true + x-kubernetes-preserve-unknown-fields: true + model: + description: Model object (spec 5.4.3). + required: + - provider + - name + type: object + properties: + provider: + minLength: 1 + type: string + name: + minLength: 1 + type: string + version: + minLength: 1 + type: string + region: + minLength: 1 + type: string + approval: + type: object + properties: + status: + enum: + - approved + - pending + - rejected + - revoked + type: string + expires: + description: RFC 3339 full-date (spec 3.7). Calendar validity is a semantic rule. + pattern: ^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])$ + type: string + approvedBy: + minLength: 1 + type: string + extensions: + description: "Extension fields (spec 3.3): keys start with x-, values are opaque to AWP. Replaces the x- fields of v1alpha1, which a Kubernetes structural schema cannot express." + type: object + additionalProperties: + x-kubernetes-preserve-unknown-fields: true + x-kubernetes-preserve-unknown-fields: true + riskClassification: + enum: *a4 + type: string + evaluation: + type: object + properties: + status: + enum: + - passed + - failed + - pending + - notEvaluated + type: string + ref: + minLength: 1 + type: string + extensions: + description: "Extension fields (spec 3.3): keys start with x-, values are opaque to AWP. Replaces the x- fields of v1alpha1, which a Kubernetes structural schema cannot express." + type: object + additionalProperties: + x-kubernetes-preserve-unknown-fields: true + x-kubernetes-preserve-unknown-fields: true + allowedUseCases: + type: array + items: + minLength: 1 + type: string + extensions: + description: "Extension fields (spec 3.3): keys start with x-, values are opaque to AWP. Replaces the x- fields of v1alpha1, which a Kubernetes structural schema cannot express." + type: object + additionalProperties: + x-kubernetes-preserve-unknown-fields: true + x-kubernetes-preserve-unknown-fields: true + instructions: + type: string + promptRef: + required: + - name + - version + type: object + properties: + name: + minLength: 1 + type: string + version: + minLength: 1 + type: string + digest: + description: Digest : (spec 3.8). sha256/sha384/sha512 have fixed lengths; other algorithms are accepted syntactically. + type: string + extensions: + description: "Extension fields (spec 3.3): keys start with x-, values are opaque to AWP. Replaces the x- fields of v1alpha1, which a Kubernetes structural schema cannot express." + type: object + additionalProperties: + x-kubernetes-preserve-unknown-fields: true + x-kubernetes-preserve-unknown-fields: true + tools: + type: array + items: + description: Tool source (spec 5.5.2). + required: + - type + type: object + properties: + type: + enum: + - mcp + - builtin + type: string + server: + description: Name (spec 3.4). + pattern: ^[a-zA-Z][a-zA-Z0-9_-]{0,62}$ + type: string + name: + minLength: 1 + type: string + tools: + type: array + items: + minLength: 1 + type: string + extensions: + description: "Extension fields (spec 3.3): keys start with x-, values are opaque to AWP. Replaces the x- fields of v1alpha1, which a Kubernetes structural schema cannot express." + type: object + additionalProperties: + x-kubernetes-preserve-unknown-fields: true + x-kubernetes-preserve-unknown-fields: true + mcpServers: + type: array + items: + description: MCP server (spec 5.5.1). + required: + - name + - transport + type: object + properties: + name: + description: Name (spec 3.4). + pattern: ^[a-zA-Z][a-zA-Z0-9_-]{0,62}$ + type: string + transport: + enum: + - stdio + - streamable-http + type: string + url: + description: HTTPS URL. + pattern: ^https://[^\s/?#]+([/?#]\S*)?$ + type: string + image: + minLength: 1 + type: string + version: + minLength: 1 + type: string + auth: + required: + - secretRef + type: object + properties: + secretRef: + description: Name (spec 3.4). + pattern: ^[a-zA-Z][a-zA-Z0-9_-]{0,62}$ + type: string + extensions: + description: "Extension fields (spec 3.3): keys start with x-, values are opaque to AWP. Replaces the x- fields of v1alpha1, which a Kubernetes structural schema cannot express." + type: object + additionalProperties: + x-kubernetes-preserve-unknown-fields: true + x-kubernetes-preserve-unknown-fields: true + extensions: + description: "Extension fields (spec 3.3): keys start with x-, values are opaque to AWP. Replaces the x- fields of v1alpha1, which a Kubernetes structural schema cannot express." + type: object + additionalProperties: + x-kubernetes-preserve-unknown-fields: true + x-kubernetes-preserve-unknown-fields: true + actionGroups: + description: Action groups (spec 5.5.4). Nesting is a semantic rule. + type: object + additionalProperties: + type: array + items: + description: Action identifier (spec 5.5.3). + pattern: ^[a-zA-Z][a-zA-Z0-9_-]*(\.[a-zA-Z0-9_-]+)+$ + type: string + permissions: + description: Permissions (spec 7.5). + type: object + properties: + default: + enum: + - allow + - deny + type: string + tools: + type: object + additionalProperties: + required: + - allow + type: object + properties: + allow: + type: boolean + resources: + type: array + items: + description: "Expression-enabled string (spec 3.9): only inputs., steps..outputs., execution.id, execution.environment, forEach.item, forEach.item. and forEach.index are allowed inside ${{ }}." + type: string + extensions: + description: "Extension fields (spec 3.3): keys start with x-, values are opaque to AWP. Replaces the x- fields of v1alpha1, which a Kubernetes structural schema cannot express." + type: object + additionalProperties: + x-kubernetes-preserve-unknown-fields: true + x-kubernetes-preserve-unknown-fields: true + network: + type: object + properties: + egress: + enum: + - allow + - deny + type: string + allowHosts: + type: array + items: + minLength: 1 + type: string + extensions: + description: "Extension fields (spec 3.3): keys start with x-, values are opaque to AWP. Replaces the x- fields of v1alpha1, which a Kubernetes structural schema cannot express." + type: object + additionalProperties: + x-kubernetes-preserve-unknown-fields: true + x-kubernetes-preserve-unknown-fields: true + filesystem: + type: object + properties: + read: + type: array + items: + minLength: 1 + type: string + write: + type: array + items: + minLength: 1 + type: string + extensions: + description: "Extension fields (spec 3.3): keys start with x-, values are opaque to AWP. Replaces the x- fields of v1alpha1, which a Kubernetes structural schema cannot express." + type: object + additionalProperties: + x-kubernetes-preserve-unknown-fields: true + x-kubernetes-preserve-unknown-fields: true + secrets: + type: array + items: + description: Name (spec 3.4). + pattern: ^[a-zA-Z][a-zA-Z0-9_-]{0,62}$ + type: string + environments: + type: array + items: + minLength: 1 + type: string + extensions: + description: "Extension fields (spec 3.3): keys start with x-, values are opaque to AWP. Replaces the x- fields of v1alpha1, which a Kubernetes structural schema cannot express." + type: object + additionalProperties: + x-kubernetes-preserve-unknown-fields: true + x-kubernetes-preserve-unknown-fields: true + budget: + description: Budget (spec 5.7). All limits are positive. + type: object + properties: + maxCostUsd: + type: number + minimum: 0 + exclusiveMinimum: true + maxSteps: + minimum: 1 + type: integer + maxDuration: + description: Duration greater than zero (spec 3.6). + type: string + resources: + type: object + properties: + maxTokens: + minimum: 1 + type: integer + maxToolCalls: + minimum: 1 + type: integer + maxRetries: + minimum: 1 + type: integer + maxConcurrency: + minimum: 1 + type: integer + extensions: + description: "Extension fields (spec 3.3): keys start with x-, values are opaque to AWP. Replaces the x- fields of v1alpha1, which a Kubernetes structural schema cannot express." + type: object + additionalProperties: + x-kubernetes-preserve-unknown-fields: true + x-kubernetes-preserve-unknown-fields: true + extensions: + description: "Extension fields (spec 3.3): keys start with x-, values are opaque to AWP. Replaces the x- fields of v1alpha1, which a Kubernetes structural schema cannot express." + type: object + additionalProperties: + x-kubernetes-preserve-unknown-fields: true + x-kubernetes-preserve-unknown-fields: true + secrets: + type: array + items: + description: Secret declaration (spec 7.9). Secret values never appear in manifests. + required: + - name + - source + type: object + properties: + name: + description: Name (spec 3.4). + pattern: ^[a-zA-Z][a-zA-Z0-9_-]{0,62}$ + type: string + source: + minLength: 1 + type: string + key: + minLength: 1 + type: string + scope: + type: array + items: + minLength: 1 + type: string + extensions: + description: "Extension fields (spec 3.3): keys start with x-, values are opaque to AWP. Replaces the x- fields of v1alpha1, which a Kubernetes structural schema cannot express." + type: object + additionalProperties: + x-kubernetes-preserve-unknown-fields: true + x-kubernetes-preserve-unknown-fields: true + humanInput: + description: Lets an agent ask a person during its step (spec 5.8). + required: + - answerers + type: object + properties: + answerers: + minItems: 1 + type: array + items: + description: Exactly one of role or user (spec 7.6). + type: object + properties: + role: + minLength: 1 + type: string + user: + minLength: 1 + type: string + extensions: + description: "Extension fields (spec 3.3): keys start with x-, values are opaque to AWP. Replaces the x- fields of v1alpha1, which a Kubernetes structural schema cannot express." + type: object + additionalProperties: + x-kubernetes-preserve-unknown-fields: true + x-kubernetes-preserve-unknown-fields: true + timeout: + description: Duration greater than zero (spec 3.6). + type: string + onTimeout: + enum: + - return + - fail + type: string + maxRequests: + minimum: 1 + type: integer + classification: + description: Data class (spec 7.2). + enum: *a5 + type: string + extensions: + description: "Extension fields (spec 3.3): keys start with x-, values are opaque to AWP. Replaces the x- fields of v1alpha1, which a Kubernetes structural schema cannot express." + type: object + additionalProperties: + x-kubernetes-preserve-unknown-fields: true + x-kubernetes-preserve-unknown-fields: true + extensions: + description: "Extension fields (spec 3.3): keys start with x-, values are opaque to AWP. Replaces the x- fields of v1alpha1, which a Kubernetes structural schema cannot express." + type: object + additionalProperties: + x-kubernetes-preserve-unknown-fields: true + x-kubernetes-preserve-unknown-fields: true + status: + description: Status a runtime writes on a Workflow, Agent or Policy (spec 3.11). Validators ignore it (spec 3.2). + type: object + properties: + observedGeneration: + minimum: 0 + type: integer + digest: + description: Digest of the manifest as the runtime validated it (spec 9.1). + type: string + conditions: + type: array + items: + description: A status condition in the shape of Kubernetes metav1.Condition (spec 3.11). + required: + - type + - status + - lastTransitionTime + - reason + - message + type: object + properties: + type: + maxLength: 316 + pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$ + type: string + status: + enum: + - "True" + - "False" + - Unknown + type: string + observedGeneration: + minimum: 0 + type: integer + lastTransitionTime: + description: When status last changed (RFC 3339). + pattern: ^[0-9]{4}-[0-9]{2}-[0-9]{2}[Tt][0-9]{2}:[0-9]{2}:[0-9]{2}(\.[0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$ + type: string + reason: + minLength: 1 + maxLength: 1024 + pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$ + type: string + message: + maxLength: 32768 + type: string + x-kubernetes-preserve-unknown-fields: true + x-kubernetes-preserve-unknown-fields: true diff --git a/schema/crd/policies.yaml b/schema/crd/policies.yaml index 1ebf0c8..7f6fd37 100644 --- a/schema/crd/policies.yaml +++ b/schema/crd/policies.yaml @@ -1,4 +1,4 @@ -# Generated by conformance/crd.mjs from schema/awp.v1alpha3.json. Do not edit. +# Generated by conformance/crd.mjs from schema/awp.v1alpha3.json, schema/awp.v1alpha4.json. Do not edit. apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: @@ -19,7 +19,7 @@ spec: storage: true subresources: status: {} - additionalPrinterColumns: + additionalPrinterColumns: &a3 - name: Version type: string jsonPath: .spec.version @@ -658,3 +658,632 @@ spec: type: string x-kubernetes-preserve-unknown-fields: true x-kubernetes-preserve-unknown-fields: true + - name: v1alpha4 + served: true + storage: false + subresources: + status: {} + additionalPrinterColumns: *a3 + schema: + openAPIV3Schema: + description: AWP Policy (awp.agenticworkflowprotocol.org/v1alpha4). Generated from schema/awp.v1alpha4.json; the JSON Schema is normative. + type: object + required: + - spec + properties: + apiVersion: + type: string + kind: + type: string + metadata: + type: object + spec: + description: spec of kind Policy (spec 8.2). + required: + - version + - owner + - rules + type: object + properties: + version: + description: Semantic Version 2.0.0 (spec 3.5). + pattern: ^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$ + type: string + description: + type: string + owner: + description: Ownership (spec 7.1). + required: + - team + type: object + properties: + team: + minLength: 1 + type: string + contact: + type: string + businessOwner: + type: string + technicalOwner: + type: string + dataOwner: + type: string + extensions: + description: "Extension fields (spec 3.3): keys start with x-, values are opaque to AWP. Replaces the x- fields of v1alpha1, which a Kubernetes structural schema cannot express." + type: object + additionalProperties: + x-kubernetes-preserve-unknown-fields: true + x-kubernetes-preserve-unknown-fields: true + classification: + description: Data class (spec 7.2). + enum: &a5 + - public + - internal + - confidential + - personal + - restricted + - sensitive + - secret + type: string + purpose: + type: string + risk: + required: + - level + type: object + properties: + level: + enum: &a4 + - low + - medium + - high + - critical + type: string + category: + type: array + items: + minLength: 1 + type: string + extensions: + description: "Extension fields (spec 3.3): keys start with x-, values are opaque to AWP. Replaces the x- fields of v1alpha1, which a Kubernetes structural schema cannot express." + type: object + additionalProperties: + x-kubernetes-preserve-unknown-fields: true + x-kubernetes-preserve-unknown-fields: true + integrity: + required: + - digest + type: object + properties: + digest: + description: Digest : (spec 3.8). sha256/sha384/sha512 have fixed lengths; other algorithms are accepted syntactically. + type: string + extensions: + description: "Extension fields (spec 3.3): keys start with x-, values are opaque to AWP. Replaces the x- fields of v1alpha1, which a Kubernetes structural schema cannot express." + type: object + additionalProperties: + x-kubernetes-preserve-unknown-fields: true + x-kubernetes-preserve-unknown-fields: true + signature: + type: object + properties: + format: + minLength: 1 + type: string + ref: + minLength: 1 + type: string + identity: + minLength: 1 + type: string + extensions: + description: "Extension fields (spec 3.3): keys start with x-, values are opaque to AWP. Replaces the x- fields of v1alpha1, which a Kubernetes structural schema cannot express." + type: object + additionalProperties: + x-kubernetes-preserve-unknown-fields: true + x-kubernetes-preserve-unknown-fields: true + provenance: + type: object + properties: + format: + minLength: 1 + type: string + ref: + minLength: 1 + type: string + extensions: + description: "Extension fields (spec 3.3): keys start with x-, values are opaque to AWP. Replaces the x- fields of v1alpha1, which a Kubernetes structural schema cannot express." + type: object + additionalProperties: + x-kubernetes-preserve-unknown-fields: true + x-kubernetes-preserve-unknown-fields: true + rules: + type: array + items: + description: Policy rule (spec 8.2). + required: + - id + - when + - effect + type: object + properties: + id: + description: Identifier (spec 3.4). + pattern: ^[a-z][a-z0-9-]{0,62}$ + type: string + when: + description: "Policy rule conditions (spec 8.3): each attribute maps to an operator object. Unknown attributes are rejected; ordering operators are limited to data.classification and risk.level." + minProperties: 1 + type: object + properties: + action: + minProperties: 1 + type: object + properties: + in: + type: array + items: + description: Action identifier, group identifier or wildcard pattern with a final segment * (spec 5.5.3, 5.5.4). + pattern: ^[a-zA-Z][a-zA-Z0-9_-]*(\.[a-zA-Z0-9_-]+)*(\.[a-zA-Z0-9_-]+|\.\*)$ + type: string + notIn: + type: array + items: + description: Action identifier, group identifier or wildcard pattern with a final segment * (spec 5.5.3, 5.5.4). + pattern: ^[a-zA-Z][a-zA-Z0-9_-]*(\.[a-zA-Z0-9_-]+)*(\.[a-zA-Z0-9_-]+|\.\*)$ + type: string + equals: + description: Action identifier, group identifier or wildcard pattern with a final segment * (spec 5.5.3, 5.5.4). + pattern: ^[a-zA-Z][a-zA-Z0-9_-]*(\.[a-zA-Z0-9_-]+)*(\.[a-zA-Z0-9_-]+|\.\*)$ + type: string + notEquals: + description: Action identifier, group identifier or wildcard pattern with a final segment * (spec 5.5.3, 5.5.4). + pattern: ^[a-zA-Z][a-zA-Z0-9_-]*(\.[a-zA-Z0-9_-]+)*(\.[a-zA-Z0-9_-]+|\.\*)$ + type: string + extensions: + description: "Extension fields (spec 3.3): keys start with x-, values are opaque to AWP. Replaces the x- fields of v1alpha1, which a Kubernetes structural schema cannot express." + type: object + additionalProperties: + x-kubernetes-preserve-unknown-fields: true + x-kubernetes-preserve-unknown-fields: true + environment.name: + minProperties: 1 + type: object + properties: + in: + type: array + items: + minLength: 1 + type: string + notIn: + type: array + items: + minLength: 1 + type: string + equals: + minLength: 1 + type: string + notEquals: + minLength: 1 + type: string + extensions: + description: "Extension fields (spec 3.3): keys start with x-, values are opaque to AWP. Replaces the x- fields of v1alpha1, which a Kubernetes structural schema cannot express." + type: object + additionalProperties: + x-kubernetes-preserve-unknown-fields: true + x-kubernetes-preserve-unknown-fields: true + risk.level: + minProperties: 1 + type: object + properties: + in: + type: array + items: + enum: *a4 + type: string + notIn: + type: array + items: + enum: *a4 + type: string + equals: + enum: *a4 + type: string + notEquals: + enum: *a4 + type: string + gt: + enum: *a4 + type: string + gte: + enum: *a4 + type: string + lt: + enum: *a4 + type: string + lte: + enum: *a4 + type: string + extensions: + description: "Extension fields (spec 3.3): keys start with x-, values are opaque to AWP. Replaces the x- fields of v1alpha1, which a Kubernetes structural schema cannot express." + type: object + additionalProperties: + x-kubernetes-preserve-unknown-fields: true + x-kubernetes-preserve-unknown-fields: true + data.classification: + minProperties: 1 + type: object + properties: + in: + type: array + items: + description: Data class (spec 7.2). + enum: *a5 + type: string + notIn: + type: array + items: + description: Data class (spec 7.2). + enum: *a5 + type: string + equals: + description: Data class (spec 7.2). + enum: *a5 + type: string + notEquals: + description: Data class (spec 7.2). + enum: *a5 + type: string + gt: + description: Data class (spec 7.2). + enum: *a5 + type: string + gte: + description: Data class (spec 7.2). + enum: *a5 + type: string + lt: + description: Data class (spec 7.2). + enum: *a5 + type: string + lte: + description: Data class (spec 7.2). + enum: *a5 + type: string + extensions: + description: "Extension fields (spec 3.3): keys start with x-, values are opaque to AWP. Replaces the x- fields of v1alpha1, which a Kubernetes structural schema cannot express." + type: object + additionalProperties: + x-kubernetes-preserve-unknown-fields: true + x-kubernetes-preserve-unknown-fields: true + destination.provider: + minProperties: 1 + type: object + properties: + in: + type: array + items: + minLength: 1 + type: string + notIn: + type: array + items: + minLength: 1 + type: string + equals: + minLength: 1 + type: string + notEquals: + minLength: 1 + type: string + extensions: + description: "Extension fields (spec 3.3): keys start with x-, values are opaque to AWP. Replaces the x- fields of v1alpha1, which a Kubernetes structural schema cannot express." + type: object + additionalProperties: + x-kubernetes-preserve-unknown-fields: true + x-kubernetes-preserve-unknown-fields: true + destination.region: + minProperties: 1 + type: object + properties: + in: + type: array + items: + minLength: 1 + type: string + notIn: + type: array + items: + minLength: 1 + type: string + equals: + minLength: 1 + type: string + notEquals: + minLength: 1 + type: string + extensions: + description: "Extension fields (spec 3.3): keys start with x-, values are opaque to AWP. Replaces the x- fields of v1alpha1, which a Kubernetes structural schema cannot express." + type: object + additionalProperties: + x-kubernetes-preserve-unknown-fields: true + x-kubernetes-preserve-unknown-fields: true + model.provider: + minProperties: 1 + type: object + properties: + in: + type: array + items: + minLength: 1 + type: string + notIn: + type: array + items: + minLength: 1 + type: string + equals: + minLength: 1 + type: string + notEquals: + minLength: 1 + type: string + extensions: + description: "Extension fields (spec 3.3): keys start with x-, values are opaque to AWP. Replaces the x- fields of v1alpha1, which a Kubernetes structural schema cannot express." + type: object + additionalProperties: + x-kubernetes-preserve-unknown-fields: true + x-kubernetes-preserve-unknown-fields: true + model.name: + minProperties: 1 + type: object + properties: + in: + type: array + items: + minLength: 1 + type: string + notIn: + type: array + items: + minLength: 1 + type: string + equals: + minLength: 1 + type: string + notEquals: + minLength: 1 + type: string + extensions: + description: "Extension fields (spec 3.3): keys start with x-, values are opaque to AWP. Replaces the x- fields of v1alpha1, which a Kubernetes structural schema cannot express." + type: object + additionalProperties: + x-kubernetes-preserve-unknown-fields: true + x-kubernetes-preserve-unknown-fields: true + actor.type: + minProperties: 1 + type: object + properties: + in: + type: array + items: + enum: + - agent + - human + - runtime + - system + type: string + notIn: + type: array + items: + enum: + - agent + - human + - runtime + - system + type: string + equals: + enum: + - agent + - human + - runtime + - system + type: string + notEquals: + enum: + - agent + - human + - runtime + - system + type: string + extensions: + description: "Extension fields (spec 3.3): keys start with x-, values are opaque to AWP. Replaces the x- fields of v1alpha1, which a Kubernetes structural schema cannot express." + type: object + additionalProperties: + x-kubernetes-preserve-unknown-fields: true + x-kubernetes-preserve-unknown-fields: true + workflow.name: + minProperties: 1 + type: object + properties: + in: + type: array + items: + minLength: 1 + type: string + notIn: + type: array + items: + minLength: 1 + type: string + equals: + minLength: 1 + type: string + notEquals: + minLength: 1 + type: string + extensions: + description: "Extension fields (spec 3.3): keys start with x-, values are opaque to AWP. Replaces the x- fields of v1alpha1, which a Kubernetes structural schema cannot express." + type: object + additionalProperties: + x-kubernetes-preserve-unknown-fields: true + x-kubernetes-preserve-unknown-fields: true + step.id: + minProperties: 1 + type: object + properties: + in: + type: array + items: + minLength: 1 + type: string + notIn: + type: array + items: + minLength: 1 + type: string + equals: + minLength: 1 + type: string + notEquals: + minLength: 1 + type: string + extensions: + description: "Extension fields (spec 3.3): keys start with x-, values are opaque to AWP. Replaces the x- fields of v1alpha1, which a Kubernetes structural schema cannot express." + type: object + additionalProperties: + x-kubernetes-preserve-unknown-fields: true + x-kubernetes-preserve-unknown-fields: true + agent.id: + minProperties: 1 + type: object + properties: + in: + type: array + items: + minLength: 1 + type: string + notIn: + type: array + items: + minLength: 1 + type: string + equals: + minLength: 1 + type: string + notEquals: + minLength: 1 + type: string + extensions: + description: "Extension fields (spec 3.3): keys start with x-, values are opaque to AWP. Replaces the x- fields of v1alpha1, which a Kubernetes structural schema cannot express." + type: object + additionalProperties: + x-kubernetes-preserve-unknown-fields: true + x-kubernetes-preserve-unknown-fields: true + x-kubernetes-preserve-unknown-fields: true + effect: + enum: + - deny + - requireApproval + type: string + approval: + type: object + properties: + approvers: + type: array + items: + description: Exactly one of role or user (spec 7.6). + type: object + properties: + role: + minLength: 1 + type: string + user: + minLength: 1 + type: string + extensions: + description: "Extension fields (spec 3.3): keys start with x-, values are opaque to AWP. Replaces the x- fields of v1alpha1, which a Kubernetes structural schema cannot express." + type: object + additionalProperties: + x-kubernetes-preserve-unknown-fields: true + x-kubernetes-preserve-unknown-fields: true + minApprovals: + minimum: 1 + type: integer + timeout: + description: Duration greater than zero (spec 3.6). + type: string + onTimeout: + enum: + - reject + - fail + type: string + extensions: + description: "Extension fields (spec 3.3): keys start with x-, values are opaque to AWP. Replaces the x- fields of v1alpha1, which a Kubernetes structural schema cannot express." + type: object + additionalProperties: + x-kubernetes-preserve-unknown-fields: true + x-kubernetes-preserve-unknown-fields: true + message: + type: string + extensions: + description: "Extension fields (spec 3.3): keys start with x-, values are opaque to AWP. Replaces the x- fields of v1alpha1, which a Kubernetes structural schema cannot express." + type: object + additionalProperties: + x-kubernetes-preserve-unknown-fields: true + x-kubernetes-preserve-unknown-fields: true + extensions: + description: "Extension fields (spec 3.3): keys start with x-, values are opaque to AWP. Replaces the x- fields of v1alpha1, which a Kubernetes structural schema cannot express." + type: object + additionalProperties: + x-kubernetes-preserve-unknown-fields: true + x-kubernetes-preserve-unknown-fields: true + status: + description: Status a runtime writes on a Workflow, Agent or Policy (spec 3.11). Validators ignore it (spec 3.2). + type: object + properties: + observedGeneration: + minimum: 0 + type: integer + digest: + description: Digest of the manifest as the runtime validated it (spec 9.1). + type: string + conditions: + type: array + items: + description: A status condition in the shape of Kubernetes metav1.Condition (spec 3.11). + required: + - type + - status + - lastTransitionTime + - reason + - message + type: object + properties: + type: + maxLength: 316 + pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$ + type: string + status: + enum: + - "True" + - "False" + - Unknown + type: string + observedGeneration: + minimum: 0 + type: integer + lastTransitionTime: + description: When status last changed (RFC 3339). + pattern: ^[0-9]{4}-[0-9]{2}-[0-9]{2}[Tt][0-9]{2}:[0-9]{2}:[0-9]{2}(\.[0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$ + type: string + reason: + minLength: 1 + maxLength: 1024 + pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$ + type: string + message: + maxLength: 32768 + type: string + x-kubernetes-preserve-unknown-fields: true + x-kubernetes-preserve-unknown-fields: true diff --git a/schema/crd/workflowruns.yaml b/schema/crd/workflowruns.yaml index 71468d7..9fa291f 100644 --- a/schema/crd/workflowruns.yaml +++ b/schema/crd/workflowruns.yaml @@ -1,4 +1,4 @@ -# Generated by conformance/crd.mjs from schema/awp.v1alpha3.json. Do not edit. +# Generated by conformance/crd.mjs from schema/awp.v1alpha3.json, schema/awp.v1alpha4.json. Do not edit. apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: @@ -19,7 +19,7 @@ spec: storage: true subresources: status: {} - additionalPrinterColumns: + additionalPrinterColumns: &a1 - name: Workflow type: string jsonPath: .spec.workflowRef.name @@ -281,3 +281,258 @@ spec: type: string x-kubernetes-preserve-unknown-fields: true x-kubernetes-preserve-unknown-fields: true + - name: v1alpha4 + served: true + storage: false + subresources: + status: {} + additionalPrinterColumns: *a1 + schema: + openAPIV3Schema: + description: AWP WorkflowRun (awp.agenticworkflowprotocol.org/v1alpha4). Generated from schema/awp.v1alpha4.json; the JSON Schema is normative. + type: object + required: + - spec + properties: + apiVersion: + type: string + kind: + type: string + metadata: + type: object + spec: + description: Request for one execution of a workflow (spec 10.8). + required: + - workflowRef + type: object + properties: + workflowRef: + description: The workflow to run, in the namespace of the WorkflowRun. version and digest are assertions, not selectors. + required: + - name + type: object + properties: + name: + description: "Object name (spec 3.4): a DNS-1123 label." + maxLength: 63 + pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$ + type: string + version: + description: Semantic Version 2.0.0 (spec 3.5). + pattern: ^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$ + type: string + digest: + description: Digest : (spec 3.8). sha256/sha384/sha512 have fixed lengths; other algorithms are accepted syntactically. + type: string + extensions: + description: "Extension fields (spec 3.3): keys start with x-, values are opaque to AWP. Replaces the x- fields of v1alpha1, which a Kubernetes structural schema cannot express." + type: object + additionalProperties: + x-kubernetes-preserve-unknown-fields: true + x-kubernetes-preserve-unknown-fields: true + inputs: + description: Input values (spec 5.3). + type: object + x-kubernetes-preserve-unknown-fields: true + environment: + description: Environment name (spec 7.10). + minLength: 1 + type: string + cancel: + description: Request to cancel the execution (spec 10.8). + type: boolean + extensions: + description: "Extension fields (spec 3.3): keys start with x-, values are opaque to AWP. Replaces the x- fields of v1alpha1, which a Kubernetes structural schema cannot express." + type: object + additionalProperties: + x-kubernetes-preserve-unknown-fields: true + x-kubernetes-preserve-unknown-fields: true + status: + description: Status a runtime writes on a WorkflowRun (spec 10.8). Validators ignore it (spec 3.2). + type: object + properties: + observedGeneration: + minimum: 0 + type: integer + executionId: + type: string + phase: + enum: + - pending + - running + - succeeded + - failed + - cancelled + - rejected + type: string + reason: + type: string + message: + type: string + actor: + type: object + properties: + type: + enum: + - human + - system + - runtime + - agent + type: string + id: + type: string + x-kubernetes-preserve-unknown-fields: true + trigger: + type: object + properties: + type: + enum: + - manual + - schedule + - event + type: string + index: + minimum: 0 + type: integer + scheduledAt: + description: Tick time for schedule triggers. + pattern: ^[0-9]{4}-[0-9]{2}-[0-9]{2}[Tt][0-9]{2}:[0-9]{2}:[0-9]{2}(\.[0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$ + type: string + x-kubernetes-preserve-unknown-fields: true + environment: + type: string + workflow: + description: The manifest the execution is pinned to (spec 10.1). + type: object + properties: + name: + description: "Object name (spec 3.4): a DNS-1123 label." + maxLength: 63 + pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$ + type: string + version: + description: Semantic Version 2.0.0 (spec 3.5). + pattern: ^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$ + type: string + digest: + description: Digest : (spec 3.8). sha256/sha384/sha512 have fixed lengths; other algorithms are accepted syntactically. + type: string + x-kubernetes-preserve-unknown-fields: true + startedAt: + description: Start of the execution. + pattern: ^[0-9]{4}-[0-9]{2}-[0-9]{2}[Tt][0-9]{2}:[0-9]{2}:[0-9]{2}(\.[0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$ + type: string + finishedAt: + description: End of the execution. + pattern: ^[0-9]{4}-[0-9]{2}-[0-9]{2}[Tt][0-9]{2}:[0-9]{2}:[0-9]{2}(\.[0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$ + type: string + steps: + type: array + items: + required: + - id + - status + type: object + properties: + id: + description: Identifier (spec 3.4). + pattern: ^[a-z][a-z0-9-]{0,62}$ + type: string + status: + enum: + - pending + - running + - waitingForApproval + - waitingForInput + - succeeded + - failed + - skipped + - cancelled + type: string + attempts: + minimum: 0 + type: integer + startedAt: + description: Start of the first attempt. + pattern: ^[0-9]{4}-[0-9]{2}-[0-9]{2}[Tt][0-9]{2}:[0-9]{2}:[0-9]{2}(\.[0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$ + type: string + finishedAt: + description: End of the last attempt. + pattern: ^[0-9]{4}-[0-9]{2}-[0-9]{2}[Tt][0-9]{2}:[0-9]{2}:[0-9]{2}(\.[0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$ + type: string + reason: + type: string + message: + type: string + outputs: + description: Produced outputs. Values are not stored in status, only references. + type: array + items: + required: + - name + type: object + properties: + name: + type: string + digest: + description: Digest : (spec 3.8). sha256/sha384/sha512 have fixed lengths; other algorithms are accepted syntactically. + type: string + size: + minimum: 0 + type: integer + classification: + description: Data class (spec 7.2). + enum: + - public + - internal + - confidential + - personal + - restricted + - sensitive + - secret + type: string + x-kubernetes-preserve-unknown-fields: true + x-kubernetes-preserve-unknown-fields: true + usage: + description: Usage as in workflow.completed (spec 5.7, 10.4). + type: object + x-kubernetes-preserve-unknown-fields: true + conditions: + type: array + items: + description: A status condition in the shape of Kubernetes metav1.Condition (spec 3.11). + required: + - type + - status + - lastTransitionTime + - reason + - message + type: object + properties: + type: + maxLength: 316 + pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$ + type: string + status: + enum: + - "True" + - "False" + - Unknown + type: string + observedGeneration: + minimum: 0 + type: integer + lastTransitionTime: + description: When status last changed (RFC 3339). + pattern: ^[0-9]{4}-[0-9]{2}-[0-9]{2}[Tt][0-9]{2}:[0-9]{2}:[0-9]{2}(\.[0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$ + type: string + reason: + minLength: 1 + maxLength: 1024 + pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$ + type: string + message: + maxLength: 32768 + type: string + x-kubernetes-preserve-unknown-fields: true + x-kubernetes-preserve-unknown-fields: true diff --git a/schema/crd/workflows.yaml b/schema/crd/workflows.yaml index 67df471..d4c8b29 100644 --- a/schema/crd/workflows.yaml +++ b/schema/crd/workflows.yaml @@ -1,4 +1,4 @@ -# Generated by conformance/crd.mjs from schema/awp.v1alpha3.json. Do not edit. +# Generated by conformance/crd.mjs from schema/awp.v1alpha3.json, schema/awp.v1alpha4.json. Do not edit. apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: @@ -19,7 +19,7 @@ spec: storage: true subresources: status: {} - additionalPrinterColumns: + additionalPrinterColumns: &a7 - name: Version type: string jsonPath: .spec.version @@ -1602,3 +1602,1612 @@ spec: type: string x-kubernetes-preserve-unknown-fields: true x-kubernetes-preserve-unknown-fields: true + - name: v1alpha4 + served: true + storage: false + subresources: + status: {} + additionalPrinterColumns: *a7 + schema: + openAPIV3Schema: + description: AWP Workflow (awp.agenticworkflowprotocol.org/v1alpha4). Generated from schema/awp.v1alpha4.json; the JSON Schema is normative. + type: object + required: + - spec + properties: + apiVersion: + type: string + kind: + type: string + metadata: + type: object + spec: + description: spec of kind Workflow (spec 5.1). + required: + - version + - owner + - agents + - workflow + type: object + properties: + version: + description: Semantic Version 2.0.0 (spec 3.5). + pattern: ^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$ + type: string + description: + type: string + owner: + description: Ownership (spec 7.1). + required: + - team + type: object + properties: + team: + minLength: 1 + type: string + contact: + type: string + businessOwner: + type: string + technicalOwner: + type: string + dataOwner: + type: string + extensions: + description: "Extension fields (spec 3.3): keys start with x-, values are opaque to AWP. Replaces the x- fields of v1alpha1, which a Kubernetes structural schema cannot express." + type: object + additionalProperties: + x-kubernetes-preserve-unknown-fields: true + x-kubernetes-preserve-unknown-fields: true + classification: + description: Data class (spec 7.2). + enum: &a8 + - public + - internal + - confidential + - personal + - restricted + - sensitive + - secret + type: string + purpose: + type: string + risk: + required: + - level + type: object + properties: + level: + enum: &a9 + - low + - medium + - high + - critical + type: string + category: + type: array + items: + minLength: 1 + type: string + extensions: + description: "Extension fields (spec 3.3): keys start with x-, values are opaque to AWP. Replaces the x- fields of v1alpha1, which a Kubernetes structural schema cannot express." + type: object + additionalProperties: + x-kubernetes-preserve-unknown-fields: true + x-kubernetes-preserve-unknown-fields: true + integrity: + required: + - digest + type: object + properties: + digest: + description: Digest : (spec 3.8). sha256/sha384/sha512 have fixed lengths; other algorithms are accepted syntactically. + type: string + extensions: + description: "Extension fields (spec 3.3): keys start with x-, values are opaque to AWP. Replaces the x- fields of v1alpha1, which a Kubernetes structural schema cannot express." + type: object + additionalProperties: + x-kubernetes-preserve-unknown-fields: true + x-kubernetes-preserve-unknown-fields: true + signature: + type: object + properties: + format: + minLength: 1 + type: string + ref: + minLength: 1 + type: string + identity: + minLength: 1 + type: string + extensions: + description: "Extension fields (spec 3.3): keys start with x-, values are opaque to AWP. Replaces the x- fields of v1alpha1, which a Kubernetes structural schema cannot express." + type: object + additionalProperties: + x-kubernetes-preserve-unknown-fields: true + x-kubernetes-preserve-unknown-fields: true + provenance: + type: object + properties: + format: + minLength: 1 + type: string + ref: + minLength: 1 + type: string + extensions: + description: "Extension fields (spec 3.3): keys start with x-, values are opaque to AWP. Replaces the x- fields of v1alpha1, which a Kubernetes structural schema cannot express." + type: object + additionalProperties: + x-kubernetes-preserve-unknown-fields: true + x-kubernetes-preserve-unknown-fields: true + triggers: + type: array + items: + description: Trigger (spec 5.2). + required: + - type + type: object + properties: + type: + enum: + - manual + - schedule + - event + type: string + cron: + pattern: ^\S+(\s+\S+){4}$ + type: string + timezone: + minLength: 1 + type: string + source: + minLength: 1 + type: string + eventType: + minLength: 1 + type: string + filter: + type: object + additionalProperties: + type: string + concurrencyPolicy: + enum: + - allow + - forbid + - replace + type: string + startingDeadline: + description: Duration greater than zero (spec 3.6). + type: string + extensions: + description: "Extension fields (spec 3.3): keys start with x-, values are opaque to AWP. Replaces the x- fields of v1alpha1, which a Kubernetes structural schema cannot express." + type: object + additionalProperties: + x-kubernetes-preserve-unknown-fields: true + x-kubernetes-preserve-unknown-fields: true + inputs: + type: array + items: + description: Workflow input (spec 5.3). + required: + - name + - type + type: object + properties: + name: + description: Name (spec 3.4). + pattern: ^[a-zA-Z][a-zA-Z0-9_-]{0,62}$ + type: string + type: + enum: + - string + - integer + - number + - boolean + - object + - array + - artifact + type: string + required: + type: boolean + default: + x-kubernetes-preserve-unknown-fields: true + description: + type: string + pattern: + type: string + enum: + type: array + items: + x-kubernetes-preserve-unknown-fields: true + classification: + description: Data class (spec 7.2). + enum: *a8 + type: string + extensions: + description: "Extension fields (spec 3.3): keys start with x-, values are opaque to AWP. Replaces the x- fields of v1alpha1, which a Kubernetes structural schema cannot express." + type: object + additionalProperties: + x-kubernetes-preserve-unknown-fields: true + x-kubernetes-preserve-unknown-fields: true + budget: + description: Budget (spec 5.7). All limits are positive. + type: object + properties: + maxCostUsd: + type: number + minimum: 0 + exclusiveMinimum: true + maxSteps: + minimum: 1 + type: integer + maxDuration: + description: Duration greater than zero (spec 3.6). + type: string + resources: + type: object + properties: + maxTokens: + minimum: 1 + type: integer + maxToolCalls: + minimum: 1 + type: integer + maxRetries: + minimum: 1 + type: integer + maxConcurrency: + minimum: 1 + type: integer + extensions: + description: "Extension fields (spec 3.3): keys start with x-, values are opaque to AWP. Replaces the x- fields of v1alpha1, which a Kubernetes structural schema cannot express." + type: object + additionalProperties: + x-kubernetes-preserve-unknown-fields: true + x-kubernetes-preserve-unknown-fields: true + extensions: + description: "Extension fields (spec 3.3): keys start with x-, values are opaque to AWP. Replaces the x- fields of v1alpha1, which a Kubernetes structural schema cannot express." + type: object + additionalProperties: + x-kubernetes-preserve-unknown-fields: true + x-kubernetes-preserve-unknown-fields: true + agents: + type: array + items: + description: "One entry of spec.agents: agent reference if it has ref, remote agent if it has protocol, otherwise inline agent (spec 5.4)." + required: + - id + type: object + properties: + id: + description: Identifier (spec 3.4). + pattern: ^[a-z][a-z0-9-]{0,62}$ + type: string + ref: + required: + - name + - version + type: object + properties: + name: + description: Name (spec 3.4). + pattern: ^[a-zA-Z][a-zA-Z0-9_-]{0,62}$ + type: string + version: + description: Semantic Version 2.0.0 (spec 3.5). + pattern: ^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$ + type: string + digest: + description: Digest : (spec 3.8). sha256/sha384/sha512 have fixed lengths; other algorithms are accepted syntactically. + type: string + extensions: + description: "Extension fields (spec 3.3): keys start with x-, values are opaque to AWP. Replaces the x- fields of v1alpha1, which a Kubernetes structural schema cannot express." + type: object + additionalProperties: + x-kubernetes-preserve-unknown-fields: true + x-kubernetes-preserve-unknown-fields: true + permissions: + description: Permissions (spec 7.5). + type: object + properties: + default: + enum: &a10 + - allow + - deny + type: string + tools: + type: object + additionalProperties: + required: &a11 + - allow + type: object + properties: + allow: + type: boolean + resources: + type: array + items: + description: "Expression-enabled string (spec 3.9): only inputs., steps..outputs., execution.id, execution.environment, forEach.item, forEach.item. and forEach.index are allowed inside ${{ }}." + type: string + extensions: + description: "Extension fields (spec 3.3): keys start with x-, values are opaque to AWP. Replaces the x- fields of v1alpha1, which a Kubernetes structural schema cannot express." + type: object + additionalProperties: + x-kubernetes-preserve-unknown-fields: true + x-kubernetes-preserve-unknown-fields: true + network: + type: object + properties: + egress: + enum: &a12 + - allow + - deny + type: string + allowHosts: + type: array + items: + minLength: 1 + type: string + extensions: + description: "Extension fields (spec 3.3): keys start with x-, values are opaque to AWP. Replaces the x- fields of v1alpha1, which a Kubernetes structural schema cannot express." + type: object + additionalProperties: + x-kubernetes-preserve-unknown-fields: true + x-kubernetes-preserve-unknown-fields: true + filesystem: + type: object + properties: + read: + type: array + items: + minLength: 1 + type: string + write: + type: array + items: + minLength: 1 + type: string + extensions: + description: "Extension fields (spec 3.3): keys start with x-, values are opaque to AWP. Replaces the x- fields of v1alpha1, which a Kubernetes structural schema cannot express." + type: object + additionalProperties: + x-kubernetes-preserve-unknown-fields: true + x-kubernetes-preserve-unknown-fields: true + secrets: + type: array + items: + description: Name (spec 3.4). + pattern: ^[a-zA-Z][a-zA-Z0-9_-]{0,62}$ + type: string + environments: + type: array + items: + minLength: 1 + type: string + extensions: + description: "Extension fields (spec 3.3): keys start with x-, values are opaque to AWP. Replaces the x- fields of v1alpha1, which a Kubernetes structural schema cannot express." + type: object + additionalProperties: + x-kubernetes-preserve-unknown-fields: true + x-kubernetes-preserve-unknown-fields: true + budget: + description: Budget (spec 5.7). All limits are positive. + type: object + properties: + maxCostUsd: + type: number + minimum: 0 + exclusiveMinimum: true + maxSteps: + minimum: 1 + type: integer + maxDuration: + description: Duration greater than zero (spec 3.6). + type: string + resources: + type: object + properties: + maxTokens: + minimum: 1 + type: integer + maxToolCalls: + minimum: 1 + type: integer + maxRetries: + minimum: 1 + type: integer + maxConcurrency: + minimum: 1 + type: integer + extensions: + description: "Extension fields (spec 3.3): keys start with x-, values are opaque to AWP. Replaces the x- fields of v1alpha1, which a Kubernetes structural schema cannot express." + type: object + additionalProperties: + x-kubernetes-preserve-unknown-fields: true + x-kubernetes-preserve-unknown-fields: true + extensions: + description: "Extension fields (spec 3.3): keys start with x-, values are opaque to AWP. Replaces the x- fields of v1alpha1, which a Kubernetes structural schema cannot express." + type: object + additionalProperties: + x-kubernetes-preserve-unknown-fields: true + x-kubernetes-preserve-unknown-fields: true + extensions: + description: "Extension fields (spec 3.3): keys start with x-, values are opaque to AWP. Replaces the x- fields of v1alpha1, which a Kubernetes structural schema cannot express." + type: object + additionalProperties: + x-kubernetes-preserve-unknown-fields: true + protocol: + enum: + - a2a + type: string + endpoint: + description: HTTPS URL. + pattern: ^https://[^\s/?#]+([/?#]\S*)?$ + type: string + agentCard: + required: + - url + type: object + properties: + url: + description: HTTPS URL. + pattern: ^https://[^\s/?#]+([/?#]\S*)?$ + type: string + digest: + description: Digest : (spec 3.8). sha256/sha384/sha512 have fixed lengths; other algorithms are accepted syntactically. + type: string + extensions: + description: "Extension fields (spec 3.3): keys start with x-, values are opaque to AWP. Replaces the x- fields of v1alpha1, which a Kubernetes structural schema cannot express." + type: object + additionalProperties: + x-kubernetes-preserve-unknown-fields: true + x-kubernetes-preserve-unknown-fields: true + auth: + required: + - secretRef + type: object + properties: + secretRef: + description: Name (spec 3.4). + pattern: ^[a-zA-Z][a-zA-Z0-9_-]{0,62}$ + type: string + extensions: + description: "Extension fields (spec 3.3): keys start with x-, values are opaque to AWP. Replaces the x- fields of v1alpha1, which a Kubernetes structural schema cannot express." + type: object + additionalProperties: + x-kubernetes-preserve-unknown-fields: true + x-kubernetes-preserve-unknown-fields: true + model: + description: Model object (spec 5.4.3). + required: + - provider + - name + type: object + properties: + provider: + minLength: 1 + type: string + name: + minLength: 1 + type: string + version: + minLength: 1 + type: string + region: + minLength: 1 + type: string + approval: + type: object + properties: + status: + enum: + - approved + - pending + - rejected + - revoked + type: string + expires: + description: RFC 3339 full-date (spec 3.7). Calendar validity is a semantic rule. + pattern: ^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])$ + type: string + approvedBy: + minLength: 1 + type: string + extensions: + description: "Extension fields (spec 3.3): keys start with x-, values are opaque to AWP. Replaces the x- fields of v1alpha1, which a Kubernetes structural schema cannot express." + type: object + additionalProperties: + x-kubernetes-preserve-unknown-fields: true + x-kubernetes-preserve-unknown-fields: true + riskClassification: + enum: *a9 + type: string + evaluation: + type: object + properties: + status: + enum: + - passed + - failed + - pending + - notEvaluated + type: string + ref: + minLength: 1 + type: string + extensions: + description: "Extension fields (spec 3.3): keys start with x-, values are opaque to AWP. Replaces the x- fields of v1alpha1, which a Kubernetes structural schema cannot express." + type: object + additionalProperties: + x-kubernetes-preserve-unknown-fields: true + x-kubernetes-preserve-unknown-fields: true + allowedUseCases: + type: array + items: + minLength: 1 + type: string + extensions: + description: "Extension fields (spec 3.3): keys start with x-, values are opaque to AWP. Replaces the x- fields of v1alpha1, which a Kubernetes structural schema cannot express." + type: object + additionalProperties: + x-kubernetes-preserve-unknown-fields: true + x-kubernetes-preserve-unknown-fields: true + instructions: + type: string + promptRef: + required: + - name + - version + type: object + properties: + name: + minLength: 1 + type: string + version: + minLength: 1 + type: string + digest: + description: Digest : (spec 3.8). sha256/sha384/sha512 have fixed lengths; other algorithms are accepted syntactically. + type: string + extensions: + description: "Extension fields (spec 3.3): keys start with x-, values are opaque to AWP. Replaces the x- fields of v1alpha1, which a Kubernetes structural schema cannot express." + type: object + additionalProperties: + x-kubernetes-preserve-unknown-fields: true + x-kubernetes-preserve-unknown-fields: true + tools: + type: array + items: + description: Tool source (spec 5.5.2). + required: + - type + type: object + properties: + type: + enum: + - mcp + - builtin + type: string + server: + description: Name (spec 3.4). + pattern: ^[a-zA-Z][a-zA-Z0-9_-]{0,62}$ + type: string + name: + minLength: 1 + type: string + tools: + type: array + items: + minLength: 1 + type: string + extensions: + description: "Extension fields (spec 3.3): keys start with x-, values are opaque to AWP. Replaces the x- fields of v1alpha1, which a Kubernetes structural schema cannot express." + type: object + additionalProperties: + x-kubernetes-preserve-unknown-fields: true + x-kubernetes-preserve-unknown-fields: true + humanInput: + description: Lets an agent ask a person during its step (spec 5.8). + required: + - answerers + type: object + properties: + answerers: + minItems: 1 + type: array + items: + description: Exactly one of role or user (spec 7.6). + type: object + properties: + role: + minLength: 1 + type: string + user: + minLength: 1 + type: string + extensions: + description: "Extension fields (spec 3.3): keys start with x-, values are opaque to AWP. Replaces the x- fields of v1alpha1, which a Kubernetes structural schema cannot express." + type: object + additionalProperties: + x-kubernetes-preserve-unknown-fields: true + x-kubernetes-preserve-unknown-fields: true + timeout: + description: Duration greater than zero (spec 3.6). + type: string + onTimeout: + enum: + - return + - fail + type: string + maxRequests: + minimum: 1 + type: integer + classification: + description: Data class (spec 7.2). + enum: *a8 + type: string + extensions: + description: "Extension fields (spec 3.3): keys start with x-, values are opaque to AWP. Replaces the x- fields of v1alpha1, which a Kubernetes structural schema cannot express." + type: object + additionalProperties: + x-kubernetes-preserve-unknown-fields: true + x-kubernetes-preserve-unknown-fields: true + x-kubernetes-preserve-unknown-fields: true + mcpServers: + type: array + items: + description: MCP server (spec 5.5.1). + required: + - name + - transport + type: object + properties: + name: + description: Name (spec 3.4). + pattern: ^[a-zA-Z][a-zA-Z0-9_-]{0,62}$ + type: string + transport: + enum: + - stdio + - streamable-http + type: string + url: + description: HTTPS URL. + pattern: ^https://[^\s/?#]+([/?#]\S*)?$ + type: string + image: + minLength: 1 + type: string + version: + minLength: 1 + type: string + auth: + required: + - secretRef + type: object + properties: + secretRef: + description: Name (spec 3.4). + pattern: ^[a-zA-Z][a-zA-Z0-9_-]{0,62}$ + type: string + extensions: + description: "Extension fields (spec 3.3): keys start with x-, values are opaque to AWP. Replaces the x- fields of v1alpha1, which a Kubernetes structural schema cannot express." + type: object + additionalProperties: + x-kubernetes-preserve-unknown-fields: true + x-kubernetes-preserve-unknown-fields: true + extensions: + description: "Extension fields (spec 3.3): keys start with x-, values are opaque to AWP. Replaces the x- fields of v1alpha1, which a Kubernetes structural schema cannot express." + type: object + additionalProperties: + x-kubernetes-preserve-unknown-fields: true + x-kubernetes-preserve-unknown-fields: true + actionGroups: + description: Action groups (spec 5.5.4). Nesting is a semantic rule. + type: object + additionalProperties: + type: array + items: + description: Action identifier (spec 5.5.3). + pattern: ^[a-zA-Z][a-zA-Z0-9_-]*(\.[a-zA-Z0-9_-]+)+$ + type: string + workflow: + type: array + items: + description: Workflow step (spec 5.6). + required: + - id + type: object + properties: + id: + description: Identifier (spec 3.4). + pattern: ^[a-z][a-z0-9-]{0,62}$ + type: string + type: + enum: + - agent + - command + - approval + - input + - workflow + type: string + dependsOn: + type: array + items: + description: Identifier (spec 3.4). + pattern: ^[a-z][a-z0-9-]{0,62}$ + type: string + timeout: + description: Duration greater than zero (spec 3.6). + type: string + retries: + minimum: 0 + type: integer + when: + description: "Condition (spec 3.10): the step runs only if it evaluates to true. The whole field is the expression, without ${{ }}." + minLength: 1 + maxLength: 512 + type: string + outputs: + type: array + items: + required: + - name + type: object + properties: + name: + description: Output name (spec 5.6.1). Also the file name in $AWP_OUTPUTS (spec 5.6.4). + pattern: ^[A-Za-z_][A-Za-z0-9_]{0,62}$ + type: string + classification: + description: Data class (spec 7.2). + enum: *a8 + type: string + description: + type: string + extensions: + description: "Extension fields (spec 3.3): keys start with x-, values are opaque to AWP. Replaces the x- fields of v1alpha1, which a Kubernetes structural schema cannot express." + type: object + additionalProperties: + x-kubernetes-preserve-unknown-fields: true + x-kubernetes-preserve-unknown-fields: true + budget: + description: Budget (spec 5.7). All limits are positive. + type: object + properties: + maxCostUsd: + type: number + minimum: 0 + exclusiveMinimum: true + maxSteps: + minimum: 1 + type: integer + maxDuration: + description: Duration greater than zero (spec 3.6). + type: string + resources: + type: object + properties: + maxTokens: + minimum: 1 + type: integer + maxToolCalls: + minimum: 1 + type: integer + maxRetries: + minimum: 1 + type: integer + maxConcurrency: + minimum: 1 + type: integer + extensions: + description: "Extension fields (spec 3.3): keys start with x-, values are opaque to AWP. Replaces the x- fields of v1alpha1, which a Kubernetes structural schema cannot express." + type: object + additionalProperties: + x-kubernetes-preserve-unknown-fields: true + x-kubernetes-preserve-unknown-fields: true + extensions: + description: "Extension fields (spec 3.3): keys start with x-, values are opaque to AWP. Replaces the x- fields of v1alpha1, which a Kubernetes structural schema cannot express." + type: object + additionalProperties: + x-kubernetes-preserve-unknown-fields: true + x-kubernetes-preserve-unknown-fields: true + agent: + description: Identifier (spec 3.4). + pattern: ^[a-z][a-z0-9-]{0,62}$ + type: string + task: + description: "Expression-enabled string (spec 3.9): only inputs., steps..outputs., execution.id, execution.environment, forEach.item, forEach.item. and forEach.index are allowed inside ${{ }}." + type: string + command: + minLength: 1 + type: string + image: + minLength: 1 + type: string + env: + type: object + additionalProperties: + description: "Expression-enabled string (spec 3.9): only inputs., steps..outputs., execution.id, execution.environment, forEach.item, forEach.item. and forEach.index are allowed inside ${{ }}." + type: string + workingDir: + minLength: 1 + type: string + approval: + description: "Payload of an approval step (spec 5.6.1, 7.6): the fields of Approval without requiredFor and separationOfDuties, which apply only at workflow level." + type: object + properties: + approvers: + type: array + items: + description: Exactly one of role or user (spec 7.6). + type: object + properties: + role: + minLength: 1 + type: string + user: + minLength: 1 + type: string + extensions: + description: "Extension fields (spec 3.3): keys start with x-, values are opaque to AWP. Replaces the x- fields of v1alpha1, which a Kubernetes structural schema cannot express." + type: object + additionalProperties: + x-kubernetes-preserve-unknown-fields: true + x-kubernetes-preserve-unknown-fields: true + minApprovals: + minimum: 1 + type: integer + timeout: + description: Duration greater than zero (spec 3.6). + type: string + onTimeout: + enum: &a13 + - reject + - fail + type: string + message: + description: "Expression-enabled string (spec 3.9): only inputs., steps..outputs., execution.id, execution.environment, forEach.item, forEach.item. and forEach.index are allowed inside ${{ }}." + type: string + extensions: + description: "Extension fields (spec 3.3): keys start with x-, values are opaque to AWP. Replaces the x- fields of v1alpha1, which a Kubernetes structural schema cannot express." + type: object + additionalProperties: + x-kubernetes-preserve-unknown-fields: true + x-kubernetes-preserve-unknown-fields: true + input: + description: "Payload of an input step (spec 5.8): ask a person and wait for the answer." + required: + - message + - answerers + type: object + properties: + message: + description: "Expression-enabled string (spec 3.9): only inputs., steps..outputs., execution.id, execution.environment, forEach.item, forEach.item. and forEach.index are allowed inside ${{ }}." + type: string + answerSchema: + description: "Schema of a structured answer (spec 5.8): a flat object of primitive fields, the requested-schema subset of MCP elicitation." + required: + - type + - properties + type: object + properties: + type: + enum: + - object + type: string + properties: + minProperties: 1 + type: object + additionalProperties: + description: "One field of an answer schema (spec 5.8): a primitive value, as in MCP elicitation." + required: + - type + type: object + properties: + type: + enum: + - string + - number + - integer + - boolean + type: string + title: + minLength: 1 + type: string + description: + type: string + enum: + minItems: 1 + type: array + items: + type: string + format: + enum: + - email + - uri + - date + - date-time + type: string + minLength: + minimum: 0 + type: integer + maxLength: + minimum: 1 + type: integer + minimum: + type: number + maximum: + type: number + extensions: + description: "Extension fields (spec 3.3): keys start with x-, values are opaque to AWP. Replaces the x- fields of v1alpha1, which a Kubernetes structural schema cannot express." + type: object + additionalProperties: + x-kubernetes-preserve-unknown-fields: true + x-kubernetes-preserve-unknown-fields: true + required: + type: array + items: + minLength: 1 + type: string + extensions: + description: "Extension fields (spec 3.3): keys start with x-, values are opaque to AWP. Replaces the x- fields of v1alpha1, which a Kubernetes structural schema cannot express." + type: object + additionalProperties: + x-kubernetes-preserve-unknown-fields: true + x-kubernetes-preserve-unknown-fields: true + answerers: + minItems: 1 + type: array + items: + description: Exactly one of role or user (spec 7.6). + type: object + properties: + role: + minLength: 1 + type: string + user: + minLength: 1 + type: string + extensions: + description: "Extension fields (spec 3.3): keys start with x-, values are opaque to AWP. Replaces the x- fields of v1alpha1, which a Kubernetes structural schema cannot express." + type: object + additionalProperties: + x-kubernetes-preserve-unknown-fields: true + x-kubernetes-preserve-unknown-fields: true + timeout: + description: Duration greater than zero (spec 3.6). + type: string + onTimeout: + enum: + - fail + - useDefault + type: string + default: + x-kubernetes-preserve-unknown-fields: true + classification: + description: Data class (spec 7.2). + enum: *a8 + type: string + extensions: + description: "Extension fields (spec 3.3): keys start with x-, values are opaque to AWP. Replaces the x- fields of v1alpha1, which a Kubernetes structural schema cannot express." + type: object + additionalProperties: + x-kubernetes-preserve-unknown-fields: true + x-kubernetes-preserve-unknown-fields: true + workflow: + description: "Payload of a workflow step (spec 5.6.6): start another workflow of the same scope as a child execution." + required: + - ref + type: object + properties: + ref: + description: "Object name (spec 3.4): a DNS-1123 label." + maxLength: 63 + pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$ + type: string + version: + description: "Semantic version range of the child workflow. Default: the version the runtime treats as current." + minLength: 1 + type: string + inputs: + description: Inputs of the child execution; values are expression-enabled (spec 3.9). + type: object + additionalProperties: + description: "Expression-enabled string (spec 3.9): only inputs., steps..outputs., execution.id, execution.environment, forEach.item, forEach.item. and forEach.index are allowed inside ${{ }}." + type: string + wait: + description: Wait for the child execution to finish (default true). + type: boolean + extensions: + description: "Extension fields (spec 3.3): keys start with x-, values are opaque to AWP. Replaces the x- fields of v1alpha1, which a Kubernetes structural schema cannot express." + type: object + additionalProperties: + x-kubernetes-preserve-unknown-fields: true + x-kubernetes-preserve-unknown-fields: true + forEach: + description: "Iteration over a list (spec 5.6.5): the step runs once per item, bounded by maxItems and concurrency." + required: + - items + - maxItems + type: object + properties: + items: + description: Exactly one reference to an array input or to an output of a step this step depends on. + pattern: ^\$\{\{ *(?:inputs\.[a-zA-Z][a-zA-Z0-9_-]{0,62}|steps\.[a-z][a-z0-9-]{0,62}\.outputs\.[^\s.{}$]+) *\}\}$ + type: string + maxItems: + minimum: 1 + type: integer + concurrency: + minimum: 1 + type: integer + x-kubernetes-preserve-unknown-fields: true + extensions: + description: "Extension fields (spec 3.3): keys start with x-, values are opaque to AWP. Replaces the x- fields of v1alpha1, which a Kubernetes structural schema cannot express." + type: object + additionalProperties: + x-kubernetes-preserve-unknown-fields: true + x-kubernetes-preserve-unknown-fields: true + secrets: + type: array + items: + description: Secret declaration (spec 7.9). Secret values never appear in manifests. + required: + - name + - source + type: object + properties: + name: + description: Name (spec 3.4). + pattern: ^[a-zA-Z][a-zA-Z0-9_-]{0,62}$ + type: string + source: + minLength: 1 + type: string + key: + minLength: 1 + type: string + scope: + type: array + items: + minLength: 1 + type: string + extensions: + description: "Extension fields (spec 3.3): keys start with x-, values are opaque to AWP. Replaces the x- fields of v1alpha1, which a Kubernetes structural schema cannot express." + type: object + additionalProperties: + x-kubernetes-preserve-unknown-fields: true + x-kubernetes-preserve-unknown-fields: true + environment: + required: + - name + type: object + properties: + name: + minLength: 1 + type: string + extensions: + description: "Extension fields (spec 3.3): keys start with x-, values are opaque to AWP. Replaces the x- fields of v1alpha1, which a Kubernetes structural schema cannot express." + type: object + additionalProperties: + x-kubernetes-preserve-unknown-fields: true + x-kubernetes-preserve-unknown-fields: true + environments: + description: Environments (spec 7.10). Keys are organizational environment names. + type: object + additionalProperties: + required: + - autonomy + type: object + properties: + autonomy: + enum: + - unrestricted + - controlled + - approval-required + - prohibited + type: string + autoApprove: + type: array + items: + description: Action identifier, group identifier or wildcard pattern with a final segment * (spec 5.5.3, 5.5.4). + pattern: ^[a-zA-Z][a-zA-Z0-9_-]*(\.[a-zA-Z0-9_-]+)*(\.[a-zA-Z0-9_-]+|\.\*)$ + type: string + extensions: + description: "Extension fields (spec 3.3): keys start with x-, values are opaque to AWP. Replaces the x- fields of v1alpha1, which a Kubernetes structural schema cannot express." + type: object + additionalProperties: + x-kubernetes-preserve-unknown-fields: true + x-kubernetes-preserve-unknown-fields: true + permissions: + description: Permissions (spec 7.5). + type: object + properties: + default: + enum: *a10 + type: string + tools: + type: object + additionalProperties: + required: *a11 + type: object + properties: + allow: + type: boolean + resources: + type: array + items: + description: "Expression-enabled string (spec 3.9): only inputs., steps..outputs., execution.id, execution.environment, forEach.item, forEach.item. and forEach.index are allowed inside ${{ }}." + type: string + extensions: + description: "Extension fields (spec 3.3): keys start with x-, values are opaque to AWP. Replaces the x- fields of v1alpha1, which a Kubernetes structural schema cannot express." + type: object + additionalProperties: + x-kubernetes-preserve-unknown-fields: true + x-kubernetes-preserve-unknown-fields: true + network: + type: object + properties: + egress: + enum: *a12 + type: string + allowHosts: + type: array + items: + minLength: 1 + type: string + extensions: + description: "Extension fields (spec 3.3): keys start with x-, values are opaque to AWP. Replaces the x- fields of v1alpha1, which a Kubernetes structural schema cannot express." + type: object + additionalProperties: + x-kubernetes-preserve-unknown-fields: true + x-kubernetes-preserve-unknown-fields: true + filesystem: + type: object + properties: + read: + type: array + items: + minLength: 1 + type: string + write: + type: array + items: + minLength: 1 + type: string + extensions: + description: "Extension fields (spec 3.3): keys start with x-, values are opaque to AWP. Replaces the x- fields of v1alpha1, which a Kubernetes structural schema cannot express." + type: object + additionalProperties: + x-kubernetes-preserve-unknown-fields: true + x-kubernetes-preserve-unknown-fields: true + secrets: + type: array + items: + description: Name (spec 3.4). + pattern: ^[a-zA-Z][a-zA-Z0-9_-]{0,62}$ + type: string + environments: + type: array + items: + minLength: 1 + type: string + extensions: + description: "Extension fields (spec 3.3): keys start with x-, values are opaque to AWP. Replaces the x- fields of v1alpha1, which a Kubernetes structural schema cannot express." + type: object + additionalProperties: + x-kubernetes-preserve-unknown-fields: true + x-kubernetes-preserve-unknown-fields: true + dataPolicy: + description: Data policy (spec 7.2, 7.3). + type: object + properties: + classification: + description: Data class (spec 7.2). + enum: *a8 + type: string + inputs: + type: array + items: + required: + - name + - classification + type: object + properties: + name: + minLength: 1 + type: string + classification: + description: Data class (spec 7.2). + enum: *a8 + type: string + extensions: + description: "Extension fields (spec 3.3): keys start with x-, values are opaque to AWP. Replaces the x- fields of v1alpha1, which a Kubernetes structural schema cannot express." + type: object + additionalProperties: + x-kubernetes-preserve-unknown-fields: true + x-kubernetes-preserve-unknown-fields: true + outputs: + type: array + items: + required: + - name + - classification + type: object + properties: + name: + minLength: 1 + type: string + classification: + description: Data class (spec 7.2). + enum: *a8 + type: string + extensions: + description: "Extension fields (spec 3.3): keys start with x-, values are opaque to AWP. Replaces the x- fields of v1alpha1, which a Kubernetes structural schema cannot express." + type: object + additionalProperties: + x-kubernetes-preserve-unknown-fields: true + x-kubernetes-preserve-unknown-fields: true + restrictions: + type: object + properties: + externalTransfer: + enum: + - allow + - deny + type: string + extensions: + description: "Extension fields (spec 3.3): keys start with x-, values are opaque to AWP. Replaces the x- fields of v1alpha1, which a Kubernetes structural schema cannot express." + type: object + additionalProperties: + x-kubernetes-preserve-unknown-fields: true + x-kubernetes-preserve-unknown-fields: true + residency: + type: object + properties: + allowed: + type: array + items: + minLength: 1 + type: string + extensions: + description: "Extension fields (spec 3.3): keys start with x-, values are opaque to AWP. Replaces the x- fields of v1alpha1, which a Kubernetes structural schema cannot express." + type: object + additionalProperties: + x-kubernetes-preserve-unknown-fields: true + x-kubernetes-preserve-unknown-fields: true + processing: + type: object + properties: + allowedProviders: + type: array + items: + minLength: 1 + type: string + forbiddenProviders: + type: array + items: + minLength: 1 + type: string + extensions: + description: "Extension fields (spec 3.3): keys start with x-, values are opaque to AWP. Replaces the x- fields of v1alpha1, which a Kubernetes structural schema cannot express." + type: object + additionalProperties: + x-kubernetes-preserve-unknown-fields: true + x-kubernetes-preserve-unknown-fields: true + extensions: + description: "Extension fields (spec 3.3): keys start with x-, values are opaque to AWP. Replaces the x- fields of v1alpha1, which a Kubernetes structural schema cannot express." + type: object + additionalProperties: + x-kubernetes-preserve-unknown-fields: true + x-kubernetes-preserve-unknown-fields: true + modelPolicy: + description: Model policy (spec 7.4). + type: object + properties: + allowedProviders: + type: array + items: + minLength: 1 + type: string + allowedModels: + type: array + items: + minLength: 1 + type: string + forbiddenModels: + type: array + items: + minLength: 1 + type: string + requirements: + type: object + properties: + approvalStatus: + enum: + - approved + - pending + - rejected + - revoked + type: string + encryption: + type: boolean + region: + minLength: 1 + type: string + evaluationStatus: + enum: + - passed + - failed + - pending + - notEvaluated + type: string + extensions: + description: "Extension fields (spec 3.3): keys start with x-, values are opaque to AWP. Replaces the x- fields of v1alpha1, which a Kubernetes structural schema cannot express." + type: object + additionalProperties: + x-kubernetes-preserve-unknown-fields: true + x-kubernetes-preserve-unknown-fields: true + extensions: + description: "Extension fields (spec 3.3): keys start with x-, values are opaque to AWP. Replaces the x- fields of v1alpha1, which a Kubernetes structural schema cannot express." + type: object + additionalProperties: + x-kubernetes-preserve-unknown-fields: true + x-kubernetes-preserve-unknown-fields: true + approval: + description: Workflow-level approval configuration (spec 7.6). + type: object + properties: + requiredFor: + type: array + items: + description: Action identifier, group identifier or wildcard pattern with a final segment * (spec 5.5.3, 5.5.4). + pattern: ^[a-zA-Z][a-zA-Z0-9_-]*(\.[a-zA-Z0-9_-]+)*(\.[a-zA-Z0-9_-]+|\.\*)$ + type: string + approvers: + type: array + items: + description: Exactly one of role or user (spec 7.6). + type: object + properties: + role: + minLength: 1 + type: string + user: + minLength: 1 + type: string + extensions: + description: "Extension fields (spec 3.3): keys start with x-, values are opaque to AWP. Replaces the x- fields of v1alpha1, which a Kubernetes structural schema cannot express." + type: object + additionalProperties: + x-kubernetes-preserve-unknown-fields: true + x-kubernetes-preserve-unknown-fields: true + minApprovals: + minimum: 1 + type: integer + timeout: + description: Duration greater than zero (spec 3.6). + type: string + onTimeout: + enum: *a13 + type: string + message: + description: "Expression-enabled string (spec 3.9): only inputs., steps..outputs., execution.id, execution.environment, forEach.item, forEach.item. and forEach.index are allowed inside ${{ }}." + type: string + separationOfDuties: + type: object + properties: + enabled: + type: boolean + rules: + type: array + items: + type: object + properties: + actorCannotApproveOwnAction: + type: boolean + initiatorCannotApprove: + type: boolean + distinctApprovers: + type: boolean + extensions: + description: "Extension fields (spec 3.3): keys start with x-, values are opaque to AWP. Replaces the x- fields of v1alpha1, which a Kubernetes structural schema cannot express." + type: object + additionalProperties: + x-kubernetes-preserve-unknown-fields: true + x-kubernetes-preserve-unknown-fields: true + extensions: + description: "Extension fields (spec 3.3): keys start with x-, values are opaque to AWP. Replaces the x- fields of v1alpha1, which a Kubernetes structural schema cannot express." + type: object + additionalProperties: + x-kubernetes-preserve-unknown-fields: true + x-kubernetes-preserve-unknown-fields: true + extensions: + description: "Extension fields (spec 3.3): keys start with x-, values are opaque to AWP. Replaces the x- fields of v1alpha1, which a Kubernetes structural schema cannot express." + type: object + additionalProperties: + x-kubernetes-preserve-unknown-fields: true + x-kubernetes-preserve-unknown-fields: true + policies: + description: Workflow policy shorthands and includes (spec 8.1). + type: object + properties: + git: + type: object + properties: + allowPush: + type: boolean + allowForcePush: + type: boolean + extensions: + description: "Extension fields (spec 3.3): keys start with x-, values are opaque to AWP. Replaces the x- fields of v1alpha1, which a Kubernetes structural schema cannot express." + type: object + additionalProperties: + x-kubernetes-preserve-unknown-fields: true + x-kubernetes-preserve-unknown-fields: true + pullRequest: + type: object + properties: + allowCreate: + type: boolean + extensions: + description: "Extension fields (spec 3.3): keys start with x-, values are opaque to AWP. Replaces the x- fields of v1alpha1, which a Kubernetes structural schema cannot express." + type: object + additionalProperties: + x-kubernetes-preserve-unknown-fields: true + x-kubernetes-preserve-unknown-fields: true + merge: + type: object + properties: + allow: + type: boolean + extensions: + description: "Extension fields (spec 3.3): keys start with x-, values are opaque to AWP. Replaces the x- fields of v1alpha1, which a Kubernetes structural schema cannot express." + type: object + additionalProperties: + x-kubernetes-preserve-unknown-fields: true + x-kubernetes-preserve-unknown-fields: true + production: + type: object + properties: + allow: + type: boolean + extensions: + description: "Extension fields (spec 3.3): keys start with x-, values are opaque to AWP. Replaces the x- fields of v1alpha1, which a Kubernetes structural schema cannot express." + type: object + additionalProperties: + x-kubernetes-preserve-unknown-fields: true + x-kubernetes-preserve-unknown-fields: true + include: + type: array + items: + required: + - name + - version + type: object + properties: + name: + description: Name (spec 3.4). + pattern: ^[a-zA-Z][a-zA-Z0-9_-]{0,62}$ + type: string + version: + description: Semantic Version 2.0.0 (spec 3.5). + pattern: ^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$ + type: string + digest: + description: Digest : (spec 3.8). sha256/sha384/sha512 have fixed lengths; other algorithms are accepted syntactically. + type: string + extensions: + description: "Extension fields (spec 3.3): keys start with x-, values are opaque to AWP. Replaces the x- fields of v1alpha1, which a Kubernetes structural schema cannot express." + type: object + additionalProperties: + x-kubernetes-preserve-unknown-fields: true + x-kubernetes-preserve-unknown-fields: true + extensions: + description: "Extension fields (spec 3.3): keys start with x-, values are opaque to AWP. Replaces the x- fields of v1alpha1, which a Kubernetes structural schema cannot express." + type: object + additionalProperties: + x-kubernetes-preserve-unknown-fields: true + x-kubernetes-preserve-unknown-fields: true + audit: + description: Audit configuration (spec 10.2). + type: object + properties: + enabled: + type: boolean + payload: + enum: + - metadata + - full + type: string + integrity: + type: object + properties: + mode: + enum: + - none + - hash-chain + - signed + type: string + extensions: + description: "Extension fields (spec 3.3): keys start with x-, values are opaque to AWP. Replaces the x- fields of v1alpha1, which a Kubernetes structural schema cannot express." + type: object + additionalProperties: + x-kubernetes-preserve-unknown-fields: true + x-kubernetes-preserve-unknown-fields: true + retention: + type: object + properties: + duration: + description: Duration greater than zero (spec 3.6). + type: string + extensions: + description: "Extension fields (spec 3.3): keys start with x-, values are opaque to AWP. Replaces the x- fields of v1alpha1, which a Kubernetes structural schema cannot express." + type: object + additionalProperties: + x-kubernetes-preserve-unknown-fields: true + x-kubernetes-preserve-unknown-fields: true + extensions: + description: "Extension fields (spec 3.3): keys start with x-, values are opaque to AWP. Replaces the x- fields of v1alpha1, which a Kubernetes structural schema cannot express." + type: object + additionalProperties: + x-kubernetes-preserve-unknown-fields: true + x-kubernetes-preserve-unknown-fields: true + extensions: + description: "Extension fields (spec 3.3): keys start with x-, values are opaque to AWP. Replaces the x- fields of v1alpha1, which a Kubernetes structural schema cannot express." + type: object + additionalProperties: + x-kubernetes-preserve-unknown-fields: true + x-kubernetes-preserve-unknown-fields: true + status: + description: Status a runtime writes on a Workflow, Agent or Policy (spec 3.11). Validators ignore it (spec 3.2). + type: object + properties: + observedGeneration: + minimum: 0 + type: integer + digest: + description: Digest of the manifest as the runtime validated it (spec 9.1). + type: string + conditions: + type: array + items: + description: A status condition in the shape of Kubernetes metav1.Condition (spec 3.11). + required: + - type + - status + - lastTransitionTime + - reason + - message + type: object + properties: + type: + maxLength: 316 + pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$ + type: string + status: + enum: + - "True" + - "False" + - Unknown + type: string + observedGeneration: + minimum: 0 + type: integer + lastTransitionTime: + description: When status last changed (RFC 3339). + pattern: ^[0-9]{4}-[0-9]{2}-[0-9]{2}[Tt][0-9]{2}:[0-9]{2}:[0-9]{2}(\.[0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$ + type: string + reason: + minLength: 1 + maxLength: 1024 + pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$ + type: string + message: + maxLength: 32768 + type: string + x-kubernetes-preserve-unknown-fields: true + x-kubernetes-preserve-unknown-fields: true From a71bcef382c250c76c577e9e09ccb58a027d91b7 Mon Sep 17 00:00:00 2001 From: Erik Date: Fri, 27 Nov 2026 07:20:24 +0100 Subject: [PATCH 2/6] feat(conformance): v1alpha4 suite, conditions and migration The reference checker has to know v1alpha4 before the specification text and the tools can follow. The suite is the v1alpha3 suite with apiVersion v1alpha4 (the two digest cases are recomputed because the digest covers apiVersion) plus cases for conditions and workflow steps. The spec examples are copied as v1alpha4 examples because the runner validates the examples of every version. Conditions are parsed by a new module, conformance/conditions.mjs, with the grammar and limits of AEP-0001; semantic.mjs checks references to steps (dependency, declared output) and inputs (warning), restricts workflow step outputs to executionId and status, and treats workflow.inputs values as expression-enabled. migrate converts v1alpha1, v1alpha2 and v1alpha3 to v1alpha4; from v1alpha3 only apiVersion changes. Signed-off-by: Erik --- conformance/README.md | 17 +- conformance/awp-check.mjs | 20 +- conformance/conditions.mjs | 241 ++ conformance/migrate.mjs | 18 +- conformance/semantic.mjs | 37 +- conformance/v1alpha4/index.json | 2094 +++++++++++++++++ .../invalid/10.2-invalid-integrity-mode.yaml | 66 + .../invalid/10.2-invalid-payload.yaml | 65 + .../invalid/10.2-invalid-retention.yaml | 66 + .../10.8-workflow-ref-version-not-semver.yaml | 15 + .../10.8-workflow-run-governance-field.yaml | 17 + .../10.8-workflow-run-without-name.yaml | 14 + ...0.8-workflow-run-without-workflow-ref.yaml | 12 + .../v1alpha4/invalid/3.1-custom-tag.yaml | 63 + .../v1alpha4/invalid/3.1-non-string-key.yaml | 65 + .../v1alpha4/invalid/3.1-syntax-error.yaml | 5 + .../invalid/3.10-when-forbidden-segment.yaml | 64 + .../invalid/3.10-when-not-dependency.yaml | 69 + .../v1alpha4/invalid/3.10-when-syntax.yaml | 64 + .../v1alpha4/invalid/3.10-when-too-long.yaml | 64 + .../invalid/3.10-when-undeclared-output.yaml | 64 + .../invalid/3.10-when-unknown-root.yaml | 64 + .../invalid/3.2-missing-api-version.yaml | 62 + .../invalid/3.2-missing-metadata.yaml | 55 + .../v1alpha4/invalid/3.2-missing-spec.yaml | 13 + .../invalid/3.2-unsupported-api-version.yaml | 63 + .../invalid/3.2-unsupported-kind.yaml | 63 + ....3-extension-field-outside-extensions.yaml | 22 + .../3.3-extension-key-without-prefix.yaml | 23 + .../invalid/3.3-profile-a2a-agent.yaml | 67 + .../invalid/3.3-profile-approval-step.yaml | 71 + .../invalid/3.3-profile-audit-field.yaml | 66 + .../invalid/3.3-profile-governance-field.yaml | 67 + .../invalid/3.3-profile-high-risk.yaml | 64 + .../invalid/3.3-profile-interaction-step.yaml | 83 + .../invalid/3.3-profile-mcp-field.yaml | 64 + .../invalid/3.3-profile-policy-kind.yaml | 21 + .../invalid/3.3-profile-security-field.yaml | 67 + .../3.3-unknown-field-near-extension.yaml | 64 + .../invalid/3.3-unknown-metadata-field.yaml | 64 + .../invalid/3.3-unknown-step-field.yaml | 64 + .../invalid/3.3-unknown-top-level-field.yaml | 64 + .../invalid/3.4-duplicate-agent-id.yaml | 70 + .../invalid/3.4-duplicate-rule-id.yaml | 28 + .../invalid/3.4-invalid-metadata-name.yaml | 63 + .../invalid/3.4-uppercase-agent-id.yaml | 63 + .../invalid/3.4-uppercase-metadata-name.yaml | 21 + .../invalid/3.5-version-leading-zero.yaml | 63 + .../invalid/3.5-version-not-semver.yaml | 63 + .../invalid/3.6-duration-unknown-unit.yaml | 64 + .../v1alpha4/invalid/3.6-duration-zero.yaml | 63 + .../invalid/3.7-date-not-calendar-valid.yaml | 66 + .../invalid/3.7-date-wrong-format.yaml | 66 + .../invalid/3.8-digest-uppercase-hex.yaml | 65 + .../invalid/3.8-digest-wrong-length.yaml | 65 + .../invalid/3.9-expression-function.yaml | 63 + .../3.9-expression-in-env-key-ref-bad.yaml | 70 + .../invalid/3.9-expression-operator.yaml | 63 + .../invalid/3.9-expression-unknown-root.yaml | 63 + .../invalid/3.9-expression-unterminated.yaml | 63 + ...-iteration-reference-outside-for-each.yaml | 66 + .../3.9-step-reference-in-permissions.yaml | 65 + .../3.9-step-reference-unknown-step.yaml | 63 + ...3.9-step-reference-without-dependency.yaml | 62 + .../4-governance-field-in-metadata.yaml | 23 + .../v1alpha4/invalid/4-invalid-label-key.yaml | 65 + .../invalid/4-invalid-risk-level.yaml | 63 + .../invalid/4-label-value-not-string.yaml | 65 + .../invalid/4-label-value-too-long.yaml | 23 + .../v1alpha4/invalid/4-missing-owner.yaml | 61 + .../v1alpha4/invalid/4-missing-version.yaml | 62 + .../v1alpha4/invalid/4-owner-string.yaml | 20 + .../invalid/4-owner-without-team.yaml | 63 + ...2-concurrency-policy-on-event-trigger.yaml | 74 + .../invalid/5.2-cron-not-five-fields.yaml | 66 + .../invalid/5.2-event-without-event-type.yaml | 66 + .../5.2-invalid-concurrency-policy.yaml | 74 + .../invalid/5.2-schedule-without-cron.yaml | 66 + .../5.2-starting-deadline-not-duration.yaml | 74 + .../invalid/5.2-unknown-trigger-type.yaml | 65 + .../invalid/5.3-default-wrong-type.yaml | 63 + .../v1alpha4/invalid/5.3-invalid-pattern.yaml | 63 + .../5.3-required-input-with-default.yaml | 64 + .../invalid/5.3-unknown-input-type.yaml | 62 + .../5.4.1-inline-agent-without-model.yaml | 60 + .../5.4.1-instructions-and-prompt-ref.yaml | 67 + .../5.4.2-reference-version-range.yaml | 67 + .../5.4.2-reference-with-instructions.yaml | 68 + .../invalid/5.4.2-reference-with-model.yaml | 70 + .../5.4.2-reference-without-version.yaml | 66 + .../5.4.3-invalid-model-approval-status.yaml | 65 + .../invalid/5.4.3-model-without-name.yaml | 62 + .../5.4.4-remote-agent-http-endpoint.yaml | 66 + .../5.4.4-remote-agent-with-model.yaml | 69 + .../5.4.4-remote-agent-without-endpoint.yaml | 65 + .../5.4.4-remote-agent-wrong-protocol.yaml | 66 + .../invalid/5.5.1-duplicate-server-name.yaml | 68 + .../invalid/5.5.1-mcp-url-not-https.yaml | 63 + .../5.5.1-streamable-http-without-url.yaml | 62 + .../invalid/5.5.1-unknown-transport.yaml | 63 + ....5.2-builtin-tool-source-without-name.yaml | 62 + .../5.5.2-mcp-tool-source-without-server.yaml | 62 + ...alid-action-identifier-in-permissions.yaml | 63 + .../5.5.3-wildcard-not-final-segment.yaml | 63 + .../invalid/5.5.4-group-contains-group.yaml | 65 + .../5.5.4-invalid-group-identifier.yaml | 63 + .../5.6.1-agent-step-with-command.yaml | 64 + .../5.6.1-agent-step-without-agent.yaml | 62 + .../5.6.1-approval-step-required-for.yaml | 72 + ....1-approval-step-separation-of-duties.yaml | 74 + .../5.6.1-approval-step-without-approval.yaml | 67 + .../5.6.1-command-step-with-agent.yaml | 67 + .../5.6.1-command-step-without-command.yaml | 67 + .../invalid/5.6.1-negative-retries.yaml | 64 + .../invalid/5.6.1-output-name-with-dot.yaml | 82 + .../5.6.1-retries-exceed-max-retries.yaml | 64 + .../invalid/5.6.1-unknown-step-type.yaml | 64 + .../invalid/5.6.2-env-key-invalid.yaml | 70 + .../invalid/5.6.3-dependency-cycle.yaml | 65 + .../5.6.3-depends-on-unknown-step.yaml | 64 + .../invalid/5.6.3-duplicate-step-id.yaml | 62 + .../invalid/5.6.3-self-dependency.yaml | 65 + .../invalid/5.6.3-undeclared-step-output.yaml | 63 + .../v1alpha4/invalid/5.6.3-unknown-agent.yaml | 63 + .../v1alpha4/invalid/5.6.4-reserved-env.yaml | 83 + ...5-for-each-concurrency-exceeds-budget.yaml | 70 + .../5.6.5-for-each-input-not-array.yaml | 67 + ...5.6.5-for-each-items-not-a-dependency.yaml | 67 + .../5.6.5-for-each-items-not-a-reference.yaml | 69 + .../5.6.5-for-each-missing-max-items.yaml | 68 + .../5.6.5-for-each-on-approval-step.yaml | 71 + .../5.6.6-workflow-inputs-expression.yaml | 66 + .../5.6.6-workflow-ref-not-dns-label.yaml | 64 + .../invalid/5.6.6-workflow-step-agent.yaml | 65 + .../invalid/5.6.6-workflow-step-for-each.yaml | 67 + .../invalid/5.6.6-workflow-step-output.yaml | 67 + .../5.6.6-workflow-step-without-ref.yaml | 64 + .../v1alpha4/invalid/5.7-negative-cost.yaml | 63 + .../invalid/5.7-unknown-budget-field.yaml | 64 + .../invalid/5.7-zero-concurrency.yaml | 63 + .../v1alpha4/invalid/5.7-zero-max-steps.yaml | 63 + .../invalid/5.8-agent-invalid-on-timeout.yaml | 79 + .../5.8-answer-field-nested-object.yaml | 87 + .../invalid/5.8-default-mismatch.yaml | 101 + .../invalid/5.8-input-step-with-agent.yaml | 83 + .../invalid/5.8-input-step-without-input.yaml | 77 + .../invalid/5.8-input-without-answerers.yaml | 80 + .../invalid/5.8-required-unknown-field.yaml | 89 + .../5.8-use-default-without-default.yaml | 83 + .../6-agent-instructions-and-prompt-ref.yaml | 21 + .../6-agent-kind-with-workflow-spec.yaml | 19 + .../invalid/6-agent-with-workflow-field.yaml | 19 + .../invalid/6-agent-without-model.yaml | 15 + ....1-governance-requires-classification.yaml | 62 + .../7.10-environment-without-autonomy.yaml | 65 + .../invalid/7.10-invalid-autonomy.yaml | 66 + .../invalid/7.2-invalid-classification.yaml | 63 + .../7.2-invalid-external-transfer.yaml | 66 + .../7.4-invalid-model-policy-status.yaml | 66 + .../invalid/7.5-allow-not-boolean.yaml | 63 + .../v1alpha4/invalid/7.5-invalid-default.yaml | 63 + .../v1alpha4/invalid/7.5-invalid-egress.yaml | 65 + .../invalid/7.5-tool-without-allow.yaml | 64 + .../v1alpha4/invalid/7.6-approver-empty.yaml | 66 + .../invalid/7.6-approver-role-and-user.yaml | 67 + .../invalid/7.6-invalid-on-timeout.yaml | 65 + .../invalid/7.6-min-approvals-zero.yaml | 65 + .../invalid/7.6-required-for-invalid-key.yaml | 66 + .../invalid/7.8-unknown-separation-rule.yaml | 68 + ...9-literal-password-in-free-form-value.yaml | 64 + .../invalid/7.9-literal-token-field.yaml | 64 + ...-remote-agent-secret-ref-out-of-scope.yaml | 68 + .../invalid/7.9-secret-ref-empty-scope.yaml | 61 + .../invalid/7.9-secret-ref-out-of-scope.yaml | 63 + .../invalid/7.9-secret-ref-undeclared.yaml | 63 + .../invalid/7.9-secret-without-source.yaml | 62 + .../invalid/8.1-include-without-version.yaml | 66 + .../invalid/8.1-shorthand-not-boolean.yaml | 66 + .../invalid/8.1-unknown-shorthand.yaml | 66 + .../v1alpha4/invalid/8.2-no-allow-effect.yaml | 20 + .../invalid/8.2-policy-without-rules.yaml | 11 + ...8.2-require-approval-without-approval.yaml | 17 + .../invalid/8.2-rule-without-when.yaml | 17 + .../v1alpha4/invalid/8.3-empty-when.yaml | 18 + .../v1alpha4/invalid/8.3-in-not-a-list.yaml | 20 + .../invalid/8.3-invalid-actor-type.yaml | 20 + .../8.3-invalid-classification-value.yaml | 20 + ...ering-operator-on-unordered-attribute.yaml | 20 + .../invalid/8.3-plain-condition-value.yaml | 31 + .../invalid/8.3-unknown-attribute.yaml | 20 + .../v1alpha4/invalid/9.1-digest-mismatch.yaml | 66 + ...pinned-command-image-security-profile.yaml | 69 + ...4-unpinned-mcp-image-security-profile.yaml | 66 + .../valid/10.2-audit-configuration.yaml | 70 + .../valid/10.8-workflow-run-with-status.yaml | 50 + .../v1alpha4/valid/10.8-workflow-run.yaml | 15 + .../valid/3.1-json-serialization.json | 60 + .../v1alpha4/valid/3.1-multi-document.yaml | 81 + .../v1alpha4/valid/3.2-minimal-workflow.yaml | 21 + .../valid/3.2-status-and-store-metadata.yaml | 40 + .../v1alpha4/valid/3.3-core-profile-only.yaml | 24 + .../v1alpha4/valid/3.3-extension-fields.yaml | 75 + conformance/v1alpha4/valid/3.6-durations.yaml | 65 + .../valid/3.9-expression-references.yaml | 63 + .../valid/4-labels-and-annotations.yaml | 67 + ...5.2-schedule-concurrency-and-deadline.yaml | 75 + conformance/v1alpha4/valid/5.2-triggers.yaml | 73 + conformance/v1alpha4/valid/5.3-inputs.yaml | 86 + .../v1alpha4/valid/5.4.2-agent-reference.yaml | 74 + .../v1alpha4/valid/5.4.4-remote-agent.yaml | 79 + .../v1alpha4/valid/5.5.4-action-groups.yaml | 67 + .../valid/5.6.1-when-exists-and-in.yaml | 65 + .../5.6.1-when-json-path-into-output.yaml | 70 + .../valid/5.6.1-when-on-every-step-type.yaml | 96 + .../valid/5.6.2-command-step-env.yaml | 73 + .../5.6.3-transitive-step-reference.yaml | 68 + .../valid/5.6.4-command-step-outputs.yaml | 83 + .../v1alpha4/valid/5.6.5-for-each.yaml | 82 + .../valid/5.6.6-workflow-step-no-wait.yaml | 70 + .../valid/5.6.6-workflow-step-wait.yaml | 79 + .../v1alpha4/valid/5.7-nested-budgets.yaml | 70 + .../v1alpha4/valid/5.8-agent-human-input.yaml | 79 + .../valid/5.8-agent-manifest-human-input.yaml | 39 + .../valid/5.8-input-step-free-text.yaml | 82 + .../v1alpha4/valid/5.8-input-step.yaml | 102 + .../v1alpha4/valid/6-agent-manifest.yaml | 36 + .../v1alpha4/valid/6-agent-prompt-ref.yaml | 20 + .../v1alpha4/valid/7.10-environments.yaml | 74 + .../valid/7.2-data-and-model-policy.yaml | 105 + .../v1alpha4/valid/7.5-permissions.yaml | 80 + ...7.6-approval-and-separation-of-duties.yaml | 89 + .../v1alpha4/valid/8.1-policy-shorthands.yaml | 77 + .../v1alpha4/valid/8.2-policy-manifest.yaml | 31 + .../v1alpha4/valid/8.3-conditions.yaml | 42 + .../9.1-digest-ignores-deployment-fields.yaml | 30 + .../v1alpha4/valid/9.1-digest-verified.yaml | 66 + .../9.4-pinned-images-security-profile.yaml | 73 + schema/README.md | 33 +- spec/v1alpha4/examples/audit-events.yaml | 120 + .../examples/conformance-statement.yaml | 21 + .../examples/eu-data-residency.policy.yaml | 22 + spec/v1alpha4/examples/execution-record.yaml | 53 + .../examples/image-review.workflow.yaml | 87 + .../examples/invoice-extractor.agent.yaml | 36 + .../examples/invoice-processing.workflow.yaml | 208 ++ .../no-production-autonomy.policy.yaml | 31 + .../security-review.a2a.workflow.yaml | 60 + .../examples/vulnerability-fixer.run.yaml | 68 + .../vulnerability-fixer.workflow.yaml | 136 ++ 249 files changed, 17178 insertions(+), 30 deletions(-) create mode 100644 conformance/conditions.mjs create mode 100644 conformance/v1alpha4/index.json create mode 100644 conformance/v1alpha4/invalid/10.2-invalid-integrity-mode.yaml create mode 100644 conformance/v1alpha4/invalid/10.2-invalid-payload.yaml create mode 100644 conformance/v1alpha4/invalid/10.2-invalid-retention.yaml create mode 100644 conformance/v1alpha4/invalid/10.8-workflow-ref-version-not-semver.yaml create mode 100644 conformance/v1alpha4/invalid/10.8-workflow-run-governance-field.yaml create mode 100644 conformance/v1alpha4/invalid/10.8-workflow-run-without-name.yaml create mode 100644 conformance/v1alpha4/invalid/10.8-workflow-run-without-workflow-ref.yaml create mode 100644 conformance/v1alpha4/invalid/3.1-custom-tag.yaml create mode 100644 conformance/v1alpha4/invalid/3.1-non-string-key.yaml create mode 100644 conformance/v1alpha4/invalid/3.1-syntax-error.yaml create mode 100644 conformance/v1alpha4/invalid/3.10-when-forbidden-segment.yaml create mode 100644 conformance/v1alpha4/invalid/3.10-when-not-dependency.yaml create mode 100644 conformance/v1alpha4/invalid/3.10-when-syntax.yaml create mode 100644 conformance/v1alpha4/invalid/3.10-when-too-long.yaml create mode 100644 conformance/v1alpha4/invalid/3.10-when-undeclared-output.yaml create mode 100644 conformance/v1alpha4/invalid/3.10-when-unknown-root.yaml create mode 100644 conformance/v1alpha4/invalid/3.2-missing-api-version.yaml create mode 100644 conformance/v1alpha4/invalid/3.2-missing-metadata.yaml create mode 100644 conformance/v1alpha4/invalid/3.2-missing-spec.yaml create mode 100644 conformance/v1alpha4/invalid/3.2-unsupported-api-version.yaml create mode 100644 conformance/v1alpha4/invalid/3.2-unsupported-kind.yaml create mode 100644 conformance/v1alpha4/invalid/3.3-extension-field-outside-extensions.yaml create mode 100644 conformance/v1alpha4/invalid/3.3-extension-key-without-prefix.yaml create mode 100644 conformance/v1alpha4/invalid/3.3-profile-a2a-agent.yaml create mode 100644 conformance/v1alpha4/invalid/3.3-profile-approval-step.yaml create mode 100644 conformance/v1alpha4/invalid/3.3-profile-audit-field.yaml create mode 100644 conformance/v1alpha4/invalid/3.3-profile-governance-field.yaml create mode 100644 conformance/v1alpha4/invalid/3.3-profile-high-risk.yaml create mode 100644 conformance/v1alpha4/invalid/3.3-profile-interaction-step.yaml create mode 100644 conformance/v1alpha4/invalid/3.3-profile-mcp-field.yaml create mode 100644 conformance/v1alpha4/invalid/3.3-profile-policy-kind.yaml create mode 100644 conformance/v1alpha4/invalid/3.3-profile-security-field.yaml create mode 100644 conformance/v1alpha4/invalid/3.3-unknown-field-near-extension.yaml create mode 100644 conformance/v1alpha4/invalid/3.3-unknown-metadata-field.yaml create mode 100644 conformance/v1alpha4/invalid/3.3-unknown-step-field.yaml create mode 100644 conformance/v1alpha4/invalid/3.3-unknown-top-level-field.yaml create mode 100644 conformance/v1alpha4/invalid/3.4-duplicate-agent-id.yaml create mode 100644 conformance/v1alpha4/invalid/3.4-duplicate-rule-id.yaml create mode 100644 conformance/v1alpha4/invalid/3.4-invalid-metadata-name.yaml create mode 100644 conformance/v1alpha4/invalid/3.4-uppercase-agent-id.yaml create mode 100644 conformance/v1alpha4/invalid/3.4-uppercase-metadata-name.yaml create mode 100644 conformance/v1alpha4/invalid/3.5-version-leading-zero.yaml create mode 100644 conformance/v1alpha4/invalid/3.5-version-not-semver.yaml create mode 100644 conformance/v1alpha4/invalid/3.6-duration-unknown-unit.yaml create mode 100644 conformance/v1alpha4/invalid/3.6-duration-zero.yaml create mode 100644 conformance/v1alpha4/invalid/3.7-date-not-calendar-valid.yaml create mode 100644 conformance/v1alpha4/invalid/3.7-date-wrong-format.yaml create mode 100644 conformance/v1alpha4/invalid/3.8-digest-uppercase-hex.yaml create mode 100644 conformance/v1alpha4/invalid/3.8-digest-wrong-length.yaml create mode 100644 conformance/v1alpha4/invalid/3.9-expression-function.yaml create mode 100644 conformance/v1alpha4/invalid/3.9-expression-in-env-key-ref-bad.yaml create mode 100644 conformance/v1alpha4/invalid/3.9-expression-operator.yaml create mode 100644 conformance/v1alpha4/invalid/3.9-expression-unknown-root.yaml create mode 100644 conformance/v1alpha4/invalid/3.9-expression-unterminated.yaml create mode 100644 conformance/v1alpha4/invalid/3.9-iteration-reference-outside-for-each.yaml create mode 100644 conformance/v1alpha4/invalid/3.9-step-reference-in-permissions.yaml create mode 100644 conformance/v1alpha4/invalid/3.9-step-reference-unknown-step.yaml create mode 100644 conformance/v1alpha4/invalid/3.9-step-reference-without-dependency.yaml create mode 100644 conformance/v1alpha4/invalid/4-governance-field-in-metadata.yaml create mode 100644 conformance/v1alpha4/invalid/4-invalid-label-key.yaml create mode 100644 conformance/v1alpha4/invalid/4-invalid-risk-level.yaml create mode 100644 conformance/v1alpha4/invalid/4-label-value-not-string.yaml create mode 100644 conformance/v1alpha4/invalid/4-label-value-too-long.yaml create mode 100644 conformance/v1alpha4/invalid/4-missing-owner.yaml create mode 100644 conformance/v1alpha4/invalid/4-missing-version.yaml create mode 100644 conformance/v1alpha4/invalid/4-owner-string.yaml create mode 100644 conformance/v1alpha4/invalid/4-owner-without-team.yaml create mode 100644 conformance/v1alpha4/invalid/5.2-concurrency-policy-on-event-trigger.yaml create mode 100644 conformance/v1alpha4/invalid/5.2-cron-not-five-fields.yaml create mode 100644 conformance/v1alpha4/invalid/5.2-event-without-event-type.yaml create mode 100644 conformance/v1alpha4/invalid/5.2-invalid-concurrency-policy.yaml create mode 100644 conformance/v1alpha4/invalid/5.2-schedule-without-cron.yaml create mode 100644 conformance/v1alpha4/invalid/5.2-starting-deadline-not-duration.yaml create mode 100644 conformance/v1alpha4/invalid/5.2-unknown-trigger-type.yaml create mode 100644 conformance/v1alpha4/invalid/5.3-default-wrong-type.yaml create mode 100644 conformance/v1alpha4/invalid/5.3-invalid-pattern.yaml create mode 100644 conformance/v1alpha4/invalid/5.3-required-input-with-default.yaml create mode 100644 conformance/v1alpha4/invalid/5.3-unknown-input-type.yaml create mode 100644 conformance/v1alpha4/invalid/5.4.1-inline-agent-without-model.yaml create mode 100644 conformance/v1alpha4/invalid/5.4.1-instructions-and-prompt-ref.yaml create mode 100644 conformance/v1alpha4/invalid/5.4.2-reference-version-range.yaml create mode 100644 conformance/v1alpha4/invalid/5.4.2-reference-with-instructions.yaml create mode 100644 conformance/v1alpha4/invalid/5.4.2-reference-with-model.yaml create mode 100644 conformance/v1alpha4/invalid/5.4.2-reference-without-version.yaml create mode 100644 conformance/v1alpha4/invalid/5.4.3-invalid-model-approval-status.yaml create mode 100644 conformance/v1alpha4/invalid/5.4.3-model-without-name.yaml create mode 100644 conformance/v1alpha4/invalid/5.4.4-remote-agent-http-endpoint.yaml create mode 100644 conformance/v1alpha4/invalid/5.4.4-remote-agent-with-model.yaml create mode 100644 conformance/v1alpha4/invalid/5.4.4-remote-agent-without-endpoint.yaml create mode 100644 conformance/v1alpha4/invalid/5.4.4-remote-agent-wrong-protocol.yaml create mode 100644 conformance/v1alpha4/invalid/5.5.1-duplicate-server-name.yaml create mode 100644 conformance/v1alpha4/invalid/5.5.1-mcp-url-not-https.yaml create mode 100644 conformance/v1alpha4/invalid/5.5.1-streamable-http-without-url.yaml create mode 100644 conformance/v1alpha4/invalid/5.5.1-unknown-transport.yaml create mode 100644 conformance/v1alpha4/invalid/5.5.2-builtin-tool-source-without-name.yaml create mode 100644 conformance/v1alpha4/invalid/5.5.2-mcp-tool-source-without-server.yaml create mode 100644 conformance/v1alpha4/invalid/5.5.3-invalid-action-identifier-in-permissions.yaml create mode 100644 conformance/v1alpha4/invalid/5.5.3-wildcard-not-final-segment.yaml create mode 100644 conformance/v1alpha4/invalid/5.5.4-group-contains-group.yaml create mode 100644 conformance/v1alpha4/invalid/5.5.4-invalid-group-identifier.yaml create mode 100644 conformance/v1alpha4/invalid/5.6.1-agent-step-with-command.yaml create mode 100644 conformance/v1alpha4/invalid/5.6.1-agent-step-without-agent.yaml create mode 100644 conformance/v1alpha4/invalid/5.6.1-approval-step-required-for.yaml create mode 100644 conformance/v1alpha4/invalid/5.6.1-approval-step-separation-of-duties.yaml create mode 100644 conformance/v1alpha4/invalid/5.6.1-approval-step-without-approval.yaml create mode 100644 conformance/v1alpha4/invalid/5.6.1-command-step-with-agent.yaml create mode 100644 conformance/v1alpha4/invalid/5.6.1-command-step-without-command.yaml create mode 100644 conformance/v1alpha4/invalid/5.6.1-negative-retries.yaml create mode 100644 conformance/v1alpha4/invalid/5.6.1-output-name-with-dot.yaml create mode 100644 conformance/v1alpha4/invalid/5.6.1-retries-exceed-max-retries.yaml create mode 100644 conformance/v1alpha4/invalid/5.6.1-unknown-step-type.yaml create mode 100644 conformance/v1alpha4/invalid/5.6.2-env-key-invalid.yaml create mode 100644 conformance/v1alpha4/invalid/5.6.3-dependency-cycle.yaml create mode 100644 conformance/v1alpha4/invalid/5.6.3-depends-on-unknown-step.yaml create mode 100644 conformance/v1alpha4/invalid/5.6.3-duplicate-step-id.yaml create mode 100644 conformance/v1alpha4/invalid/5.6.3-self-dependency.yaml create mode 100644 conformance/v1alpha4/invalid/5.6.3-undeclared-step-output.yaml create mode 100644 conformance/v1alpha4/invalid/5.6.3-unknown-agent.yaml create mode 100644 conformance/v1alpha4/invalid/5.6.4-reserved-env.yaml create mode 100644 conformance/v1alpha4/invalid/5.6.5-for-each-concurrency-exceeds-budget.yaml create mode 100644 conformance/v1alpha4/invalid/5.6.5-for-each-input-not-array.yaml create mode 100644 conformance/v1alpha4/invalid/5.6.5-for-each-items-not-a-dependency.yaml create mode 100644 conformance/v1alpha4/invalid/5.6.5-for-each-items-not-a-reference.yaml create mode 100644 conformance/v1alpha4/invalid/5.6.5-for-each-missing-max-items.yaml create mode 100644 conformance/v1alpha4/invalid/5.6.5-for-each-on-approval-step.yaml create mode 100644 conformance/v1alpha4/invalid/5.6.6-workflow-inputs-expression.yaml create mode 100644 conformance/v1alpha4/invalid/5.6.6-workflow-ref-not-dns-label.yaml create mode 100644 conformance/v1alpha4/invalid/5.6.6-workflow-step-agent.yaml create mode 100644 conformance/v1alpha4/invalid/5.6.6-workflow-step-for-each.yaml create mode 100644 conformance/v1alpha4/invalid/5.6.6-workflow-step-output.yaml create mode 100644 conformance/v1alpha4/invalid/5.6.6-workflow-step-without-ref.yaml create mode 100644 conformance/v1alpha4/invalid/5.7-negative-cost.yaml create mode 100644 conformance/v1alpha4/invalid/5.7-unknown-budget-field.yaml create mode 100644 conformance/v1alpha4/invalid/5.7-zero-concurrency.yaml create mode 100644 conformance/v1alpha4/invalid/5.7-zero-max-steps.yaml create mode 100644 conformance/v1alpha4/invalid/5.8-agent-invalid-on-timeout.yaml create mode 100644 conformance/v1alpha4/invalid/5.8-answer-field-nested-object.yaml create mode 100644 conformance/v1alpha4/invalid/5.8-default-mismatch.yaml create mode 100644 conformance/v1alpha4/invalid/5.8-input-step-with-agent.yaml create mode 100644 conformance/v1alpha4/invalid/5.8-input-step-without-input.yaml create mode 100644 conformance/v1alpha4/invalid/5.8-input-without-answerers.yaml create mode 100644 conformance/v1alpha4/invalid/5.8-required-unknown-field.yaml create mode 100644 conformance/v1alpha4/invalid/5.8-use-default-without-default.yaml create mode 100644 conformance/v1alpha4/invalid/6-agent-instructions-and-prompt-ref.yaml create mode 100644 conformance/v1alpha4/invalid/6-agent-kind-with-workflow-spec.yaml create mode 100644 conformance/v1alpha4/invalid/6-agent-with-workflow-field.yaml create mode 100644 conformance/v1alpha4/invalid/6-agent-without-model.yaml create mode 100644 conformance/v1alpha4/invalid/7.1-governance-requires-classification.yaml create mode 100644 conformance/v1alpha4/invalid/7.10-environment-without-autonomy.yaml create mode 100644 conformance/v1alpha4/invalid/7.10-invalid-autonomy.yaml create mode 100644 conformance/v1alpha4/invalid/7.2-invalid-classification.yaml create mode 100644 conformance/v1alpha4/invalid/7.2-invalid-external-transfer.yaml create mode 100644 conformance/v1alpha4/invalid/7.4-invalid-model-policy-status.yaml create mode 100644 conformance/v1alpha4/invalid/7.5-allow-not-boolean.yaml create mode 100644 conformance/v1alpha4/invalid/7.5-invalid-default.yaml create mode 100644 conformance/v1alpha4/invalid/7.5-invalid-egress.yaml create mode 100644 conformance/v1alpha4/invalid/7.5-tool-without-allow.yaml create mode 100644 conformance/v1alpha4/invalid/7.6-approver-empty.yaml create mode 100644 conformance/v1alpha4/invalid/7.6-approver-role-and-user.yaml create mode 100644 conformance/v1alpha4/invalid/7.6-invalid-on-timeout.yaml create mode 100644 conformance/v1alpha4/invalid/7.6-min-approvals-zero.yaml create mode 100644 conformance/v1alpha4/invalid/7.6-required-for-invalid-key.yaml create mode 100644 conformance/v1alpha4/invalid/7.8-unknown-separation-rule.yaml create mode 100644 conformance/v1alpha4/invalid/7.9-literal-password-in-free-form-value.yaml create mode 100644 conformance/v1alpha4/invalid/7.9-literal-token-field.yaml create mode 100644 conformance/v1alpha4/invalid/7.9-remote-agent-secret-ref-out-of-scope.yaml create mode 100644 conformance/v1alpha4/invalid/7.9-secret-ref-empty-scope.yaml create mode 100644 conformance/v1alpha4/invalid/7.9-secret-ref-out-of-scope.yaml create mode 100644 conformance/v1alpha4/invalid/7.9-secret-ref-undeclared.yaml create mode 100644 conformance/v1alpha4/invalid/7.9-secret-without-source.yaml create mode 100644 conformance/v1alpha4/invalid/8.1-include-without-version.yaml create mode 100644 conformance/v1alpha4/invalid/8.1-shorthand-not-boolean.yaml create mode 100644 conformance/v1alpha4/invalid/8.1-unknown-shorthand.yaml create mode 100644 conformance/v1alpha4/invalid/8.2-no-allow-effect.yaml create mode 100644 conformance/v1alpha4/invalid/8.2-policy-without-rules.yaml create mode 100644 conformance/v1alpha4/invalid/8.2-require-approval-without-approval.yaml create mode 100644 conformance/v1alpha4/invalid/8.2-rule-without-when.yaml create mode 100644 conformance/v1alpha4/invalid/8.3-empty-when.yaml create mode 100644 conformance/v1alpha4/invalid/8.3-in-not-a-list.yaml create mode 100644 conformance/v1alpha4/invalid/8.3-invalid-actor-type.yaml create mode 100644 conformance/v1alpha4/invalid/8.3-invalid-classification-value.yaml create mode 100644 conformance/v1alpha4/invalid/8.3-ordering-operator-on-unordered-attribute.yaml create mode 100644 conformance/v1alpha4/invalid/8.3-plain-condition-value.yaml create mode 100644 conformance/v1alpha4/invalid/8.3-unknown-attribute.yaml create mode 100644 conformance/v1alpha4/invalid/9.1-digest-mismatch.yaml create mode 100644 conformance/v1alpha4/invalid/9.4-unpinned-command-image-security-profile.yaml create mode 100644 conformance/v1alpha4/invalid/9.4-unpinned-mcp-image-security-profile.yaml create mode 100644 conformance/v1alpha4/valid/10.2-audit-configuration.yaml create mode 100644 conformance/v1alpha4/valid/10.8-workflow-run-with-status.yaml create mode 100644 conformance/v1alpha4/valid/10.8-workflow-run.yaml create mode 100644 conformance/v1alpha4/valid/3.1-json-serialization.json create mode 100644 conformance/v1alpha4/valid/3.1-multi-document.yaml create mode 100644 conformance/v1alpha4/valid/3.2-minimal-workflow.yaml create mode 100644 conformance/v1alpha4/valid/3.2-status-and-store-metadata.yaml create mode 100644 conformance/v1alpha4/valid/3.3-core-profile-only.yaml create mode 100644 conformance/v1alpha4/valid/3.3-extension-fields.yaml create mode 100644 conformance/v1alpha4/valid/3.6-durations.yaml create mode 100644 conformance/v1alpha4/valid/3.9-expression-references.yaml create mode 100644 conformance/v1alpha4/valid/4-labels-and-annotations.yaml create mode 100644 conformance/v1alpha4/valid/5.2-schedule-concurrency-and-deadline.yaml create mode 100644 conformance/v1alpha4/valid/5.2-triggers.yaml create mode 100644 conformance/v1alpha4/valid/5.3-inputs.yaml create mode 100644 conformance/v1alpha4/valid/5.4.2-agent-reference.yaml create mode 100644 conformance/v1alpha4/valid/5.4.4-remote-agent.yaml create mode 100644 conformance/v1alpha4/valid/5.5.4-action-groups.yaml create mode 100644 conformance/v1alpha4/valid/5.6.1-when-exists-and-in.yaml create mode 100644 conformance/v1alpha4/valid/5.6.1-when-json-path-into-output.yaml create mode 100644 conformance/v1alpha4/valid/5.6.1-when-on-every-step-type.yaml create mode 100644 conformance/v1alpha4/valid/5.6.2-command-step-env.yaml create mode 100644 conformance/v1alpha4/valid/5.6.3-transitive-step-reference.yaml create mode 100644 conformance/v1alpha4/valid/5.6.4-command-step-outputs.yaml create mode 100644 conformance/v1alpha4/valid/5.6.5-for-each.yaml create mode 100644 conformance/v1alpha4/valid/5.6.6-workflow-step-no-wait.yaml create mode 100644 conformance/v1alpha4/valid/5.6.6-workflow-step-wait.yaml create mode 100644 conformance/v1alpha4/valid/5.7-nested-budgets.yaml create mode 100644 conformance/v1alpha4/valid/5.8-agent-human-input.yaml create mode 100644 conformance/v1alpha4/valid/5.8-agent-manifest-human-input.yaml create mode 100644 conformance/v1alpha4/valid/5.8-input-step-free-text.yaml create mode 100644 conformance/v1alpha4/valid/5.8-input-step.yaml create mode 100644 conformance/v1alpha4/valid/6-agent-manifest.yaml create mode 100644 conformance/v1alpha4/valid/6-agent-prompt-ref.yaml create mode 100644 conformance/v1alpha4/valid/7.10-environments.yaml create mode 100644 conformance/v1alpha4/valid/7.2-data-and-model-policy.yaml create mode 100644 conformance/v1alpha4/valid/7.5-permissions.yaml create mode 100644 conformance/v1alpha4/valid/7.6-approval-and-separation-of-duties.yaml create mode 100644 conformance/v1alpha4/valid/8.1-policy-shorthands.yaml create mode 100644 conformance/v1alpha4/valid/8.2-policy-manifest.yaml create mode 100644 conformance/v1alpha4/valid/8.3-conditions.yaml create mode 100644 conformance/v1alpha4/valid/9.1-digest-ignores-deployment-fields.yaml create mode 100644 conformance/v1alpha4/valid/9.1-digest-verified.yaml create mode 100644 conformance/v1alpha4/valid/9.4-pinned-images-security-profile.yaml create mode 100644 spec/v1alpha4/examples/audit-events.yaml create mode 100644 spec/v1alpha4/examples/conformance-statement.yaml create mode 100644 spec/v1alpha4/examples/eu-data-residency.policy.yaml create mode 100644 spec/v1alpha4/examples/execution-record.yaml create mode 100644 spec/v1alpha4/examples/image-review.workflow.yaml create mode 100644 spec/v1alpha4/examples/invoice-extractor.agent.yaml create mode 100644 spec/v1alpha4/examples/invoice-processing.workflow.yaml create mode 100644 spec/v1alpha4/examples/no-production-autonomy.policy.yaml create mode 100644 spec/v1alpha4/examples/security-review.a2a.workflow.yaml create mode 100644 spec/v1alpha4/examples/vulnerability-fixer.run.yaml create mode 100644 spec/v1alpha4/examples/vulnerability-fixer.workflow.yaml diff --git a/conformance/README.md b/conformance/README.md index f73a2b7..bccf145 100644 --- a/conformance/README.md +++ b/conformance/README.md @@ -1,7 +1,8 @@ -# AWP conformance material (v1alpha1, v1alpha2, v1alpha3) +# AWP conformance material (v1alpha1 to v1alpha4) This directory contains the first machine-readable conformance material for [AWP v1alpha1](../spec/v1alpha1/README.md), [v1alpha2](../spec/v1alpha2/README.md) and the working draft -[v1alpha3](../spec/v1alpha3/README.md): manifests that a validator must accept or reject, an +[v1alpha3](../spec/v1alpha3/README.md), plus the next draft `v1alpha4` (schema, examples and suite; +the specification text follows): manifests that a validator must accept or reject, an index describing the expected result, and a small reference checker. It tests **validators** (spec 11.1) and manifest rules. It is not a runtime test suite (spec 11.3 still describes conformance statements as self-declarations). @@ -15,8 +16,10 @@ conformance statements as self-declarations). | `semantic.mjs` | The semantic rules ([catalogue](../schema/README.md#semantic-validation-rules)). | | `v1alpha2/` | The suite for `v1alpha2`: the `v1alpha1` cases with apiVersion `v1alpha2`, plus the cases for step iteration (`5.6.4-...`, `3.9-iteration-...`). | | `v1alpha3/` | The suite for `v1alpha3`, with the same layout (`valid/`, `invalid/`, `index.json`). Derived from the `v1alpha1` suite with `migrate.mjs`, plus cases for the document model of `v1alpha3`. | It also has the step iteration cases (`5.6.5-...`). -| `migrate.mjs` | Mechanical migration of a `v1alpha1` manifest to `v1alpha3` (spec v1alpha3 section 14.1). | -| `crd.mjs` | Generates the Kubernetes CustomResourceDefinitions in `schema/crd/` from `schema/awp.v1alpha3.json` and checks that they are current. | +| `v1alpha4/` | The suite for `v1alpha4`: the `v1alpha3` cases with apiVersion `v1alpha4` (digest cases recomputed), plus the cases for step conditions (`3.10-when-...`, `5.6.1-when-...`) and workflow steps (`5.6.6-...`). | +| `conditions.mjs` | Parser and static rules of step conditions (`when`, v1alpha4 spec 3.10), used by `semantic.mjs`. | +| `migrate.mjs` | Mechanical migration of a `v1alpha1`, `v1alpha2` or `v1alpha3` manifest to `v1alpha4` (from `v1alpha3` only `apiVersion` changes). | +| `crd.mjs` | Generates the Kubernetes CustomResourceDefinitions in `schema/crd/` from `schema/awp.v1alpha3.json` and `schema/awp.v1alpha4.json` and checks that they are current. | ## Run @@ -27,7 +30,7 @@ npm test # node conformance/awp-check.mjs run `npm test` validates every case of every suite, checks that every file in `valid/` and `invalid/` is indexed, validates the manifest examples of the specification (`spec//examples/`), -checks that the examples and the valid cases of `v1alpha1` and `v1alpha2` still validate after +checks that the examples and the valid cases of `v1alpha1`, `v1alpha2` and `v1alpha3` still validate after `migrate` (`migrate:` cases, so older versions stay convertible; digests are not verified there) and checks that the generated CustomResourceDefinitions are current. The checker selects the schema by `apiVersion`. It prints `PASS`/`FAIL` per case and exits with `1` if anything fails. @@ -39,10 +42,10 @@ Check single files: node conformance/awp-check.mjs check [--profiles core,mcp] [--verify-digest] [--json] manifest.yaml ``` -Migrate a `v1alpha1` file to `v1alpha3` (YAML on stdout, review notes on stderr): +Migrate a `v1alpha1`, `v1alpha2` or `v1alpha3` file to `v1alpha4` (YAML on stdout, review notes on stderr): ```sh -node conformance/awp-check.mjs migrate manifest.yaml > manifest.v1alpha3.yaml +node conformance/awp-check.mjs migrate manifest.yaml > manifest.v1alpha4.yaml ``` ## Index format diff --git a/conformance/awp-check.mjs b/conformance/awp-check.mjs index de4d23c..ae57c71 100644 --- a/conformance/awp-check.mjs +++ b/conformance/awp-check.mjs @@ -1,9 +1,9 @@ #!/usr/bin/env node -// Reference checker for AWP manifests (v1alpha1, v1alpha2, v1alpha3) and the conformance suites. +// Reference checker for AWP manifests (v1alpha1 to v1alpha4) and the conformance suites. // // node conformance/awp-check.mjs check [--profiles core,governance] [--verify-digest] [--json] // node conformance/awp-check.mjs run [--json] -// node conformance/awp-check.mjs migrate (v1alpha1 or v1alpha2 -> v1alpha3, YAML on stdout) +// node conformance/awp-check.mjs migrate (v1alpha1, v1alpha2 or v1alpha3 -> v1alpha4, YAML on stdout) // // Layers: yaml (spec 3.1) -> schema (schema/awp..json, chosen by apiVersion) // -> semantic (conformance/semantic.mjs). @@ -15,13 +15,13 @@ import { fileURLToPath } from 'node:url'; import Ajv2020 from 'ajv/dist/2020.js'; import { parseAllDocuments, stringify, visit, isScalar, isCollection, LineCounter } from 'yaml'; import { semanticCheck, KNOWN_PROFILES } from './semantic.mjs'; -import { migrateToV1alpha3 } from './migrate.mjs'; +import { migrateToV1alpha4 } from './migrate.mjs'; import { checkCrds } from './crd.mjs'; const here = path.dirname(fileURLToPath(import.meta.url)); const root = path.resolve(here, '..'); const API_GROUP = 'awp.agenticworkflowprotocol.org'; -const VERSIONS = ['v1alpha1', 'v1alpha2', 'v1alpha3']; +const VERSIONS = ['v1alpha1', 'v1alpha2', 'v1alpha3', 'v1alpha4']; const ajv = new Ajv2020({ allErrors: true, strict: true, strictRequired: false }); const validators = new Map(VERSIONS.map(v => [ @@ -173,14 +173,14 @@ function runVersion(version) { } // Older versions stay convertible: the manifest examples of every version that `migrate` converts -// from must validate after migration to its target version (spec v1alpha3 section 14). -const MIGRATION_TARGET = 'v1alpha3'; +// from must validate after migration to its target version (spec v1alpha4 section 14). +const MIGRATION_TARGET = 'v1alpha4'; /** Migrates every manifest of a file and validates the result as MIGRATION_TARGET. */ function migratedResult({ id, file, profiles }) { const loaded = loadManifests(fs.readFileSync(path.join(root, file), 'utf8')); if (loaded.some(l => l.value === undefined)) return { id, file, section: '14', expect: 'valid', ok: false, detail: 'not a valid YAML manifest file' }; - const docs = loaded.map(({ value }) => stringify(migrateToV1alpha3(value).document, { lineWidth: 0 })); + const docs = loaded.map(({ value }) => stringify(migrateToV1alpha4(value).document, { lineWidth: 0 })); // Digests are not verified: migration changes the digest input, `migrate` asks to recompute it. const errs = errorsOf(validateText(docs.join('---\n'), file, { profiles })); return { id, file, section: '14', expect: 'valid', ok: errs.length === 0, detail: errs[0] ? formatDiag(errs[0]) : '' }; @@ -211,7 +211,7 @@ function runSuite({ json }) { const results = [ ...runs.flatMap(r => r.results), ...migratedExampleResults(), - { id: 'crd:v1alpha3', file: 'schema/crd', section: '3.10', expect: 'fresh', ok: crdProblems.length === 0, detail: crdProblems.join('; ') }, + { id: 'crd:v1alpha3,v1alpha4', file: 'schema/crd', section: '3.10', expect: 'fresh', ok: crdProblems.length === 0, detail: crdProblems.join('; ') }, ]; const failed = results.filter(r => !r.ok); if (json) { @@ -224,7 +224,7 @@ function runSuite({ json }) { return failed.length === 0 ? 0 : 1; } -/** Print the v1alpha3 form of every manifest in a v1alpha1 or v1alpha2 file; review notes go to stderr. */ +/** Print the v1alpha4 form of every manifest in a v1alpha1, v1alpha2 or v1alpha3 file; review notes go to stderr. */ function migrateFile(file) { const text = fs.readFileSync(file, 'utf8'); const header = text.match(/^(#[^\n]*\n)*/)[0]; @@ -234,7 +234,7 @@ function migrateFile(file) { return 1; } const docs = loaded.map(({ value }) => { - const { document, notes } = migrateToV1alpha3(value); + const { document, notes } = migrateToV1alpha4(value); for (const n of notes) console.error(`${file}: ${n}`); if (document.spec.integrity) console.error(`${file}: spec.integrity.digest must be recomputed (spec 9.1)`); return stringify(document, { lineWidth: 0 }); diff --git a/conformance/conditions.mjs b/conformance/conditions.mjs new file mode 100644 index 0000000..1a68fad --- /dev/null +++ b/conformance/conditions.mjs @@ -0,0 +1,241 @@ +// Static checks of step conditions (`when`, v1alpha4 spec 3.10): tokenizer and parser of the +// restricted condition grammar with its limits. Evaluation is the runtime's job; this module only +// decides whether a condition is well-formed and which paths it reads. +// +// parseCondition(text) -> { ok: true, paths } | { ok: false, code, message } +// +// `paths` lists every path the condition reads: { root: 'inputs' | 'steps' | 'execution', +// name, stepId?, segments }. + +export const CONDITION_LIMITS = Object.freeze({ + maxLength: 512, + maxTokens: 128, + maxDepth: 16, + maxPathSegments: 16, + maxListItems: 32, + maxStringLength: 256, + maxIndex: 10000, +}); + +const FORBIDDEN_SEGMENTS = new Set(['__proto__', 'prototype', 'constructor']); +const COMPARISON_OPERATORS = new Set(['==', '!=', '<', '<=', '>', '>=', 'in']); +const KEYWORDS = new Set(['true', 'false', 'null', 'in', 'exists']); +const PUNCTUATION = ['&&', '||', '==', '!=', '<=', '>=', '<', '>', '!', '(', ')', '[', ']', ',', '.']; +const NUMBER_RE = /^-?(0|[1-9]\d*)(\.\d+)?([eE][+-]?\d+)?/; +const NAME_RE = /^[A-Za-z_][A-Za-z0-9_-]*/; +const STRING_RE = /^"(?:[^"\\\u0000-\u001f]|\\(?:["\\/bfnrt]|u[0-9a-fA-F]{4}))*"/; + +class ConditionError extends Error { + constructor(code, message) { + super(message); + this.code = code; + } +} + +const syntaxError = message => new ConditionError('when.syntax', message); +const limitError = message => new ConditionError('when.limit-exceeded', message); + +function readToken(text, pos) { + const rest = text.slice(pos); + let m; + if ((m = STRING_RE.exec(rest))) { + const value = JSON.parse(m[0]); + if (value.length > CONDITION_LIMITS.maxStringLength) throw limitError(`string literal longer than ${CONDITION_LIMITS.maxStringLength} characters`); + return { kind: 'string', value, length: m[0].length }; + } + if (rest[0] === '"') throw syntaxError(`unterminated or invalid string at offset ${pos}`); + if ((m = NUMBER_RE.exec(rest))) return { kind: 'number', value: Number(m[0]), text: m[0], length: m[0].length }; + if ((m = NAME_RE.exec(rest))) return { kind: KEYWORDS.has(m[0]) ? m[0] : 'name', value: m[0], length: m[0].length }; + const punct = PUNCTUATION.find(p => rest.startsWith(p)); + if (punct) return { kind: punct, value: punct, length: punct.length }; + throw syntaxError(`unexpected character "${rest[0]}" at offset ${pos}`); +} + +/** Splits a condition into tokens; throws ConditionError. */ +export function tokenize(text) { + const tokens = []; + let pos = 0; + while (pos < text.length) { + if (/\s/.test(text[pos])) { pos++; continue; } + const token = readToken(text, pos); + tokens.push({ ...token, pos }); + pos += token.length; + if (tokens.length > CONDITION_LIMITS.maxTokens) throw limitError(`more than ${CONDITION_LIMITS.maxTokens} tokens`); + } + return tokens; +} + +/** Recursive descent parser over the token list; collects the paths the condition reads. */ +class Parser { + constructor(tokens) { + this.tokens = tokens; + this.index = 0; + this.depth = 0; + this.paths = []; + } + + peek() { return this.tokens[this.index]; } + + next() { return this.tokens[this.index++]; } + + expect(kind) { + const token = this.next(); + if (token?.kind !== kind) throw syntaxError(`expected "${kind}" ${token ? `at offset ${token.pos}` : 'at the end'}`); + return token; + } + + accept(kind) { + if (this.peek()?.kind !== kind) return false; + this.index++; + return true; + } + + nested(parse) { + if (++this.depth > CONDITION_LIMITS.maxDepth) throw limitError(`nesting deeper than ${CONDITION_LIMITS.maxDepth}`); + parse(); + this.depth--; + } + + parseCondition() { + if (this.tokens.length === 0) throw syntaxError('empty condition'); + this.parseOr(); + const rest = this.peek(); + if (rest) throw syntaxError(`unexpected "${rest.value}" at offset ${rest.pos}`); + } + + parseOr() { + this.parseAnd(); + while (this.accept('||')) this.parseAnd(); + } + + parseAnd() { + this.parseUnary(); + while (this.accept('&&')) this.parseUnary(); + } + + parseUnary() { + if (this.accept('!')) return this.nested(() => this.parseUnary()); + this.parseOperand(); + if (COMPARISON_OPERATORS.has(this.peek()?.kind)) { + this.next(); + this.parseOperand(); + } + } + + parseOperand() { + const token = this.peek(); + if (!token) throw syntaxError('unexpected end of condition'); + if (['string', 'number', 'true', 'false', 'null'].includes(token.kind)) return this.next(); + if (token.kind === '[') return this.parseList(); + if (token.kind === '(') return this.parseGroup(); + if (token.kind === 'exists') return this.parseExists(); + if (token.kind === 'name') return this.parsePath(); + throw syntaxError(`unexpected "${token.value}" at offset ${token.pos}`); + } + + parseGroup() { + this.expect('('); + this.nested(() => this.parseOr()); + this.expect(')'); + } + + parseExists() { + this.expect('exists'); + this.expect('('); + this.parsePath(); + this.expect(')'); + } + + parseList() { + this.expect('['); + let items = 0; + if (!this.accept(']')) { + do { + const token = this.next(); + if (!['string', 'number', 'true', 'false', 'null'].includes(token?.kind)) throw syntaxError('list items MUST be literals'); + if (++items > CONDITION_LIMITS.maxListItems) throw limitError(`list with more than ${CONDITION_LIMITS.maxListItems} items`); + } while (this.accept(',')); + this.expect(']'); + } + } + + /** A name after "." may also be a keyword (for example an output named `in`). */ + parseName() { + const token = this.next(); + if (token?.kind !== 'name' && !KEYWORDS.has(token?.kind)) throw syntaxError(`expected a name ${token ? `at offset ${token.pos}` : 'at the end'}`); + if (FORBIDDEN_SEGMENTS.has(token.value)) throw new ConditionError('when.forbidden-segment', `path segment "${token.value}" is not allowed`); + return token.value; + } + + parseDotName() { + this.expect('.'); + return this.parseName(); + } + + parseRoot() { + const root = this.parseName(); + if (root === 'inputs') return { root, name: this.parseDotName() }; + if (root === 'execution') { + const name = this.parseDotName(); + if (name !== 'environment') throw new ConditionError('when.unknown-root', `execution.${name} is not readable in conditions; only execution.environment is`); + return { root, name }; + } + if (root === 'steps') { + const stepId = this.parseDotName(); + if (this.parseDotName() !== 'outputs') throw syntaxError(`expected steps.${stepId}.outputs.`); + return { root, stepId, name: this.parseDotName() }; + } + throw new ConditionError('when.unknown-root', `unknown root "${root}"; conditions read inputs, steps..outputs and execution.environment`); + } + + parsePath() { + const path = { ...this.parseRoot(), segments: [] }; + while (['.', '['].includes(this.peek()?.kind)) { + path.segments.push(this.accept('.') ? this.parseName() : this.parseIndex()); + if (path.segments.length > CONDITION_LIMITS.maxPathSegments) throw limitError(`path with more than ${CONDITION_LIMITS.maxPathSegments} segments`); + } + this.paths.push(path); + } + + parseIndex() { + this.expect('['); + const token = this.expect('number'); + if (!/^(0|[1-9]\d*)$/.test(token.text)) throw syntaxError(`index "${token.text}" is not a non-negative integer`); + if (token.value > CONDITION_LIMITS.maxIndex) throw limitError(`index greater than ${CONDITION_LIMITS.maxIndex}`); + this.expect(']'); + return token.value; + } +} + +/** Parses a condition. Returns { ok: true, paths } or { ok: false, code, message }. */ +export function parseCondition(text) { + try { + if (text.length > CONDITION_LIMITS.maxLength) throw limitError(`condition longer than ${CONDITION_LIMITS.maxLength} characters`); + const parser = new Parser(tokenize(text)); + parser.parseCondition(); + return { ok: true, paths: parser.paths }; + } catch (e) { + if (!(e instanceof ConditionError)) throw e; + return { ok: false, code: e.code, message: e.message }; + } +} + +/** + * Static rules of a step's `when` (v1alpha4 spec 3.10): it parses, steps. is a direct or + * transitive dependency with a declared output , and inputs. is declared (warning). + * @param {{text: string, path: string, stepId: string, stepIds: Map, dependencies: Set, + * outputsOf: Map>, inputNames: Set, err: Function, warn: Function}} c + */ +export function checkStepCondition(c) { + const parsed = parseCondition(c.text); + if (!parsed.ok) return c.err(parsed.code, '3.10', c.path, `when: ${parsed.message}`); + for (const p of parsed.paths) { + if (p.root === 'inputs' && !c.inputNames.has(p.name)) { + c.warn('when.undeclared-input', '3.10', c.path, `condition reads undeclared input "${p.name}"`); + } + if (p.root !== 'steps') continue; + if (!c.stepIds.has(p.stepId)) c.err('when.unknown-step', '3.10', c.path, `condition reads non-existent step "${p.stepId}"`); + else if (!c.dependencies.has(p.stepId)) c.err('when.not-a-dependency', '3.10', c.path, `step "${c.stepId}" reads steps.${p.stepId} in when but does not depend on it (directly or transitively)`); + else if (!c.outputsOf.get(p.stepId).has(p.name)) c.err('when.undeclared-output', '3.10', c.path, `step "${p.stepId}" does not declare output "${p.name}"`); + } +} diff --git a/conformance/migrate.mjs b/conformance/migrate.mjs index 4cc675b..5586eff 100644 --- a/conformance/migrate.mjs +++ b/conformance/migrate.mjs @@ -1,10 +1,12 @@ -// Migration of AWP manifests from v1alpha1 or v1alpha2 to v1alpha3 (Kubernetes resource model -// alignment). v1alpha2 has the layout of v1alpha1 plus forEach, which carries over unchanged. +// Migration of AWP manifests to v1alpha4. v1alpha1 and v1alpha2 first move to the Kubernetes +// resource model of v1alpha3 (v1alpha2 has the layout of v1alpha1 plus forEach, which carries over +// unchanged). v1alpha4 only adds fields to v1alpha3, so from v1alpha3 only apiVersion changes. // Pure function on parsed documents; the CLI wrapper is `awp-check.mjs migrate`. const V1ALPHA1 = 'awp.agenticworkflowprotocol.org/v1alpha1'; const V1ALPHA2 = 'awp.agenticworkflowprotocol.org/v1alpha2'; const V1ALPHA3 = 'awp.agenticworkflowprotocol.org/v1alpha3'; +const V1ALPHA4 = 'awp.agenticworkflowprotocol.org/v1alpha4'; // Fields that leave metadata, in the order they are placed at the start of spec. const GOVERNANCE_FIELDS = ['version', 'description', 'owner', 'classification', 'purpose', 'risk', 'integrity', 'signature', 'provenance']; @@ -72,3 +74,15 @@ export function migrateToV1alpha3(doc) { return { document: { apiVersion: V1ALPHA3, kind: lifted.kind, metadata, spec }, notes }; } + +/** + * Migrate one parsed v1alpha1, v1alpha2 or v1alpha3 manifest to v1alpha4. Returns { document, notes } + * like migrateToV1alpha3. + */ +export function migrateToV1alpha4(doc) { + if (!isObj(doc) || ![V1ALPHA1, V1ALPHA2, V1ALPHA3].includes(doc.apiVersion)) { + throw new Error(`expected apiVersion ${V1ALPHA1}, ${V1ALPHA2} or ${V1ALPHA3}`); + } + const { document, notes } = doc.apiVersion === V1ALPHA3 ? { document: structuredClone(doc), notes: [] } : migrateToV1alpha3(doc); + return { document: { ...document, apiVersion: V1ALPHA4 }, notes }; +} diff --git a/conformance/semantic.mjs b/conformance/semantic.mjs index 71142b2..bec4ac5 100644 --- a/conformance/semantic.mjs +++ b/conformance/semantic.mjs @@ -1,13 +1,15 @@ -// Semantic validation rules of AWP v1alpha1, v1alpha2 and v1alpha3 that JSON Schema cannot express. +// Semantic validation rules of AWP v1alpha1 to v1alpha4 that JSON Schema cannot express. // v1alpha2 adds step iteration (forEach). v1alpha3 also has forEach and differs otherwise only in // layout: governance fields live in spec instead of metadata, extension fields in `extensions` -// objects instead of x- keys, and `status` is ignored. +// objects instead of x- keys, and `status` is ignored. v1alpha4 has the layout of v1alpha3 plus +// step conditions (`when`, conformance/conditions.mjs) and workflow steps. // Rule catalogue: schema/README.md. Every diagnostic has a stable `code`. // Runs on documents that already passed the structural schema of their apiVersion; fields that // only exist in v1alpha2 (forEach) cannot reach these rules in a v1alpha1 document. import { createHash } from 'node:crypto'; import { checkInputStep } from './human-input.mjs'; +import { checkStepCondition } from './conditions.mjs'; export const KNOWN_PROFILES = ['core', 'governance', 'audit', 'security', 'mcp', 'a2a', 'interaction']; @@ -19,11 +21,16 @@ const ptr = (...parts) => parts.map(p => '/' + esc(p)).join(''); const isObj = v => v !== null && typeof v === 'object' && !Array.isArray(v); const V1ALPHA3 = 'awp.agenticworkflowprotocol.org/v1alpha3'; +const V1ALPHA4 = 'awp.agenticworkflowprotocol.org/v1alpha4'; +// Versions with the Kubernetes resource model layout (governance fields in spec). +const KRM_VERSIONS = new Set([V1ALPHA3, V1ALPHA4]); +// The runtime provides exactly these outputs of a workflow step (v1alpha4 spec 5.6.6). +const WORKFLOW_STEP_OUTPUTS = new Set(['executionId', 'status']); const INTEGRITY_FIELDS = ['integrity', 'signature', 'provenance']; /** Where the governance fields (version, owner, classification, risk, integrity, ...) live. */ function governanceOf(doc) { - return doc.apiVersion === V1ALPHA3 + return KRM_VERSIONS.has(doc.apiVersion) ? { fields: doc.spec ?? {}, base: 'spec' } : { fields: doc.metadata ?? {}, base: 'metadata' }; } @@ -38,12 +45,12 @@ export function jcs(value) { /** The value the digest is computed over (spec 9.1). */ function digestInput(doc) { - if (doc.apiVersion !== V1ALPHA3) { + if (!KRM_VERSIONS.has(doc.apiVersion)) { const copy = structuredClone(doc); if (copy.metadata) for (const f of INTEGRITY_FIELDS) delete copy.metadata[f]; return copy; } - // v1alpha3: identity and spec only. Labels, annotations, namespace, store-populated metadata and + // v1alpha3 and later: identity and spec only. Labels, annotations, namespace, store-populated metadata and // status are changed by deployment tools and object stores, so they are not covered. const spec = structuredClone(doc.spec ?? {}); for (const f of INTEGRITY_FIELDS) delete spec[f]; @@ -75,6 +82,15 @@ function forEachNode(node, fn, path = []) { } } +/** 5.6.6 (v1alpha4): a workflow step declares no outputs other than executionId and status. */ +function checkWorkflowStepOutputs(step, base, err) { + (step.outputs ?? []).forEach((o, j) => { + if (!WORKFLOW_STEP_OUTPUTS.has(o.name)) { + err('step.workflow-output', '5.6.6', ptr(...base, 'outputs', j, 'name'), `a workflow step provides only the outputs executionId and status, not "${o.name}"`); + } + }); +} + /** * @param {object} doc parsed manifest * @param {{profiles?: string[], verifyDigest?: boolean}} opts @@ -260,8 +276,8 @@ export function semanticCheck(doc, opts = {}) { needProfile('interaction', 'step with type: input', ptr('spec', 'workflow', i), '3.3'); checkInputStep(s.input, ['spec', 'workflow', i, 'input'], err, ptr); } - // 5.6.4 (v1alpha3 only): the runtime owns AWP_* variables of command steps - for (const k of doc.apiVersion === V1ALPHA3 ? Object.keys(s.env ?? {}) : []) { + // 5.6.4 (v1alpha3 and later): the runtime owns AWP_* variables of command steps + for (const k of KRM_VERSIONS.has(doc.apiVersion) ? Object.keys(s.env ?? {}) : []) { if (k.startsWith('AWP_')) err('step.reserved-env', '5.6.4', ptr('spec', 'workflow', i, 'env', k), `environment variable "${k}" is reserved for the runtime (AWP_ prefix)`); } if (profiles.has('security') && s.type === 'command' && typeof s.image === 'string' && !/@(sha256:[0-9a-f]{64}|sha384:[0-9a-f]{96}|sha512:[0-9a-f]{128})$/.test(s.image)) { @@ -321,7 +337,7 @@ export function semanticCheck(doc, opts = {}) { // 5.6.4: iteration (v1alpha2) const inputTypes = new Map((spec.inputs ?? []).map(i => [i.name, i.type])); const agentsById = new Map((spec.agents ?? []).map(a => [a.id, a])); - const iterationSection = doc.apiVersion === V1ALPHA3 ? '5.6.5' : '5.6.4'; + const iterationSection = KRM_VERSIONS.has(doc.apiVersion) ? '5.6.5' : '5.6.4'; const checkForEach = (s, base) => { const f = s.forEach; checkExpr(f.items, ptr(...base, 'forEach', 'items'), s.id); @@ -344,6 +360,11 @@ export function semanticCheck(doc, opts = {}) { for (const [k, v] of Object.entries(s.env ?? {})) checkExpr(v, ptr(...base, 'env', k), s.id, iterating); checkExpr(s.approval?.message, ptr(...base, 'approval', 'message'), s.id); checkExpr(s.input?.message, ptr(...base, 'input', 'message'), s.id); + for (const [k, v] of Object.entries(s.workflow?.inputs ?? {})) checkExpr(v, ptr(...base, 'workflow', 'inputs', k), s.id); + if (typeof s.when === 'string') { + checkStepCondition({ text: s.when, path: ptr(...base, 'when'), stepId: s.id, stepIds, dependencies: closure(s.id), outputsOf, inputNames, err, warn }); + } + if (s.type === 'workflow') checkWorkflowStepOutputs(s, base, err); if (typeof s.command === 'string' && s.command.includes('${{')) { warn('lint.command-expression', '5.6.2', ptr(...base, 'command'), 'command is not expression-enabled; ${{ }} is passed literally. Use env.'); } diff --git a/conformance/v1alpha4/index.json b/conformance/v1alpha4/index.json new file mode 100644 index 0000000..3bfc560 --- /dev/null +++ b/conformance/v1alpha4/index.json @@ -0,0 +1,2094 @@ +{ + "$comment": "Machine-readable index of the AWP v1alpha4 conformance suite. Each invalid case violates exactly one rule; `code` and `path` identify the expected diagnostic (see schema/README.md).", + "suite": "awp-conformance", + "version": "0.1.0", + "awp": "v1alpha4", + "defaults": { + "profiles": [ + "core", + "governance", + "audit", + "security", + "mcp", + "a2a", + "interaction" + ], + "verifyDigest": false + }, + "nonManifestExamples": [ + "audit-events.yaml", + "conformance-statement.yaml", + "execution-record.yaml" + ], + "tests": [ + { + "id": "3.1-custom-tag", + "file": "invalid/3.1-custom-tag.yaml", + "section": "3.1", + "rule": "YAML features without a JSON equivalent (custom tags) MUST be rejected.", + "expect": "invalid", + "code": "yaml.custom-tag", + "path": "" + }, + { + "id": "3.1-non-string-key", + "file": "invalid/3.1-non-string-key.yaml", + "section": "3.1", + "rule": "YAML mapping keys MUST be strings.", + "expect": "invalid", + "code": "yaml.non-string-key", + "path": "" + }, + { + "id": "3.1-syntax-error", + "file": "invalid/3.1-syntax-error.yaml", + "section": "3.1", + "rule": "A document that is not well-formed YAML is rejected.", + "expect": "invalid", + "code": "yaml.parse-error", + "path": "" + }, + { + "id": "3.2-missing-api-version", + "file": "invalid/3.2-missing-api-version.yaml", + "section": "3.2", + "rule": "apiVersion is REQUIRED.", + "expect": "invalid", + "code": "schema.required", + "path": "" + }, + { + "id": "3.2-missing-metadata", + "file": "invalid/3.2-missing-metadata.yaml", + "section": "3.2", + "rule": "metadata is REQUIRED.", + "expect": "invalid", + "code": "schema.required", + "path": "" + }, + { + "id": "3.2-missing-spec", + "file": "invalid/3.2-missing-spec.yaml", + "section": "3.2", + "rule": "spec is REQUIRED.", + "expect": "invalid", + "code": "schema.required", + "path": "" + }, + { + "id": "3.2-unsupported-api-version", + "file": "invalid/3.2-unsupported-api-version.yaml", + "section": "3.2", + "rule": "apiVersion MUST name a supported version.", + "expect": "invalid", + "code": "schema.const", + "path": "/apiVersion" + }, + { + "id": "3.2-unsupported-kind", + "file": "invalid/3.2-unsupported-kind.yaml", + "section": "3.2", + "rule": "kind MUST be Workflow, Agent or Policy.", + "expect": "invalid", + "code": "schema.enum", + "path": "/kind" + }, + { + "id": "3.3-extension-field-outside-extensions", + "file": "invalid/3.3-extension-field-outside-extensions.yaml", + "section": "3.3", + "rule": "Extension fields are placed in an extensions object; an x- field on the object itself is unknown.", + "expect": "invalid", + "code": "schema.additionalProperties", + "path": "/spec/workflow/0/x-example-mode", + "profiles": [ + "core" + ] + }, + { + "id": "3.3-extension-key-without-prefix", + "file": "invalid/3.3-extension-key-without-prefix.yaml", + "section": "3.3", + "rule": "Keys of extensions start with x-.", + "expect": "invalid", + "code": "schema.propertyNames", + "path": "/spec/extensions/mode", + "profiles": [ + "core" + ] + }, + { + "id": "3.3-profile-a2a-agent", + "file": "invalid/3.3-profile-a2a-agent.yaml", + "section": "3.3", + "rule": "Agents with protocol a2a belong to the a2a profile.", + "expect": "invalid", + "code": "profile.unsupported", + "path": "/spec/agents/1", + "profiles": [ + "core", + "mcp" + ] + }, + { + "id": "3.3-profile-approval-step", + "file": "invalid/3.3-profile-approval-step.yaml", + "section": "3.3", + "rule": "Steps with type approval belong to the governance profile.", + "expect": "invalid", + "code": "profile.unsupported", + "path": "/spec/workflow/2", + "profiles": [ + "core", + "mcp" + ] + }, + { + "id": "3.3-profile-audit-field", + "file": "invalid/3.3-profile-audit-field.yaml", + "section": "3.3", + "rule": "spec.audit belongs to the audit profile.", + "expect": "invalid", + "code": "profile.unsupported", + "path": "/spec/audit", + "profiles": [ + "core", + "mcp" + ] + }, + { + "id": "3.3-profile-governance-field", + "file": "invalid/3.3-profile-governance-field.yaml", + "section": "3.3", + "rule": "A field of a profile the implementation does not support MUST be rejected naming field and profile (spec.approval, governance).", + "expect": "invalid", + "code": "profile.unsupported", + "path": "/spec/approval", + "profiles": [ + "core", + "mcp" + ] + }, + { + "id": "3.3-profile-high-risk", + "file": "invalid/3.3-profile-high-risk.yaml", + "section": "3.3", + "rule": "spec.risk.level high or critical belongs to the governance profile.", + "expect": "invalid", + "code": "profile.unsupported", + "path": "/spec/risk/level", + "profiles": [ + "core", + "mcp" + ] + }, + { + "id": "3.3-profile-interaction-step", + "file": "invalid/3.3-profile-interaction-step.yaml", + "section": "3.3", + "rule": "Steps with type input belong to the interaction profile.", + "expect": "invalid", + "code": "profile.unsupported", + "path": "/spec/workflow/1", + "profiles": [ + "core", + "governance", + "audit", + "security", + "mcp", + "a2a" + ] + }, + { + "id": "3.3-profile-mcp-field", + "file": "invalid/3.3-profile-mcp-field.yaml", + "section": "3.3", + "rule": "spec.mcpServers belongs to the mcp profile.", + "expect": "invalid", + "code": "profile.unsupported", + "path": "/spec/mcpServers", + "profiles": [ + "core" + ] + }, + { + "id": "3.3-profile-policy-kind", + "file": "invalid/3.3-profile-policy-kind.yaml", + "section": "3.3", + "rule": "Policy manifests belong to the governance profile.", + "expect": "invalid", + "code": "profile.unsupported", + "path": "/kind", + "profiles": [ + "core" + ] + }, + { + "id": "3.3-profile-security-field", + "file": "invalid/3.3-profile-security-field.yaml", + "section": "3.3", + "rule": "spec.signature belongs to the security profile.", + "expect": "invalid", + "code": "profile.unsupported", + "path": "/spec/signature", + "profiles": [ + "core", + "mcp" + ] + }, + { + "id": "3.3-unknown-field-near-extension", + "file": "invalid/3.3-unknown-field-near-extension.yaml", + "section": "3.3", + "rule": "Only the prefix x- marks an extension; x_foo and X-foo are unknown fields.", + "expect": "invalid", + "code": "schema.additionalProperties", + "path": "/spec/X-foo" + }, + { + "id": "3.3-unknown-metadata-field", + "file": "invalid/3.3-unknown-metadata-field.yaml", + "section": "3.3", + "rule": "Unknown fields MUST be rejected (metadata).", + "expect": "invalid", + "code": "schema.additionalProperties", + "path": "/metadata/team" + }, + { + "id": "3.3-unknown-step-field", + "file": "invalid/3.3-unknown-step-field.yaml", + "section": "3.3", + "rule": "Unknown fields MUST be rejected (nested in a list entry).", + "expect": "invalid", + "code": "schema.additionalProperties", + "path": "/spec/workflow/0/parallel" + }, + { + "id": "3.3-unknown-top-level-field", + "file": "invalid/3.3-unknown-top-level-field.yaml", + "section": "3.3", + "rule": "Unknown fields MUST be rejected (top level; status is reserved, not unknown).", + "expect": "invalid", + "code": "schema.additionalProperties", + "path": "/data" + }, + { + "id": "3.4-duplicate-agent-id", + "file": "invalid/3.4-duplicate-agent-id.yaml", + "section": "3.4", + "rule": "Identifiers MUST be unique within their list (agents).", + "expect": "invalid", + "code": "id.duplicate", + "path": "/spec/agents/1/id" + }, + { + "id": "3.4-duplicate-rule-id", + "file": "invalid/3.4-duplicate-rule-id.yaml", + "section": "3.4", + "rule": "Identifiers MUST be unique within their list (rules).", + "expect": "invalid", + "code": "id.duplicate", + "path": "/spec/rules/1/id" + }, + { + "id": "3.4-invalid-metadata-name", + "file": "invalid/3.4-invalid-metadata-name.yaml", + "section": "3.4", + "rule": "metadata.name MUST be a DNS-1123 label.", + "expect": "invalid", + "code": "schema.pattern", + "path": "/metadata/name" + }, + { + "id": "3.4-uppercase-agent-id", + "file": "invalid/3.4-uppercase-agent-id.yaml", + "section": "3.4", + "rule": "Identifiers MUST match ^[a-z][a-z0-9-]{0,62}$.", + "expect": "invalid", + "code": "schema.pattern", + "path": "/spec/agents/0/id" + }, + { + "id": "3.4-uppercase-metadata-name", + "file": "invalid/3.4-uppercase-metadata-name.yaml", + "section": "3.4", + "rule": "metadata.name MUST be a DNS-1123 label (lowercase).", + "expect": "invalid", + "code": "schema.pattern", + "path": "/metadata/name", + "profiles": [ + "core" + ] + }, + { + "id": "3.5-version-leading-zero", + "file": "invalid/3.5-version-leading-zero.yaml", + "section": "3.5", + "rule": "SemVer forbids leading zeros in numeric identifiers.", + "expect": "invalid", + "code": "schema.pattern", + "path": "/spec/version" + }, + { + "id": "3.5-version-not-semver", + "file": "invalid/3.5-version-not-semver.yaml", + "section": "3.5", + "rule": "spec.version MUST be a SemVer 2.0.0 string.", + "expect": "invalid", + "code": "schema.pattern", + "path": "/spec/version" + }, + { + "id": "3.6-duration-unknown-unit", + "file": "invalid/3.6-duration-unknown-unit.yaml", + "section": "3.6", + "rule": "Durations use the units ms, s, m, h, d, w, y.", + "expect": "invalid", + "code": "schema.pattern", + "path": "/spec/workflow/0/timeout" + }, + { + "id": "3.6-duration-zero", + "file": "invalid/3.6-duration-zero.yaml", + "section": "3.6", + "rule": "A duration MUST be greater than zero.", + "expect": "invalid", + "code": "schema.pattern", + "path": "/spec/budget/maxDuration" + }, + { + "id": "3.7-date-not-calendar-valid", + "file": "invalid/3.7-date-not-calendar-valid.yaml", + "section": "3.7", + "rule": "Dates are RFC 3339 full-date values; 2027-02-30 does not exist.", + "expect": "invalid", + "code": "date.invalid", + "path": "/spec/agents/0/model/approval/expires" + }, + { + "id": "3.7-date-wrong-format", + "file": "invalid/3.7-date-wrong-format.yaml", + "section": "3.7", + "rule": "Dates are RFC 3339 full-date values.", + "expect": "invalid", + "code": "schema.pattern", + "path": "/spec/agents/0/model/approval/expires" + }, + { + "id": "3.8-digest-uppercase-hex", + "file": "invalid/3.8-digest-uppercase-hex.yaml", + "section": "3.8", + "rule": "Digest hex is lowercase.", + "expect": "invalid", + "code": "schema.pattern", + "path": "/spec/integrity/digest" + }, + { + "id": "3.8-digest-wrong-length", + "file": "invalid/3.8-digest-wrong-length.yaml", + "section": "3.8", + "rule": "A sha256 digest has 64 lowercase hex characters.", + "expect": "invalid", + "code": "schema.pattern", + "path": "/spec/integrity/digest" + }, + { + "id": "3.9-expression-function", + "file": "invalid/3.9-expression-function.yaml", + "section": "3.9", + "rule": "No functions in expressions.", + "expect": "invalid", + "code": "schema.pattern", + "path": "/spec/workflow/0/task" + }, + { + "id": "3.9-expression-in-env-key-ref-bad", + "file": "invalid/3.9-expression-in-env-key-ref-bad.yaml", + "section": "3.9", + "rule": "env values are expression-enabled; other syntax is rejected.", + "expect": "invalid", + "code": "schema.pattern", + "path": "/spec/workflow/2/env/A" + }, + { + "id": "3.9-expression-operator", + "file": "invalid/3.9-expression-operator.yaml", + "section": "3.9", + "rule": "No operators in expressions.", + "expect": "invalid", + "code": "schema.pattern", + "path": "/spec/workflow/0/task" + }, + { + "id": "3.9-expression-unknown-root", + "file": "invalid/3.9-expression-unknown-root.yaml", + "section": "3.9", + "rule": "References are inputs, steps..outputs and execution only.", + "expect": "invalid", + "code": "schema.pattern", + "path": "/spec/workflow/0/task" + }, + { + "id": "3.9-expression-unterminated", + "file": "invalid/3.9-expression-unterminated.yaml", + "section": "3.9", + "rule": "An expression must be closed.", + "expect": "invalid", + "code": "schema.pattern", + "path": "/spec/workflow/0/task" + }, + { + "id": "3.9-iteration-reference-outside-for-each", + "file": "invalid/3.9-iteration-reference-outside-for-each.yaml", + "section": "3.9", + "rule": "forEach.* references MUST only be used in task and env of a step that declares forEach.", + "expect": "invalid", + "code": "expr.iteration-outside-forEach", + "path": "/spec/workflow/1/task" + }, + { + "id": "3.9-step-reference-in-permissions", + "file": "invalid/3.9-step-reference-in-permissions.yaml", + "section": "3.9", + "rule": "Step references are only valid inside a step.", + "expect": "invalid", + "code": "expr.step-reference-outside-step", + "path": "/spec/permissions/tools/tools.read/resources/0" + }, + { + "id": "3.9-step-reference-unknown-step", + "file": "invalid/3.9-step-reference-unknown-step.yaml", + "section": "3.9", + "rule": "A reference to a non-existent step is rejected.", + "expect": "invalid", + "code": "expr.unknown-step", + "path": "/spec/workflow/1/task" + }, + { + "id": "3.9-step-reference-without-dependency", + "file": "invalid/3.9-step-reference-without-dependency.yaml", + "section": "3.9", + "rule": "steps. MUST only be used in a step that depends on .", + "expect": "invalid", + "code": "expr.not-a-dependency", + "path": "/spec/workflow/1/task" + }, + { + "id": "4-governance-field-in-metadata", + "file": "invalid/4-governance-field-in-metadata.yaml", + "section": "4", + "rule": "Governance fields are spec fields; metadata.owner is unknown.", + "expect": "invalid", + "code": "schema.additionalProperties", + "path": "/metadata/owner", + "profiles": [ + "core" + ] + }, + { + "id": "4-invalid-label-key", + "file": "invalid/4-invalid-label-key.yaml", + "section": "4", + "rule": "Label keys MUST match ^[a-zA-Z0-9][a-zA-Z0-9._/-]{0,127}$.", + "expect": "invalid", + "code": "schema.propertyNames", + "path": "/metadata/labels/-bad" + }, + { + "id": "4-invalid-risk-level", + "file": "invalid/4-invalid-risk-level.yaml", + "section": "4", + "rule": "risk.level is one of low, medium, high, critical.", + "expect": "invalid", + "code": "schema.enum", + "path": "/spec/risk/level" + }, + { + "id": "4-label-value-not-string", + "file": "invalid/4-label-value-not-string.yaml", + "section": "4", + "rule": "Labels are a map of strings.", + "expect": "invalid", + "code": "schema.type", + "path": "/metadata/labels/tier" + }, + { + "id": "4-label-value-too-long", + "file": "invalid/4-label-value-too-long.yaml", + "section": "4", + "rule": "Label values have at most 63 characters (Kubernetes label syntax).", + "expect": "invalid", + "code": "schema.maxLength", + "path": "/metadata/labels/tier", + "profiles": [ + "core" + ] + }, + { + "id": "4-missing-owner", + "file": "invalid/4-missing-owner.yaml", + "section": "4", + "rule": "spec.owner is REQUIRED.", + "expect": "invalid", + "code": "schema.required", + "path": "/spec" + }, + { + "id": "4-missing-version", + "file": "invalid/4-missing-version.yaml", + "section": "4", + "rule": "spec.version is REQUIRED.", + "expect": "invalid", + "code": "schema.required", + "path": "/spec" + }, + { + "id": "4-owner-string", + "file": "invalid/4-owner-string.yaml", + "section": "4", + "rule": "spec.owner is an object; the string shorthand of v1alpha1 is removed.", + "expect": "invalid", + "code": "schema.type", + "path": "/spec/owner", + "profiles": [ + "core" + ] + }, + { + "id": "4-owner-without-team", + "file": "invalid/4-owner-without-team.yaml", + "section": "4", + "rule": "owner as an object REQUIRES team.", + "expect": "invalid", + "code": "schema.required", + "path": "/spec/owner" + }, + { + "id": "5.2-concurrency-policy-on-event-trigger", + "file": "invalid/5.2-concurrency-policy-on-event-trigger.yaml", + "section": "5.2", + "rule": "concurrencyPolicy and startingDeadline belong to schedule triggers only.", + "expect": "invalid", + "code": "schema.not", + "path": "/spec/triggers/2" + }, + { + "id": "5.2-cron-not-five-fields", + "file": "invalid/5.2-cron-not-five-fields.yaml", + "section": "5.2", + "rule": "cron is a 5-field cron expression.", + "expect": "invalid", + "code": "schema.pattern", + "path": "/spec/triggers/0/cron" + }, + { + "id": "5.2-event-without-event-type", + "file": "invalid/5.2-event-without-event-type.yaml", + "section": "5.2", + "rule": "event triggers REQUIRE source and eventType.", + "expect": "invalid", + "code": "schema.required", + "path": "/spec/triggers/0" + }, + { + "id": "5.2-invalid-concurrency-policy", + "file": "invalid/5.2-invalid-concurrency-policy.yaml", + "section": "5.2", + "rule": "concurrencyPolicy is allow, forbid or replace.", + "expect": "invalid", + "code": "schema.enum", + "path": "/spec/triggers/1/concurrencyPolicy" + }, + { + "id": "5.2-schedule-without-cron", + "file": "invalid/5.2-schedule-without-cron.yaml", + "section": "5.2", + "rule": "schedule triggers REQUIRE cron.", + "expect": "invalid", + "code": "schema.required", + "path": "/spec/triggers/0" + }, + { + "id": "5.2-starting-deadline-not-duration", + "file": "invalid/5.2-starting-deadline-not-duration.yaml", + "section": "5.2", + "rule": "startingDeadline is a duration.", + "expect": "invalid", + "code": "schema.pattern", + "path": "/spec/triggers/1/startingDeadline" + }, + { + "id": "5.2-unknown-trigger-type", + "file": "invalid/5.2-unknown-trigger-type.yaml", + "section": "5.2", + "rule": "type is manual, schedule or event.", + "expect": "invalid", + "code": "schema.enum", + "path": "/spec/triggers/0/type" + }, + { + "id": "5.3-default-wrong-type", + "file": "invalid/5.3-default-wrong-type.yaml", + "section": "5.3", + "rule": "default MUST match type.", + "expect": "invalid", + "code": "schema.type", + "path": "/spec/inputs/0/default" + }, + { + "id": "5.3-invalid-pattern", + "file": "invalid/5.3-invalid-pattern.yaml", + "section": "5.3", + "rule": "pattern is an ECMA-262 regular expression.", + "expect": "invalid", + "code": "input.pattern-invalid", + "path": "/spec/inputs/0/pattern" + }, + { + "id": "5.3-required-input-with-default", + "file": "invalid/5.3-required-input-with-default.yaml", + "section": "5.3", + "rule": "default MUST NOT be set when required is true.", + "expect": "invalid", + "code": "schema.not", + "path": "/spec/inputs/0" + }, + { + "id": "5.3-unknown-input-type", + "file": "invalid/5.3-unknown-input-type.yaml", + "section": "5.3", + "rule": "type is string, integer, number, boolean, object, array or artifact.", + "expect": "invalid", + "code": "schema.enum", + "path": "/spec/inputs/0/type" + }, + { + "id": "5.4.1-inline-agent-without-model", + "file": "invalid/5.4.1-inline-agent-without-model.yaml", + "section": "5.4.1", + "rule": "An inline agent REQUIRES model.", + "expect": "invalid", + "code": "schema.required", + "path": "/spec/agents/0" + }, + { + "id": "5.4.1-instructions-and-prompt-ref", + "file": "invalid/5.4.1-instructions-and-prompt-ref.yaml", + "section": "5.4.1", + "rule": "promptRef MUST NOT be combined with instructions.", + "expect": "invalid", + "code": "schema.not", + "path": "/spec/agents/0" + }, + { + "id": "5.4.2-reference-version-range", + "file": "invalid/5.4.2-reference-version-range.yaml", + "section": "5.4.2", + "rule": "ref.version is an exact SemVer version, no ranges.", + "expect": "invalid", + "code": "schema.pattern", + "path": "/spec/agents/1/ref/version" + }, + { + "id": "5.4.2-reference-with-instructions", + "file": "invalid/5.4.2-reference-with-instructions.yaml", + "section": "5.4.2", + "rule": "An agent reference MUST NOT contain instructions.", + "expect": "invalid", + "code": "schema.additionalProperties", + "path": "/spec/agents/1/instructions" + }, + { + "id": "5.4.2-reference-with-model", + "file": "invalid/5.4.2-reference-with-model.yaml", + "section": "5.4.2", + "rule": "An agent reference MUST NOT contain model.", + "expect": "invalid", + "code": "schema.additionalProperties", + "path": "/spec/agents/1/model" + }, + { + "id": "5.4.2-reference-without-version", + "file": "invalid/5.4.2-reference-without-version.yaml", + "section": "5.4.2", + "rule": "ref REQUIRES name and version.", + "expect": "invalid", + "code": "schema.required", + "path": "/spec/agents/1/ref" + }, + { + "id": "5.4.3-invalid-model-approval-status", + "file": "invalid/5.4.3-invalid-model-approval-status.yaml", + "section": "5.4.3", + "rule": "model.approval.status is approved, pending, rejected or revoked.", + "expect": "invalid", + "code": "schema.enum", + "path": "/spec/agents/0/model/approval/status" + }, + { + "id": "5.4.3-model-without-name", + "file": "invalid/5.4.3-model-without-name.yaml", + "section": "5.4.3", + "rule": "model REQUIRES provider and name.", + "expect": "invalid", + "code": "schema.required", + "path": "/spec/agents/0/model" + }, + { + "id": "5.4.4-remote-agent-http-endpoint", + "file": "invalid/5.4.4-remote-agent-http-endpoint.yaml", + "section": "5.4.4", + "rule": "A remote agent endpoint is an HTTPS URL.", + "expect": "invalid", + "code": "schema.pattern", + "path": "/spec/agents/1/endpoint" + }, + { + "id": "5.4.4-remote-agent-with-model", + "file": "invalid/5.4.4-remote-agent-with-model.yaml", + "section": "5.4.4", + "rule": "A remote agent MUST NOT contain model.", + "expect": "invalid", + "code": "schema.additionalProperties", + "path": "/spec/agents/1/model" + }, + { + "id": "5.4.4-remote-agent-without-endpoint", + "file": "invalid/5.4.4-remote-agent-without-endpoint.yaml", + "section": "5.4.4", + "rule": "A remote agent REQUIRES endpoint.", + "expect": "invalid", + "code": "schema.required", + "path": "/spec/agents/1" + }, + { + "id": "5.4.4-remote-agent-wrong-protocol", + "file": "invalid/5.4.4-remote-agent-wrong-protocol.yaml", + "section": "5.4.4", + "rule": "protocol MUST be a2a.", + "expect": "invalid", + "code": "schema.const", + "path": "/spec/agents/1/protocol" + }, + { + "id": "5.5.1-duplicate-server-name", + "file": "invalid/5.5.1-duplicate-server-name.yaml", + "section": "5.5.1", + "rule": "MCP server names are referenced by tool sources and must be unique.", + "expect": "invalid", + "code": "name.duplicate", + "path": "/spec/mcpServers/1/name" + }, + { + "id": "5.5.1-mcp-url-not-https", + "file": "invalid/5.5.1-mcp-url-not-https.yaml", + "section": "5.5.1", + "rule": "The url of an MCP server MUST use https.", + "expect": "invalid", + "code": "schema.pattern", + "path": "/spec/mcpServers/0/url" + }, + { + "id": "5.5.1-streamable-http-without-url", + "file": "invalid/5.5.1-streamable-http-without-url.yaml", + "section": "5.5.1", + "rule": "url is REQUIRED for streamable-http.", + "expect": "invalid", + "code": "schema.required", + "path": "/spec/mcpServers/0" + }, + { + "id": "5.5.1-unknown-transport", + "file": "invalid/5.5.1-unknown-transport.yaml", + "section": "5.5.1", + "rule": "transport is stdio or streamable-http.", + "expect": "invalid", + "code": "schema.enum", + "path": "/spec/mcpServers/0/transport" + }, + { + "id": "5.5.2-builtin-tool-source-without-name", + "file": "invalid/5.5.2-builtin-tool-source-without-name.yaml", + "section": "5.5.2", + "rule": "A builtin tool source REQUIRES name.", + "expect": "invalid", + "code": "schema.required", + "path": "/spec/agents/0/tools/0" + }, + { + "id": "5.5.2-mcp-tool-source-without-server", + "file": "invalid/5.5.2-mcp-tool-source-without-server.yaml", + "section": "5.5.2", + "rule": "An mcp tool source REQUIRES server.", + "expect": "invalid", + "code": "schema.required", + "path": "/spec/agents/0/tools/0" + }, + { + "id": "5.5.3-invalid-action-identifier-in-permissions", + "file": "invalid/5.5.3-invalid-action-identifier-in-permissions.yaml", + "section": "5.5.3", + "rule": "Permission keys are action identifiers with at least two segments.", + "expect": "invalid", + "code": "schema.propertyNames", + "path": "/spec/permissions/tools/shell" + }, + { + "id": "5.5.3-wildcard-not-final-segment", + "file": "invalid/5.5.3-wildcard-not-final-segment.yaml", + "section": "5.5.3", + "rule": "Only a final segment may be the wildcard *.", + "expect": "invalid", + "code": "schema.propertyNames", + "path": "/spec/permissions/tools/*.read" + }, + { + "id": "5.5.4-group-contains-group", + "file": "invalid/5.5.4-group-contains-group.yaml", + "section": "5.5.4", + "rule": "Groups MUST NOT contain other groups.", + "expect": "invalid", + "code": "actionGroup.nested", + "path": "/spec/actionGroups/tools.all/0" + }, + { + "id": "5.5.4-invalid-group-identifier", + "file": "invalid/5.5.4-invalid-group-identifier.yaml", + "section": "5.5.4", + "rule": "A group identifier MUST be a valid action identifier.", + "expect": "invalid", + "code": "schema.propertyNames", + "path": "/spec/actionGroups/readers" + }, + { + "id": "5.6.1-agent-step-with-command", + "file": "invalid/5.6.1-agent-step-with-command.yaml", + "section": "5.6.1", + "rule": "Fields of command steps are not allowed in agent steps.", + "expect": "invalid", + "code": "schema.not", + "path": "/spec/workflow/0" + }, + { + "id": "5.6.1-agent-step-without-agent", + "file": "invalid/5.6.1-agent-step-without-agent.yaml", + "section": "5.6.1", + "rule": "An agent step REQUIRES agent.", + "expect": "invalid", + "code": "schema.required", + "path": "/spec/workflow/0" + }, + { + "id": "5.6.1-approval-step-required-for", + "file": "invalid/5.6.1-approval-step-required-for.yaml", + "section": "5.6.1", + "rule": "An approval step has no requiredFor; it applies only at workflow level.", + "expect": "invalid", + "code": "schema.additionalProperties", + "path": "/spec/workflow/2/approval/requiredFor" + }, + { + "id": "5.6.1-approval-step-separation-of-duties", + "file": "invalid/5.6.1-approval-step-separation-of-duties.yaml", + "section": "5.6.1", + "rule": "An approval step has no separationOfDuties; it applies only at workflow level.", + "expect": "invalid", + "code": "schema.additionalProperties", + "path": "/spec/workflow/2/approval/separationOfDuties" + }, + { + "id": "5.6.1-approval-step-without-approval", + "file": "invalid/5.6.1-approval-step-without-approval.yaml", + "section": "5.6.1", + "rule": "An approval step REQUIRES approval.", + "expect": "invalid", + "code": "schema.required", + "path": "/spec/workflow/2" + }, + { + "id": "5.6.1-command-step-with-agent", + "file": "invalid/5.6.1-command-step-with-agent.yaml", + "section": "5.6.1", + "rule": "A command step has no agent.", + "expect": "invalid", + "code": "schema.not", + "path": "/spec/workflow/2" + }, + { + "id": "5.6.1-command-step-without-command", + "file": "invalid/5.6.1-command-step-without-command.yaml", + "section": "5.6.1", + "rule": "A command step REQUIRES command.", + "expect": "invalid", + "code": "schema.required", + "path": "/spec/workflow/2" + }, + { + "id": "5.6.1-negative-retries", + "file": "invalid/5.6.1-negative-retries.yaml", + "section": "5.6.1", + "rule": "retries is a non-negative integer.", + "expect": "invalid", + "code": "schema.minimum", + "path": "/spec/workflow/0/retries" + }, + { + "id": "5.6.1-output-name-with-dot", + "file": "invalid/5.6.1-output-name-with-dot.yaml", + "section": "5.6.1", + "rule": "Output names match ^[A-Za-z_][A-Za-z0-9_]{0,62}$, so that they are file names and expression keys.", + "expect": "invalid", + "code": "schema.pattern", + "path": "/spec/workflow/2/outputs/0/name" + }, + { + "id": "5.6.1-retries-exceed-max-retries", + "file": "invalid/5.6.1-retries-exceed-max-retries.yaml", + "section": "5.6.1", + "rule": "retries MUST NOT exceed budget.resources.maxRetries if set.", + "expect": "invalid", + "code": "retries.exceeds-budget", + "path": "/spec/workflow/0/retries" + }, + { + "id": "5.6.1-unknown-step-type", + "file": "invalid/5.6.1-unknown-step-type.yaml", + "section": "5.6.1", + "rule": "type is agent, command or approval.", + "expect": "invalid", + "code": "schema.enum", + "path": "/spec/workflow/0/type" + }, + { + "id": "5.6.2-env-key-invalid", + "file": "invalid/5.6.2-env-key-invalid.yaml", + "section": "5.6.2", + "rule": "env keys are environment variable names.", + "expect": "invalid", + "code": "schema.propertyNames", + "path": "/spec/workflow/2/env/BAD-KEY" + }, + { + "id": "5.6.3-dependency-cycle", + "file": "invalid/5.6.3-dependency-cycle.yaml", + "section": "5.6.3", + "rule": "The runtime MUST reject a workflow whose steps contain a cycle.", + "expect": "invalid", + "code": "dependsOn.cycle", + "path": "/spec/workflow" + }, + { + "id": "5.6.3-depends-on-unknown-step", + "file": "invalid/5.6.3-depends-on-unknown-step.yaml", + "section": "5.6.3", + "rule": "A dependsOn entry that names a non-existent step is rejected.", + "expect": "invalid", + "code": "dependsOn.unknown-step", + "path": "/spec/workflow/1/dependsOn/1" + }, + { + "id": "5.6.3-duplicate-step-id", + "file": "invalid/5.6.3-duplicate-step-id.yaml", + "section": "5.6.3", + "rule": "The runtime MUST reject a duplicate step id.", + "expect": "invalid", + "code": "id.duplicate", + "path": "/spec/workflow/1/id" + }, + { + "id": "5.6.3-self-dependency", + "file": "invalid/5.6.3-self-dependency.yaml", + "section": "5.6.3", + "rule": "A step that depends on itself is a cycle.", + "expect": "invalid", + "code": "dependsOn.cycle", + "path": "/spec/workflow/0/dependsOn" + }, + { + "id": "5.6.3-undeclared-step-output", + "file": "invalid/5.6.3-undeclared-step-output.yaml", + "section": "5.6.3", + "rule": "Outputs not declared in outputs MUST NOT be referenced.", + "expect": "invalid", + "code": "expr.undeclared-output", + "path": "/spec/workflow/1/task" + }, + { + "id": "5.6.3-unknown-agent", + "file": "invalid/5.6.3-unknown-agent.yaml", + "section": "5.6.3", + "rule": "An agent that names a non-existent agent is rejected.", + "expect": "invalid", + "code": "step.unknown-agent", + "path": "/spec/workflow/0/agent" + }, + { + "id": "5.6.4-reserved-env", + "file": "invalid/5.6.4-reserved-env.yaml", + "section": "5.6.4", + "rule": "Environment variables with the prefix AWP_ are reserved for the runtime.", + "expect": "invalid", + "code": "step.reserved-env", + "path": "/spec/workflow/2/env/AWP_OUTPUTS" + }, + { + "id": "5.6.5-for-each-concurrency-exceeds-budget", + "file": "invalid/5.6.5-for-each-concurrency-exceeds-budget.yaml", + "section": "5.6.5", + "rule": "forEach.concurrency MUST NOT exceed the effective budget.resources.maxConcurrency.", + "expect": "invalid", + "code": "forEach.concurrency-exceeds-budget", + "path": "/spec/workflow/1/forEach/concurrency" + }, + { + "id": "5.6.5-for-each-input-not-array", + "file": "invalid/5.6.5-for-each-input-not-array.yaml", + "section": "5.6.5", + "rule": "An input referenced by forEach.items MUST have type array.", + "expect": "invalid", + "code": "forEach.input-not-array", + "path": "/spec/workflow/1/forEach/items" + }, + { + "id": "5.6.5-for-each-items-not-a-dependency", + "file": "invalid/5.6.5-for-each-items-not-a-dependency.yaml", + "section": "3.9", + "rule": "forEach.items MUST only reference a step this step depends on.", + "expect": "invalid", + "code": "expr.not-a-dependency", + "path": "/spec/workflow/1/forEach/items" + }, + { + "id": "5.6.5-for-each-items-not-a-reference", + "file": "invalid/5.6.5-for-each-items-not-a-reference.yaml", + "section": "5.6.5", + "rule": "forEach.items is exactly one reference to an input or a step output.", + "expect": "invalid", + "code": "schema.pattern", + "path": "/spec/workflow/1/forEach/items" + }, + { + "id": "5.6.5-for-each-missing-max-items", + "file": "invalid/5.6.5-for-each-missing-max-items.yaml", + "section": "5.6.5", + "rule": "forEach.maxItems is REQUIRED.", + "expect": "invalid", + "code": "schema.required", + "path": "/spec/workflow/1/forEach" + }, + { + "id": "5.6.5-for-each-on-approval-step", + "file": "invalid/5.6.5-for-each-on-approval-step.yaml", + "section": "5.6.1", + "rule": "forEach is not allowed on approval steps.", + "expect": "invalid", + "code": "schema.not", + "path": "/spec/workflow/1" + }, + { + "id": "5.7-negative-cost", + "file": "invalid/5.7-negative-cost.yaml", + "section": "5.7", + "rule": "All limits MUST be positive.", + "expect": "invalid", + "code": "schema.exclusiveMinimum", + "path": "/spec/budget/maxCostUsd" + }, + { + "id": "5.7-unknown-budget-field", + "file": "invalid/5.7-unknown-budget-field.yaml", + "section": "5.7", + "rule": "Unknown budget fields are rejected.", + "expect": "invalid", + "code": "schema.additionalProperties", + "path": "/spec/budget/maxMoney" + }, + { + "id": "5.7-zero-concurrency", + "file": "invalid/5.7-zero-concurrency.yaml", + "section": "5.7", + "rule": "All limits MUST be positive.", + "expect": "invalid", + "code": "schema.minimum", + "path": "/spec/budget/resources/maxConcurrency" + }, + { + "id": "5.7-zero-max-steps", + "file": "invalid/5.7-zero-max-steps.yaml", + "section": "5.7", + "rule": "All limits MUST be positive.", + "expect": "invalid", + "code": "schema.minimum", + "path": "/spec/budget/maxSteps" + }, + { + "id": "5.8-agent-invalid-on-timeout", + "file": "invalid/5.8-agent-invalid-on-timeout.yaml", + "section": "5.8", + "rule": "humanInput.onTimeout is return or fail.", + "expect": "invalid", + "code": "schema.enum", + "path": "/spec/agents/0/humanInput/onTimeout" + }, + { + "id": "5.8-answer-field-nested-object", + "file": "invalid/5.8-answer-field-nested-object.yaml", + "section": "5.8", + "rule": "Answer fields are primitive (string, number, integer, boolean).", + "expect": "invalid", + "code": "schema.enum", + "path": "/spec/workflow/1/input/answerSchema/properties/targets/type" + }, + { + "id": "5.8-default-mismatch", + "file": "invalid/5.8-default-mismatch.yaml", + "section": "5.8", + "rule": "default matches answerSchema.", + "expect": "invalid", + "code": "input.default-mismatch", + "path": "/spec/workflow/1/input/default" + }, + { + "id": "5.8-input-step-with-agent", + "file": "invalid/5.8-input-step-with-agent.yaml", + "section": "5.8", + "rule": "An input step has no agent.", + "expect": "invalid", + "code": "schema.not", + "path": "/spec/workflow/1" + }, + { + "id": "5.8-input-step-without-input", + "file": "invalid/5.8-input-step-without-input.yaml", + "section": "5.8", + "rule": "An input step REQUIRES input.", + "expect": "invalid", + "code": "schema.required", + "path": "/spec/workflow/1" + }, + { + "id": "5.8-input-without-answerers", + "file": "invalid/5.8-input-without-answerers.yaml", + "section": "5.8", + "rule": "answerers is REQUIRED; nobody else may answer.", + "expect": "invalid", + "code": "schema.required", + "path": "/spec/workflow/1/input" + }, + { + "id": "5.8-required-unknown-field", + "file": "invalid/5.8-required-unknown-field.yaml", + "section": "5.8", + "rule": "required names fields of answerSchema.properties.", + "expect": "invalid", + "code": "input.required-unknown-field", + "path": "/spec/workflow/1/input/answerSchema/required/0" + }, + { + "id": "5.8-use-default-without-default", + "file": "invalid/5.8-use-default-without-default.yaml", + "section": "5.8", + "rule": "onTimeout useDefault REQUIRES default.", + "expect": "invalid", + "code": "schema.required", + "path": "/spec/workflow/1/input" + }, + { + "id": "6-agent-instructions-and-prompt-ref", + "file": "invalid/6-agent-instructions-and-prompt-ref.yaml", + "section": "6", + "rule": "promptRef MUST NOT be combined with instructions.", + "expect": "invalid", + "code": "schema.not", + "path": "/spec" + }, + { + "id": "6-agent-kind-with-workflow-spec", + "file": "invalid/6-agent-kind-with-workflow-spec.yaml", + "section": "6", + "rule": "agents/workflow belong to kind Workflow only.", + "expect": "invalid", + "code": "schema.additionalProperties", + "path": "/spec/agents" + }, + { + "id": "6-agent-with-workflow-field", + "file": "invalid/6-agent-with-workflow-field.yaml", + "section": "6", + "rule": "An Agent manifest has no spec.workflow (unknown field).", + "expect": "invalid", + "code": "schema.additionalProperties", + "path": "/spec/workflow" + }, + { + "id": "6-agent-without-model", + "file": "invalid/6-agent-without-model.yaml", + "section": "6", + "rule": "An Agent manifest REQUIRES spec.model.", + "expect": "invalid", + "code": "schema.required", + "path": "/spec" + }, + { + "id": "7.1-governance-requires-classification", + "file": "invalid/7.1-governance-requires-classification.yaml", + "section": "7.1", + "rule": "Under the governance profile Workflow and Agent REQUIRE spec.classification.", + "expect": "invalid", + "code": "governance.classification-required", + "path": "/spec" + }, + { + "id": "7.2-invalid-classification", + "file": "invalid/7.2-invalid-classification.yaml", + "section": "7.2", + "rule": "Data classes are public, internal, confidential, personal, restricted, sensitive, secret.", + "expect": "invalid", + "code": "schema.enum", + "path": "/spec/classification" + }, + { + "id": "7.2-invalid-external-transfer", + "file": "invalid/7.2-invalid-external-transfer.yaml", + "section": "7.2", + "rule": "externalTransfer is allow or deny.", + "expect": "invalid", + "code": "schema.enum", + "path": "/spec/dataPolicy/restrictions/externalTransfer" + }, + { + "id": "7.4-invalid-model-policy-status", + "file": "invalid/7.4-invalid-model-policy-status.yaml", + "section": "7.4", + "rule": "requirements.approvalStatus uses the model approval statuses.", + "expect": "invalid", + "code": "schema.enum", + "path": "/spec/modelPolicy/requirements/approvalStatus" + }, + { + "id": "7.5-allow-not-boolean", + "file": "invalid/7.5-allow-not-boolean.yaml", + "section": "7.5.1", + "rule": "allow is a boolean.", + "expect": "invalid", + "code": "schema.type", + "path": "/spec/permissions/tools/tools.read/allow" + }, + { + "id": "7.5-invalid-default", + "file": "invalid/7.5-invalid-default.yaml", + "section": "7.5.1", + "rule": "permissions.default is allow or deny.", + "expect": "invalid", + "code": "schema.enum", + "path": "/spec/permissions/default" + }, + { + "id": "7.5-invalid-egress", + "file": "invalid/7.5-invalid-egress.yaml", + "section": "7.5.1", + "rule": "network.egress is allow or deny.", + "expect": "invalid", + "code": "schema.enum", + "path": "/spec/permissions/network/egress" + }, + { + "id": "7.5-tool-without-allow", + "file": "invalid/7.5-tool-without-allow.yaml", + "section": "7.5.1", + "rule": "permissions.tools entries REQUIRE allow.", + "expect": "invalid", + "code": "schema.required", + "path": "/spec/permissions/tools/tools.read" + }, + { + "id": "7.6-approver-empty", + "file": "invalid/7.6-approver-empty.yaml", + "section": "7.6", + "rule": "An approver has exactly one of role or user.", + "expect": "invalid", + "code": "schema.oneOf", + "path": "/spec/approval/approvers/0" + }, + { + "id": "7.6-approver-role-and-user", + "file": "invalid/7.6-approver-role-and-user.yaml", + "section": "7.6", + "rule": "An approver has exactly one of role or user.", + "expect": "invalid", + "code": "schema.oneOf", + "path": "/spec/approval/approvers/0" + }, + { + "id": "7.6-invalid-on-timeout", + "file": "invalid/7.6-invalid-on-timeout.yaml", + "section": "7.6", + "rule": "onTimeout is reject or fail.", + "expect": "invalid", + "code": "schema.enum", + "path": "/spec/approval/onTimeout" + }, + { + "id": "7.6-min-approvals-zero", + "file": "invalid/7.6-min-approvals-zero.yaml", + "section": "7.6", + "rule": "minApprovals is a positive integer.", + "expect": "invalid", + "code": "schema.minimum", + "path": "/spec/approval/minApprovals" + }, + { + "id": "7.6-required-for-invalid-key", + "file": "invalid/7.6-required-for-invalid-key.yaml", + "section": "7.6", + "rule": "requiredFor lists action keys.", + "expect": "invalid", + "code": "schema.pattern", + "path": "/spec/approval/requiredFor/0" + }, + { + "id": "7.8-unknown-separation-rule", + "file": "invalid/7.8-unknown-separation-rule.yaml", + "section": "7.8", + "rule": "Separation-of-duties rules are the defined rules only.", + "expect": "invalid", + "code": "schema.additionalProperties", + "path": "/spec/approval/separationOfDuties/rules/0/everyoneCanApprove" + }, + { + "id": "7.9-literal-password-in-free-form-value", + "file": "invalid/7.9-literal-password-in-free-form-value.yaml", + "section": "7.9", + "rule": "Credential-named fields are rejected anywhere outside x- extensions, also inside free-form values.", + "expect": "invalid", + "code": "secret.literal-field", + "path": "/spec/inputs/0/default/password" + }, + { + "id": "7.9-literal-token-field", + "file": "invalid/7.9-literal-token-field.yaml", + "section": "7.9", + "rule": "Fields named token, password, apiKey, secret or privateKey with a literal value are rejected (here: unknown field in auth).", + "expect": "invalid", + "code": "schema.additionalProperties", + "path": "/spec/mcpServers/0/auth/token" + }, + { + "id": "7.9-remote-agent-secret-ref-out-of-scope", + "file": "invalid/7.9-remote-agent-secret-ref-out-of-scope.yaml", + "section": "7.9", + "rule": "A remote agent credential is scoped to the agent id.", + "expect": "invalid", + "code": "secretRef.scope", + "path": "/spec/agents/1/auth/secretRef" + }, + { + "id": "7.9-secret-ref-empty-scope", + "file": "invalid/7.9-secret-ref-empty-scope.yaml", + "section": "7.9", + "rule": "The default scope is none.", + "expect": "invalid", + "code": "secretRef.scope", + "path": "/spec/mcpServers/0/auth/secretRef" + }, + { + "id": "7.9-secret-ref-out-of-scope", + "file": "invalid/7.9-secret-ref-out-of-scope.yaml", + "section": "7.9", + "rule": "The scope of the secret MUST include the consumer.", + "expect": "invalid", + "code": "secretRef.scope", + "path": "/spec/mcpServers/0/auth/secretRef" + }, + { + "id": "7.9-secret-ref-undeclared", + "file": "invalid/7.9-secret-ref-undeclared.yaml", + "section": "7.9", + "rule": "A secretRef MUST name a secret declared in spec.secrets.", + "expect": "invalid", + "code": "secretRef.undeclared", + "path": "/spec/mcpServers/0/auth/secretRef" + }, + { + "id": "7.9-secret-without-source", + "file": "invalid/7.9-secret-without-source.yaml", + "section": "7.9", + "rule": "A secret declaration REQUIRES name and source.", + "expect": "invalid", + "code": "schema.required", + "path": "/spec/secrets/0" + }, + { + "id": "7.10-environment-without-autonomy", + "file": "invalid/7.10-environment-without-autonomy.yaml", + "section": "7.10", + "rule": "Each environment REQUIRES autonomy.", + "expect": "invalid", + "code": "schema.required", + "path": "/spec/environments/production" + }, + { + "id": "7.10-invalid-autonomy", + "file": "invalid/7.10-invalid-autonomy.yaml", + "section": "7.10", + "rule": "autonomy is unrestricted, controlled, approval-required or prohibited.", + "expect": "invalid", + "code": "schema.enum", + "path": "/spec/environments/production/autonomy" + }, + { + "id": "8.1-include-without-version", + "file": "invalid/8.1-include-without-version.yaml", + "section": "8.1", + "rule": "include entries name a Policy by name and exact version.", + "expect": "invalid", + "code": "schema.required", + "path": "/spec/policies/include/0" + }, + { + "id": "8.1-shorthand-not-boolean", + "file": "invalid/8.1-shorthand-not-boolean.yaml", + "section": "8.1", + "rule": "Policy shorthands are booleans.", + "expect": "invalid", + "code": "schema.type", + "path": "/spec/policies/git/allowPush" + }, + { + "id": "8.1-unknown-shorthand", + "file": "invalid/8.1-unknown-shorthand.yaml", + "section": "8.1", + "rule": "Unknown shorthands are rejected.", + "expect": "invalid", + "code": "schema.additionalProperties", + "path": "/spec/policies/network" + }, + { + "id": "8.2-no-allow-effect", + "file": "invalid/8.2-no-allow-effect.yaml", + "section": "8.2", + "rule": "Policy rules can only restrict: effect is deny or requireApproval.", + "expect": "invalid", + "code": "schema.enum", + "path": "/spec/rules/0/effect" + }, + { + "id": "8.2-policy-without-rules", + "file": "invalid/8.2-policy-without-rules.yaml", + "section": "8.2", + "rule": "A Policy REQUIRES rules.", + "expect": "invalid", + "code": "schema.required", + "path": "/spec" + }, + { + "id": "8.2-require-approval-without-approval", + "file": "invalid/8.2-require-approval-without-approval.yaml", + "section": "8.2", + "rule": "approval is REQUIRED for requireApproval.", + "expect": "invalid", + "code": "schema.required", + "path": "/spec/rules/0" + }, + { + "id": "8.2-rule-without-when", + "file": "invalid/8.2-rule-without-when.yaml", + "section": "8.2", + "rule": "A rule REQUIRES when.", + "expect": "invalid", + "code": "schema.required", + "path": "/spec/rules/0" + }, + { + "id": "8.3-empty-when", + "file": "invalid/8.3-empty-when.yaml", + "section": "8.3", + "rule": "A condition has at least one attribute.", + "expect": "invalid", + "code": "schema.minProperties", + "path": "/spec/rules/0/when" + }, + { + "id": "8.3-in-not-a-list", + "file": "invalid/8.3-in-not-a-list.yaml", + "section": "8.3", + "rule": "in and notIn take lists.", + "expect": "invalid", + "code": "schema.type", + "path": "/spec/rules/0/when/destination.region/in" + }, + { + "id": "8.3-invalid-actor-type", + "file": "invalid/8.3-invalid-actor-type.yaml", + "section": "8.3", + "rule": "actor.type is agent, human, runtime or system.", + "expect": "invalid", + "code": "schema.enum", + "path": "/spec/rules/0/when/actor.type/equals" + }, + { + "id": "8.3-invalid-classification-value", + "file": "invalid/8.3-invalid-classification-value.yaml", + "section": "8.3", + "rule": "Classification values in conditions are data classes.", + "expect": "invalid", + "code": "schema.enum", + "path": "/spec/rules/0/when/data.classification/gte" + }, + { + "id": "8.3-ordering-operator-on-unordered-attribute", + "file": "invalid/8.3-ordering-operator-on-unordered-attribute.yaml", + "section": "8.3", + "rule": "gt, gte, lt, lte are for data.classification and risk.level only.", + "expect": "invalid", + "code": "schema.additionalProperties", + "path": "/spec/rules/0/when/action/gt" + }, + { + "id": "8.3-plain-condition-value", + "file": "invalid/8.3-plain-condition-value.yaml", + "section": "8.3", + "rule": "Each condition attribute maps to an operator object; the plain-value shorthand of v1alpha1 is removed.", + "expect": "invalid", + "code": "schema.type", + "path": "/spec/rules/0/when/action", + "profiles": [ + "core" + ] + }, + { + "id": "8.3-unknown-attribute", + "file": "invalid/8.3-unknown-attribute.yaml", + "section": "8.3", + "rule": "Only the defined attributes may be used in conditions.", + "expect": "invalid", + "code": "schema.additionalProperties", + "path": "/spec/rules/0/when/user.name" + }, + { + "id": "9.1-digest-mismatch", + "file": "invalid/9.1-digest-mismatch.yaml", + "section": "9.1", + "rule": "If spec.integrity.digest is present, runtimes verify it and reject on mismatch.", + "expect": "invalid", + "code": "digest.mismatch", + "path": "/spec/integrity/digest", + "verifyDigest": true + }, + { + "id": "9.4-unpinned-command-image-security-profile", + "file": "invalid/9.4-unpinned-command-image-security-profile.yaml", + "section": "9.4", + "rule": "Under the security profile command step images MUST be pinned by digest.", + "expect": "invalid", + "code": "security.image-not-pinned", + "path": "/spec/workflow/2/image" + }, + { + "id": "9.4-unpinned-mcp-image-security-profile", + "file": "invalid/9.4-unpinned-mcp-image-security-profile.yaml", + "section": "9.4", + "rule": "Under the security profile container images MUST be pinned by digest.", + "expect": "invalid", + "code": "security.image-not-pinned", + "path": "/spec/mcpServers/1/image" + }, + { + "id": "10.2-invalid-integrity-mode", + "file": "invalid/10.2-invalid-integrity-mode.yaml", + "section": "10.2", + "rule": "audit.integrity.mode is none, hash-chain or signed.", + "expect": "invalid", + "code": "schema.enum", + "path": "/spec/audit/integrity/mode" + }, + { + "id": "10.2-invalid-payload", + "file": "invalid/10.2-invalid-payload.yaml", + "section": "10.2", + "rule": "audit.payload is metadata or full.", + "expect": "invalid", + "code": "schema.enum", + "path": "/spec/audit/payload" + }, + { + "id": "10.2-invalid-retention", + "file": "invalid/10.2-invalid-retention.yaml", + "section": "10.2", + "rule": "retention.duration is a duration.", + "expect": "invalid", + "code": "schema.pattern", + "path": "/spec/audit/retention/duration" + }, + { + "id": "10.8-workflow-ref-version-not-semver", + "file": "invalid/10.8-workflow-ref-version-not-semver.yaml", + "section": "10.8", + "rule": "workflowRef.version is a semantic version.", + "expect": "invalid", + "code": "schema.pattern", + "path": "/spec/workflowRef/version" + }, + { + "id": "10.8-workflow-run-governance-field", + "file": "invalid/10.8-workflow-run-governance-field.yaml", + "section": "10.8", + "rule": "A WorkflowRun has no governance fields; they belong to the workflow.", + "expect": "invalid", + "code": "schema.additionalProperties", + "path": "/spec" + }, + { + "id": "10.8-workflow-run-without-name", + "file": "invalid/10.8-workflow-run-without-name.yaml", + "section": "10.8", + "rule": "metadata has name or generateName.", + "expect": "invalid", + "code": "schema.anyOf", + "path": "/metadata" + }, + { + "id": "10.8-workflow-run-without-workflow-ref", + "file": "invalid/10.8-workflow-run-without-workflow-ref.yaml", + "section": "10.8", + "rule": "spec.workflowRef is REQUIRED.", + "expect": "invalid", + "code": "schema.required", + "path": "/spec" + }, + { + "id": "3.1-json-serialization", + "file": "valid/3.1-json-serialization.json", + "section": "3.1", + "rule": "Manifests are representable as JSON and implementations accept JSON.", + "expect": "valid" + }, + { + "id": "3.1-multi-document", + "file": "valid/3.1-multi-document.yaml", + "section": "3.1", + "rule": "A file may contain several YAML documents; each is an independent manifest.", + "expect": "valid" + }, + { + "id": "3.2-minimal-workflow", + "file": "valid/3.2-minimal-workflow.yaml", + "section": "3.2", + "rule": "Minimal Workflow of the specification (hello); spec.classification is only REQUIRED under the governance profile.", + "expect": "valid", + "profiles": [ + "core" + ] + }, + { + "id": "3.2-status-and-store-metadata", + "file": "valid/3.2-status-and-store-metadata.yaml", + "section": "3.2", + "rule": "status and metadata fields populated by an object store are accepted and ignored.", + "expect": "valid", + "profiles": [ + "core" + ] + }, + { + "id": "3.3-core-profile-only", + "file": "valid/3.3-core-profile-only.yaml", + "section": "3.3", + "rule": "A manifest using only core fields is valid for a validator that supports only the core profile.", + "expect": "valid", + "profiles": [ + "core" + ] + }, + { + "id": "3.3-extension-fields", + "file": "valid/3.3-extension-fields.yaml", + "section": "3.3", + "rule": "Fields starting with x- may appear in any object and are ignored.", + "expect": "valid" + }, + { + "id": "3.6-durations", + "file": "valid/3.6-durations.yaml", + "section": "3.6", + "rule": "Durations use units ms, s, m, h, d, w, y and may be combined.", + "expect": "valid" + }, + { + "id": "3.9-expression-references", + "file": "valid/3.9-expression-references.yaml", + "section": "3.9", + "rule": "The allowed references are inputs., steps..outputs., execution.id, execution.environment.", + "expect": "valid" + }, + { + "id": "4-labels-and-annotations", + "file": "valid/4-labels-and-annotations.yaml", + "section": "4", + "rule": "labels and annotations are string maps with Kubernetes key syntax.", + "expect": "valid", + "profiles": [ + "core", + "mcp" + ] + }, + { + "id": "5.2-schedule-concurrency-and-deadline", + "file": "valid/5.2-schedule-concurrency-and-deadline.yaml", + "section": "5.2", + "rule": "A schedule trigger may set concurrencyPolicy and startingDeadline.", + "expect": "valid" + }, + { + "id": "5.2-triggers", + "file": "valid/5.2-triggers.yaml", + "section": "5.2", + "rule": "manual, schedule and event triggers.", + "expect": "valid" + }, + { + "id": "5.3-inputs", + "file": "valid/5.3-inputs.yaml", + "section": "5.3", + "rule": "Input declarations with all types; default matches type.", + "expect": "valid" + }, + { + "id": "5.4.2-agent-reference", + "file": "valid/5.4.2-agent-reference.yaml", + "section": "5.4.2", + "rule": "Agent reference with exact version and digest.", + "expect": "valid" + }, + { + "id": "5.4.4-remote-agent", + "file": "valid/5.4.4-remote-agent.yaml", + "section": "5.4.4", + "rule": "Remote A2A agent with HTTPS endpoint and a scoped secretRef.", + "expect": "valid" + }, + { + "id": "5.5.4-action-groups", + "file": "valid/5.5.4-action-groups.yaml", + "section": "5.5.4", + "rule": "Groups map concrete actions to well-known actions; groups hold only concrete actions.", + "expect": "valid" + }, + { + "id": "5.6.2-command-step-env", + "file": "valid/5.6.2-command-step-env.yaml", + "section": "5.6.2", + "rule": "Command steps receive values through env; the command text has no expressions.", + "expect": "valid" + }, + { + "id": "5.6.3-transitive-step-reference", + "file": "valid/5.6.3-transitive-step-reference.yaml", + "section": "5.6.3", + "rule": "A step may reference outputs of steps it depends on transitively.", + "expect": "valid" + }, + { + "id": "5.6.4-command-step-outputs", + "file": "valid/5.6.4-command-step-outputs.yaml", + "section": "5.6.4", + "rule": "A command step declares outputs whose names are valid file names in $AWP_OUTPUTS.", + "expect": "valid" + }, + { + "id": "5.6.5-for-each", + "file": "valid/5.6.5-for-each.yaml", + "section": "5.6.5", + "rule": "An agent or command step MAY iterate over an array input or a step output with forEach.", + "expect": "valid" + }, + { + "id": "5.7-nested-budgets", + "file": "valid/5.7-nested-budgets.yaml", + "section": "5.7", + "rule": "Budgets on workflow, agent and step; retries do not exceed maxRetries.", + "expect": "valid" + }, + { + "id": "5.8-agent-human-input", + "file": "valid/5.8-agent-human-input.yaml", + "section": "5.8", + "rule": "An agent with humanInput may ask a person during its step.", + "expect": "valid" + }, + { + "id": "5.8-agent-manifest-human-input", + "file": "valid/5.8-agent-manifest-human-input.yaml", + "section": "5.8", + "rule": "humanInput is also allowed in an Agent manifest.", + "expect": "valid" + }, + { + "id": "5.8-input-step-free-text", + "file": "valid/5.8-input-step-free-text.yaml", + "section": "5.8", + "rule": "Without answerSchema the answer is free text.", + "expect": "valid" + }, + { + "id": "5.8-input-step", + "file": "valid/5.8-input-step.yaml", + "section": "5.8", + "rule": "An input step asks named answerers, waits up to its timeout and provides the output answer.", + "expect": "valid" + }, + { + "id": "6-agent-manifest", + "file": "valid/6-agent-manifest.yaml", + "section": "6", + "rule": "A complete Agent manifest.", + "expect": "valid" + }, + { + "id": "6-agent-prompt-ref", + "file": "valid/6-agent-prompt-ref.yaml", + "section": "6", + "rule": "An Agent may use promptRef instead of instructions.", + "expect": "valid" + }, + { + "id": "7.2-data-and-model-policy", + "file": "valid/7.2-data-and-model-policy.yaml", + "section": "7.2", + "rule": "Data policy, residency, processing and model policy.", + "expect": "valid" + }, + { + "id": "7.5-permissions", + "file": "valid/7.5-permissions.yaml", + "section": "7.5", + "rule": "All permission fields, wildcard keys and resource scopes.", + "expect": "valid" + }, + { + "id": "7.6-approval-and-separation-of-duties", + "file": "valid/7.6-approval-and-separation-of-duties.yaml", + "section": "7.6", + "rule": "Workflow approval, approval step and separation of duties.", + "expect": "valid" + }, + { + "id": "7.10-environments", + "file": "valid/7.10-environments.yaml", + "section": "7.10", + "rule": "Environments with autonomy levels.", + "expect": "valid" + }, + { + "id": "8.1-policy-shorthands", + "file": "valid/8.1-policy-shorthands.yaml", + "section": "8.1", + "rule": "Policy shorthands and policy includes.", + "expect": "valid" + }, + { + "id": "8.2-policy-manifest", + "file": "valid/8.2-policy-manifest.yaml", + "section": "8.2", + "rule": "Policy manifest with requireApproval and deny rules.", + "expect": "valid" + }, + { + "id": "8.3-conditions", + "file": "valid/8.3-conditions.yaml", + "section": "8.3", + "rule": "All condition attributes and operators; ordering operators on ordered attributes.", + "expect": "valid" + }, + { + "id": "9.1-digest-ignores-deployment-fields", + "file": "valid/9.1-digest-ignores-deployment-fields.yaml", + "section": "9.1", + "rule": "The digest covers apiVersion, kind, metadata.name and spec without integrity, signature and provenance; namespace, labels, annotations and status do not change it.", + "expect": "valid", + "profiles": [ + "core" + ], + "verifyDigest": true + }, + { + "id": "9.1-digest-verified", + "file": "valid/9.1-digest-verified.yaml", + "section": "9.1", + "rule": "spec.integrity.digest matches the JCS digest of the manifest without integrity, signature and provenance.", + "expect": "valid", + "verifyDigest": true + }, + { + "id": "9.4-pinned-images-security-profile", + "file": "valid/9.4-pinned-images-security-profile.yaml", + "section": "9.4", + "rule": "Under the security profile images are pinned by digest.", + "expect": "valid" + }, + { + "id": "10.2-audit-configuration", + "file": "valid/10.2-audit-configuration.yaml", + "section": "10.2", + "rule": "Audit configuration.", + "expect": "valid" + }, + { + "id": "10.8-workflow-run-with-status", + "file": "valid/10.8-workflow-run-with-status.yaml", + "section": "10.8", + "rule": "A WorkflowRun may use generateName; validators ignore status written by the runtime.", + "expect": "valid" + }, + { + "id": "10.8-workflow-run", + "file": "valid/10.8-workflow-run.yaml", + "section": "10.8", + "rule": "A WorkflowRun requests one execution of a workflow with inputs and an environment.", + "expect": "valid" + }, + { + "id": "5.6.1-when-on-every-step-type", + "file": "valid/5.6.1-when-on-every-step-type.yaml", + "section": "5.6.1", + "rule": "when is allowed on agent, command, approval, input and workflow steps.", + "expect": "valid" + }, + { + "id": "5.6.1-when-exists-and-in", + "file": "valid/5.6.1-when-exists-and-in.yaml", + "section": "3.10", + "rule": "Conditions combine exists(), in with literal lists, comparisons and boolean operators.", + "expect": "valid" + }, + { + "id": "5.6.1-when-json-path-into-output", + "file": "valid/5.6.1-when-json-path-into-output.yaml", + "section": "3.10", + "rule": "Path segments after the output name select into the output parsed as JSON; a transitive dependency may be read.", + "expect": "valid" + }, + { + "id": "5.6.6-workflow-step-wait", + "file": "valid/5.6.6-workflow-step-wait.yaml", + "section": "5.6.6", + "rule": "A workflow step starts a child workflow with expression-enabled inputs, waits for it and provides executionId and status.", + "expect": "valid" + }, + { + "id": "5.6.6-workflow-step-no-wait", + "file": "valid/5.6.6-workflow-step-no-wait.yaml", + "section": "5.6.6", + "rule": "With wait: false the workflow step only starts the child execution.", + "expect": "valid" + }, + { + "id": "3.10-when-syntax", + "file": "invalid/3.10-when-syntax.yaml", + "section": "3.10", + "rule": "when MUST parse in the condition grammar.", + "expect": "invalid", + "code": "when.syntax", + "path": "/spec/workflow/1/when" + }, + { + "id": "3.10-when-too-long", + "file": "invalid/3.10-when-too-long.yaml", + "section": "3.10", + "rule": "A condition has at most 512 characters.", + "expect": "invalid", + "code": "schema.maxLength", + "path": "/spec/workflow/1/when" + }, + { + "id": "3.10-when-not-dependency", + "file": "invalid/3.10-when-not-dependency.yaml", + "section": "3.10", + "rule": "steps. in when MUST be a direct or transitive dependency.", + "expect": "invalid", + "code": "when.not-a-dependency", + "path": "/spec/workflow/2/when" + }, + { + "id": "3.10-when-undeclared-output", + "file": "invalid/3.10-when-undeclared-output.yaml", + "section": "3.10", + "rule": " in steps..outputs. MUST be a declared output of .", + "expect": "invalid", + "code": "when.undeclared-output", + "path": "/spec/workflow/1/when" + }, + { + "id": "3.10-when-forbidden-segment", + "file": "invalid/3.10-when-forbidden-segment.yaml", + "section": "3.10", + "rule": "Path segments __proto__, prototype and constructor MUST be rejected.", + "expect": "invalid", + "code": "when.forbidden-segment", + "path": "/spec/workflow/1/when" + }, + { + "id": "3.10-when-unknown-root", + "file": "invalid/3.10-when-unknown-root.yaml", + "section": "3.10", + "rule": "Conditions read only inputs, steps..outputs and execution.environment.", + "expect": "invalid", + "code": "when.unknown-root", + "path": "/spec/workflow/1/when" + }, + { + "id": "5.6.6-workflow-step-without-ref", + "file": "invalid/5.6.6-workflow-step-without-ref.yaml", + "section": "5.6.6", + "rule": "workflow.ref is REQUIRED.", + "expect": "invalid", + "code": "schema.required", + "path": "/spec/workflow/1/workflow" + }, + { + "id": "5.6.6-workflow-step-for-each", + "file": "invalid/5.6.6-workflow-step-for-each.yaml", + "section": "5.6.6", + "rule": "forEach is not allowed on a workflow step.", + "expect": "invalid", + "code": "schema.not", + "path": "/spec/workflow/1" + }, + { + "id": "5.6.6-workflow-step-output", + "file": "invalid/5.6.6-workflow-step-output.yaml", + "section": "5.6.6", + "rule": "A workflow step declares no outputs other than executionId and status.", + "expect": "invalid", + "code": "step.workflow-output", + "path": "/spec/workflow/1/outputs/1/name" + }, + { + "id": "5.6.6-workflow-ref-not-dns-label", + "file": "invalid/5.6.6-workflow-ref-not-dns-label.yaml", + "section": "5.6.6", + "rule": "workflow.ref is a DNS-1123 label like metadata.name.", + "expect": "invalid", + "code": "schema.pattern", + "path": "/spec/workflow/1/workflow/ref" + }, + { + "id": "5.6.6-workflow-step-agent", + "file": "invalid/5.6.6-workflow-step-agent.yaml", + "section": "5.6.6", + "rule": "A workflow step has no agent.", + "expect": "invalid", + "code": "schema.not", + "path": "/spec/workflow/1" + }, + { + "id": "5.6.6-workflow-inputs-expression", + "file": "invalid/5.6.6-workflow-inputs-expression.yaml", + "section": "3.9", + "rule": "workflow.inputs values are expression-enabled; other syntax is rejected.", + "expect": "invalid", + "code": "schema.pattern", + "path": "/spec/workflow/1/workflow/inputs/repoUrl" + } + ] +} diff --git a/conformance/v1alpha4/invalid/10.2-invalid-integrity-mode.yaml b/conformance/v1alpha4/invalid/10.2-invalid-integrity-mode.yaml new file mode 100644 index 0000000..76c62a9 --- /dev/null +++ b/conformance/v1alpha4/invalid/10.2-invalid-integrity-mode.yaml @@ -0,0 +1,66 @@ +# Conformance case 10.2-invalid-integrity-mode +# Spec section 10.2: audit.integrity.mode is none, hash-chain or signed. +# Expected: invalid (schema.enum at /spec/audit/integrity/mode) +apiVersion: awp.agenticworkflowprotocol.org/v1alpha4 +kind: Workflow +metadata: + name: conformance-base +spec: + version: 1.0.0 + owner: + team: conformance-team + classification: internal + risk: + level: low + inputs: + - name: repo + type: string + required: true + budget: + maxCostUsd: 1 + maxSteps: 10 + maxDuration: 10m + resources: + maxRetries: 2 + maxConcurrency: 1 + secrets: + - name: TOOLS_TOKEN + source: secret-manager + scope: + - tools + mcpServers: + - name: tools + transport: streamable-http + url: https://mcp.example.com/tools + auth: + secretRef: TOOLS_TOKEN + actionGroups: + tools.read: + - tools.read_file + agents: + - id: worker + model: + provider: ollama + name: qwen3 + tools: + - type: mcp + server: tools + workflow: + - id: analyze + agent: worker + task: Analyze ${{ inputs.repo }}. + outputs: + - name: report + - id: apply + agent: worker + task: Apply ${{ steps.analyze.outputs.report }}. + dependsOn: + - analyze + permissions: + default: deny + tools: + tools.read: + allow: true + audit: + integrity: + mode: blockchain diff --git a/conformance/v1alpha4/invalid/10.2-invalid-payload.yaml b/conformance/v1alpha4/invalid/10.2-invalid-payload.yaml new file mode 100644 index 0000000..0034fe7 --- /dev/null +++ b/conformance/v1alpha4/invalid/10.2-invalid-payload.yaml @@ -0,0 +1,65 @@ +# Conformance case 10.2-invalid-payload +# Spec section 10.2: audit.payload is metadata or full. +# Expected: invalid (schema.enum at /spec/audit/payload) +apiVersion: awp.agenticworkflowprotocol.org/v1alpha4 +kind: Workflow +metadata: + name: conformance-base +spec: + version: 1.0.0 + owner: + team: conformance-team + classification: internal + risk: + level: low + inputs: + - name: repo + type: string + required: true + budget: + maxCostUsd: 1 + maxSteps: 10 + maxDuration: 10m + resources: + maxRetries: 2 + maxConcurrency: 1 + secrets: + - name: TOOLS_TOKEN + source: secret-manager + scope: + - tools + mcpServers: + - name: tools + transport: streamable-http + url: https://mcp.example.com/tools + auth: + secretRef: TOOLS_TOKEN + actionGroups: + tools.read: + - tools.read_file + agents: + - id: worker + model: + provider: ollama + name: qwen3 + tools: + - type: mcp + server: tools + workflow: + - id: analyze + agent: worker + task: Analyze ${{ inputs.repo }}. + outputs: + - name: report + - id: apply + agent: worker + task: Apply ${{ steps.analyze.outputs.report }}. + dependsOn: + - analyze + permissions: + default: deny + tools: + tools.read: + allow: true + audit: + payload: verbose diff --git a/conformance/v1alpha4/invalid/10.2-invalid-retention.yaml b/conformance/v1alpha4/invalid/10.2-invalid-retention.yaml new file mode 100644 index 0000000..b1a23bd --- /dev/null +++ b/conformance/v1alpha4/invalid/10.2-invalid-retention.yaml @@ -0,0 +1,66 @@ +# Conformance case 10.2-invalid-retention +# Spec section 10.2: retention.duration is a duration. +# Expected: invalid (schema.pattern at /spec/audit/retention/duration) +apiVersion: awp.agenticworkflowprotocol.org/v1alpha4 +kind: Workflow +metadata: + name: conformance-base +spec: + version: 1.0.0 + owner: + team: conformance-team + classification: internal + risk: + level: low + inputs: + - name: repo + type: string + required: true + budget: + maxCostUsd: 1 + maxSteps: 10 + maxDuration: 10m + resources: + maxRetries: 2 + maxConcurrency: 1 + secrets: + - name: TOOLS_TOKEN + source: secret-manager + scope: + - tools + mcpServers: + - name: tools + transport: streamable-http + url: https://mcp.example.com/tools + auth: + secretRef: TOOLS_TOKEN + actionGroups: + tools.read: + - tools.read_file + agents: + - id: worker + model: + provider: ollama + name: qwen3 + tools: + - type: mcp + server: tools + workflow: + - id: analyze + agent: worker + task: Analyze ${{ inputs.repo }}. + outputs: + - name: report + - id: apply + agent: worker + task: Apply ${{ steps.analyze.outputs.report }}. + dependsOn: + - analyze + permissions: + default: deny + tools: + tools.read: + allow: true + audit: + retention: + duration: forever diff --git a/conformance/v1alpha4/invalid/10.8-workflow-ref-version-not-semver.yaml b/conformance/v1alpha4/invalid/10.8-workflow-ref-version-not-semver.yaml new file mode 100644 index 0000000..3a9328d --- /dev/null +++ b/conformance/v1alpha4/invalid/10.8-workflow-ref-version-not-semver.yaml @@ -0,0 +1,15 @@ +# Conformance case 10.8-workflow-ref-version-not-semver +# Spec section 10.8: workflowRef.version is a semantic version. +# Expected: invalid (schema.pattern at /spec/workflowRef/version) +apiVersion: awp.agenticworkflowprotocol.org/v1alpha4 +kind: WorkflowRun +metadata: + name: conformance-base-20261119 + namespace: conformance +spec: + workflowRef: + name: conformance-base + version: latest + inputs: + repo: example-org/web-shop + environment: staging diff --git a/conformance/v1alpha4/invalid/10.8-workflow-run-governance-field.yaml b/conformance/v1alpha4/invalid/10.8-workflow-run-governance-field.yaml new file mode 100644 index 0000000..8391cbf --- /dev/null +++ b/conformance/v1alpha4/invalid/10.8-workflow-run-governance-field.yaml @@ -0,0 +1,17 @@ +# Conformance case 10.8-workflow-run-governance-field +# Spec section 10.8: A WorkflowRun has no governance fields; they belong to the workflow. +# Expected: invalid (schema.additionalProperties at /spec) +apiVersion: awp.agenticworkflowprotocol.org/v1alpha4 +kind: WorkflowRun +metadata: + name: conformance-base-20261119 + namespace: conformance +spec: + workflowRef: + name: conformance-base + version: 1.0.0 + inputs: + repo: example-org/web-shop + environment: staging + owner: + team: conformance-team diff --git a/conformance/v1alpha4/invalid/10.8-workflow-run-without-name.yaml b/conformance/v1alpha4/invalid/10.8-workflow-run-without-name.yaml new file mode 100644 index 0000000..444cd46 --- /dev/null +++ b/conformance/v1alpha4/invalid/10.8-workflow-run-without-name.yaml @@ -0,0 +1,14 @@ +# Conformance case 10.8-workflow-run-without-name +# Spec section 10.8: metadata has name or generateName. +# Expected: invalid (schema.anyOf at /metadata) +apiVersion: awp.agenticworkflowprotocol.org/v1alpha4 +kind: WorkflowRun +metadata: + namespace: conformance +spec: + workflowRef: + name: conformance-base + version: 1.0.0 + inputs: + repo: example-org/web-shop + environment: staging diff --git a/conformance/v1alpha4/invalid/10.8-workflow-run-without-workflow-ref.yaml b/conformance/v1alpha4/invalid/10.8-workflow-run-without-workflow-ref.yaml new file mode 100644 index 0000000..4188b34 --- /dev/null +++ b/conformance/v1alpha4/invalid/10.8-workflow-run-without-workflow-ref.yaml @@ -0,0 +1,12 @@ +# Conformance case 10.8-workflow-run-without-workflow-ref +# Spec section 10.8: spec.workflowRef is REQUIRED. +# Expected: invalid (schema.required at /spec) +apiVersion: awp.agenticworkflowprotocol.org/v1alpha4 +kind: WorkflowRun +metadata: + name: conformance-base-20261119 + namespace: conformance +spec: + inputs: + repo: example-org/web-shop + environment: staging diff --git a/conformance/v1alpha4/invalid/3.1-custom-tag.yaml b/conformance/v1alpha4/invalid/3.1-custom-tag.yaml new file mode 100644 index 0000000..50e9ae6 --- /dev/null +++ b/conformance/v1alpha4/invalid/3.1-custom-tag.yaml @@ -0,0 +1,63 @@ +# Conformance case 3.1-custom-tag +# Spec section 3.1: YAML features without a JSON equivalent (custom tags) MUST be rejected. +# Expected: invalid (yaml.custom-tag at ) +apiVersion: awp.agenticworkflowprotocol.org/v1alpha4 +kind: Workflow +metadata: + name: !custom conformance-base + version: 1.0.0 + owner: + team: conformance-team + classification: internal + risk: + level: low +spec: + inputs: + - name: repo + type: string + required: true + budget: + maxCostUsd: 1 + maxSteps: 10 + maxDuration: 10m + resources: + maxRetries: 2 + maxConcurrency: 1 + secrets: + - name: TOOLS_TOKEN + source: secret-manager + scope: + - tools + mcpServers: + - name: tools + transport: streamable-http + url: https://mcp.example.com/tools + auth: + secretRef: TOOLS_TOKEN + actionGroups: + tools.read: + - tools.read_file + agents: + - id: worker + model: + provider: ollama + name: qwen3 + tools: + - type: mcp + server: tools + workflow: + - id: analyze + agent: worker + task: Analyze ${{ inputs.repo }}. + outputs: + - name: report + - id: apply + agent: worker + task: Apply ${{ steps.analyze.outputs.report }}. + dependsOn: + - analyze + permissions: + default: deny + tools: + tools.read: + allow: true diff --git a/conformance/v1alpha4/invalid/3.1-non-string-key.yaml b/conformance/v1alpha4/invalid/3.1-non-string-key.yaml new file mode 100644 index 0000000..0b4c4d3 --- /dev/null +++ b/conformance/v1alpha4/invalid/3.1-non-string-key.yaml @@ -0,0 +1,65 @@ +# Conformance case 3.1-non-string-key +# Spec section 3.1: YAML mapping keys MUST be strings. +# Expected: invalid (yaml.non-string-key at ) +apiVersion: awp.agenticworkflowprotocol.org/v1alpha4 +kind: Workflow +metadata: + name: conformance-base + version: 1.0.0 + owner: + team: conformance-team + classification: internal + risk: + level: low +spec: + inputs: + - name: repo + type: string + required: true + budget: + maxCostUsd: 1 + maxSteps: 10 + maxDuration: 10m + resources: + maxRetries: 2 + maxConcurrency: 1 + secrets: + - name: TOOLS_TOKEN + source: secret-manager + scope: + - tools + mcpServers: + - name: tools + transport: streamable-http + url: https://mcp.example.com/tools + auth: + secretRef: TOOLS_TOKEN + actionGroups: + tools.read: + - tools.read_file + agents: + - id: worker + model: + provider: ollama + name: qwen3 + tools: + - type: mcp + server: tools + workflow: + - id: analyze + agent: worker + task: Analyze ${{ inputs.repo }}. + outputs: + - name: report + - id: apply + agent: worker + task: Apply ${{ steps.analyze.outputs.report }}. + dependsOn: + - analyze + permissions: + default: deny + tools: + tools.read: + allow: true +x-extra: + 1: one diff --git a/conformance/v1alpha4/invalid/3.1-syntax-error.yaml b/conformance/v1alpha4/invalid/3.1-syntax-error.yaml new file mode 100644 index 0000000..9e369f2 --- /dev/null +++ b/conformance/v1alpha4/invalid/3.1-syntax-error.yaml @@ -0,0 +1,5 @@ +# Conformance case 3.1-syntax-error +# Spec section 3.1: A document that is not well-formed YAML is rejected. +# Expected: invalid (yaml.parse-error at ) +apiVersion: [unclosed +kind: Workflow diff --git a/conformance/v1alpha4/invalid/3.10-when-forbidden-segment.yaml b/conformance/v1alpha4/invalid/3.10-when-forbidden-segment.yaml new file mode 100644 index 0000000..c82499f --- /dev/null +++ b/conformance/v1alpha4/invalid/3.10-when-forbidden-segment.yaml @@ -0,0 +1,64 @@ +# Conformance case 3.10-when-forbidden-segment +# Spec section 3.10: Path segments __proto__, prototype and constructor MUST be rejected. +# Expected: invalid (when.forbidden-segment at /spec/workflow/1/when) +apiVersion: awp.agenticworkflowprotocol.org/v1alpha4 +kind: Workflow +metadata: + name: conformance-base +spec: + version: 1.0.0 + owner: + team: conformance-team + classification: internal + risk: + level: low + inputs: + - name: repo + type: string + required: true + budget: + maxCostUsd: 1 + maxSteps: 10 + maxDuration: 10m + resources: + maxRetries: 2 + maxConcurrency: 1 + secrets: + - name: TOOLS_TOKEN + source: secret-manager + scope: + - tools + mcpServers: + - name: tools + transport: streamable-http + url: https://mcp.example.com/tools + auth: + secretRef: TOOLS_TOKEN + actionGroups: + tools.read: + - tools.read_file + agents: + - id: worker + model: + provider: ollama + name: qwen3 + tools: + - type: mcp + server: tools + workflow: + - id: analyze + agent: worker + task: Analyze ${{ inputs.repo }}. + outputs: + - name: report + - id: apply + agent: worker + dependsOn: + - analyze + when: 'exists(steps.analyze.outputs.report.__proto__)' + task: Apply the report. + permissions: + default: deny + tools: + tools.read: + allow: true diff --git a/conformance/v1alpha4/invalid/3.10-when-not-dependency.yaml b/conformance/v1alpha4/invalid/3.10-when-not-dependency.yaml new file mode 100644 index 0000000..1aba83f --- /dev/null +++ b/conformance/v1alpha4/invalid/3.10-when-not-dependency.yaml @@ -0,0 +1,69 @@ +# Conformance case 3.10-when-not-dependency +# Spec section 3.10: steps. in when MUST be a direct or transitive dependency. +# Expected: invalid (when.not-a-dependency at /spec/workflow/2/when) +apiVersion: awp.agenticworkflowprotocol.org/v1alpha4 +kind: Workflow +metadata: + name: conformance-base +spec: + version: 1.0.0 + owner: + team: conformance-team + classification: internal + risk: + level: low + inputs: + - name: repo + type: string + required: true + budget: + maxCostUsd: 1 + maxSteps: 10 + maxDuration: 10m + resources: + maxRetries: 2 + maxConcurrency: 1 + secrets: + - name: TOOLS_TOKEN + source: secret-manager + scope: + - tools + mcpServers: + - name: tools + transport: streamable-http + url: https://mcp.example.com/tools + auth: + secretRef: TOOLS_TOKEN + actionGroups: + tools.read: + - tools.read_file + agents: + - id: worker + model: + provider: ollama + name: qwen3 + tools: + - type: mcp + server: tools + workflow: + - id: analyze + agent: worker + task: Analyze ${{ inputs.repo }}. + outputs: + - name: report + - id: plan + agent: worker + task: Plan the change. + outputs: + - name: plan + - id: apply + agent: worker + dependsOn: + - analyze + when: steps.plan.outputs.plan == "go" + task: Apply the report. + permissions: + default: deny + tools: + tools.read: + allow: true diff --git a/conformance/v1alpha4/invalid/3.10-when-syntax.yaml b/conformance/v1alpha4/invalid/3.10-when-syntax.yaml new file mode 100644 index 0000000..83d7747 --- /dev/null +++ b/conformance/v1alpha4/invalid/3.10-when-syntax.yaml @@ -0,0 +1,64 @@ +# Conformance case 3.10-when-syntax +# Spec section 3.10: when MUST parse in the condition grammar. +# Expected: invalid (when.syntax at /spec/workflow/1/when) +apiVersion: awp.agenticworkflowprotocol.org/v1alpha4 +kind: Workflow +metadata: + name: conformance-base +spec: + version: 1.0.0 + owner: + team: conformance-team + classification: internal + risk: + level: low + inputs: + - name: repo + type: string + required: true + budget: + maxCostUsd: 1 + maxSteps: 10 + maxDuration: 10m + resources: + maxRetries: 2 + maxConcurrency: 1 + secrets: + - name: TOOLS_TOKEN + source: secret-manager + scope: + - tools + mcpServers: + - name: tools + transport: streamable-http + url: https://mcp.example.com/tools + auth: + secretRef: TOOLS_TOKEN + actionGroups: + tools.read: + - tools.read_file + agents: + - id: worker + model: + provider: ollama + name: qwen3 + tools: + - type: mcp + server: tools + workflow: + - id: analyze + agent: worker + task: Analyze ${{ inputs.repo }}. + outputs: + - name: report + - id: apply + agent: worker + dependsOn: + - analyze + when: 'steps.analyze.outputs.report ==' + task: Apply the report. + permissions: + default: deny + tools: + tools.read: + allow: true diff --git a/conformance/v1alpha4/invalid/3.10-when-too-long.yaml b/conformance/v1alpha4/invalid/3.10-when-too-long.yaml new file mode 100644 index 0000000..8a847bc --- /dev/null +++ b/conformance/v1alpha4/invalid/3.10-when-too-long.yaml @@ -0,0 +1,64 @@ +# Conformance case 3.10-when-too-long +# Spec section 3.10: A condition has at most 512 characters. +# Expected: invalid (schema.maxLength at /spec/workflow/1/when) +apiVersion: awp.agenticworkflowprotocol.org/v1alpha4 +kind: Workflow +metadata: + name: conformance-base +spec: + version: 1.0.0 + owner: + team: conformance-team + classification: internal + risk: + level: low + inputs: + - name: repo + type: string + required: true + budget: + maxCostUsd: 1 + maxSteps: 10 + maxDuration: 10m + resources: + maxRetries: 2 + maxConcurrency: 1 + secrets: + - name: TOOLS_TOKEN + source: secret-manager + scope: + - tools + mcpServers: + - name: tools + transport: streamable-http + url: https://mcp.example.com/tools + auth: + secretRef: TOOLS_TOKEN + actionGroups: + tools.read: + - tools.read_file + agents: + - id: worker + model: + provider: ollama + name: qwen3 + tools: + - type: mcp + server: tools + workflow: + - id: analyze + agent: worker + task: Analyze ${{ inputs.repo }}. + outputs: + - name: report + - id: apply + agent: worker + dependsOn: + - analyze + when: 'steps.analyze.outputs.report == "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" || steps.analyze.outputs.report == "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb" || steps.analyze.outputs.report == "cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc"' + task: Apply the report. + permissions: + default: deny + tools: + tools.read: + allow: true diff --git a/conformance/v1alpha4/invalid/3.10-when-undeclared-output.yaml b/conformance/v1alpha4/invalid/3.10-when-undeclared-output.yaml new file mode 100644 index 0000000..0d2476b --- /dev/null +++ b/conformance/v1alpha4/invalid/3.10-when-undeclared-output.yaml @@ -0,0 +1,64 @@ +# Conformance case 3.10-when-undeclared-output +# Spec section 3.10: in steps..outputs. MUST be a declared output of . +# Expected: invalid (when.undeclared-output at /spec/workflow/1/when) +apiVersion: awp.agenticworkflowprotocol.org/v1alpha4 +kind: Workflow +metadata: + name: conformance-base +spec: + version: 1.0.0 + owner: + team: conformance-team + classification: internal + risk: + level: low + inputs: + - name: repo + type: string + required: true + budget: + maxCostUsd: 1 + maxSteps: 10 + maxDuration: 10m + resources: + maxRetries: 2 + maxConcurrency: 1 + secrets: + - name: TOOLS_TOKEN + source: secret-manager + scope: + - tools + mcpServers: + - name: tools + transport: streamable-http + url: https://mcp.example.com/tools + auth: + secretRef: TOOLS_TOKEN + actionGroups: + tools.read: + - tools.read_file + agents: + - id: worker + model: + provider: ollama + name: qwen3 + tools: + - type: mcp + server: tools + workflow: + - id: analyze + agent: worker + task: Analyze ${{ inputs.repo }}. + outputs: + - name: report + - id: apply + agent: worker + dependsOn: + - analyze + when: 'steps.analyze.outputs.severity == "high"' + task: Apply the report. + permissions: + default: deny + tools: + tools.read: + allow: true diff --git a/conformance/v1alpha4/invalid/3.10-when-unknown-root.yaml b/conformance/v1alpha4/invalid/3.10-when-unknown-root.yaml new file mode 100644 index 0000000..75d5bed --- /dev/null +++ b/conformance/v1alpha4/invalid/3.10-when-unknown-root.yaml @@ -0,0 +1,64 @@ +# Conformance case 3.10-when-unknown-root +# Spec section 3.10: Conditions read only inputs, steps..outputs and execution.environment. +# Expected: invalid (when.unknown-root at /spec/workflow/1/when) +apiVersion: awp.agenticworkflowprotocol.org/v1alpha4 +kind: Workflow +metadata: + name: conformance-base +spec: + version: 1.0.0 + owner: + team: conformance-team + classification: internal + risk: + level: low + inputs: + - name: repo + type: string + required: true + budget: + maxCostUsd: 1 + maxSteps: 10 + maxDuration: 10m + resources: + maxRetries: 2 + maxConcurrency: 1 + secrets: + - name: TOOLS_TOKEN + source: secret-manager + scope: + - tools + mcpServers: + - name: tools + transport: streamable-http + url: https://mcp.example.com/tools + auth: + secretRef: TOOLS_TOKEN + actionGroups: + tools.read: + - tools.read_file + agents: + - id: worker + model: + provider: ollama + name: qwen3 + tools: + - type: mcp + server: tools + workflow: + - id: analyze + agent: worker + task: Analyze ${{ inputs.repo }}. + outputs: + - name: report + - id: apply + agent: worker + dependsOn: + - analyze + when: 'event.action == "opened"' + task: Apply the report. + permissions: + default: deny + tools: + tools.read: + allow: true diff --git a/conformance/v1alpha4/invalid/3.2-missing-api-version.yaml b/conformance/v1alpha4/invalid/3.2-missing-api-version.yaml new file mode 100644 index 0000000..0f2985e --- /dev/null +++ b/conformance/v1alpha4/invalid/3.2-missing-api-version.yaml @@ -0,0 +1,62 @@ +# Conformance case 3.2-missing-api-version +# Spec section 3.2: apiVersion is REQUIRED. +# Expected: invalid (schema.required at ) +kind: Workflow +metadata: + name: conformance-base + version: 1.0.0 + owner: + team: conformance-team + classification: internal + risk: + level: low +spec: + inputs: + - name: repo + type: string + required: true + budget: + maxCostUsd: 1 + maxSteps: 10 + maxDuration: 10m + resources: + maxRetries: 2 + maxConcurrency: 1 + secrets: + - name: TOOLS_TOKEN + source: secret-manager + scope: + - tools + mcpServers: + - name: tools + transport: streamable-http + url: https://mcp.example.com/tools + auth: + secretRef: TOOLS_TOKEN + actionGroups: + tools.read: + - tools.read_file + agents: + - id: worker + model: + provider: ollama + name: qwen3 + tools: + - type: mcp + server: tools + workflow: + - id: analyze + agent: worker + task: Analyze ${{ inputs.repo }}. + outputs: + - name: report + - id: apply + agent: worker + task: Apply ${{ steps.analyze.outputs.report }}. + dependsOn: + - analyze + permissions: + default: deny + tools: + tools.read: + allow: true diff --git a/conformance/v1alpha4/invalid/3.2-missing-metadata.yaml b/conformance/v1alpha4/invalid/3.2-missing-metadata.yaml new file mode 100644 index 0000000..0225ae4 --- /dev/null +++ b/conformance/v1alpha4/invalid/3.2-missing-metadata.yaml @@ -0,0 +1,55 @@ +# Conformance case 3.2-missing-metadata +# Spec section 3.2: metadata is REQUIRED. +# Expected: invalid (schema.required at ) +apiVersion: awp.agenticworkflowprotocol.org/v1alpha4 +kind: Workflow +spec: + inputs: + - name: repo + type: string + required: true + budget: + maxCostUsd: 1 + maxSteps: 10 + maxDuration: 10m + resources: + maxRetries: 2 + maxConcurrency: 1 + secrets: + - name: TOOLS_TOKEN + source: secret-manager + scope: + - tools + mcpServers: + - name: tools + transport: streamable-http + url: https://mcp.example.com/tools + auth: + secretRef: TOOLS_TOKEN + actionGroups: + tools.read: + - tools.read_file + agents: + - id: worker + model: + provider: ollama + name: qwen3 + tools: + - type: mcp + server: tools + workflow: + - id: analyze + agent: worker + task: Analyze ${{ inputs.repo }}. + outputs: + - name: report + - id: apply + agent: worker + task: Apply ${{ steps.analyze.outputs.report }}. + dependsOn: + - analyze + permissions: + default: deny + tools: + tools.read: + allow: true diff --git a/conformance/v1alpha4/invalid/3.2-missing-spec.yaml b/conformance/v1alpha4/invalid/3.2-missing-spec.yaml new file mode 100644 index 0000000..494f5a8 --- /dev/null +++ b/conformance/v1alpha4/invalid/3.2-missing-spec.yaml @@ -0,0 +1,13 @@ +# Conformance case 3.2-missing-spec +# Spec section 3.2: spec is REQUIRED. +# Expected: invalid (schema.required at ) +apiVersion: awp.agenticworkflowprotocol.org/v1alpha4 +kind: Workflow +metadata: + name: conformance-base + version: 1.0.0 + owner: + team: conformance-team + classification: internal + risk: + level: low diff --git a/conformance/v1alpha4/invalid/3.2-unsupported-api-version.yaml b/conformance/v1alpha4/invalid/3.2-unsupported-api-version.yaml new file mode 100644 index 0000000..9ab0770 --- /dev/null +++ b/conformance/v1alpha4/invalid/3.2-unsupported-api-version.yaml @@ -0,0 +1,63 @@ +# Conformance case 3.2-unsupported-api-version +# Spec section 3.2: apiVersion MUST name a supported version. +# Expected: invalid (schema.const at /apiVersion) +apiVersion: awp.agenticworkflowprotocol.org/v9 +kind: Workflow +metadata: + name: conformance-base + version: 1.0.0 + owner: + team: conformance-team + classification: internal + risk: + level: low +spec: + inputs: + - name: repo + type: string + required: true + budget: + maxCostUsd: 1 + maxSteps: 10 + maxDuration: 10m + resources: + maxRetries: 2 + maxConcurrency: 1 + secrets: + - name: TOOLS_TOKEN + source: secret-manager + scope: + - tools + mcpServers: + - name: tools + transport: streamable-http + url: https://mcp.example.com/tools + auth: + secretRef: TOOLS_TOKEN + actionGroups: + tools.read: + - tools.read_file + agents: + - id: worker + model: + provider: ollama + name: qwen3 + tools: + - type: mcp + server: tools + workflow: + - id: analyze + agent: worker + task: Analyze ${{ inputs.repo }}. + outputs: + - name: report + - id: apply + agent: worker + task: Apply ${{ steps.analyze.outputs.report }}. + dependsOn: + - analyze + permissions: + default: deny + tools: + tools.read: + allow: true diff --git a/conformance/v1alpha4/invalid/3.2-unsupported-kind.yaml b/conformance/v1alpha4/invalid/3.2-unsupported-kind.yaml new file mode 100644 index 0000000..ace6871 --- /dev/null +++ b/conformance/v1alpha4/invalid/3.2-unsupported-kind.yaml @@ -0,0 +1,63 @@ +# Conformance case 3.2-unsupported-kind +# Spec section 3.2: kind MUST be Workflow, Agent or Policy. +# Expected: invalid (schema.enum at /kind) +apiVersion: awp.agenticworkflowprotocol.org/v1alpha4 +kind: Pipeline +metadata: + name: conformance-base +spec: + version: 1.0.0 + owner: + team: conformance-team + classification: internal + risk: + level: low + inputs: + - name: repo + type: string + required: true + budget: + maxCostUsd: 1 + maxSteps: 10 + maxDuration: 10m + resources: + maxRetries: 2 + maxConcurrency: 1 + secrets: + - name: TOOLS_TOKEN + source: secret-manager + scope: + - tools + mcpServers: + - name: tools + transport: streamable-http + url: https://mcp.example.com/tools + auth: + secretRef: TOOLS_TOKEN + actionGroups: + tools.read: + - tools.read_file + agents: + - id: worker + model: + provider: ollama + name: qwen3 + tools: + - type: mcp + server: tools + workflow: + - id: analyze + agent: worker + task: Analyze ${{ inputs.repo }}. + outputs: + - name: report + - id: apply + agent: worker + task: Apply ${{ steps.analyze.outputs.report }}. + dependsOn: + - analyze + permissions: + default: deny + tools: + tools.read: + allow: true diff --git a/conformance/v1alpha4/invalid/3.3-extension-field-outside-extensions.yaml b/conformance/v1alpha4/invalid/3.3-extension-field-outside-extensions.yaml new file mode 100644 index 0000000..be318e3 --- /dev/null +++ b/conformance/v1alpha4/invalid/3.3-extension-field-outside-extensions.yaml @@ -0,0 +1,22 @@ +# Conformance case 3.3-extension-field-outside-extensions +# Spec section 3.3: Extension fields are placed in an extensions object; an x- field on the object itself is unknown. +# Expected: invalid (schema.additionalProperties at /spec/workflow/0/x-example-mode) +# Profiles supported by the validator for this case: core +apiVersion: awp.agenticworkflowprotocol.org/v1alpha4 +kind: Workflow +metadata: + name: hello +spec: + version: 0.1.0 + owner: + team: platform-team + agents: + - id: assistant + model: + provider: ollama + name: qwen3 + workflow: + - id: greet + agent: assistant + task: Say hello. + x-example-mode: fast diff --git a/conformance/v1alpha4/invalid/3.3-extension-key-without-prefix.yaml b/conformance/v1alpha4/invalid/3.3-extension-key-without-prefix.yaml new file mode 100644 index 0000000..c93350e --- /dev/null +++ b/conformance/v1alpha4/invalid/3.3-extension-key-without-prefix.yaml @@ -0,0 +1,23 @@ +# Conformance case 3.3-extension-key-without-prefix +# Spec section 3.3: Keys of extensions start with x-. +# Expected: invalid (schema.propertyNames at /spec/extensions/mode) +# Profiles supported by the validator for this case: core +apiVersion: awp.agenticworkflowprotocol.org/v1alpha4 +kind: Workflow +metadata: + name: hello +spec: + version: 0.1.0 + owner: + team: platform-team + agents: + - id: assistant + model: + provider: ollama + name: qwen3 + workflow: + - id: greet + agent: assistant + task: Say hello. + extensions: + mode: fast diff --git a/conformance/v1alpha4/invalid/3.3-profile-a2a-agent.yaml b/conformance/v1alpha4/invalid/3.3-profile-a2a-agent.yaml new file mode 100644 index 0000000..601d03d --- /dev/null +++ b/conformance/v1alpha4/invalid/3.3-profile-a2a-agent.yaml @@ -0,0 +1,67 @@ +# Conformance case 3.3-profile-a2a-agent +# Spec section 3.3: Agents with protocol a2a belong to the a2a profile. +# Expected: invalid (profile.unsupported at /spec/agents/1) +# Profiles supported by the validator for this case: core, mcp +apiVersion: awp.agenticworkflowprotocol.org/v1alpha4 +kind: Workflow +metadata: + name: conformance-base +spec: + version: 1.0.0 + owner: + team: conformance-team + classification: internal + risk: + level: low + inputs: + - name: repo + type: string + required: true + budget: + maxCostUsd: 1 + maxSteps: 10 + maxDuration: 10m + resources: + maxRetries: 2 + maxConcurrency: 1 + secrets: + - name: TOOLS_TOKEN + source: secret-manager + scope: + - tools + mcpServers: + - name: tools + transport: streamable-http + url: https://mcp.example.com/tools + auth: + secretRef: TOOLS_TOKEN + actionGroups: + tools.read: + - tools.read_file + agents: + - id: worker + model: + provider: ollama + name: qwen3 + tools: + - type: mcp + server: tools + - id: remote + protocol: a2a + endpoint: https://agents.example.com/a2a + workflow: + - id: analyze + agent: worker + task: Analyze ${{ inputs.repo }}. + outputs: + - name: report + - id: apply + agent: worker + task: Apply ${{ steps.analyze.outputs.report }}. + dependsOn: + - analyze + permissions: + default: deny + tools: + tools.read: + allow: true diff --git a/conformance/v1alpha4/invalid/3.3-profile-approval-step.yaml b/conformance/v1alpha4/invalid/3.3-profile-approval-step.yaml new file mode 100644 index 0000000..99112b9 --- /dev/null +++ b/conformance/v1alpha4/invalid/3.3-profile-approval-step.yaml @@ -0,0 +1,71 @@ +# Conformance case 3.3-profile-approval-step +# Spec section 3.3: Steps with type approval belong to the governance profile. +# Expected: invalid (profile.unsupported at /spec/workflow/2) +# Profiles supported by the validator for this case: core, mcp +apiVersion: awp.agenticworkflowprotocol.org/v1alpha4 +kind: Workflow +metadata: + name: conformance-base +spec: + version: 1.0.0 + owner: + team: conformance-team + classification: internal + risk: + level: low + inputs: + - name: repo + type: string + required: true + budget: + maxCostUsd: 1 + maxSteps: 10 + maxDuration: 10m + resources: + maxRetries: 2 + maxConcurrency: 1 + secrets: + - name: TOOLS_TOKEN + source: secret-manager + scope: + - tools + mcpServers: + - name: tools + transport: streamable-http + url: https://mcp.example.com/tools + auth: + secretRef: TOOLS_TOKEN + actionGroups: + tools.read: + - tools.read_file + agents: + - id: worker + model: + provider: ollama + name: qwen3 + tools: + - type: mcp + server: tools + workflow: + - id: analyze + agent: worker + task: Analyze ${{ inputs.repo }}. + outputs: + - name: report + - id: apply + agent: worker + task: Apply ${{ steps.analyze.outputs.report }}. + dependsOn: + - analyze + - id: gate + type: approval + approval: + approvers: + - role: x + dependsOn: + - apply + permissions: + default: deny + tools: + tools.read: + allow: true diff --git a/conformance/v1alpha4/invalid/3.3-profile-audit-field.yaml b/conformance/v1alpha4/invalid/3.3-profile-audit-field.yaml new file mode 100644 index 0000000..3c44214 --- /dev/null +++ b/conformance/v1alpha4/invalid/3.3-profile-audit-field.yaml @@ -0,0 +1,66 @@ +# Conformance case 3.3-profile-audit-field +# Spec section 3.3: spec.audit belongs to the audit profile. +# Expected: invalid (profile.unsupported at /spec/audit) +# Profiles supported by the validator for this case: core, mcp +apiVersion: awp.agenticworkflowprotocol.org/v1alpha4 +kind: Workflow +metadata: + name: conformance-base +spec: + version: 1.0.0 + owner: + team: conformance-team + classification: internal + risk: + level: low + inputs: + - name: repo + type: string + required: true + budget: + maxCostUsd: 1 + maxSteps: 10 + maxDuration: 10m + resources: + maxRetries: 2 + maxConcurrency: 1 + secrets: + - name: TOOLS_TOKEN + source: secret-manager + scope: + - tools + mcpServers: + - name: tools + transport: streamable-http + url: https://mcp.example.com/tools + auth: + secretRef: TOOLS_TOKEN + actionGroups: + tools.read: + - tools.read_file + agents: + - id: worker + model: + provider: ollama + name: qwen3 + tools: + - type: mcp + server: tools + workflow: + - id: analyze + agent: worker + task: Analyze ${{ inputs.repo }}. + outputs: + - name: report + - id: apply + agent: worker + task: Apply ${{ steps.analyze.outputs.report }}. + dependsOn: + - analyze + permissions: + default: deny + tools: + tools.read: + allow: true + audit: + enabled: true diff --git a/conformance/v1alpha4/invalid/3.3-profile-governance-field.yaml b/conformance/v1alpha4/invalid/3.3-profile-governance-field.yaml new file mode 100644 index 0000000..7943b4b --- /dev/null +++ b/conformance/v1alpha4/invalid/3.3-profile-governance-field.yaml @@ -0,0 +1,67 @@ +# Conformance case 3.3-profile-governance-field +# Spec section 3.3: A field of a profile the implementation does not support MUST be rejected naming field and profile (spec.approval, governance). +# Expected: invalid (profile.unsupported at /spec/approval) +# Profiles supported by the validator for this case: core, mcp +apiVersion: awp.agenticworkflowprotocol.org/v1alpha4 +kind: Workflow +metadata: + name: conformance-base +spec: + version: 1.0.0 + owner: + team: conformance-team + classification: internal + risk: + level: low + inputs: + - name: repo + type: string + required: true + budget: + maxCostUsd: 1 + maxSteps: 10 + maxDuration: 10m + resources: + maxRetries: 2 + maxConcurrency: 1 + secrets: + - name: TOOLS_TOKEN + source: secret-manager + scope: + - tools + mcpServers: + - name: tools + transport: streamable-http + url: https://mcp.example.com/tools + auth: + secretRef: TOOLS_TOKEN + actionGroups: + tools.read: + - tools.read_file + agents: + - id: worker + model: + provider: ollama + name: qwen3 + tools: + - type: mcp + server: tools + workflow: + - id: analyze + agent: worker + task: Analyze ${{ inputs.repo }}. + outputs: + - name: report + - id: apply + agent: worker + task: Apply ${{ steps.analyze.outputs.report }}. + dependsOn: + - analyze + permissions: + default: deny + tools: + tools.read: + allow: true + approval: + requiredFor: + - git.merge diff --git a/conformance/v1alpha4/invalid/3.3-profile-high-risk.yaml b/conformance/v1alpha4/invalid/3.3-profile-high-risk.yaml new file mode 100644 index 0000000..b865336 --- /dev/null +++ b/conformance/v1alpha4/invalid/3.3-profile-high-risk.yaml @@ -0,0 +1,64 @@ +# Conformance case 3.3-profile-high-risk +# Spec section 3.3: spec.risk.level high or critical belongs to the governance profile. +# Expected: invalid (profile.unsupported at /spec/risk/level) +# Profiles supported by the validator for this case: core, mcp +apiVersion: awp.agenticworkflowprotocol.org/v1alpha4 +kind: Workflow +metadata: + name: conformance-base +spec: + version: 1.0.0 + owner: + team: conformance-team + classification: internal + risk: + level: high + inputs: + - name: repo + type: string + required: true + budget: + maxCostUsd: 1 + maxSteps: 10 + maxDuration: 10m + resources: + maxRetries: 2 + maxConcurrency: 1 + secrets: + - name: TOOLS_TOKEN + source: secret-manager + scope: + - tools + mcpServers: + - name: tools + transport: streamable-http + url: https://mcp.example.com/tools + auth: + secretRef: TOOLS_TOKEN + actionGroups: + tools.read: + - tools.read_file + agents: + - id: worker + model: + provider: ollama + name: qwen3 + tools: + - type: mcp + server: tools + workflow: + - id: analyze + agent: worker + task: Analyze ${{ inputs.repo }}. + outputs: + - name: report + - id: apply + agent: worker + task: Apply ${{ steps.analyze.outputs.report }}. + dependsOn: + - analyze + permissions: + default: deny + tools: + tools.read: + allow: true diff --git a/conformance/v1alpha4/invalid/3.3-profile-interaction-step.yaml b/conformance/v1alpha4/invalid/3.3-profile-interaction-step.yaml new file mode 100644 index 0000000..4a1a5e5 --- /dev/null +++ b/conformance/v1alpha4/invalid/3.3-profile-interaction-step.yaml @@ -0,0 +1,83 @@ +# Conformance case 3.3-profile-interaction-step +# Spec section 3.3: Steps with type input belong to the interaction profile. +# Expected: invalid (profile.unsupported at /spec/workflow/1) +# Profiles supported by the validator for this case: core, governance, audit, security, mcp, a2a +apiVersion: awp.agenticworkflowprotocol.org/v1alpha4 +kind: Workflow +metadata: + name: conformance-base +spec: + version: 1.0.0 + owner: + team: conformance-team + classification: internal + risk: + level: low + inputs: + - name: repo + type: string + default: example-org/web-shop + budget: + maxCostUsd: 1 + maxSteps: 10 + maxDuration: 10m + resources: + maxRetries: 2 + maxConcurrency: 1 + secrets: + - name: TOOLS_TOKEN + source: secret-manager + scope: + - tools + mcpServers: + - name: tools + transport: streamable-http + url: https://mcp.example.com/tools + auth: + secretRef: TOOLS_TOKEN + actionGroups: + tools.read: + - tools.read_file + agents: + - id: worker + model: + provider: ollama + name: qwen3 + tools: + - type: mcp + server: tools + workflow: + - id: analyze + agent: worker + task: Analyze ${{ inputs.repo }}. + outputs: + - name: report + - id: ask-targets + type: input + dependsOn: + - analyze + input: + message: Which targets should ${{ steps.analyze.outputs.report }} be applied to? + answerers: + - role: release-manager + timeout: 4h + - id: apply + agent: worker + task: Apply ${{ steps.analyze.outputs.report }} to ${{ steps.ask-targets.outputs.answer }}. + dependsOn: + - ask-targets + permissions: + default: deny + tools: + tools.read: + allow: true + triggers: + - type: manual + - type: schedule + cron: 0 6 * * 1-5 + timezone: Europe/Berlin + - type: event + source: git.example.com + eventType: pull_request.opened + filter: + repository: example-org/web-shop diff --git a/conformance/v1alpha4/invalid/3.3-profile-mcp-field.yaml b/conformance/v1alpha4/invalid/3.3-profile-mcp-field.yaml new file mode 100644 index 0000000..801bcd5 --- /dev/null +++ b/conformance/v1alpha4/invalid/3.3-profile-mcp-field.yaml @@ -0,0 +1,64 @@ +# Conformance case 3.3-profile-mcp-field +# Spec section 3.3: spec.mcpServers belongs to the mcp profile. +# Expected: invalid (profile.unsupported at /spec/mcpServers) +# Profiles supported by the validator for this case: core +apiVersion: awp.agenticworkflowprotocol.org/v1alpha4 +kind: Workflow +metadata: + name: conformance-base +spec: + version: 1.0.0 + owner: + team: conformance-team + classification: internal + risk: + level: low + inputs: + - name: repo + type: string + required: true + budget: + maxCostUsd: 1 + maxSteps: 10 + maxDuration: 10m + resources: + maxRetries: 2 + maxConcurrency: 1 + secrets: + - name: TOOLS_TOKEN + source: secret-manager + scope: + - tools + mcpServers: + - name: tools + transport: streamable-http + url: https://mcp.example.com/tools + auth: + secretRef: TOOLS_TOKEN + actionGroups: + tools.read: + - tools.read_file + agents: + - id: worker + model: + provider: ollama + name: qwen3 + tools: + - type: mcp + server: tools + workflow: + - id: analyze + agent: worker + task: Analyze ${{ inputs.repo }}. + outputs: + - name: report + - id: apply + agent: worker + task: Apply ${{ steps.analyze.outputs.report }}. + dependsOn: + - analyze + permissions: + default: deny + tools: + tools.read: + allow: true diff --git a/conformance/v1alpha4/invalid/3.3-profile-policy-kind.yaml b/conformance/v1alpha4/invalid/3.3-profile-policy-kind.yaml new file mode 100644 index 0000000..ffacf43 --- /dev/null +++ b/conformance/v1alpha4/invalid/3.3-profile-policy-kind.yaml @@ -0,0 +1,21 @@ +# Conformance case 3.3-profile-policy-kind +# Spec section 3.3: Policy manifests belong to the governance profile. +# Expected: invalid (profile.unsupported at /kind) +# Profiles supported by the validator for this case: core +apiVersion: awp.agenticworkflowprotocol.org/v1alpha4 +kind: Policy +metadata: + name: conformance-policy +spec: + version: 1.0.0 + owner: + team: governance-team + rules: + - id: deploy-needs-approval + when: + action: + equals: production.deploy + effect: requireApproval + approval: + approvers: + - role: release-manager diff --git a/conformance/v1alpha4/invalid/3.3-profile-security-field.yaml b/conformance/v1alpha4/invalid/3.3-profile-security-field.yaml new file mode 100644 index 0000000..8c07a49 --- /dev/null +++ b/conformance/v1alpha4/invalid/3.3-profile-security-field.yaml @@ -0,0 +1,67 @@ +# Conformance case 3.3-profile-security-field +# Spec section 3.3: spec.signature belongs to the security profile. +# Expected: invalid (profile.unsupported at /spec/signature) +# Profiles supported by the validator for this case: core, mcp +apiVersion: awp.agenticworkflowprotocol.org/v1alpha4 +kind: Workflow +metadata: + name: conformance-base +spec: + version: 1.0.0 + owner: + team: conformance-team + classification: internal + risk: + level: low + signature: + format: jws + ref: https://registry.example.com/s + inputs: + - name: repo + type: string + required: true + budget: + maxCostUsd: 1 + maxSteps: 10 + maxDuration: 10m + resources: + maxRetries: 2 + maxConcurrency: 1 + secrets: + - name: TOOLS_TOKEN + source: secret-manager + scope: + - tools + mcpServers: + - name: tools + transport: streamable-http + url: https://mcp.example.com/tools + auth: + secretRef: TOOLS_TOKEN + actionGroups: + tools.read: + - tools.read_file + agents: + - id: worker + model: + provider: ollama + name: qwen3 + tools: + - type: mcp + server: tools + workflow: + - id: analyze + agent: worker + task: Analyze ${{ inputs.repo }}. + outputs: + - name: report + - id: apply + agent: worker + task: Apply ${{ steps.analyze.outputs.report }}. + dependsOn: + - analyze + permissions: + default: deny + tools: + tools.read: + allow: true diff --git a/conformance/v1alpha4/invalid/3.3-unknown-field-near-extension.yaml b/conformance/v1alpha4/invalid/3.3-unknown-field-near-extension.yaml new file mode 100644 index 0000000..bc5baac --- /dev/null +++ b/conformance/v1alpha4/invalid/3.3-unknown-field-near-extension.yaml @@ -0,0 +1,64 @@ +# Conformance case 3.3-unknown-field-near-extension +# Spec section 3.3: Only the prefix x- marks an extension; x_foo and X-foo are unknown fields. +# Expected: invalid (schema.additionalProperties at /spec/X-foo) +apiVersion: awp.agenticworkflowprotocol.org/v1alpha4 +kind: Workflow +metadata: + name: conformance-base +spec: + version: 1.0.0 + owner: + team: conformance-team + classification: internal + risk: + level: low + inputs: + - name: repo + type: string + required: true + budget: + maxCostUsd: 1 + maxSteps: 10 + maxDuration: 10m + resources: + maxRetries: 2 + maxConcurrency: 1 + secrets: + - name: TOOLS_TOKEN + source: secret-manager + scope: + - tools + mcpServers: + - name: tools + transport: streamable-http + url: https://mcp.example.com/tools + auth: + secretRef: TOOLS_TOKEN + actionGroups: + tools.read: + - tools.read_file + agents: + - id: worker + model: + provider: ollama + name: qwen3 + tools: + - type: mcp + server: tools + workflow: + - id: analyze + agent: worker + task: Analyze ${{ inputs.repo }}. + outputs: + - name: report + - id: apply + agent: worker + task: Apply ${{ steps.analyze.outputs.report }}. + dependsOn: + - analyze + permissions: + default: deny + tools: + tools.read: + allow: true + X-foo: 1 diff --git a/conformance/v1alpha4/invalid/3.3-unknown-metadata-field.yaml b/conformance/v1alpha4/invalid/3.3-unknown-metadata-field.yaml new file mode 100644 index 0000000..f16b9cb --- /dev/null +++ b/conformance/v1alpha4/invalid/3.3-unknown-metadata-field.yaml @@ -0,0 +1,64 @@ +# Conformance case 3.3-unknown-metadata-field +# Spec section 3.3: Unknown fields MUST be rejected (metadata). +# Expected: invalid (schema.additionalProperties at /metadata/team) +apiVersion: awp.agenticworkflowprotocol.org/v1alpha4 +kind: Workflow +metadata: + name: conformance-base + team: x +spec: + version: 1.0.0 + owner: + team: conformance-team + classification: internal + risk: + level: low + inputs: + - name: repo + type: string + required: true + budget: + maxCostUsd: 1 + maxSteps: 10 + maxDuration: 10m + resources: + maxRetries: 2 + maxConcurrency: 1 + secrets: + - name: TOOLS_TOKEN + source: secret-manager + scope: + - tools + mcpServers: + - name: tools + transport: streamable-http + url: https://mcp.example.com/tools + auth: + secretRef: TOOLS_TOKEN + actionGroups: + tools.read: + - tools.read_file + agents: + - id: worker + model: + provider: ollama + name: qwen3 + tools: + - type: mcp + server: tools + workflow: + - id: analyze + agent: worker + task: Analyze ${{ inputs.repo }}. + outputs: + - name: report + - id: apply + agent: worker + task: Apply ${{ steps.analyze.outputs.report }}. + dependsOn: + - analyze + permissions: + default: deny + tools: + tools.read: + allow: true diff --git a/conformance/v1alpha4/invalid/3.3-unknown-step-field.yaml b/conformance/v1alpha4/invalid/3.3-unknown-step-field.yaml new file mode 100644 index 0000000..245b8c2 --- /dev/null +++ b/conformance/v1alpha4/invalid/3.3-unknown-step-field.yaml @@ -0,0 +1,64 @@ +# Conformance case 3.3-unknown-step-field +# Spec section 3.3: Unknown fields MUST be rejected (nested in a list entry). +# Expected: invalid (schema.additionalProperties at /spec/workflow/0/parallel) +apiVersion: awp.agenticworkflowprotocol.org/v1alpha4 +kind: Workflow +metadata: + name: conformance-base +spec: + version: 1.0.0 + owner: + team: conformance-team + classification: internal + risk: + level: low + inputs: + - name: repo + type: string + required: true + budget: + maxCostUsd: 1 + maxSteps: 10 + maxDuration: 10m + resources: + maxRetries: 2 + maxConcurrency: 1 + secrets: + - name: TOOLS_TOKEN + source: secret-manager + scope: + - tools + mcpServers: + - name: tools + transport: streamable-http + url: https://mcp.example.com/tools + auth: + secretRef: TOOLS_TOKEN + actionGroups: + tools.read: + - tools.read_file + agents: + - id: worker + model: + provider: ollama + name: qwen3 + tools: + - type: mcp + server: tools + workflow: + - id: analyze + agent: worker + task: Analyze ${{ inputs.repo }}. + outputs: + - name: report + parallel: true + - id: apply + agent: worker + task: Apply ${{ steps.analyze.outputs.report }}. + dependsOn: + - analyze + permissions: + default: deny + tools: + tools.read: + allow: true diff --git a/conformance/v1alpha4/invalid/3.3-unknown-top-level-field.yaml b/conformance/v1alpha4/invalid/3.3-unknown-top-level-field.yaml new file mode 100644 index 0000000..1f7ed47 --- /dev/null +++ b/conformance/v1alpha4/invalid/3.3-unknown-top-level-field.yaml @@ -0,0 +1,64 @@ +# Conformance case 3.3-unknown-top-level-field +# Spec section 3.3: Unknown fields MUST be rejected (top level; status is reserved, not unknown). +# Expected: invalid (schema.additionalProperties at /data) +apiVersion: awp.agenticworkflowprotocol.org/v1alpha4 +kind: Workflow +metadata: + name: conformance-base +spec: + version: 1.0.0 + owner: + team: conformance-team + classification: internal + risk: + level: low + inputs: + - name: repo + type: string + required: true + budget: + maxCostUsd: 1 + maxSteps: 10 + maxDuration: 10m + resources: + maxRetries: 2 + maxConcurrency: 1 + secrets: + - name: TOOLS_TOKEN + source: secret-manager + scope: + - tools + mcpServers: + - name: tools + transport: streamable-http + url: https://mcp.example.com/tools + auth: + secretRef: TOOLS_TOKEN + actionGroups: + tools.read: + - tools.read_file + agents: + - id: worker + model: + provider: ollama + name: qwen3 + tools: + - type: mcp + server: tools + workflow: + - id: analyze + agent: worker + task: Analyze ${{ inputs.repo }}. + outputs: + - name: report + - id: apply + agent: worker + task: Apply ${{ steps.analyze.outputs.report }}. + dependsOn: + - analyze + permissions: + default: deny + tools: + tools.read: + allow: true +data: x diff --git a/conformance/v1alpha4/invalid/3.4-duplicate-agent-id.yaml b/conformance/v1alpha4/invalid/3.4-duplicate-agent-id.yaml new file mode 100644 index 0000000..2e448d3 --- /dev/null +++ b/conformance/v1alpha4/invalid/3.4-duplicate-agent-id.yaml @@ -0,0 +1,70 @@ +# Conformance case 3.4-duplicate-agent-id +# Spec section 3.4: Identifiers MUST be unique within their list (agents). +# Expected: invalid (id.duplicate at /spec/agents/1/id) +apiVersion: awp.agenticworkflowprotocol.org/v1alpha4 +kind: Workflow +metadata: + name: conformance-base +spec: + version: 1.0.0 + owner: + team: conformance-team + classification: internal + risk: + level: low + inputs: + - name: repo + type: string + required: true + budget: + maxCostUsd: 1 + maxSteps: 10 + maxDuration: 10m + resources: + maxRetries: 2 + maxConcurrency: 1 + secrets: + - name: TOOLS_TOKEN + source: secret-manager + scope: + - tools + mcpServers: + - name: tools + transport: streamable-http + url: https://mcp.example.com/tools + auth: + secretRef: TOOLS_TOKEN + actionGroups: + tools.read: + - tools.read_file + agents: + - id: worker + model: + provider: ollama + name: qwen3 + tools: + - type: mcp + server: tools + - id: worker + model: + provider: ollama + name: qwen3 + tools: + - type: mcp + server: tools + workflow: + - id: analyze + agent: worker + task: Analyze ${{ inputs.repo }}. + outputs: + - name: report + - id: apply + agent: worker + task: Apply ${{ steps.analyze.outputs.report }}. + dependsOn: + - analyze + permissions: + default: deny + tools: + tools.read: + allow: true diff --git a/conformance/v1alpha4/invalid/3.4-duplicate-rule-id.yaml b/conformance/v1alpha4/invalid/3.4-duplicate-rule-id.yaml new file mode 100644 index 0000000..6896822 --- /dev/null +++ b/conformance/v1alpha4/invalid/3.4-duplicate-rule-id.yaml @@ -0,0 +1,28 @@ +# Conformance case 3.4-duplicate-rule-id +# Spec section 3.4: Identifiers MUST be unique within their list (rules). +# Expected: invalid (id.duplicate at /spec/rules/1/id) +apiVersion: awp.agenticworkflowprotocol.org/v1alpha4 +kind: Policy +metadata: + name: conformance-policy +spec: + version: 1.0.0 + owner: + team: governance-team + rules: + - id: deploy-needs-approval + when: + action: + equals: production.deploy + effect: requireApproval + approval: + approvers: + - role: release-manager + - id: deploy-needs-approval + when: + action: + equals: production.deploy + effect: requireApproval + approval: + approvers: + - role: release-manager diff --git a/conformance/v1alpha4/invalid/3.4-invalid-metadata-name.yaml b/conformance/v1alpha4/invalid/3.4-invalid-metadata-name.yaml new file mode 100644 index 0000000..71a160b --- /dev/null +++ b/conformance/v1alpha4/invalid/3.4-invalid-metadata-name.yaml @@ -0,0 +1,63 @@ +# Conformance case 3.4-invalid-metadata-name +# Spec section 3.4: metadata.name MUST be a DNS-1123 label. +# Expected: invalid (schema.pattern at /metadata/name) +apiVersion: awp.agenticworkflowprotocol.org/v1alpha4 +kind: Workflow +metadata: + name: ends-with-hyphen- +spec: + version: 1.0.0 + owner: + team: conformance-team + classification: internal + risk: + level: low + inputs: + - name: repo + type: string + required: true + budget: + maxCostUsd: 1 + maxSteps: 10 + maxDuration: 10m + resources: + maxRetries: 2 + maxConcurrency: 1 + secrets: + - name: TOOLS_TOKEN + source: secret-manager + scope: + - tools + mcpServers: + - name: tools + transport: streamable-http + url: https://mcp.example.com/tools + auth: + secretRef: TOOLS_TOKEN + actionGroups: + tools.read: + - tools.read_file + agents: + - id: worker + model: + provider: ollama + name: qwen3 + tools: + - type: mcp + server: tools + workflow: + - id: analyze + agent: worker + task: Analyze ${{ inputs.repo }}. + outputs: + - name: report + - id: apply + agent: worker + task: Apply ${{ steps.analyze.outputs.report }}. + dependsOn: + - analyze + permissions: + default: deny + tools: + tools.read: + allow: true diff --git a/conformance/v1alpha4/invalid/3.4-uppercase-agent-id.yaml b/conformance/v1alpha4/invalid/3.4-uppercase-agent-id.yaml new file mode 100644 index 0000000..abbc609 --- /dev/null +++ b/conformance/v1alpha4/invalid/3.4-uppercase-agent-id.yaml @@ -0,0 +1,63 @@ +# Conformance case 3.4-uppercase-agent-id +# Spec section 3.4: Identifiers MUST match ^[a-z][a-z0-9-]{0,62}$. +# Expected: invalid (schema.pattern at /spec/agents/0/id) +apiVersion: awp.agenticworkflowprotocol.org/v1alpha4 +kind: Workflow +metadata: + name: conformance-base +spec: + version: 1.0.0 + owner: + team: conformance-team + classification: internal + risk: + level: low + inputs: + - name: repo + type: string + required: true + budget: + maxCostUsd: 1 + maxSteps: 10 + maxDuration: 10m + resources: + maxRetries: 2 + maxConcurrency: 1 + secrets: + - name: TOOLS_TOKEN + source: secret-manager + scope: + - tools + mcpServers: + - name: tools + transport: streamable-http + url: https://mcp.example.com/tools + auth: + secretRef: TOOLS_TOKEN + actionGroups: + tools.read: + - tools.read_file + agents: + - id: Worker + model: + provider: ollama + name: qwen3 + tools: + - type: mcp + server: tools + workflow: + - id: analyze + agent: worker + task: Analyze ${{ inputs.repo }}. + outputs: + - name: report + - id: apply + agent: worker + task: Apply ${{ steps.analyze.outputs.report }}. + dependsOn: + - analyze + permissions: + default: deny + tools: + tools.read: + allow: true diff --git a/conformance/v1alpha4/invalid/3.4-uppercase-metadata-name.yaml b/conformance/v1alpha4/invalid/3.4-uppercase-metadata-name.yaml new file mode 100644 index 0000000..1f450af --- /dev/null +++ b/conformance/v1alpha4/invalid/3.4-uppercase-metadata-name.yaml @@ -0,0 +1,21 @@ +# Conformance case 3.4-uppercase-metadata-name +# Spec section 3.4: metadata.name MUST be a DNS-1123 label (lowercase). +# Expected: invalid (schema.pattern at /metadata/name) +# Profiles supported by the validator for this case: core +apiVersion: awp.agenticworkflowprotocol.org/v1alpha4 +kind: Workflow +metadata: + name: Hello +spec: + version: 0.1.0 + owner: + team: platform-team + agents: + - id: assistant + model: + provider: ollama + name: qwen3 + workflow: + - id: greet + agent: assistant + task: Say hello. diff --git a/conformance/v1alpha4/invalid/3.5-version-leading-zero.yaml b/conformance/v1alpha4/invalid/3.5-version-leading-zero.yaml new file mode 100644 index 0000000..576358b --- /dev/null +++ b/conformance/v1alpha4/invalid/3.5-version-leading-zero.yaml @@ -0,0 +1,63 @@ +# Conformance case 3.5-version-leading-zero +# Spec section 3.5: SemVer forbids leading zeros in numeric identifiers. +# Expected: invalid (schema.pattern at /spec/version) +apiVersion: awp.agenticworkflowprotocol.org/v1alpha4 +kind: Workflow +metadata: + name: conformance-base +spec: + version: 01.0.0 + owner: + team: conformance-team + classification: internal + risk: + level: low + inputs: + - name: repo + type: string + required: true + budget: + maxCostUsd: 1 + maxSteps: 10 + maxDuration: 10m + resources: + maxRetries: 2 + maxConcurrency: 1 + secrets: + - name: TOOLS_TOKEN + source: secret-manager + scope: + - tools + mcpServers: + - name: tools + transport: streamable-http + url: https://mcp.example.com/tools + auth: + secretRef: TOOLS_TOKEN + actionGroups: + tools.read: + - tools.read_file + agents: + - id: worker + model: + provider: ollama + name: qwen3 + tools: + - type: mcp + server: tools + workflow: + - id: analyze + agent: worker + task: Analyze ${{ inputs.repo }}. + outputs: + - name: report + - id: apply + agent: worker + task: Apply ${{ steps.analyze.outputs.report }}. + dependsOn: + - analyze + permissions: + default: deny + tools: + tools.read: + allow: true diff --git a/conformance/v1alpha4/invalid/3.5-version-not-semver.yaml b/conformance/v1alpha4/invalid/3.5-version-not-semver.yaml new file mode 100644 index 0000000..ac52a9c --- /dev/null +++ b/conformance/v1alpha4/invalid/3.5-version-not-semver.yaml @@ -0,0 +1,63 @@ +# Conformance case 3.5-version-not-semver +# Spec section 3.5: spec.version MUST be a SemVer 2.0.0 string. +# Expected: invalid (schema.pattern at /spec/version) +apiVersion: awp.agenticworkflowprotocol.org/v1alpha4 +kind: Workflow +metadata: + name: conformance-base +spec: + version: "1.0" + owner: + team: conformance-team + classification: internal + risk: + level: low + inputs: + - name: repo + type: string + required: true + budget: + maxCostUsd: 1 + maxSteps: 10 + maxDuration: 10m + resources: + maxRetries: 2 + maxConcurrency: 1 + secrets: + - name: TOOLS_TOKEN + source: secret-manager + scope: + - tools + mcpServers: + - name: tools + transport: streamable-http + url: https://mcp.example.com/tools + auth: + secretRef: TOOLS_TOKEN + actionGroups: + tools.read: + - tools.read_file + agents: + - id: worker + model: + provider: ollama + name: qwen3 + tools: + - type: mcp + server: tools + workflow: + - id: analyze + agent: worker + task: Analyze ${{ inputs.repo }}. + outputs: + - name: report + - id: apply + agent: worker + task: Apply ${{ steps.analyze.outputs.report }}. + dependsOn: + - analyze + permissions: + default: deny + tools: + tools.read: + allow: true diff --git a/conformance/v1alpha4/invalid/3.6-duration-unknown-unit.yaml b/conformance/v1alpha4/invalid/3.6-duration-unknown-unit.yaml new file mode 100644 index 0000000..6c780f9 --- /dev/null +++ b/conformance/v1alpha4/invalid/3.6-duration-unknown-unit.yaml @@ -0,0 +1,64 @@ +# Conformance case 3.6-duration-unknown-unit +# Spec section 3.6: Durations use the units ms, s, m, h, d, w, y. +# Expected: invalid (schema.pattern at /spec/workflow/0/timeout) +apiVersion: awp.agenticworkflowprotocol.org/v1alpha4 +kind: Workflow +metadata: + name: conformance-base +spec: + version: 1.0.0 + owner: + team: conformance-team + classification: internal + risk: + level: low + inputs: + - name: repo + type: string + required: true + budget: + maxCostUsd: 1 + maxSteps: 10 + maxDuration: 10m + resources: + maxRetries: 2 + maxConcurrency: 1 + secrets: + - name: TOOLS_TOKEN + source: secret-manager + scope: + - tools + mcpServers: + - name: tools + transport: streamable-http + url: https://mcp.example.com/tools + auth: + secretRef: TOOLS_TOKEN + actionGroups: + tools.read: + - tools.read_file + agents: + - id: worker + model: + provider: ollama + name: qwen3 + tools: + - type: mcp + server: tools + workflow: + - id: analyze + agent: worker + task: Analyze ${{ inputs.repo }}. + outputs: + - name: report + timeout: 10min + - id: apply + agent: worker + task: Apply ${{ steps.analyze.outputs.report }}. + dependsOn: + - analyze + permissions: + default: deny + tools: + tools.read: + allow: true diff --git a/conformance/v1alpha4/invalid/3.6-duration-zero.yaml b/conformance/v1alpha4/invalid/3.6-duration-zero.yaml new file mode 100644 index 0000000..c82d13a --- /dev/null +++ b/conformance/v1alpha4/invalid/3.6-duration-zero.yaml @@ -0,0 +1,63 @@ +# Conformance case 3.6-duration-zero +# Spec section 3.6: A duration MUST be greater than zero. +# Expected: invalid (schema.pattern at /spec/budget/maxDuration) +apiVersion: awp.agenticworkflowprotocol.org/v1alpha4 +kind: Workflow +metadata: + name: conformance-base +spec: + version: 1.0.0 + owner: + team: conformance-team + classification: internal + risk: + level: low + inputs: + - name: repo + type: string + required: true + budget: + maxCostUsd: 1 + maxSteps: 10 + maxDuration: 0s + resources: + maxRetries: 2 + maxConcurrency: 1 + secrets: + - name: TOOLS_TOKEN + source: secret-manager + scope: + - tools + mcpServers: + - name: tools + transport: streamable-http + url: https://mcp.example.com/tools + auth: + secretRef: TOOLS_TOKEN + actionGroups: + tools.read: + - tools.read_file + agents: + - id: worker + model: + provider: ollama + name: qwen3 + tools: + - type: mcp + server: tools + workflow: + - id: analyze + agent: worker + task: Analyze ${{ inputs.repo }}. + outputs: + - name: report + - id: apply + agent: worker + task: Apply ${{ steps.analyze.outputs.report }}. + dependsOn: + - analyze + permissions: + default: deny + tools: + tools.read: + allow: true diff --git a/conformance/v1alpha4/invalid/3.7-date-not-calendar-valid.yaml b/conformance/v1alpha4/invalid/3.7-date-not-calendar-valid.yaml new file mode 100644 index 0000000..dbf0578 --- /dev/null +++ b/conformance/v1alpha4/invalid/3.7-date-not-calendar-valid.yaml @@ -0,0 +1,66 @@ +# Conformance case 3.7-date-not-calendar-valid +# Spec section 3.7: Dates are RFC 3339 full-date values; 2027-02-30 does not exist. +# Expected: invalid (date.invalid at /spec/agents/0/model/approval/expires) +apiVersion: awp.agenticworkflowprotocol.org/v1alpha4 +kind: Workflow +metadata: + name: conformance-base +spec: + version: 1.0.0 + owner: + team: conformance-team + classification: internal + risk: + level: low + inputs: + - name: repo + type: string + required: true + budget: + maxCostUsd: 1 + maxSteps: 10 + maxDuration: 10m + resources: + maxRetries: 2 + maxConcurrency: 1 + secrets: + - name: TOOLS_TOKEN + source: secret-manager + scope: + - tools + mcpServers: + - name: tools + transport: streamable-http + url: https://mcp.example.com/tools + auth: + secretRef: TOOLS_TOKEN + actionGroups: + tools.read: + - tools.read_file + agents: + - id: worker + model: + provider: ollama + name: qwen3 + approval: + status: approved + expires: 2027-02-30 + tools: + - type: mcp + server: tools + workflow: + - id: analyze + agent: worker + task: Analyze ${{ inputs.repo }}. + outputs: + - name: report + - id: apply + agent: worker + task: Apply ${{ steps.analyze.outputs.report }}. + dependsOn: + - analyze + permissions: + default: deny + tools: + tools.read: + allow: true diff --git a/conformance/v1alpha4/invalid/3.7-date-wrong-format.yaml b/conformance/v1alpha4/invalid/3.7-date-wrong-format.yaml new file mode 100644 index 0000000..344aa3f --- /dev/null +++ b/conformance/v1alpha4/invalid/3.7-date-wrong-format.yaml @@ -0,0 +1,66 @@ +# Conformance case 3.7-date-wrong-format +# Spec section 3.7: Dates are RFC 3339 full-date values. +# Expected: invalid (schema.pattern at /spec/agents/0/model/approval/expires) +apiVersion: awp.agenticworkflowprotocol.org/v1alpha4 +kind: Workflow +metadata: + name: conformance-base +spec: + version: 1.0.0 + owner: + team: conformance-team + classification: internal + risk: + level: low + inputs: + - name: repo + type: string + required: true + budget: + maxCostUsd: 1 + maxSteps: 10 + maxDuration: 10m + resources: + maxRetries: 2 + maxConcurrency: 1 + secrets: + - name: TOOLS_TOKEN + source: secret-manager + scope: + - tools + mcpServers: + - name: tools + transport: streamable-http + url: https://mcp.example.com/tools + auth: + secretRef: TOOLS_TOKEN + actionGroups: + tools.read: + - tools.read_file + agents: + - id: worker + model: + provider: ollama + name: qwen3 + approval: + status: approved + expires: 01/01/2027 + tools: + - type: mcp + server: tools + workflow: + - id: analyze + agent: worker + task: Analyze ${{ inputs.repo }}. + outputs: + - name: report + - id: apply + agent: worker + task: Apply ${{ steps.analyze.outputs.report }}. + dependsOn: + - analyze + permissions: + default: deny + tools: + tools.read: + allow: true diff --git a/conformance/v1alpha4/invalid/3.8-digest-uppercase-hex.yaml b/conformance/v1alpha4/invalid/3.8-digest-uppercase-hex.yaml new file mode 100644 index 0000000..6406644 --- /dev/null +++ b/conformance/v1alpha4/invalid/3.8-digest-uppercase-hex.yaml @@ -0,0 +1,65 @@ +# Conformance case 3.8-digest-uppercase-hex +# Spec section 3.8: Digest hex is lowercase. +# Expected: invalid (schema.pattern at /spec/integrity/digest) +apiVersion: awp.agenticworkflowprotocol.org/v1alpha4 +kind: Workflow +metadata: + name: conformance-base +spec: + version: 1.0.0 + owner: + team: conformance-team + classification: internal + risk: + level: low + integrity: + digest: sha256:AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + inputs: + - name: repo + type: string + required: true + budget: + maxCostUsd: 1 + maxSteps: 10 + maxDuration: 10m + resources: + maxRetries: 2 + maxConcurrency: 1 + secrets: + - name: TOOLS_TOKEN + source: secret-manager + scope: + - tools + mcpServers: + - name: tools + transport: streamable-http + url: https://mcp.example.com/tools + auth: + secretRef: TOOLS_TOKEN + actionGroups: + tools.read: + - tools.read_file + agents: + - id: worker + model: + provider: ollama + name: qwen3 + tools: + - type: mcp + server: tools + workflow: + - id: analyze + agent: worker + task: Analyze ${{ inputs.repo }}. + outputs: + - name: report + - id: apply + agent: worker + task: Apply ${{ steps.analyze.outputs.report }}. + dependsOn: + - analyze + permissions: + default: deny + tools: + tools.read: + allow: true diff --git a/conformance/v1alpha4/invalid/3.8-digest-wrong-length.yaml b/conformance/v1alpha4/invalid/3.8-digest-wrong-length.yaml new file mode 100644 index 0000000..138e77a --- /dev/null +++ b/conformance/v1alpha4/invalid/3.8-digest-wrong-length.yaml @@ -0,0 +1,65 @@ +# Conformance case 3.8-digest-wrong-length +# Spec section 3.8: A sha256 digest has 64 lowercase hex characters. +# Expected: invalid (schema.pattern at /spec/integrity/digest) +apiVersion: awp.agenticworkflowprotocol.org/v1alpha4 +kind: Workflow +metadata: + name: conformance-base +spec: + version: 1.0.0 + owner: + team: conformance-team + classification: internal + risk: + level: low + integrity: + digest: sha256:abc123 + inputs: + - name: repo + type: string + required: true + budget: + maxCostUsd: 1 + maxSteps: 10 + maxDuration: 10m + resources: + maxRetries: 2 + maxConcurrency: 1 + secrets: + - name: TOOLS_TOKEN + source: secret-manager + scope: + - tools + mcpServers: + - name: tools + transport: streamable-http + url: https://mcp.example.com/tools + auth: + secretRef: TOOLS_TOKEN + actionGroups: + tools.read: + - tools.read_file + agents: + - id: worker + model: + provider: ollama + name: qwen3 + tools: + - type: mcp + server: tools + workflow: + - id: analyze + agent: worker + task: Analyze ${{ inputs.repo }}. + outputs: + - name: report + - id: apply + agent: worker + task: Apply ${{ steps.analyze.outputs.report }}. + dependsOn: + - analyze + permissions: + default: deny + tools: + tools.read: + allow: true diff --git a/conformance/v1alpha4/invalid/3.9-expression-function.yaml b/conformance/v1alpha4/invalid/3.9-expression-function.yaml new file mode 100644 index 0000000..d0ea9d1 --- /dev/null +++ b/conformance/v1alpha4/invalid/3.9-expression-function.yaml @@ -0,0 +1,63 @@ +# Conformance case 3.9-expression-function +# Spec section 3.9: No functions in expressions. +# Expected: invalid (schema.pattern at /spec/workflow/0/task) +apiVersion: awp.agenticworkflowprotocol.org/v1alpha4 +kind: Workflow +metadata: + name: conformance-base +spec: + version: 1.0.0 + owner: + team: conformance-team + classification: internal + risk: + level: low + inputs: + - name: repo + type: string + required: true + budget: + maxCostUsd: 1 + maxSteps: 10 + maxDuration: 10m + resources: + maxRetries: 2 + maxConcurrency: 1 + secrets: + - name: TOOLS_TOKEN + source: secret-manager + scope: + - tools + mcpServers: + - name: tools + transport: streamable-http + url: https://mcp.example.com/tools + auth: + secretRef: TOOLS_TOKEN + actionGroups: + tools.read: + - tools.read_file + agents: + - id: worker + model: + provider: ollama + name: qwen3 + tools: + - type: mcp + server: tools + workflow: + - id: analyze + agent: worker + task: ${{ toUpper(inputs.repo) }} + outputs: + - name: report + - id: apply + agent: worker + task: Apply ${{ steps.analyze.outputs.report }}. + dependsOn: + - analyze + permissions: + default: deny + tools: + tools.read: + allow: true diff --git a/conformance/v1alpha4/invalid/3.9-expression-in-env-key-ref-bad.yaml b/conformance/v1alpha4/invalid/3.9-expression-in-env-key-ref-bad.yaml new file mode 100644 index 0000000..b7a59dc --- /dev/null +++ b/conformance/v1alpha4/invalid/3.9-expression-in-env-key-ref-bad.yaml @@ -0,0 +1,70 @@ +# Conformance case 3.9-expression-in-env-key-ref-bad +# Spec section 3.9: env values are expression-enabled; other syntax is rejected. +# Expected: invalid (schema.pattern at /spec/workflow/2/env/A) +apiVersion: awp.agenticworkflowprotocol.org/v1alpha4 +kind: Workflow +metadata: + name: conformance-base +spec: + version: 1.0.0 + owner: + team: conformance-team + classification: internal + risk: + level: low + inputs: + - name: repo + type: string + required: true + budget: + maxCostUsd: 1 + maxSteps: 10 + maxDuration: 10m + resources: + maxRetries: 2 + maxConcurrency: 1 + secrets: + - name: TOOLS_TOKEN + source: secret-manager + scope: + - tools + mcpServers: + - name: tools + transport: streamable-http + url: https://mcp.example.com/tools + auth: + secretRef: TOOLS_TOKEN + actionGroups: + tools.read: + - tools.read_file + agents: + - id: worker + model: + provider: ollama + name: qwen3 + tools: + - type: mcp + server: tools + workflow: + - id: analyze + agent: worker + task: Analyze ${{ inputs.repo }}. + outputs: + - name: report + - id: apply + agent: worker + task: Apply ${{ steps.analyze.outputs.report }}. + dependsOn: + - analyze + - id: cmd + type: command + command: "true" + env: + A: ${{ secrets.TOOLS_TOKEN }} + dependsOn: + - apply + permissions: + default: deny + tools: + tools.read: + allow: true diff --git a/conformance/v1alpha4/invalid/3.9-expression-operator.yaml b/conformance/v1alpha4/invalid/3.9-expression-operator.yaml new file mode 100644 index 0000000..925cf87 --- /dev/null +++ b/conformance/v1alpha4/invalid/3.9-expression-operator.yaml @@ -0,0 +1,63 @@ +# Conformance case 3.9-expression-operator +# Spec section 3.9: No operators in expressions. +# Expected: invalid (schema.pattern at /spec/workflow/0/task) +apiVersion: awp.agenticworkflowprotocol.org/v1alpha4 +kind: Workflow +metadata: + name: conformance-base +spec: + version: 1.0.0 + owner: + team: conformance-team + classification: internal + risk: + level: low + inputs: + - name: repo + type: string + required: true + budget: + maxCostUsd: 1 + maxSteps: 10 + maxDuration: 10m + resources: + maxRetries: 2 + maxConcurrency: 1 + secrets: + - name: TOOLS_TOKEN + source: secret-manager + scope: + - tools + mcpServers: + - name: tools + transport: streamable-http + url: https://mcp.example.com/tools + auth: + secretRef: TOOLS_TOKEN + actionGroups: + tools.read: + - tools.read_file + agents: + - id: worker + model: + provider: ollama + name: qwen3 + tools: + - type: mcp + server: tools + workflow: + - id: analyze + agent: worker + task: Count ${{ inputs.repo + 1 }} + outputs: + - name: report + - id: apply + agent: worker + task: Apply ${{ steps.analyze.outputs.report }}. + dependsOn: + - analyze + permissions: + default: deny + tools: + tools.read: + allow: true diff --git a/conformance/v1alpha4/invalid/3.9-expression-unknown-root.yaml b/conformance/v1alpha4/invalid/3.9-expression-unknown-root.yaml new file mode 100644 index 0000000..9a855af --- /dev/null +++ b/conformance/v1alpha4/invalid/3.9-expression-unknown-root.yaml @@ -0,0 +1,63 @@ +# Conformance case 3.9-expression-unknown-root +# Spec section 3.9: References are inputs, steps..outputs and execution only. +# Expected: invalid (schema.pattern at /spec/workflow/0/task) +apiVersion: awp.agenticworkflowprotocol.org/v1alpha4 +kind: Workflow +metadata: + name: conformance-base +spec: + version: 1.0.0 + owner: + team: conformance-team + classification: internal + risk: + level: low + inputs: + - name: repo + type: string + required: true + budget: + maxCostUsd: 1 + maxSteps: 10 + maxDuration: 10m + resources: + maxRetries: 2 + maxConcurrency: 1 + secrets: + - name: TOOLS_TOKEN + source: secret-manager + scope: + - tools + mcpServers: + - name: tools + transport: streamable-http + url: https://mcp.example.com/tools + auth: + secretRef: TOOLS_TOKEN + actionGroups: + tools.read: + - tools.read_file + agents: + - id: worker + model: + provider: ollama + name: qwen3 + tools: + - type: mcp + server: tools + workflow: + - id: analyze + agent: worker + task: ${{ env.HOME }} + outputs: + - name: report + - id: apply + agent: worker + task: Apply ${{ steps.analyze.outputs.report }}. + dependsOn: + - analyze + permissions: + default: deny + tools: + tools.read: + allow: true diff --git a/conformance/v1alpha4/invalid/3.9-expression-unterminated.yaml b/conformance/v1alpha4/invalid/3.9-expression-unterminated.yaml new file mode 100644 index 0000000..cd64207 --- /dev/null +++ b/conformance/v1alpha4/invalid/3.9-expression-unterminated.yaml @@ -0,0 +1,63 @@ +# Conformance case 3.9-expression-unterminated +# Spec section 3.9: An expression must be closed. +# Expected: invalid (schema.pattern at /spec/workflow/0/task) +apiVersion: awp.agenticworkflowprotocol.org/v1alpha4 +kind: Workflow +metadata: + name: conformance-base +spec: + version: 1.0.0 + owner: + team: conformance-team + classification: internal + risk: + level: low + inputs: + - name: repo + type: string + required: true + budget: + maxCostUsd: 1 + maxSteps: 10 + maxDuration: 10m + resources: + maxRetries: 2 + maxConcurrency: 1 + secrets: + - name: TOOLS_TOKEN + source: secret-manager + scope: + - tools + mcpServers: + - name: tools + transport: streamable-http + url: https://mcp.example.com/tools + auth: + secretRef: TOOLS_TOKEN + actionGroups: + tools.read: + - tools.read_file + agents: + - id: worker + model: + provider: ollama + name: qwen3 + tools: + - type: mcp + server: tools + workflow: + - id: analyze + agent: worker + task: Go ${{ inputs.repo + outputs: + - name: report + - id: apply + agent: worker + task: Apply ${{ steps.analyze.outputs.report }}. + dependsOn: + - analyze + permissions: + default: deny + tools: + tools.read: + allow: true diff --git a/conformance/v1alpha4/invalid/3.9-iteration-reference-outside-for-each.yaml b/conformance/v1alpha4/invalid/3.9-iteration-reference-outside-for-each.yaml new file mode 100644 index 0000000..4ebdfdd --- /dev/null +++ b/conformance/v1alpha4/invalid/3.9-iteration-reference-outside-for-each.yaml @@ -0,0 +1,66 @@ +# Conformance case 3.9-iteration-reference-outside-for-each +# Spec section 3.9: forEach.* references MUST only be used in task and env of a step that declares forEach. +# Expected: invalid (expr.iteration-outside-forEach at /spec/workflow/1/task) +apiVersion: awp.agenticworkflowprotocol.org/v1alpha4 +kind: Workflow +metadata: + name: conformance-base +spec: + version: 1.0.0 + owner: + team: conformance-team + classification: internal + risk: + level: low + inputs: + - name: repo + type: string + required: true + - name: images + type: array + required: true + budget: + maxCostUsd: 1 + maxSteps: 10 + maxDuration: 10m + resources: + maxRetries: 2 + maxConcurrency: 2 + secrets: + - name: TOOLS_TOKEN + source: secret-manager + scope: + - tools + mcpServers: + - name: tools + transport: streamable-http + url: https://mcp.example.com/tools + auth: + secretRef: TOOLS_TOKEN + actionGroups: + tools.read: + - tools.read_file + agents: + - id: worker + model: + provider: ollama + name: qwen3 + tools: + - type: mcp + server: tools + workflow: + - id: list + agent: worker + task: List the files of ${{ inputs.repo }}. + outputs: + - name: files + - id: review + agent: worker + task: Review ${{ forEach.item }}. + dependsOn: + - list + permissions: + default: deny + tools: + tools.read: + allow: true diff --git a/conformance/v1alpha4/invalid/3.9-step-reference-in-permissions.yaml b/conformance/v1alpha4/invalid/3.9-step-reference-in-permissions.yaml new file mode 100644 index 0000000..8d09ca1 --- /dev/null +++ b/conformance/v1alpha4/invalid/3.9-step-reference-in-permissions.yaml @@ -0,0 +1,65 @@ +# Conformance case 3.9-step-reference-in-permissions +# Spec section 3.9: Step references are only valid inside a step. +# Expected: invalid (expr.step-reference-outside-step at /spec/permissions/tools/tools.read/resources/0) +apiVersion: awp.agenticworkflowprotocol.org/v1alpha4 +kind: Workflow +metadata: + name: conformance-base +spec: + version: 1.0.0 + owner: + team: conformance-team + classification: internal + risk: + level: low + inputs: + - name: repo + type: string + required: true + budget: + maxCostUsd: 1 + maxSteps: 10 + maxDuration: 10m + resources: + maxRetries: 2 + maxConcurrency: 1 + secrets: + - name: TOOLS_TOKEN + source: secret-manager + scope: + - tools + mcpServers: + - name: tools + transport: streamable-http + url: https://mcp.example.com/tools + auth: + secretRef: TOOLS_TOKEN + actionGroups: + tools.read: + - tools.read_file + agents: + - id: worker + model: + provider: ollama + name: qwen3 + tools: + - type: mcp + server: tools + workflow: + - id: analyze + agent: worker + task: Analyze ${{ inputs.repo }}. + outputs: + - name: report + - id: apply + agent: worker + task: Apply ${{ steps.analyze.outputs.report }}. + dependsOn: + - analyze + permissions: + default: deny + tools: + tools.read: + allow: true + resources: + - ${{ steps.analyze.outputs.report }} diff --git a/conformance/v1alpha4/invalid/3.9-step-reference-unknown-step.yaml b/conformance/v1alpha4/invalid/3.9-step-reference-unknown-step.yaml new file mode 100644 index 0000000..b019925 --- /dev/null +++ b/conformance/v1alpha4/invalid/3.9-step-reference-unknown-step.yaml @@ -0,0 +1,63 @@ +# Conformance case 3.9-step-reference-unknown-step +# Spec section 3.9: A reference to a non-existent step is rejected. +# Expected: invalid (expr.unknown-step at /spec/workflow/1/task) +apiVersion: awp.agenticworkflowprotocol.org/v1alpha4 +kind: Workflow +metadata: + name: conformance-base +spec: + version: 1.0.0 + owner: + team: conformance-team + classification: internal + risk: + level: low + inputs: + - name: repo + type: string + required: true + budget: + maxCostUsd: 1 + maxSteps: 10 + maxDuration: 10m + resources: + maxRetries: 2 + maxConcurrency: 1 + secrets: + - name: TOOLS_TOKEN + source: secret-manager + scope: + - tools + mcpServers: + - name: tools + transport: streamable-http + url: https://mcp.example.com/tools + auth: + secretRef: TOOLS_TOKEN + actionGroups: + tools.read: + - tools.read_file + agents: + - id: worker + model: + provider: ollama + name: qwen3 + tools: + - type: mcp + server: tools + workflow: + - id: analyze + agent: worker + task: Analyze ${{ inputs.repo }}. + outputs: + - name: report + - id: apply + agent: worker + task: ${{ steps.ghost.outputs.report }} + dependsOn: + - analyze + permissions: + default: deny + tools: + tools.read: + allow: true diff --git a/conformance/v1alpha4/invalid/3.9-step-reference-without-dependency.yaml b/conformance/v1alpha4/invalid/3.9-step-reference-without-dependency.yaml new file mode 100644 index 0000000..ce7e1f1 --- /dev/null +++ b/conformance/v1alpha4/invalid/3.9-step-reference-without-dependency.yaml @@ -0,0 +1,62 @@ +# Conformance case 3.9-step-reference-without-dependency +# Spec section 3.9: steps. MUST only be used in a step that depends on . +# Expected: invalid (expr.not-a-dependency at /spec/workflow/1/task) +apiVersion: awp.agenticworkflowprotocol.org/v1alpha4 +kind: Workflow +metadata: + name: conformance-base +spec: + version: 1.0.0 + owner: + team: conformance-team + classification: internal + risk: + level: low + inputs: + - name: repo + type: string + required: true + budget: + maxCostUsd: 1 + maxSteps: 10 + maxDuration: 10m + resources: + maxRetries: 2 + maxConcurrency: 1 + secrets: + - name: TOOLS_TOKEN + source: secret-manager + scope: + - tools + mcpServers: + - name: tools + transport: streamable-http + url: https://mcp.example.com/tools + auth: + secretRef: TOOLS_TOKEN + actionGroups: + tools.read: + - tools.read_file + agents: + - id: worker + model: + provider: ollama + name: qwen3 + tools: + - type: mcp + server: tools + workflow: + - id: analyze + agent: worker + task: Analyze ${{ inputs.repo }}. + outputs: + - name: report + - id: apply + agent: worker + task: Apply ${{ steps.analyze.outputs.report }}. + dependsOn: [] + permissions: + default: deny + tools: + tools.read: + allow: true diff --git a/conformance/v1alpha4/invalid/4-governance-field-in-metadata.yaml b/conformance/v1alpha4/invalid/4-governance-field-in-metadata.yaml new file mode 100644 index 0000000..e286cc7 --- /dev/null +++ b/conformance/v1alpha4/invalid/4-governance-field-in-metadata.yaml @@ -0,0 +1,23 @@ +# Conformance case 4-governance-field-in-metadata +# Spec section 4: Governance fields are spec fields; metadata.owner is unknown. +# Expected: invalid (schema.additionalProperties at /metadata/owner) +# Profiles supported by the validator for this case: core +apiVersion: awp.agenticworkflowprotocol.org/v1alpha4 +kind: Workflow +metadata: + name: hello + owner: + team: platform-team +spec: + version: 0.1.0 + owner: + team: platform-team + agents: + - id: assistant + model: + provider: ollama + name: qwen3 + workflow: + - id: greet + agent: assistant + task: Say hello. diff --git a/conformance/v1alpha4/invalid/4-invalid-label-key.yaml b/conformance/v1alpha4/invalid/4-invalid-label-key.yaml new file mode 100644 index 0000000..b9ebf6c --- /dev/null +++ b/conformance/v1alpha4/invalid/4-invalid-label-key.yaml @@ -0,0 +1,65 @@ +# Conformance case 4-invalid-label-key +# Spec section 4: Label keys MUST match ^[a-zA-Z0-9][a-zA-Z0-9._/-]{0,127}$. +# Expected: invalid (schema.propertyNames at /metadata/labels/-bad) +apiVersion: awp.agenticworkflowprotocol.org/v1alpha4 +kind: Workflow +metadata: + name: conformance-base + labels: + -bad: x +spec: + version: 1.0.0 + owner: + team: conformance-team + classification: internal + risk: + level: low + inputs: + - name: repo + type: string + required: true + budget: + maxCostUsd: 1 + maxSteps: 10 + maxDuration: 10m + resources: + maxRetries: 2 + maxConcurrency: 1 + secrets: + - name: TOOLS_TOKEN + source: secret-manager + scope: + - tools + mcpServers: + - name: tools + transport: streamable-http + url: https://mcp.example.com/tools + auth: + secretRef: TOOLS_TOKEN + actionGroups: + tools.read: + - tools.read_file + agents: + - id: worker + model: + provider: ollama + name: qwen3 + tools: + - type: mcp + server: tools + workflow: + - id: analyze + agent: worker + task: Analyze ${{ inputs.repo }}. + outputs: + - name: report + - id: apply + agent: worker + task: Apply ${{ steps.analyze.outputs.report }}. + dependsOn: + - analyze + permissions: + default: deny + tools: + tools.read: + allow: true diff --git a/conformance/v1alpha4/invalid/4-invalid-risk-level.yaml b/conformance/v1alpha4/invalid/4-invalid-risk-level.yaml new file mode 100644 index 0000000..088f0a2 --- /dev/null +++ b/conformance/v1alpha4/invalid/4-invalid-risk-level.yaml @@ -0,0 +1,63 @@ +# Conformance case 4-invalid-risk-level +# Spec section 4: risk.level is one of low, medium, high, critical. +# Expected: invalid (schema.enum at /spec/risk/level) +apiVersion: awp.agenticworkflowprotocol.org/v1alpha4 +kind: Workflow +metadata: + name: conformance-base +spec: + version: 1.0.0 + owner: + team: conformance-team + classification: internal + risk: + level: extreme + inputs: + - name: repo + type: string + required: true + budget: + maxCostUsd: 1 + maxSteps: 10 + maxDuration: 10m + resources: + maxRetries: 2 + maxConcurrency: 1 + secrets: + - name: TOOLS_TOKEN + source: secret-manager + scope: + - tools + mcpServers: + - name: tools + transport: streamable-http + url: https://mcp.example.com/tools + auth: + secretRef: TOOLS_TOKEN + actionGroups: + tools.read: + - tools.read_file + agents: + - id: worker + model: + provider: ollama + name: qwen3 + tools: + - type: mcp + server: tools + workflow: + - id: analyze + agent: worker + task: Analyze ${{ inputs.repo }}. + outputs: + - name: report + - id: apply + agent: worker + task: Apply ${{ steps.analyze.outputs.report }}. + dependsOn: + - analyze + permissions: + default: deny + tools: + tools.read: + allow: true diff --git a/conformance/v1alpha4/invalid/4-label-value-not-string.yaml b/conformance/v1alpha4/invalid/4-label-value-not-string.yaml new file mode 100644 index 0000000..40b4b6d --- /dev/null +++ b/conformance/v1alpha4/invalid/4-label-value-not-string.yaml @@ -0,0 +1,65 @@ +# Conformance case 4-label-value-not-string +# Spec section 4: Labels are a map of strings. +# Expected: invalid (schema.type at /metadata/labels/tier) +apiVersion: awp.agenticworkflowprotocol.org/v1alpha4 +kind: Workflow +metadata: + name: conformance-base + labels: + tier: 1 +spec: + version: 1.0.0 + owner: + team: conformance-team + classification: internal + risk: + level: low + inputs: + - name: repo + type: string + required: true + budget: + maxCostUsd: 1 + maxSteps: 10 + maxDuration: 10m + resources: + maxRetries: 2 + maxConcurrency: 1 + secrets: + - name: TOOLS_TOKEN + source: secret-manager + scope: + - tools + mcpServers: + - name: tools + transport: streamable-http + url: https://mcp.example.com/tools + auth: + secretRef: TOOLS_TOKEN + actionGroups: + tools.read: + - tools.read_file + agents: + - id: worker + model: + provider: ollama + name: qwen3 + tools: + - type: mcp + server: tools + workflow: + - id: analyze + agent: worker + task: Analyze ${{ inputs.repo }}. + outputs: + - name: report + - id: apply + agent: worker + task: Apply ${{ steps.analyze.outputs.report }}. + dependsOn: + - analyze + permissions: + default: deny + tools: + tools.read: + allow: true diff --git a/conformance/v1alpha4/invalid/4-label-value-too-long.yaml b/conformance/v1alpha4/invalid/4-label-value-too-long.yaml new file mode 100644 index 0000000..95ebb66 --- /dev/null +++ b/conformance/v1alpha4/invalid/4-label-value-too-long.yaml @@ -0,0 +1,23 @@ +# Conformance case 4-label-value-too-long +# Spec section 4: Label values have at most 63 characters (Kubernetes label syntax). +# Expected: invalid (schema.maxLength at /metadata/labels/tier) +# Profiles supported by the validator for this case: core +apiVersion: awp.agenticworkflowprotocol.org/v1alpha4 +kind: Workflow +metadata: + name: hello + labels: + tier: gggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggg +spec: + version: 0.1.0 + owner: + team: platform-team + agents: + - id: assistant + model: + provider: ollama + name: qwen3 + workflow: + - id: greet + agent: assistant + task: Say hello. diff --git a/conformance/v1alpha4/invalid/4-missing-owner.yaml b/conformance/v1alpha4/invalid/4-missing-owner.yaml new file mode 100644 index 0000000..556c6c2 --- /dev/null +++ b/conformance/v1alpha4/invalid/4-missing-owner.yaml @@ -0,0 +1,61 @@ +# Conformance case 4-missing-owner +# Spec section 4: spec.owner is REQUIRED. +# Expected: invalid (schema.required at /spec) +apiVersion: awp.agenticworkflowprotocol.org/v1alpha4 +kind: Workflow +metadata: + name: conformance-base +spec: + version: 1.0.0 + classification: internal + risk: + level: low + inputs: + - name: repo + type: string + required: true + budget: + maxCostUsd: 1 + maxSteps: 10 + maxDuration: 10m + resources: + maxRetries: 2 + maxConcurrency: 1 + secrets: + - name: TOOLS_TOKEN + source: secret-manager + scope: + - tools + mcpServers: + - name: tools + transport: streamable-http + url: https://mcp.example.com/tools + auth: + secretRef: TOOLS_TOKEN + actionGroups: + tools.read: + - tools.read_file + agents: + - id: worker + model: + provider: ollama + name: qwen3 + tools: + - type: mcp + server: tools + workflow: + - id: analyze + agent: worker + task: Analyze ${{ inputs.repo }}. + outputs: + - name: report + - id: apply + agent: worker + task: Apply ${{ steps.analyze.outputs.report }}. + dependsOn: + - analyze + permissions: + default: deny + tools: + tools.read: + allow: true diff --git a/conformance/v1alpha4/invalid/4-missing-version.yaml b/conformance/v1alpha4/invalid/4-missing-version.yaml new file mode 100644 index 0000000..ddd4da9 --- /dev/null +++ b/conformance/v1alpha4/invalid/4-missing-version.yaml @@ -0,0 +1,62 @@ +# Conformance case 4-missing-version +# Spec section 4: spec.version is REQUIRED. +# Expected: invalid (schema.required at /spec) +apiVersion: awp.agenticworkflowprotocol.org/v1alpha4 +kind: Workflow +metadata: + name: conformance-base +spec: + owner: + team: conformance-team + classification: internal + risk: + level: low + inputs: + - name: repo + type: string + required: true + budget: + maxCostUsd: 1 + maxSteps: 10 + maxDuration: 10m + resources: + maxRetries: 2 + maxConcurrency: 1 + secrets: + - name: TOOLS_TOKEN + source: secret-manager + scope: + - tools + mcpServers: + - name: tools + transport: streamable-http + url: https://mcp.example.com/tools + auth: + secretRef: TOOLS_TOKEN + actionGroups: + tools.read: + - tools.read_file + agents: + - id: worker + model: + provider: ollama + name: qwen3 + tools: + - type: mcp + server: tools + workflow: + - id: analyze + agent: worker + task: Analyze ${{ inputs.repo }}. + outputs: + - name: report + - id: apply + agent: worker + task: Apply ${{ steps.analyze.outputs.report }}. + dependsOn: + - analyze + permissions: + default: deny + tools: + tools.read: + allow: true diff --git a/conformance/v1alpha4/invalid/4-owner-string.yaml b/conformance/v1alpha4/invalid/4-owner-string.yaml new file mode 100644 index 0000000..ad9284e --- /dev/null +++ b/conformance/v1alpha4/invalid/4-owner-string.yaml @@ -0,0 +1,20 @@ +# Conformance case 4-owner-string +# Spec section 4: spec.owner is an object; the string shorthand of v1alpha1 is removed. +# Expected: invalid (schema.type at /spec/owner) +# Profiles supported by the validator for this case: core +apiVersion: awp.agenticworkflowprotocol.org/v1alpha4 +kind: Workflow +metadata: + name: hello +spec: + version: 0.1.0 + owner: platform-team + agents: + - id: assistant + model: + provider: ollama + name: qwen3 + workflow: + - id: greet + agent: assistant + task: Say hello. diff --git a/conformance/v1alpha4/invalid/4-owner-without-team.yaml b/conformance/v1alpha4/invalid/4-owner-without-team.yaml new file mode 100644 index 0000000..b3cddcf --- /dev/null +++ b/conformance/v1alpha4/invalid/4-owner-without-team.yaml @@ -0,0 +1,63 @@ +# Conformance case 4-owner-without-team +# Spec section 4: owner as an object REQUIRES team. +# Expected: invalid (schema.required at /spec/owner) +apiVersion: awp.agenticworkflowprotocol.org/v1alpha4 +kind: Workflow +metadata: + name: conformance-base +spec: + version: 1.0.0 + owner: + contact: a@example.com + classification: internal + risk: + level: low + inputs: + - name: repo + type: string + required: true + budget: + maxCostUsd: 1 + maxSteps: 10 + maxDuration: 10m + resources: + maxRetries: 2 + maxConcurrency: 1 + secrets: + - name: TOOLS_TOKEN + source: secret-manager + scope: + - tools + mcpServers: + - name: tools + transport: streamable-http + url: https://mcp.example.com/tools + auth: + secretRef: TOOLS_TOKEN + actionGroups: + tools.read: + - tools.read_file + agents: + - id: worker + model: + provider: ollama + name: qwen3 + tools: + - type: mcp + server: tools + workflow: + - id: analyze + agent: worker + task: Analyze ${{ inputs.repo }}. + outputs: + - name: report + - id: apply + agent: worker + task: Apply ${{ steps.analyze.outputs.report }}. + dependsOn: + - analyze + permissions: + default: deny + tools: + tools.read: + allow: true diff --git a/conformance/v1alpha4/invalid/5.2-concurrency-policy-on-event-trigger.yaml b/conformance/v1alpha4/invalid/5.2-concurrency-policy-on-event-trigger.yaml new file mode 100644 index 0000000..0a5cc0f --- /dev/null +++ b/conformance/v1alpha4/invalid/5.2-concurrency-policy-on-event-trigger.yaml @@ -0,0 +1,74 @@ +# Conformance case 5.2-concurrency-policy-on-event-trigger +# Spec section 5.2: concurrencyPolicy and startingDeadline belong to schedule triggers only. +# Expected: invalid (schema.not at /spec/triggers/2) +apiVersion: awp.agenticworkflowprotocol.org/v1alpha4 +kind: Workflow +metadata: + name: conformance-base +spec: + version: 1.0.0 + owner: + team: conformance-team + classification: internal + risk: + level: low + inputs: + - name: repo + type: string + default: example-org/web-shop + budget: + maxCostUsd: 1 + maxSteps: 10 + maxDuration: 10m + resources: + maxRetries: 2 + maxConcurrency: 1 + secrets: + - name: TOOLS_TOKEN + source: secret-manager + scope: + - tools + mcpServers: + - name: tools + transport: streamable-http + url: https://mcp.example.com/tools + auth: + secretRef: TOOLS_TOKEN + actionGroups: + tools.read: + - tools.read_file + agents: + - id: worker + model: + provider: ollama + name: qwen3 + tools: + - type: mcp + server: tools + workflow: + - id: analyze + agent: worker + task: Analyze ${{ inputs.repo }}. + outputs: + - name: report + - id: apply + agent: worker + task: Apply ${{ steps.analyze.outputs.report }}. + dependsOn: + - analyze + permissions: + default: deny + tools: + tools.read: + allow: true + triggers: + - type: manual + - type: schedule + cron: 0 6 * * 1-5 + timezone: Europe/Berlin + - type: event + source: git.example.com + eventType: pull_request.opened + filter: + repository: example-org/web-shop + concurrencyPolicy: forbid diff --git a/conformance/v1alpha4/invalid/5.2-cron-not-five-fields.yaml b/conformance/v1alpha4/invalid/5.2-cron-not-five-fields.yaml new file mode 100644 index 0000000..9cf9072 --- /dev/null +++ b/conformance/v1alpha4/invalid/5.2-cron-not-five-fields.yaml @@ -0,0 +1,66 @@ +# Conformance case 5.2-cron-not-five-fields +# Spec section 5.2: cron is a 5-field cron expression. +# Expected: invalid (schema.pattern at /spec/triggers/0/cron) +apiVersion: awp.agenticworkflowprotocol.org/v1alpha4 +kind: Workflow +metadata: + name: conformance-base +spec: + version: 1.0.0 + owner: + team: conformance-team + classification: internal + risk: + level: low + inputs: + - name: repo + type: string + required: true + budget: + maxCostUsd: 1 + maxSteps: 10 + maxDuration: 10m + resources: + maxRetries: 2 + maxConcurrency: 1 + secrets: + - name: TOOLS_TOKEN + source: secret-manager + scope: + - tools + mcpServers: + - name: tools + transport: streamable-http + url: https://mcp.example.com/tools + auth: + secretRef: TOOLS_TOKEN + actionGroups: + tools.read: + - tools.read_file + agents: + - id: worker + model: + provider: ollama + name: qwen3 + tools: + - type: mcp + server: tools + workflow: + - id: analyze + agent: worker + task: Analyze ${{ inputs.repo }}. + outputs: + - name: report + - id: apply + agent: worker + task: Apply ${{ steps.analyze.outputs.report }}. + dependsOn: + - analyze + permissions: + default: deny + tools: + tools.read: + allow: true + triggers: + - type: schedule + cron: 0 6 * * diff --git a/conformance/v1alpha4/invalid/5.2-event-without-event-type.yaml b/conformance/v1alpha4/invalid/5.2-event-without-event-type.yaml new file mode 100644 index 0000000..1309b15 --- /dev/null +++ b/conformance/v1alpha4/invalid/5.2-event-without-event-type.yaml @@ -0,0 +1,66 @@ +# Conformance case 5.2-event-without-event-type +# Spec section 5.2: event triggers REQUIRE source and eventType. +# Expected: invalid (schema.required at /spec/triggers/0) +apiVersion: awp.agenticworkflowprotocol.org/v1alpha4 +kind: Workflow +metadata: + name: conformance-base +spec: + version: 1.0.0 + owner: + team: conformance-team + classification: internal + risk: + level: low + inputs: + - name: repo + type: string + required: true + budget: + maxCostUsd: 1 + maxSteps: 10 + maxDuration: 10m + resources: + maxRetries: 2 + maxConcurrency: 1 + secrets: + - name: TOOLS_TOKEN + source: secret-manager + scope: + - tools + mcpServers: + - name: tools + transport: streamable-http + url: https://mcp.example.com/tools + auth: + secretRef: TOOLS_TOKEN + actionGroups: + tools.read: + - tools.read_file + agents: + - id: worker + model: + provider: ollama + name: qwen3 + tools: + - type: mcp + server: tools + workflow: + - id: analyze + agent: worker + task: Analyze ${{ inputs.repo }}. + outputs: + - name: report + - id: apply + agent: worker + task: Apply ${{ steps.analyze.outputs.report }}. + dependsOn: + - analyze + permissions: + default: deny + tools: + tools.read: + allow: true + triggers: + - type: event + source: git.example.com diff --git a/conformance/v1alpha4/invalid/5.2-invalid-concurrency-policy.yaml b/conformance/v1alpha4/invalid/5.2-invalid-concurrency-policy.yaml new file mode 100644 index 0000000..e5eed32 --- /dev/null +++ b/conformance/v1alpha4/invalid/5.2-invalid-concurrency-policy.yaml @@ -0,0 +1,74 @@ +# Conformance case 5.2-invalid-concurrency-policy +# Spec section 5.2: concurrencyPolicy is allow, forbid or replace. +# Expected: invalid (schema.enum at /spec/triggers/1/concurrencyPolicy) +apiVersion: awp.agenticworkflowprotocol.org/v1alpha4 +kind: Workflow +metadata: + name: conformance-base +spec: + version: 1.0.0 + owner: + team: conformance-team + classification: internal + risk: + level: low + inputs: + - name: repo + type: string + default: example-org/web-shop + budget: + maxCostUsd: 1 + maxSteps: 10 + maxDuration: 10m + resources: + maxRetries: 2 + maxConcurrency: 1 + secrets: + - name: TOOLS_TOKEN + source: secret-manager + scope: + - tools + mcpServers: + - name: tools + transport: streamable-http + url: https://mcp.example.com/tools + auth: + secretRef: TOOLS_TOKEN + actionGroups: + tools.read: + - tools.read_file + agents: + - id: worker + model: + provider: ollama + name: qwen3 + tools: + - type: mcp + server: tools + workflow: + - id: analyze + agent: worker + task: Analyze ${{ inputs.repo }}. + outputs: + - name: report + - id: apply + agent: worker + task: Apply ${{ steps.analyze.outputs.report }}. + dependsOn: + - analyze + permissions: + default: deny + tools: + tools.read: + allow: true + triggers: + - type: manual + - type: schedule + cron: 0 6 * * 1-5 + timezone: Europe/Berlin + concurrencyPolicy: queue + - type: event + source: git.example.com + eventType: pull_request.opened + filter: + repository: example-org/web-shop diff --git a/conformance/v1alpha4/invalid/5.2-schedule-without-cron.yaml b/conformance/v1alpha4/invalid/5.2-schedule-without-cron.yaml new file mode 100644 index 0000000..e2a361e --- /dev/null +++ b/conformance/v1alpha4/invalid/5.2-schedule-without-cron.yaml @@ -0,0 +1,66 @@ +# Conformance case 5.2-schedule-without-cron +# Spec section 5.2: schedule triggers REQUIRE cron. +# Expected: invalid (schema.required at /spec/triggers/0) +apiVersion: awp.agenticworkflowprotocol.org/v1alpha4 +kind: Workflow +metadata: + name: conformance-base +spec: + version: 1.0.0 + owner: + team: conformance-team + classification: internal + risk: + level: low + inputs: + - name: repo + type: string + required: true + budget: + maxCostUsd: 1 + maxSteps: 10 + maxDuration: 10m + resources: + maxRetries: 2 + maxConcurrency: 1 + secrets: + - name: TOOLS_TOKEN + source: secret-manager + scope: + - tools + mcpServers: + - name: tools + transport: streamable-http + url: https://mcp.example.com/tools + auth: + secretRef: TOOLS_TOKEN + actionGroups: + tools.read: + - tools.read_file + agents: + - id: worker + model: + provider: ollama + name: qwen3 + tools: + - type: mcp + server: tools + workflow: + - id: analyze + agent: worker + task: Analyze ${{ inputs.repo }}. + outputs: + - name: report + - id: apply + agent: worker + task: Apply ${{ steps.analyze.outputs.report }}. + dependsOn: + - analyze + permissions: + default: deny + tools: + tools.read: + allow: true + triggers: + - type: schedule + timezone: UTC diff --git a/conformance/v1alpha4/invalid/5.2-starting-deadline-not-duration.yaml b/conformance/v1alpha4/invalid/5.2-starting-deadline-not-duration.yaml new file mode 100644 index 0000000..62afd72 --- /dev/null +++ b/conformance/v1alpha4/invalid/5.2-starting-deadline-not-duration.yaml @@ -0,0 +1,74 @@ +# Conformance case 5.2-starting-deadline-not-duration +# Spec section 5.2: startingDeadline is a duration. +# Expected: invalid (schema.pattern at /spec/triggers/1/startingDeadline) +apiVersion: awp.agenticworkflowprotocol.org/v1alpha4 +kind: Workflow +metadata: + name: conformance-base +spec: + version: 1.0.0 + owner: + team: conformance-team + classification: internal + risk: + level: low + inputs: + - name: repo + type: string + default: example-org/web-shop + budget: + maxCostUsd: 1 + maxSteps: 10 + maxDuration: 10m + resources: + maxRetries: 2 + maxConcurrency: 1 + secrets: + - name: TOOLS_TOKEN + source: secret-manager + scope: + - tools + mcpServers: + - name: tools + transport: streamable-http + url: https://mcp.example.com/tools + auth: + secretRef: TOOLS_TOKEN + actionGroups: + tools.read: + - tools.read_file + agents: + - id: worker + model: + provider: ollama + name: qwen3 + tools: + - type: mcp + server: tools + workflow: + - id: analyze + agent: worker + task: Analyze ${{ inputs.repo }}. + outputs: + - name: report + - id: apply + agent: worker + task: Apply ${{ steps.analyze.outputs.report }}. + dependsOn: + - analyze + permissions: + default: deny + tools: + tools.read: + allow: true + triggers: + - type: manual + - type: schedule + cron: 0 6 * * 1-5 + timezone: Europe/Berlin + startingDeadline: "300" + - type: event + source: git.example.com + eventType: pull_request.opened + filter: + repository: example-org/web-shop diff --git a/conformance/v1alpha4/invalid/5.2-unknown-trigger-type.yaml b/conformance/v1alpha4/invalid/5.2-unknown-trigger-type.yaml new file mode 100644 index 0000000..f27fc4a --- /dev/null +++ b/conformance/v1alpha4/invalid/5.2-unknown-trigger-type.yaml @@ -0,0 +1,65 @@ +# Conformance case 5.2-unknown-trigger-type +# Spec section 5.2: type is manual, schedule or event. +# Expected: invalid (schema.enum at /spec/triggers/0/type) +apiVersion: awp.agenticworkflowprotocol.org/v1alpha4 +kind: Workflow +metadata: + name: conformance-base +spec: + version: 1.0.0 + owner: + team: conformance-team + classification: internal + risk: + level: low + inputs: + - name: repo + type: string + required: true + budget: + maxCostUsd: 1 + maxSteps: 10 + maxDuration: 10m + resources: + maxRetries: 2 + maxConcurrency: 1 + secrets: + - name: TOOLS_TOKEN + source: secret-manager + scope: + - tools + mcpServers: + - name: tools + transport: streamable-http + url: https://mcp.example.com/tools + auth: + secretRef: TOOLS_TOKEN + actionGroups: + tools.read: + - tools.read_file + agents: + - id: worker + model: + provider: ollama + name: qwen3 + tools: + - type: mcp + server: tools + workflow: + - id: analyze + agent: worker + task: Analyze ${{ inputs.repo }}. + outputs: + - name: report + - id: apply + agent: worker + task: Apply ${{ steps.analyze.outputs.report }}. + dependsOn: + - analyze + permissions: + default: deny + tools: + tools.read: + allow: true + triggers: + - type: webhook diff --git a/conformance/v1alpha4/invalid/5.3-default-wrong-type.yaml b/conformance/v1alpha4/invalid/5.3-default-wrong-type.yaml new file mode 100644 index 0000000..9054a17 --- /dev/null +++ b/conformance/v1alpha4/invalid/5.3-default-wrong-type.yaml @@ -0,0 +1,63 @@ +# Conformance case 5.3-default-wrong-type +# Spec section 5.3: default MUST match type. +# Expected: invalid (schema.type at /spec/inputs/0/default) +apiVersion: awp.agenticworkflowprotocol.org/v1alpha4 +kind: Workflow +metadata: + name: conformance-base +spec: + version: 1.0.0 + owner: + team: conformance-team + classification: internal + risk: + level: low + inputs: + - name: limit + type: integer + default: five + budget: + maxCostUsd: 1 + maxSteps: 10 + maxDuration: 10m + resources: + maxRetries: 2 + maxConcurrency: 1 + secrets: + - name: TOOLS_TOKEN + source: secret-manager + scope: + - tools + mcpServers: + - name: tools + transport: streamable-http + url: https://mcp.example.com/tools + auth: + secretRef: TOOLS_TOKEN + actionGroups: + tools.read: + - tools.read_file + agents: + - id: worker + model: + provider: ollama + name: qwen3 + tools: + - type: mcp + server: tools + workflow: + - id: analyze + agent: worker + task: Analyze ${{ inputs.repo }}. + outputs: + - name: report + - id: apply + agent: worker + task: Apply ${{ steps.analyze.outputs.report }}. + dependsOn: + - analyze + permissions: + default: deny + tools: + tools.read: + allow: true diff --git a/conformance/v1alpha4/invalid/5.3-invalid-pattern.yaml b/conformance/v1alpha4/invalid/5.3-invalid-pattern.yaml new file mode 100644 index 0000000..8d4cfb2 --- /dev/null +++ b/conformance/v1alpha4/invalid/5.3-invalid-pattern.yaml @@ -0,0 +1,63 @@ +# Conformance case 5.3-invalid-pattern +# Spec section 5.3: pattern is an ECMA-262 regular expression. +# Expected: invalid (input.pattern-invalid at /spec/inputs/0/pattern) +apiVersion: awp.agenticworkflowprotocol.org/v1alpha4 +kind: Workflow +metadata: + name: conformance-base +spec: + version: 1.0.0 + owner: + team: conformance-team + classification: internal + risk: + level: low + inputs: + - name: x + type: string + pattern: ([a-z + budget: + maxCostUsd: 1 + maxSteps: 10 + maxDuration: 10m + resources: + maxRetries: 2 + maxConcurrency: 1 + secrets: + - name: TOOLS_TOKEN + source: secret-manager + scope: + - tools + mcpServers: + - name: tools + transport: streamable-http + url: https://mcp.example.com/tools + auth: + secretRef: TOOLS_TOKEN + actionGroups: + tools.read: + - tools.read_file + agents: + - id: worker + model: + provider: ollama + name: qwen3 + tools: + - type: mcp + server: tools + workflow: + - id: analyze + agent: worker + task: Analyze ${{ inputs.repo }}. + outputs: + - name: report + - id: apply + agent: worker + task: Apply ${{ steps.analyze.outputs.report }}. + dependsOn: + - analyze + permissions: + default: deny + tools: + tools.read: + allow: true diff --git a/conformance/v1alpha4/invalid/5.3-required-input-with-default.yaml b/conformance/v1alpha4/invalid/5.3-required-input-with-default.yaml new file mode 100644 index 0000000..205e3d7 --- /dev/null +++ b/conformance/v1alpha4/invalid/5.3-required-input-with-default.yaml @@ -0,0 +1,64 @@ +# Conformance case 5.3-required-input-with-default +# Spec section 5.3: default MUST NOT be set when required is true. +# Expected: invalid (schema.not at /spec/inputs/0) +apiVersion: awp.agenticworkflowprotocol.org/v1alpha4 +kind: Workflow +metadata: + name: conformance-base +spec: + version: 1.0.0 + owner: + team: conformance-team + classification: internal + risk: + level: low + inputs: + - name: repo + type: string + required: true + default: x + budget: + maxCostUsd: 1 + maxSteps: 10 + maxDuration: 10m + resources: + maxRetries: 2 + maxConcurrency: 1 + secrets: + - name: TOOLS_TOKEN + source: secret-manager + scope: + - tools + mcpServers: + - name: tools + transport: streamable-http + url: https://mcp.example.com/tools + auth: + secretRef: TOOLS_TOKEN + actionGroups: + tools.read: + - tools.read_file + agents: + - id: worker + model: + provider: ollama + name: qwen3 + tools: + - type: mcp + server: tools + workflow: + - id: analyze + agent: worker + task: Analyze ${{ inputs.repo }}. + outputs: + - name: report + - id: apply + agent: worker + task: Apply ${{ steps.analyze.outputs.report }}. + dependsOn: + - analyze + permissions: + default: deny + tools: + tools.read: + allow: true diff --git a/conformance/v1alpha4/invalid/5.3-unknown-input-type.yaml b/conformance/v1alpha4/invalid/5.3-unknown-input-type.yaml new file mode 100644 index 0000000..28e0c97 --- /dev/null +++ b/conformance/v1alpha4/invalid/5.3-unknown-input-type.yaml @@ -0,0 +1,62 @@ +# Conformance case 5.3-unknown-input-type +# Spec section 5.3: type is string, integer, number, boolean, object, array or artifact. +# Expected: invalid (schema.enum at /spec/inputs/0/type) +apiVersion: awp.agenticworkflowprotocol.org/v1alpha4 +kind: Workflow +metadata: + name: conformance-base +spec: + version: 1.0.0 + owner: + team: conformance-team + classification: internal + risk: + level: low + inputs: + - name: x + type: date + budget: + maxCostUsd: 1 + maxSteps: 10 + maxDuration: 10m + resources: + maxRetries: 2 + maxConcurrency: 1 + secrets: + - name: TOOLS_TOKEN + source: secret-manager + scope: + - tools + mcpServers: + - name: tools + transport: streamable-http + url: https://mcp.example.com/tools + auth: + secretRef: TOOLS_TOKEN + actionGroups: + tools.read: + - tools.read_file + agents: + - id: worker + model: + provider: ollama + name: qwen3 + tools: + - type: mcp + server: tools + workflow: + - id: analyze + agent: worker + task: Analyze ${{ inputs.repo }}. + outputs: + - name: report + - id: apply + agent: worker + task: Apply ${{ steps.analyze.outputs.report }}. + dependsOn: + - analyze + permissions: + default: deny + tools: + tools.read: + allow: true diff --git a/conformance/v1alpha4/invalid/5.4.1-inline-agent-without-model.yaml b/conformance/v1alpha4/invalid/5.4.1-inline-agent-without-model.yaml new file mode 100644 index 0000000..2e7a552 --- /dev/null +++ b/conformance/v1alpha4/invalid/5.4.1-inline-agent-without-model.yaml @@ -0,0 +1,60 @@ +# Conformance case 5.4.1-inline-agent-without-model +# Spec section 5.4.1: An inline agent REQUIRES model. +# Expected: invalid (schema.required at /spec/agents/0) +apiVersion: awp.agenticworkflowprotocol.org/v1alpha4 +kind: Workflow +metadata: + name: conformance-base +spec: + version: 1.0.0 + owner: + team: conformance-team + classification: internal + risk: + level: low + inputs: + - name: repo + type: string + required: true + budget: + maxCostUsd: 1 + maxSteps: 10 + maxDuration: 10m + resources: + maxRetries: 2 + maxConcurrency: 1 + secrets: + - name: TOOLS_TOKEN + source: secret-manager + scope: + - tools + mcpServers: + - name: tools + transport: streamable-http + url: https://mcp.example.com/tools + auth: + secretRef: TOOLS_TOKEN + actionGroups: + tools.read: + - tools.read_file + agents: + - id: worker + tools: + - type: mcp + server: tools + workflow: + - id: analyze + agent: worker + task: Analyze ${{ inputs.repo }}. + outputs: + - name: report + - id: apply + agent: worker + task: Apply ${{ steps.analyze.outputs.report }}. + dependsOn: + - analyze + permissions: + default: deny + tools: + tools.read: + allow: true diff --git a/conformance/v1alpha4/invalid/5.4.1-instructions-and-prompt-ref.yaml b/conformance/v1alpha4/invalid/5.4.1-instructions-and-prompt-ref.yaml new file mode 100644 index 0000000..5226e35 --- /dev/null +++ b/conformance/v1alpha4/invalid/5.4.1-instructions-and-prompt-ref.yaml @@ -0,0 +1,67 @@ +# Conformance case 5.4.1-instructions-and-prompt-ref +# Spec section 5.4.1: promptRef MUST NOT be combined with instructions. +# Expected: invalid (schema.not at /spec/agents/0) +apiVersion: awp.agenticworkflowprotocol.org/v1alpha4 +kind: Workflow +metadata: + name: conformance-base +spec: + version: 1.0.0 + owner: + team: conformance-team + classification: internal + risk: + level: low + inputs: + - name: repo + type: string + required: true + budget: + maxCostUsd: 1 + maxSteps: 10 + maxDuration: 10m + resources: + maxRetries: 2 + maxConcurrency: 1 + secrets: + - name: TOOLS_TOKEN + source: secret-manager + scope: + - tools + mcpServers: + - name: tools + transport: streamable-http + url: https://mcp.example.com/tools + auth: + secretRef: TOOLS_TOKEN + actionGroups: + tools.read: + - tools.read_file + agents: + - id: worker + model: + provider: ollama + name: qwen3 + tools: + - type: mcp + server: tools + instructions: x + promptRef: + name: p + version: "1" + workflow: + - id: analyze + agent: worker + task: Analyze ${{ inputs.repo }}. + outputs: + - name: report + - id: apply + agent: worker + task: Apply ${{ steps.analyze.outputs.report }}. + dependsOn: + - analyze + permissions: + default: deny + tools: + tools.read: + allow: true diff --git a/conformance/v1alpha4/invalid/5.4.2-reference-version-range.yaml b/conformance/v1alpha4/invalid/5.4.2-reference-version-range.yaml new file mode 100644 index 0000000..044a16e --- /dev/null +++ b/conformance/v1alpha4/invalid/5.4.2-reference-version-range.yaml @@ -0,0 +1,67 @@ +# Conformance case 5.4.2-reference-version-range +# Spec section 5.4.2: ref.version is an exact SemVer version, no ranges. +# Expected: invalid (schema.pattern at /spec/agents/1/ref/version) +apiVersion: awp.agenticworkflowprotocol.org/v1alpha4 +kind: Workflow +metadata: + name: conformance-base +spec: + version: 1.0.0 + owner: + team: conformance-team + classification: internal + risk: + level: low + inputs: + - name: repo + type: string + required: true + budget: + maxCostUsd: 1 + maxSteps: 10 + maxDuration: 10m + resources: + maxRetries: 2 + maxConcurrency: 1 + secrets: + - name: TOOLS_TOKEN + source: secret-manager + scope: + - tools + mcpServers: + - name: tools + transport: streamable-http + url: https://mcp.example.com/tools + auth: + secretRef: TOOLS_TOKEN + actionGroups: + tools.read: + - tools.read_file + agents: + - id: worker + model: + provider: ollama + name: qwen3 + tools: + - type: mcp + server: tools + - id: ext + ref: + name: a + version: ^1.0.0 + workflow: + - id: analyze + agent: worker + task: Analyze ${{ inputs.repo }}. + outputs: + - name: report + - id: apply + agent: worker + task: Apply ${{ steps.analyze.outputs.report }}. + dependsOn: + - analyze + permissions: + default: deny + tools: + tools.read: + allow: true diff --git a/conformance/v1alpha4/invalid/5.4.2-reference-with-instructions.yaml b/conformance/v1alpha4/invalid/5.4.2-reference-with-instructions.yaml new file mode 100644 index 0000000..b6db6e4 --- /dev/null +++ b/conformance/v1alpha4/invalid/5.4.2-reference-with-instructions.yaml @@ -0,0 +1,68 @@ +# Conformance case 5.4.2-reference-with-instructions +# Spec section 5.4.2: An agent reference MUST NOT contain instructions. +# Expected: invalid (schema.additionalProperties at /spec/agents/1/instructions) +apiVersion: awp.agenticworkflowprotocol.org/v1alpha4 +kind: Workflow +metadata: + name: conformance-base +spec: + version: 1.0.0 + owner: + team: conformance-team + classification: internal + risk: + level: low + inputs: + - name: repo + type: string + required: true + budget: + maxCostUsd: 1 + maxSteps: 10 + maxDuration: 10m + resources: + maxRetries: 2 + maxConcurrency: 1 + secrets: + - name: TOOLS_TOKEN + source: secret-manager + scope: + - tools + mcpServers: + - name: tools + transport: streamable-http + url: https://mcp.example.com/tools + auth: + secretRef: TOOLS_TOKEN + actionGroups: + tools.read: + - tools.read_file + agents: + - id: worker + model: + provider: ollama + name: qwen3 + tools: + - type: mcp + server: tools + - id: ext + ref: + name: a + version: 1.0.0 + instructions: x + workflow: + - id: analyze + agent: worker + task: Analyze ${{ inputs.repo }}. + outputs: + - name: report + - id: apply + agent: worker + task: Apply ${{ steps.analyze.outputs.report }}. + dependsOn: + - analyze + permissions: + default: deny + tools: + tools.read: + allow: true diff --git a/conformance/v1alpha4/invalid/5.4.2-reference-with-model.yaml b/conformance/v1alpha4/invalid/5.4.2-reference-with-model.yaml new file mode 100644 index 0000000..ba244b2 --- /dev/null +++ b/conformance/v1alpha4/invalid/5.4.2-reference-with-model.yaml @@ -0,0 +1,70 @@ +# Conformance case 5.4.2-reference-with-model +# Spec section 5.4.2: An agent reference MUST NOT contain model. +# Expected: invalid (schema.additionalProperties at /spec/agents/1/model) +apiVersion: awp.agenticworkflowprotocol.org/v1alpha4 +kind: Workflow +metadata: + name: conformance-base +spec: + version: 1.0.0 + owner: + team: conformance-team + classification: internal + risk: + level: low + inputs: + - name: repo + type: string + required: true + budget: + maxCostUsd: 1 + maxSteps: 10 + maxDuration: 10m + resources: + maxRetries: 2 + maxConcurrency: 1 + secrets: + - name: TOOLS_TOKEN + source: secret-manager + scope: + - tools + mcpServers: + - name: tools + transport: streamable-http + url: https://mcp.example.com/tools + auth: + secretRef: TOOLS_TOKEN + actionGroups: + tools.read: + - tools.read_file + agents: + - id: worker + model: + provider: ollama + name: qwen3 + tools: + - type: mcp + server: tools + - id: ext + ref: + name: a + version: 1.0.0 + model: + provider: x + name: y + workflow: + - id: analyze + agent: worker + task: Analyze ${{ inputs.repo }}. + outputs: + - name: report + - id: apply + agent: worker + task: Apply ${{ steps.analyze.outputs.report }}. + dependsOn: + - analyze + permissions: + default: deny + tools: + tools.read: + allow: true diff --git a/conformance/v1alpha4/invalid/5.4.2-reference-without-version.yaml b/conformance/v1alpha4/invalid/5.4.2-reference-without-version.yaml new file mode 100644 index 0000000..d08468a --- /dev/null +++ b/conformance/v1alpha4/invalid/5.4.2-reference-without-version.yaml @@ -0,0 +1,66 @@ +# Conformance case 5.4.2-reference-without-version +# Spec section 5.4.2: ref REQUIRES name and version. +# Expected: invalid (schema.required at /spec/agents/1/ref) +apiVersion: awp.agenticworkflowprotocol.org/v1alpha4 +kind: Workflow +metadata: + name: conformance-base +spec: + version: 1.0.0 + owner: + team: conformance-team + classification: internal + risk: + level: low + inputs: + - name: repo + type: string + required: true + budget: + maxCostUsd: 1 + maxSteps: 10 + maxDuration: 10m + resources: + maxRetries: 2 + maxConcurrency: 1 + secrets: + - name: TOOLS_TOKEN + source: secret-manager + scope: + - tools + mcpServers: + - name: tools + transport: streamable-http + url: https://mcp.example.com/tools + auth: + secretRef: TOOLS_TOKEN + actionGroups: + tools.read: + - tools.read_file + agents: + - id: worker + model: + provider: ollama + name: qwen3 + tools: + - type: mcp + server: tools + - id: ext + ref: + name: a + workflow: + - id: analyze + agent: worker + task: Analyze ${{ inputs.repo }}. + outputs: + - name: report + - id: apply + agent: worker + task: Apply ${{ steps.analyze.outputs.report }}. + dependsOn: + - analyze + permissions: + default: deny + tools: + tools.read: + allow: true diff --git a/conformance/v1alpha4/invalid/5.4.3-invalid-model-approval-status.yaml b/conformance/v1alpha4/invalid/5.4.3-invalid-model-approval-status.yaml new file mode 100644 index 0000000..48430ba --- /dev/null +++ b/conformance/v1alpha4/invalid/5.4.3-invalid-model-approval-status.yaml @@ -0,0 +1,65 @@ +# Conformance case 5.4.3-invalid-model-approval-status +# Spec section 5.4.3: model.approval.status is approved, pending, rejected or revoked. +# Expected: invalid (schema.enum at /spec/agents/0/model/approval/status) +apiVersion: awp.agenticworkflowprotocol.org/v1alpha4 +kind: Workflow +metadata: + name: conformance-base +spec: + version: 1.0.0 + owner: + team: conformance-team + classification: internal + risk: + level: low + inputs: + - name: repo + type: string + required: true + budget: + maxCostUsd: 1 + maxSteps: 10 + maxDuration: 10m + resources: + maxRetries: 2 + maxConcurrency: 1 + secrets: + - name: TOOLS_TOKEN + source: secret-manager + scope: + - tools + mcpServers: + - name: tools + transport: streamable-http + url: https://mcp.example.com/tools + auth: + secretRef: TOOLS_TOKEN + actionGroups: + tools.read: + - tools.read_file + agents: + - id: worker + model: + provider: ollama + name: qwen3 + approval: + status: maybe + tools: + - type: mcp + server: tools + workflow: + - id: analyze + agent: worker + task: Analyze ${{ inputs.repo }}. + outputs: + - name: report + - id: apply + agent: worker + task: Apply ${{ steps.analyze.outputs.report }}. + dependsOn: + - analyze + permissions: + default: deny + tools: + tools.read: + allow: true diff --git a/conformance/v1alpha4/invalid/5.4.3-model-without-name.yaml b/conformance/v1alpha4/invalid/5.4.3-model-without-name.yaml new file mode 100644 index 0000000..407191b --- /dev/null +++ b/conformance/v1alpha4/invalid/5.4.3-model-without-name.yaml @@ -0,0 +1,62 @@ +# Conformance case 5.4.3-model-without-name +# Spec section 5.4.3: model REQUIRES provider and name. +# Expected: invalid (schema.required at /spec/agents/0/model) +apiVersion: awp.agenticworkflowprotocol.org/v1alpha4 +kind: Workflow +metadata: + name: conformance-base +spec: + version: 1.0.0 + owner: + team: conformance-team + classification: internal + risk: + level: low + inputs: + - name: repo + type: string + required: true + budget: + maxCostUsd: 1 + maxSteps: 10 + maxDuration: 10m + resources: + maxRetries: 2 + maxConcurrency: 1 + secrets: + - name: TOOLS_TOKEN + source: secret-manager + scope: + - tools + mcpServers: + - name: tools + transport: streamable-http + url: https://mcp.example.com/tools + auth: + secretRef: TOOLS_TOKEN + actionGroups: + tools.read: + - tools.read_file + agents: + - id: worker + model: + provider: ollama + tools: + - type: mcp + server: tools + workflow: + - id: analyze + agent: worker + task: Analyze ${{ inputs.repo }}. + outputs: + - name: report + - id: apply + agent: worker + task: Apply ${{ steps.analyze.outputs.report }}. + dependsOn: + - analyze + permissions: + default: deny + tools: + tools.read: + allow: true diff --git a/conformance/v1alpha4/invalid/5.4.4-remote-agent-http-endpoint.yaml b/conformance/v1alpha4/invalid/5.4.4-remote-agent-http-endpoint.yaml new file mode 100644 index 0000000..53d58c1 --- /dev/null +++ b/conformance/v1alpha4/invalid/5.4.4-remote-agent-http-endpoint.yaml @@ -0,0 +1,66 @@ +# Conformance case 5.4.4-remote-agent-http-endpoint +# Spec section 5.4.4: A remote agent endpoint is an HTTPS URL. +# Expected: invalid (schema.pattern at /spec/agents/1/endpoint) +apiVersion: awp.agenticworkflowprotocol.org/v1alpha4 +kind: Workflow +metadata: + name: conformance-base +spec: + version: 1.0.0 + owner: + team: conformance-team + classification: internal + risk: + level: low + inputs: + - name: repo + type: string + required: true + budget: + maxCostUsd: 1 + maxSteps: 10 + maxDuration: 10m + resources: + maxRetries: 2 + maxConcurrency: 1 + secrets: + - name: TOOLS_TOKEN + source: secret-manager + scope: + - tools + mcpServers: + - name: tools + transport: streamable-http + url: https://mcp.example.com/tools + auth: + secretRef: TOOLS_TOKEN + actionGroups: + tools.read: + - tools.read_file + agents: + - id: worker + model: + provider: ollama + name: qwen3 + tools: + - type: mcp + server: tools + - id: remote + protocol: a2a + endpoint: http://agents.example.com/a2a + workflow: + - id: analyze + agent: worker + task: Analyze ${{ inputs.repo }}. + outputs: + - name: report + - id: apply + agent: worker + task: Apply ${{ steps.analyze.outputs.report }}. + dependsOn: + - analyze + permissions: + default: deny + tools: + tools.read: + allow: true diff --git a/conformance/v1alpha4/invalid/5.4.4-remote-agent-with-model.yaml b/conformance/v1alpha4/invalid/5.4.4-remote-agent-with-model.yaml new file mode 100644 index 0000000..9128796 --- /dev/null +++ b/conformance/v1alpha4/invalid/5.4.4-remote-agent-with-model.yaml @@ -0,0 +1,69 @@ +# Conformance case 5.4.4-remote-agent-with-model +# Spec section 5.4.4: A remote agent MUST NOT contain model. +# Expected: invalid (schema.additionalProperties at /spec/agents/1/model) +apiVersion: awp.agenticworkflowprotocol.org/v1alpha4 +kind: Workflow +metadata: + name: conformance-base +spec: + version: 1.0.0 + owner: + team: conformance-team + classification: internal + risk: + level: low + inputs: + - name: repo + type: string + required: true + budget: + maxCostUsd: 1 + maxSteps: 10 + maxDuration: 10m + resources: + maxRetries: 2 + maxConcurrency: 1 + secrets: + - name: TOOLS_TOKEN + source: secret-manager + scope: + - tools + mcpServers: + - name: tools + transport: streamable-http + url: https://mcp.example.com/tools + auth: + secretRef: TOOLS_TOKEN + actionGroups: + tools.read: + - tools.read_file + agents: + - id: worker + model: + provider: ollama + name: qwen3 + tools: + - type: mcp + server: tools + - id: remote + protocol: a2a + endpoint: https://agents.example.com/a2a + model: + provider: x + name: y + workflow: + - id: analyze + agent: worker + task: Analyze ${{ inputs.repo }}. + outputs: + - name: report + - id: apply + agent: worker + task: Apply ${{ steps.analyze.outputs.report }}. + dependsOn: + - analyze + permissions: + default: deny + tools: + tools.read: + allow: true diff --git a/conformance/v1alpha4/invalid/5.4.4-remote-agent-without-endpoint.yaml b/conformance/v1alpha4/invalid/5.4.4-remote-agent-without-endpoint.yaml new file mode 100644 index 0000000..4e66a18 --- /dev/null +++ b/conformance/v1alpha4/invalid/5.4.4-remote-agent-without-endpoint.yaml @@ -0,0 +1,65 @@ +# Conformance case 5.4.4-remote-agent-without-endpoint +# Spec section 5.4.4: A remote agent REQUIRES endpoint. +# Expected: invalid (schema.required at /spec/agents/1) +apiVersion: awp.agenticworkflowprotocol.org/v1alpha4 +kind: Workflow +metadata: + name: conformance-base +spec: + version: 1.0.0 + owner: + team: conformance-team + classification: internal + risk: + level: low + inputs: + - name: repo + type: string + required: true + budget: + maxCostUsd: 1 + maxSteps: 10 + maxDuration: 10m + resources: + maxRetries: 2 + maxConcurrency: 1 + secrets: + - name: TOOLS_TOKEN + source: secret-manager + scope: + - tools + mcpServers: + - name: tools + transport: streamable-http + url: https://mcp.example.com/tools + auth: + secretRef: TOOLS_TOKEN + actionGroups: + tools.read: + - tools.read_file + agents: + - id: worker + model: + provider: ollama + name: qwen3 + tools: + - type: mcp + server: tools + - id: remote + protocol: a2a + workflow: + - id: analyze + agent: worker + task: Analyze ${{ inputs.repo }}. + outputs: + - name: report + - id: apply + agent: worker + task: Apply ${{ steps.analyze.outputs.report }}. + dependsOn: + - analyze + permissions: + default: deny + tools: + tools.read: + allow: true diff --git a/conformance/v1alpha4/invalid/5.4.4-remote-agent-wrong-protocol.yaml b/conformance/v1alpha4/invalid/5.4.4-remote-agent-wrong-protocol.yaml new file mode 100644 index 0000000..3d935e8 --- /dev/null +++ b/conformance/v1alpha4/invalid/5.4.4-remote-agent-wrong-protocol.yaml @@ -0,0 +1,66 @@ +# Conformance case 5.4.4-remote-agent-wrong-protocol +# Spec section 5.4.4: protocol MUST be a2a. +# Expected: invalid (schema.const at /spec/agents/1/protocol) +apiVersion: awp.agenticworkflowprotocol.org/v1alpha4 +kind: Workflow +metadata: + name: conformance-base +spec: + version: 1.0.0 + owner: + team: conformance-team + classification: internal + risk: + level: low + inputs: + - name: repo + type: string + required: true + budget: + maxCostUsd: 1 + maxSteps: 10 + maxDuration: 10m + resources: + maxRetries: 2 + maxConcurrency: 1 + secrets: + - name: TOOLS_TOKEN + source: secret-manager + scope: + - tools + mcpServers: + - name: tools + transport: streamable-http + url: https://mcp.example.com/tools + auth: + secretRef: TOOLS_TOKEN + actionGroups: + tools.read: + - tools.read_file + agents: + - id: worker + model: + provider: ollama + name: qwen3 + tools: + - type: mcp + server: tools + - id: remote + protocol: grpc + endpoint: https://agents.example.com/a2a + workflow: + - id: analyze + agent: worker + task: Analyze ${{ inputs.repo }}. + outputs: + - name: report + - id: apply + agent: worker + task: Apply ${{ steps.analyze.outputs.report }}. + dependsOn: + - analyze + permissions: + default: deny + tools: + tools.read: + allow: true diff --git a/conformance/v1alpha4/invalid/5.5.1-duplicate-server-name.yaml b/conformance/v1alpha4/invalid/5.5.1-duplicate-server-name.yaml new file mode 100644 index 0000000..be7c081 --- /dev/null +++ b/conformance/v1alpha4/invalid/5.5.1-duplicate-server-name.yaml @@ -0,0 +1,68 @@ +# Conformance case 5.5.1-duplicate-server-name +# Spec section 5.5.1: MCP server names are referenced by tool sources and must be unique. +# Expected: invalid (name.duplicate at /spec/mcpServers/1/name) +apiVersion: awp.agenticworkflowprotocol.org/v1alpha4 +kind: Workflow +metadata: + name: conformance-base +spec: + version: 1.0.0 + owner: + team: conformance-team + classification: internal + risk: + level: low + inputs: + - name: repo + type: string + required: true + budget: + maxCostUsd: 1 + maxSteps: 10 + maxDuration: 10m + resources: + maxRetries: 2 + maxConcurrency: 1 + secrets: + - name: TOOLS_TOKEN + source: secret-manager + scope: + - tools + mcpServers: + - name: tools + transport: streamable-http + url: https://mcp.example.com/tools + auth: + secretRef: TOOLS_TOKEN + - name: tools + transport: streamable-http + url: https://mcp.example.com/tools + auth: + secretRef: TOOLS_TOKEN + actionGroups: + tools.read: + - tools.read_file + agents: + - id: worker + model: + provider: ollama + name: qwen3 + tools: + - type: mcp + server: tools + workflow: + - id: analyze + agent: worker + task: Analyze ${{ inputs.repo }}. + outputs: + - name: report + - id: apply + agent: worker + task: Apply ${{ steps.analyze.outputs.report }}. + dependsOn: + - analyze + permissions: + default: deny + tools: + tools.read: + allow: true diff --git a/conformance/v1alpha4/invalid/5.5.1-mcp-url-not-https.yaml b/conformance/v1alpha4/invalid/5.5.1-mcp-url-not-https.yaml new file mode 100644 index 0000000..9429049 --- /dev/null +++ b/conformance/v1alpha4/invalid/5.5.1-mcp-url-not-https.yaml @@ -0,0 +1,63 @@ +# Conformance case 5.5.1-mcp-url-not-https +# Spec section 5.5.1: The url of an MCP server MUST use https. +# Expected: invalid (schema.pattern at /spec/mcpServers/0/url) +apiVersion: awp.agenticworkflowprotocol.org/v1alpha4 +kind: Workflow +metadata: + name: conformance-base +spec: + version: 1.0.0 + owner: + team: conformance-team + classification: internal + risk: + level: low + inputs: + - name: repo + type: string + required: true + budget: + maxCostUsd: 1 + maxSteps: 10 + maxDuration: 10m + resources: + maxRetries: 2 + maxConcurrency: 1 + secrets: + - name: TOOLS_TOKEN + source: secret-manager + scope: + - tools + mcpServers: + - name: tools + transport: streamable-http + url: http://mcp.example.com/tools + auth: + secretRef: TOOLS_TOKEN + actionGroups: + tools.read: + - tools.read_file + agents: + - id: worker + model: + provider: ollama + name: qwen3 + tools: + - type: mcp + server: tools + workflow: + - id: analyze + agent: worker + task: Analyze ${{ inputs.repo }}. + outputs: + - name: report + - id: apply + agent: worker + task: Apply ${{ steps.analyze.outputs.report }}. + dependsOn: + - analyze + permissions: + default: deny + tools: + tools.read: + allow: true diff --git a/conformance/v1alpha4/invalid/5.5.1-streamable-http-without-url.yaml b/conformance/v1alpha4/invalid/5.5.1-streamable-http-without-url.yaml new file mode 100644 index 0000000..ed137ad --- /dev/null +++ b/conformance/v1alpha4/invalid/5.5.1-streamable-http-without-url.yaml @@ -0,0 +1,62 @@ +# Conformance case 5.5.1-streamable-http-without-url +# Spec section 5.5.1: url is REQUIRED for streamable-http. +# Expected: invalid (schema.required at /spec/mcpServers/0) +apiVersion: awp.agenticworkflowprotocol.org/v1alpha4 +kind: Workflow +metadata: + name: conformance-base +spec: + version: 1.0.0 + owner: + team: conformance-team + classification: internal + risk: + level: low + inputs: + - name: repo + type: string + required: true + budget: + maxCostUsd: 1 + maxSteps: 10 + maxDuration: 10m + resources: + maxRetries: 2 + maxConcurrency: 1 + secrets: + - name: TOOLS_TOKEN + source: secret-manager + scope: + - tools + mcpServers: + - name: tools + transport: streamable-http + auth: + secretRef: TOOLS_TOKEN + actionGroups: + tools.read: + - tools.read_file + agents: + - id: worker + model: + provider: ollama + name: qwen3 + tools: + - type: mcp + server: tools + workflow: + - id: analyze + agent: worker + task: Analyze ${{ inputs.repo }}. + outputs: + - name: report + - id: apply + agent: worker + task: Apply ${{ steps.analyze.outputs.report }}. + dependsOn: + - analyze + permissions: + default: deny + tools: + tools.read: + allow: true diff --git a/conformance/v1alpha4/invalid/5.5.1-unknown-transport.yaml b/conformance/v1alpha4/invalid/5.5.1-unknown-transport.yaml new file mode 100644 index 0000000..230225a --- /dev/null +++ b/conformance/v1alpha4/invalid/5.5.1-unknown-transport.yaml @@ -0,0 +1,63 @@ +# Conformance case 5.5.1-unknown-transport +# Spec section 5.5.1: transport is stdio or streamable-http. +# Expected: invalid (schema.enum at /spec/mcpServers/0/transport) +apiVersion: awp.agenticworkflowprotocol.org/v1alpha4 +kind: Workflow +metadata: + name: conformance-base +spec: + version: 1.0.0 + owner: + team: conformance-team + classification: internal + risk: + level: low + inputs: + - name: repo + type: string + required: true + budget: + maxCostUsd: 1 + maxSteps: 10 + maxDuration: 10m + resources: + maxRetries: 2 + maxConcurrency: 1 + secrets: + - name: TOOLS_TOKEN + source: secret-manager + scope: + - tools + mcpServers: + - name: tools + transport: sse + url: https://mcp.example.com/tools + auth: + secretRef: TOOLS_TOKEN + actionGroups: + tools.read: + - tools.read_file + agents: + - id: worker + model: + provider: ollama + name: qwen3 + tools: + - type: mcp + server: tools + workflow: + - id: analyze + agent: worker + task: Analyze ${{ inputs.repo }}. + outputs: + - name: report + - id: apply + agent: worker + task: Apply ${{ steps.analyze.outputs.report }}. + dependsOn: + - analyze + permissions: + default: deny + tools: + tools.read: + allow: true diff --git a/conformance/v1alpha4/invalid/5.5.2-builtin-tool-source-without-name.yaml b/conformance/v1alpha4/invalid/5.5.2-builtin-tool-source-without-name.yaml new file mode 100644 index 0000000..1934de8 --- /dev/null +++ b/conformance/v1alpha4/invalid/5.5.2-builtin-tool-source-without-name.yaml @@ -0,0 +1,62 @@ +# Conformance case 5.5.2-builtin-tool-source-without-name +# Spec section 5.5.2: A builtin tool source REQUIRES name. +# Expected: invalid (schema.required at /spec/agents/0/tools/0) +apiVersion: awp.agenticworkflowprotocol.org/v1alpha4 +kind: Workflow +metadata: + name: conformance-base +spec: + version: 1.0.0 + owner: + team: conformance-team + classification: internal + risk: + level: low + inputs: + - name: repo + type: string + required: true + budget: + maxCostUsd: 1 + maxSteps: 10 + maxDuration: 10m + resources: + maxRetries: 2 + maxConcurrency: 1 + secrets: + - name: TOOLS_TOKEN + source: secret-manager + scope: + - tools + mcpServers: + - name: tools + transport: streamable-http + url: https://mcp.example.com/tools + auth: + secretRef: TOOLS_TOKEN + actionGroups: + tools.read: + - tools.read_file + agents: + - id: worker + model: + provider: ollama + name: qwen3 + tools: + - type: builtin + workflow: + - id: analyze + agent: worker + task: Analyze ${{ inputs.repo }}. + outputs: + - name: report + - id: apply + agent: worker + task: Apply ${{ steps.analyze.outputs.report }}. + dependsOn: + - analyze + permissions: + default: deny + tools: + tools.read: + allow: true diff --git a/conformance/v1alpha4/invalid/5.5.2-mcp-tool-source-without-server.yaml b/conformance/v1alpha4/invalid/5.5.2-mcp-tool-source-without-server.yaml new file mode 100644 index 0000000..ed9ffc2 --- /dev/null +++ b/conformance/v1alpha4/invalid/5.5.2-mcp-tool-source-without-server.yaml @@ -0,0 +1,62 @@ +# Conformance case 5.5.2-mcp-tool-source-without-server +# Spec section 5.5.2: An mcp tool source REQUIRES server. +# Expected: invalid (schema.required at /spec/agents/0/tools/0) +apiVersion: awp.agenticworkflowprotocol.org/v1alpha4 +kind: Workflow +metadata: + name: conformance-base +spec: + version: 1.0.0 + owner: + team: conformance-team + classification: internal + risk: + level: low + inputs: + - name: repo + type: string + required: true + budget: + maxCostUsd: 1 + maxSteps: 10 + maxDuration: 10m + resources: + maxRetries: 2 + maxConcurrency: 1 + secrets: + - name: TOOLS_TOKEN + source: secret-manager + scope: + - tools + mcpServers: + - name: tools + transport: streamable-http + url: https://mcp.example.com/tools + auth: + secretRef: TOOLS_TOKEN + actionGroups: + tools.read: + - tools.read_file + agents: + - id: worker + model: + provider: ollama + name: qwen3 + tools: + - type: mcp + workflow: + - id: analyze + agent: worker + task: Analyze ${{ inputs.repo }}. + outputs: + - name: report + - id: apply + agent: worker + task: Apply ${{ steps.analyze.outputs.report }}. + dependsOn: + - analyze + permissions: + default: deny + tools: + tools.read: + allow: true diff --git a/conformance/v1alpha4/invalid/5.5.3-invalid-action-identifier-in-permissions.yaml b/conformance/v1alpha4/invalid/5.5.3-invalid-action-identifier-in-permissions.yaml new file mode 100644 index 0000000..96a64e6 --- /dev/null +++ b/conformance/v1alpha4/invalid/5.5.3-invalid-action-identifier-in-permissions.yaml @@ -0,0 +1,63 @@ +# Conformance case 5.5.3-invalid-action-identifier-in-permissions +# Spec section 5.5.3: Permission keys are action identifiers with at least two segments. +# Expected: invalid (schema.propertyNames at /spec/permissions/tools/shell) +apiVersion: awp.agenticworkflowprotocol.org/v1alpha4 +kind: Workflow +metadata: + name: conformance-base +spec: + version: 1.0.0 + owner: + team: conformance-team + classification: internal + risk: + level: low + inputs: + - name: repo + type: string + required: true + budget: + maxCostUsd: 1 + maxSteps: 10 + maxDuration: 10m + resources: + maxRetries: 2 + maxConcurrency: 1 + secrets: + - name: TOOLS_TOKEN + source: secret-manager + scope: + - tools + mcpServers: + - name: tools + transport: streamable-http + url: https://mcp.example.com/tools + auth: + secretRef: TOOLS_TOKEN + actionGroups: + tools.read: + - tools.read_file + agents: + - id: worker + model: + provider: ollama + name: qwen3 + tools: + - type: mcp + server: tools + workflow: + - id: analyze + agent: worker + task: Analyze ${{ inputs.repo }}. + outputs: + - name: report + - id: apply + agent: worker + task: Apply ${{ steps.analyze.outputs.report }}. + dependsOn: + - analyze + permissions: + default: deny + tools: + shell: + allow: true diff --git a/conformance/v1alpha4/invalid/5.5.3-wildcard-not-final-segment.yaml b/conformance/v1alpha4/invalid/5.5.3-wildcard-not-final-segment.yaml new file mode 100644 index 0000000..5823c6b --- /dev/null +++ b/conformance/v1alpha4/invalid/5.5.3-wildcard-not-final-segment.yaml @@ -0,0 +1,63 @@ +# Conformance case 5.5.3-wildcard-not-final-segment +# Spec section 5.5.3: Only a final segment may be the wildcard *. +# Expected: invalid (schema.propertyNames at /spec/permissions/tools/*.read) +apiVersion: awp.agenticworkflowprotocol.org/v1alpha4 +kind: Workflow +metadata: + name: conformance-base +spec: + version: 1.0.0 + owner: + team: conformance-team + classification: internal + risk: + level: low + inputs: + - name: repo + type: string + required: true + budget: + maxCostUsd: 1 + maxSteps: 10 + maxDuration: 10m + resources: + maxRetries: 2 + maxConcurrency: 1 + secrets: + - name: TOOLS_TOKEN + source: secret-manager + scope: + - tools + mcpServers: + - name: tools + transport: streamable-http + url: https://mcp.example.com/tools + auth: + secretRef: TOOLS_TOKEN + actionGroups: + tools.read: + - tools.read_file + agents: + - id: worker + model: + provider: ollama + name: qwen3 + tools: + - type: mcp + server: tools + workflow: + - id: analyze + agent: worker + task: Analyze ${{ inputs.repo }}. + outputs: + - name: report + - id: apply + agent: worker + task: Apply ${{ steps.analyze.outputs.report }}. + dependsOn: + - analyze + permissions: + default: deny + tools: + "*.read": + allow: true diff --git a/conformance/v1alpha4/invalid/5.5.4-group-contains-group.yaml b/conformance/v1alpha4/invalid/5.5.4-group-contains-group.yaml new file mode 100644 index 0000000..6ff0cb9 --- /dev/null +++ b/conformance/v1alpha4/invalid/5.5.4-group-contains-group.yaml @@ -0,0 +1,65 @@ +# Conformance case 5.5.4-group-contains-group +# Spec section 5.5.4: Groups MUST NOT contain other groups. +# Expected: invalid (actionGroup.nested at /spec/actionGroups/tools.all/0) +apiVersion: awp.agenticworkflowprotocol.org/v1alpha4 +kind: Workflow +metadata: + name: conformance-base +spec: + version: 1.0.0 + owner: + team: conformance-team + classification: internal + risk: + level: low + inputs: + - name: repo + type: string + required: true + budget: + maxCostUsd: 1 + maxSteps: 10 + maxDuration: 10m + resources: + maxRetries: 2 + maxConcurrency: 1 + secrets: + - name: TOOLS_TOKEN + source: secret-manager + scope: + - tools + mcpServers: + - name: tools + transport: streamable-http + url: https://mcp.example.com/tools + auth: + secretRef: TOOLS_TOKEN + actionGroups: + tools.read: + - tools.read_file + tools.all: + - tools.read + agents: + - id: worker + model: + provider: ollama + name: qwen3 + tools: + - type: mcp + server: tools + workflow: + - id: analyze + agent: worker + task: Analyze ${{ inputs.repo }}. + outputs: + - name: report + - id: apply + agent: worker + task: Apply ${{ steps.analyze.outputs.report }}. + dependsOn: + - analyze + permissions: + default: deny + tools: + tools.read: + allow: true diff --git a/conformance/v1alpha4/invalid/5.5.4-invalid-group-identifier.yaml b/conformance/v1alpha4/invalid/5.5.4-invalid-group-identifier.yaml new file mode 100644 index 0000000..eb34dce --- /dev/null +++ b/conformance/v1alpha4/invalid/5.5.4-invalid-group-identifier.yaml @@ -0,0 +1,63 @@ +# Conformance case 5.5.4-invalid-group-identifier +# Spec section 5.5.4: A group identifier MUST be a valid action identifier. +# Expected: invalid (schema.propertyNames at /spec/actionGroups/readers) +apiVersion: awp.agenticworkflowprotocol.org/v1alpha4 +kind: Workflow +metadata: + name: conformance-base +spec: + version: 1.0.0 + owner: + team: conformance-team + classification: internal + risk: + level: low + inputs: + - name: repo + type: string + required: true + budget: + maxCostUsd: 1 + maxSteps: 10 + maxDuration: 10m + resources: + maxRetries: 2 + maxConcurrency: 1 + secrets: + - name: TOOLS_TOKEN + source: secret-manager + scope: + - tools + mcpServers: + - name: tools + transport: streamable-http + url: https://mcp.example.com/tools + auth: + secretRef: TOOLS_TOKEN + actionGroups: + readers: + - tools.read_file + agents: + - id: worker + model: + provider: ollama + name: qwen3 + tools: + - type: mcp + server: tools + workflow: + - id: analyze + agent: worker + task: Analyze ${{ inputs.repo }}. + outputs: + - name: report + - id: apply + agent: worker + task: Apply ${{ steps.analyze.outputs.report }}. + dependsOn: + - analyze + permissions: + default: deny + tools: + tools.read: + allow: true diff --git a/conformance/v1alpha4/invalid/5.6.1-agent-step-with-command.yaml b/conformance/v1alpha4/invalid/5.6.1-agent-step-with-command.yaml new file mode 100644 index 0000000..0660159 --- /dev/null +++ b/conformance/v1alpha4/invalid/5.6.1-agent-step-with-command.yaml @@ -0,0 +1,64 @@ +# Conformance case 5.6.1-agent-step-with-command +# Spec section 5.6.1: Fields of command steps are not allowed in agent steps. +# Expected: invalid (schema.not at /spec/workflow/0) +apiVersion: awp.agenticworkflowprotocol.org/v1alpha4 +kind: Workflow +metadata: + name: conformance-base +spec: + version: 1.0.0 + owner: + team: conformance-team + classification: internal + risk: + level: low + inputs: + - name: repo + type: string + required: true + budget: + maxCostUsd: 1 + maxSteps: 10 + maxDuration: 10m + resources: + maxRetries: 2 + maxConcurrency: 1 + secrets: + - name: TOOLS_TOKEN + source: secret-manager + scope: + - tools + mcpServers: + - name: tools + transport: streamable-http + url: https://mcp.example.com/tools + auth: + secretRef: TOOLS_TOKEN + actionGroups: + tools.read: + - tools.read_file + agents: + - id: worker + model: + provider: ollama + name: qwen3 + tools: + - type: mcp + server: tools + workflow: + - id: analyze + agent: worker + task: Analyze ${{ inputs.repo }}. + outputs: + - name: report + command: ls + - id: apply + agent: worker + task: Apply ${{ steps.analyze.outputs.report }}. + dependsOn: + - analyze + permissions: + default: deny + tools: + tools.read: + allow: true diff --git a/conformance/v1alpha4/invalid/5.6.1-agent-step-without-agent.yaml b/conformance/v1alpha4/invalid/5.6.1-agent-step-without-agent.yaml new file mode 100644 index 0000000..4b7c464 --- /dev/null +++ b/conformance/v1alpha4/invalid/5.6.1-agent-step-without-agent.yaml @@ -0,0 +1,62 @@ +# Conformance case 5.6.1-agent-step-without-agent +# Spec section 5.6.1: An agent step REQUIRES agent. +# Expected: invalid (schema.required at /spec/workflow/0) +apiVersion: awp.agenticworkflowprotocol.org/v1alpha4 +kind: Workflow +metadata: + name: conformance-base +spec: + version: 1.0.0 + owner: + team: conformance-team + classification: internal + risk: + level: low + inputs: + - name: repo + type: string + required: true + budget: + maxCostUsd: 1 + maxSteps: 10 + maxDuration: 10m + resources: + maxRetries: 2 + maxConcurrency: 1 + secrets: + - name: TOOLS_TOKEN + source: secret-manager + scope: + - tools + mcpServers: + - name: tools + transport: streamable-http + url: https://mcp.example.com/tools + auth: + secretRef: TOOLS_TOKEN + actionGroups: + tools.read: + - tools.read_file + agents: + - id: worker + model: + provider: ollama + name: qwen3 + tools: + - type: mcp + server: tools + workflow: + - id: analyze + task: Analyze ${{ inputs.repo }}. + outputs: + - name: report + - id: apply + agent: worker + task: Apply ${{ steps.analyze.outputs.report }}. + dependsOn: + - analyze + permissions: + default: deny + tools: + tools.read: + allow: true diff --git a/conformance/v1alpha4/invalid/5.6.1-approval-step-required-for.yaml b/conformance/v1alpha4/invalid/5.6.1-approval-step-required-for.yaml new file mode 100644 index 0000000..65e0fa3 --- /dev/null +++ b/conformance/v1alpha4/invalid/5.6.1-approval-step-required-for.yaml @@ -0,0 +1,72 @@ +# Conformance case 5.6.1-approval-step-required-for +# Spec section 5.6.1: An approval step has no requiredFor; it applies only at workflow level. +# Expected: invalid (schema.additionalProperties at /spec/workflow/2/approval/requiredFor) +apiVersion: awp.agenticworkflowprotocol.org/v1alpha4 +kind: Workflow +metadata: + name: conformance-base +spec: + version: 1.0.0 + owner: + team: conformance-team + classification: internal + risk: + level: low + inputs: + - name: repo + type: string + required: true + budget: + maxCostUsd: 1 + maxSteps: 10 + maxDuration: 10m + resources: + maxRetries: 2 + maxConcurrency: 1 + secrets: + - name: TOOLS_TOKEN + source: secret-manager + scope: + - tools + mcpServers: + - name: tools + transport: streamable-http + url: https://mcp.example.com/tools + auth: + secretRef: TOOLS_TOKEN + actionGroups: + tools.read: + - tools.read_file + agents: + - id: worker + model: + provider: ollama + name: qwen3 + tools: + - type: mcp + server: tools + workflow: + - id: analyze + agent: worker + task: Analyze ${{ inputs.repo }}. + outputs: + - name: report + - id: apply + agent: worker + task: Apply ${{ steps.analyze.outputs.report }}. + dependsOn: + - analyze + - id: gate + type: approval + dependsOn: + - apply + approval: + approvers: + - role: release-manager + requiredFor: + - production.deploy + permissions: + default: deny + tools: + tools.read: + allow: true diff --git a/conformance/v1alpha4/invalid/5.6.1-approval-step-separation-of-duties.yaml b/conformance/v1alpha4/invalid/5.6.1-approval-step-separation-of-duties.yaml new file mode 100644 index 0000000..31f381f --- /dev/null +++ b/conformance/v1alpha4/invalid/5.6.1-approval-step-separation-of-duties.yaml @@ -0,0 +1,74 @@ +# Conformance case 5.6.1-approval-step-separation-of-duties +# Spec section 5.6.1: An approval step has no separationOfDuties; it applies only at workflow level. +# Expected: invalid (schema.additionalProperties at /spec/workflow/2/approval/separationOfDuties) +apiVersion: awp.agenticworkflowprotocol.org/v1alpha4 +kind: Workflow +metadata: + name: conformance-base +spec: + version: 1.0.0 + owner: + team: conformance-team + classification: internal + risk: + level: low + inputs: + - name: repo + type: string + required: true + budget: + maxCostUsd: 1 + maxSteps: 10 + maxDuration: 10m + resources: + maxRetries: 2 + maxConcurrency: 1 + secrets: + - name: TOOLS_TOKEN + source: secret-manager + scope: + - tools + mcpServers: + - name: tools + transport: streamable-http + url: https://mcp.example.com/tools + auth: + secretRef: TOOLS_TOKEN + actionGroups: + tools.read: + - tools.read_file + agents: + - id: worker + model: + provider: ollama + name: qwen3 + tools: + - type: mcp + server: tools + workflow: + - id: analyze + agent: worker + task: Analyze ${{ inputs.repo }}. + outputs: + - name: report + - id: apply + agent: worker + task: Apply ${{ steps.analyze.outputs.report }}. + dependsOn: + - analyze + - id: gate + type: approval + dependsOn: + - apply + approval: + approvers: + - role: release-manager + separationOfDuties: + enabled: true + rules: + - initiatorCannotApprove: true + permissions: + default: deny + tools: + tools.read: + allow: true diff --git a/conformance/v1alpha4/invalid/5.6.1-approval-step-without-approval.yaml b/conformance/v1alpha4/invalid/5.6.1-approval-step-without-approval.yaml new file mode 100644 index 0000000..621b5ff --- /dev/null +++ b/conformance/v1alpha4/invalid/5.6.1-approval-step-without-approval.yaml @@ -0,0 +1,67 @@ +# Conformance case 5.6.1-approval-step-without-approval +# Spec section 5.6.1: An approval step REQUIRES approval. +# Expected: invalid (schema.required at /spec/workflow/2) +apiVersion: awp.agenticworkflowprotocol.org/v1alpha4 +kind: Workflow +metadata: + name: conformance-base +spec: + version: 1.0.0 + owner: + team: conformance-team + classification: internal + risk: + level: low + inputs: + - name: repo + type: string + required: true + budget: + maxCostUsd: 1 + maxSteps: 10 + maxDuration: 10m + resources: + maxRetries: 2 + maxConcurrency: 1 + secrets: + - name: TOOLS_TOKEN + source: secret-manager + scope: + - tools + mcpServers: + - name: tools + transport: streamable-http + url: https://mcp.example.com/tools + auth: + secretRef: TOOLS_TOKEN + actionGroups: + tools.read: + - tools.read_file + agents: + - id: worker + model: + provider: ollama + name: qwen3 + tools: + - type: mcp + server: tools + workflow: + - id: analyze + agent: worker + task: Analyze ${{ inputs.repo }}. + outputs: + - name: report + - id: apply + agent: worker + task: Apply ${{ steps.analyze.outputs.report }}. + dependsOn: + - analyze + - id: gate + type: approval + dependsOn: + - apply + permissions: + default: deny + tools: + tools.read: + allow: true diff --git a/conformance/v1alpha4/invalid/5.6.1-command-step-with-agent.yaml b/conformance/v1alpha4/invalid/5.6.1-command-step-with-agent.yaml new file mode 100644 index 0000000..f62ce6f --- /dev/null +++ b/conformance/v1alpha4/invalid/5.6.1-command-step-with-agent.yaml @@ -0,0 +1,67 @@ +# Conformance case 5.6.1-command-step-with-agent +# Spec section 5.6.1: A command step has no agent. +# Expected: invalid (schema.not at /spec/workflow/2) +apiVersion: awp.agenticworkflowprotocol.org/v1alpha4 +kind: Workflow +metadata: + name: conformance-base +spec: + version: 1.0.0 + owner: + team: conformance-team + classification: internal + risk: + level: low + inputs: + - name: repo + type: string + required: true + budget: + maxCostUsd: 1 + maxSteps: 10 + maxDuration: 10m + resources: + maxRetries: 2 + maxConcurrency: 1 + secrets: + - name: TOOLS_TOKEN + source: secret-manager + scope: + - tools + mcpServers: + - name: tools + transport: streamable-http + url: https://mcp.example.com/tools + auth: + secretRef: TOOLS_TOKEN + actionGroups: + tools.read: + - tools.read_file + agents: + - id: worker + model: + provider: ollama + name: qwen3 + tools: + - type: mcp + server: tools + workflow: + - id: analyze + agent: worker + task: Analyze ${{ inputs.repo }}. + outputs: + - name: report + - id: apply + agent: worker + task: Apply ${{ steps.analyze.outputs.report }}. + dependsOn: + - analyze + - id: cmd + type: command + command: ls + agent: worker + permissions: + default: deny + tools: + tools.read: + allow: true diff --git a/conformance/v1alpha4/invalid/5.6.1-command-step-without-command.yaml b/conformance/v1alpha4/invalid/5.6.1-command-step-without-command.yaml new file mode 100644 index 0000000..c8242db --- /dev/null +++ b/conformance/v1alpha4/invalid/5.6.1-command-step-without-command.yaml @@ -0,0 +1,67 @@ +# Conformance case 5.6.1-command-step-without-command +# Spec section 5.6.1: A command step REQUIRES command. +# Expected: invalid (schema.required at /spec/workflow/2) +apiVersion: awp.agenticworkflowprotocol.org/v1alpha4 +kind: Workflow +metadata: + name: conformance-base +spec: + version: 1.0.0 + owner: + team: conformance-team + classification: internal + risk: + level: low + inputs: + - name: repo + type: string + required: true + budget: + maxCostUsd: 1 + maxSteps: 10 + maxDuration: 10m + resources: + maxRetries: 2 + maxConcurrency: 1 + secrets: + - name: TOOLS_TOKEN + source: secret-manager + scope: + - tools + mcpServers: + - name: tools + transport: streamable-http + url: https://mcp.example.com/tools + auth: + secretRef: TOOLS_TOKEN + actionGroups: + tools.read: + - tools.read_file + agents: + - id: worker + model: + provider: ollama + name: qwen3 + tools: + - type: mcp + server: tools + workflow: + - id: analyze + agent: worker + task: Analyze ${{ inputs.repo }}. + outputs: + - name: report + - id: apply + agent: worker + task: Apply ${{ steps.analyze.outputs.report }}. + dependsOn: + - analyze + - id: cmd + type: command + dependsOn: + - apply + permissions: + default: deny + tools: + tools.read: + allow: true diff --git a/conformance/v1alpha4/invalid/5.6.1-negative-retries.yaml b/conformance/v1alpha4/invalid/5.6.1-negative-retries.yaml new file mode 100644 index 0000000..a2d6335 --- /dev/null +++ b/conformance/v1alpha4/invalid/5.6.1-negative-retries.yaml @@ -0,0 +1,64 @@ +# Conformance case 5.6.1-negative-retries +# Spec section 5.6.1: retries is a non-negative integer. +# Expected: invalid (schema.minimum at /spec/workflow/0/retries) +apiVersion: awp.agenticworkflowprotocol.org/v1alpha4 +kind: Workflow +metadata: + name: conformance-base +spec: + version: 1.0.0 + owner: + team: conformance-team + classification: internal + risk: + level: low + inputs: + - name: repo + type: string + required: true + budget: + maxCostUsd: 1 + maxSteps: 10 + maxDuration: 10m + resources: + maxRetries: 2 + maxConcurrency: 1 + secrets: + - name: TOOLS_TOKEN + source: secret-manager + scope: + - tools + mcpServers: + - name: tools + transport: streamable-http + url: https://mcp.example.com/tools + auth: + secretRef: TOOLS_TOKEN + actionGroups: + tools.read: + - tools.read_file + agents: + - id: worker + model: + provider: ollama + name: qwen3 + tools: + - type: mcp + server: tools + workflow: + - id: analyze + agent: worker + task: Analyze ${{ inputs.repo }}. + outputs: + - name: report + retries: -1 + - id: apply + agent: worker + task: Apply ${{ steps.analyze.outputs.report }}. + dependsOn: + - analyze + permissions: + default: deny + tools: + tools.read: + allow: true diff --git a/conformance/v1alpha4/invalid/5.6.1-output-name-with-dot.yaml b/conformance/v1alpha4/invalid/5.6.1-output-name-with-dot.yaml new file mode 100644 index 0000000..6367d9c --- /dev/null +++ b/conformance/v1alpha4/invalid/5.6.1-output-name-with-dot.yaml @@ -0,0 +1,82 @@ +# Conformance case 5.6.1-output-name-with-dot +# Spec section 5.6.1: Output names match ^[A-Za-z_][A-Za-z0-9_]{0,62}$, so that they are file names and expression keys. +# Expected: invalid (schema.pattern at /spec/workflow/2/outputs/0/name) +apiVersion: awp.agenticworkflowprotocol.org/v1alpha4 +kind: Workflow +metadata: + name: conformance-base +spec: + version: 1.0.0 + owner: + team: conformance-team + classification: internal + risk: + level: low + inputs: + - name: repo + type: string + default: example-org/web-shop + budget: + maxCostUsd: 1 + maxSteps: 10 + maxDuration: 10m + resources: + maxRetries: 2 + maxConcurrency: 1 + secrets: + - name: TOOLS_TOKEN + source: secret-manager + scope: + - tools + mcpServers: + - name: tools + transport: streamable-http + url: https://mcp.example.com/tools + auth: + secretRef: TOOLS_TOKEN + actionGroups: + tools.read: + - tools.read_file + agents: + - id: worker + model: + provider: ollama + name: qwen3 + tools: + - type: mcp + server: tools + workflow: + - id: analyze + agent: worker + task: Analyze ${{ inputs.repo }}. + outputs: + - name: report + - id: apply + agent: worker + task: Apply ${{ steps.analyze.outputs.report }}. + dependsOn: + - analyze + - id: count + type: command + command: ./count.sh + env: + REPORT: ${{ steps.analyze.outputs.report }} + dependsOn: + - analyze + outputs: + - name: ../report.json + permissions: + default: deny + tools: + tools.read: + allow: true + triggers: + - type: manual + - type: schedule + cron: 0 6 * * 1-5 + timezone: Europe/Berlin + - type: event + source: git.example.com + eventType: pull_request.opened + filter: + repository: example-org/web-shop diff --git a/conformance/v1alpha4/invalid/5.6.1-retries-exceed-max-retries.yaml b/conformance/v1alpha4/invalid/5.6.1-retries-exceed-max-retries.yaml new file mode 100644 index 0000000..078f762 --- /dev/null +++ b/conformance/v1alpha4/invalid/5.6.1-retries-exceed-max-retries.yaml @@ -0,0 +1,64 @@ +# Conformance case 5.6.1-retries-exceed-max-retries +# Spec section 5.6.1: retries MUST NOT exceed budget.resources.maxRetries if set. +# Expected: invalid (retries.exceeds-budget at /spec/workflow/0/retries) +apiVersion: awp.agenticworkflowprotocol.org/v1alpha4 +kind: Workflow +metadata: + name: conformance-base +spec: + version: 1.0.0 + owner: + team: conformance-team + classification: internal + risk: + level: low + inputs: + - name: repo + type: string + required: true + budget: + maxCostUsd: 1 + maxSteps: 10 + maxDuration: 10m + resources: + maxRetries: 2 + maxConcurrency: 1 + secrets: + - name: TOOLS_TOKEN + source: secret-manager + scope: + - tools + mcpServers: + - name: tools + transport: streamable-http + url: https://mcp.example.com/tools + auth: + secretRef: TOOLS_TOKEN + actionGroups: + tools.read: + - tools.read_file + agents: + - id: worker + model: + provider: ollama + name: qwen3 + tools: + - type: mcp + server: tools + workflow: + - id: analyze + agent: worker + task: Analyze ${{ inputs.repo }}. + outputs: + - name: report + retries: 5 + - id: apply + agent: worker + task: Apply ${{ steps.analyze.outputs.report }}. + dependsOn: + - analyze + permissions: + default: deny + tools: + tools.read: + allow: true diff --git a/conformance/v1alpha4/invalid/5.6.1-unknown-step-type.yaml b/conformance/v1alpha4/invalid/5.6.1-unknown-step-type.yaml new file mode 100644 index 0000000..f82af93 --- /dev/null +++ b/conformance/v1alpha4/invalid/5.6.1-unknown-step-type.yaml @@ -0,0 +1,64 @@ +# Conformance case 5.6.1-unknown-step-type +# Spec section 5.6.1: type is agent, command or approval. +# Expected: invalid (schema.enum at /spec/workflow/0/type) +apiVersion: awp.agenticworkflowprotocol.org/v1alpha4 +kind: Workflow +metadata: + name: conformance-base +spec: + version: 1.0.0 + owner: + team: conformance-team + classification: internal + risk: + level: low + inputs: + - name: repo + type: string + required: true + budget: + maxCostUsd: 1 + maxSteps: 10 + maxDuration: 10m + resources: + maxRetries: 2 + maxConcurrency: 1 + secrets: + - name: TOOLS_TOKEN + source: secret-manager + scope: + - tools + mcpServers: + - name: tools + transport: streamable-http + url: https://mcp.example.com/tools + auth: + secretRef: TOOLS_TOKEN + actionGroups: + tools.read: + - tools.read_file + agents: + - id: worker + model: + provider: ollama + name: qwen3 + tools: + - type: mcp + server: tools + workflow: + - id: analyze + agent: worker + task: Analyze ${{ inputs.repo }}. + outputs: + - name: report + type: parallel + - id: apply + agent: worker + task: Apply ${{ steps.analyze.outputs.report }}. + dependsOn: + - analyze + permissions: + default: deny + tools: + tools.read: + allow: true diff --git a/conformance/v1alpha4/invalid/5.6.2-env-key-invalid.yaml b/conformance/v1alpha4/invalid/5.6.2-env-key-invalid.yaml new file mode 100644 index 0000000..762b7fe --- /dev/null +++ b/conformance/v1alpha4/invalid/5.6.2-env-key-invalid.yaml @@ -0,0 +1,70 @@ +# Conformance case 5.6.2-env-key-invalid +# Spec section 5.6.2: env keys are environment variable names. +# Expected: invalid (schema.propertyNames at /spec/workflow/2/env/BAD-KEY) +apiVersion: awp.agenticworkflowprotocol.org/v1alpha4 +kind: Workflow +metadata: + name: conformance-base +spec: + version: 1.0.0 + owner: + team: conformance-team + classification: internal + risk: + level: low + inputs: + - name: repo + type: string + required: true + budget: + maxCostUsd: 1 + maxSteps: 10 + maxDuration: 10m + resources: + maxRetries: 2 + maxConcurrency: 1 + secrets: + - name: TOOLS_TOKEN + source: secret-manager + scope: + - tools + mcpServers: + - name: tools + transport: streamable-http + url: https://mcp.example.com/tools + auth: + secretRef: TOOLS_TOKEN + actionGroups: + tools.read: + - tools.read_file + agents: + - id: worker + model: + provider: ollama + name: qwen3 + tools: + - type: mcp + server: tools + workflow: + - id: analyze + agent: worker + task: Analyze ${{ inputs.repo }}. + outputs: + - name: report + - id: apply + agent: worker + task: Apply ${{ steps.analyze.outputs.report }}. + dependsOn: + - analyze + - id: cmd + type: command + command: "true" + env: + BAD-KEY: x + dependsOn: + - apply + permissions: + default: deny + tools: + tools.read: + allow: true diff --git a/conformance/v1alpha4/invalid/5.6.3-dependency-cycle.yaml b/conformance/v1alpha4/invalid/5.6.3-dependency-cycle.yaml new file mode 100644 index 0000000..21c8315 --- /dev/null +++ b/conformance/v1alpha4/invalid/5.6.3-dependency-cycle.yaml @@ -0,0 +1,65 @@ +# Conformance case 5.6.3-dependency-cycle +# Spec section 5.6.3: The runtime MUST reject a workflow whose steps contain a cycle. +# Expected: invalid (dependsOn.cycle at /spec/workflow) +apiVersion: awp.agenticworkflowprotocol.org/v1alpha4 +kind: Workflow +metadata: + name: conformance-base +spec: + version: 1.0.0 + owner: + team: conformance-team + classification: internal + risk: + level: low + inputs: + - name: repo + type: string + required: true + budget: + maxCostUsd: 1 + maxSteps: 10 + maxDuration: 10m + resources: + maxRetries: 2 + maxConcurrency: 1 + secrets: + - name: TOOLS_TOKEN + source: secret-manager + scope: + - tools + mcpServers: + - name: tools + transport: streamable-http + url: https://mcp.example.com/tools + auth: + secretRef: TOOLS_TOKEN + actionGroups: + tools.read: + - tools.read_file + agents: + - id: worker + model: + provider: ollama + name: qwen3 + tools: + - type: mcp + server: tools + workflow: + - id: analyze + agent: worker + task: Go + outputs: + - name: report + dependsOn: + - apply + - id: apply + agent: worker + task: Apply ${{ steps.analyze.outputs.report }}. + dependsOn: + - analyze + permissions: + default: deny + tools: + tools.read: + allow: true diff --git a/conformance/v1alpha4/invalid/5.6.3-depends-on-unknown-step.yaml b/conformance/v1alpha4/invalid/5.6.3-depends-on-unknown-step.yaml new file mode 100644 index 0000000..95c6f20 --- /dev/null +++ b/conformance/v1alpha4/invalid/5.6.3-depends-on-unknown-step.yaml @@ -0,0 +1,64 @@ +# Conformance case 5.6.3-depends-on-unknown-step +# Spec section 5.6.3: A dependsOn entry that names a non-existent step is rejected. +# Expected: invalid (dependsOn.unknown-step at /spec/workflow/1/dependsOn/1) +apiVersion: awp.agenticworkflowprotocol.org/v1alpha4 +kind: Workflow +metadata: + name: conformance-base +spec: + version: 1.0.0 + owner: + team: conformance-team + classification: internal + risk: + level: low + inputs: + - name: repo + type: string + required: true + budget: + maxCostUsd: 1 + maxSteps: 10 + maxDuration: 10m + resources: + maxRetries: 2 + maxConcurrency: 1 + secrets: + - name: TOOLS_TOKEN + source: secret-manager + scope: + - tools + mcpServers: + - name: tools + transport: streamable-http + url: https://mcp.example.com/tools + auth: + secretRef: TOOLS_TOKEN + actionGroups: + tools.read: + - tools.read_file + agents: + - id: worker + model: + provider: ollama + name: qwen3 + tools: + - type: mcp + server: tools + workflow: + - id: analyze + agent: worker + task: Analyze ${{ inputs.repo }}. + outputs: + - name: report + - id: apply + agent: worker + task: Apply ${{ steps.analyze.outputs.report }}. + dependsOn: + - analyze + - ghost + permissions: + default: deny + tools: + tools.read: + allow: true diff --git a/conformance/v1alpha4/invalid/5.6.3-duplicate-step-id.yaml b/conformance/v1alpha4/invalid/5.6.3-duplicate-step-id.yaml new file mode 100644 index 0000000..f7423fc --- /dev/null +++ b/conformance/v1alpha4/invalid/5.6.3-duplicate-step-id.yaml @@ -0,0 +1,62 @@ +# Conformance case 5.6.3-duplicate-step-id +# Spec section 5.6.3: The runtime MUST reject a duplicate step id. +# Expected: invalid (id.duplicate at /spec/workflow/1/id) +apiVersion: awp.agenticworkflowprotocol.org/v1alpha4 +kind: Workflow +metadata: + name: conformance-base +spec: + version: 1.0.0 + owner: + team: conformance-team + classification: internal + risk: + level: low + inputs: + - name: repo + type: string + required: true + budget: + maxCostUsd: 1 + maxSteps: 10 + maxDuration: 10m + resources: + maxRetries: 2 + maxConcurrency: 1 + secrets: + - name: TOOLS_TOKEN + source: secret-manager + scope: + - tools + mcpServers: + - name: tools + transport: streamable-http + url: https://mcp.example.com/tools + auth: + secretRef: TOOLS_TOKEN + actionGroups: + tools.read: + - tools.read_file + agents: + - id: worker + model: + provider: ollama + name: qwen3 + tools: + - type: mcp + server: tools + workflow: + - id: analyze + agent: worker + task: Analyze ${{ inputs.repo }}. + outputs: + - name: report + - id: analyze + agent: worker + task: x + dependsOn: [] + permissions: + default: deny + tools: + tools.read: + allow: true diff --git a/conformance/v1alpha4/invalid/5.6.3-self-dependency.yaml b/conformance/v1alpha4/invalid/5.6.3-self-dependency.yaml new file mode 100644 index 0000000..6a34cd4 --- /dev/null +++ b/conformance/v1alpha4/invalid/5.6.3-self-dependency.yaml @@ -0,0 +1,65 @@ +# Conformance case 5.6.3-self-dependency +# Spec section 5.6.3: A step that depends on itself is a cycle. +# Expected: invalid (dependsOn.cycle at /spec/workflow/0/dependsOn) +apiVersion: awp.agenticworkflowprotocol.org/v1alpha4 +kind: Workflow +metadata: + name: conformance-base +spec: + version: 1.0.0 + owner: + team: conformance-team + classification: internal + risk: + level: low + inputs: + - name: repo + type: string + required: true + budget: + maxCostUsd: 1 + maxSteps: 10 + maxDuration: 10m + resources: + maxRetries: 2 + maxConcurrency: 1 + secrets: + - name: TOOLS_TOKEN + source: secret-manager + scope: + - tools + mcpServers: + - name: tools + transport: streamable-http + url: https://mcp.example.com/tools + auth: + secretRef: TOOLS_TOKEN + actionGroups: + tools.read: + - tools.read_file + agents: + - id: worker + model: + provider: ollama + name: qwen3 + tools: + - type: mcp + server: tools + workflow: + - id: analyze + agent: worker + task: Analyze ${{ inputs.repo }}. + outputs: + - name: report + dependsOn: + - analyze + - id: apply + agent: worker + task: Apply ${{ steps.analyze.outputs.report }}. + dependsOn: + - analyze + permissions: + default: deny + tools: + tools.read: + allow: true diff --git a/conformance/v1alpha4/invalid/5.6.3-undeclared-step-output.yaml b/conformance/v1alpha4/invalid/5.6.3-undeclared-step-output.yaml new file mode 100644 index 0000000..914a2d3 --- /dev/null +++ b/conformance/v1alpha4/invalid/5.6.3-undeclared-step-output.yaml @@ -0,0 +1,63 @@ +# Conformance case 5.6.3-undeclared-step-output +# Spec section 5.6.3: Outputs not declared in outputs MUST NOT be referenced. +# Expected: invalid (expr.undeclared-output at /spec/workflow/1/task) +apiVersion: awp.agenticworkflowprotocol.org/v1alpha4 +kind: Workflow +metadata: + name: conformance-base +spec: + version: 1.0.0 + owner: + team: conformance-team + classification: internal + risk: + level: low + inputs: + - name: repo + type: string + required: true + budget: + maxCostUsd: 1 + maxSteps: 10 + maxDuration: 10m + resources: + maxRetries: 2 + maxConcurrency: 1 + secrets: + - name: TOOLS_TOKEN + source: secret-manager + scope: + - tools + mcpServers: + - name: tools + transport: streamable-http + url: https://mcp.example.com/tools + auth: + secretRef: TOOLS_TOKEN + actionGroups: + tools.read: + - tools.read_file + agents: + - id: worker + model: + provider: ollama + name: qwen3 + tools: + - type: mcp + server: tools + workflow: + - id: analyze + agent: worker + task: Analyze ${{ inputs.repo }}. + outputs: + - name: report + - id: apply + agent: worker + task: ${{ steps.analyze.outputs.summary }} + dependsOn: + - analyze + permissions: + default: deny + tools: + tools.read: + allow: true diff --git a/conformance/v1alpha4/invalid/5.6.3-unknown-agent.yaml b/conformance/v1alpha4/invalid/5.6.3-unknown-agent.yaml new file mode 100644 index 0000000..3863108 --- /dev/null +++ b/conformance/v1alpha4/invalid/5.6.3-unknown-agent.yaml @@ -0,0 +1,63 @@ +# Conformance case 5.6.3-unknown-agent +# Spec section 5.6.3: An agent that names a non-existent agent is rejected. +# Expected: invalid (step.unknown-agent at /spec/workflow/0/agent) +apiVersion: awp.agenticworkflowprotocol.org/v1alpha4 +kind: Workflow +metadata: + name: conformance-base +spec: + version: 1.0.0 + owner: + team: conformance-team + classification: internal + risk: + level: low + inputs: + - name: repo + type: string + required: true + budget: + maxCostUsd: 1 + maxSteps: 10 + maxDuration: 10m + resources: + maxRetries: 2 + maxConcurrency: 1 + secrets: + - name: TOOLS_TOKEN + source: secret-manager + scope: + - tools + mcpServers: + - name: tools + transport: streamable-http + url: https://mcp.example.com/tools + auth: + secretRef: TOOLS_TOKEN + actionGroups: + tools.read: + - tools.read_file + agents: + - id: worker + model: + provider: ollama + name: qwen3 + tools: + - type: mcp + server: tools + workflow: + - id: analyze + agent: ghost + task: Analyze ${{ inputs.repo }}. + outputs: + - name: report + - id: apply + agent: worker + task: Apply ${{ steps.analyze.outputs.report }}. + dependsOn: + - analyze + permissions: + default: deny + tools: + tools.read: + allow: true diff --git a/conformance/v1alpha4/invalid/5.6.4-reserved-env.yaml b/conformance/v1alpha4/invalid/5.6.4-reserved-env.yaml new file mode 100644 index 0000000..2c2e724 --- /dev/null +++ b/conformance/v1alpha4/invalid/5.6.4-reserved-env.yaml @@ -0,0 +1,83 @@ +# Conformance case 5.6.4-reserved-env +# Spec section 5.6.4: Environment variables with the prefix AWP_ are reserved for the runtime. +# Expected: invalid (step.reserved-env at /spec/workflow/2/env/AWP_OUTPUTS) +apiVersion: awp.agenticworkflowprotocol.org/v1alpha4 +kind: Workflow +metadata: + name: conformance-base +spec: + version: 1.0.0 + owner: + team: conformance-team + classification: internal + risk: + level: low + inputs: + - name: repo + type: string + default: example-org/web-shop + budget: + maxCostUsd: 1 + maxSteps: 10 + maxDuration: 10m + resources: + maxRetries: 2 + maxConcurrency: 1 + secrets: + - name: TOOLS_TOKEN + source: secret-manager + scope: + - tools + mcpServers: + - name: tools + transport: streamable-http + url: https://mcp.example.com/tools + auth: + secretRef: TOOLS_TOKEN + actionGroups: + tools.read: + - tools.read_file + agents: + - id: worker + model: + provider: ollama + name: qwen3 + tools: + - type: mcp + server: tools + workflow: + - id: analyze + agent: worker + task: Analyze ${{ inputs.repo }}. + outputs: + - name: report + - id: apply + agent: worker + task: Apply ${{ steps.analyze.outputs.report }}. + dependsOn: + - analyze + - id: count + type: command + command: ./count.sh + env: + AWP_OUTPUTS: /tmp/out + dependsOn: + - analyze + outputs: + - name: newCount + - name: summary_text + permissions: + default: deny + tools: + tools.read: + allow: true + triggers: + - type: manual + - type: schedule + cron: 0 6 * * 1-5 + timezone: Europe/Berlin + - type: event + source: git.example.com + eventType: pull_request.opened + filter: + repository: example-org/web-shop diff --git a/conformance/v1alpha4/invalid/5.6.5-for-each-concurrency-exceeds-budget.yaml b/conformance/v1alpha4/invalid/5.6.5-for-each-concurrency-exceeds-budget.yaml new file mode 100644 index 0000000..d0e7afa --- /dev/null +++ b/conformance/v1alpha4/invalid/5.6.5-for-each-concurrency-exceeds-budget.yaml @@ -0,0 +1,70 @@ +# Conformance case 5.6.5-for-each-concurrency-exceeds-budget +# Spec section 5.6.5: forEach.concurrency MUST NOT exceed the effective budget.resources.maxConcurrency. +# Expected: invalid (forEach.concurrency-exceeds-budget at /spec/workflow/1/forEach/concurrency) +apiVersion: awp.agenticworkflowprotocol.org/v1alpha4 +kind: Workflow +metadata: + name: conformance-base +spec: + version: 1.0.0 + owner: + team: conformance-team + classification: internal + risk: + level: low + inputs: + - name: repo + type: string + required: true + - name: images + type: array + required: true + budget: + maxCostUsd: 1 + maxSteps: 10 + maxDuration: 10m + resources: + maxRetries: 2 + maxConcurrency: 1 + secrets: + - name: TOOLS_TOKEN + source: secret-manager + scope: + - tools + mcpServers: + - name: tools + transport: streamable-http + url: https://mcp.example.com/tools + auth: + secretRef: TOOLS_TOKEN + actionGroups: + tools.read: + - tools.read_file + agents: + - id: worker + model: + provider: ollama + name: qwen3 + tools: + - type: mcp + server: tools + workflow: + - id: list + agent: worker + task: List the files of ${{ inputs.repo }}. + outputs: + - name: files + - id: review + agent: worker + task: Review ${{ forEach.item }}. + dependsOn: + - list + forEach: + items: ${{ steps.list.outputs.files }} + maxItems: 20 + concurrency: 2 + permissions: + default: deny + tools: + tools.read: + allow: true diff --git a/conformance/v1alpha4/invalid/5.6.5-for-each-input-not-array.yaml b/conformance/v1alpha4/invalid/5.6.5-for-each-input-not-array.yaml new file mode 100644 index 0000000..d4eb7db --- /dev/null +++ b/conformance/v1alpha4/invalid/5.6.5-for-each-input-not-array.yaml @@ -0,0 +1,67 @@ +# Conformance case 5.6.5-for-each-input-not-array +# Spec section 5.6.5: An input referenced by forEach.items MUST have type array. +# Expected: invalid (forEach.input-not-array at /spec/workflow/1/forEach/items) +apiVersion: awp.agenticworkflowprotocol.org/v1alpha4 +kind: Workflow +metadata: + name: conformance-base +spec: + version: 1.0.0 + owner: + team: conformance-team + classification: internal + risk: + level: low + inputs: + - name: repo + type: string + required: true + - name: images + type: array + required: true + budget: + maxCostUsd: 1 + maxSteps: 10 + maxDuration: 10m + resources: + maxRetries: 2 + maxConcurrency: 2 + secrets: + - name: TOOLS_TOKEN + source: secret-manager + scope: + - tools + mcpServers: + - name: tools + transport: streamable-http + url: https://mcp.example.com/tools + auth: + secretRef: TOOLS_TOKEN + actionGroups: + tools.read: + - tools.read_file + agents: + - id: worker + model: + provider: ollama + name: qwen3 + tools: + - type: mcp + server: tools + workflow: + - id: list + agent: worker + task: List the files of ${{ inputs.repo }}. + outputs: + - name: files + - id: review + agent: worker + task: Review ${{ forEach.item }}. + forEach: + items: ${{ inputs.repo }} + maxItems: 20 + permissions: + default: deny + tools: + tools.read: + allow: true diff --git a/conformance/v1alpha4/invalid/5.6.5-for-each-items-not-a-dependency.yaml b/conformance/v1alpha4/invalid/5.6.5-for-each-items-not-a-dependency.yaml new file mode 100644 index 0000000..bf5fc66 --- /dev/null +++ b/conformance/v1alpha4/invalid/5.6.5-for-each-items-not-a-dependency.yaml @@ -0,0 +1,67 @@ +# Conformance case 5.6.5-for-each-items-not-a-dependency +# Spec section 3.9: forEach.items MUST only reference a step this step depends on. +# Expected: invalid (expr.not-a-dependency at /spec/workflow/1/forEach/items) +apiVersion: awp.agenticworkflowprotocol.org/v1alpha4 +kind: Workflow +metadata: + name: conformance-base +spec: + version: 1.0.0 + owner: + team: conformance-team + classification: internal + risk: + level: low + inputs: + - name: repo + type: string + required: true + - name: images + type: array + required: true + budget: + maxCostUsd: 1 + maxSteps: 10 + maxDuration: 10m + resources: + maxRetries: 2 + maxConcurrency: 2 + secrets: + - name: TOOLS_TOKEN + source: secret-manager + scope: + - tools + mcpServers: + - name: tools + transport: streamable-http + url: https://mcp.example.com/tools + auth: + secretRef: TOOLS_TOKEN + actionGroups: + tools.read: + - tools.read_file + agents: + - id: worker + model: + provider: ollama + name: qwen3 + tools: + - type: mcp + server: tools + workflow: + - id: list + agent: worker + task: List the files of ${{ inputs.repo }}. + outputs: + - name: files + - id: review + agent: worker + task: Review ${{ forEach.item }}. + forEach: + items: ${{ steps.list.outputs.files }} + maxItems: 20 + permissions: + default: deny + tools: + tools.read: + allow: true diff --git a/conformance/v1alpha4/invalid/5.6.5-for-each-items-not-a-reference.yaml b/conformance/v1alpha4/invalid/5.6.5-for-each-items-not-a-reference.yaml new file mode 100644 index 0000000..c8c5ed9 --- /dev/null +++ b/conformance/v1alpha4/invalid/5.6.5-for-each-items-not-a-reference.yaml @@ -0,0 +1,69 @@ +# Conformance case 5.6.5-for-each-items-not-a-reference +# Spec section 5.6.5: forEach.items is exactly one reference to an input or a step output. +# Expected: invalid (schema.pattern at /spec/workflow/1/forEach/items) +apiVersion: awp.agenticworkflowprotocol.org/v1alpha4 +kind: Workflow +metadata: + name: conformance-base +spec: + version: 1.0.0 + owner: + team: conformance-team + classification: internal + risk: + level: low + inputs: + - name: repo + type: string + required: true + - name: images + type: array + required: true + budget: + maxCostUsd: 1 + maxSteps: 10 + maxDuration: 10m + resources: + maxRetries: 2 + maxConcurrency: 2 + secrets: + - name: TOOLS_TOKEN + source: secret-manager + scope: + - tools + mcpServers: + - name: tools + transport: streamable-http + url: https://mcp.example.com/tools + auth: + secretRef: TOOLS_TOKEN + actionGroups: + tools.read: + - tools.read_file + agents: + - id: worker + model: + provider: ollama + name: qwen3 + tools: + - type: mcp + server: tools + workflow: + - id: list + agent: worker + task: List the files of ${{ inputs.repo }}. + outputs: + - name: files + - id: review + agent: worker + task: Review ${{ forEach.item }}. + dependsOn: + - list + forEach: + items: "Files: ${{ steps.list.outputs.files }}" + maxItems: 20 + permissions: + default: deny + tools: + tools.read: + allow: true diff --git a/conformance/v1alpha4/invalid/5.6.5-for-each-missing-max-items.yaml b/conformance/v1alpha4/invalid/5.6.5-for-each-missing-max-items.yaml new file mode 100644 index 0000000..908641f --- /dev/null +++ b/conformance/v1alpha4/invalid/5.6.5-for-each-missing-max-items.yaml @@ -0,0 +1,68 @@ +# Conformance case 5.6.5-for-each-missing-max-items +# Spec section 5.6.5: forEach.maxItems is REQUIRED. +# Expected: invalid (schema.required at /spec/workflow/1/forEach) +apiVersion: awp.agenticworkflowprotocol.org/v1alpha4 +kind: Workflow +metadata: + name: conformance-base +spec: + version: 1.0.0 + owner: + team: conformance-team + classification: internal + risk: + level: low + inputs: + - name: repo + type: string + required: true + - name: images + type: array + required: true + budget: + maxCostUsd: 1 + maxSteps: 10 + maxDuration: 10m + resources: + maxRetries: 2 + maxConcurrency: 2 + secrets: + - name: TOOLS_TOKEN + source: secret-manager + scope: + - tools + mcpServers: + - name: tools + transport: streamable-http + url: https://mcp.example.com/tools + auth: + secretRef: TOOLS_TOKEN + actionGroups: + tools.read: + - tools.read_file + agents: + - id: worker + model: + provider: ollama + name: qwen3 + tools: + - type: mcp + server: tools + workflow: + - id: list + agent: worker + task: List the files of ${{ inputs.repo }}. + outputs: + - name: files + - id: review + agent: worker + task: Review ${{ forEach.item }}. + dependsOn: + - list + forEach: + items: ${{ steps.list.outputs.files }} + permissions: + default: deny + tools: + tools.read: + allow: true diff --git a/conformance/v1alpha4/invalid/5.6.5-for-each-on-approval-step.yaml b/conformance/v1alpha4/invalid/5.6.5-for-each-on-approval-step.yaml new file mode 100644 index 0000000..c921351 --- /dev/null +++ b/conformance/v1alpha4/invalid/5.6.5-for-each-on-approval-step.yaml @@ -0,0 +1,71 @@ +# Conformance case 5.6.5-for-each-on-approval-step +# Spec section 5.6.1: forEach is not allowed on approval steps. +# Expected: invalid (schema.not at /spec/workflow/1) +apiVersion: awp.agenticworkflowprotocol.org/v1alpha4 +kind: Workflow +metadata: + name: conformance-base +spec: + version: 1.0.0 + owner: + team: conformance-team + classification: internal + risk: + level: low + inputs: + - name: repo + type: string + required: true + - name: images + type: array + required: true + budget: + maxCostUsd: 1 + maxSteps: 10 + maxDuration: 10m + resources: + maxRetries: 2 + maxConcurrency: 2 + secrets: + - name: TOOLS_TOKEN + source: secret-manager + scope: + - tools + mcpServers: + - name: tools + transport: streamable-http + url: https://mcp.example.com/tools + auth: + secretRef: TOOLS_TOKEN + actionGroups: + tools.read: + - tools.read_file + agents: + - id: worker + model: + provider: ollama + name: qwen3 + tools: + - type: mcp + server: tools + workflow: + - id: list + agent: worker + task: List the files of ${{ inputs.repo }}. + outputs: + - name: files + - id: release + type: approval + dependsOn: + - list + approval: + approvers: + - role: release-manager + forEach: + items: ${{ steps.list.outputs.files }} + maxItems: 20 + permissions: + default: deny + tools: + tools.read: + allow: true diff --git a/conformance/v1alpha4/invalid/5.6.6-workflow-inputs-expression.yaml b/conformance/v1alpha4/invalid/5.6.6-workflow-inputs-expression.yaml new file mode 100644 index 0000000..1733297 --- /dev/null +++ b/conformance/v1alpha4/invalid/5.6.6-workflow-inputs-expression.yaml @@ -0,0 +1,66 @@ +# Conformance case 5.6.6-workflow-inputs-expression +# Spec section 3.9: workflow.inputs values are expression-enabled; other syntax is rejected. +# Expected: invalid (schema.pattern at /spec/workflow/1/workflow/inputs/repoUrl) +apiVersion: awp.agenticworkflowprotocol.org/v1alpha4 +kind: Workflow +metadata: + name: conformance-base +spec: + version: 1.0.0 + owner: + team: conformance-team + classification: internal + risk: + level: low + inputs: + - name: repo + type: string + required: true + budget: + maxCostUsd: 1 + maxSteps: 10 + maxDuration: 10m + resources: + maxRetries: 2 + maxConcurrency: 1 + secrets: + - name: TOOLS_TOKEN + source: secret-manager + scope: + - tools + mcpServers: + - name: tools + transport: streamable-http + url: https://mcp.example.com/tools + auth: + secretRef: TOOLS_TOKEN + actionGroups: + tools.read: + - tools.read_file + agents: + - id: worker + model: + provider: ollama + name: qwen3 + tools: + - type: mcp + server: tools + workflow: + - id: analyze + agent: worker + task: Analyze ${{ inputs.repo }}. + outputs: + - name: report + - id: fix + type: workflow + dependsOn: + - analyze + workflow: + ref: cve-fixer + inputs: + repoUrl: ${{ secrets.token }} + permissions: + default: deny + tools: + tools.read: + allow: true diff --git a/conformance/v1alpha4/invalid/5.6.6-workflow-ref-not-dns-label.yaml b/conformance/v1alpha4/invalid/5.6.6-workflow-ref-not-dns-label.yaml new file mode 100644 index 0000000..7f507cc --- /dev/null +++ b/conformance/v1alpha4/invalid/5.6.6-workflow-ref-not-dns-label.yaml @@ -0,0 +1,64 @@ +# Conformance case 5.6.6-workflow-ref-not-dns-label +# Spec section 5.6.6: workflow.ref is a DNS-1123 label like metadata.name. +# Expected: invalid (schema.pattern at /spec/workflow/1/workflow/ref) +apiVersion: awp.agenticworkflowprotocol.org/v1alpha4 +kind: Workflow +metadata: + name: conformance-base +spec: + version: 1.0.0 + owner: + team: conformance-team + classification: internal + risk: + level: low + inputs: + - name: repo + type: string + required: true + budget: + maxCostUsd: 1 + maxSteps: 10 + maxDuration: 10m + resources: + maxRetries: 2 + maxConcurrency: 1 + secrets: + - name: TOOLS_TOKEN + source: secret-manager + scope: + - tools + mcpServers: + - name: tools + transport: streamable-http + url: https://mcp.example.com/tools + auth: + secretRef: TOOLS_TOKEN + actionGroups: + tools.read: + - tools.read_file + agents: + - id: worker + model: + provider: ollama + name: qwen3 + tools: + - type: mcp + server: tools + workflow: + - id: analyze + agent: worker + task: Analyze ${{ inputs.repo }}. + outputs: + - name: report + - id: fix + type: workflow + dependsOn: + - analyze + workflow: + ref: CVE_Fixer + permissions: + default: deny + tools: + tools.read: + allow: true diff --git a/conformance/v1alpha4/invalid/5.6.6-workflow-step-agent.yaml b/conformance/v1alpha4/invalid/5.6.6-workflow-step-agent.yaml new file mode 100644 index 0000000..898c58a --- /dev/null +++ b/conformance/v1alpha4/invalid/5.6.6-workflow-step-agent.yaml @@ -0,0 +1,65 @@ +# Conformance case 5.6.6-workflow-step-agent +# Spec section 5.6.6: A workflow step has no agent. +# Expected: invalid (schema.not at /spec/workflow/1) +apiVersion: awp.agenticworkflowprotocol.org/v1alpha4 +kind: Workflow +metadata: + name: conformance-base +spec: + version: 1.0.0 + owner: + team: conformance-team + classification: internal + risk: + level: low + inputs: + - name: repo + type: string + required: true + budget: + maxCostUsd: 1 + maxSteps: 10 + maxDuration: 10m + resources: + maxRetries: 2 + maxConcurrency: 1 + secrets: + - name: TOOLS_TOKEN + source: secret-manager + scope: + - tools + mcpServers: + - name: tools + transport: streamable-http + url: https://mcp.example.com/tools + auth: + secretRef: TOOLS_TOKEN + actionGroups: + tools.read: + - tools.read_file + agents: + - id: worker + model: + provider: ollama + name: qwen3 + tools: + - type: mcp + server: tools + workflow: + - id: analyze + agent: worker + task: Analyze ${{ inputs.repo }}. + outputs: + - name: report + - id: fix + type: workflow + dependsOn: + - analyze + agent: worker + workflow: + ref: cve-fixer + permissions: + default: deny + tools: + tools.read: + allow: true diff --git a/conformance/v1alpha4/invalid/5.6.6-workflow-step-for-each.yaml b/conformance/v1alpha4/invalid/5.6.6-workflow-step-for-each.yaml new file mode 100644 index 0000000..befbdbb --- /dev/null +++ b/conformance/v1alpha4/invalid/5.6.6-workflow-step-for-each.yaml @@ -0,0 +1,67 @@ +# Conformance case 5.6.6-workflow-step-for-each +# Spec section 5.6.6: forEach is not allowed on a workflow step. +# Expected: invalid (schema.not at /spec/workflow/1) +apiVersion: awp.agenticworkflowprotocol.org/v1alpha4 +kind: Workflow +metadata: + name: conformance-base +spec: + version: 1.0.0 + owner: + team: conformance-team + classification: internal + risk: + level: low + inputs: + - name: repo + type: string + required: true + budget: + maxCostUsd: 1 + maxSteps: 10 + maxDuration: 10m + resources: + maxRetries: 2 + maxConcurrency: 1 + secrets: + - name: TOOLS_TOKEN + source: secret-manager + scope: + - tools + mcpServers: + - name: tools + transport: streamable-http + url: https://mcp.example.com/tools + auth: + secretRef: TOOLS_TOKEN + actionGroups: + tools.read: + - tools.read_file + agents: + - id: worker + model: + provider: ollama + name: qwen3 + tools: + - type: mcp + server: tools + workflow: + - id: analyze + agent: worker + task: Analyze ${{ inputs.repo }}. + outputs: + - name: report + - id: fix + type: workflow + dependsOn: + - analyze + forEach: + items: ${{ inputs.repo }} + maxItems: 5 + workflow: + ref: cve-fixer + permissions: + default: deny + tools: + tools.read: + allow: true diff --git a/conformance/v1alpha4/invalid/5.6.6-workflow-step-output.yaml b/conformance/v1alpha4/invalid/5.6.6-workflow-step-output.yaml new file mode 100644 index 0000000..05cfabf --- /dev/null +++ b/conformance/v1alpha4/invalid/5.6.6-workflow-step-output.yaml @@ -0,0 +1,67 @@ +# Conformance case 5.6.6-workflow-step-output +# Spec section 5.6.6: A workflow step declares no outputs other than executionId and status. +# Expected: invalid (step.workflow-output at /spec/workflow/1/outputs/1/name) +apiVersion: awp.agenticworkflowprotocol.org/v1alpha4 +kind: Workflow +metadata: + name: conformance-base +spec: + version: 1.0.0 + owner: + team: conformance-team + classification: internal + risk: + level: low + inputs: + - name: repo + type: string + required: true + budget: + maxCostUsd: 1 + maxSteps: 10 + maxDuration: 10m + resources: + maxRetries: 2 + maxConcurrency: 1 + secrets: + - name: TOOLS_TOKEN + source: secret-manager + scope: + - tools + mcpServers: + - name: tools + transport: streamable-http + url: https://mcp.example.com/tools + auth: + secretRef: TOOLS_TOKEN + actionGroups: + tools.read: + - tools.read_file + agents: + - id: worker + model: + provider: ollama + name: qwen3 + tools: + - type: mcp + server: tools + workflow: + - id: analyze + agent: worker + task: Analyze ${{ inputs.repo }}. + outputs: + - name: report + - id: fix + type: workflow + dependsOn: + - analyze + workflow: + ref: cve-fixer + outputs: + - name: executionId + - name: report + permissions: + default: deny + tools: + tools.read: + allow: true diff --git a/conformance/v1alpha4/invalid/5.6.6-workflow-step-without-ref.yaml b/conformance/v1alpha4/invalid/5.6.6-workflow-step-without-ref.yaml new file mode 100644 index 0000000..d390bbe --- /dev/null +++ b/conformance/v1alpha4/invalid/5.6.6-workflow-step-without-ref.yaml @@ -0,0 +1,64 @@ +# Conformance case 5.6.6-workflow-step-without-ref +# Spec section 5.6.6: workflow.ref is REQUIRED. +# Expected: invalid (schema.required at /spec/workflow/1/workflow) +apiVersion: awp.agenticworkflowprotocol.org/v1alpha4 +kind: Workflow +metadata: + name: conformance-base +spec: + version: 1.0.0 + owner: + team: conformance-team + classification: internal + risk: + level: low + inputs: + - name: repo + type: string + required: true + budget: + maxCostUsd: 1 + maxSteps: 10 + maxDuration: 10m + resources: + maxRetries: 2 + maxConcurrency: 1 + secrets: + - name: TOOLS_TOKEN + source: secret-manager + scope: + - tools + mcpServers: + - name: tools + transport: streamable-http + url: https://mcp.example.com/tools + auth: + secretRef: TOOLS_TOKEN + actionGroups: + tools.read: + - tools.read_file + agents: + - id: worker + model: + provider: ollama + name: qwen3 + tools: + - type: mcp + server: tools + workflow: + - id: analyze + agent: worker + task: Analyze ${{ inputs.repo }}. + outputs: + - name: report + - id: fix + type: workflow + dependsOn: + - analyze + workflow: + wait: true + permissions: + default: deny + tools: + tools.read: + allow: true diff --git a/conformance/v1alpha4/invalid/5.7-negative-cost.yaml b/conformance/v1alpha4/invalid/5.7-negative-cost.yaml new file mode 100644 index 0000000..e5d8a51 --- /dev/null +++ b/conformance/v1alpha4/invalid/5.7-negative-cost.yaml @@ -0,0 +1,63 @@ +# Conformance case 5.7-negative-cost +# Spec section 5.7: All limits MUST be positive. +# Expected: invalid (schema.exclusiveMinimum at /spec/budget/maxCostUsd) +apiVersion: awp.agenticworkflowprotocol.org/v1alpha4 +kind: Workflow +metadata: + name: conformance-base +spec: + version: 1.0.0 + owner: + team: conformance-team + classification: internal + risk: + level: low + inputs: + - name: repo + type: string + required: true + budget: + maxCostUsd: -1 + maxSteps: 10 + maxDuration: 10m + resources: + maxRetries: 2 + maxConcurrency: 1 + secrets: + - name: TOOLS_TOKEN + source: secret-manager + scope: + - tools + mcpServers: + - name: tools + transport: streamable-http + url: https://mcp.example.com/tools + auth: + secretRef: TOOLS_TOKEN + actionGroups: + tools.read: + - tools.read_file + agents: + - id: worker + model: + provider: ollama + name: qwen3 + tools: + - type: mcp + server: tools + workflow: + - id: analyze + agent: worker + task: Analyze ${{ inputs.repo }}. + outputs: + - name: report + - id: apply + agent: worker + task: Apply ${{ steps.analyze.outputs.report }}. + dependsOn: + - analyze + permissions: + default: deny + tools: + tools.read: + allow: true diff --git a/conformance/v1alpha4/invalid/5.7-unknown-budget-field.yaml b/conformance/v1alpha4/invalid/5.7-unknown-budget-field.yaml new file mode 100644 index 0000000..9dd84bc --- /dev/null +++ b/conformance/v1alpha4/invalid/5.7-unknown-budget-field.yaml @@ -0,0 +1,64 @@ +# Conformance case 5.7-unknown-budget-field +# Spec section 5.7: Unknown budget fields are rejected. +# Expected: invalid (schema.additionalProperties at /spec/budget/maxMoney) +apiVersion: awp.agenticworkflowprotocol.org/v1alpha4 +kind: Workflow +metadata: + name: conformance-base +spec: + version: 1.0.0 + owner: + team: conformance-team + classification: internal + risk: + level: low + inputs: + - name: repo + type: string + required: true + budget: + maxCostUsd: 1 + maxSteps: 10 + maxDuration: 10m + resources: + maxRetries: 2 + maxConcurrency: 1 + maxMoney: 5 + secrets: + - name: TOOLS_TOKEN + source: secret-manager + scope: + - tools + mcpServers: + - name: tools + transport: streamable-http + url: https://mcp.example.com/tools + auth: + secretRef: TOOLS_TOKEN + actionGroups: + tools.read: + - tools.read_file + agents: + - id: worker + model: + provider: ollama + name: qwen3 + tools: + - type: mcp + server: tools + workflow: + - id: analyze + agent: worker + task: Analyze ${{ inputs.repo }}. + outputs: + - name: report + - id: apply + agent: worker + task: Apply ${{ steps.analyze.outputs.report }}. + dependsOn: + - analyze + permissions: + default: deny + tools: + tools.read: + allow: true diff --git a/conformance/v1alpha4/invalid/5.7-zero-concurrency.yaml b/conformance/v1alpha4/invalid/5.7-zero-concurrency.yaml new file mode 100644 index 0000000..8ce6218 --- /dev/null +++ b/conformance/v1alpha4/invalid/5.7-zero-concurrency.yaml @@ -0,0 +1,63 @@ +# Conformance case 5.7-zero-concurrency +# Spec section 5.7: All limits MUST be positive. +# Expected: invalid (schema.minimum at /spec/budget/resources/maxConcurrency) +apiVersion: awp.agenticworkflowprotocol.org/v1alpha4 +kind: Workflow +metadata: + name: conformance-base +spec: + version: 1.0.0 + owner: + team: conformance-team + classification: internal + risk: + level: low + inputs: + - name: repo + type: string + required: true + budget: + maxCostUsd: 1 + maxSteps: 10 + maxDuration: 10m + resources: + maxRetries: 2 + maxConcurrency: 0 + secrets: + - name: TOOLS_TOKEN + source: secret-manager + scope: + - tools + mcpServers: + - name: tools + transport: streamable-http + url: https://mcp.example.com/tools + auth: + secretRef: TOOLS_TOKEN + actionGroups: + tools.read: + - tools.read_file + agents: + - id: worker + model: + provider: ollama + name: qwen3 + tools: + - type: mcp + server: tools + workflow: + - id: analyze + agent: worker + task: Analyze ${{ inputs.repo }}. + outputs: + - name: report + - id: apply + agent: worker + task: Apply ${{ steps.analyze.outputs.report }}. + dependsOn: + - analyze + permissions: + default: deny + tools: + tools.read: + allow: true diff --git a/conformance/v1alpha4/invalid/5.7-zero-max-steps.yaml b/conformance/v1alpha4/invalid/5.7-zero-max-steps.yaml new file mode 100644 index 0000000..6ff8337 --- /dev/null +++ b/conformance/v1alpha4/invalid/5.7-zero-max-steps.yaml @@ -0,0 +1,63 @@ +# Conformance case 5.7-zero-max-steps +# Spec section 5.7: All limits MUST be positive. +# Expected: invalid (schema.minimum at /spec/budget/maxSteps) +apiVersion: awp.agenticworkflowprotocol.org/v1alpha4 +kind: Workflow +metadata: + name: conformance-base +spec: + version: 1.0.0 + owner: + team: conformance-team + classification: internal + risk: + level: low + inputs: + - name: repo + type: string + required: true + budget: + maxCostUsd: 1 + maxSteps: 0 + maxDuration: 10m + resources: + maxRetries: 2 + maxConcurrency: 1 + secrets: + - name: TOOLS_TOKEN + source: secret-manager + scope: + - tools + mcpServers: + - name: tools + transport: streamable-http + url: https://mcp.example.com/tools + auth: + secretRef: TOOLS_TOKEN + actionGroups: + tools.read: + - tools.read_file + agents: + - id: worker + model: + provider: ollama + name: qwen3 + tools: + - type: mcp + server: tools + workflow: + - id: analyze + agent: worker + task: Analyze ${{ inputs.repo }}. + outputs: + - name: report + - id: apply + agent: worker + task: Apply ${{ steps.analyze.outputs.report }}. + dependsOn: + - analyze + permissions: + default: deny + tools: + tools.read: + allow: true diff --git a/conformance/v1alpha4/invalid/5.8-agent-invalid-on-timeout.yaml b/conformance/v1alpha4/invalid/5.8-agent-invalid-on-timeout.yaml new file mode 100644 index 0000000..039e1aa --- /dev/null +++ b/conformance/v1alpha4/invalid/5.8-agent-invalid-on-timeout.yaml @@ -0,0 +1,79 @@ +# Conformance case 5.8-agent-invalid-on-timeout +# Spec section 5.8: humanInput.onTimeout is return or fail. +# Expected: invalid (schema.enum at /spec/agents/0/humanInput/onTimeout) +apiVersion: awp.agenticworkflowprotocol.org/v1alpha4 +kind: Workflow +metadata: + name: conformance-base +spec: + version: 1.0.0 + owner: + team: conformance-team + classification: internal + risk: + level: low + inputs: + - name: repo + type: string + default: example-org/web-shop + budget: + maxCostUsd: 1 + maxSteps: 10 + maxDuration: 10m + resources: + maxRetries: 2 + maxConcurrency: 1 + secrets: + - name: TOOLS_TOKEN + source: secret-manager + scope: + - tools + mcpServers: + - name: tools + transport: streamable-http + url: https://mcp.example.com/tools + auth: + secretRef: TOOLS_TOKEN + actionGroups: + tools.read: + - tools.read_file + agents: + - id: worker + model: + provider: ollama + name: qwen3 + tools: + - type: mcp + server: tools + humanInput: + answerers: + - role: maintainer + timeout: 30m + onTimeout: useDefault + maxRequests: 3 + workflow: + - id: analyze + agent: worker + task: Analyze ${{ inputs.repo }}. + outputs: + - name: report + - id: apply + agent: worker + task: Apply ${{ steps.analyze.outputs.report }}. + dependsOn: + - analyze + permissions: + default: deny + tools: + tools.read: + allow: true + triggers: + - type: manual + - type: schedule + cron: 0 6 * * 1-5 + timezone: Europe/Berlin + - type: event + source: git.example.com + eventType: pull_request.opened + filter: + repository: example-org/web-shop diff --git a/conformance/v1alpha4/invalid/5.8-answer-field-nested-object.yaml b/conformance/v1alpha4/invalid/5.8-answer-field-nested-object.yaml new file mode 100644 index 0000000..15e34bf --- /dev/null +++ b/conformance/v1alpha4/invalid/5.8-answer-field-nested-object.yaml @@ -0,0 +1,87 @@ +# Conformance case 5.8-answer-field-nested-object +# Spec section 5.8: Answer fields are primitive (string, number, integer, boolean). +# Expected: invalid (schema.enum at /spec/workflow/1/input/answerSchema/properties/targets/type) +apiVersion: awp.agenticworkflowprotocol.org/v1alpha4 +kind: Workflow +metadata: + name: conformance-base +spec: + version: 1.0.0 + owner: + team: conformance-team + classification: internal + risk: + level: low + inputs: + - name: repo + type: string + default: example-org/web-shop + budget: + maxCostUsd: 1 + maxSteps: 10 + maxDuration: 10m + resources: + maxRetries: 2 + maxConcurrency: 1 + secrets: + - name: TOOLS_TOKEN + source: secret-manager + scope: + - tools + mcpServers: + - name: tools + transport: streamable-http + url: https://mcp.example.com/tools + auth: + secretRef: TOOLS_TOKEN + actionGroups: + tools.read: + - tools.read_file + agents: + - id: worker + model: + provider: ollama + name: qwen3 + tools: + - type: mcp + server: tools + workflow: + - id: analyze + agent: worker + task: Analyze ${{ inputs.repo }}. + outputs: + - name: report + - id: ask-targets + type: input + dependsOn: + - analyze + input: + message: Which targets should ${{ steps.analyze.outputs.report }} be applied to? + answerers: + - role: release-manager + timeout: 4h + answerSchema: + type: object + properties: + targets: + type: object + - id: apply + agent: worker + task: Apply ${{ steps.analyze.outputs.report }} to ${{ steps.ask-targets.outputs.answer }}. + dependsOn: + - ask-targets + permissions: + default: deny + tools: + tools.read: + allow: true + triggers: + - type: manual + - type: schedule + cron: 0 6 * * 1-5 + timezone: Europe/Berlin + - type: event + source: git.example.com + eventType: pull_request.opened + filter: + repository: example-org/web-shop diff --git a/conformance/v1alpha4/invalid/5.8-default-mismatch.yaml b/conformance/v1alpha4/invalid/5.8-default-mismatch.yaml new file mode 100644 index 0000000..48ca978 --- /dev/null +++ b/conformance/v1alpha4/invalid/5.8-default-mismatch.yaml @@ -0,0 +1,101 @@ +# Conformance case 5.8-default-mismatch +# Spec section 5.8: default matches answerSchema. +# Expected: invalid (input.default-mismatch at /spec/workflow/1/input/default) +apiVersion: awp.agenticworkflowprotocol.org/v1alpha4 +kind: Workflow +metadata: + name: conformance-base +spec: + version: 1.0.0 + owner: + team: conformance-team + classification: internal + risk: + level: low + inputs: + - name: repo + type: string + default: example-org/web-shop + budget: + maxCostUsd: 1 + maxSteps: 10 + maxDuration: 10m + resources: + maxRetries: 2 + maxConcurrency: 1 + secrets: + - name: TOOLS_TOKEN + source: secret-manager + scope: + - tools + mcpServers: + - name: tools + transport: streamable-http + url: https://mcp.example.com/tools + auth: + secretRef: TOOLS_TOKEN + actionGroups: + tools.read: + - tools.read_file + agents: + - id: worker + model: + provider: ollama + name: qwen3 + tools: + - type: mcp + server: tools + workflow: + - id: analyze + agent: worker + task: Analyze ${{ inputs.repo }}. + outputs: + - name: report + - id: ask-targets + type: input + dependsOn: + - analyze + input: + message: Which targets should ${{ steps.analyze.outputs.report }} be applied to? + answerers: + - role: release-manager + timeout: 4h + answerSchema: + type: object + properties: + environment: + type: string + enum: + - staging + - production + title: Environment + maxHosts: + type: integer + minimum: 1 + notify: + type: boolean + required: + - environment + onTimeout: useDefault + default: + environment: qa + - id: apply + agent: worker + task: Apply ${{ steps.analyze.outputs.report }} to ${{ steps.ask-targets.outputs.answer }}. + dependsOn: + - ask-targets + permissions: + default: deny + tools: + tools.read: + allow: true + triggers: + - type: manual + - type: schedule + cron: 0 6 * * 1-5 + timezone: Europe/Berlin + - type: event + source: git.example.com + eventType: pull_request.opened + filter: + repository: example-org/web-shop diff --git a/conformance/v1alpha4/invalid/5.8-input-step-with-agent.yaml b/conformance/v1alpha4/invalid/5.8-input-step-with-agent.yaml new file mode 100644 index 0000000..d2e08ea --- /dev/null +++ b/conformance/v1alpha4/invalid/5.8-input-step-with-agent.yaml @@ -0,0 +1,83 @@ +# Conformance case 5.8-input-step-with-agent +# Spec section 5.8: An input step has no agent. +# Expected: invalid (schema.not at /spec/workflow/1) +apiVersion: awp.agenticworkflowprotocol.org/v1alpha4 +kind: Workflow +metadata: + name: conformance-base +spec: + version: 1.0.0 + owner: + team: conformance-team + classification: internal + risk: + level: low + inputs: + - name: repo + type: string + default: example-org/web-shop + budget: + maxCostUsd: 1 + maxSteps: 10 + maxDuration: 10m + resources: + maxRetries: 2 + maxConcurrency: 1 + secrets: + - name: TOOLS_TOKEN + source: secret-manager + scope: + - tools + mcpServers: + - name: tools + transport: streamable-http + url: https://mcp.example.com/tools + auth: + secretRef: TOOLS_TOKEN + actionGroups: + tools.read: + - tools.read_file + agents: + - id: worker + model: + provider: ollama + name: qwen3 + tools: + - type: mcp + server: tools + workflow: + - id: analyze + agent: worker + task: Analyze ${{ inputs.repo }}. + outputs: + - name: report + - id: ask-targets + type: input + dependsOn: + - analyze + input: + message: Which targets should ${{ steps.analyze.outputs.report }} be applied to? + answerers: + - role: release-manager + timeout: 4h + agent: worker + - id: apply + agent: worker + task: Apply ${{ steps.analyze.outputs.report }} to ${{ steps.ask-targets.outputs.answer }}. + dependsOn: + - ask-targets + permissions: + default: deny + tools: + tools.read: + allow: true + triggers: + - type: manual + - type: schedule + cron: 0 6 * * 1-5 + timezone: Europe/Berlin + - type: event + source: git.example.com + eventType: pull_request.opened + filter: + repository: example-org/web-shop diff --git a/conformance/v1alpha4/invalid/5.8-input-step-without-input.yaml b/conformance/v1alpha4/invalid/5.8-input-step-without-input.yaml new file mode 100644 index 0000000..5ee1a3f --- /dev/null +++ b/conformance/v1alpha4/invalid/5.8-input-step-without-input.yaml @@ -0,0 +1,77 @@ +# Conformance case 5.8-input-step-without-input +# Spec section 5.8: An input step REQUIRES input. +# Expected: invalid (schema.required at /spec/workflow/1) +apiVersion: awp.agenticworkflowprotocol.org/v1alpha4 +kind: Workflow +metadata: + name: conformance-base +spec: + version: 1.0.0 + owner: + team: conformance-team + classification: internal + risk: + level: low + inputs: + - name: repo + type: string + default: example-org/web-shop + budget: + maxCostUsd: 1 + maxSteps: 10 + maxDuration: 10m + resources: + maxRetries: 2 + maxConcurrency: 1 + secrets: + - name: TOOLS_TOKEN + source: secret-manager + scope: + - tools + mcpServers: + - name: tools + transport: streamable-http + url: https://mcp.example.com/tools + auth: + secretRef: TOOLS_TOKEN + actionGroups: + tools.read: + - tools.read_file + agents: + - id: worker + model: + provider: ollama + name: qwen3 + tools: + - type: mcp + server: tools + workflow: + - id: analyze + agent: worker + task: Analyze ${{ inputs.repo }}. + outputs: + - name: report + - id: ask-targets + type: input + dependsOn: + - analyze + - id: apply + agent: worker + task: Apply ${{ steps.analyze.outputs.report }} to ${{ steps.ask-targets.outputs.answer }}. + dependsOn: + - ask-targets + permissions: + default: deny + tools: + tools.read: + allow: true + triggers: + - type: manual + - type: schedule + cron: 0 6 * * 1-5 + timezone: Europe/Berlin + - type: event + source: git.example.com + eventType: pull_request.opened + filter: + repository: example-org/web-shop diff --git a/conformance/v1alpha4/invalid/5.8-input-without-answerers.yaml b/conformance/v1alpha4/invalid/5.8-input-without-answerers.yaml new file mode 100644 index 0000000..736160b --- /dev/null +++ b/conformance/v1alpha4/invalid/5.8-input-without-answerers.yaml @@ -0,0 +1,80 @@ +# Conformance case 5.8-input-without-answerers +# Spec section 5.8: answerers is REQUIRED; nobody else may answer. +# Expected: invalid (schema.required at /spec/workflow/1/input) +apiVersion: awp.agenticworkflowprotocol.org/v1alpha4 +kind: Workflow +metadata: + name: conformance-base +spec: + version: 1.0.0 + owner: + team: conformance-team + classification: internal + risk: + level: low + inputs: + - name: repo + type: string + default: example-org/web-shop + budget: + maxCostUsd: 1 + maxSteps: 10 + maxDuration: 10m + resources: + maxRetries: 2 + maxConcurrency: 1 + secrets: + - name: TOOLS_TOKEN + source: secret-manager + scope: + - tools + mcpServers: + - name: tools + transport: streamable-http + url: https://mcp.example.com/tools + auth: + secretRef: TOOLS_TOKEN + actionGroups: + tools.read: + - tools.read_file + agents: + - id: worker + model: + provider: ollama + name: qwen3 + tools: + - type: mcp + server: tools + workflow: + - id: analyze + agent: worker + task: Analyze ${{ inputs.repo }}. + outputs: + - name: report + - id: ask-targets + type: input + dependsOn: + - analyze + input: + message: Which targets should ${{ steps.analyze.outputs.report }} be applied to? + timeout: 4h + - id: apply + agent: worker + task: Apply ${{ steps.analyze.outputs.report }} to ${{ steps.ask-targets.outputs.answer }}. + dependsOn: + - ask-targets + permissions: + default: deny + tools: + tools.read: + allow: true + triggers: + - type: manual + - type: schedule + cron: 0 6 * * 1-5 + timezone: Europe/Berlin + - type: event + source: git.example.com + eventType: pull_request.opened + filter: + repository: example-org/web-shop diff --git a/conformance/v1alpha4/invalid/5.8-required-unknown-field.yaml b/conformance/v1alpha4/invalid/5.8-required-unknown-field.yaml new file mode 100644 index 0000000..d7c861f --- /dev/null +++ b/conformance/v1alpha4/invalid/5.8-required-unknown-field.yaml @@ -0,0 +1,89 @@ +# Conformance case 5.8-required-unknown-field +# Spec section 5.8: required names fields of answerSchema.properties. +# Expected: invalid (input.required-unknown-field at /spec/workflow/1/input/answerSchema/required/0) +apiVersion: awp.agenticworkflowprotocol.org/v1alpha4 +kind: Workflow +metadata: + name: conformance-base +spec: + version: 1.0.0 + owner: + team: conformance-team + classification: internal + risk: + level: low + inputs: + - name: repo + type: string + default: example-org/web-shop + budget: + maxCostUsd: 1 + maxSteps: 10 + maxDuration: 10m + resources: + maxRetries: 2 + maxConcurrency: 1 + secrets: + - name: TOOLS_TOKEN + source: secret-manager + scope: + - tools + mcpServers: + - name: tools + transport: streamable-http + url: https://mcp.example.com/tools + auth: + secretRef: TOOLS_TOKEN + actionGroups: + tools.read: + - tools.read_file + agents: + - id: worker + model: + provider: ollama + name: qwen3 + tools: + - type: mcp + server: tools + workflow: + - id: analyze + agent: worker + task: Analyze ${{ inputs.repo }}. + outputs: + - name: report + - id: ask-targets + type: input + dependsOn: + - analyze + input: + message: Which targets should ${{ steps.analyze.outputs.report }} be applied to? + answerers: + - role: release-manager + timeout: 4h + answerSchema: + type: object + properties: + environment: + type: string + required: + - region + - id: apply + agent: worker + task: Apply ${{ steps.analyze.outputs.report }} to ${{ steps.ask-targets.outputs.answer }}. + dependsOn: + - ask-targets + permissions: + default: deny + tools: + tools.read: + allow: true + triggers: + - type: manual + - type: schedule + cron: 0 6 * * 1-5 + timezone: Europe/Berlin + - type: event + source: git.example.com + eventType: pull_request.opened + filter: + repository: example-org/web-shop diff --git a/conformance/v1alpha4/invalid/5.8-use-default-without-default.yaml b/conformance/v1alpha4/invalid/5.8-use-default-without-default.yaml new file mode 100644 index 0000000..959c166 --- /dev/null +++ b/conformance/v1alpha4/invalid/5.8-use-default-without-default.yaml @@ -0,0 +1,83 @@ +# Conformance case 5.8-use-default-without-default +# Spec section 5.8: onTimeout useDefault REQUIRES default. +# Expected: invalid (schema.required at /spec/workflow/1/input) +apiVersion: awp.agenticworkflowprotocol.org/v1alpha4 +kind: Workflow +metadata: + name: conformance-base +spec: + version: 1.0.0 + owner: + team: conformance-team + classification: internal + risk: + level: low + inputs: + - name: repo + type: string + default: example-org/web-shop + budget: + maxCostUsd: 1 + maxSteps: 10 + maxDuration: 10m + resources: + maxRetries: 2 + maxConcurrency: 1 + secrets: + - name: TOOLS_TOKEN + source: secret-manager + scope: + - tools + mcpServers: + - name: tools + transport: streamable-http + url: https://mcp.example.com/tools + auth: + secretRef: TOOLS_TOKEN + actionGroups: + tools.read: + - tools.read_file + agents: + - id: worker + model: + provider: ollama + name: qwen3 + tools: + - type: mcp + server: tools + workflow: + - id: analyze + agent: worker + task: Analyze ${{ inputs.repo }}. + outputs: + - name: report + - id: ask-targets + type: input + dependsOn: + - analyze + input: + message: Which targets should ${{ steps.analyze.outputs.report }} be applied to? + answerers: + - role: release-manager + timeout: 4h + onTimeout: useDefault + - id: apply + agent: worker + task: Apply ${{ steps.analyze.outputs.report }} to ${{ steps.ask-targets.outputs.answer }}. + dependsOn: + - ask-targets + permissions: + default: deny + tools: + tools.read: + allow: true + triggers: + - type: manual + - type: schedule + cron: 0 6 * * 1-5 + timezone: Europe/Berlin + - type: event + source: git.example.com + eventType: pull_request.opened + filter: + repository: example-org/web-shop diff --git a/conformance/v1alpha4/invalid/6-agent-instructions-and-prompt-ref.yaml b/conformance/v1alpha4/invalid/6-agent-instructions-and-prompt-ref.yaml new file mode 100644 index 0000000..04ec861 --- /dev/null +++ b/conformance/v1alpha4/invalid/6-agent-instructions-and-prompt-ref.yaml @@ -0,0 +1,21 @@ +# Conformance case 6-agent-instructions-and-prompt-ref +# Spec section 6: promptRef MUST NOT be combined with instructions. +# Expected: invalid (schema.not at /spec) +apiVersion: awp.agenticworkflowprotocol.org/v1alpha4 +kind: Agent +metadata: + name: conformance-agent +spec: + version: 1.0.0 + owner: + team: conformance-team + classification: internal + model: + provider: ollama + name: qwen3 + instructions: Extract fields. + permissions: + default: deny + promptRef: + name: p + version: "1" diff --git a/conformance/v1alpha4/invalid/6-agent-kind-with-workflow-spec.yaml b/conformance/v1alpha4/invalid/6-agent-kind-with-workflow-spec.yaml new file mode 100644 index 0000000..68ba08f --- /dev/null +++ b/conformance/v1alpha4/invalid/6-agent-kind-with-workflow-spec.yaml @@ -0,0 +1,19 @@ +# Conformance case 6-agent-kind-with-workflow-spec +# Spec section 6: agents/workflow belong to kind Workflow only. +# Expected: invalid (schema.additionalProperties at /spec/agents) +apiVersion: awp.agenticworkflowprotocol.org/v1alpha4 +kind: Agent +metadata: + name: conformance-agent +spec: + version: 1.0.0 + owner: + team: conformance-team + classification: internal + model: + provider: ollama + name: qwen3 + instructions: Extract fields. + permissions: + default: deny + agents: [] diff --git a/conformance/v1alpha4/invalid/6-agent-with-workflow-field.yaml b/conformance/v1alpha4/invalid/6-agent-with-workflow-field.yaml new file mode 100644 index 0000000..0274908 --- /dev/null +++ b/conformance/v1alpha4/invalid/6-agent-with-workflow-field.yaml @@ -0,0 +1,19 @@ +# Conformance case 6-agent-with-workflow-field +# Spec section 6: An Agent manifest has no spec.workflow (unknown field). +# Expected: invalid (schema.additionalProperties at /spec/workflow) +apiVersion: awp.agenticworkflowprotocol.org/v1alpha4 +kind: Agent +metadata: + name: conformance-agent +spec: + version: 1.0.0 + owner: + team: conformance-team + classification: internal + model: + provider: ollama + name: qwen3 + instructions: Extract fields. + permissions: + default: deny + workflow: [] diff --git a/conformance/v1alpha4/invalid/6-agent-without-model.yaml b/conformance/v1alpha4/invalid/6-agent-without-model.yaml new file mode 100644 index 0000000..1831d3e --- /dev/null +++ b/conformance/v1alpha4/invalid/6-agent-without-model.yaml @@ -0,0 +1,15 @@ +# Conformance case 6-agent-without-model +# Spec section 6: An Agent manifest REQUIRES spec.model. +# Expected: invalid (schema.required at /spec) +apiVersion: awp.agenticworkflowprotocol.org/v1alpha4 +kind: Agent +metadata: + name: conformance-agent +spec: + version: 1.0.0 + owner: + team: conformance-team + classification: internal + instructions: Extract fields. + permissions: + default: deny diff --git a/conformance/v1alpha4/invalid/7.1-governance-requires-classification.yaml b/conformance/v1alpha4/invalid/7.1-governance-requires-classification.yaml new file mode 100644 index 0000000..df24f1b --- /dev/null +++ b/conformance/v1alpha4/invalid/7.1-governance-requires-classification.yaml @@ -0,0 +1,62 @@ +# Conformance case 7.1-governance-requires-classification +# Spec section 7.1: Under the governance profile Workflow and Agent REQUIRE spec.classification. +# Expected: invalid (governance.classification-required at /spec) +apiVersion: awp.agenticworkflowprotocol.org/v1alpha4 +kind: Workflow +metadata: + name: conformance-base +spec: + version: 1.0.0 + owner: + team: conformance-team + risk: + level: low + inputs: + - name: repo + type: string + required: true + budget: + maxCostUsd: 1 + maxSteps: 10 + maxDuration: 10m + resources: + maxRetries: 2 + maxConcurrency: 1 + secrets: + - name: TOOLS_TOKEN + source: secret-manager + scope: + - tools + mcpServers: + - name: tools + transport: streamable-http + url: https://mcp.example.com/tools + auth: + secretRef: TOOLS_TOKEN + actionGroups: + tools.read: + - tools.read_file + agents: + - id: worker + model: + provider: ollama + name: qwen3 + tools: + - type: mcp + server: tools + workflow: + - id: analyze + agent: worker + task: Analyze ${{ inputs.repo }}. + outputs: + - name: report + - id: apply + agent: worker + task: Apply ${{ steps.analyze.outputs.report }}. + dependsOn: + - analyze + permissions: + default: deny + tools: + tools.read: + allow: true diff --git a/conformance/v1alpha4/invalid/7.10-environment-without-autonomy.yaml b/conformance/v1alpha4/invalid/7.10-environment-without-autonomy.yaml new file mode 100644 index 0000000..70303d5 --- /dev/null +++ b/conformance/v1alpha4/invalid/7.10-environment-without-autonomy.yaml @@ -0,0 +1,65 @@ +# Conformance case 7.10-environment-without-autonomy +# Spec section 7.10: Each environment REQUIRES autonomy. +# Expected: invalid (schema.required at /spec/environments/production) +apiVersion: awp.agenticworkflowprotocol.org/v1alpha4 +kind: Workflow +metadata: + name: conformance-base +spec: + version: 1.0.0 + owner: + team: conformance-team + classification: internal + risk: + level: low + inputs: + - name: repo + type: string + required: true + budget: + maxCostUsd: 1 + maxSteps: 10 + maxDuration: 10m + resources: + maxRetries: 2 + maxConcurrency: 1 + secrets: + - name: TOOLS_TOKEN + source: secret-manager + scope: + - tools + mcpServers: + - name: tools + transport: streamable-http + url: https://mcp.example.com/tools + auth: + secretRef: TOOLS_TOKEN + actionGroups: + tools.read: + - tools.read_file + agents: + - id: worker + model: + provider: ollama + name: qwen3 + tools: + - type: mcp + server: tools + workflow: + - id: analyze + agent: worker + task: Analyze ${{ inputs.repo }}. + outputs: + - name: report + - id: apply + agent: worker + task: Apply ${{ steps.analyze.outputs.report }}. + dependsOn: + - analyze + permissions: + default: deny + tools: + tools.read: + allow: true + environments: + production: {} diff --git a/conformance/v1alpha4/invalid/7.10-invalid-autonomy.yaml b/conformance/v1alpha4/invalid/7.10-invalid-autonomy.yaml new file mode 100644 index 0000000..1548582 --- /dev/null +++ b/conformance/v1alpha4/invalid/7.10-invalid-autonomy.yaml @@ -0,0 +1,66 @@ +# Conformance case 7.10-invalid-autonomy +# Spec section 7.10: autonomy is unrestricted, controlled, approval-required or prohibited. +# Expected: invalid (schema.enum at /spec/environments/production/autonomy) +apiVersion: awp.agenticworkflowprotocol.org/v1alpha4 +kind: Workflow +metadata: + name: conformance-base +spec: + version: 1.0.0 + owner: + team: conformance-team + classification: internal + risk: + level: low + inputs: + - name: repo + type: string + required: true + budget: + maxCostUsd: 1 + maxSteps: 10 + maxDuration: 10m + resources: + maxRetries: 2 + maxConcurrency: 1 + secrets: + - name: TOOLS_TOKEN + source: secret-manager + scope: + - tools + mcpServers: + - name: tools + transport: streamable-http + url: https://mcp.example.com/tools + auth: + secretRef: TOOLS_TOKEN + actionGroups: + tools.read: + - tools.read_file + agents: + - id: worker + model: + provider: ollama + name: qwen3 + tools: + - type: mcp + server: tools + workflow: + - id: analyze + agent: worker + task: Analyze ${{ inputs.repo }}. + outputs: + - name: report + - id: apply + agent: worker + task: Apply ${{ steps.analyze.outputs.report }}. + dependsOn: + - analyze + permissions: + default: deny + tools: + tools.read: + allow: true + environments: + production: + autonomy: free diff --git a/conformance/v1alpha4/invalid/7.2-invalid-classification.yaml b/conformance/v1alpha4/invalid/7.2-invalid-classification.yaml new file mode 100644 index 0000000..ccd46b2 --- /dev/null +++ b/conformance/v1alpha4/invalid/7.2-invalid-classification.yaml @@ -0,0 +1,63 @@ +# Conformance case 7.2-invalid-classification +# Spec section 7.2: Data classes are public, internal, confidential, personal, restricted, sensitive, secret. +# Expected: invalid (schema.enum at /spec/classification) +apiVersion: awp.agenticworkflowprotocol.org/v1alpha4 +kind: Workflow +metadata: + name: conformance-base +spec: + version: 1.0.0 + owner: + team: conformance-team + classification: top-secret + risk: + level: low + inputs: + - name: repo + type: string + required: true + budget: + maxCostUsd: 1 + maxSteps: 10 + maxDuration: 10m + resources: + maxRetries: 2 + maxConcurrency: 1 + secrets: + - name: TOOLS_TOKEN + source: secret-manager + scope: + - tools + mcpServers: + - name: tools + transport: streamable-http + url: https://mcp.example.com/tools + auth: + secretRef: TOOLS_TOKEN + actionGroups: + tools.read: + - tools.read_file + agents: + - id: worker + model: + provider: ollama + name: qwen3 + tools: + - type: mcp + server: tools + workflow: + - id: analyze + agent: worker + task: Analyze ${{ inputs.repo }}. + outputs: + - name: report + - id: apply + agent: worker + task: Apply ${{ steps.analyze.outputs.report }}. + dependsOn: + - analyze + permissions: + default: deny + tools: + tools.read: + allow: true diff --git a/conformance/v1alpha4/invalid/7.2-invalid-external-transfer.yaml b/conformance/v1alpha4/invalid/7.2-invalid-external-transfer.yaml new file mode 100644 index 0000000..8bf7bf3 --- /dev/null +++ b/conformance/v1alpha4/invalid/7.2-invalid-external-transfer.yaml @@ -0,0 +1,66 @@ +# Conformance case 7.2-invalid-external-transfer +# Spec section 7.2: externalTransfer is allow or deny. +# Expected: invalid (schema.enum at /spec/dataPolicy/restrictions/externalTransfer) +apiVersion: awp.agenticworkflowprotocol.org/v1alpha4 +kind: Workflow +metadata: + name: conformance-base +spec: + version: 1.0.0 + owner: + team: conformance-team + classification: internal + risk: + level: low + inputs: + - name: repo + type: string + required: true + budget: + maxCostUsd: 1 + maxSteps: 10 + maxDuration: 10m + resources: + maxRetries: 2 + maxConcurrency: 1 + secrets: + - name: TOOLS_TOKEN + source: secret-manager + scope: + - tools + mcpServers: + - name: tools + transport: streamable-http + url: https://mcp.example.com/tools + auth: + secretRef: TOOLS_TOKEN + actionGroups: + tools.read: + - tools.read_file + agents: + - id: worker + model: + provider: ollama + name: qwen3 + tools: + - type: mcp + server: tools + workflow: + - id: analyze + agent: worker + task: Analyze ${{ inputs.repo }}. + outputs: + - name: report + - id: apply + agent: worker + task: Apply ${{ steps.analyze.outputs.report }}. + dependsOn: + - analyze + permissions: + default: deny + tools: + tools.read: + allow: true + dataPolicy: + restrictions: + externalTransfer: maybe diff --git a/conformance/v1alpha4/invalid/7.4-invalid-model-policy-status.yaml b/conformance/v1alpha4/invalid/7.4-invalid-model-policy-status.yaml new file mode 100644 index 0000000..9c40e4f --- /dev/null +++ b/conformance/v1alpha4/invalid/7.4-invalid-model-policy-status.yaml @@ -0,0 +1,66 @@ +# Conformance case 7.4-invalid-model-policy-status +# Spec section 7.4: requirements.approvalStatus uses the model approval statuses. +# Expected: invalid (schema.enum at /spec/modelPolicy/requirements/approvalStatus) +apiVersion: awp.agenticworkflowprotocol.org/v1alpha4 +kind: Workflow +metadata: + name: conformance-base +spec: + version: 1.0.0 + owner: + team: conformance-team + classification: internal + risk: + level: low + inputs: + - name: repo + type: string + required: true + budget: + maxCostUsd: 1 + maxSteps: 10 + maxDuration: 10m + resources: + maxRetries: 2 + maxConcurrency: 1 + secrets: + - name: TOOLS_TOKEN + source: secret-manager + scope: + - tools + mcpServers: + - name: tools + transport: streamable-http + url: https://mcp.example.com/tools + auth: + secretRef: TOOLS_TOKEN + actionGroups: + tools.read: + - tools.read_file + agents: + - id: worker + model: + provider: ollama + name: qwen3 + tools: + - type: mcp + server: tools + workflow: + - id: analyze + agent: worker + task: Analyze ${{ inputs.repo }}. + outputs: + - name: report + - id: apply + agent: worker + task: Apply ${{ steps.analyze.outputs.report }}. + dependsOn: + - analyze + permissions: + default: deny + tools: + tools.read: + allow: true + modelPolicy: + requirements: + approvalStatus: green diff --git a/conformance/v1alpha4/invalid/7.5-allow-not-boolean.yaml b/conformance/v1alpha4/invalid/7.5-allow-not-boolean.yaml new file mode 100644 index 0000000..bf91932 --- /dev/null +++ b/conformance/v1alpha4/invalid/7.5-allow-not-boolean.yaml @@ -0,0 +1,63 @@ +# Conformance case 7.5-allow-not-boolean +# Spec section 7.5.1: allow is a boolean. +# Expected: invalid (schema.type at /spec/permissions/tools/tools.read/allow) +apiVersion: awp.agenticworkflowprotocol.org/v1alpha4 +kind: Workflow +metadata: + name: conformance-base +spec: + version: 1.0.0 + owner: + team: conformance-team + classification: internal + risk: + level: low + inputs: + - name: repo + type: string + required: true + budget: + maxCostUsd: 1 + maxSteps: 10 + maxDuration: 10m + resources: + maxRetries: 2 + maxConcurrency: 1 + secrets: + - name: TOOLS_TOKEN + source: secret-manager + scope: + - tools + mcpServers: + - name: tools + transport: streamable-http + url: https://mcp.example.com/tools + auth: + secretRef: TOOLS_TOKEN + actionGroups: + tools.read: + - tools.read_file + agents: + - id: worker + model: + provider: ollama + name: qwen3 + tools: + - type: mcp + server: tools + workflow: + - id: analyze + agent: worker + task: Analyze ${{ inputs.repo }}. + outputs: + - name: report + - id: apply + agent: worker + task: Apply ${{ steps.analyze.outputs.report }}. + dependsOn: + - analyze + permissions: + default: deny + tools: + tools.read: + allow: yes diff --git a/conformance/v1alpha4/invalid/7.5-invalid-default.yaml b/conformance/v1alpha4/invalid/7.5-invalid-default.yaml new file mode 100644 index 0000000..8c54c73 --- /dev/null +++ b/conformance/v1alpha4/invalid/7.5-invalid-default.yaml @@ -0,0 +1,63 @@ +# Conformance case 7.5-invalid-default +# Spec section 7.5.1: permissions.default is allow or deny. +# Expected: invalid (schema.enum at /spec/permissions/default) +apiVersion: awp.agenticworkflowprotocol.org/v1alpha4 +kind: Workflow +metadata: + name: conformance-base +spec: + version: 1.0.0 + owner: + team: conformance-team + classification: internal + risk: + level: low + inputs: + - name: repo + type: string + required: true + budget: + maxCostUsd: 1 + maxSteps: 10 + maxDuration: 10m + resources: + maxRetries: 2 + maxConcurrency: 1 + secrets: + - name: TOOLS_TOKEN + source: secret-manager + scope: + - tools + mcpServers: + - name: tools + transport: streamable-http + url: https://mcp.example.com/tools + auth: + secretRef: TOOLS_TOKEN + actionGroups: + tools.read: + - tools.read_file + agents: + - id: worker + model: + provider: ollama + name: qwen3 + tools: + - type: mcp + server: tools + workflow: + - id: analyze + agent: worker + task: Analyze ${{ inputs.repo }}. + outputs: + - name: report + - id: apply + agent: worker + task: Apply ${{ steps.analyze.outputs.report }}. + dependsOn: + - analyze + permissions: + default: maybe + tools: + tools.read: + allow: true diff --git a/conformance/v1alpha4/invalid/7.5-invalid-egress.yaml b/conformance/v1alpha4/invalid/7.5-invalid-egress.yaml new file mode 100644 index 0000000..ab0da88 --- /dev/null +++ b/conformance/v1alpha4/invalid/7.5-invalid-egress.yaml @@ -0,0 +1,65 @@ +# Conformance case 7.5-invalid-egress +# Spec section 7.5.1: network.egress is allow or deny. +# Expected: invalid (schema.enum at /spec/permissions/network/egress) +apiVersion: awp.agenticworkflowprotocol.org/v1alpha4 +kind: Workflow +metadata: + name: conformance-base +spec: + version: 1.0.0 + owner: + team: conformance-team + classification: internal + risk: + level: low + inputs: + - name: repo + type: string + required: true + budget: + maxCostUsd: 1 + maxSteps: 10 + maxDuration: 10m + resources: + maxRetries: 2 + maxConcurrency: 1 + secrets: + - name: TOOLS_TOKEN + source: secret-manager + scope: + - tools + mcpServers: + - name: tools + transport: streamable-http + url: https://mcp.example.com/tools + auth: + secretRef: TOOLS_TOKEN + actionGroups: + tools.read: + - tools.read_file + agents: + - id: worker + model: + provider: ollama + name: qwen3 + tools: + - type: mcp + server: tools + workflow: + - id: analyze + agent: worker + task: Analyze ${{ inputs.repo }}. + outputs: + - name: report + - id: apply + agent: worker + task: Apply ${{ steps.analyze.outputs.report }}. + dependsOn: + - analyze + permissions: + default: deny + tools: + tools.read: + allow: true + network: + egress: limited diff --git a/conformance/v1alpha4/invalid/7.5-tool-without-allow.yaml b/conformance/v1alpha4/invalid/7.5-tool-without-allow.yaml new file mode 100644 index 0000000..842bd2b --- /dev/null +++ b/conformance/v1alpha4/invalid/7.5-tool-without-allow.yaml @@ -0,0 +1,64 @@ +# Conformance case 7.5-tool-without-allow +# Spec section 7.5.1: permissions.tools entries REQUIRE allow. +# Expected: invalid (schema.required at /spec/permissions/tools/tools.read) +apiVersion: awp.agenticworkflowprotocol.org/v1alpha4 +kind: Workflow +metadata: + name: conformance-base +spec: + version: 1.0.0 + owner: + team: conformance-team + classification: internal + risk: + level: low + inputs: + - name: repo + type: string + required: true + budget: + maxCostUsd: 1 + maxSteps: 10 + maxDuration: 10m + resources: + maxRetries: 2 + maxConcurrency: 1 + secrets: + - name: TOOLS_TOKEN + source: secret-manager + scope: + - tools + mcpServers: + - name: tools + transport: streamable-http + url: https://mcp.example.com/tools + auth: + secretRef: TOOLS_TOKEN + actionGroups: + tools.read: + - tools.read_file + agents: + - id: worker + model: + provider: ollama + name: qwen3 + tools: + - type: mcp + server: tools + workflow: + - id: analyze + agent: worker + task: Analyze ${{ inputs.repo }}. + outputs: + - name: report + - id: apply + agent: worker + task: Apply ${{ steps.analyze.outputs.report }}. + dependsOn: + - analyze + permissions: + default: deny + tools: + tools.read: + resources: + - x diff --git a/conformance/v1alpha4/invalid/7.6-approver-empty.yaml b/conformance/v1alpha4/invalid/7.6-approver-empty.yaml new file mode 100644 index 0000000..62283ff --- /dev/null +++ b/conformance/v1alpha4/invalid/7.6-approver-empty.yaml @@ -0,0 +1,66 @@ +# Conformance case 7.6-approver-empty +# Spec section 7.6: An approver has exactly one of role or user. +# Expected: invalid (schema.oneOf at /spec/approval/approvers/0) +apiVersion: awp.agenticworkflowprotocol.org/v1alpha4 +kind: Workflow +metadata: + name: conformance-base +spec: + version: 1.0.0 + owner: + team: conformance-team + classification: internal + risk: + level: low + inputs: + - name: repo + type: string + required: true + budget: + maxCostUsd: 1 + maxSteps: 10 + maxDuration: 10m + resources: + maxRetries: 2 + maxConcurrency: 1 + secrets: + - name: TOOLS_TOKEN + source: secret-manager + scope: + - tools + mcpServers: + - name: tools + transport: streamable-http + url: https://mcp.example.com/tools + auth: + secretRef: TOOLS_TOKEN + actionGroups: + tools.read: + - tools.read_file + agents: + - id: worker + model: + provider: ollama + name: qwen3 + tools: + - type: mcp + server: tools + workflow: + - id: analyze + agent: worker + task: Analyze ${{ inputs.repo }}. + outputs: + - name: report + - id: apply + agent: worker + task: Apply ${{ steps.analyze.outputs.report }}. + dependsOn: + - analyze + permissions: + default: deny + tools: + tools.read: + allow: true + approval: + approvers: + - {} diff --git a/conformance/v1alpha4/invalid/7.6-approver-role-and-user.yaml b/conformance/v1alpha4/invalid/7.6-approver-role-and-user.yaml new file mode 100644 index 0000000..95c1e9f --- /dev/null +++ b/conformance/v1alpha4/invalid/7.6-approver-role-and-user.yaml @@ -0,0 +1,67 @@ +# Conformance case 7.6-approver-role-and-user +# Spec section 7.6: An approver has exactly one of role or user. +# Expected: invalid (schema.oneOf at /spec/approval/approvers/0) +apiVersion: awp.agenticworkflowprotocol.org/v1alpha4 +kind: Workflow +metadata: + name: conformance-base +spec: + version: 1.0.0 + owner: + team: conformance-team + classification: internal + risk: + level: low + inputs: + - name: repo + type: string + required: true + budget: + maxCostUsd: 1 + maxSteps: 10 + maxDuration: 10m + resources: + maxRetries: 2 + maxConcurrency: 1 + secrets: + - name: TOOLS_TOKEN + source: secret-manager + scope: + - tools + mcpServers: + - name: tools + transport: streamable-http + url: https://mcp.example.com/tools + auth: + secretRef: TOOLS_TOKEN + actionGroups: + tools.read: + - tools.read_file + agents: + - id: worker + model: + provider: ollama + name: qwen3 + tools: + - type: mcp + server: tools + workflow: + - id: analyze + agent: worker + task: Analyze ${{ inputs.repo }}. + outputs: + - name: report + - id: apply + agent: worker + task: Apply ${{ steps.analyze.outputs.report }}. + dependsOn: + - analyze + permissions: + default: deny + tools: + tools.read: + allow: true + approval: + approvers: + - role: a + user: b diff --git a/conformance/v1alpha4/invalid/7.6-invalid-on-timeout.yaml b/conformance/v1alpha4/invalid/7.6-invalid-on-timeout.yaml new file mode 100644 index 0000000..0585a12 --- /dev/null +++ b/conformance/v1alpha4/invalid/7.6-invalid-on-timeout.yaml @@ -0,0 +1,65 @@ +# Conformance case 7.6-invalid-on-timeout +# Spec section 7.6: onTimeout is reject or fail. +# Expected: invalid (schema.enum at /spec/approval/onTimeout) +apiVersion: awp.agenticworkflowprotocol.org/v1alpha4 +kind: Workflow +metadata: + name: conformance-base +spec: + version: 1.0.0 + owner: + team: conformance-team + classification: internal + risk: + level: low + inputs: + - name: repo + type: string + required: true + budget: + maxCostUsd: 1 + maxSteps: 10 + maxDuration: 10m + resources: + maxRetries: 2 + maxConcurrency: 1 + secrets: + - name: TOOLS_TOKEN + source: secret-manager + scope: + - tools + mcpServers: + - name: tools + transport: streamable-http + url: https://mcp.example.com/tools + auth: + secretRef: TOOLS_TOKEN + actionGroups: + tools.read: + - tools.read_file + agents: + - id: worker + model: + provider: ollama + name: qwen3 + tools: + - type: mcp + server: tools + workflow: + - id: analyze + agent: worker + task: Analyze ${{ inputs.repo }}. + outputs: + - name: report + - id: apply + agent: worker + task: Apply ${{ steps.analyze.outputs.report }}. + dependsOn: + - analyze + permissions: + default: deny + tools: + tools.read: + allow: true + approval: + onTimeout: approve diff --git a/conformance/v1alpha4/invalid/7.6-min-approvals-zero.yaml b/conformance/v1alpha4/invalid/7.6-min-approvals-zero.yaml new file mode 100644 index 0000000..6809761 --- /dev/null +++ b/conformance/v1alpha4/invalid/7.6-min-approvals-zero.yaml @@ -0,0 +1,65 @@ +# Conformance case 7.6-min-approvals-zero +# Spec section 7.6: minApprovals is a positive integer. +# Expected: invalid (schema.minimum at /spec/approval/minApprovals) +apiVersion: awp.agenticworkflowprotocol.org/v1alpha4 +kind: Workflow +metadata: + name: conformance-base +spec: + version: 1.0.0 + owner: + team: conformance-team + classification: internal + risk: + level: low + inputs: + - name: repo + type: string + required: true + budget: + maxCostUsd: 1 + maxSteps: 10 + maxDuration: 10m + resources: + maxRetries: 2 + maxConcurrency: 1 + secrets: + - name: TOOLS_TOKEN + source: secret-manager + scope: + - tools + mcpServers: + - name: tools + transport: streamable-http + url: https://mcp.example.com/tools + auth: + secretRef: TOOLS_TOKEN + actionGroups: + tools.read: + - tools.read_file + agents: + - id: worker + model: + provider: ollama + name: qwen3 + tools: + - type: mcp + server: tools + workflow: + - id: analyze + agent: worker + task: Analyze ${{ inputs.repo }}. + outputs: + - name: report + - id: apply + agent: worker + task: Apply ${{ steps.analyze.outputs.report }}. + dependsOn: + - analyze + permissions: + default: deny + tools: + tools.read: + allow: true + approval: + minApprovals: 0 diff --git a/conformance/v1alpha4/invalid/7.6-required-for-invalid-key.yaml b/conformance/v1alpha4/invalid/7.6-required-for-invalid-key.yaml new file mode 100644 index 0000000..746a991 --- /dev/null +++ b/conformance/v1alpha4/invalid/7.6-required-for-invalid-key.yaml @@ -0,0 +1,66 @@ +# Conformance case 7.6-required-for-invalid-key +# Spec section 7.6: requiredFor lists action keys. +# Expected: invalid (schema.pattern at /spec/approval/requiredFor/0) +apiVersion: awp.agenticworkflowprotocol.org/v1alpha4 +kind: Workflow +metadata: + name: conformance-base +spec: + version: 1.0.0 + owner: + team: conformance-team + classification: internal + risk: + level: low + inputs: + - name: repo + type: string + required: true + budget: + maxCostUsd: 1 + maxSteps: 10 + maxDuration: 10m + resources: + maxRetries: 2 + maxConcurrency: 1 + secrets: + - name: TOOLS_TOKEN + source: secret-manager + scope: + - tools + mcpServers: + - name: tools + transport: streamable-http + url: https://mcp.example.com/tools + auth: + secretRef: TOOLS_TOKEN + actionGroups: + tools.read: + - tools.read_file + agents: + - id: worker + model: + provider: ollama + name: qwen3 + tools: + - type: mcp + server: tools + workflow: + - id: analyze + agent: worker + task: Analyze ${{ inputs.repo }}. + outputs: + - name: report + - id: apply + agent: worker + task: Apply ${{ steps.analyze.outputs.report }}. + dependsOn: + - analyze + permissions: + default: deny + tools: + tools.read: + allow: true + approval: + requiredFor: + - deploy diff --git a/conformance/v1alpha4/invalid/7.8-unknown-separation-rule.yaml b/conformance/v1alpha4/invalid/7.8-unknown-separation-rule.yaml new file mode 100644 index 0000000..4bda200 --- /dev/null +++ b/conformance/v1alpha4/invalid/7.8-unknown-separation-rule.yaml @@ -0,0 +1,68 @@ +# Conformance case 7.8-unknown-separation-rule +# Spec section 7.8: Separation-of-duties rules are the defined rules only. +# Expected: invalid (schema.additionalProperties at /spec/approval/separationOfDuties/rules/0/everyoneCanApprove) +apiVersion: awp.agenticworkflowprotocol.org/v1alpha4 +kind: Workflow +metadata: + name: conformance-base +spec: + version: 1.0.0 + owner: + team: conformance-team + classification: internal + risk: + level: low + inputs: + - name: repo + type: string + required: true + budget: + maxCostUsd: 1 + maxSteps: 10 + maxDuration: 10m + resources: + maxRetries: 2 + maxConcurrency: 1 + secrets: + - name: TOOLS_TOKEN + source: secret-manager + scope: + - tools + mcpServers: + - name: tools + transport: streamable-http + url: https://mcp.example.com/tools + auth: + secretRef: TOOLS_TOKEN + actionGroups: + tools.read: + - tools.read_file + agents: + - id: worker + model: + provider: ollama + name: qwen3 + tools: + - type: mcp + server: tools + workflow: + - id: analyze + agent: worker + task: Analyze ${{ inputs.repo }}. + outputs: + - name: report + - id: apply + agent: worker + task: Apply ${{ steps.analyze.outputs.report }}. + dependsOn: + - analyze + permissions: + default: deny + tools: + tools.read: + allow: true + approval: + separationOfDuties: + enabled: true + rules: + - everyoneCanApprove: true diff --git a/conformance/v1alpha4/invalid/7.9-literal-password-in-free-form-value.yaml b/conformance/v1alpha4/invalid/7.9-literal-password-in-free-form-value.yaml new file mode 100644 index 0000000..3505cb6 --- /dev/null +++ b/conformance/v1alpha4/invalid/7.9-literal-password-in-free-form-value.yaml @@ -0,0 +1,64 @@ +# Conformance case 7.9-literal-password-in-free-form-value +# Spec section 7.9: Credential-named fields are rejected anywhere outside x- extensions, also inside free-form values. +# Expected: invalid (secret.literal-field at /spec/inputs/0/default/password) +apiVersion: awp.agenticworkflowprotocol.org/v1alpha4 +kind: Workflow +metadata: + name: conformance-base +spec: + version: 1.0.0 + owner: + team: conformance-team + classification: internal + risk: + level: low + inputs: + - name: cfg + type: object + default: + password: hunter2 + budget: + maxCostUsd: 1 + maxSteps: 10 + maxDuration: 10m + resources: + maxRetries: 2 + maxConcurrency: 1 + secrets: + - name: TOOLS_TOKEN + source: secret-manager + scope: + - tools + mcpServers: + - name: tools + transport: streamable-http + url: https://mcp.example.com/tools + auth: + secretRef: TOOLS_TOKEN + actionGroups: + tools.read: + - tools.read_file + agents: + - id: worker + model: + provider: ollama + name: qwen3 + tools: + - type: mcp + server: tools + workflow: + - id: analyze + agent: worker + task: Analyze ${{ inputs.repo }}. + outputs: + - name: report + - id: apply + agent: worker + task: Apply ${{ steps.analyze.outputs.report }}. + dependsOn: + - analyze + permissions: + default: deny + tools: + tools.read: + allow: true diff --git a/conformance/v1alpha4/invalid/7.9-literal-token-field.yaml b/conformance/v1alpha4/invalid/7.9-literal-token-field.yaml new file mode 100644 index 0000000..5003bed --- /dev/null +++ b/conformance/v1alpha4/invalid/7.9-literal-token-field.yaml @@ -0,0 +1,64 @@ +# Conformance case 7.9-literal-token-field +# Spec section 7.9: Fields named token, password, apiKey, secret or privateKey with a literal value are rejected (here: unknown field in auth). +# Expected: invalid (schema.additionalProperties at /spec/mcpServers/0/auth/token) +apiVersion: awp.agenticworkflowprotocol.org/v1alpha4 +kind: Workflow +metadata: + name: conformance-base +spec: + version: 1.0.0 + owner: + team: conformance-team + classification: internal + risk: + level: low + inputs: + - name: repo + type: string + required: true + budget: + maxCostUsd: 1 + maxSteps: 10 + maxDuration: 10m + resources: + maxRetries: 2 + maxConcurrency: 1 + secrets: + - name: TOOLS_TOKEN + source: secret-manager + scope: + - tools + mcpServers: + - name: tools + transport: streamable-http + url: https://mcp.example.com/tools + auth: + secretRef: TOOLS_TOKEN + token: ghp_example + actionGroups: + tools.read: + - tools.read_file + agents: + - id: worker + model: + provider: ollama + name: qwen3 + tools: + - type: mcp + server: tools + workflow: + - id: analyze + agent: worker + task: Analyze ${{ inputs.repo }}. + outputs: + - name: report + - id: apply + agent: worker + task: Apply ${{ steps.analyze.outputs.report }}. + dependsOn: + - analyze + permissions: + default: deny + tools: + tools.read: + allow: true diff --git a/conformance/v1alpha4/invalid/7.9-remote-agent-secret-ref-out-of-scope.yaml b/conformance/v1alpha4/invalid/7.9-remote-agent-secret-ref-out-of-scope.yaml new file mode 100644 index 0000000..fe3f1a9 --- /dev/null +++ b/conformance/v1alpha4/invalid/7.9-remote-agent-secret-ref-out-of-scope.yaml @@ -0,0 +1,68 @@ +# Conformance case 7.9-remote-agent-secret-ref-out-of-scope +# Spec section 7.9: A remote agent credential is scoped to the agent id. +# Expected: invalid (secretRef.scope at /spec/agents/1/auth/secretRef) +apiVersion: awp.agenticworkflowprotocol.org/v1alpha4 +kind: Workflow +metadata: + name: conformance-base +spec: + version: 1.0.0 + owner: + team: conformance-team + classification: internal + risk: + level: low + inputs: + - name: repo + type: string + required: true + budget: + maxCostUsd: 1 + maxSteps: 10 + maxDuration: 10m + resources: + maxRetries: 2 + maxConcurrency: 1 + secrets: + - name: TOOLS_TOKEN + source: secret-manager + scope: + - tools + mcpServers: + - name: tools + transport: streamable-http + url: https://mcp.example.com/tools + auth: + secretRef: TOOLS_TOKEN + actionGroups: + tools.read: + - tools.read_file + agents: + - id: worker + model: + provider: ollama + name: qwen3 + tools: + - type: mcp + server: tools + - id: remote + protocol: a2a + endpoint: https://agents.example.com/a2a + auth: + secretRef: TOOLS_TOKEN + workflow: + - id: analyze + agent: worker + task: Analyze ${{ inputs.repo }}. + outputs: + - name: report + - id: apply + agent: worker + task: Apply ${{ steps.analyze.outputs.report }}. + dependsOn: + - analyze + permissions: + default: deny + tools: + tools.read: + allow: true diff --git a/conformance/v1alpha4/invalid/7.9-secret-ref-empty-scope.yaml b/conformance/v1alpha4/invalid/7.9-secret-ref-empty-scope.yaml new file mode 100644 index 0000000..8e0dca1 --- /dev/null +++ b/conformance/v1alpha4/invalid/7.9-secret-ref-empty-scope.yaml @@ -0,0 +1,61 @@ +# Conformance case 7.9-secret-ref-empty-scope +# Spec section 7.9: The default scope is none. +# Expected: invalid (secretRef.scope at /spec/mcpServers/0/auth/secretRef) +apiVersion: awp.agenticworkflowprotocol.org/v1alpha4 +kind: Workflow +metadata: + name: conformance-base +spec: + version: 1.0.0 + owner: + team: conformance-team + classification: internal + risk: + level: low + inputs: + - name: repo + type: string + required: true + budget: + maxCostUsd: 1 + maxSteps: 10 + maxDuration: 10m + resources: + maxRetries: 2 + maxConcurrency: 1 + secrets: + - name: TOOLS_TOKEN + source: secret-manager + mcpServers: + - name: tools + transport: streamable-http + url: https://mcp.example.com/tools + auth: + secretRef: TOOLS_TOKEN + actionGroups: + tools.read: + - tools.read_file + agents: + - id: worker + model: + provider: ollama + name: qwen3 + tools: + - type: mcp + server: tools + workflow: + - id: analyze + agent: worker + task: Analyze ${{ inputs.repo }}. + outputs: + - name: report + - id: apply + agent: worker + task: Apply ${{ steps.analyze.outputs.report }}. + dependsOn: + - analyze + permissions: + default: deny + tools: + tools.read: + allow: true diff --git a/conformance/v1alpha4/invalid/7.9-secret-ref-out-of-scope.yaml b/conformance/v1alpha4/invalid/7.9-secret-ref-out-of-scope.yaml new file mode 100644 index 0000000..182d742 --- /dev/null +++ b/conformance/v1alpha4/invalid/7.9-secret-ref-out-of-scope.yaml @@ -0,0 +1,63 @@ +# Conformance case 7.9-secret-ref-out-of-scope +# Spec section 7.9: The scope of the secret MUST include the consumer. +# Expected: invalid (secretRef.scope at /spec/mcpServers/0/auth/secretRef) +apiVersion: awp.agenticworkflowprotocol.org/v1alpha4 +kind: Workflow +metadata: + name: conformance-base +spec: + version: 1.0.0 + owner: + team: conformance-team + classification: internal + risk: + level: low + inputs: + - name: repo + type: string + required: true + budget: + maxCostUsd: 1 + maxSteps: 10 + maxDuration: 10m + resources: + maxRetries: 2 + maxConcurrency: 1 + secrets: + - name: TOOLS_TOKEN + source: secret-manager + scope: + - someone-else + mcpServers: + - name: tools + transport: streamable-http + url: https://mcp.example.com/tools + auth: + secretRef: TOOLS_TOKEN + actionGroups: + tools.read: + - tools.read_file + agents: + - id: worker + model: + provider: ollama + name: qwen3 + tools: + - type: mcp + server: tools + workflow: + - id: analyze + agent: worker + task: Analyze ${{ inputs.repo }}. + outputs: + - name: report + - id: apply + agent: worker + task: Apply ${{ steps.analyze.outputs.report }}. + dependsOn: + - analyze + permissions: + default: deny + tools: + tools.read: + allow: true diff --git a/conformance/v1alpha4/invalid/7.9-secret-ref-undeclared.yaml b/conformance/v1alpha4/invalid/7.9-secret-ref-undeclared.yaml new file mode 100644 index 0000000..2a5e26c --- /dev/null +++ b/conformance/v1alpha4/invalid/7.9-secret-ref-undeclared.yaml @@ -0,0 +1,63 @@ +# Conformance case 7.9-secret-ref-undeclared +# Spec section 7.9: A secretRef MUST name a secret declared in spec.secrets. +# Expected: invalid (secretRef.undeclared at /spec/mcpServers/0/auth/secretRef) +apiVersion: awp.agenticworkflowprotocol.org/v1alpha4 +kind: Workflow +metadata: + name: conformance-base +spec: + version: 1.0.0 + owner: + team: conformance-team + classification: internal + risk: + level: low + inputs: + - name: repo + type: string + required: true + budget: + maxCostUsd: 1 + maxSteps: 10 + maxDuration: 10m + resources: + maxRetries: 2 + maxConcurrency: 1 + secrets: + - name: TOOLS_TOKEN + source: secret-manager + scope: + - tools + mcpServers: + - name: tools + transport: streamable-http + url: https://mcp.example.com/tools + auth: + secretRef: OTHER_TOKEN + actionGroups: + tools.read: + - tools.read_file + agents: + - id: worker + model: + provider: ollama + name: qwen3 + tools: + - type: mcp + server: tools + workflow: + - id: analyze + agent: worker + task: Analyze ${{ inputs.repo }}. + outputs: + - name: report + - id: apply + agent: worker + task: Apply ${{ steps.analyze.outputs.report }}. + dependsOn: + - analyze + permissions: + default: deny + tools: + tools.read: + allow: true diff --git a/conformance/v1alpha4/invalid/7.9-secret-without-source.yaml b/conformance/v1alpha4/invalid/7.9-secret-without-source.yaml new file mode 100644 index 0000000..3236157 --- /dev/null +++ b/conformance/v1alpha4/invalid/7.9-secret-without-source.yaml @@ -0,0 +1,62 @@ +# Conformance case 7.9-secret-without-source +# Spec section 7.9: A secret declaration REQUIRES name and source. +# Expected: invalid (schema.required at /spec/secrets/0) +apiVersion: awp.agenticworkflowprotocol.org/v1alpha4 +kind: Workflow +metadata: + name: conformance-base +spec: + version: 1.0.0 + owner: + team: conformance-team + classification: internal + risk: + level: low + inputs: + - name: repo + type: string + required: true + budget: + maxCostUsd: 1 + maxSteps: 10 + maxDuration: 10m + resources: + maxRetries: 2 + maxConcurrency: 1 + secrets: + - name: TOOLS_TOKEN + scope: + - tools + mcpServers: + - name: tools + transport: streamable-http + url: https://mcp.example.com/tools + auth: + secretRef: TOOLS_TOKEN + actionGroups: + tools.read: + - tools.read_file + agents: + - id: worker + model: + provider: ollama + name: qwen3 + tools: + - type: mcp + server: tools + workflow: + - id: analyze + agent: worker + task: Analyze ${{ inputs.repo }}. + outputs: + - name: report + - id: apply + agent: worker + task: Apply ${{ steps.analyze.outputs.report }}. + dependsOn: + - analyze + permissions: + default: deny + tools: + tools.read: + allow: true diff --git a/conformance/v1alpha4/invalid/8.1-include-without-version.yaml b/conformance/v1alpha4/invalid/8.1-include-without-version.yaml new file mode 100644 index 0000000..a78eea0 --- /dev/null +++ b/conformance/v1alpha4/invalid/8.1-include-without-version.yaml @@ -0,0 +1,66 @@ +# Conformance case 8.1-include-without-version +# Spec section 8.1: include entries name a Policy by name and exact version. +# Expected: invalid (schema.required at /spec/policies/include/0) +apiVersion: awp.agenticworkflowprotocol.org/v1alpha4 +kind: Workflow +metadata: + name: conformance-base +spec: + version: 1.0.0 + owner: + team: conformance-team + classification: internal + risk: + level: low + inputs: + - name: repo + type: string + required: true + budget: + maxCostUsd: 1 + maxSteps: 10 + maxDuration: 10m + resources: + maxRetries: 2 + maxConcurrency: 1 + secrets: + - name: TOOLS_TOKEN + source: secret-manager + scope: + - tools + mcpServers: + - name: tools + transport: streamable-http + url: https://mcp.example.com/tools + auth: + secretRef: TOOLS_TOKEN + actionGroups: + tools.read: + - tools.read_file + agents: + - id: worker + model: + provider: ollama + name: qwen3 + tools: + - type: mcp + server: tools + workflow: + - id: analyze + agent: worker + task: Analyze ${{ inputs.repo }}. + outputs: + - name: report + - id: apply + agent: worker + task: Apply ${{ steps.analyze.outputs.report }}. + dependsOn: + - analyze + permissions: + default: deny + tools: + tools.read: + allow: true + policies: + include: + - name: p diff --git a/conformance/v1alpha4/invalid/8.1-shorthand-not-boolean.yaml b/conformance/v1alpha4/invalid/8.1-shorthand-not-boolean.yaml new file mode 100644 index 0000000..324b2ac --- /dev/null +++ b/conformance/v1alpha4/invalid/8.1-shorthand-not-boolean.yaml @@ -0,0 +1,66 @@ +# Conformance case 8.1-shorthand-not-boolean +# Spec section 8.1: Policy shorthands are booleans. +# Expected: invalid (schema.type at /spec/policies/git/allowPush) +apiVersion: awp.agenticworkflowprotocol.org/v1alpha4 +kind: Workflow +metadata: + name: conformance-base +spec: + version: 1.0.0 + owner: + team: conformance-team + classification: internal + risk: + level: low + inputs: + - name: repo + type: string + required: true + budget: + maxCostUsd: 1 + maxSteps: 10 + maxDuration: 10m + resources: + maxRetries: 2 + maxConcurrency: 1 + secrets: + - name: TOOLS_TOKEN + source: secret-manager + scope: + - tools + mcpServers: + - name: tools + transport: streamable-http + url: https://mcp.example.com/tools + auth: + secretRef: TOOLS_TOKEN + actionGroups: + tools.read: + - tools.read_file + agents: + - id: worker + model: + provider: ollama + name: qwen3 + tools: + - type: mcp + server: tools + workflow: + - id: analyze + agent: worker + task: Analyze ${{ inputs.repo }}. + outputs: + - name: report + - id: apply + agent: worker + task: Apply ${{ steps.analyze.outputs.report }}. + dependsOn: + - analyze + permissions: + default: deny + tools: + tools.read: + allow: true + policies: + git: + allowPush: no diff --git a/conformance/v1alpha4/invalid/8.1-unknown-shorthand.yaml b/conformance/v1alpha4/invalid/8.1-unknown-shorthand.yaml new file mode 100644 index 0000000..8aebd2e --- /dev/null +++ b/conformance/v1alpha4/invalid/8.1-unknown-shorthand.yaml @@ -0,0 +1,66 @@ +# Conformance case 8.1-unknown-shorthand +# Spec section 8.1: Unknown shorthands are rejected. +# Expected: invalid (schema.additionalProperties at /spec/policies/network) +apiVersion: awp.agenticworkflowprotocol.org/v1alpha4 +kind: Workflow +metadata: + name: conformance-base +spec: + version: 1.0.0 + owner: + team: conformance-team + classification: internal + risk: + level: low + inputs: + - name: repo + type: string + required: true + budget: + maxCostUsd: 1 + maxSteps: 10 + maxDuration: 10m + resources: + maxRetries: 2 + maxConcurrency: 1 + secrets: + - name: TOOLS_TOKEN + source: secret-manager + scope: + - tools + mcpServers: + - name: tools + transport: streamable-http + url: https://mcp.example.com/tools + auth: + secretRef: TOOLS_TOKEN + actionGroups: + tools.read: + - tools.read_file + agents: + - id: worker + model: + provider: ollama + name: qwen3 + tools: + - type: mcp + server: tools + workflow: + - id: analyze + agent: worker + task: Analyze ${{ inputs.repo }}. + outputs: + - name: report + - id: apply + agent: worker + task: Apply ${{ steps.analyze.outputs.report }}. + dependsOn: + - analyze + permissions: + default: deny + tools: + tools.read: + allow: true + policies: + network: + allow: false diff --git a/conformance/v1alpha4/invalid/8.2-no-allow-effect.yaml b/conformance/v1alpha4/invalid/8.2-no-allow-effect.yaml new file mode 100644 index 0000000..93fc086 --- /dev/null +++ b/conformance/v1alpha4/invalid/8.2-no-allow-effect.yaml @@ -0,0 +1,20 @@ +# Conformance case 8.2-no-allow-effect +# Spec section 8.2: Policy rules can only restrict: effect is deny or requireApproval. +# Expected: invalid (schema.enum at /spec/rules/0/effect) +apiVersion: awp.agenticworkflowprotocol.org/v1alpha4 +kind: Policy +metadata: + name: conformance-policy +spec: + version: 1.0.0 + owner: + team: governance-team + rules: + - id: deploy-needs-approval + when: + action: + equals: production.deploy + effect: allow + approval: + approvers: + - role: release-manager diff --git a/conformance/v1alpha4/invalid/8.2-policy-without-rules.yaml b/conformance/v1alpha4/invalid/8.2-policy-without-rules.yaml new file mode 100644 index 0000000..f206c5b --- /dev/null +++ b/conformance/v1alpha4/invalid/8.2-policy-without-rules.yaml @@ -0,0 +1,11 @@ +# Conformance case 8.2-policy-without-rules +# Spec section 8.2: A Policy REQUIRES rules. +# Expected: invalid (schema.required at /spec) +apiVersion: awp.agenticworkflowprotocol.org/v1alpha4 +kind: Policy +metadata: + name: conformance-policy +spec: + version: 1.0.0 + owner: + team: governance-team diff --git a/conformance/v1alpha4/invalid/8.2-require-approval-without-approval.yaml b/conformance/v1alpha4/invalid/8.2-require-approval-without-approval.yaml new file mode 100644 index 0000000..b60012d --- /dev/null +++ b/conformance/v1alpha4/invalid/8.2-require-approval-without-approval.yaml @@ -0,0 +1,17 @@ +# Conformance case 8.2-require-approval-without-approval +# Spec section 8.2: approval is REQUIRED for requireApproval. +# Expected: invalid (schema.required at /spec/rules/0) +apiVersion: awp.agenticworkflowprotocol.org/v1alpha4 +kind: Policy +metadata: + name: conformance-policy +spec: + version: 1.0.0 + owner: + team: governance-team + rules: + - id: deploy-needs-approval + when: + action: + equals: production.deploy + effect: requireApproval diff --git a/conformance/v1alpha4/invalid/8.2-rule-without-when.yaml b/conformance/v1alpha4/invalid/8.2-rule-without-when.yaml new file mode 100644 index 0000000..eb281ca --- /dev/null +++ b/conformance/v1alpha4/invalid/8.2-rule-without-when.yaml @@ -0,0 +1,17 @@ +# Conformance case 8.2-rule-without-when +# Spec section 8.2: A rule REQUIRES when. +# Expected: invalid (schema.required at /spec/rules/0) +apiVersion: awp.agenticworkflowprotocol.org/v1alpha4 +kind: Policy +metadata: + name: conformance-policy +spec: + version: 1.0.0 + owner: + team: governance-team + rules: + - id: deploy-needs-approval + effect: requireApproval + approval: + approvers: + - role: release-manager diff --git a/conformance/v1alpha4/invalid/8.3-empty-when.yaml b/conformance/v1alpha4/invalid/8.3-empty-when.yaml new file mode 100644 index 0000000..cc79919 --- /dev/null +++ b/conformance/v1alpha4/invalid/8.3-empty-when.yaml @@ -0,0 +1,18 @@ +# Conformance case 8.3-empty-when +# Spec section 8.3: A condition has at least one attribute. +# Expected: invalid (schema.minProperties at /spec/rules/0/when) +apiVersion: awp.agenticworkflowprotocol.org/v1alpha4 +kind: Policy +metadata: + name: conformance-policy +spec: + version: 1.0.0 + owner: + team: governance-team + rules: + - id: deploy-needs-approval + when: {} + effect: requireApproval + approval: + approvers: + - role: release-manager diff --git a/conformance/v1alpha4/invalid/8.3-in-not-a-list.yaml b/conformance/v1alpha4/invalid/8.3-in-not-a-list.yaml new file mode 100644 index 0000000..2b3e06e --- /dev/null +++ b/conformance/v1alpha4/invalid/8.3-in-not-a-list.yaml @@ -0,0 +1,20 @@ +# Conformance case 8.3-in-not-a-list +# Spec section 8.3: in and notIn take lists. +# Expected: invalid (schema.type at /spec/rules/0/when/destination.region/in) +apiVersion: awp.agenticworkflowprotocol.org/v1alpha4 +kind: Policy +metadata: + name: conformance-policy +spec: + version: 1.0.0 + owner: + team: governance-team + rules: + - id: deploy-needs-approval + when: + destination.region: + in: EU + effect: requireApproval + approval: + approvers: + - role: release-manager diff --git a/conformance/v1alpha4/invalid/8.3-invalid-actor-type.yaml b/conformance/v1alpha4/invalid/8.3-invalid-actor-type.yaml new file mode 100644 index 0000000..8543cb0 --- /dev/null +++ b/conformance/v1alpha4/invalid/8.3-invalid-actor-type.yaml @@ -0,0 +1,20 @@ +# Conformance case 8.3-invalid-actor-type +# Spec section 8.3: actor.type is agent, human, runtime or system. +# Expected: invalid (schema.enum at /spec/rules/0/when/actor.type/equals) +apiVersion: awp.agenticworkflowprotocol.org/v1alpha4 +kind: Policy +metadata: + name: conformance-policy +spec: + version: 1.0.0 + owner: + team: governance-team + rules: + - id: deploy-needs-approval + when: + actor.type: + equals: robot + effect: requireApproval + approval: + approvers: + - role: release-manager diff --git a/conformance/v1alpha4/invalid/8.3-invalid-classification-value.yaml b/conformance/v1alpha4/invalid/8.3-invalid-classification-value.yaml new file mode 100644 index 0000000..90b2354 --- /dev/null +++ b/conformance/v1alpha4/invalid/8.3-invalid-classification-value.yaml @@ -0,0 +1,20 @@ +# Conformance case 8.3-invalid-classification-value +# Spec section 8.3: Classification values in conditions are data classes. +# Expected: invalid (schema.enum at /spec/rules/0/when/data.classification/gte) +apiVersion: awp.agenticworkflowprotocol.org/v1alpha4 +kind: Policy +metadata: + name: conformance-policy +spec: + version: 1.0.0 + owner: + team: governance-team + rules: + - id: deploy-needs-approval + when: + data.classification: + gte: topsecret + effect: requireApproval + approval: + approvers: + - role: release-manager diff --git a/conformance/v1alpha4/invalid/8.3-ordering-operator-on-unordered-attribute.yaml b/conformance/v1alpha4/invalid/8.3-ordering-operator-on-unordered-attribute.yaml new file mode 100644 index 0000000..03e161c --- /dev/null +++ b/conformance/v1alpha4/invalid/8.3-ordering-operator-on-unordered-attribute.yaml @@ -0,0 +1,20 @@ +# Conformance case 8.3-ordering-operator-on-unordered-attribute +# Spec section 8.3: gt, gte, lt, lte are for data.classification and risk.level only. +# Expected: invalid (schema.additionalProperties at /spec/rules/0/when/action/gt) +apiVersion: awp.agenticworkflowprotocol.org/v1alpha4 +kind: Policy +metadata: + name: conformance-policy +spec: + version: 1.0.0 + owner: + team: governance-team + rules: + - id: deploy-needs-approval + when: + action: + gt: a.b + effect: requireApproval + approval: + approvers: + - role: release-manager diff --git a/conformance/v1alpha4/invalid/8.3-plain-condition-value.yaml b/conformance/v1alpha4/invalid/8.3-plain-condition-value.yaml new file mode 100644 index 0000000..f9b5e0c --- /dev/null +++ b/conformance/v1alpha4/invalid/8.3-plain-condition-value.yaml @@ -0,0 +1,31 @@ +# Conformance case 8.3-plain-condition-value +# Spec section 8.3: Each condition attribute maps to an operator object; the plain-value shorthand of v1alpha1 is removed. +# Expected: invalid (schema.type at /spec/rules/0/when/action) +# Profiles supported by the validator for this case: core +apiVersion: awp.agenticworkflowprotocol.org/v1alpha4 +kind: Policy +metadata: + name: conformance-policy +spec: + version: 1.0.0 + owner: + team: governance-team + rules: + - id: deploy-needs-approval + when: + action: production.deploy + effect: requireApproval + approval: + approvers: + - role: release-manager + - id: pd-stays-in-eu + when: + data.classification: + in: + - personal + - sensitive + destination.region: + notIn: + - EU + effect: deny + message: Personal data must stay in the EU. diff --git a/conformance/v1alpha4/invalid/8.3-unknown-attribute.yaml b/conformance/v1alpha4/invalid/8.3-unknown-attribute.yaml new file mode 100644 index 0000000..ff485e7 --- /dev/null +++ b/conformance/v1alpha4/invalid/8.3-unknown-attribute.yaml @@ -0,0 +1,20 @@ +# Conformance case 8.3-unknown-attribute +# Spec section 8.3: Only the defined attributes may be used in conditions. +# Expected: invalid (schema.additionalProperties at /spec/rules/0/when/user.name) +apiVersion: awp.agenticworkflowprotocol.org/v1alpha4 +kind: Policy +metadata: + name: conformance-policy +spec: + version: 1.0.0 + owner: + team: governance-team + rules: + - id: deploy-needs-approval + when: + user.name: + equals: x + effect: requireApproval + approval: + approvers: + - role: release-manager diff --git a/conformance/v1alpha4/invalid/9.1-digest-mismatch.yaml b/conformance/v1alpha4/invalid/9.1-digest-mismatch.yaml new file mode 100644 index 0000000..e10621c --- /dev/null +++ b/conformance/v1alpha4/invalid/9.1-digest-mismatch.yaml @@ -0,0 +1,66 @@ +# Conformance case 9.1-digest-mismatch +# Spec section 9.1: If spec.integrity.digest is present, runtimes verify it and reject on mismatch. +# Expected: invalid (digest.mismatch at /spec/integrity/digest) +# Validator option: verify metadata.integrity.digest +apiVersion: awp.agenticworkflowprotocol.org/v1alpha4 +kind: Workflow +metadata: + name: conformance-base +spec: + version: 1.0.0 + owner: + team: conformance-team + classification: internal + risk: + level: low + integrity: + digest: sha256:0000000000000000000000000000000000000000000000000000000000000000 + inputs: + - name: repo + type: string + required: true + budget: + maxCostUsd: 1 + maxSteps: 10 + maxDuration: 10m + resources: + maxRetries: 2 + maxConcurrency: 1 + secrets: + - name: TOOLS_TOKEN + source: secret-manager + scope: + - tools + mcpServers: + - name: tools + transport: streamable-http + url: https://mcp.example.com/tools + auth: + secretRef: TOOLS_TOKEN + actionGroups: + tools.read: + - tools.read_file + agents: + - id: worker + model: + provider: ollama + name: qwen3 + tools: + - type: mcp + server: tools + workflow: + - id: analyze + agent: worker + task: Analyze ${{ inputs.repo }}. + outputs: + - name: report + - id: apply + agent: worker + task: Apply ${{ steps.analyze.outputs.report }}. + dependsOn: + - analyze + permissions: + default: deny + tools: + tools.read: + allow: true diff --git a/conformance/v1alpha4/invalid/9.4-unpinned-command-image-security-profile.yaml b/conformance/v1alpha4/invalid/9.4-unpinned-command-image-security-profile.yaml new file mode 100644 index 0000000..9ead605 --- /dev/null +++ b/conformance/v1alpha4/invalid/9.4-unpinned-command-image-security-profile.yaml @@ -0,0 +1,69 @@ +# Conformance case 9.4-unpinned-command-image-security-profile +# Spec section 9.4: Under the security profile command step images MUST be pinned by digest. +# Expected: invalid (security.image-not-pinned at /spec/workflow/2/image) +apiVersion: awp.agenticworkflowprotocol.org/v1alpha4 +kind: Workflow +metadata: + name: conformance-base +spec: + version: 1.0.0 + owner: + team: conformance-team + classification: internal + risk: + level: low + inputs: + - name: repo + type: string + required: true + budget: + maxCostUsd: 1 + maxSteps: 10 + maxDuration: 10m + resources: + maxRetries: 2 + maxConcurrency: 1 + secrets: + - name: TOOLS_TOKEN + source: secret-manager + scope: + - tools + mcpServers: + - name: tools + transport: streamable-http + url: https://mcp.example.com/tools + auth: + secretRef: TOOLS_TOKEN + actionGroups: + tools.read: + - tools.read_file + agents: + - id: worker + model: + provider: ollama + name: qwen3 + tools: + - type: mcp + server: tools + workflow: + - id: analyze + agent: worker + task: Analyze ${{ inputs.repo }}. + outputs: + - name: report + - id: apply + agent: worker + task: Apply ${{ steps.analyze.outputs.report }}. + dependsOn: + - analyze + - id: cmd + type: command + command: "true" + image: node:20 + dependsOn: + - apply + permissions: + default: deny + tools: + tools.read: + allow: true diff --git a/conformance/v1alpha4/invalid/9.4-unpinned-mcp-image-security-profile.yaml b/conformance/v1alpha4/invalid/9.4-unpinned-mcp-image-security-profile.yaml new file mode 100644 index 0000000..034594e --- /dev/null +++ b/conformance/v1alpha4/invalid/9.4-unpinned-mcp-image-security-profile.yaml @@ -0,0 +1,66 @@ +# Conformance case 9.4-unpinned-mcp-image-security-profile +# Spec section 9.4: Under the security profile container images MUST be pinned by digest. +# Expected: invalid (security.image-not-pinned at /spec/mcpServers/1/image) +apiVersion: awp.agenticworkflowprotocol.org/v1alpha4 +kind: Workflow +metadata: + name: conformance-base +spec: + version: 1.0.0 + owner: + team: conformance-team + classification: internal + risk: + level: low + inputs: + - name: repo + type: string + required: true + budget: + maxCostUsd: 1 + maxSteps: 10 + maxDuration: 10m + resources: + maxRetries: 2 + maxConcurrency: 1 + secrets: + - name: TOOLS_TOKEN + source: secret-manager + scope: + - tools + mcpServers: + - name: tools + transport: streamable-http + url: https://mcp.example.com/tools + auth: + secretRef: TOOLS_TOKEN + - name: local + transport: stdio + image: registry.example.com/mcp/local:latest + actionGroups: + tools.read: + - tools.read_file + agents: + - id: worker + model: + provider: ollama + name: qwen3 + tools: + - type: mcp + server: tools + workflow: + - id: analyze + agent: worker + task: Analyze ${{ inputs.repo }}. + outputs: + - name: report + - id: apply + agent: worker + task: Apply ${{ steps.analyze.outputs.report }}. + dependsOn: + - analyze + permissions: + default: deny + tools: + tools.read: + allow: true diff --git a/conformance/v1alpha4/valid/10.2-audit-configuration.yaml b/conformance/v1alpha4/valid/10.2-audit-configuration.yaml new file mode 100644 index 0000000..c16cfbf --- /dev/null +++ b/conformance/v1alpha4/valid/10.2-audit-configuration.yaml @@ -0,0 +1,70 @@ +# Conformance case 10.2-audit-configuration +# Spec section 10.2: Audit configuration. +# Expected: valid +apiVersion: awp.agenticworkflowprotocol.org/v1alpha4 +kind: Workflow +metadata: + name: conformance-base +spec: + version: 1.0.0 + owner: + team: conformance-team + classification: internal + risk: + level: low + inputs: + - name: repo + type: string + required: true + budget: + maxCostUsd: 1 + maxSteps: 10 + maxDuration: 10m + resources: + maxRetries: 2 + maxConcurrency: 1 + secrets: + - name: TOOLS_TOKEN + source: secret-manager + scope: + - tools + mcpServers: + - name: tools + transport: streamable-http + url: https://mcp.example.com/tools + auth: + secretRef: TOOLS_TOKEN + actionGroups: + tools.read: + - tools.read_file + agents: + - id: worker + model: + provider: ollama + name: qwen3 + tools: + - type: mcp + server: tools + workflow: + - id: analyze + agent: worker + task: Analyze ${{ inputs.repo }}. + outputs: + - name: report + - id: apply + agent: worker + task: Apply ${{ steps.analyze.outputs.report }}. + dependsOn: + - analyze + permissions: + default: deny + tools: + tools.read: + allow: true + audit: + enabled: true + payload: metadata + integrity: + mode: hash-chain + retention: + duration: 7y diff --git a/conformance/v1alpha4/valid/10.8-workflow-run-with-status.yaml b/conformance/v1alpha4/valid/10.8-workflow-run-with-status.yaml new file mode 100644 index 0000000..211f702 --- /dev/null +++ b/conformance/v1alpha4/valid/10.8-workflow-run-with-status.yaml @@ -0,0 +1,50 @@ +# Conformance case 10.8-workflow-run-with-status +# Spec section 10.8: A WorkflowRun may use generateName; validators ignore status written by the runtime. +# Expected: valid +apiVersion: awp.agenticworkflowprotocol.org/v1alpha4 +kind: WorkflowRun +metadata: + generateName: conformance-base- + namespace: conformance + uid: 6f1c9b52-4c1e-4c59-9a43-0b1d2f7a9e10 + generation: 1 +spec: + workflowRef: + name: conformance-base + version: 1.0.0 + inputs: + repo: example-org/web-shop + environment: staging +status: + observedGeneration: 1 + executionId: awp-exec-01JD6Q8Z5K3M4N5P6Q7R8S9T0V + phase: running + actor: + type: human + id: alice@example.com + trigger: + type: manual + index: 0 + environment: staging + workflow: + name: conformance-base + version: 1.0.0 + digest: sha256:aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa + startedAt: 2026-11-19T08:00:00Z + steps: + - id: analyze + status: succeeded + attempts: 1 + outputs: + - name: report + digest: sha256:bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb + size: 2048 + - id: apply + status: running + attempts: 1 + conditions: + - type: Accepted + status: "True" + reason: Validated + message: "" + lastTransitionTime: 2026-11-19T08:00:00Z diff --git a/conformance/v1alpha4/valid/10.8-workflow-run.yaml b/conformance/v1alpha4/valid/10.8-workflow-run.yaml new file mode 100644 index 0000000..7f90221 --- /dev/null +++ b/conformance/v1alpha4/valid/10.8-workflow-run.yaml @@ -0,0 +1,15 @@ +# Conformance case 10.8-workflow-run +# Spec section 10.8: A WorkflowRun requests one execution of a workflow with inputs and an environment. +# Expected: valid +apiVersion: awp.agenticworkflowprotocol.org/v1alpha4 +kind: WorkflowRun +metadata: + name: conformance-base-20261119 + namespace: conformance +spec: + workflowRef: + name: conformance-base + version: 1.0.0 + inputs: + repo: example-org/web-shop + environment: staging diff --git a/conformance/v1alpha4/valid/3.1-json-serialization.json b/conformance/v1alpha4/valid/3.1-json-serialization.json new file mode 100644 index 0000000..7770ada --- /dev/null +++ b/conformance/v1alpha4/valid/3.1-json-serialization.json @@ -0,0 +1,60 @@ +apiVersion: awp.agenticworkflowprotocol.org/v1alpha4 +kind: Workflow +metadata: + name: conformance-base +spec: + version: 1.0.0 + owner: + team: conformance-team + classification: internal + risk: + level: low + inputs: + - name: repo + type: string + required: true + budget: + maxCostUsd: 1 + maxSteps: 10 + maxDuration: 10m + resources: + maxRetries: 2 + maxConcurrency: 1 + secrets: + - name: TOOLS_TOKEN + source: secret-manager + scope: + - tools + mcpServers: + - name: tools + transport: streamable-http + url: https://mcp.example.com/tools + auth: + secretRef: TOOLS_TOKEN + actionGroups: + tools.read: + - tools.read_file + agents: + - id: worker + model: + provider: ollama + name: qwen3 + tools: + - type: mcp + server: tools + workflow: + - id: analyze + agent: worker + task: Analyze ${{ inputs.repo }}. + outputs: + - name: report + - id: apply + agent: worker + task: Apply ${{ steps.analyze.outputs.report }}. + dependsOn: + - analyze + permissions: + default: deny + tools: + tools.read: + allow: true diff --git a/conformance/v1alpha4/valid/3.1-multi-document.yaml b/conformance/v1alpha4/valid/3.1-multi-document.yaml new file mode 100644 index 0000000..4e9982d --- /dev/null +++ b/conformance/v1alpha4/valid/3.1-multi-document.yaml @@ -0,0 +1,81 @@ +# Conformance case 3.1-multi-document +# Spec section 3.1: A file may contain several YAML documents; each is an independent manifest. +# Expected: valid +apiVersion: awp.agenticworkflowprotocol.org/v1alpha4 +kind: Workflow +metadata: + name: conformance-base +spec: + version: 1.0.0 + owner: + team: conformance-team + classification: internal + risk: + level: low + inputs: + - name: repo + type: string + required: true + budget: + maxCostUsd: 1 + maxSteps: 10 + maxDuration: 10m + resources: + maxRetries: 2 + maxConcurrency: 1 + secrets: + - name: TOOLS_TOKEN + source: secret-manager + scope: + - tools + mcpServers: + - name: tools + transport: streamable-http + url: https://mcp.example.com/tools + auth: + secretRef: TOOLS_TOKEN + actionGroups: + tools.read: + - tools.read_file + agents: + - id: worker + model: + provider: ollama + name: qwen3 + tools: + - type: mcp + server: tools + workflow: + - id: analyze + agent: worker + task: Analyze ${{ inputs.repo }}. + outputs: + - name: report + - id: apply + agent: worker + task: Apply ${{ steps.analyze.outputs.report }}. + dependsOn: + - analyze + permissions: + default: deny + tools: + tools.read: + allow: true +--- +apiVersion: awp.agenticworkflowprotocol.org/v1alpha4 +kind: Policy +metadata: + name: conformance-policy +spec: + version: 1.0.0 + owner: + team: governance-team + rules: + - id: deploy-needs-approval + when: + action: + equals: production.deploy + effect: requireApproval + approval: + approvers: + - role: release-manager diff --git a/conformance/v1alpha4/valid/3.2-minimal-workflow.yaml b/conformance/v1alpha4/valid/3.2-minimal-workflow.yaml new file mode 100644 index 0000000..8417604 --- /dev/null +++ b/conformance/v1alpha4/valid/3.2-minimal-workflow.yaml @@ -0,0 +1,21 @@ +# Conformance case 3.2-minimal-workflow +# Spec section 3.2: Minimal Workflow of the specification (hello); spec.classification is only REQUIRED under the governance profile. +# Expected: valid +# Profiles supported by the validator for this case: core +apiVersion: awp.agenticworkflowprotocol.org/v1alpha4 +kind: Workflow +metadata: + name: hello +spec: + version: 0.1.0 + owner: + team: platform-team + agents: + - id: assistant + model: + provider: ollama + name: qwen3 + workflow: + - id: greet + agent: assistant + task: Say hello. diff --git a/conformance/v1alpha4/valid/3.2-status-and-store-metadata.yaml b/conformance/v1alpha4/valid/3.2-status-and-store-metadata.yaml new file mode 100644 index 0000000..4696eb3 --- /dev/null +++ b/conformance/v1alpha4/valid/3.2-status-and-store-metadata.yaml @@ -0,0 +1,40 @@ +# Conformance case 3.2-status-and-store-metadata +# Spec section 3.2: status and metadata fields populated by an object store are accepted and ignored. +# Expected: valid +# Profiles supported by the validator for this case: core +apiVersion: awp.agenticworkflowprotocol.org/v1alpha4 +kind: Workflow +metadata: + name: hello + namespace: team-a + labels: + app.kubernetes.io/instance: agents + annotations: + example.com/last-applied: "{}" + uid: 2f1c7a52-6a0e-4d55-9b1e-0c2f4b9a7d11 + resourceVersion: "4711" + generation: 3 + creationTimestamp: 2026-11-18T10:00:00Z + finalizers: + - example.com/cleanup + managedFields: + - manager: example-controller + operation: Apply +spec: + version: 0.1.0 + owner: + team: platform-team + agents: + - id: assistant + model: + provider: ollama + name: qwen3 + workflow: + - id: greet + agent: assistant + task: Say hello. +status: + observedGeneration: 3 + conditions: + - type: Ready + status: "True" diff --git a/conformance/v1alpha4/valid/3.3-core-profile-only.yaml b/conformance/v1alpha4/valid/3.3-core-profile-only.yaml new file mode 100644 index 0000000..0aecb83 --- /dev/null +++ b/conformance/v1alpha4/valid/3.3-core-profile-only.yaml @@ -0,0 +1,24 @@ +# Conformance case 3.3-core-profile-only +# Spec section 3.3: A manifest using only core fields is valid for a validator that supports only the core profile. +# Expected: valid +# Profiles supported by the validator for this case: core +apiVersion: awp.agenticworkflowprotocol.org/v1alpha4 +kind: Workflow +metadata: + name: hello +spec: + version: 0.1.0 + owner: + team: platform-team + risk: + level: medium + agents: + - id: assistant + model: + provider: ollama + name: qwen3 + workflow: + - id: greet + agent: assistant + permissions: + default: deny diff --git a/conformance/v1alpha4/valid/3.3-extension-fields.yaml b/conformance/v1alpha4/valid/3.3-extension-fields.yaml new file mode 100644 index 0000000..b4dc4e0 --- /dev/null +++ b/conformance/v1alpha4/valid/3.3-extension-fields.yaml @@ -0,0 +1,75 @@ +# Conformance case 3.3-extension-fields +# Spec section 3.3: Fields starting with x- may appear in any object and are ignored. +# Expected: valid +apiVersion: awp.agenticworkflowprotocol.org/v1alpha4 +kind: Workflow +metadata: + name: conformance-base +spec: + version: 1.0.0 + owner: + team: conformance-team + classification: internal + risk: + level: low + inputs: + - name: repo + type: string + required: true + budget: + maxCostUsd: 1 + maxSteps: 10 + maxDuration: 10m + resources: + maxRetries: 2 + maxConcurrency: 1 + secrets: + - name: TOOLS_TOKEN + source: secret-manager + scope: + - tools + mcpServers: + - name: tools + transport: streamable-http + url: https://mcp.example.com/tools + auth: + secretRef: TOOLS_TOKEN + actionGroups: + tools.read: + - tools.read_file + agents: + - id: worker + model: + provider: ollama + name: qwen3 + extensions: + x-model: 1 + tools: + - type: mcp + server: tools + workflow: + - id: analyze + agent: worker + task: Analyze ${{ inputs.repo }}. + outputs: + - name: report + extensions: + x-step: ok + - id: apply + agent: worker + task: Apply ${{ steps.analyze.outputs.report }}. + dependsOn: + - analyze + permissions: + default: deny + tools: + tools.read: + allow: true + extensions: + x-perm: null + extensions: + x-top: 1 + x-meta: + any: + - thing + x-spec: true diff --git a/conformance/v1alpha4/valid/3.6-durations.yaml b/conformance/v1alpha4/valid/3.6-durations.yaml new file mode 100644 index 0000000..d19a66a --- /dev/null +++ b/conformance/v1alpha4/valid/3.6-durations.yaml @@ -0,0 +1,65 @@ +# Conformance case 3.6-durations +# Spec section 3.6: Durations use units ms, s, m, h, d, w, y and may be combined. +# Expected: valid +apiVersion: awp.agenticworkflowprotocol.org/v1alpha4 +kind: Workflow +metadata: + name: conformance-base +spec: + version: 1.0.0 + owner: + team: conformance-team + classification: internal + risk: + level: low + inputs: + - name: repo + type: string + required: true + budget: + maxCostUsd: 1 + maxSteps: 10 + maxDuration: 1h30m + resources: + maxRetries: 3 + maxConcurrency: 1 + secrets: + - name: TOOLS_TOKEN + source: secret-manager + scope: + - tools + mcpServers: + - name: tools + transport: streamable-http + url: https://mcp.example.com/tools + auth: + secretRef: TOOLS_TOKEN + actionGroups: + tools.read: + - tools.read_file + agents: + - id: worker + model: + provider: ollama + name: qwen3 + tools: + - type: mcp + server: tools + workflow: + - id: analyze + agent: worker + task: Analyze ${{ inputs.repo }}. + outputs: + - name: report + timeout: 24h + - id: apply + agent: worker + task: Apply ${{ steps.analyze.outputs.report }}. + dependsOn: + - analyze + timeout: 7y + permissions: + default: deny + tools: + tools.read: + allow: true diff --git a/conformance/v1alpha4/valid/3.9-expression-references.yaml b/conformance/v1alpha4/valid/3.9-expression-references.yaml new file mode 100644 index 0000000..97cb249 --- /dev/null +++ b/conformance/v1alpha4/valid/3.9-expression-references.yaml @@ -0,0 +1,63 @@ +# Conformance case 3.9-expression-references +# Spec section 3.9: The allowed references are inputs., steps..outputs., execution.id, execution.environment. +# Expected: valid +apiVersion: awp.agenticworkflowprotocol.org/v1alpha4 +kind: Workflow +metadata: + name: conformance-base +spec: + version: 1.0.0 + owner: + team: conformance-team + classification: internal + risk: + level: low + inputs: + - name: repo + type: string + required: true + budget: + maxCostUsd: 1 + maxSteps: 10 + maxDuration: 10m + resources: + maxRetries: 2 + maxConcurrency: 1 + secrets: + - name: TOOLS_TOKEN + source: secret-manager + scope: + - tools + mcpServers: + - name: tools + transport: streamable-http + url: https://mcp.example.com/tools + auth: + secretRef: TOOLS_TOKEN + actionGroups: + tools.read: + - tools.read_file + agents: + - id: worker + model: + provider: ollama + name: qwen3 + tools: + - type: mcp + server: tools + workflow: + - id: analyze + agent: worker + task: Analyze ${{ inputs.repo }}. + outputs: + - name: report + - id: apply + agent: worker + task: Run ${{ execution.id }} in ${{ execution.environment }} with ${{inputs.repo}}. + dependsOn: + - analyze + permissions: + default: deny + tools: + tools.read: + allow: true diff --git a/conformance/v1alpha4/valid/4-labels-and-annotations.yaml b/conformance/v1alpha4/valid/4-labels-and-annotations.yaml new file mode 100644 index 0000000..3f5849c --- /dev/null +++ b/conformance/v1alpha4/valid/4-labels-and-annotations.yaml @@ -0,0 +1,67 @@ +# Conformance case 4-labels-and-annotations +# Spec section 4: labels and annotations are string maps with Kubernetes key syntax. +# Expected: valid +# Profiles supported by the validator for this case: core, mcp +apiVersion: awp.agenticworkflowprotocol.org/v1alpha4 +kind: Workflow +metadata: + name: conformance-base + labels: + team.example/tier: gold + annotations: + note: x +spec: + version: 1.0.0 + owner: + team: platform-team + risk: + level: low + inputs: + - name: repo + type: string + required: true + budget: + maxCostUsd: 1 + maxSteps: 10 + maxDuration: 10m + resources: + maxRetries: 2 + maxConcurrency: 1 + secrets: + - name: TOOLS_TOKEN + source: secret-manager + scope: + - tools + mcpServers: + - name: tools + transport: streamable-http + url: https://mcp.example.com/tools + auth: + secretRef: TOOLS_TOKEN + actionGroups: + tools.read: + - tools.read_file + agents: + - id: worker + model: + provider: ollama + name: qwen3 + tools: + - type: mcp + server: tools + workflow: + - id: analyze + agent: worker + task: Analyze ${{ inputs.repo }}. + outputs: + - name: report + - id: apply + agent: worker + task: Apply ${{ steps.analyze.outputs.report }}. + dependsOn: + - analyze + permissions: + default: deny + tools: + tools.read: + allow: true diff --git a/conformance/v1alpha4/valid/5.2-schedule-concurrency-and-deadline.yaml b/conformance/v1alpha4/valid/5.2-schedule-concurrency-and-deadline.yaml new file mode 100644 index 0000000..1b7ac2c --- /dev/null +++ b/conformance/v1alpha4/valid/5.2-schedule-concurrency-and-deadline.yaml @@ -0,0 +1,75 @@ +# Conformance case 5.2-schedule-concurrency-and-deadline +# Spec section 5.2: A schedule trigger may set concurrencyPolicy and startingDeadline. +# Expected: valid +apiVersion: awp.agenticworkflowprotocol.org/v1alpha4 +kind: Workflow +metadata: + name: conformance-base +spec: + version: 1.0.0 + owner: + team: conformance-team + classification: internal + risk: + level: low + inputs: + - name: repo + type: string + default: example-org/web-shop + budget: + maxCostUsd: 1 + maxSteps: 10 + maxDuration: 10m + resources: + maxRetries: 2 + maxConcurrency: 1 + secrets: + - name: TOOLS_TOKEN + source: secret-manager + scope: + - tools + mcpServers: + - name: tools + transport: streamable-http + url: https://mcp.example.com/tools + auth: + secretRef: TOOLS_TOKEN + actionGroups: + tools.read: + - tools.read_file + agents: + - id: worker + model: + provider: ollama + name: qwen3 + tools: + - type: mcp + server: tools + workflow: + - id: analyze + agent: worker + task: Analyze ${{ inputs.repo }}. + outputs: + - name: report + - id: apply + agent: worker + task: Apply ${{ steps.analyze.outputs.report }}. + dependsOn: + - analyze + permissions: + default: deny + tools: + tools.read: + allow: true + triggers: + - type: manual + - type: schedule + cron: 0 6 * * 1-5 + timezone: Europe/Berlin + concurrencyPolicy: replace + startingDeadline: 15m + - type: event + source: git.example.com + eventType: pull_request.opened + filter: + repository: example-org/web-shop diff --git a/conformance/v1alpha4/valid/5.2-triggers.yaml b/conformance/v1alpha4/valid/5.2-triggers.yaml new file mode 100644 index 0000000..9eecc6d --- /dev/null +++ b/conformance/v1alpha4/valid/5.2-triggers.yaml @@ -0,0 +1,73 @@ +# Conformance case 5.2-triggers +# Spec section 5.2: manual, schedule and event triggers. +# Expected: valid +apiVersion: awp.agenticworkflowprotocol.org/v1alpha4 +kind: Workflow +metadata: + name: conformance-base +spec: + version: 1.0.0 + owner: + team: conformance-team + classification: internal + risk: + level: low + inputs: + - name: repo + type: string + default: example-org/web-shop + budget: + maxCostUsd: 1 + maxSteps: 10 + maxDuration: 10m + resources: + maxRetries: 2 + maxConcurrency: 1 + secrets: + - name: TOOLS_TOKEN + source: secret-manager + scope: + - tools + mcpServers: + - name: tools + transport: streamable-http + url: https://mcp.example.com/tools + auth: + secretRef: TOOLS_TOKEN + actionGroups: + tools.read: + - tools.read_file + agents: + - id: worker + model: + provider: ollama + name: qwen3 + tools: + - type: mcp + server: tools + workflow: + - id: analyze + agent: worker + task: Analyze ${{ inputs.repo }}. + outputs: + - name: report + - id: apply + agent: worker + task: Apply ${{ steps.analyze.outputs.report }}. + dependsOn: + - analyze + permissions: + default: deny + tools: + tools.read: + allow: true + triggers: + - type: manual + - type: schedule + cron: 0 6 * * 1-5 + timezone: Europe/Berlin + - type: event + source: git.example.com + eventType: pull_request.opened + filter: + repository: example-org/web-shop diff --git a/conformance/v1alpha4/valid/5.3-inputs.yaml b/conformance/v1alpha4/valid/5.3-inputs.yaml new file mode 100644 index 0000000..38da30e --- /dev/null +++ b/conformance/v1alpha4/valid/5.3-inputs.yaml @@ -0,0 +1,86 @@ +# Conformance case 5.3-inputs +# Spec section 5.3: Input declarations with all types; default matches type. +# Expected: valid +apiVersion: awp.agenticworkflowprotocol.org/v1alpha4 +kind: Workflow +metadata: + name: conformance-base +spec: + version: 1.0.0 + owner: + team: conformance-team + classification: internal + risk: + level: low + inputs: + - name: repo + type: string + required: true + pattern: ^[a-z/-]+$ + - name: limit + type: integer + default: 5 + - name: ratio + type: number + default: 0.5 + - name: dry + type: boolean + default: true + - name: opts + type: object + default: + a: 1 + - name: tags + type: array + default: + - a + enum: + - - a + - name: doc + type: artifact + classification: confidential + budget: + maxCostUsd: 1 + maxSteps: 10 + maxDuration: 10m + resources: + maxRetries: 2 + maxConcurrency: 1 + secrets: + - name: TOOLS_TOKEN + source: secret-manager + scope: + - tools + mcpServers: + - name: tools + transport: streamable-http + url: https://mcp.example.com/tools + auth: + secretRef: TOOLS_TOKEN + actionGroups: + tools.read: + - tools.read_file + agents: + - id: worker + model: + provider: ollama + name: qwen3 + tools: + - type: mcp + server: tools + workflow: + - id: analyze + agent: worker + task: Analyze ${{ inputs.repo }}. + outputs: + - name: report + - id: apply + agent: worker + task: Apply ${{ steps.analyze.outputs.report }}. + dependsOn: + - analyze + permissions: + default: deny + tools: + tools.read: + allow: true diff --git a/conformance/v1alpha4/valid/5.4.2-agent-reference.yaml b/conformance/v1alpha4/valid/5.4.2-agent-reference.yaml new file mode 100644 index 0000000..391161b --- /dev/null +++ b/conformance/v1alpha4/valid/5.4.2-agent-reference.yaml @@ -0,0 +1,74 @@ +# Conformance case 5.4.2-agent-reference +# Spec section 5.4.2: Agent reference with exact version and digest. +# Expected: valid +apiVersion: awp.agenticworkflowprotocol.org/v1alpha4 +kind: Workflow +metadata: + name: conformance-base +spec: + version: 1.0.0 + owner: + team: conformance-team + classification: internal + risk: + level: low + inputs: + - name: repo + type: string + required: true + budget: + maxCostUsd: 1 + maxSteps: 10 + maxDuration: 10m + resources: + maxRetries: 2 + maxConcurrency: 1 + secrets: + - name: TOOLS_TOKEN + source: secret-manager + scope: + - tools + mcpServers: + - name: tools + transport: streamable-http + url: https://mcp.example.com/tools + auth: + secretRef: TOOLS_TOKEN + actionGroups: + tools.read: + - tools.read_file + agents: + - id: worker + model: + provider: ollama + name: qwen3 + tools: + - type: mcp + server: tools + - id: extractor + ref: + name: invoice-extractor + version: 1.0.0 + digest: sha256:aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa + permissions: + default: deny + budget: + maxSteps: 3 + workflow: + - id: analyze + agent: worker + task: Analyze ${{ inputs.repo }}. + outputs: + - name: report + - id: apply + agent: worker + task: Apply ${{ steps.analyze.outputs.report }}. + dependsOn: + - analyze + - id: extract + agent: extractor + permissions: + default: deny + tools: + tools.read: + allow: true diff --git a/conformance/v1alpha4/valid/5.4.4-remote-agent.yaml b/conformance/v1alpha4/valid/5.4.4-remote-agent.yaml new file mode 100644 index 0000000..f3daab8 --- /dev/null +++ b/conformance/v1alpha4/valid/5.4.4-remote-agent.yaml @@ -0,0 +1,79 @@ +# Conformance case 5.4.4-remote-agent +# Spec section 5.4.4: Remote A2A agent with HTTPS endpoint and a scoped secretRef. +# Expected: valid +apiVersion: awp.agenticworkflowprotocol.org/v1alpha4 +kind: Workflow +metadata: + name: conformance-base +spec: + version: 1.0.0 + owner: + team: conformance-team + classification: internal + risk: + level: low + inputs: + - name: repo + type: string + required: true + budget: + maxCostUsd: 1 + maxSteps: 10 + maxDuration: 10m + resources: + maxRetries: 2 + maxConcurrency: 1 + secrets: + - name: TOOLS_TOKEN + source: secret-manager + scope: + - tools + - name: REVIEW_TOKEN + source: vault + scope: + - reviewer + mcpServers: + - name: tools + transport: streamable-http + url: https://mcp.example.com/tools + auth: + secretRef: TOOLS_TOKEN + actionGroups: + tools.read: + - tools.read_file + agents: + - id: worker + model: + provider: ollama + name: qwen3 + tools: + - type: mcp + server: tools + - id: reviewer + protocol: a2a + endpoint: https://agents.example.com/a2a/review + agentCard: + url: https://agents.example.com/card.json + digest: sha256:bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb + auth: + secretRef: REVIEW_TOKEN + workflow: + - id: analyze + agent: worker + task: Analyze ${{ inputs.repo }}. + outputs: + - name: report + - id: apply + agent: worker + task: Apply ${{ steps.analyze.outputs.report }}. + dependsOn: + - analyze + - id: review + agent: reviewer + dependsOn: + - apply + permissions: + default: deny + tools: + tools.read: + allow: true diff --git a/conformance/v1alpha4/valid/5.5.4-action-groups.yaml b/conformance/v1alpha4/valid/5.5.4-action-groups.yaml new file mode 100644 index 0000000..6ac8a15 --- /dev/null +++ b/conformance/v1alpha4/valid/5.5.4-action-groups.yaml @@ -0,0 +1,67 @@ +# Conformance case 5.5.4-action-groups +# Spec section 5.5.4: Groups map concrete actions to well-known actions; groups hold only concrete actions. +# Expected: valid +apiVersion: awp.agenticworkflowprotocol.org/v1alpha4 +kind: Workflow +metadata: + name: conformance-base +spec: + version: 1.0.0 + owner: + team: conformance-team + classification: internal + risk: + level: low + inputs: + - name: repo + type: string + required: true + budget: + maxCostUsd: 1 + maxSteps: 10 + maxDuration: 10m + resources: + maxRetries: 2 + maxConcurrency: 1 + secrets: + - name: TOOLS_TOKEN + source: secret-manager + scope: + - tools + mcpServers: + - name: tools + transport: streamable-http + url: https://mcp.example.com/tools + auth: + secretRef: TOOLS_TOKEN + actionGroups: + tools.read: + - tools.read_file + git.merge: + - tools.merge_pull_request + production.deploy: + - tools.deploy + agents: + - id: worker + model: + provider: ollama + name: qwen3 + tools: + - type: mcp + server: tools + workflow: + - id: analyze + agent: worker + task: Analyze ${{ inputs.repo }}. + outputs: + - name: report + - id: apply + agent: worker + task: Apply ${{ steps.analyze.outputs.report }}. + dependsOn: + - analyze + permissions: + default: deny + tools: + tools.read: + allow: true diff --git a/conformance/v1alpha4/valid/5.6.1-when-exists-and-in.yaml b/conformance/v1alpha4/valid/5.6.1-when-exists-and-in.yaml new file mode 100644 index 0000000..e1de678 --- /dev/null +++ b/conformance/v1alpha4/valid/5.6.1-when-exists-and-in.yaml @@ -0,0 +1,65 @@ +# Conformance case 5.6.1-when-exists-and-in +# Spec section 3.10: Conditions combine exists(), in with literal lists, comparisons and boolean operators. +# Expected: valid +apiVersion: awp.agenticworkflowprotocol.org/v1alpha4 +kind: Workflow +metadata: + name: conformance-base +spec: + version: 1.0.0 + owner: + team: conformance-team + classification: internal + risk: + level: low + inputs: + - name: repo + type: string + required: true + budget: + maxCostUsd: 1 + maxSteps: 10 + maxDuration: 10m + resources: + maxRetries: 2 + maxConcurrency: 1 + secrets: + - name: TOOLS_TOKEN + source: secret-manager + scope: + - tools + mcpServers: + - name: tools + transport: streamable-http + url: https://mcp.example.com/tools + auth: + secretRef: TOOLS_TOKEN + actionGroups: + tools.read: + - tools.read_file + agents: + - id: worker + model: + provider: ollama + name: qwen3 + tools: + - type: mcp + server: tools + workflow: + - id: analyze + agent: worker + task: Analyze ${{ inputs.repo }}. + outputs: + - name: report + - name: level + - id: comment + agent: worker + dependsOn: + - analyze + when: 'exists(steps.analyze.outputs.level) && (steps.analyze.outputs.level in ["high", "critical"] || inputs.repo == "example-org/web-shop")' + task: Comment on ${{ inputs.repo }}. + permissions: + default: deny + tools: + tools.read: + allow: true diff --git a/conformance/v1alpha4/valid/5.6.1-when-json-path-into-output.yaml b/conformance/v1alpha4/valid/5.6.1-when-json-path-into-output.yaml new file mode 100644 index 0000000..da0ff54 --- /dev/null +++ b/conformance/v1alpha4/valid/5.6.1-when-json-path-into-output.yaml @@ -0,0 +1,70 @@ +# Conformance case 5.6.1-when-json-path-into-output +# Spec section 3.10: Path segments after the output name select into the output parsed as JSON; a transitive dependency may be read. +# Expected: valid +apiVersion: awp.agenticworkflowprotocol.org/v1alpha4 +kind: Workflow +metadata: + name: conformance-base +spec: + version: 1.0.0 + owner: + team: conformance-team + classification: internal + risk: + level: low + inputs: + - name: repo + type: string + required: true + budget: + maxCostUsd: 1 + maxSteps: 10 + maxDuration: 10m + resources: + maxRetries: 2 + maxConcurrency: 1 + secrets: + - name: TOOLS_TOKEN + source: secret-manager + scope: + - tools + mcpServers: + - name: tools + transport: streamable-http + url: https://mcp.example.com/tools + auth: + secretRef: TOOLS_TOKEN + actionGroups: + tools.read: + - tools.read_file + agents: + - id: worker + model: + provider: ollama + name: qwen3 + tools: + - type: mcp + server: tools + workflow: + - id: analyze + agent: worker + task: Analyze ${{ inputs.repo }}. + outputs: + - name: report + - name: level + - id: plan + agent: worker + dependsOn: + - analyze + task: Plan ${{ steps.analyze.outputs.report }}. + - id: apply + agent: worker + dependsOn: + - plan + when: steps.analyze.outputs.report.findings[0].severity >= 7 && steps.analyze.outputs.report.affected == true + task: Apply the plan. + permissions: + default: deny + tools: + tools.read: + allow: true diff --git a/conformance/v1alpha4/valid/5.6.1-when-on-every-step-type.yaml b/conformance/v1alpha4/valid/5.6.1-when-on-every-step-type.yaml new file mode 100644 index 0000000..40a46fb --- /dev/null +++ b/conformance/v1alpha4/valid/5.6.1-when-on-every-step-type.yaml @@ -0,0 +1,96 @@ +# Conformance case 5.6.1-when-on-every-step-type +# Spec section 5.6.1: when is allowed on agent, command, approval, input and workflow steps. +# Expected: valid +apiVersion: awp.agenticworkflowprotocol.org/v1alpha4 +kind: Workflow +metadata: + name: conformance-base +spec: + version: 1.0.0 + owner: + team: conformance-team + classification: internal + risk: + level: low + inputs: + - name: repo + type: string + required: true + budget: + maxCostUsd: 1 + maxSteps: 10 + maxDuration: 10m + resources: + maxRetries: 2 + maxConcurrency: 1 + secrets: + - name: TOOLS_TOKEN + source: secret-manager + scope: + - tools + mcpServers: + - name: tools + transport: streamable-http + url: https://mcp.example.com/tools + auth: + secretRef: TOOLS_TOKEN + actionGroups: + tools.read: + - tools.read_file + agents: + - id: worker + model: + provider: ollama + name: qwen3 + tools: + - type: mcp + server: tools + workflow: + - id: analyze + agent: worker + task: Analyze ${{ inputs.repo }}. + outputs: + - name: report + - name: level + - id: apply + agent: worker + dependsOn: + - analyze + when: steps.analyze.outputs.level == "high" + task: Apply ${{ steps.analyze.outputs.report }}. + - id: count + type: command + dependsOn: + - analyze + when: steps.analyze.outputs.level != "low" + command: ./count.sh + - id: release + type: approval + dependsOn: + - apply + when: execution.environment == "production" + approval: + approvers: + - role: release-manager + - id: ask + type: input + dependsOn: + - analyze + when: '!(steps.analyze.outputs.level == "low")' + input: + message: Apply the fix? + answerers: + - role: release-manager + timeout: 4h + - id: fix + type: workflow + dependsOn: + - analyze + when: steps.analyze.outputs.level == "critical" + workflow: + ref: cve-fixer + permissions: + default: deny + tools: + tools.read: + allow: true diff --git a/conformance/v1alpha4/valid/5.6.2-command-step-env.yaml b/conformance/v1alpha4/valid/5.6.2-command-step-env.yaml new file mode 100644 index 0000000..ec75a6f --- /dev/null +++ b/conformance/v1alpha4/valid/5.6.2-command-step-env.yaml @@ -0,0 +1,73 @@ +# Conformance case 5.6.2-command-step-env +# Spec section 5.6.2: Command steps receive values through env; the command text has no expressions. +# Expected: valid +apiVersion: awp.agenticworkflowprotocol.org/v1alpha4 +kind: Workflow +metadata: + name: conformance-base +spec: + version: 1.0.0 + owner: + team: conformance-team + classification: internal + risk: + level: low + inputs: + - name: repo + type: string + required: true + budget: + maxCostUsd: 1 + maxSteps: 10 + maxDuration: 10m + resources: + maxRetries: 2 + maxConcurrency: 1 + secrets: + - name: TOOLS_TOKEN + source: secret-manager + scope: + - tools + mcpServers: + - name: tools + transport: streamable-http + url: https://mcp.example.com/tools + auth: + secretRef: TOOLS_TOKEN + actionGroups: + tools.read: + - tools.read_file + agents: + - id: worker + model: + provider: ollama + name: qwen3 + tools: + - type: mcp + server: tools + workflow: + - id: analyze + agent: worker + task: Analyze ${{ inputs.repo }}. + outputs: + - name: report + - id: apply + agent: worker + task: Apply ${{ steps.analyze.outputs.report }}. + dependsOn: + - analyze + - id: scan + type: command + command: ./scan.sh "$REPO" + image: registry.example.com/build/node@sha256:cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc + env: + REPO: ${{ inputs.repo }} + workingDir: /workspace + dependsOn: + - apply + timeout: 5m + permissions: + default: deny + tools: + tools.read: + allow: true diff --git a/conformance/v1alpha4/valid/5.6.3-transitive-step-reference.yaml b/conformance/v1alpha4/valid/5.6.3-transitive-step-reference.yaml new file mode 100644 index 0000000..6383c47 --- /dev/null +++ b/conformance/v1alpha4/valid/5.6.3-transitive-step-reference.yaml @@ -0,0 +1,68 @@ +# Conformance case 5.6.3-transitive-step-reference +# Spec section 5.6.3: A step may reference outputs of steps it depends on transitively. +# Expected: valid +apiVersion: awp.agenticworkflowprotocol.org/v1alpha4 +kind: Workflow +metadata: + name: conformance-base +spec: + version: 1.0.0 + owner: + team: conformance-team + classification: internal + risk: + level: low + inputs: + - name: repo + type: string + required: true + budget: + maxCostUsd: 1 + maxSteps: 10 + maxDuration: 10m + resources: + maxRetries: 2 + maxConcurrency: 1 + secrets: + - name: TOOLS_TOKEN + source: secret-manager + scope: + - tools + mcpServers: + - name: tools + transport: streamable-http + url: https://mcp.example.com/tools + auth: + secretRef: TOOLS_TOKEN + actionGroups: + tools.read: + - tools.read_file + agents: + - id: worker + model: + provider: ollama + name: qwen3 + tools: + - type: mcp + server: tools + workflow: + - id: analyze + agent: worker + task: Analyze ${{ inputs.repo }}. + outputs: + - name: report + - id: apply + agent: worker + task: Apply ${{ steps.analyze.outputs.report }}. + dependsOn: + - analyze + - id: third + agent: worker + task: ${{ steps.analyze.outputs.report }} + dependsOn: + - apply + permissions: + default: deny + tools: + tools.read: + allow: true diff --git a/conformance/v1alpha4/valid/5.6.4-command-step-outputs.yaml b/conformance/v1alpha4/valid/5.6.4-command-step-outputs.yaml new file mode 100644 index 0000000..ee4e1e2 --- /dev/null +++ b/conformance/v1alpha4/valid/5.6.4-command-step-outputs.yaml @@ -0,0 +1,83 @@ +# Conformance case 5.6.4-command-step-outputs +# Spec section 5.6.4: A command step declares outputs whose names are valid file names in $AWP_OUTPUTS. +# Expected: valid +apiVersion: awp.agenticworkflowprotocol.org/v1alpha4 +kind: Workflow +metadata: + name: conformance-base +spec: + version: 1.0.0 + owner: + team: conformance-team + classification: internal + risk: + level: low + inputs: + - name: repo + type: string + default: example-org/web-shop + budget: + maxCostUsd: 1 + maxSteps: 10 + maxDuration: 10m + resources: + maxRetries: 2 + maxConcurrency: 1 + secrets: + - name: TOOLS_TOKEN + source: secret-manager + scope: + - tools + mcpServers: + - name: tools + transport: streamable-http + url: https://mcp.example.com/tools + auth: + secretRef: TOOLS_TOKEN + actionGroups: + tools.read: + - tools.read_file + agents: + - id: worker + model: + provider: ollama + name: qwen3 + tools: + - type: mcp + server: tools + workflow: + - id: analyze + agent: worker + task: Analyze ${{ inputs.repo }}. + outputs: + - name: report + - id: apply + agent: worker + task: Apply ${{ steps.analyze.outputs.report }}. + dependsOn: + - analyze + - id: count + type: command + command: ./count.sh + env: + REPORT: ${{ steps.analyze.outputs.report }} + dependsOn: + - analyze + outputs: + - name: newCount + - name: summary_text + permissions: + default: deny + tools: + tools.read: + allow: true + triggers: + - type: manual + - type: schedule + cron: 0 6 * * 1-5 + timezone: Europe/Berlin + - type: event + source: git.example.com + eventType: pull_request.opened + filter: + repository: example-org/web-shop diff --git a/conformance/v1alpha4/valid/5.6.5-for-each.yaml b/conformance/v1alpha4/valid/5.6.5-for-each.yaml new file mode 100644 index 0000000..33354cb --- /dev/null +++ b/conformance/v1alpha4/valid/5.6.5-for-each.yaml @@ -0,0 +1,82 @@ +# Conformance case 5.6.5-for-each +# Spec section 5.6.5: An agent or command step MAY iterate over an array input or a step output with forEach. +# Expected: valid +apiVersion: awp.agenticworkflowprotocol.org/v1alpha4 +kind: Workflow +metadata: + name: conformance-base +spec: + version: 1.0.0 + owner: + team: conformance-team + classification: internal + risk: + level: low + inputs: + - name: repo + type: string + required: true + - name: images + type: array + required: true + budget: + maxCostUsd: 1 + maxSteps: 10 + maxDuration: 10m + resources: + maxRetries: 2 + maxConcurrency: 2 + secrets: + - name: TOOLS_TOKEN + source: secret-manager + scope: + - tools + mcpServers: + - name: tools + transport: streamable-http + url: https://mcp.example.com/tools + auth: + secretRef: TOOLS_TOKEN + actionGroups: + tools.read: + - tools.read_file + agents: + - id: worker + model: + provider: ollama + name: qwen3 + tools: + - type: mcp + server: tools + workflow: + - id: list + agent: worker + task: List the files of ${{ inputs.repo }}. + outputs: + - name: files + - id: review + agent: worker + task: Review file ${{ forEach.index }} of the list, ${{ forEach.item }}. + dependsOn: + - list + forEach: + items: ${{ steps.list.outputs.files }} + maxItems: 20 + concurrency: 2 + retries: 1 + timeout: 5m + outputs: + - name: finding + - id: scan + type: command + command: ./scan.sh "$IMAGE" + env: + IMAGE: ${{ forEach.item.name }}:${{ forEach.item.tag }} + forEach: + items: ${{ inputs.images }} + maxItems: 5 + permissions: + default: deny + tools: + tools.read: + allow: true diff --git a/conformance/v1alpha4/valid/5.6.6-workflow-step-no-wait.yaml b/conformance/v1alpha4/valid/5.6.6-workflow-step-no-wait.yaml new file mode 100644 index 0000000..67c8e6a --- /dev/null +++ b/conformance/v1alpha4/valid/5.6.6-workflow-step-no-wait.yaml @@ -0,0 +1,70 @@ +# Conformance case 5.6.6-workflow-step-no-wait +# Spec section 5.6.6: With wait: false the workflow step only starts the child execution. +# Expected: valid +apiVersion: awp.agenticworkflowprotocol.org/v1alpha4 +kind: Workflow +metadata: + name: conformance-base +spec: + version: 1.0.0 + owner: + team: conformance-team + classification: internal + risk: + level: low + inputs: + - name: repo + type: string + required: true + budget: + maxCostUsd: 1 + maxSteps: 10 + maxDuration: 10m + resources: + maxRetries: 2 + maxConcurrency: 1 + secrets: + - name: TOOLS_TOKEN + source: secret-manager + scope: + - tools + mcpServers: + - name: tools + transport: streamable-http + url: https://mcp.example.com/tools + auth: + secretRef: TOOLS_TOKEN + actionGroups: + tools.read: + - tools.read_file + agents: + - id: worker + model: + provider: ollama + name: qwen3 + tools: + - type: mcp + server: tools + workflow: + - id: analyze + agent: worker + task: Analyze ${{ inputs.repo }}. + outputs: + - name: report + - name: level + - id: start-scan + type: workflow + dependsOn: + - analyze + timeout: 5m + retries: 1 + workflow: + ref: nightly-scan + wait: false + outputs: + - name: executionId + permissions: + default: deny + tools: + tools.read: + allow: true diff --git a/conformance/v1alpha4/valid/5.6.6-workflow-step-wait.yaml b/conformance/v1alpha4/valid/5.6.6-workflow-step-wait.yaml new file mode 100644 index 0000000..a238605 --- /dev/null +++ b/conformance/v1alpha4/valid/5.6.6-workflow-step-wait.yaml @@ -0,0 +1,79 @@ +# Conformance case 5.6.6-workflow-step-wait +# Spec section 5.6.6: A workflow step starts a child workflow with expression-enabled inputs, waits for it and provides executionId and status. +# Expected: valid +apiVersion: awp.agenticworkflowprotocol.org/v1alpha4 +kind: Workflow +metadata: + name: conformance-base +spec: + version: 1.0.0 + owner: + team: conformance-team + classification: internal + risk: + level: low + inputs: + - name: repo + type: string + required: true + budget: + maxCostUsd: 1 + maxSteps: 10 + maxDuration: 10m + resources: + maxRetries: 2 + maxConcurrency: 1 + secrets: + - name: TOOLS_TOKEN + source: secret-manager + scope: + - tools + mcpServers: + - name: tools + transport: streamable-http + url: https://mcp.example.com/tools + auth: + secretRef: TOOLS_TOKEN + actionGroups: + tools.read: + - tools.read_file + agents: + - id: worker + model: + provider: ollama + name: qwen3 + tools: + - type: mcp + server: tools + workflow: + - id: analyze + agent: worker + task: Analyze ${{ inputs.repo }}. + outputs: + - name: report + - name: level + - id: fix + type: workflow + dependsOn: + - analyze + workflow: + ref: cve-fixer + version: ^0.5.0 + inputs: + repoUrl: ${{ inputs.repo }} + report: Fix ${{ steps.analyze.outputs.report }} in ${{ execution.environment }}. + wait: true + outputs: + - name: executionId + - name: status + - id: notify + agent: worker + dependsOn: + - fix + when: steps.fix.outputs.status == "succeeded" + task: Report child execution ${{ steps.fix.outputs.executionId }}. + permissions: + default: deny + tools: + tools.read: + allow: true diff --git a/conformance/v1alpha4/valid/5.7-nested-budgets.yaml b/conformance/v1alpha4/valid/5.7-nested-budgets.yaml new file mode 100644 index 0000000..d98fd63 --- /dev/null +++ b/conformance/v1alpha4/valid/5.7-nested-budgets.yaml @@ -0,0 +1,70 @@ +# Conformance case 5.7-nested-budgets +# Spec section 5.7: Budgets on workflow, agent and step; retries do not exceed maxRetries. +# Expected: valid +apiVersion: awp.agenticworkflowprotocol.org/v1alpha4 +kind: Workflow +metadata: + name: conformance-base +spec: + version: 1.0.0 + owner: + team: conformance-team + classification: internal + risk: + level: low + inputs: + - name: repo + type: string + required: true + budget: + maxCostUsd: 1 + maxSteps: 10 + maxDuration: 10m + resources: + maxRetries: 2 + maxConcurrency: 1 + secrets: + - name: TOOLS_TOKEN + source: secret-manager + scope: + - tools + mcpServers: + - name: tools + transport: streamable-http + url: https://mcp.example.com/tools + auth: + secretRef: TOOLS_TOKEN + actionGroups: + tools.read: + - tools.read_file + agents: + - id: worker + model: + provider: ollama + name: qwen3 + tools: + - type: mcp + server: tools + budget: + maxCostUsd: 0.5 + workflow: + - id: analyze + agent: worker + task: Analyze ${{ inputs.repo }}. + outputs: + - name: report + budget: + maxSteps: 3 + resources: + maxTokens: 1000 + retries: 2 + - id: apply + agent: worker + task: Apply ${{ steps.analyze.outputs.report }}. + dependsOn: + - analyze + permissions: + default: deny + tools: + tools.read: + allow: true diff --git a/conformance/v1alpha4/valid/5.8-agent-human-input.yaml b/conformance/v1alpha4/valid/5.8-agent-human-input.yaml new file mode 100644 index 0000000..3fba1f0 --- /dev/null +++ b/conformance/v1alpha4/valid/5.8-agent-human-input.yaml @@ -0,0 +1,79 @@ +# Conformance case 5.8-agent-human-input +# Spec section 5.8: An agent with humanInput may ask a person during its step. +# Expected: valid +apiVersion: awp.agenticworkflowprotocol.org/v1alpha4 +kind: Workflow +metadata: + name: conformance-base +spec: + version: 1.0.0 + owner: + team: conformance-team + classification: internal + risk: + level: low + inputs: + - name: repo + type: string + default: example-org/web-shop + budget: + maxCostUsd: 1 + maxSteps: 10 + maxDuration: 10m + resources: + maxRetries: 2 + maxConcurrency: 1 + secrets: + - name: TOOLS_TOKEN + source: secret-manager + scope: + - tools + mcpServers: + - name: tools + transport: streamable-http + url: https://mcp.example.com/tools + auth: + secretRef: TOOLS_TOKEN + actionGroups: + tools.read: + - tools.read_file + agents: + - id: worker + model: + provider: ollama + name: qwen3 + tools: + - type: mcp + server: tools + humanInput: + answerers: + - role: maintainer + timeout: 30m + onTimeout: return + maxRequests: 3 + workflow: + - id: analyze + agent: worker + task: Analyze ${{ inputs.repo }}. + outputs: + - name: report + - id: apply + agent: worker + task: Apply ${{ steps.analyze.outputs.report }}. + dependsOn: + - analyze + permissions: + default: deny + tools: + tools.read: + allow: true + triggers: + - type: manual + - type: schedule + cron: 0 6 * * 1-5 + timezone: Europe/Berlin + - type: event + source: git.example.com + eventType: pull_request.opened + filter: + repository: example-org/web-shop diff --git a/conformance/v1alpha4/valid/5.8-agent-manifest-human-input.yaml b/conformance/v1alpha4/valid/5.8-agent-manifest-human-input.yaml new file mode 100644 index 0000000..13e46cd --- /dev/null +++ b/conformance/v1alpha4/valid/5.8-agent-manifest-human-input.yaml @@ -0,0 +1,39 @@ +# Conformance case 5.8-agent-manifest-human-input +# Spec section 5.8: humanInput is also allowed in an Agent manifest. +# Expected: valid +apiVersion: awp.agenticworkflowprotocol.org/v1alpha4 +kind: Agent +metadata: + name: conformance-agent +spec: + version: 1.0.0 + owner: + team: conformance-team + classification: internal + model: + provider: ollama + name: qwen3 + instructions: Extract fields. + permissions: + default: deny + mcpServers: + - name: docs + transport: stdio + image: registry.example.com/mcp/docs@sha256:dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd + tools: + - type: mcp + server: docs + tools: + - read + - type: builtin + name: shell + budget: + maxSteps: 5 + secrets: + - name: DOCS_KEY + source: vault + scope: + - docs + humanInput: + answerers: + - user: alice@example.com diff --git a/conformance/v1alpha4/valid/5.8-input-step-free-text.yaml b/conformance/v1alpha4/valid/5.8-input-step-free-text.yaml new file mode 100644 index 0000000..8df1206 --- /dev/null +++ b/conformance/v1alpha4/valid/5.8-input-step-free-text.yaml @@ -0,0 +1,82 @@ +# Conformance case 5.8-input-step-free-text +# Spec section 5.8: Without answerSchema the answer is free text. +# Expected: valid +apiVersion: awp.agenticworkflowprotocol.org/v1alpha4 +kind: Workflow +metadata: + name: conformance-base +spec: + version: 1.0.0 + owner: + team: conformance-team + classification: internal + risk: + level: low + inputs: + - name: repo + type: string + default: example-org/web-shop + budget: + maxCostUsd: 1 + maxSteps: 10 + maxDuration: 10m + resources: + maxRetries: 2 + maxConcurrency: 1 + secrets: + - name: TOOLS_TOKEN + source: secret-manager + scope: + - tools + mcpServers: + - name: tools + transport: streamable-http + url: https://mcp.example.com/tools + auth: + secretRef: TOOLS_TOKEN + actionGroups: + tools.read: + - tools.read_file + agents: + - id: worker + model: + provider: ollama + name: qwen3 + tools: + - type: mcp + server: tools + workflow: + - id: analyze + agent: worker + task: Analyze ${{ inputs.repo }}. + outputs: + - name: report + - id: ask-targets + type: input + dependsOn: + - analyze + input: + message: Which targets should ${{ steps.analyze.outputs.report }} be applied to? + answerers: + - role: release-manager + timeout: 4h + - id: apply + agent: worker + task: Apply ${{ steps.analyze.outputs.report }} to ${{ steps.ask-targets.outputs.answer }}. + dependsOn: + - ask-targets + permissions: + default: deny + tools: + tools.read: + allow: true + triggers: + - type: manual + - type: schedule + cron: 0 6 * * 1-5 + timezone: Europe/Berlin + - type: event + source: git.example.com + eventType: pull_request.opened + filter: + repository: example-org/web-shop diff --git a/conformance/v1alpha4/valid/5.8-input-step.yaml b/conformance/v1alpha4/valid/5.8-input-step.yaml new file mode 100644 index 0000000..358d701 --- /dev/null +++ b/conformance/v1alpha4/valid/5.8-input-step.yaml @@ -0,0 +1,102 @@ +# Conformance case 5.8-input-step +# Spec section 5.8: An input step asks named answerers, waits up to its timeout and provides the output answer. +# Expected: valid +apiVersion: awp.agenticworkflowprotocol.org/v1alpha4 +kind: Workflow +metadata: + name: conformance-base +spec: + version: 1.0.0 + owner: + team: conformance-team + classification: internal + risk: + level: low + inputs: + - name: repo + type: string + default: example-org/web-shop + budget: + maxCostUsd: 1 + maxSteps: 10 + maxDuration: 10m + resources: + maxRetries: 2 + maxConcurrency: 1 + secrets: + - name: TOOLS_TOKEN + source: secret-manager + scope: + - tools + mcpServers: + - name: tools + transport: streamable-http + url: https://mcp.example.com/tools + auth: + secretRef: TOOLS_TOKEN + actionGroups: + tools.read: + - tools.read_file + agents: + - id: worker + model: + provider: ollama + name: qwen3 + tools: + - type: mcp + server: tools + workflow: + - id: analyze + agent: worker + task: Analyze ${{ inputs.repo }}. + outputs: + - name: report + - id: ask-targets + type: input + dependsOn: + - analyze + input: + message: Which targets should ${{ steps.analyze.outputs.report }} be applied to? + answerers: + - role: release-manager + timeout: 4h + answerSchema: + type: object + properties: + environment: + type: string + enum: + - staging + - production + title: Environment + maxHosts: + type: integer + minimum: 1 + notify: + type: boolean + required: + - environment + onTimeout: useDefault + default: + environment: staging + classification: internal + - id: apply + agent: worker + task: Apply ${{ steps.analyze.outputs.report }} to ${{ steps.ask-targets.outputs.answer }}. + dependsOn: + - ask-targets + permissions: + default: deny + tools: + tools.read: + allow: true + triggers: + - type: manual + - type: schedule + cron: 0 6 * * 1-5 + timezone: Europe/Berlin + - type: event + source: git.example.com + eventType: pull_request.opened + filter: + repository: example-org/web-shop diff --git a/conformance/v1alpha4/valid/6-agent-manifest.yaml b/conformance/v1alpha4/valid/6-agent-manifest.yaml new file mode 100644 index 0000000..e55df80 --- /dev/null +++ b/conformance/v1alpha4/valid/6-agent-manifest.yaml @@ -0,0 +1,36 @@ +# Conformance case 6-agent-manifest +# Spec section 6: A complete Agent manifest. +# Expected: valid +apiVersion: awp.agenticworkflowprotocol.org/v1alpha4 +kind: Agent +metadata: + name: conformance-agent +spec: + version: 1.0.0 + owner: + team: conformance-team + classification: internal + model: + provider: ollama + name: qwen3 + instructions: Extract fields. + permissions: + default: deny + mcpServers: + - name: docs + transport: stdio + image: registry.example.com/mcp/docs@sha256:dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd + tools: + - type: mcp + server: docs + tools: + - read + - type: builtin + name: shell + budget: + maxSteps: 5 + secrets: + - name: DOCS_KEY + source: vault + scope: + - docs diff --git a/conformance/v1alpha4/valid/6-agent-prompt-ref.yaml b/conformance/v1alpha4/valid/6-agent-prompt-ref.yaml new file mode 100644 index 0000000..0003d29 --- /dev/null +++ b/conformance/v1alpha4/valid/6-agent-prompt-ref.yaml @@ -0,0 +1,20 @@ +# Conformance case 6-agent-prompt-ref +# Spec section 6: An Agent may use promptRef instead of instructions. +# Expected: valid +apiVersion: awp.agenticworkflowprotocol.org/v1alpha4 +kind: Agent +metadata: + name: conformance-agent +spec: + version: 1.0.0 + owner: + team: conformance-team + classification: internal + model: + provider: ollama + name: qwen3 + permissions: + default: deny + promptRef: + name: extract + version: "2" diff --git a/conformance/v1alpha4/valid/7.10-environments.yaml b/conformance/v1alpha4/valid/7.10-environments.yaml new file mode 100644 index 0000000..36841b8 --- /dev/null +++ b/conformance/v1alpha4/valid/7.10-environments.yaml @@ -0,0 +1,74 @@ +# Conformance case 7.10-environments +# Spec section 7.10: Environments with autonomy levels. +# Expected: valid +apiVersion: awp.agenticworkflowprotocol.org/v1alpha4 +kind: Workflow +metadata: + name: conformance-base +spec: + version: 1.0.0 + owner: + team: conformance-team + classification: internal + risk: + level: low + inputs: + - name: repo + type: string + required: true + budget: + maxCostUsd: 1 + maxSteps: 10 + maxDuration: 10m + resources: + maxRetries: 2 + maxConcurrency: 1 + secrets: + - name: TOOLS_TOKEN + source: secret-manager + scope: + - tools + mcpServers: + - name: tools + transport: streamable-http + url: https://mcp.example.com/tools + auth: + secretRef: TOOLS_TOKEN + actionGroups: + tools.read: + - tools.read_file + agents: + - id: worker + model: + provider: ollama + name: qwen3 + tools: + - type: mcp + server: tools + workflow: + - id: analyze + agent: worker + task: Analyze ${{ inputs.repo }}. + outputs: + - name: report + - id: apply + agent: worker + task: Apply ${{ steps.analyze.outputs.report }}. + dependsOn: + - analyze + permissions: + default: deny + tools: + tools.read: + allow: true + environment: + name: production + environments: + development: + autonomy: unrestricted + production: + autonomy: approval-required + autoApprove: + - erp.read + frozen: + autonomy: prohibited diff --git a/conformance/v1alpha4/valid/7.2-data-and-model-policy.yaml b/conformance/v1alpha4/valid/7.2-data-and-model-policy.yaml new file mode 100644 index 0000000..527e218 --- /dev/null +++ b/conformance/v1alpha4/valid/7.2-data-and-model-policy.yaml @@ -0,0 +1,105 @@ +# Conformance case 7.2-data-and-model-policy +# Spec section 7.2: Data policy, residency, processing and model policy. +# Expected: valid +apiVersion: awp.agenticworkflowprotocol.org/v1alpha4 +kind: Workflow +metadata: + name: conformance-base +spec: + version: 1.0.0 + owner: + team: conformance-team + classification: internal + risk: + level: low + inputs: + - name: repo + type: string + required: true + budget: + maxCostUsd: 1 + maxSteps: 10 + maxDuration: 10m + resources: + maxRetries: 2 + maxConcurrency: 1 + secrets: + - name: TOOLS_TOKEN + source: secret-manager + scope: + - tools + mcpServers: + - name: tools + transport: streamable-http + url: https://mcp.example.com/tools + auth: + secretRef: TOOLS_TOKEN + actionGroups: + tools.read: + - tools.read_file + agents: + - id: worker + model: + provider: ollama + name: qwen3 + version: "3.0" + region: EU + approval: + status: approved + expires: 2027-01-01 + approvedBy: model-board + riskClassification: low + evaluation: + status: passed + ref: https://reports.example.com/e1 + allowedUseCases: + - analysis + tools: + - type: mcp + server: tools + workflow: + - id: analyze + agent: worker + task: Analyze ${{ inputs.repo }}. + outputs: + - name: report + - id: apply + agent: worker + task: Apply ${{ steps.analyze.outputs.report }}. + dependsOn: + - analyze + permissions: + default: deny + tools: + tools.read: + allow: true + dataPolicy: + classification: confidential + inputs: + - name: repo + classification: internal + outputs: + - name: report + classification: internal + restrictions: + externalTransfer: deny + residency: + allowed: + - EU + processing: + allowedProviders: + - ollama + forbiddenProviders: + - public-cloud-us + modelPolicy: + allowedProviders: + - ollama + allowedModels: + - qwen3 + forbiddenModels: + - unapproved + requirements: + approvalStatus: approved + encryption: true + region: EU + evaluationStatus: passed diff --git a/conformance/v1alpha4/valid/7.5-permissions.yaml b/conformance/v1alpha4/valid/7.5-permissions.yaml new file mode 100644 index 0000000..d9f9678 --- /dev/null +++ b/conformance/v1alpha4/valid/7.5-permissions.yaml @@ -0,0 +1,80 @@ +# Conformance case 7.5-permissions +# Spec section 7.5: All permission fields, wildcard keys and resource scopes. +# Expected: valid +apiVersion: awp.agenticworkflowprotocol.org/v1alpha4 +kind: Workflow +metadata: + name: conformance-base +spec: + version: 1.0.0 + owner: + team: conformance-team + classification: internal + risk: + level: low + inputs: + - name: repo + type: string + required: true + budget: + maxCostUsd: 1 + maxSteps: 10 + maxDuration: 10m + resources: + maxRetries: 2 + maxConcurrency: 1 + secrets: + - name: TOOLS_TOKEN + source: secret-manager + scope: + - tools + mcpServers: + - name: tools + transport: streamable-http + url: https://mcp.example.com/tools + auth: + secretRef: TOOLS_TOKEN + actionGroups: + tools.read: + - tools.read_file + agents: + - id: worker + model: + provider: ollama + name: qwen3 + tools: + - type: mcp + server: tools + workflow: + - id: analyze + agent: worker + task: Analyze ${{ inputs.repo }}. + outputs: + - name: report + - id: apply + agent: worker + task: Apply ${{ steps.analyze.outputs.report }}. + dependsOn: + - analyze + permissions: + default: allow + tools: + tools.*: + allow: true + resources: + - ${{ inputs.repo }} + production.deploy: + allow: false + network: + egress: deny + allowHosts: + - mcp.example.com + filesystem: + read: + - /workspace + write: + - /workspace/out + secrets: + - TOOLS_TOKEN + environments: + - development diff --git a/conformance/v1alpha4/valid/7.6-approval-and-separation-of-duties.yaml b/conformance/v1alpha4/valid/7.6-approval-and-separation-of-duties.yaml new file mode 100644 index 0000000..eab381f --- /dev/null +++ b/conformance/v1alpha4/valid/7.6-approval-and-separation-of-duties.yaml @@ -0,0 +1,89 @@ +# Conformance case 7.6-approval-and-separation-of-duties +# Spec section 7.6: Workflow approval, approval step and separation of duties. +# Expected: valid +apiVersion: awp.agenticworkflowprotocol.org/v1alpha4 +kind: Workflow +metadata: + name: conformance-base +spec: + version: 1.0.0 + owner: + team: conformance-team + classification: internal + risk: + level: high + category: + - financial + inputs: + - name: repo + type: string + required: true + budget: + maxCostUsd: 1 + maxSteps: 10 + maxDuration: 10m + resources: + maxRetries: 2 + maxConcurrency: 1 + secrets: + - name: TOOLS_TOKEN + source: secret-manager + scope: + - tools + mcpServers: + - name: tools + transport: streamable-http + url: https://mcp.example.com/tools + auth: + secretRef: TOOLS_TOKEN + actionGroups: + tools.read: + - tools.read_file + agents: + - id: worker + model: + provider: ollama + name: qwen3 + tools: + - type: mcp + server: tools + workflow: + - id: analyze + agent: worker + task: Analyze ${{ inputs.repo }}. + outputs: + - name: report + - id: apply + agent: worker + task: Apply ${{ steps.analyze.outputs.report }}. + dependsOn: + - analyze + - id: release + type: approval + dependsOn: + - apply + approval: + approvers: + - role: release-manager + message: Release ${{ steps.analyze.outputs.report }}? + permissions: + default: deny + tools: + tools.read: + allow: true + approval: + requiredFor: + - production.deploy + approvers: + - role: security-reviewer + - user: user:alice + minApprovals: 2 + timeout: 24h + onTimeout: reject + message: Deploy ${{ execution.id }}? + separationOfDuties: + enabled: true + rules: + - actorCannotApproveOwnAction: true + - initiatorCannotApprove: true + - distinctApprovers: true diff --git a/conformance/v1alpha4/valid/8.1-policy-shorthands.yaml b/conformance/v1alpha4/valid/8.1-policy-shorthands.yaml new file mode 100644 index 0000000..e1fb2a6 --- /dev/null +++ b/conformance/v1alpha4/valid/8.1-policy-shorthands.yaml @@ -0,0 +1,77 @@ +# Conformance case 8.1-policy-shorthands +# Spec section 8.1: Policy shorthands and policy includes. +# Expected: valid +apiVersion: awp.agenticworkflowprotocol.org/v1alpha4 +kind: Workflow +metadata: + name: conformance-base +spec: + version: 1.0.0 + owner: + team: conformance-team + classification: internal + risk: + level: low + inputs: + - name: repo + type: string + required: true + budget: + maxCostUsd: 1 + maxSteps: 10 + maxDuration: 10m + resources: + maxRetries: 2 + maxConcurrency: 1 + secrets: + - name: TOOLS_TOKEN + source: secret-manager + scope: + - tools + mcpServers: + - name: tools + transport: streamable-http + url: https://mcp.example.com/tools + auth: + secretRef: TOOLS_TOKEN + actionGroups: + tools.read: + - tools.read_file + agents: + - id: worker + model: + provider: ollama + name: qwen3 + tools: + - type: mcp + server: tools + workflow: + - id: analyze + agent: worker + task: Analyze ${{ inputs.repo }}. + outputs: + - name: report + - id: apply + agent: worker + task: Apply ${{ steps.analyze.outputs.report }}. + dependsOn: + - analyze + permissions: + default: deny + tools: + tools.read: + allow: true + policies: + git: + allowPush: true + allowForcePush: false + pullRequest: + allowCreate: true + merge: + allow: false + production: + allow: false + include: + - name: no-production-autonomy + version: 1.0.0 + digest: sha256:eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee diff --git a/conformance/v1alpha4/valid/8.2-policy-manifest.yaml b/conformance/v1alpha4/valid/8.2-policy-manifest.yaml new file mode 100644 index 0000000..d6f155f --- /dev/null +++ b/conformance/v1alpha4/valid/8.2-policy-manifest.yaml @@ -0,0 +1,31 @@ +# Conformance case 8.2-policy-manifest +# Spec section 8.2: Policy manifest with requireApproval and deny rules. +# Expected: valid +apiVersion: awp.agenticworkflowprotocol.org/v1alpha4 +kind: Policy +metadata: + name: conformance-policy +spec: + version: 1.0.0 + owner: + team: governance-team + rules: + - id: deploy-needs-approval + when: + action: + equals: production.deploy + effect: requireApproval + approval: + approvers: + - role: release-manager + - id: pd-stays-in-eu + when: + data.classification: + in: + - personal + - sensitive + destination.region: + notIn: + - EU + effect: deny + message: Personal data must stay in the EU. diff --git a/conformance/v1alpha4/valid/8.3-conditions.yaml b/conformance/v1alpha4/valid/8.3-conditions.yaml new file mode 100644 index 0000000..91cafbc --- /dev/null +++ b/conformance/v1alpha4/valid/8.3-conditions.yaml @@ -0,0 +1,42 @@ +# Conformance case 8.3-conditions +# Spec section 8.3: All condition attributes and operators; ordering operators on ordered attributes. +# Expected: valid +apiVersion: awp.agenticworkflowprotocol.org/v1alpha4 +kind: Policy +metadata: + name: conformance-policy +spec: + version: 1.0.0 + owner: + team: governance-team + rules: + - id: c1 + effect: deny + when: + action: + equals: github.* + environment.name: + equals: production + risk.level: + gte: high + data.classification: + gt: internal + lt: secret + destination.provider: + equals: x + destination.region: + notEquals: EU + model.provider: + equals: ollama + model.name: + in: + - qwen3 + actor.type: + equals: agent + workflow.name: + equals: w + step.id: + equals: s + agent.id: + notIn: + - a diff --git a/conformance/v1alpha4/valid/9.1-digest-ignores-deployment-fields.yaml b/conformance/v1alpha4/valid/9.1-digest-ignores-deployment-fields.yaml new file mode 100644 index 0000000..6b5addb --- /dev/null +++ b/conformance/v1alpha4/valid/9.1-digest-ignores-deployment-fields.yaml @@ -0,0 +1,30 @@ +# Conformance case 9.1-digest-ignores-deployment-fields +# Spec section 9.1: The digest covers apiVersion, kind, metadata.name and spec without integrity, signature and provenance; namespace, labels, annotations and status do not change it. +# Expected: valid +# Profiles supported by the validator for this case: core +apiVersion: awp.agenticworkflowprotocol.org/v1alpha4 +kind: Workflow +metadata: + name: hello + namespace: team-b + labels: + tier: gold + annotations: + note: deployed by a tool +spec: + version: 0.1.0 + owner: + team: platform-team + agents: + - id: assistant + model: + provider: ollama + name: qwen3 + workflow: + - id: greet + agent: assistant + task: Say hello. + integrity: + digest: sha256:856f0318b028a660b198022600be8e62c307bd2a542923d042a03526da900b4e +status: + observedGeneration: 1 diff --git a/conformance/v1alpha4/valid/9.1-digest-verified.yaml b/conformance/v1alpha4/valid/9.1-digest-verified.yaml new file mode 100644 index 0000000..b345d43 --- /dev/null +++ b/conformance/v1alpha4/valid/9.1-digest-verified.yaml @@ -0,0 +1,66 @@ +# Conformance case 9.1-digest-verified +# Spec section 9.1: spec.integrity.digest matches the JCS digest of the manifest without integrity, signature and provenance. +# Expected: valid +# Validator option: verify metadata.integrity.digest +apiVersion: awp.agenticworkflowprotocol.org/v1alpha4 +kind: Workflow +metadata: + name: conformance-base +spec: + version: 1.0.0 + owner: + team: conformance-team + classification: internal + risk: + level: low + integrity: + digest: sha256:8d2dc91764acb483a526f0f3a9bb4b7b009ac2b3fb40a6a7542e1f4b4537ec5f + inputs: + - name: repo + type: string + required: true + budget: + maxCostUsd: 1 + maxSteps: 10 + maxDuration: 10m + resources: + maxRetries: 2 + maxConcurrency: 1 + secrets: + - name: TOOLS_TOKEN + source: secret-manager + scope: + - tools + mcpServers: + - name: tools + transport: streamable-http + url: https://mcp.example.com/tools + auth: + secretRef: TOOLS_TOKEN + actionGroups: + tools.read: + - tools.read_file + agents: + - id: worker + model: + provider: ollama + name: qwen3 + tools: + - type: mcp + server: tools + workflow: + - id: analyze + agent: worker + task: Analyze ${{ inputs.repo }}. + outputs: + - name: report + - id: apply + agent: worker + task: Apply ${{ steps.analyze.outputs.report }}. + dependsOn: + - analyze + permissions: + default: deny + tools: + tools.read: + allow: true diff --git a/conformance/v1alpha4/valid/9.4-pinned-images-security-profile.yaml b/conformance/v1alpha4/valid/9.4-pinned-images-security-profile.yaml new file mode 100644 index 0000000..b156f92 --- /dev/null +++ b/conformance/v1alpha4/valid/9.4-pinned-images-security-profile.yaml @@ -0,0 +1,73 @@ +# Conformance case 9.4-pinned-images-security-profile +# Spec section 9.4: Under the security profile images are pinned by digest. +# Expected: valid +apiVersion: awp.agenticworkflowprotocol.org/v1alpha4 +kind: Workflow +metadata: + name: conformance-base +spec: + version: 1.0.0 + owner: + team: conformance-team + classification: internal + risk: + level: low + signature: + format: sigstore-bundle + ref: https://registry.example.com/sig.json + identity: release@example.com + provenance: + format: slsa-provenance-v1 + ref: https://registry.example.com/prov.json + inputs: + - name: repo + type: string + required: true + budget: + maxCostUsd: 1 + maxSteps: 10 + maxDuration: 10m + resources: + maxRetries: 2 + maxConcurrency: 1 + secrets: + - name: TOOLS_TOKEN + source: secret-manager + scope: + - tools + mcpServers: + - name: tools + transport: streamable-http + url: https://mcp.example.com/tools + auth: + secretRef: TOOLS_TOKEN + - name: local + transport: stdio + image: registry.example.com/mcp/local@sha256:ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff + actionGroups: + tools.read: + - tools.read_file + agents: + - id: worker + model: + provider: ollama + name: qwen3 + tools: + - type: mcp + server: tools + workflow: + - id: analyze + agent: worker + task: Analyze ${{ inputs.repo }}. + outputs: + - name: report + - id: apply + agent: worker + task: Apply ${{ steps.analyze.outputs.report }}. + dependsOn: + - analyze + permissions: + default: deny + tools: + tools.read: + allow: true diff --git a/schema/README.md b/schema/README.md index 06f8825..d88b756 100644 --- a/schema/README.md +++ b/schema/README.md @@ -1,4 +1,4 @@ -# AWP JSON Schemas (v1alpha1, v1alpha2, v1alpha3) +# AWP JSON Schemas (v1alpha1 to v1alpha4) There is one JSON Schema (draft 2020-12) per API version. Each expresses the **structural** rules of its specification. Rules that JSON Schema cannot express are listed below as **semantic validation @@ -11,6 +11,7 @@ document. | [`awp.v1alpha1.json`](awp.v1alpha1.json) | `awp.agenticworkflowprotocol.org/v1alpha1` | [spec/v1alpha1](../spec/v1alpha1/README.md) | | [`awp.v1alpha2.json`](awp.v1alpha2.json) | `awp.agenticworkflowprotocol.org/v1alpha2` | [spec/v1alpha2](../spec/v1alpha2/README.md): v1alpha1 plus `forEach` (`$defs/ForEach`, new expression references `forEach.*`) | | [`awp.v1alpha3.json`](awp.v1alpha3.json) | `awp.agenticworkflowprotocol.org/v1alpha3` | [spec/v1alpha3](../spec/v1alpha3/README.md): v1alpha2 with the Kubernetes resource model alignment (working draft, see below) | +| [`awp.v1alpha4.json`](awp.v1alpha4.json) | `awp.agenticworkflowprotocol.org/v1alpha4` | v1alpha3 plus step conditions (`Step.when`) and workflow steps (`type: workflow`, `$defs/WorkflowCall`); next draft, see below | **The schema is normative for document structure**: field names, types, required fields, closed objects, enumerations and patterns (decided 2026-10-10, [decision log D2](../docs/decisions.md#d2-json-schema-is-normative-for-structure)). @@ -34,7 +35,7 @@ A document whose `apiVersion` matches no schema is rejected at `/apiVersion` (sp reference checker reports it against the latest schema. | `schema/awp.v1alpha3.json` (and the same `$defs`) | Manifests of `awp.agenticworkflowprotocol.org/v1alpha3` ([specification](../spec/v1alpha3/README.md), working draft). | | `schema/awp.v1alpha3.json#/$defs/WorkflowRun` | An execution object of kind `WorkflowRun` (spec v1alpha3 section 10.8). `ManifestStatus` and `WorkflowRunStatus` describe the `status` a runtime writes; validators ignore `status`. | -| `schema/crd/*.yaml` | Kubernetes CustomResourceDefinitions for `v1alpha3` (`workflows`, `agents`, `policies`, `workflowruns`), generated from `awp.v1alpha3.json` (see below). | +| `schema/crd/*.yaml` | Kubernetes CustomResourceDefinitions (`workflows`, `agents`, `policies`, `workflowruns`) that serve `v1alpha3` (storage version) and `v1alpha4`, generated from `awp.v1alpha3.json` and `awp.v1alpha4.json` (see below). | YAML manifests are parsed first (YAML 1.2 core schema; custom tags and non-string keys rejected, spec 3.1) and the resulting JSON value is validated. Every document of a multi-document file is @@ -57,7 +58,7 @@ complete pipeline: YAML restrictions, then this schema, then the semantic rules. - **Step types** are checked with `if`/`then`: a step has exactly the fields of its type (spec 5.6.1). `type` defaults to `agent`. - **Expressions.** Expression-enabled fields (`task`, `env` values, `permissions.tools.*.resources` - entries, `approval.message`) use the `Expression` pattern: any `${{ ... }}` must contain exactly + entries, `approval.message`, in `v1alpha4` also `workflow.inputs` values) use the `Expression` pattern: any `${{ ... }}` must contain exactly one of `inputs.`, `steps..outputs.`, `execution.id`, `execution.environment` (spec 3.9). Output names are otherwise unconstrained by the specification; inside expressions they must not contain whitespace, `.`, `{`, `}` or `$`. Fields that are not expression-enabled @@ -102,6 +103,23 @@ The semantic rules below apply to every version. In `v1alpha3` their paths use ` `v1alpha1` uses `metadata` (for example `/spec/risk/level`), and `extensions` objects are skipped where `v1alpha1` skips `x-` fields. +## v1alpha4 + +`awp.v1alpha4.json` is `awp.v1alpha3.json` plus two additions; everything else is unchanged. + +- **Conditions.** Every step may have `when` (string, 1 to 512 characters). The whole field is a + condition in the grammar of spec v1alpha4 section 3.10, written without `${{ }}`. Parsing, the + remaining limits (128 tokens, nesting depth 16, 16 path segments, 32 list items, string + literals of at most 256 characters, indexes at most 10000) and the references are semantic rules + (`when.*`, implemented in `conformance/conditions.mjs`). +- **Workflow steps.** `type: workflow` requires `workflow` (`$defs/WorkflowCall`: `ref` as a + DNS-1123 label like `metadata.name`, optional `version`, `inputs` with expression-enabled values, + `wait`, `extensions`) and forbids `agent`, `task`, `command`, `image`, `env`, `workingDir`, + `approval`, `input` and `forEach`; every other step type forbids `workflow`. Profile: `core`. + +Both CRD versions are generated from their own schema; the versions differ only by additions, so +`v1alpha3` stays the storage version. + ## Semantic validation rules These rules apply to documents that are structurally valid. They are implemented by the reference @@ -140,6 +158,14 @@ identifiers for diagnostics ([docs/cli.md](../docs/cli.md#3-diagnostics)). | `expr.iteration-outside-forEach` | 3.9 | `v1alpha2`, `v1alpha3`: `forEach.*` references appear only in `task` and `env` values of a step that declares `forEach`. | | `forEach.input-not-array` | 5.6.4 (v1alpha2), 5.6.5 (v1alpha3) | `v1alpha2`, `v1alpha3`: an input referenced by `forEach.items` has `type: array`. | | `forEach.concurrency-exceeds-budget` | 5.6.4 (v1alpha2), 5.6.5 (v1alpha3) | `v1alpha2`, `v1alpha3`: `forEach.concurrency` does not exceed the effective `budget.resources.maxConcurrency` (minimum of workflow, agent and step; the workflow default is `1`). | +| `when.syntax` | 3.10 (v1alpha4) | A step's `when` parses in the condition grammar. | +| `when.limit-exceeded` | 3.10 (v1alpha4) | A condition stays within the limits: 128 tokens, nesting depth 16, 16 path segments, 32 list items, string literals of at most 256 characters, indexes at most 10000 (the 512 characters are `schema.maxLength`). | +| `when.forbidden-segment` | 3.10 (v1alpha4) | No path segment `__proto__`, `prototype` or `constructor`. | +| `when.unknown-root` | 3.10 (v1alpha4) | Paths start with `inputs.`, `steps..outputs.` or `execution.environment` (no `event`, no `execution.id`). | +| `when.unknown-step` | 3.10 (v1alpha4) | `steps.` in a condition names an existing step. | +| `when.not-a-dependency` | 3.10 (v1alpha4) | `steps.` in a condition is a direct or transitive dependency of the step. | +| `when.undeclared-output` | 3.10 (v1alpha4) | `` in `steps..outputs.` is a declared output of ``. | +| `step.workflow-output` | 5.6.6 (v1alpha4) | A workflow step declares no outputs other than `executionId` and `status`. | ### Warnings @@ -147,6 +173,7 @@ identifiers for diagnostics ([docs/cli.md](../docs/cli.md#3-diagnostics)). | ---- | ---- | ------- | | `mcp.server-unresolved` | 5.5.1 | A tool source names an MCP server that is not declared; it must be resolvable by runtime binding. | | `expr.undeclared-input` | 3.9 | An expression references an input that is not declared. | +| `when.undeclared-input` | 3.10 (v1alpha4) | A condition reads an input that is not declared. | | `permissions.secret-undeclared` | 7.5.1 | `permissions.secrets` names a secret that is not declared. | | `digest.algorithm-unknown` | 3.8 | A digest uses an algorithm other than sha256, sha384, sha512. | | `lint.command-expression` | 5.6.2 | `command` contains `${{ }}`; commands are not expression-enabled and the text is passed literally. | diff --git a/spec/v1alpha4/examples/audit-events.yaml b/spec/v1alpha4/examples/audit-events.yaml new file mode 100644 index 0000000..e7fe3dc --- /dev/null +++ b/spec/v1alpha4/examples/audit-events.yaml @@ -0,0 +1,120 @@ +# Example: an excerpt of the audit event stream of one execution of +# vulnerability-fixer@0.1.0 (YAML for readability; implementations typically emit JSON lines). +--- +id: 01JABC0000000000000000000A +type: workflow.started +time: "2026-10-05T13:42:11Z" +executionId: awp-exec-01JABC7Q4M2W9X0Y1Z2A3B4C5D +workflow: + name: vulnerability-fixer + version: 0.1.0 + digest: sha256:5c4b3a29180716f5e4d3c2b1a0f9e8d7c6b5a49382716f5e4d3c2b1a0f9e8d7c +actor: + type: human + id: user:alice@example.com +environment: development +data: + trigger: + type: manual + inputs: + repository: example-org/web-shop + cve: CVE-2026-12345 +--- +id: 01JABC0000000000000000000B +type: tool.requested +time: "2026-10-05T13:42:30Z" +executionId: awp-exec-01JABC7Q4M2W9X0Y1Z2A3B4C5D +stepId: investigate +actor: + type: agent + id: researcher +data: + action: github.search_code + server: github + arguments: + query: "lodash.template repo:example-org/web-shop" +--- +id: 01JABC0000000000000000000C +type: policy.evaluated +time: "2026-10-05T13:42:30Z" +executionId: awp-exec-01JABC7Q4M2W9X0Y1Z2A3B4C5D +stepId: investigate +actor: + type: runtime + id: example-runtime +data: + action: github.search_code + decision: allow + evaluated: + - source: permissions + result: allow + - source: policies.git + result: notApplicable +--- +id: 01JABC0000000000000000000D +type: tool.executed +time: "2026-10-05T13:42:31Z" +executionId: awp-exec-01JABC7Q4M2W9X0Y1Z2A3B4C5D +stepId: investigate +actor: + type: agent + id: researcher +data: + action: github.search_code + outcome: success + durationMs: 812 +--- +id: 01JABC0000000000000000000E +type: tool.denied +time: "2026-10-05T13:47:02Z" +executionId: awp-exec-01JABC7Q4M2W9X0Y1Z2A3B4C5D +stepId: fix +actor: + type: agent + id: fixer +data: + action: github.merge_pull_request + reason: policy + policy: policies.merge.allow +--- +id: 01JABC0000000000000000000F +type: tool.requested +time: "2026-10-05T13:49:40Z" +executionId: awp-exec-01JABC7Q4M2W9X0Y1Z2A3B4C5D +stepId: fix +actor: + type: agent + id: fixer +data: + action: github.create_pull_request + server: github + decision: + action: create_pull_request + reason: + type: policy-compatible-action + summary: Fix applied and tests requested; pull request creation is allowed. + evidence: + - type: artifact + ref: report + - type: step + ref: investigate + policyChecks: + - permissions + - policies.pullRequest +--- +id: 01JABC0000000000000000000G +type: workflow.completed +time: "2026-10-05T13:55:12Z" +executionId: awp-exec-01JABC7Q4M2W9X0Y1Z2A3B4C5D +actor: + type: runtime + id: example-runtime +data: + status: succeeded + usage: + steps: 21 + costUsd: 0.84 + costKnown: true + tokens: 183220 + toolCalls: 37 + durationMs: 781000 diff --git a/spec/v1alpha4/examples/conformance-statement.yaml b/spec/v1alpha4/examples/conformance-statement.yaml new file mode 100644 index 0000000..c2a1fac --- /dev/null +++ b/spec/v1alpha4/examples/conformance-statement.yaml @@ -0,0 +1,21 @@ +# Example: conformance statement published by an implementation. +implementation: + name: example-runtime + version: 0.4.0 + url: https://runtime.example.org +conformance: + awp: v1alpha4 + profiles: + - core + - governance + - audit + limitations: + - "audit: integrity mode signed is not supported; hash-chain only" + limits: + outputSize: 1MiB + stepOutputSize: 4MiB + executionObjects: true + testedWith: + suite: awp-conformance + version: 0.1.0 + date: "2026-10-09" diff --git a/spec/v1alpha4/examples/eu-data-residency.policy.yaml b/spec/v1alpha4/examples/eu-data-residency.policy.yaml new file mode 100644 index 0000000..3862361 --- /dev/null +++ b/spec/v1alpha4/examples/eu-data-residency.policy.yaml @@ -0,0 +1,22 @@ +# Example: a reusable policy that keeps personal data inside the EU. +apiVersion: awp.agenticworkflowprotocol.org/v1alpha4 +kind: Policy +metadata: + name: eu-data-residency +spec: + version: 1.0.0 + owner: + team: data-protection + contact: data-protection@example.com + rules: + - id: personal-data-stays-in-eu + when: + data.classification: + in: + - personal + - sensitive + destination.region: + notIn: + - EU + effect: deny + message: Personal and sensitive data must not leave the EU. diff --git a/spec/v1alpha4/examples/execution-record.yaml b/spec/v1alpha4/examples/execution-record.yaml new file mode 100644 index 0000000..2434857 --- /dev/null +++ b/spec/v1alpha4/examples/execution-record.yaml @@ -0,0 +1,53 @@ +# Example: reproducibility record for one execution of vulnerability-fixer@0.1.0. +executionId: awp-exec-01JABC7Q4M2W9X0Y1Z2A3B4C5D +startedAt: "2026-10-05T13:42:11Z" +finishedAt: "2026-10-05T13:55:12Z" +status: succeeded +environment: development +runtime: + name: example-runtime + version: 0.4.0 + conformance: + awp: v1alpha4 + profiles: + - core + - governance + - audit +workflow: + name: vulnerability-fixer + version: 0.1.0 + digest: sha256:5c4b3a29180716f5e4d3c2b1a0f9e8d7c6b5a49382716f5e4d3c2b1a0f9e8d7c +agents: + - id: researcher + model: + provider: anthropic + name: claude + version: claude-example-2026-06 + instructionsDigest: sha256:aa11bb22cc33dd44ee55ff6600112233445566778899aabbccddeeff00112233 + - id: fixer + model: + provider: ollama + name: qwen3 + version: "3.0" + instructionsDigest: sha256:bb22cc33dd44ee55ff6600112233445566778899aabbccddeeff0011223344aa +tools: + - server: github + version: 1.8.0 + url: https://mcp.example.com/github +images: + - ref: registry.example.com/build/node@sha256:3f1d5c0a9e2b7c4d6e8f0a1b2c3d4e5f60718293a4b5c6d7e8f90a1b2c3d4e5f +policies: + - source: inline + digest: sha256:cc33dd44ee55ff6600112233445566778899aabbccddeeff00112233445566bb +inputs: + - name: repository + digest: sha256:dd44ee55ff6600112233445566778899aabbccddeeff00112233445566bbcc11 + - name: cve + digest: sha256:ee55ff6600112233445566778899aabbccddeeff00112233445566bbcc11dd22 +artifacts: + - name: report + stepId: investigate + digest: sha256:ff6600112233445566778899aabbccddeeff00112233445566bbcc11dd22ee33 + - name: pull-request + stepId: fix + uri: https://git.example.com/example-org/web-shop/pull/42 diff --git a/spec/v1alpha4/examples/image-review.workflow.yaml b/spec/v1alpha4/examples/image-review.workflow.yaml new file mode 100644 index 0000000..8d021ce --- /dev/null +++ b/spec/v1alpha4/examples/image-review.workflow.yaml @@ -0,0 +1,87 @@ +# Example: review every container image of a repository for known vulnerabilities, one item run +# per image (forEach, spec 5.6.5), then write one migration plan. +# Profiles exercised: core, mcp. +apiVersion: awp.agenticworkflowprotocol.org/v1alpha4 +kind: Workflow +metadata: + name: image-review +spec: + version: 0.1.0 + description: Find the container images of a repository, scan each one and plan the upgrade. + owner: + team: platform-team + classification: internal + risk: + level: low + triggers: + - type: manual + inputs: + - name: repository + type: string + required: true + description: Repository in the form owner/name. + budget: + maxCostUsd: 3 + maxSteps: 40 + maxDuration: 1h + resources: + maxToolCalls: 60 + maxConcurrency: 2 + mcpServers: + - name: scanner + transport: streamable-http + url: https://mcp.example.com/scanner + agents: + - id: inventory + model: + provider: ollama + name: qwen3 + instructions: List every container image reference with its tag. + tools: + - type: mcp + server: scanner + tools: + - image_refs + - id: reviewer + model: + provider: ollama + name: qwen3 + instructions: Scan one image and summarize its critical and high findings. + tools: + - type: mcp + server: scanner + tools: + - scan_image + workflow: + - id: images + agent: inventory + task: List the container images of ${{ inputs.repository }} as a JSON list of strings. + outputs: + - name: refs + - id: scan + agent: reviewer + dependsOn: + - images + task: Scan image ${{ forEach.item }} (number ${{ forEach.index }} of the list). + forEach: + items: ${{ steps.images.outputs.refs }} + maxItems: 20 + concurrency: 2 + timeout: 10m + retries: 1 + outputs: + - name: findings + - id: plan + agent: reviewer + dependsOn: + - scan + task: "Write one upgrade plan from these findings, one entry per image: ${{ steps.scan.outputs.findings }}" + outputs: + - name: plan + permissions: + default: deny + tools: + scanner.image_refs: + allow: true + scanner.scan_image: + allow: true diff --git a/spec/v1alpha4/examples/invoice-extractor.agent.yaml b/spec/v1alpha4/examples/invoice-extractor.agent.yaml new file mode 100644 index 0000000..382d39c --- /dev/null +++ b/spec/v1alpha4/examples/invoice-extractor.agent.yaml @@ -0,0 +1,36 @@ +# Example: a reusable agent definition referenced by invoice-processing.workflow.yaml. +apiVersion: awp.agenticworkflowprotocol.org/v1alpha4 +kind: Agent +metadata: + name: invoice-extractor +spec: + version: 2.0.1 + description: Extracts structured data from invoice documents. + owner: + team: finance-ai + contact: finance-ai@example.com + classification: confidential + risk: + level: medium + category: + - financial + model: + provider: ollama + name: qwen3 + version: "3.0" + region: EU + approval: + status: approved + expires: 2027-03-31 + instructions: | + Extract supplier name, invoice number, dates, currency, totals and line items. + Return JSON only. Never guess missing values; mark them as null. + tools: [] + budget: + maxSteps: 10 + resources: + maxTokens: 30000 + permissions: + default: deny + network: + egress: deny diff --git a/spec/v1alpha4/examples/invoice-processing.workflow.yaml b/spec/v1alpha4/examples/invoice-processing.workflow.yaml new file mode 100644 index 0000000..890470c --- /dev/null +++ b/spec/v1alpha4/examples/invoice-processing.workflow.yaml @@ -0,0 +1,208 @@ +# Example: a governance-heavy workflow that processes supplier invoices. +# Profiles exercised: core, governance, audit, security, mcp. +apiVersion: awp.agenticworkflowprotocol.org/v1alpha4 +kind: Workflow +metadata: + name: invoice-processing + labels: + department: finance +spec: + version: 1.2.0 + description: Extract invoice data, check it against purchase orders and prepare payments. + owner: + team: finance-ai + contact: finance-ai@example.com + businessOwner: accounts-payable@example.com + technicalOwner: platform-team@example.com + dataOwner: finance-data@example.com + classification: confidential + purpose: Prepare supplier payments for human release. + risk: + level: high + category: + - financial + integrity: + digest: sha256:9b2f6c1e4d8a0b7c3e5f1a2d4c6b8e0f1a3c5e7b9d0f2a4c6e8b0d1f3a5c7e9b + signature: + format: sigstore-bundle + ref: https://registry.example.com/awp/invoice-processing/1.2.0.sigstore.json + identity: release-pipeline@example.com + provenance: + format: slsa-provenance-v1 + ref: https://registry.example.com/awp/invoice-processing/1.2.0.intoto.jsonl + triggers: + - type: event + source: mailbox.invoices + eventType: message.received + inputs: + - name: invoice + type: artifact + required: true + classification: personal + environment: + name: production + environments: + development: + autonomy: unrestricted + staging: + autonomy: controlled + production: + autonomy: approval-required + autoApprove: + - erp.read + budget: + maxCostUsd: 5 + maxSteps: 50 + maxDuration: 30m + resources: + maxTokens: 100000 + maxToolCalls: 100 + maxRetries: 3 + maxConcurrency: 2 + secrets: + - name: ERP_API_TOKEN + source: secret-manager + scope: + - erp + mcpServers: + - name: erp + transport: stdio + image: registry.example.com/mcp/erp@sha256:0c1d2e3f405162738495a6b7c8d9e0f1a2b3c4d5e6f708192a3b4c5d6e7f8091 + version: 2.4.1 + auth: + secretRef: ERP_API_TOKEN + actionGroups: + erp.read: + - erp.get_purchase_order + - erp.get_supplier + erp.write: + - erp.create_payment_draft + agents: + - id: extractor + ref: + name: invoice-extractor + version: 2.0.1 + digest: sha256:4e5f6a7b8c9d0e1f2a3b4c5d6e7f8091a2b3c4d5e6f708192a3b4c5d6e7f8091 + - id: checker + model: + provider: azure-openai + name: gpt-5 + version: 2026-08 + region: EU + approval: + status: approved + expires: 2027-01-01 + riskClassification: medium + evaluation: + status: passed + ref: https://evals.example.com/reports/gpt-5-invoice-check + allowedUseCases: + - document-extraction + - reconciliation + promptRef: + name: invoice-check + version: 3.1.0 + digest: sha256:7a8b9c0d1e2f3a4b5c6d7e8f9a0b1c2d3e4f5a6b7c8d9e0f1a2b3c4d5e6f7a8b + tools: + - type: mcp + server: erp + workflow: + - id: extract + agent: extractor + task: Extract supplier, amounts and line items from ${{ inputs.invoice }}. + outputs: + - name: invoiceData + classification: personal + - id: reconcile + agent: checker + task: Check ${{ steps.extract.outputs.invoiceData }} against the purchase order. + dependsOn: + - extract + outputs: + - name: paymentDraft + classification: confidential + - id: release + type: approval + approval: + approvers: + - role: accounts-payable-approver + minApprovals: 2 + timeout: 24h + dependsOn: + - reconcile + dataPolicy: + classification: confidential + inputs: + - name: invoice + classification: personal + outputs: + - name: paymentDraft + classification: confidential + restrictions: + externalTransfer: deny + residency: + allowed: + - EU + processing: + allowedProviders: + - ollama + - azure-openai + forbiddenProviders: + - public-cloud-us + modelPolicy: + allowedProviders: + - azure-openai + - ollama + allowedModels: + - gpt-5 + - qwen3 + forbiddenModels: + - unapproved-model + requirements: + approvalStatus: approved + encryption: true + region: EU + permissions: + default: deny + tools: + erp.read: + allow: true + erp.write: + allow: true + shell.execute: + allow: false + network: + egress: deny + filesystem: + read: + - /workspace + write: + - /workspace/out + secrets: + - ERP_API_TOKEN + approval: + requiredFor: + - erp.create_payment_draft + - external.communication + approvers: + - role: finance-reviewer + timeout: 24h + onTimeout: reject + separationOfDuties: + enabled: true + rules: + - actorCannotApproveOwnAction: true + - initiatorCannotApprove: true + policies: + include: + - name: eu-data-residency + version: 1.0.0 + - name: no-production-autonomy + version: 1.0.0 + audit: + enabled: true + payload: metadata + integrity: + mode: hash-chain + retention: + duration: 7y diff --git a/spec/v1alpha4/examples/no-production-autonomy.policy.yaml b/spec/v1alpha4/examples/no-production-autonomy.policy.yaml new file mode 100644 index 0000000..eec6d4e --- /dev/null +++ b/spec/v1alpha4/examples/no-production-autonomy.policy.yaml @@ -0,0 +1,31 @@ +# Example: a reusable policy that requires a release manager for production deployments. +apiVersion: awp.agenticworkflowprotocol.org/v1alpha4 +kind: Policy +metadata: + name: no-production-autonomy +spec: + version: 1.0.0 + owner: + team: platform-governance + contact: governance@example.com + rules: + - id: deploy-needs-release-manager + when: + action: + equals: production.deploy + effect: requireApproval + approval: + approvers: + - role: release-manager + - id: no-merge-in-production + when: + action: + equals: git.merge + environment.name: + equals: production + effect: requireApproval + approval: + approvers: + - role: release-manager + - role: security-reviewer + minApprovals: 2 diff --git a/spec/v1alpha4/examples/security-review.a2a.workflow.yaml b/spec/v1alpha4/examples/security-review.a2a.workflow.yaml new file mode 100644 index 0000000..e8cc22b --- /dev/null +++ b/spec/v1alpha4/examples/security-review.a2a.workflow.yaml @@ -0,0 +1,60 @@ +# Example: delegating a review to a remote agent over A2A. +# Profiles exercised: core, governance, audit, a2a. +apiVersion: awp.agenticworkflowprotocol.org/v1alpha4 +kind: Workflow +metadata: + name: security-review +spec: + version: 0.3.0 + owner: + team: appsec + contact: appsec@example.com + classification: internal + risk: + level: low + triggers: + - type: event + source: git.example.com + eventType: pull_request.opened + inputs: + - name: pullRequestUrl + type: string + required: true + budget: + maxCostUsd: 1 + maxSteps: 20 + maxDuration: 10m + secrets: + - name: REVIEW_AGENT_TOKEN + source: secret-manager + scope: + - security-agent + agents: + - id: security-agent + protocol: a2a + endpoint: https://agents.example.com/a2a/security-review + agentCard: + url: https://agents.example.com/.well-known/agent-card.json + digest: sha256:1f2e3d4c5b6a79880716253443526170f1e2d3c4b5a6978877665544332211ff + auth: + secretRef: REVIEW_AGENT_TOKEN + workflow: + - id: review + agent: security-agent + task: Review ${{ inputs.pullRequestUrl }} for security issues and report findings. + outputs: + - name: findings + classification: internal + permissions: + default: deny + tools: + a2a.security-agent.send: + allow: true + dataPolicy: + restrictions: + externalTransfer: allow + processing: + allowedProviders: + - agents.example.com + audit: + enabled: true diff --git a/spec/v1alpha4/examples/vulnerability-fixer.run.yaml b/spec/v1alpha4/examples/vulnerability-fixer.run.yaml new file mode 100644 index 0000000..6ec4fb0 --- /dev/null +++ b/spec/v1alpha4/examples/vulnerability-fixer.run.yaml @@ -0,0 +1,68 @@ +# Example: a WorkflowRun of vulnerability-fixer@0.1.0 (spec section 10.8), with the status a +# runtime writes while the step fix is running. Validators ignore status. +apiVersion: awp.agenticworkflowprotocol.org/v1alpha4 +kind: WorkflowRun +metadata: + name: vulnerability-fixer-7k2xq + generateName: vulnerability-fixer- + namespace: security + generation: 1 +spec: + workflowRef: + name: vulnerability-fixer + version: 0.1.0 + inputs: + repository: example-org/web-shop + cve: CVE-2026-12345 + environment: development +status: + observedGeneration: 1 + executionId: awp-exec-01JABC7Q4M2W9X0Y1Z2A3B4C5D + phase: running + actor: + type: human + id: alice@example.com + trigger: + type: manual + index: 0 + environment: development + workflow: + name: vulnerability-fixer + version: 0.1.0 + digest: sha256:5c4b3a29180716f5e4d3c2b1a0f9e8d7c6b5a49382716f5e4d3c2b1a0f9e8d7c + startedAt: "2026-10-05T13:42:11Z" + steps: + - id: investigate + status: succeeded + attempts: 1 + startedAt: "2026-10-05T13:42:12Z" + finishedAt: "2026-10-05T13:47:40Z" + outputs: + - name: report + digest: sha256:9f8e7d6c5b4a39281706f5e4d3c2b1a09f8e7d6c5b4a39281706f5e4d3c2b1a0 + size: 4182 + classification: internal + - id: fix + status: running + attempts: 1 + startedAt: "2026-10-05T13:47:41Z" + - id: test + status: pending + usage: + steps: 1 + costUsd: 0.42 + costKnown: true + tokens: 94550 + toolCalls: 18 + durationMs: 329000 + conditions: + - type: Accepted + status: "True" + reason: Validated + message: "" + lastTransitionTime: "2026-10-05T13:42:11Z" + - type: Succeeded + status: Unknown + reason: Running + message: "" + lastTransitionTime: "2026-10-05T13:42:11Z" diff --git a/spec/v1alpha4/examples/vulnerability-fixer.workflow.yaml b/spec/v1alpha4/examples/vulnerability-fixer.workflow.yaml new file mode 100644 index 0000000..250c74a --- /dev/null +++ b/spec/v1alpha4/examples/vulnerability-fixer.workflow.yaml @@ -0,0 +1,136 @@ +# Example: an agentic workflow that investigates and fixes a CVE in a repository. +# Profiles exercised: core, governance, audit, mcp. +apiVersion: awp.agenticworkflowprotocol.org/v1alpha4 +kind: Workflow +metadata: + name: vulnerability-fixer +spec: + version: 0.1.0 + description: Investigate a CVE in a repository, prepare a fix and open a pull request. + owner: + team: security-team + contact: security-team@example.com + classification: internal + purpose: Reduce time to remediate known vulnerabilities in internal repositories. + risk: + level: medium + category: + - security + triggers: + - type: manual + inputs: + - name: repository + type: string + required: true + description: Repository in the form owner/name. + - name: cve + type: string + required: true + pattern: ^CVE-[0-9]{4}-[0-9]{4,}$ + budget: + maxCostUsd: 2 + maxSteps: 30 + maxDuration: 15m + resources: + maxTokens: 400000 + maxToolCalls: 60 + maxRetries: 2 + maxConcurrency: 1 + secrets: + - name: GITHUB_TOKEN + source: secret-manager + scope: + - github + mcpServers: + - name: github + transport: streamable-http + url: https://mcp.example.com/github + auth: + secretRef: GITHUB_TOKEN + actionGroups: + github.read: + - github.search_code + - github.get_file_contents + github.write: + - github.create_branch + - github.push_files + - github.create_pull_request + - github.merge_pull_request + git.push: + - github.push_files + pullRequest.create: + - github.create_pull_request + git.merge: + - github.merge_pull_request + agents: + - id: researcher + model: + provider: anthropic + name: claude + instructions: | + Find where the vulnerable dependency or code path is used and summarize + the affected files and the recommended fix. + tools: + - type: mcp + server: github + tools: + - search_code + - get_file_contents + - id: fixer + model: + provider: ollama + name: qwen3 + instructions: | + Apply the recommended fix with the smallest possible change. + tools: + - type: mcp + server: github + workflow: + - id: investigate + agent: researcher + task: Investigate ${{ inputs.cve }} in ${{ inputs.repository }}. + outputs: + - name: report + classification: internal + - id: fix + agent: fixer + task: "Fix the issue described in the report: ${{ steps.investigate.outputs.report }}" + dependsOn: + - investigate + - id: test + type: command + command: npm test + image: registry.example.com/build/node@sha256:3f1d5c0a9e2b7c4d6e8f0a1b2c3d4e5f60718293a4b5c6d7e8f90a1b2c3d4e5f + timeout: 10m + dependsOn: + - fix + permissions: + default: deny + tools: + github.read: + allow: true + github.write: + allow: true + resources: + - ${{ inputs.repository }} + shell.execute: + allow: true + production.deploy: + allow: false + network: + egress: deny + allowHosts: + - mcp.example.com + - registry.npmjs.org + policies: + git: + allowPush: true + allowForcePush: false + pullRequest: + allowCreate: true + merge: + allow: false + production: + allow: false + audit: + enabled: true From a4ef02dd20e6e0b32b922eee78d0899d9fbced1e Mon Sep 17 00:00:00 2001 From: Erik Date: Fri, 27 Nov 2026 07:23:31 +0100 Subject: [PATCH 3/6] fix(conformance): conditions are section 3.12 of the v1alpha4 spec Section 3.10 of the v1alpha3 text, which v1alpha4 starts from, is "Object stores and Kubernetes" and 3.11 is "Status", so the new conditions section is 3.12. The v1alpha4 case ids, the diagnostics of conditions.mjs, the schema description, the CRD and the rule catalogue now cite 3.12. Signed-off-by: Erik --- conformance/README.md | 4 +- conformance/conditions.mjs | 14 +++---- conformance/v1alpha4/index.json | 40 +++++++++---------- ....yaml => 3.12-when-forbidden-segment.yaml} | 4 +- ...ncy.yaml => 3.12-when-not-dependency.yaml} | 4 +- ...when-syntax.yaml => 3.12-when-syntax.yaml} | 4 +- ...-too-long.yaml => 3.12-when-too-long.yaml} | 4 +- ....yaml => 3.12-when-undeclared-output.yaml} | 4 +- ...-root.yaml => 3.12-when-unknown-root.yaml} | 4 +- .../valid/5.6.1-when-exists-and-in.yaml | 2 +- .../5.6.1-when-json-path-into-output.yaml | 2 +- schema/README.md | 18 ++++----- schema/awp.v1alpha4.json | 2 +- schema/crd/workflows.yaml | 2 +- 14 files changed, 54 insertions(+), 54 deletions(-) rename conformance/v1alpha4/invalid/{3.10-when-forbidden-segment.yaml => 3.12-when-forbidden-segment.yaml} (92%) rename conformance/v1alpha4/invalid/{3.10-when-not-dependency.yaml => 3.12-when-not-dependency.yaml} (92%) rename conformance/v1alpha4/invalid/{3.10-when-syntax.yaml => 3.12-when-syntax.yaml} (92%) rename conformance/v1alpha4/invalid/{3.10-when-too-long.yaml => 3.12-when-too-long.yaml} (94%) rename conformance/v1alpha4/invalid/{3.10-when-undeclared-output.yaml => 3.12-when-undeclared-output.yaml} (92%) rename conformance/v1alpha4/invalid/{3.10-when-unknown-root.yaml => 3.12-when-unknown-root.yaml} (92%) diff --git a/conformance/README.md b/conformance/README.md index bccf145..2d13f90 100644 --- a/conformance/README.md +++ b/conformance/README.md @@ -16,8 +16,8 @@ conformance statements as self-declarations). | `semantic.mjs` | The semantic rules ([catalogue](../schema/README.md#semantic-validation-rules)). | | `v1alpha2/` | The suite for `v1alpha2`: the `v1alpha1` cases with apiVersion `v1alpha2`, plus the cases for step iteration (`5.6.4-...`, `3.9-iteration-...`). | | `v1alpha3/` | The suite for `v1alpha3`, with the same layout (`valid/`, `invalid/`, `index.json`). Derived from the `v1alpha1` suite with `migrate.mjs`, plus cases for the document model of `v1alpha3`. | It also has the step iteration cases (`5.6.5-...`). -| `v1alpha4/` | The suite for `v1alpha4`: the `v1alpha3` cases with apiVersion `v1alpha4` (digest cases recomputed), plus the cases for step conditions (`3.10-when-...`, `5.6.1-when-...`) and workflow steps (`5.6.6-...`). | -| `conditions.mjs` | Parser and static rules of step conditions (`when`, v1alpha4 spec 3.10), used by `semantic.mjs`. | +| `v1alpha4/` | The suite for `v1alpha4`: the `v1alpha3` cases with apiVersion `v1alpha4` (digest cases recomputed), plus the cases for step conditions (`3.12-when-...`, `5.6.1-when-...`) and workflow steps (`5.6.6-...`). | +| `conditions.mjs` | Parser and static rules of step conditions (`when`, v1alpha4 spec 3.12), used by `semantic.mjs`. | | `migrate.mjs` | Mechanical migration of a `v1alpha1`, `v1alpha2` or `v1alpha3` manifest to `v1alpha4` (from `v1alpha3` only `apiVersion` changes). | | `crd.mjs` | Generates the Kubernetes CustomResourceDefinitions in `schema/crd/` from `schema/awp.v1alpha3.json` and `schema/awp.v1alpha4.json` and checks that they are current. | diff --git a/conformance/conditions.mjs b/conformance/conditions.mjs index 1a68fad..5a1f666 100644 --- a/conformance/conditions.mjs +++ b/conformance/conditions.mjs @@ -1,4 +1,4 @@ -// Static checks of step conditions (`when`, v1alpha4 spec 3.10): tokenizer and parser of the +// Static checks of step conditions (`when`, v1alpha4 spec 3.12): tokenizer and parser of the // restricted condition grammar with its limits. Evaluation is the runtime's job; this module only // decides whether a condition is well-formed and which paths it reads. // @@ -221,21 +221,21 @@ export function parseCondition(text) { } /** - * Static rules of a step's `when` (v1alpha4 spec 3.10): it parses, steps. is a direct or + * Static rules of a step's `when` (v1alpha4 spec 3.12): it parses, steps. is a direct or * transitive dependency with a declared output , and inputs. is declared (warning). * @param {{text: string, path: string, stepId: string, stepIds: Map, dependencies: Set, * outputsOf: Map>, inputNames: Set, err: Function, warn: Function}} c */ export function checkStepCondition(c) { const parsed = parseCondition(c.text); - if (!parsed.ok) return c.err(parsed.code, '3.10', c.path, `when: ${parsed.message}`); + if (!parsed.ok) return c.err(parsed.code, '3.12', c.path, `when: ${parsed.message}`); for (const p of parsed.paths) { if (p.root === 'inputs' && !c.inputNames.has(p.name)) { - c.warn('when.undeclared-input', '3.10', c.path, `condition reads undeclared input "${p.name}"`); + c.warn('when.undeclared-input', '3.12', c.path, `condition reads undeclared input "${p.name}"`); } if (p.root !== 'steps') continue; - if (!c.stepIds.has(p.stepId)) c.err('when.unknown-step', '3.10', c.path, `condition reads non-existent step "${p.stepId}"`); - else if (!c.dependencies.has(p.stepId)) c.err('when.not-a-dependency', '3.10', c.path, `step "${c.stepId}" reads steps.${p.stepId} in when but does not depend on it (directly or transitively)`); - else if (!c.outputsOf.get(p.stepId).has(p.name)) c.err('when.undeclared-output', '3.10', c.path, `step "${p.stepId}" does not declare output "${p.name}"`); + if (!c.stepIds.has(p.stepId)) c.err('when.unknown-step', '3.12', c.path, `condition reads non-existent step "${p.stepId}"`); + else if (!c.dependencies.has(p.stepId)) c.err('when.not-a-dependency', '3.12', c.path, `step "${c.stepId}" reads steps.${p.stepId} in when but does not depend on it (directly or transitively)`); + else if (!c.outputsOf.get(p.stepId).has(p.name)) c.err('when.undeclared-output', '3.12', c.path, `step "${p.stepId}" does not declare output "${p.name}"`); } } diff --git a/conformance/v1alpha4/index.json b/conformance/v1alpha4/index.json index 3bfc560..57ae960 100644 --- a/conformance/v1alpha4/index.json +++ b/conformance/v1alpha4/index.json @@ -1957,14 +1957,14 @@ { "id": "5.6.1-when-exists-and-in", "file": "valid/5.6.1-when-exists-and-in.yaml", - "section": "3.10", + "section": "3.12", "rule": "Conditions combine exists(), in with literal lists, comparisons and boolean operators.", "expect": "valid" }, { "id": "5.6.1-when-json-path-into-output", "file": "valid/5.6.1-when-json-path-into-output.yaml", - "section": "3.10", + "section": "3.12", "rule": "Path segments after the output name select into the output parsed as JSON; a transitive dependency may be read.", "expect": "valid" }, @@ -1983,54 +1983,54 @@ "expect": "valid" }, { - "id": "3.10-when-syntax", - "file": "invalid/3.10-when-syntax.yaml", - "section": "3.10", + "id": "3.12-when-syntax", + "file": "invalid/3.12-when-syntax.yaml", + "section": "3.12", "rule": "when MUST parse in the condition grammar.", "expect": "invalid", "code": "when.syntax", "path": "/spec/workflow/1/when" }, { - "id": "3.10-when-too-long", - "file": "invalid/3.10-when-too-long.yaml", - "section": "3.10", + "id": "3.12-when-too-long", + "file": "invalid/3.12-when-too-long.yaml", + "section": "3.12", "rule": "A condition has at most 512 characters.", "expect": "invalid", "code": "schema.maxLength", "path": "/spec/workflow/1/when" }, { - "id": "3.10-when-not-dependency", - "file": "invalid/3.10-when-not-dependency.yaml", - "section": "3.10", + "id": "3.12-when-not-dependency", + "file": "invalid/3.12-when-not-dependency.yaml", + "section": "3.12", "rule": "steps. in when MUST be a direct or transitive dependency.", "expect": "invalid", "code": "when.not-a-dependency", "path": "/spec/workflow/2/when" }, { - "id": "3.10-when-undeclared-output", - "file": "invalid/3.10-when-undeclared-output.yaml", - "section": "3.10", + "id": "3.12-when-undeclared-output", + "file": "invalid/3.12-when-undeclared-output.yaml", + "section": "3.12", "rule": " in steps..outputs. MUST be a declared output of .", "expect": "invalid", "code": "when.undeclared-output", "path": "/spec/workflow/1/when" }, { - "id": "3.10-when-forbidden-segment", - "file": "invalid/3.10-when-forbidden-segment.yaml", - "section": "3.10", + "id": "3.12-when-forbidden-segment", + "file": "invalid/3.12-when-forbidden-segment.yaml", + "section": "3.12", "rule": "Path segments __proto__, prototype and constructor MUST be rejected.", "expect": "invalid", "code": "when.forbidden-segment", "path": "/spec/workflow/1/when" }, { - "id": "3.10-when-unknown-root", - "file": "invalid/3.10-when-unknown-root.yaml", - "section": "3.10", + "id": "3.12-when-unknown-root", + "file": "invalid/3.12-when-unknown-root.yaml", + "section": "3.12", "rule": "Conditions read only inputs, steps..outputs and execution.environment.", "expect": "invalid", "code": "when.unknown-root", diff --git a/conformance/v1alpha4/invalid/3.10-when-forbidden-segment.yaml b/conformance/v1alpha4/invalid/3.12-when-forbidden-segment.yaml similarity index 92% rename from conformance/v1alpha4/invalid/3.10-when-forbidden-segment.yaml rename to conformance/v1alpha4/invalid/3.12-when-forbidden-segment.yaml index c82499f..a1597b5 100644 --- a/conformance/v1alpha4/invalid/3.10-when-forbidden-segment.yaml +++ b/conformance/v1alpha4/invalid/3.12-when-forbidden-segment.yaml @@ -1,5 +1,5 @@ -# Conformance case 3.10-when-forbidden-segment -# Spec section 3.10: Path segments __proto__, prototype and constructor MUST be rejected. +# Conformance case 3.12-when-forbidden-segment +# Spec section 3.12: Path segments __proto__, prototype and constructor MUST be rejected. # Expected: invalid (when.forbidden-segment at /spec/workflow/1/when) apiVersion: awp.agenticworkflowprotocol.org/v1alpha4 kind: Workflow diff --git a/conformance/v1alpha4/invalid/3.10-when-not-dependency.yaml b/conformance/v1alpha4/invalid/3.12-when-not-dependency.yaml similarity index 92% rename from conformance/v1alpha4/invalid/3.10-when-not-dependency.yaml rename to conformance/v1alpha4/invalid/3.12-when-not-dependency.yaml index 1aba83f..e5e7340 100644 --- a/conformance/v1alpha4/invalid/3.10-when-not-dependency.yaml +++ b/conformance/v1alpha4/invalid/3.12-when-not-dependency.yaml @@ -1,5 +1,5 @@ -# Conformance case 3.10-when-not-dependency -# Spec section 3.10: steps. in when MUST be a direct or transitive dependency. +# Conformance case 3.12-when-not-dependency +# Spec section 3.12: steps. in when MUST be a direct or transitive dependency. # Expected: invalid (when.not-a-dependency at /spec/workflow/2/when) apiVersion: awp.agenticworkflowprotocol.org/v1alpha4 kind: Workflow diff --git a/conformance/v1alpha4/invalid/3.10-when-syntax.yaml b/conformance/v1alpha4/invalid/3.12-when-syntax.yaml similarity index 92% rename from conformance/v1alpha4/invalid/3.10-when-syntax.yaml rename to conformance/v1alpha4/invalid/3.12-when-syntax.yaml index 83d7747..f700360 100644 --- a/conformance/v1alpha4/invalid/3.10-when-syntax.yaml +++ b/conformance/v1alpha4/invalid/3.12-when-syntax.yaml @@ -1,5 +1,5 @@ -# Conformance case 3.10-when-syntax -# Spec section 3.10: when MUST parse in the condition grammar. +# Conformance case 3.12-when-syntax +# Spec section 3.12: when MUST parse in the condition grammar. # Expected: invalid (when.syntax at /spec/workflow/1/when) apiVersion: awp.agenticworkflowprotocol.org/v1alpha4 kind: Workflow diff --git a/conformance/v1alpha4/invalid/3.10-when-too-long.yaml b/conformance/v1alpha4/invalid/3.12-when-too-long.yaml similarity index 94% rename from conformance/v1alpha4/invalid/3.10-when-too-long.yaml rename to conformance/v1alpha4/invalid/3.12-when-too-long.yaml index 8a847bc..1fa25e4 100644 --- a/conformance/v1alpha4/invalid/3.10-when-too-long.yaml +++ b/conformance/v1alpha4/invalid/3.12-when-too-long.yaml @@ -1,5 +1,5 @@ -# Conformance case 3.10-when-too-long -# Spec section 3.10: A condition has at most 512 characters. +# Conformance case 3.12-when-too-long +# Spec section 3.12: A condition has at most 512 characters. # Expected: invalid (schema.maxLength at /spec/workflow/1/when) apiVersion: awp.agenticworkflowprotocol.org/v1alpha4 kind: Workflow diff --git a/conformance/v1alpha4/invalid/3.10-when-undeclared-output.yaml b/conformance/v1alpha4/invalid/3.12-when-undeclared-output.yaml similarity index 92% rename from conformance/v1alpha4/invalid/3.10-when-undeclared-output.yaml rename to conformance/v1alpha4/invalid/3.12-when-undeclared-output.yaml index 0d2476b..4956127 100644 --- a/conformance/v1alpha4/invalid/3.10-when-undeclared-output.yaml +++ b/conformance/v1alpha4/invalid/3.12-when-undeclared-output.yaml @@ -1,5 +1,5 @@ -# Conformance case 3.10-when-undeclared-output -# Spec section 3.10: in steps..outputs. MUST be a declared output of . +# Conformance case 3.12-when-undeclared-output +# Spec section 3.12: in steps..outputs. MUST be a declared output of . # Expected: invalid (when.undeclared-output at /spec/workflow/1/when) apiVersion: awp.agenticworkflowprotocol.org/v1alpha4 kind: Workflow diff --git a/conformance/v1alpha4/invalid/3.10-when-unknown-root.yaml b/conformance/v1alpha4/invalid/3.12-when-unknown-root.yaml similarity index 92% rename from conformance/v1alpha4/invalid/3.10-when-unknown-root.yaml rename to conformance/v1alpha4/invalid/3.12-when-unknown-root.yaml index 75d5bed..42f0842 100644 --- a/conformance/v1alpha4/invalid/3.10-when-unknown-root.yaml +++ b/conformance/v1alpha4/invalid/3.12-when-unknown-root.yaml @@ -1,5 +1,5 @@ -# Conformance case 3.10-when-unknown-root -# Spec section 3.10: Conditions read only inputs, steps..outputs and execution.environment. +# Conformance case 3.12-when-unknown-root +# Spec section 3.12: Conditions read only inputs, steps..outputs and execution.environment. # Expected: invalid (when.unknown-root at /spec/workflow/1/when) apiVersion: awp.agenticworkflowprotocol.org/v1alpha4 kind: Workflow diff --git a/conformance/v1alpha4/valid/5.6.1-when-exists-and-in.yaml b/conformance/v1alpha4/valid/5.6.1-when-exists-and-in.yaml index e1de678..1ff3785 100644 --- a/conformance/v1alpha4/valid/5.6.1-when-exists-and-in.yaml +++ b/conformance/v1alpha4/valid/5.6.1-when-exists-and-in.yaml @@ -1,5 +1,5 @@ # Conformance case 5.6.1-when-exists-and-in -# Spec section 3.10: Conditions combine exists(), in with literal lists, comparisons and boolean operators. +# Spec section 3.12: Conditions combine exists(), in with literal lists, comparisons and boolean operators. # Expected: valid apiVersion: awp.agenticworkflowprotocol.org/v1alpha4 kind: Workflow diff --git a/conformance/v1alpha4/valid/5.6.1-when-json-path-into-output.yaml b/conformance/v1alpha4/valid/5.6.1-when-json-path-into-output.yaml index da0ff54..a704439 100644 --- a/conformance/v1alpha4/valid/5.6.1-when-json-path-into-output.yaml +++ b/conformance/v1alpha4/valid/5.6.1-when-json-path-into-output.yaml @@ -1,5 +1,5 @@ # Conformance case 5.6.1-when-json-path-into-output -# Spec section 3.10: Path segments after the output name select into the output parsed as JSON; a transitive dependency may be read. +# Spec section 3.12: Path segments after the output name select into the output parsed as JSON; a transitive dependency may be read. # Expected: valid apiVersion: awp.agenticworkflowprotocol.org/v1alpha4 kind: Workflow diff --git a/schema/README.md b/schema/README.md index d88b756..d85e31f 100644 --- a/schema/README.md +++ b/schema/README.md @@ -108,7 +108,7 @@ where `v1alpha1` skips `x-` fields. `awp.v1alpha4.json` is `awp.v1alpha3.json` plus two additions; everything else is unchanged. - **Conditions.** Every step may have `when` (string, 1 to 512 characters). The whole field is a - condition in the grammar of spec v1alpha4 section 3.10, written without `${{ }}`. Parsing, the + condition in the grammar of spec v1alpha4 section 3.12, written without `${{ }}`. Parsing, the remaining limits (128 tokens, nesting depth 16, 16 path segments, 32 list items, string literals of at most 256 characters, indexes at most 10000) and the references are semantic rules (`when.*`, implemented in `conformance/conditions.mjs`). @@ -158,13 +158,13 @@ identifiers for diagnostics ([docs/cli.md](../docs/cli.md#3-diagnostics)). | `expr.iteration-outside-forEach` | 3.9 | `v1alpha2`, `v1alpha3`: `forEach.*` references appear only in `task` and `env` values of a step that declares `forEach`. | | `forEach.input-not-array` | 5.6.4 (v1alpha2), 5.6.5 (v1alpha3) | `v1alpha2`, `v1alpha3`: an input referenced by `forEach.items` has `type: array`. | | `forEach.concurrency-exceeds-budget` | 5.6.4 (v1alpha2), 5.6.5 (v1alpha3) | `v1alpha2`, `v1alpha3`: `forEach.concurrency` does not exceed the effective `budget.resources.maxConcurrency` (minimum of workflow, agent and step; the workflow default is `1`). | -| `when.syntax` | 3.10 (v1alpha4) | A step's `when` parses in the condition grammar. | -| `when.limit-exceeded` | 3.10 (v1alpha4) | A condition stays within the limits: 128 tokens, nesting depth 16, 16 path segments, 32 list items, string literals of at most 256 characters, indexes at most 10000 (the 512 characters are `schema.maxLength`). | -| `when.forbidden-segment` | 3.10 (v1alpha4) | No path segment `__proto__`, `prototype` or `constructor`. | -| `when.unknown-root` | 3.10 (v1alpha4) | Paths start with `inputs.`, `steps..outputs.` or `execution.environment` (no `event`, no `execution.id`). | -| `when.unknown-step` | 3.10 (v1alpha4) | `steps.` in a condition names an existing step. | -| `when.not-a-dependency` | 3.10 (v1alpha4) | `steps.` in a condition is a direct or transitive dependency of the step. | -| `when.undeclared-output` | 3.10 (v1alpha4) | `` in `steps..outputs.` is a declared output of ``. | +| `when.syntax` | 3.12 (v1alpha4) | A step's `when` parses in the condition grammar. | +| `when.limit-exceeded` | 3.12 (v1alpha4) | A condition stays within the limits: 128 tokens, nesting depth 16, 16 path segments, 32 list items, string literals of at most 256 characters, indexes at most 10000 (the 512 characters are `schema.maxLength`). | +| `when.forbidden-segment` | 3.12 (v1alpha4) | No path segment `__proto__`, `prototype` or `constructor`. | +| `when.unknown-root` | 3.12 (v1alpha4) | Paths start with `inputs.`, `steps..outputs.` or `execution.environment` (no `event`, no `execution.id`). | +| `when.unknown-step` | 3.12 (v1alpha4) | `steps.` in a condition names an existing step. | +| `when.not-a-dependency` | 3.12 (v1alpha4) | `steps.` in a condition is a direct or transitive dependency of the step. | +| `when.undeclared-output` | 3.12 (v1alpha4) | `` in `steps..outputs.` is a declared output of ``. | | `step.workflow-output` | 5.6.6 (v1alpha4) | A workflow step declares no outputs other than `executionId` and `status`. | ### Warnings @@ -173,7 +173,7 @@ identifiers for diagnostics ([docs/cli.md](../docs/cli.md#3-diagnostics)). | ---- | ---- | ------- | | `mcp.server-unresolved` | 5.5.1 | A tool source names an MCP server that is not declared; it must be resolvable by runtime binding. | | `expr.undeclared-input` | 3.9 | An expression references an input that is not declared. | -| `when.undeclared-input` | 3.10 (v1alpha4) | A condition reads an input that is not declared. | +| `when.undeclared-input` | 3.12 (v1alpha4) | A condition reads an input that is not declared. | | `permissions.secret-undeclared` | 7.5.1 | `permissions.secrets` names a secret that is not declared. | | `digest.algorithm-unknown` | 3.8 | A digest uses an algorithm other than sha256, sha384, sha512. | | `lint.command-expression` | 5.6.2 | `command` contains `${{ }}`; commands are not expression-enabled and the text is passed literally. | diff --git a/schema/awp.v1alpha4.json b/schema/awp.v1alpha4.json index 58cc0e0..8cb62c4 100644 --- a/schema/awp.v1alpha4.json +++ b/schema/awp.v1alpha4.json @@ -1298,7 +1298,7 @@ "minimum": 0 }, "when": { - "description": "Condition (spec 3.10): the step runs only if it evaluates to true. The whole field is the expression, without ${{ }}.", + "description": "Condition (spec 3.12): the step runs only if it evaluates to true. The whole field is the expression, without ${{ }}.", "type": "string", "minLength": 1, "maxLength": 512 diff --git a/schema/crd/workflows.yaml b/schema/crd/workflows.yaml index d4c8b29..069f41a 100644 --- a/schema/crd/workflows.yaml +++ b/schema/crd/workflows.yaml @@ -2346,7 +2346,7 @@ spec: minimum: 0 type: integer when: - description: "Condition (spec 3.10): the step runs only if it evaluates to true. The whole field is the expression, without ${{ }}." + description: "Condition (spec 3.12): the step runs only if it evaluates to true. The whole field is the expression, without ${{ }}." minLength: 1 maxLength: 512 type: string From 491b5d8c8cf9a580c283fdf58c8f014cf6e65acd Mon Sep 17 00:00:00 2001 From: Erik Date: Fri, 27 Nov 2026 07:29:39 +0100 Subject: [PATCH 4/6] docs(aep): accept AEP-0001 and add AEP-0028 workflow steps (D23) The analyse-then-act pattern (a risk analysis decides whether a fix workflow runs) needs step conditions and a way to start another workflow from a step. Lead decision D23 accepts AEP-0001 and the new AEP-0028 into a new draft, v1alpha4, with the same exception to the external review as D19 and D22 and an alpha waiver of the discussion period. v1alpha3 stays the current draft. AEP-0001 is adapted to v1alpha4: section 3.12, no event root, outputs read as JSON. AEP-0006 points to AEP-0028 in its alternatives. GOVERNANCE.md and the AEP process name D23 as a recorded exception. Signed-off-by: Erik --- GOVERNANCE.md | 4 +- aep/0001-conditional-steps.md | 71 +++++++---- aep/0006-playbook-kind.md | 2 + aep/0028-workflow-steps.md | 214 ++++++++++++++++++++++++++++++++++ docs/aep-process.md | 11 +- docs/decisions.md | 46 ++++++-- 6 files changed, 310 insertions(+), 38 deletions(-) create mode 100644 aep/0028-workflow-steps.md diff --git a/GOVERNANCE.md b/GOVERNANCE.md index fc0e1b0..af7d6ab 100644 --- a/GOVERNANCE.md +++ b/GOVERNANCE.md @@ -74,8 +74,8 @@ that no single organization holds a majority of maintainers once the specificati ([decision log](docs/decisions.md)). An AEP is never accepted by its author or by the project lead alone: it needs a reviewer who is not an author and, while all maintainers belong to one organisation, an external one ([aep-process 5.1](docs/aep-process.md#51-review-before-acceptance)). - The only exceptions are the recorded lead decisions D19 (AEP-0022) and D22 (AEPs 0015 to 0020), - each limited to the AEPs it names. + The only exceptions are the recorded lead decisions D19 (AEP-0022), D22 (AEPs 0015 to 0020) and + D23 (AEPs 0001 and 0028), each limited to the AEPs it names. - If consensus cannot be reached, the maintainers decide by simple majority; the project lead breaks ties. diff --git a/aep/0001-conditional-steps.md b/aep/0001-conditional-steps.md index 75d011d..01f2fdd 100644 --- a/aep/0001-conditional-steps.md +++ b/aep/0001-conditional-steps.md @@ -5,12 +5,13 @@ | **AEP** | 0001 | | **Title** | Conditional steps (`when`) with a restricted expression language | | **Authors** | AI agent on behalf of @agenticworkflowprotocol | -| **Shepherd** | Project lead (proposed; not an author, [aep-process 5.1](../docs/aep-process.md#51-review-before-acceptance)) | +| **Shepherd** | Project lead (D23) | | **Type** | Specification | -| **Status** | Review (proposed for `v1alpha3`; not accepted) | -| **Reviewer roles needed** | runtime implementer, language or schema reviewer, security reviewer. None identified yet; an external review is required before `Accepted` ([aep-process 5.1](../docs/aep-process.md#51-review-before-acceptance)). | -| **Owner decisions** | [D5](../docs/decisions.md#d5-when-uses-a-restricted-expression-grammar-not-cel), [D6](../docs/decisions.md#d6-executions-may-succeed-with-condition-skips) (2026-10-10) | -| **Target API version** | `v1alpha3` (`v1alpha2` until [D22](../docs/decisions.md#d22-v1alpha3-becomes-the-current-draft)) | +| **Status** | Accepted for `v1alpha4` (lead decision [D23](../docs/decisions.md#d23-conditional-steps-and-workflow-steps-start-v1alpha4), without the external review of D16) | +| **Reviewer roles needed** | runtime implementer, language or schema reviewer, security reviewer (still welcome; see Decision) | +| **Reviewers** | none yet | +| **Owner decisions** | [D5](../docs/decisions.md#d5-when-uses-a-restricted-expression-grammar-not-cel), [D6](../docs/decisions.md#d6-executions-may-succeed-with-condition-skips) (2026-10-10), [D23](../docs/decisions.md#d23-conditional-steps-and-workflow-steps-start-v1alpha4) (2026-11-27) | +| **Target API version** | `v1alpha4` (`v1alpha2` until [D22](../docs/decisions.md#d22-v1alpha3-becomes-the-current-draft), `v1alpha3` until D23); written into the `v1alpha4` draft as section 3.12 | | **Profiles affected** | `core` (step semantics), `audit` (new event type) | | **Created** | 2026-10-09 | | **Discussion** | issue to be opened | @@ -20,8 +21,8 @@ ## Summary Add an optional `when` field to workflow steps. `when` is a boolean condition in a small, typed, -side-effect-free expression language over workflow inputs, declared step outputs, the triggering -event (AEP-0004) and the execution environment. A step whose condition is false is **skipped by +side-effect-free expression language over workflow inputs, declared step outputs and the execution +environment. A step whose condition is false is **skipped by condition**; this does not fail the execution. Evaluation errors fail the step, they are never treated as `false`. @@ -47,13 +48,19 @@ the author wanted skipped. ## Specification +> As accepted into `v1alpha4` (D23). Differences from the text proposed for `v1alpha2`: the +> section is 3.12, because 3.10 and 3.11 are taken in `v1alpha3`; there is no `event` root, +> because AEP-0004 is not accepted; and step outputs, which are text since `v1alpha3` (spec 5.6.4), +> are read as JSON in conditions. The normative text is +> [spec/v1alpha4 section 3.12](../spec/v1alpha4/README.md#312-conditions). + ### Changes to section 5.6.1 (common step fields) | Field | Type | Req. | Description | | ----- | ---- | ---- | ----------- | -| `when` | string | no | Condition expression (section 3.10). The step runs only if it evaluates to `true`. | +| `when` | string | no | Condition expression (section 3.12). The step runs only if it evaluates to `true`. | -### New section 3.10: Conditions +### New section 3.12: Conditions A condition is a string in the following grammar. It is written without `${{ }}`; the whole field is the expression. @@ -68,13 +75,15 @@ operand := literal | path | list | "exists" "(" path ")" | "(" expr ")" path := root ( "." name | "[" index "]" )* root := "inputs" "." name | "steps" "." step-id "." "outputs" "." name - | "event" ; AEP-0004 - | "execution" "." ( "environment" ) + | "execution" "." "environment" list := "[" ( literal ( "," literal )* )? "]" literal := string | number | "true" | "false" | "null" ``` - Strings use double quotes with JSON escapes. Numbers use the JSON number syntax. +- A step output is text (spec 5.6.4). In a condition it is read as JSON if it parses as a JSON + value, otherwise as a string: the output text `true` is the boolean `true`, `high` is the string + `"high"`. Path segments after the output name select into the parsed value. - Typing is strict: no truthiness and no coercion. `==` and `!=` compare two scalars of any type (different types are unequal); `<`, `<=`, `>`, `>=` need two numbers or two strings (code point order); `&&`, `||`, `!` need booleans; `in` tests whether a scalar is an element of a list @@ -124,15 +133,15 @@ Under `payload: metadata` (section 10.2) the event MUST NOT contain the values t ## Examples ```yaml -apiVersion: awp.agenticworkflowprotocol.org/v1alpha2 +apiVersion: awp.agenticworkflowprotocol.org/v1alpha4 kind: Workflow metadata: name: ticket-triage +spec: version: 0.1.0 owner: team: example-team classification: internal -spec: inputs: - name: ticket type: string @@ -142,8 +151,6 @@ spec: model: { provider: example-provider, name: example-model } - id: writer model: { provider: example-provider, name: example-model } - tools: - - { type: mcp, server: tickets, tools: [add_comment] } workflow: - id: analysis agent: analyst @@ -160,25 +167,30 @@ spec: ## Schema changes - `Step.properties.when`: `{ "type": "string", "minLength": 1, "maxLength": 512 }`. -- Semantic rules: `when.syntax`, `when.limits`, `when.unknown-step`, `when.not-a-dependency`, - `when.undeclared-output`, warning `when.undeclared-input`. +- Semantic rules: `when.syntax`, `when.limit-exceeded`, `when.forbidden-segment`, + `when.unknown-root`, `when.unknown-step`, `when.not-a-dependency`, `when.undeclared-output`, + warning `when.undeclared-input` (as implemented in `conformance/conditions.mjs`). ## Conformance impact - `core`: static rules above; runtime: readiness, skip reasons, success rule, evaluation errors. - `audit`: `step.skipped`. -- New cases: `valid/5.6.1-step-when.yaml`; `invalid/3.10-when-syntax.yaml` (`when.syntax`), - `invalid/3.10-when-too-long.yaml` (`schema.maxLength`), `invalid/3.10-when-proto-segment.yaml` - (`when.syntax`), `invalid/3.10-when-step-not-dependency.yaml` (`when.not-a-dependency`), - `invalid/3.10-when-undeclared-output.yaml` (`when.undeclared-output`). Runtime tests once a +- Cases in `conformance/v1alpha4/`: `valid/5.6.1-when-on-every-step-type.yaml`, + `valid/5.6.1-when-exists-and-in.yaml`, `valid/5.6.1-when-json-path-into-output.yaml`; + `invalid/3.12-when-syntax.yaml` (`when.syntax`), `invalid/3.12-when-too-long.yaml` + (`schema.maxLength`), `invalid/3.12-when-forbidden-segment.yaml` (`when.forbidden-segment`), + `invalid/3.12-when-unknown-root.yaml` (`when.unknown-root`), + `invalid/3.12-when-not-dependency.yaml` (`when.not-a-dependency`), + `invalid/3.12-when-undeclared-output.yaml` (`when.undeclared-output`). Runtime tests once a runtime suite exists: false condition skips and execution succeeds; evaluation error fails; output of skipped step inside `exists()`. ## Compatibility and migration -Additive for manifests: `v1alpha1` manifests have no `when`. The success rule changes only for -manifests that use `when`. A `v1alpha1` runtime rejects `when` as an unknown field (fail closed), -which is the intended behaviour. +Additive for manifests: manifests of older versions have no `when`, and `migrate` converts them +to `v1alpha4` unchanged apart from `apiVersion`. The success rule changes only for manifests that +use `when`. A runtime of an older version rejects `when` as an unknown field (fail closed), which +is the intended behaviour. ## Security considerations @@ -224,10 +236,19 @@ No implementation of this AEP exists. ## Decision +2026-11-27 ([D23](../docs/decisions.md#d23-conditional-steps-and-workflow-steps-start-v1alpha4)): +accepted for `v1alpha4` by the project lead, in the form written into the +`v1alpha4` draft (section 3.12 and the changes to 5.6.1, 5.6.3 and 10.4). The external review that +D16 requires was not held; reviews in the roles above are still invited, and their findings are +handled as errata of the `v1alpha4` draft. Open questions: 1. `when` is allowed on every step type, +including approval steps. 2. `execution.environment` is the only execution fact. 3. Not part of +`v1alpha4`. + 2026-11-25 ([D22](../docs/decisions.md#d22-v1alpha3-becomes-the-current-draft)): the target is now `v1alpha3`, the current draft. The owner direction below is kept as recorded. Owner direction of 2026-10-10: the grammar is a restricted expression grammar defined in this AEP, not CEL (D5); an execution may succeed when steps are skipped by a condition (D6). Target `v1alpha2`. Not accepted; needs the reviews listed in the header ([aep-process 5.1](../docs/aep-process.md#51-review-before-acceptance)). ## References -- Spec sections 3.9, 5.6, 10.4. +- [spec/v1alpha4 section 3.12](../spec/v1alpha4/README.md#312-conditions), sections 3.9, 5.6.3, + 10.4. diff --git a/aep/0006-playbook-kind.md b/aep/0006-playbook-kind.md index 255b1c9..8c94b2e 100644 --- a/aep/0006-playbook-kind.md +++ b/aep/0006-playbook-kind.md @@ -196,6 +196,8 @@ enforce their own compliance requirements. This proposal makes no compliance pro - **Workflow references a workflow** (sub-workflows): heavier, carries its own triggers and governance sections that would conflict with the parent's. + [AEP-0028](0028-workflow-steps.md) (accepted for `v1alpha4`, D23) adds workflow steps that avoid + the conflict: the child runs as a separate execution with its own governance. - **Skills as Markdown plus scripts without a manifest**: no identity, no permissions, no checks. - **Do nothing**: procedures stay in prompts. diff --git a/aep/0028-workflow-steps.md b/aep/0028-workflow-steps.md new file mode 100644 index 0000000..c23658f --- /dev/null +++ b/aep/0028-workflow-steps.md @@ -0,0 +1,214 @@ +# AEP-0028: Workflow steps (`type: workflow`): start another workflow as a child execution + +| | | +| --- | --- | +| **AEP** | 0028 | +| **Title** | Workflow steps (`type: workflow`): start another workflow as a child execution | +| **Authors** | AI agent on behalf of @agenticworkflowprotocol | +| **Shepherd** | Project lead (D23) | +| **Type** | Specification | +| **Status** | Accepted for `v1alpha4` (lead decision [D23](../docs/decisions.md#d23-conditional-steps-and-workflow-steps-start-v1alpha4), without the external review of D16) | +| **Reviewer roles needed** | runtime implementer, security reviewer (still welcome; see Decision) | +| **Reviewers** | none yet | +| **Target API version** | `v1alpha4`; written into the draft as section 5.6.6 | +| **Profiles affected** | `core` (step type, action `workflow.start`), `audit` (fields of `workflow.started`) | +| **Created** | 2026-11-27 | +| **Discussion** | to be opened as a GitHub issue | +| **Supersedes** | - | +| **Superseded-by** | - | + +## Summary + +Add the step type `workflow`. A workflow step starts another `Workflow` of the same scope as a +child execution, with inputs computed from the parent, and by default waits for it. The child is an +execution of its own: pinned to its own manifests, with its own permissions, policies, approvals +and budget. Starting it is the well-known action `workflow.start`. The step provides two outputs, +`executionId` and `status`. Together with conditional steps (AEP-0001) a workflow can decide at run +time whether a second workflow runs. + +## Motivation + +A common pattern is *analyse, then act*: a risk analysis decides whether a CVE affects a +repository, and only then a fix workflow runs. The fix workflow already exists on its own, is +started manually as well, and has its own owner, permissions and approvals. `v1alpha3` offers two +ways to combine them, and both lose something: + +- Copy the fix steps into the analysis workflow. The fix logic is duplicated, and the analysis + workflow needs every permission of the fix (push, pull request), even when nothing is affected. +- Let the analysis end and start the fix through an external trigger (an event or a webhook). The + link between the two executions is lost: the audit trail does not show which analysis started + which fix, the parent cannot wait for the result, and budgets are not shared. + +A workflow step keeps each workflow a separate, governed unit and still records the link. + +## Goals and non-goals + +- Goals: start a workflow of the same scope from a step; inputs from expressions; wait or fire + and forget; the child keeps its own governance; the parent can permit or deny the start; the + link is in the audit trail; bounded nesting. +- Non-goals: passing outputs of the child back to the parent (beyond `executionId` and `status`); + `forEach` over workflow steps; calling workflows of another scope or another runtime; inline + sub-workflows. + +## Specification + +The normative text is [spec/v1alpha4 section 5.6.6](../spec/v1alpha4/README.md#566-workflow-steps) +with the changes to sections 3.9, 5.5.3, 5.6.1, 5.6.4 and 10.4. In short: + +| Field | Type | Req. | Description | +| ----- | ---- | ---- | ----------- | +| `workflow.ref` | string | yes | `metadata.name` of a `Workflow` in the same scope; a DNS-1123 label. | +| `workflow.version` | string | no | SemVer range. Default: the version the runtime treats as current. | +| `workflow.inputs` | map of string | no | Input values of the child; expression-enabled (spec 3.9). | +| `workflow.wait` | boolean | no | Default `true`: wait for the child to end. | + +1. Starting the child is the action `workflow.start`, subject to the parent's permissions, + policies and approvals. +2. Inputs are validated against the child's declared inputs; a mismatch fails the step with reason + `inputInvalid` before the child starts. +3. The child is a separate execution with its own execution identifier, pinned to its own + manifests (spec 10.1), with its own permissions, policies, approvals and budget. The parent's + permissions do not extend to it. +4. The child's usage (cost and duration) also counts against the parent's remaining budget; the + runtime MUST stop the child when that budget is exhausted. +5. A cycle (a workflow that starts itself directly or transitively) fails the step with reason + `workflowCycle`; a nesting depth above 5 fails it with reason `workflowDepthExceeded`. +6. Outputs: `executionId` and `status` (`succeeded`, `failed`, `cancelled`; `started` with + `wait: false`). No other outputs may be declared. With `wait: true` the step fails with reason + `childFailed` unless the child succeeded. +7. `forEach` is not allowed on a workflow step. +8. The child's `workflow.started` event carries `parentExecutionId` and `parentStepId`. + +## Examples + +```yaml +apiVersion: awp.agenticworkflowprotocol.org/v1alpha4 +kind: Workflow +metadata: + name: cve-risk +spec: + version: 0.1.0 + owner: + team: security-team + classification: internal + inputs: + - name: repository + type: string + required: true + agents: + - id: analyst + model: + provider: example-provider + name: example-model + workflow: + - id: risk + agent: analyst + task: "Is ${{ inputs.repository }} affected?" + outputs: + - name: affected + - id: fix + type: workflow + dependsOn: [risk] + when: steps.risk.outputs.affected == true + workflow: + ref: cve-fixer + inputs: + repository: "${{ inputs.repository }}" + permissions: + default: deny + tools: + workflow.start: + allow: true +``` + +A complete example: [spec/v1alpha4/examples/cve-risk-then-fix.yaml](../spec/v1alpha4/examples/cve-risk-then-fix.yaml). + +## Schema changes + +- `Step.type` gains `workflow`; new property `Step.workflow` (`WorkflowCall`: `ref`, `version`, + `inputs`, `wait`, `extensions`). `type: workflow` requires `workflow` and forbids `agent`, `task`, + `command`, `image`, `env`, `workingDir`, `approval`, `input` and `forEach`; the other types forbid + `workflow`. +- Semantic rule `step.workflow-output`: a workflow step declares only `executionId` and `status`. + `workflow.inputs` values follow the expression rules of spec 3.9. + +## Conformance impact + +- `core`: the step type, resolution, input validation, pinning, budget sharing, cycle and depth + limits, the outputs and the reasons `workflowNotFound`, `inputInvalid`, `workflowCycle`, + `workflowDepthExceeded`, `childFailed`. +- `audit`: `parentExecutionId` and `parentStepId` in `workflow.started`. +- Cases in `conformance/v1alpha4/`: `valid/5.6.6-workflow-step-wait.yaml`, + `valid/5.6.6-workflow-step-no-wait.yaml`; `invalid/5.6.6-workflow-step-without-ref.yaml` + (`schema.required`), `invalid/5.6.6-workflow-step-for-each.yaml` (`schema.not`), + `invalid/5.6.6-workflow-step-output.yaml` (`step.workflow-output`), + `invalid/5.6.6-workflow-ref-not-dns-label.yaml` (`schema.pattern`), + `invalid/5.6.6-workflow-step-agent.yaml` (`schema.not`), + `invalid/5.6.6-workflow-inputs-expression.yaml` (`schema.pattern`). Runtime tests once a runtime + suite exists: cycle, depth, budget sharing, `childFailed`. + +## Compatibility and migration + +Additive: older manifests have no workflow steps. A runtime of an older version rejects +`type: workflow` (fail closed). + +## Security considerations + +- The child runs with its own permissions, not the parent's: a workflow step cannot widen what the + parent may do, and a parent that may start a child does not gain the child's permissions. +- Starting a child is an action (`workflow.start`), so `default: deny` permissions and policies + control which workflows may start others. +- Cycle detection, the depth limit and the shared budget bound how much work a chain of workflow + steps can start. +- A condition over model output decides whether the child starts; the child's own approvals still + apply to its actions. + +## Privacy considerations + +Input values passed to the child appear in its `workflow.started` event as values or digests per +the child's `payload` setting. A child with a lower classification than the parent's data should +not receive classified values; authors pass references instead. + +## Compliance note + +AWP provides machine-readable governance primitives that can help organizations implement and +enforce their own compliance requirements. This proposal makes no compliance promise. + +## Alternatives + +- **Event or webhook triggers** (AEP-0024): the parent emits an event and the fix workflow starts on + it. Loose coupling, but no linkage: the parent cannot wait for the result, the audit trail does + not connect the executions, and budgets are not shared. Runtimes may still offer it; it is + complementary. +- **Playbooks** ([AEP-0006](0006-playbook-kind.md)): reusable procedures that run inside the + parent's governance. Suited for small shared procedures; a fix workflow that is also started on + its own, with its own owner and approvals, is a workflow, not a playbook. AEP-0006 lists "workflow + references a workflow" as an alternative and rejects it because the governance sections would + conflict; this AEP avoids that conflict by running the child as a separate execution with its own + governance instead of merging it into the parent. +- **Inline sub-workflows**: a nested step list in the parent. Duplicates logic and mixes + governance; rejected. +- **Do nothing**: copy steps or chain workflows outside AWP. + +## Implementation status + +No implementation of this AEP exists at the time of writing. + +## Open questions + +1. Should the child's outputs be passed to the parent (typed handoffs, AEP-0003)? +2. Should `forEach` over workflow steps be allowed in a later version? +3. Should a workflow be able to restrict which workflows may start it? + +## Decision + +2026-11-27: accepted for `v1alpha4` by the project lead +([D23](../docs/decisions.md#d23-conditional-steps-and-workflow-steps-start-v1alpha4)), in the form +written into the `v1alpha4` draft. The external review that D16 requires was not held; reviews in +the roles above are still invited, and their findings are handled as errata of the `v1alpha4` draft. + +## References + +- [spec/v1alpha4 section 5.6.6](../spec/v1alpha4/README.md#566-workflow-steps) +- [AEP-0001](0001-conditional-steps.md) (conditional steps), [AEP-0006](0006-playbook-kind.md) + (playbooks), [AEP-0024](0024-event-triggers.md) (event triggers) diff --git a/docs/aep-process.md b/docs/aep-process.md index cbb6556..2685419 100644 --- a/docs/aep-process.md +++ b/docs/aep-process.md @@ -9,8 +9,9 @@ > Sections 1 to 6 and 7.0 are the adopted process. Sections 7.1 to 7.5 (conformance mark) remain > a proposal: no conformance mark exists, and no implementation has been certified or has received -> a mark. No AEP has been accepted through the full process yet; AEP-0022 and AEPs 0015 to 0020 -> are accepted by the recorded lead decisions D19 and D22 (section 5.1, rule 1). Nothing here is a +> a mark. No AEP has been accepted through the full process yet; AEP-0022, AEPs 0015 to 0020 and +> AEPs 0001 and 0028 are accepted by the recorded lead decisions D19, D22 and D23 (section 5.1, +> rule 1). Nothing here is a > compliance promise: AWP provides machine-readable governance primitives that can help > organizations implement and enforce their own compliance requirements; compliance depends on the > implementation, organizational controls and applicable regulatory requirements. @@ -138,7 +139,9 @@ Decided on 2026-10-10 ([decision log D16](decisions.md#d16-external-reviewer-bef and not on the decision of the project lead alone. This also applies to alpha API versions. Recorded exceptions, each limited to the AEPs it names: lead decision [D19](decisions.md#d19-step-iteration-goes-into-v1alpha2-directly) (AEP-0022) and - [D22](decisions.md#d22-v1alpha3-becomes-the-current-draft) (AEPs 0015 to 0020). They do not + [D22](decisions.md#d22-v1alpha3-becomes-the-current-draft) (AEPs 0015 to 0020) and + [D23](decisions.md#d23-conditional-steps-and-workflow-steps-start-v1alpha4) (AEPs 0001 and + 0028). They do not change this rule for any other AEP; reviews of the excepted AEPs are still invited and handled as errata. 2. **Shepherd and reviewer are not the author.** The shepherd MUST NOT be listed as an author of @@ -221,7 +224,7 @@ Proposed rules: ### 6.2 Published versions are frozen -- An API version is a **draft** while its text carries the draft status (today: `v1alpha1`, `v1alpha2` and `v1alpha3`, the current draft since D22). +- An API version is a **draft** while its text carries the draft status (today: `v1alpha1`, `v1alpha2`, `v1alpha3`, the current draft since D22, and `v1alpha4`, the next draft since D23). Drafts may change through AEPs and editorial pull requests. - When an API version is **published** (a repository release marks it as published), its normative text, JSON Schema `$id` and conformance requirements are frozen. Afterwards only diff --git a/docs/decisions.md b/docs/decisions.md index cb9d8c3..93e2f86 100644 --- a/docs/decisions.md +++ b/docs/decisions.md @@ -2,8 +2,8 @@ | | | | --- | --- | -| **Status** | Record of the project owner's decisions. D1 and D2 change how this repository works. All other decisions set the direction of AEPs that are still in `Draft` or `Review`; they do not accept any AEP and do not change `v1alpha1`, except D19, which accepts AEP-0022 and starts the `v1alpha2` draft, D20, which adds the `v1alpha3` draft and fixes the `v1alpha1` approval step schema, and D22, which accepts AEPs 0015 to 0020 and makes `v1alpha3` the current draft. D21 refines D17. | -| **Decided** | 2026-10-10 (D1-D12, D16), 2026-11-18 (D17, D18), 2026-11-19 (D19, D20), 2026-11-22 (D21) and 2026-11-25 (D22) by the project lead | +| **Status** | Record of the project owner's decisions. D1 and D2 change how this repository works. All other decisions set the direction of AEPs that are still in `Draft` or `Review`; they do not accept any AEP and do not change `v1alpha1`, except D19, which accepts AEP-0022 and starts the `v1alpha2` draft, D20, which adds the `v1alpha3` draft and fixes the `v1alpha1` approval step schema, D22, which accepts AEPs 0015 to 0020 and makes `v1alpha3` the current draft, and D23, which accepts AEPs 0001 and 0028 and adds the `v1alpha4` draft. D21 refines D17. | +| **Decided** | 2026-10-10 (D1-D12, D16), 2026-11-18 (D17, D18), 2026-11-19 (D19, D20), 2026-11-22 (D21), 2026-11-25 (D22) and 2026-11-27 (D23) by the project lead | | **Related** | [AEP process](aep-process.md), [extension prefix list](registry/extension-prefixes.md), [GOVERNANCE.md](../GOVERNANCE.md) | > Context. AWP is alpha. The owner allows the schema to change where implementation practice shows @@ -164,7 +164,8 @@ a single implementation and were removed from this log by D17. cannot be accepted by its author or by the project lead alone, also not during alpha. Each AEP lists the reviewer roles it needs in its header. Until reviews exist, every AEP stays in `Review`. -- **Exceptions**: D19 (AEP-0022) and D22 (AEPs 0015 to 0020), each limited to the AEPs it names. +- **Exceptions**: D19 (AEP-0022), D22 (AEPs 0015 to 0020) and D23 (AEPs 0001 and 0028), each + limited to the AEPs it names. - **Applied in**: `docs/aep-process.md`, `aep/0000-template.md`, `aep/0001` to `aep/0011`. ### D17. The repository is implementation-neutral @@ -287,6 +288,34 @@ a single implementation and were removed from this log by D17. valid cases of older versions are tested), `README.md`, `AGENTS.md`, `site/`; in the tool repositories `awp-validator` and `awp-editor`. +### D23. Conditional steps and workflow steps start `v1alpha4` + +- **Question**: a common pattern is *analyse, then act*: a risk analysis decides whether a fix + workflow runs. `v1alpha3` has neither step conditions nor a way to start another workflow from a + step. AEP-0001 (conditional steps) is in `Review` without a reviewer since 2026-10-10. Add both to + the current draft `v1alpha3`, or start a new version? +- **Decision**: the project lead accepts AEP-0001 and the new AEP-0028 (workflow steps) in the form + written into a new draft, `v1alpha4`: `v1alpha3` plus exactly these two additions. As in D19 and + D22, this is an exception to D16 for these AEPs only: they are accepted without the external + review. Reviews are still invited; their findings are handled as errata of the draft or as new + AEPs. The exception deviates from aep-process 5.1 rule 1 and the matching sentence of + GOVERNANCE.md; both now name D19, D22 and D23 as the only recorded exceptions, so the rule stands + for every other AEP. The project lead is the shepherd of both AEPs. The owner waives the 5-day + discussion period for this change (alpha waiver of GOVERNANCE.md). AEP-0001 is adapted to + `v1alpha4`: its section is 3.12 (3.10 and 3.11 are taken), it has no `event` root (AEP-0004 is not + accepted), and step outputs, which are text since `v1alpha3`, are read as JSON in conditions. +- **Consequence**: `v1alpha3` stays the current draft (D22) and keeps its scope (section 2); + `v1alpha4` is the next draft, added next to it as `v1alpha3` was added next to `v1alpha2` (D20). + `v1alpha1` to `v1alpha3` are not changed; `awp-check.mjs migrate` converts all three to + `v1alpha4` (from `v1alpha3` only `apiVersion` changes). The CRDs serve `v1alpha3` and `v1alpha4`, + with `v1alpha3` as the storage version. The README, the Quickstart and the defaults of the tools + stay at `v1alpha3`; the website lists `v1alpha4` as the next draft. Making `v1alpha4` the current + draft is a new decision. +- **Applied in**: this log, `aep/0001-conditional-steps.md`, `aep/0028-workflow-steps.md`, + `aep/0006-playbook-kind.md` (alternatives), `spec/v1alpha4/`, `schema/awp.v1alpha4.json`, + `schema/crd/`, `schema/README.md`, `conformance/` (`v1alpha4/`, `conditions.mjs`, `migrate`), + `spec/README.md`, `docs/aep-process.md` (5.1 rule 1, 6.2), `GOVERNANCE.md`, `site/`. + ## 2. Resulting scope of `v1alpha2` Amended by D22: the AEPs that targeted `v1alpha2` and are not accepted target `v1alpha3`, the @@ -294,7 +323,7 @@ current draft. `v1alpha2` keeps what it has (`v1alpha1` plus AEP-0022) and only | AEP | Title | Target | Reason | | --- | --- | --- | --- | -| 0001 | Conditional steps (`when`) | `v1alpha3` (`v1alpha2` until D22) | D5, D6, D22 | +| 0001 | Conditional steps (`when`) | `v1alpha4`, accepted and in the draft (`v1alpha2` until D22, `v1alpha3` until D23) | D5, D6, D22, D23 | | 0002 | Argument constraints, call limits, no prefix wildcards | `v1alpha3` (`v1alpha2` until D22) | D4, D22 | | 0003 | Typed handoffs | `v1alpha3` (`v1alpha2` until D22) | scope decision of 2026-10-10, D22 | | 0004 | Event references | `v1alpha3` (`v1alpha2` until D22) | D7, D22 | @@ -312,8 +341,10 @@ current draft. `v1alpha2` keeps what it has (`v1alpha1` plus AEP-0022) and only | 0015-0020 | Kubernetes resource model, schedule semantics, human input, step outputs, `WorkflowRun`, execution pinning | `v1alpha3`, accepted and in the draft | D20, D22 | | 0021 | Extension model (concept) | proposed for `v1alpha3`, not applied | D20, D22 | | 0023-0027 | Step isolation, event triggers, state, interactive execution, agent engine | proposed for `v1alpha3`, not applied | D18 | +| 0028 | Workflow steps (`type: workflow`) | `v1alpha4`, accepted and in the draft | D23 | -Since D19 `v1alpha2` exists as a draft, since D22 `v1alpha3` is the current draft. `v1alpha3` is +Since D19 `v1alpha2` exists as a draft, since D22 `v1alpha3` is the current draft. Since D23 +`v1alpha4` (`v1alpha3` plus AEPs 0001 and 0028) is the next draft. `v1alpha3` is completed (no longer a draft) when every AEP in its scope is `Accepted` and written into it, or explicitly moved to a later version by an amendment to this table (an AEP that does not find a reviewer must not block the others). @@ -326,7 +357,7 @@ D1 and D2 change how decisions are made. The process in force before (GOVERNANCE least 5 working days of public discussion for substantive changes. Resolution: the owner waived the 5-day period for that change (alpha, no third party depends on the schema yet; recorded under the "Alpha waiver" in GOVERNANCE.md). No AEP changes status beyond `Review` until the external -review (D16) has happened, except the AEPs named by the recorded lead decisions D19 and D22. +review (D16) has happened, except the AEPs named by the recorded lead decisions D19, D22 and D23. ### C2. A larger `v1alpha2` depends on more reviews @@ -351,7 +382,8 @@ explicitly when the author does not choose one. Runtimes never assume a retentio AEPs could in principle be accepted by the project lead during alpha. D16 requires an external reviewer, and aep-process requires a Final Comment Period of at least 10 working days. Resolution: no self-acceptance; AEPs are in `Review` and record the needed reviewer roles. Recorded exceptions: -D19 (AEP-0022) and D22 (AEPs 0015 to 0020). Each names the AEPs it covers; it is no general rule. +D19 (AEP-0022), D22 (AEPs 0015 to 0020) and D23 (AEPs 0001 and 0028). Each names the AEPs it +covers; it is no general rule. ### C7. MCP terms are external reference data From f005282fe053f59a806a137ecdd67059609807b0 Mon Sep 17 00:00:00 2001 From: Erik Date: Fri, 27 Nov 2026 07:29:39 +0100 Subject: [PATCH 5/6] docs(spec): v1alpha4 specification v1alpha4 is the v1alpha3 text plus conditions (section 3.12, matching conformance/conditions.mjs and the schema), the changed execution model (5.6.3), workflow steps (5.6.6), workflow.start, step.skipped and the parent fields of workflow.started, and section 14.3 with the changes from v1alpha3. The Kubernetes binding describes CRDs that serve v1alpha3 (storage) and v1alpha4. The example cve-risk-then-fix shows a condition and a workflow step; spec/README.md lists the new version as the next draft. Signed-off-by: Erik --- spec/README.md | 13 +- spec/v1alpha4/README.md | 2475 +++++++++++++++++ spec/v1alpha4/examples/cve-risk-then-fix.yaml | 122 + spec/v1alpha4/glossary.md | 50 + 4 files changed, 2655 insertions(+), 5 deletions(-) create mode 100644 spec/v1alpha4/README.md create mode 100644 spec/v1alpha4/examples/cve-risk-then-fix.yaml create mode 100644 spec/v1alpha4/glossary.md diff --git a/spec/README.md b/spec/README.md index a8fbf6c..2a61a26 100644 --- a/spec/README.md +++ b/spec/README.md @@ -4,20 +4,22 @@ This directory contains the normative text of the Agentic Workflow Protocol (AWP | API version | Status | Text | | ----------- | ------ | ---- | +| `v1alpha4` | **Next draft / alpha** - `v1alpha3` plus conditional steps (`when`, [AEP-0001](../aep/0001-conditional-steps.md)) and workflow steps (`type: workflow`, [AEP-0028](../aep/0028-workflow-steps.md)), accepted by lead decision [D23](../docs/decisions.md#d23-conditional-steps-and-workflow-steps-start-v1alpha4); not yet the default | [v1alpha4/README.md](v1alpha4/README.md) | | `v1alpha3` | **Current draft / alpha** - `v1alpha2` (so with step iteration) aligned with the Kubernetes resource model, with schedule semantics, human input, step outputs, `WorkflowRun` and execution pinning (AEPs 0015 to 0020, accepted by lead decision [D22](../docs/decisions.md#d22-v1alpha3-becomes-the-current-draft)); the AEPs below join it when accepted | [v1alpha3/README.md](v1alpha3/README.md) | | `v1alpha2` | **Draft / alpha** - `v1alpha1` plus step iteration ([AEP-0022](../aep/0022-step-iteration.md)); errata only since D22 | [v1alpha2/README.md](v1alpha2/README.md) | | `v1alpha1` | **Draft / alpha** - may change incompatibly; errata only | [v1alpha1/README.md](v1alpha1/README.md) | -- Glossary: [v1alpha1](v1alpha1/glossary.md), [v1alpha2](v1alpha2/glossary.md), [v1alpha3](v1alpha3/glossary.md) -- Examples (valid YAML, non-normative): [v1alpha1](v1alpha1/examples/), [v1alpha2](v1alpha2/examples/), [v1alpha3](v1alpha3/examples/) -- Kubernetes CustomResourceDefinitions for `v1alpha3`, generated from the schema: [../schema/crd/](../schema/crd/) +- Glossary: [v1alpha1](v1alpha1/glossary.md), [v1alpha2](v1alpha2/glossary.md), [v1alpha3](v1alpha3/glossary.md), [v1alpha4](v1alpha4/glossary.md) +- Examples (valid YAML, non-normative): [v1alpha1](v1alpha1/examples/), [v1alpha2](v1alpha2/examples/), [v1alpha3](v1alpha3/examples/), [v1alpha4](v1alpha4/examples/) +- Kubernetes CustomResourceDefinitions for `v1alpha3` (storage version) and `v1alpha4`, generated from the schemas: [../schema/crd/](../schema/crd/) ## Roadmap: proposed changes The following AWP Enhancement Proposals are in the status `Draft` or `Review` under the AEP process ([docs/aep-process.md](../docs/aep-process.md), adopted 2026-10-10), or accepted by a lead decision. AEP-0022 (D19, in the `v1alpha2` and `v1alpha3` drafts) and AEPs 0015 to 0020 (D22, in -the `v1alpha3` draft) are accepted without the external review; none of the others is accepted, +the `v1alpha3` draft) and AEPs 0001 and 0028 (D23, in the `v1alpha4` draft) are accepted without +the external review; none of the others is accepted, and none changes `v1alpha1`. Target versions follow the owner's decisions ([decision log](../docs/decisions.md); since D22 every open AEP targets `v1alpha3`); apart from these recorded lead decisions, an AEP is accepted only after an external review and a Final @@ -25,7 +27,7 @@ Comment Period, and may still be moved to a later version or rejected. | AEP | Title | Status | Target | | --- | ----- | ------ | ------ | -| [0001](../aep/0001-conditional-steps.md) | Conditional steps (`when`) | Review | `v1alpha3` | +| [0001](../aep/0001-conditional-steps.md) | Conditional steps (`when`) | Accepted (lead decision D23) | in the `v1alpha4` draft | | [0002](../aep/0002-tool-argument-constraints.md) | Argument constraints and call limits in permissions | Review | `v1alpha3` | | [0003](../aep/0003-typed-handoffs.md) | Typed handoffs between steps | Review | `v1alpha3` | | [0004](../aep/0004-event-references.md) | Event references | Review | `v1alpha3` | @@ -52,6 +54,7 @@ Comment Period, and may still be moved to a later version or rejected. | [0025](../aep/0025-state.md) | State across executions | Draft | proposed for `v1alpha3` | | [0026](../aep/0026-interactive-execution.md) | Interactive execution: `AgentSession` and autonomy levels | Draft | proposed for `v1alpha3` | | [0027](../aep/0027-agent-engine.md) | Agent engine: running an agent with an existing coding agent | Draft | proposed for `v1alpha3` | +| [0028](../aep/0028-workflow-steps.md) | Workflow steps (`type: workflow`) | Accepted (lead decision D23) | in the `v1alpha4` draft | The specification text is licensed under [CC BY 4.0](../LICENSE-SPEC); examples, schemas and code are licensed under [Apache-2.0](../LICENSE). diff --git a/spec/v1alpha4/README.md b/spec/v1alpha4/README.md new file mode 100644 index 0000000..9b3b535 --- /dev/null +++ b/spec/v1alpha4/README.md @@ -0,0 +1,2475 @@ +# Agentic Workflow Protocol (AWP) Specification - v1alpha4 + +| | | +| --- | --- | +| **API version** | `awp.agenticworkflowprotocol.org/v1alpha4` | +| **Status** | **Draft / alpha.** Not stable. | +| **Date** | 2026-11-27 | +| **License** | Text: [CC BY 4.0](../../LICENSE-SPEC). Examples, schemas and code: [Apache-2.0](../../LICENSE) | +| **Glossary** | [glossary.md](glossary.md) | +| **Examples** | [examples/](examples/) | + +> **Status of this document.** This is the next working draft of AWP, its fourth alpha version +> (decision [D23](../../docs/decisions.md#d23-conditional-steps-and-workflow-steps-start-v1alpha4)). +> `v1alpha3` stays the current draft +> ([D22](../../docs/decisions.md#d22-v1alpha3-becomes-the-current-draft)); `v1alpha4` is added next +> to it. `v1alpha4` is `v1alpha3` plus exactly two additions: conditional steps (`when`, +> [section 3.12](#312-conditions), [AEP-0001](../../aep/0001-conditional-steps.md)) and workflow +> steps that start another workflow as a child execution ([section 5.6.6](#566-workflow-steps), +> [AEP-0028](../../aep/0028-workflow-steps.md)). Both AEPs are accepted by lead decision D23 +> without the external review; review findings are handled as errata of this draft. Everything +> else is the text of `v1alpha3`: the Kubernetes resource model, schedule semantics, human input, +> step outputs, `WorkflowRun` and execution pinning (AEPs 0015 to 0020) and step iteration +> ([AEP-0022](../../aep/0022-step-iteration.md)). Every field, every semantic rule and every +> conformance requirement in this document may change incompatibly in a later alpha version. +> Implementations SHOULD NOT rely on `v1alpha4` for production interoperability. No implementation +> is conformant to this version at the time of writing. Changes from `v1alpha1` are listed in +> [section 14.1](#141-changes-from-v1alpha1), changes from `v1alpha2` in +> [section 14.2](#142-changes-from-v1alpha2), changes from `v1alpha3` in +> [section 14.3](#143-changes-from-v1alpha3). + +> **Compliance.** AWP provides machine-readable governance primitives that can help +> organizations implement and enforce their own compliance requirements. Using AWP does not make +> a system compliant with any law, regulation or standard. Compliance depends on the +> implementation, organizational controls and applicable regulatory requirements. + +## Contents + +1. [Introduction](#1-introduction) +2. [Notational conventions](#2-notational-conventions) +3. [Document model](#3-document-model) +4. [Metadata and common spec fields](#4-metadata-and-common-spec-fields) +5. [Kind `Workflow`](#5-kind-workflow) +6. [Kind `Agent`](#6-kind-agent) +7. [Governance](#7-governance) +8. [Kind `Policy` and policy evaluation](#8-kind-policy-and-policy-evaluation) +9. [Supply chain integrity](#9-supply-chain-integrity) +10. [Execution, audit and traceability](#10-execution-audit-and-traceability) +11. [Conformance](#11-conformance) +12. [Security considerations](#12-security-considerations) +13. [Privacy considerations](#13-privacy-considerations) +14. [Versioning](#14-versioning) +15. [References](#15-references) + +--- + +## 1. Introduction + +### 1.1 Purpose + +The Agentic Workflow Protocol (AWP) is an open, declarative specification for defining, +governing, executing and auditing agentic workflows. An AWP document (a *manifest*) describes: + +- **what** a workflow does: its agents, tools, steps, triggers and inputs; +- **within which limits** it may run: budgets, resources, permissions and environments; +- **under which governance** it runs: ownership, data classification, data residency, model + governance, human approval, risk levels, separation of duties and supply-chain integrity; +- **what it leaves behind**: audit events, decision traces and reproducibility records. + +A *runtime* reads a manifest, validates it, enforces its limits and governance rules while +executing it, and emits audit events with standardized semantics. + +AWP is a specification, not a platform. It does not depend on a specific runtime, model +provider, tool vendor or hosting service. + +### 1.2 Relationship to other protocols + +| Protocol | Scope | +| -------- | ----- | +| Model Context Protocol (MCP) | How an agent connects to tools and resources. | +| Agent2Agent (A2A) | How agents communicate with each other. | +| AWP | How agentic workflows are defined, governed, executed and audited. | + +AWP does not replace MCP or A2A. A manifest references MCP servers as tool sources +([section 5.5](#55-tools-and-action-identifiers)) and A2A endpoints as remote agents +([section 5.4.4](#544-remote-agents-a2a)). The wire protocols themselves are out of scope. + +Related work (informative). AWP takes ideas from, but does not depend on: + +- the [Open Workflow Specification](https://github.com/open-workflow-specification/specification) (CNCF, + formerly Serverless Workflow), a DSL for the control flow of workflows (`call`, `do`, `for`, + `fork`, `listen`, `emit`, `try`, `wait`) with CloudEvents for events. It describes what a + workflow does in which order; AWP describes what an agent in a workflow may do (models, tools, + permissions, network, secrets) and how that is governed and audited. Where both cover the same + ground, such as iteration ([section 5.6.5](#565-iteration)) and event triggers, AWP aligns its + wording where it can; +- [agent-sandbox](https://agent-sandbox.sigs.k8s.io/) (Kubernetes SIG Apps), a Kubernetes API for + isolated, stateful execution environments for agents, with templates, warm pools and isolation + backends selected by runtime class. It is one way a platform can isolate steps; AWP states what + must be isolated, not how. + +### 1.3 Non-goals + +AWP does not define: + +- a model API, a prompt format or an agent reasoning strategy; +- the internal reasoning of models. AWP never requires an implementation to record, expose or + store private chain-of-thought data (see [section 10.6](#106-decision-trace)); +- a cryptographic storage format for audit logs (see [section 10.5](#105-tamper-evidence)); +- a registry or distribution protocol for manifests; +- legal or regulatory classifications. Risk levels and data classes in AWP are an + organizational vocabulary, not a regulatory taxonomy. + +--- + +## 2. Notational conventions + +The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", +"RECOMMENDED", "NOT RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as +described in BCP 14 ([RFC 2119], [RFC 8174]) when, and only when, they appear in all capitals, as +shown here. + +Sections, notes and examples marked as *non-normative* do not contain requirements. All YAML +examples in this document and in [examples/](examples/) are non-normative, but they are intended +to be valid against the rules of this document; a discrepancy is a defect of the example. + +The JSON Schema of this API version ([schema/awp.v1alpha4.json](../../schema/awp.v1alpha4.json)) is +normative for document structure (field names, types, required fields, closed objects, +enumerations and patterns). This document is normative for semantics and runtime behaviour. A +discrepancy between the two is a defect that is corrected by an erratum; until then, validators +follow the schema for structure. + +Terms such as *manifest*, *runtime*, *execution*, *step*, *action* and *actor* are defined in the +[glossary](glossary.md). + +Field tables use the following columns: **Field**, **Type**, **Req.** (`yes` = REQUIRED, +`no` = OPTIONAL, `cond.` = conditionally required as described) and **Description**. + +--- + +## 3. Document model + +### 3.1 Serialization + +An AWP manifest is a single document consisting of a mapping (object). Manifests MUST be +representable as JSON [RFC 8259]. Implementations MUST accept YAML 1.2 and JSON. When YAML is +used, implementations MUST reject documents that use YAML features without a JSON equivalent +(custom tags, non-string mapping keys, anchors that create cycles). A file MAY contain several +YAML documents separated by `---`; each document is an independent manifest. + +### 3.2 Top-level structure + +| Field | Type | Req. | Description | +| ----- | ---- | ---- | ----------- | +| `apiVersion` | string | yes | MUST be `awp.agenticworkflowprotocol.org/v1alpha4` for this version. | +| `kind` | string | yes | One of `Workflow`, `Agent`, `Policy`, `WorkflowRun`. | +| `metadata` | object | yes | Object identity: name, namespace, labels and annotations ([section 4.1](#41-metadata)). | +| `spec` | object | yes | Desired state written by the author: the common fields of [section 4.2](#42-common-spec-fields) and the kind-specific content. | +| `status` | object | no | Observed state, written by a runtime or an object store. Reserved. | + +A manifest has no other top-level fields. This is the structure of a Kubernetes resource, so that +a manifest can be stored unchanged as a Kubernetes custom resource or in any other object store +([section 3.10](#310-object-stores-and-kubernetes)). + +`Workflow`, `Agent` and `Policy` are written by authors, versioned and covered by digests and +signatures. `WorkflowRun` is an execution object ([section 10.8](#108-kind-workflowrun)): it +requests and reports one execution, has none of the common spec fields of +[section 4.2](#42-common-spec-fields), and is not covered by digests or signatures. + +```yaml +apiVersion: awp.agenticworkflowprotocol.org/v1alpha4 +kind: Workflow +metadata: + name: hello +spec: + version: 0.1.0 + owner: + team: platform-team + agents: + - id: assistant + model: + provider: ollama + name: qwen3 + workflow: + - id: greet + agent: assistant + task: Say hello. +``` + +Implementations MUST reject a manifest whose `apiVersion` they do not support. Implementations +MUST reject a manifest whose `kind` they do not support. + +`status` is reserved for the runtime or object store that holds the manifest. Authors do not write +it. Validators MUST ignore `status` and MUST NOT reject a manifest because of its content, so that +a manifest read back from an object store stays valid. `status` is not covered by the digest +([section 9.1](#91-manifest-digest)). Its shape is described in [section 3.11](#311-status). Runtimes MUST NOT derive a governance decision from the +`status` of a manifest that they did not write themselves. + +### 3.3 Unknown fields and extensions + +1. **Extension fields** are the members of an `extensions` object. Every object in `spec` that has + defined fields MAY have an `extensions` field, including `spec` itself; `metadata` has none + (non-identifying data belongs in annotations). The keys of `extensions` MUST start with `x-` + and SHOULD follow the conventions of the informative + [list of extension prefixes](../../docs/registry/extension-prefixes.md); the values are + arbitrary. Implementations MAY interpret extension fields and MUST otherwise ignore them. + Extension fields MUST NOT weaken any requirement of this specification. + + ```yaml + workflow: + - id: analyze + agent: worker + extensions: + x-example-cache: warm + ``` + + A field whose name starts with `x-` outside an `extensions` object is an unknown field. + Rationale: a Kubernetes structural schema cannot describe fields with variable names next to + defined fields; an `extensions` object can, and it keeps the extension on the object it + modifies. +2. Any other field that is not defined by this specification is an **unknown field**. + Implementations MUST reject a manifest that contains an unknown field. Rationale: a governance + control that a runtime silently ignores is worse than an error (fail closed). +3. A field that is defined by this specification but belongs to a conformance profile the + implementation does not support MUST cause the manifest to be rejected with an error that + names the field and the missing profile. Implementations MUST NOT execute such a manifest + while ignoring the field. The profile-bound fields are: + + | Profile | Fields | + | ------- | ------ | + | `governance` | `spec.dataPolicy`, `spec.modelPolicy`, `spec.approval`, `spec.policies`, `spec.environments`, steps with `type: approval`, `spec.risk` with `level` `high` or `critical` | + | `audit` | `spec.audit` | + | `security` | `spec.signature` | + | `mcp` | `spec.mcpServers`, tool sources with `type: mcp` | + | `a2a` | agents with `protocol: a2a` | + | `interaction` | steps with `type: input`, agents with `humanInput`, `spec.humanInput` of an `Agent` | + + All other fields, including `spec.owner`, `spec.classification`, `spec.risk` with + `level` `low` or `medium`, `spec.permissions`, `spec.secrets` and `spec.integrity`, belong + to the `core` profile. Governance metadata in core is descriptive; it is enforced by the + `governance` profile. + +### 3.4 Names and identifiers + +- **Object names** (`metadata.name`, `metadata.namespace`): MUST be DNS-1123 labels: at most 63 + characters, lowercase letters, digits and `-`, starting and ending with a letter or a digit + (`^[a-z0-9]([-a-z0-9]*[a-z0-9])?$`). Kubernetes and most other object stores accept these + names unchanged. +- **Names** (input names, secret names in `spec.secrets`, MCP server names): + MUST match `^[a-zA-Z][a-zA-Z0-9_-]{0,62}$`. Secret names MAY use `UPPER_SNAKE_CASE`. +- **Identifiers** (agent `id`, step `id`, rule `id`): MUST match `^[a-z][a-z0-9-]{0,62}$` and + MUST be unique within their list. +- **Action identifiers**: see [section 5.5.3](#553-action-identifiers). + +### 3.5 Versions + +`spec.version` MUST be a Semantic Version 2.0.0 string ([SemVer]). A published manifest +version SHOULD be immutable: two manifests with the same `kind`, `metadata.name` and +`spec.version` but different content SHOULD be treated as an integrity error by registries and +runtimes that can detect it (see [section 9](#9-supply-chain-integrity)). + +### 3.6 Durations + +Durations are strings matching `^([0-9]+(ms|s|m|h|d|w|y))+$`, for example `30s`, `15m`, `1h30m`, +`24h`, `7y`. Units: `ms` milliseconds, `s` seconds, `m` minutes, `h` hours, `d` days (24 h), `w` +weeks (7 d), `y` years (365 d). A duration MUST be greater than zero. + +### 3.7 Timestamps and dates + +Timestamps are strings in RFC 3339 format with time zone, for example `2026-10-05T13:42:11Z`. +Dates are RFC 3339 `full-date` strings, for example `"2027-01-01"`. In YAML, dates and +timestamps SHOULD be quoted so that parsers keep them as strings. + +### 3.8 Digests + +Digests are strings of the form `:`. Implementations MUST support +`sha256` (64 hex characters) and MAY support `sha384` and `sha512`. Implementations MUST reject a +digest with an unsupported algorithm when verification is required. + +### 3.9 Expressions + +String fields marked as *expression-enabled* MAY contain expressions of the form +`${{ }}`. In `v1alpha4` a reference is exactly one of: + +- `inputs.`: the value of a workflow input; +- `steps..outputs.`: an output of a previous step; +- `execution.id`, `execution.environment`: the execution identifier and environment name; +- `forEach.item`, `forEach.item.` (one or more keys, each matching `[a-zA-Z0-9_-]{1,63}`) + and `forEach.index`: the current item of an iterating step and its zero-based position in the + list ([section 5.6.5](#565-iteration)). + +There are no operators, functions or nested expressions in `${{ }}`. Implementations MUST +reject a manifest with any other expression syntax inside `${{ }}`. A reference to +`steps.` MUST only be used in a step that depends on `` directly or +transitively ([section 5.6.3](#563-execution-model)); otherwise the manifest MUST be rejected. + +A reference to `forEach.*` MUST only be used in the `task` and `env` values of a step that +declares `forEach`; otherwise the manifest MUST be rejected. `forEach.item.` selects a field +of an object item, or the element at a zero-based position of a list item; if the field or +position does not exist, the reference evaluates to no value and is rendered as an empty string. + +Expression-enabled fields are: `task`, `env` values, `permissions.tools.*.resources` entries, +`approval.message`, `input.message`, `forEach.items` and `workflow.inputs` values +([section 5.6.6](#566-workflow-steps)). In particular, `command` is **not** expression-enabled +([section 5.6.2](#562-command-steps)). Step conditions (`when`) are not expressions of this section: +they have their own grammar without `${{ }}` ([section 3.12](#312-conditions)). + +### 3.10 Object stores and Kubernetes + +A manifest is a plain YAML or JSON document. AWP does not require Kubernetes: every rule of this +document applies to a manifest read from a file, a Git repository, a registry or a database. The +document model is chosen so that the same manifest can also be stored unchanged in an object store +with Kubernetes semantics. + +- An **object store** holds manifests as objects identified by API group, `kind`, + `metadata.namespace` and `metadata.name`. The Kubernetes API server is one object store; a + runtime without Kubernetes MAY implement its own, for example a database table or a directory of + files. `metadata.namespace` is an isolation scope. A runtime without scopes treats every + manifest as part of one implicit scope and MAY ignore `metadata.namespace`. +- An object store MAY add the fields it populates to `metadata` (`uid`, `resourceVersion`, + `generation`, `creationTimestamp`, `deletionTimestamp`, `deletionGracePeriodSeconds`, + `finalizers`, `ownerReferences`, `managedFields`) and MAY write `status`. Validators MUST accept + and ignore these fields. They are not covered by the digest. +- **Kubernetes binding.** Each kind is a namespaced custom resource of the API group + `awp.agenticworkflowprotocol.org`, version `v1alpha4`, with the plural names `workflows`, + `agents`, `policies` and `workflowruns` and a `status` subresource. The repository publishes + CustomResourceDefinitions generated from the JSON Schemas ([schema/crd/](../../schema/crd/)). + They serve the versions `v1alpha3` and `v1alpha4`, each with the schema of its own version; + `v1alpha3` is the storage version while it is the current draft. The versions differ only by + additions, so a stored `v1alpha3` object is read as `v1alpha4` unchanged. The JSON Schema stays + normative. +- A Kubernetes structural schema cannot express every rule of the JSON Schema (conditional fields, + patterns that need lookahead, key patterns of maps) and none of the semantic rules. The + generated CustomResourceDefinitions therefore keep unknown fields instead of pruning them, so + that they remain visible to validation. A runtime MUST validate every manifest it reads from an + object store against the full rules of this document before acting on it, and MUST NOT act on a + manifest that fails validation (fail closed, [section 3.3](#33-unknown-fields-and-extensions)). + Implementations SHOULD also validate on write, for example with a validating admission webhook. +- Clients that write manifests to a Kubernetes API server SHOULD use strict field validation + (for example `kubectl apply --validate=strict`), so that misplaced fields are reported to the + author instead of being stored or dropped. +- A runtime MUST NOT modify the `spec` of a manifest. Observed state belongs in `status` or in + other objects. + +### 3.11 Status + +`status` is optional. A runtime that writes it SHOULD use the shapes of this section and of +[section 10.8](#108-kind-workflowrun), so that tools can read the state of any runtime in the same +way. The JSON Schema defines them as `StatusCondition`, `ManifestStatus` and `WorkflowRunStatus`. +Validators still ignore `status` ([section 3.2](#32-top-level-structure)). + +**Conditions.** `status.conditions` is a list of objects in the shape of Kubernetes +`metav1.Condition`. The `type` of each entry is unique within the list. + +| Field | Type | Req. | Description | +| ----- | ---- | ---- | ----------- | +| `type` | string | yes | Condition type in CamelCase, optionally with a DNS subdomain prefix (`runtime.example.com/Bound`). | +| `status` | string | yes | `True`, `False` or `Unknown`. | +| `reason` | string | yes | Machine-readable reason in CamelCase, for example `SchemaInvalid`. | +| `message` | string | yes | Human-readable detail; MAY be empty. MUST NOT contain secret values. | +| `lastTransitionTime` | timestamp | yes | When `status` last changed. | +| `observedGeneration` | integer | no | The `metadata.generation` the condition was computed for. | + +**Manifest status.** On `Workflow`, `Agent` and `Policy`, a runtime SHOULD write: + +- `observedGeneration`: the `metadata.generation` it last processed, where the object store has + generations. +- `digest`: the digest it computed for the manifest ([section 9.1](#91-manifest-digest)). +- Condition `Valid`: `True` with reason `Validated` if the manifest passed every rule of this + document that applies to the runtime's supported profiles; otherwise `False` with one of the + reasons `ApiVersionUnsupported`, `SchemaInvalid`, `SemanticInvalid`, `ProfileUnsupported`, + `DigestMismatch` or `SignatureInvalid`. The message SHOULD name the first diagnostic (code and + path). +- Condition `Ready`: `True` if the object can be used now: for a `Workflow`, executions can start + (valid, references resolved, policies loaded, triggers registered); for an `Agent` or `Policy`, + workflows can use it. Otherwise `False` with a reason, for example `Invalid`, + `ReferenceUnresolved`, `PolicyUnavailable` or `EnvironmentNotAllowed`. + +Rules: + +- The condition types `Valid`, `Ready`, `Accepted` and `Succeeded` without prefix are reserved for + AWP. Other condition types of a runtime MUST carry a DNS subdomain prefix that the runtime + controls. +- `status` is a view for people and tools. It is not an audit record (the events of + [section 10](#10-execution-audit-and-traceability) are), and runtimes MUST NOT derive a + governance decision from a `status` they did not write ([section 3.2](#32-top-level-structure)). +- The generated CustomResourceDefinitions type `status` with these shapes and show `Valid` and + `Ready` as columns of `kubectl get`. + +### 3.12 Conditions + +A **condition** is the value of the `when` field of a step ([section 5.6.1](#561-common-step-fields)). +It decides whether the step runs ([section 5.6.3](#563-execution-model)). A condition is written +without `${{ }}`: the whole field is the expression. It is evaluated by the runtime, never by a +model, and has no side effects. + +```text +expr := or +or := and ( "||" and )* +and := unary ( "&&" unary )* +unary := "!" unary | compare +compare := operand ( ( "==" | "!=" | "<" | "<=" | ">" | ">=" | "in" ) operand )? +operand := literal | path | list | "exists" "(" path ")" | "(" expr ")" +path := root ( "." name | "[" index "]" )* +root := "inputs" "." name + | "steps" "." step-id "." "outputs" "." name + | "execution" "." "environment" +list := "[" ( literal ( "," literal )* )? "]" +literal := string | number | "true" | "false" | "null" +``` + +**Lexical rules.** + +- Whitespace between tokens is ignored. +- Strings use double quotes with the escapes of JSON [RFC 8259]. Numbers use the JSON number + syntax. An `index` is a non-negative integer without leading zeros. +- A `name` matches `[A-Za-z_][A-Za-z0-9_-]*`. After a `.`, the words `true`, `false`, `null`, `in` + and `exists` are names too, so an output may be called `in`. +- A comparison operator is not associative: `a == b == c` does not parse; use parentheses and + `&&`. + +**Values and typing.** Typing is strict: there is no truthiness and no coercion. + +- `inputs.` is the value of the input as validated ([section 5.3](#53-inputs)). +- `steps..outputs.` is an output of a step. Outputs are text + ([section 5.6.4](#564-step-outputs)); in a condition the runtime reads the text as JSON if it + parses as a JSON value, and otherwise as a string. So the output text `true` is the boolean + `true`, `42` is a number, `["a"]` is a list, and `high` is the string `"high"`. Path segments after + the output name select into the parsed value: `.key` a member of an object, `[n]` the element at a + zero-based position of a list. +- `execution.environment` is the name of the environment of the execution + ([section 7.10](#710-environments)). +- `==` and `!=` compare two scalars (string, number, boolean or `null`) of any type; values of + different types are unequal. `<`, `<=`, `>` and `>=` need two numbers or two strings; strings are + ordered by Unicode code point. `&&`, `||` and `!` need booleans; `&&` and `||` evaluate from left + to right and stop as soon as the result is known. `in` tests whether a scalar is an element of a + list: a literal list or a path that resolves to a list of scalars. +- `exists(path)` is `true` if the path resolves, including to `null`, and `false` otherwise. +- The result of the condition MUST be a boolean. + +**Evaluation errors.** The following are evaluation errors: reading a path that does not resolve +(outside `exists`), including an output that was not produced or whose step was skipped by +condition; comparing an object or a list with `==`, `!=`, `<`, `<=`, `>` or `>=`; any other type +mismatch; and a result that is not a boolean. An evaluation error is never treated as `false`: it +fails the step with reason `conditionError` ([section 5.6.3](#563-execution-model)). + +**Security.** The path segments `__proto__`, `prototype` and `constructor` MUST be rejected. A path +reads only own members of objects. A condition cannot read secrets, `execution.id`, `forEach.*` or +an event: these roots are not part of the grammar of `v1alpha4`. + +**Limits.** A condition has at most 512 characters, 128 tokens, nesting depth 16 (each `!` and each +pair of parentheses is one level), 16 path segments after the output or input name, 32 list items, +string literals of at most 256 characters and indexes of at most 10000. A manifest that exceeds a +limit MUST be rejected. + +**Static rules.** Validators and runtimes MUST check before an execution starts: + +1. `when` MUST parse in the grammar above within the limits; otherwise the manifest is rejected. +2. Every `steps.` in `when` MUST name an existing step that the step depends on directly or + transitively ([section 5.6.3](#563-execution-model)), and `` MUST be a declared output of + ``; otherwise the manifest is rejected. +3. Every `inputs.` SHOULD name a declared input; validators SHOULD warn otherwise. At run + time, an undeclared input does not resolve. + +```yaml +workflow: + - id: risk + agent: analyst + task: "Rate the risk of ${{ inputs.cve }} for ${{ inputs.repository }}." + outputs: + - name: affected + - name: level + - id: notify + agent: writer + dependsOn: [risk] + when: 'steps.risk.outputs.affected == true && steps.risk.outputs.level in ["high", "critical"]' +``` + +--- + +## 4. Metadata and common spec fields + +### 4.1 Metadata + +`metadata` identifies an object. It contains only fields that have the same meaning in a +Kubernetes `ObjectMeta`, so that object stores and deployment tools keep them intact. + +| Field | Type | Req. | Description | +| ----- | ---- | ---- | ----------- | +| `name` | string | yes | Name of the workflow, agent or policy ([section 3.4](#34-names-and-identifiers)). | +| `namespace` | string | no | Isolation scope in an object store ([section 3.10](#310-object-stores-and-kubernetes)). Usually set by the object store or the deployment tool, not by the author. | +| `labels` | map of string | no | Labels for selection and grouping, in Kubernetes label syntax: a key is an optional DNS subdomain prefix and `/`, then a name of at most 63 characters (alphanumeric at both ends, `-`, `_` and `.` inside); a value has at most 63 characters of the same set and MAY be empty. | +| `annotations` | map of string | no | Non-identifying metadata. Keys use the label key syntax; values are arbitrary strings. | + +Fields populated by an object store are listed in [section 3.10](#310-object-stores-and-kubernetes). +Any other field in `metadata` is an unknown field. + +- Deployment tools (for example GitOps controllers) add and change labels and annotations. + Implementations MUST NOT derive governance decisions from labels or annotations, and neither is + covered by the digest. + +### 4.2 Common spec fields + +The following fields are common to the `spec` of every kind. In `v1alpha1` they were part of +`metadata`. + +| Field | Type | Req. | Description | +| ----- | ---- | ---- | ----------- | +| `version` | string | yes | SemVer version of this manifest ([section 3.5](#35-versions)). | +| `description` | string | no | Human-readable description. | +| `owner` | object | yes | Ownership ([section 7.1](#71-identity-and-ownership)). | +| `classification` | string | cond. | Highest data class the workflow is designed to handle ([section 7.2](#72-data-classification)). REQUIRED for `Workflow` and `Agent` when the governance profile is used. | +| `purpose` | string | no | Intended purpose, in plain language. | +| `risk` | object | no | Risk level and categories ([section 7.7](#77-risk-levels)). | +| `integrity` | object | no | Digest of this manifest ([section 9.1](#91-manifest-digest)). | +| `signature` | object | no | Detached signature reference ([section 9.2](#92-signatures)). | +| `provenance` | object | no | Provenance reference ([section 9.3](#93-provenance)). | + +```yaml +apiVersion: awp.agenticworkflowprotocol.org/v1alpha4 +kind: Workflow +metadata: + name: invoice-processing + labels: + app.kubernetes.io/part-of: finance +spec: + version: 1.2.0 + owner: + team: finance-ai + classification: personal + risk: + level: high + agents: + - id: extractor + model: + provider: example-provider + name: example-model + workflow: + - id: extract + agent: extractor +``` + +Workflows, agents and policies are identified by (`kind`, `metadata.name`, `spec.version`) and, +when present, `spec.integrity.digest`. `metadata.namespace` is not part of the identity: the same +manifest deployed into two namespaces is the same version. + +--- + +## 5. Kind `Workflow` + +A `Workflow` describes a unit of agentic work: the agents and tools it may use, the steps it +executes, the limits it runs within and the governance that applies to it. + +### 5.1 `spec` fields + +| Field | Type | Req. | Section | +| ----- | ---- | ---- | ------- | +| `triggers` | list | no | [5.2](#52-triggers) | +| `inputs` | list | no | [5.3](#53-inputs) | +| `budget` | object | no | [5.7](#57-budgets-and-resources) | +| `agents` | list | yes | [5.4](#54-agents) | +| `mcpServers` | list | no | [5.5.1](#551-mcp-servers) | +| `actionGroups` | map | no | [5.5.4](#554-action-groups) | +| `workflow` | list | yes | [5.6](#56-workflow-steps) | +| `secrets` | list | no | [7.9](#79-secrets) | +| `environment` | object | no | [7.10](#710-environments) | +| `environments` | map | no | [7.10](#710-environments) | +| `permissions` | object | no | [7.5](#75-tool-governance-permissions) | +| `dataPolicy` | object | no | [7.2](#72-data-classification), [7.3](#73-data-residency-and-processing) | +| `modelPolicy` | object | no | [7.4](#74-model-governance) | +| `approval` | object | no | [7.6](#76-human-approval) | +| `policies` | object | no | [8.1](#81-workflow-policies) | +| `audit` | object | no | [10.2](#102-audit-configuration) | + +A complete example is [examples/vulnerability-fixer.workflow.yaml](examples/vulnerability-fixer.workflow.yaml). +A governance-heavy example is [examples/invoice-processing.workflow.yaml](examples/invoice-processing.workflow.yaml). + +### 5.2 Triggers + +`spec.triggers` lists the ways an execution can be started. If `triggers` is absent, the workflow +can only be started manually. Each entry has a `type`: + +| `type` | Fields | Description | +| ------ | ------ | ----------- | +| `manual` | - | Started by a human or an API call on behalf of a human. | +| `schedule` | `cron` (REQUIRED, 5-field cron expression), `timezone` (IANA name, default `UTC`) | Started on a schedule. | +| `event` | `source` (REQUIRED), `eventType` (REQUIRED), `filter` (map of string, OPTIONAL) | Started by an external event, for example a webhook. | + +```yaml +triggers: + - type: manual + - type: schedule + cron: "0 6 * * 1-5" + timezone: Europe/Berlin + - type: event + source: git.example.com + eventType: pull_request.opened + filter: + repository: example-org/web-shop +``` + +- Implementations MUST record the trigger that started an execution in the `workflow.started` + event. +- The mapping of `source` and `eventType` to concrete event sources is implementation-defined. + Implementations MUST verify the authenticity of event sources they support (for example + webhook signatures) and MUST NOT start an execution for an event that fails verification. +- A `schedule` trigger supplies no input values: an execution it starts uses the `default` of + each input ([section 5.3](#53-inputs)). A workflow with a required input therefore cannot be + started by its `schedule` triggers. +**Schedule semantics.** A `schedule` trigger has these additional fields: + +| Field | Type | Req. | Description | +| ----- | ---- | ---- | ----------- | +| `concurrencyPolicy` | string | no | What happens at a tick while an execution started by this trigger is still running: `forbid` (default) skips the tick, `allow` starts another execution, `replace` cancels the running execution and starts a new one. | +| `startingDeadline` | duration | no | How late an execution for a missed tick may still start. Absent: missed ticks are skipped. | + +```yaml +triggers: + - type: schedule + cron: "0 */2 * * *" + timezone: Europe/Berlin + concurrencyPolicy: forbid + startingDeadline: 15m +``` + +- A **tick** is a point in time matched by `cron` in `timezone`. Each tick starts at most one + execution. The runtime MUST use the tick time, not the start time, as `scheduledAt` in the + `trigger` data of `workflow.started`. +- `concurrencyPolicy` only considers executions started by the same trigger entry of the same + workflow (`kind`, `metadata.namespace`, `metadata.name`), regardless of their version. Manual and + event-triggered executions are not considered. With `replace`, the runtime MUST cancel the + running execution as if an actor of type `system` had cancelled it, emit `workflow.cancelled` + with `reason: replaced`, and start the new execution only after the cancellation has completed. + The default is `forbid` because agent executions often run longer than a cron interval. +- A tick is **missed** when the runtime could not start an execution at the tick time, for + example because it was not running. Without `startingDeadline` the runtime MUST NOT start + executions for missed ticks. With `startingDeadline` the runtime MAY start one execution for the + latest missed tick if the current time is at most `startingDeadline` after that tick; it MUST + NOT start executions for older missed ticks and MUST NOT start more than one execution to catch + up. +- For every tick that does not start an execution (skipped by `forbid`, missed, or past + `startingDeadline`) the runtime MUST emit `trigger.skipped` with the tick time and the reason + ([section 10.4](#104-event-types)). A runtime that cannot determine individual missed ticks (for + example after a long outage) MAY emit one `trigger.skipped` event with the first and the last + missed tick. +- An execution started by `schedule` or `event` has the actor type `system`; an execution started + by `manual` has the actor type `human` (see [section 10.3](#103-event-envelope)). + +### 5.3 Inputs + +`spec.inputs` declares the parameters of an execution. + +| Field | Type | Req. | Description | +| ----- | ---- | ---- | ----------- | +| `name` | string | yes | Input name. | +| `type` | string | yes | `string`, `integer`, `number`, `boolean`, `object`, `array` or `artifact` (a reference to a file or document). | +| `required` | boolean | no | Default `false`. | +| `default` | any | no | Default value. MUST match `type`. MUST NOT be set when `required` is `true`. | +| `description` | string | no | Description. | +| `pattern` | string | no | ECMA-262 regular expression for `string` inputs. | +| `enum` | list | no | Allowed values. | +| `classification` | string | no | Data class of the input ([section 7.2](#72-data-classification)). Default: `spec.classification`. | + +- Implementations MUST validate all inputs against their declaration **before** the execution + starts and MUST NOT start an execution with invalid or missing required inputs. +- Inputs MUST NOT be used to pass secrets. Secrets are declared in `spec.secrets` and referenced + with `secretRef` ([section 7.9](#79-secrets)). + +### 5.4 Agents + +`spec.agents` declares the agents a workflow may use. An entry is one of three forms: an +**inline agent**, an **agent reference** or a **remote agent**. + +#### 5.4.1 Inline agents + +| Field | Type | Req. | Description | +| ----- | ---- | ---- | ----------- | +| `id` | string | yes | Identifier, unique within the workflow. | +| `model` | object | yes | Model selection and model governance metadata ([section 5.4.3](#543-model-object)). | +| `instructions` | string | no | System-level instructions for the agent. | +| `promptRef` | object | no | Reference to a versioned prompt template: `name`, `version` (REQUIRED), `digest` (OPTIONAL). MUST NOT be combined with `instructions`. | +| `tools` | list | no | Tool sources ([section 5.5](#55-tools-and-action-identifiers)). Default: no tools. | +| `permissions` | object | no | Agent-level permissions ([section 7.5](#75-tool-governance-permissions)). | +| `budget` | object | no | Agent-level budget ([section 5.7](#57-budgets-and-resources)). | +| `humanInput` | object | no | Lets the agent ask a person during its step ([section 5.8.2](#582-agent-requests)). | + +```yaml +agents: + - id: researcher + model: + provider: anthropic + name: claude + instructions: Summarize affected files and the recommended fix. + tools: + - type: mcp + server: github + tools: + - search_code + - get_file_contents +``` + +#### 5.4.2 Agent references + +An agent reference uses a separately published manifest of kind `Agent` ([section 6](#6-kind-agent)). + +| Field | Type | Req. | Description | +| ----- | ---- | ---- | ----------- | +| `id` | string | yes | Identifier within this workflow. | +| `ref` | object | yes | `name` (REQUIRED), `version` (REQUIRED, exact SemVer version, no ranges), `digest` (OPTIONAL). | +| `permissions` | object | no | Additional restrictions. | +| `budget` | object | no | Additional limits. | + +- An agent reference MUST NOT contain `model`, `instructions`, `promptRef` or `tools`. +- How a runtime resolves a reference (registry, file system, repository) is implementation-defined. +- If `ref.digest` is present, the runtime MUST verify that the resolved `Agent` manifest has this + digest ([section 9.1](#91-manifest-digest)) and MUST reject the workflow on mismatch. +- `permissions` and `budget` of the reference can only **restrict** the referenced agent further + (see [section 7.5.4](#754-combining-permissions) and [section 5.7](#57-budgets-and-resources)). + +#### 5.4.3 Model object + +| Field | Type | Req. | Description | +| ----- | ---- | ---- | ----------- | +| `provider` | string | yes | Provider identifier, for example `anthropic`, `openai`, `azure-openai`, `bedrock`, `ollama`, `vllm`. Provider identifiers are opaque strings; their mapping to endpoints is implementation-defined. | +| `name` | string | yes | Model name or family as known to the provider. | +| `version` | string | no | Exact model version or snapshot identifier. | +| `region` | string | no | Region where the model processes data, for example `EU`. Used by data residency checks. | +| `approval` | object | no | `status` (`approved`, `pending`, `rejected`, `revoked`), `expires` (date), `approvedBy` (string). | +| `riskClassification` | string | no | `low`, `medium`, `high` or `critical` (organizational model risk). | +| `evaluation` | object | no | `status` (`passed`, `failed`, `pending`, `notEvaluated`), `ref` (URI of an evaluation report). | +| `allowedUseCases` | list of string | no | Use cases the model is approved for. | + +```yaml +model: + provider: openai + name: gpt-5 + version: "2026-08" + approval: + status: approved + expires: "2027-01-01" +``` + +- If `version` is absent, the runtime chooses the version and MUST record the version actually + used in the reproducibility record ([section 10.7](#107-reproducibility-record)) when the + provider reports it. +- The governance fields (`approval`, `riskClassification`, `evaluation`, `allowedUseCases`) are + declarations by the manifest author. Runtimes implementing the governance profile MAY replace + them with values from an authoritative model inventory and SHOULD do so when one is configured. + +#### 5.4.4 Remote agents (A2A) + +A remote agent is executed by another system and reached through the A2A protocol. + +| Field | Type | Req. | Description | +| ----- | ---- | ---- | ----------- | +| `id` | string | yes | Identifier within this workflow. | +| `protocol` | string | yes | MUST be `a2a`. | +| `endpoint` | string | yes | HTTPS URL of the A2A endpoint. | +| `agentCard` | object | no | `url` (REQUIRED), `digest` (OPTIONAL) of the remote agent card. | +| `auth` | object | no | `secretRef` to the credential ([section 7.9](#79-secrets)). | + +```yaml +agents: + - id: security-agent + protocol: a2a + endpoint: https://agents.example.com/a2a/security-review + auth: + secretRef: REVIEW_AGENT_TOKEN +``` + +- A remote agent MUST NOT contain `model`, `instructions`, `promptRef` or `tools`: the local + runtime cannot enforce them. +- Every message sent to a remote agent is the action `a2a..send` and is subject to + permissions, policies, approvals and data policies like any tool action + ([section 7](#7-governance)). For data residency and processing checks, the provider identifier + of a remote agent is the host name of `endpoint`. +- If `agentCard.digest` is present, the runtime MUST verify the agent card before the first + message and MUST NOT contact the agent on mismatch. +- The runtime MUST NOT send `http://` (unencrypted) traffic to remote agents. + +Example: [examples/security-review.a2a.workflow.yaml](examples/security-review.a2a.workflow.yaml). + +### 5.5 Tools and action identifiers + +#### 5.5.1 MCP servers + +`spec.mcpServers` declares MCP servers that agents may use. + +| Field | Type | Req. | Description | +| ----- | ---- | ---- | ----------- | +| `name` | string | yes | Server name, referenced by tool sources. | +| `transport` | string | yes | `stdio` or `streamable-http`. | +| `url` | string | cond. | REQUIRED for `streamable-http`. MUST use `https`. | +| `image` | string | cond. | For `stdio`: container image that runs the server. SHOULD be pinned by digest (`name@sha256:...`); MUST be pinned by digest under the security profile. | +| `version` | string | no | Expected server version. | +| `auth` | object | no | `secretRef` to the credential. | + +If a tool source references a server that is not declared in `spec.mcpServers`, the runtime MAY +resolve it from its own configuration ("binding"). Portable manifests SHOULD declare all servers. +The runtime MUST reject a manifest that references a server it can resolve neither way. + +#### 5.5.2 Tool sources + +Agents list tool sources in `tools`: + +| Field | Type | Req. | Description | +| ----- | ---- | ---- | ----------- | +| `type` | string | yes | `mcp` or `builtin`. | +| `server` | string | cond. | REQUIRED for `mcp`: name of an MCP server. | +| `name` | string | cond. | REQUIRED for `builtin`: name of a runtime-provided tool, for example `shell`. | +| `tools` | list of string | no | For `mcp`: the tool names of the server the agent may see. Default: all tools of the server. | + +- The runtime MUST only expose to an agent the tools of the listed sources, filtered by `tools` + when present. Exposure does not imply permission: every call is still evaluated + ([section 7.5](#75-tool-governance-permissions)). +- Built-in tools are implementation-defined. The built-in tool `shell` corresponds to the action + `shell.execute`. + +#### 5.5.3 Action identifiers + +An **action** is any operation of a workflow that has an effect outside the model: a tool call, a +command step, a message to a remote agent. Every action has an **action identifier**: + +- an MCP tool call has the identifier `.`, for example `github.search_code`; +- a command step and a call of the built-in `shell` tool have the identifier `shell.execute`; +- a message to a remote agent has the identifier `a2a..send`; +- a workflow step has the identifier `workflow.start` ([section 5.6.6](#566-workflow-steps)); +- other built-in tools have implementation-defined identifiers. + +Action identifiers MUST match `^[a-zA-Z][a-zA-Z0-9_-]*(\.[a-zA-Z0-9_-]+)+$`. In permission keys, +policy conditions and approval lists, a final segment `*` matches any action with that prefix +(for example `github.*`). + +**Well-known actions.** The following identifiers have reserved meaning. Manifests map concrete +tool actions to them with action groups ([section 5.5.4](#554-action-groups)), so that +governance rules can be written independently of tool vendors: + +| Identifier | Meaning | +| ---------- | ------- | +| `shell.execute` | Execute a command in a shell or sandbox. | +| `git.push` | Push commits to a remote repository. | +| `git.forcePush` | Rewrite history on a remote repository. | +| `git.merge` | Merge a change into a protected or default branch. | +| `pullRequest.create` | Open a pull/merge request. | +| `production.deploy` | Deploy to a production environment. | +| `external.communication` | Send information to a party outside the organization (mail, chat, public comment). | +| `workflow.start` | Start another workflow as a child execution from a workflow step ([section 5.6.6](#566-workflow-steps)). | + +Model invocations are not actions. They are governed by the model policy and the data policy +([sections 7.3](#73-data-residency-and-processing) and [7.4](#74-model-governance)). + +#### 5.5.4 Action groups + +`spec.actionGroups` maps a group identifier to a list of action identifiers: + +```yaml +actionGroups: + github.read: + - github.search_code + - github.get_file_contents + git.merge: + - github.merge_pull_request +``` + +- A group identifier MUST be a valid action identifier and MAY be a well-known action. +- An action **matches** a key (in permissions, approvals and policies) if the key equals the + action identifier, if the key is a group that contains the action, or if the key is a wildcard + pattern that matches the action identifier. +- Groups MUST NOT contain other groups. +- If no group maps a concrete action to a well-known action, rules on that well-known action do + not apply to it. Manifest authors are responsible for complete mappings; runtimes SHOULD warn + (`awp lint`) when a tool is likely to have such an effect but is not mapped. Runtimes MAY + provide built-in mappings for tools they know and MUST document them. + +### 5.6 Workflow steps + +`spec.workflow` is a list of steps. Steps form a directed acyclic graph through `dependsOn`. + +#### 5.6.1 Common step fields + +| Field | Type | Req. | Description | +| ----- | ---- | ---- | ----------- | +| `id` | string | yes | Step identifier, unique within the workflow. | +| `type` | string | no | `agent`, `command`, `approval`, `input` or `workflow`. Default: `agent`. | +| `dependsOn` | list of string | no | Step identifiers that MUST complete successfully (or be skipped by condition) before this step starts ([section 5.6.3](#563-execution-model)). | +| `when` | string | no | Condition ([section 3.12](#312-conditions)), at most 512 characters. The step runs only if it evaluates to `true`; otherwise it is skipped with reason `condition`. Allowed on every step type. | +| `timeout` | duration | no | Maximum wall-clock time of the step. | +| `retries` | integer | no | Number of retries after a failure. Default `0`. MUST NOT exceed `budget.resources.maxRetries` if set. | +| `outputs` | list | no | Declared outputs: `name` (REQUIRED, `^[A-Za-z_][A-Za-z0-9_]{0,62}$`, also the file name of [section 5.6.4](#564-step-outputs)), `classification` (OPTIONAL), `description` (OPTIONAL). A workflow step declares only `executionId` and `status` ([section 5.6.6](#566-workflow-steps)). | +| `budget` | object | no | Step-level limits; can only restrict the workflow budget. | +| `forEach` | object | no | Run the step once per item of a list ([section 5.6.5](#565-iteration)). Only on `agent` and `command` steps. | + +Fields per type: + +| `type` | Fields | +| ------ | ------ | +| `agent` | `agent` (REQUIRED, id of an entry in `spec.agents`), `task` (OPTIONAL, expression-enabled string: the task for this step), `forEach` (OPTIONAL) | +| `command` | `command` (REQUIRED, string), `image` (OPTIONAL, container image), `env` (OPTIONAL, map of expression-enabled strings), `workingDir` (OPTIONAL), `forEach` (OPTIONAL) | +| `approval` | `approval` (REQUIRED, object with `approvers`, `minApprovals`, `timeout`, `onTimeout`, `message`; see [section 7.6](#76-human-approval)) | +| `input` | `input` (REQUIRED, object with `message`, `answerSchema`, `answerers`, `timeout`, `onTimeout`, `default`, `classification`; see [section 5.8](#58-human-input)) | +| `workflow` | `workflow` (REQUIRED, object with `ref`, `version`, `inputs`, `wait`; see [section 5.6.6](#566-workflow-steps)). No `agent`, `task`, `command`, `image`, `env`, `workingDir`, `approval`, `input` or `forEach`. | + +```yaml +workflow: + - id: investigate + agent: researcher + task: "Investigate ${{ inputs.cve }} in ${{ inputs.repository }}." + outputs: + - name: affected + - id: fix + agent: fixer + dependsOn: + - investigate + when: steps.investigate.outputs.affected == true + - id: test + type: command + command: npm test + dependsOn: + - fix +``` + +#### 5.6.2 Command steps + +- A command step is the action `shell.execute` and is subject to permissions, policies and + approvals like any other action. +- `command` is **not** expression-enabled. Implementations MUST NOT substitute expressions into + the command text. Values from inputs and step outputs are passed as environment variables + through `env`: + + ```yaml + - id: scan + type: command + command: ./scripts/scan.sh "$REPOSITORY" + env: + REPOSITORY: "${{ inputs.repository }}" + dependsOn: + - fix + ``` + + Rationale: interpolating untrusted values (inputs, model output) into a shell command is a + command injection vulnerability. +- Implementations MUST execute command steps in an isolated environment (for example a + container or sandbox) and MUST apply `permissions.network` and `permissions.filesystem` to it. +- If a command step names an `image`, the command MUST run in that image (resolved and pinned as + described in [section 10.1](#101-execution-identity)). A runtime that cannot run container + images MUST reject such a workflow; it MUST NOT run the command in another environment. Without + `image`, the runtime chooses the environment, and the step is portable only between runtimes + that provide the same tools. +- The step succeeds if the command exits with status `0`. + +#### 5.6.3 Execution model + +1. The runtime MUST reject a workflow whose steps contain a cycle, a duplicate `id`, a + `dependsOn` entry that names a non-existent step, or an `agent` that names a non-existent + agent. +2. A step becomes **ready** when every step in its `dependsOn` has the status `succeeded`, or the + status `skipped` with reason `condition`. Steps without `dependsOn` are ready when the execution + starts. +3. When a step with `when` becomes ready, the runtime evaluates the condition + ([section 3.12](#312-conditions)) before anything else, including `forEach.items`, approvals and + the start of a child execution. `true` runs the step. `false` gives the step the status `skipped` + with reason `condition`; it does not run and produces no outputs. An evaluation error gives the + step the status `failed` with reason `conditionError`. On an iterating step + the condition is evaluated once, before the fan-out ([section 5.6.5](#565-iteration)). +4. Ready steps MAY run concurrently, limited by `budget.resources.maxConcurrency` (default `1`). + When several steps are ready and concurrency is limited, the runtime SHOULD start them in the + order in which they appear in `spec.workflow`. +5. Step statuses are `pending`, `running`, `waitingForApproval`, `waitingForInput`, `succeeded`, + `failed`, `skipped` and `cancelled`. A `skipped` step has a reason: `condition` or + `dependencyFailed`. If a step fails (after its retries), all steps that depend on it directly or + transitively MUST get the status `skipped` with reason `dependencyFailed`. +6. An **agent step** runs the agent with its task until the agent signals completion + ([section 5.6.4](#564-step-outputs)), a limit is + reached or the step times out. During the step, the agent MAY call the tools exposed to it; + each call is an action. +7. An execution **succeeds** if every step has the status `succeeded`, or `skipped` with reason + `condition`. Otherwise it fails. An execution is **cancelled** if it was stopped by an actor + before completion. +8. Outputs of a step are available to dependent steps through expressions and conditions. Outputs + that are not declared in `outputs` MUST NOT be referenced. How steps produce outputs is defined + in [section 5.6.4](#564-step-outputs). +9. A step that was skipped by condition has no outputs. In a condition, reading one of its outputs + is an evaluation error, except inside `exists()`, which returns `false`. A step whose + expression-enabled fields ([section 3.9](#39-expressions)) reference such an output fails with + reason `missingOutput` before it runs. Authors guard such steps with `when` and `exists()`. + +#### 5.6.4 Step outputs + +A step produces the values of its declared `outputs` in a way that does not depend on the +runtime, so that a command image or an agent prompt works on every runtime. + +**Command steps.** + +- Before the command starts, the runtime creates an empty directory that only this attempt of the + step can write, and passes its absolute path in the environment variable `AWP_OUTPUTS`. The + directory is writable even if `permissions.filesystem` does not list it. +- To produce an output, the command writes a regular file named exactly like the output into that + directory, for example `"$AWP_OUTPUTS/report"`. The value is the content of the file as UTF-8 + text; one trailing line feed is removed. A file that is not valid UTF-8 fails the step with the + reason `outputInvalid`. +- After the command has exited with status `0`, the runtime reads the files of the declared + outputs. It MUST NOT follow symbolic links. Files and directories with other names are ignored; + the runtime SHOULD warn about them. +- The runtime also sets `AWP_EXECUTION_ID` ([section 10.1](#101-execution-identity)), `AWP_STEP_ID` + and `AWP_ATTEMPT` (starting at `1`), and `AWP_FOREACH_INDEX` in an item run of an iterating step + ([section 5.6.5](#565-iteration)). Names with the prefix `AWP_` are reserved for the runtime; + `env` MUST NOT define them. +- Standard output and standard error are logs, not outputs. + +```yaml +- id: count + type: command + image: registry.example.com/tools/diff@sha256:... + command: ./diff.sh > "$AWP_OUTPUTS/new" && wc -l < "$AWP_OUTPUTS/new" > "$AWP_OUTPUTS/count" + dependsOn: + - collect + outputs: + - name: new + - name: count +``` + +**Agent steps.** + +- The runtime MUST offer the agent a way to end its step together with the values of the declared + outputs. It SHOULD be a built-in tool named `complete_step` with one string parameter per + declared output, described by the output's `description`. Like the tool for human input + ([section 5.8.2](#582-agent-requests)), it is not an action: permissions and policies do not + apply to it and it is not listed in `tools`. +- If an agent step declares outputs and the agent ends without completing the step, the step fails + with the reason `notCompleted`. A step without outputs is also completed when the agent ends its + turn without a tool call. +- A runtime MAY accept other completion formats (for example a structured final message) and + documents them; prompts that rely on them are not portable. + +**Input steps** provide the output `answer` ([section 5.8](#58-human-input)). **Workflow steps** +provide the outputs `executionId` and `status` ([section 5.6.6](#566-workflow-steps)). Approval +steps produce no outputs. + +**All steps.** + +- A runtime MUST accept outputs of at least 256 KiB each and 1 MiB per step in total. It MAY + accept more and states its limits in the conformance statement + ([section 11.3](#113-conformance-statement)). A larger output fails the step with the reason + `outputTooLarge`; the runtime MUST NOT truncate it. +- A declared output that the step did not produce has no value. Referencing it is an evaluation + error; the step that did not produce it still succeeds. +- Outputs of an attempt that fails, times out or is cancelled are discarded. Only the outputs of + the successful attempt are available to dependent steps. +- Each produced output is recorded as `artifact.created` with its digest, and with its content only + under `payload: full` ([section 10.4](#104-event-types)). + +#### 5.6.5 Iteration + +`forEach` runs an `agent` or `command` step once per item of a list that is known when the step +becomes ready. It is a bounded fan-out, not a loop with a condition: the number of item runs +never depends on what an item run produces. It is the same as in `v1alpha2` (section 5.6.4 +there), combined with the step output interface of [section 5.6.4](#564-step-outputs). + +| Field | Type | Req. | Description | +| ----- | ---- | ---- | ----------- | +| `items` | string | yes | Exactly one reference, and nothing else: `${{ inputs. }}` of an input with `type: array`, or `${{ steps..outputs. }}` of a step this step depends on. | +| `maxItems` | integer | yes | Maximum number of items, at least `1`. | +| `concurrency` | integer | no | Maximum number of item runs at the same time. Default `1`. MUST NOT exceed the effective `budget.resources.maxConcurrency`. | + +```yaml +workflow: + - id: images + agent: scanner + task: "List the container images of ${{ inputs.repository }} as a JSON list." + outputs: + - name: refs + - id: scan + type: command + image: registry.example.com/tools/scan@sha256:... + command: ./scan-image.sh "$IMAGE" > "$AWP_OUTPUTS/report" + env: + IMAGE: "${{ forEach.item }}" + dependsOn: + - images + forEach: + items: "${{ steps.images.outputs.refs }}" + maxItems: 20 + concurrency: 2 + outputs: + - name: report +``` + +1. When the step becomes ready, the runtime MUST evaluate `items`. If the value is not a list, or + the list has more than `maxItems` entries, the step MUST fail without running any item. The + runtime MUST NOT truncate the list. An empty list makes the step succeed without item runs. + An output referenced by `items` is text ([section 5.6.4](#564-step-outputs)); the runtime + parses it as JSON, and a value that is not a JSON array fails the step with the reason + `itemsNotAList`. +2. Each item is one **item run** of the step. In the item run, `forEach.item` is the item and + `forEach.index` its zero-based position. `timeout` and `retries` apply to each item run. For a + command step the runtime also sets `AWP_FOREACH_INDEX` to the position. +3. Each attempt of an item run produces its outputs as described in + [section 5.6.4](#564-step-outputs): its own `$AWP_OUTPUTS` directory, or its own + `complete_step`. The size limits of that section apply to each item run. +4. The runtime MUST NOT run more than `concurrency` item runs at the same time. Each running item + run counts as a running step for `budget.resources.maxConcurrency`. Item runs SHOULD start in + list order. +5. If an item run fails (after its retries), the runtime MUST NOT start further item runs of the + step. It SHOULD let running item runs finish. The step then fails, with the effect described in + [section 5.6.3](#563-execution-model). +6. When all item runs have succeeded, the step succeeds. Each declared output of the step is a + list with one entry per item, in the order of `items`; an item run that did not produce an + output contributes `null`. A dependent step that references the output receives the list as + JSON text. +7. Usage of all item runs counts against the step budget, the agent budget and the workflow + budget ([section 5.7](#57-budgets-and-resources)). The step budget limits the step as a whole, + not each item run. +8. While at least one item run waits for an approval, the step has the status + `waitingForApproval`; while at least one waits for human input and none for an approval, + `waitingForInput`; otherwise, while item runs are active, `running`. + +#### 5.6.6 Workflow steps + +A step with `type: workflow` starts another `Workflow` of the same scope as a **child execution**, +for example a fix workflow that runs only when a risk analysis found the repository affected. + +```yaml +- id: fix + type: workflow + dependsOn: [risk] + when: steps.risk.outputs.affected == true + workflow: + ref: cve-fixer + version: "^0.5.0" + inputs: + repository: "${{ inputs.repository }}" + cve: "${{ inputs.cve }}" + wait: true + outputs: + - name: executionId + - name: status +``` + +| Field | Type | Req. | Description | +| ----- | ---- | ---- | ----------- | +| `ref` | string | yes | `metadata.name` of a `Workflow` in the same scope (`metadata.namespace`, [section 3.10](#310-object-stores-and-kubernetes)); a DNS-1123 label ([section 3.4](#34-names-and-identifiers)). | +| `version` | string | no | SemVer range of the child workflow, for example `^0.5.0`. Default: the version the runtime treats as current. | +| `inputs` | map of string | no | Input values of the child execution. Values are expression-enabled ([section 3.9](#39-expressions)). | +| `wait` | boolean | no | Default `true`: the step waits until the child execution has ended. `false`: the step ends as soon as the child execution has started. | +| `extensions` | object | no | Extension fields ([section 3.3](#33-unknown-fields-and-extensions)). | + +1. **Starting the child is an action.** Starting the child execution is the well-known action + `workflow.start` ([section 5.5.3](#553-action-identifiers)). It is subject to the permissions, + policies and approvals of the parent like any other action. +2. **Resolution.** When the step runs, the runtime resolves `ref` and `version` to one workflow + manifest of the same scope. If it finds none, or more than one candidate version cannot be + ordered, the step fails with reason `workflowNotFound`. +3. **Inputs.** The runtime evaluates `inputs` and validates the values against the declared inputs + of the child workflow ([section 5.3](#53-inputs)), including required inputs and defaults. A + mismatch fails the step with reason `inputInvalid` before the child starts. +4. **Separate execution.** The child is an execution of its own, with its own execution identifier, + pinned to its own manifests ([section 10.1](#101-execution-identity)). It runs with the + permissions, policies, approvals, budget and environment rules of the child workflow; the + permissions of the parent do not extend to it, and the child's do not extend to the parent. +5. **Budget.** Usage of the child execution (cost and duration) also counts against the remaining + budget of the parent execution and of the step ([section 5.7](#57-budgets-and-resources)). When + that budget is exhausted, the runtime MUST stop the child execution and fail the step with reason + `budgetExceeded`. +6. **Cycles and depth.** A runtime MUST reject the start of a child execution that would run a + workflow that is already part of the chain of parent executions (a workflow that starts itself + directly or transitively); the step fails with reason `workflowCycle`. The chain MUST NOT be + deeper than 5 executions below the top-level execution; a deeper start fails the step with + reason `workflowDepthExceeded`. Validators SHOULD detect static cycles when they can resolve the + references. +7. **Outputs.** The runtime provides two outputs: `executionId`, the execution identifier of the + child, and `status`, the final status of the child execution (`succeeded`, `failed` or + `cancelled`), or `started` with `wait: false`. A workflow step MUST NOT declare other outputs; + outputs of the child workflow are not passed to the parent in `v1alpha4`. +8. **Result.** With `wait: true` the step succeeds only if the child execution succeeded; otherwise + it fails with reason `childFailed`. With `wait: false` the step succeeds when the child execution + has started; the parent does not wait for it, and the result of the child does not affect the + parent. +9. **Cancellation.** Cancelling the parent execution, or the step timing out, cancels a child + execution started with `wait: true`. +10. `forEach` is not allowed on a workflow step in `v1alpha4`. +11. The child's `workflow.started` event carries `parentExecutionId` and `parentStepId` + ([section 10.4](#104-event-types)). + +A complete example with a condition and a workflow step: +[examples/cve-risk-then-fix.yaml](examples/cve-risk-then-fix.yaml). + +Workflow steps belong to the `core` profile. A runtime that does not support starting workflows +from a step MUST reject a manifest with `type: workflow` (fail closed, +[section 3.3](#33-unknown-fields-and-extensions)). + +### 5.7 Budgets and resources + +`budget` limits an execution. It MAY appear on the workflow (`spec.budget`), on an agent and on a +step. + +| Field | Type | Description | +| ----- | ---- | ----------- | +| `maxCostUsd` | number | Maximum cost in US dollars. | +| `maxSteps` | integer | Maximum number of steps of progress: each model invocation and each command execution counts as one. | +| `maxDuration` | duration | Maximum wall-clock duration. | +| `resources.maxTokens` | integer | Maximum number of model tokens (input plus output). | +| `resources.maxToolCalls` | integer | Maximum number of actions. | +| `resources.maxRetries` | integer | Maximum number of retries per step. | +| `resources.maxConcurrency` | integer | Maximum number of concurrently running steps; each running item run of an iterating step counts as one ([section 5.6.5](#565-iteration)). | + +```yaml +budget: + maxCostUsd: 5.00 + maxSteps: 50 + maxDuration: 30m + resources: + maxTokens: 100000 + maxToolCalls: 100 +``` + +- All limits MUST be positive. Absent limits are unlimited, except `maxConcurrency` (default `1`) + and `maxRetries` (default `0`). +- Limits are **nested**: usage of a step counts against the step, its agent and the workflow. + When several levels define the same limit, the effective limit is the minimum. +- The runtime MUST check limits before each model invocation and each action. When a limit + would be exceeded, the runtime MUST NOT start the invocation or action, MUST stop the + execution with the status `failed`, SHOULD cancel running steps, and MUST emit + `workflow.failed` with `reason: budgetExceeded` and the exceeded limit. +- Implementations MUST document how they compute cost. If the cost of an invocation cannot be + determined, the runtime MUST report `costKnown: false` in the usage data of the execution and + SHOULD use a configured price instead of zero. +- Runtimes MAY enforce stricter limits than the manifest declares (for example tenant quotas). + +### 5.8 Human input + +An execution can ask a person for information and wait for the answer: an input step asks a +question defined in the manifest, and an agent with `humanInput` may ask questions of its own +during its step. Human input is close to elicitation in the Model Context Protocol: a message, a +flat schema for a structured answer, and the outcomes *answered*, *declined* and *expired*. +Human input belongs to the `interaction` profile. + +An answer is information, not a decision. It never grants an approval +([section 7.6](#76-human-approval)), never changes permissions, policies or budgets, and never +changes the manifest of a running execution. + +#### 5.8.1 Input steps + +A step with `type: input` asks the question in its `input` object: + +| Field | Type | Req. | Description | +| ----- | ---- | ---- | ----------- | +| `message` | string | yes | Expression-enabled question shown to the answerers. | +| `answerSchema` | object | no | Schema of a structured answer ([section 5.8.3](#583-answer-schema)). Absent: the answer is free text (a string). | +| `answerers` | list | yes | Who may answer: entries with exactly one of `role` or `user`, matched like approvers ([section 7.6](#76-human-approval)). | +| `timeout` | duration | no | Time after which the open request expires. Default: no timeout (the step timeout and `maxDuration` still apply). | +| `onTimeout` | string | no | `fail` (default) fails the step; `useDefault` completes the step with `default` as the answer. | +| `default` | any | cond. | REQUIRED with `onTimeout: useDefault`. MUST be a valid answer. | +| `classification` | string | no | Data class of the answer ([section 7.2](#72-data-classification)). Default: `spec.classification`. | + +```yaml +workflow: + - id: ask-targets + type: input + dependsOn: + - analyze + input: + message: "Which environment should ${{ steps.analyze.outputs.report }} be applied to?" + answerSchema: + type: object + properties: + environment: + type: string + enum: [staging, production] + required: [environment] + answerers: + - role: release-manager + timeout: 4h + onTimeout: useDefault + default: + environment: staging + - id: apply + agent: worker + task: "Apply the fix to ${{ steps.ask-targets.outputs.answer }}." + dependsOn: + - ask-targets +``` + +- An input step has the implicit output `answer`: the validated answer (a string, or an object + that matches `answerSchema`). It is referenced as `steps..outputs.answer`. +- The step succeeds when an answerer provides a valid answer, or on expiry with `onTimeout: + useDefault`. It fails when an answerer declines or when it expires with `onTimeout: fail`. +- The first valid answer completes the request; later answers MUST be rejected. + +#### 5.8.2 Agent requests + +An agent with a `humanInput` object (inline agents and `Agent` manifests) may ask questions during +its step. The runtime offers the agent a built-in tool for this; the agent supplies a message and +optionally an answer schema, and receives the answer, or the information that the request was +declined or expired, as the tool result. + +| Field | Type | Req. | Description | +| ----- | ---- | ---- | ----------- | +| `answerers` | list | yes | Who may answer, as for input steps. | +| `timeout` | duration | no | Expiry of each request. Default: no timeout. | +| `onTimeout` | string | no | `return` (default) returns the expiry to the agent, which continues; `fail` fails the step. | +| `maxRequests` | integer | no | Maximum number of requests per step. Default: unlimited. | +| `classification` | string | no | Data class of the answers. Default: `spec.classification`. | + +```yaml +agents: + - id: fixer + model: + provider: example-provider + name: example-model + humanInput: + answerers: + - role: maintainer + timeout: 30m + maxRequests: 3 +``` + +- The runtime MUST validate the schema supplied by the agent against + [section 5.8.3](#583-answer-schema) and MUST reject the request (as a tool error) if it is + invalid or if `maxRequests` is reached. +- A request of an agent is not an action and is not subject to permissions. The message is + composed by the model; the runtime MUST apply the data policy to it as to any output shown to a + person, and MUST show answerers that the question comes from an agent. +- An agent without `humanInput` has no such tool. If an MCP server of the agent requests + elicitation, the runtime MUST decline it unless the agent has `humanInput`; with `humanInput` the + runtime MAY present it as a request of this section and MUST decline elicitation requests whose + schema does not conform to [section 5.8.3](#583-answer-schema). + +#### 5.8.3 Answer schema + +`answerSchema` is the requested-schema subset of MCP elicitation: an object with `type: object`, +`properties` and optional `required`. Every property is a primitive field: + +| Field | Type | Description | +| ----- | ---- | ----------- | +| `type` | string | `string`, `number`, `integer` or `boolean` (REQUIRED). | +| `title`, `description` | string | Label and help text. | +| `enum` | list of string | Allowed values (only for `string`). | +| `format` | string | `email`, `uri`, `date` or `date-time` (only for `string`). | +| `minLength`, `maxLength` | integer | Length bounds for `string`. | +| `minimum`, `maximum` | number | Bounds for `number` and `integer`. | + +- `required` MUST name fields of `properties`. +- The runtime MUST validate every answer against the schema and MUST NOT accept an invalid answer. +- Answer schemas MUST NOT ask for secrets or credentials. Secrets are declared in `spec.secrets` + ([section 7.9](#79-secrets)). + +#### 5.8.4 Answerers and lifecycle + +- An answer MUST come from an authenticated human actor that matches `answerers`. Agents MUST NOT + be able to answer, also not through tools or remote agents. Answers delivered through a chat or + messaging integration count only if the runtime can attribute them to such an actor. +- When a request is created, the runtime MUST emit `input.requested`; when it is answered, + declined or expires, `input.provided`, `input.declined` or `input.expired` + ([section 10.4](#104-event-types)). +- The answer is data of the class `classification`. Data and model policies apply to it like to + any other input of a model. In audit events the answer content follows the `payload` rules + ([section 10.2](#102-audit-configuration)): with `payload: metadata` events carry a digest of the + answer, not its content. +- Waiting for an answer counts against the step `timeout` and `budget.maxDuration`. + +--- + +## 6. Kind `Agent` + +An `Agent` manifest defines a reusable agent that workflows reference with `ref` +([section 5.4.2](#542-agent-references)). + +| `spec` field | Type | Req. | Description | +| ------------ | ---- | ---- | ----------- | +| `model` | object | yes | [Section 5.4.3](#543-model-object). | +| `instructions` | string | no | System-level instructions. | +| `promptRef` | object | no | Versioned prompt template. MUST NOT be combined with `instructions`. | +| `tools` | list | no | Tool sources ([section 5.5.2](#552-tool-sources)). | +| `mcpServers` | list | no | MCP servers used by the tool sources ([section 5.5.1](#551-mcp-servers)). | +| `actionGroups` | map | no | Action groups ([section 5.5.4](#554-action-groups)). | +| `permissions` | object | no | Permissions ([section 7.5](#75-tool-governance-permissions)). | +| `budget` | object | no | Default limits for every use of the agent. | +| `secrets` | list | no | Secrets the agent needs ([section 7.9](#79-secrets)). | +| `humanInput` | object | no | Lets the agent ask a person during its step ([section 5.8.2](#582-agent-requests)). | + +Example: [examples/invoice-extractor.agent.yaml](examples/invoice-extractor.agent.yaml). + +- An `Agent` manifest cannot be executed on its own. Runtimes MAY offer a way to run a single + agent; they MUST then treat it as a workflow with one agent step and the agent's `budget` and + `permissions`. +- When a workflow references an agent, the governance sections of the workflow (`dataPolicy`, + `modelPolicy`, `approval`, `policies`, `environments`) apply to the agent. The agent's + `permissions` and the workflow's `permissions` are combined ([section 7.5.4](#754-combining-permissions)). +- Secrets declared by the agent MUST also be declared by the workflow; the workflow controls + their source. + +--- + +## 7. Governance + +This section defines governance primitives. Runtimes that implement the **governance** profile +MUST enforce them as specified. They are designed to support organizational controls; whether +they are sufficient for a given legal or regulatory requirement depends on the organization, its +processes and its implementation. + +### 7.1 Identity and ownership + +`spec.owner` identifies who is accountable for a workflow, agent or policy. + +| Field | Type | Req. | Description | +| ----- | ---- | ---- | ----------- | +| `team` | string | yes | Responsible team. | +| `contact` | string | no | Contact address (role or team address, not a personal one where avoidable). | +| `businessOwner` | string | no | Accountable business owner. | +| `technicalOwner` | string | no | Accountable technical owner. | +| `dataOwner` | string | no | Owner of the data processed. | + +```yaml +spec: + version: 1.2.0 + owner: + team: finance-ai + contact: finance-ai@example.com +``` + +- Under the governance profile, runtimes MUST reject `Workflow` and `Agent` manifests without + `spec.owner.team` and `spec.classification`. +- Runtimes MUST include `metadata.name`, `spec.version` and `spec.owner.team` in the + `workflow.started` event. + +### 7.2 Data classification + +Data classes, from least to most restrictive: + +| Class | Rank | Meaning | +| ----- | ---- | ------- | +| `public` | 0 | Intended for publication. | +| `internal` | 1 | For use inside the organization. | +| `confidential` | 2 | Limited to a defined group. | +| `personal` | 2 | Personal data. At least as restrictive as `confidential`. | +| `restricted` | 3 | Strictly limited; disclosure causes serious harm. | +| `sensitive` | 3 | Special categories of personal data. At least as restrictive as `restricted`. | +| `secret` | 4 | Highest protection. | + +Comparisons with `gt`, `gte`, `lt`, `lte` use the rank. `personal` and `sensitive` are +additionally *personal-data classes*, which conditions can select with `in`. These classes are an +organizational vocabulary; their mapping to legal definitions is up to the organization. + +`spec.dataPolicy`: + +| Field | Type | Description | +| ----- | ---- | ----------- | +| `classification` | string | Highest class this workflow may process. Default: `spec.classification`. | +| `inputs` | list | `name`, `classification` per input (overrides the input declaration). | +| `outputs` | list | `name`, `classification` per step output. | +| `restrictions.externalTransfer` | string | `allow` or `deny` (default `allow`): whether data may be sent to actions matching `external.communication` and to remote agents. | +| `residency` | object | [Section 7.3](#73-data-residency-and-processing). | +| `processing` | object | [Section 7.3](#73-data-residency-and-processing). | + +```yaml +dataPolicy: + classification: confidential + inputs: + - name: customer_data + classification: personal + outputs: + - name: report + classification: internal + restrictions: + externalTransfer: deny +``` + +- The runtime MUST reject an execution whose input classification ranks higher than + `dataPolicy.classification`. +- The runtime MUST track, for every model invocation and action, the highest class of the data + it was given (*data classification of the operation*). At minimum, the class of an operation in + a step is the highest class of the inputs and step outputs the step references. Runtimes MAY + track classes more precisely. +- An output without a declared class inherits the highest class of the data its step processed. + A declared output class lower than that is a **declassification**; the runtime MUST record it in + the `artifact.created` event. +- With `externalTransfer: deny`, actions matching `external.communication` and messages to remote + agents MUST be denied when the operation's class ranks `internal` or higher. + +### 7.3 Data residency and processing + +```yaml +dataPolicy: + residency: + allowed: + - EU + processing: + allowedProviders: + - azure-openai + - ollama + forbiddenProviders: + - public-cloud-us +``` + +| Field | Type | Description | +| ----- | ---- | ----------- | +| `residency.allowed` | list of string | Regions where data may be processed. Region identifiers are organizational strings (for example `EU`, `DE`, `on-premise`). | +| `processing.allowedProviders` | list of string | Provider identifiers (models: `model.provider`; remote agents: endpoint host) that may receive data. | +| `processing.forbiddenProviders` | list of string | Provider identifiers that MUST NOT receive data. Takes precedence over `allowedProviders`. | + +- Before each model invocation and each message to a remote agent, the runtime MUST determine the + destination provider and region. The region of a model is `model.region` or, if absent, the + region configured for the provider in the runtime. The region of a remote agent is configured + in the runtime. +- If `residency.allowed` is set and the destination region is not in the list **or cannot be + determined**, the operation MUST be denied (fail closed). +- If `processing.allowedProviders` is set, operations to other providers MUST be denied. +- Denials MUST emit `policy.denied`. + +### 7.4 Model governance + +`spec.modelPolicy` restricts which models may be used. + +```yaml +modelPolicy: + allowedProviders: + - openai + - azure-openai + - ollama + allowedModels: + - gpt-5 + - qwen3 + - claude + forbiddenModels: + - unapproved-model + requirements: + approvalStatus: approved + encryption: true + region: EU +``` + +| Field | Type | Description | +| ----- | ---- | ----------- | +| `allowedProviders` | list | Allowed `model.provider` values. | +| `allowedModels` | list | Allowed `model.name` values. | +| `forbiddenModels` | list | Forbidden `model.name` values; take precedence. | +| `requirements.approvalStatus` | string | Required `model.approval.status` (typically `approved`). Expired approvals (`expires` in the past) do not satisfy it. | +| `requirements.encryption` | boolean | If `true`, the runtime MUST only use provider connections that it has configured as encrypted in transit (TLS). | +| `requirements.region` | string | Required `model.region`. | +| `requirements.evaluationStatus` | string | Required `model.evaluation.status`. | + +- The runtime MUST validate every agent's model against `modelPolicy` before the execution + starts and MUST reject the execution if a model does not satisfy it. +- If a runtime substitutes models at run time (fallbacks), the substitute MUST satisfy + `modelPolicy` as well, and the substitution MUST be recorded in the audit trail. + +### 7.5 Tool governance: permissions + +`permissions` controls which actions an agent or workflow may perform. It MAY appear on the +workflow (`spec.permissions`), on an inline agent, on an agent reference and in an `Agent` +manifest. + +```yaml +permissions: + default: deny + tools: + github.read: + allow: true + github.write: + allow: true + shell.execute: + allow: true + production.deploy: + allow: false + network: + egress: deny + allowHosts: + - mcp.example.com + filesystem: + read: + - /workspace + write: + - /workspace/out + secrets: + - GITHUB_TOKEN +``` + +#### 7.5.1 Fields + +| Field | Type | Description | +| ----- | ---- | ----------- | +| `default` | string | `allow` or `deny`: decision for actions not matched by any key in `tools`. Default `deny` when `permissions` is present. | +| `tools` | map | Keys are action identifiers, group identifiers or wildcard patterns. Values: `allow` (boolean, REQUIRED), `resources` (list of expression-enabled strings, OPTIONAL). | +| `network.egress` | string | `allow` or `deny` (default `allow`): outbound network access of command steps and built-in tools. | +| `network.allowHosts` | list | Host names reachable when `egress` is `deny`. | +| `filesystem.read`, `filesystem.write` | list | Paths readable/writable by command steps and built-in tools. If set, all other paths MUST be inaccessible. | +| `secrets` | list | Names of secrets the agent or workflow may use. Default: all secrets declared in `spec.secrets` that are scoped to the agent's tool sources. | +| `environments` | list | Environment names in which this agent or workflow may run. Default: all. | + +#### 7.5.2 Resource scopes + +`resources` restricts an allowed action to specific targets (for example a repository). The +runtime MUST document, per tool, how it derives the target resource of a call. If `resources` is +set and the runtime cannot determine the resource of a call, the call MUST be denied. + +#### 7.5.3 Absent permissions + +If no `permissions` object applies to an agent, every action of the tools exposed to it is +allowed by permissions (other governance rules still apply). Runtimes implementing the security +profile MUST warn about this (`awp lint`) and MAY require `permissions` by configuration. + +#### 7.5.4 Combining permissions + +When several `permissions` objects apply (workflow, agent manifest, agent reference), an action +is allowed by permissions only if **every** applicable object allows it. `network` and +`filesystem` restrictions combine to the intersection. Within one object, a key with +`allow: false` that matches an action takes precedence over keys with `allow: true`. + +### 7.6 Human approval + +Approvals are human decisions that gate actions or steps. + +```yaml +approval: + requiredFor: + - production.deploy + - git.merge + - external.communication + approvers: + - role: security-reviewer + timeout: 24h +``` + +| Field | Type | Description | +| ----- | ---- | ----------- | +| `requiredFor` | list | Action keys (identifiers, groups, wildcards) that require approval before each execution of the action. | +| `approvers` | list | Each entry has exactly one of `role` (a role name resolved by the runtime's identity system) or `user` (a user identifier). An approver matches if they match any entry. | +| `minApprovals` | integer | Number of distinct approvers required. Default `1`. | +| `timeout` | duration | Time after which an open request expires. | +| `onTimeout` | string | `reject` (default) or `fail`. `reject` treats expiry as a rejection of the action; `fail` fails the step. | +| `message` | string | Expression-enabled message shown to approvers. | +| `separationOfDuties` | object | [Section 7.8](#78-separation-of-duties). | + +- When an action matches `requiredFor` (or a policy rule requires approval, see + [section 8](#8-kind-policy-and-policy-evaluation)), the runtime MUST pause before executing the + action, emit `approval.requested`, and MUST NOT execute the action until `minApprovals` + approvals are granted. A rejection MUST prevent the action and MUST emit `approval.rejected`. + Expiry MUST emit `approval.expired`. +- An approval applies to exactly one action request, identified by the event id of its + `tool.requested` event. It MUST NOT be reused for other requests. +- The approval request MUST show approvers at least: workflow name and version, step, action + identifier, arguments (with secrets redacted), the data classification of the operation and the + decision record if one exists ([section 10.6](#106-decision-trace)). +- An **approval step** (`type: approval`) gates the steps that depend on it. It succeeds when + approved and fails when rejected or expired. +- An answer to a human input request ([section 5.8](#58-human-input)) MUST NOT be treated as an + approval, even if it comes from an approver. +- Agents MUST NOT be able to grant approvals. An approval MUST be granted by an authenticated + human actor. + +Diagram (non-normative): + +``` +Agent -> Analyze -> Implement -> Test -> [Human Approval: security review, policy check] -> Deploy +``` + +### 7.7 Risk levels + +`spec.risk` declares the organizational risk of a workflow or agent: + +```yaml +risk: + level: high + category: + - security + - financial +``` + +`level` is one of `low`, `medium`, `high`, `critical`. `category` is a list of free-form strings. + +Risk levels are an organizational governance model, not a regulatory classification. AWP +RECOMMENDS the following default treatment, which runtimes implementing the governance profile +SHOULD apply unless configured otherwise: + +| Level | Default treatment | +| ----- | ----------------- | +| `low` | Autonomous execution within permissions and policies. | +| `medium` | As `low`, and every action produces a `policy.evaluated` event. | +| `high` | As `medium`, and every action other than read-only actions configured in the runtime requires human approval. | +| `critical` | Execution is prohibited unless explicitly approved: the execution MUST NOT start before an approval of the execution itself has been granted. | + +Policy rules can select on `risk.level` ([section 8](#8-kind-policy-and-policy-evaluation)). + +### 7.8 Separation of duties + +```yaml +approval: + separationOfDuties: + enabled: true + rules: + - actorCannotApproveOwnAction: true + - initiatorCannotApprove: true +``` + +| Rule | Meaning | +| ---- | ------- | +| `actorCannotApproveOwnAction` | The human on whose behalf an action is requested (including the human who started the execution, for actions of agents in it) MUST NOT approve it. | +| `initiatorCannotApprove` | The actor who started the execution MUST NOT approve any request in it. | +| `distinctApprovers` | With `minApprovals` > 1, each approval MUST come from a different human. Always in effect; listed for completeness. | + +When `enabled` is `true`, the runtime MUST reject approvals that violate a rule and MUST record +the rejection reason. + +Example flow (non-normative): *agent creates pull request -> developer reviews -> security +approves -> release manager deploys*, with each human a different actor. + +### 7.9 Secrets + +Secrets MUST NOT appear in manifests. A manifest declares which secrets exist and references them +by name. + +```yaml +secrets: + - name: GITHUB_TOKEN + source: secret-manager + scope: + - github +``` + +| Field | Type | Req. | Description | +| ----- | ---- | ---- | ----------- | +| `name` | string | yes | Secret name. | +| `source` | string | yes | Opaque identifier of the secret store, resolved by the runtime (for example `secret-manager`, `vault`, `kubernetes`). | +| `key` | string | no | Key of the secret within the store. Default: `name`. | +| `scope` | list | no | MCP server names, agent ids or `command` that may receive the secret. Default: none. | + +- Fields that need a credential use `secretRef: ` (for example `mcpServers[].auth.secretRef`). + A `secretRef` MUST name a secret declared in `spec.secrets` whose `scope` includes the consumer; + otherwise the manifest MUST be rejected. +- Runtimes MUST reject manifests that contain fields named `token`, `password`, `apiKey`, + `secret` or `privateKey` with a literal value anywhere outside `extensions` objects, and SHOULD + reject values that look like credentials. +- Runtimes MUST NOT pass secret values to models, MUST NOT include them in audit events, logs or + approval requests, and MUST redact them if they appear in tool output. + +### 7.10 Environments + +`spec.environment.name` declares the default target environment of executions; the actual +environment of an execution MAY be set when the execution is started. `spec.environments` +declares how autonomy differs per environment: + +```yaml +environment: + name: production +environments: + development: + autonomy: unrestricted + staging: + autonomy: controlled + production: + autonomy: approval-required + autoApprove: + - erp.read +``` + +| `autonomy` | Meaning | +| ---------- | ------- | +| `unrestricted` | Permissions, policies and `approval.requiredFor` apply as declared. | +| `controlled` | As `unrestricted`, and every action produces a `policy.evaluated` event. | +| `approval-required` | Every action requires human approval, except actions matching `autoApprove`. | +| `prohibited` | Executions in this environment MUST NOT start. | + +- The environment of an execution MUST be recorded in `workflow.started`. +- If `spec.environments` is present and the execution's environment is not listed, the execution + MUST NOT start. +- Environment names are organizational strings. The runtime is responsible for ensuring that an + execution labelled with an environment actually runs with that environment's credentials and + targets; AWP cannot verify this. + +--- + +## 8. Kind `Policy` and policy evaluation + +### 8.1 Workflow policies + +`spec.policies` of a workflow contains **policy shorthands** for common rules and references to +reusable `Policy` manifests. + +```yaml +policies: + git: + allowPush: true + allowForcePush: false + pullRequest: + allowCreate: true + merge: + allow: false + production: + allow: false + include: + - name: no-production-autonomy + version: 1.0.0 +``` + +| Shorthand | Equivalent rule | +| --------- | --------------- | +| `git.allowPush: false` | deny actions matching `git.push` | +| `git.allowForcePush: false` | deny actions matching `git.forcePush` | +| `pullRequest.allowCreate: false` | deny actions matching `pullRequest.create` | +| `merge.allow: false` | deny actions matching `git.merge` | +| `production.allow: false` | deny actions matching `production.deploy` | + +A shorthand with the value `true` adds no rule (it does not grant permissions; see +[section 8.4](#84-decision-combination)). `include` lists `Policy` manifests by `name` and exact +`version`, optionally with `digest`; resolution follows the rules for agent references +([section 5.4.2](#542-agent-references)). + +### 8.2 Kind `Policy` + +```yaml +apiVersion: awp.agenticworkflowprotocol.org/v1alpha4 +kind: Policy +metadata: + name: no-production-autonomy +spec: + version: 1.0.0 + owner: + team: platform-governance + rules: + - id: deploy-needs-release-manager + when: + action: + equals: production.deploy + effect: requireApproval + approval: + approvers: + - role: release-manager +``` + +```yaml +apiVersion: awp.agenticworkflowprotocol.org/v1alpha4 +kind: Policy +metadata: + name: eu-data-residency +spec: + version: 1.0.0 + owner: + team: data-protection + rules: + - id: personal-data-stays-in-eu + when: + data.classification: + in: + - personal + - sensitive + destination.region: + notIn: + - EU + effect: deny +``` + +Rule fields: + +| Field | Type | Req. | Description | +| ----- | ---- | ---- | ----------- | +| `id` | string | yes | Rule identifier, unique within the policy. | +| `when` | map | yes | Conditions; all MUST hold for the rule to apply ([section 8.3](#83-conditions)). | +| `effect` | string | yes | `deny` or `requireApproval`. | +| `approval` | object | cond. | REQUIRED for `requireApproval`: `approvers`, `minApprovals`, `timeout`, `onTimeout` as in [section 7.6](#76-human-approval). | +| `message` | string | no | Message for denials and approval requests. | + +Policy rules can only restrict: there is no `allow` effect. Permissions grant, policies restrict. + +### 8.3 Conditions + +`when` maps **attributes** to an operator object. All entries are combined with logical AND. +(`v1alpha1` also accepted a plain value as shorthand for `equals`; a Kubernetes structural schema +cannot describe a field that is either a string or an object.) + +| Attribute | Value | +| --------- | ----- | +| `action` | Action identifier; matched like permission keys (groups, wildcards). | +| `environment.name` | Environment of the execution. | +| `risk.level` | `spec.risk.level` of the workflow; ordered `low` < `medium` < `high` < `critical`. | +| `data.classification` | Classification of the operation ([section 7.2](#72-data-classification)). | +| `destination.provider` | Provider identifier of a model invocation or remote agent. | +| `destination.region` | Region of a model invocation or remote agent. | +| `model.provider`, `model.name` | Model of the current agent. | +| `actor.type` | `agent`, `human`, `runtime` or `system`. | +| `workflow.name`, `step.id`, `agent.id` | Names and identifiers. | + +Operators: `in`, `notIn` (lists), `equals`, `notEquals`, and for ordered attributes +(`data.classification`, `risk.level`) `gt`, `gte`, `lt`, `lte`. + +- Rules are evaluated before every action and, for rules that use `destination.*`, + `data.classification` or `model.*` without `action`, also before every model invocation. +- If an attribute used by a condition cannot be determined, a rule with effect `deny` MUST be + treated as applying (fail closed), and a rule with effect `requireApproval` MUST be treated as + applying. + +### 8.4 Decision combination + +For every action, the runtime MUST compute one decision as follows: + +1. If permissions ([section 7.5](#75-tool-governance-permissions)) do not allow the action: + **deny**. +2. Else, if any applicable `deny` rule (shorthand, policy, data policy, model policy, environment + `prohibited`) applies: **deny**. +3. Else, if the action matches `approval.requiredFor`, an applicable `requireApproval` rule, the + environment autonomy or the risk-level treatment requires approval: **require approval**. All + applicable approval requirements MUST be satisfied (union of approver constraints, maximum of + `minApprovals`, minimum of `timeout`). +4. Else: **allow**. + +The runtime MUST emit `policy.evaluated` for every decision under the audit profile, and +`policy.denied` plus `tool.denied` for every denied action. Runtimes MAY delegate evaluation to an +external policy engine if the resulting decisions are identical to this algorithm. + +--- + +## 9. Supply chain integrity + +The goal: *know what runs before you let it run.* + +### 9.1 Manifest digest + +The digest of a manifest is computed over the JSON Canonicalization Scheme ([RFC 8785]) +serialization of a JSON object with exactly these members: + +- `apiVersion` and `kind` of the manifest; +- `metadata`, containing only `name`; +- `spec`, **with `spec.integrity`, `spec.signature` and `spec.provenance` removed**. + +`metadata.namespace`, labels, annotations, fields populated by an object store and `status` are +not covered: deployment tools and object stores change them without changing what the manifest +does, and a manifest read back from an object store MUST still verify. Extension fields in `spec` +are covered. + +```yaml +metadata: + name: invoice-processing +spec: + version: 1.2.0 + owner: + team: finance-ai + integrity: + digest: sha256:9b2f6c1e4d8a0b7c3e5f1a2d4c6b8e0f1a3c5e7b9d0f2a4c6e8b0d1f3a5c7e9b +``` + +- If `spec.integrity.digest` is present, runtimes MUST verify it before execution and MUST + reject the manifest on mismatch. +- References (`ref.digest`, `include[].digest`, `agentCard.digest`) MUST be verified the same + way. + +### 9.2 Signatures + +`spec.signature` references a detached signature over the manifest digest: + +| Field | Type | Description | +| ----- | ---- | ----------- | +| `format` | string | Signature format, for example `sigstore-bundle`, `jws`, `x509-cms`. | +| `ref` | string | URI of the detached signature. | +| `identity` | string | Expected signer identity (for example a certificate subject or workload identity). | + +- AWP does not define a signature format. Runtimes implementing the security profile MUST + support at least one format, MUST document which, and MUST be configurable to reject unsigned + manifests and manifests whose signature cannot be verified. +- A signature MUST be bound to the manifest digest of [section 9.1](#91-manifest-digest). + +### 9.3 Provenance + +`spec.provenance` references build or authoring provenance (`format`, for example +`slsa-provenance-v1`, and `ref`). Runtimes MAY verify provenance and MAY enforce policies on it. + +### 9.4 Dependencies + +The dependencies of a workflow are: referenced `Agent` and `Policy` manifests, prompt templates +(`promptRef`), MCP servers (`image`, `url`, `version`), command step images and remote agents. + +- Under the security profile, container images (`mcpServers[].image`, command step `image`) MUST + be pinned by digest, and references SHOULD carry digests. For an image with several platforms + the digest is that of the image index, not of one platform. A tag MAY precede the digest for + readability (`tools:1.4@sha256:...`); the digest decides. +- Outside the security profile, images MAY be referenced by tag. The runtime resolves tags to + digests when an execution starts and pins them ([section 10.1](#101-execution-identity)). +- Runtimes SHOULD support trusted registries: a configurable allowlist of sources from which + manifests, images and MCP servers may be loaded. +- Runtimes SHOULD be able to output the resolved dependency set of a workflow (SBOM-like + metadata), for example as part of `awp plan`. + +--- + +## 10. Execution, audit and traceability + +### 10.1 Execution identity + +Every execution MUST have an execution identifier that is unique within the runtime. It SHOULD +have the form `awp-exec-`. + +**Pinning.** An execution is pinned to the manifests it started with: + +- When an execution starts, the runtime resolves the workflow manifest, every referenced `Agent` + manifest ([section 5.4.2](#542-agent-references)) and every `Policy` that applies + ([section 8.2](#82-kind-policy)), validates them and computes the workflow digest + ([section 9.1](#91-manifest-digest)). The execution uses exactly these versions until it ends, + including retries and steps that wait for an approval or an answer. +- A change or deletion of one of these manifests MUST NOT change a running execution: it neither + picks up new content nor mixes old and new versions. The runtime MUST keep the pinned manifests, + or be able to retrieve them by digest, until the execution ends. +- A runtime MAY cancel running executions when a pinned manifest changes or is deleted, for example + to apply a tightened policy at once. It cancels as actor `system` with `workflow.cancelled` and + `reason: manifestChanged`. +- `workflow.started` MUST carry `workflow.digest` ([section 10.3](#103-event-envelope)). The + reproducibility record ([section 10.7](#107-reproducibility-record)) lists the digests of all + pinned manifests. +- **Images.** When an execution starts, the runtime also resolves every container image reference + of the workflow (command step `image`, `mcpServers[].image`) to a digest; for an image with + several platforms this is the digest of the image index, so the pin holds on every architecture. + All steps and attempts of the execution use these digests, even if a tag is moved while the + execution runs. An image that cannot be resolved fails the execution before any step runs. The + reproducibility record lists each reference with its resolved digest. Authors may therefore + use tags outside the security profile ([section 9.4](#94-dependencies)) and still get a + traceable execution. +- A new execution, including one started by the next schedule tick, uses the manifests that are + current when it starts, and resolves tags again. +- A request MAY assert the version it expects: if a `WorkflowRun` + ([section 10.8](#108-kind-workflowrun)) names `workflowRef.version` or `workflowRef.digest` and + the current workflow does not match, the runtime MUST reject the request with the reason + `versionMismatch` or `digestMismatch` instead of running another version. + +### 10.2 Audit configuration + +```yaml +audit: + enabled: true + payload: metadata + integrity: + mode: hash-chain + retention: + duration: 7y +``` + +| Field | Type | Description | +| ----- | ---- | ----------- | +| `enabled` | boolean | Default `true`. Under the audit profile, `false` MUST be rejected unless the runtime is configured to allow it. | +| `payload` | string | `metadata` (default): events carry identifiers, digests and decisions, but not the content of inputs, outputs, prompts or tool results. `full`: events MAY carry content. | +| `integrity.mode` | string | `none`, `hash-chain` or `signed` ([section 10.5](#105-tamper-evidence)). | +| `retention.duration` | duration | Minimum retention requested by the manifest. | + +- If the runtime cannot honour `integrity.mode` or `retention.duration`, it MUST reject the + manifest. A runtime MAY retain events longer than requested if required by its configuration. + +### 10.3 Event envelope + +Every audit event is an object with these fields: + +| Field | Type | Req. | Description | +| ----- | ---- | ---- | ----------- | +| `id` | string | yes | Unique event identifier (ULID RECOMMENDED). | +| `type` | string | yes | Event type ([section 10.4](#104-event-types)). | +| `time` | string | yes | RFC 3339 timestamp. | +| `executionId` | string | cond. | Execution identifier. REQUIRED in every event except `trigger.skipped`, which belongs to no execution. | +| `workflow` | object | cond. | `name`, `version`, `digest`. REQUIRED in `workflow.started` (with `digest`, [section 10.1](#101-execution-identity)) and in `trigger.skipped` (`digest` if known). | +| `stepId` | string | cond. | REQUIRED for events that belong to a step. | +| `actor` | object | yes | `type` (`agent`, `human`, `runtime`, `system`) and `id`. | +| `environment` | string | cond. | REQUIRED in `workflow.started`. | +| `data` | object | no | Type-specific data. | +| `integrity` | object | cond. | `prev` (hash of the previous event) and `hash`; REQUIRED for `hash-chain` and `signed` modes. | + +Events MAY be transported in other envelopes (for example CloudEvents, OpenTelemetry log +records) if all fields above are preserved. Events MUST NOT contain secret values, and under +`payload: metadata` they MUST NOT contain the content of inputs, outputs, prompts or tool +results (digests and references are allowed). + +Example stream: [examples/audit-events.yaml](examples/audit-events.yaml). + +### 10.4 Event types + +| Type | When | Required `data` | +| ---- | ---- | --------------- | +| `workflow.started` | Execution started. | `trigger` (for schedule triggers with `scheduledAt`), `inputs` (values or digests per `payload`); for a child execution of a workflow step ([section 5.6.6](#566-workflow-steps)) also `parentExecutionId` and `parentStepId` | +| `workflow.completed` | All steps succeeded. | `status: succeeded`, `usage` | +| `workflow.failed` | Execution failed. | `status: failed`, `reason`, `usage`; for budgets: `reason: budgetExceeded`, `limit` | +| `workflow.cancelled` | Execution cancelled by an actor. | `usage`; `reason: replaced` when a schedule trigger with `concurrencyPolicy: replace` cancelled it; `reason: manifestChanged` when a pinned manifest changed ([section 10.1](#101-execution-identity)) | +| `step.skipped` | A step was skipped ([section 5.6.3](#563-execution-model)). | `reason` (`condition`, `dependencyFailed`), `condition` (the text of `when`, only for `condition`); the event carries `stepId` | +| `agent.started` | Agent step started. | `agentId`, `model` (`provider`, `name`, `version` if known) | +| `agent.completed` | Agent step finished. | `agentId`, `status`, `usage` | +| `agent.failed` | Agent step failed. | `agentId`, `reason` | +| `tool.requested` | An action was requested (before evaluation). | `action`, `server` (MCP), `arguments` (redacted per `payload`), optional `decision` | +| `tool.executed` | An action was executed. | `action`, `outcome` (`success`, `error`), `durationMs` | +| `tool.denied` | An action was denied. | `action`, `reason` (`permissions`, `policy`, `dataPolicy`, `approval`, `budget`), `policy` (rule reference, if any) | +| `policy.evaluated` | A decision was computed. | `action` or `operation`, `decision` (`allow`, `deny`, `requireApproval`), `evaluated` (list of sources and results) | +| `policy.denied` | A rule or data/model policy denied an operation. | `rule`, `operation` | +| `approval.requested` | Approval requested. | `requestId`, `action` or `stepId`, `approvers`, `minApprovals`, `expiresAt` | +| `approval.granted` | An approver approved. | `requestId`, `approver` | +| `approval.rejected` | An approver rejected, or a separation-of-duties rule rejected an approval. | `requestId`, `approver`, `reason` | +| `approval.expired` | Request expired. | `requestId` | +| `artifact.created` | A step produced an output or artifact. | `name`, `stepId`, `classification`, `digest` or `uri`, `declassified` (boolean) | +| `artifact.modified` | An action changed an existing artifact (for example a file in a repository). | `name` or `uri`, `digest` (if known) | +| `trigger.skipped` | A schedule tick did not start an execution ([section 5.2](#52-triggers)). | `trigger` (index and type), `scheduledAt` (or `firstScheduledAt` and `lastScheduledAt`), `reason` (`concurrencyForbidden`, `missed`, `startingDeadlineExceeded`) | +| `input.requested` | A human input request was created ([section 5.8](#58-human-input)). | `requestId`, `stepId`, `agentId` (agent requests), `answerers`, `expiresAt`, `message` and `answerSchema` (content or digest per `payload`) | +| `input.provided` | An answerer provided a valid answer. | `requestId`, `answerer`, `answer` (content or digest per `payload`) | +| `input.declined` | An answerer declined to answer. | `requestId`, `answerer` | +| `input.expired` | The request expired. | `requestId`, `outcome` (`failed`, `defaultUsed`, `returned`) | + +- Under the audit profile, runtimes MUST emit all event types of this table when the + corresponding situation occurs, in causal order within an execution. +- Under `payload: metadata`, `step.skipped` MUST NOT contain the values a condition read; the text + of the condition is allowed. +- Events of an item run of an iterating step ([section 5.6.5](#565-iteration)) MUST carry the + item position as `data.forEachIndex` under the audit profile. +- Implementations MAY define additional event types outside these families with a reverse-domain + prefix (for example `com.example.cache.hit`). + +### 10.5 Tamper evidence + +AWP defines the semantics of audit events; implementations may provide tamper-evident storage. + +- `hash-chain`: every event's `integrity.hash` is the digest over the JCS serialization of the + event without `integrity.hash`, including `integrity.prev`, which is the `hash` of the previous + event of the same execution (empty string for the first event). Events without `executionId` + (`trigger.skipped`) form one chain per workflow. Runtimes MUST provide a way to + verify a chain. +- `signed`: as `hash-chain`, and the runtime signs the chain (for example per event or per + checkpoint) in an implementation-documented format. +- Storage, replication, key management and retention enforcement are implementation concerns. + +### 10.6 Decision trace + +A **decision record** explains why an agent or runtime took a consequential action in terms of +observable facts. It does not contain, and MUST NOT be required to contain, the model's private +chain-of-thought. + +```yaml +decision: + action: create_pull_request + reason: + type: policy-compatible-action + summary: Fix applied and tests requested; pull request creation is allowed. + evidence: + - type: artifact + ref: report + - type: step + ref: investigate + policyChecks: + - permissions + - policies.pullRequest +``` + +| Field | Type | Description | +| ----- | ---- | ----------- | +| `action` | string | The action decided on. | +| `reason.type` | string | Category, for example `policy-compatible-action`, `task-requirement`, `human-instruction`. | +| `reason.summary` | string | Short human-readable justification. | +| `evidence` | list | References (`type`: `artifact`, `step`, `input`, `event`; `ref`) to the facts the decision relies on. | +| `policyChecks` | list | Policy sources evaluated for the action. | + +- Runtimes implementing the audit profile MUST attach a decision record to `tool.requested` + events of actions that require approval, and SHOULD attach one to all write actions. +- Runtimes SHOULD NOT store raw model reasoning in audit events. A decision record MAY be + produced by the agent (structured output) or derived by the runtime. + +### 10.7 Reproducibility record + +At the end of every execution, a runtime implementing the audit profile MUST produce a +reproducibility record that identifies everything the execution depended on: + +| Field | Content | +| ----- | ------- | +| `executionId`, `startedAt`, `finishedAt`, `status`, `environment` | Execution facts. | +| `runtime` | `name`, `version`, `conformance` statement. | +| `workflow` | `name`, `version`, `digest`. | +| `agents` | Per agent: `id`, reference (`name`, `version`, `digest`) if any, `model` (`provider`, `name`, `version` as actually used), prompt/instructions version or digest. | +| `tools` | Per MCP server: `server`, `version`, `url` or `image` digest. | +| `images` | Command step images: the reference as written and the digest resolved at start. | +| `policies` | Policies applied, with versions and digests. | +| `inputs` | Input references or digests. | +| `artifacts` | Outputs and artifacts with digests or URIs. | + +Example: [examples/execution-record.yaml](examples/execution-record.yaml). + +Reproducibility here means *traceability of what ran*. Model outputs are in general not +deterministic; AWP does not require identical results on re-execution. + +### 10.8 Kind `WorkflowRun` + +A `WorkflowRun` is one execution of a workflow as an object. Clients request an execution and read +its state in the same object store as the manifests, for example with `kubectl create` and +`kubectl get workflowruns`. A runtime that exposes executions as objects MUST use this kind; a +runtime without an object store MAY offer the same shape through its API. The audit events of this +section remain the record of what happened; a `WorkflowRun` is a view of it. + +```yaml +apiVersion: awp.agenticworkflowprotocol.org/v1alpha4 +kind: WorkflowRun +metadata: + generateName: vulnerability-fixer- + namespace: security +spec: + workflowRef: + name: vulnerability-fixer + version: 0.1.0 + inputs: + cve: CVE-2026-12345 + repository: example-org/web-shop + environment: development +``` + +A complete example with the status written by a runtime: +[examples/vulnerability-fixer.run.yaml](examples/vulnerability-fixer.run.yaml). + +| Field | Type | Req. | Description | +| ----- | ---- | ---- | ----------- | +| `metadata` | object | yes | As in [section 4.1](#41-metadata); a client MAY set `generateName` (prefix of a name the object store generates) instead of `name`. | +| `spec.workflowRef` | object | yes | `name` (REQUIRED) of a `Workflow` in the same namespace; `version` and `digest` (OPTIONAL) are assertions ([section 10.1](#101-execution-identity)), not selectors. | +| `spec.inputs` | object | no | Input values ([section 5.3](#53-inputs)). | +| `spec.environment` | string | no | Target environment ([section 7.10](#710-environments)). | +| `spec.cancel` | boolean | no | `true` requests cancellation of the execution. | +| `spec.extensions` | object | no | Extension fields ([section 3.3](#33-unknown-fields-and-extensions)). | +| `status` | object | no | Written by the runtime, see below. | + +A `WorkflowRun` has none of the common spec fields of [section 4.2](#42-common-spec-fields) and no +digest or signature: governance belongs to the workflow it runs. + +Rules: + +- **Starting.** A `WorkflowRun` created by a client is a `manual` start + ([section 5.2](#52-triggers)). Every rule for manual starts applies: the workflow MUST allow + manual starts, inputs are validated, environment rules and policies apply. The actor is the + identity that created the object. The runtime MUST take this identity from an authenticated + source (for example the request information of a validating admission webhook or the audit log + of the object store), never from a field the client wrote; if it cannot determine it, it MUST + reject the request. +- A `WorkflowRun` starts at most one execution. Changes to `spec` after the start have no effect, + except `cancel`; runtimes SHOULD reject them on write. +- **Runtime-created runs.** For `schedule` and `event` triggers, a runtime that exposes executions + as objects creates the `WorkflowRun` itself and records the trigger in `status.trigger`. +- **Rejection.** If a request cannot start (for example invalid inputs, a version mismatch, no + `manual` trigger, a policy denial), the runtime sets `status.phase: rejected` with a reason and + starts nothing. A rejected request emits no `workflow.started`. +- **Cancellation.** `spec.cancel: true` cancels the execution on behalf of the identity that set + it, determined as for starting. Deleting a running `WorkflowRun` SHOULD cancel the execution (for + example through a finalizer); it MUST NOT delete audit events. +- **Retention.** A runtime MAY delete finished `WorkflowRun` objects after a documented time. Audit + retention ([section 10.2](#102-audit-configuration)) does not depend on it. + +**Status.** A runtime writes `status` in this shape (`WorkflowRunStatus` in the JSON Schema): + +| Field | Description | +| ----- | ----------- | +| `executionId` | Execution identifier ([section 10.1](#101-execution-identity)). | +| `phase` | `pending`, `running`, `succeeded`, `failed`, `cancelled` or `rejected`. | +| `reason`, `message` | Why the execution ended or was rejected, for example `budgetExceeded` or `versionMismatch`. | +| `actor` | Who started it: `type` and `id` as in [section 10.3](#103-event-envelope). | +| `trigger` | `type`, `index` of the trigger entry, `scheduledAt` for schedule triggers. | +| `environment` | Effective environment. | +| `workflow` | `name`, `version` and `digest` of the pinned manifest ([section 10.1](#101-execution-identity)). | +| `startedAt`, `finishedAt` | Timestamps. | +| `steps` | Per step: `id`, `status` ([section 5.6.3](#563-execution-model)), `attempts`, `startedAt`, `finishedAt`, `reason`, `message`, `outputs` (`name`, `digest`, `size`, `classification`; never the value). | +| `usage` | As in `workflow.completed` ([section 10.4](#104-event-types)). | +| `conditions` | Conditions ([section 3.11](#311-status)): `Accepted` (request validated and admitted) and `Succeeded` (`Unknown` while running). | +| `observedGeneration` | As in [section 3.11](#311-status). | + +- Everyone who can read the object can read `status` and `spec.inputs`. `status` MUST NOT contain + secret values or the content of outputs, prompts or tool results. Classified input values SHOULD + be passed as references. + +--- + +## 11. Conformance + +### 11.1 Roles + +- A **manifest** conforms to this specification if it satisfies all requirements on documents. +- A **runtime** conforms to a **profile** if it satisfies all requirements on runtimes of that + profile and of the profiles it depends on. +- A **validator** (for example `awp validate`) conforms if it accepts exactly the manifests that + satisfy the document requirements of the profiles it claims. + +### 11.2 Profiles + +| Profile | Depends on | Requirements | +| ------- | ---------- | ------------ | +| `core` | - | Sections 3, 4, 5 (except 5.4.4 and the MCP-specific parts of 5.5), 6, 7.5 (permissions, incl. resource scopes), 7.9 (secrets), 9.1 (manifest digest), 10.1 (including pinning), 10.8 (if executions are exposed as objects). Parse and validate manifests, fail closed on unknown fields and unsupported profiles, validate inputs, execute the step graph, enforce budgets and permissions, support the `manual` trigger, emit `workflow.*` events to a log. | +| `governance` | `core` | Sections 7.1-7.4, 7.6-7.8, 7.10 and 8: ownership and classification rules, data classification and residency, model policy, human approval, risk levels, separation of duties, environments, policy shorthands, `Policy` manifests and the decision algorithm. | +| `audit` | `core` | Section 10: event envelope, all event types, `payload` modes, integrity modes `none` and `hash-chain`, decision records, reproducibility records. | +| `security` | `core` | Section 9 and the security-related requirements of sections 5.6.2, 7.5 and 7.9: digest verification, at least one signature format, image pinning, isolation of command steps, network and filesystem restrictions, secret redaction. | +| `mcp` | `core` | Sections 5.5.1-5.5.4 for `type: mcp`: MCP server declaration and resolution, tool filtering, action identifiers per tool call, `tool.*` events per MCP call. | +| `a2a` | `core` | Section 5.4.4: remote agents, agent card verification, the action `a2a..send`, data policy checks for remote agents. | +| `interaction` | `core` | Section 5.8: input steps, agent requests with `humanInput`, answer validation, answerer identity, `input.*` events, declining MCP elicitation that is not allowed. | + +### 11.3 Conformance statement + +A runtime that claims conformance MUST publish a conformance statement: + +```yaml +implementation: + name: example-runtime + version: 0.4.0 + url: https://runtime.example.org +conformance: + awp: v1alpha4 + profiles: + - core + - governance + - audit + limitations: + - "audit: integrity mode signed is not supported; hash-chain only" + limits: + outputSize: 1MiB + stepOutputSize: 4MiB + executionObjects: true +``` + +- `limits` (OPTIONAL) states limits above the minimums of this document: `outputSize` and + `stepOutputSize` ([section 5.6.4](#564-step-outputs)). +- `executionObjects` (OPTIONAL, default `false`) states that the runtime exposes executions as + `WorkflowRun` objects ([section 10.8](#108-kind-workflowrun)). +- `limitations` MUST list every OPTIONAL feature of a claimed profile that is not supported. +- `testedWith` (OPTIONAL) names the conformance test suite, its version and the date of the run. +- A runtime MUST NOT claim a profile of which it does not meet every MUST requirement. +- A public conformance test suite is planned. Until it exists, conformance statements are + self-declarations. + +### 11.4 Command-line interface (informative) + +AWP anticipates a common command-line vocabulary (`awp validate`, `awp lint`, `awp simulate`, +`awp plan`, `awp run`, `awp audit`). Output formats are described in +[docs/cli.md](../../docs/cli.md); any implementation may provide these commands. + +--- + +## 12. Security considerations + +- **Fail closed.** Unknown fields, unsupported profiles, undeterminable regions or resources and + unverifiable digests lead to rejection or denial, never to silent acceptance. +- **Prompt injection.** Tool results, remote agent messages and content that a runtime keeps + between executions and passes to a later model invocation (state) are untrusted input: a message + stored by one execution must not become an instruction for the next. Governance in + AWP is enforced by the runtime **outside** the model: an agent cannot change permissions, + policies, budgets or approvals by producing text. Runtimes MUST NOT allow model output to + modify the effective manifest of a running execution. +- **Shell access.** `shell.execute` can perform effects that action-level rules cannot see (for + example `git push` inside a command). Network and filesystem restrictions and isolation are the + primary controls for command steps; granting `shell.execute` should be considered equivalent to + granting everything the sandbox can reach. +- **Incomplete action mappings.** Rules on well-known actions only apply to tools mapped to them + ([section 5.5.4](#554-action-groups)). Prefer `default: deny` with explicit allows. +- **Remote agents.** The local runtime cannot enforce governance inside a remote agent. Treat + remote agents as external parties for data policies. +- **Secrets.** Secrets are referenced, scoped and redacted ([section 7.9](#79-secrets)); scope + them to the smallest set of consumers. +- **Human input.** A question composed by a model can carry data to the answerer, and an answer + is untrusted input to the next model invocation, like a tool result. Answers never grant + approvals ([section 5.8](#58-human-input)); limit agent requests with `maxRequests`. +- **Starting executions through objects.** Whoever can create `WorkflowRun` objects can start + executions within the limits of the workflow's `manual` trigger; restrict it with the access + control of the object store. The actor is the authenticated creator, never a field of the object + ([section 10.8](#108-kind-workflowrun)). +- **Changes during an execution.** Executions are pinned to the manifests they started with + ([section 10.1](#101-execution-identity)), so a deployment tool that syncs a manifest cannot + change a running execution. A tightened policy applies to running executions only if the runtime + cancels them. +- **Output files.** Runtimes read output files as text with a size limit and do not follow + symbolic links ([section 5.6.4](#564-step-outputs)). +- **Conditions over model output.** A condition that reads an output of an agent step lets the + model influence which steps run. Conditions are not an authorization mechanism: permissions, + policies and approvals still apply to every action of a step that runs. Evaluation errors fail + the step instead of skipping or running it, and the grammar has no functions, no regular + expressions and no arithmetic, so its cost is bounded by the limits of + [section 3.12](#312-conditions). +- **Workflow steps.** A child execution runs with its own permissions, not with the parent's, so a + workflow step cannot be used to widen what the parent may do; starting it is the action + `workflow.start`, which the parent must be allowed. Cycle and depth limits and the shared budget + bound how much work a chain of workflow steps can start ([section 5.6.6](#566-workflow-steps)). +- **Approval fatigue.** Approval requests must carry enough context (section 7.6) for a + meaningful decision; too many approvals reduce their value. +- **Audit trail integrity.** Hash chains detect modification but not deletion of a whole chain; + external anchoring or replication is an implementation choice. + +## 13. Privacy considerations + +- Audit events default to `payload: metadata` so that personal data in inputs and outputs is not + copied into long-lived audit storage. `payload: full` should be used only with an appropriate + retention and access model. +- `owner.contact` and approver identities are personal data in some jurisdictions; prefer role + and team addresses. +- Input values in `WorkflowRun.spec.inputs` and the status of a `WorkflowRun` are readable by + everyone who can read the object; pass classified values as references. +- Answers to human input requests may contain personal data; set `classification` accordingly. + Under `payload: metadata` audit events carry only a digest of the answer. +- Long retention periods (`retention.duration`) and data minimization requirements may conflict; + organizations must decide based on their own requirements. + +## 14. Versioning + +- The API version is part of `apiVersion`. Alpha versions (`v1alphaN`) may change + incompatibly; beta versions (`v1betaN`) change only with a migration path; `v1` changes only + backwards-compatibly. +- Runtimes MAY support several API versions and MUST process each manifest according to its own + `apiVersion`. +- Changes to this document are proposed and decided as described in the repository's + [GOVERNANCE.md](../../GOVERNANCE.md). + +### 14.1 Changes from `v1alpha1` + +`v1alpha4` differs from `v1alpha1` by every row of this table and by every row of +[section 14.3](#143-changes-from-v1alpha3). + +| `v1alpha1` | `v1alpha3` and `v1alpha4` | +| --- | --- | +| `metadata.version`, `description`, `owner`, `classification`, `purpose`, `risk`, `integrity`, `signature`, `provenance` | Same fields in `spec` ([section 4.2](#42-common-spec-fields)). | +| `metadata.name`: `^[a-zA-Z][a-zA-Z0-9_-]{0,62}$` | DNS-1123 label ([section 3.4](#34-names-and-identifiers)). | +| Labels: one key pattern, any value | Kubernetes label syntax for keys and values ([section 4.1](#41-metadata)). | +| - | `metadata.namespace`, fields populated by an object store, and `status` ([sections 3.2](#32-top-level-structure), [3.10](#310-object-stores-and-kubernetes)). | +| `x-` fields in any object | Keys of an `extensions` object on the same object ([section 3.3](#33-unknown-fields-and-extensions)). | +| `owner` as a string (shorthand for `owner.team`) | `owner` is always an object. | +| Policy conditions: a plain value means `equals` | Always an operator object, for example `action: {equals: git.push}` ([section 8.3](#83-conditions)). | +| `schedule` trigger: `cron` and `timezone` only | Adds `concurrencyPolicy` (default `forbid`), `startingDeadline`, rules for missed ticks and the event `trigger.skipped` ([section 5.2](#52-triggers)). | +| Approvals are the only human interaction | Human input: input steps, agent requests, profile `interaction`, events `input.*` ([section 5.8](#58-human-input)). | +| `outputs[].name`: any string; how a step produces outputs is undefined | Names match `^[A-Za-z_][A-Za-z0-9_]{0,62}$`; command steps write files to `$AWP_OUTPUTS`, agent steps complete with `complete_step`, minimum sizes, outputs of failed attempts are discarded ([section 5.6.4](#564-step-outputs)). | +| Executions are not objects; the shape of `status` is undefined | Kind `WorkflowRun` ([section 10.8](#108-kind-workflowrun)), status conditions `Valid` and `Ready` ([section 3.11](#311-status)), step status `waitingForInput`. | +| No rule for manifest changes during an execution | Executions are pinned to their manifests; `workflow.digest` is REQUIRED in `workflow.started` ([section 10.1](#101-execution-identity)). | +| Digest over the whole manifest without integrity, signature and provenance | Digest over `apiVersion`, `kind`, `metadata.name` and `spec` without integrity, signature and provenance ([section 9.1](#91-manifest-digest)). | +| No iteration | Step iteration `forEach` from `v1alpha2` ([section 5.6.5](#565-iteration)). | + +The reference checker converts a `v1alpha1` manifest mechanically: +`node conformance/awp-check.mjs migrate `. A name that is not a DNS-1123 label is reported +and has to be renamed by the author, and a digest has to be recomputed. + +### 14.2 Changes from `v1alpha2` + +`v1alpha2` is `v1alpha1` plus step iteration. `v1alpha4` therefore differs from `v1alpha2` by every +row of [section 14.1](#141-changes-from-v1alpha1) except the last one, by the rows of this table and +by every row of [section 14.3](#143-changes-from-v1alpha3). + +| `v1alpha2` | `v1alpha3` and `v1alpha4` | +| --- | --- | +| Iteration is section 5.6.4 | Iteration is [section 5.6.5](#565-iteration); 5.6.4 is the step output interface. | +| `forEach` is not allowed on approval steps | Not allowed on approval steps and input steps ([section 5.8](#58-human-input)). | +| An output referenced by `forEach.items` is a list | Outputs are text; `forEach.items` parses it as a JSON array (reason `itemsNotAList` otherwise). | +| How an item run produces outputs is undefined | Each item run uses the output interface of [section 5.6.4](#564-step-outputs); command steps also get `AWP_FOREACH_INDEX`. | +| - | An iterating step can have the status `waitingForInput`. | + +`node conformance/awp-check.mjs migrate ` also converts `v1alpha2` manifests; `forEach` +carries over unchanged. + +### 14.3 Changes from `v1alpha3` + +`v1alpha4` is `v1alpha3` plus two additions. Every `v1alpha3` manifest is a valid `v1alpha4` +manifest once its `apiVersion` is changed. + +| `v1alpha3` | `v1alpha4` | +| --- | --- | +| No step conditions | `when` on every step type with the condition grammar of [section 3.12](#312-conditions) ([AEP-0001](../../aep/0001-conditional-steps.md)). | +| A step is ready when all dependencies `succeeded` | Also when a dependency is `skipped` with reason `condition`; the condition is evaluated first, `false` skips with reason `condition`, an evaluation error fails with reason `conditionError` ([section 5.6.3](#563-execution-model)). | +| A failed step skips its dependents | Dependents are `skipped` with reason `dependencyFailed`. | +| An execution succeeds if every step `succeeded` | Steps `skipped` with reason `condition` also count as success. | +| - | Reason `missingOutput` for a step whose expressions read an output of a step skipped by condition. | +| Step types `agent`, `command`, `approval`, `input` | Adds `type: workflow`: start another workflow as a child execution, outputs `executionId` and `status` ([section 5.6.6](#566-workflow-steps), [AEP-0028](../../aep/0028-workflow-steps.md)). | +| Expression-enabled fields end with `forEach.items` | Also `workflow.inputs` values ([section 3.9](#39-expressions)). | +| Well-known actions without `workflow.start` | `workflow.start` ([section 5.5.3](#553-action-identifiers)). | +| - | Event `step.skipped`; `workflow.started` of a child execution carries `parentExecutionId` and `parentStepId` ([section 10.4](#104-event-types)). | +| CRDs serve `v1alpha3` | CRDs serve `v1alpha3` (storage) and `v1alpha4` ([section 3.10](#310-object-stores-and-kubernetes)). | + +`node conformance/awp-check.mjs migrate ` converts `v1alpha1`, `v1alpha2` and `v1alpha3` +manifests to `v1alpha4`; from `v1alpha3` it only changes `apiVersion`. A digest +([section 9.1](#91-manifest-digest)) covers `apiVersion` and has to be recomputed. + +## 15. References + +- [RFC 2119]: Key words for use in RFCs to Indicate Requirement Levels. +- [RFC 8174]: Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words. +- [RFC 8259]: The JavaScript Object Notation (JSON) Data Interchange Format. +- [RFC 8785]: JSON Canonicalization Scheme (JCS). +- RFC 3339: Date and Time on the Internet: Timestamps. +- [SemVer]: Semantic Versioning 2.0.0. +- YAML 1.2: https://yaml.org/spec/1.2.2/ +- Model Context Protocol: https://modelcontextprotocol.io +- Agent2Agent (A2A) Protocol: https://a2a-protocol.org + +[RFC 2119]: https://www.rfc-editor.org/rfc/rfc2119 +[RFC 8174]: https://www.rfc-editor.org/rfc/rfc8174 +[RFC 8259]: https://www.rfc-editor.org/rfc/rfc8259 +[RFC 8785]: https://www.rfc-editor.org/rfc/rfc8785 +[SemVer]: https://semver.org/spec/v2.0.0.html diff --git a/spec/v1alpha4/examples/cve-risk-then-fix.yaml b/spec/v1alpha4/examples/cve-risk-then-fix.yaml new file mode 100644 index 0000000..78a278e --- /dev/null +++ b/spec/v1alpha4/examples/cve-risk-then-fix.yaml @@ -0,0 +1,122 @@ +# Example: analyse the risk of a CVE for a repository, always write a report, and start the +# fix workflow `cve-fixer` only when the repository is affected (spec 3.12, 5.6.6). +# Profiles exercised: core, mcp. +apiVersion: awp.agenticworkflowprotocol.org/v1alpha4 +kind: Workflow +metadata: + name: cve-risk-then-fix +spec: + version: 0.1.0 + description: Rate the risk of a CVE for a repository and start the fix workflow if it is affected. + owner: + team: security-team + contact: security-team@example.com + classification: internal + purpose: Fix known vulnerabilities only where they apply, with a report for every analysis. + risk: + level: medium + category: + - security + triggers: + - type: manual + inputs: + - name: repository + type: string + required: true + description: Repository in the form owner/name. + - name: cve + type: string + required: true + pattern: ^CVE-[0-9]{4}-[0-9]{4,}$ + budget: + maxCostUsd: 5 + maxSteps: 40 + maxDuration: 1h + resources: + maxTokens: 400000 + maxToolCalls: 60 + maxConcurrency: 2 + secrets: + - name: GITHUB_TOKEN + source: secret-manager + scope: + - github + mcpServers: + - name: github + transport: streamable-http + url: https://mcp.example.com/github + auth: + secretRef: GITHUB_TOKEN + actionGroups: + github.read: + - github.search_code + - github.get_file_contents + agents: + - id: analyst + model: + provider: anthropic + name: claude + instructions: | + Decide whether the repository uses the vulnerable dependency or code path. + Complete the step with affected set to true or false, and risk set to one of + low, medium, high or critical. + tools: + - type: mcp + server: github + tools: + - search_code + - get_file_contents + - id: writer + model: + provider: ollama + name: qwen3 + instructions: | + Write a short risk report in Markdown for the security team. + workflow: + - id: risk + agent: analyst + task: Rate the risk of ${{ inputs.cve }} for ${{ inputs.repository }}. + outputs: + - name: affected + description: true if the repository is affected, otherwise false. + - name: risk + description: low, medium, high or critical. + # Runs after every analysis, whether or not the fix workflow is started. + - id: report + agent: writer + dependsOn: + - risk + task: >- + Report on ${{ inputs.cve }} in ${{ inputs.repository }}: + affected ${{ steps.risk.outputs.affected }}, risk ${{ steps.risk.outputs.risk }}. + outputs: + - name: summary + classification: internal + # Skipped with reason `condition` when the repository is not affected; the execution still + # succeeds. The output text `true` is read as the boolean true (spec 3.12). + - id: fix + type: workflow + dependsOn: + - risk + when: steps.risk.outputs.affected == true + workflow: + ref: cve-fixer + version: ^0.5.0 + inputs: + repository: ${{ inputs.repository }} + cve: ${{ inputs.cve }} + wait: true + outputs: + - name: executionId + - name: status + permissions: + default: deny + tools: + github.read: + allow: true + workflow.start: + allow: true + network: + egress: deny + allowHosts: + - mcp.example.com diff --git a/spec/v1alpha4/glossary.md b/spec/v1alpha4/glossary.md new file mode 100644 index 0000000..f37f9d7 --- /dev/null +++ b/spec/v1alpha4/glossary.md @@ -0,0 +1,50 @@ +# AWP v1alpha4 glossary + +Status: draft / alpha, non-normative. Normative definitions are in the +[specification](README.md); this glossary summarizes them. + +| Term | Definition | +| ---- | ---------- | +| **A2A** | Agent2Agent protocol for communication between agents. AWP references A2A endpoints as remote agents. | +| **Action** | An operation with an effect outside the model: a tool call, a command step or a message to a remote agent. Model invocations are not actions. | +| **Action group** | A named set of action identifiers declared in `spec.actionGroups`, usable wherever an action identifier is accepted. | +| **Action identifier** | Dotted name of an action, for example `github.search_code`, `shell.execute`, `a2a.security-agent.send`. | +| **Actor** | Who performs or triggers something in an execution: `agent`, `human`, `runtime` or `system`. | +| **Agent** | A configured use of a model with instructions, tools, permissions and limits. Also the kind `Agent` for reusable agent definitions. | +| **Agent reference** | An entry in `spec.agents` that points to a published `Agent` manifest by name, exact version and optional digest. | +| **Approval** | A decision by an authenticated human that allows a gated action or approval step to proceed. | +| **Audit event** | A structured record of something that happened in an execution, with a standard envelope and type (`workflow.*`, `agent.*`, `tool.*`, `policy.*`, `approval.*`, `artifact.*`). | +| **Budget** | Limits on cost, steps, duration, tokens, tool calls, retries and concurrency. | +| **Condition** | An entry of `status.conditions` in the shape of Kubernetes `metav1.Condition` (`type`, `status`, `reason`, `message`, `lastTransitionTime`). AWP reserves `Valid`, `Ready`, `Accepted` and `Succeeded`. | +| **Conformance profile** | A named set of requirements a runtime can implement: `core`, `governance`, `audit`, `security`, `mcp`, `a2a`. | +| **Conformance statement** | A document published by a runtime declaring the API version and profiles it conforms to and its limitations. | +| **Data class** | One of `public`, `internal`, `confidential`, `personal`, `restricted`, `sensitive`, `secret`; an organizational vocabulary, not a legal definition. | +| **Declassification** | Declaring an output with a lower data class than the data it was derived from; always recorded. | +| **Decision record** | A structured explanation of a consequential action in terms of evidence and policy checks. Not chain-of-thought. | +| **Digest** | `:` hash, for manifests computed over the JCS serialization without integrity, signature and provenance fields. | +| **Environment** | The organizational context of an execution (for example `development`, `staging`, `production`) with its own autonomy level. | +| **Execution** | One run of a workflow, identified by an execution identifier (`awp-exec-`). Exposed as a `WorkflowRun` by runtimes with an object store. | +| **Expression** | `${{ ... }}` reference to an input, a step output or execution facts in expression-enabled fields. | +| **Fail closed** | Rejecting or denying when something cannot be verified or determined, instead of proceeding. | +| **Kind** | The type of an object: the manifest kinds `Workflow`, `Agent` and `Policy`, and the execution object `WorkflowRun`. | +| **Manifest** | An AWP document with `apiVersion`, `kind`, `metadata`, `spec` and, when read from an object store, `status`. | +| **Object store** | A store that holds manifests as objects identified by API group, kind, namespace and name, for example the Kubernetes API server or a database of a runtime. | +| **MCP** | Model Context Protocol for connecting agents to tools and resources. AWP references MCP servers as tool sources. | +| **Permissions** | The `permissions` object that grants or denies actions and restricts network, filesystem, secrets and environments. Permissions grant; policies only restrict. | +| **Pinning** | An execution uses the workflow, agent and policy manifests it resolved at its start until it ends; later changes do not affect it. | +| **Policy** | A rule set that denies operations or requires approval under conditions. Also the kind `Policy`. | +| **Policy shorthand** | Well-known policy settings in `spec.policies` (`git`, `pullRequest`, `merge`, `production`) that expand to deny rules. | +| **Remote agent** | An agent run by another system and reached through A2A. | +| **Reproducibility record** | A record produced at the end of an execution that identifies the workflow, agents, models, prompts, tools, images, policies, inputs and artifacts it used. | +| **Risk level** | `low`, `medium`, `high` or `critical`: an organizational risk declaration with recommended default treatments. | +| **Runtime** | Software that validates and executes manifests and enforces their rules. | +| **Secret reference** | `secretRef: `: a pointer to a secret declared in `spec.secrets`. Secret values never appear in manifests. | +| **Separation of duties** | Rules that prevent the same human from both initiating or performing and approving an action. | +| **Step** | A node of the workflow graph: `agent`, `command`, `approval`, `input` or `workflow`. | +| **Step condition** | The `when` field of a step: a boolean expression the runtime evaluates before the step runs; `false` skips the step with reason `condition`. Not to be confused with a status condition. | +| **Step output** | A declared value a step produces: a file in `$AWP_OUTPUTS` for command steps, a parameter of `complete_step` for agent steps. | +| **Tool source** | An entry in an agent's `tools`: an MCP server (`type: mcp`) or a runtime built-in (`type: builtin`). | +| **Well-known action** | Reserved action identifiers with defined meaning, for example `git.merge`, `production.deploy`, `external.communication`. | +| **Workflow** | The kind `Workflow`: agents, tools, steps, limits and governance of a unit of agentic work. | +| **Workflow step** | A step with `type: workflow` that starts another workflow of the same scope as a child execution (action `workflow.start`). | +| **WorkflowRun** | The kind for one execution as an object: a request with `workflowRef`, inputs and environment, and a status written by the runtime. Not covered by digests or signatures. | From 46f76bfd723a6b3b66ea746958d30e9221a1ee0c Mon Sep 17 00:00:00 2001 From: Erik Date: Fri, 27 Nov 2026 07:29:40 +0100 Subject: [PATCH 6/6] docs(site): v1alpha4 as next draft The website renders the v1alpha4 text and glossary with a next-draft banner, lists v1alpha4 in the sidebar, the version selector, the specification overview and the versioning page, and serves its schema. v1alpha3 stays the current draft and the default everywhere else. The changelog records v1alpha4. Signed-off-by: Erik --- CHANGELOG.md | 1 + site/.gitignore | 1 + site/astro.config.mjs | 1 + site/scripts/sync-content.mjs | 7 ++++++- site/src/components/Sidebar.astro | 1 + site/src/content/docs/specification/index.md | 5 +++-- site/src/content/docs/specification/versioning.md | 3 ++- 7 files changed, 15 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d202e60..f99748f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -39,6 +39,7 @@ API versions (`v1alpha1`, ...) are versioned separately, see [GOVERNANCE.md](GOV ### Added +- `v1alpha4`, the next draft (decision D23): `v1alpha3` plus conditional steps (`when`, spec section 3.12, AEP-0001 accepted) and workflow steps (`type: workflow`, section 5.6.6, new AEP-0028 accepted), both by lead decision without the external review of D16. `v1alpha3` stays the current draft; the README, the Quickstart and the tool defaults are unchanged. New: `schema/awp.v1alpha4.json`, the conformance suite `conformance/v1alpha4/` (the `v1alpha3` cases plus cases for conditions and workflow steps), `conformance/conditions.mjs` (parser, limits and static rules of conditions), `migrate` from `v1alpha1`, `v1alpha2` and `v1alpha3` to `v1alpha4`, `spec/v1alpha4/` (text, glossary, examples including `cve-risk-then-fix.yaml`), and the CRDs in `schema/crd/` serve `v1alpha3` (storage version) and `v1alpha4`. The website lists `v1alpha4` as the next draft; `docs/aep-process.md` and `GOVERNANCE.md` name D19, D22 and D23 as the only exceptions to the external review. - Website: informative pages for the `v1alpha3` draft, taken over from the explainer site `awp-v1alpha2-draft` and rewritten against main: "v1alpha3: how it fits together" (the kinds and who writes and reads them, the lifecycle from manifest to finished run with spec references, a worked example, profiles, checklists for authors and runtime implementers, the Draft AEPs on top), "Migrating to v1alpha3" (before and after examples, what `awp-check.mjs migrate` does and what it cannot do) and "Packaging manifests with Helm" (escaping AWP expressions, what the digest covers, image tags, CRDs in charts). Proposals of the former pull request #23, the gap classification and the example chart were not taken over. - Website: `npm run check:examples` runs every YAML example marked with an `awp-check` comment through the reference checker (valid, or rejected with an expected code); part of `npm test` and the pages workflow. - AEP-0026 (interactive execution: kind `AgentSession`, `sessions` opt-in with `maxAutonomy`, three autonomy levels) and AEP-0027 (agent engine: `agents[].engine`, repository configuration off by default) as Draft concepts with open questions; numbers to be confirmed. From runtime feedback G62, G63, G65, G73, G81, G82. diff --git a/site/.gitignore b/site/.gitignore index aea26d2..f2f40d0 100644 --- a/site/.gitignore +++ b/site/.gitignore @@ -7,6 +7,7 @@ public/schema/ src/content/docs/specification/v1alpha1/ src/content/docs/specification/v1alpha2/ src/content/docs/specification/v1alpha3/ +src/content/docs/specification/v1alpha4/ src/content/docs/specification/changelog.md src/content/docs/tooling/cli.md src/content/docs/community/ diff --git a/site/astro.config.mjs b/site/astro.config.mjs index 0dd07fb..30aee42 100644 --- a/site/astro.config.mjs +++ b/site/astro.config.mjs @@ -77,6 +77,7 @@ export default defineConfig({ { label: 'v1alpha3 (current draft)', slug: 'specification/v1alpha3' }, { label: 'v1alpha3: how it fits together', slug: 'specification/v1alpha3-guide' }, { label: 'Migrating to v1alpha3', slug: 'specification/migrating-to-v1alpha3' }, + { label: 'v1alpha4 (next draft)', slug: 'specification/v1alpha4' }, { label: 'v1alpha2 (draft)', slug: 'specification/v1alpha2' }, { label: 'v1alpha1 (draft)', slug: 'specification/v1alpha1' }, { label: 'Glossary', slug: 'specification/v1alpha3/glossary' }, diff --git a/site/scripts/sync-content.mjs b/site/scripts/sync-content.mjs index ac833ea..5026e83 100644 --- a/site/scripts/sync-content.mjs +++ b/site/scripts/sync-content.mjs @@ -11,6 +11,7 @@ const GH = 'https://github.com/agenticworkflowprotocol/agenticworkflowprotocol.o const BANNER = 'Draft - v1alpha1, errata only. The current draft is v1alpha3.'; const V1ALPHA3_BANNER = 'Draft - v1alpha3, the current draft (decision D22). Fields and semantics may change before v1beta1.'; +const V1ALPHA4_BANNER = 'Next draft - v1alpha4: v1alpha3 plus conditional steps and workflow steps (decision D23). The current draft is v1alpha3.'; // repo path -> { out: content path (below src/content/docs), title, description, banner } const pages = [ @@ -26,6 +27,10 @@ const pages = [ title: 'Specification v1alpha3', description: 'Normative text of the Agentic Workflow Protocol, API version v1alpha3 (current draft): v1alpha2 aligned with the Kubernetes resource model.', banner: V1ALPHA3_BANNER }, { src: 'spec/v1alpha3/glossary.md', out: 'specification/v1alpha3/glossary.md', url: '/specification/v1alpha3/glossary/', title: 'Glossary (v1alpha3)', description: 'Terms used in the AWP v1alpha3 specification.', banner: V1ALPHA3_BANNER }, + { src: 'spec/v1alpha4/README.md', out: 'specification/v1alpha4/index.md', url: '/specification/v1alpha4/', + title: 'Specification v1alpha4', description: 'Normative text of the Agentic Workflow Protocol, API version v1alpha4 (next draft): v1alpha3 plus conditional steps and workflow steps.', banner: V1ALPHA4_BANNER }, + { src: 'spec/v1alpha4/glossary.md', out: 'specification/v1alpha4/glossary.md', url: '/specification/v1alpha4/glossary/', + title: 'Glossary (v1alpha4)', description: 'Terms used in the AWP v1alpha4 specification.', banner: V1ALPHA4_BANNER }, { src: 'docs/cli.md', out: 'tooling/cli.md', url: '/tooling/cli/', title: 'CLI output formats', description: 'Output formats and exit codes of awp validate, lint, simulate, plan, run and audit (v1alpha3).', banner: V1ALPHA3_BANNER }, { src: 'CHANGELOG.md', out: 'specification/changelog.md', url: '/specification/changelog/', @@ -88,6 +93,6 @@ for (const f of readdirSync(exDir).filter((f) => f.endsWith('.yaml'))) copyFileS // Machine-readable schema, served at its $id (https://agenticworkflowprotocol.org/schema/...). mkdirSync(join(siteRoot, 'public/schema'), { recursive: true }); -for (const v of ['v1alpha1', 'v1alpha2', 'v1alpha3']) copyFileSync(join(repoRoot, `schema/awp.${v}.json`), join(siteRoot, `public/schema/awp.${v}.json`)); +for (const v of ['v1alpha1', 'v1alpha2', 'v1alpha3', 'v1alpha4']) copyFileSync(join(repoRoot, `schema/awp.${v}.json`), join(siteRoot, `public/schema/awp.${v}.json`)); if (!existsSync(join(repoRoot, 'CNAME'))) throw new Error('CNAME missing in repository root'); console.log(`sync-content: ${pages.length} pages, ${readdirSync(genDir).length} example files`); diff --git a/site/src/components/Sidebar.astro b/site/src/components/Sidebar.astro index a025235..280f742 100644 --- a/site/src/components/Sidebar.astro +++ b/site/src/components/Sidebar.astro @@ -7,6 +7,7 @@ import Default from '@astrojs/starlight/components/Sidebar.astro';
v1alpha3 (current draft)
    +
  • v1alpha4 (next draft)
  • v1alpha3 (current draft)
  • v1alpha2 (draft)
  • v1alpha1 (draft)
  • diff --git a/site/src/content/docs/specification/index.md b/site/src/content/docs/specification/index.md index 3112e0b..890efd8 100644 --- a/site/src/content/docs/specification/index.md +++ b/site/src/content/docs/specification/index.md @@ -9,13 +9,14 @@ The normative text lives in the [`spec/`]( https://github.com/agenticworkflowpro | API version | Status | Text | | ----------- | ------ | ---- | +| `v1alpha4` | **Next draft / alpha**: `v1alpha3` plus conditional steps (`when`) and workflow steps (decision D23); not yet the default | [Specification v1alpha4](/specification/v1alpha4/) | | `v1alpha3` | **Current draft / alpha**, may change incompatibly | [Specification v1alpha3](/specification/v1alpha3/), [how it fits together](/specification/v1alpha3-guide/), [migrating](/specification/migrating-to-v1alpha3/) | | `v1alpha2` | **Draft / alpha**, `v1alpha1` plus step iteration; errata only | [Specification v1alpha2](/specification/v1alpha2/) | | `v1alpha1` | **Draft / alpha**; errata only | [Specification v1alpha1](/specification/v1alpha1/) | -- Glossary: [v1alpha3](/specification/v1alpha3/glossary/), [v1alpha2](/specification/v1alpha2/glossary/), [v1alpha1](/specification/v1alpha1/glossary/) +- Glossary: [v1alpha4](/specification/v1alpha4/glossary/), [v1alpha3](/specification/v1alpha3/glossary/), [v1alpha2](/specification/v1alpha2/glossary/), [v1alpha1](/specification/v1alpha1/glossary/) - [Versioning](/specification/versioning/) and [changelog](/specification/changelog/) -- JSON Schema (structural rules): [v1alpha3](/schema/awp.v1alpha3.json), [v1alpha2](/schema/awp.v1alpha2.json), [v1alpha1](/schema/awp.v1alpha1.json); [conformance suite](https://github.com/agenticworkflowprotocol/agenticworkflowprotocol.org/tree/main/conformance) and [CLI output formats](/tooling/cli/) +- JSON Schema (structural rules): [v1alpha4](/schema/awp.v1alpha4.json), [v1alpha3](/schema/awp.v1alpha3.json), [v1alpha2](/schema/awp.v1alpha2.json), [v1alpha1](/schema/awp.v1alpha1.json); [conformance suite](https://github.com/agenticworkflowprotocol/agenticworkflowprotocol.org/tree/main/conformance) and [CLI output formats](/tooling/cli/) The specification text is licensed under CC BY 4.0. Examples, schemas and code are licensed under Apache-2.0. diff --git a/site/src/content/docs/specification/versioning.md b/site/src/content/docs/specification/versioning.md index 4b4e804..6c2246e 100644 --- a/site/src/content/docs/specification/versioning.md +++ b/site/src/content/docs/specification/versioning.md @@ -12,10 +12,11 @@ apiVersion: awp.agenticworkflowprotocol.org/v1alpha3 ``` - `v1alpha3` is the current working draft: `v1alpha2` aligned with the Kubernetes resource model (governance fields in `spec`, extension fields in `extensions`, `status`, kind `WorkflowRun`, step outputs, schedule semantics, human input, execution pinning). Its AEPs were accepted by lead decision D22 ([changes](/specification/v1alpha3/#142-changes-from-v1alpha2)). `awp-check.mjs migrate` converts `v1alpha1` and `v1alpha2` manifests; see [Migrating to v1alpha3](/specification/migrating-to-v1alpha3/). +- `v1alpha4` is the next draft: `v1alpha3` plus conditional steps (`when`) and workflow steps (`type: workflow`), accepted by lead decision D23 ([changes](/specification/v1alpha4/#143-changes-from-v1alpha3)). It is added next to `v1alpha3` and does not replace it: the README, the Quickstart and the default of the tools stay at `v1alpha3` until a new decision. `awp-check.mjs migrate` converts `v1alpha1`, `v1alpha2` and `v1alpha3` manifests to `v1alpha4`; from `v1alpha3` only `apiVersion` changes. - `v1alpha2` (`v1alpha1` plus step iteration, `forEach`) and `v1alpha1` stay available as drafts and only get errata. Manifests of these versions keep validating against their own schema. - Any field, rule or conformance requirement of an alpha version may change incompatibly in a later alpha. - Beta and stable versions (`v1beta1`, `v1`) follow once the specification has been implemented and tested by more than one party. - Runtimes reject manifests with an `apiVersion` they do not support (fail closed). Validators pick the schema by the `apiVersion` of each document. -- This website models versions as directories: `/specification/v1alpha3/`, `/specification/v1alpha2/` and `/specification/v1alpha1/`. +- This website models versions as directories: `/specification/v1alpha4/`, `/specification/v1alpha3/`, `/specification/v1alpha2/` and `/specification/v1alpha1/`. See [Versioning in the specification](/specification/v1alpha3/#14-versioning) for the normative rules.