drop debug-only cli subcommands from hive-ag3nt + hive-m1nd

drop the one-shot send/recv/kill/start/restart/request-spawn/request-
apply-commit subcommands from both in-container binaries. they were
debug-only — the host admin socket (`hive-c0re ...`) exposes the
same verbs and the manager mcp surface covers the rest from inside
claude. now each binary's --help shows just `serve` and `mcp`,
which are the only commands either is meant to be started with.

removes the `one_shot` helper and the `render` / `check` glue.
This commit is contained in:
müde 2026-05-15 19:34:58 +02:00
parent 08f2ec5232
commit 0cc25d33d8
3 changed files with 6 additions and 77 deletions

View file

@ -2,7 +2,7 @@ use std::path::{Path, PathBuf};
use std::sync::{Arc, Mutex};
use std::time::Duration;
use anyhow::{Result, bail};
use anyhow::Result;
use clap::{Parser, Subcommand};
use hive_ag3nt::events::{Bus, LiveEvent};
use hive_ag3nt::login::{self, LoginState};
@ -29,10 +29,6 @@ enum Cmd {
#[arg(long, default_value_t = 1000)]
poll_ms: u64,
},
/// Send a message to another agent.
Send { to: String, body: String },
/// Pop one message from the inbox.
Recv,
/// Run the agent's MCP server on stdio. Spawned by `claude` via
/// `--mcp-config`; tools dispatch through `/run/hive/mcp.sock` back into
/// the hyperhive broker.
@ -103,17 +99,6 @@ async fn main() -> Result<()> {
}
}
}
Cmd::Send { to, body } => {
let resp: AgentResponse =
client::request(&cli.socket, &AgentRequest::Send { to, body }).await?;
render(&resp)?;
check(&resp)
}
Cmd::Recv => {
let resp: AgentResponse = client::request(&cli.socket, &AgentRequest::Recv).await?;
render(&resp)?;
check(&resp)
}
Cmd::Mcp => mcp::serve_agent_stdio(cli.socket).await,
}
}
@ -192,14 +177,3 @@ async fn inbox_unread(socket: &Path) -> u64 {
}
}
fn render(resp: &AgentResponse) -> Result<()> {
println!("{}", serde_json::to_string_pretty(resp)?);
Ok(())
}
fn check(resp: &AgentResponse) -> Result<()> {
if let AgentResponse::Err { message } = resp {
bail!("{message}");
}
Ok(())
}