diff --git a/README.md b/README.md index 00db081..46febb5 100644 --- a/README.md +++ b/README.md @@ -28,7 +28,7 @@ ARCP itself is a transport-agnostic wire protocol for long-running AI agent jobs ## Installation -Requires Swift 6.1 or later and macOS 14+ (or recent Ubuntu LTS). The SDK ships as a single Swift Package Manager package named `ARCP` with one executable product, `arcp`, for the bundled CLI. Add the dependency to your `Package.swift`: +Requires Swift 6.1 or later and macOS 14+. The SDK ships as a single Swift Package Manager package named `ARCP` with one executable product, `arcp`, for the bundled CLI. Add the dependency to your `Package.swift`: ```swift dependencies: [ @@ -86,7 +86,7 @@ This is the whole shape of the SDK: open a session, submit work, consume an orde ARCP organizes everything around four concerns — **identity**, **durability**, **authority**, and **observability** — expressed through five core objects: -- **Session** — a connection between a client and a runtime. A session carries identity (a bearer token), negotiates a feature set in a `hello`/`welcome` handshake, and is *resumable*: if the transport drops, you reconnect with a resume token and the runtime replays buffered events. Jobs outlive the session that started them. See [§6](https://github.com/agentruntimecontrolprotocol/spec/blob/main/docs/draft-arcp-1.1.md). +- **Session** — a connection between a client and a runtime. A session carries identity (a bearer token), negotiates a feature set in a `session.open`/`session.accepted` handshake, and is *resumable*: if the transport drops, you reconnect with a resume token and the runtime replays buffered events. Jobs outlive the session that started them. See [§6](https://github.com/agentruntimecontrolprotocol/spec/blob/main/docs/draft-arcp-1.1.md). - **Job** — one unit of agent work submitted into a session. A job has an identity, an optional idempotency key, a resolved agent version, and a lifecycle that ends in exactly one terminal state: `success`, `error`, `cancelled`, or `timed_out`. See [§7](https://github.com/agentruntimecontrolprotocol/spec/blob/main/docs/draft-arcp-1.1.md). - **Event** — the ordered, session-scoped stream a job emits: logs, thoughts, tool calls and results, status, metrics, artifact references, progress, and streamed result chunks. Events carry strictly monotonic sequence numbers so the stream survives reconnects gap-free. See [§8](https://github.com/agentruntimecontrolprotocol/spec/blob/main/docs/draft-arcp-1.1.md). - **Lease** — the authority a job runs under, expressed as capability grants (`fs.read`, `fs.write`, `net.fetch`, `tool.call`, `agent.delegate`, `cost.budget`, `model.use`). The runtime enforces the lease at every operation boundary; a job can never act outside it. Leases may carry a budget and an expiry, and may be subset and handed to sub-agents via delegation. See [§9](https://github.com/agentruntimecontrolprotocol/spec/blob/main/docs/draft-arcp-1.1.md). @@ -272,7 +272,7 @@ do { ## Feature support -ARCP features this SDK negotiates during the `hello`/`welcome` handshake: +ARCP features this SDK negotiates during the `session.open`/`session.accepted` handshake: | Feature flag | Status | |---|---| @@ -298,7 +298,7 @@ Full API reference — every type, method, and event payload — is in [`docs/`] ## Versioning and compatibility -This SDK speaks **ARCP v1.1 (draft)**. The SDK follows semantic versioning independently of the protocol; the protocol version it negotiates is shown above and in `session.hello`. A runtime advertising a different ARCP MAJOR is not guaranteed compatible. Feature mismatches degrade gracefully: the effective feature set is the intersection of what the client and runtime advertise, and the SDK will not use a feature outside it. +This SDK speaks **ARCP v1.1 (draft)**. The SDK follows semantic versioning independently of the protocol; the protocol version it negotiates is shown above and in `session.accepted`. A runtime advertising a different ARCP MAJOR is not guaranteed compatible. Feature mismatches degrade gracefully: the effective feature set is the intersection of what the client and runtime advertise, and the SDK will not use a feature outside it. ## Contributing diff --git a/Sources/ARCP/Auth/JWTAuth.swift b/Sources/ARCP/Auth/JWTAuth.swift index 8231b6b..064243c 100644 --- a/Sources/ARCP/Auth/JWTAuth.swift +++ b/Sources/ARCP/Auth/JWTAuth.swift @@ -3,9 +3,9 @@ import JWTKit /// `signed_jwt` validator. RFC §8.2. /// -/// Validates the JWT's signature against the configured key collection, -/// asserts `aud` matches the runtime identity, and (optionally) maps the -/// `sub` claim through `principalMapper` before returning. +/// Validates the JWT's signature against the configured key collection +/// and asserts `aud` matches the runtime identity before returning the +/// authenticated principal. public struct JWTAuthValidator: AuthValidator { private let keys: JWTKeyCollection private let audience: String diff --git a/docs/getting-started.md b/docs/getting-started.md index f861e18..05bc32e 100644 --- a/docs/getting-started.md +++ b/docs/getting-started.md @@ -3,7 +3,7 @@ ## Requirements - Swift 6.1 toolchain or later -- macOS 14+ or Linux (Ubuntu 22.04+) +- macOS 14+ ## Add to your Swift package diff --git a/docs/guides/subscriptions.md b/docs/guides/subscriptions.md index 7fa4959..c1fac3d 100644 --- a/docs/guides/subscriptions.md +++ b/docs/guides/subscriptions.md @@ -48,7 +48,7 @@ try await client.send( ``` After backfill completes the runtime emits a synthetic -`event.emit` with name `subscription.backfill_complete`: +`subscribe.event` with name `subscription.backfill_complete`: ```swift for await envelope in client.unhandled { @@ -101,7 +101,7 @@ in `subscribe.event` and delivered to the subscriber's transport. Backfill runs in a child `Task`, scanning the `EventLog` for historical matches and emitting them before switching to live routing. A synthetic -`subscription.backfill_complete` `event.emit` marks the end of historical +`subscription.backfill_complete` `subscribe.event` marks the end of historical data. ## Multiple subscribers