diff --git a/CHANGELOG.md b/CHANGELOG.md index bf7ee0f..cf5dbb2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,6 +17,8 @@ API versions (`v1alpha1`, ...) are versioned separately, see [GOVERNANCE.md](GOV ### Changed +- Runtime feedback G88 to G95 from a comparison with kagent (`docs/runtime-feedback.md` section 11, questions 12 and 13 for the project lead). New Draft AEPs: 0029 (references by name, `version` and `digest` as optional assertions, recorded resolution, `workflow.digest` for workflow steps), 0030 (kind `Model`, one object per model with limits, defaults, profiles and provider-neutral parameters; runtime model calls under model policy, data policy and budget; proposed to supersede AEP-0008), 0031 (kind `McpServer`, one object per MCP server referenced by name; proposed to replace the kind `McpCatalog` of AEP-0007), 0032 (policy shorthands as enums, conditions as match expressions) and 0033 (durations in the Go and Kubernetes format, retention in days); 0032 and 0033 target the API version after `v1alpha4`. Amendments: AEP-0003 (outputs with a schema are typed by it in conditions), AEP-0021 (policy attachment with `targetRefs` for organisation policies, schedule suspension in the binding, signatures outside `spec` as an open question), AEP-0023 (secret delivery as a header to one target, execution identity with `audiences`, no `allowTo` entries for declared model and MCP endpoints). None is accepted. +- Spec `v1alpha4` (editorial): in an object store a reference resolves by name and `version` and `digest` are assertions (3.10); a policy shorthand `true` does not allow the action (8.1); network requirements of a specific use belong in the workflow (7.5.4). - Decision D24: `v1alpha4` is the current draft. AEP-0001 and AEP-0028 are already accepted by D23; D24 accepts no further AEP and needs no exception to the external review beyond the one D23 recorded (alpha waiver of the discussion period). AEPs that targeted `v1alpha3` and are not accepted (0002 to 0014) and the Draft AEPs 0021 and 0023 to 0027 now target `v1alpha4`; `v1alpha1`, `v1alpha2` and `v1alpha3` stay supported and only get errata. The status notes of `spec/v1alpha3/README.md` and `spec/v1alpha4/README.md` say so (no other change to the text of either version); the CRDs keep `v1alpha3` as the storage version. The website (version selector, sidebar, banners, versioning, specification overview, introduction, examples rendered from `spec/v1alpha4/examples/`, concept, governance, security, integration and implementation pages), the README, the Quickstart, the CLI output formats (`docs/cli.md`), the site plan, `llms.txt` and `SECURITY.md` use `v1alpha4`. New pages "v1alpha4: what's new" and "Migrating to v1alpha4" (from `v1alpha3` only `apiVersion` changes); their complete manifests are checked by `check:examples`. - Decision D22: `v1alpha3` is the current draft. AEPs 0015 to 0020 (Kubernetes resource model, schedule semantics, human input, step outputs, `WorkflowRun`, execution pinning) are accepted by lead decision in the form written into the draft, without the external review of D16; reviews are still invited and handled as errata. AEP-0021 stays a Draft concept. AEPs that targeted `v1alpha2` and are not accepted (0001 to 0007, 0010 to 0014) now target `v1alpha3`; `v1alpha1` and `v1alpha2` stay supported and only get errata. The website (version selector, sidebar, banners, versioning, specification overview, introduction, examples rendered from `spec/v1alpha3/examples/`), the README and the Quickstart use `v1alpha3`. - Conformance suite: the manifest examples and the valid cases of `v1alpha1` and `v1alpha2` must validate after `awp-check.mjs migrate` (70 `migrate:` cases), so older versions stay convertible to the current draft. diff --git a/aep/0003-typed-handoffs.md b/aep/0003-typed-handoffs.md index dd6ca41..fab50b7 100644 --- a/aep/0003-typed-handoffs.md +++ b/aep/0003-typed-handoffs.md @@ -108,6 +108,31 @@ step's expressions as an object keyed by their reference text). `handoff.invalid` MUST NOT contain the offending values under `payload: metadata`. +### Typing in conditions and expressions (amendment for `v1alpha4`) + +`v1alpha4` reads step outputs in conditions as JSON if the text parses as a JSON value, and +otherwise as a string (spec 3.12, "Values and typing"). Without a schema, the form of the text +decides the type: an output `true` is a boolean, and an output that happens to parse as JSON +changes its type. With this AEP the type is declared instead: + +1. **Outputs with `schema`.** The value of an output with `schema` is the validated JSON value. In + a condition, `steps..outputs.` and every path below it have the type the schema + gives them. The runtime MUST NOT apply the parse rule of spec 3.12 to such an output: the + string output `"true"` of a schema `{ type: string }` stays a string. +2. **Outputs without `schema`.** The parse rule of spec 3.12 applies unchanged. +3. **Field access in expressions.** For an output with an object or array schema, an expression + MAY select into the value: `${{ steps..outputs.. }}` with one or more keys, with + the key syntax and rendering rules of `forEach.item.` (spec 3.9). Validators MUST reject a + key path that the schema does not allow when the schema sets `additionalProperties: false` on + the object along the path. Field access on an output without `schema` MUST be rejected. +4. **The runtime validates itself.** A runtime MAY pass the schema to the model provider (for + example a strict structured-output mode). It MUST still validate the value itself against the + schema before the step completes. A provider mode is an optimisation, never the check. + +The static rule of spec 3.12 (item 2, `` is a declared output) is extended: a path below an +output with a schema SHOULD be checked against the schema, and validators SHOULD warn when a path +cannot resolve under it. + ## Examples ```yaml @@ -137,12 +162,24 @@ spec: - steps.analysis.outputs.result ``` +With a schema, the condition above reads `action` as a string because the schema says so, and a +task can use a single field: + +```yaml + - id: notify + agent: writer + dependsOn: [analysis] + task: "Write a short note for a ${{ steps.analysis.outputs.result.severity }} finding." +``` + ## Schema changes - `WorkflowSpec.properties.schemas`; output entry `schema`, `onInvalid`; step `input`. - `$defs/SchemaSubset` (structural part); keyword, reference, recursion and limit rules as semantic rules `schema.keyword`, `schema.ref`, `schema.recursion`, `schema.limits`, `schema.pattern`; `input.from-not-a-dependency`, `input.from-undeclared-output`, `input.expression-not-in-from`. +- Expression references `steps..outputs..` (amendment); semantic rules + `expression.field-access-without-schema`, `expression.field-not-in-schema`. ## Conformance impact @@ -151,6 +188,9 @@ spec: - New cases: `valid/5.8-schemas-and-handoffs.yaml`; invalid: `5.8-unsupported-keyword.yaml`, `5.8-remote-ref.yaml`, `5.8-recursive-ref.yaml`, `5.8-pattern-without-maxlength.yaml`, `5.6.1-input-from-not-dependency.yaml`, `5.6.1-expression-outside-from.yaml`. +- Amendment: `valid/3.12-condition-schema-typed.yaml` (a string-typed output `"true"` compared + with `"true"`); invalid: `3.9-field-access-without-schema.yaml`, + `3.9-field-not-in-schema.yaml`. ## Compatibility and migration @@ -180,6 +220,10 @@ enforce their own compliance requirements. This proposal makes no compliance pro - **Full JSON Schema**: unbounded evaluation cost, remote references, formats; rejected. - **Schemas only on workflow inputs**: does not cover model output, which is the risky part. - **Do nothing**: typing stays in prompts. +- **Rely on provider structured-output modes**: not portable, and not every provider has one. + Prior art: kagent (a CNCF project) defines a portable schema subset for agent output, validates + in the runtime regardless of the provider mode, and fails the task on an invalid value; this AEP + follows the same split (amendment above, item 4). ## Implementation status @@ -204,4 +248,5 @@ Owner direction of 2026-10-10: part of the `v1alpha2` scope ([decision log secti ## References - JSON Schema draft 2020-12. -- Spec sections 3.9, 5.6, 10.4. +- Spec sections 3.9, 3.12 (`v1alpha4`), 5.6, 10.4. +- Runtime feedback G02, G16, G66 ([docs/runtime-feedback.md](../docs/runtime-feedback.md)). diff --git a/aep/0007-mcp-connection-catalog.md b/aep/0007-mcp-connection-catalog.md index 59e0ff3..85724e5 100644 --- a/aep/0007-mcp-connection-catalog.md +++ b/aep/0007-mcp-connection-catalog.md @@ -218,6 +218,10 @@ The event carries digests only, never the definition text. referenced manifests it is resolved by the runtime and never fetched from a URL found in the catalog. +Note (2026-11-27): [AEP-0031](0031-mcp-server-kind.md) proposes to replace this kind by a kind +`McpServer`, one object per server with the catalog, the transport and the authorization metadata +but without URL and credentials, referenced by name with optional `version` and `digest`. + ## Examples ```yaml diff --git a/aep/0008-model-provider-catalog.md b/aep/0008-model-provider-catalog.md index b65fc58..5a1dbfa 100644 --- a/aep/0008-model-provider-catalog.md +++ b/aep/0008-model-provider-catalog.md @@ -24,6 +24,10 @@ governance status and optional aliases, referenced from a workflow (`spec.modelP name, version and a required digest. The catalog becomes an input of model policy, data residency and budget checks; it replaces per-runtime lookup tables that differ between runtimes. +> **Note (2026-11-27):** [AEP-0030](0030-model-kind.md) proposes to replace the list kind +> `ModelCatalog` with one `Model` object per model, referenced by name with an optional digest, +> and to supersede this AEP if accepted. This AEP is otherwise unchanged. + ## Motivation Spec 5.4.3 says provider identifiers are opaque and region and cost are runtime knowledge. The diff --git a/aep/0021-extension-model.md b/aep/0021-extension-model.md index d560329..3eb4759 100644 --- a/aep/0021-extension-model.md +++ b/aep/0021-extension-model.md @@ -244,6 +244,14 @@ status: - Status per target as in the Gateway API (`ancestors[]`, `Accepted` with `Invalid` or `TargetNotFound`); the target gets a condition `PoliciesAttached`. Attached policies are pinned with the execution (spec 10.1). +- **Amendment (2026-11-27): attachment is the primary way for organisation policies.** A policy + that a platform or governance team owns is attached with `targetRefs`; `policies.include` + (spec 8.1) is for policies the author of the workflow chooses. With `include` and its exact + `version`, every change of an organisation policy needs a change in every workflow that includes + it; with attachment, the team that owns the policy changes it once, and the record of each + execution shows which version applied. The specification SHOULD say so in 8.1, and the + `governance` profile SHOULD let an operator attach policies to all workflows of a scope (open + question 4). ### B6. Runtime bindings @@ -297,6 +305,14 @@ spec: endpoints, of secret stores and of egress destinations), and MUST reject a binding outside them (`Accepted=False`, reason `NotAllowed`). The audit events name the binding and its version. - Bindings are pinned with the execution like attached policies (spec 10.1). +- **Amendment (2026-11-27): suspending schedules (runtime feedback G90).** Pausing the schedule of + a workflow is an operational setting, not part of the reviewed manifest. It belongs to the + binding (for example a field `suspend`, as `CronJob.spec.suspend` in Kubernetes), so that + pausing does not change the digest. AWP reserves the reason `suspended` for the event + `trigger.skipped` (spec 10.4): while the accepted binding suspends a workflow, every due schedule + tick emits `trigger.skipped` with this reason and starts nothing. A `WorkflowRun` created by hand + (spec 10.8) and other non-schedule triggers still start while the schedule is suspended, unless + the runtime documents otherwise. ### B7. Annotations only for hints @@ -421,6 +437,12 @@ of its objects should become AWP kinds is discussed in runtime feedback section enough, or should conformance require a fixed list? 8. Conflicting bindings: B6 proposes "oldest wins" with an audited takeover. Is that acceptable, or should a conflict block the workflow? +9. Added 2026-11-27: signatures and provenance outside `spec`. Spec 9.1 removes `spec.integrity`, + `spec.signature` and `spec.provenance` before computing the digest, so the desired state carries + data that is not desired state. Should signatures and provenance live next to the manifest + instead, as detached signatures and attestations in the style of OCI artifacts (for example + Sigstore bundles referenced by digest) or as annotations, so that `spec` is covered by the + digest without exceptions? ## Decision diff --git a/aep/0023-step-isolation.md b/aep/0023-step-isolation.md index 2277975..a615fbf 100644 --- a/aep/0023-step-isolation.md +++ b/aep/0023-step-isolation.md @@ -29,10 +29,12 @@ manifest must be able to rely on, and nothing about how a runtime achieves it: - internal destinations are denied under `security` unless the manifest allows them; - anything above a platform ceiling is rejected, never adjusted; - credentials and approvals stay outside the execution environment; +- other secrets can be delivered as a header to exactly one destination, never into the step; +- the identity of an execution can serve as a credential (`workloadIdentity`); - an agent can require a minimum isolation class. How to enforce this safely (address checks, proxies, gateways) is informative guidance at the end. -It answers runtime feedback G10, G47, G49, G50, G51, G61, G64, G67, G68 and G69. +It answers runtime feedback G05, G10, G47, G49, G50, G51, G55, G61, G64, G67, G68, G69 and G89. ## Motivation @@ -49,6 +51,9 @@ It answers runtime feedback G10, G47, G49, G50, G51, G61, G64, G67, G68 and G69. server credential to the step, where any command can read it. A proof of concept also showed that a coding agent's own permission system can be answered from inside: a command read the agent's local server password and confirmed its own requests. +- **Other secrets end up in the step (G05, G55).** A token for a ticket system or a chat bot that a + command step uses is an environment variable of the step, readable by every command it runs, and + a destination sees only a shared bot secret, not which workflow acts. - **Isolation is invisible (G67).** An agent that runs code from an untrusted repository needs more than a container; the manifest cannot say so. - **Ceilings (G68).** Whether a platform limit rejects a manifest or silently lowers a value is @@ -126,6 +131,65 @@ Under the `security` profile: environment can reach; a permission system inside the step (for example a coding agent's own) MAY check in addition and is not enforcement. +Endpoints of declared model providers (spec 5.4.3) and of declared MCP servers (spec 5.5.1) need +no `allowTo` entry. They are reached by the runtime, outside the execution environment, at the +address its runtime configuration resolves for them, and that configuration is bounded by the +platform ceilings (section 7.5.10). `allowTo` lists only what the step itself connects to. + +### Secret delivery to a destination (section 7.9) + +Credentials for model providers and tool servers already stay outside (above). Other secrets, for +example a token that a command step uses against a ticket system, reach the step as environment +variables today. A secret entry gains `deliver`: + +| Field | Type | Description | +| ----- | ---- | ----------- | +| `deliver` | object | Optional. How the runtime delivers the secret. Absent: the secret is an environment variable of each consumer in `scope`, named exactly like the secret (`name`). | +| `deliver.header` | object | The runtime sets the secret as an HTTP request header, outside the execution environment, on connections to one destination: `host` (as in section 7.5.8, no wildcard), `port` (default 443), `name` (header name, for example `Authorization`) and `prefix` (optional, for example `"Bearer "`). | + +Rules for `deliver.header`: + +1. The value MUST NOT enter the execution environment: not as an environment variable, file or + argument. The runtime sets the header only on requests to exactly `host` and `port`, and only + over TLS. +2. The destination MUST be reachable under `permissions.network` (an `allowTo` entry that matches + `host` and `port`, or `egress: allow`); otherwise the manifest MUST be rejected. +3. Two secrets with `deliver.header` for the same `host`, `port` and header `name` make the manifest + invalid. +4. A runtime that cannot deliver a header outside the execution environment MUST reject the + manifest; it MUST NOT fall back to an environment variable. +5. A step MAY send a placeholder value in the header (for example an SDK that requires one); the + runtime replaces it. The placeholder is not a secret and carries no meaning. + +This answers G05 (naming of the environment variable when `deliver` is absent) and extends G61 to +every secret whose destination is an HTTP host. + +### Execution identity as a credential (sections 5.4.4, 5.5.1, 7.9) + +Some destinations accept an identity token instead of a stored secret. A credential object +(`mcpServers[].auth`, `auth` of a remote agent, `secrets[].deliver`) MAY use: + +| Field | Type | Description | +| ----- | ---- | ----------- | +| `method` | string | `workloadIdentity`. | +| `audiences` | list of string | REQUIRED with `workloadIdentity`: the audiences the token is issued for; at least one. | + +Rules for `workloadIdentity`: + +1. No secret is stored or declared. The runtime issues a short-lived token for each execution (or + attempt) and sets it outside the execution environment, like a delivered header. +2. The token identifies the issuer (the runtime installation), the workflow (`metadata.name`, + `spec.version`, digest), the execution id and the actor of the execution (spec 10.1). Its + lifetime MUST NOT exceed the remaining time limit of the execution. +3. The destination validates the issuer and the audience. A token MUST NOT be accepted by the + runtime itself or its gateways as their own credential. +4. A runtime that cannot issue such tokens MUST reject the manifest. + +This credential runs from the runtime to the destination. It is distinct from the short-lived +credential in the implementer guidance below, which authenticates a step to the runtime's +gateway and never leaves the runtime. It answers G55 from the other side: the destination can see +which workflow and execution acts, without a shared bot secret. + ### Changes to section 5.4 (agents): isolation class | Field | Type | Description | @@ -178,12 +242,49 @@ The agent reaches `api.example.com` on port 443 and the ticket system if the pla `10.20.0.0/16`. If `api.example.com` resolves to an internal address, the connection is denied. A runtime that offers only containers rejects the agent. +A command step that calls a ticket API with a token it never sees, and an MCP server that accepts +the execution's identity: + +```yaml +spec: + permissions: + network: + egress: deny + allowTo: + - host: tickets.example.com + ports: + - port: 443 + secrets: + - name: TICKETS_TOKEN + source: secret-manager + scope: [command] + deliver: + header: + host: tickets.example.com + port: 443 + name: Authorization + prefix: "Bearer " + mcpServers: + - name: inventory + transport: streamable-http + url: https://mcp.example.com/inventory + auth: + method: workloadIdentity + audiences: [inventory.example.com] +``` + +The command sends its requests to `tickets.example.com` without a token (or with a placeholder); +the runtime sets the header outside the step. `TICKETS_TOKEN` is not in the step's environment. + ## Schema changes - `permissions.network.allowTo`: objects with `host` or `cidr` and `ports`; `allowHosts` removed (`awp-check.mjs migrate` converts names and ranges). - `agents[].isolation`: enum `process`, `container`, `sandbox`, `vm`. -- Semantic rules for invalid hosts, ranges and port ranges. +- `secrets[].deliver.header` (`host`, `port`, `name`, `prefix`); credential objects gain `method` + `workloadIdentity` with `audiences`. +- Semantic rules for invalid hosts, ranges and port ranges; `secret.deliver-unreachable`, + `secret.deliver-conflict`, `auth.workload-identity-audiences`. ## Conformance impact @@ -191,6 +292,11 @@ runtime that offers only containers rejects the agent. - `security`: `egress: deny` default, internal destinations, credentials and approvals outside, isolation class. - Valid: `7.5.8-allow-to.yaml`. Invalid: string entry, bare wildcard, host with port, host and cidr. +- Valid: `7.9-deliver-header.yaml`, `7.9-workload-identity.yaml`. Invalid: delivery to a + destination outside `allowTo`, two secrets for the same destination and header, + `workloadIdentity` without `audiences`. +- Runtime (`security`): a delivered secret is absent from the step environment; a runtime without + header delivery or token issuance rejects the manifest. ## Compatibility and migration @@ -226,7 +332,11 @@ enforce their own compliance requirements. This proposal makes no compliance pro Prior art (decision D21): [agent-sandbox](https://agent-sandbox.sigs.k8s.io/) (Kubernetes SIG Apps) runs isolated, stateful agent workloads with the isolation backend chosen by `RuntimeClass`; it is -one platform-side way to provide an isolation class. +one platform-side way to provide an isolation class. [kagent](https://kagent.dev) (a CNCF project) +attaches a credential to an egress origin (a header with an optional prefix, set by a gateway that +replaces a placeholder) and can authenticate an agent to a destination with a short-lived token +for the running agent and named audiences; `deliver.header` and `workloadIdentity` follow these +two patterns. ## Implementer guidance (informative) @@ -265,6 +375,9 @@ ports, and no isolation class above `container` is deployed. sandbox? 5. Should separation of duties (spec 7.8) state explicitly that it is checked against the authenticated identity of a decision, never against an identity the step asserts? +6. Should `deliver` also offer a query parameter or a client certificate, or is a header enough? +7. Should the claims of a `workloadIdentity` token have fixed names (for example following the + SPIFFE or OpenID Connect conventions), so that destinations can validate them portably? ## Decision @@ -272,8 +385,9 @@ Not decided. Number and scope assigned by the maintainer on 2026-11-22. ## References -- Runtime feedback G10, G47, G49, G50, G51, G61, G64, G67, G68, G69 +- Runtime feedback G05, G10, G47, G49, G50, G51, G55, G61, G64, G67, G68, G69, G89 ([runtime-feedback.md](../docs/runtime-feedback.md)). +- kagent (CNCF): egress policies with credential headers, actor tokens with audiences. - Spec `v1alpha3` sections 5.4, 5.5.1, 5.7, 7.5, 7.6, 7.9, 11. - Kubernetes `NetworkPolicy`; RFC 1918, RFC 3927, RFC 4193, RFC 6598. - agent-sandbox, Kubernetes SIG Apps. diff --git a/aep/0029-references-by-name.md b/aep/0029-references-by-name.md new file mode 100644 index 0000000..8de73eb --- /dev/null +++ b/aep/0029-references-by-name.md @@ -0,0 +1,393 @@ +# AEP-0029: References by name, optional pins and recorded resolution + +| | | +| --- | --- | +| **AEP** | 0029 | +| **Title** | References by name, optional pins and recorded resolution | +| **Authors** | @agenticworkflowprotocol | +| **Shepherd** | to be assigned (not an author, [aep-process 5.1](../docs/aep-process.md#51-review-before-acceptance)) | +| **Type** | Specification | +| **Status** | Draft | +| **Reviewer roles needed** | runtime implementer (Kubernetes operator), runtime implementer (non-Kubernetes), security reviewer | +| **Reviewers** | none yet | +| **Target API version** | `v1alpha4` | +| **Profiles affected** | `core` (reference form and resolution), `security` (pins), `audit` (recorded resolution) | +| **Created** | 2026-11-27 | +| **Discussion** | issue to be opened | +| **Supersedes** | - | +| **Superseded-by** | - | +| **Amends** | [AEP-0028](0028-workflow-steps.md) (`workflow.version`, new `workflow.digest`) | + +## Summary + +Give every reference in a manifest one form, `{name, version?, digest?}`. The name resolves the +target in the scope of the manifest; `version` and `digest` are optional **assertions** that the +runtime verifies, never selectors. The runtime records what it resolved (name, version, digest) in +`workflow.started`, the reproducibility record and the `WorkflowRun` status. Pinning becomes a +matter of profile and policy instead of format: under the `security` profile, references to +behaviour that authors write (`Agent`, `Prompt`, child `Workflow`, `Playbook`) MUST carry a +version or a digest. Workflow steps get a `digest` and an exact `version` assertion, so that a +reviewer of a parent workflow can see which child it approves (runtime feedback G91). Objects that +the platform owns (models, MCP servers, organisation policies) are one object per thing, referenced +by name or attached by the platform with `targetRefs`, never collected in one list kind. + +## Motivation + +The draft references other manifests in five places, with three different rules: + +| Reference | `v1alpha4` today | +| --- | --- | +| `agents[].ref` (5.4.2) | `name`, `version` REQUIRED and exact, `digest` OPTIONAL | +| `promptRef` (5.4.1) | `name`, `version` REQUIRED, `digest` OPTIONAL | +| `policies.include[]` (8.1) | `name`, exact `version` REQUIRED, `digest` OPTIONAL | +| `workflow` of a workflow step (5.6.6) | `ref` (name), `version` a SemVer **range**, default "the version the runtime treats as current", no `digest` | +| `WorkflowRun.spec.workflowRef` (10.8) | `name` REQUIRED; `version` and `digest` OPTIONAL **assertions, not selectors** | + +Three problems follow. + +1. **An object store holds one object per name.** In Kubernetes, and in any store with the same + semantics (spec 3.10), `metadata.name` identifies exactly one object in a scope. There is no + `summarizer` 1.2.0 next to `summarizer` 1.3.0. A required exact `version` reads like a selector + but can only ever match the one object that exists. `WorkflowRun` already uses the correct + reading (assertions); the other references do not say so, and runtimes guess. +2. **Every change fans out.** Because `version` is required, every change to a shared `Agent`, + `Prompt` or `Policy` forces a change in every workflow that references it, even when the + referencing team does not want to pin. For objects that the platform owns, such as an + organisation policy, a model entry or an MCP server definition, this turns one change into a pull + request per repository. Teams then avoid shared objects or copy them, which is worse for review. +3. **Workflow steps are the opposite extreme.** `workflow.version` is a range with a default of + "current" and no digest. A new minor release of a child workflow changes what an approved parent + does without any change to the parent's digest, and the parent's record shows only the child's + execution identifier. This reopens, one level down, the gap that execution pinning + ([AEP-0020](0020-execution-pinning.md), G08) closed for the workflow itself. + +Where the pin belongs is a question of who governs the target: a reviewer approving a workflow +wants exactly the agent behaviour they read; a platform team publishing a model price or a +tightened policy wants it to apply without asking every author. One reference form with optional +pins, a profile rule for behaviour, and recorded resolution serve both. + +## Goals and non-goals + +- Goals: one reference form for all references; resolution by name with defined semantics in an + object store; optional version and digest assertions; recorded resolution for every execution; + mandatory pins for author-written behaviour under the `security` profile; a digest assertion and + an auditable child digest for workflow steps; a rule for objects the platform owns. +- Non-goals: references across scopes (namespaces, runtime feedback G26, K); version ranges as + general selectors; registries and their APIs; signatures of referenced manifests (spec 9.2); + changing `spec.version` of manifests, which stays a required SemVer version (spec 3.5). + +## Prior art + +- **Kubernetes object references.** References such as `configMapRef`, `secretKeyRef` or the + Gateway API `parentRefs` and `targetRefs` name an object in a scope; the API server returns the + one object with that name. Versions are not part of the reference. +- **Image references.** Container images are referenced by tag, by digest or by both + (`name:tag@sha256:...`); the digest decides. AWP already applies this to images (spec 9.4, + 10.1): tags are allowed outside the security profile and resolved and recorded at start. +- **kagent**, a CNCF project, pins exactly wherever it fixes content: images by `@sha256`, Git + sources by a full commit identifier, object storage by version identifier. An agent is compiled + into an immutable revision, and every session is pinned to the revision it started with. The + configuration objects that the revision is built from are referenced by name. + +## Specification + +### Changes to section 3.10 (object stores) + +Add: + +- **References.** A reference ([section 3.13](#new-section-313-references)) resolves by name + within the scope of the referencing manifest. `version` and `digest` in a reference are + assertions that the runtime verifies after resolution; they never select one of several objects. + Several versions of a manifest that must be available side by side need distinct names, for + example `summarizer-v1` and `summarizer-v2`. + +### New section 3.13 References + +A **reference** names another manifest. Every reference in this document has this form: + +| Field | Type | Req. | Description | +| ----- | ---- | ---- | ----------- | +| `name` | string | yes | `metadata.name` of the target in the same scope; a DNS-1123 label (section 3.4). | +| `version` | string | no | Exact SemVer version (section 3.5) that the target's `spec.version` MUST equal. | +| `digest` | string | no | Digest (sections 3.8, 9.1) that the target MUST have. | + +Rules: + +1. **Resolution.** The runtime resolves `name` in the scope of the referencing manifest. In an + object store (section 3.10) this is the one object with that name. In a store that keeps several + versions under one name (for example a registry), the runtime MAY use `version` to choose one; + without `version` it uses the version the store returns for the name alone, and it MUST document + how that version is determined. +2. **Assertions.** If `version` is present and the resolved target's `spec.version` differs, the + runtime MUST reject with reason `versionMismatch`. If `digest` is present and the resolved + target's digest differs, it MUST reject with reason `digestMismatch`. When a manifest cannot be + resolved, the runtime MUST reject with reason `referenceNotFound` (for workflow steps + `workflowNotFound`, section 5.6.6). "Reject" means: an execution does not start (section 10.1); + a workflow step fails before the child starts (section 5.6.6). +3. **Recording.** When an execution starts, the runtime resolves every reference of the workflow + and of the manifests it references, and pins the result (section 10.1). `workflow.started` + carries `data.references`: one entry per resolved reference with `kind`, `name`, `version` and + `digest` of the resolved target and `path`, the location of the reference in the manifest (for + example `spec.agents[1].ref`). Under `payload: metadata` these entries are allowed: they contain + no content. The reproducibility record (section 10.7) and the `WorkflowRun` status (section + 10.8, `status.references`) list the same entries. +4. **Pins under the security profile.** A runtime implementing the `security` profile MUST reject a + manifest in which a reference to an `Agent`, a `Prompt`, a `Playbook` or a child `Workflow` + carries neither `version` nor `digest` (reason `referenceNotPinned`). It SHOULD require + `digest` (section 9.4 already recommends digests). A runtime or platform configuration MAY + require `version` or `digest` on further references; it states this in its conformance + statement. +5. **Objects owned by the platform.** Models ([AEP-0030](0030-model-kind.md)), MCP server + definitions ([AEP-0031](0031-mcp-server-kind.md)) and organisation policies are defined as one + object per model, server or policy, never as entries of one list object. A workflow references + them by name; a platform attaches policies to workflows with `targetRefs` + ([AEP-0021 B5](0021-extension-model.md#b5-policy-attachment)). Such references need no pin + under the `security` profile: the platform, not the author, governs their content, and rule 3 + records what applied. + +### Changes to sections 5.4.1, 5.4.2 and 8.1 + +- `promptRef` (5.4.1) and `agents[].ref` (5.4.2) are references (section 3.13). `version` changes + from REQUIRED to OPTIONAL. The sentence "How a runtime resolves a reference ... is + implementation-defined" in 5.4.2 is replaced by a link to section 3.13. +- `policies.include[]` (8.1): each entry is a reference; `version` changes from REQUIRED to + OPTIONAL. + +### Changes to section 5.6.6 (workflow steps, amends AEP-0028) + +| Field | Type | Req. | Description | +| ----- | ---- | ---- | ----------- | +| `ref` | string | yes | Unchanged: `metadata.name` of a `Workflow` in the same scope. | +| `version` | string | no | Assertion on the child's `spec.version`: an exact SemVer version, or a SemVer range that the resolved version MUST satisfy. Without `version`, no assertion. | +| `digest` | string | no | **New.** Digest the resolved child workflow MUST have. | + +- Rule 2 (resolution) becomes: the runtime resolves `ref` as a reference (section 3.13) and + verifies `version` and `digest`; a mismatch fails the step with reason `versionMismatch` or + `digestMismatch` before the child starts. "More than one candidate version cannot be ordered" no + longer applies. +- Under the `security` profile, `version` MUST be an exact version or `digest` MUST be present + (section 3.13 rule 4); a range alone is not a pin (reason `referenceNotPinned`). +- New rule 12: the runtime records the resolved child (`name`, `version`, `digest`) together with + the child's `executionId` at the parent step: in `data.child` of the `tool.executed` event of the + action `workflow.start` (section 10.4), in the parent's reproducibility record (`children`) and in + `WorkflowRun.status.steps[].child`. The outputs of the step stay `executionId` and `status`. + +### Changes to section 9.4 + +Replace "and references SHOULD carry digests" by a link to section 3.13 rule 4. + +### Proposed decision + +The project lead is asked to record this rule in the decision log when the AEP is accepted: + +> References resolve by name within the scope. `version` and `digest` are optional assertions that +> the runtime verifies; the runtime records what it resolved for every execution. Whether a +> reference must be pinned is a matter of profile and policy, not of the format: under the +> `security` profile, references to behaviour that authors write (`Agent`, `Prompt`, `Playbook`, +> child `Workflow`) carry a version or a digest. Objects owned by the platform (models, MCP servers, +> organisation policies) are one object per thing, referenced by name or attached with +> `targetRefs`, and are not collected in list kinds. + +This rule touches D10 (model catalog prices in an own kind referenced by digest): with +AEP-0030, prices live in one `Model` object per model, referenced by name and recorded, instead of +a catalog referenced by a required digest. + +## Examples + +A workflow that references a shared agent by name, pins its prompt by digest and starts a child +workflow with an exact version and a digest: + +```yaml +apiVersion: awp.agenticworkflowprotocol.org/v1alpha4 +kind: Workflow +metadata: + name: cve-risk +spec: + version: 0.2.0 + owner: + team: security-team + classification: internal + inputs: + - name: repository + type: string + required: true + agents: + - id: analyst + ref: + name: cve-analyst + - id: writer + model: + provider: example-provider + name: example-model + promptRef: + name: advisory-summary + digest: sha256:4f1c9a0b2d3e4f5a6b7c8d9e0f1a2b3c4d5e6f7a8b9c0d1e2f3a4b5c6d7e8f9a + 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 + version: 0.5.2 + digest: sha256:9b2f6c1e4d8a0b7c3e5f1a2d4c6b8e0f1a3c5e7b9d0f2a4c6e8b0d1f3a5c7e9b + inputs: + repository: "${{ inputs.repository }}" + permissions: + default: deny + tools: + workflow.start: + allow: true +``` + +Outside the `security` profile this manifest is valid; under it, `agents[0].ref` needs a `version` +or a `digest`. + +The resolution recorded in `workflow.started` (excerpt): + +```yaml +type: workflow.started +workflow: + name: cve-risk + version: 0.2.0 + digest: sha256:1111111111111111111111111111111111111111111111111111111111111111 +data: + references: + - path: spec.agents[0].ref + kind: Agent + name: cve-analyst + version: 1.4.0 + digest: sha256:2222222222222222222222222222222222222222222222222222222222222222 + - path: spec.agents[1].promptRef + kind: Prompt + name: advisory-summary + version: 2.0.1 + digest: sha256:4f1c9a0b2d3e4f5a6b7c8d9e0f1a2b3c4d5e6f7a8b9c0d1e2f3a4b5c6d7e8f9a +``` + +The child workflow is resolved when the step runs, so it appears in the event of its start, not in +`workflow.started`: + +```yaml +type: tool.executed +stepId: fix +data: + action: workflow.start + outcome: success + durationMs: 412 + child: + executionId: awp-exec-01JD4M7P2Q8R9S0T1V2W3X4Y5Z + name: cve-fixer + version: 0.5.2 + digest: sha256:9b2f6c1e4d8a0b7c3e5f1a2d4c6b8e0f1a3c5e7b9d0f2a4c6e8b0d1f3a5c7e9b +``` + +## Schema changes + +- New definition `Reference` (`name` REQUIRED, `version` with the exact SemVer pattern, `digest` + with the digest pattern, `extensions`); `AgentRef.ref`, `PromptRef` and the entries of + `policies.include` use it, so `version` is no longer required there. +- `WorkflowCall` gains `digest`; `version` keeps its current pattern (exact version or range). +- `WorkflowRunStatus` gains `references` (list of `kind`, `name`, `version`, `digest`, `path`) and + `steps[].child` (`executionId`, `name`, `version`, `digest`). +- New semantic rule `security.reference-pin`, checked when the validator runs with the `security` + profile. + +## Conformance impact + +- `core`: resolution by name; the reasons `versionMismatch`, `digestMismatch` and + `referenceNotFound`; `workflow.digest` on workflow steps. +- `security`: `referenceNotPinned` for unpinned references to `Agent`, `Prompt`, `Playbook` and + child `Workflow`; a range alone is not a pin. +- `audit`: `data.references` in `workflow.started`, `data.child` of workflow steps, the record + fields `references` and `children`. +- New cases in `conformance/v1alpha4/`: `valid/3.13-agent-ref-by-name.yaml`, + `valid/3.13-prompt-ref-digest-only.yaml`, `valid/5.6.6-workflow-step-digest.yaml`; + `invalid/3.13-reference-digest-pattern.yaml` (`schema.pattern`), + `invalid/3.13-security-agent-ref-unpinned.yaml` (`security.reference-pin`, run with + `--profiles security`), `invalid/5.6.6-security-workflow-range-only.yaml` + (`security.reference-pin`). Runtime tests once a runtime suite exists: mismatch reasons, + recorded references, child digest at the parent step. + +## Compatibility and migration + +- Making `version` optional in `agents[].ref`, `promptRef` and `policies.include[]` is additive: + every manifest that is valid today stays valid and means the same, since an exact version that + is present is still verified. +- Adding `workflow.digest` is additive. Ranges in `workflow.version` stay valid; their meaning + changes from selector to assertion. In an object store the result is the same, because there is + only one candidate per name; in a store with several versions per name, a runtime that chose the + highest version satisfying the range now uses the version the store returns for the name and + rejects it if it does not satisfy the range. This is a change to the accepted AEP-0028 and needs + the same review as any change to the draft (aep-process section 4). +- Under the `security` profile, manifests with unpinned references to agents, prompts or child + workflows, which the draft accepts with a SHOULD, are rejected. Authors add `version` or + `digest`; the runtime's recorded `references` show the values to pin. +- `awp-check.mjs migrate` needs no change: all older manifests carry `version` in references. + +## Security considerations + +- Pins remain available for everything and are mandatory under `security` for behaviour that + authors write. Recorded resolution makes every unpinned reference traceable after the fact, as + image tags already are (spec 10.1). +- An unpinned reference to a platform-owned object lets the platform change what applies without a + change to the workflow, for example a tightened policy or a revoked model approval. This is + intended: the platform governs these objects. A platform that loosens such an object widens what + workflows may do without their review; platform ceilings (AEP-0023) and the review of the + platform object itself are the controls, and the recorded `references` show the change. +- A digest assertion on a workflow step closes the gap of G91: a parent pinned by digest now + approves exactly one child. + +## Privacy considerations + +The recorded references contain names, versions and digests only, no content. + +## 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 + +- **Keep `version` required everywhere.** Keeps review strict but keeps the fan-out of problem 2 + and still leaves the selector reading of problem 1. +- **Drop ranges from workflow steps** and allow only an exact version. Consistent with the other + references, but invalidates manifests written against the accepted AEP-0028, and an exact + version is already required under `security` by this AEP. +- **Version in the name only** (no `version` field). Simple in an object store, but loses the + readable assertion and the selection in registries. +- **A list kind per object type** (catalogs). One object for many models or servers makes every + addition a change of the shared object, gives every change a new digest for everyone, and allows + neither ownership nor access control per entry. Rejected for platform-owned objects. + +## Implementation status + +No implementation of this AEP exists at the time of writing. `WorkflowRun.spec.workflowRef` +(spec 10.8) already uses assertions instead of selectors. + +## Open questions + +1. Should `referenceNotFound` be a reason of its own, or should each reference keep a specific one + (`workflowNotFound`, `agentNotFound`)? +2. Should a range in `workflow.version` remain allowed at all once AEP-0029 is accepted, or be + deprecated in the next API version? +3. Should the platform be able to require pins on platform-owned references for selected + workflows (for example production), and where would that rule live: ceiling or policy? + +## Decision + +None yet. + +## References + +- Spec `v1alpha4` sections 3.10, 5.4.1, 5.4.2, 5.6.6, 8.1, 9.4, 10.1, 10.7, 10.8 +- [AEP-0020](0020-execution-pinning.md) (execution pinning), [AEP-0021](0021-extension-model.md) + (B5 policy attachment), [AEP-0028](0028-workflow-steps.md) (workflow steps), + [AEP-0030](0030-model-kind.md) (kind `Model`), [AEP-0031](0031-mcp-server-kind.md) (kind + `McpServer`) +- [Runtime feedback](../docs/runtime-feedback.md) G08, G91 diff --git a/aep/0030-model-kind.md b/aep/0030-model-kind.md new file mode 100644 index 0000000..b73e42a --- /dev/null +++ b/aep/0030-model-kind.md @@ -0,0 +1,420 @@ +# AEP-0030: Kind `Model`: one object per model, parameters and runtime model calls + +| | | +| --- | --- | +| **AEP** | 0030 | +| **Title** | Kind `Model`: one object per model, model parameters and model calls made by the runtime | +| **Authors** | @agenticworkflowprotocol | +| **Shepherd** | to be assigned (not an author, [aep-process 5.1](../docs/aep-process.md#51-review-before-acceptance)) | +| **Type** | Specification | +| **Status** | Draft | +| **Reviewer roles needed** | runtime implementer (Kubernetes operator), runtime implementer (non-Kubernetes), security reviewer, language or schema reviewer | +| **Reviewers** | none yet | +| **Target API version** | `v1alpha4` | +| **Profiles affected** | `core`, `governance`, `audit` | +| **Created** | 2026-11-27 | +| **Discussion** | issue to be opened | +| **Supersedes** | AEP-0008 (proposed; needs a decision of the project lead, see [Decision](#decision)) | +| **Superseded-by** | - | + +## Summary + +Define a kind `Model` that describes exactly one model: its provider and name, allowed versions, +region, enforced limits, price, governance status, default parameters and named parameter +profiles. An agent refers to a `Model` by name (`model.ref`, rules of AEP-0029) or keeps the +inline model object of spec 5.4.3. The agent's model object gains a provider-neutral parameter +set (`parameters`) and a profile selector (`profile`). Every model invocation that the runtime +makes for an execution, including invocations the author did not write (fallbacks, summaries, +embeddings, routing, evaluation, MCP sampling), is subject to model policy, data policy and +budget. The proposal replaces the list kind `ModelCatalog` of AEP-0008 with one object per model. + +## Motivation + +- **One list for all models is hard to operate.** AEP-0008 puts every provider and model of an + organisation into one `ModelCatalog` that workflows reference with a REQUIRED digest. A new + price, a new model or a renewed approval changes the catalog, its version and its digest, so + every workflow that references it has to be changed, reviewed and redeployed, also the ones + that never use the changed model. In an object store (spec 3.10) one large object also means + one owner, one access rule and merge conflicts in one file. Object stores and Kubernetes + describe such classes as one object per thing (`StorageClass`, `RuntimeClass`, + `IngressClass`): adding a model adds an object, and the status of each object shows its own + state. +- **Model parameters are missing.** The model object (spec 5.4.3) has no output token limit, + temperature or other request parameters. Runtimes hard-code them, so the same manifest behaves + differently on two runtimes (runtime feedback G24, G34). A real run failed because the runtime + sent a larger output limit than a self-hosted model server accepted (G59). +- **Repeated values.** Context size, output limit, price and approval are facts about a model. + Today an author repeats the approval in every model object, and the limits are runtime + knowledge. With many workflows the same values appear many times and drift. +- **Model calls the author does not see.** Runtimes call models on their own: fallbacks + (spec 7.4), summarising long histories, computing embeddings for memory, routing between + models, evaluating outputs, MCP sampling (AEP-0007 open question 5). Only fallbacks are + covered by spec 7.4. A summary model receives the full conversation, so it needs the same + residency, provider and budget rules as the agent's own model (runtime feedback G88). + +Prior art: kagent, a CNCF project, has a `ModelConfig` resource referenced by agents. It shows the +value of a named, shared model object, but it bundles four kinds of information in one object: +model and parameters, connection (base URL, API format, TLS settings, headers), credential, and +the namespaces allowed to use it. Its runtime configuration also selects models for summaries and +embeddings that the agent definition does not show. This AEP takes the shared object and leaves +connection and credential where AWP already puts them, in runtime configuration (AEP-0021 B6, +AEP-0023). + +## Goals and non-goals + +- Goals: + - one reviewable object per model with facts, limits, governance status, defaults and profiles; + - reference by name, so that a change to one model does not force a change to every workflow; + - a provider-neutral parameter set with fail-closed handling of unsupported parameters; + - enforced model limits; + - one rule for every model invocation the runtime makes for an execution. +- Non-goals: + - endpoints, wire protocols, credentials, TLS settings, streaming (runtime configuration); + - live price feeds or automatic discovery of models from a provider; + - benchmarks or quality ratings; + - a registry of well-known provider identifiers. + +## Specification + +### New section 6c: Kind `Model` + +A `Model` manifest describes one model of one provider. It is written by the people who govern +model use in an organisation and is reviewed like a policy. It contains no connection details and +no credentials. + +```yaml +apiVersion: awp.agenticworkflowprotocol.org/v1alpha4 +kind: Model +metadata: + name: example-large +spec: + version: 1.4.0 + owner: + team: platform-governance + provider: example-cloud-eu + name: example-large + versions: ["2026-08"] + region: EU + limits: + contextTokens: 200000 + maxOutputTokens: 64000 + price: + inputPerMTok: 3.0 + outputPerMTok: 15.0 + approval: + status: approved + expires: "2027-06-30" + approvedBy: model-risk-board + riskClassification: medium + defaults: + maxOutputTokens: 4096 + profiles: + careful: + temperature: 0.1 + reasoningEffort: high + fast: + maxOutputTokens: 1024 + reasoningEffort: low +``` + +`spec` contains the common fields of spec 4.2 and: + +| Field | Type | Req. | Description | +| ----- | ---- | ---- | ----------- | +| `provider` | string | yes | Provider identifier as in spec 5.4.3. | +| `name` | string | yes | Model name or family as known to the provider. | +| `versions` | list of string | no | Exact model versions or snapshot identifiers that may be used. Absent: the runtime chooses and records the version (spec 5.4.3). | +| `region` | string | no | Region where the model processes data (spec 7.3). | +| `limits` | object | no | `contextTokens`, `maxOutputTokens` (positive integers). Enforced, see below. | +| `price` | object | no | `currency` (ISO 4217, default `USD`), `inputPerMTok`, `outputPerMTok`, `cacheReadPerMTok`, `cacheWritePerMTok` (non-negative numbers, per million tokens), `effective` (date). | +| `approval`, `riskClassification`, `evaluation`, `allowedUseCases` | | no | As in the model object (spec 5.4.3). | +| `defaults` | object | no | Parameters (below) used when the agent does not set them. | +| `profiles` | map | no | Named parameter sets. Keys follow the rules for names (spec 3.4); at most 16 profiles. | + +Rules: + +1. `defaults`, every profile and every agent's `parameters` MUST respect `limits`: a + `maxOutputTokens` above `limits.maxOutputTokens` is invalid. Validators MUST reject such a + `Model` manifest, and runtimes MUST reject an execution whose resolved parameters exceed the + limits. Runtimes MUST NOT send a request whose input exceeds `limits.contextTokens` and MUST + NOT silently lower a value instead of rejecting (runtime feedback G59; the ceiling rule of + AEP-0023: reject, never adjust). +2. The governance fields of a `Model` are authoritative over the declarations in an inline model + object (spec 5.4.3 already allows a model inventory to replace them). +3. A runtime MUST NOT fetch a `Model` from a provider or from a URL found in a manifest. Model + objects change through reviewed changes only. +4. A `Model` is not a binding: how the runtime reaches the provider is runtime configuration + (AEP-0021 B6). That configuration MUST NOT contradict the `Model` (for example a connection in + another region than `region`). + +### Changes to section 5.4.3 (Model object) + +The model object of an agent is either **inline** (the fields of spec 5.4.3, unchanged) or a +**reference**: + +| Field | Type | Req. | Description | +| ----- | ---- | ---- | ----------- | +| `ref` | object | no | `name` (REQUIRED), `version` (OPTIONAL), `digest` (OPTIONAL) of a `Model` manifest. Resolution, assertions and pinning follow AEP-0029. | +| `profile` | string | no | Name of a profile of the referenced `Model`. Only with `ref`. | +| `parameters` | object | no | Request parameters (below). Allowed inline and with `ref`. | + +- A model object with `ref` MUST NOT contain `provider`, `name`, `version`, `region` or the + governance fields; they come from the `Model`. +- A `profile` that the referenced `Model` does not define MUST be rejected before the execution + starts. +- An inline model object, as in spec 5.4.3, stays valid. Its governance fields are declarations + by the author. + +**Parameters.** A provider-neutral set: + +| Field | Type | Description | +| ----- | ---- | ----------- | +| `maxOutputTokens` | integer | Maximum output tokens per model invocation. | +| `temperature` | number | Sampling temperature, `0` to `2`. | +| `topP` | number | Nucleus sampling, greater than `0` and at most `1`. | +| `stopSequences` | list of string | At most 8 sequences. | +| `reasoningEffort` | string | `low`, `medium` or `high`. | +| `seed` | integer | Seed for providers that support reproducible sampling. | + +- Other keys MUST be domain-prefixed extension keys (spec 3.3, for example + `example.com/top-k`). AWP defines no field that passes raw request content to a provider. +- A runtime that cannot apply a parameter to the resolved provider and model MUST reject the + execution before it starts (fail closed) and MUST NOT ignore the parameter. The diagnostic names + the parameter and the agent. +- **Resolution order.** For each parameter the runtime uses the first value it finds in: the + agent's `parameters`, the selected `profile`, the `Model`'s `defaults`, the runtime's + documented default. The resolved values MUST respect `limits` (rule 1 of section 6c) and MUST + be recorded in the reproducibility record (spec 10.7). + +### Changes to section 7.4 (Model governance) + +- `modelPolicy` rules apply to the resolved model: for a reference, the provider, name, version, + region and governance fields of the `Model`. The `catalog` field of AEP-0008 is not adopted. +- New requirement field: + + | Field | Type | Description | + | ----- | ---- | ----------- | + | `requirements.modelRef` | boolean | If `true`, every agent's model MUST be a reference to a `Model`; inline model objects are rejected. | + +- Whether a reference must be pinned with `version` or `digest` follows AEP-0029 (pinning by + policy and under the `security` profile), not this AEP. +- **Model invocations made by the runtime.** Every model invocation that a runtime makes as part + of an execution, whether or not an agent of the manifest declares it, MUST satisfy + `modelPolicy` and `dataPolicy` (spec 7.3), MUST count against the budget (spec 5.7) and MUST + appear in the usage data and in the reproducibility record (spec 10.7) with its purpose. This + includes fallbacks, summarising or compacting histories, computing embeddings, routing between + models, evaluating outputs and sampling requested by an MCP server. The runtime MUST reject the + execution before it starts if a model it is configured to use for such a purpose does not + satisfy the policies. + +New `purpose` values in usage data and audit events (spec 10.4): `agent` (default), `fallback`, +`summary`, `embedding`, `routing`, `evaluation`, `sampling`. + +### Changes to section 7.3 (Data residency) + +The region of a model is the `region` of the referenced `Model`, else `model.region`, else the +region configured for the provider in the runtime. The fail-closed rule is unchanged. + +### Changes to section 5.7 (Budgets) + +When a `Model` defines `price`, the runtime MUST use it to compute cost and MUST name the +`Model` (name, version, digest) in the usage data. Without `price` the existing rule (documented +computation, `costKnown`) holds. + +### Changes to section 3.2 and the Kubernetes binding (3.10) + +`Model` is a kind written by people, versioned and covered by digests and signatures like +`Agent` and `Policy`. In the Kubernetes binding the plural name is `models`. Whether the resource +is namespaced or cluster-scoped is open question 1. + +## Examples + +A shared model and an agent that refers to it with a profile and one parameter of its own: + +```yaml +apiVersion: awp.agenticworkflowprotocol.org/v1alpha4 +kind: Model +metadata: + name: example-small +spec: + version: 2.0.0 + owner: + team: platform-governance + provider: example-cloud-eu + name: example-small + region: EU + limits: + contextTokens: 128000 + maxOutputTokens: 16000 + price: + inputPerMTok: 0.25 + outputPerMTok: 1.25 + approval: + status: approved + expires: "2027-06-30" + defaults: + maxOutputTokens: 2048 + profiles: + extract: + temperature: 0 +--- +apiVersion: awp.agenticworkflowprotocol.org/v1alpha4 +kind: Workflow +metadata: + name: event-digest +spec: + version: 0.3.0 + owner: + team: example-team + classification: internal + modelPolicy: + requirements: + approvalStatus: approved + region: EU + modelRef: true + agents: + - id: collector + model: + ref: + name: example-small + profile: extract + parameters: + maxOutputTokens: 8192 + workflow: + - id: collect + agent: collector + task: List the upcoming events on https://events.example.com. +``` + +The resolved parameters of `collector` are `temperature: 0` (profile) and +`maxOutputTokens: 8192` (agent), both within the limits of `example-small`. The runtime records +the `Model` version and digest it resolved (AEP-0029). + +An inline model object with parameters, unchanged except for `parameters`: + +```yaml +agents: + - id: assistant + model: + provider: example-provider + name: example-model + parameters: + maxOutputTokens: 4096 + temperature: 0.2 +``` + +## Schema changes + +- Root kind `Model`; `$defs/ModelSpec`, `$defs/ModelLimits`, `$defs/ModelPrice`, + `$defs/ModelParameters`. +- `$defs/Model` becomes `oneOf` inline model object or reference (`ref`, `profile`, + `parameters`); `parameters` added to the inline form. +- `ModelPolicy.requirements.modelRef`. +- Semantic rules: `model.limits-exceeded` (defaults, profile or parameters above `limits`), + `model.ref-with-inline-fields`, `model.profile-without-ref`, `model.unknown-parameter` + (non-prefixed key), `price.negative`. +- CRD `schema/crd/models.yaml`. + +## Conformance impact + +- `core`: validation of `Model` manifests; the reference form of the model object; parameter + validation and the fail-closed rule for unsupported parameters. +- `governance`: policy checks against the resolved `Model`; `requirements.modelRef`; runtime + model invocations under model and data policy. +- `audit`: resolved parameters, `Model` identity and the `purpose` of each invocation in usage + data and the reproducibility record. +- New valid cases: `valid/6c-model.yaml`, `valid/5.4.3-model-ref-profile.yaml`, + `valid/5.4.3-model-parameters-inline.yaml`. +- New invalid cases: `6c-model-defaults-above-limit.yaml` (`model.limits-exceeded`), + `5.4.3-model-ref-with-provider.yaml` (`model.ref-with-inline-fields`), + `5.4.3-profile-without-ref.yaml` (`model.profile-without-ref`), + `5.4.3-unprefixed-parameter.yaml` (`model.unknown-parameter`), + `6c-model-negative-price.yaml` (`price.negative`). +- Runtime tests, once a runtime suite exists: unsupported parameter rejected; summary model + outside `residency.allowed` rejects the execution; usage records `purpose: summary`. + +## Compatibility and migration + +Additive for manifests: inline model objects without `parameters` stay valid and mean the same. +Runtimes that implement AEP-0008 can convert each catalog model entry into one `Model` object; +provider-level `region` moves to each model, `aliases` have no equivalent yet (open question 2). +The rule for model invocations made by the runtime is new for runtimes: a runtime that today +uses an unrestricted summary or embedding model must bring it under the policies or reject. + +## Security considerations + +- A `Model` decides what is allowed and what it costs; it is a governed dependency with owner, + version and digest, changed only by reviewed changes, never fetched. +- Keeping endpoints and credentials out of the `Model` keeps them out of reviewed, shareable + objects; a runtime connection that contradicts the `Model` region must be rejected. +- Fail-closed parameter handling prevents a manifest from appearing to set a limit (for example a + low output limit) that a runtime silently ignores. +- Model invocations made by the runtime are a data path the author does not see; without the + rule of section 7.4 a summary or embedding model could send confidential content to a provider + that the workflow's data policy forbids. + +## Privacy considerations + +Summaries and embeddings contain the content of conversations. Bringing them under `dataPolicy` +applies residency and provider rules to them. The usage data names purposes, not content. + +## 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 + +- **`ModelCatalog` as in AEP-0008** (one list, REQUIRED digest): every change to any model + changes the digest that every workflow pins. Rejected for the operating cost described under + Motivation. +- **A model object with connection and credential, as kagent's `ModelConfig`**: convenient on one + platform, but puts deployment data (base URL, TLS settings, credential reference) into a + reviewed, portable object. Rejected; runtime configuration keeps them (AEP-0021 B6, AEP-0023). +- **Parameters only inline, reuse through `Agent` references**: no new kind, but limits, prices + and approvals stay unshared, and agents that differ in prompt or tools repeat the same model + values. +- **A `ModelProfile` kind written by authors, separate from the `Model`**: allows authors to + define profiles, but adds a third level of resolution (workflow, agent, profile, model) and + splits limits from the values they constrain. Kept as open question 3. +- **Do nothing**: parameters stay runtime-specific, and runtime model invocations stay outside + governance. + +## Implementation status + +No implementation of this AEP exists. + +## Open questions + +1. **Scope in the Kubernetes binding.** Classes such as `StorageClass` are cluster-scoped. A + cluster-scoped `Model` would be shared by all namespaces and could only be changed by cluster + operators; a namespaced `Model` fits the same-scope reference rule (spec 5.4.2, AEP-0029) and + tenants. Should `Model` be namespaced, cluster-scoped, or should the binding leave it to the + runtime with a rule for resolution? +2. **Provider-level data.** AEP-0008 had provider entries with `region` and `aliases` (several + tenant connections to one provider). Are fields on each `Model` enough, or is a later kind + `ModelProvider` needed? +3. **Profiles written by authors.** Profiles belong to the owner of the `Model`. Should authors be + able to define their own named profiles (for example in an `Agent` or a separate kind), within + the limits of the `Model`? +4. Should `reasoningEffort` also accept a token budget (`reasoningTokens`) for providers that + express reasoning as a budget? + +## Decision + +Not decided. This AEP proposes to supersede AEP-0008 and to replace the direction recorded in +owner decision [D10](../docs/decisions.md#d10-model-catalog-prices-in-an-own-kind-referenced-by-digest) +(prices in an own kind referenced by a REQUIRED digest): prices stay in an own kind, but one +object per model, referenced by name, with an optional digest. Changing D10 needs a decision of +the project lead. The AEP needs the reviews listed in the header before it can be accepted +([aep-process 5.1](../docs/aep-process.md#51-review-before-acceptance)). + +## References + +- Spec sections 3.2, 3.3, 3.10, 4.2, 5.4.3, 5.7, 7.3, 7.4, 10.4, 10.7. +- AEP-0007 (MCP sampling, open question 5), AEP-0008 (model and provider catalog), AEP-0021 B6 + (bindings), AEP-0023 (ceilings, credentials outside the execution environment), AEP-0029 + (references by name). +- Runtime feedback G24, G34, G59, G60, G88 ([docs/runtime-feedback.md](../docs/runtime-feedback.md)). +- kagent `ModelConfig` (CNCF project), prior art. +- ISO 4217. diff --git a/aep/0031-mcp-server-kind.md b/aep/0031-mcp-server-kind.md new file mode 100644 index 0000000..a9bd38e --- /dev/null +++ b/aep/0031-mcp-server-kind.md @@ -0,0 +1,288 @@ +# AEP-0031: Kind `McpServer`: one object per MCP server, referenced by name + +| | | +| --- | --- | +| **AEP** | 0031 | +| **Title** | Kind `McpServer`: one object per MCP server, referenced by name | +| **Authors** | @agenticworkflowprotocol | +| **Shepherd** | to be assigned (not an author, [aep-process 5.1](../docs/aep-process.md#51-review-before-acceptance)) | +| **Type** | Specification | +| **Status** | Draft | +| **Reviewer roles needed** | runtime implementer (Kubernetes operator), runtime implementer (non-Kubernetes), MCP practitioner, security reviewer | +| **Reviewers** | none yet | +| **Target API version** | `v1alpha4` | +| **Profiles affected** | `mcp`, `audit` (reproducibility record) | +| **Created** | 2026-11-27 | +| **Discussion** | issue to be opened | +| **Supersedes** | the kind `McpCatalog` of [AEP-0007](0007-mcp-connection-catalog.md) (if accepted; the rest of AEP-0007 stays) | +| **Superseded-by** | - | + +## Summary + +Replace the kind `McpCatalog` of AEP-0007 by a kind `McpServer`: one object per MCP server that +holds the governance description of AEP-0007 (protocol revision, tools with access class, +clearance, scopes, actions and definition digest, resources, prompts, profiles) together with the +transport and the authorization metadata of the connection. It holds no URL and no credential: +both are deployment data of the runtime. A workflow declares a server by name and points to the +object with `ref: {name, version, digest}`, where `version` and `digest` are optional assertions +(AEP-0029). The per-tool `definitionDigest` stays as AEP-0007 requires it. + +## Motivation + +With AEP-0007 as drafted, a workflow that uses an MCP server repeats the connection in +`spec.mcpServers[]`: transport, `url`, `auth` and either an inline catalog or a reference to an +`McpCatalog`. Two problems follow: + +- **Repetition.** Forty workflows that use the same ticket server repeat its transport, its + authorization metadata and its catalog reference forty times. A change of the server's scopes or + of its OAuth issuer is a change in every workflow. +- **Update fan-out.** `catalog.ref` requires `name`, `version` and `digest`. Every reviewed change + of the catalog (a new tool, a changed definition, a new resource template) produces a new version + and digest, and every workflow has to be updated before it can use the server again, including + workflows that do not use the changed tool. +- **Half an object.** The catalog describes what a server offers, but not how a runtime connects + to it; the connection is part of every workflow. In an object store with Kubernetes semantics + the usual shape is one object per thing (as `StorageClass`, `RuntimeClass` or `IngressClass`), + owned by the team that runs it, with its own status. + +The URL itself is deployment data (runtime feedback G70): the same reviewed server runs at +different addresses in test and production, and the runtime reaches it, not the step (AEP-0023). +Credentials never belong to the manifest (spec 7.9, AEP-0023). + +## Goals and non-goals + +- Goals: describe an MCP server once and reference it by name; keep the reviewed tool definitions + pinned; keep URL and credentials out of every manifest; one owner and one status per server. +- Non-goals: changing the catalog semantics of AEP-0007 (access classes, clearance, profiles, + rules 1 to 11); service discovery; a registry protocol for servers. + +## Prior art + +kagent, a Cloud Native Computing Foundation project, has a resource `RemoteMCPServer` per server +that agents reference by name and that several agents share. It also carries the URL, header +credentials taken from a Secret and TLS settings, and it observes the tool names a server returns +instead of pinning their definitions. This AEP takes the shape (one object per server, referenced +by name) and leaves the connection data with the runtime. + +## Specification + +### New kind `McpServer` + +`apiVersion: awp.agenticworkflowprotocol.org/v1alpha4`, `kind: McpServer`, with the common +`metadata` and the common spec fields of spec 4.2 (`version`, `owner`, ...). Kind-specific +`spec` fields: + +| Field | Type | Req. | Description | +| ----- | ---- | ---- | ----------- | +| `transport` | string | yes | `streamable-http` or `stdio` (spec 5.5.1). | +| `auth` | object | no | Authorization metadata as in AEP-0007 (`method`, and for `oauth`: `grant`, `resource`, `scopes`, `issuer`). MUST NOT contain `secretRef` or `clientRef`; the runtime supplies credentials outside the execution environment (AEP-0023). | +| `server`, `matchServerInfo`, `protocolVersion`, `tools`, `resources`, `prompts`, `profiles` | | | The catalog fields of AEP-0007 section 5.5.5, with the same rules. | + +Rules: + +1. An `McpServer` MUST NOT contain a `url`, an `image`, a `command`, a `secretRef`, a `clientRef` + or any other credential. The runtime resolves where and how it reaches the server from its own + configuration (for example a binding, AEP-0021 B6), under the constraints of its operator. The + resolved endpoint MUST NOT contradict the object: a runtime MUST NOT use a server whose + `serverInfo` differs when `matchServerInfo` is `true`, and MUST apply rule 4 of AEP-0007 to + every tool it exposes. +2. When `auth.method` is `oauth` and `auth.resource` is absent, the canonical server URI is the + endpoint the runtime resolved. A reviewer who needs a fixed audience sets `resource`. +3. The **object digest** (spec 9.1, AEP-0010) identifies one reviewed version of the object. The + **tool definition digest** (`tools..definitionDigest`, AEP-0007 rule 4) identifies one + tool definition as the server returns it. They protect different things: the object digest a + reviewed description, the definition digest against a server that changes a tool after review. + Making the object digest optional (below) does not make the definition digest optional: + `definitionDigest` stays REQUIRED under the `security` profile, as in AEP-0007. +4. Rules 2 (no token passthrough), 3 (uncatalogued tools are not exposed) and 11 (explicit tools + for unattended executions) of AEP-0007 apply unchanged to servers declared through an + `McpServer`. + +### Changes to section 5.5.1 (MCP servers) + +An entry of `spec.mcpServers` is either an inline declaration (as in AEP-0007) or a reference: + +| Field | Type | Req. | Description | +| ----- | ---- | ---- | ----------- | +| `name` | string | yes | Server name within this workflow (spec 3.4); prefix of its action identifiers. | +| `ref` | object | cond. | `name` (REQUIRED), `version` (OPTIONAL), `digest` (OPTIONAL) of an `McpServer` (reference rules of AEP-0029). | +| `profiles` | list of string | no | Catalog profiles the workflow uses. Absent: all profiles of the object. | +| `transport`, `url`, `auth`, `catalog` | | cond. | Inline declaration as in AEP-0007. | + +Rules: + +1. An entry MUST contain either `ref` or `transport`; never both. An entry with `ref` MUST NOT + contain `url`, `auth` or `catalog`. +2. `version` and `digest` are assertions, not selectors (AEP-0029): the runtime resolves the object + by `ref.name` in the workflow's scope and MUST reject the workflow when a present `version` or + `digest` does not match the resolved object. The reproducibility record (spec 10.7) lists, per + server, the name, version and digest of the resolved `McpServer` and the definition digests of + the exposed tools. +3. `profiles` restricts the action groups of the catalog (AEP-0007 rule 2) to the listed profiles; + a listed profile that the object does not define is an error. Permissions (spec 7.5) still + decide which actions an agent may call. +4. Under the `security` profile, a reference MUST carry `version` or `digest` (AEP-0029). +5. `mcpServers[].catalog.ref` of AEP-0007 is removed; an inline `catalog` stays allowed. + +## Examples + +```yaml +apiVersion: awp.agenticworkflowprotocol.org/v1alpha4 +kind: McpServer +metadata: + name: tickets +spec: + version: 1.4.0 + owner: + team: service-desk + transport: streamable-http + auth: + method: oauth + grant: client_credentials + scopes: from-catalog + issuer: https://login.example.com + protocolVersion: "2026-07-28" + tools: + get_ticket: + access: read + classification: confidential + scopes: [tickets:read] + definitionDigest: sha256:1111111111111111111111111111111111111111111111111111111111111111 + search: + access: read + classification: confidential + scopes: [tickets:read] + definitionDigest: sha256:2222222222222222222222222222222222222222222222222222222222222222 + add_comment: + access: write + classification: internal + actions: [external.communication] + scopes: [tickets:write] + definitionDigest: sha256:3333333333333333333333333333333333333333333333333333333333333333 + resources: + - uriTemplate: "tickets://{key}" + classification: confidential + profiles: + read: [get_ticket, search] + comment: [add_comment] +``` + +```yaml +apiVersion: awp.agenticworkflowprotocol.org/v1alpha4 +kind: Workflow +metadata: + name: ticket-triage +spec: + version: 0.3.0 + owner: + team: service-desk + mcpServers: + - name: tickets + ref: + name: tickets # version and digest optional; required under the security profile + profiles: [read] + agents: + - id: researcher + model: { provider: example-provider, name: example-model } + tools: + - { type: mcp, server: tickets } + permissions: + default: deny + tools: + tickets.read: { allow: true } + workflow: + - id: research + agent: researcher + task: Summarize the open tickets of today. +``` + +The workflow names neither the URL nor a credential. The runtime resolves both from its own +configuration; with `scopes: from-catalog` and only the `read` profile granted, it requests +`tickets:read`. + +## Schema changes + +- New root kind `McpServer` with `$defs/McpServerSpec` (`transport`, `auth` without credential + references, and the catalog fields of `$defs/McpCatalogSpec` of AEP-0007). +- `McpServer` entry of `spec.mcpServers`: `oneOf` inline declaration and reference (`name`, `ref`, + `profiles`); `catalog.ref` removed. +- Semantic rules: `mcpserver.connection-data` (`url`, `image`, `command` or a credential in an + `McpServer`), `mcpserver.ref-and-inline`, `mcpserver.unknown-profile`; + `security.mcpserver-pin-required` under the security profile. +- CRD: plural `mcpservers`, namespaced (see open question 1), with a `status` subresource. + +## Conformance impact + +- `mcp`: resolution by name; mismatch of an asserted `version` or `digest`; `profiles` restriction; + rejection of connection data in the object; definition digest checks unchanged. +- `audit`: name, version and digest of the resolved `McpServer` in the reproducibility record. +- New cases: `valid/5.5.6-mcpserver.yaml`, `valid/5.5.1-mcpserver-ref.yaml`; invalid: + `5.5.6-mcpserver-with-url.yaml`, `5.5.6-mcpserver-with-secret.yaml`, + `5.5.1-ref-and-inline.yaml`, `5.5.1-unknown-profile.yaml`, `5.5.1-ref-unpinned-security.yaml`. + +## Compatibility and migration + +AEP-0007 is not accepted, so `McpCatalog` exists in no published draft; nothing needs migration in +`v1alpha4`. Inline declarations with `url` and `auth.secretRef` stay valid. A manifest written +against the draft of AEP-0007 replaces `catalog.ref` by `ref` and moves `transport` and `auth` +(without `clientRef`) into the object. + +## Security considerations + +- Pinning moves from the reference to the record: without `version` or `digest`, a reviewed change + of the object applies to every workflow that references it. That is the intent for objects owned + by the platform; the `security` profile and policies can require a pin, and the record shows what + was resolved. +- A server that changes a tool after review is still caught by the definition digest (AEP-0007 + rule 4), independent of how the object is referenced. +- Keeping the URL out of the object moves a governance-relevant decision to the runtime; AEP-0021 + B6 requires operator constraints for endpoints, and rule 1 forbids an endpoint that contradicts + the object. + +## Privacy considerations + +No change to AEP-0007: clearance per tool and per resource applies; audit events carry digests, +not definitions or content. + +## 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 + +- **Keep `McpCatalog` with a required digest** (AEP-0007 as drafted): every catalog change fans out + to every workflow, and the connection stays repeated. +- **Put the URL into the object** (as kagent does): simpler for runtimes without bindings, but it + ties a reviewed object to one deployment and makes test and production different objects (open + question 2). +- **Several servers in one catalog object**: one more shared list that every change touches, the + problem AEP-0029 describes for the model catalog. + +## Implementation status + +A proof-of-concept Kubernetes runtime already has a cluster-wide object per MCP server with allow +lists for tools, prompts and resources, resolved by name (runtime feedback G69 to G72); its +endpoints and credentials live in the runtime's configuration. No definition digests yet. No +implementation of this AEP exists. + +## Open questions + +1. Scope: is an `McpServer` namespaced like the other AWP kinds, or cluster-scoped like + `StorageClass`, so that one platform team describes a server for all namespaces? A namespaced + object with a reference grant (AEP-0029) is the alternative. +2. Runtimes without bindings: may an `McpServer` carry an OPTIONAL `url` that a runtime uses only + when its configuration has none, or does that undo rule 1? +3. Should built-in tool sources (`shell`) get an object of their own in the same shape? + +## Decision + +- + +## References + +- Spec sections 3.4, 4.2, 5.5.1, 7.5, 7.9, 9.1, 10.7. +- AEP-0007 (catalog semantics), AEP-0010 (digests), AEP-0021 (bindings, B6), AEP-0023 (credentials + outside the execution environment), AEP-0029 (references by name). +- Runtime feedback G69 to G72. +- Model Context Protocol specification, revision 2026-07-28 (reference data only). diff --git a/aep/0032-policy-syntax.md b/aep/0032-policy-syntax.md new file mode 100644 index 0000000..0f6df02 --- /dev/null +++ b/aep/0032-policy-syntax.md @@ -0,0 +1,255 @@ +# AEP-0032: Policy syntax: enums instead of booleans, match expressions + +| | | +| --- | --- | +| **AEP** | 0032 | +| **Title** | Policy syntax: enums instead of booleans in shorthands, match expressions in rule conditions | +| **Authors** | @agenticworkflowprotocol | +| **Shepherd** | to be assigned (not an author, [aep-process 5.1](../docs/aep-process.md#51-review-before-acceptance)) | +| **Type** | Specification | +| **Status** | Draft | +| **Reviewer roles needed** | runtime implementer, language or schema reviewer | +| **Reviewers** | none yet | +| **Target API version** | the next API version after `v1alpha4` (incompatible change) | +| **Profiles affected** | `core`, `governance` | +| **Created** | 2026-11-27 | +| **Discussion** | issue to be opened | +| **Supersedes** | - | +| **Superseded-by** | - | + +## Summary + +Two changes to the policy syntax of spec section 8, both mechanical to migrate: + +1. The workflow policy shorthands (spec 8.1) become enums. `git.allowPush: false` becomes + `git.push: deny`; `requireApproval` is a second value; an absent field adds no rule. The boolean + value `true`, which today adds no rule although it reads as "allowed", disappears. +2. The `when` of a policy rule (spec 8.3) becomes a list of match expressions + `{key, operator, values}`, in the form of the `matchExpressions` of Kubernetes label selectors, + instead of a map whose keys are attribute paths. + +## Motivation + +**Booleans that do not mean what they say.** Spec 8.1 maps `git.allowPush: false` to a `deny` rule +and says that the value `true` "adds no rule (it does not grant permissions)". That is correct by +the decision combination of spec 8.4: permissions grant, policies restrict. But a reader of +`allowPush: true` concludes that the workflow may push, and a reviewer who sees it next to a +`permissions` block that does not grant `git.push` has two statements that seem to contradict +each other. The value `true` exists only because the field is a boolean. + +A boolean also has no room for a third state. The obvious third state is "push needs approval", +which today needs a full `Policy` rule or `approval.requiredFor`. The Kubernetes API conventions +advise against booleans for this reason and prefer an enum that can grow. + +**Conditions keyed by path.** A rule condition today is a map such as: + +```yaml +when: + data.classification: { in: [personal, sensitive] } + destination.region: { notIn: [EU] } +``` + +The schema is structural, because the attributes are a fixed list. Still the form has costs: + +- Every attribute needs its own schema definition with the same operator set, and an extension + attribute cannot be added without changing the schema: the map has `additionalProperties: false`. +- Keys that contain dots are awkward in field paths. A JSON path or `kubectl` query for the + attribute has to escape the dot (`when.data\.classification`), and a patch cannot tell a key with + a dot from a nested key without that escaping. +- Kubernetes users know conditions on attributes as `matchExpressions` lists (label selectors, + node affinity). A different form for the same idea has to be learned and mapped. + +## Goals and non-goals + +- Goals: policy shorthands whose values say what they do; a third value for approval; one + condition form with a fixed operator vocabulary; mechanical migration. +- Non-goals: new attributes or operators, new effects, any change to the decision combination + (spec 8.4), the `when` of steps (spec 3.12, a different grammar). + +## Specification + +### Changes to section 8.1 (workflow policy shorthands) + +`spec.policies` keeps `include`. The shorthands are replaced by action-shaped enums, grouped like +the action identifiers they stand for: + +| Shorthand | Values | Equivalent rule | +| --------- | ------ | --------------- | +| `git.push` | `deny`, `requireApproval` | effect on actions matching `git.push` | +| `git.forcePush` | `deny`, `requireApproval` | effect on actions matching `git.forcePush` | +| `git.merge` | `deny`, `requireApproval` | effect on actions matching `git.merge` | +| `pullRequest.create` | `deny`, `requireApproval` | effect on actions matching `pullRequest.create` | +| `production.deploy` | `deny`, `requireApproval` | effect on actions matching `production.deploy` | + +- An absent shorthand adds no rule. There is no value that grants or allows: permissions grant + (spec 7.5), policies restrict (spec 8.4). +- `requireApproval` uses the approvers, `minApprovals`, `timeout` and `onTimeout` of the workflow's + `approval` object (spec 7.6). A manifest with a `requireApproval` shorthand and without + `approval.approvers` MUST be rejected. +- The former `merge.allow` moves under `git` as `git.merge`, because the action identifier is + `git.merge`. + +### Changes to section 8.3 (conditions) + +`when` of a policy rule is a non-empty list of **match expressions**. All expressions MUST hold for +the rule to apply (logical AND, as today). + +| Field | Type | Req. | Description | +| ----- | ---- | ---- | ----------- | +| `key` | string | yes | An attribute of the table in section 8.3 (`action`, `environment.name`, `risk.level`, `data.classification`, `destination.provider`, `destination.region`, `model.provider`, `model.name`, `actor.type`, `workflow.name`, `step.id`, `agent.id`), or a domain-prefixed extension attribute (spec 3.3). | +| `operator` | string | yes | `in`, `notIn`, and for ordered attributes (`data.classification`, `risk.level`) `gt`, `gte`, `lt`, `lte`. | +| `values` | list of string | yes | At least one value. `gt`, `gte`, `lt` and `lte` take exactly one. Values of `action` are action keys and are matched like permission keys (groups, wildcards). | + +- `equals` and `notEquals` are removed: they are `in` and `notIn` with one value. +- A key MAY appear in several expressions, for example `gte` and `lte` for a range. +- An unknown key without a domain prefix MUST be rejected. A domain-prefixed key that the runtime + does not support MUST be treated like an attribute that cannot be determined: the fail-closed + rule of section 8.3 applies (`deny` and `requireApproval` rules apply). +- Operator names follow the AWP enum style (lower camel case), not the capitalised `In` and + `NotIn` of Kubernetes; the structure is the same. + +## Examples + +```yaml +apiVersion: awp.agenticworkflowprotocol.org/v1alpha5 +kind: Workflow +metadata: + name: dependency-updates +spec: + version: 0.2.0 + owner: + team: platform-team + classification: internal + approval: + approvers: + - role: maintainer + policies: + git: + push: requireApproval + forcePush: deny + merge: deny + production: + deploy: deny + agents: + - id: updater + model: + provider: example-provider + name: example-model + workflow: + - id: update + agent: updater + task: Update the dependencies and open a pull request. +``` + +```yaml +apiVersion: awp.agenticworkflowprotocol.org/v1alpha5 +kind: Policy +metadata: + name: eu-data-residency +spec: + version: 2.0.0 + owner: + team: data-protection + rules: + - id: personal-data-stays-in-eu + when: + - key: data.classification + operator: in + values: [personal, sensitive] + - key: destination.region + operator: notIn + values: [EU] + effect: deny +``` + +`apiVersion` `v1alpha5` stands for the next API version and is a placeholder. + +## Schema changes + +- `$defs/Policies`: `git` with `push`, `forcePush`, `merge`; `pullRequest.create`; + `production.deploy`; each an enum `deny`, `requireApproval`. `merge` and the boolean fields are + removed. +- `$defs/Condition`: an array (`minItems: 1`) of `MatchExpression` objects (`key`, `operator`, + `values`), with `x-kubernetes-list-type: atomic` in the generated CRD. Key and operator + compatibility (ordering operators only on ordered attributes, one value for ordering operators) + as semantic rules `policy.operator-not-ordered`, `policy.operator-values`. +- Semantic rule `policy.require-approval-without-approvers`. + +## Conformance impact + +- `core`: the shorthand enums and their equivalent rules; match expressions with all operators; + rejection of unknown keys, of ordering operators on unordered attributes and of + `requireApproval` without approvers. +- `governance`: fail-closed behaviour for unsupported extension keys. +- Valid: `8.1-policy-shorthands.yaml` (rewritten), `8.3-match-expressions.yaml`. Invalid: + `8.1-shorthand-boolean.yaml`, `8.1-require-approval-without-approvers.yaml`, + `8.3-ordering-on-unordered.yaml`, `8.3-unknown-key.yaml`. +- Migration cases: every valid `v1alpha4` case with shorthands or rule conditions converts with + `awp-check.mjs migrate` and validates against the new schema. + +## Compatibility and migration + +Incompatible, so it targets the next API version. `awp-check.mjs migrate` converts: + +| `v1alpha4` | Next version | +| ---------- | ------------ | +| `git.allowPush: false` | `git.push: deny` | +| `git.allowForcePush: false` | `git.forcePush: deny` | +| `merge.allow: false` | `git.merge: deny` | +| `pullRequest.allowCreate: false` | `pullRequest.create: deny` | +| `production.allow: false` | `production.deploy: deny` | +| any shorthand `: true` | removed (it added no rule); `migrate` reports it as a note | +| `: { : , ... }` | one expression per operator: `{ key: , operator: , values: [...] }` | +| `equals: v` / `notEquals: v` | `operator: in` / `notIn`, `values: [v]` | + +The meaning of every migrated manifest is unchanged: no rule is added or removed. + +## Security considerations + +The change removes a reading of `allowPush: true` as a grant, which could lead a reviewer to accept +a manifest whose permissions they misread. It does not change what any manifest is allowed to do. +Extension keys keep the fail-closed rule. + +## Privacy considerations + +None. + +## 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 + +- **Keep the booleans and clarify the text.** Possible as an editorial change in `v1alpha4`, and + done there as a sentence in spec 8.1. It leaves a field whose `true` value means nothing and + gives no third state. +- **Add `allow` as an enum value.** Rejected: policies cannot grant, and the value would invite the + same misreading. +- **Keep the condition map.** It is structural and works. The list costs a few more lines per + rule; it is proposed for the extension keys, the field-path problem and the familiarity of + `matchExpressions`. +- **Kubernetes operator spelling** (`In`, `NotIn`, `Gt`, `Lt`). Closer to Kubernetes, but AWP enums + are lower camel case everywhere else; see open question 2. + +## Implementation status + +None. The reference checker and the editor would need the new schema and the `migrate` mapping. + +## Open questions + +1. Should an explicit value for "no rule" exist (for example `none`), so that a workflow can state + that it has considered a shorthand? +2. Operator spelling: AWP style (`in`, `notIn`) or the Kubernetes spelling (`In`, `NotIn`)? +3. Should more actions get shorthands (for example `external.communication`), or should + shorthands stay limited to the current five? + +## Decision + +Not decided. + +## References + +- Spec `v1alpha4` sections 7.5, 7.6, 8.1, 8.3, 8.4. +- Kubernetes API conventions (primitive types: avoid booleans that may need a third state); + `LabelSelectorRequirement` (`matchExpressions`). diff --git a/aep/0033-durations.md b/aep/0033-durations.md new file mode 100644 index 0000000..ece85f9 --- /dev/null +++ b/aep/0033-durations.md @@ -0,0 +1,175 @@ +# AEP-0033: Durations in the Go and Kubernetes format + +| | | +| --- | --- | +| **AEP** | 0033 | +| **Title** | Durations in the format of Go, Kubernetes and CEL; retention periods in days | +| **Authors** | @agenticworkflowprotocol | +| **Shepherd** | to be assigned (not an author, [aep-process 5.1](../docs/aep-process.md#51-review-before-acceptance)) | +| **Type** | Specification | +| **Status** | Draft | +| **Reviewer roles needed** | runtime implementer (Kubernetes operator), runtime implementer (non-Kubernetes), language or schema reviewer | +| **Reviewers** | none yet | +| **Target API version** | the next API version after `v1alpha4` (incompatible change) | +| **Profiles affected** | `core`, `audit` | +| **Created** | 2026-11-27 | +| **Discussion** | issue to be opened | +| **Supersedes** | - | +| **Superseded-by** | - | + +## Summary + +Spec 3.6 defines its own duration syntax with the units `ms`, `s`, `m`, `h`, `d`, `w` and `y`. +Go (`time.ParseDuration`), the Kubernetes type `metav1.Duration` and the CEL function +`duration()` accept the units `ns`, `us`, `ms`, `s`, `m` and `h`, but not `d`, `w` or `y`. This AEP +restricts AWP durations to `ms`, `s`, `m` and `h`, so that every AWP duration parses unchanged in +those three. Retention periods, the only fields that need months or years, become whole numbers of +days. + +## Motivation + +- A controller written in Go cannot use `time.ParseDuration` or `metav1.Duration` for AWP fields; + it needs its own parser for `d`, `w` and `y`, and two runtimes can disagree on edge cases. +- CEL validation rules in the generated CRDs (AEP-0021 B8) cannot call `duration()` on a value such + as `7d`, so time limits cannot be checked on the server. +- `y` as 365 days and `d` as 24 hours are definitions that only AWP has. Retention requirements + are usually written in days, months or years and rounded to days by the systems that enforce + them. + +Prior art: cert-manager (a CNCF project) writes certificate lifetimes as Go durations +(`duration: 2160h` for 90 days) and accepts the readability cost for the portability. + +## Goals and non-goals + +- Goals: one duration format that Go, Kubernetes and CEL parse unchanged; a readable form for + long retention periods; mechanical migration. +- Non-goals: calendar arithmetic (months, leap years), time zones (schedules keep their own + `timezone`, spec 5.2), fractional values. + +## Specification + +### Changes to section 3.6 (durations) + +Durations are strings matching `^([0-9]+(ms|s|m|h))+$`, for example `30s`, `15m`, `1h30m`, `24h`, +`168h`. Units: `ms` milliseconds, `s` seconds, `m` minutes, `h` hours. A duration MUST be greater +than zero. + +Every duration of this form is accepted unchanged by Go `time.ParseDuration`, by Kubernetes +`metav1.Duration` and by the CEL function `duration()`, and means the same in all three. Validators +MUST reject the units `d`, `w` and `y`, decimals and signs. + +### Retention periods + +Fields that set how long data is kept use a whole number of days instead of a duration. A day is +24 hours. + +| Field (today) | Today | Replacement | +| ------------- | ----- | ----------- | +| `audit.retention.duration` (spec 10.2) | duration, minimum retention, example `7y` | `audit.retention.days`: integer, at least 1. Minimum retention of the events. | +| `audit.contentRetention` (AEP-0009, not applied) | duration, maximum time content is kept, documented default `7d` | `audit.contentRetentionDays`: integer, at least 1; documented default `7`. | +| `state[].retention` (AEP-0025, not applied) | duration after the last write, example `180d` | `state[].retentionDays`: integer, at least 1. | + +All other duration fields are time limits of an execution and keep the duration type with the +format above: `triggers[].startingDeadline` (5.2), step `timeout` (5.6.1), `budget.maxDuration` +(5.7), `timeout` of input steps and of `humanInput` (5.8), `approval.timeout` (7.6) and the +`timeout` of an approval step and of a policy rule's approval (8.2). A week-long approval timeout is +written `168h`. + +## Examples + +```yaml +spec: + budget: + maxDuration: 1h30m + approval: + approvers: + - role: security-reviewer + timeout: 168h # was 7d + audit: + enabled: true + integrity: + mode: hash-chain + retention: + days: 2555 # was duration: 7y + workflow: + - id: analyze + agent: worker + task: Analyze the repository. + timeout: 24h +``` + +## Schema changes + +- `$defs/Duration`: pattern `^(?!(?:0+(?:ms|s|m|h))+$)(?:[0-9]+(?:ms|s|m|h))+$`. +- `$defs/Audit`: `retention.days` (integer, `minimum: 1`) replaces `retention.duration`. +- AEP-0009 and AEP-0025 adopt `contentRetentionDays` and `retentionDays` when they are applied. +- The generated CRDs MAY add a CEL rule `duration(self) > duration('0s')` on duration fields. + +## Conformance impact + +- `core`: the new pattern; valid `3.6-durations.yaml` rewritten (the `7y` step timeout becomes + `61320h`); invalid `3.6-duration-day-unit.yaml`, `3.6-duration-decimal.yaml`. +- `audit`: valid `10.2-audit-configuration.yaml` with `retention.days`; invalid + `10.2-retention-duration.yaml` (the old field). +- Migration cases: every valid `v1alpha4` case with durations converts with `awp-check.mjs migrate` + and validates against the new schema. + +## Compatibility and migration + +Incompatible, so it targets the next API version. `awp-check.mjs migrate` converts: + +- Duration fields: `d` to `24h`, `w` to `168h`, `y` to `8760h`, summed with the other parts into + hours, for example `1w2d` to `216h` and `7y` to `61320h`. The value is unchanged. +- `audit.retention.duration` to `audit.retention.days`: the duration in days, rounded up (it is a + minimum), for example `7y` to `2555` and `36h` to `2`. +- `contentRetention` and `state[].retention` once AEP-0009 and AEP-0025 are applied: rounded down + for the maximum of `contentRetention`; a value below one day cannot be converted and `migrate` + reports it. + +The website page "Migrating to ..." lists the rounding of retention periods as a change that +`migrate` makes and the author should check. + +## Security considerations + +A runtime that parses durations with the standard library of its language instead of an own +parser has one source of bugs less. The time limits themselves do not change. + +## Privacy considerations + +Retention periods keep their meaning. Rounding a minimum retention up keeps data at most one day +longer than written; rounding a maximum content retention down keeps it at most one day shorter. + +## 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 + +- **Keep `d`, `w`, `y`.** Readable, but every Go or CEL consumer needs an own parser. +- **Go durations everywhere, also for retention** (`61320h` for seven years). Portable, but a + reviewer cannot read a retention period at a glance. +- **ISO 8601 durations** (`P7Y`, `PT15M`). A standard with calendar units, but neither Go, + `metav1.Duration` nor CEL parse it, and `P1M` (a month) has no fixed length. +- **Integer seconds** (`timeoutSeconds`, as in many Kubernetes fields). Portable, but unreadable for + hours and days and a change of every field name. + +## Implementation status + +None. Runtimes in progress parse the `v1alpha4` syntax with their own parsers. + +## Open questions + +1. Should `retention.days` allow a value that means "keep as long as the runtime keeps events" + (no minimum), or is omitting the field enough? +2. Should the CRDs check durations with CEL now (AEP-0021 B8), or only after this AEP? + +## Decision + +Not decided. + +## References + +- Spec `v1alpha4` sections 3.6, 5.2, 5.6.1, 5.7, 5.8, 7.6, 8.2, 10.2. +- AEP-0009 (audit payload levels), AEP-0025 (state), AEP-0021 B8 (CRD validation). +- Go `time.ParseDuration`; Kubernetes `metav1.Duration`; CEL `duration()`. diff --git a/docs/runtime-feedback.md b/docs/runtime-feedback.md index cf14498..61f5fd5 100644 --- a/docs/runtime-feedback.md +++ b/docs/runtime-feedback.md @@ -29,7 +29,8 @@ portable runtimes, **should** needs a rule, **minor** is editorial or informativ 8. [Event triggers](#8-event-triggers) 9. [From the concept review](#9-from-the-concept-review) 10. [From interactive sessions and a coding agent engine](#10-from-interactive-sessions-and-a-coding-agent-engine) -11. [Questions for the project lead](#11-questions-for-the-project-lead) +11. [From a comparison with kagent](#11-from-a-comparison-with-kagent) +12. [Questions for the project lead](#12-questions-for-the-project-lead) ## 1. Status overview @@ -40,7 +41,10 @@ portable runtimes, **should** needs a rule, **minor** is editorial or informativ | AEP drafted, not applied | G10, G47, G49, G50, G51, G61, G64, G67 to G69 (AEP-0023); G42 to G46, G54, G56, G86 (AEP-0024); G03, G53, G58, G87 (AEP-0025) | | New AEP proposed (number to be confirmed) | G62, G63, G73, G82, G85 (AEP-0026, interactive execution); G65, G66, G81, G83 (AEP-0027, agent engine) | | Amendment drafted in an existing AEP that is not applied yet (from section 10) | G71, G72 (AEP-0007); G74 (AEP-0002); G75 (AEP-0005); G76 (AEP-0009); G78 (AEP-0013). Open questions there or in AEP-0026: G70, G77, G84, G85 | -| Covered by an existing AEP that is not applied yet | G02, G04, G06, G22; G41 (AEP-0004); G48, G57 (AEP-0019 open question 1); G52 (AEP-0021); G55 (AEP-0012); G59, G60 (AEP-0008) | +| Covered by an existing AEP that is not applied yet | G02, G06, G22; G41 (AEP-0004); G48, G57 (AEP-0019 open question 1); G52 (AEP-0021); G55 (AEP-0012); G59, G60 (AEP-0008) | +| Applied to the `v1alpha4` draft and accepted (AEP-0001, decision D23) | G04 | +| New AEP or amendment drafted (from section 11) | G88 (AEP-0030); G89 (AEP-0023); G90 (AEP-0021); G91, G92 (AEP-0029, AEP-0030, AEP-0031); G93 (AEP-0032); G94 (AEP-0033) | +| Recorded as an issue | G95 | | Open, needs a decision whether and how | G05, G09, G11, G12, G13, G16 to G21, G24 to G39, G77, G79, G80, K | ## 2. Step interface @@ -265,7 +269,42 @@ attaches with `targetRefs` or `parametersRef` (AEP-0021 B5, B6). | Sandbox profile | implementation-specific, behind `agents[].isolation` (G67) | Like `StorageClass` or `RuntimeClass`: the manifest asks for a class, the platform maps it to a mechanism. | | Gateways, proxies | not an object of AWP | Mechanisms. AWP states only the property they provide (outside the execution environment). | -## 11. Questions for the project lead +## 11. From a comparison with kagent + +Collected on 2026-11-27 by comparing the data model of [kagent](https://github.com/kagent-dev/kagent) +(a CNCF project, named as prior art under decision D21; API `api.kagent.dev/v1alpha3`) with the +`v1alpha4` draft and the open AEPs. kagent is a platform for conversational agents with long-lived +sessions; its resources are `Agent`, `AgentTemplate`, `Harness`, `ModelConfig`, +`ModelProviderConfig`, `RemoteMCPServer`, `EgressPolicy` and `SandboxTemplate`, while sessions and +schedules live in a database. Many of its cuts follow from that product and do not fit a reviewed, +digest-covered format (a harness reference inside the agent, endpoints and TLS settings in an +object that authors write, live updates of running sessions, "the last good revision keeps +running"). Several mechanisms carry over. + +**One object per thing, referenced by name.** The common thread of G91, G92 and the model and MCP +proposals: AWP has list kinds (`ModelCatalog`) and references with a required exact version or +digest to objects the platform owns (`modelPolicy.catalog`, `mcpServers[].catalog.ref`, +`policies.include`). A price change, a new tool of a server or a stricter organisation policy then +needs a change in every workflow. Kubernetes keeps one object per thing (`StorageClass`, +`RuntimeClass`, `IngressClass`) and resolves references by name. Proposed rule, for a decision of +the project lead: every reference is `{name, version?, digest?}`; the name resolves in the scope; +`version` and `digest` are assertions; the runtime records what it resolved; pins are required by +the `security` profile or by policy, not by the format; objects the platform owns exist once per +thing and are attached with `targetRefs`. This revises the "split as in AEP-0008" rows of +section 10: the split between facts and deployment data stays, the shape changes. + +| ID | Sev. | Gap | Proposal | Home | Status | +| --- | --- | --- | --- | --- | --- | +| G88 | should | Models the runtime calls on its own for an execution (fallback, summarisation of a long history, embeddings, routing, MCP sampling) are not covered by `modelPolicy`, `dataPolicy` or the budget. kagent selects summariser and embedding models in the harness, invisible to the author. | Every model invocation of the runtime for an execution falls under model policy, data policy and budget and appears in usage and the reproducibility record. | [AEP-0030](../aep/0030-model-kind.md) | proposal | +| G89 | should | A target system cannot authenticate the execution itself; every credential is a stored secret. Extends G55. | `auth.method: workloadIdentity` with `audiences`: a short-lived token issued by the runtime that names workflow, version, execution and actor (kagent `ActorJWT`). | [AEP-0023](../aep/0023-step-isolation.md) | proposal | +| G90 | minor | A schedule cannot be paused without changing the reviewed manifest. | `suspend` in the binding, like `CronJob.spec.suspend`; AWP reserves the `trigger.skipped` reason `suspended`. | [AEP-0021](../aep/0021-extension-model.md) | proposal | +| G91 | should | Workflow steps (5.6.6) reference the child by a SemVer range without a digest, while every other reference is exact. The reviewer of the parent does not see which child runs. | `workflow.digest`, an exact version assertion, the resolved child digest recorded at the parent step; pins required under `security`. | [AEP-0029](../aep/0029-references-by-name.md) | proposal | +| G92 | should | List kinds and required pins to platform objects force a change in every workflow when the platform changes one entry; `name` plus `version` reads like a selector, although an object store holds one object per name. | One object per thing (`Model`, `McpServer`), references by name with optional assertions, policies attached with `targetRefs`. Spec 3.10 states that the name resolves. | AEP-0029, [AEP-0030](../aep/0030-model-kind.md), [AEP-0031](../aep/0031-mcp-server-kind.md), spec 3.10 (editorial) | proposal | +| G93 | minor | Policy shorthands are booleans whose `true` adds no rule (8.1), and rule conditions are a map keyed by a fixed list of attribute paths (8.3), which extension attributes cannot join and which differs from the match expressions Kubernetes users know. | Enums such as `git.push: deny`, and conditions as a list of match expressions `{key, operator, values}`. Spec 8.1 is clarified meanwhile. | [AEP-0032](../aep/0032-policy-syntax.md) | proposal, next API version | +| G94 | minor | Durations allow `d`, `w` and `y` (3.6), which Go, Kubernetes and CEL do not parse. | The Go and Kubernetes duration format; long retention periods as day counts or dates. | [AEP-0033](../aep/0033-durations.md) | proposal, next API version | +| G95 | should | The generated CustomResourceDefinitions declare no list types, so server-side apply treats lists such as `agents[]`, the steps, `secrets[]` and policy rules as atomic, and two field managers overwrite each other's entries. Closed objects keep unknown fields on purpose (3.10), so misplaced fields are only reported with strict field validation or an admission webhook. | `x-kubernetes-list-type: map` with `x-kubernetes-list-map-keys` (`id` or `name`) for lists of identified objects; later CEL rules for what a structural schema can express. | [issue #33](https://github.com/agenticworkflowprotocol/agenticworkflowprotocol.org/issues/33) (schema generator, AEP-0021 B8) | open | + +## 12. Questions for the project lead 1. Do the three drafted AEPs (G01, G07, G08) join the `v1alpha3` scope table in the decision log, once they reach `Review`? @@ -292,3 +331,8 @@ attaches with `targetRefs` or `parametersRef` (AEP-0021 B5, B6). 11. Which objects become AWP kinds (section 10): `Session` as a new kind, `Prompt` and `McpCatalog` as already proposed, and tenants, sandbox profiles and bindings left to the runtime? +12. Section 11: record the rule "one object per thing, references by name, pins by profile or + policy" as a decision, revisiting D10 (required catalog digest)? If yes, AEP-0030 replaces + AEP-0008 and AEP-0031 replaces the kind `McpCatalog` of AEP-0007. +13. G91 changes the accepted AEP-0028 (range to exact version, plus `workflow.digest`): an erratum + of the `v1alpha4` draft, or part of AEP-0029 for the next acceptance? diff --git a/spec/README.md b/spec/README.md index 0a965a4..1919933 100644 --- a/spec/README.md +++ b/spec/README.md @@ -55,6 +55,11 @@ Comment Period, and may still be moved to a later version or rejected. | [0026](../aep/0026-interactive-execution.md) | Interactive execution: `AgentSession` and autonomy levels | Draft | proposed for `v1alpha4` | | [0027](../aep/0027-agent-engine.md) | Agent engine: running an agent with an existing coding agent | Draft | proposed for `v1alpha4` | | [0028](../aep/0028-workflow-steps.md) | Workflow steps (`type: workflow`) | Accepted (lead decision D23) | in the `v1alpha4` draft | +| [0029](../aep/0029-references-by-name.md) | References by name, optional pins, recorded resolution | Draft | proposed for `v1alpha4` | +| [0030](../aep/0030-model-kind.md) | Kind `Model`: one object per model, parameters and runtime model calls | Draft | proposed for `v1alpha4` | +| [0031](../aep/0031-mcp-server-kind.md) | Kind `McpServer`: one object per MCP server, referenced by name | Draft | proposed for `v1alpha4` | +| [0032](../aep/0032-policy-syntax.md) | Policy syntax: enums instead of booleans, match expressions | Draft | proposed for the API version after `v1alpha4` | +| [0033](../aep/0033-durations.md) | Durations in the Go and Kubernetes format | Draft | proposed for the API version after `v1alpha4` | 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 index 10a40ba..d04715b 100644 --- a/spec/v1alpha4/README.md +++ b/spec/v1alpha4/README.md @@ -339,6 +339,12 @@ with Kubernetes semantics. 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. +- In an object store, a reference to another manifest (`agents[].ref`, `promptRef`, + `policies.include`, the `ref` of a workflow step, `WorkflowRun.spec.workflowRef`) resolves by + name within the scope: there is one object per name, so `version` and `digest` in a reference + select nothing and act as assertions that the runtime verifies against the resolved object. + Several versions of a manifest that must be available side by side need distinct names, for + example `summarizer-v1` and `summarizer-v2`. ### 3.11 Status @@ -1604,6 +1610,10 @@ is allowed by permissions only if **every** applicable object allows it. `networ `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`. +Because combining can only narrow, network and filesystem requirements of a specific use belong in +the workflow. An `Agent` manifest that several workflows reference carries only the restrictions +that hold for every use; a workflow cannot widen what the referenced agent allows. + ### 7.6 Human approval Approvals are human decisions that gate actions or steps. @@ -1798,10 +1808,12 @@ policies: | `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)). +A shorthand with the value `true` adds no rule: it does not allow the action, it only leaves it +without a policy restriction. `git.allowPush: true` therefore does not permit a push; a push runs +only if the permissions allow `git.push` ([section 7.5](#75-tool-governance-permissions)) and no +other rule denies it ([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`