From 9938b09da4198fb46b2394074060102c5f78c1f1 Mon Sep 17 00:00:00 2001 From: Simon Lauger Date: Sun, 22 Nov 2026 19:02:34 +0100 Subject: [PATCH 1/3] docs: name related work as prior art (decision D21) D21 refines D17: open specifications and vendor-neutral foundation projects may be named as sources of ideas, not as dependencies. Spec v1alpha3 section 1.2 and the README name the Open Workflow Specification and agent-sandbox; AEP-0022 names the for task of the Open Workflow Specification as prior art. Signed-off-by: Simon Lauger --- CHANGELOG.md | 1 + README.md | 4 ++++ aep/0022-step-iteration.md | 4 +++- docs/decisions.md | 24 ++++++++++++++++++++++-- spec/v1alpha3/README.md | 14 ++++++++++++++ 5 files changed, 44 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1fa202d..00c4993 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -30,6 +30,7 @@ API versions (`v1alpha1`, ...) are versioned separately, see [GOVERNANCE.md](GOV ### Added +- Decision D21 (refines D17): open specifications and vendor-neutral foundation projects may be named as prior art, not as dependencies. Spec `v1alpha3` section 1.2 and the README name the Open Workflow Specification and agent-sandbox as related work; AEP-0022 names the `for` task of the Open Workflow Specification as prior art. - Decision D20: the Kubernetes resource model draft of pull request #16 becomes `v1alpha3` and starts from `v1alpha2`; the 5-day discussion period is waived for it. `v1alpha3` has step iteration as section 5.6.5, combined with the step output interface: each item run produces its outputs through `$AWP_OUTPUTS` or `complete_step`, command steps get `AWP_FOREACH_INDEX`, an output referenced by `forEach.items` is parsed as a JSON array, and `forEach` is not allowed on input steps (section 14.2 lists the changes from `v1alpha2`). - Conformance suite for `v1alpha2` (`conformance/v1alpha2/`): the `v1alpha1` cases with apiVersion `v1alpha2` plus the step iteration cases; the `v1alpha3` suite has the step iteration cases too. `awp-check.mjs migrate` also converts `v1alpha2` manifests. - Website: `v1alpha3` as a proposed draft next to `v1alpha1` and `v1alpha2`. diff --git a/README.md b/README.md index 1a3a01c..363cdef 100644 --- a/README.md +++ b/README.md @@ -36,6 +36,10 @@ AWP complements existing protocols instead of replacing them: | A2A | Agent ↔ agent communication | | AWP | Definition, governance, execution and audit of agentic workflows | +AWP also takes ideas from the [Open Workflow Specification](https://github.com/serverlessworkflow/specification) +(control flow of workflows) and [agent-sandbox](https://agent-sandbox.sigs.k8s.io/) (isolated +execution of agent code on Kubernetes), without depending on them. + A minimal manifest: ```yaml diff --git a/aep/0022-step-iteration.md b/aep/0022-step-iteration.md index 1b5b264..38ef2d1 100644 --- a/aep/0022-step-iteration.md +++ b/aep/0022-step-iteration.md @@ -39,7 +39,9 @@ to do this, all of them poor: [extension prefix list](../docs/registry/extension-prefixes.md)). Prior art: CI systems (job matrices), workflow engines (map states, dynamic task mapping) and at -least one agent runtime built against `v1alpha1` (as an extension field). All of them bound the +least one agent runtime built against `v1alpha1` (as an extension field). The `for` task of the +[Open Workflow Specification](https://github.com/serverlessworkflow/specification) (`in`, `each`, +`at`, `while`) is the closest specification counterpart (named under D21). All of them bound the fan-out and give each element its own retries; none of them lets a model decide how many iterations run. diff --git a/docs/decisions.md b/docs/decisions.md index 6728771..b843678 100644 --- a/docs/decisions.md +++ b/docs/decisions.md @@ -2,8 +2,8 @@ | | | | --- | --- | -| **Status** | Record of the project owner's decisions. D1 and D2 change how this repository works. All other decisions set the direction of AEPs that are still in `Draft` or `Review`; they do not accept any AEP and do not change `v1alpha1`, except D19, which accepts AEP-0022 and starts the `v1alpha2` draft, and D20, which adds the `v1alpha3` draft and fixes the `v1alpha1` approval step schema. | -| **Decided** | 2026-10-10 (D1-D12, D16), 2026-11-18 (D17, D18) and 2026-11-19 (D19, D20) by the project lead | +| **Status** | Record of the project owner's decisions. D1 and D2 change how this repository works. All other decisions set the direction of AEPs that are still in `Draft` or `Review`; they do not accept any AEP and do not change `v1alpha1`, except D19, which accepts AEP-0022 and starts the `v1alpha2` draft, and D20, which adds the `v1alpha3` draft and fixes the `v1alpha1` approval step schema. D21 refines D17. | +| **Decided** | 2026-10-10 (D1-D12, D16), 2026-11-18 (D17, D18), 2026-11-19 (D19, D20) and 2026-11-22 (D21) by the project lead | | **Related** | [AEP process](aep-process.md), [extension prefix list](registry/extension-prefixes.md), [GOVERNANCE.md](../GOVERNANCE.md) | > Context. AWP is alpha. The owner allows the schema to change where implementation practice shows @@ -180,6 +180,8 @@ a single implementation and were removed from this log by D17. - **Applied in**: this log, `README.md`, `GOVERNANCE.md`, `SECURITY.md`, `CODE_OF_CONDUCT.md`, `docs/aep-process.md`, `docs/site-plan.md`, `docs/registry/extension-prefixes.md`, `aep/0001` to `aep/0011`, `site/`. +- **Refined by**: D21 (open specifications and vendor-neutral foundation projects may be named as + prior art). ### D18. Implementation experience goes into AEPs and implementer guidance @@ -232,6 +234,24 @@ a single implementation and were removed from this log by D17. `schema/awp.v1alpha2.json`, `spec/v1alpha2/` (5.2 note, example), `conformance/`, `aep/0015` to `aep/0022`, `docs/v1alpha3-review-guide.md`, `spec/README.md`, `README.md`, `site/`. +### D21. Open specifications and foundation projects may be named as prior art + +- **Question**: D17 says the AEPs describe prior art without naming products. May the + specification and the AEPs name related open specifications and open-source projects that AWP + takes ideas from, such as the Open Workflow Specification or a Kubernetes SIG project? +- **Decision**: yes, as sources of ideas and inspiration, not as dependencies. The repository may + name open specifications and standards (as it already names MCP, A2A, CloudEvents and the + Gateway API) and vendor-neutral open-source projects hosted by a foundation or a Kubernetes SIG, + where AWP borrows a concept or wording. It still names no runtime, product or vendor offering + outside the implementations list (D17). A named project creates no normative reference: AWP + stays complete without it, and conformance never requires it. +- **Consequence**: spec `v1alpha3` section 1.2 and the README get a related-work paragraph naming + the Open Workflow Specification (control flow of workflows) and agent-sandbox (isolated + execution of agent code on Kubernetes). AEPs name such projects in their prior-art text where + they borrow from them: AEP-0022 (iteration), and the drafts for event triggers and step + isolation. +- **Applied in**: this log, `spec/v1alpha3/README.md`, `README.md`, `aep/0022-step-iteration.md`. + ## 2. Resulting scope of `v1alpha2` | AEP | Title | Target | Reason | diff --git a/spec/v1alpha3/README.md b/spec/v1alpha3/README.md index 24cd851..254765a 100644 --- a/spec/v1alpha3/README.md +++ b/spec/v1alpha3/README.md @@ -83,6 +83,20 @@ AWP does not replace MCP or A2A. A manifest references MCP servers as tool sourc ([section 5.5](#55-tools-and-action-identifiers)) and A2A endpoints as remote agents ([section 5.4.4](#544-remote-agents-a2a)). The wire protocols themselves are out of scope. +Related work (informative). AWP takes ideas from, but does not depend on: + +- the [Open Workflow Specification](https://github.com/serverlessworkflow/specification) (CNCF, + formerly Serverless Workflow), a DSL for the control flow of workflows (`call`, `do`, `for`, + `fork`, `listen`, `emit`, `try`, `wait`) with CloudEvents for events. It describes what a + workflow does in which order; AWP describes what an agent in a workflow may do (models, tools, + permissions, network, secrets) and how that is governed and audited. Where both cover the same + ground, such as iteration ([section 5.6.5](#565-iteration)) and event triggers, AWP aligns its + wording where it can; +- [agent-sandbox](https://agent-sandbox.sigs.k8s.io/) (Kubernetes SIG Apps), a Kubernetes API for + isolated, stateful execution environments for agents, with templates, warm pools and isolation + backends selected by runtime class. It is one way a platform can isolate steps; AWP states what + must be isolated, not how. + ### 1.3 Non-goals AWP does not define: From 007f681a455d0a519e09f67369d12807762218c6 Mon Sep 17 00:00:00 2001 From: Simon Lauger Date: Sun, 22 Nov 2026 19:03:43 +0100 Subject: [PATCH 2/3] docs: link the Open Workflow Specification under its new organisation The repository moved from serverlessworkflow to open-workflow-specification. Signed-off-by: Simon Lauger --- README.md | 2 +- aep/0022-step-iteration.md | 2 +- spec/v1alpha3/README.md | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 363cdef..93dda5e 100644 --- a/README.md +++ b/README.md @@ -36,7 +36,7 @@ AWP complements existing protocols instead of replacing them: | A2A | Agent ↔ agent communication | | AWP | Definition, governance, execution and audit of agentic workflows | -AWP also takes ideas from the [Open Workflow Specification](https://github.com/serverlessworkflow/specification) +AWP also takes ideas from the [Open Workflow Specification](https://github.com/open-workflow-specification/specification) (control flow of workflows) and [agent-sandbox](https://agent-sandbox.sigs.k8s.io/) (isolated execution of agent code on Kubernetes), without depending on them. diff --git a/aep/0022-step-iteration.md b/aep/0022-step-iteration.md index 38ef2d1..d1cc321 100644 --- a/aep/0022-step-iteration.md +++ b/aep/0022-step-iteration.md @@ -40,7 +40,7 @@ to do this, all of them poor: Prior art: CI systems (job matrices), workflow engines (map states, dynamic task mapping) and at least one agent runtime built against `v1alpha1` (as an extension field). The `for` task of the -[Open Workflow Specification](https://github.com/serverlessworkflow/specification) (`in`, `each`, +[Open Workflow Specification](https://github.com/open-workflow-specification/specification) (`in`, `each`, `at`, `while`) is the closest specification counterpart (named under D21). All of them bound the fan-out and give each element its own retries; none of them lets a model decide how many iterations run. diff --git a/spec/v1alpha3/README.md b/spec/v1alpha3/README.md index 254765a..ae705c8 100644 --- a/spec/v1alpha3/README.md +++ b/spec/v1alpha3/README.md @@ -85,7 +85,7 @@ AWP does not replace MCP or A2A. A manifest references MCP servers as tool sourc Related work (informative). AWP takes ideas from, but does not depend on: -- the [Open Workflow Specification](https://github.com/serverlessworkflow/specification) (CNCF, +- the [Open Workflow Specification](https://github.com/open-workflow-specification/specification) (CNCF, formerly Serverless Workflow), a DSL for the control flow of workflows (`call`, `do`, `for`, `fork`, `listen`, `emit`, `try`, `wait`) with CloudEvents for events. It describes what a workflow does in which order; AWP describes what an agent in a workflow may do (models, tools, From 63be8f1f6ee0a8a93f4b689a37fd1face82b115c Mon Sep 17 00:00:00 2001 From: Simon Lauger Date: Mon, 23 Nov 2026 20:08:38 +0100 Subject: [PATCH 3/3] docs: runtime feedback G41 to G87, AEP-0024 event triggers and AEP-0025 state The runtime feedback lists the gaps from event triggers, the concept review and a platform with interactive coding agent sessions, with home, evidence and status, and a rule for what goes into AWP: what a reviewer of a manifest must know and what must mean the same on every runtime. AEP-0024 and AEP-0025 are drafted with the fixes from review (event deduplication per workflow, equal retention and size for shared state). Spec 12 lists state as untrusted input; AEP-0021 B4 and B6 are amended. Signed-off-by: Simon Lauger --- CHANGELOG.md | 4 + aep/0021-extension-model.md | 16 +- aep/0024-event-triggers.md | 275 ++++++++++++++++++++++++++++++++++ aep/0025-state.md | 197 ++++++++++++++++++++++++ docs/runtime-feedback.md | 159 ++++++++++++++++++-- docs/v1alpha3-review-guide.md | 4 +- spec/README.md | 2 + spec/v1alpha3/README.md | 4 +- 8 files changed, 647 insertions(+), 14 deletions(-) create mode 100644 aep/0024-event-triggers.md create mode 100644 aep/0025-state.md diff --git a/CHANGELOG.md b/CHANGELOG.md index 00c4993..6075e69 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,6 +17,8 @@ API versions (`v1alpha1`, ...) are versioned separately, see [GOVERNANCE.md](GOV ### Changed +- AEP-0021 B4: `triggers[].source` is no domain-prefixed value space; it is the CloudEvents `source` of the event producer (runtime feedback G54). B6: bindings may also target an `Agent`. +- Spec `v1alpha3` section 12: content kept between executions (state) is untrusted input like tool results (runtime feedback G58). - README: the minimal manifest is now valid under all profiles (classification, declared MCP server, explicit tools and permissions). - Conformance case `3.2-unsupported-api-version` uses `awp.agenticworkflowprotocol.org/v9`, because `v1alpha3` is now a supported version of the reference checker. - The repository is implementation-neutral (decision D17): implementation-specific alignment documents, mappings and the single implementation page were removed, the AEPs describe prior art without naming products, the extension prefix list starts empty, and the project contact is info@agenticworkflowprotocol.org. Repository links point to `agenticworkflowprotocol/agenticworkflowprotocol.org`. @@ -30,6 +32,8 @@ API versions (`v1alpha1`, ...) are versioned separately, see [GOVERNANCE.md](GOV ### Added +- `docs/runtime-feedback.md`: gaps G41 to G87 (event triggers, the concept review, models, interactive sessions and a coding agent engine), with the AEP each belongs to, the evidence from the runtime, and a rule for what goes into AWP (section 10). +- AEP-0024 (event triggers with CloudEvents) and AEP-0025 (state across executions) as Draft for `v1alpha3`, from runtime feedback G03, G42 to G46, G53, G54, G56 and G58. - Decision D21 (refines D17): open specifications and vendor-neutral foundation projects may be named as prior art, not as dependencies. Spec `v1alpha3` section 1.2 and the README name the Open Workflow Specification and agent-sandbox as related work; AEP-0022 names the `for` task of the Open Workflow Specification as prior art. - Decision D20: the Kubernetes resource model draft of pull request #16 becomes `v1alpha3` and starts from `v1alpha2`; the 5-day discussion period is waived for it. `v1alpha3` has step iteration as section 5.6.5, combined with the step output interface: each item run produces its outputs through `$AWP_OUTPUTS` or `complete_step`, command steps get `AWP_FOREACH_INDEX`, an output referenced by `forEach.items` is parsed as a JSON array, and `forEach` is not allowed on input steps (section 14.2 lists the changes from `v1alpha2`). - Conformance suite for `v1alpha2` (`conformance/v1alpha2/`): the `v1alpha1` cases with apiVersion `v1alpha2` plus the step iteration cases; the `v1alpha3` suite has the step iteration cases too. `awp-check.mjs migrate` also converts `v1alpha2` manifests. diff --git a/aep/0021-extension-model.md b/aep/0021-extension-model.md index c3bbae4..ec76348 100644 --- a/aep/0021-extension-model.md +++ b/aep/0021-extension-model.md @@ -182,13 +182,17 @@ Implementation-specific: | --- | --- | --- | | `model.provider` | names listed by AWP | `models.example.com/gateway` | | `secrets[].source` | names listed by AWP (resolved by the runtime) | `secrets.example.com/vault-ha` | -| `triggers[].source` (event) | names listed by AWP | `events.example.com/github` | | audit event types | `workflow.*`, `agent.*`, ... | `example.com/cache.hit` (today reverse-domain) | | condition types | `Valid`, `Ready`, `Accepted`, `Succeeded`, `ResolvedRefs`, `PoliciesAttached`, `Bound` | `runtime.example.com/Scheduled` (rule already in spec 3.11) | The same rule applies wherever AWP later opens a value space. A runtime that does not know a value rejects the manifest. +`triggers[].source` of an event trigger is not such a value space: it is matched against the +CloudEvents `source` attribute and names the event producer (spec 5.2, AEP-0004, AEP-0024). Which +adapter or transport delivers the event is runtime configuration, for example in a trigger +object (runtime feedback G52, G54). + ### B5. Policy attachment `Policy` gets `targetRefs`, so that a platform team can attach a policy to workflows without @@ -267,7 +271,11 @@ spec: ``` - **Implementation-specific.** Binding kinds belong to the runtime (vendor group, own CRD). AWP - defines only `targetRefs`, the status and the rules below. Bindings carry the discovery label + defines only `targetRefs`, the status and the rules below. +- **Targets.** A binding targets a `Workflow` or an `Agent`. An `Agent` binding configures how the + runtime runs that agent on its own, for example as an interactive session (AEP-0026): image or + runtime profile, a mapping or narrowing of the agent's model alternatives (never new ones), secret mapping. For an agent used inside a workflow, the + workflow's binding applies. Bindings carry the discovery label `awp.agenticworkflowprotocol.org/binding: "true"`; the target gets a condition `Bound`. - **One accepted binding per workflow and runtime.** Several bindings of one runtime on the same workflow would start it twice. The runtime accepts the oldest binding (creation time, then name) @@ -389,6 +397,10 @@ enforce their own compliance requirements. This proposal makes no compliance pro Concept only. A Kubernetes runtime proof of concept already uses a binding object that points at the workflow (B6) and no extension fields; its review of this draft is reflected in B6 and B9. +Its platform extension adds an agent binding for interactive sessions and keeps tenants and +sandbox profiles as implementation-specific objects; its one extension field (the engine of an +agent) is the kind of field that B3 turns into an `extensionRef` until AEP-0027 is applied. Which +of its objects should become AWP kinds is discussed in runtime feedback section 10. ## Open questions diff --git a/aep/0024-event-triggers.md b/aep/0024-event-triggers.md new file mode 100644 index 0000000..f3d7fe9 --- /dev/null +++ b/aep/0024-event-triggers.md @@ -0,0 +1,275 @@ +# AEP-0024: Event triggers with CloudEvents + +| | | +| --- | --- | +| **AEP** | 0024 | +| **Title** | Event triggers with CloudEvents: filters, duplicates, actors and conversation context | +| **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, privacy reviewer | +| **Reviewers** | none yet | +| **Target API version** | `v1alpha3` | +| **Profiles affected** | `core`, `governance`, `audit` | +| **Created** | 2026-11-22 | +| **Discussion** | issue to be opened | +| **Supersedes** | - | +| **Superseded-by** | - | + +## Summary + +Spec 5.2 lets an `event` trigger start an execution, but leaves the event format, filter +semantics, duplicates, concurrency, the actor and conversation context open. This AEP uses +CloudEvents 1.0 as the event model, defines `filter` as equality on CloudEvents attributes and +data paths, requires deduplication by `source` and `id`, adds `concurrencyPolicy` and a rate limit +to event triggers, records the authenticated source and an attested person as the actor so that +approval rules bind that person, and defines where conversation context and reply data live. It +builds on AEP-0004 (`${{ event.* }}`, `dataSchema`, decision D7) and AEP-0019 (`WorkflowRun`), and +answers runtime feedback G42 to G46, G54 and G56. Runtime trigger objects (G52) belong to AEP-0021. + +## Motivation + +A proof-of-concept runtime starts workflows from chat mentions: a bridge publishes each message as +a CloudEvent to a message broker, an event router with one filter object per workflow creates +runs, and a step answers in the originating thread. Routing involves no model, so a message cannot +redirect it by prompt. It found: + +- **Filters** are a map of strings, but which fields they match, how they compare and how entries + combine is undefined (G42). Each router has its own filter language. +- **Duplicates** are real: message brokers and webhooks redeliver, and the runtime saw a second + run for the same event, which it rejected as duplicate. `concurrencyPolicy` exists only for + `schedule` (G43). +- **Actor.** Spec 5.2 gives every event start the actor type `system`. The authenticated party is + the bridge, not the person who wrote the message. Approval rules that refer to the initiator + (`initiatorCannotApprove`, `actorCannotApproveOwnAction`, spec 7.6) then do not bind that + person, who can trigger a run by message and approve its request (G44). +- **Reply path.** A run started by a message cannot refer to where the message came from (G45). +- **Conversation context.** A reply in a thread only sees the triggering message (G46). The proof + of concept lets the bridge attach earlier messages and participants. +- **`source`** means the event producer in spec 5.2 and AEP-0004 (`git.example.com`) and an + adapter name in AEP-0021 B4 (G54). +- **Delivery.** A router silently weakened delivery from "at least once" to "at most once" (an + MQTT subscription with QoS 0) (G56). + +## Goals and non-goals + +- Goals: portable event triggers on top of CloudEvents; no execution from a forged or duplicate + event; approvals that bind the person behind an event; conversation context as data, not as + instructions. +- Non-goals: transports (MQTT, webhooks, queues); router configuration (implementation-specific + trigger objects, AEP-0021); delivery of replies (steps do that); standard interaction event + types (a later AEP). + +## Specification + +### Changes to section 5.2: event model + +- An event is a CloudEvent 1.0. Runtimes that receive events in another format MUST map them to + the CloudEvents attributes before matching. +- `source` of an `event` trigger is matched against the CloudEvents `source` attribute + (URI-reference). It names the producer, not the adapter or transport; choosing an adapter + belongs to runtime configuration. `eventType` is matched against `type`. +- `event.id`, `event.source`, `event.type`, `event.subject`, `event.time` and `event.data` in + expressions (AEP-0004) are the CloudEvents attributes of that name. + +### Filter semantics + +- Keys of `filter` are CloudEvents attribute names (`subject`, extension attributes) or + `data.` with dot-separated object keys. Values are strings and match by equality with the + string form of the attribute or value. All entries MUST match. A missing attribute or path does + not match. +- Runtime-specific conditions (expression languages, rate rules) MAY be configured in an + implementation-specific trigger object (AEP-0021). They MAY only narrow the manifest trigger: an + event that does not match the manifest trigger MUST NOT start an execution, whatever the + runtime configuration says. + +### Duplicates, concurrency and rate + +- Deduplication is per workflow: the runtime MUST NOT start a second execution **of the same + workflow** for an event with the same `source` and `id` within a deduplication window. An event + that matches several workflows starts each of them once. If several trigger entries of one + workflow match the same event, the workflow starts once, with the first matching entry recorded + in `status.trigger.index`. It MUST state the window in its conformance statement; the + window MUST be at least 24 hours. A rejected duplicate MUST be recorded as `trigger.skipped` with + reason `duplicate`. +- An `event` trigger MAY have `concurrencyPolicy` with the values and semantics of a `schedule` + trigger (default `allow` for events), considering executions started by the same trigger entry. +- An `event` trigger MAY have `rateLimit` with `maxExecutions` (integer) per `period` (duration). + Events over the limit MUST NOT start executions and MUST be recorded as `trigger.skipped` with + reason `rateLimited`. + +| Field | Type | Req. | Description | +| ----- | ---- | ---- | ----------- | +| `concurrencyPolicy` | string | no | `allow` (default), `forbid` or `replace`, as for `schedule`. | +| `rateLimit` | object | no | `maxExecutions` (integer, REQUIRED) and `period` (duration, REQUIRED). | + +### Actor (changes to sections 5.2, 7.6 and 10.3) + +Replaces the sentence "An execution started by `schedule` or `event` has the actor type `system`" +for `event`: + +- An execution started by an `event` trigger has the actor type `system` with `id` set to the + authenticated identity of the event source (the transport identity the runtime verified). +- If the event carries a person attested by that source, the runtime MAY record it as + `attestedActor` (`type: human`, `id`) in `workflow.started`, but only if the runtime's + configuration marks the source as trusted to attest people. Otherwise it MUST NOT record one. +- Approval rules that refer to the initiator (`initiatorCannotApprove`, + `actorCannotApproveOwnAction`) MUST treat the attested actor as the initiator. +- A policy MAY require an attested actor for an event trigger (condition `trigger.attested`); + without one, the execution MUST NOT start. + +Informative: a bridge that is the only identity allowed to publish on a broker topic, and that +reads the author from the chat system with its own credentials, attests through transport +authorisation, not end to end. A signature over the event would be stronger. + +### Conversation context and reply data + +- Conversation context (earlier messages of a thread, participants) is part of `event.data`. It + is untrusted input (AEP-0004), has the classification of `event.data`, and participants and + message texts are personal data in the sense of spec 7.2. +- Correlation data for a reply (thread, message, channel) SHOULD be carried in `event.subject` or + in `event.data`; delivery of a reply is the job of a step. +- Informative: a standard shape for thread context and reply targets is left to a later AEP with + frontend-neutral interaction event types. + +### Conformance statement (spec 11) + +A runtime MUST state, per supported event source, the delivery guarantee from the source to the +start of an execution (at most once, at least once) and its deduplication window. + +## Examples + +```yaml +apiVersion: awp.agenticworkflowprotocol.org/v1alpha3 +kind: Workflow +metadata: + name: chat-assistant +spec: + version: 0.1.0 + owner: + team: support + classification: internal + triggers: + - type: event + source: chat.example.com + eventType: com.example.chat.message.posted + filter: + data.mentioned: "true" # a scalar; equality on lists is undefined + concurrencyPolicy: allow + rateLimit: + maxExecutions: 20 + period: 1h + dataSchema: + type: object + required: [message, thread] + properties: + message: { type: string, maxLength: 4000 } + thread: { type: string, maxLength: 64 } + agents: + - id: assistant + model: + provider: example-provider + name: example-model + workflow: + - id: answer + agent: assistant + task: "Answer this message: ${{ event.data.message }}" +``` + +## Schema changes + +- Event trigger: `concurrencyPolicy`, `rateLimit {maxExecutions, period}`. +- `filter` keys: pattern for attribute names and `data.`. +- Policy condition `trigger.attested` (boolean). +- `workflow.started`: optional `attestedActor`. + +## Conformance impact + +- `core`: filter semantics, deduplication, conformance statement. +- `governance`: attested actor in approval rules, `trigger.attested`. +- `audit`: `trigger.skipped` reasons `duplicate`, `rateLimited`; `attestedActor`. +- Valid: `5.2-event-filter-data-path.yaml`, `5.2-event-rate-limit.yaml`. Invalid: + `5.2-event-filter-invalid-key.yaml`, `5.2-event-rate-limit-missing-period.yaml`. +- Runtime tests: the same event twice; an event that matches the runtime filter but not the + manifest filter; an approval requested in a run started by the approver's own message. + +## Compatibility and migration + +Additive except for `filter`: runtimes that interpreted filter keys differently must follow the +new semantics. AEP-0021 B4 loses `triggers[].source` as a domain-prefixed value space. + +## Security considerations + +- Deduplication and rate limits stop replay and flooding. +- Narrow-only runtime filters keep the reviewed trigger as the upper bound. +- Approval rules bind the person behind an event; without this, a message could start a run whose + request the same person approves. +- Conversation context is untrusted input and can carry prompt injection from other participants. + +## Privacy considerations + +Thread context contains messages and identities of people who did not start the run. Runtimes +SHOULD cap its size, MUST apply the data policy of `event.data` to it, and SHOULD NOT include it +in audit events beyond the metadata level. + +## 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 + +- **Map events to inputs.** Rejected by D7; AEP-0004 keeps event data recognisable as untrusted. +- **A filter expression language in the manifest.** Rejected: not portable across routers; + equality is the portable floor, richer rules live in runtime objects. +- **Always actor `system`.** Rejected: leaves the approval hole of G44. +- **Always trust a person named in the event.** Rejected: any publisher could name anyone. + +Prior art (named under decision D21): the `listen` task of the +[Open Workflow Specification](https://github.com/open-workflow-specification/specification) consumes +CloudEvents and filters them with `with` on attributes and `data`, where values may be regular +expressions or runtime expressions, and correlates events with `correlate`. This AEP keeps the +CloudEvents model and attribute names of that design, but restricts the manifest filter to +equality so that every router can evaluate it; richer conditions stay in runtime objects that may +only narrow. + +## Implementation status + +A proof-of-concept Kubernetes runtime receives chat messages as CloudEvents through a broker and an +event router, deduplicates by `source` and `id`, and answers in the thread from a step. It plans +to create event runs itself from a trigger object generated from `spec.triggers`. The router it +uses subscribes to MQTT with QoS 0. The thread limits of its bridge (30 entries, 12,000 +characters) are set, not measured. + +The same runtime, extended to a platform with interactive sessions, adds three data points: + +- **Deduplication confirmed.** A security scan workflow started by a CloudEvent over MQTT ran once; + a repeated delivery was rejected as a duplicate by `source` and `id`. +- **Events emitted by the runtime.** The runtime publishes CloudEvents about sessions (created, + ready, idle, resumed, finished, failed) and "waiting for a person" when a confirmation is + pending, so that chat bridges can notify people. AWP has no vocabulary for events that a runtime + emits about executions, only for events that start them (runtime feedback G62). +- **Event-started sessions (concept, not built).** An event could also start an interactive + session with an initial prompt. The actor question of G44 then decides who created the session + and who may control it: the attested person, not the bridge (runtime feedback G86). + +## Open questions + +1. Is 24 hours the right minimum deduplication window? +2. Should `attestedActor` also be allowed for `manual` starts through a trusted front end? +3. How does a client run carry an event for testing or replay (AEP-0019 open question 1, runtime + feedback G48 and G57)? Proposed as an amendment of AEP-0019. +4. Which CloudEvents attribute carries the attested actor, and is `trigger.attested` a start-time + check (like `environments`) rather than a policy condition evaluated per action? + +## Decision + +Not decided. Number and scope assigned by the maintainer on 2026-11-22. + +## References + +- Runtime feedback G42 to G46, G54, G56 ([runtime-feedback.md](../docs/runtime-feedback.md)). +- AEP-0004, AEP-0019, AEP-0021; decision D7. +- CloudEvents 1.0 specification. +- Open Workflow Specification, `listen` and `emit` tasks. diff --git a/aep/0025-state.md b/aep/0025-state.md new file mode 100644 index 0000000..b039111 --- /dev/null +++ b/aep/0025-state.md @@ -0,0 +1,197 @@ +# AEP-0025: State across executions + +| | | +| --- | --- | +| **AEP** | 0025 | +| **Title** | State across executions: declared, classified, shared and untrusted | +| **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, privacy reviewer | +| **Reviewers** | none yet | +| **Target API version** | `v1alpha3` | +| **Profiles affected** | `core`, `governance`, `audit` | +| **Created** | 2026-11-22 | +| **Discussion** | issue to be opened | +| **Supersedes** | - | +| **Superseded-by** | - | + +## Summary + +Workflows keep data between executions ("already reported", user preferences), but AWP has no +state: a runtime provides it invisibly (a volume of its binding), without data class, retention +or access rules. This AEP declares state in the manifest as named stores with classification, +retention and an access mode per workflow, lets several workflows of one owner share a store with +rules for concurrent writers, and makes state untrusted input for models. It answers runtime +feedback G03, G53 and G58. + +## Motivation + +- **Invisible state (G03).** A proof-of-concept workflow remembers which events it already + reported in a file on a volume of its runtime binding. Reviewers cannot see that the workflow + stores data, which class it has or how long it is kept. +- **Shared state (G53).** A daily workflow writes what it found; a chat workflow of the same owner + reads it and writes preferences that the daily workflow reads. Two workflows need the same store + with different rights. Derived from the proof of concept, not observed as a conflict: a + preference written during a daily run takes effect a day later, and two chat runs can write the + same file at once. +- **Memory poisoning (G58).** State written by one execution is read as data by the next. A chat + message or a web page that ends up in state becomes a persistent instruction, seen in the chat + workflow of the proof of concept. Spec 12 lists tool results and remote agent messages as + untrusted input, not state. + +## Goals and non-goals + +- Goals: state visible in review; classification and retention; shared stores with access modes; + defined behaviour with concurrent writers; state as untrusted input. +- Non-goals: a storage technology; queries or schemas inside the store; state inside one + execution (step outputs, AEP-0018). + +## Specification + +### New section 5.9: state + +`spec.state` declares stores that survive executions. + +| Field | Type | Req. | Description | +| ----- | ---- | ---- | ----------- | +| `name` | string | yes | Store name, unique per owner (`spec.owner`) and namespace. | +| `access` | string | no | `read` or `readWrite` (default). | +| `classification` | string | no | Data class of the content. Default: `spec.classification`. | +| `retention` | duration | no | How long content is kept after its last write. Default: runtime-defined, stated in the conformance statement. | +| `maxSize` | string | no | Upper bound (for example `64Mi`); the runtime MUST reject writes beyond it. | + +- A store is provided to command steps as a directory (`$AWP_STATE_DIR/`) and to agent steps + only through tools the manifest grants. The runtime MUST NOT expose stores that are not + declared. +- **Sharing.** Workflows with the same `spec.owner` in the same namespace that declare a store of + the same `name` share it. If their `classification` values differ, the strictest applies to + every reader. `retention` and `maxSize` MUST be equal in every declaration of a shared store + (or absent in all of them); a runtime MUST reject a workflow whose declaration differs from the + store's existing declarations, with reason `stateConflict`, instead of choosing one value. A + runtime MUST reject a declaration that would give a workflow of another owner access. +- **Concurrent writers.** The runtime MUST make each write of a file or key atomic. It MUST state + in its conformance statement whether concurrent executions writing the same store are + serialised or last-writer-wins. With `readWrite`, a step MUST NOT see a partially written value. +- **Absent store.** A store that does not exist yet is empty; the first `readWrite` execution + creates it. +- **Audit.** `workflow.started` lists the stores and their access modes. Writes SHOULD be + recorded at metadata level (store, key or path, size). + +### Change to section 12 (security considerations) + +Extend "Prompt injection": tool results, remote agent messages **and content read from state** are +untrusted input. Content written to state by an earlier execution MUST be treated like a tool +result of unknown origin; runtimes SHOULD mark its origin when passing it to a model (see runtime +feedback G11). + +### Change to section 7.2 (data classification) + +Reading a store counts as an operation on data of the store's `classification`. + +## Examples + +```yaml +apiVersion: awp.agenticworkflowprotocol.org/v1alpha3 +kind: Workflow +metadata: + name: daily-digest +spec: + version: 0.1.0 + owner: + team: example-team + classification: internal + state: + - name: seen-items + retention: 180d + maxSize: 64Mi + - name: preferences + access: read + workflow: + - id: diff + type: command + image: registry.example.com/tools:1.0.0 + command: python3 /opt/diff.py +``` + +A second workflow `chat-assistant` of the same owner declares `preferences` with `readWrite` and +`seen-items` with `read`. + +## Schema changes + +- `spec.state` array with the fields above. +- Semantic rule `state.duplicate-name` within one manifest. + +## Conformance impact + +- `core`: declaration, exposure only of declared stores, atomic writes, conformance statement. +- `governance`: classification of shared stores. +- `audit`: stores in `workflow.started`, write records. +- Valid: `5.9-state-shared.yaml`. Invalid: `5.9-state-duplicate-name.yaml`, + `5.9-state-invalid-access.yaml`. + +## Compatibility and migration + +Additive. Runtimes that provide state through their own binding declare it in the manifest instead; +until then, such state is outside the reviewed manifest. + +## Security considerations + +Declared state makes persistence reviewable and limits sharing to one owner. Treating state as +untrusted closes the path from one injected message to a permanent instruction. Atomic writes +prevent torn values that a later step could misread. + +## Privacy considerations + +State may hold personal data (preferences, conversation summaries). `retention` and +`classification` let operators apply deletion and access rules; runtimes SHOULD support deleting a +store on request. + +## 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 state in the runtime binding.** Rejected: invisible to review (G03). +- **Share across owners by reference.** Rejected for now: needs an access model between owners. +- **A key-value API instead of directories.** Left open: directories match the step interface of + AEP-0018; a key-value form can be added. + +## Implementation status + +A proof-of-concept Kubernetes runtime provides one volume per workflow through its binding and +mounts it at `/awp/state`. Sharing between workflows and the conflict scenario are derived, not +implemented. + +Interactive sessions of the same runtime raise two more kinds of state: + +- **Workspace across pause and resume.** When a session pauses, the engine process ends; the + repositories, the engine's history and configuration stay on a volume and are used again on + resume. A running turn is cancelled. This is state of one execution rather than across + executions, but it has the same questions: classification (it contains the repository and every + prompt), retention after the session ends, and who may read it (runtime feedback G62, G85). +- **Shared workspace of several steps (concept).** Steps that plan, implement and review the same + change need one workspace, as Tekton workspaces provide. Today each engine step gets its own + empty directory. A declared store with an access mode per step would cover it, with the trust + boundary that a later step reads what an earlier agent wrote (runtime feedback G87, with G58). + +## Open questions + +1. Should stores be their own kind (`State`) instead of a manifest field, so that ownership and + retention live in one place? +2. Is one owner per namespace the right sharing boundary? `owner` is declared by the author, so + sharing by `owner.team` is only as strong as the control over who may create workflows in the + namespace. +3. Should agent steps get a built-in state tool, or only command steps a directory? + +## Decision + +Not decided. Number and scope assigned by the maintainer on 2026-11-22. + +## References + +- Runtime feedback G03, G11, G53, G58 ([runtime-feedback.md](../docs/runtime-feedback.md)). +- AEP-0018 (step outputs); spec `v1alpha3` sections 7.2, 12. diff --git a/docs/runtime-feedback.md b/docs/runtime-feedback.md index d650dee..80f2700 100644 --- a/docs/runtime-feedback.md +++ b/docs/runtime-feedback.md @@ -3,7 +3,7 @@ | | | | --- | --- | | **Status** | Working list for discussion. Nothing here is decided; an entry changes the specification only through an AEP ([decision D18](decisions.md#d18-implementation-experience-goes-into-aeps-and-implementer-guidance)). | -| **Source** | A Kubernetes runtime proof of concept (operator, step runner, one real workflow) built against `v1alpha3` at commit `d1bc49b`. As decided in D17, the runtime is not named. | +| **Source** | A Kubernetes runtime proof of concept (operator, step runner, one real workflow) built against the draft at commit `d1bc49b` (then named `v1alpha2`, now `v1alpha3`, decision D20). As decided in D17, the runtime is not named. | | **Collected** | 2026-11-19 | | **Related** | [decision log](decisions.md), [AEP process](aep-process.md), [spec v1alpha3](../spec/v1alpha3/README.md) | @@ -26,15 +26,22 @@ portable runtimes, **should** needs a rule, **minor** is editorial or informativ 5. [Trust and data flow](#5-trust-and-data-flow) 6. [Minor](#6-minor) 7. [From the operator](#7-from-the-operator) -8. [Questions for the project lead](#8-questions-for-the-project-lead) +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) ## 1. Status overview | Status | Entries | | --- | --- | +| Accepted and applied to `v1alpha2` and `v1alpha3` | G23 ([AEP-0022](../aep/0022-step-iteration.md), decision D19) | | AEP drafted and applied to the `v1alpha3` draft (Draft, not accepted) | G01, G07, G08, G40; partly G14, G15 | -| Covered by an existing AEP that is not applied yet | G02, G04, G06, G22 | -| Open, needs a decision whether and how | G03, G05, G09, G10, G11, G12, G13, G16 to G21, G23 to G39, K | +| 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) | +| 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 @@ -42,7 +49,7 @@ portable runtimes, **should** needs a rule, **minor** is editorial or informativ | --- | --- | --- | --- | --- | | G01 | must | How a step produces its declared outputs is undefined; command images and agent prompts only work on the runtime they were written for. | Command steps write files to `$AWP_OUTPUTS`; agent steps get a completion mechanism. | AEP drafted: [step outputs](../aep/0018-step-outputs.md), spec 5.6.4; open question 4 there: non-string values in `complete_step` as JSON until AEP-0003 | | G02 | must | Outputs are untyped: a runtime cannot ask the model for structured output or check it before the next step. | `outputs[].type` and `schema`. | [AEP-0003](../aep/0003-typed-handoffs.md) and [AEP-0014](../aep/0014-input-examples-and-schemas.md), not applied | -| G03 | must | No state across executions ("already reported"). Solved with a volume from the runtime binding, invisible to AWP: no data class, no retention. | `spec.state` (name, classification, retention), provided as a directory or key-value store. | open | +| G03 | must | No state across executions ("already reported"). Solved with a volume from the runtime binding, invisible to AWP: no data class, no retention. | `spec.state` (name, classification, retention), provided as a directory or key-value store. | AEP drafted: [AEP-0025](../aep/0025-state.md) | | G05 | must | Secrets of command steps are too coarse: `scope: [command]` gives a secret to every command step; the variable name is undefined. | Step ids as `scope` entries; a secret is exposed as an environment variable with its name. | open | | G12 | should | Where the code of a command step comes from is undefined (scripts in the image; an example runs `npm test` without a checkout). | `workspace` (for example a Git repository and revision) or explicitly implementation-defined. | open | | G14 | should | No size limit for outputs. | A minimum every runtime accepts and a rule for larger outputs. | in AEP-0018 (256 KiB per output, 1 MiB per step) | @@ -63,7 +70,7 @@ portable runtimes, **should** needs a rule, **minor** is editorial or informativ | G20 | should | Expressions have no date or time; a step has to write the fetch date into an output. | `execution.startedAt` as a reference. | open | | G21 | should | Input values cannot be set per environment or deployment; scheduled executions use defaults. | Inputs per environment (7.10) or inputs supplied by the runtime binding for schedule triggers. | open | | G22 | should | Array inputs have no item schema. | `items` and `schema` for array and object inputs. | [AEP-0014](../aep/0014-input-examples-and-schemas.md), not applied | -| G23 | should | No fan-out: an agent step cannot run once per source. | `matrix` or `forEach` over an array. | open | +| G23 | should | No fan-out: an agent step cannot run once per source. | `matrix` or `forEach` over an array. | resolved: `forEach`, [AEP-0022](../aep/0022-step-iteration.md) (accepted, D19), spec `v1alpha3` 5.6.5 | | G24 | should | No limit on output tokens or turns per agent step; large extractions hit hard-coded limits. | `budget.resources.maxOutputTokens` and `maxTurns`. | open | | G25 | minor | The model cannot see which step it serves; a gateway can only guess. | The runtime passes the step id as request metadata (informative). | open | @@ -73,7 +80,7 @@ portable runtimes, **should** needs a rule, **minor** is editorial or informativ | --- | --- | --- | --- | --- | | G07 | must | No execution object and no status shape; `kubectl get workflows` cannot show validity. | A run kind; standard conditions in `metav1.Condition` shape with printer columns. | AEP drafted: [WorkflowRun and status](../aep/0019-workflow-run-and-status.md), spec 3.11 and 10.8 | | G09 | should | Unknown `spec` fields pass `kubectl apply --validate=strict` (the CRDs keep unknown fields); only `status` shows the error, and GitOps tools report "synced". | Ship the validator as an admission webhook image or a ValidatingAdmissionPolicy for common rules. | open; the `Valid` condition of G07 makes the error visible in `kubectl get` | -| G10 | should | Host-based network permissions cannot be enforced with NetworkPolicy. | Informative note: egress proxy or FQDN policies of the network plugin, otherwise a declared limitation. | open | +| G10 | should | Host-based network permissions cannot be enforced with NetworkPolicy. | Informative note: egress proxy or FQDN policies of the network plugin, otherwise a declared limitation. | AEP drafted: AEP-0023 | | G26 | should | `metadata.namespace` and `secrets[].source: kubernetes` tie a manifest to one runtime. | Namespace is deployment data; `source` names an abstract store that the runtime resolves. | open | | K | should | No mapping of AWP concepts to Kubernetes primitives; every Kubernetes runtime invents its own. | A mapping table in spec 3.10, see below. | open | @@ -136,8 +143,129 @@ the collector only works because a command step now parses structured sources de | G38 | minor | `maxDuration` on an agent is ambiguous when the agent serves several steps; the runtime rejects it. | Only workflow and step level, or cumulative step time. | open | | G39 | should | Runtime neutrality has only been tested on Kubernetes. The `WorkflowRun` draft defines conditions as `metav1.Condition` and names an admission webhook as the source of the actor. Related to G26. | Define conditions as plain JSON (`type`, `status`, `reason`, `message`, `lastTransitionTime`) with `metav1.Condition` as the Kubernetes mapping; keep "actor from an authenticated source" normative and the webhook as a non-normative example; mark Kubernetes-only text as informative. A run of the same workflow without a cluster is planned. | open | | G40 | should | Command step `image`: what a runtime without containers does with it (ignoring it runs the command in an unreviewed environment), and whether digests are needed. Digests made Helm charts hard to maintain, and digests of single platforms break multi-architecture use. | A runtime that cannot run the image rejects the workflow; tags are allowed outside the security profile and resolved to the image index digest at start, pinned for the execution and recorded. | applied in the AEP-0020 draft (spec 5.6.2, 9.4, 10.1, 10.7) | +| G47 | should | `permissions.network` and deployment limits: a namespace network policy also restricts egress, and the spec says neither who enforces `allowHosts` nor what happens when the deployment allows less. The default `egress: allow` also conflicts with deny-by-default deployments. | The manifest states what the workflow needs, the deployment sets a ceiling, the intersection applies (like a pod security context under a cluster security policy). The runtime MUST enforce, MAY restrict further and MUST reject before execution if the ceiling is narrower or it cannot enforce for a step type. `egress: deny` as the default under the security profile. | AEP drafted: AEP-0023 | -## 8. Questions for the project lead +## 8. Event triggers + +Reported while the same runtime added event-driven workflows: a chat bridge publishes messages as +CloudEvents to an MQTT broker, an existing event router (one listener per transport, one filter +object per workflow) creates a run for every matching workflow, and a step answers in the +originating thread. Routing involves no model, so a message cannot redirect it by prompt. Two +findings from the router used: it subscribes to MQTT with QoS 0 and keeps event ids for +deduplication only in memory for a few minutes, so the runtime must deduplicate itself. + +| ID | Sev. | Gap | Proposal from the runtime | Status | +| --- | --- | --- | --- | --- | +| G41 | must | An event trigger cannot pass event data to the execution; spec 5.2 has no event context, so the proof of concept maps event fields to inputs. | Apply AEP-0004 (`${{ event.* }}`, `dataSchema`, `classification`, event data as untrusted input) to `v1alpha3`, keeping D7. The run object carries the event as set by the router (G48); a test or replay run carries a supplied event (G57). | partly solved: D7 and AEP-0004 replace the input mapping; AEP-0004 not applied to the draft yet | +| G42 | should | `filter` semantics are undefined: which fields it matches, whether by equality, how entries combine. | Keys are CloudEvents attribute names or `data.`, values match by equality, all entries must match. Richer conditions (CEL, expression filters) live in an implementation-specific trigger object attached with `targetRefs` (AEP-0021 B6) and may only narrow the manifest filter. | AEP drafted: [AEP-0024](../aep/0024-event-triggers.md) | +| G43 | should | No duplicate handling and no concurrency for event triggers; MQTT and webhook retries deliver events more than once. | Deduplicate by CloudEvents `source` and `id` within a window the runtime states; allow `concurrencyPolicy` and a rate limit on event triggers. | AEP drafted: [AEP-0024](../aep/0024-event-triggers.md); duplicates observed in the proof of concept (a run rejected as duplicate event), the runtime deduplicates by `source` and `id` | +| G44 | must | The actor of an event-triggered execution is unclear: the authenticated party is the bridge, not the person who wrote the message. | Record both: the authenticated source and an optional actor attested by it; policies may require an attested actor and name the sources allowed to attest. Answers never count as approvals (AEP-0017). | AEP drafted: [AEP-0024](../aep/0024-event-triggers.md); severity raised: approval rules on the initiator (spec 7.6 `initiatorCannotApprove`, `actorCannotApproveOwnAction`) do not bind a person who starts a run by message while the actor is `system`. Evidence: the bridge attests the author only through transport authorisation (broker access control), not end to end | +| G45 | minor | No reply path: an execution started by a message cannot refer to where the message came from. | Standardise correlation data in the event context (thread, reply target as a CloudEvents extension); delivery stays with steps. | AEP drafted: [AEP-0024](../aep/0024-event-triggers.md) | +| G46 | should | Conversation context: a reply in a thread (chat, ticket, mail) only sees the triggering message. The proof of concept lets the source adapter attach earlier thread messages (author, bot flag, time, text; capped, with a truncation flag) and the participants to the event data. | A standard shape for thread context inside `event.data` (AEP-0004), untrusted and classified like the rest, so workflows stay independent of the source. Participants are personal data and fall under the data policy. | AEP drafted: [AEP-0024](../aep/0024-event-triggers.md); limits in the proof of concept are set, not measured | + +## 9. From the concept review + +Found while writing a reference concept for operating agents and in three reviews of it against +the proof of concept and the draft at `b8a0ee8` (now `v1alpha3`, decision D20). The column "Home" names the AEP or entry where a +change would fit. + +| ID | Sev. | Gap | Proposal from the runtime | Home | Status | +| --- | --- | --- | --- | --- | --- | +| G48 | must | Event runs created by an external router (an event router creating run objects) fit neither role of spec 10.8: client-created runs are manual, runtime-created runs record the trigger only in status, and the run spec has no trigger. | A trusted-ingress role: an authenticated identity the runtime accepts may create runs with trigger type `event` and an event payload; the runtime checks the trigger against the manifest, records the ingress identity and rejects event fields from other creators. | AEP-0019 open question 1 | open; the runtime now plans to create event runs itself from a generated trigger object, which needs no new role; the role stays relevant for external routers | +| G49 | should | `permissions.network.allowHosts` has no syntax: subdomain wildcards, ports, IP literals and CIDRs are undefined. | Define host matching (exact, `*.domain`), optional ports, and whether addresses or CIDRs are allowed. | AEP-0023 | AEP drafted; revised after review on 2026-11-23: `allowHosts` becomes `allowTo` with objects (`host` or `cidr`, `except`, `ports`) as in network policies, because a port appended to an IPv6 address is ambiguous | +| G50 | must | An allowed host can resolve to loopback, private, link-local (cloud metadata) or CGNAT addresses (SSRF, DNS rebinding); the proof of concept had this hole. | Under the security profile, deny such destinations after resolution unless listed explicitly as addresses. | AEP-0023 | AEP drafted; the proof of concept now checks the resolved address at connection time (covers rebinding and redirects by construction), without an explicit rebinding test. Second enforcement point: the egress proxy of every tenant and of a tool server deny private, loopback, link-local and CGNAT destinations after resolution, and the network policy of the proxy excludes them as well | +| G51 | should | No guidance on how `permissions.network` is enforced for command steps. | Informative: a per-workload egress proxy with an allowlist derived from `allowHosts`, plus a network policy that allows only that proxy, is conforming. A runtime that cannot enforce a network rule rejects the workflow. | AEP-0023, with G10 | AEP drafted | +| G52 | should | AEP-0021 B6 covers bindings but not runtime trigger objects (routing, expression filters, rate limits). | Trigger objects attach with `targetRefs` and `sectionName` (trigger index), may only narrow the manifest trigger, are generated from or validated against `spec.triggers`, and report `Accepted`. | AEP-0021 (extend B6) | open | +| G53 | should | Two workflows of one owner share state (a daily run writes, a chat run reads and writes). | State as a named resource referenced by several workflows with an access mode, rules for concurrent writers, and the strictest classification for every reader. | [AEP-0025](../aep/0025-state.md), with G03 | AEP drafted; scenario derived, no conflict observed | +| G54 | minor | Meaning of `triggers[].source`: the CloudEvents producer (URI) or an adapter name (AEP-0021 B4). | State which one. | [AEP-0024](../aep/0024-event-triggers.md); AEP-0021 B4 corrected | AEP drafted | +| G55 | should | A step that posts as its own bot account acts under an external identity; the manifest shows only a secret, and governance sees `shell.execute` (G06). | Declare the external identity a step acts as, so audit and policies can refer to it. | AEP-0012 (its open point on which identity calls a tool) | open | +| G56 | minor | Event routers can silently weaken delivery guarantees (one subscribes to MQTT with QoS 0). | Runtimes state the delivery guarantee per event source in the conformance statement. | [AEP-0024](../aep/0024-event-triggers.md) (conformance statement) | AEP drafted | +| G57 | should | Event-only workflows cannot be tested conformingly: AEP-0004 fails `event.*` outside event runs, and 10.8 makes client runs manual. | A client run with a supplied event, marked as test or replay (actor is the creator), validated against `dataSchema`. | AEP-0019 open question 1, AEP-0004 | open | +| G58 | should | State written by one execution is read as data by the next, so a message or web page can become a persistent instruction (memory poisoning, seen in the chat workflow). | Origin marking (G11) also for state; state is untrusted input by default. | [AEP-0025](../aep/0025-state.md); spec 12 now lists state as untrusted input | AEP drafted | +| G59 | should | AEP-0008 treats `contextTokens` and `maxOutputTokens` as informative; a model server rejected every request because the runtime asked for more output tokens than the model allows. | Catalog limits are binding: the runtime caps requested output tokens at `maxOutputTokens` and rejects a workflow whose settings cannot fit. A price of 0 (local models) counts as a known price (G35). | AEP-0008 (its target `v1alpha3` predates D20 and now means after the current draft), with G34 | open | +| G60 | minor | Agent steps need a model that supports tool calls; a small local model called tools without arguments, and the failure showed only at run time. | Optional capability flags in the catalog model entry (`toolUse`, `structuredOutput`); a runtime rejects an agent with tools on a model without tool support. | AEP-0008 | open; a coding agent engine (section 10) also needs context size, output limit and input types (image, document) from the catalog, otherwise it does not compact the context or rejects input | +| G61 | should | The spec does not say where model credentials live; a runtime may hand the provider key to the step, where any command or injected instruction can read it. | Under the security profile, model credentials MUST NOT be visible in the step environment; the runtime calls the provider itself or through a proxy that authenticates the step with a short-lived, execution-bound credential. | AEP-0023; not AEP-0008, whose non-goals exclude credentials | AEP drafted; feasibility shown (key only at the runtime, short-lived credential per attempt), latency and cost of the proxy not measured | + +**Conflict in the draft (G44).** Spec 5.2 gives every `event` start the actor type `system`, +while G44 asks to record a person attested by the event source. Both cannot hold; 10.8 avoids +the question only because runtime-created runs record the trigger in status. + +## 10. From interactive sessions and a coding agent engine + +Reported after the same runtime was extended to a platform. People start interactive sessions +with a coding agent in a browser console (sign-in through OpenID Connect, tenants with ceilings). +The coding agent runs in an isolated pod without model or tool credentials. A model gateway and an +MCP gateway outside the pod hold the credentials, meter the budget and write the audit trail. +Egress goes through a proxy per tenant. The same coding agent also runs agent steps of workflows +as an engine. A security review that scans a deliberately vulnerable repository with a static +analysis server over MCP and fixes the findings ran end to end, interactively and as an +event-triggered workflow. "Shown" in the status column means that it ran on the test installation, +not only in unit or integration tests. + +**What goes into AWP.** Not every finding becomes a rule. Into AWP goes what a reviewer of a +manifest must know to decide whether a workflow or agent is acceptable, and what must mean the same +on every runtime. How a platform achieves it safely (address checks, gateways, proxies) goes into +informative implementer guidance or the conformance statement. Concepts with one implementation +stay small, with open questions, until a second runtime has experience with them. + +The common thread of this section is one question that AWP does not ask yet: **does something +live inside or outside the execution environment?** Credentials (G61, G69), approvals (G64) and +audit events (G76) are trustworthy only when they are outside it. Two sessions showed this in +practice. A command read the coding agent's local server password from `/proc` because both run +under the same user ID. A process in the sandbox then answered its own permission request. It +failed only after the decision moved to a separate container. + +| ID | Sev. | Gap | Proposal from the runtime | Home | Status | +| --- | --- | --- | --- | --- | --- | +| G62 | must | Interactive execution. Spec 6 runs a standalone agent as a workflow with one step. A session has no task and no outputs: a person sends prompts for hours, the session pauses when idle, resumes, and ends when the person stops it. Its lifecycle, budget scope and audit events (created, idle, resumed, waiting for a person, finished) are undefined. | An execution form `Session` next to `WorkflowRun`, with lifecycle, budget scope and events. | new AEP: AEP-0026 | shown; the runtime treats a whole session as one execution for permissions, budget and audit | +| G63 | must | Permissions are only `allow` or `deny`. In a session a person confirms single tool calls and switches between read-only, confirm-each-call and autonomous during the session. AWP says neither who may switch nor whether an author can forbid autonomy, and confirmations are neither approvals nor audited. | An effect `ask` for interactive execution. An autonomy ceiling in the manifest that the platform can only lower. Audit events for confirmed and refused calls and for mode changes. | AEP-0026 | partly shown: mode switching and audited confirmations ran; `confirm` per action and the author ceiling (`maxAutonomy`) are not built | +| G64 | must | Approval authority inside the execution environment. The engine and its commands share a user ID: a command read the engine's server password and could answer its own permission requests. A process in the sandbox sent a prompt with the autonomous mode and answered every question itself. | Under the `security` profile, confirmations and approvals are decided outside the execution environment, by an authenticated person, over a channel the environment cannot reach. Nothing that carries an approval (passwords, tokens, signed grants) is readable inside. | AEP-0023 | shown: the attack succeeded while the engine decided, and failed after the decision moved to a separate container with signed grants; the counter-test through the console asked once and ran after "allow once" | +| G65 | must | Engine of an agent. A coding agent brings its own tool loop, file editing and shell use. No field says which engine runs an agent, what it receives and produces, how permissions map to it, or whether its subagents inherit permissions and budget. The runtime uses an extension field. | `agents[].engine` (`type`, `runtimeProfile`, `repositories`, `push`). Allow or deny only when unattended. A refused call fails the step. Subagents inherit permissions and budget. Unknown engines are rejected. | new AEP: AEP-0027; until then `extensionRef` ([AEP-0021](../aep/0021-extension-model.md) B3) | shown: a workflow ran its review step with the engine, started by hand and by an event | +| G66 | should | Engine steps produce only a summary and a diff. A step that declares outputs such as `critical` and `high` is rejected, and its repositories are fixed, so an event cannot pass one. | The engine fills declared outputs through the completion tool of AEP-0018 with the schema of AEP-0003. `repositories` is expression-enabled with `inputs.*` and `event.*`. | AEP-0027 | shown (the rejection) | +| G67 | should | Agents that run untrusted code need stronger isolation than a container. The manifest cannot require it: the runtime class sits in the binding, invisible to reviewers. | A minimum `agents[].isolation` (`container`, `sandbox`, `vm`) that a runtime meets or rejects. The mechanism is platform configuration. | AEP-0023 | mapping implemented; no class above `container` deployed | +| G68 | should | Ceilings. AEP-0023 defines a network ceiling, but not whether ceilings reject or cap. The runtime rejects models, hosts and MCP servers outside its tenant ceiling and caps cost. Tenants also limit tool sources, autonomy and concurrent sessions. | A ceiling never adjusts a manifest: anything above it (model, tool source, destination, autonomy, isolation the platform cannot provide, budget) is rejected, and under a budget ceiling the manifest must declare the limit. Revised after review on 2026-11-23 (the first draft capped budgets). | AEP-0023 | partly shown: models, hosts and MCP servers outside the tenant ceiling reject; cost limits are still capped, unlike the revised proposal | +| G69 | should | MCP credentials. Spec 5.5.1 `auth.secretRef` hands the credential to the MCP client. When the client is a coding agent in a sandbox, the agent and every command can read it. | Under the `security` profile, tool server credentials stay outside the execution environment, like model credentials (G61). A gateway authenticates the execution with a short-lived ticket, and `auth` may be satisfied by the runtime. | AEP-0023 | shown: the static analysis server is reachable only through the gateway, with a session ticket and a step ticket | +| G70 | should | Resolution of MCP servers from runtime configuration (5.5.1). The order, partial declarations and substitution are undefined. | Resolve declaration first, then binding, then catalog. A declaration and the resolved server must not contradict each other. | [AEP-0007](../aep/0007-mcp-connection-catalog.md) | implemented, integration tests | +| G71 | should | `server.*` also allows tools that a server adds after the review, and unattended steps run them unseen. | An explicit tools list for unattended executions. Tool annotations are untrusted unless the platform pins the server. | AEP-0007 | shown: the catalog hides two tools of the server, and calls to them are refused | +| G72 | should | MCP prompts, resources and server requests (sampling, roots, elicitation) are not covered. An engine shows server prompts as commands without any rule of the manifest. | Allow lists for `prompts` and `resources`, default none. No relay of sampling or roots unless allowed; elicitation is declined. This answers AEP-0007 open question 3. | AEP-0007 | shown (one prompt and rule resources of the analysis server) | +| G73 | should | Tool sources are fixed per manifest, so a person cannot enable only some of them for one execution. The alternative is one reviewed manifest per combination. | A runtime MAY narrow the tool sources of an execution, never widen them. The narrowing is recorded in the audit. | spec 5.5, AEP-0026 | shown | +| G74 | should | `shell.execute` has no resource format (7.5.2), but a command line chains, substitutes and nests commands. | The resource is each simple command. Lines that cannot be split are denied. An allow list does not restrict what an allowed program runs (`make`, `npm test`). | [AEP-0002](../aep/0002-tool-argument-constraints.md) | shown: `echo` and `git --version` ran; `curl`, `echo a; id` and `echo $(id)` were refused | +| G75 | minor | There is no reusable prompt outside a workflow step. The runtime offers shared prompts to sessions as commands. | `Prompt` ([AEP-0005](../aep/0005-prompt-kind.md)) also serves as a task of an interactive execution. It is plain user input, grants nothing and may suggest a mode. | AEP-0005 | implemented | +| G76 | should | Audit events can come from the engine (inside), the user interface or the model gateway (outside). AWP does not say which source is trustworthy. | Events about model calls SHOULD come from the component that holds the credentials. Every event carries its origin. | [AEP-0009](../aep/0009-audit-payload-levels.md) | shown (gateway audit with a hash chain per conversation) | +| G77 | should | Data flow to tool sources. A scan tool receives source code as an argument. Nothing says which data may go to which source (in the cluster or external), and the tool server's own egress is outside `permissions.network`. | Allowed data classes per tool source, and logging of the passed content with its own retention. The source's own network limit is runtime guidance. | open (5.5, 7.2, AEP-0009) | shown: arguments in the audit, the server's egress only through its own proxy | +| G78 | should | Budgets during streaming. Providers report usage at the end of a stream. The runtime estimates and aborts, so a session can end slightly above `maxCostUsd`. | Budgets are hard limits that the last call may exceed. Estimates during a call are allowed. With G35. | [AEP-0013](../aep/0013-runtime-clarifications.md) | implemented, overshoot not measured | +| G79 | should | A person brings a secret when starting an execution (a personal token). The manifest can neither express nor restrict this. | `secretsPolicy` on agents and workflows. Secrets supplied at start fall under the same MUSTs as declared ones. With G05 and G36. | spec 7.9 | shown: a secret value reached the model only as a placeholder | +| G80 | minor | A standalone `Agent` has no agent id for the secret `scope`. | A scope value `self`, or `metadata.name` as the id. | spec 7.9 | implemented | +| G81 | must | Repository content as instructions. Repositories bring agent instruction files, skills, commands and tool manager configuration with environment variables, and an engine loads them by default. | Configuration from workspace content is off unless the manifest allows it explicitly, and it is untrusted input. | AEP-0027, spec 12 | implemented (disabled in the engine) | +| G82 | should | An agent has exactly one model, but sessions pick from alternatives that the binding and the tenant allow. | Model alternatives or a model policy on `Agent`, intersected with ceilings. | AEP-0026, spec 7.4 | implemented | +| G83 | should | A workspace has several repositories with clone credentials, and the credential must not reach the engine. Extends G12. | `workspace.repositories`. Git credentials stay outside the execution environment, like G61. | AEP-0027, with G12 | implemented; private repositories not shown | +| G84 | should | The agent asks a person questions during interactive work. Behaviour without a person is undefined. | AEP-0017 covers sessions. Without a person, questions are declined. Answers are no approvals. | [AEP-0017](../aep/0017-human-input.md) | implemented (audited answers) | +| G85 | should | The history of an interactive execution after it ends: its content, read access, retention and tamper evidence. | History is audit content with its own retention. | AEP-0009, AEP-0026 | in progress | +| G86 | should | The actor of a session started by an event. Extends G44 and G48. | The same attested actor as in G44. Define the creator and who may control the session. | [AEP-0024](../aep/0024-event-triggers.md) | concept | +| G87 | should | Several steps or agents share one workspace (plan, implement, review). | Workspaces with an access mode per step, under AEP-0025, and the trust boundary in spec 12. | [AEP-0025](../aep/0025-state.md) | concept | + +Not numbered: messages between running agents of one runtime (concept only). Engines also need +context size, output limit and input types from the model catalog; this is evidence for G60. + +**Which objects should become AWP kinds (extends K).** The platform needed nine custom resources. +For each one the question was whether it should be an AWP kind or stay with the runtime. Rule: an +object becomes an AWP kind if an author or reviewer governs it and it must mean the same on every +runtime. It stays implementation-specific if it says how a platform realises something, and then +attaches with `targetRefs` or `parametersRef` (AEP-0021 B5, B6). + +| Object in the proof of concept | Proposal | Reason | +| --- | --- | --- | +| Session object | AWP kind `Session` (AEP-0026), sibling of `WorkflowRun` | An execution that people start, pause and stop. Its spec fields (agent, repositories, mode, tool source selection, model choice) are governed and portable. | +| Run object | AWP `WorkflowRun` (AEP-0019) | Built only because the draft was not applied yet. | +| Prompt library | AWP `Prompt` (AEP-0005), extended for sessions | Reviewed content, the same on every runtime. | +| MCP server catalog entry | split: catalog facts (tools, prompts, resources, allow lists) in `McpCatalog` (AEP-0007); endpoint and credentials in runtime configuration | The same split as `ModelCatalog` and provider configuration (AEP-0008, G59). | +| Model provider | split as in AEP-0008 | Prices and limits are facts. The endpoint and credentials are deployment data. | +| Agent and workflow bindings | implementation-specific, `targetRefs` (AEP-0021 B6) | Placement, images, secret mapping. AEP-0021 B6 should also allow `Agent` targets. | +| Tenant | implementation-specific | Tenancy, sign-in groups and quotas are platform matters. AWP defines what a ceiling may restrict and how a rejection is reported (G68), not the object that holds it. | +| 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 1. Do the three drafted AEPs (G01, G07, G08) join the `v1alpha3` scope table in the decision log, once they reach `Review`? @@ -147,7 +275,20 @@ the collector only works because a command step now parses structured sources de well, so that a runtime can test them? 4. K, G26 and G39: a normative Kubernetes mapping in spec 3.10, or an informative page on the website? 5. G09: should this repository publish the validator as a container image for admission webhooks? -6. G13 (`finally`), G23 (fan-out) and G24 with G34 (token and turn limits, model parameters): +6. G13 (`finally`) and G24 with G34 (token and turn limits, model parameters): `v1alpha3` or later? The real run above makes G24/G34 the most pressing of them. 7. G27 to G38 are mostly clarifications. Collect them in one AEP (like AEP-0013) or extend AEP-0013? +8. Decided 2026-11-22: event triggers get one AEP, [AEP-0024](../aep/0024-event-triggers.md) + (G42 to G46, G54, G56). G41 is AEP-0004, G48 and G57 go into AEP-0019 (open question 1), G52 + into AEP-0021. +9. Decided 2026-11-22: network permissions and credentials get one AEP, + AEP-0023 (G10, G47, G49 to G51, G61). Internal destinations + are denied by default under the security profile, not banned: the manifest and the platform + ceiling can allow them. State gets [AEP-0025](../aep/0025-state.md) (G03, G53, G58). +10. G62 to G87 (section 10): confirm the two new AEP numbers, AEP-0026 (interactive execution) + and AEP-0027 (agent engine), and that G64, G67, G68 and G69 extend AEP-0023 rather than + getting an AEP of their own. +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? diff --git a/docs/v1alpha3-review-guide.md b/docs/v1alpha3-review-guide.md index 343d84f..1d78e22 100644 --- a/docs/v1alpha3-review-guide.md +++ b/docs/v1alpha3-review-guide.md @@ -28,7 +28,7 @@ cannot be stored as one: the API server drops unknown `metadata` fields (`versio Kubernetes implementation would have to wrap the AWP document in its own resource. A Kubernetes runtime proof of concept then built an operator, a step runner and one real workflow -against the draft. Its findings (G01 to G39 in [runtime-feedback.md](runtime-feedback.md)) went +against the draft. Its findings (G01 to G61 in [runtime-feedback.md](runtime-feedback.md)) went into AEPs, as decision D18 asks. The runtime is not named (D17). ## 2. What to read and what to skip @@ -143,7 +143,7 @@ it. It is a concept: nothing in the schema changes until the project lead decide 2. **Extension model.** Follow AEP-0021 (reverses D3 and D12) or keep `extensions` objects? 3. **Kubernetes text.** Normative Kubernetes mapping in spec 3.10, or Kubernetes-only text marked informative (K, G26, G39)? -4. The remaining questions in [runtime-feedback.md section 8](runtime-feedback.md#8-questions-for-the-project-lead) +4. The remaining questions in [runtime-feedback.md section 10](runtime-feedback.md#10-questions-for-the-project-lead) (next AEPs for state and secret scopes, model parameters, collecting clarifications). ## 6. How it was tested diff --git a/spec/README.md b/spec/README.md index 09d7dbe..1a42cbd 100644 --- a/spec/README.md +++ b/spec/README.md @@ -44,6 +44,8 @@ and a Final Comment Period, and may still be moved to a later version or rejecte | [0020](../aep/0020-execution-pinning.md) | Pinning an execution to its manifests | Draft | proposed for `v1alpha3` | | [0021](../aep/0021-extension-model.md) | Extension model aligned with the Kubernetes Gateway API (concept) | Draft | proposed for `v1alpha3` | | [0022](../aep/0022-step-iteration.md) | Step iteration (`forEach`) | Accepted (lead decision D19) | in the `v1alpha2` draft | +| [0024](../aep/0024-event-triggers.md) | Event triggers with CloudEvents | Draft | proposed for `v1alpha3` | +| [0025](../aep/0025-state.md) | State across executions | Draft | proposed for `v1alpha3` | 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/v1alpha3/README.md b/spec/v1alpha3/README.md index ae705c8..c48ee9e 100644 --- a/spec/v1alpha3/README.md +++ b/spec/v1alpha3/README.md @@ -2130,7 +2130,9 @@ AWP anticipates a common command-line vocabulary (`awp validate`, `awp lint`, `a - **Fail closed.** Unknown fields, unsupported profiles, undeterminable regions or resources and unverifiable digests lead to rejection or denial, never to silent acceptance. -- **Prompt injection.** Tool results and remote agent messages are untrusted input. Governance in +- **Prompt injection.** Tool results, remote agent messages and content that a runtime keeps + between executions and passes to a later model invocation (state) are untrusted input: a message + stored by one execution must not become an instruction for the next. Governance in AWP is enforced by the runtime **outside** the model: an agent cannot change permissions, policies, budgets or approvals by producing text. Runtimes MUST NOT allow model output to modify the effective manifest of a running execution.