Add version negotiation to the runtime protocol#125
Conversation
Replace the hard version===1 check with an inclusive supported-version range, advertise the range in the MCP initialize result and a new CLI info command, validate deprecated/superseded_by command metadata, and document the version-bump policy. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b48619c920
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| const SERVER_INFO = { | ||
| name: "openphone-runtime", | ||
| version: "0.1.0", | ||
| runtimeProtocol: RUNTIME_PROTOCOL_INFO, |
There was a problem hiding this comment.
Move runtime protocol metadata out of serverInfo
For MCP clients that deserialize initialize with generated 2025-06-18 types, this nested runtimeProtocol field can be dropped because serverInfo is typed as Implementation (name, optional title, version; see https://modelcontextprotocol.io/specification/2025-06-18/schema#implementation). In that context the handshake still succeeds but the advertised OpenPhone protocol range is unavailable, defeating the negotiation this change adds; put the range on a top-level initialize extension/_meta entry or an experimental capability instead.
Useful? React with 👍 / 👎.
Summary
version !== 1throw inopenphone-runtime-tools.mjswith an inclusive supported range (RUNTIME_PROTOCOL_VERSION_RANGE, currently 1..1) plusisSupported/asserthelpersinitializeresult gainsserverInfo.runtimeProtocol, and the CLI gains aninfocommand withruntime_protocolin--jsonoutputdeprecated: true/superseded_by(must reference an existing, different command; requiresdeprecated=true) in both the loader andvalidate-runtime-protocol.mjsdocs/runtime/runtime-agent-protocol.mdtests/integrations/runtime-protocol-versioning-contract.mjswired intocheck.sh/check-runtime-protocol.sh; packaged protocol mirrors inintegrations/cliandintegrations/mcp-serverkept in syncTest plan
./scripts/check.shpasses (includes the new versioning contract test and mirror-sync package contract)runtime/protocol/openphone-runtime-tools.mjsCloses #86
🤖 Generated with Claude Code