Watch
0
0
Fork
You've already forked hyperhive
0
Commit graph hyperhive/docs
Author SHA1 Message Date
damocles
7a7041452e swarm-controller: config repos require the swarm-builder status and default to fast-forward-only merges 2026-11-21 21:40:56 +01:00
iris
70e5de5571 swarm-ui: a header bell with the count of firing alerts opens a list of them and a link to Grafana 2026-11-21 15:21:22 +01:00
iris
7707a257e9 hive ui: the dashboard wears the swarm UI's chrome, and its own header, tab strip and menu mounts go
The dashboard mounts @hive/shared's AppShell, the header, nav and settings menu the swarm UI has, from a new shell.js: the hive's name for the brand, the tabs agents, rebuild queue and kept state routed by the URL hash, the theme, motion and solid-background settings in this page's own browser storage, and the shared links and user menus. The three tab panes stay plain DOM, kept hidden in index.html and moved into the shell's content column by shell.js. The tabs, the hash-to-tab parse and the menu entries sit in shell-routes.js, which npm test covers (the dashboard package gets a test script). The old header, the createTabStrip tabbar, the leet tab names, the identity headline and title code, the sticky-top wrapper, the links-menu.js and user-menu.js mounts and their CSS are removed. The docs say the plain tab names and the new chrome.
2026-11-21 10:47:37 +01:00
iris
797e6e3137 swarm ui: the messages cards move to the swarm page and the messages tab goes
The broadcast, schedules and message log cards now sit on the swarm page, after the notification router; the message log opens its stream on its first open instead of when the page loads, and its connection badge moves into its filter bar. The messages tab is removed from the header, and the old /messages address redirects to /swarm next to /schedules, which now does too. MessagesPage becomes MessageCards, and comments, tests and the swarm UI docs say the swarm page where they said the messages tab.
2026-11-20 22:10:42 +01:00
iris
94969b552e swarm ui: the create-agent name field says why a name is refused, beside the field
A name with an uppercase letter greyed out next with only the footer to say why. The text field now takes an error: it marks the field invalid, draws the reason under it and points aria-describedby at it. The create form passes it once something is typed, and nameProblem names the cause (uppercase first, then length, then other characters) instead of one catch-all rule. Next stays disabled, with the footer hint as before. The swarm UI doc says so.
2026-11-20 21:42:43 +01:00
iris
da25f0a1c3 swarm ui: an agent's API key is set from its claude login row, and the advanced backend settings show the configuration and the secrets apart
The claude login row of an opened agent gains an API key line: a badge saying whether a key is stored, set or replace and remove, and advanced. Setting a key sends PUT on the backend-secrets route as ANTHROPIC_API_KEY=<key>; the key is never read back. The old API-key environment dialog becomes the advanced backend settings, with two sections: the configuration, which starts with the stored text and saves or removes it, and the secrets, whose box starts empty and replaces the stored secrets only when filled and saved. The link menu's entry is renamed to match, account-api.ts gets the route helpers and a key check with tests, and the swarm UI doc describes the row.
2026-11-20 21:23:05 +01:00
iris
33fdd5205e swarm: an agent's backend secrets get a store leaf of their own, and its backend environment reads back
The credentials of an agent's backend (ANTHROPIC_API_KEY and the like) move to their own leaf, swarm/agents/<agent>/backend-secrets, written through new PUT, GET and DELETE routes on /api/hives/{hive}/agents/{agent}/backend-secrets. GET says only whether any are stored. The backend environment at backend-env now reads back as stored through GET on its route, so it holds configuration only.

The agent's hive-agent-backend-env unit now runs on every agent with a store, reads both leaves and writes the configuration and then the secrets into the one file the harness and the subagent daemon load, so a secret wins over a variable of the same name. It removes the file when the store holds neither. The harness counts an agent whose environment holds ANTHROPIC_API_KEY or ANTHROPIC_AUTH_TOKEN as API-billed, so it tries the key instead of waiting for a Claude login; a real 401 still sets needs-login. The controller's policy may delete the new leaf.

Tests: the secret-client path, the controller routes, the script test of the unit with a stub bao, the module-eval cases and the harness's mode check. Docs: the swarm UI routes, the credentials reference and the API-key provider page.
2026-11-20 20:36:33 +01:00
maia
c9204ad0e0 android-dev archetype: ship the Android SDK and nix-ld so a Gradle build runs
The archetype installed Gradle, a JDK and android-tools but no SDK, no
ANDROID_HOME/JAVA_HOME and no nix-ld, so the aapt2 Gradle downloads could not
start on NixOS and an agent could not build an app.

