Watch
0
0
Fork
You've already forked hyperhive
0
hyperhive/swarm-queue-client/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
..
agent_icon.rs swarm: let an agent publish its own icon 2026-09-28 13:47:37 +02:00
agent_schedules.rs swarm: named scheduled prompts for one or more agents, fired in each agent 2026-10-04 17:24:57 +02:00
agent_status.rs refactor(#4006): one wanted-state bucket per hive, so a watch can be scoped 2026-09-02 21:53:56 +02:00
agent_token.rs swarm-queue-client: one agent-token spelling, and no hive in AgentCredential 2026-09-28 08:24:52 +02:00
lib.rs swarm-nats-auth: limit agent subscribe to its own inbox and input 2026-10-04 19:22:41 +02:00
notices.rs swarm-queue-client: drop notices::PREFIX, reuse STREAM 2026-08-24 14:34:37 +02:00
status.rs refactor(#4006): one wanted-state bucket per hive, so a watch can be scoped 2026-09-02 21:53:56 +02:00
subagent_term.rs swarm-controller: cap a subagent terminal stream's disk use 2026-10-03 01:34:01 +02:00
wanted.rs remove as_str() legacy wrappers, callers use .into() directly 2026-09-12 00:06:31 +02:00