diff --git a/CLAUDE.md b/CLAUDE.md index c60a7263..0ef3540b 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -183,14 +183,6 @@ read them à la carte. In-flight or recent context that hasn't earned a section yet. Prune freely. -- **Just landed:** `get_logs` now resolves the machine name. - `journalctl -M` wants the *machine* name (`h-gui`), not the - logical agent name (`gui`) — `get_logs` was the one manager - verb that passed the name straight through instead of mapping - it via `lifecycle::container_name()` like Kill/Start/Restart/ - Update do. Now consistent: pass the plain agent name, hive-c0re - resolves `h-` (manager stays `hm1nd`). Tool description + - `GetLogs` wire doc updated. - **Just landed:** applied config repos mirrored to the forge. New private `agent-configs` Forgejo org (renamed from the unused `agents` org in `SEEDED_ORGS`); core is the diff --git a/hive-ag3nt/src/mcp.rs b/hive-ag3nt/src/mcp.rs index 241db140..568170f8 100644 --- a/hive-ag3nt/src/mcp.rs +++ b/hive-ag3nt/src/mcp.rs @@ -750,9 +750,7 @@ pub struct RequestApplyCommitArgs { #[derive(Debug, serde::Deserialize, schemars::JsonSchema)] pub struct GetLogsArgs { - /// Logical agent name to fetch logs for (e.g. `gui`, `hm1nd`). - /// hive-c0re maps it to the underlying machine name (`h-gui`) - /// itself — pass the plain agent name, not the `h-` form. + /// Logical name of the sub-agent container to fetch logs for. pub agent: String, /// How many journal lines to return (default: 50, max: 500). #[serde(default)] @@ -1130,9 +1128,8 @@ impl ManagerServer { #[tool( description = "Fetch recent journal log lines for a sub-agent container. Useful \ for diagnosing MCP server registration failures, startup crashes, plugin install \ - errors, or any harness issue you can't see from inside the container. Pass the \ - plain logical agent name (e.g. `gui`) — hive-c0re resolves the machine name. \ - `lines` defaults to 50 (max capped at 500 on the host side)." + errors, or any harness issue you can't see from inside the container. `lines` \ + defaults to 50 (max capped at 500 on the host side)." )] async fn get_logs(&self, Parameters(args): Parameters) -> String { let log = format!("{args:?}"); diff --git a/hive-c0re/src/manager_server.rs b/hive-c0re/src/manager_server.rs index 4a618eac..81099cdf 100644 --- a/hive-c0re/src/manager_server.rs +++ b/hive-c0re/src/manager_server.rs @@ -286,23 +286,11 @@ async fn dispatch(req: &ManagerRequest, coord: &Arc) -> ManagerResp } ManagerRequest::GetLogs { agent, lines } => { let n = lines.unwrap_or(50); - // `journalctl -M` wants the *machine* name, not the - // logical agent name: `gui` → `h-gui`. `container_name` - // does that and passes `hm1nd` through unprefixed — but - // it doesn't know the broker-logical manager name - // `"manager"` (it'd wrongly produce `h-manager`), so - // handle that alias explicitly. Either manager spelling - // resolves to the unprefixed `hm1nd` machine. - let machine = if agent == MANAGER_AGENT { - crate::lifecycle::MANAGER_NAME.to_owned() - } else { - crate::lifecycle::container_name(agent) - }; - tracing::info!(%agent, %machine, %n, "manager: get_logs"); + tracing::info!(%agent, %n, "manager: get_logs"); match tokio::process::Command::new("journalctl") .args([ "-M", - &machine, + agent, "-n", &n.to_string(), "--no-pager", diff --git a/hive-sh4re/src/lib.rs b/hive-sh4re/src/lib.rs index 95e798e8..435b62d7 100644 --- a/hive-sh4re/src/lib.rs +++ b/hive-sh4re/src/lib.rs @@ -697,12 +697,10 @@ pub enum ManagerRequest { /// `HelperEvent::QuestionAsked` (i.e. an agent asked the manager /// for input). Mirror of `AgentRequest::Answer`. Answer { id: i64, answer: String }, - /// Fetch recent journal lines for a sub-agent container. `agent` - /// is the logical agent name; hive-c0re resolves it to the - /// machine name (`gui` → `h-gui`) and runs `journalctl -M - /// -n --no-pager`, returning the output as a - /// string. Useful for diagnosing MCP registration failures, - /// startup crashes, and harness errors. + /// Fetch recent journal lines for a sub-agent container. hive-c0re + /// runs `journalctl -M -n --no-pager` and returns + /// the output as a string. Useful for diagnosing MCP registration + /// failures, startup crashes, and harness errors. /// /// `lines` defaults to 50 when omitted. GetLogs {