It now builds an SDK (build-tools 36.1.0, platform 35, no emulator or system
images), sets ANDROID_HOME, ANDROID_SDK_ROOT and JAVA_HOME, and enables
programs.nix-ld. The SDK's unfree names are read off the SDK and added to
allowUnfreePackages, which adds to the claude-code allowance instead of
replacing it.

Closes #6696
2026-11-20 19:35:47 +01:00
atlas
cd786ef401 document the controller tcp listener and its two leaves 2026-11-20 19:24:20 +01:00
iris
0a72f212da swarm ui: a terminal keeps 2000 rows and folds a burst of rows in at once
useSwarmTermStream appended each event with [...rows, row] and never dropped one, so a tab on a busy agent grew without bound in memory and DOM and each event cost a copy of the whole list. appendRows (a pure module, tested) folds a batch in with one copy, coalesces as before, and keeps the newest 2000. Events are collected for 50ms and folded in together, so a burst is one render.

The comments that described the old coalescing in useSwarmTermStream.ts's header and in termMsg.ts's TermEnvelope doc named a hook that no longer exists (useLiveStream), so both now point at term-rows.ts, where the rule lives.
2026-11-20 17:18:10 +01:00
iris
da187f8368 swarm ui: a popover stays on the page, and the ssh popover folds its explanations
A popover hung from its anchor and ran off the foot of the window when the anchor sat low. It now goes over the anchor when it fits neither way better below, and otherwise takes the roomier side with its height cut so it scrolls inside itself; the placement is a pure function with a test, and the box places itself again when its content changes size. The ssh popover showed three long paragraphs above its switch: the explainer and the host-key text now sit in a folded how it works section, and the warning and the switch stay visible. Its sections can no longer give the popover a sideways scroll.
2026-11-20 17:15:20 +01:00
iris
3be4ec069c frontend: one time wording for the swarm UI and the dashboard, and no HTML strings in the dashboard's busy buttons
fmtAgo, fmtUntil and durationLabel move to @hive/shared/time.js. The swarm UI's util.ts is deleted and its importers (RelativeTime, ReviewRuns, BuildsPage) read the shared module directly. The dashboard's own copies are gone: its fmtAgeSecs (a third phrasing, used for two status lines) becomes the shared fmtAgo, and the dashboard util.js lost fmtAgo, fmtElapsed, epochSec and truncate, which nothing called. asyncBtn and the bulk action buttons mark themselves busy with markBusy: a spinner node before the label and aria-busy, in place of replacing the button's innerHTML with a string (and the label, so the button changed width and lost its name). The el() helper loses its html attribute.
2026-11-20 17:02:32 +01:00
maia
94dd24fa99 egress-pin: a sweep says why a port stays unbound, which veths are off the bridge and which machines it could not read
A port nobody owns, a vb- veth that never joined the bridge and a machine whose
state file or namespace can't be read all left the bridge sweep silent, so a
container stayed unbound for 11 hours with nothing in the journal.

