Commit graph hyperhive/docs/turn-loop.md
Author SHA1 Message Date
damocles
78396c8189 recv: cap batch size at 5, default stays 1 (#2150 clarified) 2026-07-03 18:50:21 +02:00
damocles
ee45db6323 Revert "recv mcp tool: default max to a small batch of 5 (wire default stays 1)"
This reverts commit b8d608d4b6a7ed95faffdec8d8b3167ae8f3b39e.
2026-07-03 18:50:21 +02:00
damocles
d46d3c261b recv mcp tool: default max to a small batch of 5 (wire default stays 1) 2026-07-03 18:50:21 +02:00
iris
9727cee9bd docs: add infra_admin capability to tables; fix get_agent_meta matrix_accounts in turn-loop 2026-07-02 15:29:14 +02:00
iris
0de8c37233 docs(turn-loop): document ack_until tool + [msg #id] markers in recv/wake prompt
ack_until was added to the messaging group by the ack_until feature
but was missing from the turn-loop.md MCP surface documentation
entirely. Add it to:

- Messaging group signature list
- recv bullet: mention that each row is prefixed with [msg #<id>]
  so agents know what id to pass to ack_until
- New ack_until bullet explaining recipient-scoped bulk-triage use case
- Wake prompt section: mention the [msg #<id>] prefix and its purpose
2026-07-02 15:28:25 +02:00
iris
64d60e5cdb docs(turn-loop): mention kill in bash allowed-tools note
The allowed-tools note only named run/status; kill is also always
available since the bash MCP server uses allowedTools = ["*"].
Reword to name all three and explain the wildcard mechanism.
2026-07-02 14:15:49 +02:00
iris
9162ce7dc7 docs(turn-loop): document active bash tasks in get_loose_ends output
feat 3c853c2b58 added active bash tasks
to the get_loose_ends response but only updated the MCP server tool
description string; the docs/turn-loop.md entry for the tool still only
mentioned questions and reminders.

Add 'active local tasks published by external MCP daemons (e.g. running
bash tasks from hive-bash-mcp)' to the tool description so agents
reading the reference docs see the full picture.
2026-07-02 14:15:49 +02:00
iris
2f504247ed docs(turn-loop): document optional HTTP MCP transport (httpPort)
When hyperhive.mcp.httpPort is set in agent.nix, the hive-mcp-http
systemd daemon runs the embedded MCP server as a persistent streamable-
HTTP service; claude-mcp-config.json points at the HTTP URL instead of
spawning a stdio child per turn. Document both modes in the subcommand
list and the on-boot files section.
2026-07-02 14:15:46 +02:00
damocles
c7bac398b2 address mara: drop CompactionMode, always checkpoint-then-compact 2026-07-01 19:05:24 +02:00
damocles
fc42f97691 parallelize graceful agent drains, serialize container stops on fast lane; unify shutdown+checkpoint+compact prompt 2026-07-01 19:05:24 +02:00
damocles
c99fa714d9 feat(#2050): set matrix avatar in the daemon over the live client 2026-06-28 01:38:21 +02:00
damocles
c2ba841932 docs(turn-loop): present managed-settings as current state, drop changelog phrasing 2026-06-26 23:06:04 +02:00
damocles
b231ed2392 feat(#1969): ship claude settings via /etc/claude-code/managed-settings.json 2026-06-26 23:06:04 +02:00
lexis
73a58776fa docs(turn-loop): document graceful stop recv behavior (follow-up to #1920) 2026-06-22 23:27:33 +02:00
damocles
cc03af3390 docs: drop stale two-loop/two-binary framings (single hive serve loop) 2026-06-10 20:01:52 +02:00
damocles
daa6a59324 fix(#1543): drive request_next_turn continue in-process, not via the broker 2026-06-09 11:25:55 +02:00
iris
f2d57c8538 fix: drop stale claim that ruth is always reachable in allowedRecipients
The sentence 'ruth is always reachable regardless of the list' documents
a bug in check_send_allowed (name-based carve-out), not intended
behavior. The structural parent carve-out is fine to mention since it's
topology-based, not name-based.

Updated example to show [ "operator" ] (restrict to operator-only)
and replaced the ruth-name claim with a note about the parent carve-out.
2026-06-05 18:45:06 +02:00
iris
da8892aac2 fix(docs/turn-loop): correct allowedRecipients example name to ruth
The manager's logical name is 'ruth' (MANAGER_AGENT post-#954).
The example used the stale 'manager' placeholder.
2026-06-05 18:45:06 +02:00
iris
3328b396e7 docs(turn-loop): document allowedRecipients, claudePlugins, cargo.shortMessages
Five per-agent agent.nix options were undocumented:

- hyperhive.allowedRecipients — restricts which peers send() accepts;
  note added inline to the send tool description
- hyperhive.claudeMarketplaces — Claude Code plugin marketplace sources
  (default: official Anthropic marketplace)
- hyperhive.claudePlugins — plugin specs installed at harness boot
- hyperhive.claudePluginsAutoUpdate — pull latest marketplace index
  before install; off by default
- hyperhive.cargo.shortMessages — shell wrapper injecting
  --message-format short on cargo compile subcommands; on by default
2026-06-05 18:45:06 +02:00
iris
330fdf8dc7 fix(docs/turn-loop): correct forge.url tea-login description
The tea-login oneshot writes ~/.config/tea/config.yml directly via
heredoc; it never calls 'tea login add'. Fix the implementation detail.
2026-06-05 18:30:29 +02:00
iris
20269873bd docs(turn-loop): also document hyperhive.icon option
SVG path for per-agent visual identity — used in the page header,
favicon, Forgejo profile avatar (forge-avatar-sync), and Matrix
profile avatar (matrix-avatar-sync).
2026-06-05 18:30:29 +02:00
iris
8f4a8fbc07 docs(turn-loop): document passwordlessSudo, dashboardLinks, extraFiles, connectivity overrides
Five previously undocumented per-agent agent.nix options:

- hyperhive.user.passwordlessSudo: default-true sudo grant; note added
  with cross-reference to companion user.* options in agent-hierarchy.md
- hyperhive.dashboardLinks: declarative extra nav links on the dashboard
  card and per-agent page header; table of fields (label/url/icon)
- hyperhive.frontend.extraFiles: overlay files over the default agent dist;
  source/target semantics, constraints, collision guard, mergedDist
- hyperhive.forge.url: per-agent Forgejo base URL for tea login; default
  localhost:3000; validation note
- hyperhive.matrix.url: per-agent matrix-sdk homeserver URL; default
  localhost:8008; per-agent override use-cases (remote hive, VPN)
2026-06-05 18:30:29 +02:00
iris
83059a0fcb docs(turn-loop): document hyperhive.autoCompact nix option
The compaction section already documented HIVE_COMPACT_WATERMARK_TOKENS
but didn't mention the per-agent nix option (hyperhive.autoCompact,
default true) that maps to it.

Add a short note after the watermark paragraph explaining that operators
can set autoCompact = false in agent.nix to disable proactive compaction,
and note the reactive path still applies. Useful for sonnet/opus agents
where the 75% heuristic fires before the session is actually full.
2026-06-05 18:28:43 +02:00
damocles
29bc40a1d7 docs: document get_host_journal in scheduling.md and turn-loop.md 2026-06-05 00:48:05 +02:00
lexis
13fe5ef9d3 docs(turn-loop.md): document get_loose_ends agent parameter scoping
Add clarification for the agent parameter: omit to list own threads,
pass agent name for direct children (always accessible), or query_agent_state
capability for non-children. Note that hive-wide '*' query unavailable
on agent socket.
2026-06-04 18:38:19 +02:00
damocles
41eb3f806c refactor: remove hyperhive.role option — there is only one role: agent 2026-06-04 14:31:44 +02:00
damocles
9c1c4f62fb fix: add approval kind to cancel_loose_end docs; drop stale role comment in mcp.rs; fix system.md approval-cancel description 2026-06-04 13:51:39 +02:00
damocles
78a00d1258 docs(#1251): split MCP tool docs into docs/tools/ sub-mds by feature 2026-06-04 13:51:39 +02:00
damocles
cccb055245 docs: remove stale conflict marker from turn-loop.md 2026-06-04 12:15:03 +02:00
damocles
f56b272a23 remove Role::Manager + ManagerSurface + Flavor::Manager — there is only one role: agent 2026-06-04 12:15:03 +02:00
lexis
1698372572 docs: bash_run timeout now fully optional, no default
PR #1223 removed the default 180s timeout. timeout_secs is now fully
optional: pass a value for a deadline, or omit for no timeout (natural exit).
2026-06-04 00:03:55 +02:00
damocles
1353fbaf17 docs: add list_containers to agent lifecycle tools in turn-loop.md 2026-06-03 23:05:33 +02:00
lexis
e5bcd16daf docs: turn-loop.md agent lifecycle + config request tools (follow-up to #1226) 2026-06-03 22:55:50 +02:00
damocles
f5351eb59c fix(#1194): update Execution tool names + frontend + docs 2026-06-03 21:20:49 +02:00
iris
0da736f2a1 fix(docs): web_tools is a tool group, not a capability
Remove web_tools from the C4P4B1L1T13S table in dashboard.md and add
it to the T00L GR0UPS section with a note that it gates Claude built-ins
rather than MCP tools. Fix turn-loop.md to say 'tool-group-gated' and
'web_tools tool group' throughout.
2026-06-02 12:47:18 +02:00
iris
de8c446a3a docs: document web_tools capability in turn-loop and dashboard 2026-06-02 12:47:18 +02:00
damocles
cbd14e9cd0 fix(#1066): retry turn once on 401 before parking for re-login 2026-06-02 12:43:41 +02:00
damocles
88f22065b0 feat(#1058): disallow built-in Bash; remove allowedBashPatterns; prompt sweep 2026-06-02 01:14:24 +02:00
damocles
008609d0e7 rename(162): drop HIVE_PORT fallback; sweep remaining hm1nd in docs 2026-06-01 17:40:47 +02:00
damocles
601ac647b5 docs: fix stale /state/hyperhive-model path in turn-loop.md 2026-06-01 14:39:16 +02:00
damocles
1433931904 docs: document bash_run and bash_status tools in turn-loop.md 2026-06-01 14:39:16 +02:00
iris
94c110fd5f hive-ag3nt + docs: extract harness binary shape prose (#716 batch 5)
`bin/hive.rs` carries ~15 attribution cookies (#598, #676, #692,
#693, #778, #788, #682, #688) plus structural prose about the
single-binary architecture (role-from-env), the `Surface` trait
pattern (zero-sized type tags + generic dispatch), boot wiring
(label fallback, plugin install → send_to_parent failure routing),
and turn-outcome branching (ack / requeue / wait_for_login / parent
notify).

Migrated to a new `docs/turn-loop.md::Harness binary shape`
subsection covering:

- Single-binary rationale (server-side privilege boundary on the
  broker socket means no escalation risk in shipping both wire
  surfaces in the same process).
- Three subcommands (`serve` / `mcp` / `wake`).
- Surface trait + zero-sized type tags (AgentSurface,
  ManagerSurface) — picks per-role FLAVOR / FORGE_IS_MANAGER and
  exposes the broker wire ops behind trait methods so the turn
  loop is written once.
- Boot wiring (HIVE_PORT, HIVE_LABEL fallback, plugin failures
  routed via send_to_parent, web_ui + forge_notify spawn).
- Turn outcomes table (Ok/Compacted/RateLimited/AuthFailed/Failed)
  + continue-sentinel pickup.

In-code rustdocs reduced to 1-line summaries + doc pointers;
inline cookies stripped from boot wiring + plugin install +
sentinel cleanup paths.

15 → 0 cookies in bin/hive.rs; cargo check -p hive-ag3nt passes.
2026-05-31 17:18:22 +02:00
iris
84f3fe5f69 hive-ag3nt + docs: extract prompt-rendering prose (#716 batch 3) 2026-05-31 16:46:00 +02:00
iris
5ca96b8c85 docs: scrub self-ref cookies across 5 files (#719 batch 2)
All five files scrubbed to 0 issue-ref cookies. Most refs were
'(closes #NNN)' style attribution after closed work landed.

- docs/turn-loop.md: 6 → 0 (#598 unified binary, #419 auth-fail,
  #542 mtime resumption, #519 role markers, #442 spawn path,
  #474/#478 partial edit)
- docs/approvals.md: 5 → 0 (#317 flake validation, #250 withdraw,
  #441 rebuild-queue dispatch, #753 manager port hash, #425
  crash-watch grace)
- docs/terminal-rendering.md: 2 → 0 (#666 ask-operator inline)
- docs/conventions.md: 3 → 0 (#753 port hash, #692 parent
  sentinel, #486 reparenting)
- docs/security.md: 4 → 0 (#240 + #658 ×2 + #673/#678 attribution)

Combined with PR #810 (docs/web-ui.md 14→0), this PR closes the
small / medium files. Remaining: agent-hierarchy.md (13),
gotchas.md (13), persistence.md (13). gateway.md is atlas's lane.
2026-05-31 15:39:09 +02:00
lexis
a823fa4dd9 docs: get_agent_meta response gains hive_name + swarm_name (follow-up to #741)
turn-loop.md: add optional hive_name / swarm_name fields to get_agent_meta
response shape; note they are omitted when the host options are unset.
CLAUDE.md: update hive-gateway.nix entry to mention per-agent routing
and .well-known; drop stale #609 cookie.
2026-05-31 13:03:12 +02:00
lexis
264c984398 docs: list all 5 system-prompt placeholders + set_status validation limits
turn-loop.md:
- expand stale '{label} and {operator_pronouns}' note to all 5
  current placeholders (#730 added hive_identity + swarm_identity)
- add 200-char + single-line validation note to set_status (#723)
2026-05-31 12:23:59 +02:00
lexis
31288ae760 docs: fix stale wake caveat, add <parent> sentinel + systemd path gotcha
turn-loop.md:
- remove stale "Agent-only today" note from hive wake (fixed by #698)
- add <parent> sentinel to send tool description (added by #703)

gotchas.md:
- add systemd.services.*.path /bin auto-append gotcha (hit by #672/#705)
2026-05-31 11:48:46 +02:00
damocles
d8cd3ef68c docs: post-#598 catch up — hive-ag3nt/hive-m1nd → unified hive binary in turn-loop.md + CLAUDE.md 2026-05-31 10:14:20 +02:00
atlas
3b500bba1b nix: pivot to services.hyperhive.* per mara directive (#612)
Per [mara on PR #615 comment 7349](http://localhost:3000/hyperhive/hyperhive/pulls/615#issuecomment-7349):
> follow nix conventions, services.hyperhive it is. the earlier we
> change this, the less breakage.

Renames the entire host-side option tree under `services.hyperhive.*`:

- `services.hive-c0re.*` → `services.hyperhive.c0re.*`
- `hyperhive.enable` → `services.hyperhive.enable`
- `hyperhive.domain` → `services.hyperhive.domain`
- `hyperhive.forge.*` → `services.hyperhive.forge.*`
- `hyperhive.matrix.*` → `services.hyperhive.matrix.*`

Per mara's "earlier = less breakage", the previous `services.hive-c0re.enable`
deprecation alias is dropped. Operators get a clear eval error on the
old paths pointing at the rename. Single migration moment.

Per-agent options in `nix/templates/harness-base.nix` (`hyperhive.model`,
`hyperhive.allowedRecipients`, etc.) stay at `hyperhive.*` — they're
container-level config, not services in the NixOS sense.

Verified via `nix flake check --no-build` + an end-to-end NixOS eval
exercising every renamed path.

Follow-up needed: rust source comments referencing the old NixOS
option names (`hive-c0re/src/{meta,coordinator,main,dashboard}.rs`)
should be updated in a separate pure-rust PR to keep this one
strictly nix-only.
2026-05-30 11:07:57 +02:00
atlas
32148179e6 refactor: move hive-c0re options to hyperhive namespace (#612)
- Move options.services.hive-c0re → options.hyperhive.c0re
- Add options.hyperhive.enable to auto-enable c0re + subsystems
- Add deprecation alias for services.hive-c0re.enable (backward compat)
- Update doc references in README, flake.nix, docs, harness-base.nix
- Simplifies config: 'hyperhive.enable = true' now enables everything

Existing operator configs using services.hive-c0re.enable will
continue to work but emit a deprecation warning. Aligns the option
namespace with the existing hyperhive.* family (matrix, forge, domain).

fixes #612
2026-05-30 11:07:57 +02:00