claude: pipe prompt via stdin (variadic --allowedTools was eating it); + ManagerRequest::Status

This commit is contained in:
müde 2026-05-15 15:06:09 +02:00
parent 9eab28a716
commit accb1445e3
5 changed files with 34 additions and 10 deletions

View file

@ -1,16 +1,20 @@
//! Embedded MCP server. Claude Code (running inside the agent container)
//! launches this as a stdio child via `--mcp-config`; tool calls land here
//! and are translated to `AgentRequest::Send`/`Recv` against hyperhive's
//! own per-agent unix socket at `/run/hive/mcp.sock`.
//! and are translated to `AgentRequest::*` / `ManagerRequest::*` against
//! hyperhive's own per-container unix socket at `/run/hive/mcp.sock`.
//!
//! Two protocols, two surfaces:
//! - **hyperhive socket** at `/run/hive/mcp.sock` — JSON-line, our
//! broker-routed Send/Recv. Unaffected by this module.
//! broker-routed protocol. Unaffected by this module.
//! - **MCP stdio** owned by this module — what claude actually speaks.
//!
//! The agent surface today is intentionally tiny (send/recv); the manager
//! surface (Phase 8 follow-up) will add `request_spawn`, `request_kill`,
//! `request_apply_commit`.
//! Two server flavors:
//! - `AgentServer` — sub-agent tools (`send`, `recv`).
//! - `ManagerServer` — agent tools + lifecycle (`request_spawn`, `kill`,
//! `request_apply_commit`).
//!
//! Both go through the same `run_tool_envelope` helper so logging + status
//! line stay uniform.
use std::path::PathBuf;