Skip to content

feat(unstable-v2): define version mismatch errors - #2412

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

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

Conversation

@benbrandt

@benbrandt benbrandt commented Oct 16, 2026 •

Copy link
Copy Markdown
Member

Summary

  • Define v2 negotiation as selecting the highest supported version at or below the requested version.
  • Add -32022 (Unsupported protocol version) with required requested and supported error data when no supported version qualifies.
  • Keep malformed version values as -32602, require clients to check successful selections, and leave mismatched connections uninitialized.
  • Expand dual-stack migration guidance with the runnable TypeScript example, Rust routing, client fallback, and adapter boundaries.

Compatibility

This changes the v2 specification and error catalog only. The v1 specification, schema source, and generated artifacts are unchanged.

A v1 client reaching a v2-only endpoint receives an ordinary initialization error. The endpoint does not need to manufacture v2 client identity or invoke its typed v2 handler to report the mismatch. Legacy v1-only agents retain their existing negotiation contract.

Companion SDK draft PRs:

Validation

  • npm run generate
  • npm run check
  • git diff --check
  • Verified no v1 protocol/schema changes against current main.

The branch is rebased onto current upstream main. The Mintlify site was not built.

@benbrandt
benbrandt marked this pull request as ready for review October 16, 2026 10:29
@benbrandt
benbrandt requested a review from a team as a code owner October 16, 2026 10:29
@benbrandt
benbrandt enabled auto-merge (squash) October 16, 2026 10:29
@benbrandt
benbrandt merged commit 26008c5 into main Oct 16, 2026
14 checks passed
@benbrandt
benbrandt deleted the feat/v2-version-negotiation branch October 16, 2026 10:33
@acp-release-bot acp-release-bot Bot mentioned this pull request Oct 16, 2026
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