Watch
0
0
Fork
You've already forked hyperhive
0
hyperhive/hive-c0re
Repository files (latest commit first)
Filename Latest commit message Latest commit date
atlas b68a8ef290 swarm-authelia: run the secret publisher and a journal forwarder inside the container
swarm-secret-publish and its path unit now run inside authelia's container,
beside the mint, and read each client secret at the path authelia writes it.
The host unit and host path unit, which read the secrets through the
container's root on the host, are gone, and so is
deploy.authelia.hostClientSecretDir, which only they read. The publisher keeps
its store identity, the secret-publisher leaf. The host hands the leaf and the
store's CA into the container as nspawn system credentials, and the unit loads
them; where this host mints the leaf, the container waits for swarm-bao-pki.
Authelia does not wait for the publisher, which retries every 30 seconds while
the store is down.

The container also runs the journal forwarder the other service containers
run, pushing to a receiver of its own on the swarm collector (serviceProducers
swarm-authelia) as a new machine OIDC client (swarm.authelia.otel.clientId)
that authelia registers for itself and the publisher carries to the store. The
fetch unit reads it back under the publisher's leaf, also handed to it as a
system credential, so the swarm-secret-publisher policy gains read on that one
leaf; its stanza keeps create and update, which the exact path would otherwise
take from the services/* prefix. Without the leaf the forwarder is off.

The container drops --link-journal=host, and the host collector stops reading
it. The services' "nothing at <path>" errors name the publisher in authelia's
container.
2026-10-17 00:28:16 +02:00
..
src swarm-authelia: run the secret publisher and a journal forwarder inside the container 2026-10-17 00:28:16 +02:00
Cargo.toml gateway: serve the hive dashboard on <hive>.hives.<swarm> behind authelia, drop htpasswd 2026-10-15 21:44:27 +02:00
README.md drop the manager socket, the no-op migrate branch and other ruth special cases 2026-10-16 21:42:26 +02:00

hive-c0re

The unprivileged host daemon (runs as hive-core). Owns the sqlite broker, the reminder queue, the generic job-DAG queue, container lifecycle, gateway vhost wiring, forge/matrix config reconciliation, 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, dashboard-visible state, wiring each agent's gateway vhost and reconciling its forge config-repo access and matrix room membership. The accounts themselves are swarm-controller's (docs/integrations/forge.md). 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, schedules, logs, topology).
  • job_queue/ — the job-DAG queue + desired-state reconciliation (docs/scheduler/coordinator.md).
  • lifecycle/ — nixos-container lifecycle + per-agent config flake generation.
  • stores/ — sqlite-backed stores (broker, queues, audit, power).
  • workers/ — background sweeps (crash watch, autoupdate, knowledge sync).
  • agent_config/ — per-agent registries (permissions, resource limits, topology).
  • stats/ — dashboard metrics aggregation + OTEL export.
  • socket_server/ — the unix-socket request server for the per-agent sockets.
  • forge/ — optional Forgejo wiring (docs/integrations/forge.md).
  • coordinator.rs — top-level wiring for serve.
  • meta.rs, migrate.rs — the meta flake + schema/state migrations.
  • matrix.rs, gateway_nginx.rs, priv_client.rs — matrix provisioning, gateway vhosts, and the hive-priv client respectively.

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