Watch
0
0
Fork
You've already forked hyperhive
0
Commit graph hyperhive/docs
Author SHA1 Message Date
iris
d4f58b3667 swarm-ui: make popovers and table filters usable from the keyboard
Opening a popover or a table filter now moves focus into it, closing one
that left focus on nothing puts it back on the trigger, and the triggers
carry aria-haspopup and aria-controls. The shared Popover covers every
caller; the table filter popover, which has its own portal, does the
same.
2026-10-21 23:01:56 +02:00
iris
bf9d07aedc docs: describe the issue report page and how it handles failures 2026-10-21 22:58:51 +02:00
iris
e727774dc8 swarm-ui: show agent panel read failures as text and keep loaded data
Inference, resource caps and linked accounts showed a failed read as a
badge with the reason in a hover title, which keyboard and touch users
cannot read. They now use ApiErrorPanel, and a list that already loaded
stays on screen under a failed refetch.
2026-10-21 22:57:51 +02:00
atlas
220b51d0a3 swarm-authelia: run in its own network namespace
Refs #4815
2026-10-21 22:10:23 +02:00
iris
ef156d9d23 swarm-ui link-account forms: keep the sent name, drop secrets, one word for forge
The success line of both link forms read the live text field, so editing
the name after a link changed the sentence. The result now carries the
name that was sent.

The matrix form held the typed token and password after a failed submit,
and kept them across a switch of credential mode. It now drops them when
the request ends and when the mode changes.

The linked-accounts list and the delete dialog said forgejo where the
link menu and forms say forge; they now say forge.
2026-10-21 22:06:49 +02:00
atlas
041779d910 tls: a CA root change no longer restarts the store or bounces containers 2026-10-21 22:00:13 +02:00
iris
e03bd4caa4 swarm-ui try-out: stable live region, reasons for disabled buttons
The running line is a live region whose text changed every second, so a
screen reader announced the counter again each time. The sentence is now
stable and the elapsed seconds sit outside it.

The run and open-a-PR buttons point at the hint that says why they are
off, and add-a-classification says why it is off at the cap.
2026-10-21 21:45:05 +02:00
iris
20e2f53592 docs: a subagent that leaves the list closes its terminal 2026-10-21 21:12:00 +02:00
iris
dad495cdfa hive-c0re: fix stale banner and gauge-name wording after review
The nix-store gauge comment claimed a semconv name it deliberately does
not use; it now says why the name is hyperhive-scoped. Two doc pages
still described the removed banner for the limits-read and
knowledge-pull failures. The warning alert's comment now says
pending_logins pages on purpose.
2026-10-21 17:58:09 +02:00
iris
4dbcf6fa80 hive-c0re: hive warnings reach the operator as metrics and alerts, not a banner
The dashboard's top-of-page warning banner is gone. The warning registry
stays, because /health/ready, the swarm status view and the OTEL gauges
read it. What it feeds is now alerted on in Grafana:

- hyperhive.hive.warning{kind,level}: one series per raised warning, so an
  alert names the cause. Raising a warning also logs one `hive warning
  raised` line with the message.
- hyperhive.hive.nix_store.utilization: the used fraction of the nix
  store's filesystem, probed in the gauge callback.
- Alerts: hh-hive-degraded on the existing degraded gauge, hh-hive-warning
  per kind (disk excluded), hh-host-disk-high at 85% and
  hh-host-disk-critical at 95%.
- pending_logins is now a registry warning, refreshed from the container
  rescan, so it reaches the per-kind gauge.

Frontend: server_warnings leaves the state snapshot, and the dashboard,
flow and stats pages keep only the sticky chrome wrapper. The shared
hive-warn and WarnBanner components stay, since other views use them.

A module-eval case checks each alert's metric name against the exporter's
source, so a rename on either side fails the build.
2026-10-21 17:52:53 +02:00
atlas
41a7974b9e swarm-otel: the upstream export is a swarm-otel deploy option
The external export is a setting of the swarm collector, so it moves to
services.hyperhive.deploy.swarm-otel.upstream. Renamed:
- otel.endpoint -> upstream.endpoint
- otel.protocol -> upstream.protocol
- otel.headersCredential -> upstream.headersCredential
- otel.collector.upstreamHeaderName -> upstream.headerName
The unreleased otel.upstreamSignals is declared as upstream.signals.

