|
1 | 1 | # Conformance |
2 | 2 |
|
3 | | -This page records which sections of the [ARCP v1.1 specification](https://arcp.dev/spec/v1.1) are implemented by the Python SDK, and points to the source that implements each requirement. |
| 3 | +This page records which sections of the [ARCP v1.1 specification](https://arcp.dev/spec/v1.1) are implemented by the Python SDK, and points to the source that implements each requirement. Every source path listed below exists in this repository under `src/arcp/`. |
4 | 4 |
|
5 | 5 | ## Conformance matrix |
6 | 6 |
|
7 | 7 | | Spec section | Title | Status | Source | |
8 | 8 | |---|---|---|---| |
9 | | -| §4 | Versioning | ✅ Full | `src/arcp/_version.py` | |
10 | | -| §5 | Transport framing | ✅ Full | `src/arcp/_transport/` | |
11 | | -| §6 | Sessions | ✅ Full | `src/arcp/_runtime/session.py` | |
12 | | -| §6.1 | Authentication — Bearer | ✅ Full | `src/arcp/_auth/bearer.py` | |
13 | | -| §6.1 | Authentication — custom verifier | ✅ Full | `src/arcp/_auth/jwt.py` | |
14 | | -| §6.2 | Agent versions | ✅ Full | `src/arcp/_runtime/server.py` | |
15 | | -| §6.3 | Stream resume | ✅ Full | `src/arcp/_runtime/session.py` | |
16 | | -| §7 | Jobs | ✅ Full | `src/arcp/_runtime/_handlers.py` | |
17 | | -| §7.1 | Idempotency keys | ✅ Full | `src/arcp/_store/idempotency.py` | |
18 | | -| §7.2 | Job cancellation | ✅ Full | `src/arcp/_runtime/_handlers.py` | |
19 | | -| §8 | Job events | ✅ Full | `src/arcp/_envelope.py` | |
20 | | -| §8.1 | `job.queued` | ✅ Full | `src/arcp/_envelope.py` | |
21 | | -| §8.2 | `job.started` | ✅ Full | `src/arcp/_envelope.py` | |
22 | | -| §8.3 | `job.log` | ✅ Full | `src/arcp/_runtime/_handlers.py` | |
23 | | -| §8.4 | `job.progress` | ✅ Full | `src/arcp/_runtime/_handlers.py` | |
24 | | -| §8.5 | `job.result_chunk` | ✅ Full | `src/arcp/_runtime/_handlers.py` | |
25 | | -| §8.6 | `job.completed` | ✅ Full | `src/arcp/_runtime/_handlers.py` | |
26 | | -| §8.7 | `job.failed` | ✅ Full | `src/arcp/_runtime/_handlers.py` | |
27 | | -| §8.8 | `job.cancelled` | ✅ Full | `src/arcp/_runtime/_handlers.py` | |
28 | | -| §8.9 | `job.heartbeat` | ✅ Full | `src/arcp/_runtime/_handlers.py` | |
29 | | -| §9 | Leases | ✅ Full | `src/arcp/_runtime/lease.py` | |
30 | | -| §9.1 | Cost budgets | ✅ Full | `src/arcp/_runtime/lease.py` | |
31 | | -| §9.2 | Time budgets (`expires_in_s`) | ✅ Full | `src/arcp/_runtime/lease.py` | |
32 | | -| §9.3 | `expires_at` (absolute timestamp) | ✅ Full | `src/arcp/_runtime/lease.py` | |
33 | | -| §10 | Delegation | ✅ Full | `src/arcp/_runtime/_handlers.py` | |
34 | | -| §11 | Observability | ✅ Full | `src/arcp/middleware/otel.py` | |
35 | | -| §12 | Errors | ✅ Full | `src/arcp/_errors.py` | |
36 | | -| §13 | Capability negotiation | ✅ Full | `src/arcp/_runtime/server.py` | |
37 | | -| §14 | List jobs | ✅ Full | `src/arcp/_runtime/_handler_list_jobs.py` | |
38 | | -| §15 | Vendor extensions | ✅ Full | `src/arcp/_extensions.py` | |
| 9 | +| §4 | Versioning / protocol constant | Full | `src/arcp/_version.py`, `src/arcp/_envelope.py` | |
| 10 | +| §5.1 | Envelope shape (8 fields) | Full | `src/arcp/_envelope.py` | |
| 11 | +| §5.2 | Wire framing (WebSocket / stdio / memory) | Full | `src/arcp/_transport/` | |
| 12 | +| §6.1 | `session.hello` / `session.welcome` | Full | `src/arcp/_runtime/_handshake.py` | |
| 13 | +| §6.1 | Authentication — bearer (static + custom) | Full | `src/arcp/_auth/bearer.py` | |
| 14 | +| §6.1 | Authentication — JWT / JWKS | Full | `src/arcp/_auth/jwt.py` | |
| 15 | +| §6.2 | Capability / feature negotiation | Full | `src/arcp/_runtime/_handshake.py`, `src/arcp/_version.py` | |
| 16 | +| §6.3 | Session resume (`hello.resume`) | Full | `src/arcp/_runtime/_handshake.py`, `src/arcp/_store/eventlog.py` | |
| 17 | +| §6.4 | Heartbeat / liveness | Full | `src/arcp/_runtime/session.py` (`heartbeat_loop`) | |
| 18 | +| §6.5 | Ack backpressure | Full | `src/arcp/_runtime/_handlers.py` (`handle_ack`) | |
| 19 | +| §6.6 | `session.bye` / orderly close | Full | `src/arcp/_runtime/_handlers.py` (`handle_bye`) | |
| 20 | +| §7.1 | `job.submit` / `job.accepted` | Full | `src/arcp/_runtime/_handlers.py` (`handle_submit`) | |
| 21 | +| §7.2 | Idempotency keys (accept + terminal replay) | Full | `src/arcp/_store/idempotency.py`, `src/arcp/_runtime/_handlers.py` | |
| 22 | +| §7.3 | Agent versions (`agent@version` selection) | Full | `src/arcp/_runtime/server.py` (`_resolve_agent`) | |
| 23 | +| §7.4 | `job.cancel` (submitter-only) | Full | `src/arcp/_runtime/_handlers.py` (`handle_cancel`) | |
| 24 | +| §7.5 | `session.list_jobs` (filter + cursor) | Full | `src/arcp/_runtime/_handler_list_jobs.py` | |
| 25 | +| §7.6 | `job.subscribe` / `job.unsubscribe` | Full | `src/arcp/_runtime/_handlers.py` | |
| 26 | +| §8.1 | `log`, `thought`, `status` events | Full | `src/arcp/_runtime/job.py` (`JobContext`) | |
| 27 | +| §8.2 | `metric`, `tool_call`, `tool_result` | Full | `src/arcp/_runtime/job.py`, `src/arcp/_messages/event_bodies.py` | |
| 28 | +| §8.3 | `progress` events | Full | `src/arcp/_runtime/job.py` (`JobContext.progress`) | |
| 29 | +| §8.4 | `result_chunk` + streamed `job.result` | Full | `src/arcp/_runtime/result_stream.py` | |
| 30 | +| §8.5 | Terminal `job.result` / `job.error` | Full | `src/arcp/_runtime/job.py` (`Job.emit_result`, `Job.emit_error`) | |
| 31 | +| §9.1 | Lease shape + glob validation | Full | `src/arcp/_runtime/lease.py` (`validate_lease_shape`) | |
| 32 | +| §9.2 | Cost budgets (Decimal arithmetic) | Full | `src/arcp/_runtime/lease.py`, `src/arcp/_runtime/job.py` | |
| 33 | +| §9.3 | Lease constraints (`expires_at`, `model.use`) | Full | `src/arcp/_runtime/lease.py` (`validate_lease_constraints`) | |
| 34 | +| §9.4 | Lease watchdog (auto-expiry) | Full | `src/arcp/_runtime/_job_runner.py` (`_lease_watchdog`) | |
| 35 | +| §9.5 | Sublease shape rules for delegation | Full | `src/arcp/_runtime/lease.py` (`assert_lease_subset`) | |
| 36 | +| §10 | Provisioned credentials + revocation | Full | `src/arcp/_runtime/credentials.py`, `src/arcp/_runtime/_handlers.py` | |
| 37 | +| §11 | Observability — OTel transport wrapper | Full | `src/arcp/middleware/otel.py` | |
| 38 | +| §12 | Typed errors + `session.error` payload | Full | `src/arcp/_errors.py` | |
| 39 | +| §13 | Vendor extensions (`x-*` passthrough) | Full | `src/arcp/_extensions.py` | |
| 40 | +| §14 | Authorization defaults + policy seam | Full | `src/arcp/_runtime/server.py` (`AuthorizationContext`) | |
39 | 41 |
|
40 | 42 | ## Notes |
41 | 43 |
|
42 | 44 | ### §6.3 Stream resume |
43 | 45 |
|
44 | | -Resume remains session-scoped in the current implementation. Treat the older |
45 | | -`resume_token` submit flow as deferred until the runtime exposes it publicly. |
| 46 | +`SessionResume` carries `(session_id, resume_token, last_event_seq)` in a |
| 47 | +`session.hello`. The runtime keeps a per-session resume record for |
| 48 | +`resume_window_sec` after disconnect, validates the resume token + principal |
| 49 | +on rejoin, reuses the original `session_id`, rotates the resume token, and |
| 50 | +replays buffered envelopes from the event log past `last_event_seq`. Jobs do |
| 51 | +not run across the disconnect boundary; only history is replayed. |
46 | 52 |
|
47 | | -### §9.3 `expires_at` |
| 53 | +### §6.5 Ack backpressure |
48 | 54 |
|
49 | | -`expires_at` accepts an ISO 8601 datetime string (UTC). The runtime converts it to `expires_in_s` for internal tracking. |
| 55 | +`session.ack` releases acked prefixes from the in-memory or SQLite event log |
| 56 | +synchronously inside the dispatch loop (per-session serialized). |
| 57 | +`AutoAckOptions` on the client coalesces acks by event count and interval. |
50 | 58 |
|
51 | | -### §10 Delegation |
| 59 | +### §7.2 Idempotency |
52 | 60 |
|
53 | | -Delegation tokens are signed JWTs. The SDK provides `runtime.create_delegation_token(principal, scopes)` and verifies incoming tokens automatically. |
| 61 | +A duplicate `job.submit` with the same `(principal, idempotency_key)` |
| 62 | +replays the original `job.accepted` AND, if the original job has reached a |
| 63 | +terminal state, also replays the stored `job.result` or `job.error`. This |
| 64 | +prevents the duplicate `JobHandle` from hanging on `await handle.done`. |
54 | 65 |
|
55 | | -### §15 Vendor extensions |
| 66 | +### §10 Provisioned credentials |
56 | 67 |
|
57 | | -Any `x-*` key in a submit payload or event payload is passed through without modification. Use `arcp._extensions.get_extension(event, "x-my-field")` to read them safely. |
| 68 | +Credentials are issued via a pluggable `CredentialProvisioner`, recorded in |
| 69 | +a durable `RevocationLog`, attached to `job.accepted`, and revoked when the |
| 70 | +job ends. Credential rotation is exposed via `JobContext.rotate_credential`. |
| 71 | + |
| 72 | +### §13 Vendor extensions |
| 73 | + |
| 74 | +Any `x-vendor.*` key in an envelope payload or event body is passed through |
| 75 | +without modification — every pydantic payload model in `arcp._messages.*` |
| 76 | +uses `model_config = ConfigDict(extra="allow")`. Validate keys with |
| 77 | +`arcp._extensions.validate_extension_key("x-vendor.my-field")` before sending |
| 78 | +to ensure forward compatibility. |
0 commit comments