Watch
0
0
Fork
You've already forked hyperhive
0

ruth is created from a ruth archetype that runs sonnet

This commit is contained in:
atlas 2026-11-11 01:54:01 +01:00
commit 5233259b3b
2 changed files with 236 additions and 115 deletions

View file

@ -239,7 +239,7 @@ an agent, after its current turn, when its `manage_root_agent` changes.
No agent holds the permission by default: an agent whose record leaves
`permissions` unset gets the default, which doesn't include
`manage_root_agent`, whatever the agent's name. The swarm UI's setup
assistant creates ruth with it. For a ruth that predates that, whose
assistant creates ruth from the `ruth` archetype, which grants it. For a ruth that predates that, whose
permissions were unset, swarm-controller writes the default plus
`manage_root_agent` into her key once at start, so she keeps her mounts;
it never touches a key that's already set.
@ -268,20 +268,23 @@ agent keeps its session; sub-agents stay logged in.
The root agent container runs through the **same lifecycle as
sub-agents**. Nothing creates it at hive boot: you create ruth from the
swarm dashboard like any agent, and an existing ruth container starts with
the hive like every other. The root agent can clone
`agent-configs/ruth` to read its own `agent.nix` and open a config PR there
for operator review, same as any other agent.
the hive like every other. The setup assistant creates her from the
[`ruth` archetype](../swarm/archetypes.md#the-built-in-archetypes), so a new
ruth runs `sonnet`, has no config repo and builds from the archetype's module.
A ruth with a config repo (one created before the archetype, or one you turned into custom)
can clone `agent-configs/ruth` to read her own `agent.nix` and open a config PR
there for operator review, same as any other agent.
Differences from sub-agents:
- Reference docs: her `agent.nix` turns on `services.hyperhive.agent.docs.enable`.
Her container builds from `agent-base` like every agent, and the seeded
`agent.nix` is the same for every name, so a newly created ruth has no docs
until a config PR adds that line.
- Reference docs: the `agent.nix` of a ruth with a config repo turns on `services.hyperhive.agent.docs.enable`.
Her container builds from `agent-base` like every agent. A ruth created from
the archetype has no docs until you turn her into custom and a config PR
adds that line.
- Web UI port via `lifecycle::agent_web_port("ruth")` — same
FNV-1a hash as every other agent (8100..8999 range).
- The root agent holds `manage_root_agent` (the swarm UI's setup
assistant creates her with it), for which `set_nspawn_flags` adds extra
- The root agent holds `manage_root_agent` (the `ruth` archetype, which the swarm UI's
setup assistant creates her from, grants it), for which `set_nspawn_flags` adds extra
binds: every agent's `state` dir (RW) under `/agents/<n>/state`, and the
hive's plain state under `/meta` (RO).
- Its socket comes from the generic per-agent registration, in the same

View file

@ -94,7 +94,10 @@ state dirs work as for every other agent.
key, and nixos-container name are all `ruth` (container `h-ruth`).
Like every agent it comes from the swarm dashboard or
`swarmctl agent create`; `hive-c0re` creates nothing at boot.
Roster-wise, `ruth` is just another entry.
Roster-wise, `ruth` is just another entry. The setup assistant creates
her from the [`ruth` archetype](../../2-handbook/swarm/archetypes.md#the-built-in-archetypes):
model `sonnet`, plus `manage_root_agent`, `logs` and `metrics` on top of
the default permissions.
- **Wire-protocol** — `hive-core-agent-sock`'s unified `Request` enum
is the same on both socket flavours. Container lifecycle
ops (kill/start/restart/rebuild) go through the separate host-admin
@ -103,8 +106,8 @@ state dirs work as for every other agent.
both flavours; matrix, bash and forge don't call it — their
notifications push a todo on the harness's in-agent socket (see
[`docs/4-implementation/turn-loop/mcp.md`](../turn-loop/mcp.md#waking-the-agent-from-inside-the-container)).
- **Storage/mounts** — the `manage_root_agent` permission, which the swarm
UI's setup assistant creates ruth with, gets a container
- **Storage/mounts** — the `manage_root_agent` permission, which the
[`ruth` archetype](../../2-handbook/swarm/archetypes.md#the-built-in-archetypes) grants, gets a container
each other agent's `state` dir bind-mounted RW at
`/agents/<name>/state` (so it can manage any agent's state dir; config
isn't mounted, since a real config change is a PR from a clone), plus an RO mount for