hyperhive/hive-sh4re/src
Repository files (latest commit first)
Filename Latest commit message Latest commit date
atlas 0a80f21003 prompts+docs: the lifecycle tools reach the whole subtree, not just direct children
`require_descendant` (`socket_server/mod.rs:666`) authorises
kill/start/restart/update/get_logs with `topology::is_descendant_of` — the
caller's whole subtree, itself included. That has been true since `53b4e752`
(#1865), whose message says "a parent owns its whole subtree; the root covers
every agent as a consequence, no positional privilege", and two tests pin it
(`is_descendant_of_in_grandchild`, `is_descendant_of_in_self_is_true`).

The prose never followed. The four lifecycle tool descriptions, their
`// IMPORTANT:` comments, `docs/tools/lifecycle.md`, the tools README,
hive-agent-mcp's README and the system prompt every agent is rendered from all
still said "direct children only" — while `list_containers`, four tools away in
the same file, said "direct children + their subtrees".

`lifecycle.md` also taught the model #1865 deleted: "Privileged agents (for
example ruth) may operate on any sub-agent — the topology scope applies to all
others." There is no privileged class to belong to; ruth reaches every agent
because the check is transitive and everything sits under it.

Same drift on the state-query side: `resolve_agent_state_target` is
subtree-scoped by the same commit, so `get_loose_ends`' argument doc, the
`QueryAgentState` capability doc and `docs/turn-loop/mcp.md` were all telling a
parent it needs a capability to read a grandchild's threads.

Two smaller corrections found on the way:

* `list_containers` returns the caller itself. `is_descendant_of` is true for
  `candidate == ancestor` and `handle_list_descendants` filters the topology
  with it; called from a leaf agent it answers one row, that agent.
* `request_init_config` accepts any unused name — the requester becomes its
  parent — or an existing agent already in the caller's subtree, not "a direct
  child". The editing surface is narrower than the guard, though: only direct
  children's config repos are bind-mounted, so re-seeding deeper in the subtree
  leaves no local copy to edit. `lifecycle.md` now says so.

The prompt's other stale claim, the dead `request_apply_commit`, is #4226 and
was fixed independently by damocles in #4227 while this was being gated. This
branch keeps only the scope wording on that line.

Closes #4225.
2026-09-11 15:23:50 +02:00
..
approvals.rs docs: restructure into topic subdirectories, collapse duplicated index 2026-09-02 01:55:37 +02:00
assets.rs hive-sh4re: drop the nix explanation from the panic message too 2026-08-30 04:19:11 +02:00
bash_task.rs hive-sh4re: split bash-task schema into its own topic module 2026-08-10 22:12:38 +02:00
container.rs add per-agent url to host.sock agent status rows 2026-09-07 20:30:38 +02:00
inbox.rs hive-sh4re: one saturating_age for every loose-end producer 2026-09-02 14:20:25 +02:00
journal.rs hive-sh4re: split inbox, container, journal, and schedule wire shapes into their own modules 2026-08-10 23:26:15 +02:00
lib.rs hive-sh4re: split inbox, container, journal, and schedule wire shapes into their own modules 2026-08-10 23:26:15 +02:00
manager.rs docs: repoint eighteen pointers whose section no longer exists 2026-09-02 09:00:23 +02:00
paths.rs move hive-sh4re's harness_dir() into hive-agent-sock, drop the dev-fallback derivation 2026-08-09 19:54:13 +02:00
permissions.rs prompts+docs: the lifecycle tools reach the whole subtree, not just direct children 2026-09-11 15:23:50 +02:00
schedule.rs hive-sh4re: split inbox, container, journal, and schedule wire shapes into their own modules 2026-08-10 23:26:15 +02:00
wire_time.rs hive-sh4re: delete now_unix(), the migration's last call sites are gone 2026-08-02 02:12:19 +02:00