Watch
0
0
Fork
You've already forked hyperhive
0
hyperhive/swarm-controller/src
Repository files (latest commit first)
Filename Latest commit message Latest commit date
atlas f862354e43 agent capabilities live in a swarm KV record, set from swarmctl
An agent's capabilities move from the hive's meta repo
(`meta/capabilities.json`, injected as `HIVE_CAPABILITIES`) into the
`capabilities` field of its key in a new `agent-permissions` KV bucket,
which swarm-controller alone writes.

- swarm-queue-client: `agent_permissions` (bucket, key, `AgentPermissions`,
  direct-get read, the import subject and its wire types).
- swarm-controller: creates the bucket at start; `GET|PUT|DELETE
  /api/agents/{name}/permissions` (deny_unknown_fields and unknown
  capability ⇒ 422, duplicate ⇒ 400, agent must be declared by a hive);
  answers each hive's one-shot import, writing a key only where there is
  none and only for agents that hive's wanted state declares.
- swarmctl: `agent permissions get|set|clear`.
- swarm-nats-auth: a hive reads every key of the bucket and sends its
  import on its own subject; the controller subscribes to the imports and
  may answer them (`responses`).
- hive-c0re: reads each of its agents' keys every 30s into
  /var/lib/hyperhive/swarm-agent-permissions.json and restarts an agent,
  gracefully, when its capabilities change. Unset is the compiled-in
  default (ruth: manage_root_agent; everyone else: none). A failed read
  keeps the stored value. On first boot it seeds that file from
  meta/capabilities.json, sends the grants to the controller, and deletes
  the file once the controller answers.

Deleted: the capabilities.json reader/writer, `HIVE_CAPABILITIES` in the
rendered meta flake, ruth's capability seed, the capabilities half of the
permissions rebuild job (`PermPayload::Capabilities`/`Combined`), the
dashboard's capabilities table and `capabilities_changed` event, and the
now-unused `Capability::description`.

Part of #5170.
2026-10-15 18:01:40 +02:00
..
forge review-classifier: say the 25-line context shows a gate only when it's within 25 lines 2026-10-15 12:43:12 +02:00
matrix_account matrix: back up agents' room keys with a controller-minted recovery passphrase 2026-10-14 02:09:57 +02:00
review_classifier swarm-controller: the review classifier reads a diff with 25 lines of context, not 200 2026-10-15 12:43:12 +02:00
agent_control.rs swarm: cancel an agent's turn from the swarm queue 2026-10-15 08:26:46 +02:00
agent_icon.rs swarm: let an agent publish its own icon 2026-09-28 13:47:37 +02:00
agent_identity.rs swarm-secret-client: agents may list their own subtree; controller rewrites agent policies 2026-10-01 17:43:28 +02:00
agent_input.rs swarm: cancel an agent's turn from the swarm queue 2026-10-15 08:26:46 +02:00
agent_limits.rs swarm UI: an alerts page, read by the controller with a Viewer Grafana token from bao 2026-10-15 15:16:21 +02:00
agent_login.rs swarm UI: an agent that needs a Claude login shows it on its card 2026-10-14 20:07:46 +02:00
agent_permissions.rs agent capabilities live in a swarm KV record, set from swarmctl 2026-10-15 18:01:40 +02:00
agent_renewal.rs swarm-queue-client: re-read a held OIDC client secret when the IdP refuses it 2026-10-13 19:16:04 +02:00
agent_state_stream.rs swarm UI: an agent that needs a Claude login shows it on its card 2026-10-14 20:07:46 +02:00
agent_status.rs swarm UI: an agent that needs a Claude login shows it on its card 2026-10-14 20:07:46 +02:00
alerts.rs swarm UI: an alerts page, read by the controller with a Viewer Grafana token from bao 2026-10-15 15:16:21 +02:00
auth.rs swarm options: no swarm.* value depends on a deploy option or this host's hive 2026-10-04 18:13:47 +02:00
builder.rs swarm-builder: scope the forge token to the forge, one build at a time, opt-in 2026-10-14 03:30:46 +02:00
claude_login.rs swarm UI: log an agent into claude from its card; the credentials go to bao and the agent picks them up 2026-10-15 13:26:29 +02:00
config_pr.rs swarm-builder: build each agent config PR head and post a commit status 2026-10-14 03:30:46 +02:00
forge.rs swarm-controller: fall back to the forge diff when a file read fails, and stop rendering at the cap 2026-10-15 12:43:12 +02:00
forge_account.rs swarm UI: an alerts page, read by the controller with a Viewer Grafana token from bao 2026-10-15 15:16:21 +02:00
github_account.rs swarm UI: an alerts page, read by the controller with a Viewer Grafana token from bao 2026-10-15 15:16:21 +02:00
inference.rs Guard the creation roll-back by revision 2026-10-15 13:47:14 +02:00
issue_report.rs swarm-controller: bound the issue-report forge calls with the forge deadline 2026-10-15 13:30:34 +02:00
linked_accounts.rs swarm UI: an alerts page, read by the controller with a Viewer Grafana token from bao 2026-10-15 15:16:21 +02:00
main.rs agent capabilities live in a swarm KV record, set from swarmctl 2026-10-15 18:01:40 +02:00
matrix_account.rs swarm UI: an alerts page, read by the controller with a Viewer Grafana token from bao 2026-10-15 15:16:21 +02:00
otel_http_client.rs swarm-queue-client: request the bearer-authz scope when minting an agent token 2026-09-17 09:51:44 +02:00
pulls.rs swarm-ui, swarm-controller: the review try-out's repo and PR fields offer the repos and PRs to pick 2026-10-12 19:05:37 +02:00
queue_identity.rs swarm-queue-client: re-read a held OIDC client secret when the IdP refuses it 2026-10-13 19:16:04 +02:00
read_policy.rs swarm-secret-client: agents may list their own subtree; controller rewrites agent policies 2026-10-01 17:43:28 +02:00
review_classifier.rs swarm-controller: the review classifier reads a diff with 200 lines of context 2026-10-15 12:43:12 +02:00
schedules.rs Disambiguate the write link in the revision-writing helper's doc 2026-10-15 13:47:14 +02:00
status.rs swarm-controller: make status::render/row pub(crate) so agent_status.rs's doc links resolve 2026-09-02 10:20:29 +02:00
store.rs fix doc-comment pointers broken by the module-eval split 2026-09-20 04:31:08 +02:00
subagent_term.rs swarm-controller: end a dead replay, clamp stale resume ids, test on a real server 2026-10-11 23:26:24 +02:00
term_stream.rs swarm-controller: end a dead replay, clamp stale resume ids, test on a real server 2026-10-11 23:26:24 +02:00
test_nats.rs swarm-controller: let each test nats-server bind its own port 2026-10-14 16:33:19 +02:00
vcs_metrics.rs swarm CA: describe the store's pki root as the only anchor in docs and comments 2026-10-05 21:17:10 +02:00
wanted.rs swarm-controller: first credential-renewal pass waits for the queue connection 2026-09-30 15:46:56 +02:00
webhook.rs swarm-builder: build each agent config PR head and post a commit status 2026-10-14 03:30:46 +02:00