diff --git a/hive-ag3nt/prompts/system.md b/hive-ag3nt/prompts/system.md index f201722f..d60084bd 100644 --- a/hive-ag3nt/prompts/system.md +++ b/hive-ag3nt/prompts/system.md @@ -39,7 +39,7 @@ Tools (hyperhive surface): - `mcp__hyperhive__remind(message, delay_seconds? | at_unix_timestamp?, file_path?)` — schedule a message to land in your *own* inbox at a future time (sender shows as `reminder`). Set exactly one of `delay_seconds` (relative) or `at_unix_timestamp` (absolute). Use for self-paced follow-ups instead of blocking a whole turn on a long `recv` wait. A large `message` auto-spills to a file under `/agents/{label}/state/reminders/`; pass `file_path` to point at one yourself. Each agent's pending-reminder count is capped (default 50) — the tool will error if the cap is already reached. - `mcp__hyperhive__set_status(text)` — set a free-text status visible on the operator dashboard. **Call this at the start of every task** to say what you're working on (e.g. `"processing matrix messages"`, `"fixing #319 model priority"`, `"idle"`). Single line, ≤200 chars — the dashboard renders this as a short chip, so longer multi-line text is rejected. Pass an empty string to clear. Persists across harness restarts. -- `mcp__hyperhive__get_agent_meta(name?)` — fetch identity + status metadata for an agent: canonical `name`, `role` (`agent` / `root`), current `hyperhive_rev`, plus self-reported `status` text (set via `set_status`) and how long ago it was set. Also returns the hive + swarm display names (`hive_name`, `swarm_name`) when the operator has configured `services.hyperhive.{hiveName, swarmName}`; both lines omitted when unset. Pass `name` to query a peer (e.g. check whether iris is idle before pinging them). Omit `name` to get your own trustworthy identity stamp — useful for state files, commit messages, cross-agent attribution that won't drift across renames or session-continue boundaries where the system-prompt label could be stale. +- `mcp__hyperhive__get_agent_meta(name?)` — fetch identity + status metadata for an agent: canonical `name`, `role` (`agent` / `manager`), current `hyperhive_rev`, plus self-reported `status` text (set via `set_status`) and how long ago it was set. Also returns the hive + swarm display names (`hive_name`, `swarm_name`) when the operator has configured `services.hyperhive.{hiveName, swarmName}`; both lines omitted when unset. Pass `name` to query a peer (e.g. check whether iris is idle before pinging them). Omit `name` to get your own trustworthy identity stamp — useful for state files, commit messages, cross-agent attribution that won't drift across renames or session-continue boundaries where the system-prompt label could be stale. - `mcp__hyperhive__request_next_turn()` — ask the harness to start another turn immediately after this one ends, even if the inbox is empty. Use for multi-turn tasks (long builds, sequential steps) where you want to continue without waiting for an external message. The next turn starts with `from: "self"` and `body: "continue"`. No-op if new inbox messages arrive before this turn ends (the harness already loops immediately on pending messages). No args. diff --git a/hive-c0re/src/dashboard.rs b/hive-c0re/src/dashboard.rs index de780ea1..1dc0d30a 100644 --- a/hive-c0re/src/dashboard.rs +++ b/hive-c0re/src/dashboard.rs @@ -1157,9 +1157,8 @@ async fn get_journal( ]) .arg(lines.to_string()); if let Some(u) = q.unit.as_deref().filter(|s| !s.is_empty()) { - // accept hive-ag3nt[.service] / hive-m1nd[.service] — anything - // else we refuse, again to keep the shell-out tight. - let allowed = ["hive-ag3nt.service", "hive-m1nd.service"]; + // accept hive-ag3nt[.service] — anything else refused. + let allowed = ["hive-ag3nt.service"]; let unit = if u.ends_with(".service") { u.to_owned() } else { diff --git a/hive-c0re/src/manager_server.rs b/hive-c0re/src/manager_server.rs index 18d84a74..29513241 100644 --- a/hive-c0re/src/manager_server.rs +++ b/hive-c0re/src/manager_server.rs @@ -539,7 +539,7 @@ async fn dispatch(req: &ManagerRequest, coord: &Arc) -> ManagerResp let (status_text, status_set_at, running) = crate::container_view::read_agent_status_live(target).await; let role = if target == MANAGER_AGENT { - "root" + "manager" } else { "agent" } diff --git a/hive-c0re/src/meta.rs b/hive-c0re/src/meta.rs index d9eb797f..6a8d137a 100644 --- a/hive-c0re/src/meta.rs +++ b/hive-c0re/src/meta.rs @@ -451,7 +451,7 @@ where then hyperhive.nixosConfigurations.root else hyperhive.nixosConfigurations.agent-base; input = inputs."agent-${name}"; - service = if isManager then "hive-root" else "hive-ag3nt"; + service = "hive-ag3nt"; parentEnv = if parent == null then {} else { HIVE_PARENT = parent; }; toolGroupsEnv = if toolGroups == null then {} else { HIVE_TOOL_GROUPS = toolGroups; }; in diff --git a/nix/templates/harness-base.nix b/nix/templates/harness-base.nix index 81d00365..9deb2c3e 100644 --- a/nix/templates/harness-base.nix +++ b/nix/templates/harness-base.nix @@ -110,8 +110,8 @@ in example = "manager"; description = '' Whether this container runs as a sub-agent (`"agent"`, the - default — invokes `hive-ag3nt serve`) or as the swarm's - manager (`"manager"` — invokes `hive-root serve` and + default) or as the swarm's manager (`"manager"` — both invoke + `hive serve`; defaults the forge notification surface to mentions-only). meta.rs flips this to `"manager"` for the manager container @@ -690,7 +690,7 @@ in } ]; - # Per-agent unix user. Runs the hive-ag3nt / hive-root harness + + # Per-agent unix user. Runs the hive harness + # co-process daemons under a non-root principal. UID auto-assigned by # NixOS. The container activation script (hive-agent-user-migrate) # chowns the bind-mounted state dir — including credential files @@ -1277,14 +1277,12 @@ in ]; }; - # Role-driven harness systemd unit: one binary, two unit names - # for log/ExecStartPre stability. Unit shape (PATH wrapper-dir - # trick, env vars, RuntimeDirectory, User=, standalone-eval - # fallbacks): docs/agent-hierarchy.md::Harness systemd unit - # shape (per-role). PATH /bin auto-append behaviour: - # docs/gotchas.md::systemd.services.*.path appends /bin to - # every entry. - systemd.services.${if config.hyperhive.role == "manager" then "hive-root" else "hive-ag3nt"} = + # Harness systemd unit. Unit shape (PATH wrapper-dir trick, env vars, + # RuntimeDirectory, User=, standalone-eval fallbacks): + # docs/agent-hierarchy.md::Harness systemd unit shape. PATH /bin + # auto-append behaviour: docs/gotchas.md::systemd.services.*.path + # appends /bin to every entry. + systemd.services.hive-ag3nt = let isManager = config.hyperhive.role == "manager"; binary = "hive"; diff --git a/nix/templates/manager.nix b/nix/templates/manager.nix index c1f9ff2c..20edbd10 100644 --- a/nix/templates/manager.nix +++ b/nix/templates/manager.nix @@ -2,7 +2,7 @@ { imports = [ ./harness-base.nix ]; - # Manager role: the role-driven `systemd.services.hive-root` plus + # Manager role: the `systemd.services.hive-ag3nt` unit plus # the manager-only forge defaults (`keepSubscriptions = false`, # `skipNotifyReasons = [ "subscribed" "participating" ]`) live in # `harness-base.nix` under `lib.mkIf (config.hyperhive.role ==