claw-code-parity/rust/crates/runtime/src
Yeachan-Heo 87b232fa0d Add MCP server orchestration so configured stdio tools can be discovered and called
The runtime crate already had typed MCP config parsing, bootstrap metadata,
and stdio JSON-RPC transport primitives, but it lacked the stateful layer
that owns configured subprocesses and routes discovered tools back to the
right server. This change adds a thin lazy McpServerManager in mcp_stdio,
keeps unsupported transports explicit, and locks the behavior with
subprocess-backed discovery, routing, reuse, shutdown, and error tests.

Constraint: Keep the change narrow to the runtime crate and stdio transport only
Constraint: Reuse existing MCP config/bootstrap/process helpers instead of adding new dependencies
Rejected: Eagerly spawn all configured servers at construction | unnecessary startup cost and failure coupling
Rejected: Spawn a fresh process per request | defeats lifecycle management and tool routing cache
Confidence: high
Scope-risk: moderate
Reversibility: clean
Directive: Keep higher-level runtime/session integration separate until a caller needs this manager surface
Tested: cargo fmt --all; cargo clippy -p runtime --all-targets -- -D warnings; cargo test -p runtime
Not-tested: Integration into conversation/runtime flows outside direct manager APIs
2026-03-31 23:31:37 +00:00
..
bash.rs feat: Rust port of Claw Code CLI 2026-03-31 17:43:09 +00:00
bootstrap.rs feat: Rust port of Claw Code CLI 2026-03-31 17:43:09 +00:00
compact.rs Preserve actionable state in compacted Rust sessions 2026-03-31 19:34:56 +00:00
config.rs Unblock typed runtime integration config primitives 2026-03-31 19:17:16 +00:00
conversation.rs feat: merge 2nd round from all rcc/* sessions 2026-03-31 17:43:25 +00:00
file_ops.rs Close the Claw Code tools parity gap 2026-03-31 22:53:20 +00:00
json.rs feat: Rust port of Claw Code CLI 2026-03-31 17:43:09 +00:00
lib.rs Add MCP server orchestration so configured stdio tools can be discovered and called 2026-03-31 23:31:37 +00:00
mcp.rs Add MCP normalization and config identity helpers 2026-03-31 20:23:00 +00:00
mcp_client.rs Add first MCP client transport scaffolding 2026-03-31 20:42:49 +00:00
mcp_stdio.rs Add MCP server orchestration so configured stdio tools can be discovered and called 2026-03-31 23:31:37 +00:00
oauth.rs Add reusable OAuth and auth-source foundations 2026-03-31 19:47:02 +00:00
permissions.rs feat: Rust port of Claw Code CLI 2026-03-31 17:43:09 +00:00
prompt.rs Keep project instructions informative without flooding the prompt 2026-03-31 19:32:42 +00:00
remote.rs Add fail-open remote proxy runtime primitives 2026-03-31 19:54:38 +00:00
session.rs feat: merge 2nd round from all rcc/* sessions 2026-03-31 17:43:25 +00:00
sse.rs feat: Rust port of Claw Code CLI 2026-03-31 17:43:09 +00:00
usage.rs Make Rust cost reporting aware of the active model 2026-03-31 19:42:31 +00:00