Commit graph hyperhive/CLAUDE.md
Author SHA1 Message Date
iris
2080fd3866 feat: live SSE updates for P3RM1SS10NS tab (capabilities + tool groups)
Add CapabilitiesChanged and ToolGroupsChanged DashboardEvent variants
so the P3RM1SS10NS tab reflects perm changes without the operator
navigating away and back.

Backend:
- DashboardEvent::CapabilitiesChanged { seq, caps, descriptions,
  assignments } — same payload shape as GET /api/capabilities
- DashboardEvent::ToolGroupsChanged { seq, groups, descriptions,
  assignments } — same payload shape as GET /api/tool-groups
- Coordinator::emit_capabilities_snapshot() and
  emit_tool_groups_snapshot() — read from the JSON files and broadcast
- rebuild_queue.rs PermChange worker: emit after each successful
  commit_capabilities / commit_tool_groups call

Frontend:
- applyCapabilitiesChanged(ev): calls renderCapabilities(root, ev)
- applyToolGroupsChanged(ev): calls renderToolGroups(root, ev)
- Both registered in MUTATION_HANDLERS
- activateTab comment updated (SSE now covers perm changes)

Docs: dashboard.md and CLAUDE.md updated.

This completes SSE coverage for all dashboard sections: SW4RM,
Y3R C4LL, SYST3M, SCH3DUL3S/reminders, and P3RM1SS10NS all
derive live updates from /dashboard/stream.
2026-06-05 12:06:32 +02:00
iris
a1e46e2b3d feat: live SSE updates for the SYST3M reminders section
Add RemindersChanged SSE event so the pending-reminders list in the
SYST3M tab updates live without polling.

Backend emission sites (every path that mutates the reminders table):
- agent_server: store_remind (remind MCP call)
- dashboard.rs: post_cancel_reminder, post_retry_reminder
- questions.rs: cancel_loose_end Reminder kind
- reminder_scheduler: after each delivery batch (any_delivered)

Coordinator gets emit_reminders_snapshot() mirroring the existing
emit_schedules_snapshot() pattern: lists PendingReminder rows from the
broker and emits DashboardEvent::RemindersChanged.

Frontend: applyRemindersChanged(ev) calls renderReminders(ev.reminders)
and is registered as reminders_changed in MUTATION_HANDLERS.

Docs: dashboard.md reminders_changed entry; CLAUDE.md file map updated.
2026-06-05 12:06:32 +02:00
iris
76c4a67b1c feat: live SSE updates for the SCH3DUL3S tab
Add `SchedulesChanged` to the dashboard event channel so the
operator's schedule list updates in real time without requiring a
tab-activation or form-submit refresh.

Backend:
- `dashboard_events.rs`: new `SchedulesChanged { seq, schedules }`
  variant carrying a full `Vec<WireSchedule>` snapshot (same
  snapshot-over-diff rationale as `RebuildQueueChanged`).
- `coordinator.rs`: `emit_schedules_snapshot()` helper — queries the
  scheduled_prompts list, converts to wire shape, broadcasts the event.
- `dashboard.rs`: call `emit_schedules_snapshot()` at the end of each
  operator API handler that mutates a schedule:
  `post_schedule_new`, `post_schedule_fire_now`,
  `patch_schedule`, `post_schedule_cancel`.
- `scheduled_prompts_worker.rs`: call `emit_schedules_snapshot()`
  after each tick that fires schedules, so `last_fired_at_unix`,
  `next_fire_at_unix`, and reaped one-shots surface live.

Frontend:
- `tabs.js`: add `applySchedulesChanged(ev)` — replaces
  `schedulesState` from the snapshot and calls `renderSchedulesList()`.
  Registered in `MUTATION_HANDLERS` as `schedules_changed`.
  Tab-activation re-fetch kept as safety net for approval-path
  inserts and disconnect windows; comment updated to reflect this.

