docs: turn-loop.md agent lifecycle + config request tools (follow-up to #1226)
This commit is contained in:
parent
3fa31a414f
commit
e5bcd16daf
1 changed files with 42 additions and 11 deletions
|
|
@ -389,6 +389,25 @@ it as a stdio child via `--mcp-config`. The hyperhive socket name is
|
||||||
effort wake was still sent so the agent is not silently blocked.
|
effort wake was still sent so the agent is not silently blocked.
|
||||||
Exposed as `mcp__bash__status`.
|
Exposed as `mcp__bash__status`.
|
||||||
|
|
||||||
|
**Agent lifecycle + config tools** (direct children only; requires
|
||||||
|
`lifecycle` or `approvals` tool group):
|
||||||
|
|
||||||
|
- `kill(name)`, `start(name)`, `restart(name)`, `update(name)` — manage
|
||||||
|
a direct child sub-agent (graceful stop, start, stop+start, rebuild).
|
||||||
|
No approval required. Topology-enforced: `name` must be a direct child
|
||||||
|
per `topology.json`. Server rejects all other agent names. Requires
|
||||||
|
`lifecycle` tool group.
|
||||||
|
- `request_init_config(name, description?)` — step 1 of spawning a new
|
||||||
|
direct child agent. Queues an `InitConfig` approval; on operator
|
||||||
|
approve, hive-c0re seeds the proposed config repo with a default
|
||||||
|
`agent.nix` template. `name` must be a direct child. Topology-enforced.
|
||||||
|
Fails if config already exists. Requires `approvals` tool group.
|
||||||
|
- `request_apply_commit(agent, commit_ref, description?)` — step 2 of
|
||||||
|
spawning a new direct child (or updating an existing child's config).
|
||||||
|
Submit a commit sha from the child's proposed config repo for operator
|
||||||
|
approval. `agent` must be a direct child. Topology-enforced. `commit_ref`
|
||||||
|
must be a 7-40 char hex sha. Requires `approvals` tool group.
|
||||||
|
|
||||||
### Waking the agent from inside the container
|
### Waking the agent from inside the container
|
||||||
|
|
||||||
External MCP servers (and any other in-container process) can
|
External MCP servers (and any other in-container process) can
|
||||||
|
|
@ -471,16 +490,25 @@ meta's.
|
||||||
config creates the container. Fails if a proposed repo for this
|
config creates the container. Fails if a proposed repo for this
|
||||||
name already exists. (The operator can also direct-spawn an empty
|
name already exists. (The operator can also direct-spawn an empty
|
||||||
agent from the dashboard's `◆ R3QU3ST SP4WN` button, which routes
|
agent from the dashboard's `◆ R3QU3ST SP4WN` button, which routes
|
||||||
via `HostRequest::RequestSpawn`.)
|
via `HostRequest::RequestSpawn`.) Also available to agents for direct
|
||||||
- `kill(name)` — graceful stop. No approval required.
|
children only (requires `approvals` tool group; see agent lifecycle
|
||||||
- `start(name)` — start a stopped sub-agent. No approval.
|
tools section above).
|
||||||
- `restart(name)` — stop + start. No approval.
|
- `kill(name)` — graceful stop. No approval required. Also available to
|
||||||
|
agents for direct children only (requires `lifecycle` tool group; see
|
||||||
|
agent lifecycle tools section above).
|
||||||
|
- `start(name)` — start a stopped sub-agent. No approval. Also available
|
||||||
|
to agents for direct children only.
|
||||||
|
- `restart(name)` — stop + start. No approval. Also available to agents
|
||||||
|
for direct children only.
|
||||||
- `update(name)` — rebuild (re-applies the current hyperhive flake
|
- `update(name)` — rebuild (re-applies the current hyperhive flake
|
||||||
+ agent.nix, restarts). No approval, idempotent. Manager calls
|
+ agent.nix, restarts). No approval, idempotent. Manager calls
|
||||||
this on receipt of a `needs_update` system event.
|
this on receipt of a `needs_update` system event. Also available to
|
||||||
|
agents for direct children only.
|
||||||
- `request_apply_commit(agent, commit_ref)` — submit a config
|
- `request_apply_commit(agent, commit_ref)` — submit a config
|
||||||
change for any agent (`root` for the manager's own config) for
|
change for any agent (`root` for the manager's own config) for
|
||||||
operator approval.
|
operator approval. Also available to agents for direct children only
|
||||||
|
(requires `approvals` tool group; see agent lifecycle tools section
|
||||||
|
above).
|
||||||
- `request_update_meta_inputs(inputs?, description?)` — queue an
|
- `request_update_meta_inputs(inputs?, description?)` — queue an
|
||||||
approval to run `nix flake update [inputs...]` on the meta flake.
|
approval to run `nix flake update [inputs...]` on the meta flake.
|
||||||
Pass specific input names (e.g. `["bitburner-agent"]`) or omit
|
Pass specific input names (e.g. `["bitburner-agent"]`) or omit
|
||||||
|
|
@ -545,11 +573,14 @@ meta's.
|
||||||
to inspect one agent.
|
to inspect one agent.
|
||||||
`cancel_loose_end` may cancel any agent's row.
|
`cancel_loose_end` may cancel any agent's row.
|
||||||
|
|
||||||
The boundary: lifecycle ops on *existing* sub-agents
|
The boundary: lifecycle ops on *existing* direct children
|
||||||
(`kill`/`start`/`restart`) are at the manager's discretion — no
|
(`kill`/`start`/`restart`/`update`) are discretionary — no operator
|
||||||
operator approval. Creating a new agent (`request_init_config` →
|
approval required (manager can do so for any sub-agent; agents can do so
|
||||||
`request_apply_commit` for the first sha) and changing any agent's
|
only for direct children with `lifecycle` tool group). Creating a new
|
||||||
config (`request_apply_commit`) still go through the approval queue.
|
agent (`request_init_config` → `request_apply_commit` for the first sha)
|
||||||
|
and changing any agent's config (`request_apply_commit`) still go through
|
||||||
|
the approval queue (same topology scoping for agents: direct children only
|
||||||
|
with `approvals` tool group).
|
||||||
|
|
||||||
### Authoritative state
|
### Authoritative state
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue