Skip to content

Add version negotiation to the runtime protocol#125

Merged
adamcohenhillel merged 1 commit into
mainfrom
feat/runtime-protocol-versioning
Jul 6, 2026
Merged

Add version negotiation to the runtime protocol#125
adamcohenhillel merged 1 commit into
mainfrom
feat/runtime-protocol-versioning

Conversation

@adamcohenhillel

Copy link
Copy Markdown
Contributor

Summary

  • Replace the hard version !== 1 throw in openphone-runtime-tools.mjs with an inclusive supported range (RUNTIME_PROTOCOL_VERSION_RANGE, currently 1..1) plus isSupported/assert helpers
  • Advertise the range in initialize-style handshakes: MCP initialize result gains serverInfo.runtimeProtocol, and the CLI gains an info command with runtime_protocol in --json output
  • Accept and validate command-level deprecation metadata: deprecated: true / superseded_by (must reference an existing, different command; requires deprecated=true) in both the loader and validate-runtime-protocol.mjs
  • Document the version-bump policy in docs/runtime/runtime-agent-protocol.md
  • New contract test tests/integrations/runtime-protocol-versioning-contract.mjs wired into check.sh / check-runtime-protocol.sh; packaged protocol mirrors in integrations/cli and integrations/mcp-server kept in sync

Test plan

  • ./scripts/check.sh passes (includes the new versioning contract test and mirror-sync package contract)
  • Mirrors verified byte-identical to runtime/protocol/openphone-runtime-tools.mjs
  • No manifest commands deprecated — metadata support is additive only

Closes #86

🤖 Generated with Claude Code

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>
@vercel

vercel Bot commented Jul 6, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
openphone-docs Ready Ready Preview, Comment Jul 6, 2026 12:54am

Request Review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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,

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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 👍 / 👎.

@adamcohenhillel adamcohenhillel merged commit f020e5a into main Jul 6, 2026
3 checks passed
@adamcohenhillel adamcohenhillel deleted the feat/runtime-protocol-versioning branch July 6, 2026 22:25
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.

Add version negotiation to the runtime protocol

1 participant