hyperhive/hive-c0re
Repository files (latest commit first)
Filename Latest commit message Latest commit date
atlas be27a62fb1 refactor(#2825): complete_node takes only the node id
`NodeId` has been globally unique across DAGs since #2801, so the dag id
carried no information the node id didn't. The parameter was already
underscore-prefixed as unused, but still populated by `claim_ready`, carried
through the scheduler's mpsc on every `Claim`, and passed at the call site —
three layers of plumbing feeding a dead argument.

Removing it surfaced four more dead things it had been keeping alive:
`settle_approval_tail`, `settle_rebuild_tail` and `drain_meta_syncs` each took
a dag id they only forwarded to `complete_node`, and one `submit` binding was
never read. Those are deleted rather than underscore-prefixed — prefixing is
what let the original argument survive this long.

`Claim.dag_id` stays: it has live consumers in the tracing spans,
`append_subgraph`'s container guard, `Ctx` for the build-log link,
`first_error`, and the approval-deploy context.
2026-07-28 12:42:31 +02:00
..
src refactor(#2825): complete_node takes only the node id 2026-07-28 12:42:31 +02:00
Cargo.toml docs: declare readme = "README.md" for the last four crates 2026-07-27 09:35:06 +02:00
README.md docs: trim readmes down, stop restating impl detail the module docs already own 2026-07-26 21:01:00 +02:00

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-container lifecycle + 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 for serve.
  • 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 the hive-priv client respectively.

See the top-level CLAUDE.md/docs/ index for the full reading-path map.