Hosts keep working through the rename warnings. Eval test covers the old
paths reaching the new options. Docs and stale comments point at the
new paths.
2026-10-21 10:25:26 +02:00
atlas
2977dc91d1 swarm-otel: the operator chooses which signals go upstream
Adds services.hyperhive.otel.upstreamSignals, a list of "metrics" and/or
"logs" naming the signals the swarm collector sends to otel.endpoint. The
swarm's own stores always receive everything. The upstream exporter is
only defined when at least one signal uses it, since otelcol refuses an
exporter no pipeline references.

On deploy: nothing changes until the option is set; the default is
[ "metrics" "logs" ], today's behaviour. To stop the 404 flood from an
upstream that has no /v1/logs, set services.hyperhive.otel.upstreamSignals
= [ "metrics" ].
2026-10-21 09:31:39 +02:00
atlas
9a65643769 swarm-bao granter stops retrying a rejected bootstrap token
swarm-bao-granter-role exits 4 when the store is unsealed but refuses the
bootstrap token, and Restart=on-failure retried that every 30s for as long
as the token file existed. RestartPreventExitStatus=4 makes that permanent
failure leave the unit failed once. Exit 1 (store sealed or unreachable)
keeps retrying.

On deploy: the unit goes red once instead of looping every 30s. The stale
token on muede-lpt2 still needs the operator step (remove it or mint a
fresh one); this does not clear it.
2026-10-21 09:22:19 +02:00
atlas
de68f175b5 wanted pull: one deadline bounds both connect waits 2026-10-21 09:22:10 +02:00
atlas
784507f554 hive-c0re re-converges wanted state whenever its watch attaches
pull waits (bounded) for the swarm queue connection instead of failing at boot while the client is still connecting. The watch runs one pull after every attach, including re-attaches, and a failed attach or ended stream is retried with a bounded backoff instead of waiting for the next boot. A first deploy is not queued again while one for the agent is queued or running.

An agent whose first deploy was lost to a c0re restart is now deployed on the next boot, or the next watch re-attach, without anyone re-declaring it.
2026-10-21 09:22:10 +02:00
atlas
62a8a40e90 hive-forge list trusts the forge's own next-page signal for its trailer 2026-10-21 00:50:01 +02:00
atlas
3543942e4c docs: hive-forge list's paging trailer 2026-10-21 00:34:39 +02:00
atlas
096b45867d swarm-nats gateway cert: treefmt 2026-10-21 00:19:19 +02:00
atlas
b4dbd7d1c3 swarm-nats gateway cert reloads nginx without blocking the switch
nixos-rebuild switch no longer hangs when nginx is (re)started in the
same transaction: the cert unit is Before=nginx, so its synchronous
reload and nginx's queued start job waited on each other. The reload is
now queued with --no-block try-reload-or-restart, as the nixpkgs ACME
module does.
2026-10-20 21:20:24 +02:00
atlas
f864ffba1b an interrupted meta sync resumes on the next run instead of leaving flake.lock stale
sync_agents returned early whenever the rendered flake.nix matched disk.
A sync stopped after writing flake.nix but before its commit therefore
never re-locked or committed. The early return now also requires that
flake.nix and flake.lock have nothing uncommitted; otherwise the normal
lock+commit path runs and logs that it is resuming.
2026-10-20 18:58:12 +02:00
damocles
53eed2a757 nix: extraMcpServers http entries can read request headers from one file via headersHelper 2026-10-20 13:03:00 +02:00
damocles
62ab45297c hive-agent: run the event store in WAL and give turn-stats writes a busy timeout 2026-10-20 12:08:30 +02:00
atlas
161dd8c44b meta lock waiters keep their queue place; deadlines cover pin_agent git and kill the whole process group 2026-10-20 12:01:14 +02:00
atlas
7cde4e7b15 meta nix/git calls under META_LOCK time out instead of wedging every deploy
A hung forge fetch inside `nix flake update hyperhive` (or any other meta
git/nix child) now fails after its deadline with an error naming the command,
the child is killed, and META_LOCK, BuildSlot and MetaWindow are released. The
boot sweep already treats that failure as a warning and fans out the rebuilds.
A wait on META_LOCK past 60s logs a warning naming the waiter and the holder.
2026-10-20 12:01:14 +02:00
atlas
8d70afd93e swarm-otel's own logs go only to the store, so an upstream export failure no longer feeds itself
The logs/self pipeline shipped the collector's own journal to the upstream
exporter too. When the upstream failed, the collector logged the failure,
journald/self read it, and logs/self sent it upstream again: ~8 lines/s.

