hive-agent-mcp, hive-c0re, hive-sh4re: drop agent param from get_loose_ends
get_loose_ends now always returns the caller's own loose ends, for every caller including the manager (ruth) — there is no separate manager surface, ruth is a normal agent with different default capabilities. - AgentGetLooseEndsArgs removed; get_loose_ends takes no args. - Wire Request::GetLooseEnds collapses from an Option<String> target to a unit variant. - hive-c0re's handle_get_loose_ends drops the "*" hive-wide branch and the subtree/capability resolver (resolve_agent_state_target); both are gone since there is no longer a target to resolve. - loose_ends::hive_wide and Capability::QueryAgentState removed as dead code — their only callers were the two functions above. - is_descendant_of is untouched (still used by lifecycle_handlers.rs and schedules.rs independently of this change). - Docs updated: docs/turn-loop/mcp.md, docs/web-ui/dashboard.md, docs/process/conventions.md (Loose-ends wire shape + capabilities table), plus the doc comments in hive-core-agent-sock, mcp_config.rs and capabilities.rs that described the old shape. Refs #4480
This commit is contained in:
parent
67ffb124cb
commit
729c5b4f42
12 changed files with 41 additions and 178 deletions
|
|
@ -181,14 +181,12 @@ privileged bot, etc.) can land later without breaking existing
|
|||
handlers. Each row carries enough context that the caller renders
|
||||
it directly as a bulleted list, no follow-up fetch needed.
|
||||
|
||||
Per-flavour scoping is uniform across the two cancellable variants:
|
||||
|
||||
- **agent-flavour** `GetLooseEnds` only surfaces rows the calling
|
||||
agent has standing in. `Approval` rows only appear when the
|
||||
calling agent is the manager (sub-agents don't submit
|
||||
approvals). `Reminder` rows are scoped to `owner == self`.
|
||||
- **manager-flavour** `GetLooseEnds` lists every pending row in
|
||||
the swarm — full audit view.
|
||||
`GetLooseEnds` takes no target — it always returns the caller's own
|
||||
rows, on both the agent and manager sockets alike (the manager, `ruth`,
|
||||
is a normal agent here, just auto-deployed with different default
|
||||
capabilities). `Approval` rows only appear when the calling agent is
|
||||
the manager (sub-agents don't submit approvals). `Reminder` rows are
|
||||
scoped to `owner == self`.
|
||||
|
||||
Per-variant fields:
|
||||
|
||||
|
|
@ -364,7 +362,6 @@ that allows the underlying resource access.
|
|||
|---|---|
|
||||
| `manage_root_agent` | may lifecycle-manage the root/manager agent via `kill`/`start`/`restart` |
|
||||
| `read_host_journal` | registers the `get_host_journal` MCP tool + serves `GET /journal-host` requests |
|
||||
| `query_agent_state` | may call `get_loose_ends` / `CountPendingReminders` targeting non-child agents |
|
||||
|
||||
**Config storage** — per-agent capabilities live in
|
||||
`/var/lib/hyperhive/meta/capabilities.json` alongside `tool-groups.json`.
|
||||
|
|
|
|||
|
|
@ -75,20 +75,15 @@ outcomes](README.md#turn-outcomes)) but via a generic "call
|
|||
payload shapes and routing logic in
|
||||
[`docs/agent-lifecycle/approvals.md` § Helper events](../agent-lifecycle/approvals.md#helper-events-to-the-submitting-agent).
|
||||
|
||||
**Inbox** (`inbox` group): `get_loose_ends(agent?)`,
|
||||
**Inbox** (`inbox` group): `get_loose_ends()`,
|
||||
`cancel_loose_end(kind, id)`, `remind(message, delay_seconds? |
|
||||
at_unix_timestamp?)`.
|
||||
|
||||
- `get_loose_ends(agent?)` — list scheduled reminders, pending
|
||||
approvals you submitted, and active local tasks published by
|
||||
external MCP daemons (for example running bash tasks from
|
||||
`hive-bash-daemon`). Each row carries an id + kind for
|
||||
`cancel_loose_end`. Omit `agent` to list your own threads. Pass
|
||||
`agent: "<name>"` to inspect any agent in your subtree — a child, a
|
||||
child's child, every agent below them (always accessible per topology
|
||||
enforcement); a name outside the subtree requires the
|
||||
`query_agent_state` capability. The `"*"` hive-wide query isn't
|
||||
available on the agent socket.
|
||||
- `get_loose_ends()` — list scheduled reminders, pending approvals you
|
||||
submitted, and active local tasks published by external MCP daemons
|
||||
(for example running bash tasks from `hive-bash-daemon`). Each row
|
||||
carries an id + kind for `cancel_loose_end`. Always your own threads —
|
||||
there is no way to target another agent.
|
||||
- `cancel_loose_end` — hard-delete a `reminder`, cancel a pending
|
||||
`approval` row, or clear a `todo` row (loose-ends-v2). Agents may
|
||||
only cancel rows they own; the `approval` kind is further restricted
|
||||
|
|
|
|||
|
|
@ -440,7 +440,6 @@ The current capabilities are:
|
|||
|------|--------|
|
||||
| `manage_root_agent` | allows the `set_status` / lifecycle tools on the root agent |
|
||||
| `read_host_journal` | unlocks `get_host_journal` to read journald from inside a container |
|
||||
| `query_agent_state` | allows `get_loose_ends(agent: "<name>")` calls targeting other agents |
|
||||
|
||||
Each row is one agent. Columns are the capability names returned by
|
||||
`GET /api/capabilities` as `caps: Vec<String>`. Checking or unchecking
|
||||
|
|
|
|||
Loading…
Reference in a new issue