Commit graph

1,672 commits

Author SHA1 Message Date
damocles
fac5437508 docs: commit generated hivectl cli reference + flake freshness check 2026-06-05 21:07:51 +02:00
damocles
ad8a3a8cbf feat: hidden hivectl markdown-docs subcommand emitting the cli reference as commonmark 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
79101edc2f address argus: drop issue tags from clone/pr-create module docs, fix stale knowledge wording 2026-06-05 20:51:50 +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
e7a68472fd fix: reject bare --room value in hivectl matrix invite with a clear hint 2026-06-05 20:51:31 +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
iris
153870ec3a test: drop unnecessary Result wrap in bash status test helper
clippy::unnecessary_wraps — the helper always returns Ok. Build the
DaemonResponse directly and wrap with Ok() at the call sites. Fixes the
CI clippy failure on this PR.
2026-06-05 20:50:44 +02:00
iris
d34c594f2b feat: hint to do other work when recv/bash_status waits time out
When an agent parks on a long-poll that expires with nothing to show,
nudge it to spend the idle time on other useful work instead of
immediately re-blocking on the same call.

- recv: when wait_seconds > 0 and the inbox is empty at timeout, the
  '(empty)' result now carries IDLE_WAIT_HINT. Immediate peeks
  (no/zero wait) are unchanged.
- bash_status: when wait_seconds > 0 and the task is still
  pending/running at timeout, append BASH_IDLE_WAIT_HINT. Finished
  tasks and no-wait calls are unchanged.

