| Filename | Latest commit message | Latest commit date |
|---|---|---|
`graph_node` projects a `hive_jobq::Node` onto the wire type from the parent commit: everything the crate records, with hive-c0re's own fields (`agent`, `approval_id`, `inputs`, `build_log_id`) collected into the opaque payload slot instead of standing as named columns. A node with nothing domain-specific to say serialises no `data` key at all, so the slot costs nothing when it is unused. `graph_dep` turns a `DepWhen` into the set of outcomes that satisfy the edge by asking it about each of the four terminal states, rather than leaking the bitflags representation onto the wire. `Resource::wire_name` gives the resource vocabulary a string form — hive-jobq is generic over the resource type, so a viewer that renders any graph cannot be handed this enum. The `agent:` prefix keeps per-agent leases from colliding with a global resource sharing an agent's name. `graph_snapshot` deliberately reuses `visible_dags` for retention: every live group plus the newest terminal ones. Serving the raw graph would grow without bound — evicted groups' nodes linger until bounded pruning lands. Within a retained group nothing is filtered: group roots ride as ordinary nodes, and `Done` nodes stay, which is the projection defect behind the "rebuild shows a single node" report. The endpoint lands in the same commit rather than after it. Without a consumer the whole projection is dead code, and a wire type nobody produces cannot be reviewed for whether it says the right things. Its OpenAPI body is `serde_json::Value`, matching `api_state`: no type in `hive-host-sock` derives `ToSchema`, and that crate stays dependency-lean on purpose. |
||
| .. | ||
| 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.