From 2454a3c0a3e000704e5a1e165d38890c35fd757b Mon Sep 17 00:00:00 2001 From: abrichr Date: Mon, 30 Nov 2026 14:47:54 -0500 Subject: [PATCH 1/7] feat(a2a): sign the Agent Card with the receipt key serve --a2a now signs the public and extended Agent Cards as A2A 1.0 section 8.4 describes: an EdDSA JWS over the card's RFC 8785 canonical form, by this computer's Seal key (the key that signs its run receipts), so the kid is the key id a receiver already pins for handoffs. The JWS is built from signer.sign, so keychain and PKCS#11 keys work. If the key can't be opened, the server does not start rather than serve an unsigned card. verify_agent_card checks a served card against pinned keys (EdDSA only, key by kid, never the card's own jwk). Tests verify the card with the a2a-sdk verifier and refuse changed, unpinned, unsigned and relabelled cards. The agent CI job now installs Flow's a2a extra. Without it, test_handoff_e2e.py skipped in CI, and one assertion had gone stale: since the check-level ladder (#2495) a stubbed run with no read-back gets an UNKNOWN receipt, not VERIFIED. The test now asserts the verdict copies that outcome. --- .github/workflows/packages.yml | 3 +- CAPABILITIES.md | 6 +- ...2agent-protocol-adapter-openadapt-agent.md | 2 +- capabilities/CAPABILITIES.md.sha256 | 2 +- llms-full.txt | 40 ++++- packages/agent/tests/test_handoff_e2e.py | 110 +++++++++++- packages/flow/benchmark/a2a_tck/README.md | 8 +- packages/flow/docs/A2A.md | 46 ++++- .../flow/openadapt_flow/agent/a2a_server.py | 160 +++++++++++++++++- 9 files changed, 359 insertions(+), 18 deletions(-) diff --git a/.github/workflows/packages.yml b/.github/workflows/packages.yml index fd10ba7859..60c4630312 100644 --- a/.github/workflows/packages.yml +++ b/.github/workflows/packages.yml @@ -359,8 +359,9 @@ jobs: cache-suffix: agent-py${{ matrix.python-version }} - name: Install the shim against the in-tree core # Agent's lock for its own tools, then Flow's for the core it tests. + # The a2a extra lets the A2A server and signed-card tests run. run: >- - python ../../scripts/ci/locked_install.py --lock 'packages/agent[dev]' --lock 'packages/flow[agent]' + python ../../scripts/ci/locked_install.py --lock 'packages/agent[dev]' --lock 'packages/flow[agent,a2a]' --editable packages/types --editable packages/flow --editable packages/agent - name: Confirm the in-tree Flow is the one installed run: | diff --git a/CAPABILITIES.md b/CAPABILITIES.md index 1dcbe2088b..c0d6b9b20d 100644 --- a/CAPABILITIES.md +++ b/CAPABILITIES.md @@ -176,6 +176,7 @@ improvising or retrying when something is off. | One check-level scale, 0 to 5, from "unchecked" to "counterparty confirmed" | Released | Unit tests | `openadapt_flow/check_level.py` | | One receipt word per check, the same on every path: `VERIFIED` only at level 3 (a separate session) or 4 (the system of record), always with the basis that produced the evidence (`separate_session`, `system_api`, `activity_log`, `db_frame` or `owned_connection`); `SHOWN` for an acting-screen re-read, `CONFIRMED` for the counterparty, `ATTESTED` for an operator and `RECORDED` for the rest. `VERIFIED` means "as of the read-back time the read-back showed this value", not "persisted". Run receipts (`record/run/v1`, an additive optional field), `verify-run` receipts and `tx` receipts carry an evidence-scope block: level, basis, word, the wire channel watched, the read-back time, the recheck window, and what it did not cover (always server-side async and outbound effects; a run receipt says it has no per-read time). A run receipt never says `VERIFIED` below level 3. Receipts without the block still verify. A `verify-run` contract with `minimum_effect_strength: independent_session` now verifies on a separate-session read | On main | Unit tests (parity across the runtime report, `verify-run`, `tx` and Execute v1; fake verifiers) | `openadapt_types/check_level.py`, `openadapt_types/evidence_scope.py`, `openadapt_flow/evidence_basis.py` | | Grade a file, PDF or email check by who produced it: a file the acting session wrote or downloaded, or one with no declared producer, is at most `same_screen`; one a separate session fetched is at most `separate_session`; only a declared `system_of_record` producer reaches `system_of_record`. A store that overlaps the acting session's folders (named ones, the user's Downloads, a Playwright download folder) is graded as the acting session's whatever is declared. Under a strong declared producer, a scan that reads a file in a browser download folder beneath the store, or a symlink out of it, is refused as INDETERMINATE. The verdict's `read_evidence.provenance` names the producer and whether it was declared or observed | On main | Unit tests through each of the four readers (mixed store, symlink, system-owned positive case); a PDF downloaded by headless Chromium from a loopback app, the same bytes from a separate browser context and from the app's store, and a headless download landing beneath a broader store | `runtime/effects/artifact_provenance.py`, `effects.artifact_producer`, `packages/flow/tests/test_effect_artifact_provenance.py` | +| One strict matcher decides whether text on a screen or page proves a value or a commit: `MATCH`, `MISMATCH` or `AMBIGUOUS`, and only `MATCH` passes. A value must be bound to its label at the start of its field, with nothing but unit words beside it, or be the whole field. A value merely found on the page, inside a longer token (`250` in `$1,250.00`, `John Smith` in `John Smith-Jones`), or under a label with two values never passes. A commit phrase must be new, plainly stated, and not next to a question, a negation or a control label. The launcher's transducer read-back and the kernel's read-back oracles use it; [the migration page](packages/types/docs/evidence-migration.md) lists the callers that don't yet | On main | Adversarial corpus with pinned verdicts, Hypothesis properties, a parity test against Flow's read-back matcher, and strict expected-failure tests for each caller not yet migrated | `openadapt_types/evidence.py`, `openadapt/transducer_obligations.py`, `openadapt_kernel/oracles.py` | | Check a value where a careful person would look again: an effect location (`openadapt.effect-location/v1`) is pack data for one place an intended value shows (path and start condition, locator, expected value, codec, expected count, optional baseline). One summary row can cover two values ("Name (DOB)"), and a date can be split over three fields. Every planned value is `held`, `refuted` or `not_checked`; a place that can't be reached, found or read is `not_checked`. The check level follows the start condition (a new session is level 3), and the engine holds no application words | PR [#2500](https://github.com/OpenAdaptAI/OpenAdapt/pull/2500), not yet used by a runner | Unit tests and the fail-open harness (synthetic readings only) | `openadapt_flow/effect_location/`, [EFFECT_LOCATION.md](packages/flow/docs/EFFECT_LOCATION.md) | | Judge any executor's write, including an agent's or a script's, from the system of record | Released | Synthetic | `openadapt-flow verify-run`, [VERIFY_RUN.md](packages/flow/docs/VERIFY_RUN.md) | | Judge an "ensure the record exists" write (found, created once with every value, or needs review) through a FHIR server's read path only: searches, AuditEvent and `_history`, never the database; the coverage claim names that read path. An agent's own correction of the record it created counts as one write when the audit trail and history show only that agent, no other reader, and the same record in every version | Released ([#1640](https://github.com/OpenAdaptAI/OpenAdapt/pull/1640), corrections [#1655](https://github.com/OpenAdaptAI/OpenAdapt/pull/1655)) | Real app (Medplum 5.2.8; three blind fault suites: 17/18, 17/20, 19/20; no fault passed in the last two. Corrections, on 15 blind cases and the 37 public ones: false stops 8 to 2 and 9 to 4 for Claude, no harm passed that the old rule caught) | `openadapt_flow/ensure_record.py`, [ENSURE_RECORD.md](packages/flow/docs/ENSURE_RECORD.md) | @@ -234,6 +235,7 @@ improvising or retrying when something is off. | Propose an undo for each saving step (another recording, captured traffic, or the old value), keep it only if a test copy shows every record restored, and offer it after a stop once a person approves it | Released ([#1346](https://github.com/OpenAdaptAI/OpenAdapt/pull/1346)) | Synthetic (MockMed, MockLoan, live browser) | `openadapt-flow undo propose`, `undo accept`; [AFTER_A_STOP.md](packages/flow/docs/AFTER_A_STOP.md) | | Roll a stopped run back on its own: the approved compensation for each change, latest first, an uncertain write only when a fresh read shows it landed, then a read of the whole database: every row the run touched back as it was and nothing else changed (`ROLLED_BACK`), or the exact rows a person repairs (`RECONCILIATION_REQUIRED`). A compensation runs only while every change in the store is positively the run's own by the app's audit log, so another user's work is never compensated away, and a hard delete runs only where the deployment allows it (void, restore or discard otherwise). `rollback qualify` stops the run before and after every save on a test copy and keeps only compensations that restore the whole store. On a desktop or remote-display backend a screen compensation runs only after the run's and the compensation's start screens are checked on the same backend | On main ([#1634](https://github.com/OpenAdaptAI/OpenAdapt/pull/1634)); desktop in [#1771](https://github.com/OpenAdaptAI/OpenAdapt/pull/1771) | MockMed, live browser through the CLI; SQLite whole-database tests (web and desktop paths) | `openadapt-flow rollback qualify`, `rollback:` in deployment.yaml; [ROLLBACK.md](packages/flow/docs/ROLLBACK.md) | | Leave the screen clean after an item that halted before any write: close dialogs and cancel forms with the recordings' own controls, re-enter, confirm the start screen and read the records back before the session takes another item. A session that doesn't come back is marked dirty and takes no more items; a cleanup that changed a record makes the item's write uncertain and stops the run. `cleanup qualify` tries the cleanup after every step on a test copy and refuses one that changes a record | Released ([#1607](https://github.com/OpenAdaptAI/OpenAdapt/pull/1607)) | Synthetic (scripted three-screen app through the real replayer and pool) and real app (pinned OpenEMR: a halted New Patient item left the confirmation dialog open; re-entry closed it, the form was empty, no patient row changed and the next item's first steps ran with no model calls; a signed-out screen was marked dirty; [results](packages/flow/benchmark/halt_cleanup/results/openemr.json)) | `openadapt-flow cleanup qualify`; [HALT_CLEANUP.md](packages/flow/docs/HALT_CLEANUP.md) | +| Commit-boundary kernel, an optional alpha extra: `pip install 'openadapt[kernel]'` adds `openadapt kernel` (or install `openadapt-kernel` alone for its own command), an experimental runtime with shadow, draft and autopilot modes and signed receipts that does not depend on `openadapt-flow`. `pip install openadapt` leaves it out, and the extra is capped below the next minor version because its API may change before 1.0 | On main | Synthetic (its own suite, headless Chromium tests included, runs in the required `ci` check on every kernel change) | [packages/kernel](packages/kernel/README.md) | ## Approvals @@ -334,6 +336,7 @@ improvising or retrying when something is off. | Self-repair's new clicks outside a browser: on a native app a click is admitted by its accessibility element (role, name, ancestry, window; unique in the pinned window), on pixels only by the record check, and either way only when a system-of-record verifier covers every save under `standard` or `regulated`; the new step carries the dialog around it as a screen pre-check, and only a person approves the fix | On main ([#1709](https://github.com/OpenAdaptAI/OpenAdapt/pull/1709)) | Synthetic, partly live: on OpenAdapt's native Cocoa test app with SQLite, through live macOS AX, the stop, the element identity read, the admission and the refusals without a record check ran with no wrong write; qualified end to end on macOS AX ([#1715](https://github.com/OpenAdaptAI/OpenAdapt/pull/1715)): stop, admitted click, probe, replay and fault campaigns, one approval, resumed run `VERIFIED`; and on its GTK3 counterpart through live Linux AT-SPI, in CI, the same end to end. `run --self-repair` and repair by default start the app for each probe from `repair.session` ([#1717](https://github.com/OpenAdaptAI/OpenAdapt/pull/1717); [benchmark/repair_every_backend](packages/flow/benchmark/repair_every_backend/README.md)) | `openadapt_flow/repair/element_identity.py`, [REPAIR_ON_EVERY_BACKEND.md](packages/flow/docs/REPAIR_ON_EVERY_BACKEND.md) | | Keep pixel-path runs working across display scaling and font smoothing changes | Released ([#1286](https://github.com/OpenAdaptAI/OpenAdapt/pull/1286)) | Synthetic (in-process RDP and canvas renderings: 17 of 24 healthy runs across 100–175%, up from 3; 0 wrong saves) | [benchmark/pixel_scale](packages/flow/benchmark/pixel_scale/README.md) | | Find icons again on Citrix, RDP and VNC after a display-scale, zoom, font, theme or codec change, with a local model that counts look-alikes and stops on a tie (`--local-grounding`, off by default) | Released ([#1596](https://github.com/OpenAdaptAI/OpenAdapt/pull/1596)) | Synthetic (Chromium-drawn clinic screen, pixels only: icons found under 21 of 26 conditions, template matching 8; 0 wrong targets in 65; whole runs unchanged, 4 of 39 in both arms, because the layout, identity and census checks stop first). Held out on real AVC444 RDP frames: 0 wrong picks, 6 right, 75 abstentions in 81 | [benchmark/pixel_grounding](packages/flow/benchmark/pixel_grounding/README.md), `runtime/local_grounder.py` | +| Find an icon-only click target again after a light/dark theme change on Citrix, RDP and VNC, by edge orientation with the sign removed, refusing when another place on the screen scores close, the match is away from the recorded place, or the clicked control itself differs | In a pull request ([#2790](https://github.com/OpenAdaptAI/OpenAdapt/pull/2790)) | Synthetic (Chromium-drawn clinic screen, pixels only, recorded light and replayed dark at 100% and 150%: whole runs 8 of 13 healthy and 7 of 13 reordered, up from 6 and 5; wrong-record runs 13 of 13 stopped; 0 wrong targets or wrong saves) | [benchmark/pixel_grounding](packages/flow/benchmark/pixel_grounding/README.md#whole-runs), `vision/polarity_match.py` | | Pre-approved repairs: a signed policy lists low-risk changes that apply without a person, a test-record run before each queue, and one approval for every item halted the same way | Released ([#1294](https://github.com/OpenAdaptAI/OpenAdapt/pull/1294)) | Synthetic | standard changes | | Repair a pinned bundle: the fix runs the pinned bundle's own qualification campaign on a test copy, keeps every write, effect, identity rule and record check, and is re-admitted with signed lineage (at most three repairs, no revoked key) that the pin verifies | On main | Synthetic | [SELF_REPAIR.md](packages/flow/docs/SELF_REPAIR.md#a-pinned-bundle-re-qualify-and-re-admit) | | Repair by default: once a repair agent is configured (outside a browser, with `repair.session`, [#1717](https://github.com/OpenAdaptAI/OpenAdapt/pull/1717)), every stop that wrote nothing goes to it without anyone starting it; a stop after a possible write goes to reconciliation; every stop is a row in a ledger with the funnel from stop to resumed item | Released ([#1360](https://github.com/OpenAdaptAI/OpenAdapt/pull/1360)) | Synthetic (MockMed, 22 drift modes, real Claude agent: 6 of 21 repairable stops resumed and verified, 0 wrong saves in 66 runs); routing over recorded OpenEMR stops; live openIMIS relabel: 3 of 3 reached repair and stopped with no wrong save; silent-saves 1.1.0 UI-change blocks: 18 of 28 items that always stopped now correct, 0 wrong | `run` (on by default, `--no-auto-repair`), `repair:` in `deploy.yaml`, [benchmark/auto_repair](packages/flow/benchmark/auto_repair/README.md) | @@ -355,7 +358,7 @@ improvising or retrying when something is off. | Admit a draft by a person, an admitter key, or an agent under a person-signed policy, including self-admission when the policy allows it | Released | Unit tests | [JIT_ADMISSION.md](packages/flow/docs/JIT_ADMISSION.md) | | MCP server: your agent decides what to enter, OpenAdapt makes the entry and checks it | Released | Synthetic sandbox | `openadapt-agent`, [packages/agent](packages/agent/README.md) | | Agent-to-agent handoffs: when one agent hands a result to another, the run's signed receipt (`record/run/v1`) goes with it (`openadapt handoff send`, inline, detached beside a file, or POSTed to a webhook), and the receiver checks it against keys it pins (`openadapt handoff verify`). The verdict gives the signer role from the receiver's registry, integrity, checks passed and not checked, and "confirmed in the other party's system" lines; it always says a valid signature proves who signed, not that the claim is true, binds the payload as the receipt's `payload` subject (re-signed by the run's own key; other bytes or no payload subject are refused), and counts a confirmation as independent only when it was read from the other party's system. Over MCP, `serve --handoffs` adds `get_handoff` and `verify_handoff`. The private openings never travel | On main ([#2414](https://github.com/OpenAdaptAI/OpenAdapt/pull/2414)) | Unit tests over receipts from Flow's own writer and the shared `record/run/v1` confirmation vectors and the shared payload vectors (good, tampered, unknown signer, bound, mismatched and missing payload, detached file, local webhook); MCP and A2A end to end with the stubbed run process; a two-party test of 20 handoffs over HTTP (0 false accepts, 0 true rejects); one real headless MockMed run handed off over the CLI and checked against the receiver's own record ([benchmark/handoff_real_run](packages/flow/benchmark/handoff_real_run/README.md)); `--ledger` tested against #2415's `HandoffLedger` | `openadapt handoff`, `openadapt_flow/handoff.py`, [HANDOFFS.md](packages/flow/docs/HANDOFFS.md), draft format [HANDOFF_RECEIPTS.md](packages/flow/docs/HANDOFF_RECEIPTS.md) | -| A2A (Agent2Agent) protocol adapter: `openadapt agent serve --a2a` serves compiled workflows as A2A 1.0 skills with the official `a2a-sdk` (`openadapt[a2a]`): Agent Card at `/.well-known/agent-card.json`, JSON-RPC and HTTP+JSON, runs as tasks with status updates, the run's receipt as a handoff artifact when Flow wrote one (sandbox and strict at-rest runs have none), a `verify_handoff` skill, and the draft extension `https://openadapt.ai/extensions/handoff-receipt/v1`. Every call passes the MCP server's gate; person confirmations are not served; only `done` is completed. Loopback by default, a bearer token anywhere else, browser `Origin` and unknown `Host` refused | On main ([#2414](https://github.com/OpenAdaptAI/OpenAdapt/pull/2414)) | Synthetic: the official `a2a-sdk` 1.3.1 client against the server over HTTP on 127.0.0.1, with a governed run whose Flow process is stubbed and whose receipt Flow's writer signs; the official A2A TCK (a2aproject/a2a-tck at 5e6f37c): 110 automated checks passed and 11 failed, MUST 76.0%. The failures are 10 SDK-scenario tests that expect the TCK's own scripted agent, and the SDK's error Content-Type ([benchmark/a2a_tck](packages/flow/benchmark/a2a_tck/README.md)) | `openadapt_flow/agent/a2a_server.py`, [A2A.md](packages/flow/docs/A2A.md) | +| A2A (Agent2Agent) protocol adapter: `openadapt agent serve --a2a` serves compiled workflows as A2A 1.0 skills with the official `a2a-sdk` (`openadapt[a2a]`): Agent Card at `/.well-known/agent-card.json`, signed (A2A 1.0 section 8.4, EdDSA JWS by the Seal key that signs receipts; no server if the key can't be opened), JSON-RPC and HTTP+JSON, runs as tasks with status updates, the run's receipt as a handoff artifact when Flow wrote one (sandbox and strict at-rest runs have none), a `verify_handoff` skill, and the draft extension `https://openadapt.ai/extensions/handoff-receipt/v1`. Every call passes the MCP server's gate; person confirmations are not served; only `done` is completed. Loopback by default, a bearer token anywhere else, browser `Origin` and unknown `Host` refused | On main ([#2414](https://github.com/OpenAdaptAI/OpenAdapt/pull/2414)) | Synthetic: the official `a2a-sdk` 1.3.1 client against the server over HTTP on 127.0.0.1, with a governed run whose Flow process is stubbed and whose receipt Flow's writer signs; the official A2A TCK (a2aproject/a2a-tck at 5e6f37c): 110 automated checks passed and 11 failed, MUST 76.0%. The failures are 10 SDK-scenario tests that expect the TCK's own scripted agent, and the SDK's error Content-Type ([benchmark/a2a_tck](packages/flow/benchmark/a2a_tck/README.md)); the card signature verified by the `a2a-sdk` verifier and refused when changed, unpinned or relabelled (the TCK leaves signing to manual checks) | `openadapt_flow/agent/a2a_server.py`, [A2A.md](packages/flow/docs/A2A.md) | | Teach over MCP: an agent does a new task once through OpenAdapt; the run is read back, compiled and admitted (a person confirms the record check; the agent admits only under a person-signed policy), and becomes a tool it calls with no model calls. Web, and Windows, macOS, Linux, RDP and Citrix with a person approving each save | On main ([#1335](https://github.com/OpenAdaptAI/OpenAdapt/pull/1335)) | Synthetic (MockMed over MCP, and through the real RDP and Citrix backends); a native Cocoa app with SQLite through `MacOSBackend`, taught, confirmed, admitted under a signed policy and called (canary and taught run `VERIFIED`, 0 model calls; [teach_desktop](packages/flow/benchmark/teach_desktop/README.md)) | `openadapt-agent serve --teach`, [packages/agent](packages/agent/README.md#teach-a-new-workflow-from-your-agent) | | Turn a read-only browser task into a tool for the coding agent you already use: `openadapt setup` registers the MCP server and a skill in Claude Code, Cursor, Codex and Gemini CLI (idempotent, `--dry-run`, `--undo`); `openadapt setup --app deploy.yaml --verify verify.yaml` sets the agent up to teach saves in one web, desktop, RDP or Citrix app instead, each read back from the system of record. Read-only teaching runs only where a guard stops writes before they leave (the browser); `serve --teach-browser --config` naming a desktop, RDP or Citrix app is refused; the agent does the task once through `teach_start`/`teach_act`/`teach_finish`, the task must end in a download, the file is checked (columns, a column between two inputs or equal to one, fewest rows), the compiled steps are replayed once with no model, and the agent gets a `taught_` tool that downloads a checked file with new inputs. The browser sends no POST, PUT, PATCH or DELETE and stays on one site; a compiled run stops when a control is missing, matches more than one element, or is relabelled | Released ([#1502](https://github.com/OpenAdaptAI/OpenAdapt/pull/1502)) | Real headless Chromium on the local example portal (scripted MCP client, in CI); a real Claude Code agent taught the export from the guide's prompt and called the tool with new dates (2026-10-24, one run) | `openadapt setup`, `openadapt-agent serve --teach-browser`, [FIRST_TOOL.md](packages/flow/docs/FIRST_TOOL.md) | | Verify any agent's own writes: `openadapt verify` reads the system of record before and after a write, against a contract the operator owns (REST, FHIR, SQL, GraphQL), and returns a verified receipt (`openadapt.effect-receipt/v1`) or a refusal (`REFUTED`, `UNCERTAIN`), never an unverified success. Python SDK (`openadapt.verify`, which is `openadapt_flow.verifier`: `begin_write`, `verify_write`, `verified_write`) wraps a write in any agent framework; the MCP server (`openadapt verify serve`) offers `verify_begin`, `verify_check` and `verify_recheck` to any MCP client | Released ([#1589](https://github.com/OpenAdaptAI/OpenAdapt/pull/1589)) | Synthetic (MockMed's fault server over real HTTP: correct write, wrong record, not saved, saved twice, unreadable store) | `openadapt verify`, [VERIFY_WRITES.md](packages/flow/docs/VERIFY_WRITES.md) | @@ -406,6 +409,7 @@ improvising or retrying when something is off. | Offline Seals signed with a key the customer holds: a key file, the OS keychain, or a PKCS#11 token or HSM; pinned keys with rotation and revocation; no fallback to a generated key | On main ([#1392](https://github.com/OpenAdaptAI/OpenAdapt/pull/1392)) | Unit tests with synthetic data (keychain and PKCS#11 through stand-ins) | `openadapt-flow local-seal --key`, `local-seal key create`, `pin`, `revoke`; `openadapt seal verify FOLDER` checks every sealed run in a folder; [OFFLINE_SEALS.md](packages/flow/docs/OFFLINE_SEALS.md#customer-held-keys) | | Anchor an offline Seal in the public Sigstore Rekor transparency log (opt-in; sends one digest and the public key), and verify the anchor offline from the stored inclusion proof | Released ([#1394](https://github.com/OpenAdaptAI/OpenAdapt/pull/1394)) | Unit tests against a simulated Rekor log; real public Rekor entries and Sigstore TSA tokens for the landing demo's referral runs, verified offline in tests; Ed25519ph matches the RFC 8032 test vector | `openadapt-flow local-seal anchor`, `local-seal verify --require-anchor`; [OFFLINE_SEALS.md](packages/flow/docs/OFFLINE_SEALS.md#optional-anchor-a-seal-in-a-public-transparency-log) | | Signed write receipts: a verifier verdict with its scope (stores read, window, strength) and a plain not-checked list, signed as a COSE_Sign1 (IETF SCITT shape) and logged in a local Merkle transparency log; checked offline against pinned keys; a receipt that claims more than its scope is neither issued nor accepted; optional Rekor anchor | On main | Unit tests on the real verifier (SQLite) and shadow proxy; COSE checked through python-cwt | `openadapt-flow receipt verify`, `receipt keys export`, `receipt anchor`; `verify_write(..., write_receipt=True)`; `shadow --receipts`; [WRITE_RECEIPTS.md](packages/flow/docs/WRITE_RECEIPTS.md) | +| Python `openadapt.wrap` receipts signed with this computer's `openadapt trust init` key by default (or `signing_key=`), naming the key by id and fingerprint; with no key a receipt says `digest_only` and `signed: false`, and `wrap` never creates a key. `verify_wrap_receipt` and `openadapt verify` accept a receipt only when its signature verifies against a key you pinned, never the key the receipt carries; an unknown signer or a digest-only receipt is not verified. A plain `check=` callable is recorded as `caller_check`, and a check can't raise its own `checked_how` | On main | Unit tests with real Ed25519 keys: an unsigned receipt with a recomputed digest and a receipt signed by its own embedded key both fail, through the SDK and `openadapt verify` | `openadapt.wrap`, `openadapt.verify_wrap_receipt`, `openadapt verify FILE [--keys FILE]`, `openadapt trust init` | | Per-run accounting ledger for any executor (an OpenAdapt agent, a compiled program, another agent, a person): one value-free row per run with the outcome (VERIFIED, ESCALATED, CAUGHT_ERROR, FAILED, UNKNOWN) and a closed reason, a person's minutes from approval, question, exception and second-factor intervals, model calls and cost (unknown is null, never zero), field names with their checks, and the read-back tier; values only in a local 0600 sidecar; collected from the files guard, verify-run, compiled runs, wrap, item approvals and compile-agent already write, plus readiness shadow runs, guard ledger rows, P7 fallback results and P6 exception answers; a person's decline is ESCALATED, not a caught error | On main | Unit tests with synthetic data: the outcome rule as a table over every engine outcome enum, fixtures for each source (copies of the shadow, guarded-save, fallback and exception files from a synthetic MockMed end-to-end run), the real commit guard against MockMed's fault server end to end, exports scanned for every fixture value and checked with the real Presidio scrubber, push payloads validated against the JSON Schema, push refused with no key | `openadapt-flow ledger add`, `list`, `show`, `summary`, `export`, `push`; [RUN_LEDGER.md](packages/flow/docs/RUN_LEDGER.md) | | See a run's Seal offline: one HTML page that checks the Ed25519 signature over the run's exact report in the browser, draws the Seal from it, replays the run over its program map, and lets the reader tamper with a copy; no network requests; the quickstart ends on the person's own. One screen: map left, Seal and verdict top right, Summary, Steps, Evidence and Raw tabs; light and dark | On main ([#1566](https://github.com/OpenAdaptAI/OpenAdapt/pull/1566)) | A real quickstart run's Seal opened from `file://` in Chromium (valid, tampered, no requests; a link to one step, keyboard tabs and steps, theme switch, phone layout); RFC 8032 test vectors; a published OpenEMR Seal's Rekor entry and timestamp | `openadapt seal view RUN_DIR`; `openadapt quickstart`; [`@openadapt/seal-view`](packages/seal-view/README.md) | | Sign in to OpenAdapt Cloud from the terminal: `openadapt login` with no token prints a sign-in link (opened only with `--open`), listens on 127.0.0.1 for the browser's redirect, and redeems Cloud's one-use code with an S256 PKCE verifier that never leaves the process. A first-time user gets a workspace on the way. The credential goes to the OS keychain entry `push` and `report-run` read; a stored token is re-validated as before, and `--token` and `--no-browser` keep the token path | On main | Unit tests with a real loopback listener (state mismatch, refusal, malformed code, timeout, browser opened only on request); end to end against Cloud's `/auth/loopback` and pairing routes in mock mode, both Connect and Cancel | `openadapt login`; [browser_login.py](packages/flow/openadapt_flow/browser_login.py) | diff --git a/capabilities/10-computer-use-agents/0070-a2a-agent2agent-protocol-adapter-openadapt-agent.md b/capabilities/10-computer-use-agents/0070-a2a-agent2agent-protocol-adapter-openadapt-agent.md index f2f3ee77a0..1677e9a0d2 100644 --- a/capabilities/10-computer-use-agents/0070-a2a-agent2agent-protocol-adapter-openadapt-agent.md +++ b/capabilities/10-computer-use-agents/0070-a2a-agent2agent-protocol-adapter-openadapt-agent.md @@ -1 +1 @@ -| A2A (Agent2Agent) protocol adapter: `openadapt agent serve --a2a` serves compiled workflows as A2A 1.0 skills with the official `a2a-sdk` (`openadapt[a2a]`): Agent Card at `/.well-known/agent-card.json`, JSON-RPC and HTTP+JSON, runs as tasks with status updates, the run's receipt as a handoff artifact when Flow wrote one (sandbox and strict at-rest runs have none), a `verify_handoff` skill, and the draft extension `https://openadapt.ai/extensions/handoff-receipt/v1`. Every call passes the MCP server's gate; person confirmations are not served; only `done` is completed. Loopback by default, a bearer token anywhere else, browser `Origin` and unknown `Host` refused | On main ([#2414](https://github.com/OpenAdaptAI/OpenAdapt/pull/2414)) | Synthetic: the official `a2a-sdk` 1.3.1 client against the server over HTTP on 127.0.0.1, with a governed run whose Flow process is stubbed and whose receipt Flow's writer signs; the official A2A TCK (a2aproject/a2a-tck at 5e6f37c): 110 automated checks passed and 11 failed, MUST 76.0%. The failures are 10 SDK-scenario tests that expect the TCK's own scripted agent, and the SDK's error Content-Type ([benchmark/a2a_tck](packages/flow/benchmark/a2a_tck/README.md)) | `openadapt_flow/agent/a2a_server.py`, [A2A.md](packages/flow/docs/A2A.md) | +| A2A (Agent2Agent) protocol adapter: `openadapt agent serve --a2a` serves compiled workflows as A2A 1.0 skills with the official `a2a-sdk` (`openadapt[a2a]`): Agent Card at `/.well-known/agent-card.json`, signed (A2A 1.0 section 8.4, EdDSA JWS by the Seal key that signs receipts; no server if the key can't be opened), JSON-RPC and HTTP+JSON, runs as tasks with status updates, the run's receipt as a handoff artifact when Flow wrote one (sandbox and strict at-rest runs have none), a `verify_handoff` skill, and the draft extension `https://openadapt.ai/extensions/handoff-receipt/v1`. Every call passes the MCP server's gate; person confirmations are not served; only `done` is completed. Loopback by default, a bearer token anywhere else, browser `Origin` and unknown `Host` refused | On main ([#2414](https://github.com/OpenAdaptAI/OpenAdapt/pull/2414)) | Synthetic: the official `a2a-sdk` 1.3.1 client against the server over HTTP on 127.0.0.1, with a governed run whose Flow process is stubbed and whose receipt Flow's writer signs; the official A2A TCK (a2aproject/a2a-tck at 5e6f37c): 110 automated checks passed and 11 failed, MUST 76.0%. The failures are 10 SDK-scenario tests that expect the TCK's own scripted agent, and the SDK's error Content-Type ([benchmark/a2a_tck](packages/flow/benchmark/a2a_tck/README.md)); the card signature verified by the `a2a-sdk` verifier and refused when changed, unpinned or relabelled (the TCK leaves signing to manual checks) | `openadapt_flow/agent/a2a_server.py`, [A2A.md](packages/flow/docs/A2A.md) | diff --git a/capabilities/CAPABILITIES.md.sha256 b/capabilities/CAPABILITIES.md.sha256 index b178c64d02..de5058ce54 100644 --- a/capabilities/CAPABILITIES.md.sha256 +++ b/capabilities/CAPABILITIES.md.sha256 @@ -1 +1 @@ -6b0c7d386eb68b516766993b4afb1ffe6a0ea4461851850db38a845a47648b81 +b33f68de0af85a75b4c1dc96f0fe9520ac8adac45255c1b8b34c835ba71eedbf diff --git a/llms-full.txt b/llms-full.txt index 128c26753b..bbfb1dc5e6 100644 --- a/llms-full.txt +++ b/llms-full.txt @@ -120,7 +120,7 @@ Full methodology, benchmark tables, and verifiable raw runs: **[openadapt.ai/pro | Package | Role | Source | |---|---|---| | [`openadapt`](https://pypi.org/project/openadapt/) | Unified CLI (`quickstart`, `wrap`, `connect`, `record`, `compile`, `run`, `verify`, `kernel`, `agent`, `mcpify`) | [`openadapt/`](https://github.com/OpenAdaptAI/OpenAdapt/tree/main/openadapt) | -| [`openadapt-kernel`](https://github.com/OpenAdaptAI/OpenAdapt/tree/main/packages/kernel) | Commit-boundary kernel: default-deny write ledger, wire/DOM commit interceptor, stepwise live-DOM healer, cross-rail oracles, Ed25519 receipts, stdio MCP | [`packages/kernel/`](https://github.com/OpenAdaptAI/OpenAdapt/tree/main/packages/kernel) | +| [`openadapt-kernel`](https://github.com/OpenAdaptAI/OpenAdapt/tree/main/packages/kernel) | Optional alpha extra (`pip install 'openadapt[kernel]'`). Commit-boundary kernel: default-deny write ledger, wire/DOM commit interceptor, stepwise live-DOM healer, cross-rail oracles, Ed25519 receipts, stdio MCP | [`packages/kernel/`](https://github.com/OpenAdaptAI/OpenAdapt/tree/main/packages/kernel) | | [`openadapt-flow`](https://pypi.org/project/openadapt-flow/) | Demonstration compiler, certification, qualification, governed replay, auto-repair, and BYOC connector | [`packages/flow/`](https://github.com/OpenAdaptAI/OpenAdapt/tree/main/packages/flow) | | [`openadapt-agent`](https://pypi.org/project/openadapt-agent/) | MCP server, Agent Skills export, and A2A handoffs | [`packages/agent/`](https://github.com/OpenAdaptAI/OpenAdapt/tree/main/packages/agent) | | [`openadapt-verify`](https://pypi.org/project/openadapt-verify/) | Standalone Python SDK (`@verified`, `checked_write`, local JIT compiler, `mcpify`) | [`packages/verify/`](https://github.com/OpenAdaptAI/OpenAdapt/tree/main/packages/verify) | @@ -347,6 +347,7 @@ improvising or retrying when something is off. | One check-level scale, 0 to 5, from "unchecked" to "counterparty confirmed" | Released | Unit tests | `openadapt_flow/check_level.py` | | One receipt word per check, the same on every path: `VERIFIED` only at level 3 (a separate session) or 4 (the system of record), always with the basis that produced the evidence (`separate_session`, `system_api`, `activity_log`, `db_frame` or `owned_connection`); `SHOWN` for an acting-screen re-read, `CONFIRMED` for the counterparty, `ATTESTED` for an operator and `RECORDED` for the rest. `VERIFIED` means "as of the read-back time the read-back showed this value", not "persisted". Run receipts (`record/run/v1`, an additive optional field), `verify-run` receipts and `tx` receipts carry an evidence-scope block: level, basis, word, the wire channel watched, the read-back time, the recheck window, and what it did not cover (always server-side async and outbound effects; a run receipt says it has no per-read time). A run receipt never says `VERIFIED` below level 3. Receipts without the block still verify. A `verify-run` contract with `minimum_effect_strength: independent_session` now verifies on a separate-session read | On main | Unit tests (parity across the runtime report, `verify-run`, `tx` and Execute v1; fake verifiers) | `openadapt_types/check_level.py`, `openadapt_types/evidence_scope.py`, `openadapt_flow/evidence_basis.py` | | Grade a file, PDF or email check by who produced it: a file the acting session wrote or downloaded, or one with no declared producer, is at most `same_screen`; one a separate session fetched is at most `separate_session`; only a declared `system_of_record` producer reaches `system_of_record`. A store that overlaps the acting session's folders (named ones, the user's Downloads, a Playwright download folder) is graded as the acting session's whatever is declared. Under a strong declared producer, a scan that reads a file in a browser download folder beneath the store, or a symlink out of it, is refused as INDETERMINATE. The verdict's `read_evidence.provenance` names the producer and whether it was declared or observed | On main | Unit tests through each of the four readers (mixed store, symlink, system-owned positive case); a PDF downloaded by headless Chromium from a loopback app, the same bytes from a separate browser context and from the app's store, and a headless download landing beneath a broader store | `runtime/effects/artifact_provenance.py`, `effects.artifact_producer`, `packages/flow/tests/test_effect_artifact_provenance.py` | +| One strict matcher decides whether text on a screen or page proves a value or a commit: `MATCH`, `MISMATCH` or `AMBIGUOUS`, and only `MATCH` passes. A value must be bound to its label at the start of its field, with nothing but unit words beside it, or be the whole field. A value merely found on the page, inside a longer token (`250` in `$1,250.00`, `John Smith` in `John Smith-Jones`), or under a label with two values never passes. A commit phrase must be new, plainly stated, and not next to a question, a negation or a control label. The launcher's transducer read-back and the kernel's read-back oracles use it; [the migration page](https://github.com/OpenAdaptAI/OpenAdapt/blob/main/packages/types/docs/evidence-migration.md) lists the callers that don't yet | On main | Adversarial corpus with pinned verdicts, Hypothesis properties, a parity test against Flow's read-back matcher, and strict expected-failure tests for each caller not yet migrated | `openadapt_types/evidence.py`, `openadapt/transducer_obligations.py`, `openadapt_kernel/oracles.py` | | Check a value where a careful person would look again: an effect location (`openadapt.effect-location/v1`) is pack data for one place an intended value shows (path and start condition, locator, expected value, codec, expected count, optional baseline). One summary row can cover two values ("Name (DOB)"), and a date can be split over three fields. Every planned value is `held`, `refuted` or `not_checked`; a place that can't be reached, found or read is `not_checked`. The check level follows the start condition (a new session is level 3), and the engine holds no application words | PR [#2500](https://github.com/OpenAdaptAI/OpenAdapt/pull/2500), not yet used by a runner | Unit tests and the fail-open harness (synthetic readings only) | `openadapt_flow/effect_location/`, [EFFECT_LOCATION.md](https://github.com/OpenAdaptAI/OpenAdapt/blob/main/packages/flow/docs/EFFECT_LOCATION.md) | | Judge any executor's write, including an agent's or a script's, from the system of record | Released | Synthetic | `openadapt-flow verify-run`, [VERIFY_RUN.md](https://github.com/OpenAdaptAI/OpenAdapt/blob/main/packages/flow/docs/VERIFY_RUN.md) | | Judge an "ensure the record exists" write (found, created once with every value, or needs review) through a FHIR server's read path only: searches, AuditEvent and `_history`, never the database; the coverage claim names that read path. An agent's own correction of the record it created counts as one write when the audit trail and history show only that agent, no other reader, and the same record in every version | Released ([#1640](https://github.com/OpenAdaptAI/OpenAdapt/pull/1640), corrections [#1655](https://github.com/OpenAdaptAI/OpenAdapt/pull/1655)) | Real app (Medplum 5.2.8; three blind fault suites: 17/18, 17/20, 19/20; no fault passed in the last two. Corrections, on 15 blind cases and the 37 public ones: false stops 8 to 2 and 9 to 4 for Claude, no harm passed that the old rule caught) | `openadapt_flow/ensure_record.py`, [ENSURE_RECORD.md](https://github.com/OpenAdaptAI/OpenAdapt/blob/main/packages/flow/docs/ENSURE_RECORD.md) | @@ -405,6 +406,7 @@ improvising or retrying when something is off. | Propose an undo for each saving step (another recording, captured traffic, or the old value), keep it only if a test copy shows every record restored, and offer it after a stop once a person approves it | Released ([#1346](https://github.com/OpenAdaptAI/OpenAdapt/pull/1346)) | Synthetic (MockMed, MockLoan, live browser) | `openadapt-flow undo propose`, `undo accept`; [AFTER_A_STOP.md](https://github.com/OpenAdaptAI/OpenAdapt/blob/main/packages/flow/docs/AFTER_A_STOP.md) | | Roll a stopped run back on its own: the approved compensation for each change, latest first, an uncertain write only when a fresh read shows it landed, then a read of the whole database: every row the run touched back as it was and nothing else changed (`ROLLED_BACK`), or the exact rows a person repairs (`RECONCILIATION_REQUIRED`). A compensation runs only while every change in the store is positively the run's own by the app's audit log, so another user's work is never compensated away, and a hard delete runs only where the deployment allows it (void, restore or discard otherwise). `rollback qualify` stops the run before and after every save on a test copy and keeps only compensations that restore the whole store. On a desktop or remote-display backend a screen compensation runs only after the run's and the compensation's start screens are checked on the same backend | On main ([#1634](https://github.com/OpenAdaptAI/OpenAdapt/pull/1634)); desktop in [#1771](https://github.com/OpenAdaptAI/OpenAdapt/pull/1771) | MockMed, live browser through the CLI; SQLite whole-database tests (web and desktop paths) | `openadapt-flow rollback qualify`, `rollback:` in deployment.yaml; [ROLLBACK.md](https://github.com/OpenAdaptAI/OpenAdapt/blob/main/packages/flow/docs/ROLLBACK.md) | | Leave the screen clean after an item that halted before any write: close dialogs and cancel forms with the recordings' own controls, re-enter, confirm the start screen and read the records back before the session takes another item. A session that doesn't come back is marked dirty and takes no more items; a cleanup that changed a record makes the item's write uncertain and stops the run. `cleanup qualify` tries the cleanup after every step on a test copy and refuses one that changes a record | Released ([#1607](https://github.com/OpenAdaptAI/OpenAdapt/pull/1607)) | Synthetic (scripted three-screen app through the real replayer and pool) and real app (pinned OpenEMR: a halted New Patient item left the confirmation dialog open; re-entry closed it, the form was empty, no patient row changed and the next item's first steps ran with no model calls; a signed-out screen was marked dirty; [results](https://github.com/OpenAdaptAI/OpenAdapt/blob/main/packages/flow/benchmark/halt_cleanup/results/openemr.json)) | `openadapt-flow cleanup qualify`; [HALT_CLEANUP.md](https://github.com/OpenAdaptAI/OpenAdapt/blob/main/packages/flow/docs/HALT_CLEANUP.md) | +| Commit-boundary kernel, an optional alpha extra: `pip install 'openadapt[kernel]'` adds `openadapt kernel` (or install `openadapt-kernel` alone for its own command), an experimental runtime with shadow, draft and autopilot modes and signed receipts that does not depend on `openadapt-flow`. `pip install openadapt` leaves it out, and the extra is capped below the next minor version because its API may change before 1.0 | On main | Synthetic (its own suite, headless Chromium tests included, runs in the required `ci` check on every kernel change) | [packages/kernel](https://github.com/OpenAdaptAI/OpenAdapt/blob/main/packages/kernel/README.md) | ## Approvals @@ -505,6 +507,7 @@ improvising or retrying when something is off. | Self-repair's new clicks outside a browser: on a native app a click is admitted by its accessibility element (role, name, ancestry, window; unique in the pinned window), on pixels only by the record check, and either way only when a system-of-record verifier covers every save under `standard` or `regulated`; the new step carries the dialog around it as a screen pre-check, and only a person approves the fix | On main ([#1709](https://github.com/OpenAdaptAI/OpenAdapt/pull/1709)) | Synthetic, partly live: on OpenAdapt's native Cocoa test app with SQLite, through live macOS AX, the stop, the element identity read, the admission and the refusals without a record check ran with no wrong write; qualified end to end on macOS AX ([#1715](https://github.com/OpenAdaptAI/OpenAdapt/pull/1715)): stop, admitted click, probe, replay and fault campaigns, one approval, resumed run `VERIFIED`; and on its GTK3 counterpart through live Linux AT-SPI, in CI, the same end to end. `run --self-repair` and repair by default start the app for each probe from `repair.session` ([#1717](https://github.com/OpenAdaptAI/OpenAdapt/pull/1717); [benchmark/repair_every_backend](https://github.com/OpenAdaptAI/OpenAdapt/blob/main/packages/flow/benchmark/repair_every_backend/README.md)) | `openadapt_flow/repair/element_identity.py`, [REPAIR_ON_EVERY_BACKEND.md](https://github.com/OpenAdaptAI/OpenAdapt/blob/main/packages/flow/docs/REPAIR_ON_EVERY_BACKEND.md) | | Keep pixel-path runs working across display scaling and font smoothing changes | Released ([#1286](https://github.com/OpenAdaptAI/OpenAdapt/pull/1286)) | Synthetic (in-process RDP and canvas renderings: 17 of 24 healthy runs across 100–175%, up from 3; 0 wrong saves) | [benchmark/pixel_scale](https://github.com/OpenAdaptAI/OpenAdapt/blob/main/packages/flow/benchmark/pixel_scale/README.md) | | Find icons again on Citrix, RDP and VNC after a display-scale, zoom, font, theme or codec change, with a local model that counts look-alikes and stops on a tie (`--local-grounding`, off by default) | Released ([#1596](https://github.com/OpenAdaptAI/OpenAdapt/pull/1596)) | Synthetic (Chromium-drawn clinic screen, pixels only: icons found under 21 of 26 conditions, template matching 8; 0 wrong targets in 65; whole runs unchanged, 4 of 39 in both arms, because the layout, identity and census checks stop first). Held out on real AVC444 RDP frames: 0 wrong picks, 6 right, 75 abstentions in 81 | [benchmark/pixel_grounding](https://github.com/OpenAdaptAI/OpenAdapt/blob/main/packages/flow/benchmark/pixel_grounding/README.md), `runtime/local_grounder.py` | +| Find an icon-only click target again after a light/dark theme change on Citrix, RDP and VNC, by edge orientation with the sign removed, refusing when another place on the screen scores close, the match is away from the recorded place, or the clicked control itself differs | In a pull request ([#2790](https://github.com/OpenAdaptAI/OpenAdapt/pull/2790)) | Synthetic (Chromium-drawn clinic screen, pixels only, recorded light and replayed dark at 100% and 150%: whole runs 8 of 13 healthy and 7 of 13 reordered, up from 6 and 5; wrong-record runs 13 of 13 stopped; 0 wrong targets or wrong saves) | [benchmark/pixel_grounding](https://github.com/OpenAdaptAI/OpenAdapt/blob/main/packages/flow/benchmark/pixel_grounding/README.md#whole-runs), `vision/polarity_match.py` | | Pre-approved repairs: a signed policy lists low-risk changes that apply without a person, a test-record run before each queue, and one approval for every item halted the same way | Released ([#1294](https://github.com/OpenAdaptAI/OpenAdapt/pull/1294)) | Synthetic | standard changes | | Repair a pinned bundle: the fix runs the pinned bundle's own qualification campaign on a test copy, keeps every write, effect, identity rule and record check, and is re-admitted with signed lineage (at most three repairs, no revoked key) that the pin verifies | On main | Synthetic | [SELF_REPAIR.md](https://github.com/OpenAdaptAI/OpenAdapt/blob/main/packages/flow/docs/SELF_REPAIR.md#a-pinned-bundle-re-qualify-and-re-admit) | | Repair by default: once a repair agent is configured (outside a browser, with `repair.session`, [#1717](https://github.com/OpenAdaptAI/OpenAdapt/pull/1717)), every stop that wrote nothing goes to it without anyone starting it; a stop after a possible write goes to reconciliation; every stop is a row in a ledger with the funnel from stop to resumed item | Released ([#1360](https://github.com/OpenAdaptAI/OpenAdapt/pull/1360)) | Synthetic (MockMed, 22 drift modes, real Claude agent: 6 of 21 repairable stops resumed and verified, 0 wrong saves in 66 runs); routing over recorded OpenEMR stops; live openIMIS relabel: 3 of 3 reached repair and stopped with no wrong save; silent-saves 1.1.0 UI-change blocks: 18 of 28 items that always stopped now correct, 0 wrong | `run` (on by default, `--no-auto-repair`), `repair:` in `deploy.yaml`, [benchmark/auto_repair](https://github.com/OpenAdaptAI/OpenAdapt/blob/main/packages/flow/benchmark/auto_repair/README.md) | @@ -526,7 +529,7 @@ improvising or retrying when something is off. | Admit a draft by a person, an admitter key, or an agent under a person-signed policy, including self-admission when the policy allows it | Released | Unit tests | [JIT_ADMISSION.md](https://github.com/OpenAdaptAI/OpenAdapt/blob/main/packages/flow/docs/JIT_ADMISSION.md) | | MCP server: your agent decides what to enter, OpenAdapt makes the entry and checks it | Released | Synthetic sandbox | `openadapt-agent`, [packages/agent](https://github.com/OpenAdaptAI/OpenAdapt/blob/main/packages/agent/README.md) | | Agent-to-agent handoffs: when one agent hands a result to another, the run's signed receipt (`record/run/v1`) goes with it (`openadapt handoff send`, inline, detached beside a file, or POSTed to a webhook), and the receiver checks it against keys it pins (`openadapt handoff verify`). The verdict gives the signer role from the receiver's registry, integrity, checks passed and not checked, and "confirmed in the other party's system" lines; it always says a valid signature proves who signed, not that the claim is true, binds the payload as the receipt's `payload` subject (re-signed by the run's own key; other bytes or no payload subject are refused), and counts a confirmation as independent only when it was read from the other party's system. Over MCP, `serve --handoffs` adds `get_handoff` and `verify_handoff`. The private openings never travel | On main ([#2414](https://github.com/OpenAdaptAI/OpenAdapt/pull/2414)) | Unit tests over receipts from Flow's own writer and the shared `record/run/v1` confirmation vectors and the shared payload vectors (good, tampered, unknown signer, bound, mismatched and missing payload, detached file, local webhook); MCP and A2A end to end with the stubbed run process; a two-party test of 20 handoffs over HTTP (0 false accepts, 0 true rejects); one real headless MockMed run handed off over the CLI and checked against the receiver's own record ([benchmark/handoff_real_run](https://github.com/OpenAdaptAI/OpenAdapt/blob/main/packages/flow/benchmark/handoff_real_run/README.md)); `--ledger` tested against #2415's `HandoffLedger` | `openadapt handoff`, `openadapt_flow/handoff.py`, [HANDOFFS.md](https://github.com/OpenAdaptAI/OpenAdapt/blob/main/packages/flow/docs/HANDOFFS.md), draft format [HANDOFF_RECEIPTS.md](https://github.com/OpenAdaptAI/OpenAdapt/blob/main/packages/flow/docs/HANDOFF_RECEIPTS.md) | -| A2A (Agent2Agent) protocol adapter: `openadapt agent serve --a2a` serves compiled workflows as A2A 1.0 skills with the official `a2a-sdk` (`openadapt[a2a]`): Agent Card at `/.well-known/agent-card.json`, JSON-RPC and HTTP+JSON, runs as tasks with status updates, the run's receipt as a handoff artifact when Flow wrote one (sandbox and strict at-rest runs have none), a `verify_handoff` skill, and the draft extension `https://openadapt.ai/extensions/handoff-receipt/v1`. Every call passes the MCP server's gate; person confirmations are not served; only `done` is completed. Loopback by default, a bearer token anywhere else, browser `Origin` and unknown `Host` refused | On main ([#2414](https://github.com/OpenAdaptAI/OpenAdapt/pull/2414)) | Synthetic: the official `a2a-sdk` 1.3.1 client against the server over HTTP on 127.0.0.1, with a governed run whose Flow process is stubbed and whose receipt Flow's writer signs; the official A2A TCK (a2aproject/a2a-tck at 5e6f37c): 110 automated checks passed and 11 failed, MUST 76.0%. The failures are 10 SDK-scenario tests that expect the TCK's own scripted agent, and the SDK's error Content-Type ([benchmark/a2a_tck](https://github.com/OpenAdaptAI/OpenAdapt/blob/main/packages/flow/benchmark/a2a_tck/README.md)) | `openadapt_flow/agent/a2a_server.py`, [A2A.md](https://github.com/OpenAdaptAI/OpenAdapt/blob/main/packages/flow/docs/A2A.md) | +| A2A (Agent2Agent) protocol adapter: `openadapt agent serve --a2a` serves compiled workflows as A2A 1.0 skills with the official `a2a-sdk` (`openadapt[a2a]`): Agent Card at `/.well-known/agent-card.json`, signed (A2A 1.0 section 8.4, EdDSA JWS by the Seal key that signs receipts; no server if the key can't be opened), JSON-RPC and HTTP+JSON, runs as tasks with status updates, the run's receipt as a handoff artifact when Flow wrote one (sandbox and strict at-rest runs have none), a `verify_handoff` skill, and the draft extension `https://openadapt.ai/extensions/handoff-receipt/v1`. Every call passes the MCP server's gate; person confirmations are not served; only `done` is completed. Loopback by default, a bearer token anywhere else, browser `Origin` and unknown `Host` refused | On main ([#2414](https://github.com/OpenAdaptAI/OpenAdapt/pull/2414)) | Synthetic: the official `a2a-sdk` 1.3.1 client against the server over HTTP on 127.0.0.1, with a governed run whose Flow process is stubbed and whose receipt Flow's writer signs; the official A2A TCK (a2aproject/a2a-tck at 5e6f37c): 110 automated checks passed and 11 failed, MUST 76.0%. The failures are 10 SDK-scenario tests that expect the TCK's own scripted agent, and the SDK's error Content-Type ([benchmark/a2a_tck](https://github.com/OpenAdaptAI/OpenAdapt/blob/main/packages/flow/benchmark/a2a_tck/README.md)); the card signature verified by the `a2a-sdk` verifier and refused when changed, unpinned or relabelled (the TCK leaves signing to manual checks) | `openadapt_flow/agent/a2a_server.py`, [A2A.md](https://github.com/OpenAdaptAI/OpenAdapt/blob/main/packages/flow/docs/A2A.md) | | Teach over MCP: an agent does a new task once through OpenAdapt; the run is read back, compiled and admitted (a person confirms the record check; the agent admits only under a person-signed policy), and becomes a tool it calls with no model calls. Web, and Windows, macOS, Linux, RDP and Citrix with a person approving each save | On main ([#1335](https://github.com/OpenAdaptAI/OpenAdapt/pull/1335)) | Synthetic (MockMed over MCP, and through the real RDP and Citrix backends); a native Cocoa app with SQLite through `MacOSBackend`, taught, confirmed, admitted under a signed policy and called (canary and taught run `VERIFIED`, 0 model calls; [teach_desktop](https://github.com/OpenAdaptAI/OpenAdapt/blob/main/packages/flow/benchmark/teach_desktop/README.md)) | `openadapt-agent serve --teach`, [packages/agent](https://github.com/OpenAdaptAI/OpenAdapt/blob/main/packages/agent/README.md#teach-a-new-workflow-from-your-agent) | | Turn a read-only browser task into a tool for the coding agent you already use: `openadapt setup` registers the MCP server and a skill in Claude Code, Cursor, Codex and Gemini CLI (idempotent, `--dry-run`, `--undo`); `openadapt setup --app deploy.yaml --verify verify.yaml` sets the agent up to teach saves in one web, desktop, RDP or Citrix app instead, each read back from the system of record. Read-only teaching runs only where a guard stops writes before they leave (the browser); `serve --teach-browser --config` naming a desktop, RDP or Citrix app is refused; the agent does the task once through `teach_start`/`teach_act`/`teach_finish`, the task must end in a download, the file is checked (columns, a column between two inputs or equal to one, fewest rows), the compiled steps are replayed once with no model, and the agent gets a `taught_` tool that downloads a checked file with new inputs. The browser sends no POST, PUT, PATCH or DELETE and stays on one site; a compiled run stops when a control is missing, matches more than one element, or is relabelled | Released ([#1502](https://github.com/OpenAdaptAI/OpenAdapt/pull/1502)) | Real headless Chromium on the local example portal (scripted MCP client, in CI); a real Claude Code agent taught the export from the guide's prompt and called the tool with new dates (2026-10-24, one run) | `openadapt setup`, `openadapt-agent serve --teach-browser`, [FIRST_TOOL.md](https://github.com/OpenAdaptAI/OpenAdapt/blob/main/packages/flow/docs/FIRST_TOOL.md) | | Verify any agent's own writes: `openadapt verify` reads the system of record before and after a write, against a contract the operator owns (REST, FHIR, SQL, GraphQL), and returns a verified receipt (`openadapt.effect-receipt/v1`) or a refusal (`REFUTED`, `UNCERTAIN`), never an unverified success. Python SDK (`openadapt.verify`, which is `openadapt_flow.verifier`: `begin_write`, `verify_write`, `verified_write`) wraps a write in any agent framework; the MCP server (`openadapt verify serve`) offers `verify_begin`, `verify_check` and `verify_recheck` to any MCP client | Released ([#1589](https://github.com/OpenAdaptAI/OpenAdapt/pull/1589)) | Synthetic (MockMed's fault server over real HTTP: correct write, wrong record, not saved, saved twice, unreadable store) | `openadapt verify`, [VERIFY_WRITES.md](https://github.com/OpenAdaptAI/OpenAdapt/blob/main/packages/flow/docs/VERIFY_WRITES.md) | @@ -577,6 +580,7 @@ improvising or retrying when something is off. | Offline Seals signed with a key the customer holds: a key file, the OS keychain, or a PKCS#11 token or HSM; pinned keys with rotation and revocation; no fallback to a generated key | On main ([#1392](https://github.com/OpenAdaptAI/OpenAdapt/pull/1392)) | Unit tests with synthetic data (keychain and PKCS#11 through stand-ins) | `openadapt-flow local-seal --key`, `local-seal key create`, `pin`, `revoke`; `openadapt seal verify FOLDER` checks every sealed run in a folder; [OFFLINE_SEALS.md](https://github.com/OpenAdaptAI/OpenAdapt/blob/main/packages/flow/docs/OFFLINE_SEALS.md#customer-held-keys) | | Anchor an offline Seal in the public Sigstore Rekor transparency log (opt-in; sends one digest and the public key), and verify the anchor offline from the stored inclusion proof | Released ([#1394](https://github.com/OpenAdaptAI/OpenAdapt/pull/1394)) | Unit tests against a simulated Rekor log; real public Rekor entries and Sigstore TSA tokens for the landing demo's referral runs, verified offline in tests; Ed25519ph matches the RFC 8032 test vector | `openadapt-flow local-seal anchor`, `local-seal verify --require-anchor`; [OFFLINE_SEALS.md](https://github.com/OpenAdaptAI/OpenAdapt/blob/main/packages/flow/docs/OFFLINE_SEALS.md#optional-anchor-a-seal-in-a-public-transparency-log) | | Signed write receipts: a verifier verdict with its scope (stores read, window, strength) and a plain not-checked list, signed as a COSE_Sign1 (IETF SCITT shape) and logged in a local Merkle transparency log; checked offline against pinned keys; a receipt that claims more than its scope is neither issued nor accepted; optional Rekor anchor | On main | Unit tests on the real verifier (SQLite) and shadow proxy; COSE checked through python-cwt | `openadapt-flow receipt verify`, `receipt keys export`, `receipt anchor`; `verify_write(..., write_receipt=True)`; `shadow --receipts`; [WRITE_RECEIPTS.md](https://github.com/OpenAdaptAI/OpenAdapt/blob/main/packages/flow/docs/WRITE_RECEIPTS.md) | +| Python `openadapt.wrap` receipts signed with this computer's `openadapt trust init` key by default (or `signing_key=`), naming the key by id and fingerprint; with no key a receipt says `digest_only` and `signed: false`, and `wrap` never creates a key. `verify_wrap_receipt` and `openadapt verify` accept a receipt only when its signature verifies against a key you pinned, never the key the receipt carries; an unknown signer or a digest-only receipt is not verified. A plain `check=` callable is recorded as `caller_check`, and a check can't raise its own `checked_how` | On main | Unit tests with real Ed25519 keys: an unsigned receipt with a recomputed digest and a receipt signed by its own embedded key both fail, through the SDK and `openadapt verify` | `openadapt.wrap`, `openadapt.verify_wrap_receipt`, `openadapt verify FILE [--keys FILE]`, `openadapt trust init` | | Per-run accounting ledger for any executor (an OpenAdapt agent, a compiled program, another agent, a person): one value-free row per run with the outcome (VERIFIED, ESCALATED, CAUGHT_ERROR, FAILED, UNKNOWN) and a closed reason, a person's minutes from approval, question, exception and second-factor intervals, model calls and cost (unknown is null, never zero), field names with their checks, and the read-back tier; values only in a local 0600 sidecar; collected from the files guard, verify-run, compiled runs, wrap, item approvals and compile-agent already write, plus readiness shadow runs, guard ledger rows, P7 fallback results and P6 exception answers; a person's decline is ESCALATED, not a caught error | On main | Unit tests with synthetic data: the outcome rule as a table over every engine outcome enum, fixtures for each source (copies of the shadow, guarded-save, fallback and exception files from a synthetic MockMed end-to-end run), the real commit guard against MockMed's fault server end to end, exports scanned for every fixture value and checked with the real Presidio scrubber, push payloads validated against the JSON Schema, push refused with no key | `openadapt-flow ledger add`, `list`, `show`, `summary`, `export`, `push`; [RUN_LEDGER.md](https://github.com/OpenAdaptAI/OpenAdapt/blob/main/packages/flow/docs/RUN_LEDGER.md) | | See a run's Seal offline: one HTML page that checks the Ed25519 signature over the run's exact report in the browser, draws the Seal from it, replays the run over its program map, and lets the reader tamper with a copy; no network requests; the quickstart ends on the person's own. One screen: map left, Seal and verdict top right, Summary, Steps, Evidence and Raw tabs; light and dark | On main ([#1566](https://github.com/OpenAdaptAI/OpenAdapt/pull/1566)) | A real quickstart run's Seal opened from `file://` in Chromium (valid, tampered, no requests; a link to one step, keyboard tabs and steps, theme switch, phone layout); RFC 8032 test vectors; a published OpenEMR Seal's Rekor entry and timestamp | `openadapt seal view RUN_DIR`; `openadapt quickstart`; [`@openadapt/seal-view`](https://github.com/OpenAdaptAI/OpenAdapt/blob/main/packages/seal-view/README.md) | | Sign in to OpenAdapt Cloud from the terminal: `openadapt login` with no token prints a sign-in link (opened only with `--open`), listens on 127.0.0.1 for the browser's redirect, and redeems Cloud's one-use code with an S256 PKCE verifier that never leaves the process. A first-time user gets a workspace on the way. The credential goes to the OS keychain entry `push` and `report-run` read; a stored token is re-validated as before, and `--token` and `--no-browser` keep the token path | On main | Unit tests with a real loopback listener (state mismatch, refusal, malformed code, timeout, browser opened only on request); end to end against Cloud's `/auth/loopback` and pairing routes in mock mode, both Connect and Cancel | `openadapt login`; [browser_login.py](https://github.com/OpenAdaptAI/OpenAdapt/blob/main/packages/flow/openadapt_flow/browser_login.py) | @@ -1117,6 +1121,38 @@ are part of the qualification boundary, so this does not qualify arbitrary fresh workers. A script-hosted application's own code is covered by its declared version, not the host executable's hash. +## Windows approval: controls without their own window + +Before a save, an approval on Windows reads the app window to check that +nothing changed while the person decided. A text box or label with its own +window is read through two independent sources that must agree, so a value +cut short by the app's accessibility provider stops the item. A control drawn +by its parent, such as a grid cell, a grid column header or the title bar, +has no second source. Its UI Automation value is read twice and must match, +and the screen text over it is still read. If the provider cuts that value +short, a change in the hidden part that also leaves the visible text the same +is not detected. Some providers give such a control no RuntimeId at all +(WinForms grid cells and column headers). That control is then bound by its +path: each element up to an ancestor that has a RuntimeId, by type, position +and index among its siblings, read again before and after each of the two +reads. If a provider swaps in another element with the same type, position +and index, the check reads it as the same control; a changed value still +shows in the two reads or in the screen text. A scroll or resize between the +reads stops the item. A grid or list cell, a header or the title bar is +included even when its provider reports it as editable (WinForms does so +for a read-only grid); a text box never is. These values are used only for +that check: they are never complete values, read-back evidence or the basis +of a VERIFIED result. Read-back, not the approval check, verifies what a +save wrote. An +editable control, a password field, a control whose password status is +unknown, or one whose two reads differ still stops the item. + +A native Windows stale-identity fault covers the whole screen, so the +keyboard lease that checks the target refuses and the save halts. The fault +receipt then binds to the engine's own plain screenshot, and only when its +SHA-256 equals the frame the fault driver signed. Otherwise no receipt is +recorded and the campaign rejects the case. + ## Validated on Every published result used synthetic patients, claims and records. diff --git a/packages/agent/tests/test_handoff_e2e.py b/packages/agent/tests/test_handoff_e2e.py index d0bffb73b3..8f2427bd61 100644 --- a/packages/agent/tests/test_handoff_e2e.py +++ b/packages/agent/tests/test_handoff_e2e.py @@ -10,8 +10,8 @@ Covered: a real run's receipt in the A2A artifact and the MCP tool result; verification of a good, a tampered, an unknown-signer and a swapped-payload handoff; the A2A and MCP gates refusing the same things; no browser Origin -or foreign Host; the extensions header echo; and a follow-up message that -can't approve a run waiting for a person. +or foreign Host; the extensions header echo; a follow-up message that +can't approve a run waiting for a person; and the signed Agent Card. """ from __future__ import annotations @@ -244,7 +244,12 @@ async def scenario(): handoff, good, tampered, swapped = asyncio.run(scenario()) assert good["integrity"] == "intact" assert good["signer_roles"] == ["this_computer"] - assert good["outcome"] == "VERIFIED" + # The stubbed run has no read-back, so its receipt says UNKNOWN (receipts + # say VERIFIED only on a level 3 or 4 read). The verdict copies the + # receipt's outcome and never upgrades it. + statement = json.loads(base64.b64decode(handoff["receipt"]["payload"])) + assert statement["predicate"]["outcome"] == "UNKNOWN" + assert good["outcome"] == "UNKNOWN" assert good["what_this_proves"][0] == h.WHAT_A_SIGNATURE_PROVES assert tampered["integrity"] == "refused" and tampered["reason"] == "bad_signature" assert good["payload"]["bound"] is True @@ -309,7 +314,7 @@ def test_a2a_refuses_browsers_and_foreign_hosts_and_echoes_extensions(a2a_url): assert "a2a-extensions" not in httpx.get(card).headers -def test_a2a_off_loopback_needs_a_token_and_hides_workflows(bridge, tmp_path): +def test_a2a_off_loopback_needs_a_token_and_hides_workflows(bridge, signer, tmp_path): with pytest.raises(ValueError, match="needs --a2a-token-file"): a2a_server.A2AConfig(host="0.0.0.0") config = a2a_server.A2AConfig(host="0.0.0.0", port=_free_port(), token="t" * 40) @@ -333,6 +338,11 @@ def test_a2a_off_loopback_needs_a_token_and_hides_workflows(bridge, tmp_path): headers={"Authorization": "Bearer " + "t" * 40, "A2A-Version": "1.0"}, ) assert ok.status_code == 200 + # Both cards carry a signature by this computer's receipt key. + keys = {signer.key_id: signer.public_raw()} + served = client.get("/.well-known/agent-card.json").json() + assert a2a_server.verify_agent_card(served, keys) == signer.key_id + assert a2a_server.verify_agent_card(ok.json()["result"], keys) == signer.key_id def test_a2a_follow_up_cannot_approve_a_run_waiting_for_a_person( @@ -546,3 +556,95 @@ async def runs(): # Without its own read, the receiver never accepts on the signature. unchecked = h.decide(h.make_handoff({"ref": "x"}, receipts[0][0], signer=signer), registry) assert unchecked.ok and unchecked.decision == "unchecked" + + +# -- the signed Agent Card -------------------------------------------------------- + + +def _jws_header(signature: dict) -> dict: + protected = signature["protected"] + return json.loads(base64.urlsafe_b64decode(protected + "=" * (-len(protected) % 4))) + + +def test_a2a_agent_card_is_signed_by_the_receipt_key(a2a_url, bridge, signer): + """The served card verifies against the key a receiver pins for receipts.""" + card = httpx.get(a2a_url + "/.well-known/agent-card.json").json() + (signature,) = card["signatures"] + header = _jws_header(signature) + assert header == {"alg": "EdDSA", "kid": signer.key_id, "typ": "JOSE"} + # The kid is the receipt registry's key id, so one pinned key covers both. + assert header["kid"] == bridge.handoffs.registry()[0].key_id + assert a2a_server.verify_agent_card(card, {signer.key_id: signer.public_raw()}) == signer.key_id + + +def test_a2a_agent_card_signature_verifies_with_the_official_sdk(a2a_url, signer): + """Interop: a2a-sdk's own verifier (PyJWT, RFC 8785) accepts the card.""" + pytest.importorskip("jwt") + from a2a.types import AgentCard + from a2a.utils.signing import InvalidSignaturesError, create_signature_verifier + from cryptography.hazmat.primitives.asymmetric.ed25519 import Ed25519PublicKey + from google.protobuf.json_format import ParseDict + + data = httpx.get(a2a_url + "/.well-known/agent-card.json").json() + public = Ed25519PublicKey.from_public_bytes(signer.public_raw()) + + def key_for(kid, jku): + assert jku is None + if kid != signer.key_id: + raise KeyError(kid) + return public + + verify = create_signature_verifier(key_for, ["EdDSA"]) + verify(ParseDict(data, AgentCard(), ignore_unknown_fields=True)) + changed = dict(data, description=data["description"] + " (changed)") + with pytest.raises(InvalidSignaturesError): + verify(ParseDict(changed, AgentCard(), ignore_unknown_fields=True)) + + +def test_a2a_agent_card_refuses_tampered_unknown_unsigned_and_wrong_alg(a2a_url, signer): + card = httpx.get(a2a_url + "/.well-known/agent-card.json").json() + keys = {signer.key_id: signer.public_raw()} + other = SoftwareSigner(Ed25519PrivateKey.generate(), "generated") + + tampered = json.loads(json.dumps(card)) + tampered["supportedInterfaces"][0]["url"] = "http://evil.example/a2a/jsonrpc" + with pytest.raises(a2a_server.CardSignatureError): + a2a_server.verify_agent_card(tampered, keys) + # A receiver that pins another key refuses the same card, even though the + # card's own jwk header names the real signer's public key. + with pytest.raises(a2a_server.CardSignatureError): + a2a_server.verify_agent_card(card, {other.key_id: other.public_raw()}) + with pytest.raises(a2a_server.CardSignatureError, match="not signed"): + a2a_server.verify_agent_card({k: v for k, v in card.items() if k != "signatures"}, keys) + # Re-label the signature as another algorithm: refused, never downgraded. + forged = json.loads(json.dumps(card)) + header = dict(_jws_header(forged["signatures"][0]), alg="none") + forged["signatures"][0]["protected"] = ( + base64.urlsafe_b64encode(json.dumps(header).encode()).rstrip(b"=").decode() + ) + with pytest.raises(a2a_server.CardSignatureError): + a2a_server.verify_agent_card(forged, keys) + # A signature by an untrusted key beside a valid one doesn't stop the valid one. + extra = a2a_server.sign_agent_card(_card_message(card), other) + from google.protobuf.json_format import MessageToDict + + both = MessageToDict(extra) + assert len(both["signatures"]) == 2 + assert a2a_server.verify_agent_card(both, keys) == signer.key_id + + +def _card_message(card: dict): + from a2a.types import AgentCard + from google.protobuf.json_format import ParseDict + + return ParseDict(card, AgentCard(), ignore_unknown_fields=True) + + +def test_a2a_will_not_serve_an_unsigned_card_when_the_key_is_unavailable(bridge): + class BrokenHandoffs: + def signer(self): + raise RuntimeError("key_unavailable: the configured Seal key can't be opened") + + bridge.handoffs = BrokenHandoffs() + with pytest.raises(RuntimeError, match="key_unavailable"): + a2a_server.build_app(bridge, a2a_server.A2AConfig(port=_free_port())) diff --git a/packages/flow/benchmark/a2a_tck/README.md b/packages/flow/benchmark/a2a_tck/README.md index bc0b908fa0..a4ce92e0ce 100644 --- a/packages/flow/benchmark/a2a_tck/README.md +++ b/packages/flow/benchmark/a2a_tck/README.md @@ -51,8 +51,12 @@ Before two fixes in this pull request, the TCK found two more failures: The Agent Card also now sends `Cache-Control`. The TCK also lists checks it can't automate, which it marks for manual -verification. Two of them don't apply to this server: +verification. Two of them didn't apply to this server at the time: -- **Agent Card signing.** The card is not signed. +- **Agent Card signing.** The card was not signed when this run was made. + It is signed now (EdDSA with this computer's Seal key; see + [A2A.md](../../docs/A2A.md#the-signed-agent-card)). The TCK leaves + `CARD-SIGN-*` to manual checking; `test_handoff_e2e.py` verifies the + signature with the `a2a-sdk` verifier. - **TLS.** The server listens on loopback over HTTP. Off loopback it needs a bearer token, and TLS is the deployment's job. diff --git a/packages/flow/docs/A2A.md b/packages/flow/docs/A2A.md index 0201cd1a62..3058c63686 100644 --- a/packages/flow/docs/A2A.md +++ b/packages/flow/docs/A2A.md @@ -20,6 +20,7 @@ openadapt agent serve --bundles ./bundles --mode production --a2a | A2A | OpenAdapt | |---|---| | Agent Card at `/.well-known/agent-card.json` | Built from the same public workflow list `list_workflows` returns. It never includes step text, recorded values or paths. | +| `signatures` | One JWS signature (`EdDSA`) by this computer's Seal key, the key that signs its run receipts. The extended card is signed too. See [The signed Agent Card](#the-signed-agent-card). | | `supportedInterfaces` | `JSONRPC` at `/a2a/jsonrpc` and `HTTP+JSON` at `/a2a/rest`, protocol version 1.0. | | One skill per workflow | Send a data part `{"skill": NAME, "inputs": {...}, "request_id": ID}`. | | Skill `verify_handoff` | Send another agent's handoff and get the verdict ([HANDOFFS.md](HANDOFFS.md)). | @@ -32,6 +33,44 @@ that task only re-checks the run; it never approves it. Every other outcome is `TASK_STATE_FAILED`. Cancelling a task never stops a run part way through a write; the server answers `TaskNotCancelableError`. +## The signed Agent Card + +Both cards carry a signature as A2A 1.0 section 8.4 describes: a JWS +(RFC 7515) over the card's RFC 8785 canonical form, with `signatures` left +out and empty values removed. + +- **The key.** The card is signed with this computer's Seal key, the same + Ed25519 key that signs its run receipts. The protected header is + `{"alg": "EdDSA", "kid": "seal-ed25519-…", "typ": "JOSE"}`, and the `kid` is + the key id in your handoff key registry. If you already pin this computer's + receipt key, the same entry checks its card. +- **The `jwk` header is a convenience.** The unprotected header carries the + public key as a JWK. Don't trust it. Trust the key you pinned, looked up by + `kid`. +- **No key, no server.** If the configured Seal key can't be opened, + `serve --a2a` doesn't start. It never serves an unsigned card instead. + +Check a card with the official SDK (`pip install 'a2a-sdk[signing]'`): + +```python +from a2a.utils.signing import create_signature_verifier + +verify = create_signature_verifier(lambda kid, jku: pinned[kid], ["EdDSA"]) +verify(card) # raises InvalidSignaturesError unless a pinned key signed it +``` + +Or without PyJWT, from the served JSON: + +```python +from openadapt_flow.agent.a2a_server import verify_agent_card + +kid = verify_agent_card(card_json, {key_id: raw_public_key}) +``` + +A valid card signature proves who published the card and that it hasn't +changed: its skills, its interface URLs and its security requirements. It +says nothing about any run. That is what the run's receipt is for. + ## When a run has no receipt Flow writes `receipt.json` after every `openadapt-flow run` and `replay`. @@ -84,6 +123,10 @@ against this server over HTTP on 127.0.0.1. A program run goes through the governed runner with Flow's run process stubbed, and Flow's receipt writer signs the report. The tests cover: +- the signed Agent Card: verified by `verify_agent_card` and by the + `a2a-sdk` verifier, refused when changed, signed by an unpinned key, unsigned + or relabelled to another algorithm, and no server when the key can't be + opened; - the receipt in the task artifact; - a good handoff, verified; - tampered, unknown-signer and re-stapled handoffs; @@ -96,5 +139,6 @@ The same file covers the MCP tools. The official A2A TCK was run against the sandbox server. 110 automated checks passed and 11 failed. The Agent Card checks passed 9 of 11, with 0 failed and -2 skipped. For what failed and why, see +2 skipped. That run was before the card was signed; the TCK marks card +signing for manual checking. For what failed and why, see [benchmark/a2a_tck](../benchmark/a2a_tck/README.md). diff --git a/packages/flow/openadapt_flow/agent/a2a_server.py b/packages/flow/openadapt_flow/agent/a2a_server.py index b5a5bb6c47..6cecd9f9e8 100644 --- a/packages/flow/openadapt_flow/agent/a2a_server.py +++ b/packages/flow/openadapt_flow/agent/a2a_server.py @@ -19,6 +19,8 @@ * A finished run's receipt travels as an ``openadapt.handoff-document/v1`` artifact part (exact bytes, so its digests hold), marked with the handoff-receipt extension URI. +* The Agent Card (and the extended card) is signed with this computer's Seal + key, the key that signs its receipts (A2A 1.0 section 8.4). * It listens on 127.0.0.1 by default. Any other address needs a bearer token. Every request with a browser ``Origin`` header, or a ``Host`` it doesn't serve, is refused, so a web page can't reach the port (DNS rebinding). @@ -259,6 +261,139 @@ def build_agent_card( return card +# -- signing the Agent Card ----------------------------------------------------------- +# +# A2A 1.0 section 8.4: a card carries JWS signatures (RFC 7515) over its RFC 8785 +# canonical form, with ``signatures`` left out and empty values removed. The +# card is signed with this computer's Seal key, the same Ed25519 key that signs +# its run receipts, so the ``kid`` is the receipt key id a receiver already +# pins. The signer may live in a keychain or a PKCS#11 token, so the JWS is +# built here from ``signer.sign`` rather than by a JOSE library that wants the +# private key. + +CARD_SIGNATURE_ALG = "EdDSA" + + +def _b64url(data: bytes) -> str: + import base64 + + return base64.urlsafe_b64encode(data).rstrip(b"=").decode("ascii") + + +def _b64url_decode(text: str) -> bytes: + import base64 + + return base64.urlsafe_b64decode(text + "=" * (-len(text) % 4)) + + +def _clean_empty(value: Any) -> Any: + if isinstance(value, dict): + cleaned = {k: c for k, v in value.items() if (c := _clean_empty(v)) is not None} + return cleaned or None + if isinstance(value, list): + items = [c for v in value if (c := _clean_empty(v)) is not None] + return items or None + if isinstance(value, str) and not value: + return None + return value + + +def canonical_card_bytes(card: Any) -> bytes: + """The bytes an Agent Card signature covers (A2A 1.0 section 8.4.1). + + ``card`` is an ``AgentCard`` message or its JSON object. + """ + from openadapt_types.receipt import jcs + + if isinstance(card, dict): + data = dict(card) + else: + from google.protobuf.json_format import MessageToDict + + data = MessageToDict(card) + data.pop("signatures", None) + return jcs(_clean_empty(data) or {}).encode("utf-8") + + +def sign_agent_card(card: Any, signer: Any) -> Any: + """Add a detached-payload JWS signature by ``signer`` (a Seal signer). + + The protected header names ``alg`` EdDSA and ``kid`` the Seal key id. The + unprotected header carries the public key as a JWK for convenience only; + a receiver trusts the key it pinned, never the one the card names. + """ + from a2a.types import AgentCardSignature + from google.protobuf import struct_pb2 + from google.protobuf.json_format import ParseDict + + header = {"alg": CARD_SIGNATURE_ALG, "kid": signer.key_id, "typ": "JOSE"} + protected = _b64url(json.dumps(header, separators=(",", ":")).encode("utf-8")) + signing_input = f"{protected}.{_b64url(canonical_card_bytes(card))}".encode("ascii") + signature = _b64url(signer.sign(signing_input)) + jwk = {"kty": "OKP", "crv": "Ed25519", "x": _b64url(signer.public_raw())} + card.signatures.append( + AgentCardSignature( + protected=protected, + signature=signature, + header=ParseDict({"jwk": jwk}, struct_pb2.Struct()), + ) + ) + return card + + +class CardSignatureError(ValueError): + """An Agent Card has no signature by a key the receiver trusts.""" + + +def verify_agent_card(card: dict[str, Any], trusted: dict[str, bytes]) -> str: + """Check ``card`` (the served JSON) against pinned Ed25519 public keys. + + ``trusted`` maps a key id to its raw 32-byte public key, for example from + the receiver's handoff key registry. Returns the key id of the first valid + signature. Raises :class:`CardSignatureError` when none is valid. Only + ``EdDSA`` is accepted, and the key comes from ``trusted`` by ``kid``, + never from the card's own ``jwk`` header. + """ + from cryptography.exceptions import InvalidSignature + from cryptography.hazmat.primitives.asymmetric.ed25519 import Ed25519PublicKey + + signatures = card.get("signatures") or [] + if not signatures: + raise CardSignatureError("the Agent Card is not signed") + payload = _b64url(canonical_card_bytes(card)) + for item in signatures: + try: + protected = str(item["protected"]) + header = json.loads(_b64url_decode(protected)) + if not isinstance(header, dict) or header.get("alg") != CARD_SIGNATURE_ALG: + continue + raw = trusted.get(str(header.get("kid"))) + if raw is None: + continue + Ed25519PublicKey.from_public_bytes(raw).verify( + _b64url_decode(str(item["signature"])), + f"{protected}.{payload}".encode("ascii"), + ) + return str(header["kid"]) + except (InvalidSignature, KeyError, TypeError, ValueError): + continue + raise CardSignatureError("no signature on the Agent Card is by a trusted key") + + +def card_signer(bridge: AgentBridge) -> Any: + """The key that signs the card: the bridge's receipt key, else the Seal key. + + Raises when the configured key can't be opened; it never falls back to + serving an unsigned card. + """ + handoffs = getattr(bridge, "handoffs", None) + if handoffs is not None: + return handoffs.signer() + from openadapt_flow.offline_seal import seal_home, signer_for + + return signer_for(seal_home()) + + # -- requests --------------------------------------------------------------------- @@ -527,7 +662,10 @@ async def send_with_extensions(message: Any) -> None: def build_app(bridge: AgentBridge, config: A2AConfig) -> Any: - """The ASGI app: Agent Card, JSON-RPC and HTTP+JSON bindings.""" + """The ASGI app: Agent Card, JSON-RPC and HTTP+JSON bindings. + + Both cards are signed with :func:`card_signer`'s key. + """ from a2a.server.request_handlers import DefaultRequestHandler from a2a.server.routes import ( create_agent_card_routes, @@ -537,9 +675,10 @@ def build_app(bridge: AgentBridge, config: A2AConfig) -> Any: from a2a.server.tasks.inmemory_task_store import InMemoryTaskStore from starlette.applications import Starlette - card = build_agent_card(bridge, config) + signer = card_signer(bridge) + card = sign_agent_card(build_agent_card(bridge, config), signer) extended = ( - build_agent_card(bridge, config, extended=True) + sign_agent_card(build_agent_card(bridge, config, extended=True), signer) if card.capabilities.extended_agent_card else None ) @@ -581,14 +720,25 @@ def serve(bridge: AgentBridge, config: A2AConfig) -> None: import uvicorn + from openadapt_flow.offline_seal import LocalSealError + + try: + app = build_app(bridge, config) + except LocalSealError as exc: + # Never serve an unsigned card in place of a signed one. + raise SystemExit( + f"openadapt-agent: the Agent Card can't be signed, so A2A was not " + f"started: {exc}" + ) from exc print( f"openadapt-agent: serving over A2A at {config.base_url} (Agent Card " - f"{config.base_url}/.well-known/agent-card.json); " + f"{config.base_url}/.well-known/agent-card.json, signed by " + f"{card_signer(bridge).key_id}); " + ("bearer token required" if config.token else "loopback only"), file=sys.stderr, ) uvicorn.run( - build_app(bridge, config), + app, host=config.host, port=config.port, log_level="warning", From 16697cb34fcc66a7e59239a0e2b77f78e9512283 Mon Sep 17 00:00:00 2001 From: abrichr Date: Mon, 30 Nov 2026 14:56:02 -0500 Subject: [PATCH 2/7] feat(a2a): pass every automated A2A TCK check HTTP+JSON responses are now application/a2a+json, errors included, as specification 1.0.1 recommends. a2a-sdk 1.3.1 labelled only its error responses application/json (TCK HTTP_JSON-SVC-001). --a2a-tck-scenarios answers the TCK's scripted tck-* messages (its SUT_REQUIREMENTS: text, file, file-URL and data artifacts, and a direct Message). The answers run no workflow and touch no data, and the flag needs --mode sandbox and loopback, so a server that runs real workflows never serves them (DM-ART-001, DM-MSG-001). TCK at 5e6f37c on 2026-11-30: 121 passed, 0 failed, 142 skipped (gRPC, push, cancel, auth scenarios); evidence in benchmark/a2a_tck/2026-11-30. --- CAPABILITIES.md | 2 +- ...2agent-protocol-adapter-openadapt-agent.md | 2 +- capabilities/CAPABILITIES.md.sha256 | 2 +- llms-full.txt | 2 +- packages/agent/tests/test_handoff_e2e.py | 62 + .../a2a_tck/2026-11-30/compatibility.json | 1716 +++++++++++++++++ .../benchmark/a2a_tck/2026-11-30/tck-run.log | 48 + packages/flow/benchmark/a2a_tck/README.md | 104 +- packages/flow/docs/A2A.md | 25 +- .../flow/openadapt_flow/agent/a2a_server.py | 102 +- packages/flow/openadapt_flow/agent/cli.py | 11 +- 11 files changed, 2025 insertions(+), 51 deletions(-) create mode 100644 packages/flow/benchmark/a2a_tck/2026-11-30/compatibility.json create mode 100644 packages/flow/benchmark/a2a_tck/2026-11-30/tck-run.log diff --git a/CAPABILITIES.md b/CAPABILITIES.md index c0d6b9b20d..0d99a84c3b 100644 --- a/CAPABILITIES.md +++ b/CAPABILITIES.md @@ -358,7 +358,7 @@ improvising or retrying when something is off. | Admit a draft by a person, an admitter key, or an agent under a person-signed policy, including self-admission when the policy allows it | Released | Unit tests | [JIT_ADMISSION.md](packages/flow/docs/JIT_ADMISSION.md) | | MCP server: your agent decides what to enter, OpenAdapt makes the entry and checks it | Released | Synthetic sandbox | `openadapt-agent`, [packages/agent](packages/agent/README.md) | | Agent-to-agent handoffs: when one agent hands a result to another, the run's signed receipt (`record/run/v1`) goes with it (`openadapt handoff send`, inline, detached beside a file, or POSTed to a webhook), and the receiver checks it against keys it pins (`openadapt handoff verify`). The verdict gives the signer role from the receiver's registry, integrity, checks passed and not checked, and "confirmed in the other party's system" lines; it always says a valid signature proves who signed, not that the claim is true, binds the payload as the receipt's `payload` subject (re-signed by the run's own key; other bytes or no payload subject are refused), and counts a confirmation as independent only when it was read from the other party's system. Over MCP, `serve --handoffs` adds `get_handoff` and `verify_handoff`. The private openings never travel | On main ([#2414](https://github.com/OpenAdaptAI/OpenAdapt/pull/2414)) | Unit tests over receipts from Flow's own writer and the shared `record/run/v1` confirmation vectors and the shared payload vectors (good, tampered, unknown signer, bound, mismatched and missing payload, detached file, local webhook); MCP and A2A end to end with the stubbed run process; a two-party test of 20 handoffs over HTTP (0 false accepts, 0 true rejects); one real headless MockMed run handed off over the CLI and checked against the receiver's own record ([benchmark/handoff_real_run](packages/flow/benchmark/handoff_real_run/README.md)); `--ledger` tested against #2415's `HandoffLedger` | `openadapt handoff`, `openadapt_flow/handoff.py`, [HANDOFFS.md](packages/flow/docs/HANDOFFS.md), draft format [HANDOFF_RECEIPTS.md](packages/flow/docs/HANDOFF_RECEIPTS.md) | -| A2A (Agent2Agent) protocol adapter: `openadapt agent serve --a2a` serves compiled workflows as A2A 1.0 skills with the official `a2a-sdk` (`openadapt[a2a]`): Agent Card at `/.well-known/agent-card.json`, signed (A2A 1.0 section 8.4, EdDSA JWS by the Seal key that signs receipts; no server if the key can't be opened), JSON-RPC and HTTP+JSON, runs as tasks with status updates, the run's receipt as a handoff artifact when Flow wrote one (sandbox and strict at-rest runs have none), a `verify_handoff` skill, and the draft extension `https://openadapt.ai/extensions/handoff-receipt/v1`. Every call passes the MCP server's gate; person confirmations are not served; only `done` is completed. Loopback by default, a bearer token anywhere else, browser `Origin` and unknown `Host` refused | On main ([#2414](https://github.com/OpenAdaptAI/OpenAdapt/pull/2414)) | Synthetic: the official `a2a-sdk` 1.3.1 client against the server over HTTP on 127.0.0.1, with a governed run whose Flow process is stubbed and whose receipt Flow's writer signs; the official A2A TCK (a2aproject/a2a-tck at 5e6f37c): 110 automated checks passed and 11 failed, MUST 76.0%. The failures are 10 SDK-scenario tests that expect the TCK's own scripted agent, and the SDK's error Content-Type ([benchmark/a2a_tck](packages/flow/benchmark/a2a_tck/README.md)); the card signature verified by the `a2a-sdk` verifier and refused when changed, unpinned or relabelled (the TCK leaves signing to manual checks) | `openadapt_flow/agent/a2a_server.py`, [A2A.md](packages/flow/docs/A2A.md) | +| A2A (Agent2Agent) protocol adapter: `openadapt agent serve --a2a` serves compiled workflows as A2A 1.0 skills with the official `a2a-sdk` (`openadapt[a2a]`): Agent Card at `/.well-known/agent-card.json`, signed (A2A 1.0 section 8.4, EdDSA JWS by the Seal key that signs receipts; no server if the key can't be opened), JSON-RPC and HTTP+JSON, runs as tasks with status updates, the run's receipt as a handoff artifact when Flow wrote one (sandbox and strict at-rest runs have none), a `verify_handoff` skill, and the draft extension `https://openadapt.ai/extensions/handoff-receipt/v1`. Every call passes the MCP server's gate; person confirmations are not served; only `done` is completed. Loopback by default, a bearer token anywhere else, browser `Origin` and unknown `Host` refused | On main ([#2414](https://github.com/OpenAdaptAI/OpenAdapt/pull/2414)) | Synthetic: the official `a2a-sdk` 1.3.1 client against the server over HTTP on 127.0.0.1, with a governed run whose Flow process is stubbed and whose receipt Flow's writer signs; the official A2A TCK (a2aproject/a2a-tck at 5e6f37c, 2026-11-30, sandbox server with `--a2a-tck-scenarios`): 121 automated checks passed, 0 failed, 142 skipped (gRPC, push, cancel, auth scenarios), MUST 78.7% because the TCK counts skipped and manual checks as not passed ([benchmark/a2a_tck](packages/flow/benchmark/a2a_tck/README.md)); the card signature verified by the `a2a-sdk` verifier and refused when changed, unpinned or relabelled (the TCK leaves signing to manual checks) | `openadapt_flow/agent/a2a_server.py`, [A2A.md](packages/flow/docs/A2A.md) | | Teach over MCP: an agent does a new task once through OpenAdapt; the run is read back, compiled and admitted (a person confirms the record check; the agent admits only under a person-signed policy), and becomes a tool it calls with no model calls. Web, and Windows, macOS, Linux, RDP and Citrix with a person approving each save | On main ([#1335](https://github.com/OpenAdaptAI/OpenAdapt/pull/1335)) | Synthetic (MockMed over MCP, and through the real RDP and Citrix backends); a native Cocoa app with SQLite through `MacOSBackend`, taught, confirmed, admitted under a signed policy and called (canary and taught run `VERIFIED`, 0 model calls; [teach_desktop](packages/flow/benchmark/teach_desktop/README.md)) | `openadapt-agent serve --teach`, [packages/agent](packages/agent/README.md#teach-a-new-workflow-from-your-agent) | | Turn a read-only browser task into a tool for the coding agent you already use: `openadapt setup` registers the MCP server and a skill in Claude Code, Cursor, Codex and Gemini CLI (idempotent, `--dry-run`, `--undo`); `openadapt setup --app deploy.yaml --verify verify.yaml` sets the agent up to teach saves in one web, desktop, RDP or Citrix app instead, each read back from the system of record. Read-only teaching runs only where a guard stops writes before they leave (the browser); `serve --teach-browser --config` naming a desktop, RDP or Citrix app is refused; the agent does the task once through `teach_start`/`teach_act`/`teach_finish`, the task must end in a download, the file is checked (columns, a column between two inputs or equal to one, fewest rows), the compiled steps are replayed once with no model, and the agent gets a `taught_` tool that downloads a checked file with new inputs. The browser sends no POST, PUT, PATCH or DELETE and stays on one site; a compiled run stops when a control is missing, matches more than one element, or is relabelled | Released ([#1502](https://github.com/OpenAdaptAI/OpenAdapt/pull/1502)) | Real headless Chromium on the local example portal (scripted MCP client, in CI); a real Claude Code agent taught the export from the guide's prompt and called the tool with new dates (2026-10-24, one run) | `openadapt setup`, `openadapt-agent serve --teach-browser`, [FIRST_TOOL.md](packages/flow/docs/FIRST_TOOL.md) | | Verify any agent's own writes: `openadapt verify` reads the system of record before and after a write, against a contract the operator owns (REST, FHIR, SQL, GraphQL), and returns a verified receipt (`openadapt.effect-receipt/v1`) or a refusal (`REFUTED`, `UNCERTAIN`), never an unverified success. Python SDK (`openadapt.verify`, which is `openadapt_flow.verifier`: `begin_write`, `verify_write`, `verified_write`) wraps a write in any agent framework; the MCP server (`openadapt verify serve`) offers `verify_begin`, `verify_check` and `verify_recheck` to any MCP client | Released ([#1589](https://github.com/OpenAdaptAI/OpenAdapt/pull/1589)) | Synthetic (MockMed's fault server over real HTTP: correct write, wrong record, not saved, saved twice, unreadable store) | `openadapt verify`, [VERIFY_WRITES.md](packages/flow/docs/VERIFY_WRITES.md) | diff --git a/capabilities/10-computer-use-agents/0070-a2a-agent2agent-protocol-adapter-openadapt-agent.md b/capabilities/10-computer-use-agents/0070-a2a-agent2agent-protocol-adapter-openadapt-agent.md index 1677e9a0d2..6ae394f94f 100644 --- a/capabilities/10-computer-use-agents/0070-a2a-agent2agent-protocol-adapter-openadapt-agent.md +++ b/capabilities/10-computer-use-agents/0070-a2a-agent2agent-protocol-adapter-openadapt-agent.md @@ -1 +1 @@ -| A2A (Agent2Agent) protocol adapter: `openadapt agent serve --a2a` serves compiled workflows as A2A 1.0 skills with the official `a2a-sdk` (`openadapt[a2a]`): Agent Card at `/.well-known/agent-card.json`, signed (A2A 1.0 section 8.4, EdDSA JWS by the Seal key that signs receipts; no server if the key can't be opened), JSON-RPC and HTTP+JSON, runs as tasks with status updates, the run's receipt as a handoff artifact when Flow wrote one (sandbox and strict at-rest runs have none), a `verify_handoff` skill, and the draft extension `https://openadapt.ai/extensions/handoff-receipt/v1`. Every call passes the MCP server's gate; person confirmations are not served; only `done` is completed. Loopback by default, a bearer token anywhere else, browser `Origin` and unknown `Host` refused | On main ([#2414](https://github.com/OpenAdaptAI/OpenAdapt/pull/2414)) | Synthetic: the official `a2a-sdk` 1.3.1 client against the server over HTTP on 127.0.0.1, with a governed run whose Flow process is stubbed and whose receipt Flow's writer signs; the official A2A TCK (a2aproject/a2a-tck at 5e6f37c): 110 automated checks passed and 11 failed, MUST 76.0%. The failures are 10 SDK-scenario tests that expect the TCK's own scripted agent, and the SDK's error Content-Type ([benchmark/a2a_tck](packages/flow/benchmark/a2a_tck/README.md)); the card signature verified by the `a2a-sdk` verifier and refused when changed, unpinned or relabelled (the TCK leaves signing to manual checks) | `openadapt_flow/agent/a2a_server.py`, [A2A.md](packages/flow/docs/A2A.md) | +| A2A (Agent2Agent) protocol adapter: `openadapt agent serve --a2a` serves compiled workflows as A2A 1.0 skills with the official `a2a-sdk` (`openadapt[a2a]`): Agent Card at `/.well-known/agent-card.json`, signed (A2A 1.0 section 8.4, EdDSA JWS by the Seal key that signs receipts; no server if the key can't be opened), JSON-RPC and HTTP+JSON, runs as tasks with status updates, the run's receipt as a handoff artifact when Flow wrote one (sandbox and strict at-rest runs have none), a `verify_handoff` skill, and the draft extension `https://openadapt.ai/extensions/handoff-receipt/v1`. Every call passes the MCP server's gate; person confirmations are not served; only `done` is completed. Loopback by default, a bearer token anywhere else, browser `Origin` and unknown `Host` refused | On main ([#2414](https://github.com/OpenAdaptAI/OpenAdapt/pull/2414)) | Synthetic: the official `a2a-sdk` 1.3.1 client against the server over HTTP on 127.0.0.1, with a governed run whose Flow process is stubbed and whose receipt Flow's writer signs; the official A2A TCK (a2aproject/a2a-tck at 5e6f37c, 2026-11-30, sandbox server with `--a2a-tck-scenarios`): 121 automated checks passed, 0 failed, 142 skipped (gRPC, push, cancel, auth scenarios), MUST 78.7% because the TCK counts skipped and manual checks as not passed ([benchmark/a2a_tck](packages/flow/benchmark/a2a_tck/README.md)); the card signature verified by the `a2a-sdk` verifier and refused when changed, unpinned or relabelled (the TCK leaves signing to manual checks) | `openadapt_flow/agent/a2a_server.py`, [A2A.md](packages/flow/docs/A2A.md) | diff --git a/capabilities/CAPABILITIES.md.sha256 b/capabilities/CAPABILITIES.md.sha256 index de5058ce54..d84d40f835 100644 --- a/capabilities/CAPABILITIES.md.sha256 +++ b/capabilities/CAPABILITIES.md.sha256 @@ -1 +1 @@ -b33f68de0af85a75b4c1dc96f0fe9520ac8adac45255c1b8b34c835ba71eedbf +5a4502dcc30b599e3bf1ac3a551ee291c02cfe40e6a8620c5a75deaa06897919 diff --git a/llms-full.txt b/llms-full.txt index bbfb1dc5e6..63be03bd69 100644 --- a/llms-full.txt +++ b/llms-full.txt @@ -529,7 +529,7 @@ improvising or retrying when something is off. | Admit a draft by a person, an admitter key, or an agent under a person-signed policy, including self-admission when the policy allows it | Released | Unit tests | [JIT_ADMISSION.md](https://github.com/OpenAdaptAI/OpenAdapt/blob/main/packages/flow/docs/JIT_ADMISSION.md) | | MCP server: your agent decides what to enter, OpenAdapt makes the entry and checks it | Released | Synthetic sandbox | `openadapt-agent`, [packages/agent](https://github.com/OpenAdaptAI/OpenAdapt/blob/main/packages/agent/README.md) | | Agent-to-agent handoffs: when one agent hands a result to another, the run's signed receipt (`record/run/v1`) goes with it (`openadapt handoff send`, inline, detached beside a file, or POSTed to a webhook), and the receiver checks it against keys it pins (`openadapt handoff verify`). The verdict gives the signer role from the receiver's registry, integrity, checks passed and not checked, and "confirmed in the other party's system" lines; it always says a valid signature proves who signed, not that the claim is true, binds the payload as the receipt's `payload` subject (re-signed by the run's own key; other bytes or no payload subject are refused), and counts a confirmation as independent only when it was read from the other party's system. Over MCP, `serve --handoffs` adds `get_handoff` and `verify_handoff`. The private openings never travel | On main ([#2414](https://github.com/OpenAdaptAI/OpenAdapt/pull/2414)) | Unit tests over receipts from Flow's own writer and the shared `record/run/v1` confirmation vectors and the shared payload vectors (good, tampered, unknown signer, bound, mismatched and missing payload, detached file, local webhook); MCP and A2A end to end with the stubbed run process; a two-party test of 20 handoffs over HTTP (0 false accepts, 0 true rejects); one real headless MockMed run handed off over the CLI and checked against the receiver's own record ([benchmark/handoff_real_run](https://github.com/OpenAdaptAI/OpenAdapt/blob/main/packages/flow/benchmark/handoff_real_run/README.md)); `--ledger` tested against #2415's `HandoffLedger` | `openadapt handoff`, `openadapt_flow/handoff.py`, [HANDOFFS.md](https://github.com/OpenAdaptAI/OpenAdapt/blob/main/packages/flow/docs/HANDOFFS.md), draft format [HANDOFF_RECEIPTS.md](https://github.com/OpenAdaptAI/OpenAdapt/blob/main/packages/flow/docs/HANDOFF_RECEIPTS.md) | -| A2A (Agent2Agent) protocol adapter: `openadapt agent serve --a2a` serves compiled workflows as A2A 1.0 skills with the official `a2a-sdk` (`openadapt[a2a]`): Agent Card at `/.well-known/agent-card.json`, signed (A2A 1.0 section 8.4, EdDSA JWS by the Seal key that signs receipts; no server if the key can't be opened), JSON-RPC and HTTP+JSON, runs as tasks with status updates, the run's receipt as a handoff artifact when Flow wrote one (sandbox and strict at-rest runs have none), a `verify_handoff` skill, and the draft extension `https://openadapt.ai/extensions/handoff-receipt/v1`. Every call passes the MCP server's gate; person confirmations are not served; only `done` is completed. Loopback by default, a bearer token anywhere else, browser `Origin` and unknown `Host` refused | On main ([#2414](https://github.com/OpenAdaptAI/OpenAdapt/pull/2414)) | Synthetic: the official `a2a-sdk` 1.3.1 client against the server over HTTP on 127.0.0.1, with a governed run whose Flow process is stubbed and whose receipt Flow's writer signs; the official A2A TCK (a2aproject/a2a-tck at 5e6f37c): 110 automated checks passed and 11 failed, MUST 76.0%. The failures are 10 SDK-scenario tests that expect the TCK's own scripted agent, and the SDK's error Content-Type ([benchmark/a2a_tck](https://github.com/OpenAdaptAI/OpenAdapt/blob/main/packages/flow/benchmark/a2a_tck/README.md)); the card signature verified by the `a2a-sdk` verifier and refused when changed, unpinned or relabelled (the TCK leaves signing to manual checks) | `openadapt_flow/agent/a2a_server.py`, [A2A.md](https://github.com/OpenAdaptAI/OpenAdapt/blob/main/packages/flow/docs/A2A.md) | +| A2A (Agent2Agent) protocol adapter: `openadapt agent serve --a2a` serves compiled workflows as A2A 1.0 skills with the official `a2a-sdk` (`openadapt[a2a]`): Agent Card at `/.well-known/agent-card.json`, signed (A2A 1.0 section 8.4, EdDSA JWS by the Seal key that signs receipts; no server if the key can't be opened), JSON-RPC and HTTP+JSON, runs as tasks with status updates, the run's receipt as a handoff artifact when Flow wrote one (sandbox and strict at-rest runs have none), a `verify_handoff` skill, and the draft extension `https://openadapt.ai/extensions/handoff-receipt/v1`. Every call passes the MCP server's gate; person confirmations are not served; only `done` is completed. Loopback by default, a bearer token anywhere else, browser `Origin` and unknown `Host` refused | On main ([#2414](https://github.com/OpenAdaptAI/OpenAdapt/pull/2414)) | Synthetic: the official `a2a-sdk` 1.3.1 client against the server over HTTP on 127.0.0.1, with a governed run whose Flow process is stubbed and whose receipt Flow's writer signs; the official A2A TCK (a2aproject/a2a-tck at 5e6f37c, 2026-11-30, sandbox server with `--a2a-tck-scenarios`): 121 automated checks passed, 0 failed, 142 skipped (gRPC, push, cancel, auth scenarios), MUST 78.7% because the TCK counts skipped and manual checks as not passed ([benchmark/a2a_tck](https://github.com/OpenAdaptAI/OpenAdapt/blob/main/packages/flow/benchmark/a2a_tck/README.md)); the card signature verified by the `a2a-sdk` verifier and refused when changed, unpinned or relabelled (the TCK leaves signing to manual checks) | `openadapt_flow/agent/a2a_server.py`, [A2A.md](https://github.com/OpenAdaptAI/OpenAdapt/blob/main/packages/flow/docs/A2A.md) | | Teach over MCP: an agent does a new task once through OpenAdapt; the run is read back, compiled and admitted (a person confirms the record check; the agent admits only under a person-signed policy), and becomes a tool it calls with no model calls. Web, and Windows, macOS, Linux, RDP and Citrix with a person approving each save | On main ([#1335](https://github.com/OpenAdaptAI/OpenAdapt/pull/1335)) | Synthetic (MockMed over MCP, and through the real RDP and Citrix backends); a native Cocoa app with SQLite through `MacOSBackend`, taught, confirmed, admitted under a signed policy and called (canary and taught run `VERIFIED`, 0 model calls; [teach_desktop](https://github.com/OpenAdaptAI/OpenAdapt/blob/main/packages/flow/benchmark/teach_desktop/README.md)) | `openadapt-agent serve --teach`, [packages/agent](https://github.com/OpenAdaptAI/OpenAdapt/blob/main/packages/agent/README.md#teach-a-new-workflow-from-your-agent) | | Turn a read-only browser task into a tool for the coding agent you already use: `openadapt setup` registers the MCP server and a skill in Claude Code, Cursor, Codex and Gemini CLI (idempotent, `--dry-run`, `--undo`); `openadapt setup --app deploy.yaml --verify verify.yaml` sets the agent up to teach saves in one web, desktop, RDP or Citrix app instead, each read back from the system of record. Read-only teaching runs only where a guard stops writes before they leave (the browser); `serve --teach-browser --config` naming a desktop, RDP or Citrix app is refused; the agent does the task once through `teach_start`/`teach_act`/`teach_finish`, the task must end in a download, the file is checked (columns, a column between two inputs or equal to one, fewest rows), the compiled steps are replayed once with no model, and the agent gets a `taught_` tool that downloads a checked file with new inputs. The browser sends no POST, PUT, PATCH or DELETE and stays on one site; a compiled run stops when a control is missing, matches more than one element, or is relabelled | Released ([#1502](https://github.com/OpenAdaptAI/OpenAdapt/pull/1502)) | Real headless Chromium on the local example portal (scripted MCP client, in CI); a real Claude Code agent taught the export from the guide's prompt and called the tool with new dates (2026-10-24, one run) | `openadapt setup`, `openadapt-agent serve --teach-browser`, [FIRST_TOOL.md](https://github.com/OpenAdaptAI/OpenAdapt/blob/main/packages/flow/docs/FIRST_TOOL.md) | | Verify any agent's own writes: `openadapt verify` reads the system of record before and after a write, against a contract the operator owns (REST, FHIR, SQL, GraphQL), and returns a verified receipt (`openadapt.effect-receipt/v1`) or a refusal (`REFUTED`, `UNCERTAIN`), never an unverified success. Python SDK (`openadapt.verify`, which is `openadapt_flow.verifier`: `begin_write`, `verify_write`, `verified_write`) wraps a write in any agent framework; the MCP server (`openadapt verify serve`) offers `verify_begin`, `verify_check` and `verify_recheck` to any MCP client | Released ([#1589](https://github.com/OpenAdaptAI/OpenAdapt/pull/1589)) | Synthetic (MockMed's fault server over real HTTP: correct write, wrong record, not saved, saved twice, unreadable store) | `openadapt verify`, [VERIFY_WRITES.md](https://github.com/OpenAdaptAI/OpenAdapt/blob/main/packages/flow/docs/VERIFY_WRITES.md) | diff --git a/packages/agent/tests/test_handoff_e2e.py b/packages/agent/tests/test_handoff_e2e.py index 8f2427bd61..ac4a963588 100644 --- a/packages/agent/tests/test_handoff_e2e.py +++ b/packages/agent/tests/test_handoff_e2e.py @@ -648,3 +648,65 @@ def signer(self): bridge.handoffs = BrokenHandoffs() with pytest.raises(RuntimeError, match="key_unavailable"): a2a_server.build_app(bridge, a2a_server.A2AConfig(port=_free_port())) + + +def test_a2a_rest_errors_use_the_a2a_media_type(a2a_url): + """TCK HTTP_JSON-SVC-001: HTTP+JSON errors are application/a2a+json (1.0.1).""" + missing = httpx.get( + a2a_url + "/a2a/rest/tasks/no-such-task", headers={"A2A-Version": "1.0"} + ) + assert missing.status_code >= 400 + assert missing.headers["content-type"].split(";")[0] == "application/a2a+json" + assert "error" in missing.json() + # JSON-RPC keeps application/json, and the card is plain JSON. + card = httpx.get(a2a_url + "/.well-known/agent-card.json") + assert card.headers["content-type"].split(";")[0] == "application/json" + + +# -- the A2A TCK's scripted scenarios --------------------------------------------- + + +def test_tck_scenarios_need_sandbox_and_loopback(bridge): + with pytest.raises(ValueError, match="loopback"): + a2a_server.A2AConfig(host="0.0.0.0", token="t" * 40, tck_scenarios=True) + # The fixture's bridge runs real workflows (production): refused. + with pytest.raises(ValueError, match="--mode sandbox"): + a2a_server.build_app(bridge, a2a_server.A2AConfig(port=_free_port(), tck_scenarios=True)) + + +def _jsonrpc_send(client, message_id): + body = { + "jsonrpc": "2.0", + "id": 1, + "method": "SendMessage", + "params": { + "message": {"messageId": message_id, "role": "ROLE_USER", "parts": [{"text": "x"}]} + }, + } + response = client.post("/a2a/jsonrpc", json=body, headers={"A2A-Version": "1.0"}) + assert response.status_code == 200 + return response.json()["result"] + + +def test_tck_scenarios_answer_only_when_turned_on(bridge, monkeypatch): + from starlette.testclient import TestClient + + monkeypatch.setattr(bridge, "mode", "sandbox") + config = a2a_server.A2AConfig(port=_free_port(), tck_scenarios=True) + client = TestClient(a2a_server.build_app(bridge, config), base_url=config.base_url) + task = _jsonrpc_send(client, "tck-artifact-text-001")["task"] + assert task["status"]["state"] == "TASK_STATE_COMPLETED" + assert task["artifacts"][0]["parts"][0]["text"] == "Generated text content" + url = _jsonrpc_send(client, "tck-artifact-file-url-001")["task"]["artifacts"][0]["parts"][0] + assert url["url"] == "https://example.com/output.txt" and url["filename"] == "output.txt" + data = _jsonrpc_send(client, "tck-artifact-data-001")["task"]["artifacts"][0]["parts"][0] + assert data["data"] == {"key": "value", "count": 42} + message = _jsonrpc_send(client, "tck-message-response-001") + assert "task" not in message + assert message["message"]["parts"][0]["text"] == "Direct message response" + + # Off by default: the same message is an ordinary request, not a script. + off = a2a_server.A2AConfig(port=_free_port()) + plain = TestClient(a2a_server.build_app(bridge, off), base_url=off.base_url) + task = _jsonrpc_send(plain, "tck-artifact-text-001")["task"] + assert "Generated text content" not in json.dumps(task) diff --git a/packages/flow/benchmark/a2a_tck/2026-11-30/compatibility.json b/packages/flow/benchmark/a2a_tck/2026-11-30/compatibility.json new file mode 100644 index 0000000000..cc657917c2 --- /dev/null +++ b/packages/flow/benchmark/a2a_tck/2026-11-30/compatibility.json @@ -0,0 +1,1716 @@ +{ + "summary": { + "score_scope": "automated", + "manual_verification_required": [ + "CARD-CLIENT-001", + "CARD-SIGN-001", + "CARD-SIGN-002", + "CARD-SIGN-003", + "CARD-SIGN-004", + "AUTH-TLS-001", + "AUTH-TLS-002", + "AUTH-SERVER-001", + "BIND-CUSTOM-002" + ], + "timestamp": "2026-11-30T19:53:39.858728+00:00", + "sut_url": "http://localhost:9999", + "spec_version": "", + "overall_compatibility": "78.6%", + "must_compatibility": "78.7%", + "should_compatibility": "71.4%", + "may_compatibility": "100.0%" + }, + "per_requirement": { + "CARD-DISC-001": { + "level": "MUST", + "status": "PASS", + "transports": { + "agent_card": "PASS" + }, + "errors": [], + "test_ids": [ + "tests/compatibility/agent_card/test_agent_card.py::TestAgentCardDiscovery::test_agent_card_retrievable" + ] + }, + "CARD-STRUCT-001": { + "level": "MUST", + "status": "PASS", + "transports": { + "agent_card": "PASS" + }, + "errors": [], + "test_ids": [ + "tests/compatibility/agent_card/test_agent_card.py::TestAgentCardStructure::test_agent_card_validates_against_schema", + "tests/compatibility/agent_card/test_agent_card.py::TestAgentCardStructure::test_required_fields_present" + ] + }, + "CARD-PROTO-001": { + "level": "MUST", + "status": "PASS", + "transports": { + "agent_card": "PASS" + }, + "errors": [], + "test_ids": [ + "tests/compatibility/agent_card/test_agent_card.py::TestAgentCardProtocol::test_supported_interfaces_non_empty" + ] + }, + "CARD-PROTO-002": { + "level": "MUST", + "status": "PASS", + "transports": { + "agent_card": "PASS" + }, + "errors": [], + "test_ids": [ + "tests/compatibility/agent_card/test_agent_card.py::TestAgentCardProtocol::test_each_interface_validates_against_schema" + ] + }, + "BIND-FIELD-001": { + "level": "MUST", + "status": "PASS", + "transports": { + "agent_card": "PASS" + }, + "errors": [], + "test_ids": [ + "tests/compatibility/agent_card/test_agent_card.py::TestBindingFieldDeclaration::test_all_protocols_declared" + ] + }, + "BIND-CUSTOM-001": { + "level": "SHOULD", + "status": "SKIPPED", + "transports": { + "agent_card": "SKIPPED" + }, + "errors": [], + "test_ids": [ + "tests/compatibility/agent_card/test_agent_card.py::TestCustomBindingIdentifiers::test_custom_binding_identifiers_are_uris" + ] + }, + "CARD-CACHE-001": { + "level": "SHOULD", + "status": "PASS", + "transports": { + "agent_card": "PASS" + }, + "errors": [], + "test_ids": [ + "tests/compatibility/agent_card/test_agent_card_caching.py::TestAgentCardCacheControl::test_cache_control_has_max_age", + "tests/compatibility/agent_card/test_agent_card_caching.py::TestAgentCardCacheControl::test_cache_control_present" + ] + }, + "CARD-CACHE-002": { + "level": "SHOULD", + "status": "PASS", + "transports": { + "agent_card": "PASS" + }, + "errors": [], + "test_ids": [ + "tests/compatibility/agent_card/test_agent_card_caching.py::TestAgentCardETag::test_etag_present" + ] + }, + "CARD-CACHE-003": { + "level": "MAY", + "status": "SKIPPED", + "transports": { + "agent_card": "SKIPPED" + }, + "errors": [], + "test_ids": [ + "tests/compatibility/agent_card/test_agent_card_caching.py::TestAgentCardLastModified::test_last_modified_present" + ] + }, + "DM-ART-001": { + "level": "MUST", + "status": "PASS", + "transports": { + "grpc": "SKIPPED", + "jsonrpc": "PASS", + "http_json": "PASS" + }, + "errors": [], + "test_ids": [ + "tests/compatibility/core_operations/test_artifacts.py::TestDataArtifact::test_task_has_data_artifact[grpc]", + "tests/compatibility/core_operations/test_artifacts.py::TestDataArtifact::test_task_has_data_artifact[http_json]", + "tests/compatibility/core_operations/test_artifacts.py::TestDataArtifact::test_task_has_data_artifact[jsonrpc]", + "tests/compatibility/core_operations/test_artifacts.py::TestFileArtifact::test_task_has_file_artifact[grpc]", + "tests/compatibility/core_operations/test_artifacts.py::TestFileArtifact::test_task_has_file_artifact[http_json]", + "tests/compatibility/core_operations/test_artifacts.py::TestFileArtifact::test_task_has_file_artifact[jsonrpc]", + "tests/compatibility/core_operations/test_artifacts.py::TestFileUrlArtifact::test_task_has_file_url_artifact[grpc]", + "tests/compatibility/core_operations/test_artifacts.py::TestFileUrlArtifact::test_task_has_file_url_artifact[http_json]", + "tests/compatibility/core_operations/test_artifacts.py::TestFileUrlArtifact::test_task_has_file_url_artifact[jsonrpc]", + "tests/compatibility/core_operations/test_artifacts.py::TestTextArtifact::test_task_has_text_artifact[grpc]", + "tests/compatibility/core_operations/test_artifacts.py::TestTextArtifact::test_task_has_text_artifact[http_json]", + "tests/compatibility/core_operations/test_artifacts.py::TestTextArtifact::test_task_has_text_artifact[jsonrpc]", + "tests/compatibility/core_operations/test_data_model.py::TestSendMessageResponseSchema::test_response_validates_against_schema" + ] + }, + "DM-MSG-001": { + "level": "MUST", + "status": "PASS", + "transports": { + "grpc": "SKIPPED", + "jsonrpc": "PASS", + "http_json": "PASS" + }, + "errors": [], + "test_ids": [ + "tests/compatibility/core_operations/test_artifacts.py::TestMessageResponse::test_returns_message_with_text_part[grpc]", + "tests/compatibility/core_operations/test_artifacts.py::TestMessageResponse::test_returns_message_with_text_part[http_json]", + "tests/compatibility/core_operations/test_artifacts.py::TestMessageResponse::test_returns_message_with_text_part[jsonrpc]", + "tests/compatibility/core_operations/test_data_model.py::TestSendMessageResponseSchema::test_response_validates_against_schema" + ] + }, + "DM-TASK-001": { + "level": "MUST", + "status": "PASS", + "transports": { + "jsonrpc": "PASS", + "http_json": "PASS" + }, + "errors": [], + "test_ids": [ + "tests/compatibility/core_operations/test_data_model.py::TestSendMessageResponseSchema::test_response_validates_against_schema" + ] + }, + "DM-TASK-002": { + "level": "MUST", + "status": "PASS", + "transports": { + "jsonrpc": "PASS", + "http_json": "PASS" + }, + "errors": [], + "test_ids": [ + "tests/compatibility/core_operations/test_data_model.py::TestSendMessageResponseSchema::test_response_validates_against_schema" + ] + }, + "DM-MSG-002": { + "level": "MUST", + "status": "PASS", + "transports": { + "jsonrpc": "PASS", + "http_json": "PASS" + }, + "errors": [], + "test_ids": [ + "tests/compatibility/core_operations/test_data_model.py::TestSendMessageResponseSchema::test_response_validates_against_schema" + ] + }, + "DM-PART-001": { + "level": "MUST", + "status": "PASS", + "transports": { + "jsonrpc": "PASS", + "http_json": "PASS" + }, + "errors": [], + "test_ids": [ + "tests/compatibility/core_operations/test_data_model.py::TestSendMessageResponseSchema::test_response_validates_against_schema" + ] + }, + "DM-STATUS-001": { + "level": "MUST", + "status": "PASS", + "transports": { + "jsonrpc": "PASS", + "http_json": "PASS" + }, + "errors": [], + "test_ids": [ + "tests/compatibility/core_operations/test_data_model.py::TestSendMessageResponseSchema::test_response_validates_against_schema" + ] + }, + "DM-SERIAL-004": { + "level": "MUST", + "status": "PASS", + "transports": { + "jsonrpc": "PASS", + "http_json": "PASS" + }, + "errors": [], + "test_ids": [ + "tests/compatibility/core_operations/test_data_model.py::TestSendMessageResponseSchema::test_response_validates_against_schema" + ] + }, + "DM-SERIAL-001": { + "level": "MUST", + "status": "PASS", + "transports": { + "jsonrpc": "PASS", + "http_json": "PASS" + }, + "errors": [], + "test_ids": [ + "tests/compatibility/core_operations/test_data_model.py::TestCamelCaseFieldNames::test_no_snake_case_keys" + ] + }, + "DM-SERIAL-002": { + "level": "MUST", + "status": "PASS", + "transports": { + "jsonrpc": "PASS", + "http_json": "PASS" + }, + "errors": [], + "test_ids": [ + "tests/compatibility/core_operations/test_data_model.py::TestEnumSerialization::test_enum_values_are_strings" + ] + }, + "DM-SERIAL-003": { + "level": "MUST", + "status": "PASS", + "transports": { + "jsonrpc": "PASS", + "http_json": "PASS" + }, + "errors": [], + "test_ids": [ + "tests/compatibility/core_operations/test_data_model.py::TestTimestampFormat::test_timestamps_are_iso8601_utc" + ] + }, + "DM-SERIAL-005": { + "level": "SHOULD", + "status": "PASS", + "transports": { + "jsonrpc": "PASS", + "http_json": "PASS" + }, + "errors": [], + "test_ids": [ + "tests/compatibility/core_operations/test_data_model.py::TestIgnoreUnrecognizedFields::test_extra_fields_ignored_jsonrpc", + "tests/compatibility/core_operations/test_data_model.py::TestIgnoreUnrecognizedFields::test_extra_fields_ignored_rest" + ] + }, + "CORE-ERR-001": { + "level": "MUST", + "status": "PASS", + "transports": { + "jsonrpc": "PASS", + "http_json": "PASS" + }, + "errors": [], + "test_ids": [ + "tests/compatibility/core_operations/test_error_handling.py::TestCoreErrorStructure::test_error_has_code_and_message_jsonrpc", + "tests/compatibility/core_operations/test_error_handling.py::TestCoreErrorStructure::test_error_has_code_and_message_rest" + ] + }, + "CORE-ERR-002": { + "level": "MUST", + "status": "PASS", + "transports": { + "jsonrpc": "PASS", + "http_json": "PASS" + }, + "errors": [], + "test_ids": [ + "tests/compatibility/core_operations/test_error_handling.py::TestCoreInputValidation::test_malformed_request_rejected_jsonrpc", + "tests/compatibility/core_operations/test_error_handling.py::TestCoreInputValidation::test_malformed_request_rejected_rest" + ] + }, + "CORE-CAP-001": { + "level": "MUST", + "status": "PASS", + "transports": { + "jsonrpc": "PASS", + "http_json": "PASS" + }, + "errors": [], + "test_ids": [ + "tests/compatibility/core_operations/test_error_handling.py::TestCapabilityPushNotifications::test_push_not_supported_jsonrpc", + "tests/compatibility/core_operations/test_error_handling.py::TestCapabilityPushNotifications::test_push_not_supported_rest" + ] + }, + "CORE-CAP-002": { + "level": "MUST", + "status": "SKIPPED", + "transports": { + "jsonrpc": "SKIPPED" + }, + "errors": [], + "test_ids": [ + "tests/compatibility/core_operations/test_error_handling.py::TestCapabilityStreaming::test_streaming_not_supported_jsonrpc" + ] + }, + "CORE-CAP-004": { + "level": "MUST", + "status": "SKIPPED", + "transports": { + "jsonrpc": "SKIPPED", + "http_json": "SKIPPED" + }, + "errors": [], + "test_ids": [ + "tests/compatibility/core_operations/test_error_handling.py::TestCapabilityExtensionRequired::test_missing_required_extension_returns_error_http_json", + "tests/compatibility/core_operations/test_error_handling.py::TestCapabilityExtensionRequired::test_missing_required_extension_returns_error_jsonrpc" + ] + }, + "CORE-CAP-003": { + "level": "MUST", + "status": "PASS", + "transports": { + "jsonrpc": "PASS" + }, + "errors": [], + "test_ids": [ + "tests/compatibility/core_operations/test_error_handling.py::TestCapabilityExtendedCard::test_extended_card_not_supported_jsonrpc" + ] + }, + "CARD-EXT-002": { + "level": "MUST", + "status": "SKIPPED", + "transports": { + "jsonrpc": "SKIPPED", + "http_json": "SKIPPED", + "grpc": "SKIPPED" + }, + "errors": [], + "test_ids": [ + "tests/compatibility/core_operations/test_error_handling.py::TestExtendedCardNotConfigured::test_extended_card_not_configured_grpc", + "tests/compatibility/core_operations/test_error_handling.py::TestExtendedCardNotConfigured::test_extended_card_not_configured_http_json", + "tests/compatibility/core_operations/test_error_handling.py::TestExtendedCardNotConfigured::test_extended_card_not_configured_jsonrpc" + ] + }, + "CARD-EXT-001": { + "level": "MUST", + "status": "SKIPPED", + "transports": { + "jsonrpc": "SKIPPED", + "http_json": "SKIPPED", + "grpc": "SKIPPED" + }, + "errors": [], + "test_ids": [ + "tests/compatibility/core_operations/test_error_handling.py::TestExtendedCardRequiresAuth::test_extended_card_requires_auth_grpc", + "tests/compatibility/core_operations/test_error_handling.py::TestExtendedCardRequiresAuth::test_extended_card_requires_auth_http_json", + "tests/compatibility/core_operations/test_error_handling.py::TestExtendedCardRequiresAuth::test_extended_card_requires_auth_jsonrpc" + ] + }, + "VER-SERVER-002": { + "level": "MUST", + "status": "PASS", + "transports": { + "jsonrpc": "PASS", + "http_json": "PASS" + }, + "errors": [], + "test_ids": [ + "tests/compatibility/core_operations/test_error_handling.py::TestVersionErrors::test_unsupported_version_returns_error_jsonrpc", + "tests/compatibility/core_operations/test_error_handling.py::TestVersionErrors::test_unsupported_version_returns_error_rest" + ] + }, + "VER-SERVER-003": { + "level": "MUST", + "status": "PASS", + "transports": { + "jsonrpc": "PASS" + }, + "errors": [], + "test_ids": [ + "tests/compatibility/core_operations/test_error_handling.py::TestVersionErrors::test_empty_version_treated_as_default_jsonrpc" + ] + }, + "JSONRPC-ERR-001": { + "level": "MUST", + "status": "PASS", + "transports": { + "jsonrpc": "PASS" + }, + "errors": [], + "test_ids": [ + "tests/compatibility/core_operations/test_error_handling.py::TestJsonRpcErrorStructure::test_error_object_structure", + "tests/compatibility/jsonrpc/test_error_info.py::TestJsonRpcErrorDetails::test_present_error_data_is_any_array" + ] + }, + "JSONRPC-ERR-002": { + "level": "MUST", + "status": "PASS", + "transports": { + "jsonrpc": "PASS" + }, + "errors": [], + "test_ids": [ + "tests/compatibility/core_operations/test_error_handling.py::TestJsonRpcErrorStructure::test_a2a_error_codes_in_range" + ] + }, + "JSONRPC-SSE-002": { + "level": "MUST", + "status": "PASS", + "transports": { + "jsonrpc": "PASS" + }, + "errors": [], + "test_ids": [ + "tests/compatibility/core_operations/test_error_handling.py::TestJsonRpcErrorStructure::test_a2a_error_type_mappings", + "tests/compatibility/jsonrpc/test_error_codes.py::TestJsonRpcErrorCodeMappings::test_push_notification_not_supported_error", + "tests/compatibility/jsonrpc/test_error_codes.py::TestJsonRpcErrorCodeMappings::test_task_not_cancelable_error", + "tests/compatibility/jsonrpc/test_error_codes.py::TestJsonRpcErrorCodeMappings::test_task_not_found_error", + "tests/compatibility/jsonrpc/test_error_codes.py::TestJsonRpcErrorCodeMappings::test_unsupported_operation_error", + "tests/compatibility/jsonrpc/test_error_codes.py::TestJsonRpcErrorCodeMappings::test_version_not_supported_error", + "tests/compatibility/jsonrpc/test_error_codes.py::TestJsonRpcErrorCodeRange::test_error_code_in_valid_range[CancelTask-nonexistent]", + "tests/compatibility/jsonrpc/test_error_codes.py::TestJsonRpcErrorCodeRange::test_error_code_in_valid_range[GetTask-nonexistent]", + "tests/compatibility/jsonrpc/test_error_codes.py::TestJsonRpcErrorCodeRange::test_error_code_in_valid_range[SendMessage-bad-version]" + ] + }, + "JSONRPC-ERR-003": { + "level": "SHOULD", + "status": "PASS", + "transports": { + "jsonrpc": "PASS" + }, + "errors": [], + "test_ids": [ + "tests/compatibility/core_operations/test_error_handling.py::TestJsonRpcErrorStructure::test_error_data_contains_error_info", + "tests/compatibility/jsonrpc/test_error_info.py::TestJsonRpcWellKnownErrorDetails::test_error_data_uses_well_known_type" + ] + }, + "HTTP_JSON-ERR-001": { + "level": "MUST", + "status": "PASS", + "transports": { + "http_json": "PASS" + }, + "errors": [], + "test_ids": [ + "tests/compatibility/core_operations/test_error_handling.py::TestRestErrorStructure::test_error_uses_aip193_format", + "tests/compatibility/http_json/test_problem_details.py::TestAIP193ErrorFormat::test_code_field_matches_http_status", + "tests/compatibility/http_json/test_problem_details.py::TestAIP193ErrorFormat::test_error_object_present" + ] + }, + "HTTP_JSON-ERR-002": { + "level": "MUST", + "status": "PASS", + "transports": { + "http_json": "PASS" + }, + "errors": [], + "test_ids": [ + "tests/compatibility/core_operations/test_error_handling.py::TestRestErrorStructure::test_a2a_error_info_in_details", + "tests/compatibility/http_json/test_problem_details.py::TestAIP193ErrorInfo::test_details_contains_error_info", + "tests/compatibility/http_json/test_problem_details.py::TestAIP193ErrorInfo::test_error_info_reason_matches_condition", + "tests/compatibility/http_json/test_problem_details.py::TestAIP193ErrorInfo::test_error_info_valid" + ] + }, + "GRPC-ERR-001": { + "level": "MUST", + "status": "SKIPPED", + "transports": { + "grpc": "SKIPPED" + }, + "errors": [], + "test_ids": [ + "tests/compatibility/core_operations/test_error_handling.py::TestGrpcErrorStructure::test_grpc_error_for_nonexistent_task", + "tests/compatibility/grpc/test_status_codes.py::TestGrpcErrorInfo::test_error_info_in_status_details" + ] + }, + "STREAM-ORDER-002": { + "level": "MUST", + "status": "SKIPPED", + "transports": { + "grpc": "SKIPPED" + }, + "errors": [], + "test_ids": [ + "tests/compatibility/core_operations/test_multi_stream.py::TestMultiStreamOrdering::test_events_broadcast_to_all_streams[grpc]" + ] + }, + "STREAM-ORDER-003": { + "level": "MUST", + "status": "SKIPPED", + "transports": { + "grpc": "SKIPPED" + }, + "errors": [], + "test_ids": [ + "tests/compatibility/core_operations/test_multi_stream.py::TestMultiStreamOrdering::test_streams_receive_same_events_in_order[grpc]" + ] + }, + "STREAM-ORDER-004": { + "level": "MUST", + "status": "SKIPPED", + "transports": { + "grpc": "SKIPPED" + }, + "errors": [], + "test_ids": [ + "tests/compatibility/core_operations/test_multi_stream.py::TestMultiStreamOrdering::test_closing_one_stream_does_not_affect_others[grpc]" + ] + }, + "PUSH-CREATE-001": { + "level": "MUST", + "status": "SKIPPED", + "transports": { + "grpc": "SKIPPED", + "jsonrpc": "SKIPPED", + "http_json": "SKIPPED" + }, + "errors": [], + "test_ids": [ + "tests/compatibility/core_operations/test_push_notifications.py::TestPushNotificationCrud::test_create_push_config[grpc]", + "tests/compatibility/core_operations/test_push_notifications.py::TestPushNotificationCrud::test_create_push_config[http_json]", + "tests/compatibility/core_operations/test_push_notifications.py::TestPushNotificationCrud::test_create_push_config[jsonrpc]" + ] + }, + "PUSH-CREATE-002": { + "level": "MUST", + "status": "SKIPPED", + "transports": { + "grpc": "SKIPPED", + "jsonrpc": "SKIPPED", + "http_json": "SKIPPED" + }, + "errors": [], + "test_ids": [ + "tests/compatibility/core_operations/test_push_notifications.py::TestPushNotificationCrud::test_config_persists[grpc]", + "tests/compatibility/core_operations/test_push_notifications.py::TestPushNotificationCrud::test_config_persists[http_json]", + "tests/compatibility/core_operations/test_push_notifications.py::TestPushNotificationCrud::test_config_persists[jsonrpc]" + ] + }, + "PUSH-GET-001": { + "level": "MUST", + "status": "SKIPPED", + "transports": { + "grpc": "SKIPPED", + "jsonrpc": "SKIPPED", + "http_json": "SKIPPED" + }, + "errors": [], + "test_ids": [ + "tests/compatibility/core_operations/test_push_notifications.py::TestPushNotificationCrud::test_get_push_config[grpc]", + "tests/compatibility/core_operations/test_push_notifications.py::TestPushNotificationCrud::test_get_push_config[http_json]", + "tests/compatibility/core_operations/test_push_notifications.py::TestPushNotificationCrud::test_get_push_config[jsonrpc]" + ] + }, + "PUSH-GET-002": { + "level": "MUST", + "status": "SKIPPED", + "transports": { + "grpc": "SKIPPED", + "jsonrpc": "SKIPPED", + "http_json": "SKIPPED" + }, + "errors": [], + "test_ids": [ + "tests/compatibility/core_operations/test_push_notifications.py::TestPushNotificationCrud::test_get_nonexistent_config_returns_error[grpc]", + "tests/compatibility/core_operations/test_push_notifications.py::TestPushNotificationCrud::test_get_nonexistent_config_returns_error[http_json]", + "tests/compatibility/core_operations/test_push_notifications.py::TestPushNotificationCrud::test_get_nonexistent_config_returns_error[jsonrpc]" + ] + }, + "PUSH-LIST-001": { + "level": "MUST", + "status": "SKIPPED", + "transports": { + "grpc": "SKIPPED", + "jsonrpc": "SKIPPED", + "http_json": "SKIPPED" + }, + "errors": [], + "test_ids": [ + "tests/compatibility/core_operations/test_push_notifications.py::TestPushNotificationCrud::test_list_push_configs[grpc]", + "tests/compatibility/core_operations/test_push_notifications.py::TestPushNotificationCrud::test_list_push_configs[http_json]", + "tests/compatibility/core_operations/test_push_notifications.py::TestPushNotificationCrud::test_list_push_configs[jsonrpc]" + ] + }, + "PUSH-DEL-001": { + "level": "MUST", + "status": "SKIPPED", + "transports": { + "grpc": "SKIPPED", + "jsonrpc": "SKIPPED", + "http_json": "SKIPPED" + }, + "errors": [], + "test_ids": [ + "tests/compatibility/core_operations/test_push_notifications.py::TestPushNotificationCrud::test_delete_push_config[grpc]", + "tests/compatibility/core_operations/test_push_notifications.py::TestPushNotificationCrud::test_delete_push_config[http_json]", + "tests/compatibility/core_operations/test_push_notifications.py::TestPushNotificationCrud::test_delete_push_config[jsonrpc]" + ] + }, + "PUSH-DEL-002": { + "level": "MUST", + "status": "SKIPPED", + "transports": { + "grpc": "SKIPPED", + "jsonrpc": "SKIPPED", + "http_json": "SKIPPED" + }, + "errors": [], + "test_ids": [ + "tests/compatibility/core_operations/test_push_notifications.py::TestPushNotificationCrud::test_delete_is_idempotent[grpc]", + "tests/compatibility/core_operations/test_push_notifications.py::TestPushNotificationCrud::test_delete_is_idempotent[http_json]", + "tests/compatibility/core_operations/test_push_notifications.py::TestPushNotificationCrud::test_delete_is_idempotent[jsonrpc]" + ] + }, + "PUSH-DELIVER-001": { + "level": "MUST", + "status": "SKIPPED", + "transports": { + "grpc": "SKIPPED", + "jsonrpc": "SKIPPED", + "http_json": "SKIPPED" + }, + "errors": [], + "test_ids": [ + "tests/compatibility/core_operations/test_push_notifications.py::TestPushNotificationDelivery::test_delivery_includes_auth[grpc]", + "tests/compatibility/core_operations/test_push_notifications.py::TestPushNotificationDelivery::test_delivery_includes_auth[http_json]", + "tests/compatibility/core_operations/test_push_notifications.py::TestPushNotificationDelivery::test_delivery_includes_auth[jsonrpc]" + ] + }, + "PUSH-DELIVER-002": { + "level": "MUST", + "status": "SKIPPED", + "transports": { + "grpc": "SKIPPED", + "jsonrpc": "SKIPPED", + "http_json": "SKIPPED" + }, + "errors": [], + "test_ids": [ + "tests/compatibility/core_operations/test_push_notifications.py::TestPushNotificationDelivery::test_delivery_at_least_once[grpc]", + "tests/compatibility/core_operations/test_push_notifications.py::TestPushNotificationDelivery::test_delivery_at_least_once[http_json]", + "tests/compatibility/core_operations/test_push_notifications.py::TestPushNotificationDelivery::test_delivery_at_least_once[jsonrpc]" + ] + }, + "PUSH-DELIVER-003": { + "level": "MUST", + "status": "SKIPPED", + "transports": { + "grpc": "SKIPPED", + "jsonrpc": "SKIPPED", + "http_json": "SKIPPED" + }, + "errors": [], + "test_ids": [ + "tests/compatibility/core_operations/test_push_notifications.py::TestPushNotificationDelivery::test_delivery_payload_format[grpc]", + "tests/compatibility/core_operations/test_push_notifications.py::TestPushNotificationDelivery::test_delivery_payload_format[http_json]", + "tests/compatibility/core_operations/test_push_notifications.py::TestPushNotificationDelivery::test_delivery_payload_format[jsonrpc]" + ] + }, + "CORE-SEND-001": { + "level": "MUST", + "status": "PASS", + "transports": { + "grpc": "SKIPPED", + "jsonrpc": "PASS", + "http_json": "PASS" + }, + "errors": [], + "test_ids": [ + "tests/compatibility/core_operations/test_requirements.py::test_must_requirement[CORE-SEND-001-grpc]", + "tests/compatibility/core_operations/test_requirements.py::test_must_requirement[CORE-SEND-001-http_json]", + "tests/compatibility/core_operations/test_requirements.py::test_must_requirement[CORE-SEND-001-jsonrpc]" + ] + }, + "CORE-SEND-003": { + "level": "MUST", + "status": "PASS", + "transports": { + "grpc": "SKIPPED", + "jsonrpc": "PASS", + "http_json": "PASS" + }, + "errors": [], + "test_ids": [ + "tests/compatibility/core_operations/test_requirements.py::test_must_requirement[CORE-SEND-003-grpc]", + "tests/compatibility/core_operations/test_requirements.py::test_must_requirement[CORE-SEND-003-http_json]", + "tests/compatibility/core_operations/test_requirements.py::test_must_requirement[CORE-SEND-003-jsonrpc]" + ] + }, + "CORE-STREAM-001": { + "level": "MUST", + "status": "PASS", + "transports": { + "grpc": "SKIPPED", + "jsonrpc": "PASS", + "http_json": "PASS" + }, + "errors": [], + "test_ids": [ + "tests/compatibility/core_operations/test_requirements.py::test_must_requirement[CORE-STREAM-001-grpc]", + "tests/compatibility/core_operations/test_requirements.py::test_must_requirement[CORE-STREAM-001-http_json]", + "tests/compatibility/core_operations/test_requirements.py::test_must_requirement[CORE-STREAM-001-jsonrpc]" + ] + }, + "CORE-STREAM-002": { + "level": "MUST", + "status": "PASS", + "transports": { + "grpc": "SKIPPED", + "jsonrpc": "PASS", + "http_json": "PASS" + }, + "errors": [], + "test_ids": [ + "tests/compatibility/core_operations/test_requirements.py::test_must_requirement[CORE-STREAM-002-grpc]", + "tests/compatibility/core_operations/test_requirements.py::test_must_requirement[CORE-STREAM-002-http_json]", + "tests/compatibility/core_operations/test_requirements.py::test_must_requirement[CORE-STREAM-002-jsonrpc]" + ] + }, + "CORE-STREAM-003": { + "level": "MUST", + "status": "PASS", + "transports": { + "grpc": "SKIPPED", + "jsonrpc": "PASS", + "http_json": "PASS" + }, + "errors": [], + "test_ids": [ + "tests/compatibility/core_operations/test_requirements.py::test_must_requirement[CORE-STREAM-003-grpc]", + "tests/compatibility/core_operations/test_requirements.py::test_must_requirement[CORE-STREAM-003-http_json]", + "tests/compatibility/core_operations/test_requirements.py::test_must_requirement[CORE-STREAM-003-jsonrpc]" + ] + }, + "CORE-GET-002": { + "level": "MUST", + "status": "PASS", + "transports": { + "grpc": "SKIPPED", + "jsonrpc": "PASS", + "http_json": "PASS" + }, + "errors": [], + "test_ids": [ + "tests/compatibility/core_operations/test_requirements.py::test_must_requirement[CORE-GET-002-grpc]", + "tests/compatibility/core_operations/test_requirements.py::test_must_requirement[CORE-GET-002-http_json]", + "tests/compatibility/core_operations/test_requirements.py::test_must_requirement[CORE-GET-002-jsonrpc]" + ] + }, + "CORE-LIST-001": { + "level": "MUST", + "status": "PASS", + "transports": { + "grpc": "SKIPPED", + "jsonrpc": "PASS", + "http_json": "PASS" + }, + "errors": [], + "test_ids": [ + "tests/compatibility/core_operations/test_requirements.py::test_must_requirement[CORE-LIST-001-grpc]", + "tests/compatibility/core_operations/test_requirements.py::test_must_requirement[CORE-LIST-001-http_json]", + "tests/compatibility/core_operations/test_requirements.py::test_must_requirement[CORE-LIST-001-jsonrpc]" + ] + }, + "CORE-LIST-002": { + "level": "MUST", + "status": "PASS", + "transports": { + "grpc": "SKIPPED", + "jsonrpc": "PASS", + "http_json": "PASS" + }, + "errors": [], + "test_ids": [ + "tests/compatibility/core_operations/test_requirements.py::test_must_requirement[CORE-LIST-002-grpc]", + "tests/compatibility/core_operations/test_requirements.py::test_must_requirement[CORE-LIST-002-http_json]", + "tests/compatibility/core_operations/test_requirements.py::test_must_requirement[CORE-LIST-002-jsonrpc]" + ] + }, + "CORE-LIST-003": { + "level": "MUST", + "status": "PASS", + "transports": { + "grpc": "SKIPPED", + "jsonrpc": "PASS", + "http_json": "PASS" + }, + "errors": [], + "test_ids": [ + "tests/compatibility/core_operations/test_requirements.py::test_must_requirement[CORE-LIST-003-grpc]", + "tests/compatibility/core_operations/test_requirements.py::test_must_requirement[CORE-LIST-003-http_json]", + "tests/compatibility/core_operations/test_requirements.py::test_must_requirement[CORE-LIST-003-jsonrpc]" + ] + }, + "CORE-LIST-004": { + "level": "MUST", + "status": "PASS", + "transports": { + "grpc": "SKIPPED", + "jsonrpc": "PASS", + "http_json": "PASS" + }, + "errors": [], + "test_ids": [ + "tests/compatibility/core_operations/test_requirements.py::test_must_requirement[CORE-LIST-004-grpc]", + "tests/compatibility/core_operations/test_requirements.py::test_must_requirement[CORE-LIST-004-http_json]", + "tests/compatibility/core_operations/test_requirements.py::test_must_requirement[CORE-LIST-004-jsonrpc]" + ] + }, + "CORE-LIST-005": { + "level": "MUST", + "status": "PASS", + "transports": { + "grpc": "SKIPPED", + "jsonrpc": "PASS", + "http_json": "PASS" + }, + "errors": [], + "test_ids": [ + "tests/compatibility/core_operations/test_requirements.py::test_must_requirement[CORE-LIST-005-grpc]", + "tests/compatibility/core_operations/test_requirements.py::test_must_requirement[CORE-LIST-005-http_json]", + "tests/compatibility/core_operations/test_requirements.py::test_must_requirement[CORE-LIST-005-jsonrpc]" + ] + }, + "CORE-CANCEL-003": { + "level": "MUST", + "status": "PASS", + "transports": { + "grpc": "SKIPPED", + "jsonrpc": "PASS", + "http_json": "PASS" + }, + "errors": [], + "test_ids": [ + "tests/compatibility/core_operations/test_requirements.py::test_must_requirement[CORE-CANCEL-003-grpc]", + "tests/compatibility/core_operations/test_requirements.py::test_must_requirement[CORE-CANCEL-003-http_json]", + "tests/compatibility/core_operations/test_requirements.py::test_must_requirement[CORE-CANCEL-003-jsonrpc]" + ] + }, + "CORE-EXECUTION-MODE-001": { + "level": "MUST", + "status": "PASS", + "transports": { + "grpc": "SKIPPED", + "jsonrpc": "PASS", + "http_json": "PASS" + }, + "errors": [], + "test_ids": [ + "tests/compatibility/core_operations/test_requirements.py::test_must_requirement[CORE-EXECUTION-MODE-001-grpc]", + "tests/compatibility/core_operations/test_requirements.py::test_must_requirement[CORE-EXECUTION-MODE-001-http_json]", + "tests/compatibility/core_operations/test_requirements.py::test_must_requirement[CORE-EXECUTION-MODE-001-jsonrpc]" + ] + }, + "CORE-EXECUTION-MODE-002": { + "level": "MUST", + "status": "PASS", + "transports": { + "grpc": "SKIPPED", + "jsonrpc": "PASS", + "http_json": "PASS" + }, + "errors": [], + "test_ids": [ + "tests/compatibility/core_operations/test_requirements.py::test_must_requirement[CORE-EXECUTION-MODE-002-grpc]", + "tests/compatibility/core_operations/test_requirements.py::test_must_requirement[CORE-EXECUTION-MODE-002-http_json]", + "tests/compatibility/core_operations/test_requirements.py::test_must_requirement[CORE-EXECUTION-MODE-002-jsonrpc]" + ] + }, + "CORE-MULTI-001a": { + "level": "MUST", + "status": "PASS", + "transports": { + "grpc": "SKIPPED", + "jsonrpc": "PASS", + "http_json": "PASS" + }, + "errors": [], + "test_ids": [ + "tests/compatibility/core_operations/test_requirements.py::test_must_requirement[CORE-MULTI-001a-grpc]", + "tests/compatibility/core_operations/test_requirements.py::test_must_requirement[CORE-MULTI-001a-http_json]", + "tests/compatibility/core_operations/test_requirements.py::test_must_requirement[CORE-MULTI-001a-jsonrpc]" + ] + }, + "CORE-MULTI-002a": { + "level": "MUST", + "status": "PASS", + "transports": { + "grpc": "SKIPPED", + "jsonrpc": "PASS", + "http_json": "PASS" + }, + "errors": [], + "test_ids": [ + "tests/compatibility/core_operations/test_requirements.py::test_must_requirement[CORE-MULTI-002a-grpc]", + "tests/compatibility/core_operations/test_requirements.py::test_must_requirement[CORE-MULTI-002a-http_json]", + "tests/compatibility/core_operations/test_requirements.py::test_must_requirement[CORE-MULTI-002a-jsonrpc]" + ] + }, + "CORE-MULTI-003": { + "level": "MUST", + "status": "PASS", + "transports": { + "grpc": "SKIPPED", + "jsonrpc": "PASS", + "http_json": "PASS" + }, + "errors": [], + "test_ids": [ + "tests/compatibility/core_operations/test_requirements.py::test_must_requirement[CORE-MULTI-003-grpc]", + "tests/compatibility/core_operations/test_requirements.py::test_must_requirement[CORE-MULTI-003-http_json]", + "tests/compatibility/core_operations/test_requirements.py::test_must_requirement[CORE-MULTI-003-jsonrpc]" + ] + }, + "CORE-MULTI-004": { + "level": "MUST", + "status": "PASS", + "transports": { + "grpc": "SKIPPED", + "jsonrpc": "PASS", + "http_json": "PASS" + }, + "errors": [], + "test_ids": [ + "tests/compatibility/core_operations/test_requirements.py::test_must_requirement[CORE-MULTI-004-grpc]", + "tests/compatibility/core_operations/test_requirements.py::test_must_requirement[CORE-MULTI-004-http_json]", + "tests/compatibility/core_operations/test_requirements.py::test_must_requirement[CORE-MULTI-004-jsonrpc]" + ] + }, + "STREAM-SUB-004": { + "level": "MUST", + "status": "PASS", + "transports": { + "grpc": "SKIPPED", + "jsonrpc": "PASS", + "http_json": "PASS" + }, + "errors": [], + "test_ids": [ + "tests/compatibility/core_operations/test_requirements.py::test_must_requirement[STREAM-SUB-004-grpc]", + "tests/compatibility/core_operations/test_requirements.py::test_must_requirement[STREAM-SUB-004-http_json]", + "tests/compatibility/core_operations/test_requirements.py::test_must_requirement[STREAM-SUB-004-jsonrpc]", + "tests/compatibility/grpc/test_streaming.py::TestGrpcStreaming::test_streaming_error_propagation", + "tests/compatibility/jsonrpc/test_sse_streaming.py::TestSseSubscribeToTask::test_subscribe_nonexistent_task_returns_error" + ] + }, + "CORE-MULTI-001": { + "level": "MAY", + "status": "PASS", + "transports": { + "grpc": "SKIPPED", + "jsonrpc": "PASS", + "http_json": "PASS" + }, + "errors": [], + "test_ids": [ + "tests/compatibility/core_operations/test_requirements.py::test_may_requirement[CORE-MULTI-001-grpc]", + "tests/compatibility/core_operations/test_requirements.py::test_may_requirement[CORE-MULTI-001-http_json]", + "tests/compatibility/core_operations/test_requirements.py::test_may_requirement[CORE-MULTI-001-jsonrpc]" + ] + }, + "CORE-MULTI-002": { + "level": "MAY", + "status": "PASS", + "transports": { + "grpc": "SKIPPED", + "jsonrpc": "PASS", + "http_json": "PASS" + }, + "errors": [], + "test_ids": [ + "tests/compatibility/core_operations/test_requirements.py::test_may_requirement[CORE-MULTI-002-grpc]", + "tests/compatibility/core_operations/test_requirements.py::test_may_requirement[CORE-MULTI-002-http_json]", + "tests/compatibility/core_operations/test_requirements.py::test_may_requirement[CORE-MULTI-002-jsonrpc]" + ] + }, + "STREAM-ORDER-001": { + "level": "MUST", + "status": "PASS", + "transports": { + "grpc": "SKIPPED", + "jsonrpc": "PASS", + "http_json": "PASS" + }, + "errors": [], + "test_ids": [ + "tests/compatibility/core_operations/test_stream_ordering.py::TestStreamEventOrdering::test_streaming_event_ordering[grpc]", + "tests/compatibility/core_operations/test_stream_ordering.py::TestStreamEventOrdering::test_streaming_event_ordering[http_json]", + "tests/compatibility/core_operations/test_stream_ordering.py::TestStreamEventOrdering::test_streaming_event_ordering[jsonrpc]" + ] + }, + "CORE-HIST-001": { + "level": "SHOULD", + "status": "SKIPPED", + "transports": { + "grpc": "SKIPPED" + }, + "errors": [], + "test_ids": [ + "tests/compatibility/core_operations/test_task_history.py::TestHistoryLengthZeroGetTask::test_get_task_history_length_zero[grpc]" + ] + }, + "CORE-HIST-002": { + "level": "MUST", + "status": "SKIPPED", + "transports": { + "grpc": "SKIPPED" + }, + "errors": [], + "test_ids": [ + "tests/compatibility/core_operations/test_task_history.py::TestHistoryLengthLimit::test_get_task_history_does_not_exceed_limit[grpc]" + ] + }, + "CORE-HIST-003": { + "level": "SHOULD", + "status": "SKIPPED", + "transports": { + "grpc": "SKIPPED" + }, + "errors": [], + "test_ids": [ + "tests/compatibility/core_operations/test_task_history.py::TestHistoryLengthZeroSendMessage::test_send_message_history_length_zero[grpc]" + ] + }, + "CORE-HIST-004": { + "level": "MAY", + "status": "SKIPPED", + "transports": { + "grpc": "SKIPPED" + }, + "errors": [], + "test_ids": [ + "tests/compatibility/core_operations/test_task_history.py::TestHistoryPersistence::test_get_task_returns_history[grpc]" + ] + }, + "CORE-HIST-005": { + "level": "SHOULD", + "status": "SKIPPED", + "transports": { + "grpc": "SKIPPED" + }, + "errors": [], + "test_ids": [ + "tests/compatibility/core_operations/test_task_history.py::TestHistoryOrdering::test_history_messages_in_chronological_order[grpc]" + ] + }, + "CORE-HIST-006": { + "level": "SHOULD", + "status": "SKIPPED", + "transports": { + "grpc": "SKIPPED" + }, + "errors": [], + "test_ids": [ + "tests/compatibility/core_operations/test_task_history.py::TestHistoryContent::test_history_content_matches_sent_messages[grpc]" + ] + }, + "CORE-GET-001": { + "level": "MUST", + "status": "SKIPPED", + "transports": { + "grpc": "SKIPPED" + }, + "errors": [], + "test_ids": [ + "tests/compatibility/core_operations/test_task_lifecycle.py::TestGetTask::test_get_task_returns_current_state[grpc]" + ] + }, + "CORE-CANCEL-001": { + "level": "MUST", + "status": "SKIPPED", + "transports": { + "grpc": "SKIPPED" + }, + "errors": [], + "test_ids": [ + "tests/compatibility/core_operations/test_task_lifecycle.py::TestCancelTask::test_cancel_task_returns_updated_state[grpc]" + ] + }, + "CORE-CANCEL-002": { + "level": "MUST", + "status": "SKIPPED", + "transports": { + "grpc": "SKIPPED" + }, + "errors": [], + "test_ids": [ + "tests/compatibility/core_operations/test_task_lifecycle.py::TestCancelTask::test_cancel_terminal_task_returns_error[grpc]" + ] + }, + "CORE-SEND-002": { + "level": "MUST", + "status": "SKIPPED", + "transports": { + "grpc": "SKIPPED" + }, + "errors": [], + "test_ids": [ + "tests/compatibility/core_operations/test_task_lifecycle.py::TestMultiTurn::test_send_message_to_terminal_task[grpc]" + ] + }, + "CORE-MULTI-005": { + "level": "MUST", + "status": "SKIPPED", + "transports": { + "grpc": "SKIPPED" + }, + "errors": [], + "test_ids": [ + "tests/compatibility/core_operations/test_task_lifecycle.py::TestMultiTurn::test_infer_context_from_task[grpc]" + ] + }, + "CORE-MULTI-006": { + "level": "MUST", + "status": "SKIPPED", + "transports": { + "grpc": "SKIPPED" + }, + "errors": [], + "test_ids": [ + "tests/compatibility/core_operations/test_task_lifecycle.py::TestMultiTurn::test_reject_mismatching_context[grpc]" + ] + }, + "STREAM-SUB-002": { + "level": "MUST", + "status": "SKIPPED", + "transports": { + "grpc": "SKIPPED" + }, + "errors": [], + "test_ids": [ + "tests/compatibility/core_operations/test_task_lifecycle.py::TestSubscribeLifecycle::test_subscribe_terminates_at_terminal_state[grpc]" + ] + }, + "STREAM-SUB-003": { + "level": "MUST", + "status": "SKIPPED", + "transports": { + "grpc": "SKIPPED" + }, + "errors": [], + "test_ids": [ + "tests/compatibility/core_operations/test_task_lifecycle.py::TestSubscribeLifecycle::test_subscribe_rejects_terminal_task[grpc]" + ] + }, + "JSONRPC-FMT-001": { + "level": "MUST", + "status": "PASS", + "transports": { + "jsonrpc": "PASS" + }, + "errors": [], + "test_ids": [ + "tests/compatibility/core_operations/test_transport_behavior.py::TestJsonRpcFormat::test_response_validates_jsonrpc_envelope" + ] + }, + "JSONRPC-FMT-002": { + "level": "MUST", + "status": "PASS", + "transports": { + "jsonrpc": "PASS" + }, + "errors": [], + "test_ids": [ + "tests/compatibility/core_operations/test_transport_behavior.py::TestJsonRpcFormat::test_content_type_is_application_json" + ] + }, + "JSONRPC-SVC-001": { + "level": "MUST", + "status": "PASS", + "transports": { + "jsonrpc": "PASS" + }, + "errors": [], + "test_ids": [ + "tests/compatibility/core_operations/test_transport_behavior.py::TestJsonRpcMethodNames::test_bindings_use_spec_method_names" + ] + }, + "JSONRPC-SVC-002": { + "level": "MUST", + "status": "PASS", + "transports": { + "jsonrpc": "PASS" + }, + "errors": [], + "test_ids": [ + "tests/compatibility/core_operations/test_transport_behavior.py::TestJsonRpcServiceParams::test_extensions_header_accepted" + ] + }, + "JSONRPC-SSE-001": { + "level": "MUST", + "status": "PASS", + "transports": { + "jsonrpc": "PASS" + }, + "errors": [], + "test_ids": [ + "tests/compatibility/core_operations/test_transport_behavior.py::TestJsonRpcStreaming::test_streaming_content_type", + "tests/compatibility/jsonrpc/test_sse_streaming.py::TestSseStreamingFormat::test_streaming_events_contain_stream_response", + "tests/compatibility/jsonrpc/test_sse_streaming.py::TestSseStreamingFormat::test_streaming_events_have_jsonrpc_envelope" + ] + }, + "HTTP_JSON-SVC-001": { + "level": "SHOULD", + "status": "PASS", + "transports": { + "http_json": "PASS" + }, + "errors": [], + "test_ids": [ + "tests/compatibility/core_operations/test_transport_behavior.py::TestRestFormat::test_response_content_type", + "tests/compatibility/http_json/test_problem_details.py::TestHttpJsonErrorMediaType::test_error_content_type" + ] + }, + "HTTP_JSON-FMT-001": { + "level": "MUST", + "status": "PASS", + "transports": { + "http_json": "PASS" + }, + "errors": [], + "test_ids": [ + "tests/compatibility/core_operations/test_transport_behavior.py::TestRestFormat::test_response_validates_against_schema" + ] + }, + "HTTP_JSON-SVC-002": { + "level": "MUST", + "status": "PASS", + "transports": { + "http_json": "PASS" + }, + "errors": [], + "test_ids": [ + "tests/compatibility/core_operations/test_transport_behavior.py::TestRestServiceParams::test_extensions_header_accepted" + ] + }, + "HTTP_JSON-URL-001": { + "level": "MUST", + "status": "PASS", + "transports": { + "http_json": "PASS" + }, + "errors": [], + "test_ids": [ + "tests/compatibility/core_operations/test_transport_behavior.py::TestRestUrlPatterns::test_url_patterns_defined" + ] + }, + "HTTP_JSON-URL-002": { + "level": "MUST", + "status": "PASS", + "transports": { + "http_json": "PASS" + }, + "errors": [], + "test_ids": [ + "tests/compatibility/core_operations/test_transport_behavior.py::TestRestUrlPatterns::test_http_methods_correct" + ] + }, + "HTTP_JSON-QP-001": { + "level": "MUST", + "status": "PASS", + "transports": { + "http_json": "PASS" + }, + "errors": [], + "test_ids": [ + "tests/compatibility/core_operations/test_transport_behavior.py::TestRestQueryParams::test_query_params_are_camel_case" + ] + }, + "HTTP_JSON-SSE-001": { + "level": "MUST", + "status": "PASS", + "transports": { + "http_json": "PASS" + }, + "errors": [], + "test_ids": [ + "tests/compatibility/core_operations/test_transport_behavior.py::TestRestStreaming::test_streaming_content_type" + ] + }, + "GRPC-SVC-001": { + "level": "MUST", + "status": "SKIPPED", + "transports": { + "grpc": "SKIPPED" + }, + "errors": [], + "test_ids": [ + "tests/compatibility/core_operations/test_transport_behavior.py::TestGrpcService::test_grpc_response_validates_against_proto" + ] + }, + "GRPC-SVC-002": { + "level": "MUST", + "status": "SKIPPED", + "transports": { + "grpc": "SKIPPED" + }, + "errors": [], + "test_ids": [ + "tests/compatibility/core_operations/test_transport_behavior.py::TestGrpcProto3::test_response_uses_proto3" + ] + }, + "GRPC-META-001": { + "level": "MUST", + "status": "SKIPPED", + "transports": { + "grpc": "SKIPPED" + }, + "errors": [], + "test_ids": [ + "tests/compatibility/core_operations/test_transport_behavior.py::TestGrpcServiceParams::test_extensions_metadata_accepted" + ] + }, + "GRPC-ERR-003": { + "level": "MUST", + "status": "SKIPPED", + "transports": { + "grpc": "SKIPPED" + }, + "errors": [], + "test_ids": [ + "tests/compatibility/core_operations/test_transport_behavior.py::TestGrpcStreaming::test_grpc_streaming_works", + "tests/compatibility/grpc/test_streaming.py::TestGrpcStreaming::test_streaming_cancellation", + "tests/compatibility/grpc/test_streaming.py::TestGrpcStreaming::test_streaming_message_structure", + "tests/compatibility/grpc/test_streaming.py::TestGrpcStreaming::test_streaming_response_type" + ] + }, + "GRPC-ERR-002": { + "level": "MUST", + "status": "SKIPPED", + "transports": { + "grpc": "SKIPPED" + }, + "errors": [], + "test_ids": [ + "tests/compatibility/grpc/test_status_codes.py::TestGrpcStatusCodes::test_cancel_missing_task_returns_not_found", + "tests/compatibility/grpc/test_status_codes.py::TestGrpcStatusCodes::test_push_not_supported_returns_expected_error", + "tests/compatibility/grpc/test_status_codes.py::TestGrpcStatusCodes::test_task_not_found_returns_not_found", + "tests/compatibility/grpc/test_status_codes.py::TestGrpcStatusCodes::test_unsupported_operation_returns_expected_error", + "tests/compatibility/grpc/test_status_codes.py::TestGrpcStatusCodes::test_version_not_supported_returns_expected_error" + ] + }, + "STREAM-SUB-001": { + "level": "MUST", + "status": "SKIPPED", + "transports": { + "grpc": "SKIPPED" + }, + "errors": [], + "test_ids": [ + "tests/compatibility/grpc/test_streaming.py::TestGrpcStreaming::test_subscribe_first_event_is_task" + ] + }, + "HTTP_JSON-STATUS-001": { + "level": "MUST", + "status": "PASS", + "transports": { + "http_json": "PASS" + }, + "errors": [], + "test_ids": [ + "tests/compatibility/http_json/test_http_status.py::TestHttpJsonStatusCodes::test_cancel_missing_task_returns_404", + "tests/compatibility/http_json/test_http_status.py::TestHttpJsonStatusCodes::test_content_type_not_supported_returns_expected_error", + "tests/compatibility/http_json/test_http_status.py::TestHttpJsonStatusCodes::test_push_not_supported_returns_400", + "tests/compatibility/http_json/test_http_status.py::TestHttpJsonStatusCodes::test_success_returns_2xx", + "tests/compatibility/http_json/test_http_status.py::TestHttpJsonStatusCodes::test_task_not_found_returns_404", + "tests/compatibility/http_json/test_http_status.py::TestHttpJsonStatusCodes::test_unsupported_operation_returns_400", + "tests/compatibility/http_json/test_http_status.py::TestHttpJsonStatusCodes::test_version_not_supported_returns_400" + ] + }, + "CARD-CLIENT-001": { + "level": "MUST", + "status": "MANUAL", + "transports": {}, + "errors": [], + "test_ids": [] + }, + "CARD-SIGN-001": { + "level": "MUST", + "status": "MANUAL", + "transports": {}, + "errors": [], + "test_ids": [] + }, + "CARD-SIGN-002": { + "level": "MUST", + "status": "MANUAL", + "transports": {}, + "errors": [], + "test_ids": [] + }, + "CARD-SIGN-003": { + "level": "MUST", + "status": "MANUAL", + "transports": {}, + "errors": [], + "test_ids": [] + }, + "CARD-SIGN-004": { + "level": "MUST", + "status": "MANUAL", + "transports": {}, + "errors": [], + "test_ids": [] + }, + "AUTH-TLS-001": { + "level": "MUST", + "status": "MANUAL", + "transports": {}, + "errors": [], + "test_ids": [] + }, + "AUTH-TLS-002": { + "level": "SHOULD", + "status": "MANUAL", + "transports": {}, + "errors": [], + "test_ids": [] + }, + "AUTH-SERVER-001": { + "level": "SHOULD", + "status": "MANUAL", + "transports": {}, + "errors": [], + "test_ids": [] + }, + "AUTH-SERVER-002": { + "level": "MUST", + "status": "NOT TESTED", + "transports": {}, + "errors": [], + "test_ids": [] + }, + "AUTH-INTASK-001": { + "level": "MUST", + "status": "NOT TESTED", + "transports": {}, + "errors": [], + "test_ids": [] + }, + "AUTH-INTASK-002": { + "level": "MUST", + "status": "NOT TESTED", + "transports": {}, + "errors": [], + "test_ids": [] + }, + "AUTH-INTASK-003": { + "level": "MUST", + "status": "NOT TESTED", + "transports": {}, + "errors": [], + "test_ids": [] + }, + "AUTH-INTASK-004": { + "level": "MUST", + "status": "NOT TESTED", + "transports": {}, + "errors": [], + "test_ids": [] + }, + "AUTH-INTASK-005": { + "level": "SHOULD", + "status": "NOT TESTED", + "transports": {}, + "errors": [], + "test_ids": [] + }, + "AUTH-INTASK-006": { + "level": "SHOULD", + "status": "NOT TESTED", + "transports": {}, + "errors": [], + "test_ids": [] + }, + "AUTH-SCOPE-001": { + "level": "MUST", + "status": "NOT TESTED", + "transports": {}, + "errors": [], + "test_ids": [] + }, + "AUTH-SCOPE-002": { + "level": "MUST", + "status": "NOT TESTED", + "transports": {}, + "errors": [], + "test_ids": [] + }, + "AUTH-SCOPE-003": { + "level": "MUST", + "status": "NOT TESTED", + "transports": {}, + "errors": [], + "test_ids": [] + }, + "VER-CLIENT-001": { + "level": "MUST", + "status": "NOT TESTED", + "transports": {}, + "errors": [], + "test_ids": [] + }, + "VER-SERVER-001": { + "level": "MUST", + "status": "NOT TESTED", + "transports": {}, + "errors": [], + "test_ids": [] + }, + "VER-CLIENT-002": { + "level": "MUST", + "status": "NOT TESTED", + "transports": {}, + "errors": [], + "test_ids": [] + }, + "BIND-CUSTOM-002": { + "level": "MUST", + "status": "MANUAL", + "transports": {}, + "errors": [], + "test_ids": [] + }, + "BIND-EQUIV-001": { + "level": "MUST", + "status": "NOT TESTED", + "transports": {}, + "errors": [], + "test_ids": [] + }, + "BIND-EQUIV-002": { + "level": "MUST", + "status": "NOT TESTED", + "transports": {}, + "errors": [], + "test_ids": [] + }, + "BIND-EQUIV-003": { + "level": "MUST", + "status": "NOT TESTED", + "transports": {}, + "errors": [], + "test_ids": [] + }, + "BIND-EQUIV-004": { + "level": "MUST", + "status": "NOT TESTED", + "transports": {}, + "errors": [], + "test_ids": [] + }, + "GRPC-SVC-003": { + "level": "MUST", + "status": "NOT TESTED", + "transports": {}, + "errors": [], + "test_ids": [] + } + }, + "per_transport": { + "agent_card": { + "total": 11, + "passed": 9, + "failed": 0, + "skipped": 2 + }, + "grpc": { + "total": 72, + "passed": 0, + "failed": 0, + "skipped": 72 + }, + "jsonrpc": { + "total": 81, + "passed": 66, + "failed": 0, + "skipped": 15 + }, + "http_json": { + "total": 78, + "passed": 64, + "failed": 0, + "skipped": 14 + } + }, + "agent_card": { + "name": "OpenAdapt", + "description": "Runs compiled OpenAdapt workflows on this computer and checks that they saved. A finished run's result carries its signed receipt when Flow wrote one, and any agent can send a handoff to be verified.", + "supportedInterfaces": [ + { + "url": "http://127.0.0.1:9999/a2a/jsonrpc", + "protocolBinding": "JSONRPC", + "protocolVersion": "1.0" + }, + { + "url": "http://127.0.0.1:9999/a2a/rest", + "protocolBinding": "HTTP+JSON", + "protocolVersion": "1.0" + } + ], + "provider": { + "url": "https://openadapt.ai", + "organization": "OpenAdapt" + }, + "version": "2.2.4", + "documentationUrl": "https://github.com/OpenAdaptAI/OpenAdapt/blob/main/packages/flow/docs/A2A.md", + "capabilities": { + "streaming": true, + "pushNotifications": false, + "extensions": [ + { + "uri": "https://openadapt.ai/extensions/handoff-receipt/v1", + "description": "Task results carry the run's record/run/v1 receipt (in-toto Statement in a DSSE envelope) as an openadapt.handoff-document/v1 artifact part; verify_handoff returns an openadapt.handoff-verdict/v1 verdict.", + "params": { + "verdict_schema": "openadapt.handoff-verdict/v1", + "receipt_predicate": "https://openadapt.ai/record/run/v1", + "envelope": "dsse", + "media_type": "application/vnd.openadapt.handoff+json", + "handoff_schema": "openadapt.handoff-document/v1" + } + } + ], + "extendedAgentCard": false + }, + "defaultInputModes": [ + "application/json" + ], + "defaultOutputModes": [ + "application/json", + "application/vnd.openadapt.handoff+json" + ], + "skills": [ + { + "id": "add_triage_note", + "name": "add_triage_note", + "description": "Sandbox: add a triage note to the first referral in a synthetic clinic app. Nothing real changes. Done means: The note is in the synthetic app's record store, confirmed by reading the store directly after the save. Send a data part {\"skill\": \"add_triage_note\", \"inputs\": {...}, \"request_id\": \"...\"}. A finished run's result includes its signed receipt when Flow wrote one.", + "tags": [ + "openadapt", + "workflow", + "receipt" + ], + "inputModes": [ + "application/json" + ], + "outputModes": [ + "application/json", + "application/vnd.openadapt.handoff+json" + ] + }, + { + "id": "verify_handoff", + "name": "Verify a handoff", + "description": "Send another agent's result with its receipt (an openadapt.handoff-document/v1 document, as a data part or a application/vnd.openadapt.handoff+json file part). Returns who signed it, whether it is intact, which checks passed and which were not checked, and any confirmation read from the other party's system. A valid signature proves who signed, not that the claim is true.", + "tags": [ + "verification", + "receipt", + "handoff", + "in-toto", + "dsse" + ], + "inputModes": [ + "application/json", + "application/vnd.openadapt.handoff+json" + ], + "outputModes": [ + "application/json" + ] + } + ], + "signatures": [ + { + "protected": "eyJhbGciOiJFZERTQSIsImtpZCI6InNlYWwtZWQyNTUxOS1lY2MwMjZjZjNhNTlkMjM4IiwidHlwIjoiSk9TRSJ9", + "signature": "UoPqUEBONPQ-rpdpb84XM5jPKS8nvqy1Zh-VmzIR9ZwLA6IB3ogjO_-A2l9Drdp2Cj7AZYdAo7H_mT9FlH8dCQ", + "header": { + "jwk": { + "kty": "OKP", + "x": "D_BpCD5hEGKhuz1TXeKICbioNVE6QycfpXSEVNnyIoU", + "crv": "Ed25519" + } + } + } + ] + } +} \ No newline at end of file diff --git a/packages/flow/benchmark/a2a_tck/2026-11-30/tck-run.log b/packages/flow/benchmark/a2a_tck/2026-11-30/tck-run.log new file mode 100644 index 0000000000..c50a811cf4 --- /dev/null +++ b/packages/flow/benchmark/a2a_tck/2026-11-30/tck-run.log @@ -0,0 +1,48 @@ +/lib/python3.14/site-packages/pytest_asyncio/plugin.py:306: PytestDeprecationWarning: The configuration option "asyncio_default_fixture_loop_scope" is unset. +The event loop scope for asynchronous fixtures will default to the fixture scope. Future versions of pytest-asyncio will default the loop scope for asynchronous fixtures to "function" scope. Set the default fixture loop scope explicitly in order to avoid unexpected behavior in the future. Valid fixture loop scopes are: "function", "class", "module", "package", "session". Set it to "fixture-scope" to keep the current behavior. + + warnings.warn(PytestDeprecationWarning(_DEFAULT_FIXTURE_LOOP_SCOPE_UNSET)) +......s...ss..s..s..s..s..............sss.ssssss.........sssssssssssssss [ 27%] +ssssssssssssssssssssssssss..s..s..s..s..s..s..s..s..s..s..s..s..s..s..s. [ 54%] +.s..s..s..ssss..s..s..ssssssssssssssssssssssssssssssssssssssssss........ [ 82%] +....sssssssssssssss..s.............ss.........s [100%] +═══════════════════════════════════════════════════════ + A2A TCK Compatibility Report +═══════════════════════════════════════════════════════ +SUT: http://localhost:9999 +Timestamp: 2026-11-30T19:53:39.858728+00:00 + +OVERALL COMPATIBILITY: 78.6% (automated checks) + +┌────────┬────────┬────────┬─────────┬────────┬────────────┬───────┐ +│ Level │ Passed │ Failed │ Skipped │ Manual │ Not tested │ Total │ +├────────┼────────┼────────┼─────────┼────────┼────────────┼───────┤ +│ MUST │ 59 │ 0 │ 33 │ 7 │ 16 │ 115 │ +│ SHOULD │ 5 │ 0 │ 5 │ 2 │ 2 │ 14 │ +│ MAY │ 2 │ 0 │ 2 │ 0 │ 0 │ 4 │ +└────────┴────────┴────────┴─────────┴────────┴────────────┴───────┘ + +BY TRANSPORT: + agent_card: 9/11 (2 skipped) ✓ + grpc: 0/72 (72 skipped) ✓ + jsonrpc: 66/81 (15 skipped) ✓ + http_json: 64/78 (14 skipped) ✓ + + +PENDING MANUAL VERIFICATION (excluded from automated scores): + CARD-CLIENT-001 [MUST]: Clients MUST set the tenant field in every request to exactly the selected AgentInterface tenant, omitting it when unset. This client behavior requires observing the client's outbound requests; it cannot be established by this server-only conformance probe. + CARD-SIGN-001 [MUST]: Before signing, the Agent Card content MUST be canonicalized using the JSON Canonicalization Scheme (JCS) as defined in RFC 8785. + CARD-SIGN-002 [MUST]: The signatures field itself MUST be excluded from the content being signed to avoid circular dependencies. + CARD-SIGN-003 [MUST]: The JWS protected header MUST include alg (algorithm) and kid (key ID) parameters. + CARD-SIGN-004 [MUST]: Expired or revoked keys MUST NOT be used for signature verification. + AUTH-TLS-001 [MUST]: Production deployments MUST use encrypted communication (HTTPS for HTTP-based bindings, TLS for gRPC). + AUTH-TLS-002 [SHOULD]: Implementations SHOULD use modern TLS configurations (TLS 1.3+ recommended) with strong cipher suites. + AUTH-SERVER-001 [SHOULD]: A2A Clients SHOULD verify the A2A Server's identity by validating its TLS certificate against trusted CAs. + BIND-CUSTOM-002 [MUST]: A breaking change to a custom binding MUST use a new URI. Verifying this requires comparing binding versions and their semantics, which cannot be observed from a single server snapshot. +═══════════════════════════════════════════════════════ + + +- Generated html report: file:///reports/tck_report.html - +121 passed, 142 skipped in 0.91s +Command: /bin/python -m pytest tests/compatibility/ --sut-host=http://localhost:9999 --tb=short --media-type-spec-version=1.0.1 -q --compatibility-report=reports/compatibility --html=reports/tck_report.html --self-contained-html --junitxml=reports/junitreport.xml + diff --git a/packages/flow/benchmark/a2a_tck/README.md b/packages/flow/benchmark/a2a_tck/README.md index a4ce92e0ce..15e2ff25a7 100644 --- a/packages/flow/benchmark/a2a_tck/README.md +++ b/packages/flow/benchmark/a2a_tck/README.md @@ -1,22 +1,77 @@ -# A2A TCK run against `openadapt-agent serve --a2a` +# A2A TCK runs against `openadapt-agent serve --a2a` -This is the official A2A Technology Compatibility Kit +These runs use the official A2A Technology Compatibility Kit ([a2aproject/a2a-tck](https://github.com/a2aproject/a2a-tck), Apache-2.0, -commit `5e6f37c2d38eb3d7684686243c34d365c83df49b`, 2026-11-18). It was run on -2026-11-21 against the sandbox server, started with this command: - -```bash -openadapt-agent serve --a2a --a2a-port 9999 --sandbox-engine simulated -./run_tck.py --sut-host http://localhost:9999 -``` +commit `5e6f37c2d38eb3d7684686243c34d365c83df49b`, 2026-11-18) against the +sandbox server. - **Python.** The TCK declares Python 3.15. Its `grpcio` wheel crashed on 3.15.0b3 (exit 139), so it ran on Python 3.14.9 with its own dependencies installed. - **Transports.** The card declares only JSON-RPC and HTTP+JSON, so the gRPC tests were skipped. +- **Media type.** The TCK checks against specification 1.0.1 + (`--media-type-spec-version=1.0.1`). + +## Latest run (2026-11-30) + +```bash +openadapt-agent serve --a2a --a2a-port 9999 --sandbox-engine simulated --a2a-tck-scenarios +./run_tck.py --sut-host http://localhost:9999 +``` + +These numbers come from `2026-11-30/compatibility.json` and +`2026-11-30/tck-run.log`: -## Result +| | | +|---|---| +| Automated checks | 121 passed, 0 failed, 142 skipped | +| Agent Card requirements | 6 passed, 0 failed, 3 skipped, 5 manual | +| MUST | 78.7% | +| SHOULD | 71.4% | +| MAY | 100% | +| Overall | 78.6% | + +No automated check fails. The percentages are below 100% because the TCK +counts skipped, untested and manual requirements as not passed. Of the 115 +MUST requirements, 59 pass, 33 are skipped, 16 are not tested and 7 need a +manual check. Most of the rest fall into these groups: + +- **gRPC** (`GRPC-*`). The server doesn't serve gRPC. +- **Push notifications** (`PUSH-*`). The card says `pushNotifications: false`. +- **Cancel** (`CORE-CANCEL-*`). A run is never stopped part way through a + write, so cancelling answers `TaskNotCancelableError`. +- **Authentication scenarios** (`AUTH-*`). The sandbox server listens on + loopback with no token. +- **Manual checks.** Card signing (`CARD-SIGN-*`), TLS, and some client-side + behaviour. + +**What changed since 2026-11-21:** + +- **Error media type (`HTTP_JSON-SVC-001`).** `a2a-sdk` 1.3.1 labels + successful HTTP+JSON responses `application/a2a+json` but labels its error + responses `application/json`. The server now relabels HTTP+JSON responses + as `application/a2a+json`, as 1.0.1 recommends. JSON-RPC and the Agent Card + keep `application/json`. +- **Scripted scenarios (`DM-ART-001`, `DM-MSG-001`, 10 tests).** The TCK asks + the server under test to answer messages whose `messageId` starts with a + `tck-` prefix with scripted results (its `docs/SUT_REQUIREMENTS.md` and + `scenarios/core_operations.feature`). `--a2a-tck-scenarios` turns those + answers on: a text, file, file-URL or data artifact, or a direct Message. + The answers run no workflow and touch no data. The flag needs + `--mode sandbox` and loopback, so a server that runs real workflows never + serves them. +- **Agent Card signing.** The card is now signed with EdDSA by this + computer's Seal key (see [A2A.md](../../docs/A2A.md#the-signed-agent-card)). + The TCK leaves `CARD-SIGN-*` to manual checking. `test_handoff_e2e.py` + verifies the signature with the `a2a-sdk` verifier. + +## First run (2026-11-21) + +```bash +openadapt-agent serve --a2a --a2a-port 9999 --sandbox-engine simulated +./run_tck.py --sut-host http://localhost:9999 +``` These numbers come from `2026-11-21/compatibility.json`: @@ -29,20 +84,9 @@ These numbers come from `2026-11-21/compatibility.json`: | MAY | 100% | | Overall | 75.0% | -**What failed, and why:** - -- **`DM-ART-001` and `DM-MSG-001`** (10 tests). These tests send messages - whose `messageId` starts with a scenario prefix such as `tck-artifact-text`, - and expect the SDK's generated test agent to answer with that exact - artifact or message. OpenAdapt is not that test agent. It answers every - message with its own skills: a workflow run, or `verify_handoff`. The tests - therefore get a failed task with usage text, not the scripted artifact. -- **`HTTP_JSON-SVC-001`** (1 test). HTTP+JSON error responses come from - `a2a-sdk` 1.3.1 with `Content-Type: application/json`. Specification 1.0.1 - expects `application/a2a+json`. That behaviour is in the SDK, not in - OpenAdapt. - -Before two fixes in this pull request, the TCK found two more failures: +The 11 failures were the 10 scripted-scenario tests and the error media type, +both fixed in the latest run. Before two fixes in the pull request that added +the adapter, the TCK found two more failures: - JSON-RPC posts to the interface URL plus `/`, which now has a route. - `ContentTypeNotSupportedError` was not returned, which input-mode @@ -50,13 +94,5 @@ Before two fixes in this pull request, the TCK found two more failures: The Agent Card also now sends `Cache-Control`. -The TCK also lists checks it can't automate, which it marks for manual -verification. Two of them didn't apply to this server at the time: - -- **Agent Card signing.** The card was not signed when this run was made. - It is signed now (EdDSA with this computer's Seal key; see - [A2A.md](../../docs/A2A.md#the-signed-agent-card)). The TCK leaves - `CARD-SIGN-*` to manual checking; `test_handoff_e2e.py` verifies the - signature with the `a2a-sdk` verifier. -- **TLS.** The server listens on loopback over HTTP. Off loopback it needs a - bearer token, and TLS is the deployment's job. +**TLS.** The server listens on loopback over HTTP. Off loopback it needs a +bearer token, and TLS is the deployment's job. diff --git a/packages/flow/docs/A2A.md b/packages/flow/docs/A2A.md index 3058c63686..86677fc45e 100644 --- a/packages/flow/docs/A2A.md +++ b/packages/flow/docs/A2A.md @@ -112,6 +112,9 @@ serve them. `--authoring`, `--guard`, `--verify`, `--teach`, Off loopback, the public card lists only `verify_handoff`, and the workflows are in the authenticated extended card. Set `--a2a-public-url` to the address other agents use. +- **The A2A media type.** HTTP+JSON responses, errors included, are + `application/a2a+json`, as specification 1.0.1 recommends. JSON-RPC and + the Agent Card are `application/json`. - **No browser requests.** A request with a browser `Origin` header, or a `Host` the server doesn't answer for, is refused. A web page can't reach the port, even through DNS rebinding. @@ -137,8 +140,20 @@ signs the report. The tests cover: The same file covers the MCP tools. -The official A2A TCK was run against the sandbox server. 110 automated checks -passed and 11 failed. The Agent Card checks passed 9 of 11, with 0 failed and -2 skipped. That run was before the card was signed; the TCK marks card -signing for manual checking. For what failed and why, see -[benchmark/a2a_tck](../benchmark/a2a_tck/README.md). +The official A2A TCK was run against the sandbox server on 2026-11-30: 121 +automated checks passed, 0 failed and 142 were skipped (gRPC, push +notifications, cancel and authentication scenarios the server doesn't offer). +The TCK leaves card signing to manual checking. For the details and the +earlier run, see [benchmark/a2a_tck](../benchmark/a2a_tck/README.md). + +### Running the TCK + +The TCK asks the server under test to answer messages whose `messageId` +starts with `tck-` with scripted results. `--a2a-tck-scenarios` turns those +answers on. They run no workflow and touch no data. The flag needs +`--mode sandbox` and loopback, so a server that runs real workflows never +serves them: + +```bash +openadapt-agent serve --a2a --a2a-port 9999 --sandbox-engine simulated --a2a-tck-scenarios +``` diff --git a/packages/flow/openadapt_flow/agent/a2a_server.py b/packages/flow/openadapt_flow/agent/a2a_server.py index 6cecd9f9e8..b8eb7d12fe 100644 --- a/packages/flow/openadapt_flow/agent/a2a_server.py +++ b/packages/flow/openadapt_flow/agent/a2a_server.py @@ -86,6 +86,9 @@ class A2AConfig: #: Bearer token; required unless ``host`` is loopback. token: Optional[str] = None extra_hosts: tuple[str, ...] = field(default_factory=tuple) + #: Answer the A2A TCK's scripted ``tck-*`` scenarios (its SUT_REQUIREMENTS). + #: Sandbox and loopback only; never on a server that runs real workflows. + tck_scenarios: bool = False def __post_init__(self) -> None: if not is_loopback(self.host) and not self.token: @@ -93,6 +96,8 @@ def __post_init__(self) -> None: "--a2a-host other than 127.0.0.1 needs --a2a-token-file: " "anything off this computer must authenticate" ) + if self.tck_scenarios and not is_loopback(self.host): + raise ValueError("--a2a-tck-scenarios is for loopback test runs only") @property def base_url(self) -> str: @@ -471,8 +476,9 @@ def _status_text(result: dict[str, Any]) -> str: class OpenAdaptExecutor: """An ``a2a`` AgentExecutor over one bridge (built lazily, see ``executor_class``).""" - def __init__(self, bridge: AgentBridge) -> None: + def __init__(self, bridge: AgentBridge, *, tck_scenarios: bool = False) -> None: self.bridge = bridge + self.tck_scenarios = tck_scenarios #: A2A task id -> OpenAdapt run id, for re-checks on the same task. self.runs: dict[str, str] = {} @@ -493,6 +499,11 @@ async def execute(self, context: Any, event_queue: Any) -> None: def say(text: str) -> Any: return updater.new_agent_message(parts=[new_text_part(text)]) + scenario = tck_scenario(message.message_id) if self.tck_scenarios else None + if scenario is not None: + await answer_tck_scenario(scenario, updater, event_queue) + return + if context.current_task is None: await event_queue.enqueue_event( Task( @@ -594,6 +605,56 @@ async def cancel(self, context: Any, event_queue: Any) -> None: ) +# -- the A2A TCK's scripted scenarios (sandbox test runs only) ---------------------- +# +# The official TCK (a2aproject/a2a-tck, docs/SUT_REQUIREMENTS.md) asks a server +# under test to answer messages whose messageId starts with a ``tck-`` prefix +# with scripted results (scenarios/core_operations.feature). These are the ones +# OpenAdapt's own skills can't answer. They run no workflow and touch no data, +# and they're served only with ``--a2a-tck-scenarios`` in sandbox mode. + +#: Longest prefix first, so ``tck-artifact-file-url`` isn't read as ``-file``. +TCK_SCENARIOS = ( + "tck-artifact-file-url", + "tck-artifact-file", + "tck-artifact-text", + "tck-artifact-data", + "tck-message-response", +) + + +def tck_scenario(message_id: str) -> Optional[str]: + return next((p for p in TCK_SCENARIOS if message_id.startswith(p)), None) + + +async def answer_tck_scenario(scenario: str, updater: Any, event_queue: Any) -> None: + from a2a.types import Part + from google.protobuf import json_format, struct_pb2 + + if scenario == "tck-message-response": + # A Message, not a Task: no task is created for this request. + await event_queue.enqueue_event( + updater.new_agent_message([Part(text="Direct message response")]) + ) + return + if scenario == "tck-artifact-text": + part = Part(text="Generated text content") + elif scenario == "tck-artifact-file": + part = Part(raw=b"tck", media_type="text/plain", filename="output.txt") + elif scenario == "tck-artifact-file-url": + part = Part( + url="https://example.com/output.txt", + media_type="text/plain", + filename="output.txt", + ) + else: + part = Part( + data=json_format.Parse('{"key": "value", "count": 42}', struct_pb2.Value()) + ) + await updater.add_artifact([part]) + await updater.complete() + + def executor_class() -> type: from a2a.server.agent_execution.agent_executor import AgentExecutor @@ -603,8 +664,23 @@ def executor_class() -> type: # -- the HTTP app ------------------------------------------------------------------- +#: HTTP+JSON media type (A2A 1.0.1 section 11.1). The SDK labels successful +#: REST responses with it but its error responses with application/json. +A2A_JSON_MEDIA_TYPE = b"application/a2a+json" + + +def _a2a_media_type(name: bytes, value: bytes) -> tuple[bytes, bytes]: + """Relabel a REST response's ``application/json`` as the A2A media type.""" + if name.lower() == b"content-type": + base, sep, params = value.partition(b";") + if base.strip().lower() == b"application/json": + return name, A2A_JSON_MEDIA_TYPE + sep + params + return name, value + + class GuardMiddleware: - """Host check, no browser Origin, bearer token, and the extensions header.""" + """Host check, no browser Origin, bearer token, the extensions header, and + the A2A media type on HTTP+JSON responses.""" def __init__(self, app: Any, config: A2AConfig) -> None: self.app = app @@ -650,12 +726,17 @@ async def __call__(self, scope: Any, receive: Any, send: Any) -> None: if item.strip() } + rest = scope["path"].startswith(REST_PATH) + async def send_with_extensions(message: Any) -> None: - if message["type"] == "http.response.start" and EXTENSION_URI in requested: + if message["type"] == "http.response.start": message = dict(message) - message["headers"] = list(message.get("headers") or []) + [ - (b"a2a-extensions", EXTENSION_URI.encode()) - ] + headers = list(message.get("headers") or []) + if rest: + headers = [_a2a_media_type(k, v) for k, v in headers] + if EXTENSION_URI in requested: + headers.append((b"a2a-extensions", EXTENSION_URI.encode())) + message["headers"] = headers await send(message) await self.app(scope, receive, send_with_extensions) @@ -675,6 +756,11 @@ def build_app(bridge: AgentBridge, config: A2AConfig) -> Any: from a2a.server.tasks.inmemory_task_store import InMemoryTaskStore from starlette.applications import Starlette + if config.tck_scenarios and getattr(bridge, "mode", None) != "sandbox": + raise ValueError( + "--a2a-tck-scenarios needs --mode sandbox: scripted TCK answers are " + "never served beside real workflows" + ) signer = card_signer(bridge) card = sign_agent_card(build_agent_card(bridge, config), signer) extended = ( @@ -683,7 +769,7 @@ def build_app(bridge: AgentBridge, config: A2AConfig) -> Any: else None ) handler = DefaultRequestHandler( - agent_executor=executor_class()(bridge), + agent_executor=executor_class()(bridge, tck_scenarios=config.tck_scenarios), task_store=InMemoryTaskStore(), agent_card=card, extended_agent_card=extended, @@ -730,6 +816,8 @@ def serve(bridge: AgentBridge, config: A2AConfig) -> None: f"openadapt-agent: the Agent Card can't be signed, so A2A was not " f"started: {exc}" ) from exc + except ValueError as exc: + raise SystemExit(f"openadapt-agent: {exc}") from exc print( f"openadapt-agent: serving over A2A at {config.base_url} (Agent Card " f"{config.base_url}/.well-known/agent-card.json, signed by " diff --git a/packages/flow/openadapt_flow/agent/cli.py b/packages/flow/openadapt_flow/agent/cli.py index 3fb9cbfaac..83959985cf 100644 --- a/packages/flow/openadapt_flow/agent/cli.py +++ b/packages/flow/openadapt_flow/agent/cli.py @@ -661,6 +661,14 @@ def build_parser() -> argparse.ArgumentParser: "must carry. Required off loopback." ), ) + p.add_argument( + "--a2a-tck-scenarios", + action="store_true", + help=( + "For running the official A2A TCK: answer its scripted tck-* " + "messages. Needs --mode sandbox and loopback." + ), + ) p.set_defaults(func=_cmd_serve) repair = sub.add_parser( @@ -863,11 +871,12 @@ def serve(*bridges: Any, **options: Any) -> None: port=args.a2a_port, public_url=args.a2a_public_url, token=a2a_server.read_token(args.a2a_token_file), + tck_scenarios=args.a2a_tck_scenarios, ) except (OSError, ValueError) as exc: print(f"serve: {exc}", file=sys.stderr) return 2 - elif args.a2a_token_file or args.a2a_public_url: + elif args.a2a_token_file or args.a2a_public_url or args.a2a_tck_scenarios: print("serve: the --a2a-* flags need --a2a", file=sys.stderr) return 2 From e777b993a56f33961cda3500994ab9c78086c7d7 Mon Sep 17 00:00:00 2001 From: abrichr Date: Mon, 30 Nov 2026 14:59:38 -0500 Subject: [PATCH 3/7] test(a2a): check the server with the A2A JavaScript SDK benchmark/a2a_interop runs the official JS SDK (@a2a-js/sdk 1.3.0) against serve --a2a. It verifies the card signature with jose and canonicalize (independent JWS and RFC 8785), runs a sandbox workflow, and sends a second key's handoff to verify_handoff over JSON-RPC and HTTP+JSON. All checks pass; evidence in 2026-11-30/evidence.json. --- CAPABILITIES.md | 2 +- ...2agent-protocol-adapter-openadapt-agent.md | 2 +- capabilities/CAPABILITIES.md.sha256 | 2 +- llms-full.txt | 2 +- .../flow/benchmark/a2a_interop/.gitignore | 1 + .../a2a_interop/2026-11-30/evidence.json | 54 +++++ packages/flow/benchmark/a2a_interop/README.md | 55 ++++++ .../flow/benchmark/a2a_interop/interop.mjs | 132 +++++++++++++ .../benchmark/a2a_interop/package-lock.json | 80 ++++++++ .../flow/benchmark/a2a_interop/package.json | 10 + .../flow/benchmark/a2a_interop/run_interop.py | 184 ++++++++++++++++++ packages/flow/docs/A2A.md | 7 + 12 files changed, 527 insertions(+), 4 deletions(-) create mode 100644 packages/flow/benchmark/a2a_interop/.gitignore create mode 100644 packages/flow/benchmark/a2a_interop/2026-11-30/evidence.json create mode 100644 packages/flow/benchmark/a2a_interop/README.md create mode 100644 packages/flow/benchmark/a2a_interop/interop.mjs create mode 100644 packages/flow/benchmark/a2a_interop/package-lock.json create mode 100644 packages/flow/benchmark/a2a_interop/package.json create mode 100644 packages/flow/benchmark/a2a_interop/run_interop.py diff --git a/CAPABILITIES.md b/CAPABILITIES.md index 0d99a84c3b..8c899a25de 100644 --- a/CAPABILITIES.md +++ b/CAPABILITIES.md @@ -358,7 +358,7 @@ improvising or retrying when something is off. | Admit a draft by a person, an admitter key, or an agent under a person-signed policy, including self-admission when the policy allows it | Released | Unit tests | [JIT_ADMISSION.md](packages/flow/docs/JIT_ADMISSION.md) | | MCP server: your agent decides what to enter, OpenAdapt makes the entry and checks it | Released | Synthetic sandbox | `openadapt-agent`, [packages/agent](packages/agent/README.md) | | Agent-to-agent handoffs: when one agent hands a result to another, the run's signed receipt (`record/run/v1`) goes with it (`openadapt handoff send`, inline, detached beside a file, or POSTed to a webhook), and the receiver checks it against keys it pins (`openadapt handoff verify`). The verdict gives the signer role from the receiver's registry, integrity, checks passed and not checked, and "confirmed in the other party's system" lines; it always says a valid signature proves who signed, not that the claim is true, binds the payload as the receipt's `payload` subject (re-signed by the run's own key; other bytes or no payload subject are refused), and counts a confirmation as independent only when it was read from the other party's system. Over MCP, `serve --handoffs` adds `get_handoff` and `verify_handoff`. The private openings never travel | On main ([#2414](https://github.com/OpenAdaptAI/OpenAdapt/pull/2414)) | Unit tests over receipts from Flow's own writer and the shared `record/run/v1` confirmation vectors and the shared payload vectors (good, tampered, unknown signer, bound, mismatched and missing payload, detached file, local webhook); MCP and A2A end to end with the stubbed run process; a two-party test of 20 handoffs over HTTP (0 false accepts, 0 true rejects); one real headless MockMed run handed off over the CLI and checked against the receiver's own record ([benchmark/handoff_real_run](packages/flow/benchmark/handoff_real_run/README.md)); `--ledger` tested against #2415's `HandoffLedger` | `openadapt handoff`, `openadapt_flow/handoff.py`, [HANDOFFS.md](packages/flow/docs/HANDOFFS.md), draft format [HANDOFF_RECEIPTS.md](packages/flow/docs/HANDOFF_RECEIPTS.md) | -| A2A (Agent2Agent) protocol adapter: `openadapt agent serve --a2a` serves compiled workflows as A2A 1.0 skills with the official `a2a-sdk` (`openadapt[a2a]`): Agent Card at `/.well-known/agent-card.json`, signed (A2A 1.0 section 8.4, EdDSA JWS by the Seal key that signs receipts; no server if the key can't be opened), JSON-RPC and HTTP+JSON, runs as tasks with status updates, the run's receipt as a handoff artifact when Flow wrote one (sandbox and strict at-rest runs have none), a `verify_handoff` skill, and the draft extension `https://openadapt.ai/extensions/handoff-receipt/v1`. Every call passes the MCP server's gate; person confirmations are not served; only `done` is completed. Loopback by default, a bearer token anywhere else, browser `Origin` and unknown `Host` refused | On main ([#2414](https://github.com/OpenAdaptAI/OpenAdapt/pull/2414)) | Synthetic: the official `a2a-sdk` 1.3.1 client against the server over HTTP on 127.0.0.1, with a governed run whose Flow process is stubbed and whose receipt Flow's writer signs; the official A2A TCK (a2aproject/a2a-tck at 5e6f37c, 2026-11-30, sandbox server with `--a2a-tck-scenarios`): 121 automated checks passed, 0 failed, 142 skipped (gRPC, push, cancel, auth scenarios), MUST 78.7% because the TCK counts skipped and manual checks as not passed ([benchmark/a2a_tck](packages/flow/benchmark/a2a_tck/README.md)); the card signature verified by the `a2a-sdk` verifier and refused when changed, unpinned or relabelled (the TCK leaves signing to manual checks) | `openadapt_flow/agent/a2a_server.py`, [A2A.md](packages/flow/docs/A2A.md) | +| A2A (Agent2Agent) protocol adapter: `openadapt agent serve --a2a` serves compiled workflows as A2A 1.0 skills with the official `a2a-sdk` (`openadapt[a2a]`): Agent Card at `/.well-known/agent-card.json`, signed (A2A 1.0 section 8.4, EdDSA JWS by the Seal key that signs receipts; no server if the key can't be opened), JSON-RPC and HTTP+JSON, runs as tasks with status updates, the run's receipt as a handoff artifact when Flow wrote one (sandbox and strict at-rest runs have none), a `verify_handoff` skill, and the draft extension `https://openadapt.ai/extensions/handoff-receipt/v1`. Every call passes the MCP server's gate; person confirmations are not served; only `done` is completed. Loopback by default, a bearer token anywhere else, browser `Origin` and unknown `Host` refused | On main ([#2414](https://github.com/OpenAdaptAI/OpenAdapt/pull/2414)) | Synthetic: the official `a2a-sdk` 1.3.1 client against the server over HTTP on 127.0.0.1, with a governed run whose Flow process is stubbed and whose receipt Flow's writer signs; the official A2A TCK (a2aproject/a2a-tck at 5e6f37c, 2026-11-30, sandbox server with `--a2a-tck-scenarios`): 121 automated checks passed, 0 failed, 142 skipped (gRPC, push, cancel, auth scenarios), MUST 78.7% because the TCK counts skipped and manual checks as not passed ([benchmark/a2a_tck](packages/flow/benchmark/a2a_tck/README.md)); a second implementation, the A2A JavaScript SDK 1.3.0, ran a workflow and verified a second key's handoff over JSON-RPC and HTTP+JSON and checked the card signature with independent JWS and RFC 8785 libraries, all on one computer ([benchmark/a2a_interop](packages/flow/benchmark/a2a_interop/README.md)); the card signature verified by the `a2a-sdk` verifier and refused when changed, unpinned or relabelled (the TCK leaves signing to manual checks) | `openadapt_flow/agent/a2a_server.py`, [A2A.md](packages/flow/docs/A2A.md) | | Teach over MCP: an agent does a new task once through OpenAdapt; the run is read back, compiled and admitted (a person confirms the record check; the agent admits only under a person-signed policy), and becomes a tool it calls with no model calls. Web, and Windows, macOS, Linux, RDP and Citrix with a person approving each save | On main ([#1335](https://github.com/OpenAdaptAI/OpenAdapt/pull/1335)) | Synthetic (MockMed over MCP, and through the real RDP and Citrix backends); a native Cocoa app with SQLite through `MacOSBackend`, taught, confirmed, admitted under a signed policy and called (canary and taught run `VERIFIED`, 0 model calls; [teach_desktop](packages/flow/benchmark/teach_desktop/README.md)) | `openadapt-agent serve --teach`, [packages/agent](packages/agent/README.md#teach-a-new-workflow-from-your-agent) | | Turn a read-only browser task into a tool for the coding agent you already use: `openadapt setup` registers the MCP server and a skill in Claude Code, Cursor, Codex and Gemini CLI (idempotent, `--dry-run`, `--undo`); `openadapt setup --app deploy.yaml --verify verify.yaml` sets the agent up to teach saves in one web, desktop, RDP or Citrix app instead, each read back from the system of record. Read-only teaching runs only where a guard stops writes before they leave (the browser); `serve --teach-browser --config` naming a desktop, RDP or Citrix app is refused; the agent does the task once through `teach_start`/`teach_act`/`teach_finish`, the task must end in a download, the file is checked (columns, a column between two inputs or equal to one, fewest rows), the compiled steps are replayed once with no model, and the agent gets a `taught_` tool that downloads a checked file with new inputs. The browser sends no POST, PUT, PATCH or DELETE and stays on one site; a compiled run stops when a control is missing, matches more than one element, or is relabelled | Released ([#1502](https://github.com/OpenAdaptAI/OpenAdapt/pull/1502)) | Real headless Chromium on the local example portal (scripted MCP client, in CI); a real Claude Code agent taught the export from the guide's prompt and called the tool with new dates (2026-10-24, one run) | `openadapt setup`, `openadapt-agent serve --teach-browser`, [FIRST_TOOL.md](packages/flow/docs/FIRST_TOOL.md) | | Verify any agent's own writes: `openadapt verify` reads the system of record before and after a write, against a contract the operator owns (REST, FHIR, SQL, GraphQL), and returns a verified receipt (`openadapt.effect-receipt/v1`) or a refusal (`REFUTED`, `UNCERTAIN`), never an unverified success. Python SDK (`openadapt.verify`, which is `openadapt_flow.verifier`: `begin_write`, `verify_write`, `verified_write`) wraps a write in any agent framework; the MCP server (`openadapt verify serve`) offers `verify_begin`, `verify_check` and `verify_recheck` to any MCP client | Released ([#1589](https://github.com/OpenAdaptAI/OpenAdapt/pull/1589)) | Synthetic (MockMed's fault server over real HTTP: correct write, wrong record, not saved, saved twice, unreadable store) | `openadapt verify`, [VERIFY_WRITES.md](packages/flow/docs/VERIFY_WRITES.md) | diff --git a/capabilities/10-computer-use-agents/0070-a2a-agent2agent-protocol-adapter-openadapt-agent.md b/capabilities/10-computer-use-agents/0070-a2a-agent2agent-protocol-adapter-openadapt-agent.md index 6ae394f94f..d59f7d9bb4 100644 --- a/capabilities/10-computer-use-agents/0070-a2a-agent2agent-protocol-adapter-openadapt-agent.md +++ b/capabilities/10-computer-use-agents/0070-a2a-agent2agent-protocol-adapter-openadapt-agent.md @@ -1 +1 @@ -| A2A (Agent2Agent) protocol adapter: `openadapt agent serve --a2a` serves compiled workflows as A2A 1.0 skills with the official `a2a-sdk` (`openadapt[a2a]`): Agent Card at `/.well-known/agent-card.json`, signed (A2A 1.0 section 8.4, EdDSA JWS by the Seal key that signs receipts; no server if the key can't be opened), JSON-RPC and HTTP+JSON, runs as tasks with status updates, the run's receipt as a handoff artifact when Flow wrote one (sandbox and strict at-rest runs have none), a `verify_handoff` skill, and the draft extension `https://openadapt.ai/extensions/handoff-receipt/v1`. Every call passes the MCP server's gate; person confirmations are not served; only `done` is completed. Loopback by default, a bearer token anywhere else, browser `Origin` and unknown `Host` refused | On main ([#2414](https://github.com/OpenAdaptAI/OpenAdapt/pull/2414)) | Synthetic: the official `a2a-sdk` 1.3.1 client against the server over HTTP on 127.0.0.1, with a governed run whose Flow process is stubbed and whose receipt Flow's writer signs; the official A2A TCK (a2aproject/a2a-tck at 5e6f37c, 2026-11-30, sandbox server with `--a2a-tck-scenarios`): 121 automated checks passed, 0 failed, 142 skipped (gRPC, push, cancel, auth scenarios), MUST 78.7% because the TCK counts skipped and manual checks as not passed ([benchmark/a2a_tck](packages/flow/benchmark/a2a_tck/README.md)); the card signature verified by the `a2a-sdk` verifier and refused when changed, unpinned or relabelled (the TCK leaves signing to manual checks) | `openadapt_flow/agent/a2a_server.py`, [A2A.md](packages/flow/docs/A2A.md) | +| A2A (Agent2Agent) protocol adapter: `openadapt agent serve --a2a` serves compiled workflows as A2A 1.0 skills with the official `a2a-sdk` (`openadapt[a2a]`): Agent Card at `/.well-known/agent-card.json`, signed (A2A 1.0 section 8.4, EdDSA JWS by the Seal key that signs receipts; no server if the key can't be opened), JSON-RPC and HTTP+JSON, runs as tasks with status updates, the run's receipt as a handoff artifact when Flow wrote one (sandbox and strict at-rest runs have none), a `verify_handoff` skill, and the draft extension `https://openadapt.ai/extensions/handoff-receipt/v1`. Every call passes the MCP server's gate; person confirmations are not served; only `done` is completed. Loopback by default, a bearer token anywhere else, browser `Origin` and unknown `Host` refused | On main ([#2414](https://github.com/OpenAdaptAI/OpenAdapt/pull/2414)) | Synthetic: the official `a2a-sdk` 1.3.1 client against the server over HTTP on 127.0.0.1, with a governed run whose Flow process is stubbed and whose receipt Flow's writer signs; the official A2A TCK (a2aproject/a2a-tck at 5e6f37c, 2026-11-30, sandbox server with `--a2a-tck-scenarios`): 121 automated checks passed, 0 failed, 142 skipped (gRPC, push, cancel, auth scenarios), MUST 78.7% because the TCK counts skipped and manual checks as not passed ([benchmark/a2a_tck](packages/flow/benchmark/a2a_tck/README.md)); a second implementation, the A2A JavaScript SDK 1.3.0, ran a workflow and verified a second key's handoff over JSON-RPC and HTTP+JSON and checked the card signature with independent JWS and RFC 8785 libraries, all on one computer ([benchmark/a2a_interop](packages/flow/benchmark/a2a_interop/README.md)); the card signature verified by the `a2a-sdk` verifier and refused when changed, unpinned or relabelled (the TCK leaves signing to manual checks) | `openadapt_flow/agent/a2a_server.py`, [A2A.md](packages/flow/docs/A2A.md) | diff --git a/capabilities/CAPABILITIES.md.sha256 b/capabilities/CAPABILITIES.md.sha256 index d84d40f835..f41e6ffb86 100644 --- a/capabilities/CAPABILITIES.md.sha256 +++ b/capabilities/CAPABILITIES.md.sha256 @@ -1 +1 @@ -5a4502dcc30b599e3bf1ac3a551ee291c02cfe40e6a8620c5a75deaa06897919 +6b20b283d1c0ac335e4b7c8ca6a1b18a809d00a066106c3bdc4e39ac00b62c80 diff --git a/llms-full.txt b/llms-full.txt index 63be03bd69..a8588d4b5b 100644 --- a/llms-full.txt +++ b/llms-full.txt @@ -529,7 +529,7 @@ improvising or retrying when something is off. | Admit a draft by a person, an admitter key, or an agent under a person-signed policy, including self-admission when the policy allows it | Released | Unit tests | [JIT_ADMISSION.md](https://github.com/OpenAdaptAI/OpenAdapt/blob/main/packages/flow/docs/JIT_ADMISSION.md) | | MCP server: your agent decides what to enter, OpenAdapt makes the entry and checks it | Released | Synthetic sandbox | `openadapt-agent`, [packages/agent](https://github.com/OpenAdaptAI/OpenAdapt/blob/main/packages/agent/README.md) | | Agent-to-agent handoffs: when one agent hands a result to another, the run's signed receipt (`record/run/v1`) goes with it (`openadapt handoff send`, inline, detached beside a file, or POSTed to a webhook), and the receiver checks it against keys it pins (`openadapt handoff verify`). The verdict gives the signer role from the receiver's registry, integrity, checks passed and not checked, and "confirmed in the other party's system" lines; it always says a valid signature proves who signed, not that the claim is true, binds the payload as the receipt's `payload` subject (re-signed by the run's own key; other bytes or no payload subject are refused), and counts a confirmation as independent only when it was read from the other party's system. Over MCP, `serve --handoffs` adds `get_handoff` and `verify_handoff`. The private openings never travel | On main ([#2414](https://github.com/OpenAdaptAI/OpenAdapt/pull/2414)) | Unit tests over receipts from Flow's own writer and the shared `record/run/v1` confirmation vectors and the shared payload vectors (good, tampered, unknown signer, bound, mismatched and missing payload, detached file, local webhook); MCP and A2A end to end with the stubbed run process; a two-party test of 20 handoffs over HTTP (0 false accepts, 0 true rejects); one real headless MockMed run handed off over the CLI and checked against the receiver's own record ([benchmark/handoff_real_run](https://github.com/OpenAdaptAI/OpenAdapt/blob/main/packages/flow/benchmark/handoff_real_run/README.md)); `--ledger` tested against #2415's `HandoffLedger` | `openadapt handoff`, `openadapt_flow/handoff.py`, [HANDOFFS.md](https://github.com/OpenAdaptAI/OpenAdapt/blob/main/packages/flow/docs/HANDOFFS.md), draft format [HANDOFF_RECEIPTS.md](https://github.com/OpenAdaptAI/OpenAdapt/blob/main/packages/flow/docs/HANDOFF_RECEIPTS.md) | -| A2A (Agent2Agent) protocol adapter: `openadapt agent serve --a2a` serves compiled workflows as A2A 1.0 skills with the official `a2a-sdk` (`openadapt[a2a]`): Agent Card at `/.well-known/agent-card.json`, signed (A2A 1.0 section 8.4, EdDSA JWS by the Seal key that signs receipts; no server if the key can't be opened), JSON-RPC and HTTP+JSON, runs as tasks with status updates, the run's receipt as a handoff artifact when Flow wrote one (sandbox and strict at-rest runs have none), a `verify_handoff` skill, and the draft extension `https://openadapt.ai/extensions/handoff-receipt/v1`. Every call passes the MCP server's gate; person confirmations are not served; only `done` is completed. Loopback by default, a bearer token anywhere else, browser `Origin` and unknown `Host` refused | On main ([#2414](https://github.com/OpenAdaptAI/OpenAdapt/pull/2414)) | Synthetic: the official `a2a-sdk` 1.3.1 client against the server over HTTP on 127.0.0.1, with a governed run whose Flow process is stubbed and whose receipt Flow's writer signs; the official A2A TCK (a2aproject/a2a-tck at 5e6f37c, 2026-11-30, sandbox server with `--a2a-tck-scenarios`): 121 automated checks passed, 0 failed, 142 skipped (gRPC, push, cancel, auth scenarios), MUST 78.7% because the TCK counts skipped and manual checks as not passed ([benchmark/a2a_tck](https://github.com/OpenAdaptAI/OpenAdapt/blob/main/packages/flow/benchmark/a2a_tck/README.md)); the card signature verified by the `a2a-sdk` verifier and refused when changed, unpinned or relabelled (the TCK leaves signing to manual checks) | `openadapt_flow/agent/a2a_server.py`, [A2A.md](https://github.com/OpenAdaptAI/OpenAdapt/blob/main/packages/flow/docs/A2A.md) | +| A2A (Agent2Agent) protocol adapter: `openadapt agent serve --a2a` serves compiled workflows as A2A 1.0 skills with the official `a2a-sdk` (`openadapt[a2a]`): Agent Card at `/.well-known/agent-card.json`, signed (A2A 1.0 section 8.4, EdDSA JWS by the Seal key that signs receipts; no server if the key can't be opened), JSON-RPC and HTTP+JSON, runs as tasks with status updates, the run's receipt as a handoff artifact when Flow wrote one (sandbox and strict at-rest runs have none), a `verify_handoff` skill, and the draft extension `https://openadapt.ai/extensions/handoff-receipt/v1`. Every call passes the MCP server's gate; person confirmations are not served; only `done` is completed. Loopback by default, a bearer token anywhere else, browser `Origin` and unknown `Host` refused | On main ([#2414](https://github.com/OpenAdaptAI/OpenAdapt/pull/2414)) | Synthetic: the official `a2a-sdk` 1.3.1 client against the server over HTTP on 127.0.0.1, with a governed run whose Flow process is stubbed and whose receipt Flow's writer signs; the official A2A TCK (a2aproject/a2a-tck at 5e6f37c, 2026-11-30, sandbox server with `--a2a-tck-scenarios`): 121 automated checks passed, 0 failed, 142 skipped (gRPC, push, cancel, auth scenarios), MUST 78.7% because the TCK counts skipped and manual checks as not passed ([benchmark/a2a_tck](https://github.com/OpenAdaptAI/OpenAdapt/blob/main/packages/flow/benchmark/a2a_tck/README.md)); a second implementation, the A2A JavaScript SDK 1.3.0, ran a workflow and verified a second key's handoff over JSON-RPC and HTTP+JSON and checked the card signature with independent JWS and RFC 8785 libraries, all on one computer ([benchmark/a2a_interop](https://github.com/OpenAdaptAI/OpenAdapt/blob/main/packages/flow/benchmark/a2a_interop/README.md)); the card signature verified by the `a2a-sdk` verifier and refused when changed, unpinned or relabelled (the TCK leaves signing to manual checks) | `openadapt_flow/agent/a2a_server.py`, [A2A.md](https://github.com/OpenAdaptAI/OpenAdapt/blob/main/packages/flow/docs/A2A.md) | | Teach over MCP: an agent does a new task once through OpenAdapt; the run is read back, compiled and admitted (a person confirms the record check; the agent admits only under a person-signed policy), and becomes a tool it calls with no model calls. Web, and Windows, macOS, Linux, RDP and Citrix with a person approving each save | On main ([#1335](https://github.com/OpenAdaptAI/OpenAdapt/pull/1335)) | Synthetic (MockMed over MCP, and through the real RDP and Citrix backends); a native Cocoa app with SQLite through `MacOSBackend`, taught, confirmed, admitted under a signed policy and called (canary and taught run `VERIFIED`, 0 model calls; [teach_desktop](https://github.com/OpenAdaptAI/OpenAdapt/blob/main/packages/flow/benchmark/teach_desktop/README.md)) | `openadapt-agent serve --teach`, [packages/agent](https://github.com/OpenAdaptAI/OpenAdapt/blob/main/packages/agent/README.md#teach-a-new-workflow-from-your-agent) | | Turn a read-only browser task into a tool for the coding agent you already use: `openadapt setup` registers the MCP server and a skill in Claude Code, Cursor, Codex and Gemini CLI (idempotent, `--dry-run`, `--undo`); `openadapt setup --app deploy.yaml --verify verify.yaml` sets the agent up to teach saves in one web, desktop, RDP or Citrix app instead, each read back from the system of record. Read-only teaching runs only where a guard stops writes before they leave (the browser); `serve --teach-browser --config` naming a desktop, RDP or Citrix app is refused; the agent does the task once through `teach_start`/`teach_act`/`teach_finish`, the task must end in a download, the file is checked (columns, a column between two inputs or equal to one, fewest rows), the compiled steps are replayed once with no model, and the agent gets a `taught_` tool that downloads a checked file with new inputs. The browser sends no POST, PUT, PATCH or DELETE and stays on one site; a compiled run stops when a control is missing, matches more than one element, or is relabelled | Released ([#1502](https://github.com/OpenAdaptAI/OpenAdapt/pull/1502)) | Real headless Chromium on the local example portal (scripted MCP client, in CI); a real Claude Code agent taught the export from the guide's prompt and called the tool with new dates (2026-10-24, one run) | `openadapt setup`, `openadapt-agent serve --teach-browser`, [FIRST_TOOL.md](https://github.com/OpenAdaptAI/OpenAdapt/blob/main/packages/flow/docs/FIRST_TOOL.md) | | Verify any agent's own writes: `openadapt verify` reads the system of record before and after a write, against a contract the operator owns (REST, FHIR, SQL, GraphQL), and returns a verified receipt (`openadapt.effect-receipt/v1`) or a refusal (`REFUTED`, `UNCERTAIN`), never an unverified success. Python SDK (`openadapt.verify`, which is `openadapt_flow.verifier`: `begin_write`, `verify_write`, `verified_write`) wraps a write in any agent framework; the MCP server (`openadapt verify serve`) offers `verify_begin`, `verify_check` and `verify_recheck` to any MCP client | Released ([#1589](https://github.com/OpenAdaptAI/OpenAdapt/pull/1589)) | Synthetic (MockMed's fault server over real HTTP: correct write, wrong record, not saved, saved twice, unreadable store) | `openadapt verify`, [VERIFY_WRITES.md](https://github.com/OpenAdaptAI/OpenAdapt/blob/main/packages/flow/docs/VERIFY_WRITES.md) | diff --git a/packages/flow/benchmark/a2a_interop/.gitignore b/packages/flow/benchmark/a2a_interop/.gitignore new file mode 100644 index 0000000000..c2658d7d1b --- /dev/null +++ b/packages/flow/benchmark/a2a_interop/.gitignore @@ -0,0 +1 @@ +node_modules/ diff --git a/packages/flow/benchmark/a2a_interop/2026-11-30/evidence.json b/packages/flow/benchmark/a2a_interop/2026-11-30/evidence.json new file mode 100644 index 0000000000..137a55ccd9 --- /dev/null +++ b/packages/flow/benchmark/a2a_interop/2026-11-30/evidence.json @@ -0,0 +1,54 @@ +{ + "date": "2026-11-30", + "server": { + "command": "openadapt-agent serve --a2a --sandbox-engine simulated --handoff-keys REGISTRY", + "openadapt_flow": "4.0.1" + }, + "client": { + "node": "v22.22.0", + "packages": { + "@a2a-js/sdk": "1.3.0", + "canonicalize": "2.1.0", + "jose": "6.2.19" + } + }, + "results": { + "card": { + "signed_by_pinned_key": true, + "tampered_refused": true, + "other_key_refused": true + }, + "JSONRPC": { + "run_completed": true, + "run_state": 3, + "run_artifacts": [ + "run_result" + ], + "run_status_text": "Simulated sandbox result (no app was opened): Saved the change and read the record back to confirm it.", + "run_outcome": "done", + "handoff_integrity": "intact", + "handoff_signer_roles": [ + "customer_key" + ], + "handoff_outcome": "UNKNOWN", + "tampered_integrity": "refused", + "tampered_reason": "bad_signature" + }, + "HTTP+JSON": { + "run_completed": true, + "run_state": 3, + "run_artifacts": [ + "run_result" + ], + "run_status_text": "Simulated sandbox result (no app was opened): Saved the change and read the record back to confirm it.", + "run_outcome": "done", + "handoff_integrity": "intact", + "handoff_signer_roles": [ + "customer_key" + ], + "handoff_outcome": "UNKNOWN", + "tampered_integrity": "refused", + "tampered_reason": "bad_signature" + } + } +} diff --git a/packages/flow/benchmark/a2a_interop/README.md b/packages/flow/benchmark/a2a_interop/README.md new file mode 100644 index 0000000000..10d126c822 --- /dev/null +++ b/packages/flow/benchmark/a2a_interop/README.md @@ -0,0 +1,55 @@ +# A second A2A implementation against `openadapt-agent serve --a2a` + +The other tests of the A2A adapter use the Python `a2a-sdk`, which the server +is also built on. This check uses an implementation that shares no code with +OpenAdapt or the Python SDK: + +- **Client.** The official A2A JavaScript SDK, `@a2a-js/sdk` (Apache-2.0). +- **Card signature.** Checked with `jose` (MIT) for the JWS and `canonicalize` + (Apache-2.0) for RFC 8785. Neither the server nor the Python SDK uses them. + +The exact versions are pinned in `package-lock.json`. Nothing is copied into +this repository; `npm ci` installs them. + +## What it does + +`run_interop.py` does the setup and starts the server, and then `interop.mjs` +runs the checks: + +1. Party A, a second key, signs a run receipt and a handoff document. +2. The sandbox server starts with `--handoff-keys` pinning Party A's key as + `customer_key`. The client pins the server's card key, which is the Seal + key that signs this computer's receipts. +3. The client checks the card signature. It also checks that a card with a + changed interface URL is refused, and so is a key it didn't pin. +4. Over JSON-RPC and again over HTTP+JSON, the client: + - runs `add_triage_note` (sandbox, simulated engine); + - sends Party A's handoff to `verify_handoff`; + - sends the same handoff with one signature byte changed. + +```bash +npm ci +python run_interop.py --out 2026-11-30 +``` + +## Result (2026-11-30, `2026-11-30/evidence.json`) + +| Check | JSON-RPC | HTTP+JSON | +|---|---|---| +| Card signed by the pinned key | yes | (same card) | +| Changed card refused, unpinned key refused | yes | (same card) | +| Run completed with outcome `done` | yes | yes | +| Party A's handoff: integrity | `intact`, signer role `customer_key` | `intact`, signer role `customer_key` | +| Handoff with a changed signature | refused, `bad_signature` | refused, `bad_signature` | + +The handoff's outcome is `UNKNOWN` because Party A's receipt comes from a +report with no read-back. The verdict copies the receipt's outcome and never +upgrades it. + +## What it doesn't show + +- **The run carries no receipt.** The sandbox run is simulated and goes + through no Flow CLI process. +- **Both parties are on one computer.** Party A is a second key there, not + another organisation's system. No handoff has yet gone to a real outside + party. diff --git a/packages/flow/benchmark/a2a_interop/interop.mjs b/packages/flow/benchmark/a2a_interop/interop.mjs new file mode 100644 index 0000000000..579daad105 --- /dev/null +++ b/packages/flow/benchmark/a2a_interop/interop.mjs @@ -0,0 +1,132 @@ +// A second A2A implementation talks to `openadapt-agent serve --a2a`. +// +// The client is the official A2A JavaScript SDK (@a2a-js/sdk). The card +// signature is checked with jose (JWS) and canonicalize (RFC 8785), neither of +// which OpenAdapt or the Python a2a-sdk uses. Usage: +// +// node interop.mjs URL PINNED_CARD_KEY.json HANDOFF.json +// +// PINNED_CARD_KEY.json is {"kid": ..., "jwk": {...}}: the key the client chose +// to trust for this server's card. HANDOFF.json is a handoff document signed by +// another party whose key the server trusts. Prints one JSON result object. + +import { readFileSync } from "node:fs"; +import { randomUUID } from "node:crypto"; +import canonicalize from "canonicalize"; +import { base64url, flattenedVerify, importJWK } from "jose"; +import { Role, TaskState } from "@a2a-js/sdk"; +import { ClientFactory, ClientFactoryOptions } from "@a2a-js/sdk/client"; + +const [url, pinnedPath, handoffPath] = process.argv.slice(2); +const pinned = JSON.parse(readFileSync(pinnedPath, "utf8")); +const handoff = JSON.parse(readFileSync(handoffPath, "utf8")); +const results = {}; + +// -- the card signature (A2A 1.0 section 8.4) --------------------------------------- + +function cleanEmpty(value) { + if (Array.isArray(value)) { + const items = value.map(cleanEmpty).filter((v) => v !== undefined); + return items.length ? items : undefined; + } + if (value && typeof value === "object") { + const entries = Object.entries(value) + .map(([k, v]) => [k, cleanEmpty(v)]) + .filter(([, v]) => v !== undefined); + return entries.length ? Object.fromEntries(entries) : undefined; + } + return value === "" || value === null ? undefined : value; +} + +async function verifyCard(card, key) { + const { signatures, ...rest } = card; + const payload = base64url.encode(canonicalize(cleanEmpty(rest))); + for (const s of signatures ?? []) { + const header = JSON.parse(new TextDecoder().decode(base64url.decode(s.protected))); + if (header.alg !== "EdDSA" || header.kid !== pinned.kid) continue; + try { + await flattenedVerify({ protected: s.protected, payload, signature: s.signature }, key, { + algorithms: ["EdDSA"], + }); + return header.kid; + } catch { + // try the next signature + } + } + return null; +} + +const card = await (await fetch(`${url}/.well-known/agent-card.json`)).json(); +const key = await importJWK(pinned.jwk, "EdDSA"); +const tampered = structuredClone(card); +tampered.supportedInterfaces[0].url = "http://evil.example/a2a/jsonrpc"; +const other = await importJWK( + { kty: "OKP", crv: "Ed25519", x: base64url.encode(new Uint8Array(32).fill(7)) }, + "EdDSA", +); +results.card = { + signed_by_pinned_key: (await verifyCard(card, key)) === pinned.kid, + tampered_refused: (await verifyCard(tampered, key)) === null, + other_key_refused: (await verifyCard(card, other)) === null, +}; + +// -- runs and handoffs over both bindings ------------------------------------------- + +function message(data) { + return { + messageId: randomUUID(), + contextId: "", + taskId: "", + role: Role.ROLE_USER, + parts: [{ content: { $case: "data", value: data }, metadata: undefined, filename: "", mediaType: "application/json" }], + metadata: undefined, + extensions: [], + referenceTaskIds: [], + }; +} + +function artifactData(task, name) { + const artifact = (task.artifacts ?? []).find((a) => a.name === name); + const part = artifact?.parts.find((p) => p.content?.$case === "data"); + return part?.content.value; +} + +function tamper(doc) { + const copy = structuredClone(doc); + const sig = copy.receipt.signatures[0].sig; + copy.receipt.signatures[0].sig = (sig[0] === "A" ? "B" : "A") + sig.slice(1); + return copy; +} + +for (const transport of ["JSONRPC", "HTTP+JSON"]) { + const factory = new ClientFactory( + ClientFactoryOptions.createFrom(ClientFactoryOptions.default, { preferredTransports: [transport] }), + ); + const client = await factory.createFromUrl(url); + const send = (data) => client.sendMessage({ tenant: "", message: message(data), configuration: undefined, metadata: undefined }); + + const run = await send({ + skill: "add_triage_note", + inputs: { note: "Made-up triage note for an interop test.", sandbox_case: "normal" }, + request_id: `interop-${transport.replace(/[^A-Za-z0-9]/g, "")}-${randomUUID()}`, + }); + const runResult = artifactData(run, "run_result"); + const good = await send({ skill: "verify_handoff", handoff }); + const bad = await send({ skill: "verify_handoff", handoff: tamper(handoff) }); + const goodVerdict = artifactData(good, "verdict"); + const badVerdict = artifactData(bad, "verdict"); + results[transport] = { + run_completed: run.status?.state === TaskState.TASK_STATE_COMPLETED, + run_state: run.status?.state ?? null, + run_artifacts: (run.artifacts ?? []).map((a) => a.name), + run_status_text: run.status?.message?.parts?.map((p) => p.content?.value).join(" ") ?? null, + run_outcome: runResult?.outcome ?? null, + handoff_integrity: goodVerdict?.integrity ?? null, + handoff_signer_roles: goodVerdict?.signer_roles ?? null, + handoff_outcome: goodVerdict?.outcome ?? null, + tampered_integrity: badVerdict?.integrity ?? null, + tampered_reason: badVerdict?.reason ?? null, + }; +} + +console.log(JSON.stringify(results, null, 2)); diff --git a/packages/flow/benchmark/a2a_interop/package-lock.json b/packages/flow/benchmark/a2a_interop/package-lock.json new file mode 100644 index 0000000000..1cc762c552 --- /dev/null +++ b/packages/flow/benchmark/a2a_interop/package-lock.json @@ -0,0 +1,80 @@ +{ + "name": "openadapt-a2a-interop", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "openadapt-a2a-interop", + "dependencies": { + "@a2a-js/sdk": "1.3.0", + "canonicalize": "2.1.0", + "jose": "6.2.19" + } + }, + "node_modules/@a2a-js/sdk": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/@a2a-js/sdk/-/sdk-1.3.0.tgz", + "integrity": "sha512-OpK4nygUnLKlpTFZlM2IrYu7f3c/B7c4u4Z14+vgMq24lEINTVCxH/BqZx+GL92rNf7CoBL5oTP5UhNsl75yyg==", + "license": "Apache-2.0", + "dependencies": { + "jose": "^6.2.3" + }, + "bin": { + "a2a-db": "dist/cli/a2a_db.js" + }, + "engines": { + "node": ">=20" + }, + "peerDependencies": { + "@bufbuild/protobuf": "^2.10.2", + "@grpc/grpc-js": "^1.11.0", + "better-sqlite3": "^12.0.0 || ^13.0.0", + "express": "^4.21.2 || ^5.1.0", + "kysely": "^0.28.17 || ^0.29.0", + "mysql2": "^3.0.0", + "pg": "^8.0.0" + }, + "peerDependenciesMeta": { + "@bufbuild/protobuf": { + "optional": true + }, + "@grpc/grpc-js": { + "optional": true + }, + "better-sqlite3": { + "optional": true + }, + "express": { + "optional": true + }, + "kysely": { + "optional": true + }, + "mysql2": { + "optional": true + }, + "pg": { + "optional": true + } + } + }, + "node_modules/canonicalize": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/canonicalize/-/canonicalize-2.1.0.tgz", + "integrity": "sha512-F705O3xrsUtgt98j7leetNhTWPe+5S72rlL5O4jA1pKqBVQ/dT1O1D6PFxmSXvc0SUOinWS57DKx0I3CHrXJHQ==", + "license": "Apache-2.0", + "bin": { + "canonicalize": "bin/canonicalize.js" + } + }, + "node_modules/jose": { + "version": "6.2.19", + "resolved": "https://registry.npmjs.org/jose/-/jose-6.2.19.tgz", + "integrity": "sha512-NnThKzdK4dJTUQOBoMB0bF3Xmw4EtbFTo4xzeLaoBwcuOdBVDQcKB3/86DUTWjVMXkZOdaqZVo2OU6DllhS+9Q==", + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/panva" + } + } + } +} diff --git a/packages/flow/benchmark/a2a_interop/package.json b/packages/flow/benchmark/a2a_interop/package.json new file mode 100644 index 0000000000..5fbcf2fabc --- /dev/null +++ b/packages/flow/benchmark/a2a_interop/package.json @@ -0,0 +1,10 @@ +{ + "name": "openadapt-a2a-interop", + "private": true, + "type": "module", + "dependencies": { + "@a2a-js/sdk": "1.3.0", + "canonicalize": "2.1.0", + "jose": "6.2.19" + } +} diff --git a/packages/flow/benchmark/a2a_interop/run_interop.py b/packages/flow/benchmark/a2a_interop/run_interop.py new file mode 100644 index 0000000000..a94f5ab24b --- /dev/null +++ b/packages/flow/benchmark/a2a_interop/run_interop.py @@ -0,0 +1,184 @@ +"""Run interop.mjs (the A2A JavaScript SDK) against ``openadapt-agent serve --a2a``. + +Prepares a handoff signed by another party, starts the sandbox server trusting +that party's key, and writes ``/evidence.json``. Needs Node 20+ with +``npm ci`` run in this folder, and openadapt-flow with the a2a extra: + + python run_interop.py [--out 2026-11-30] +""" + +from __future__ import annotations + +import argparse +import base64 +import datetime as dt +import json +import os +import shutil +import socket +import subprocess +import sys +import tempfile +import time +import urllib.request +from pathlib import Path + +from cryptography.hazmat.primitives.asymmetric.ed25519 import Ed25519PrivateKey + +HERE = Path(__file__).resolve().parent + + +def _free_port() -> int: + with socket.socket() as sock: + sock.bind(("127.0.0.1", 0)) + return sock.getsockname()[1] + + +def _other_party_handoff(work: Path) -> tuple[dict, dict]: + """A run receipt and handoff signed by Party A's key, and the registry + entry the server pins for Party A.""" + from openadapt_types import receipt as r + + from openadapt_flow import handoff as h + from openadapt_flow.receipt_record import write_receipt_record + from openadapt_flow.seal_keys import SoftwareSigner + + party = SoftwareSigner(Ed25519PrivateKey.generate(), "generated") + run = work / "party-a-run" + run.mkdir() + report = { + "workflow_name": "Interop handoff", + "execution_outcome": "VERIFIED", + "transaction_outcome": "VERIFIED", + "success": True, + "production_eligible": True, + "started_at": "2026-11-30T12:00:00Z", + "results": [{"step_id": "s1", "intent": "Open the record", "ok": True}], + } + (run / "report.json").write_text(json.dumps(report), encoding="utf-8") + write_receipt_record(run, signer=party, flow_version="interop") + document = h.make_handoff( + {"outcome": "done", "ref": "interop-0001"}, h.receipt_for_run(run), signer=party + ) + registry = { + "schema": r.REGISTRY_SCHEMA, + "keys": [{**party.registry_entry(), "role": "customer_key", "org": "Party A"}], + } + return document, registry + + +def _card_key(seal_home: Path) -> dict: + from openadapt_flow.offline_seal import signer_for + + signer = signer_for(seal_home) + x = base64.urlsafe_b64encode(signer.public_raw()).rstrip(b"=").decode() + return {"kid": signer.key_id, "jwk": {"kty": "OKP", "crv": "Ed25519", "x": x}} + + +def main() -> int: + parser = argparse.ArgumentParser() + parser.add_argument("--out", default=dt.date.today().isoformat()) + args = parser.parse_args() + node = shutil.which("node") + if node is None or not (HERE / "node_modules").is_dir(): + print("needs node and `npm ci` in this folder", file=sys.stderr) + return 2 + with tempfile.TemporaryDirectory() as tmp: + work = Path(tmp) + seal_home = work / "seal-home" + seal_home.mkdir() + document, registry = _other_party_handoff(work) + (work / "handoff.json").write_text(json.dumps(document), encoding="utf-8") + (work / "registry.json").write_text(json.dumps(registry), encoding="utf-8") + env = dict(os.environ, OPENADAPT_SEAL_HOME=str(seal_home)) + (work / "card-key.json").write_text( + json.dumps(_card_key(seal_home)), encoding="utf-8" + ) + port = _free_port() + server = subprocess.Popen( + [ + shutil.which("openadapt-agent") or "openadapt-agent", + "serve", + "--a2a", + "--a2a-port", + str(port), + "--sandbox-engine", + "simulated", + "--handoff-keys", + str(work / "registry.json"), + ], + env=env, + stdout=subprocess.DEVNULL, + stderr=subprocess.PIPE, + text=True, + ) + url = f"http://127.0.0.1:{port}" + try: + deadline = time.monotonic() + 30 + while True: + try: + urllib.request.urlopen( + url + "/.well-known/agent-card.json", timeout=2 + ) + break + except OSError: + if time.monotonic() > deadline or server.poll() is not None: + print( + server.stderr.read() if server.stderr else "", + file=sys.stderr, + ) + return 1 + time.sleep(0.3) + done = subprocess.run( + [ + node, + str(HERE / "interop.mjs"), + url, + str(work / "card-key.json"), + str(work / "handoff.json"), + ], + cwd=HERE, + capture_output=True, + text=True, + timeout=300, + ) + finally: + server.terminate() + server.wait(timeout=10) + if done.returncode != 0: + print(done.stderr, file=sys.stderr) + return done.returncode + results = json.loads(done.stdout) + lock = json.loads((HERE / "package-lock.json").read_text(encoding="utf-8")) + versions = { + name.split("node_modules/")[-1]: meta["version"] + for name, meta in lock["packages"].items() + if name.startswith("node_modules/") + } + from openadapt_flow import __version__ as flow_version + + evidence = { + "date": args.out, + "server": { + "command": "openadapt-agent serve --a2a --sandbox-engine simulated --handoff-keys REGISTRY", + "openadapt_flow": flow_version, + }, + "client": { + "node": subprocess.run( + [node, "--version"], capture_output=True, text=True + ).stdout.strip(), + "packages": versions, + }, + "results": results, + } + out = HERE / args.out + out.mkdir(exist_ok=True) + (out / "evidence.json").write_text( + json.dumps(evidence, indent=2) + "\n", encoding="utf-8" + ) + print(json.dumps(evidence, indent=2)) + return 0 + + +if __name__ == "__main__": + raise SystemExit(main()) diff --git a/packages/flow/docs/A2A.md b/packages/flow/docs/A2A.md index 86677fc45e..f093a09a11 100644 --- a/packages/flow/docs/A2A.md +++ b/packages/flow/docs/A2A.md @@ -146,6 +146,13 @@ notifications, cancel and authentication scenarios the server doesn't offer). The TCK leaves card signing to manual checking. For the details and the earlier run, see [benchmark/a2a_tck](../benchmark/a2a_tck/README.md). +A second implementation was also run against the server. The official A2A +JavaScript SDK ran a workflow and sent another party's handoff to +`verify_handoff` over both bindings. It also checked the card signature with +`jose` and `canonicalize`, which share no code with OpenAdapt or the Python +SDK. Every check passed. See +[benchmark/a2a_interop](../benchmark/a2a_interop/README.md). + ### Running the TCK The TCK asks the server under test to answer messages whose `messageId` From 855585f0f737c58a56bad0ea3b4a3045aa549c34 Mon Sep 17 00:00:00 2001 From: abrichr Date: Mon, 30 Nov 2026 17:50:14 -0500 Subject: [PATCH 4/7] fix(a2a): register the A2A evidence files and refuse abbreviated options Registers the TCK and JavaScript interop evidence in the public artifact inventory, and sets allow_abbrev=False on run_interop.py and on scripts/build_results_table.py, which already failed the check on main. --- packages/flow/benchmark/a2a_interop/run_interop.py | 2 +- packages/flow/public-artifacts.json | 5 +++++ scripts/build_results_table.py | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/packages/flow/benchmark/a2a_interop/run_interop.py b/packages/flow/benchmark/a2a_interop/run_interop.py index a94f5ab24b..cadf992525 100644 --- a/packages/flow/benchmark/a2a_interop/run_interop.py +++ b/packages/flow/benchmark/a2a_interop/run_interop.py @@ -76,7 +76,7 @@ def _card_key(seal_home: Path) -> dict: def main() -> int: - parser = argparse.ArgumentParser() + parser = argparse.ArgumentParser(allow_abbrev=False) parser.add_argument("--out", default=dt.date.today().isoformat()) args = parser.parse_args() node = shutil.which("node") diff --git a/packages/flow/public-artifacts.json b/packages/flow/public-artifacts.json index 3ddde6dc77..6371d6d0e6 100644 --- a/packages/flow/public-artifacts.json +++ b/packages/flow/public-artifacts.json @@ -96,7 +96,12 @@ ".github/workflows/release.yml", ".github/workflows/validate-claims.yml", ".pre-commit-config.yaml", + "benchmark/a2a_interop/2026-11-30/evidence.json", + "benchmark/a2a_interop/interop.mjs", + "benchmark/a2a_interop/package-lock.json", + "benchmark/a2a_interop/package.json", "benchmark/a2a_tck/2026-11-21/compatibility.json", + "benchmark/a2a_tck/2026-11-30/compatibility.json", "benchmark/agent_guard/results.json", "benchmark/agent_test_proof/baselines/dolibarr-claude-verify.json", "benchmark/agent_test_proof/baselines/dolibarr-scripted-readback.json", diff --git a/scripts/build_results_table.py b/scripts/build_results_table.py index f2dcc17d32..cb42022e5d 100644 --- a/scripts/build_results_table.py +++ b/scripts/build_results_table.py @@ -447,7 +447,7 @@ def splice(readme: str, block: str) -> str: def main(argv: list[str] | None = None) -> int: - parser = argparse.ArgumentParser(description=__doc__.splitlines()[0]) + parser = argparse.ArgumentParser(description=__doc__.splitlines()[0], allow_abbrev=False) parser.add_argument( "--check", action="store_true", From 91b0a5688a979c075bd02130416895e9738a67cc Mon Sep 17 00:00:00 2001 From: abrichr Date: Mon, 30 Nov 2026 18:17:19 -0500 Subject: [PATCH 5/7] fix(a2a): sign the spec's canonical card, check the whole JOSE header Codex review on #2828: - Canonical bytes follow A2A 1.0 section 8.4.1 field presence from the proto's REQUIRED markers, so the bearer requirement and empty REQUIRED fields are signed. A served card with fields outside the schema is refused. - A signature is accepted only with alg/kid/typ protected and at most jwk unprotected: crit, jku and duplicated names are refused. - TCK scenario answers need a sandbox-backed bridge with no operator workflows, and refuse a non-loopback advertised URL. - Guard errors on HTTP+JSON paths use application/a2a+json. - The JavaScript harness canonicalizes from its own spec-derived presence table and checks the spec's worked example. --- packages/agent/tests/test_handoff_e2e.py | 157 +++++++++++++-- .../a2a_interop/2026-11-30/evidence.json | 3 +- packages/flow/benchmark/a2a_interop/README.md | 1 + .../flow/benchmark/a2a_interop/interop.mjs | 98 ++++++++-- packages/flow/docs/A2A.md | 13 +- .../flow/openadapt_flow/agent/a2a_server.py | 182 +++++++++++++++--- 6 files changed, 397 insertions(+), 57 deletions(-) diff --git a/packages/agent/tests/test_handoff_e2e.py b/packages/agent/tests/test_handoff_e2e.py index ac4a963588..4b03a2775d 100644 --- a/packages/agent/tests/test_handoff_e2e.py +++ b/packages/agent/tests/test_handoff_e2e.py @@ -44,6 +44,7 @@ from openadapt_flow.agent.bridge import AgentBridge # noqa: E402 from openadapt_flow.agent.handoff_tools import HandoffTools # noqa: E402 from openadapt_flow.agent.mcp import build_server # noqa: E402 +from openadapt_flow.agent.runner import RunnerConfig # noqa: E402 from openadapt_flow.receipt_record import write_receipt_record # noqa: E402 from openadapt_flow.seal_keys import SoftwareSigner # noqa: E402 @@ -152,9 +153,7 @@ async def _send(url, data, **ids): client = await create_client(url, client_config=ClientConfig(streaming=False)) try: task = None - async for event in client.send_message( - SendMessageRequest(message=_message(data, **ids)) - ): + async for event in client.send_message(SendMessageRequest(message=_message(data, **ids))): if event.HasField("task"): task = event.task assert task is not None @@ -233,9 +232,7 @@ async def scenario(): assert "openings" not in json.dumps(handoff["receipt"]) good = await _send(a2a_url, {"skill": "verify_handoff", "handoff": handoff}) - tampered = await _send( - a2a_url, {"skill": "verify_handoff", "handoff": _tampered(handoff)} - ) + tampered = await _send(a2a_url, {"skill": "verify_handoff", "handoff": _tampered(handoff)}) # The receipt is bound to the run result; stapled to other bytes it fails. restapled = h.make_handoff({"outcome": "done", "amount": 10**6}, handoff["receipt"]) swapped = await _send(a2a_url, {"skill": "verify_handoff", "handoff": restapled}) @@ -327,7 +324,9 @@ def test_a2a_off_loopback_needs_a_token_and_hides_workflows(bridge, signer, tmp_ from starlette.testclient import TestClient - client = TestClient(a2a_server.build_app(bridge, config), base_url=f"http://0.0.0.0:{config.port}") + client = TestClient( + a2a_server.build_app(bridge, config), base_url=f"http://0.0.0.0:{config.port}" + ) body = {"jsonrpc": "2.0", "id": 1, "method": "GetExtendedAgentCard", "params": {}} assert client.post("/a2a/jsonrpc", json=body).status_code == 401 wrong = client.post("/a2a/jsonrpc", json=body, headers={"Authorization": "Bearer nope"}) @@ -357,7 +356,11 @@ def test_a2a_follow_up_cannot_approve_a_run_waiting_for_a_person( result = a2a_server.call_remote_tool( bridge, "run_workflow", - {"workflow": next(iter(bridge.catalog)), "inputs": {"note": "x"}, "request_id": "ref-hold-1"}, + { + "workflow": next(iter(bridge.catalog)), + "inputs": {"note": "x"}, + "request_id": "ref-hold-1", + }, ) assert result["outcome"] == "needs_review" assert a2a_server.task_state_for(result["outcome"]) == "TASK_STATE_INPUT_REQUIRED" @@ -475,7 +478,9 @@ def own_record(claim): } ) signer_lines: set[tuple[str, ...]] = set() - reasons: dict[str, set] = {kind: set() for kind in ("true", "fabricated", "differing", "swapped", "unbound")} + reasons: dict[str, set] = { + kind: set() for kind in ("true", "fabricated", "differing", "swapped", "unbound") + } decisions: list[tuple[str, str, float]] = [] class Inbox(BaseHTTPRequestHandler): @@ -652,9 +657,7 @@ def signer(self): def test_a2a_rest_errors_use_the_a2a_media_type(a2a_url): """TCK HTTP_JSON-SVC-001: HTTP+JSON errors are application/a2a+json (1.0.1).""" - missing = httpx.get( - a2a_url + "/a2a/rest/tasks/no-such-task", headers={"A2A-Version": "1.0"} - ) + missing = httpx.get(a2a_url + "/a2a/rest/tasks/no-such-task", headers={"A2A-Version": "1.0"}) assert missing.status_code >= 400 assert missing.headers["content-type"].split(";")[0] == "application/a2a+json" assert "error" in missing.json() @@ -666,12 +669,36 @@ def test_a2a_rest_errors_use_the_a2a_media_type(a2a_url): # -- the A2A TCK's scripted scenarios --------------------------------------------- -def test_tck_scenarios_need_sandbox_and_loopback(bridge): +def test_tck_scenarios_need_sandbox_and_loopback(bridge, monkeypatch): with pytest.raises(ValueError, match="loopback"): a2a_server.A2AConfig(host="0.0.0.0", token="t" * 40, tck_scenarios=True) + # Loopback listener, but the card would advertise a public URL: refused. + with pytest.raises(ValueError, match="advertised URL is not loopback"): + a2a_server.A2AConfig(tck_scenarios=True, public_url="https://agent.example.com") + a2a_server.A2AConfig(tck_scenarios=True, public_url="http://localhost:9999") # The fixture's bridge runs real workflows (production): refused. with pytest.raises(ValueError, match="--mode sandbox"): a2a_server.build_app(bridge, a2a_server.A2AConfig(port=_free_port(), tck_scenarios=True)) + # Relabelling that bridge as sandbox is not enough: it is not sandbox-backed. + monkeypatch.setattr(bridge, "mode", "sandbox") + with pytest.raises(ValueError, match="--mode sandbox"): + a2a_server.build_app(bridge, a2a_server.A2AConfig(port=_free_port(), tck_scenarios=True)) + + +@pytest.fixture() +def sandbox_bridge(tmp_path, signer): + from openadapt_flow.agent.sandbox import SandboxEngine + + runs = tmp_path / "sandbox-runs" + runs.mkdir() + bridge = AgentBridge( + None, + RunnerConfig(runs_dir=runs), + sandbox=SandboxEngine(runs, engine="simulated"), + mode="sandbox", + ) + bridge.handoffs = HandoffTools(registry=_registry(signer), signer=signer) + return bridge def _jsonrpc_send(client, message_id): @@ -688,10 +715,10 @@ def _jsonrpc_send(client, message_id): return response.json()["result"] -def test_tck_scenarios_answer_only_when_turned_on(bridge, monkeypatch): +def test_tck_scenarios_answer_only_when_turned_on(sandbox_bridge): from starlette.testclient import TestClient - monkeypatch.setattr(bridge, "mode", "sandbox") + bridge = sandbox_bridge config = a2a_server.A2AConfig(port=_free_port(), tck_scenarios=True) client = TestClient(a2a_server.build_app(bridge, config), base_url=config.base_url) task = _jsonrpc_send(client, "tck-artifact-text-001")["task"] @@ -710,3 +737,103 @@ def test_tck_scenarios_answer_only_when_turned_on(bridge, monkeypatch): plain = TestClient(a2a_server.build_app(bridge, off), base_url=off.base_url) task = _jsonrpc_send(plain, "tck-artifact-text-001")["task"] assert "Generated text content" not in json.dumps(task) + + +# -- canonical card bytes (A2A 1.0 section 8.4.1) --------------------------------- + + +def test_canonical_card_follows_the_spec_presence_rules(): + """The spec's worked example: REQUIRED fields stay even when empty, an + explicitly set optional field stays at its default, and an empty repeated + field that isn't REQUIRED goes. The expected bytes are written out by hand; + the other REQUIRED fields the example leaves out appear at their defaults.""" + example = { + "name": "Example Agent", + "description": "", + "capabilities": {"streaming": False, "pushNotifications": False, "extensions": []}, + "skills": [], + } + assert a2a_server.canonical_card_bytes(example) == ( + b'{"capabilities":{"pushNotifications":false,"streaming":false},' + b'"defaultInputModes":[],"defaultOutputModes":[],"description":"",' + b'"name":"Example Agent","skills":[],"supportedInterfaces":[],"version":""}' + ) + with pytest.raises(ValueError, match="schema"): + a2a_server.canonical_card_bytes(dict(example, notAField=1)) + + +def test_a_token_cards_bearer_requirement_is_signed(bridge, signer): + config = a2a_server.A2AConfig(host="0.0.0.0", port=_free_port(), token="t" * 40) + card = a2a_server.sign_agent_card(a2a_server.build_agent_card(bridge, config), signer) + from google.protobuf.json_format import MessageToDict + + served = MessageToDict(card) + assert served["securityRequirements"] + assert b'"securityRequirements":[{"schemes":{"bearer":{}}}]' in a2a_server.canonical_card_bytes( + served + ) + keys = {signer.key_id: signer.public_raw()} + assert a2a_server.verify_agent_card(served, keys) == signer.key_id + # Dropping the bearer requirement changes the signed bytes. + stripped = {k: v for k, v in served.items() if k != "securityRequirements"} + with pytest.raises(a2a_server.CardSignatureError): + a2a_server.verify_agent_card(stripped, keys) + + +def _signed_with_header(card: dict, signer, header: dict, unprotected=None) -> dict: + protected = base64.urlsafe_b64encode(json.dumps(header).encode()).rstrip(b"=").decode() + payload = base64.urlsafe_b64encode(a2a_server.canonical_card_bytes(card)).rstrip(b"=").decode() + signature = ( + base64.urlsafe_b64encode(signer.sign(f"{protected}.{payload}".encode("ascii"))) + .rstrip(b"=") + .decode() + ) + item = {"protected": protected, "signature": signature} + if unprotected is not None: + item["header"] = unprotected + return dict(card, signatures=[item]) + + +def test_card_verifier_checks_the_whole_jose_header(a2a_url, signer): + """RFC 7515 section 5.2: a genuine signature by a pinned key is still + refused when its header carries a parameter this verifier doesn't support.""" + card = { + k: v + for k, v in httpx.get(a2a_url + "/.well-known/agent-card.json").json().items() + if k != "signatures" + } + keys = {signer.key_id: signer.public_raw()} + base = {"alg": "EdDSA", "kid": signer.key_id, "typ": "JOSE"} + assert ( + a2a_server.verify_agent_card(_signed_with_header(card, signer, base), keys) == signer.key_id + ) + assert ( + a2a_server.verify_agent_card( + _signed_with_header(card, signer, {"alg": "EdDSA", "kid": signer.key_id}), keys + ) + == signer.key_id + ) + for header, unprotected in ( + (dict(base, crit=["exp"], exp=1), None), + (dict(base, crit=["b64"], b64=False), None), + (dict(base, jku="https://evil.example/jwks.json"), None), + (dict(base, typ="JWT"), None), + (base, {"kid": "someone-else"}), + (base, {"crit": ["exp"]}), + (base, {"alg": "none"}), + ): + with pytest.raises(a2a_server.CardSignatureError): + a2a_server.verify_agent_card( + _signed_with_header(card, signer, header, unprotected), keys + ) + + +def test_guard_errors_use_the_a2a_media_type_on_rest(a2a_url): + rest = httpx.get(a2a_url + "/a2a/rest/tasks/x", headers={"Origin": "https://evil.example"}) + assert rest.status_code == 403 + assert rest.headers["content-type"].split(";")[0] == "application/a2a+json" + foreign = httpx.get(a2a_url + "/a2a/rest/tasks/x", headers={"Host": "evil.example"}) + assert foreign.status_code == 421 + assert foreign.headers["content-type"].split(";")[0] == "application/a2a+json" + rpc = httpx.post(a2a_url + "/a2a/jsonrpc", json={}, headers={"Origin": "https://evil.example"}) + assert rpc.headers["content-type"].split(";")[0] == "application/json" diff --git a/packages/flow/benchmark/a2a_interop/2026-11-30/evidence.json b/packages/flow/benchmark/a2a_interop/2026-11-30/evidence.json index 137a55ccd9..29ead2c033 100644 --- a/packages/flow/benchmark/a2a_interop/2026-11-30/evidence.json +++ b/packages/flow/benchmark/a2a_interop/2026-11-30/evidence.json @@ -16,7 +16,8 @@ "card": { "signed_by_pinned_key": true, "tampered_refused": true, - "other_key_refused": true + "other_key_refused": true, + "spec_example_canonical": true }, "JSONRPC": { "run_completed": true, diff --git a/packages/flow/benchmark/a2a_interop/README.md b/packages/flow/benchmark/a2a_interop/README.md index 10d126c822..03e0ae83d6 100644 --- a/packages/flow/benchmark/a2a_interop/README.md +++ b/packages/flow/benchmark/a2a_interop/README.md @@ -38,6 +38,7 @@ python run_interop.py --out 2026-11-30 |---|---|---| | Card signed by the pinned key | yes | (same card) | | Changed card refused, unpinned key refused | yes | (same card) | +| Section 8.4.1 worked example canonicalized as the spec gives it | yes | (no server) | | Run completed with outcome `done` | yes | yes | | Party A's handoff: integrity | `intact`, signer role `customer_key` | `intact`, signer role `customer_key` | | Handoff with a changed signature | refused, `bad_signature` | refused, `bad_signature` | diff --git a/packages/flow/benchmark/a2a_interop/interop.mjs b/packages/flow/benchmark/a2a_interop/interop.mjs index 579daad105..117edb9dab 100644 --- a/packages/flow/benchmark/a2a_interop/interop.mjs +++ b/packages/flow/benchmark/a2a_interop/interop.mjs @@ -24,26 +24,92 @@ const results = {}; // -- the card signature (A2A 1.0 section 8.4) --------------------------------------- -function cleanEmpty(value) { - if (Array.isArray(value)) { - const items = value.map(cleanEmpty).filter((v) => v !== undefined); - return items.length ? items : undefined; +// Field presence for canonicalization (section 8.4.1, rule 1), written from the +// spec and the lf.a2a.v1 proto, not from OpenAdapt's code. For each message type: +// `req` lists REQUIRED fields and the default each takes when absent (kept even +// when empty), `msg` names the type of each message-valued field (`[T]` for a +// repeated field, `{T}` for a map), `rep` lists repeated scalar fields, and +// `implicit` lists scalar fields without explicit presence (dropped at their +// default). Everything else present in the served JSON was set, so it stays. +const SCHEMA = { + AgentCard: { + req: { name: "", description: "", supportedInterfaces: [], version: "", capabilities: {}, + defaultInputModes: [], defaultOutputModes: [], skills: [] }, + msg: { supportedInterfaces: "[AgentInterface]", provider: "AgentProvider", + capabilities: "AgentCapabilities", securitySchemes: "{SecurityScheme}", + securityRequirements: "[SecurityRequirement]", skills: "[AgentSkill]" }, + rep: [], + }, + AgentInterface: { req: { url: "", protocolBinding: "", protocolVersion: "" }, implicit: ["tenant"] }, + AgentProvider: { req: { url: "", organization: "" } }, + AgentCapabilities: { msg: { extensions: "[AgentExtension]" } }, + AgentExtension: { implicit: ["uri", "description", "required"] }, + AgentSkill: { + req: { id: "", name: "", description: "", tags: [] }, + rep: ["examples", "inputModes", "outputModes"], + msg: { securityRequirements: "[SecurityRequirement]" }, + }, + SecurityRequirement: { msg: { schemes: "{StringList}" } }, + StringList: { rep: ["list"] }, + SecurityScheme: { + msg: { apiKeySecurityScheme: "APIKeySecurityScheme", httpAuthSecurityScheme: "HTTPAuthSecurityScheme", + oauth2SecurityScheme: "OAuth2SecurityScheme", + openIdConnectSecurityScheme: "OpenIdConnectSecurityScheme", mtlsSecurityScheme: "MutualTls" }, + }, + APIKeySecurityScheme: { req: { location: "", name: "" }, implicit: ["description"] }, + HTTPAuthSecurityScheme: { req: { scheme: "" }, implicit: ["description", "bearerFormat"] }, + OAuth2SecurityScheme: { req: { flows: {} }, implicit: ["description", "oauth2MetadataUrl"] }, + OpenIdConnectSecurityScheme: { req: { openIdConnectUrl: "" }, implicit: ["description"] }, + MutualTls: { implicit: ["description"] }, +}; + +const isDefault = (v) => v === "" || v === false || v === 0 || v === null; + +function present(value, type) { + const spec = SCHEMA[type]; + if (!spec) return value; // a type with no rules here (e.g. OAuthFlows) is kept as served + const out = {}; + for (const [k, v] of Object.entries(value ?? {})) { + const kind = spec.msg?.[k]; + if (kind?.startsWith("[")) { + const items = v.map((item) => present(item, kind.slice(1, -1))); + if (items.length || k in (spec.req ?? {})) out[k] = items; + } else if (kind?.startsWith("{")) { + const entries = Object.entries(v).map(([mk, mv]) => [mk, present(mv, kind.slice(1, -1))]); + if (entries.length || k in (spec.req ?? {})) out[k] = Object.fromEntries(entries); + } else if (kind) { + out[k] = present(v, kind); + } else if (spec.rep?.includes(k)) { + if (v.length || k in (spec.req ?? {})) out[k] = v; + } else if (spec.implicit?.includes(k)) { + if (!isDefault(v)) out[k] = v; + } else { + out[k] = v; + } } - if (value && typeof value === "object") { - const entries = Object.entries(value) - .map(([k, v]) => [k, cleanEmpty(v)]) - .filter(([, v]) => v !== undefined); - return entries.length ? Object.fromEntries(entries) : undefined; + for (const [k, d] of Object.entries(spec.req ?? {})) { + if (!(k in out)) out[k] = typeof d === "object" && !Array.isArray(d) && spec.msg?.[k] ? present({}, spec.msg[k]) : d; } - return value === "" || value === null ? undefined : value; + return out; +} + +// The only JOSE header parameters accepted (RFC 7515 section 5.2): no crit, +// no jku, and no name in both the protected and unprotected headers. +function headerOk(header, unprotected) { + const prot = Object.keys(header); + const unprot = Object.keys(unprotected ?? {}); + return prot.every((k) => ["alg", "kid", "typ"].includes(k)) + && unprot.every((k) => k === "jwk") + && !unprot.some((k) => prot.includes(k)) + && (header.typ === undefined || header.typ === "JOSE"); } async function verifyCard(card, key) { const { signatures, ...rest } = card; - const payload = base64url.encode(canonicalize(cleanEmpty(rest))); + const payload = base64url.encode(canonicalize(present(rest, "AgentCard"))); for (const s of signatures ?? []) { const header = JSON.parse(new TextDecoder().decode(base64url.decode(s.protected))); - if (header.alg !== "EdDSA" || header.kid !== pinned.kid) continue; + if (!headerOk(header, s.header) || header.alg !== "EdDSA" || header.kid !== pinned.kid) continue; try { await flattenedVerify({ protected: s.protected, payload, signature: s.signature }, key, { algorithms: ["EdDSA"], @@ -68,8 +134,16 @@ results.card = { signed_by_pinned_key: (await verifyCard(card, key)) === pinned.kid, tampered_refused: (await verifyCard(tampered, key)) === null, other_key_refused: (await verifyCard(card, other)) === null, + // The spec's worked example (section 8.4.1), plus the REQUIRED fields it leaves out. + spec_example_canonical: + canonicalize(present({ name: "Example Agent", description: "", + capabilities: { streaming: false, pushNotifications: false, extensions: [] }, skills: [] }, "AgentCard")) + === '{"capabilities":{"pushNotifications":false,"streaming":false},"defaultInputModes":[],' + + '"defaultOutputModes":[],"description":"","name":"Example Agent","skills":[],' + + '"supportedInterfaces":[],"version":""}', }; + // -- runs and handoffs over both bindings ------------------------------------------- function message(data) { diff --git a/packages/flow/docs/A2A.md b/packages/flow/docs/A2A.md index f093a09a11..3afcce8506 100644 --- a/packages/flow/docs/A2A.md +++ b/packages/flow/docs/A2A.md @@ -37,7 +37,18 @@ a write; the server answers `TaskNotCancelableError`. Both cards carry a signature as A2A 1.0 section 8.4 describes: a JWS (RFC 7515) over the card's RFC 8785 canonical form, with `signatures` left -out and empty values removed. +out. + +- **Which fields are signed.** Section 8.4.1's presence rules decide. A + REQUIRED field is always signed, even when empty (`"description": ""`, + `"skills": []`). An optional field that was set is signed even at its + default. Any other field at its default, and any empty list that isn't + REQUIRED, is left out. The REQUIRED markers come from the A2A proto. A card + field the schema doesn't define is refused, never left unsigned. +- **The header is checked whole.** A signature is accepted only when its + protected header holds `alg` (EdDSA), `kid` and optionally `typ` (`JOSE`), + and its unprotected header holds at most `jwk`. A `crit`, a `jku`, or a name + in both headers fails the signature. - **The key.** The card is signed with this computer's Seal key, the same Ed25519 key that signs its run receipts. The protected header is diff --git a/packages/flow/openadapt_flow/agent/a2a_server.py b/packages/flow/openadapt_flow/agent/a2a_server.py index b8eb7d12fe..00dd06a607 100644 --- a/packages/flow/openadapt_flow/agent/a2a_server.py +++ b/packages/flow/openadapt_flow/agent/a2a_server.py @@ -98,6 +98,15 @@ def __post_init__(self) -> None: ) if self.tck_scenarios and not is_loopback(self.host): raise ValueError("--a2a-tck-scenarios is for loopback test runs only") + if self.tck_scenarios and self.public_url: + from urllib.parse import urlparse + + advertised = urlparse(self.public_url).hostname or "" + if advertised != "localhost" and not is_loopback(advertised): + raise ValueError( + "--a2a-tck-scenarios is for loopback test runs only: " + "the advertised URL is not loopback" + ) @property def base_url(self) -> str: @@ -291,33 +300,103 @@ def _b64url_decode(text: str) -> bytes: return base64.urlsafe_b64decode(text + "=" * (-len(text) % 4)) -def _clean_empty(value: Any) -> Any: - if isinstance(value, dict): - cleaned = {k: c for k, v in value.items() if (c := _clean_empty(v)) is not None} - return cleaned or None - if isinstance(value, list): - items = [c for v in value if (c := _clean_empty(v)) is not None] - return items or None - if isinstance(value, str) and not value: - return None +def _required(fd: Any) -> bool: + from google.api import field_behavior_pb2 + + return ( + field_behavior_pb2.REQUIRED + in fd.GetOptions().Extensions[field_behavior_pb2.field_behavior] + ) + + +def _present_value(fd: Any, value: Any) -> Any: + """One fd value in proto JSON form, with presence rules applied inside.""" + import base64 + + from google.protobuf.descriptor import FieldDescriptor + + if fd.message_type is not None: + if fd.message_type.full_name.startswith("google.protobuf."): + from google.protobuf.json_format import MessageToDict + + return MessageToDict(value) + return _present_fields(value) + if fd.type == FieldDescriptor.TYPE_ENUM: + return fd.enum_type.values_by_number[value].name + if fd.type == FieldDescriptor.TYPE_BYTES: + return base64.b64encode(value).decode("ascii") + if fd.type in ( + FieldDescriptor.TYPE_INT64, + FieldDescriptor.TYPE_UINT64, + FieldDescriptor.TYPE_SINT64, + FieldDescriptor.TYPE_FIXED64, + FieldDescriptor.TYPE_SFIXED64, + ): + return str(value) return value +def _present_fields(message: Any) -> dict[str, Any]: + """A2A 1.0 section 8.4.1 rule 1 over a protobuf message. + + A REQUIRED fd is always present, even at its default. An optional + fd with explicit presence is present when it was set, even to its + default. Any other fd is present only when it differs from its default, + and an empty repeated or map fd is omitted unless REQUIRED. + """ + out: dict[str, Any] = {} + for fd in message.DESCRIPTOR.fields: + required = _required(fd) + value = getattr(message, fd.name) + if fd.message_type is not None and fd.message_type.GetOptions().map_entry: + if not value and not required: + continue + inner = fd.message_type.fields_by_name["value"] + out[fd.json_name] = { + str(k): _present_value(inner, v) for k, v in value.items() + } + elif fd.is_repeated: + if not value and not required: + continue + out[fd.json_name] = [_present_value(fd, v) for v in value] + elif fd.has_presence: + if not message.HasField(fd.name) and not required: + continue + out[fd.json_name] = _present_value(fd, value) + else: + if value == fd.default_value and not required: + continue + out[fd.json_name] = _present_value(fd, value) + return out + + def canonical_card_bytes(card: Any) -> bytes: """The bytes an Agent Card signature covers (A2A 1.0 section 8.4.1). - ``card`` is an ``AgentCard`` message or its JSON object. + ``card`` is an ``AgentCard`` message or its served JSON object. A JSON + object is parsed into an ``AgentCard`` first, so a field the schema doesn't + define raises ``ValueError`` instead of going unsigned. Field presence + follows the proto's REQUIRED markers and explicit presence, then RFC 8785. + The ``signatures`` field is excluded. """ + from a2a.types import AgentCard from openadapt_types.receipt import jcs if isinstance(card, dict): - data = dict(card) - else: - from google.protobuf.json_format import MessageToDict + from google.protobuf.json_format import ParseDict, ParseError - data = MessageToDict(card) - data.pop("signatures", None) - return jcs(_clean_empty(data) or {}).encode("utf-8") + data = {k: v for k, v in card.items() if k != "signatures"} + try: + message = ParseDict(data, AgentCard()) + except ParseError as exc: + raise ValueError( + f"the Agent Card does not match the schema: {exc}" + ) from None + else: + message = AgentCard() + message.CopyFrom(card) + message.ClearField("signatures") + return jcs(_present_fields(message)).encode("utf-8") def sign_agent_card(card: Any, signer: Any) -> Any: @@ -350,6 +429,43 @@ class CardSignatureError(ValueError): """An Agent Card has no signature by a key the receiver trusts.""" +#: The only JOSE header parameters a card signature may carry. ``crit`` and +#: ``jku`` are refused: this verifier understands no extensions and trusts only +#: pinned keys. The unprotected header may carry the signer's ``jwk`` as a +#: convenience; it is never used to choose the key. +_PROTECTED_HEADER = frozenset({"alg", "kid", "typ"}) +_UNPROTECTED_HEADER = frozenset({"jwk"}) + + +def _card_header(item: Any) -> tuple[str, dict[str, Any]]: + """Validate one signature's whole JOSE header (RFC 7515 section 5.2). + + Returns the protected header's encoded form and parsed object. Raises + ``ValueError`` for an unknown or critical parameter, a name in both the + protected and unprotected headers, or a wrong ``alg``, ``kid`` or ``typ``. + """ + if not isinstance(item, dict) or set(item) - {"protected", "signature", "header"}: + raise ValueError("signature entry has unknown fields") + protected = item["protected"] + if not isinstance(protected, str): + raise ValueError("protected header is not a string") + header = json.loads(_b64url_decode(protected)) + if not isinstance(header, dict) or set(header) - _PROTECTED_HEADER: + raise ValueError("protected header has an unsupported parameter") + if header.get("alg") != CARD_SIGNATURE_ALG: + raise ValueError("unsupported alg") + if not isinstance(header.get("kid"), str) or not header["kid"]: + raise ValueError("kid is missing") + if "typ" in header and header["typ"] != "JOSE": + raise ValueError("unsupported typ") + unprotected = item.get("header") or {} + if not isinstance(unprotected, dict) or set(unprotected) - _UNPROTECTED_HEADER: + raise ValueError("unprotected header has an unsupported parameter") + if set(unprotected) & set(header): + raise ValueError("a header parameter appears twice") + return protected, header + + def verify_agent_card(card: dict[str, Any], trusted: dict[str, bytes]) -> str: """Check ``card`` (the served JSON) against pinned Ed25519 public keys. @@ -357,22 +473,23 @@ def verify_agent_card(card: dict[str, Any], trusted: dict[str, bytes]) -> str: the receiver's handoff key registry. Returns the key id of the first valid signature. Raises :class:`CardSignatureError` when none is valid. Only ``EdDSA`` is accepted, and the key comes from ``trusted`` by ``kid``, - never from the card's own ``jwk`` header. + never from the card's own ``jwk`` header. A signature whose JOSE header + carries anything else (``crit``, ``jku``, a duplicated name) is skipped. """ from cryptography.exceptions import InvalidSignature from cryptography.hazmat.primitives.asymmetric.ed25519 import Ed25519PublicKey signatures = card.get("signatures") or [] - if not signatures: + if not isinstance(signatures, list) or not signatures: raise CardSignatureError("the Agent Card is not signed") - payload = _b64url(canonical_card_bytes(card)) + try: + payload = _b64url(canonical_card_bytes(card)) + except ValueError as exc: + raise CardSignatureError(str(exc)) from None for item in signatures: try: - protected = str(item["protected"]) - header = json.loads(_b64url_decode(protected)) - if not isinstance(header, dict) or header.get("alg") != CARD_SIGNATURE_ALG: - continue - raw = trusted.get(str(header.get("kid"))) + protected, header = _card_header(item) + raw = trusted.get(header["kid"]) if raw is None: continue Ed25519PublicKey.from_public_bytes(raw).verify( @@ -705,6 +822,7 @@ async def __call__(self, scope: Any, receive: Any, send: Any) -> None: expected = f"Bearer {self.config.token}" if not hmac.compare_digest(supplied.encode(), expected.encode()): problem = (401, "a bearer token is required") + rest = scope["path"].startswith(REST_PATH) if problem is not None: body = json.dumps({"error": problem[1]}).encode() await send( @@ -712,7 +830,10 @@ async def __call__(self, scope: Any, receive: Any, send: Any) -> None: "type": "http.response.start", "status": problem[0], "headers": [ - (b"content-type", b"application/json"), + ( + b"content-type", + A2A_JSON_MEDIA_TYPE if rest else b"application/json", + ), (b"content-length", str(len(body)).encode()), ] + ([(b"www-authenticate", b"Bearer")] if problem[0] == 401 else []), @@ -726,8 +847,6 @@ async def __call__(self, scope: Any, receive: Any, send: Any) -> None: if item.strip() } - rest = scope["path"].startswith(REST_PATH) - async def send_with_extensions(message: Any) -> None: if message["type"] == "http.response.start": message = dict(message) @@ -756,7 +875,14 @@ def build_app(bridge: AgentBridge, config: A2AConfig) -> Any: from a2a.server.tasks.inmemory_task_store import InMemoryTaskStore from starlette.applications import Starlette - if config.tck_scenarios and getattr(bridge, "mode", None) != "sandbox": + if config.tck_scenarios and not ( + getattr(bridge, "mode", None) == "sandbox" + and getattr(bridge, "sandbox", None) is not None + and getattr(bridge, "bundles_dir", None) is None + and not getattr(bridge, "workflows", None) + ): + # The mode label alone is not enough: the bridge must be backed by + # the sandbox and hold no operator workflows. raise ValueError( "--a2a-tck-scenarios needs --mode sandbox: scripted TCK answers are " "never served beside real workflows" From f65df380fcb867dbaa09951430be7905d5b3babd Mon Sep 17 00:00:00 2001 From: abrichr Date: Mon, 30 Nov 2026 23:03:58 -0500 Subject: [PATCH 6/7] chore: regenerate CAPABILITIES.md from the A2A row file; leave llms-full.txt to its refresh workflow --- CAPABILITIES.md | 1 + capabilities/CAPABILITIES.md.sha256 | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CAPABILITIES.md b/CAPABILITIES.md index 8c899a25de..78224c5d9d 100644 --- a/CAPABILITIES.md +++ b/CAPABILITIES.md @@ -161,6 +161,7 @@ improvising or retrying when something is off. | Compile one or more demonstrations into a deterministic program | Released | Real app (OpenEMR referral, 62 timed runs) | `openadapt-flow record`, `compile`; [packages/flow](packages/flow/README.md) | | Try the three acts on a real app: `openadapt quickstart --app openemr` runs the certified OpenEMR referral program in Docker, five referrals at once checked in OpenEMR's record, then a possible duplicate stopped before saving; without Docker or a clone it says so and exits 2 | On main ([#1431](https://github.com/OpenAdaptAI/OpenAdapt/pull/1431)) | Real app (local OpenEMR 8.0.0.3, synthetic patients) | `openadapt quickstart --app openemr`; [docs/quickstart](docs/quickstart/README.md#on-a-real-app---app-openemr) | | Run the quickstart without taking over the screen: `uvx --python 3.12 openadapt@latest quickstart` keeps the browser hidden and shows progress in the terminal (`--watch` shows the window, `--open` opens the Seal page), runs a run whose starting screen never settles once more in a new folder and otherwise says why in plain words, and reruns itself with Python 3.12 under `uvx` on an unsupported Python. Flow's page settle hands a page that draws no frames (a covered headed window) to the screenshot check instead of waiting out its timeout | On main ([#2365](https://github.com/OpenAdaptAI/OpenAdapt/pull/2365)) | Unit tests; headless terminal captures at 80, 120 and 250 columns for Terminal.app, WezTerm and iTerm2 settings; a headed covered-window run is not reproduced here | `openadapt quickstart`; [openadapt/quickstart](openadapt/quickstart/__init__.py), [_page_quiescence.py](packages/flow/openadapt_flow/backends/_page_quiescence.py) | +| See a crash and a restart in the quickstart: on MockMed, Act 3 runs a batch of two new notes in a separate worker process, stops it with SIGKILL after note 1's save is checked, and restarts the batch with the same on-disk write ledger (`IdempotencyLedger`); the replayer finds note 1's key and sends no save for it (its report: idempotent replay, 0 actions), then saves note 2; each note's database is read afterwards. Each note has its own copy of the clinic's database, as in Act 2 | On main ([#2840](https://github.com/OpenAdaptAI/OpenAdapt/pull/2840)) | Synthetic (MockMed; real headless runs on macOS, unit tests with fakes) | `openadapt quickstart`; [restart.py](openadapt/quickstart/restart.py) | | Classify common local edits without a person (select-all, Enter in a field or dropdown, an in-form tab, an informational dialog's dismiss), only when the recording's network capture shows no write and a runtime check confirms only the expected change | Released ([#1366](https://github.com/OpenAdaptAI/OpenAdapt/pull/1366)) | Synthetic; OpenEMR referral recording re-admitted offline (violations 12 to 1 under `permissive`) | [LOCAL_EDIT_CLASSIFICATION.md](packages/flow/docs/design/LOCAL_EDIT_CLASSIFICATION.md), `compiler/local_edit.py` | | Keep the empty search result a person confirmed through (a duplicate check's "No matches were found.") as an exact check after the click that opens the dialog and again right before Confirm, so a run whose dialog lists a match stops before the save; only fixed-vocabulary search-result statements shown once, never text with a name or search term, and a confirmation dialog without one is noted in `compile_notes.json` | On main | Real app frames (an OpenEMR referral recording, compiled offline) | `compiler/empty_result_guard.py` | | Mine that check in any language: induction keeps the one line a named dialog adds (not its title or buttons, not a question, no typed value or number) when two or more demonstrations whose typed values all differ show the same line, refuses when the demonstrations disagree on a mined check instead of copying the first one's, and qualification then needs a business-rule run that halts at it | On main | Synthetic (a search dialog recorded in Chromium by the real recorder, German statement, real OCR) | `compiler/empty_result_guard.py`, `compiler/induction.py` | diff --git a/capabilities/CAPABILITIES.md.sha256 b/capabilities/CAPABILITIES.md.sha256 index f41e6ffb86..c4873187a6 100644 --- a/capabilities/CAPABILITIES.md.sha256 +++ b/capabilities/CAPABILITIES.md.sha256 @@ -1 +1 @@ -6b20b283d1c0ac335e4b7c8ca6a1b18a809d00a066106c3bdc4e39ac00b62c80 +f0ae7671e71d415406ce35fea6c996533e979444da8ef2aadfccc12cb5b55c6f From 3578593f8ff32a8de1eae1ef5691dc24320af58b Mon Sep 17 00:00:00 2001 From: abrichr Date: Tue, 1 Dec 2026 08:23:23 -0500 Subject: [PATCH 7/7] chore: leave generated CAPABILITIES.md to the post-merge refresh The merge queue's smoke check refuses any change to a generated page. The A2A row file carries the change; the refresh workflow regenerates the page. --- CAPABILITIES.md | 7 +------ capabilities/CAPABILITIES.md.sha256 | 2 +- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/CAPABILITIES.md b/CAPABILITIES.md index 78224c5d9d..1dcbe2088b 100644 --- a/CAPABILITIES.md +++ b/CAPABILITIES.md @@ -161,7 +161,6 @@ improvising or retrying when something is off. | Compile one or more demonstrations into a deterministic program | Released | Real app (OpenEMR referral, 62 timed runs) | `openadapt-flow record`, `compile`; [packages/flow](packages/flow/README.md) | | Try the three acts on a real app: `openadapt quickstart --app openemr` runs the certified OpenEMR referral program in Docker, five referrals at once checked in OpenEMR's record, then a possible duplicate stopped before saving; without Docker or a clone it says so and exits 2 | On main ([#1431](https://github.com/OpenAdaptAI/OpenAdapt/pull/1431)) | Real app (local OpenEMR 8.0.0.3, synthetic patients) | `openadapt quickstart --app openemr`; [docs/quickstart](docs/quickstart/README.md#on-a-real-app---app-openemr) | | Run the quickstart without taking over the screen: `uvx --python 3.12 openadapt@latest quickstart` keeps the browser hidden and shows progress in the terminal (`--watch` shows the window, `--open` opens the Seal page), runs a run whose starting screen never settles once more in a new folder and otherwise says why in plain words, and reruns itself with Python 3.12 under `uvx` on an unsupported Python. Flow's page settle hands a page that draws no frames (a covered headed window) to the screenshot check instead of waiting out its timeout | On main ([#2365](https://github.com/OpenAdaptAI/OpenAdapt/pull/2365)) | Unit tests; headless terminal captures at 80, 120 and 250 columns for Terminal.app, WezTerm and iTerm2 settings; a headed covered-window run is not reproduced here | `openadapt quickstart`; [openadapt/quickstart](openadapt/quickstart/__init__.py), [_page_quiescence.py](packages/flow/openadapt_flow/backends/_page_quiescence.py) | -| See a crash and a restart in the quickstart: on MockMed, Act 3 runs a batch of two new notes in a separate worker process, stops it with SIGKILL after note 1's save is checked, and restarts the batch with the same on-disk write ledger (`IdempotencyLedger`); the replayer finds note 1's key and sends no save for it (its report: idempotent replay, 0 actions), then saves note 2; each note's database is read afterwards. Each note has its own copy of the clinic's database, as in Act 2 | On main ([#2840](https://github.com/OpenAdaptAI/OpenAdapt/pull/2840)) | Synthetic (MockMed; real headless runs on macOS, unit tests with fakes) | `openadapt quickstart`; [restart.py](openadapt/quickstart/restart.py) | | Classify common local edits without a person (select-all, Enter in a field or dropdown, an in-form tab, an informational dialog's dismiss), only when the recording's network capture shows no write and a runtime check confirms only the expected change | Released ([#1366](https://github.com/OpenAdaptAI/OpenAdapt/pull/1366)) | Synthetic; OpenEMR referral recording re-admitted offline (violations 12 to 1 under `permissive`) | [LOCAL_EDIT_CLASSIFICATION.md](packages/flow/docs/design/LOCAL_EDIT_CLASSIFICATION.md), `compiler/local_edit.py` | | Keep the empty search result a person confirmed through (a duplicate check's "No matches were found.") as an exact check after the click that opens the dialog and again right before Confirm, so a run whose dialog lists a match stops before the save; only fixed-vocabulary search-result statements shown once, never text with a name or search term, and a confirmation dialog without one is noted in `compile_notes.json` | On main | Real app frames (an OpenEMR referral recording, compiled offline) | `compiler/empty_result_guard.py` | | Mine that check in any language: induction keeps the one line a named dialog adds (not its title or buttons, not a question, no typed value or number) when two or more demonstrations whose typed values all differ show the same line, refuses when the demonstrations disagree on a mined check instead of copying the first one's, and qualification then needs a business-rule run that halts at it | On main | Synthetic (a search dialog recorded in Chromium by the real recorder, German statement, real OCR) | `compiler/empty_result_guard.py`, `compiler/induction.py` | @@ -177,7 +176,6 @@ improvising or retrying when something is off. | One check-level scale, 0 to 5, from "unchecked" to "counterparty confirmed" | Released | Unit tests | `openadapt_flow/check_level.py` | | One receipt word per check, the same on every path: `VERIFIED` only at level 3 (a separate session) or 4 (the system of record), always with the basis that produced the evidence (`separate_session`, `system_api`, `activity_log`, `db_frame` or `owned_connection`); `SHOWN` for an acting-screen re-read, `CONFIRMED` for the counterparty, `ATTESTED` for an operator and `RECORDED` for the rest. `VERIFIED` means "as of the read-back time the read-back showed this value", not "persisted". Run receipts (`record/run/v1`, an additive optional field), `verify-run` receipts and `tx` receipts carry an evidence-scope block: level, basis, word, the wire channel watched, the read-back time, the recheck window, and what it did not cover (always server-side async and outbound effects; a run receipt says it has no per-read time). A run receipt never says `VERIFIED` below level 3. Receipts without the block still verify. A `verify-run` contract with `minimum_effect_strength: independent_session` now verifies on a separate-session read | On main | Unit tests (parity across the runtime report, `verify-run`, `tx` and Execute v1; fake verifiers) | `openadapt_types/check_level.py`, `openadapt_types/evidence_scope.py`, `openadapt_flow/evidence_basis.py` | | Grade a file, PDF or email check by who produced it: a file the acting session wrote or downloaded, or one with no declared producer, is at most `same_screen`; one a separate session fetched is at most `separate_session`; only a declared `system_of_record` producer reaches `system_of_record`. A store that overlaps the acting session's folders (named ones, the user's Downloads, a Playwright download folder) is graded as the acting session's whatever is declared. Under a strong declared producer, a scan that reads a file in a browser download folder beneath the store, or a symlink out of it, is refused as INDETERMINATE. The verdict's `read_evidence.provenance` names the producer and whether it was declared or observed | On main | Unit tests through each of the four readers (mixed store, symlink, system-owned positive case); a PDF downloaded by headless Chromium from a loopback app, the same bytes from a separate browser context and from the app's store, and a headless download landing beneath a broader store | `runtime/effects/artifact_provenance.py`, `effects.artifact_producer`, `packages/flow/tests/test_effect_artifact_provenance.py` | -| One strict matcher decides whether text on a screen or page proves a value or a commit: `MATCH`, `MISMATCH` or `AMBIGUOUS`, and only `MATCH` passes. A value must be bound to its label at the start of its field, with nothing but unit words beside it, or be the whole field. A value merely found on the page, inside a longer token (`250` in `$1,250.00`, `John Smith` in `John Smith-Jones`), or under a label with two values never passes. A commit phrase must be new, plainly stated, and not next to a question, a negation or a control label. The launcher's transducer read-back and the kernel's read-back oracles use it; [the migration page](packages/types/docs/evidence-migration.md) lists the callers that don't yet | On main | Adversarial corpus with pinned verdicts, Hypothesis properties, a parity test against Flow's read-back matcher, and strict expected-failure tests for each caller not yet migrated | `openadapt_types/evidence.py`, `openadapt/transducer_obligations.py`, `openadapt_kernel/oracles.py` | | Check a value where a careful person would look again: an effect location (`openadapt.effect-location/v1`) is pack data for one place an intended value shows (path and start condition, locator, expected value, codec, expected count, optional baseline). One summary row can cover two values ("Name (DOB)"), and a date can be split over three fields. Every planned value is `held`, `refuted` or `not_checked`; a place that can't be reached, found or read is `not_checked`. The check level follows the start condition (a new session is level 3), and the engine holds no application words | PR [#2500](https://github.com/OpenAdaptAI/OpenAdapt/pull/2500), not yet used by a runner | Unit tests and the fail-open harness (synthetic readings only) | `openadapt_flow/effect_location/`, [EFFECT_LOCATION.md](packages/flow/docs/EFFECT_LOCATION.md) | | Judge any executor's write, including an agent's or a script's, from the system of record | Released | Synthetic | `openadapt-flow verify-run`, [VERIFY_RUN.md](packages/flow/docs/VERIFY_RUN.md) | | Judge an "ensure the record exists" write (found, created once with every value, or needs review) through a FHIR server's read path only: searches, AuditEvent and `_history`, never the database; the coverage claim names that read path. An agent's own correction of the record it created counts as one write when the audit trail and history show only that agent, no other reader, and the same record in every version | Released ([#1640](https://github.com/OpenAdaptAI/OpenAdapt/pull/1640), corrections [#1655](https://github.com/OpenAdaptAI/OpenAdapt/pull/1655)) | Real app (Medplum 5.2.8; three blind fault suites: 17/18, 17/20, 19/20; no fault passed in the last two. Corrections, on 15 blind cases and the 37 public ones: false stops 8 to 2 and 9 to 4 for Claude, no harm passed that the old rule caught) | `openadapt_flow/ensure_record.py`, [ENSURE_RECORD.md](packages/flow/docs/ENSURE_RECORD.md) | @@ -236,7 +234,6 @@ improvising or retrying when something is off. | Propose an undo for each saving step (another recording, captured traffic, or the old value), keep it only if a test copy shows every record restored, and offer it after a stop once a person approves it | Released ([#1346](https://github.com/OpenAdaptAI/OpenAdapt/pull/1346)) | Synthetic (MockMed, MockLoan, live browser) | `openadapt-flow undo propose`, `undo accept`; [AFTER_A_STOP.md](packages/flow/docs/AFTER_A_STOP.md) | | Roll a stopped run back on its own: the approved compensation for each change, latest first, an uncertain write only when a fresh read shows it landed, then a read of the whole database: every row the run touched back as it was and nothing else changed (`ROLLED_BACK`), or the exact rows a person repairs (`RECONCILIATION_REQUIRED`). A compensation runs only while every change in the store is positively the run's own by the app's audit log, so another user's work is never compensated away, and a hard delete runs only where the deployment allows it (void, restore or discard otherwise). `rollback qualify` stops the run before and after every save on a test copy and keeps only compensations that restore the whole store. On a desktop or remote-display backend a screen compensation runs only after the run's and the compensation's start screens are checked on the same backend | On main ([#1634](https://github.com/OpenAdaptAI/OpenAdapt/pull/1634)); desktop in [#1771](https://github.com/OpenAdaptAI/OpenAdapt/pull/1771) | MockMed, live browser through the CLI; SQLite whole-database tests (web and desktop paths) | `openadapt-flow rollback qualify`, `rollback:` in deployment.yaml; [ROLLBACK.md](packages/flow/docs/ROLLBACK.md) | | Leave the screen clean after an item that halted before any write: close dialogs and cancel forms with the recordings' own controls, re-enter, confirm the start screen and read the records back before the session takes another item. A session that doesn't come back is marked dirty and takes no more items; a cleanup that changed a record makes the item's write uncertain and stops the run. `cleanup qualify` tries the cleanup after every step on a test copy and refuses one that changes a record | Released ([#1607](https://github.com/OpenAdaptAI/OpenAdapt/pull/1607)) | Synthetic (scripted three-screen app through the real replayer and pool) and real app (pinned OpenEMR: a halted New Patient item left the confirmation dialog open; re-entry closed it, the form was empty, no patient row changed and the next item's first steps ran with no model calls; a signed-out screen was marked dirty; [results](packages/flow/benchmark/halt_cleanup/results/openemr.json)) | `openadapt-flow cleanup qualify`; [HALT_CLEANUP.md](packages/flow/docs/HALT_CLEANUP.md) | -| Commit-boundary kernel, an optional alpha extra: `pip install 'openadapt[kernel]'` adds `openadapt kernel` (or install `openadapt-kernel` alone for its own command), an experimental runtime with shadow, draft and autopilot modes and signed receipts that does not depend on `openadapt-flow`. `pip install openadapt` leaves it out, and the extra is capped below the next minor version because its API may change before 1.0 | On main | Synthetic (its own suite, headless Chromium tests included, runs in the required `ci` check on every kernel change) | [packages/kernel](packages/kernel/README.md) | ## Approvals @@ -337,7 +334,6 @@ improvising or retrying when something is off. | Self-repair's new clicks outside a browser: on a native app a click is admitted by its accessibility element (role, name, ancestry, window; unique in the pinned window), on pixels only by the record check, and either way only when a system-of-record verifier covers every save under `standard` or `regulated`; the new step carries the dialog around it as a screen pre-check, and only a person approves the fix | On main ([#1709](https://github.com/OpenAdaptAI/OpenAdapt/pull/1709)) | Synthetic, partly live: on OpenAdapt's native Cocoa test app with SQLite, through live macOS AX, the stop, the element identity read, the admission and the refusals without a record check ran with no wrong write; qualified end to end on macOS AX ([#1715](https://github.com/OpenAdaptAI/OpenAdapt/pull/1715)): stop, admitted click, probe, replay and fault campaigns, one approval, resumed run `VERIFIED`; and on its GTK3 counterpart through live Linux AT-SPI, in CI, the same end to end. `run --self-repair` and repair by default start the app for each probe from `repair.session` ([#1717](https://github.com/OpenAdaptAI/OpenAdapt/pull/1717); [benchmark/repair_every_backend](packages/flow/benchmark/repair_every_backend/README.md)) | `openadapt_flow/repair/element_identity.py`, [REPAIR_ON_EVERY_BACKEND.md](packages/flow/docs/REPAIR_ON_EVERY_BACKEND.md) | | Keep pixel-path runs working across display scaling and font smoothing changes | Released ([#1286](https://github.com/OpenAdaptAI/OpenAdapt/pull/1286)) | Synthetic (in-process RDP and canvas renderings: 17 of 24 healthy runs across 100–175%, up from 3; 0 wrong saves) | [benchmark/pixel_scale](packages/flow/benchmark/pixel_scale/README.md) | | Find icons again on Citrix, RDP and VNC after a display-scale, zoom, font, theme or codec change, with a local model that counts look-alikes and stops on a tie (`--local-grounding`, off by default) | Released ([#1596](https://github.com/OpenAdaptAI/OpenAdapt/pull/1596)) | Synthetic (Chromium-drawn clinic screen, pixels only: icons found under 21 of 26 conditions, template matching 8; 0 wrong targets in 65; whole runs unchanged, 4 of 39 in both arms, because the layout, identity and census checks stop first). Held out on real AVC444 RDP frames: 0 wrong picks, 6 right, 75 abstentions in 81 | [benchmark/pixel_grounding](packages/flow/benchmark/pixel_grounding/README.md), `runtime/local_grounder.py` | -| Find an icon-only click target again after a light/dark theme change on Citrix, RDP and VNC, by edge orientation with the sign removed, refusing when another place on the screen scores close, the match is away from the recorded place, or the clicked control itself differs | In a pull request ([#2790](https://github.com/OpenAdaptAI/OpenAdapt/pull/2790)) | Synthetic (Chromium-drawn clinic screen, pixels only, recorded light and replayed dark at 100% and 150%: whole runs 8 of 13 healthy and 7 of 13 reordered, up from 6 and 5; wrong-record runs 13 of 13 stopped; 0 wrong targets or wrong saves) | [benchmark/pixel_grounding](packages/flow/benchmark/pixel_grounding/README.md#whole-runs), `vision/polarity_match.py` | | Pre-approved repairs: a signed policy lists low-risk changes that apply without a person, a test-record run before each queue, and one approval for every item halted the same way | Released ([#1294](https://github.com/OpenAdaptAI/OpenAdapt/pull/1294)) | Synthetic | standard changes | | Repair a pinned bundle: the fix runs the pinned bundle's own qualification campaign on a test copy, keeps every write, effect, identity rule and record check, and is re-admitted with signed lineage (at most three repairs, no revoked key) that the pin verifies | On main | Synthetic | [SELF_REPAIR.md](packages/flow/docs/SELF_REPAIR.md#a-pinned-bundle-re-qualify-and-re-admit) | | Repair by default: once a repair agent is configured (outside a browser, with `repair.session`, [#1717](https://github.com/OpenAdaptAI/OpenAdapt/pull/1717)), every stop that wrote nothing goes to it without anyone starting it; a stop after a possible write goes to reconciliation; every stop is a row in a ledger with the funnel from stop to resumed item | Released ([#1360](https://github.com/OpenAdaptAI/OpenAdapt/pull/1360)) | Synthetic (MockMed, 22 drift modes, real Claude agent: 6 of 21 repairable stops resumed and verified, 0 wrong saves in 66 runs); routing over recorded OpenEMR stops; live openIMIS relabel: 3 of 3 reached repair and stopped with no wrong save; silent-saves 1.1.0 UI-change blocks: 18 of 28 items that always stopped now correct, 0 wrong | `run` (on by default, `--no-auto-repair`), `repair:` in `deploy.yaml`, [benchmark/auto_repair](packages/flow/benchmark/auto_repair/README.md) | @@ -359,7 +355,7 @@ improvising or retrying when something is off. | Admit a draft by a person, an admitter key, or an agent under a person-signed policy, including self-admission when the policy allows it | Released | Unit tests | [JIT_ADMISSION.md](packages/flow/docs/JIT_ADMISSION.md) | | MCP server: your agent decides what to enter, OpenAdapt makes the entry and checks it | Released | Synthetic sandbox | `openadapt-agent`, [packages/agent](packages/agent/README.md) | | Agent-to-agent handoffs: when one agent hands a result to another, the run's signed receipt (`record/run/v1`) goes with it (`openadapt handoff send`, inline, detached beside a file, or POSTed to a webhook), and the receiver checks it against keys it pins (`openadapt handoff verify`). The verdict gives the signer role from the receiver's registry, integrity, checks passed and not checked, and "confirmed in the other party's system" lines; it always says a valid signature proves who signed, not that the claim is true, binds the payload as the receipt's `payload` subject (re-signed by the run's own key; other bytes or no payload subject are refused), and counts a confirmation as independent only when it was read from the other party's system. Over MCP, `serve --handoffs` adds `get_handoff` and `verify_handoff`. The private openings never travel | On main ([#2414](https://github.com/OpenAdaptAI/OpenAdapt/pull/2414)) | Unit tests over receipts from Flow's own writer and the shared `record/run/v1` confirmation vectors and the shared payload vectors (good, tampered, unknown signer, bound, mismatched and missing payload, detached file, local webhook); MCP and A2A end to end with the stubbed run process; a two-party test of 20 handoffs over HTTP (0 false accepts, 0 true rejects); one real headless MockMed run handed off over the CLI and checked against the receiver's own record ([benchmark/handoff_real_run](packages/flow/benchmark/handoff_real_run/README.md)); `--ledger` tested against #2415's `HandoffLedger` | `openadapt handoff`, `openadapt_flow/handoff.py`, [HANDOFFS.md](packages/flow/docs/HANDOFFS.md), draft format [HANDOFF_RECEIPTS.md](packages/flow/docs/HANDOFF_RECEIPTS.md) | -| A2A (Agent2Agent) protocol adapter: `openadapt agent serve --a2a` serves compiled workflows as A2A 1.0 skills with the official `a2a-sdk` (`openadapt[a2a]`): Agent Card at `/.well-known/agent-card.json`, signed (A2A 1.0 section 8.4, EdDSA JWS by the Seal key that signs receipts; no server if the key can't be opened), JSON-RPC and HTTP+JSON, runs as tasks with status updates, the run's receipt as a handoff artifact when Flow wrote one (sandbox and strict at-rest runs have none), a `verify_handoff` skill, and the draft extension `https://openadapt.ai/extensions/handoff-receipt/v1`. Every call passes the MCP server's gate; person confirmations are not served; only `done` is completed. Loopback by default, a bearer token anywhere else, browser `Origin` and unknown `Host` refused | On main ([#2414](https://github.com/OpenAdaptAI/OpenAdapt/pull/2414)) | Synthetic: the official `a2a-sdk` 1.3.1 client against the server over HTTP on 127.0.0.1, with a governed run whose Flow process is stubbed and whose receipt Flow's writer signs; the official A2A TCK (a2aproject/a2a-tck at 5e6f37c, 2026-11-30, sandbox server with `--a2a-tck-scenarios`): 121 automated checks passed, 0 failed, 142 skipped (gRPC, push, cancel, auth scenarios), MUST 78.7% because the TCK counts skipped and manual checks as not passed ([benchmark/a2a_tck](packages/flow/benchmark/a2a_tck/README.md)); a second implementation, the A2A JavaScript SDK 1.3.0, ran a workflow and verified a second key's handoff over JSON-RPC and HTTP+JSON and checked the card signature with independent JWS and RFC 8785 libraries, all on one computer ([benchmark/a2a_interop](packages/flow/benchmark/a2a_interop/README.md)); the card signature verified by the `a2a-sdk` verifier and refused when changed, unpinned or relabelled (the TCK leaves signing to manual checks) | `openadapt_flow/agent/a2a_server.py`, [A2A.md](packages/flow/docs/A2A.md) | +| A2A (Agent2Agent) protocol adapter: `openadapt agent serve --a2a` serves compiled workflows as A2A 1.0 skills with the official `a2a-sdk` (`openadapt[a2a]`): Agent Card at `/.well-known/agent-card.json`, JSON-RPC and HTTP+JSON, runs as tasks with status updates, the run's receipt as a handoff artifact when Flow wrote one (sandbox and strict at-rest runs have none), a `verify_handoff` skill, and the draft extension `https://openadapt.ai/extensions/handoff-receipt/v1`. Every call passes the MCP server's gate; person confirmations are not served; only `done` is completed. Loopback by default, a bearer token anywhere else, browser `Origin` and unknown `Host` refused | On main ([#2414](https://github.com/OpenAdaptAI/OpenAdapt/pull/2414)) | Synthetic: the official `a2a-sdk` 1.3.1 client against the server over HTTP on 127.0.0.1, with a governed run whose Flow process is stubbed and whose receipt Flow's writer signs; the official A2A TCK (a2aproject/a2a-tck at 5e6f37c): 110 automated checks passed and 11 failed, MUST 76.0%. The failures are 10 SDK-scenario tests that expect the TCK's own scripted agent, and the SDK's error Content-Type ([benchmark/a2a_tck](packages/flow/benchmark/a2a_tck/README.md)) | `openadapt_flow/agent/a2a_server.py`, [A2A.md](packages/flow/docs/A2A.md) | | Teach over MCP: an agent does a new task once through OpenAdapt; the run is read back, compiled and admitted (a person confirms the record check; the agent admits only under a person-signed policy), and becomes a tool it calls with no model calls. Web, and Windows, macOS, Linux, RDP and Citrix with a person approving each save | On main ([#1335](https://github.com/OpenAdaptAI/OpenAdapt/pull/1335)) | Synthetic (MockMed over MCP, and through the real RDP and Citrix backends); a native Cocoa app with SQLite through `MacOSBackend`, taught, confirmed, admitted under a signed policy and called (canary and taught run `VERIFIED`, 0 model calls; [teach_desktop](packages/flow/benchmark/teach_desktop/README.md)) | `openadapt-agent serve --teach`, [packages/agent](packages/agent/README.md#teach-a-new-workflow-from-your-agent) | | Turn a read-only browser task into a tool for the coding agent you already use: `openadapt setup` registers the MCP server and a skill in Claude Code, Cursor, Codex and Gemini CLI (idempotent, `--dry-run`, `--undo`); `openadapt setup --app deploy.yaml --verify verify.yaml` sets the agent up to teach saves in one web, desktop, RDP or Citrix app instead, each read back from the system of record. Read-only teaching runs only where a guard stops writes before they leave (the browser); `serve --teach-browser --config` naming a desktop, RDP or Citrix app is refused; the agent does the task once through `teach_start`/`teach_act`/`teach_finish`, the task must end in a download, the file is checked (columns, a column between two inputs or equal to one, fewest rows), the compiled steps are replayed once with no model, and the agent gets a `taught_` tool that downloads a checked file with new inputs. The browser sends no POST, PUT, PATCH or DELETE and stays on one site; a compiled run stops when a control is missing, matches more than one element, or is relabelled | Released ([#1502](https://github.com/OpenAdaptAI/OpenAdapt/pull/1502)) | Real headless Chromium on the local example portal (scripted MCP client, in CI); a real Claude Code agent taught the export from the guide's prompt and called the tool with new dates (2026-10-24, one run) | `openadapt setup`, `openadapt-agent serve --teach-browser`, [FIRST_TOOL.md](packages/flow/docs/FIRST_TOOL.md) | | Verify any agent's own writes: `openadapt verify` reads the system of record before and after a write, against a contract the operator owns (REST, FHIR, SQL, GraphQL), and returns a verified receipt (`openadapt.effect-receipt/v1`) or a refusal (`REFUTED`, `UNCERTAIN`), never an unverified success. Python SDK (`openadapt.verify`, which is `openadapt_flow.verifier`: `begin_write`, `verify_write`, `verified_write`) wraps a write in any agent framework; the MCP server (`openadapt verify serve`) offers `verify_begin`, `verify_check` and `verify_recheck` to any MCP client | Released ([#1589](https://github.com/OpenAdaptAI/OpenAdapt/pull/1589)) | Synthetic (MockMed's fault server over real HTTP: correct write, wrong record, not saved, saved twice, unreadable store) | `openadapt verify`, [VERIFY_WRITES.md](packages/flow/docs/VERIFY_WRITES.md) | @@ -410,7 +406,6 @@ improvising or retrying when something is off. | Offline Seals signed with a key the customer holds: a key file, the OS keychain, or a PKCS#11 token or HSM; pinned keys with rotation and revocation; no fallback to a generated key | On main ([#1392](https://github.com/OpenAdaptAI/OpenAdapt/pull/1392)) | Unit tests with synthetic data (keychain and PKCS#11 through stand-ins) | `openadapt-flow local-seal --key`, `local-seal key create`, `pin`, `revoke`; `openadapt seal verify FOLDER` checks every sealed run in a folder; [OFFLINE_SEALS.md](packages/flow/docs/OFFLINE_SEALS.md#customer-held-keys) | | Anchor an offline Seal in the public Sigstore Rekor transparency log (opt-in; sends one digest and the public key), and verify the anchor offline from the stored inclusion proof | Released ([#1394](https://github.com/OpenAdaptAI/OpenAdapt/pull/1394)) | Unit tests against a simulated Rekor log; real public Rekor entries and Sigstore TSA tokens for the landing demo's referral runs, verified offline in tests; Ed25519ph matches the RFC 8032 test vector | `openadapt-flow local-seal anchor`, `local-seal verify --require-anchor`; [OFFLINE_SEALS.md](packages/flow/docs/OFFLINE_SEALS.md#optional-anchor-a-seal-in-a-public-transparency-log) | | Signed write receipts: a verifier verdict with its scope (stores read, window, strength) and a plain not-checked list, signed as a COSE_Sign1 (IETF SCITT shape) and logged in a local Merkle transparency log; checked offline against pinned keys; a receipt that claims more than its scope is neither issued nor accepted; optional Rekor anchor | On main | Unit tests on the real verifier (SQLite) and shadow proxy; COSE checked through python-cwt | `openadapt-flow receipt verify`, `receipt keys export`, `receipt anchor`; `verify_write(..., write_receipt=True)`; `shadow --receipts`; [WRITE_RECEIPTS.md](packages/flow/docs/WRITE_RECEIPTS.md) | -| Python `openadapt.wrap` receipts signed with this computer's `openadapt trust init` key by default (or `signing_key=`), naming the key by id and fingerprint; with no key a receipt says `digest_only` and `signed: false`, and `wrap` never creates a key. `verify_wrap_receipt` and `openadapt verify` accept a receipt only when its signature verifies against a key you pinned, never the key the receipt carries; an unknown signer or a digest-only receipt is not verified. A plain `check=` callable is recorded as `caller_check`, and a check can't raise its own `checked_how` | On main | Unit tests with real Ed25519 keys: an unsigned receipt with a recomputed digest and a receipt signed by its own embedded key both fail, through the SDK and `openadapt verify` | `openadapt.wrap`, `openadapt.verify_wrap_receipt`, `openadapt verify FILE [--keys FILE]`, `openadapt trust init` | | Per-run accounting ledger for any executor (an OpenAdapt agent, a compiled program, another agent, a person): one value-free row per run with the outcome (VERIFIED, ESCALATED, CAUGHT_ERROR, FAILED, UNKNOWN) and a closed reason, a person's minutes from approval, question, exception and second-factor intervals, model calls and cost (unknown is null, never zero), field names with their checks, and the read-back tier; values only in a local 0600 sidecar; collected from the files guard, verify-run, compiled runs, wrap, item approvals and compile-agent already write, plus readiness shadow runs, guard ledger rows, P7 fallback results and P6 exception answers; a person's decline is ESCALATED, not a caught error | On main | Unit tests with synthetic data: the outcome rule as a table over every engine outcome enum, fixtures for each source (copies of the shadow, guarded-save, fallback and exception files from a synthetic MockMed end-to-end run), the real commit guard against MockMed's fault server end to end, exports scanned for every fixture value and checked with the real Presidio scrubber, push payloads validated against the JSON Schema, push refused with no key | `openadapt-flow ledger add`, `list`, `show`, `summary`, `export`, `push`; [RUN_LEDGER.md](packages/flow/docs/RUN_LEDGER.md) | | See a run's Seal offline: one HTML page that checks the Ed25519 signature over the run's exact report in the browser, draws the Seal from it, replays the run over its program map, and lets the reader tamper with a copy; no network requests; the quickstart ends on the person's own. One screen: map left, Seal and verdict top right, Summary, Steps, Evidence and Raw tabs; light and dark | On main ([#1566](https://github.com/OpenAdaptAI/OpenAdapt/pull/1566)) | A real quickstart run's Seal opened from `file://` in Chromium (valid, tampered, no requests; a link to one step, keyboard tabs and steps, theme switch, phone layout); RFC 8032 test vectors; a published OpenEMR Seal's Rekor entry and timestamp | `openadapt seal view RUN_DIR`; `openadapt quickstart`; [`@openadapt/seal-view`](packages/seal-view/README.md) | | Sign in to OpenAdapt Cloud from the terminal: `openadapt login` with no token prints a sign-in link (opened only with `--open`), listens on 127.0.0.1 for the browser's redirect, and redeems Cloud's one-use code with an S256 PKCE verifier that never leaves the process. A first-time user gets a workspace on the way. The credential goes to the OS keychain entry `push` and `report-run` read; a stored token is re-validated as before, and `--token` and `--no-browser` keep the token path | On main | Unit tests with a real loopback listener (state mismatch, refusal, malformed code, timeout, browser opened only on request); end to end against Cloud's `/auth/loopback` and pairing routes in mock mode, both Connect and Cancel | `openadapt login`; [browser_login.py](packages/flow/openadapt_flow/browser_login.py) | diff --git a/capabilities/CAPABILITIES.md.sha256 b/capabilities/CAPABILITIES.md.sha256 index c4873187a6..b178c64d02 100644 --- a/capabilities/CAPABILITIES.md.sha256 +++ b/capabilities/CAPABILITIES.md.sha256 @@ -1 +1 @@ -f0ae7671e71d415406ce35fea6c996533e979444da8ef2aadfccc12cb5b55c6f +6b0c7d386eb68b516766993b4afb1ffe6a0ea4461851850db38a845a47648b81