Codex stop-time review on 23b0bfba flagged that real MCP clients (Claude Code, Codex, etc.) won't dispatch tools/call cold — they open with \`initialize\` and \`tools/list\` to discover the server. The previous --mcp implementation responded only to tools/call, so real clients hung at handshake. Add in-binary handlers for the MCP control-plane methods: - \`initialize\` → protocolVersion "2024-11-05" + capabilities (tools.listChanged=false) + serverInfo - \`notifications/initialized\` (and bare \`initialized\`) → absorbed silently (spec: notifications have no response) - \`tools/list\` → response with all 14 tools + their JSON inputSchemas (name / description / required args / enums for kind + drop_children) - \`ping\` → empty result - everything else falls through to shell-core's run_stdio_with_applier so the parser hardening + apply discipline still apply Top-level method/id sniffing uses the same key-walker pattern as shell-core's arguments_field, so a nested key called "method" or a string value of "initialize" can't shadow the real top-level method. Four sniff/response unit tests cover the discipline. End-to-end roundtrip verified with real stdin/stdout: initialize → notifications/initialized → tools/list → tools/call insert_node → tools/call list_pages → all five frames return correct JSON-RPC + the inserted rect persists to disk. |
||
|---|---|---|
| .. | ||
| anthropic-agent-sdk | ||
| copilot-sdk | ||
| openpencil-app | ||
| openpencil-desktop | ||
| openpencil-shell-core | ||
| openpencil-shell-native | ||
| openpencil-shell-web | ||
| pen-codegen | ||
| pen-core | ||
| pen-engine | ||
| pen-figma | ||
| pen-types | ||
| wasm-libc-shim | ||
| CLAUDE.md | ||