A timer run now prints one line for each, after the finding has stood for 60 s
and once until it clears, kept in <state file>.diag. Nothing it binds changes.
2026-11-20 09:12:23 +01:00
iris
62551e004e swarm ui: an agent's named ssh connections show in its ssh popover, with add, replace and remove
The ssh popover of an opened agent card gets a folded connections section: a table of the agent's named connections (name, user@host:port) with edit and remove, and a form that saves one. The list is read on the first open; a save is a PUT that replaces a connection of the same name, so the button reads replace and a line names the connection when the name exists; remove asks first. The controller's refusal shows under the form as it comes, and the section says the connections are inactive while ssh is off. The request building is in ssh-connections.ts with a test; swarm-ui.md describes the section.
2026-11-20 09:11:03 +01:00
damocles
e62915d5c4 docs: ci-log --job past the last job is an error 2026-11-20 09:10:13 +01:00
atlas
eab2dcb0a2 egress: document the allowed ssh connections 2026-11-20 04:04:30 +01:00
atlas
934da6f31f agent ssh connections: declare per agent, render into the agent's ssh config 2026-11-20 03:10:41 +01:00
iris
844fb0a219 frontend: one dismiss rule for menus and popovers, menu keys, and dialog and side panel focus
useDismiss (shared) closes a floating box on a press outside or Escape: the press is seen in the capture phase, a press in an open modal dialog is not outside, Escape yields to a modal dialog the box is not in, and a box in a dialog closes alone. Popover, Dropdown, SettingsMenu, LinksMenu and UserMenu use it in place of five copies with different rules; Escape returns the focus to the button. Dropdown takes the focus on open and moves with the arrow keys, Home and End. The link, account and settings popovers drop role=menu (they had no menu keys) for a labelled group. Dialog no longer reports a close the caller asked for, ignores a drag that started inside and ended on the backdrop, and has a 2.75em close button. Popover uses the shared clampLeft. The dashboard's side panel is inert while closed, takes the focus on open and gives it back, and no longer claims aria-modal; hive-dialog gives the focus back on close.
2026-11-20 02:20:58 +01:00
iris
a19745d30d docs: the repo's own CI checks move from the CI runner page to the project process docs
docs/4-implementation/scheduler/ci.md described both the swarm-ci-runner product (hosting, registration, security, store maintenance) and this repo's own pipeline (which jobs run on a PR, the local equivalents, the nightly VM tests). The second part is project process: it moves, whole and in order, to docs/5-project/process/ci-checks.md, with a pointer left behind, an entry in the docs index and the one doc comment in hive-forge that named the old section updated.
2026-11-20 02:15:46 +01:00
iris
f29435fcf1 swarm ui: the messages page's feed is a folded card named message log
The messages page had a card called messages under a nav tab called messages, and its feed was the only part of the page open on arrival. The feed is now the folded message log card, like the broadcast and schedules cards above it. Its header carries the connection badge (live, reconnecting, disconnected) so the state shows while it is folded; the reconnect button moves into the bar inside it. The stream keeps running while the card is folded, and opening it scrolls the list to the newest message.
2026-11-20 02:14:26 +01:00
iris
c3e24fe2c6 swarm ui: ask before actions that cannot be undone, with a danger button and a useConfirm hook
Button gains a danger variant and an autofocus prop; ConfirmDialog gains danger (red confirm, focus on cancel). Destroy, delete linked account, delete claude login, remove schedule and delete flow use it. New useConfirm hook asks from inside a handler (await confirm({...})) without a dialog's state at the call site. It now guards: removing a swarm-wide egress domain, removing a domain for every agent from an agent's popover, removing a stored API-key environment, firing a schedule now, moving an agent's internet to a looser mode, the /clear message, and reload over unsaved instructions (replacing window.confirm). The review try-out's button is now called push a branch for a PR, since it pushes a branch and does not open one, and asks first. loosensInternet is a tested helper.
2026-11-20 02:13:23 +01:00
maia
d9551415bf hive-egress: the lease hook's lines reach the journal at info under egress-lease
dnsmasq relays the hook's stderr at LOG_DEBUG as dnsmasq-script, and the
field log shipper's journald receiver keeps info and above, so no lease
add or renewal was visible in the field. The hook now also writes each
line to /dev/log at info priority with identifier egress-lease. The
stderr print stays. The VM test reads the lines back with
journalctl -t egress-lease -p info.
2026-11-20 02:04:37 +01:00
maia
1552019580 egress-pin: a hung pass fails instead of stopping every later pass
The lock wait polls try_lock and gives up at the pass deadline (30 s), nft, ip
and nsenter get 10 s each before they are killed, and both pin units get
TimeoutStartSec=90s, which systemd does not set for a oneshot unit.
2026-11-20 00:59:35 +01:00
iris
679d2ee420 swarm ui: show agent freshness and failures where the operator looks, page titles, try again, and stale-data notes
An agent card shows its freshness (stale with the last report's age, never reported, not in swarm identity) when it is not fresh, so the status filter has a visible reason. A failed state change shows its reason in a panel under the card, and a failed cancel shows its reason in the badge, instead of a hover title. Pages can set their title (usePageTitle) and the flow editor does, so several editor tabs differ; the 404 links home. The claude login dialog offers try again after a failure, announces its wait, and has a per-agent field id. The create-agent tabs go forward again as far as the operator has been, but not past a step that is invalid now (lastReachableStep, tested), and the disabled next and create buttons say why in a hint they are described by. usePolled reports when the last live answer arrived, and StaleNote says how old a list is under a failed refresh, or that it is the answer saved from the last visit, on the alerts, builds, review runs, hives, schedules and flows lists.
2026-11-20 00:44:01 +01:00
iris
e4cfac6926 frontend: root test and typecheck scripts, and tests for the review runs wording and the terminal drag
npm test and npm run typecheck now run in every workspace that has them (the repo root had only build and clean). New tests cover RunsTypes (labels and tones for every outcome, the classification count) and termDrag (what a drag carries and how the hover reads it). instructions.ts cannot be imported by a test under Node because of its .js specifier for unified-diff.ts, so it is not covered, and the conventions doc says so.
2026-11-20 00:28:04 +01:00
atlas
96334845f0 hive-egress: the spoof log line says which check failed
Each refused frame now goes through its own chain, spoof_<reason>, whose log prefix names the check that refused it (mac, vlan, dhcp, v4, v6, arp). The unmetered log lines of all reasons share one named limit, spoof_unmetered, so the budget stays one for all ports and reasons.
2026-11-20 00:27:20 +01:00
iris
c9e6cd2e61 swarm ui: landmarks, a skip link, a page heading, named repeated buttons and a log role on the terminal
The shell now has a main landmark that takes the focus when a page opens, a skip link as the first Tab stop, a labelled nav, aria-current on the active tab, and a hidden h1 with the page's name (no page drew one). The tab close button and tab link get a visible focus ring and a larger target. Repeated edit, remove, delete, fire now, pause, duplicate buttons and the icon-only terminal, expand and close badges get a name that says what they act on (Button gains ariaLabel). A badge can be pressed (aria-pressed), used for the internet modes and the SSH target form, whose fake tablist is now a labelled group. The terminal is a focusable role=log with live announcements off, and a latest badge scrolls back to the newest row once the operator has scrolled up and the terminal has stopped following.
2026-11-20 00:23:07 +01:00
iris
1ca82b3e09 frontend: one glass token pair in place of three copied light and dark blocks
Headers, badges, terminal panes, the message box and the dashboard's bars read --glass-clear and --glass-filter from theme.css; the light palette (colors.css) and the solid-backgrounds setting set them. Each surface keeps a single rule, the per-theme override blocks and the quiet-badge specificity workaround go, and the dashboard and agent page now follow the light palette like the swarm UI.
2026-11-20 00:22:35 +01:00
iris
2a719a52e8 swarm ui: a narrow-screen header, a one-row terminal badge strip and no sideways page scroll at 360px
There was no width media query anywhere. At 360px the header wrapped into three rows covering a third of the screen, an agent card's trailing controls pushed the page 100px wider than the screen, and the terminal's state badges wrapped onto its first rows of text. At 40em or less the brand and the menus share the first header row, the nav is one row that scrolls sideways (its indicator accounts for the scroll), a card's header line wraps and its icon is smaller, and the state badges over a terminal are one row that scrolls sideways.
2026-11-19 22:33:52 +01:00
atlas
d3e15c7fbe vm-nightly: one job per test, with a lint that keeps the matrix list in step
A stuck test in the shared job was cut at the runner's one-hour limit and hid the other tests' results. The matrix list is static; check-vm-test-list.sh fails CI when it differs from nix/vm-tests.nix.
2026-11-19 21:55:34 +01:00
iris
a1e5855859 frontend: remove the unused vanilla terminal and tab strip, and fix comments that describe removed UI
shared/src/terminal/terminal.js (and its index.js re-export and package export) had no importer: the Preact Row replaced it. The .tail-pill and .load-more-pill rules were only made by it, and the preview's own tail-pill override styled a pill that no longer exists. hive-tab-strip.js had no importer either. Four constants nobody imports are no longer exported. The shared terminal pane section of the web-ui shape doc now describes Row, linkify and markdown instead of the removed factory. Header comments that named removed components (StatusChips, MetaNav, Root.tsx, the cost badge, four folded sections, a detail dialog) now describe the current code.
2026-11-19 21:47:37 +01:00
iris
3d88108c4f frontend: light-theme terminal contrast, theme before first paint, color-scheme, motion and focus defaults
Light theme: the terminal and code blocks sat on --crust, a mid grey there, so text was 2:1 to 3:1. They now use --code-bg, which keeps 95% of a light palette's background (58% of the dark one's, as before); scrims and shadows keep --crust. Dark --muted goes from 4.44:1 to 4.72:1 on --bg. The stored theme and motion overrides are set by a blocking boot script in the head (the page allows no inline script), so a light OS no longer paints light before the dark default; a test keeps its keys in step with the shell. color-scheme follows the palette, so native controls and scrollbars match a forced theme. Five infinite animations (dashboard banner, container icon, pending badge, warn banner, spinner) now honour reduced motion and the in-app motion setting, ConnectionDot uses the same three-rule shape as the others, and the hive-warn element honours the system preference. Keyboard focus gets a default ring, and the cancel button and pane divider keep a visible one.
2026-11-19 20:45:18 +01:00
atlas
5747c4c325 hive: install container@.service on every hive, so agents created with nixos-container can start 2026-11-19 14:41:58 +01:00
atlas
ad30b7ea31 reconcile tick: create a placed agent whose deploy event was missed
The swarm's deploy event is core NATS. The wanted-state declaration lands
before the build, so its create fails on no record, and only the event
re-drives it; a hive that missed the event had nothing to retry.

