hyperhive/docs
Repository files (latest commit first)
Filename Latest commit message Latest commit date
atlas 3a29aee001 nix/hive-gateway: UDS upstream for /agent/<name>/ (#784 phase 2 step 3)
Switch per-agent gateway upstreams from TCP loopback to unix-domain
socket when the agent has opted in via `hyperhive.web.useUnixSocket`
(#822). Coexists with the TCP path during rollout.

Changes:

- New `agentSocketsFile` option (default
  `/var/lib/hyperhive/agent-sockets.json`) — c0re writes the map
  there via `hive_c0re::agent_sockets::write` (#809).
- `agentSocketsTable = lib.importJSON ...` (graceful empty when
  file missing).
- `agentUpstreamFor name port` picks `http://unix:<path>:/` when the
  socket has a JSON entry AND the file exists at eval time; else
  `http://127.0.0.1:<port>/`. Path-exists gate guards against
  c0re's blanket-emit shape during the canary window (agents in
  `agent-sockets.json` who haven't actually flipped have no
  bound socket on disk → fall back to TCP). Damocles will ship a
  `.bound` marker filter on the c0re side (#784 step 2d
  follow-up); once that's in, the path-exists check is redundant
  but harmless. Step 4 drops it entirely along with the TCP
  fallback.
- `containers.hive-gateway.bindMounts."/run/hive-agent"` —
  read-only, unconditional. Inert when no agents have opted in.
  Required so nginx inside the gateway container can `connect(2)`
  to the per-agent sockets damocles's #813 bind-mounts into agent
  containers at the same paths.

Docs:

- `docs/gateway.md::Per-agent UDS upstream (#784)` — full rollout
  flow, subdir-bind rationale (damocles #813), eval-time gate
  explainer, step 4 drop plan.

`nix flake check` clean; `nix fmt` clean.

Canary plan: once #822 (`useUnixSocket` option) lands + this PR
merges, manager flips atlas's agent.nix to `useUnixSocket = true`
via the config-update flow. End-to-end validation against atlas
before broader rollout.
2026-05-31 16:14:02 +02:00
..
agent-hierarchy.md docs/agent-hierarchy.md: scrub self-ref cookies (#719 batch 5) 2026-05-31 15:49:37 +02:00
approvals.md hive-sh4re + docs: extract Approval lifecycle prose (#717 batch 3) 2026-05-31 16:12:36 +02:00
boundary.md docs: move backlog to forge issue tracker, extract boundary doc 2026-05-20 12:19:16 +02:00
conventions.md hive-sh4re + docs: extract LooseEnd wire-shape prose (#717 batch 4) 2026-05-31 16:13:24 +02:00
damocles-migration.md Phase 7e: damocles migration plan; CLAUDE.md phase status 2026-05-15 00:32:26 +02:00
gateway.md nix/hive-gateway: UDS upstream for /agent/<name>/ (#784 phase 2 step 3) 2026-05-31 16:14:02 +02:00
gotchas.md docs/gotchas.md: scrub self-ref cookies (#719 batch 3) 2026-05-31 15:46:02 +02:00
matrix.md docs/matrix.md: extract hive-matrix prose (#718 batch 5) 2026-05-31 15:38:43 +02:00
persistence.md docs/persistence.md: scrub self-ref cookies (#719 batch 4) 2026-05-31 15:49:32 +02:00
security.md docs: scrub self-ref cookies across 5 files (#719 batch 2) 2026-05-31 15:39:09 +02:00
terminal-rendering.md docs: scrub self-ref cookies across 5 files (#719 batch 2) 2026-05-31 15:39:09 +02:00
turn-loop.md docs: scrub self-ref cookies across 5 files (#719 batch 2) 2026-05-31 15:39:09 +02:00
web-ui.md docs/web-ui.md: scrub self-ref cookies (#719 batch 1) 2026-05-31 15:38:28 +02:00