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 0f7b403803 agents get a todo when assigned to an issue or PR, rewritten when unassigned and cleared on close
A new swarm service, swarm-notify-router, in its own container on the host
that sets deploy.notify-router.enable (defaulted on by allSwarmServices where
the host has the router's store leaf, like the claude login minter).

- swarm-controller registers instance-wide hooks for `issues` +
  `issue_assign` and `pull_request` + `pull_request_assign`, updates the
  event list of a hook already registered with fewer (leaving its active flag as it is), and keeps each
  verified body unchanged in the SWARM_EVENTS stream on
  $SWARM.events.forge.<X-Forgejo-Event-Type>, deduped by X-Forgejo-Delivery.
  A delivery the stream did not keep answers 503.
- swarm-notify-router drains its durable consumer on that stream, runs its
  flows (source -> match -> todo sink, stored as nodes plus edges and checked
  to be a tree) and queues each op on $SWARM.router.todo.<agent> in the
  work-queue stream ROUTER_TODOS. Built-in flows: assigned, unassigned (same
  key, rewritten) and closed (prefix-clears every holder's router todos). A
  per-issue snapshot in its notify-router-state bucket holds the last
  assignees and the todo holders; only agents in the agent-status bucket get
  ops, and an assignee that was not one is left out of the snapshot so the
  next assign event retries it. After the first event that must be retried,
  the rest of the batch is nakked so redelivery keeps stream order.
- hive-agent creates its own durable consumer todo-<agent> and applies each
  op to its todo store as subsystem `router`, then acks; a refused op stops
  the rest of its batch the same way. The store's (subsystem, key) dedup
  makes a redelivery harmless. New Todos::clear_prefix.
- swarm-nats-auth: a --notify-router-client arm; the controller may publish
  $SWARM.events.forge.*; each agent gets three {agent} templates (extended
  consumer create whose filter the server checks, MSG.NEXT, ACK).
- Credentials: a notify-router store leaf minted by glue-bao-tls, a
  swarm-notify-router bao policy (read on its own queue client secret), an
  authelia machine client, the secret publisher entry, a journal forwarder
  route. No manual step.

hive-forge-notify is unchanged, so agents also still get forge's own
notifications.

Refs #5571
2026-10-22 07:28:53 +02:00
..
builder swarm-controller: split main.rs into jobq, routes and startup modules 2026-10-18 13:44:43 +02:00
forge move stored_secret from swarm-queue-client to swarm-secret-client 2026-10-18 09:00:08 +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 move the review classifier, agent login and inference types into swarm-wire 2026-10-18 19:27:30 +02:00
routes swarm roster shows a declared agent's state before it has ever reported 2026-10-21 09:21:56 +02:00
agent_archetype.rs swarm-controller: split main.rs into jobq, routes and startup modules 2026-10-18 13:44:43 +02:00
agent_control.rs swarm-controller: split main.rs into jobq, routes and startup modules 2026-10-18 13:44:43 +02:00
agent_icon.rs swarm-wire: take agent_icon's wire types 2026-10-18 22:50:02 +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 the swarm controller streams every inter-agent message from the agents' terminal rows 2026-10-18 17:27:53 +02:00
agent_limits.rs swarmctl shares the create-agent, inference and permissions shapes with the controller 2026-10-19 18:58:00 +02:00
agent_login.rs agent_permissions, agent_term and subagent_term take their wire contracts from swarm-wire 2026-10-19 18:30:44 +02:00
agent_permissions.rs swarmctl shares the create-agent, inference and permissions shapes with the controller 2026-10-19 18:58:00 +02:00
agent_renewal.rs swarm-wire: take notices's wire types, fmt the moved imports 2026-10-18 22:50:02 +02:00
agent_state_stream.rs swarm-controller: split main.rs into jobq, routes and startup modules 2026-10-18 13:44:43 +02:00
agent_status.rs swarm roster shows a declared agent's state before it has ever reported 2026-10-21 09:21:56 +02:00
agents_md.rs swarm-controller: split main.rs into jobq, routes and startup modules 2026-10-18 13:44:43 +02:00
agents_md_initial.rs swarmctl shares the create-agent, inference and permissions shapes with the controller 2026-10-19 18:58:00 +02:00
alerts.rs swarm-controller: split main.rs into jobq, routes and startup modules 2026-10-18 13:44:43 +02:00
archetypes.rs swarmctl shares the create-agent, inference and permissions shapes with the controller 2026-10-19 18:58:00 +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 move the builder and claude login wire contracts into swarm-wire 2026-10-18 12:36:45 +02:00
claude_login.rs swarm-controller: split main.rs into jobq, routes and startup modules 2026-10-18 13:44:43 +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 agents get a todo when assigned to an issue or PR, rewritten when unassigned and cleared on close 2026-10-22 07:28:53 +02:00
forge_account.rs swarm-controller: split main.rs into jobq, routes and startup modules 2026-10-18 13:44:43 +02:00
forge_events.rs agents get a todo when assigned to an issue or PR, rewritten when unassigned and cleared on close 2026-10-22 07:28:53 +02:00
github_account.rs swarm-controller: split main.rs into jobq, routes and startup modules 2026-10-18 13:44:43 +02:00
inference.rs swarmctl shares the create-agent, inference and permissions shapes with the controller 2026-10-19 18:58:00 +02:00
issue_report.rs swarm-controller: split main.rs into jobq, routes and startup modules 2026-10-18 13:44:43 +02:00
jobq.rs swarmctl shares the create-agent, inference and permissions shapes with the controller 2026-10-19 18:58:00 +02:00
linked_accounts.rs swarm-controller: split main.rs into jobq, routes and startup modules 2026-10-18 13:44:43 +02:00
main.rs agents get a todo when assigned to an issue or PR, rewritten when unassigned and cleared on close 2026-10-22 07:28:53 +02:00
matrix_account.rs swarm-controller: split main.rs into jobq, routes and startup modules 2026-10-18 13:44:43 +02:00
message_stream.rs agent_permissions, agent_term and subagent_term take their wire contracts from swarm-wire 2026-10-19 18:30:44 +02:00
otel_http_client.rs swarm-controller: get its otlp pushes past the collector, log failures 2026-10-17 09:44:33 +02:00
pulls.rs swarm-controller: split main.rs into jobq, routes and startup modules 2026-10-18 13:44:43 +02:00
queue_identity.rs move startup_read from swarm-queue-client to swarm-secret-client 2026-10-18 16:11:55 +02:00
read_policy.rs retry the remaining plain schedules with backon 2026-10-17 16:33:21 +02:00
review_classifier.rs move the review classifier, agent login and inference types into swarm-wire 2026-10-18 19:27:30 +02:00
schedules.rs swarm-wire: take agent_schedules's wire types 2026-10-18 22:50:02 +02:00
startup.rs the swarm controller streams every inter-agent message from the agents' terminal rows 2026-10-18 17:27:53 +02:00
status.rs swarm-controller: split main.rs into jobq, routes and startup modules 2026-10-18 13:44:43 +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 agent_permissions, agent_term and subagent_term take their wire contracts from swarm-wire 2026-10-19 18:30:44 +02:00
term_stream.rs agent_permissions, agent_term and subagent_term take their wire contracts from swarm-wire 2026-10-19 18:30:44 +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 drop the remaining HYPERHIVE_OTEL_METRIC_INTERVAL_MS readers 2026-10-17 08:00:14 +02:00
wanted.rs swarm-wire: take wanted's wire types 2026-10-18 22:50:02 +02:00
webhook.rs agents get a todo when assigned to an issue or PR, rewritten when unassigned and cleared on close 2026-10-22 07:28:53 +02:00