feat(post1-T-4.1): MCP protocol_version 2 — natural JSON value encoding (0.7.x)#40
Merged
feat(post1-T-4.1): MCP protocol_version 2 — natural JSON value encoding (0.7.x)#40
Conversation
…ng (0.7.x) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Breaking change for the 0.7.x branch — bumps
TOOL_RESPONSE_PROTOCOL_VERSIONfrom 1 to 2.Option::None→null(was{"option": "None"})Option::Some(v)→vunwrapped (was{"option": "Some", "value": v})Result::Ok(v)→{"ok": v}(was{"result": "Ok", "value": v})Result::Err(v)→{"err": v}(was{"result": "Err", "value": v}){"field1": v1, "field2": v2}using the module type table (was positional{"type":"record","type_id":N,"fields":[...]}){"VariantName": payload}for tagged,"VariantName"for unit (was{"type":"enum","type_id":N,"variant":"Name","payload":...})Fallback for missing type info: records fall back to positional arrays; enums fall back to the v1 shape.
Why 0.7.x only
This is a breaking wire-format change that cannot go on the 1.x LTS master branch. 0.7.x is the designated channel for LTS-incompatible improvements.
Files
crates/boruna-mcp/src/tools/run.rs— newformat_value_v2(value, module), updatedformat_value_cappedto accept&Modulecrates/boruna-mcp/src/tools/mod.rs— version constant 1 → 2, lock test updateddocs/reference/mcp-server.md— updated Stability section + value encoding tableCHANGELOG.md— unreleased entryTest plan
cargo test --workspacepasses (all crates, locally verified)cargo clippy --workspace -- -D warningscleancargo fmt --all -- --checkclean🤖 Generated with Claude Code