vectorcraft/crates/mcp
Fahri Meral cc518797a8 Fix #1728: require the JSON-RPC 2.0 envelope and correlate control replies
The server dispatched requests and notifications without ever checking jsonrpc, so a missing or wrong version could invoke tools or flip notification state; Remote accepted any reply with ok/result/error without comparing ids, so a faulty endpoint could attribute a stray result to the current call. handle() now requires jsonrpc 2.0 before dispatch (other envelopes get -32600, or are ignored for notifications, which have no id for a reply) and Remote::call rejects a reply whose id doesn't echo the request's, dropping the connection so the next call starts fresh, with the usual uncertainty error. Three new tests cover wrong/missing versions (incl. batch entries and a state-changing notification) and the mismatch-reconnect; docs/mcp.md documents both. cargo test -p vectorcraft-mcp passes.
2026-10-14 04:31:44 +07:00
..
src Fix #1728: require the JSON-RPC 2.0 envelope and correlate control replies 2026-10-14 04:31:44 +07:00
tests Fix #832: --automation-read-root and --automation-write-root confine the MCP server's files 2026-10-10 14:27:24 +07:00
Cargo.toml M1: common MCP tools and strict argument handling 2026-10-08 21:26:41 -07:00