| Filename | Latest commit message | Latest commit date |
|---|---|---|
act_runner records the --instance URL it was registered with and reads the forge address from .runner and nowhere else: the nix option reaches only `register`, and upstream re-registers on a changed token or labels, never on a changed URL. Our own precond short-circuits on .runner existing, and runner_valid asks whether the runner id still exists -- which after a rename it does. So changing swarm.forge.domain left the runner dialling a name its container's derived extraHosts no longer resolves, with every check green. The symptom is CI going quiet rather than anything failing. Compare the persisted address against the configured base as part of the same early return. A disagreement mints a fresh registration token, which changes the token hash upstream already keys on, so upstream removes .runner and re-registers against the current --instance. This module never writes or deletes that file; the deletion stays with the script that owns registration. The comparison is host-only and lenient on purpose. Both sides render from one nix expression -- http://${swarm.forge.domain}, reaching the runner as instances.hive.url and this daemon as HIVE_FORGE_URL -- so they cannot drift, while scheme, port and trailing slash are exactly the cosmetic differences that would otherwise re-register on every boot. Unreadable, missing or unparseable input keeps the existing credentials, matching runner_valid's treatment of a transport error: only a positive disagreement counts. |
||
| .. | ||
| src | ||
| Cargo.toml | ||
| README.md | ||
hive-c0re
The unprivileged host daemon (runs as hive-core). Owns the sqlite
broker, the approval/question/schedule queues, the generic job-DAG
queue, container lifecycle, gateway/forge/matrix provisioning,
per-container stats, and the axum operator dashboard. Largest crate in
the workspace — bin-only, no separate lib.
When to use it
Host-level, cross-container orchestration: spawning/rebuilding/
destroying agent containers, the approval flow, dashboard-visible
state, provisioning per-agent forge/matrix/gateway accounts. Agent-side
behavior (turn loop, MCP tools) lives in hive-agent/hive-agent-mcp
instead — this daemon only talks to agents over the socket wire types
in hive-sh4re.
Shape
Cohesive clusters live in directory submodules, each re-exported at
the crate root (crate::broker::… keeps resolving regardless of which
subdirectory a module actually lives in). One line each — read the
module's own //! doc-comment for real detail, don't expect this file
to track it:
dashboard/— the operator dashboard (containers, approvals, schedules, questions, logs, topology).job_queue/— the job-DAG queue + desired-state reconciliation (docs/coordinator.md).lifecycle/—nixos-containerlifecycle + per-agent config flake generation.stores/— sqlite-backed stores (broker, queues, audit, power).workers/— background sweeps (crash watch, scheduled prompts, auto-update, knowledge sync).agent_config/— per-agent registries (tool groups, capabilities, resource limits, topology).stats/— dashboard metrics aggregation + OTEL export.socket_server/— the unix-socket request server shared by per-agent + manager sockets.forge/— optional Forgejo wiring (docs/forge.md).coordinator.rs— top-level wiring forserve.meta.rs,migrate.rs— the meta flake + schema/state migrations.matrix.rs,gateway_nginx.rs,webhook_secret.rs,priv_client.rs— matrix provisioning, gateway vhosts, webhook secrets, and thehive-privclient respectively.
See the top-level CLAUDE.md/docs/ index for the full reading-path
map.