Commit graph hyperhive/docs
Author SHA1 Message Date
atlas
c028b2ecfc docs(swarm): say how to make a hive report, not that nothing does
The section carried a "nothing publishes yet" note that is now false, and
said nothing about the one thing an operator has to do.

Written to the reader's question rather than the author's: what to set,
what defaults on an all-in-one host, what has to be carried by hand to a
hive that is not the swarm host, and where to look when a hive goes quiet.
The identity and the publish cadence are stated because they constrain the
staleness threshold an operator picks; the mechanism behind them is not.
2026-08-16 13:14:03 +02:00
iris
c67100588e docs+nix: fix stale certFingerprint/HYPERHIVE_PEERS references (hyperhive#3294)
Follow-up to the plumbing removal: docs/swarm/README.md gets the
biggest rewrite (drops the whole "Fingerprint format" section, fixes
the runtime-effects list, the WireGuard config example + "what the
mesh does" bullet), docs/gateway.md and hive-gateway/options.nix drop
4 "needs no certFingerprint" mentions, swarm-peers-removed.nix's
migration-warning text no longer tells an upgrading operator to carry
a field over that no longer exists, swarm.nix/swarm-wireguard.nix/
swarm-controller.nix/swarm-controller's main.rs get comment fixes
where they described the now-removed HYPERHIVE_PEERS shape. Also
caught one more stale "peer hives" mention in docs/web-ui/README.md's
SW4RM tab description that the first pass on this issue missed.
2026-08-15 19:56:11 +02:00
iris
8c8f0e2758 docs+nix: fix stale peer-hives-dashboard references (hyperhive#3294)
Follow-up to the peer-hives removal: docs/web-ui/dashboard.md drops
the whole "P33R H1V3S" section + its stale #peers hash and tab-strip
mentions; docs/swarm/README.md's runtime-effects list and
cross-references point at swarm-ui's roster page instead. Nix comments
in hive-c0re/environment.nix, swarm.nix and swarm-wireguard.nix that
described HYPERHIVE_PEERS/certFingerprint as dashboard-consumed are
updated to say what's actually still true (agent identity only).

Deliberately NOT removed: the `certFingerprint` nix option itself.
It has no remaining Rust consumer, but deleting a documented,
potentially already-set option is a bigger, breaking change than
removing dead display code — flagged in docs/swarm/README.md with a
note instead of silently dropped, so an operator or reviewer can make
that call explicitly rather than have it made for them here.
2026-08-15 19:55:29 +02:00
atlas
602ae92a3e docs(swarm): make the status section operator-facing
Per mara on the PR: less implementation detail, more operator focus. The
section argued why the design is shaped as it is - a cache would
disagree with itself, freshness must be derived rather than stored, the
timestamp is the server's - which is reasoning a reader of this page does
not need and cannot act on.

It now answers what an operator actually asks: what each freshness value
means they should do, what to set the threshold to and why that number,
what a 503 tells them, and that nothing publishes yet so an empty board
is expected rather than broken.

The design rationale is not lost, it is just homed where it belongs: the
status module's own doc comment, next to the code it constrains.
2026-08-15 18:48:51 +02:00
atlas
8891b46943 feat(swarm-controller): aggregate per-hive status from the swarm queue
The controller connects to the swarm queue as its own client and serves
what each hive last said about itself at GET /api/hives/status.

THE QUEUE IS THE STORE. A hive publishes into the `hive-status` JetStream
KV bucket (history 1) and the controller reads it per request, keeping no
copy. A cache here would be a second answer to the same question, free to
disagree with the first, and the disagreement surfaces as a hive reading
healthy on a dashboard while the bucket says otherwise. Whichever side
arrives first creates the bucket; both want the same shape.

Rows come from the roster rather than from the bucket, so an empty bucket
renders as a swarm nobody has heard from instead of a healthy one, and
`never_reported` stays distinct from `stale` - went quiet is a fault,
never spoke is usually a deployment that has not happened. Freshness is
derived at read time and never stored as a flag, because a stored
`healthy` boolean goes stale silently the moment nothing arrives, which
is the failure this endpoint is designed against. The timestamp is the
NATS server's, applied when the value landed, so a publisher cannot make
itself look fresher than it is.

Authentication is per connection attempt, not per process. Authelia
issues `client_credentials` tokens that expire in 3599s, and auth happens
at CONNECT, so a long-lived connection is fine but a reconnect an hour
later needs a token minted an hour later. `with_auth_callback` is re-run
by async-nats for each attempt, which handles expiry by construction
rather than by a timer - the alternative fails in the way this subsystem
exists to prevent, with the controller still serving while its data
quietly stops updating.

Three failure shapes are deliberate:

- A half-set environment is fatal; an absent one is not. Silently
  behaving like an unconfigured host is how every hive ends up reading
  `never_reported` with nothing to point at.
- The endpoint answers 503 rather than an empty list when the store
  cannot be read. "I cannot reach the store" and "every hive is silent"
  are different answers, and rendering the second turns a local fault
  into an apparent swarm-wide outage.
- `retry_on_initial_connect` makes the daemon and the queue bootable in
  either order, and the status handler refuses when the client is not
  Connected rather than issuing a request into it - a request made in
  that window does not fail, it waits, so every poll would hang and
  learn nothing. `Pending` is the state a never-connected client is in,
  which is why the test is `!= Connected` and not `== Disconnected`.

The rendering rules are a pure function over a map, so the semantics are
tested against a table rather than against a running server. The KV read,
the credential rotation and the 503 paths are covered behaviourally
instead: a real NATS server with a rotating token endpoint, asserting
that the controller recovers only when the credential rotates, and
mutation-tested by holding the credential wrong for the same window.
2026-08-15 18:37:23 +02:00
iris
8542f2ca42 swarm-ui: header links menu for swarm-wide services (hyperhive#3289)
Single 🔗 button in the Shell header (direction 1 of 3 proposed on the
issue) — one fixed element regardless of link count, so it can't
clutter as the list grows, and visible on every route since Shell
wraps all of them. Opens a popover listing whatever GET /api/links
returns (icon + label, opens in a new tab); hidden entirely when the
list is empty, same "don't render a dead affordance" rule the old
dashboard's H0M3 tiles follow for Forge/Matrix.

Docs: docs/swarm/ui.md gets a short section on the feature + the
contribute-your-own-entry idiom.

Verified: npm run build + npm run typecheck clean, headless-chromium
screenshots of both the closed and (temporarily forced open for the
screenshot only) open states, pixel-sampled to confirm the popover is
actually using the dark theme vars and not just looking that way in a
downscaled preview.
2026-08-15 14:24:52 +02:00
iris
1e0ec9b5af docs(conventions): fix one more stale hive-c0re.nix bare-file ref
Same bug class the facts sweep hunted for across everything else —
hive-c0re.nix is a module directory now
(nix/host-modules/hive-c0re/), environment.nix is where
HYPERHIVE_HIVE_DOMAIN is actually set. Caught doing a final grep
across the merged sweep for the known bad patterns before pushing.
2026-08-15 12:45:22 +02:00
iris
3e9d7c68d8 docs(matrix): fix invite-wake mechanism and todo message format 2026-08-15 12:45:22 +02:00
iris
6eb43ba2c5 docs(forge): fix ci-log source ordering and binary path claim 2026-08-15 12:45:22 +02:00
iris
c870e230bf docs(conventions): fix stale internal refs verified against source
- MAX_AGENT_NAME lives in lifecycle/mod.rs, not bare lifecycle.rs
- agent_server::handle_send -> socket_server::handle_send (no agent_server
  module exists)
- AgentMeta response is missing matrix_accounts in the field list
- tool-group table missing list_containers/ack_until (added since written)
  and the forge/web_tools groups entirely
- #[tool] fns live on AgentServer in hive-agent-mcp/src/mcp/mod.rs, not a
  HiveServer in a nonexistent hive-ag3nt/src/mcp.rs; ToolGroup::tools()
  lives in hive-sh4re/src/permissions.rs, not lib.rs
- Capability + as_str also moved to permissions.rs; capability-check
  handler list was stale (agent_server.rs/mcp.rs don't exist)
- async-forms listener is bindAsyncForms in frontend/packages/shared,
  not assets/tabs.js + assets/app.js
- 'rebuild is the reconcile verb' described a monolithic lifecycle::rebuild
  that no longer exists — it's job_queue::templates::rebuild building a DAG,
  and flake.nix is no longer regenerated host-side on rebuild at all
2026-08-15 12:45:22 +02:00
iris
1cc1ace681 docs(approvals): fix stale internal refs verified against source
- meta::sync_agents signature (now takes &HiveEnv, not 3 loose params)
- lifecycle.rs -> lifecycle/host_config.rs bare-file ref
- nixosConfigurations.manager -> .ruth (no 'manager' name in flake.nix)
- manager socket path/owner: no /run/hyperhive/manager/ or manager_server,
  it's socket_server::start_manager on the standard per-agent runtime dir
- Spawn approval also fires ApprovalResolved (finish_approval always does,
  for every kind), not push_todo instead of a HelperEvent
- /agents/<n>/applied.git -> /applied/<n>/.git (matches the actual RO bind)
- lifecycle::rebuild / auto_update::rebuild_agent don't exist anymore;
  the reconcile verb is job_queue::templates::rebuild
2026-08-15 12:45:22 +02:00
iris
62f3cc4b19 docs(coordinator): fix stale DAG-history cap, wire request name, infra container list 2026-08-15 12:45:22 +02:00
iris
a17cc3612b docs(persistence): fix stale facts — reminders/todos moved in-container, vacuum ownership, topology writer, matrix glob, qgroup quotas shipped 2026-08-15 12:45:22 +02:00
iris
90be37c0c8 docs(swarm): fix stale hivectl peer-config claim, verified against hivectl/src/wg.rs 2026-08-15 12:45:22 +02:00
iris
3b24d08226 docs(swarm): fix stale four-wiring-sites table, verified against hive-gateway modules 2026-08-15 12:45:22 +02:00
iris
f5182d6804 docs(swarm): fix authelia's default vhost domain, verified against swarm-authelia.nix 2026-08-15 12:45:22 +02:00
iris
cfb50d8a40 docs(forge): fix stale nix option namespace (services.hyperhive.swarm.forge) 2026-08-15 12:45:22 +02:00
iris
8361d3f6a1 docs(ci): fix stale nix option namespace and ensure_mirrors file path 2026-08-15 12:45:22 +02:00
iris
af83a868e4 docs(knowledge): fix stale collaborator model and webhook delivery claims 2026-08-15 12:45:22 +02:00
iris
fd891913b0 docs(forge): fix stale config-PR framing and wrong timestamp-helper name 2026-08-15 12:45:22 +02:00
iris
0e84e72c21 docs(gateway): fix stale gateway.enable, selfSignedTls, rootUrl, vhost claims
Verified against nix/host-modules/hive-gateway/*.nix + hive-matrix.nix +
hive-forge/default.nix:
- services.hyperhive.gateway.enable was removed (gateway is now
  unconditional) — fixes the Dashboard link shape + Firewall posture
  sections, which described a gateway-off mode that no longer exists.
- gateway.selfSignedTls is a removed option (fails eval), not a
  deprecated-and-ignored one.
- The forge rootUrl auto-derivation now uses https:// behind the
  gateway (httpsPort), not http://.
- Vhost map + discovery-flow + local-dev sections used matrix.<hive> /
  forge.<hive>; current defaults are chat.<swarm-domain> and
  forge.<swarm-domain> (both swarm-domain-rooted, per hive-matrix.nix's
  gatewayHost and hive-forge's domain option).
- hive-c0re.nix is now a directory (nix/host-modules/hive-c0re/); pointed
  the HIVE_FORGE_URL reference at the actual file, environment.nix.
2026-08-15 12:45:22 +02:00
iris
150cb1be76 docs(matrix): fix stale matrix.<hive> vhost + assertion-list claims
Verified against nix/host-modules/hive-matrix.nix: gatewayHost's current
default is chat.<swarm-domain>, not matrix.<hive>, so the GUI mount point
and fluffychat client line were stale. Also rewrote the Assertion
rationale section, which named an assertion (hyperhiveDomain/serverName)
that doesn't exist in this module and missed the three SSO assertions
that do.
2026-08-15 12:45:22 +02:00
iris
f41acfcc6e docs(network): fix stale forge/matrix zone claim in resolver behaviour
Verified against nix/host-modules/hive-gateway/dnsmasq.nix + gateway.localNames
contributors (hive-forge, hive-matrix, swarm-authelia): forge and the matrix
gateway vhost are swarm-domain names (forge.<swarm-domain>, chat.<swarm-domain>),
not sub-domains of the hive's own domain as the doc previously claimed.
2026-08-15 12:45:22 +02:00
iris
066cd712ea docs(terminal-rendering): re-attribute dispatch logic to stream_enrich.rs, fix Write/TodoWrite/Bash dead-path claims
Verified against hive-agent/src/stream_enrich.rs and frontend/packages/agent/src/app.js:
- per-tool icon/summary/category classification moved server-side to
  stream_enrich.rs::enrich() a while ago; fmtToolUse/fmtArgsGeneric/toolIcon no
  longer exist in app.js -- the client now just dispatches on the backend-stamped
  _icon/_summary/_category/_body/_body_type fields. Rewrote the 'Renderer dispatch'
  and 'Salient-arg formatting' (was 'fmtToolUse patterns') sections to match, and
  retargeted the per-tool table's 'Everything else' row to fmt_args_generic.
- Write is no longer a rich diff row -- is_rich_tool() doesn't include it, and
  fmt_builtin_tool formats it identically to Read (flat, no count). Only Edit
  still gets the rich diff.
- TodoWrite and built-in Bash aren't in ALLOWED_BUILTIN_TOOLS (mcp_config.rs) any
  more than Task is -- flagged both as dead paths for consistency with the
  existing Task annotation.
- fixed stray 'ask* has an inline answer form' table note that contradicted the
  doc's own later 'Inline ask-operator answer' section (no such form exists).
- terminal.css path: frontend/packages/shared/src/terminal/terminal.css, not
  .../shared/src/terminal.css; marked npm dep is v18.x, not v4.x.
2026-08-15 12:45:22 +02:00
iris
4388719b76 docs(web-ui/agent): fix stale NavLink type name
Verified against hive-agent/src/web_ui/state.rs: the struct is AgentLink
(AgentLinkKind for kind), not NavLink -- NavLink doesn't exist anywhere in
the Rust or frontend source.
2026-08-15 12:45:22 +02:00
iris
26b55f34d3 docs(web-ui/shape): fix stale CSS bundle count, SSE route prefix, bind-retry cap claims
Verified against frontend/packages/dashboard/build.mjs, hive-c0re/src/dashboard/mod.rs,
and hive-agent/src/web_ui/mod.rs:
- dashboard ships 9 page CSS bundles + colors/theme/common, not 4
- dashboard SSE routes are /api/dashboard/stream + /api/dashboard/history, not
  /dashboard/stream + /dashboard/history
- per-agent bind_with_retry has a MAX_BIND_ATTEMPTS=12 cap (gives up), unlike the
  dashboard's genuinely uncapped retry loop
- assets/swarm.js, assets/call.js -> swarm.js, call.js (no assets/ dir exists)
2026-08-15 12:45:22 +02:00
iris
3e9f2f2fd5 docs(dashboard): fix stale facts found in source-verification sweep
- server-warnings banner: was described as disk-pressure-only; it's now
  a push-based registry with multiple producers (forge/CI boot
  failures, agent-state warnings), and shown on more standalone pages
  than listed
- browser tab title: actual default/format is "hyperhive // h1ve-c0re",
  not "hive / c0re"
- SW4RM container tree: ContainerView.parent comes from
  agent_config/topology.rs, not the ambiguous dashboard/topology.rs
  (which only holds set-parent endpoints)
- T00L GR0UPS: tool-group enumeration was missing "forge"; root agent's
  default (MANAGER_DEFAULT) is not literally "all groups" -- it excludes
  forge and web_tools
- ST4TS moved to its own /stats.html page a while back; section still
  called it a dashboard tab
- P33RS is a headline block within the SW4RM tab, not its own tab --
  contradicted the doc's own chrome-header description
- active model badge: reads hyperhive-harness.json's active_model
  field, not a bare harness/hyperhive-model file
- themed dialogs: modal.js lives in the shared package
  (@hive/shared/modal.js), and themedToast takes (message, opts) not
  a single options object
- graceful stop: backend uses a Signal/Drain job-queue node pair, not
  a "GracefulStop" transient kind; hivectl flag is `stop --graceful`,
  not a bare `--graceful`
- container_state_changed event: named a nonexistent
  auto_update::rebuild_agent as an emit site; actual sites are
  actions::approve and the job queue's own node execution

Verified against hive-c0re/src (dashboard/, stats/, job_queue/,
container_view.rs), hive-sh4re/src/permissions.rs, and the dashboard
frontend package (tabs.js, stats.js, swarm.js, builds.js, modal.js).

No structural/prose changes beyond what the fact corrections required.
2026-08-15 12:45:22 +02:00
iris
723e33ae6c docs(agent-hierarchy): fix stale topology.rs path, ManagerRequest, dead reminder_scheduler.rs ref, and hardcoded forge URLs 2026-08-15 12:45:22 +02:00
iris
720e5340de docs(boundary): fix answer-question path and nonexistent AgentRequest type 2026-08-15 12:45:22 +02:00
iris
1277f5d4ca docs(security): fix stale forge.rs path, GetAgentMeta validator, hive-priv table 2026-08-15 12:45:22 +02:00
iris
3e49652511 docs(gotchas): fix wrong claim that hyperhive-events.sqlite lives in state dir
Verified against hive-agent/src/paths.rs: harness-internal files
(hyperhive-events.sqlite, hyperhive-turn-stats.sqlite, hyperhive-model)
live in the separate harness dir, specifically kept out of the
agent-visible state dir.
2026-08-15 12:45:22 +02:00
iris
637d36a11f docs(turn-loop): fix wrong HelperEvent lifecycle-event list
Verified against hive-sh4re/src/manager.rs and docs/approvals.md: only
ApprovalResolved/ContainerCrash/NeedsUpdate/QuestionAsked/QuestionAnswered
are HelperEvents delivered as inbox messages. spawned/rebuilt/killed/
destroyed/needs_login/logged_in/config_ready aren't HelperEvent variants
at all — they deliver via Coordinator::push_todo/push_todo_submitter
(the in-container todo socket), not the broker inbox.
2026-08-15 12:45:22 +02:00
iris
efc30a0bcf docs(turn-loop): fix stale topology::parent_of reference
Verified against hive-c0re/src/agent_config/topology.rs: there is no
parent_of function; <parent> sentinel resolution happens in
topology::resolve_recipient.
2026-08-15 12:45:22 +02:00
iris
b662bc8578 docs(turn-loop): fix stale plugin defaults + dashboardLinks reader
Verified against nix/agent-modules/claude-settings.nix (claudeMarketplaces
and claudePlugins defaults both gained a second entry — the hive's own
claude-plugins marketplace and base@hyperhive plugin — that the doc never
picked up) and hive-agent/src/web_ui/state.rs (dashboardLinks is read by
the harness's own per-agent web UI, not hive-c0re / the operator
dashboard).
2026-08-15 12:45:22 +02:00
iris
6d74476572 docs(turn-loop): fix stale rmcp version + AgentRequest::Wake reference
Verified against Cargo.lock (rmcp resolves to 2.2.0, Cargo.toml pins
"2") and hive-core-agent-sock/src/lib.rs (the Wake variant lives on
Request there; hive_sh4re::AgentRequest doesn't exist).
2026-08-15 12:45:22 +02:00
iris
0f92e58ebb docs(turn-loop): fix stale context_window_tokens module path + on-boot files dir
Verified against hive-agent/src/harness_state.rs (context_window_tokens
lives there, only imported into events.rs) and hive-agent/src/paths.rs
(config_dir() defaults to /run/hive-config, deliberately separate from
/run/hive/ which holds the per-agent socket).
2026-08-15 12:45:22 +02:00
iris
ac58823eb3 docs(turn-loop): fix stale AgentRequest/ManagerRequest wire-type names
Verified against hive-agent/src/main.rs and hive-core-agent-sock/src/lib.rs:
there is no AgentRequest/AgentResponse or ManagerRequest/ManagerResponse
alias anywhere in the tree — hive-agent uses hive_core_agent_sock's
unified Request/Response enum directly.
2026-08-15 12:45:22 +02:00
iris
844337ca91 docs(gotchas): fix stale set_nspawn_flags path + SPA-fallback file/paths
Verified against hive-c0re/src/lifecycle/host_config.rs (function lives
in the host_config submodule, not bare lifecycle::) and
nix/host-modules/hive-matrix.nix (the working Accept-header SPA
fallback lives there, serving fluffychat at the vhost root /index.html,
not a /matrix/ path prefix in a nonexistent hive-gateway.nix).
2026-08-15 12:45:22 +02:00
iris
4f03a82cc5 docs: fix 3 more stale dashboard.rs refs argus caught in review
hive-c0re/src/dashboard.rs became a module directory
(hive-c0re/src/dashboard/) a while back; three more references to it
as a single file survived the #3281 sweep (conventions.md x2,
web-ui/shape.md's StateSnapshot pointer). Same bug class the sweep
was hunting for, argus caught it in review.
2026-08-15 12:45:22 +02:00
iris
dd8b5db7ab docs: fix remaining stale internal references from the #3281 sweep
Two follow-ups the per-file sweep workers flagged but couldn't fix
themselves (either not their assignment, or not visible from their
worktree):

- web-ui/dashboard.md's P33RS tab named dashboard.rs, which no longer
  exists (hive-c0re/src/dashboard/ is a module dir now); the function
  moved to state_snapshot.rs.
- approvals.md and conventions.md used hive_ag3nt:: as a Rust
  module-path prefix. hive-agent is a bin-only crate (no lib target),
  so that prefix never resolved to anything; also fixed the
  hive-ag3nt/prompts/system.md path to the real hive-agent/prompts/.

All three verified directly against the current source tree, not
guessed.
2026-08-15 12:45:22 +02:00
iris
f29df9cadb docs(approvals): trim historical framing, dedupe ask/answer with conventions.md 2026-08-15 12:45:22 +02:00
iris
ea18ebeff4 docs(snapshot-store): cross-link the state subvolume to persistence.md 2026-08-15 12:45:22 +02:00
iris
e418de0f73 docs(coordinator): trim changelog-style framing, drop review-comment quote 2026-08-15 12:45:22 +02:00
iris
c14d932687 docs(persistence): dedupe destroy/purge + agent_power against other sections, trim historical framing 2026-08-15 12:45:22 +02:00
iris
79a02f6859 docs(swarm): trim tuwunel internals to the operator-relevant fact 2026-08-15 12:45:22 +02:00
iris
b02af39007 docs(swarm): point sso.md's secrets section at secrets.md instead of restating it 2026-08-15 12:45:22 +02:00
iris
42282410ad docs(swarm): cross-link services.md to sso.md and secrets.md 2026-08-15 12:45:22 +02:00
iris
c681b8a340 docs(swarm): dedupe CA summary, drop stale/inaccurate fn refs 2026-08-15 12:45:22 +02:00
iris
93bb3a294f docs(forge): reframe changelog-style asides as present-tense gotchas 2026-08-15 12:45:22 +02:00
iris
8a2ffbbef7 docs(ci): fix required-check contradiction, dedupe bootstrap, trim history 2026-08-15 12:45:22 +02:00