hyperhive/hive-ag3nt/src
Repository files (latest commit first)
Filename Latest commit message Latest commit date
damocles 5e0cb5e0f5 hive-c0re + harness: filter agent-sockets.json by .bound marker (#784, atlas concern)
closes the gate atlas raised on PR #813: without per-agent opt-in
signal, agent-sockets.json listed every sub-agent, and any agent
that hadn't flipped hyperhive.web.useUnixSocket would 502 the
gateway (its harness still binds TCP, no socket at the published
path).

harness side (web_ui::bind_unix):
- after successful bind + chmod, drop a `.bound` marker in the
  per-agent dir as a stable 'this agent has a unix socket here'
  signal. best-effort: a failed marker write logs at WARN but
  doesn't abort serve (the socket still binds fine; gateway just
  keeps using TCP for one more poll).

c0re side (agent_sockets):
- new READY_MARKER const + ready_marker_for(name) helper
- build_map filters by ready_marker_for(name).exists() — only agents
  whose harness has bound the socket appear in the JSON map
- new build_map_with<F> internal extracts the predicate so tests
  pass a controlled is_ready closure (no real fs access)
- new spawn_poll() background task: re-fires agent_sockets::write
  every 10s so the JSON catches up to fresh markers without
  needing a container-start hook. write() idempotency means
  steady-state cost is one stat per agent per tick.

10 tests: 6 prior + new build_map_filters_by_ready_predicate +
ready_marker_path_is_sibling_of_socket. existing tests adjusted to
call build_map_with(_, |_| true) since the default path now hits
the fs.

once this lands + #822 lands, atlas's gateway-side step 3 can drop
its eval-time `pathExists` fallback — c0re only publishes opted-in
agents, so the gateway can trust the JSON unconditionally.
2026-05-31 16:28:36 +02:00
..
bin harness: collapse Surface::DEFAULT_LABEL → single 'hive' fallback (#788) 2026-05-31 15:02:28 +02:00
client.rs docs: add missing #[must_use], # Errors, # Panics across public api 2026-05-22 19:41:27 +02:00
events.rs clippy: fix lints that crane's cargoClippy properly enforces (#538) 2026-05-29 01:45:48 +02:00
forge_notify.rs clippy: fix lints that crane's cargoClippy properly enforces (#538) 2026-05-29 01:45:48 +02:00
identity.rs harness: surface hive + swarm display names to agents (#701) 2026-05-31 11:42:55 +02:00
lib.rs hive-ag3nt: identity module with hive-qualified label (#589 phase A, first PR) 2026-05-29 19:09:44 +02:00
login.rs agents: drop root, run as per-agent unix user with passwordless sudo (#658) 2026-05-30 21:45:09 +02:00
login_session.rs agents: drop root, run as per-agent unix user with passwordless sudo (#658) 2026-05-30 21:45:09 +02:00
mcp.rs get_agent_meta: include hive_name + swarm_name in response (#710) 2026-05-31 12:50:19 +02:00
paths.rs harness: write claude configs to systemd RuntimeDirectory + chown ~/.claude on activation (#658 fixup) 2026-05-30 22:57:26 +02:00
plugins.rs harness: drop manager special case from plugins notify (#778, mara feedback) 2026-05-31 14:53:59 +02:00
prompt.rs prompt: thread hive + swarm display names into system prompt opener (#709) 2026-05-31 12:15:34 +02:00
serve_common.rs harness: flip into needs_login on 401 mid-turn (closes #419) 2026-05-25 21:50:21 +02:00
stats.rs docs: add missing #[must_use], # Errors, # Panics across public api 2026-05-22 19:41:27 +02:00
turn.rs harness: unify hive-ag3nt + hive-m1nd into one binary picking role from HIVE_ROLE (#598) 2026-05-31 03:21:06 +02:00
turn_stats.rs docs: add missing #[must_use], # Errors, # Panics across public api 2026-05-22 19:41:27 +02:00
web_ui.rs hive-c0re + harness: filter agent-sockets.json by .bound marker (#784, atlas concern) 2026-05-31 16:28:36 +02:00