Watch
0
0
Fork
You've already forked hyperhive
0
hyperhive/hive-c0re/src
Repository files (latest commit first)
Filename Latest commit message Latest commit date
atlas 78d8d69c7f swarm-controller: mint each hive's matrix sender token
A hive whose homeserver runs on another host has no local
matrix-appservice-token, so hive-c0re's matrix sweep returned before
reaching the store read in ensure_hive_user: no @hive-<name>: token, no
Space, no chat room, no invites, and a sweep-health banner.

swarm-controller now mints @hive-<name>: with the swarm appservice
token for every hive in its directory, as a MintHiveSenderToken job
node queued by a five-minute pass, and stores it at
swarm/hives/<name>/matrix/sender-token, the same matrix::Credential
swarm-matrix-ctl writes there. It is keep-if-live, reusing agent_token's
classify/plan: a stored token whoami confirms as @hive-<name>: is left
alone, so only an absent or dead one is minted. agent_token's probe and
mint steps are lifted into probe_at/mint_at so both passes share them.

swarm-matrix-ctl mint still writes the path for its own hive when it is
empty. If both mint an empty path at once, one token is invalidated
(same pinned device); the next pass classifies it Revoked and re-mints.

hive-c0re's ensure_all no longer returns when there is no local
as_token. ensure_hive_user reads the store first on every sweep and
overwrites its token file when the store's token differs, keeps the
file when the store has none, mints with the local as_token only when
neither holds one, and fails with one error when there is nothing at
all. The decision is sender_source, unit-tested.

The controller's bao policy gains create/read/update on
swarm/hives/+/matrix/sender-token (`+`, since `*` is a glob only at the
end of a path), pinned in module-eval.

Refs #4427
2026-09-29 22:14:40 +02:00
..
agent_config hive-c0re: fail on an unparseable resource-limits or topology file, write both atomically 2026-09-27 02:41:38 +02:00
dashboard Make agent creation swarm-only and refuse a name placed on another hive 2026-09-29 15:47:40 +02:00
forge hive-c0re: stop reporting refused invites as success; re-register the config-PR hook when its secret changes 2026-09-27 04:41:31 +02:00
job_queue Make agent creation swarm-only and refuse a name placed on another hive 2026-09-29 15:47:40 +02:00
lifecycle hive-c0re: bound prebuild_toplevel's nix build with a timeout 2026-09-29 02:04:53 +02:00
socket_server Make agent creation swarm-only and refuse a name placed on another hive 2026-09-29 15:47:40 +02:00
stats hive-c0re: warn on a du failure that isn't just a missing path 2026-09-29 09:37:16 +02:00
stores Make agent creation swarm-only and refuse a name placed on another hive 2026-09-29 15:47:40 +02:00
workers Make agent creation swarm-only and refuse a name placed on another hive 2026-09-29 15:47:40 +02:00
actions.rs Make agent creation swarm-only and refuse a name placed on another hive 2026-09-29 15:47:40 +02:00
container_view.rs hive-c0re: fail on a malformed agent name and on an unreadable container list 2026-09-27 05:13:21 +02:00
coordinator.rs Make agent creation swarm-only and refuse a name placed on another hive 2026-09-29 15:47:40 +02:00
dashboard_events.rs Make agent creation swarm-only and refuse a name placed on another hive 2026-09-29 15:47:40 +02:00
gateway_nginx.rs gateway: $connection_upgrade does not come from recommendedProxySettings 2026-09-02 09:04:24 +02:00
loose_ends.rs hive-agent-mcp, hive-c0re, hive-sh4re: drop agent param from get_loose_ends 2026-09-20 05:36:49 +02:00
main.rs hive-screen-mcp: bound grim/wtype and VNC calls; hive-c0re: make messages match the code 2026-09-27 20:47:06 +02:00
matrix.rs swarm-controller: mint each hive's matrix sender token 2026-09-29 22:14:40 +02:00
meta.rs hive-c0re: fail on an unparseable resource-limits or topology file, write both atomically 2026-09-27 02:41:38 +02:00
migrate.rs hive-c0re: fail on a malformed agent name and on an unreadable container list 2026-09-27 05:13:21 +02:00
paths.rs hivectl, hive-c0re: remove dead matrix create-user/promote-user/reset-password 2026-09-29 13:13:59 +02:00
priv_client.rs hive-dashboard: remove the MATRIX credentials tab and its login route 2026-09-29 13:54:18 +02:00
server.rs swarm-controller: mint each hive's matrix sender token 2026-09-29 22:14:40 +02:00
snapshot_push.rs refactor(#2862): one snapshot store per swarm, not one per peer 2026-07-31 22:15:37 +02:00
swarm_agent_status.rs swarm: present tense + no-queue-coordinates wording 2026-09-13 12:01:58 +02:00
swarm_notices.rs swarm: present tense + no-queue-coordinates wording 2026-09-13 12:01:58 +02:00
swarm_queue.rs swarm-queue-based lifecycle notices, replacing push_todo(MANAGER_AGENT) 2026-08-24 14:34:37 +02:00
swarm_status.rs Make agent creation swarm-only and refuse a name placed on another hive 2026-09-29 15:47:40 +02:00
test_env.rs test(hive-c0re): one crate-wide lock for env-mutating tests 2026-08-19 01:38:54 +02:00
webhook_secret.rs hive-c0re: stop reporting refused invites as success; re-register the config-PR hook when its secret changes 2026-09-27 04:41:31 +02:00