rename: role badge stays 'manager'; unify harness unit name to hive-ag3nt
This commit is contained in:
parent
77622c0585
commit
e7e0675d22
6 changed files with 15 additions and 18 deletions
|
|
@ -39,7 +39,7 @@ Tools (hyperhive surface):
|
|||
<!-- /role:manager -->
|
||||
- `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.
|
||||
<!-- role:agent -->
|
||||
- `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.
|
||||
|
||||
|
|
|
|||
|
|
@ -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 {
|
||||
|
|
|
|||
|
|
@ -539,7 +539,7 @@ async fn dispatch(req: &ManagerRequest, coord: &Arc<Coordinator>) -> 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"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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";
|
||||
|
|
|
|||
|
|
@ -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 ==
|
||||
|
|
|
|||
Loading…
Reference in a new issue