| Filename | Latest commit message | Latest commit date |
|---|---|---|
Step 1 of removing the localhost fallbacks: make the renderer emit the value it already knows, so the option stops being a second, disagreeing source of truth. These options existed but nothing ever set them, so every agent fell back to their localhost:<port> defaults while the real value reached the container only as an env var. The two are consumed at different times — the option is baked into scripts at build time (tea-login's FORGE_URL), the env var is read at runtime — so which answer a given code path gets depends on which one it happens to read. Emitting them here follows the shape the otel block already uses: host state becomes build-time agent module config. It is the precondition for deleting the defaults, which is the actual fix: a loopback address is only correct when the callee shares the caller's netns, and the forge and homeserver are moving to swarm level, possibly onto other hosts. An absent var emits nothing rather than a guess. Once the defaults are gone that surfaces as an eval failure, which is the point — better a build that stops than an agent quietly talking to a port on the wrong machine. The emit is a pure helper rather than an inline loop so it can be tested without process env. The first version of the test set env vars and rendered the whole flake; it failed because the parallel runner raced it against the existing env-mutating test, not because of any defect. Testing the pure function has no such hazard, and the render-level variant is kept #[ignore]d with that reason recorded. |
||
| .. | ||
| 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.