Skip to content

fix(v2): align protocol version negotiation - #286

Merged
benbrandt merged 1 commit into
mainfrom
fix/v2-version-negotiation
Oct 16, 2026
Merged

benbrandt merged 1 commit into
mainfrom
fix/v2-version-negotiation

Conversation

@benbrandt

Copy link
Copy Markdown
Member

Summary

  • Let standalone v2 agents accept higher requested versions with compatible initialization parameters and select v2.
  • Reject requests below the supported v2 range with -32022 and structured requested / supported data, without requiring v2 client identity.
  • Apply the same diagnostic in the agent protocol router while preserving v1-only legacy fallback.
  • Keep malformed versions as -32602 and post-initialization traffic version-specific.

Protocol companion: agentclientprotocol/agent-client-protocol#2412

Compatibility and release sequencing

The v1 protocol contract is unchanged. V1 clients can handle the v2-only rejection as an ordinary initialization error.

This runtime fix uses the published schema pins and open numeric error type. No schema snapshots or generated files change. V2 catalog updates can follow the protocol/schema release.

Validation

  • Rebased onto current upstream main, including its schema-pin update.
  • npm run check passed, including 964 tests and TypeDoc verification.
  • Schema snapshots, generated files, and generator configuration are unchanged against main.
  • git diff --check passed.
  • Direct wire checks before rebasing covered higher-version fallback, mismatches, malformed input, batch framing, and v1-client handling of a v2-only rejection.

@benbrandt
benbrandt marked this pull request as ready for review October 16, 2026 10:33
@benbrandt
benbrandt enabled auto-merge (squash) October 16, 2026 10:34
@benbrandt
benbrandt merged commit 4197b89 into main Oct 16, 2026
6 checks passed
@benbrandt
benbrandt deleted the fix/v2-version-negotiation branch October 16, 2026 10:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant