Commit graph

27 commits

Author SHA1 Message Date
müde
62d1a74929 docs sync + revert auto-unfree removal
revert the earlier 'operator must set allowUnfree' move:
per-agent containers evaluate their own nixpkgs and the operator's
host-level allowUnfree doesn't propagate in. restoring the scoped
allowUnfreePredicate inside both the claude-unstable overlay and
harness-base.nix; documented in README + gotchas as 'nothing to
set on the operator side'.

docs:
- claude.md file map adds crash_watch.rs, kick_agent on coordinator,
  /api/model + journald viewer + bind-with-retry references.
- scratchpad rewritten to reflect the recent run.
- web-ui.md: notification row + browser notifications section,
  state row (badge + model chip + last-turn chip + cancel button),
  per-agent inbox, /model slash, /cancel-question + journald
  endpoints, focus-preservation on refresh.
- turn-loop.md: --model is read from Bus::model() per turn (runtime
  override via /model); recv(wait_seconds) up to 180s with the
  rationale; ask_operator gains ttl_seconds; new TurnState section;
  kick_agent inbox-on-startup hint.
- approvals.md: ttl/cancel resolution paths for operator questions.
- persistence.md: /state/hyperhive-model file.
- gotchas.md: web UI port collision policy (rename, don't probe);
  bind retry + SO_REUSEADDR shape; auto-unfree restored.
- todo.md: cleaned up empty sections and stale entries; /model
  shipped, dropped from the list.
2026-05-15 21:26:13 +02:00
müde
8b9f7d21b7 model persisted to /state; stop auto-allowing claude-code unfree
model persistence: /model <name> now writes to /state/hyperhive-model
(in-container), Bus::new reads it on init. operator override survives
harness restart and container rebuild; gone on --purge like every
other piece of agent state. path overridable via HYPERHIVE_MODEL_FILE
for tests. failure to persist is a warn, not fatal — runtime override
still applies, just won't survive a restart.

unfree opt-in: drop the auto-allowUnfreePredicate from
harness-base.nix and the claude-unstable overlay. operator now has to
set nixpkgs.config.allowUnfree (or a predicate listing claude-code)
in their own host config. silent unfree bypass was sketchy; this is
honest. readme + gotchas updated to spell out the snippet.

todo: drops model-persistence + container-crash + journald (all
shipped); adds per-agent send allow-list (constrain who an agent can
message).
2026-05-15 21:05:40 +02:00
müde
300be8afa9 operator control: /cancel slash command + cancel button
new POST /api/cancel on the per-agent web UI: shells out
pkill -INT claude (procps added to harness-base.nix). emits a Note
on the bus so the operator sees the cancel landed; state goes back
to idle when run_claude wakes and emits TurnEnd as usual.

frontend:
- /cancel slash command in the terminal input
- ■ cancel turn button in the state row, visible only while
  state === 'thinking' (driven from the same SSE-based state
  machine). disabled briefly during the POST.

claude gets SIGINT (not TERM) so it flushes anything in-flight and
emits a final result row before exiting.
2026-05-15 19:45:37 +02:00
müde
070b237d03 docs: SPA pattern noted, todo cleared; harness-base git config mkDefault
programs.git.config.user.{name,email} in harness-base.nix now mkDefault
so the per-agent applied flake's override merges without mkForce.
2026-05-15 17:17:48 +02:00
müde
e2aa40409e module: default hyperhiveFlake to self — operator no longer sets it 2026-05-15 16:54:05 +02:00
müde
4f91dfef99 module: thread hyperhive package directly — operators don't apply overlays 2026-05-15 16:51:18 +02:00
müde
0f0e242906 programs.git.enable + harness PATH tracks systemPackages
- harness-base.nix: switch to programs.git for declarative gitconfig.
- agent + manager service path = /run/current-system/sw → agents pick up
  new packages from their own agent.nix without harness edits.
- generated applied/<name>/flake.nix overrides programs.git.config.user
  (no more raw etc.gitconfig collision).
2026-05-15 16:16:14 +02:00
müde
e1289a3e4c nix templates: factor harness-base.nix (shared scaffolding incl. gitconfig) 2026-05-15 16:10:55 +02:00
müde
cb62e15d4f containers: install bashInteractive + set SHELL for claude's Bash tool 2026-05-15 16:06:32 +02:00
müde
1cbfacda20 agent + manager: put claude-code on the harness service PATH 2026-05-15 13:14:28 +02:00
müde
7c1ed07cf2 lifecycle: HYPERHIVE_GIT env override (bypass PATH); module sets it 2026-05-15 00:24:51 +02:00
müde
42e7761ea1 module: include pkgs.git directly in service path 2026-05-15 00:19:16 +02:00
müde
9133d9e1a3 Phase 7b: broker broadcast + dashboard SSE message-flow tail; pkgs.git in module 2026-05-15 00:13:34 +02:00
müde
8cf5d72798 Phase 6b: vibec0re-styled dashboard on hive-c0re + agent web UI restyled 2026-05-14 23:43:20 +02:00
müde
d0f954bbc1 Phase 6a: per-container web UI (axum); per-agent port hashed from name 2026-05-14 23:39:06 +02:00
müde
da655d31c8 manager: /etc/gitconfig so commits in /agents work out of the box 2026-05-14 23:11:57 +02:00
müde
433c0d212e Phase 5b: per-agent config flakes; approve validates + advances commit 2026-05-14 23:09:35 +02:00
müde
17092961a2 Phase 4: hive-m1nd harness + manager nixos template; devshell sqlite 2026-05-14 22:36:34 +02:00
müde
2a98e3ca87 fmt 2026-05-14 22:27:03 +02:00
müde
6e7fd2e897 Phase 3c: nixpkgs-unstable for claude-code; harness calls claude --print, falls back to echo 2026-05-14 22:26:14 +02:00
müde
af464e27f4 rebuild re-registers agent; preserve /run/hyperhive across restarts 2026-05-14 22:13:00 +02:00
müde
746132d41e agent-base: boot.isNspawnContainer (required on 25.11+) 2026-05-14 22:10:18 +02:00
müde
61407f41c9 hive-ag3nt: serve loop + send/recv CLI; template runs serve 2026-05-14 21:44:05 +02:00
müde
11e999ca93 module: add /run/current-system/sw to service path for nixos-container 2026-05-14 21:24:37 +02:00
müde
e541f2ac70 module: expose hive-c0re CLI in environment.systemPackages 2026-05-14 21:21:10 +02:00
müde
b1b11cf17c module: serve subcommand + runtime/state dirs 2026-05-14 20:52:44 +02:00
müde
c67584c7c1 flake: expose hyperhive package + nixos module + agent-base container 2026-05-14 20:33:25 +02:00