wanted.rs now remembers which agents the last declaration places with a
container. Each tick, a placed agent with no container whose record says
the builder pushed its closure gets its first deploy through
JobQueue::insert_first_deploy_if_idle, which queues nothing while any node
targets the agent. Record reads and creates back off like restarts, in a
history of their own.
2026-11-19 12:28:42 +01:00
atlas
887ea26c56 swarm-nats: the units the responder requires uphold it
A start job of swarm-nats-auth that fails on a dependency (the server, or
the container's trust bundle, failing first) leaves the unit inactive
rather than failed, so Restart=always never applies. Its recovery was a
set of one-shot host kicks; when the last of them still found a
dependency down, the responder stayed dead and the queue refused every
client (nightly full-setup, runs 8058 and 7917).

upheldBy the units it requires: whichever comes up last starts it.
2026-11-19 12:26:13 +01:00
atlas
29ca381114 images: slim OCI images of the swarm daemons from nix 2026-11-19 12:23:54 +01:00
maia
ffbd2f4dea swarm-controller: an opt-in plain /healthz and /readyz listener a kubelet can probe 2026-11-19 12:23:17 +01:00
atlas
439cb28c8c hive-forge: ci-rerun takes repeatable --input key=value for workflow dispatch
The dispatch goes out as a raw API POST so a forge rejection of an input
reaches the caller with its response body.
2026-11-19 10:52:33 +01:00
maia
b0239914b8 readiness follows a cached store check instead of a constant or a login per probe 2026-11-19 08:43:43 +01:00
maia
2eacb83b21 a removed hive's OIDC client secret is deleted with its other store credentials 2026-11-19 08:42:46 +01:00
maia
c7d37ca455 grant-bootstrap re-applies the granter and restarts failed policy units; setup treats a refused granting unit as not done 2026-11-19 08:17:02 +01:00
atlas
12e797e7e3 auto-update: a rebuild is live until its whole subtree is terminal
rebuild_live checked only MetaSync, which finishes in 0.2 s, so the next
5-min pass queued a second rebuild while the first still held the stop,
swap and start. It now covers MetaSync, AgentWindow, Prebuild,
StopForUpdate, Swap and RebuildBookkeeping. AgentWindow is also the brace
of a pause window, so an open pause skips that agent's pass too; the docs
say so and a test pins it.
2026-11-19 08:05:01 +01:00
atlas
36515c289d reconcile: start a stopped harness inside a running container
hive-priv gains AgentHarness { agent_name, action: probe | start }, which
runs systemctl -M h-<name> against the fixed unit hive-agent.service.
run_reconcile and the 1-min tick read the unit for a running wanted-up
agent and start it when it is inactive or failed. A hive-priv without the
op reads as unknown state and leaves reconcile container-only.
2026-11-19 08:03:56 +01:00
maia
77f33a23d8 bash tasks are the OOM killer's first victims: score 1000, subagent runs 900, MemoryHigh on the bash daemon 2026-11-19 08:03:07 +01:00
damocles
fc8ec13620 docs: drop the turn-stats sqlite section and stale mentions, point the grafana check at the daemon 2026-11-18 20:53:12 +01:00
damocles
076df804e4 hive-bash-mcp: count bash commands over OTEL in the daemon, drop the sqlite hand-off 2026-11-18 20:53:12 +01:00
maia
188dbcea8b swarm-victorialogs: own network namespace, gateway over a unix socket 2026-11-18 19:17:58 +01:00
atlas
c21b158884 swarm daemons: opt-in /healthz and /readyz listener, and /readyz on the controller 2026-11-18 19:06:04 +01:00
damocles
377bc1d5df docs: subagent leftover kill without passive voice 2026-11-18 18:52:37 +01:00
damocles
2689efebcf hive-agent-sock: kill what a subagent run leaves in its cgroup after it ends 2026-11-18 18:52:37 +01:00