-
Notifications
You must be signed in to change notification settings - Fork 324
fix: protocol version validation in worker transport #720
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Remove strict version matching after initialization. Now accepts any supported protocol version in request headers, or defaults to negotiated version when header is absent. Only rejects truly unsupported versions. - Remove unused imports (InitializeRequest) and local SUPPORTED_PROTOCOL_VERSIONS constant - Capture negotiated protocol version from initialize response instead of request - Simplify validateProtocolVersion to only reject
🦋 Changeset detectedLatest commit: 3f7016e The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Claude Code ReviewIssue in changeset: Typo - "isse" should be "issue" Architecture concern: The PR removes version tracking entirely but the comment in
Question: Is this intentional? If the SDK negotiates a version during initialization, should the transport enforce that specific version for the session lifetime, or is the stateless approach (accept any supported version at any time) the correct design? Otherwise the changes look good - simplifies the code, removes ~60 lines, and aligns with stateless transport goals. |
commit: |
Sync documentation with cloudflare/agents PR #720: - Remove protocolVersion from TransportState interface (no longer stored) - Update protocol version validation behavior documentation - Clarify that protocol version validation is per-request, not session-bound The WorkerTransport now accepts any supported protocol version on each request or defaults to the negotiated version when header is absent, removing the need to track protocol version in persistent state. Related PR: cloudflare/agents#720 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Update documentation to reflect the simplified protocol version validation in WorkerTransport (cloudflare/agents#720). The transport now uses stateless validation that accepts any supported protocol version, rather than enforcing strict version consistency after negotiation. Changes: - Add new "Protocol version handling" section explaining stateless validation - Clarify that version headers are optional after initialization - Document that only unsupported versions are rejected Related PR: cloudflare/agents#720 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Sync from cloudflare/agents PR #720 Changes: - Remove protocolVersion field from TransportState interface (no longer stored) - Update persistent storage benefits to remove protocol version tracking - Add new Protocol Version Validation section explaining stateless validation approach The WorkerTransport now validates protocol version headers without tracking negotiated versions. It accepts any supported version or missing headers, only rejecting explicitly unsupported versions. Protocol negotiation is handled by the MCP SDK. Related: cloudflare/agents#720
Remove strict version matching after initialization. Now accepts any supported protocol version in request headers and only rejects truly unsupported versions.
This aligns with the move to stateless transports/protocol
fixes: #719