hyperhive/hive-c0re/src
müde 480d646f69 forge: auto-create a user + token per agent on spawn / startup
new forge module probes the hive-forge nixos-container (no-op when
absent), and ensures every agent + the manager has a forgejo user
named after them with an access token at `<state>/forge-token`
(visible inside the container as `/state/forge-token`).

idempotent: skips user creation when forgejo reports 'already
exists', skips token issuance when the file is present, scopes the
token to read:user,write:repository,write:issue. token-name suffixed
with a clock so re-issuing doesn't collide with a stale name. shells
out via `nixos-container run hive-forge -- runuser -u forgejo --
forgejo admin` (runuser instead of sudo since sudo isn't in the
container by default).

hooks: ensure_all sweeps existing containers at hive-c0re startup
(backgrounded), and the actions.rs spawn task calls ensure_user_for
the new agent right after lifecycle::spawn succeeds. failures log a
warning but don't abort spawn — a missing token is recoverable from
the next startup sweep.
2026-05-16 20:55:13 +02:00
..
actions.rs forge: auto-create a user + token per agent on spawn / startup 2026-05-16 20:55:13 +02:00
agent_server.rs fix broadcast send for manager, deduplicate into coordinator.broadcast_send 2026-05-16 19:31:53 +02:00
approvals.rs feat: add optional description to request_apply_commit and request_spawn 2026-05-16 15:18:32 +02:00
auto_update.rs fix: transient state leak via RAII guard 2026-05-16 19:47:52 +02:00
broker.rs remove unused broker/coordinator methods 2026-05-16 13:02:53 +02:00
client.rs hive-c0re: admin socket server + client (stub dispatch) 2026-05-14 20:49:11 +02:00
coordinator.rs fix: transient state leak via RAII guard 2026-05-16 19:47:52 +02:00
crash_watch.rs manager: needs_login / logged_in / needs_update events + update tool 2026-05-15 21:42:13 +02:00
dashboard.rs fix: transient state leak via RAII guard 2026-05-16 19:47:52 +02:00
events_vacuum.rs events.sqlite vacuum moves host-side 2026-05-15 20:10:34 +02:00
forge.rs forge: auto-create a user + token per agent on spawn / startup 2026-05-16 20:55:13 +02:00
lifecycle.rs refactor: per-agent state paths (/agents/{label}/state), centralize in paths.rs 2026-05-16 15:18:32 +02:00
main.rs forge: auto-create a user + token per agent on spawn / startup 2026-05-16 20:55:13 +02:00
manager_server.rs add get_logs tool to manager mcp surface 2026-05-16 20:45:19 +02:00
meta.rs dashboard: meta flake inputs UI + sequential rebuild loop 2026-05-16 03:38:07 +02:00
migrate.rs fix: transient state leak via RAII guard 2026-05-16 19:47:52 +02:00
operator_questions.rs ask_operator: any agent can call it, answer routes by asker 2026-05-16 01:48:10 +02:00
server.rs feat: add optional description to request_apply_commit and request_spawn 2026-05-16 15:18:32 +02:00