Both thread a 'waited' flag into the formatter so the hint only fires
on an actual wait-timeout. Unit tests cover both. Implements #1411.
2026-06-05 20:50:44 +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
damocles
782438be89 fix(#1374): make /shared writable by all agents (sticky world-writable) 2026-06-05 18:46:16 +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
damocles
b33b3f315c fix(#1397): point send-refused message at <parent> sentinel not stale manager name 2026-06-05 18:36:42 +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
iris
20269873bd docs(turn-loop): also document hyperhive.icon option
SVG path for per-agent visual identity — used in the page header,
favicon, Forgejo profile avatar (forge-avatar-sync), and Matrix
profile avatar (matrix-avatar-sync).
2026-06-05 18:30:29 +02:00
iris
8f4a8fbc07 docs(turn-loop): document passwordlessSudo, dashboardLinks, extraFiles, connectivity overrides
Five previously undocumented per-agent agent.nix options:

- hyperhive.user.passwordlessSudo: default-true sudo grant; note added
  with cross-reference to companion user.* options in agent-hierarchy.md
- hyperhive.dashboardLinks: declarative extra nav links on the dashboard
  card and per-agent page header; table of fields (label/url/icon)
- hyperhive.frontend.extraFiles: overlay files over the default agent dist;
  source/target semantics, constraints, collision guard, mergedDist
- hyperhive.forge.url: per-agent Forgejo base URL for tea login; default
  localhost:3000; validation note
- hyperhive.matrix.url: per-agent matrix-sdk homeserver URL; default
  localhost:8008; per-agent override use-cases (remote hive, VPN)
2026-06-05 18:30:29 +02:00
iris
83059a0fcb docs(turn-loop): document hyperhive.autoCompact nix option
The compaction section already documented HIVE_COMPACT_WATERMARK_TOKENS
but didn't mention the per-agent nix option (hyperhive.autoCompact,
default true) that maps to it.

Add a short note after the watermark paragraph explaining that operators
can set autoCompact = false in agent.nix to disable proactive compaction,
and note the reactive path still applies. Useful for sonnet/opus agents
where the 75% heuristic fires before the session is actually full.
2026-06-05 18:28:43 +02:00
iris
2c7d723de6 docs(coordinator): document agentCpuQuota, agentMemoryMax, preBuildAgentTemplates
Three host-level NixOS options in services.hyperhive.c0re were
undocumented. Add a new 'Host-level resource + performance options'
section to coordinator.md covering:

- agentCpuQuota (default 200%) — CPUQuota= drop-in per container
- agentMemoryMax (default 4G) — MemoryMax= drop-in per container
- preBuildAgentTemplates (default false) — pre-fetch agent closures
  into host nix store; trade system closure size for first-spawn speed;
  warn against enabling on aarch64 hosts
2026-06-05 18:27:05 +02:00
iris
9d7a3a7d9a docs(matrix): document hive Matrix Space creation and persistence 2026-06-05 18:25:19 +02:00
iris
975ffd08a2 docs(tools/forge): note pr-reviews list includes inline comments per review 2026-06-05 18:24:03 +02:00
iris
a10a3a8699 docs(tools/bash): document daemon+bridge architecture and transient wake 2026-06-05 17:02:31 +02:00
iris
fdd100194e docs(gateway): document security headers + HSTS opt-in option 2026-06-05 17:01:05 +02:00
iris
c1d1328426 docs(gateway): document custom 401 page in HTTP Basic auth section 2026-06-05 17:01:05 +02:00
iris
f79b0e601f docs(dashboard): add descriptions field to tool-groups + capabilities API response shape
GET /api/tool-groups and GET /api/capabilities both return a
descriptions map (name → short string) added in feat(#1082). The
map drives native browser tooltips on column headers in the
P3RM1SS10NS tab. The API docs still showed the old 2-field shape.
2026-06-05 16:59:29 +02:00
iris
76040407b6 docs(tools/matrix): update wake body format to reflect rich unread summary
The matrix wake body description said '[matrix] <sender> in <room>:
<first-100c>...' (old single-line teaser). After feat(#1137) it's now
a richer format:
- Single room, 1 message: terse one-liner with sender + body
- Single room, N messages: count + room name
- Multi-room: bulleted list with per-room summaries

Also note that the same breakdown appears in get_loose_ends via the
UnreadMatrix entry.
2026-06-05 16:58:14 +02:00
iris
972a3ead68 docs(knowledge): document hive-wide knowledge repo + /knowledge bind-mount
The internal/knowledge forge repo and its /knowledge container bind-mount
have been live since feat(#1167) but had no docs/ entry — only a mention
in the agent system prompt.

Add docs/knowledge.md covering:
- Agent access (/knowledge read-only bind-mount inside every container)
- Repository layout (internal/knowledge, auto-seeded README)
- Sync mechanism (webhook on push + periodic pull fallback)
- State paths (/var/lib/hyperhive/knowledge on host)
- Contribution workflow (fork + PR, no direct push)

Also add a file-map entry and reading-path bullet in CLAUDE.md.
2026-06-05 16:56:00 +02:00
damocles
fb726197ea fix(#1375): clean up pedantic warnings and re-enable -D warnings without pedantic bypass 2026-06-05 16:55:09 +02:00
iris
da7f1d6c45 docs(tools): add hivectl.md — operator host CLI reference
hivectl has verbs scattered across CLAUDE.md and domain docs (gateway.md
has the gateway subcommands, matrix.md has a brief mention) but no
single cheatsheet. Add docs/tools/hivectl.md covering all subcommands:

- forge create-user: provision/refresh agent or human forge accounts
- matrix create-user / sync-admin / promote-user / reset-password
- gateway create-user / delete-user / list-users (htpasswd management)
- agents restart / restart-all (container lifecycle via admin socket)
- choom <name> [--fresh]: interactive claude session in agent container

Also add a reading-path entry to CLAUDE.md pointing at the new file.
2026-06-05 16:53:46 +02:00
iris
a650187d23 docs: fix bash-tasks retention + matrix provisioning daemon restart
persistence.md: bash-tasks/ says "persist until container purge" but
bash_tasks_vacuum now runs hourly and deletes terminal task trios older
than 48 hours. Update the description to reflect actual retention policy.

matrix.md: add step 6 to the Provisioning flow section documenting that
hive-c0re restarts hive-matrix-daemon immediately after writing the
access_token (fix for issue #1329). Previously the doc stopped at token
write; the restart + .path-trigger fallback interplay was undocumented.
2026-06-05 15:45:14 +02:00
iris
7d1d5d9bff docs(agent): add GET /api/state, /api/dashboard-state, /api/loose-ends, /api/stats to per-agent endpoints 2026-06-05 15:35:33 +02:00
iris
0d84e11dcd docs(persistence): document hyperhive-status in state/ and mcp-loose-ends/ in harness/ 2026-06-05 15:32:22 +02:00
atlas
734fe88858 fix(ci): unblock nix flake check after clippy 0.1.95 bump (#1368)
The nixpkgs bump to clippy 0.1.95 / cargo 1.95.0 added + strengthened a
large batch of lints. CI denied ALL warnings (`-D warnings`) against the
`pedantic = warn` workspace lint, so the bump hard-failed `nix flake
check` workspace-wide with zero code changes — and would recur on every
future clippy bump.

Posture fix (the durable part): CI now runs
`-D warnings -A clippy::pedantic`, so the default/correctness/style lints
stay a hard gate while the "extra, opinionated" pedantic group is
advisory only (still `warn` for local `cargo clippy` via the workspace
lints table, just non-blocking in CI). `-A` rather than `-W` so the
group drop doesn't re-enable the specific pedantic lints the workspace
allows (e.g. `must_use_candidate`).

Also fixes the genuine DEFAULT/STYLE lints the bump surfaced across the
workspace (doc_lazy_continuation, collapsible_if, ptr_arg,
match_like_matches_macro, …) via `cargo clippy --fix` + manual stragglers
(`too_many_arguments` #[allow] on the host-config constructors), and
three tests that had rotted while the CI runner was offline (#1221):
- topology::top_level_agents_in_multi_root — hardcoded unsorted expected
- rebuild_queue::depends_on_evicted_dep_counts_as_resolved — needs
  MAX_HISTORY_PER_KIND newer terminals to evict, not one
- coordinator::agent_paths doctest — illustrative pseudo-code, now `ignore`

Validated: clippy + formatting + cargo-test checks all pass.
2026-06-05 15:32:07 +02:00
iris
35717c7bac docs(tools/forge): add comments --tail and pr-reviews --approve/--request-changes/--comment to cheatsheet 2026-06-05 15:30:33 +02:00
damocles
f201f04d4e fix(#1329): restart hive-matrix-daemon after token write so new credential is picked up immediately 2026-06-05 15:30:21 +02:00
iris
92b32d06fb fix(clippy): fix all clippy warnings in hive-ag3nt, hive-forge, hive-matrix-mcp, hive-sh4re
Fixes all clippy -D warnings errors in the crates iris owns:

hive-sh4re:
- doc_lazy_continuation: add blank /// separator in priv_proto.rs
- doc_markdown: backtick PRIVATE_NETWORK=0 / PRIVATE_NETWORK=1

hive-matrix-mcp:
- map_unwrap_or: map().unwrap_or_else() -> map_or_else() in paths.rs
- collapsible_if: if-let chains in wake.rs
- doc_markdown: backtick M_UNKNOWN_TOKEN in main.rs
- cast_possible_truncation: usize/u64 -> u32::try_from in handlers.rs
- map_unwrap_or: map_or_else() in handlers.rs
- manual_let_else: match Ok(r) => r, Err => return -> let Ok in handlers.rs
- unused_async: remove async from list_invites; update socket.rs call site

hive-forge:
- doc_markdown: backtick REQUEST_CHANGES / APPROVED / COMMENT in pr_reviews.rs
- unnecessary_wraps: list_reviews_text returns () not Result<()>
- doc_markdown: backtick start_page / last_page in comments.rs
- cast_possible_truncation: PAGE_SIZE u64 -> usize; remove as usize casts

hive-ag3nt:
- collapsible_if: if-let chains in events.rs and mcp.rs
- single_match_else: match -> if let in events.rs and mcp.rs
- items_after_statements: hoist STATUS_MAX_CHARS const in mcp.rs
- map_unwrap_or: map_or_else() in mcp.rs and mcp_loose_ends.rs
- cast_possible_truncation: usize -> u32::try_from in mcp.rs
- doc_markdown: backtick snake_case in mcp.rs, needs_update/deployed_sha
  in web_ui.rs, HISTORY_CAPACITY in web_ui.rs
- identical_match_arms: combine manage_root_agent | query_agent_state
- redundant_closure: |s| s.to_string() -> ToString::to_string in web_ui.rs
- duration_suboptimal_units: from_secs(3600) -> from_hours(1) in turn.rs

Remaining failures in hive-c0re (39), hive-priv (8), hive-bash-mcp (11)
are owned by damocles.
2026-06-05 14:35:12 +02:00
iris
6a35f48458 fix(sh4re): add blank doc comment line to fix clippy doc_lazy_continuation 2026-06-05 14:35:12 +02:00
iris
058035d10a docs(dashboard): note status-age chip data-set-at live-tick in container row docs 2026-06-05 14:32:09 +02:00