docs: sync to current state of the world

claude.md scratchpad rewritten — folds in pronouns option,
extra MCP servers + flakeInputs forwarding, ask_operator
on sub-agents, dashboard compose box with @-mentions, new-
session button, cwd=/state for claude turns, meta-mutex +
stale-lock cleanup.

readme picks up the operator pronouns option example,
the dashboard compose box description, the new slash
commands list, the deployed-sha chip, the per-agent UI
gains new-session.

docs/web-ui.md gains:
- a fuller MESS4GE FL0W description that calls out the
  compose box, sticky @-mention recipient, /op-send, and
  the manager-name swap
- /op-send in the dashboard endpoint table
- new-session button + /new-session slash command in the
  per-agent surface
- compact endpoint now notes 'same session shape as a normal
  turn'

docs/turn-loop.md:
- new-session one-shot, cwd=/state with CLAUDE.md auto-load
  walking upward, operator-pronouns substitution
- sub-agent tool list grows ask_operator
- new 'Extra MCP servers (per-agent)' section documenting
  hyperhive.extraMcpServers + the flakeInputs forwarding
  pattern
This commit is contained in:
müde 2026-05-16 02:49:48 +02:00
parent 2d277038a7
commit 1278f880da
4 changed files with 137 additions and 37 deletions

View file

@ -123,31 +123,53 @@ In-flight or recent context that hasn't earned a section yet.
Prune freely.
- **Just landed:** meta-flake overhaul. Each agent's applied
repo is a tiny module-only flake (`nixosModules.default =
import ./agent.nix`); `agent.nix` is a plain NixOS module
function — no extendModules, no hyperhive input visible to
the manager. A single hive-c0re-owned repo at
`/var/lib/hyperhive/meta/` declares one input per agent
(pointing at that agent's applied repo via `git+file://`)
and one `nixosConfigurations.<n>` output per agent,
wrapping `inputs.agent-<n>.nixosModules.default` with the
identity + `HIVE_PORT` / `HIVE_LABEL` /
`HIVE_DASHBOARD_PORT` injection. Containers run against
`meta#<n>`. Every approve runs `nix flake lock
--update-input agent-<n>` (two-phase: prepare on the
build path, finalize/abort on the result) — meta's git
log is the system-wide deploy audit trail; failures and
denials live as annotated tags in applied. The manager
has `/applied` and `/meta` RO-bound and the `applied`
remote pre-wired in every proposed repo so `git fetch
applied`, `git show applied/refs/tags/deployed/<id>`,
`git -C /meta log --oneline`, `cat /meta/flake.lock`
all just work. Migration runs idempotently on
hive-c0re startup (`HIVE_SKIP_META_MIGRATION=1` skips it):
rewrites pre-meta applied flakes to module-only, wires
the proposed remote, seeds meta, and repoints every
container at `meta#<n>` (guarded by a marker so the
expensive phase only runs once).
repo is a module-only flake (forwards every `inputs.*`
through to `agent.nix` as the `flakeInputs` module arg —
manager edits `inputs` to pull in external flakes like an
MCP server's own flake; the new sha lands in the agent's
own `flake.lock` and rolls up to meta's). A single
hive-c0re-owned repo at `/var/lib/hyperhive/meta/`
declares one input per agent and one
`nixosConfigurations.<n>` output, wrapping the agent's
`nixosModules.default` with identity + `HIVE_PORT` /
`HIVE_LABEL` / `HIVE_DASHBOARD_PORT` /
`HIVE_OPERATOR_PRONOUNS`. Containers run against
`meta#<n>`. Every approve uses two-phase staging
(prepare → build → finalize/abort) so meta's git log only
records successful deploys; failures + denials live as
annotated tags in applied. All meta operations
serialize behind a tokio mutex; stale `.git/index.lock`
is cleared on hive-c0re startup. Manager has `/applied`
+ `/meta` RO-bound + the `applied` remote pre-wired in
every proposed repo. Migration runs idempotently on
startup (`HIVE_SKIP_META_MIGRATION=1` skips). Operator
pronouns are a NixOS module option
(`services.hive-c0re.operatorPronouns`, default
`"she/her"`); the harness substitutes them into the
system prompt at boot.
- **Just landed:** per-agent extra MCP servers via the
`hyperhive.extraMcpServers.<key>` NixOS option in
`agent.nix`. Declares `{ command, args, env,
allowedTools }`; the module writes the whole map to
`/etc/hyperhive/extra-mcp.json`; the harness reads that
file and merges each entry into both `--mcp-config`
and `--allowedTools` (mapped to `mcp__<key>__<pattern>`).
Unblocks matrix / bitburner / any agent with rich
domain tooling — the agent flake's `inputs` block pulls
the external flake, `agent.nix` references it via
`flakeInputs.<name>.packages.${pkgs.system}.default`.
- **Just landed:** `mcp__hyperhive__ask_operator` is now on
the sub-agent surface too (not just the manager). Answer
routes back to whichever agent asked via
`coord.notify_agent`; the dashboard already shows the
asker on each question row.
- **Just landed:** dashboard now has a terminal-style
compose textbox under the message-flow stream — `@name`
picks the recipient (sticky in localStorage, auto-
completed from `containers[]`), POSTs `/op-send`. New
per-agent `↻ new session` button drops `--continue` for
one turn. Claude spawns with `cwd = /state` so relative
paths in tool calls land in the durable dir.
- **Just landed (prior overhaul still underneath):** tag-
driven config-apply. Two-repo split (proposed = manager
RW, applied = core-only); `request_apply_commit` fetches