logs/self now exports only to otlphttp/victorialogs, and a filter processor
drops the collector's failure lines that name that exporter, so the store
exporter cannot rebuild the loop one hop later. Other collector lines,
including upstream failures, still reach the store.

On deploy, swarm-otel's store rows drop from ~8/s of error spam to its real
output.
2026-10-20 12:00:41 +02:00
atlas
8476609f98 swarm-otel ships its own journal, so its logs reach the store
The collector's container ran with --link-journal=host and the host's
journal bound over /var/log/journal, so its own journal was never
written where anything read it. It now keeps its journal in the guest,
reads it with a second journald receiver, and gets the host's journal
at /run/host-journal.

On deploy swarm-otel rows start arriving in the store, stamped
service.name swarm-otel.
2026-10-19 20:25:23 +02:00
atlas
f0d93cd0fe the review classifier takes the merge base from the PR's commits, not the forge's stored merge_base 2026-10-19 20:19:36 +02:00
atlas
d547b521f6 agents fetch the hive CA from bao at boot instead of the meta flake embedding it 2026-10-19 20:15:13 +02:00
atlas
13daf4c7dc every hive runs its otel collector, and agents export to it by default 2026-10-19 18:35:17 +02:00
atlas
839efd1642 agent_permissions, agent_term and subagent_term take their wire contracts from swarm-wire 2026-10-19 18:30:44 +02:00
atlas
09cabf8398 the rendered meta flake pins each agent config by forge URL at its forge main 2026-10-18 22:57:29 +02:00
atlas
e4a9005468 move Permission into hive-types, drop swarm-controller's hive-sh4re dep 2026-10-18 21:40:01 +02:00
atlas
daf38e4c55 the meta flake takes docs from the pinned hyperhive input 2026-10-18 20:09:14 +02:00
atlas
bb13909d8e the rendered meta flake pins hyperhive by forge URL and follows its nixpkgs 2026-10-18 20:06:09 +02:00
atlas
6ea13c02e3 move the review classifier, agent login and inference types into swarm-wire 2026-10-18 19:27:30 +02:00
iris
447498fef7 swarm-ui: add a messages page for the swarm-wide message feed
/messages reads GET /api/messages/stream. A history select picks the window
(live only up to 24 hours) and a filter keeps the messages whose sender or
recipient contains the text. Each message is a row of the terminal list an
agent's terminal uses: one summary line with the time, the two parties and
the start of the body, and the whole body under it. The list follows the
newest message and holds the last 2000.

The feed has no event id, so a reconnect sends the history again. The page
empties its list each time the connection opens and fills it from the
replay, where the terminal stream hook, which keeps its rows across a
reconnect, would list every message twice.

The stream URL, filter, cap and row logic is in its own module with tests,
and docs/swarm/ui.md describes the page.
2026-10-18 18:19:30 +02:00
atlas
c32906b893 the swarm controller streams every inter-agent message from the agents' terminal rows 2026-10-18 17:27:53 +02:00
iris
dd7fc1c9af swarm-ui: show the AGENTS.md size refusal when the instructions section is collapsed
The refusal sat inside the collapsed section, and the general error panel
hides while a refusal is set, so a refused submit with the section closed
showed nothing. The refusal now renders under the section, outside the
details element.
2026-10-18 16:02:10 +02:00
iris
f068d0b2fc docs: say the swarm refuses an oversized initial AGENTS.md in the active voice 2026-10-18 16:00:50 +02:00
iris
30ba34f411 swarm-ui: let the create-agent form set the new agent's initial AGENTS.md
The form gets a collapsed "instructions" section with a plain text box. Its
text goes in the optional agents_md field of the create request, and is left
out while the box is empty or only whitespace. The controller's size refusal
shows under the box instead of in the form's general error panel. The text
box empties after a successful create.

The send and refusal logic sits in its own module with tests, and
docs/swarm/ui.md describes the field.
2026-10-18 15:59:19 +02:00
atlas
456cf9a7cb set an agent's initial agents.md at create 2026-10-18 15:54:14 +02:00
atlas
738dd1c95b swarm-controller: split main.rs into jobq, routes and startup modules
no behaviour change: a pure move of items and tests into new modules, plus
visibility edits (pub(crate)) and path updates in sibling modules that named
crate-root items. same routes, same OpenAPI, 561 tests before and after.

why: #5470, new features stop landing in one 6.4k-line file by default.

files outside swarm-controller/src: docs/agent-lifecycle/agent-roster.md,
swarm-ui JobsPage.tsx and AgentsPage.tsx, nix/host-modules/swarm-controller.nix
and swarm-grafana.nix hold comments that named main.rs for items that moved.
2026-10-18 13:44:43 +02:00
iris
f0a6d6c042 swarm-ui: add a button to the alerts page that shows the pending, no-data and error instances
The page opens on the firing ones. The button lists every instance again,
with the state filter and the tones back, so the table's filtering is
visible. The saved-filters key goes back to its original name, since the
state column is a filter again.
2026-10-18 13:29:52 +02:00
iris
842b37dc33 swarm-ui: show only firing alerts on the alerts page and link to Grafana's list
The page listed every non-normal instance. It now keeps the ones in the
Alerting state and links to Grafana's alert-groups view for the pending,
no-data and error ones.
2026-10-18 13:29:52 +02:00
iris
b5d2e310ba swarm-ui: an editor for an agent's AGENTS.md that saves as a diff
The instructions row of the agent detail panel gets an edit button that
opens the agent's AGENTS.md, as the harness last published it, in a text
box. Save sends a unified diff against the revision that was loaded; when
the agent changed the file meanwhile the editor keeps the operator's text,
shows the agent's version and offers to save over it or take it. An unsaved
edit survives closing the dialog.

The diff is built in the browser (LCS over lines, three lines of context,
git's no-newline marker) and was checked against git apply on 600 random
before/after pairs.
2026-10-18 13:17:52 +02:00
atlas
bff13c8c68 review-classifier: docs-updated is not applicable when nothing operator-visible changes 2026-10-18 12:37:46 +02:00
atlas
c533caf8ef document who holds the agents-md edit route 2026-10-18 12:35:11 +02:00
atlas
9add99838c document reading and editing an agent's agents.md through the swarm
docs/swarm/README.md gets the routes, the revision, the apply semantics
and the stopped-agent behaviour; the persistence doc points there from
the AGENTS.md entry. The swarm-controller, swarm-controller-api and
swarmctl READMEs and the repo map in AGENTS.md list the new bodies and
routes. docs/tools/swarmctl-cli.md is regenerated for
`swarmctl agent agents-md`, whose help text loses two passive phrasings
vale flags.
2026-10-18 12:35:11 +02:00
atlas
d9c586ef94 swarm-controller: replay a subagent's newest rows before its live tail
A subagent's terminal opened directly showed nothing until the subagent
published again: the relay was a core subscription, though its rows sit
in term-sub-<agent> for 24 hours. It now goes through the agent route's
replay-then-tail, so it opens with the subagent's newest 100 rows and
resumes after Last-Event-ID.

- term_stream.rs: the replay takes a stream name and a filter subject
  instead of an agent, and `replay_or_live` (replay, else the live core
  subscription) is the one fn both routes call. When the filter is one of
  several subjects in the stream, a fresh reader's consumer starts at the
  oldest row and drops all but the newest REPLAY_ROWS it counts as
  pending, since the stream's newest sequences may belong to sibling
  subagents. A single-subject stream (term-main-<agent>) picks its start
  with replay_start exactly as before. Tests for both subagent cases.
- subagent_term.rs: the relay calls replay_or_live on the subagent's
  subject in term-sub-<agent> and reads Last-Event-ID; module doc and
  OpenAPI text no longer say "live only".
- main.rs: the handler test passes the new headers argument.
- swarm-queue-client agent_term.rs: replay_consumer_config takes the
  filter subject instead of the agent.
- swarm-queue-client subagent_term.rs: consumer_create_grant, the
  extended CONSUMER.CREATE form with a subagent subject as filter.
- swarm-nats-auth policy.rs: the controller holds that grant; the agent
  grant's `$SWARM.term.*` filter is two tokens short of a subagent
  subject, and the test that refused it now admits it.
- docs/swarm/ui.md, README.md: a subagent terminal opens with its newest
  rows.

Fixes #5527
2026-10-18 03:00:08 +02:00
iris
f65364759f swarm-ui: retrying a broadcast shows the agents that failed, even ones the filter hides 2026-10-18 02:40:10 +02:00