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 a0b1846006 swarm: named scheduled prompts for one or more agents, fired in each agent
swarm-controller keeps every scheduled prompt (id, name, agents, body,
anchor, interval, paused) as one document under one key of a new
`schedule-definitions` KV bucket, so each change is a single
compare-and-set and a prompt exists for all of its agents or none. It
writes each agent's key of a new `agent-schedules` bucket as the prompts
naming that agent, without names or other agents, after every change and
on a one-minute reconcile pass. It is the only writer of both, behind
GET/POST /api/schedules and PATCH/DELETE /api/schedules/{id}.
`swarmctl schedule add|list|edit|pause|resume|rm` drives those routes over
the controller socket.

An agent's own queue credential is granted one more subject, the direct
get of its own key in `agent-schedules`. A KV watch is not granted: its
consumer create subject carries no key, so it would cover every agent's.

hive-agent's new schedule ticker reads that key every 10 seconds and fires
due slots as the same `schedule:<id>` todo hive-c0re's worker pushes. Fire
times are anchor + k*interval; the last fired slot per schedule id is kept
in the state db, so a body edit or list refresh never moves or refires a
slot, downtime fires the latest missed slot once, a restart refires
nothing, a one-shot fires once, and paused slots are skipped.

Refs #4914
2026-10-04 17:24:57 +02:00
..
forge config repos: drop the hive's branch-protection edit and core from the merge gate 2026-10-02 23:13:03 +02:00
matrix_account operator admin sync: cap the grant at one send, split out response verdicts 2026-10-04 16:45:08 +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 UI: send a message to an agent, without its hive 2026-10-04 03:02:14 +02:00
agent_renewal.rs swarm-controller: first credential-renewal pass waits for the queue connection 2026-09-30 15:46:56 +02:00
agent_state_stream.rs swarm-controller: relay an agent's hive-free subjects beside the old ones 2026-09-28 08:24:52 +02:00
agent_status.rs swarm-ui: add agent start/stop, backed by the wanted-state route 2026-09-02 19:57:04 +02:00
auth.rs swarm-controller: make authelia's operators matrix homeserver admins 2026-10-04 16:45:08 +02:00
config_pr.rs config PRs: remove the hive's config-PR webhook, poll and core merge 2026-10-02 23:13:03 +02:00
forge.rs config PRs: remove the hive's config-PR webhook, poll and core merge 2026-10-02 23:13:03 +02:00
forge_account.rs use a neutral forge name in link-form placeholders, schema examples and tests 2026-10-04 15:51:20 +02:00
github_account.rs swarm-controller: inject the account store so link-route tests use the fake 2026-10-04 08:43:24 +02:00
issue_report.rs swarm-controller: answer 404, not 503, for an issue-report on a nonexistent repo 2026-09-24 16:38:47 +02:00
linked_accounts.rs use a neutral forge name in link-form placeholders, schema examples and tests 2026-10-04 15:51:20 +02:00
main.rs swarm: named scheduled prompts for one or more agents, fired in each agent 2026-10-04 17:24:57 +02:00
matrix_account.rs swarm-controller: make authelia's operators matrix homeserver admins 2026-10-04 16:45:08 +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
queue_identity.rs swarm-controller: read the queue client secret from the store, drop the file 2026-09-28 19:01:05 +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
schedules.rs swarm: named scheduled prompts for one or more agents, fired in each agent 2026-10-04 17:24:57 +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: named scheduled prompts for one or more agents, fired in each agent 2026-10-04 17:24:57 +02:00
term_stream.rs swarm-controller: relay an agent's hive-free subjects beside the old ones 2026-09-28 08:24:52 +02:00
vcs_metrics.rs swarm-controller: read the queue client secret from the store, drop the file 2026-09-28 19:01:05 +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 config PRs: remove the hive's config-PR webhook, poll and core merge 2026-10-02 23:13:03 +02:00