Repository navigation
feat(protocol): negotiate protocol version 2 with a base-protocol fallback - #2
Merged
Merged
Conversation
…lback Protocol version 1 is unchanged. Version 2 adds PDF print jobs and printer document capabilities, and peers negotiate it independently of each other: - Handshake frames always use envelope version "1". agent.hello offers ["2", "1"] and server.hello lists only the selected version, so a base agent receives the reply it expects. - Other envelopes use the lowest version their content needs. Receipts, reports, and base inventory stay on "1". Decoders reject extended content under a "1" envelope, and a session rejects "2" unless negotiated. - An agent whose extended hello is closed before server.hello retries once with the base offer and remembers a base-only server for 24 hours. Timeouts never trigger the fallback. - Base-only sessions receive inventory projected without extended fields. - Servers accept a protocolVersions option; sendJob refuses PDF jobs to sessions without version 2 with protocol-version-unsupported. Compatibility is covered by TypeScript session tests, protocol unit tests, Rust negotiation scenarios for all three agent/server combinations, and shared fixtures for extended handshakes and invalid mislabelled content. Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
The generated docs index depends on filesystem ordering. A local regeneration reordered its imports, which fails the CI check that verifies generated artifacts. No documentation pages were added, so the index matches main. Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
This branch was successfully deployed
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.
Summary
Protocol version 1 is unchanged. Version 2 adds PDF print jobs and printer document capabilities. The two are negotiated during the hello exchange, so agents and servers upgrade independently.
agent.helloalways uses envelope version"1". A current agent offers["2", "1"].server.hellolists only the selected version, so a base agent receives the reply it expects."1". Decoders reject extended content under a"1"envelope, and a session rejects"2"unless it negotiated version 2.server.helloretries once with the base offer. It remembers a base-only server for 24 hours, then tries the extended offer again. Timeouts never trigger the fallback.protocolVersionsoption (default["2", "1"], must include"1").sendJobreturnsprotocol-version-unsupportedfor PDF jobs in sessions without version 2.Compatibility coverage
"1", are checked by both the TypeScript and Rust suites.Known limitations
server.hello, is indistinguishable from a refusal. It causes one base-protocol fallback and up to 24 hours of base-only operation for that server.Verification
cargo clippy --workspace --all-targets --all-features -- -D warnings(Rust 1.99.1)cargo test --workspace: 207 tests passingpnpm test: protocol 70, server 29, sdk 6, example 1pnpm lint,pnpm typecheck,pnpm format:check,pnpm protocol:generateand schema check🤖 Generated with Claude Code