diff --git a/.yoi/tickets/00001KVHR3WRY/item.md b/.yoi/tickets/00001KVHR3WRY/item.md index 13052108..dd5167cd 100644 --- a/.yoi/tickets/00001KVHR3WRY/item.md +++ b/.yoi/tickets/00001KVHR3WRY/item.md @@ -1,8 +1,8 @@ --- title: 'MCP: implement stdio JSON-RPC lifecycle client' -state: 'done' +state: 'closed' created_at: '2026-06-20T05:30:04Z' -updated_at: '2026-06-20T07:59:10Z' +updated_at: '2026-06-20T07:59:30Z' assignee: null readiness: 'implementation_ready' risk_flags: ['mcp', 'stdio', 'json-rpc', 'process-lifecycle', 'diagnostics'] diff --git a/.yoi/tickets/00001KVHR3WRY/resolution.md b/.yoi/tickets/00001KVHR3WRY/resolution.md new file mode 100644 index 00000000..b413ca8d --- /dev/null +++ b/.yoi/tickets/00001KVHR3WRY/resolution.md @@ -0,0 +1,37 @@ +## Resolution + +`00001KVHR3WRY` を完了しました。 + +実装内容: +- New internal crate `mcp` を追加しました。 +- Explicit MCP stdio server config から resolved stdio server spec を作成する bridge を追加しました。 +- Tokio child process による local stdio MCP server lifecycle foundation を実装しました。 +- stdin/stdout/stderr handling、newline-delimited JSON-RPC request/response handling、initialize/capability negotiation、`notifications/initialized` を実装しました。 +- stdout/stderr/protocol payloads は bounded に扱います。 +- stderr は bounded diagnostics/logging として扱い、protocol failure とは別扱いです。 +- server name / phase-aware errors を追加しました。 +- shutdown は stdin close / wait / terminate / kill fallback で deterministic に行います。 +- Server-to-client requests は fail-closed し、sampling/elicitation は advertise せず、unknown request は JSON-RPC error で返します。 +- `McpStdioServerSpec` の `Debug` は custom redacted 実装にし、resolved env/secret-derived values を出さない regression test を追加しました。 +- ToolRegistry / tools/resources/prompts registration、remote MCP / Streamable HTTP / OAuth は実装していません。 + +主な commit: +- `a114fa9d mcp: implement stdio lifecycle client` +- `f396e1a2 mcp: redact stdio server spec debug` +- `9cf5344f merge: mcp stdio lifecycle client` + +Review: +- r1 は resolved spec `Debug` による env/secret leak で `request_changes`。 +- Coder が custom redacted `Debug` と regression test を追加。 +- r2 は `approve`。 + +最終 validation: +- `cargo fmt --check` +- `git diff --check HEAD^1..HEAD` +- `cargo test -p mcp` +- `cargo check` +- `cargo tree -p mcp --depth 1` +- `nix build .#yoi --no-link` + +Package impact: +- `nix path-info -S .#yoi`: `112615056` \ No newline at end of file diff --git a/.yoi/tickets/00001KVHR3WRY/thread.md b/.yoi/tickets/00001KVHR3WRY/thread.md index 110315f2..efd125ea 100644 --- a/.yoi/tickets/00001KVHR3WRY/thread.md +++ b/.yoi/tickets/00001KVHR3WRY/thread.md @@ -345,3 +345,56 @@ Final state: Implementation was merged into Orchestrator branch at `9cf5344f`, r2 review approved, and final Orchestrator validation passed: `cargo fmt --check`, `git diff --check HEAD^1..HEAD`, `cargo test -p mcp`, `cargo check`, `cargo tree -p mcp --depth 1`, and `nix build .#yoi --no-link`. --- + + + +## State changed + +Ticket を closed にしました。 + + +--- + + + +## 完了 + +## Resolution + +`00001KVHR3WRY` を完了しました。 + +実装内容: +- New internal crate `mcp` を追加しました。 +- Explicit MCP stdio server config から resolved stdio server spec を作成する bridge を追加しました。 +- Tokio child process による local stdio MCP server lifecycle foundation を実装しました。 +- stdin/stdout/stderr handling、newline-delimited JSON-RPC request/response handling、initialize/capability negotiation、`notifications/initialized` を実装しました。 +- stdout/stderr/protocol payloads は bounded に扱います。 +- stderr は bounded diagnostics/logging として扱い、protocol failure とは別扱いです。 +- server name / phase-aware errors を追加しました。 +- shutdown は stdin close / wait / terminate / kill fallback で deterministic に行います。 +- Server-to-client requests は fail-closed し、sampling/elicitation は advertise せず、unknown request は JSON-RPC error で返します。 +- `McpStdioServerSpec` の `Debug` は custom redacted 実装にし、resolved env/secret-derived values を出さない regression test を追加しました。 +- ToolRegistry / tools/resources/prompts registration、remote MCP / Streamable HTTP / OAuth は実装していません。 + +主な commit: +- `a114fa9d mcp: implement stdio lifecycle client` +- `f396e1a2 mcp: redact stdio server spec debug` +- `9cf5344f merge: mcp stdio lifecycle client` + +Review: +- r1 は resolved spec `Debug` による env/secret leak で `request_changes`。 +- Coder が custom redacted `Debug` と regression test を追加。 +- r2 は `approve`。 + +最終 validation: +- `cargo fmt --check` +- `git diff --check HEAD^1..HEAD` +- `cargo test -p mcp` +- `cargo check` +- `cargo tree -p mcp --depth 1` +- `nix build .#yoi --no-link` + +Package impact: +- `nix path-info -S .#yoi`: `112615056` + +---