Repository navigation
docs: reconcile v1.15 spec text, unstable RFDs and the proxy-chains RFD - #2743
Merged
Merged
Conversation
…tool-call intro The plain-language pass (#2730) changed two v1 passages beyond wording: - `Implementation.title` said it "should be readable by people", which adds a should-statement to the stable v1 spec and schema. Restore the v1.14.0 meaning ("optimized to be human-readable and easily understood") without the em dash. The v2 copy uses the same text. - The v1 tool-calls intro said Agents may use Client capabilities "while running a tool call", which reads as a new timing limit. Drop the temporal clause and keep the original "or". Co-Authored-By: Claude <noreply@anthropic.com>
… rules #2738 narrowed `session/cancel` so listed background work keeps running and its permission requests stay open, but several v2 passages still stated the old rule. Update them in the stable and draft pages and the v2 schema: - prompt-lifecycle: add the missing "or" in the announce-before-listing rule (stable only, the draft already had it), scope "stop all tool call invocations" to the cancelled foreground work, put the `-32800` rule next to the prompts it covers, and state that a `subject` the Client does not recognize, such as a custom subject type, is answered with `cancelled`. - tool-calls, cancellation, migration: answer pending permission requests for the cancelled foreground work, not every request in the session. - Schema: `RequestPermissionOutcome::Cancelled`, the `session/request_permission` request and the `session/cancel` notification descriptions now state the narrowed rule and the custom subject case. Co-Authored-By: Claude <noreply@anthropic.com>
…_title with their RFDs - session/status: keep `-32002` for sessions the Agent does not know, and state the RFD's exception in the schema, the draft error pages and the RFD's own error rule: an Agent that cannot cheaply tell a saved session from an unknown one may return `saved`, and the later resume or load gets `-32002`. - auth/status: add it to the draft v2 list of requests that do not fail with `auth_required`, and put the RFD's MUST NOT in the schema. - session/set_title: refusing a session the Agent cannot safely update returns `-32602`, as an explicit exception to retitling any listed session, in the schema, the draft error pages and the RFD. Co-Authored-By: Claude <noreply@anthropic.com>
…onductor Define, in the proxy-chains RFD and the proxy schema descriptions: - Errors the conductor returns itself (before initialization, failed chain start, `proxy/initialize` from outside, misplaced `proxy/successor`, malformed envelopes, a component that exited), separate from the pass-through rule for wrapped results. - Hop-local cancellation: `$/cancel_request` names a request on its own connection, is never forwarded, and each hop re-issues it. - Envelope `_meta` is hop-local and not copied into the unwrapped message. - Version selection along the chain, the proxy's obligation to forward `initialize` before answering, the proxy/initialize result built from the successor's (same `protocolVersion`), and repeated `proxy/initialize`. - "Unchanged" results and errors mean the same JSON value. - Wrapped `params` is an object, an array, or `null`. - Forwarding of unknown requests and notifications and where `-32601` comes from. Also link version negotiation for v1 and v2, replace the old `sacp-conductor` name, drop crash-handling claims the reference conductor does not implement, and add a revision-history entry. Co-Authored-By: Claude <noreply@anthropic.com>
…ions Co-Authored-By: Claude <noreply@anthropic.com>
…ancel in v2 The Agent knows which work each permission request belongs to, so on session/cancel it stops waiting for the cancelled work's requests and cancels them with $/cancel_request, as it already does for elicitations. Clients MAY answer them early. session/close cancels every pending permission request the same way. This removes the subject-based rules for which requests the Client answers. Co-Authored-By: Claude <noreply@anthropic.com>
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes the spec, schema-description and RFD issues found while syncing the SDKs to v1.15.0. All changes are text only. The regenerated
schema/*.jsonandschema.mdxfiles are committed with their sources.Fixes by issue
I1: v1
Implementation.title(stable v1 requirement drift from #2730)src/v1/agent.rs(field and builder),docs/protocol/v1/initialization.mdxand the v1 draft. The v2 copies use the same text.I2: v1 tool-calls intro
.rs). No other v1 requirement changes.I4: missing "or" (stable v2 background work)
prompt-lifecycle.mdx: "aterminal_updatefor a terminal or atool_call_updatefor a tool call". The draft copy already had the "or".v2
session/canceland pending permission requestssession/cancelit MUST stop waiting for the cancelled foreground work'ssession/request_permissionrequests and treat them as not approved. It SHOULD cancel each one with$/cancel_request. The Client MAY answer a request it knows belongs to the cancelled work withcancelledwithout waiting. Requests for work in thebackgroundlist are not affected.subjectto pick which requests to answer: requests without asubject, unrecognized custom subjects, and the old I8 question.subjectis now display information only.session/close: before responding, the Agent MUST cancel every pending permission request and elicitation in the session with$/cancel_request. The Client-side "MUST answer pending permission requests for listed work" is removed.prompt-lifecycle,cancellation(rule and cascading example, which now shows$/cancel_request),tool-callsandsession-setup(stable and draft v2),migration.mdx, the schema descriptions (RequestPermissionOutcome::Cancelled, thesession/request_permissionvariant, thesession/cancelnotification), and the background-work RFD, with a revision-history entry. v1 is unchanged: the Client still answers every pending permission request there.prompt-lifecycle.mdx(stable and draft): "SHOULD stop all language model requests and all tool call invocations" now says "of the cancelled foreground work", to match "listed work keeps running". The-32800sentence now comes before the sentence about prompts received aftersession/cancel, so "those prompts" no longer reads as the later ones. Thesession/cancelschema description no longer says "Background work is not covered, but the Agent MAY stop it too".I6:
auth/statusvsauth_requiredauth/statusis added to the draft v2 exception list inauthentication.mdx. The RFD's MUST NOT is added to theAuthStatusRequestschema descriptions (v1 and v2).I3: proxy-chains RFD and proxy schema descriptions
proxy/initializefrom outside, misplacedproxy/successor, malformed envelopes, and a component that exited or a routing failure._metais hop-local. The conductor does not copy it into the unwrapped message.protocolVersiononly when it lowers it. Each proxy negotiates the same way, so the version only goes down along the chain. A proxy MUST forwardinitializebefore answering successfully, builds its result from its successor's, and MUST NOT changeprotocolVersion. "Expects a standardInitializeResponse" is replaced by the version'sInitializeRequest/InitializeResponseshapes, describing the chain from the proxy onward. Repeatedproxy/initializefollows the repeated-initializerules.sacp-conductoris nowagent-client-protocol-conductor, and "SACP proxies" is now "ACP proxies".paramsis a JSON object, an array, ornull. An envelope without a stringmethod, or with otherparams, gets-32602. Omitted ornullparamsunwraps to a message without params.-32601comes from the end of the chain and passes back unchanged. A proxy answers-32601itself only for a request it decides not to forward.$/cancel_requestis never forwarded.code/message/datamay be dropped.Decisions to review
auth/statusfromauth_requiredin the docs and schema. Alternative: leave the MUST NOT only in the RFD.session/cancel(MUST stop waiting, SHOULD send$/cancel_request), and the Client MAY answer early. Alternative: keep the Client MUST and thesubject-based rules.-32600for protocol misuse (matching the reference'sproxy/initializeerrors),-32602for malformed envelopes or an invalidprotocolVersion, and-32603for a missing or exited component. A conductor MAY instead close the connection when a component fails.$/cancel_request(SHOULD), with the wrapped form accepted and treated the same (MUST). Alternative: require the wrapped form on proxy-to-conductor hops._metais hop-local. Alternative: carry it end to end. Nothing in the reference does that, and it would mix envelope and message metadata.protocolVersion. A proxy must forwardinitializebefore a successful answer. Alternative: let a proxy answer without its successor, which leaves the successor uninitialized.Option<RawValue>, with no validation added in the schema crate.-32601comes from the end of the chain._meta, hop-local cancellation, repeatedproxy/initialize, version wording,paramsshape, envelope without params ormethod) follow the proposals from the Rust SDK's schema 1.15.0 adoption, rust-sdk chore(deps): bump the minor group with 4 updates #480. Its byte-level wire tests check the reference conductor against them, and the reference in chore(deps): bump the minor group with 4 updates #480 already follows them, except for the two differences below.Reference implementation differs
Checked against rust-sdk
mainand #480:proxy/successorfrom a non-proxy. The spec now says the conductor answers aproxy/successorrequest from the agent, or from the client of a terminal-mode conductor, with-32600and drops such notifications. The reference conductor forwards these as ordinary messages. A client'sproxy/successorreaches the first proxy, which reads it as a message from its successor. An agent's arrives double-wrapped at the last proxy. I think forwarding is wrong because it lets the client inject messages that look like they came from the agent side.$/cancel_requestplain. Rust SDK proxies wrap the cancellation of a request they sent to their successor inproxy/successor. ItsrequestIdis still the outer request's ID, so this is allowed but not the recommended form. The reference conductor accepts both forms and never forwards either, which matches the MUST rules.Checks
npm run generateandnpm run checkpass.