Commit graph hyperhive/docs
Author SHA1 Message Date
damocles
fb1f7efbe4 docs: move privsep socket-activation + child-state rw rationale out of code comments 2026-06-08 21:58:12 +02:00
iris
09787dd1c3 refactor(frontend): base16 theme contract in a swappable colors.css
Split the palette into two standalone stylesheets:
- colors.css — the 16 base16 slots (--base00..--base0F). This is the
  entire theme swap contract; a generator (e.g. a stylix base16 scheme,
  which is natively base00-base0F) replaces only this file.
- theme.css — the semantic layer (--bg, --purple, …) derived from the
  base16 slots via var()/color-mix. Never changes on a swap.

Every page links colors.css then theme.css; theme.css does NOT @import
colors.css (that would re-bake the slots into it) — they're separate
dist outputs so a swap touches just colors.css. Pixel-identical refactor:
base16 defaults are Catppuccin Mocha and the three off-slot vars
(--crust, --muted, --subtext0) derive via color-mix reproducing their
exact prior hexes.

Wires colors.css through both build.mjs CSS entry lists, the
@hive/shared exports map, and all 7 page templates. css-vars.md + the
frontend.nix output-list comment updated.
2026-06-08 21:24:07 +02:00
iris
5d0f3d060b feat(dashboard): generic server-warnings banner on every page (#1518)
Per operator request: instead of a disk-specific alert, surface a generic
server-warnings banner at the very top of every page, so new system
warnings can be added backend-side with no frontend change.

- hive-c0re `host_stats`: `server_warnings() -> Vec<ServerWarning>`
  (`{ kind, level, message }`). The threshold logic lives server-side; the
  host disk-pressure check (a `statvfs` probe of `/nix`: ≥85% used → warn,
  ≥95% → crit) is the first and only producer today. No new deps (libc).
- `/api/state` carries `server_warnings` (replaces the disk-specific
  field). Empty when all clear.
- frontend: `renderServerWarnings` / `initServerWarnings` in `common.js`
  inject a sticky top-of-<body> banner and render the list, coloured by
  `level`. Wired on every page — dashboard (live, via refreshState),
  FL0W, L0GS, H0M3. No per-warning frontend code; adding a warning kind
  is a pure backend change.

cargo check/clippy/fmt + npm run build green. Closes #1518.
2026-06-08 20:55:15 +02:00
iris
d9d2a52221 feat(stats): hive-wide "favorite tools" rollup on ST4TS
Swarm-level companion to the per-agent favorite-tools doughnut (#1433).
Aggregates each agent's bash_commands(ts, head) table (written by
hive-bash-mcp) across the whole hive and surfaces the top-10 most-run
command heads on the dashboard ST4TS tab, alongside the existing model
mix.

- hive_stats.rs: AgentAgg gains a `bash` head→count map, filled by a new
  guarded `read_bash_heads()` that reuses read_agent's read-only
  connection. A missing `bash_commands` table (capture hasn't run for
  that agent) or any read error yields an empty map — isolated from
  read_agent's error path so it never drops an agent from the rollup.
  HiveStats gains `bash_mix: Vec<KeyCount>` (busiest-first, top 10).
  Unit tests cover the per-head tally + window cutoff and the
  missing-table degrade-to-empty path (in-memory sqlite).
- dashboard: a "favorite tools (bash commands across the swarm)" CSS-bar
  list on the ST4TS pane, mirroring the model-mix bars. Header + list
  stay hidden until bash_mix has data, so a fresh hive shows no empty
  block. (Dashboard ships no chart lib — bars, not a doughnut.)
- docs: dashboard.md ST4TS section documents the new rollup.

Closes #1449. Inert until the hive-bash-mcp capture (#1448, merged) has
recorded data across agents.
2026-06-08 20:46:19 +02:00
iris
cc8f58fb24 feat(stats): make ST4TS model price table operator-tunable
The hive-wide cost estimate on the dashboard's ST4TS tab used a
hard-coded model->price table in hive_stats.rs. Anthropic list pricing
drifts, so move the table to a nix option operators can keep current
without a code change.

- New `services.hyperhive.modelPrices` option: attrset of model-family
  short name -> { input, output, cache_read, cache_write } USD per
  million tokens. Passed to `hive-c0re serve --model-prices <json>`.
- hive_stats: `Prices` is now public + Deserialize; add `PriceTable`
  type and `resolve_prices` (longest case-insensitive substring key
  wins) with the old hard-coded table preserved as `builtin_prices`
  fallback for any model not covered.
- Coordinator holds the parsed table (hive-c0re-local, not injected
  into containers, so not part of HiveEnv); `/api/stats-hive` reads it.
- Docs: dashboard.md ST4TS cost note updated; option self-documents
  via nixosOptionsDoc.

Closes #1434
2026-06-08 20:02:31 +02:00
atlas
b7eb0f3930 docs(ci): recommend host-level nix store GC + min-free for CI disk pressure
Store GC is a host-level concern (the CI runner builds through the host
nix-daemon; the container shares the host store with no daemon of its own).
A service module should not change the host's global nix-daemon options, so
document the daily GC + disk-pressure min-free/max-free as a recommendation
for the operator's own host config instead. Notes the remote-builder caveat:
GC must be applied wherever the builder's store lives.
2026-06-08 19:32:14 +02:00
iris
022fd5015c docs: reflect the H0M3 nav restructure in dashboard.md (#1504)
Follow-up to the #1464 step-2 PRs now on main (route swap + page-link
removal). Brings docs/web-ui/dashboard.md in line with the shipped UI:

- Tab strip no longer lists the FL0W / L0GS / M4TR1X "→" page-links —
  those are separate pages reached from the H0M3 hub now. The strip is
  in-page tabs only (SW4RM / Y3R C4LL / SYST3M / P3RM1SS10NS / SCH3DUL3S /
  ST4TS / P33RS / S3TT1NGS).
- Document the dashboard's new "← home" back-link in the chrome header.
- FL0W / L0GS page sections: they use a slim "← home" header now, not the
  dashboard tab strip (dropped the stale "reuses the dashboard chrome" +
  cross-page-tab-link descriptions).
- M4TR1X / L0GS page intros: reachable from the H0M3 hub tile, not a
  tab-strip "→" entry.
- S3TT1NGS-on-FL0W note: settings live only on the dashboard tab, reached
  via the FL0W page's "← home" → Dashboard.

Docs-only; matches the merged frontend. Closes #1504.
2026-06-07 22:00:47 +02:00
iris
90b7d61792 docs: fix dead /home.html alias in the H0M3 page heading
The route swap (#1501) renamed the source home.html → index.html (served
at /), so /home.html 404s. Drop the stale alias from the dashboard.md
section heading and align it with the leet-speak heading convention
(## FL0W page / ## L0GS page): "## Home page (`/`, `/home.html`)" →
"## H0M3 page (`/`)".

Trailing fix from the #1495 docs PR (the heading nit both argus and I
flagged, which an AGit push issue prevented from landing before merge).
2026-06-07 21:24:31 +02:00
lexis
60fb6a29c3 docs: fix front-matter for dashboard route at /dashboard.html (post-H0M3 routing swap) 2026-06-07 21:13:31 +02:00
lexis
a5268560e1 docs: add operator inbox + flow agent filter + flow collapse + home page docs (follow-up to #1469 #1472 #1473 #1464) 2026-06-07 21:13:17 +02:00
iris
e949129e75 refactor(flow): drop operator-inbox UI, now lives on Y3R C4LL (#1483)
The operator inbox moved to the dashboard's Y3R C4LL tab in #1469
(◆ 1NB0X ◆ section, with per-message + mark-all read). FL0W goes back
to being the pure event firehose, so remove its now-redundant inbox UI:

- flow.js: drop the operatorInbox store, inboxAppendFromEvent,
  buildInboxListNode, renderInbox, the inbox-pill click wiring, and the
  onAnyEvent hook that fed them. The side panel was only used for the
  inbox flyout on this page, so drop Panel.bind() + the Panel import too.
- flow.html: remove the inbox pill, the offscreen inbox-section div, and
  the side-panel markup.
- flow.css: remove the .flow-pill* and .flow-inbox-headless rules.
- home.html: Flow tile desc → "live all-agents message firehose".
- docs/web-ui/dashboard.md: drop the FL0W 0PER4T0R 1NB0X section, point
  at Y3R C4LL, and fix the count-pill + /op-send descriptions.

The agent filter, sent→delivered collapse, compose box, and OS
notifications on operator-bound traffic are unaffected.
2026-06-07 20:40:20 +02:00
iris
e70584b632 feat(frontend): split theme CSS vars into a standalone theme.css
Phase 1 of stylix integration (#1457): extract the Catppuccin palette
into a dedicated, separately-linked stylesheet so a theme swap can
replace just that file without rebuilding the rest of the frontend.

- shared/src/theme.css (new): the `:root` palette, moved out of
  base.css (which now holds only the body typography it references).
- shared/package.json: export `./theme.css`.
- dashboard/src/theme.css + agent/src/theme.css (new): one-line
  re-exports of @hive/shared/theme.css so each package's esbuild emits
  its own standalone `dist/static/theme.css` (palette is NOT inlined
  into the page bundles).
- both build.mjs: add theme.css to the CSS build list.
- every page (dashboard index/flow/logs, agent index/stats/screen):
  link `theme.css` first, ahead of the page CSS, so the `:root` vars
  resolve for everything.
- docs/web-ui/css-vars.md: document the split + the no-rebuild rationale.

Behaviour-neutral — same colours, just relocated. Verified both
`npm run build` outputs: theme.css emits standalone (383b) with the
palette; no `--*` palette defs duplicated into common.css/agent.css.

Phase 2 (nix derivation that swaps theme.css from stylix colours) is a
follow-up; touches nix/frontend.nix, coordinating with damocles.

Part of #1457.
2026-06-06 08:46:45 +02:00
iris
a3e6585266 docs: tighten favorite-tools head normalisation wording
Per damocles (capture-side owner): "argv[0] basename" undersells the
normalisation and misleads — the head is the basename of the first
*real* command, looking past `cd repo &&` prefixes, env-assignments,
and prefix-runners (sudo/env), so `cd /repo && cargo build` records
`cargo`, not `cd`. Match the persistence.md phrasing.
2026-06-06 08:13:12 +02:00
iris
b9aa38960e docs(web-ui): document the /stats favorite-tools doughnut
Backfills the agent.md Stats-page section for the favorite-tools
doughnut (per-agent most-run bash commands) shipped by #1446 + #1448.
Notes the normalised bash_commands heads, the bash_breakdown read, and
the hidden-until-data behaviour (missing table degrades to empty).

Part of #1450 / completes the per-agent half of #1433's docs.
2026-06-06 08:13:12 +02:00
lexis
c31aaf7f4c accuracy fix: matrix ids owned by hive-c0re service user, not root (post-privsep) 2026-06-06 08:10:26 +02:00
lexis
6afaf03864 docs: document hive-chat room auto-creation in Matrix Space (follow-up to #1452) 2026-06-06 08:10:26 +02:00
damocles
6e39515669 feat: type-scope events vacuum to prune only stream rows (14d) + drop turn-stats vacuum 2026-06-06 07:57:27 +02:00
iris
f8cf76b62d docs(web-ui): document the new per-agent /stats chips + result trend
Backfills the agent /stats page docs after the P1 stats enrichments:
the result-trend stacked bar (per-bucket result outcomes over time) and
the cache hit-rate + tokens/turn summary chips.
2026-06-06 07:56:43 +02:00
damocles
1569d55f78 feat: capture normalised bash command heads for the favorite-tools stat 2026-06-06 00:52:56 +02:00
damocles
57b1a2d3ea docs: clarify certFingerprint does not govern matrix federation tls 2026-06-06 00:21:52 +02:00
damocles
e029944cb3 docs: specify certFingerprint format and generation recipe 2026-06-05 23:38:54 +02:00
iris
03ea6d1bda feat(stats): per-container cpu/mem load (#1424 p3)
C0NT41N3R L04D on the SYST3M tab + GET /api/container-resources.

Backend (hive-c0re/src/container_stats.rs): reads cgroup v2 cpu.stat +
memory.{current,peak,max} for each running agent machine
(machine-h\x2d<name>.scope under machine.slice), read-only/world-
readable so no hive-priv. CPU is a two-sample (~200ms) host-normalised
percentage; one shared sleep covers all agents. Skips agents whose
scope dir is absent (= not running). Network omitted: agents share the
host netns, no per-container counter.

Frontend: a polled C0NT41N3R L04D table on SYST3M (agent / cpu / mem /
peak / limit with meter bars), reusing the ST4TS table style. Polls
/api/container-resources every 5s only while the tab is active.

Backend reviewed-in-principle by damocles (path escaping + cpu delta
math); ping for the on-host sign-off.
2026-06-05 23:06:33 +02:00
damocles
14c7b0d406 feat: group host-side /var/lib/hyperhive state into db/ forge/ matrix/ run/ subdirs with startup migration 2026-06-05 23:01:47 +02:00
iris
cfafc9d93d docs(dashboard): add /api/stats-hive to the endpoint reference 2026-06-05 22:51:11 +02:00
iris
a8a30dd39b docs(dashboard): document the ST4TS hive-wide stats tab
Adds the ST4TS tab to the strip list + a section covering the swarm
rollup, the /api/stats-hive endpoint shape, the read-only/skip-missing
aggregation, pull-on-activation, and the labelled cost estimate. Ships
with the feature (this branch / PR).
2026-06-05 22:51:11 +02:00
damocles
07e8f442cb fix: hivectl choom passes the harness --settings/--mcp-config/--system-prompt-file so claude gets settings + tools + persona 2026-06-05 22:48:34 +02:00
damocles
86f0de751f feat(matrix mcp): add resolve_invite tool to accept or reject pending invites 2026-06-05 21:55:04 +02:00
damocles
c59a0de01e fix: hivectl choom enters as the agent user from the state dir so claude gets creds + session 2026-06-05 21:41:50 +02:00
damocles
d25f2779e8 docs: note that linking workspace binaries locally needs nix develop (libsqlite3) 2026-06-05 21:30:57 +02:00
damocles
44678ec6ee fix: regenerate hivectl-cli.md to include the merged matrix invite subcommand 2026-06-05 21:28:40 +02:00
damocles
fac5437508 docs: commit generated hivectl cli reference + flake freshness check 2026-06-05 21:07:51 +02:00
iris
d952e7ac01 docs(knowledge): document the hive-forge AGit no-fork contribution flow
Replaces the fork-and-PR instructions with the supported no-fork path
now that the CLI helper shipped: hive-forge clone + pr-create --agit.
Agents are read-only collaborators, so they push HEAD to
refs/for/<base>/<topic> via AGit instead of forking. Same --topic
updates the open PR.
2026-06-05 20:54:25 +02:00
damocles
c103ae5f10 feat(#1399): hive-forge clone verb + pr-create --agit for no-fork PRs 2026-06-05 20:51:50 +02:00
damocles
e8d5eee659 feat: hivectl matrix invite — add a user to the hive Space or a room (closes #1402) 2026-06-05 20:51:31 +02:00
damocles
0749cb37ab docs: delete obsolete damocles migration plan (closes #1406) 2026-06-05 20:05:49 +02:00
damocles
7031f57c14 feat(#1409): hive-forge pr-status verb (mergeable, CI, reviews, last comment) 2026-06-05 19:53:20 +02:00
iris
60042d877e docs(options): emit markdown only, render HTML in website
Per #1407 review: the options reference should be markdown here; the
HTML + CSS belongs in the website repo where the theme lives and the
stylesheet can be shared with /docs.

- nix/docs/default.nix: drop the cmark-gfm HTML rendering, the inline
  <style>, and the HTML index. Emit index.md + host.md + agent.md only
  (CommonMark from nixosOptionsDoc).
- Remove nix/docs/style.css.
- Update docs/gotchas.md + CLAUDE.md to describe the md-only output and
  point at the website for HTML rendering.

The website (hyperhive/website#26) renders these .md to themed HTML for
/options/, sharing one docs.css with the prose /docs/ tree.
2026-06-05 19:36:54 +02:00
iris
9f06899238 docs(web-ui): move css-vars.md into web-ui/
The CSS theme-variable reference documents the dashboard/agent web-UI
stylesheets, so it belongs under docs/web-ui/ alongside shape/dashboard/
agent. Wire it into the web-ui.md index (split list + reading path) and
the CLAUDE.md file map. Closes #1405.
2026-06-05 19:21:43 +02:00
iris
f84336b287 docs(gateway): drop openFirewall default-change note
Per review: remove the 'used to default to true' breaking-change
paragraph from the forge openFirewall section.
2026-06-05 19:06:10 +02:00
iris
093116f5e1 docs(gateway): document forge httpPort, sshPort, openFirewall, rootUrl options
The "hive-forge container shape" section described the container
isolation model but omitted the port and firewall knobs that operators
need when exposing forge externally or overriding the Forgejo ROOT_URL.

Add two subsections:

"Network and port configuration" — covers httpPort (default 3000),
sshPort (default 2222), and openFirewall (default false, was previously
true — breaking change note included). Explains the shared-netns
rationale for why openFirewall is safe to leave off for agent use but
must be set for browser/external-git-client access. Clarifies that
forge.behindGateway obviates forge.openFirewall for HTTP reach.

"rootUrl override" — documents forge.rootUrl (default null) with the
auto-derivation table (behindGateway ? http://domain/ : http://domain:port/)
and explains when to override (TLS, https:// clone URLs, bespoke shapes).
Notes the auto-derivation always produces http://, so TLS operators must
set rootUrl explicitly.
2026-06-05 19:06:10 +02:00
iris
f2d57c8538 fix: drop stale claim that ruth is always reachable in allowedRecipients
The sentence 'ruth is always reachable regardless of the list' documents
a bug in check_send_allowed (name-based carve-out), not intended
behavior. The structural parent carve-out is fine to mention since it's
topology-based, not name-based.

Updated example to show [ "operator" ] (restrict to operator-only)
and replaced the ruth-name claim with a note about the parent carve-out.
2026-06-05 18:45:06 +02:00
iris
da8892aac2 fix(docs/turn-loop): correct allowedRecipients example name to ruth
The manager's logical name is 'ruth' (MANAGER_AGENT post-#954).
The example used the stale 'manager' placeholder.
2026-06-05 18:45:06 +02:00
iris
3328b396e7 docs(turn-loop): document allowedRecipients, claudePlugins, cargo.shortMessages
Five per-agent agent.nix options were undocumented:

- hyperhive.allowedRecipients — restricts which peers send() accepts;
  note added inline to the send tool description
- hyperhive.claudeMarketplaces — Claude Code plugin marketplace sources
  (default: official Anthropic marketplace)
- hyperhive.claudePlugins — plugin specs installed at harness boot
- hyperhive.claudePluginsAutoUpdate — pull latest marketplace index
  before install; off by default
- hyperhive.cargo.shortMessages — shell wrapper injecting
  --message-format short on cargo compile subcommands; on by default
2026-06-05 18:45:06 +02:00
iris
9a19919943 fix: correct auto-accept invites claim — daemon wakes agent, agent decides
The daemon does not call join_room_by_id. It fires a wake and writes
to mcp-loose-ends/matrix.json; the agent calls list_invites + join_room.

Replace the inaccurate 'Auto-accept invites' paragraph with 'Invite
wakes' describing the actual flow. Merge the pending-invites paragraph
into a single accurate block.
2026-06-05 18:43:41 +02:00
iris
19a09c865e docs(tools/matrix): document auto-accept invites and pending-invite loose ends 2026-06-05 18:43:41 +02:00
iris
010d0a422a docs(matrix): document trustedServers and maxRequestSize options
The matrix.md provisioning section mentioned trustedServers in passing
("wired up later by extending trustedServers") but never explained it
as a configurable option, and maxRequestSize was undocumented entirely.

Add a "Configuration tuning" subsection before "Assertion rationale":
- trustedServers (default []) — list of peer homeserver names to trust;
  federation is protocol-on but no peer trusted until listed; link to
  swarm.md for the multi-hive use case.
- maxRequestSize (default 20 MB) — request body limit matching the
  matrix-spec recommendation; when and why to raise or lower it.
2026-06-05 18:40:52 +02:00
iris
09e2ad326c fix: update PrivRequest table to match actual hive-sh4re::priv_proto variants
Replace stale AddBindMount/RemoveBindMount/SetNetworkIsolation/ReloadGateway
entries with the actual current variants from hive-sh4re/src/priv_proto.rs:

- WriteNspawnFlags (replaces AddBindMount/RemoveBindMount/SetNetworkIsolation)
- WriteResourceLimits (new)
- RemoveServiceDropin (new)
- DaemonReload (new)
- ChownSocketDir / ChmodSocketDir (new)
- RunForgeAdmin (new)
- RestartMatrixDaemon (new)
- ReloadGatewayNginx (renamed from ReloadGateway)
2026-06-05 18:40:44 +02:00
iris
a960dcf91a docs(boundary): rewrite sequencing list as prose, drop checklist markers 2026-06-05 18:40:44 +02:00
iris
28df69286d docs(security): document hive-priv privilege separation model 2026-06-05 18:40:44 +02:00
iris
330fdf8dc7 fix(docs/turn-loop): correct forge.url tea-login description
The tea-login oneshot writes ~/.config/tea/config.yml directly via
heredoc; it never calls 'tea login add'. Fix the implementation detail.
2026-06-05 18:30:29 +02:00