Docs:
- `docs/web-ui/dashboard.md`: document `schedules_changed` event.
- `CLAUDE.md`: add `SchedulesChanged` to the file-map entry.
2026-06-05 12:06:32 +02:00
damocles
d60414cde1 docs: move hive-forge cli reference to docs/tools/forge.md 2026-06-05 00:57:18 +02:00
damocles
98f96e5435 feat(#1315): hive-forge attachment-get verb - download attachments by uuid or url 2026-06-05 00:46:49 +02:00
iris
86165f07c8 docs: update hivectl verb list in CLAUDE.md (add gateway, agents, choom) 2026-06-05 00:46:17 +02:00
damocles
681a86bce9 fix: address argus review on #1260 — drop stale HIVE_ROLE and mcp::Flavor refs from CLAUDE.md 2026-06-04 14:31:44 +02:00
damocles
41eb3f806c refactor: remove hyperhive.role option — there is only one role: agent 2026-06-04 14:31:44 +02:00
damocles
78a00d1258 docs(#1251): split MCP tool docs into docs/tools/ sub-mds by feature 2026-06-04 13:51:39 +02:00
damocles
e58ead4329 fix: address argus+mara review on #1243 — stale docs, MANAGER_DEFAULT refs, ruth migration 2026-06-04 12:15:03 +02:00
damocles
f56b272a23 remove Role::Manager + ManagerSurface + Flavor::Manager — there is only one role: agent 2026-06-04 12:15:03 +02:00
iris
4a632fabcc docs(CLAUDE.md): fix stale systemd-run reference in gateway_nginx.rs entry
Argus flagged that since PR #1054 the nginx reload path is
`gateway_systemctl(["reload", "nginx"])` = `systemctl -M hive-gateway reload nginx`.
Replace the stale `systemd-run --machine=hive-gateway` reference.
2026-06-02 12:47:36 +02:00
iris
b8b571b626 docs(CLAUDE.md): add missing hive-c0re modules to file map
Four modules were absent: capabilities.rs, build_logs.rs,
gateway_nginx.rs, priv_client.rs. Added at their natural
positions alongside related modules.
2026-06-02 12:47:36 +02:00
iris
febb10a7d7 docs(CLAUDE.md): note capabilities in conventions.md file map entry 2026-06-02 12:46:12 +02:00
iris
cd6cbf9997 chore: fix stale build.mjs comments + CLAUDE.md dashboard package map 2026-06-02 11:19:32 +02:00
damocles
19e7d8d5d3 docs: add stats_vacuum + bash_tasks_vacuum entries to CLAUDE.md file map 2026-06-01 16:11:08 +02:00
lexis
7f91d52569 docs: add ci.md to CLAUDE.md + clarify runner details
Follow-up to #905: adds CLAUDE.md index entries (file map + reading path)
for the new docs/ci.md. Also clarifies runner details in ci.md:
- curl/jq use absolute nix store paths (no systemPackages needed)
- .runner credential reuse: script writes dummy token on subsequent boots,
  runner ignores it when .runner file exists
2026-06-01 15:52:01 +02:00
damocles
42a7d2eb0a docs: add tool_groups, limits, flake_check to CLAUDE.md file map 2026-06-01 14:39:16 +02:00
damocles
f3e4f10dea docs: fix stale /state/ paths in CLAUDE.md file map (harness-state split) 2026-06-01 14:39:16 +02:00
damocles
ba7e9b0ef2 feat(#438): add StartupSweep queue kind — group boot-time rebuilds under a parent entry 2026-06-01 13:04:13 +02:00
damocles
98d9204ebf feat(#513): add ToolGroup enum, derive allowed_mcp_tools from groups + HIVE_TOOL_GROUPS env 2026-06-01 13:03:51 +02:00
lexis
f20432430d docs(CLAUDE.md): add coordinator.md entry (follow-up to #928) 2026-06-01 11:24:24 +02:00
iris
6f25ff7ee7 docs: add ci.md — hive-ci Forgejo Actions runner guide 2026-06-01 00:05:53 +02:00
iris
b79ef005b5 docs: add swarm.md — multi-hive peer config guide 2026-05-31 23:51:31 +02:00
iris
c7360cf0bb docs(#727): split docs/web-ui.md into shape / dashboard / agent
docs/web-ui.md (1315 lines) split into three sub-files:
- docs/web-ui/shape.md   — shared SPA skeleton, SSE multiplexing,
  Worker-death self-heal, terminal pane, listener bind, relative
  paths, atomic repaint, side panel
- docs/web-ui/dashboard.md — SW4RM/Y3R/SYST3M/SCH3DUL3S/S3TT1NGS
  tabs, container row, topology tree, selection bar, approval card,
  dashboard endpoints + event channel
- docs/web-ui/agent.md   — header, terminal, composer, inbox, live
  view, slash commands, per-agent endpoints, stats page

docs/web-ui.md replaced with a thin index linking all three.

Section anchors in docs (gateway.md, gotchas.md), Rust doc comments
(hive-ag3nt/src/web_ui.rs), and nix/templates/weston-vnc.nix updated
to point at the correct sub-file. README and CLAUDE.md file-map
updated with sub-file links. Inline // comments in frontend source
left unchanged (they reference the index which redirects to the right
sub-file).
2026-05-31 21:37:04 +02:00
damocles
fce1f49f6a refactor(#838): consolidate harness state files into hyperhive-harness.json 2026-05-31 20:32:13 +02:00
iris
6bdfe52386 docs: scrub #NNN self-references (closes #719)
Last pass of the docs-from-code → docs/ epic (#708). Drops every
attribution cookie from docs/ + README.md + CLAUDE.md so the
source-tree files no longer reference the issue tracker. Issue
threads + commit history retain the references — those are the
canonical record.

- README.md: drop #701 / #660×2 / #551 from matrix + display-name
  sections, rephrase to convey the semantics directly
- CLAUDE.md: scrub 18 cookies from the file map (#655, #15, #784,
  #832, #444, #425, #361, #548, #598, #539, #544, #589, #701,
  #658, #280, #660, #551, #764, #772, #793, #14, #805)
- docs/agent-hierarchy.md: drop #658 ×3 (per-agent user is the
  current shape, not a transition)
- docs/conventions.md: drop #571 (replaced with a docs xref to
  persistence.md::matrix-avatar-sync)
- docs/gateway.md: scrub vhost-map table cookies + Sub-domain
  rationale + Per-agent unix-socket upstream + Self-signed TLS +
  Firewall posture + HIVE_FORGE_URL + Per-agent error pages
  sections; drop the trailing 'Sequencing history' issue list +
  the 'Next-up' issue-link footnote
- docs/matrix.md: scrub serverName/gatewayHost + Default-closed
  firewall + Provisioning flow + Initial rollout + Assertion
  rationale + fluffychat-web build fixes; drop the trailing
  'Sequencing history' issue list
- docs/network.md: drop 'Why ship before #14' #805 quote +
  Container shape #805 attribution + trailing 'Sequencing history'
  + Cross-references issue links; rename v2 column to 'after netns
  isolation'
- docs/web-ui.md: drop #784 from Container row, replace with a
  docs xref to docs/gateway.md::Per-agent unix-socket upstream

Only remaining #NNN in docs/ is the literal markdown-heading
example in docs/forge.md (`#tag`, `#123`, `#!/bin/bash`)
which demonstrates the renderer's behaviour — not an attribution
cookie.
2026-05-31 17:47:21 +02:00
iris
76d3267b55 hive-ag3nt + docs: extract forge_notify prose (#716 batch 4)
forge_notify.rs is the biggest remaining #716 hotspot: ~22 attribution
cookies (#110 #230 #231 #253 #256 #455 #518 #539 #544) plus a thick
module-level docstring + per-function rationale blocks for the
notification pipeline. The substantive prose lives in a new
`docs/forge.md` covering the wider forge integration story:

- Per-agent forge accounts + agent-configs mirror (was implicit
  across `hive-c0re/src/forge.rs` rustdocs).
- Notification poller: activation gates, self-notification filtering,
  body excerpt + truncation + ATX heading escape pipeline, wrapper
  formats (comment / review / new-item / state-change) with shape
  table, meta suffix shape, review-request override, reason
  drop-list rationale (drop vs allow), auto-unsubscribe on broad
  watches.

In-code rustdocs reduced to 1-line semantic summaries + doc
pointers; inline cookie comments scrubbed. Net diff is ~150 lines
removed from the .rs file. All 16 forge_notify unit tests pass.

CLAUDE.md gets a new `docs/forge.md` file-map entry + reading-path
question entry. The existing `src/forge_notify.rs` file-map blurb
keeps its `(#539 / #544)` cookie — consistent with the rest of
CLAUDE.md's lineage attributions.
2026-05-31 17:17:24 +02:00
lexis
0d328d1fcd docs(CLAUDE.md): add network.md to file index + reading paths (follow-up to #845) 2026-05-31 16:56:08 +02:00
damocles
73e55dc44a docs(CLAUDE.md): note .bound marker filter on agent_sockets (follow-up to #832) 2026-05-31 16:31:46 +02:00
lexis
eacfa9bdb3 docs(CLAUDE.md): add agent_sockets.rs to hive-c0re file map (follow-up to #809) 2026-05-31 16:12:17 +02:00
lexis
68c6a5ae19 docs(CLAUDE.md): add matrix.md to file index + reading paths (follow-up to #811) 2026-05-31 15:49:42 +02:00
lexis
eccceeaadf docs(CLAUDE.md): add docs/gateway.md to file index + reading paths (follow-up to #775 #793) 2026-05-31 15:07:06 +02:00
damocles
8f9c77df06 hive-forge: list verb — filter issues/PRs by kind/state/assignee/author/label (#694 part 2) 2026-05-31 14:02:54 +02:00
lexis
47a97be958 docs(CLAUDE.md): forge.domain drives ROOT_URL + sub-domain vhost (follow-up to #754) 2026-05-31 14:01:44 +02:00
lexis
7b0bb1b22f fix map direction: name→port not port→name (argus on #757) 2026-05-31 13:21:01 +02:00
lexis
ec0d1b38e5 docs: add agent_ports.rs to hive-c0re file map (follow-up to #748) 2026-05-31 13:18:07 +02:00
lexis
a823fa4dd9 docs: get_agent_meta response gains hive_name + swarm_name (follow-up to #741)
turn-loop.md: add optional hive_name / swarm_name fields to get_agent_meta
response shape; note they are omitted when the host options are unset.
CLAUDE.md: update hive-gateway.nix entry to mention per-agent routing
and .well-known; drop stale #609 cookie.
2026-05-31 13:03:12 +02:00
damocles
c41bf1b562 harness: surface hive + swarm display names to agents (#701) 2026-05-31 11:42:55 +02:00
lexis
ed59cb0660 docs: remove stale Wake-agent-only note after #698 (follow-up to #693) 2026-05-31 10:27:25 +02:00
damocles
d8cd3ef68c docs: post-#598 catch up — hive-ag3nt/hive-m1nd → unified hive binary in turn-loop.md + CLAUDE.md 2026-05-31 10:14:20 +02:00
lexis
fab0e4804f docs: update harness-base/agent-base/manager.nix entries for hyperhive.role (#671) 2026-05-31 00:51:54 +02:00
lexis
bee338cf4f docs: matrix serverName defaults to bare domain, not subdomain (follow-up to #661) 2026-05-30 23:39:37 +02:00
damocles
2b46d0f3d7 CLAUDE.md: catch up daemon socket path to /run/hive-matrix/socket (argus #664) 2026-05-30 23:27:26 +02:00
damocles
6b6c6775ee agents: drop root, run as per-agent unix user with passwordless sudo (#658) 2026-05-30 21:45:09 +02:00
damocles
53447842bc hivectl: add operator-facing host CLI with forge + matrix create-user verbs (#655) 2026-05-30 20:34:59 +02:00
lexis
f943976f14 docs(CLAUDE.md): nix/docs.nix → nix/docs/ directory with default.nix + style.css (follow-up to #626) 2026-05-30 13:43:25 +02:00
lexis
e1a21d36ab docs(CLAUDE.md): add hive-gateway.nix entry to file map (follow-up to #620) 2026-05-30 12:52:28 +02:00
lexis
1a839d45e3 docs(CLAUDE.md): update host option namespace to services.hyperhive.* (#615); add nix/docs.nix entry (#618) 2026-05-30 12:00:46 +02:00
damocles
e6c53045ad matrix: hive-matrix-mcp crate (daemon+stdio bridge) + harness wiring (#548 phase 3) 2026-05-29 20:51:01 +02:00