| Filename | Latest commit message | Latest commit date |
|---|---|---|
mara hit this directly: setting an agent's memory cap to "16GB" fails with 'invalid MemoryMax "16GB": expected a size such as "8G"...'. Confirmed directly against a running systemd 260 (systemd-run -p MemoryMax=<value>): systemd's own parser accepts a bare byte count, <digits>B, or <digits> plus exactly one uppercase K/M/G/T, and rejects both "16GB" (redundant B after a multiplier) and "16g" (lowercase) with "Invalid argument". So the prior rejection of "16GB" matched systemd, but is bad UX for input a human reasonably expects to work. validate_memory_max now returns the value to store (not just an ok/err verdict): it accepts 8gb/8Gb/8GB/8g/8G interchangeably and normalizes all of them to systemd's own 8G form before it is ever persisted or passed downstream. Also fixes the adjacent bug the same investigation turned up: the old validator incorrectly accepted lowercase (8g) even though systemd itself rejects it. Updated both call sites (server.rs, dashboard/lifecycle_ops.rs) to use the normalized return value. New test friendly_size_spellings_normalize_to_systemds_own_form; flipped the old "8GB should be rejected" assertion, which encoded the human-hostile behavior this fixes. |
||
| .. | ||
| src | ||
| Cargo.toml | ||
| README.md | ||
hive-c0re
The unprivileged host daemon (runs as hive-core). Owns the sqlite
broker, the approval/reminder/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, logs, topology).job_queue/— the job-DAG queue + desired-state reconciliation (docs/scheduler/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/integrations/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.