mirror of
https://github.com/lWolvesl/claw-code.git
synced 2026-04-02 21:21:53 +08:00
Add a minimal runtime stdio MCP launcher that spawns configured server processes with piped stdin/stdout, applies transport env, and exposes async write/read/terminate/wait helpers for future JSON-RPC integration. The wrapper stays intentionally small: it does not yet implement protocol framing or connection lifecycle management, but it is real process orchestration rather than placeholder scaffolding. Tests use a temporary executable script to prove env propagation and bidirectional stdio round-tripping. Constraint: Keep the slice minimal and testable while using the real tokio process surface Constraint: Runtime verification must pass cleanly under fmt, clippy, and tests Rejected: Add full JSON-RPC framing and session orchestration in the same commit | too much scope for a clean launcher slice Rejected: Fake the process wrapper behind mocks only | would not validate spawning, env injection, or stdio wiring Confidence: high Scope-risk: narrow Reversibility: clean Directive: Layer future MCP protocol framing on top of McpStdioProcess rather than bypassing it with ad hoc process management Tested: cargo fmt --all; cargo clippy -p runtime --all-targets -- -D warnings; cargo test -p runtime Not-tested: live third-party MCP servers; long-running process supervision; stderr capture policy
19 lines
392 B
TOML
19 lines
392 B
TOML
[package]
|
|
name = "runtime"
|
|
version.workspace = true
|
|
edition.workspace = true
|
|
license.workspace = true
|
|
publish.workspace = true
|
|
|
|
[dependencies]
|
|
sha2 = "0.10"
|
|
glob = "0.3"
|
|
regex = "1"
|
|
serde = { version = "1", features = ["derive"] }
|
|
serde_json = "1"
|
|
tokio = { version = "1", features = ["io-util", "macros", "process", "rt", "rt-multi-thread", "time"] }
|
|
walkdir = "2"
|
|
|
|
[lints]
|
|
workspace = true
|