refactor(#2112): remove the dead stdio transport from hive-agent-mcp
This commit is contained in:
parent
1ba44b77ac
commit
4745274fca
3 changed files with 19 additions and 39 deletions
|
|
@ -1,9 +1,9 @@
|
|||
//! MCP-server binary. Default is stdio — spawned by `claude` via
|
||||
//! `--mcp-config`; tools dispatch through `/run/hive/mcp.sock` back into
|
||||
//! the hyperhive broker. Pass `--http <addr>` to instead run a long-lived
|
||||
//! streamable-http listener (persistent daemon, the `hive-mcp-http`
|
||||
//! systemd unit) that claude reconnects to each turn, avoiding the
|
||||
//! per-turn stdio re-registration race. Sibling of `hive-agent` (the
|
||||
//! MCP-server binary for the built-in hyperhive surface. Runs a long-lived
|
||||
//! streamable-http listener (the `hive-mcp-http` systemd unit) on `--http
|
||||
//! <addr>`; tools dispatch through `/run/hive/mcp.sock` back into the
|
||||
//! hyperhive broker. claude reconnects to the stable URL each turn via
|
||||
//! `--mcp-config`, avoiding the per-turn re-registration race. HTTP is the
|
||||
//! sole transport — there is no stdio mode. Sibling of `hive-agent` (the
|
||||
//! serve loop that renders the `--mcp-config` blob pointing here) and
|
||||
//! `hive-agent-wake`.
|
||||
|
||||
|
|
@ -20,10 +20,10 @@ struct Cli {
|
|||
#[arg(long, default_value = DEFAULT_SOCKET)]
|
||||
socket: PathBuf,
|
||||
|
||||
/// Serve over streamable-http on this address (e.g.
|
||||
/// `127.0.0.1:8790`) instead of stdio. Bind loopback only.
|
||||
/// Serve streamable-http on this address (e.g. `127.0.0.1:8790`).
|
||||
/// Bind loopback only.
|
||||
#[arg(long)]
|
||||
http: Option<std::net::SocketAddr>,
|
||||
http: std::net::SocketAddr,
|
||||
}
|
||||
|
||||
#[tokio::main]
|
||||
|
|
@ -36,8 +36,5 @@ async fn main() -> Result<()> {
|
|||
.init();
|
||||
|
||||
let cli = Cli::parse();
|
||||
match cli.http {
|
||||
Some(addr) => mcp::serve_http(cli.socket, addr).await,
|
||||
None => mcp::serve_agent_stdio(cli.socket).await,
|
||||
}
|
||||
mcp::serve_http(cli.socket, cli.http).await
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue