Watch
0
0
Fork
You've already forked hyperhive
0
hyperhive/hive-subagent-mcp/src
Repository files (latest commit first)
Filename Latest commit message Latest commit date
atlas 52037133e2 swarm-nats-auth: limit agent subscribe to its own inbox and input
An agent's queue credential could subscribe to every subject in the swarm
account, so any agent could read every other agent's terminal, turn state,
operator input and request replies. Agents are the least trusted clients
on the queue (mara's ruling on #4901), so their grants now carry a
subscribe allow-list:

- an agent's own credential (the harness and its subagent daemon):
  `_INBOX.agent.<agent>.>` and `$SWARM.input.<agent>`
- the hive's shared agent client: `_INBOX.client.<client-id>.>`

Hive and swarm-controller grants are unchanged (no `sub` claim, so still
every subject).

The clients connect with the matching inbox prefix, so the replies they
rely on still arrive: the icon write's JetStream ack and the schedule
DIRECT.GET. `connect_with_token` takes the agent name and sets the prefix
itself; the hive-shared fallback uses the new
`connect_with_inbox_prefix`.

The harness no longer subscribes to its input subject when it fell back
to the hive's shared client: that identity names no agent, so it cannot
be granted one agent's input without all of them. It logs that and
skips, the same as the schedule reader on that path.

Refs #4901
2026-10-04 19:22:41 +02:00
..
lib.rs swarm: show subagent terminals in the swarm UI 2026-10-03 01:34:01 +02:00
main.rs swarm: show subagent terminals in the swarm UI 2026-10-03 01:34:01 +02:00
mcp.rs subagent: make interrupt cancel a goal run, not just its turn 2026-09-23 23:14:13 +02:00
mcp_config.rs hive-c0re: render the new agent option paths into generated agent flakes 2026-09-17 20:19:30 +02:00
paths.rs hive-subagent-mcp: name a role at dispatch, load it as the system prompt 2026-09-21 17:21:40 +02:00
role.rs hive-subagent-mcp: name a role at dispatch, load it as the system prompt 2026-09-21 17:21:40 +02:00
session.rs swarm: show subagent terminals in the swarm UI 2026-10-03 01:34:01 +02:00
swarm_term.rs swarm-nats-auth: limit agent subscribe to its own inbox and input 2026-10-04 19:22:41 +02:00