Repository navigation
task/JWB-947 - #92
Merged
Merged
task/JWB-947#92
Conversation
interlock mcp now serves stdio through @modelcontextprotocol/server's
serveStdio, so protocol negotiation, framing and errors come from the SDK.
Tools are still registered from the action tree with each action's zod
input schema.
The unix-socket transport, the interlock/auth method, and the --lane,
--transport and --socket options are removed; --allow remains as a tool
filter.
A refusal now reaches the client as a tool error carrying its code and
message: thrown coded errors and {ok:false, refusal} results both return
{"ok":false,"refusal":{code,message}} with isError true. Uncoded failures
still return "Tool call failed".
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…nput - Only snake_case codes count as refusals. Errno and SQLite errors such as EACCES return "Tool call failed" instead of echoing paths. - Tools advertise each action's zod JSON schema, but the action parses the raw arguments once. The SDK's "Unrecognized key" text can no longer echo caller keys, and transforms run once. - stdin EOF waits for every received request to be answered before the transport closes, so piped or in-flight calls are not dropped. - --allow that names no actions fails closed instead of exposing every tool. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…wn tool names - subscriptions/listen is a long-lived stream that the SDK answers only at teardown. Stop counting it as pending, so stdin EOF no longer waits on it forever. - On stdin error, or close without end, drop pending requests and end the wire, instead of throwing an uncaught error and hanging. - Rewrite the SDK's "Tool <name> not found" error to "Unknown tool", so the caller's tool name is not echoed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <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.
Interlock lane interlock-lane:f648da53-4ac6-4087-9690-f2578ecc58ee
Before / after evidence
Each probe pipes raw JSON-RPC lines into
bun <root>/src/main.ts mcpfrom a detached worktree at the given commit:5ef0168(main before this PR),f8450d1(round-3 head),858f3e1(merged). Each probe uses an isolatedXDG_STATE_HOME.Handshake, returned refusal,
interlock/auth:./probe.sh <root>1999-01-01was echoed back as the protocol version. After, the SDK negotiates2025-11-25.lane_not_foundrefusal hadisError:false. After, it hasisError:true.interlock/authansweredAuthentication failed. After, it answersMethod not foundbecause the method is deleted.Thrown refusal (
pickupwithreviewer_modelset and noreviewers):./pickup.sh <root>Unsupported protocol version no longer echoes the caller's value (round-3 finding):
./version.sh <root>Round-4 test results (head
3d5affa)an unsupported protocol version is refused without echoing the requested versionintest/mcp/server.test.tsfails withsrc/mcp/stdio.tsfromf8450d1and passes on3d5affa:bun test test/mcp/server.test.ts -t "unsupported protocol"onf8450d1stdio gave0 pass, 1 fail.bun test test/mcp/server.test.tson3d5affagave16 pass, 0 fail.vp check: all 192 files formatted. No warnings, lint errors or type errors in 173 files.vp run typecheck: clean.vp run test:689 pass, 24 skip, 0 fail, 713 tests across 50 files. The skips are environment-gated suites already on main.3d5affa: all 8 checks green (https://github.com/JarenKempton/interlock/actions/runs/43307694949).🤖 Generated with Claude Code