| Filename | Latest commit message | Latest commit date |
|---|---|---|
Closes #4067. Backend half (Wanted::Destroyed + reconcile) shipped in #4065 with no swarm-controller API changes needed -- SetAgentStateRequest already accepted {"state": "destroyed"}, it just had nothing in swarm-ui sending it. Destroy is a separate `quiet`-variant badge next to the existing start/stop toggle (#3988's "wanted" column), not a third state folded into that same click target -- one wrong click on a shared toggle would be irreversible, where a dedicated badge only fires from its own confirm dialog. That confirm is a real `Dialog`, not the native `window.confirm` the reversible stop direction uses -- the wanted column's own comment called this out as the case that would justify one when it was first written. Shared the PUT-declare/pending/error/patch-rows logic between the existing toggleWanted and the new destroyAgent (declareState) rather than duplicating it -- confirmation and target-state selection are the only parts that differ between a toggle and a one-way declaration. Verified: `tsc --noEmit` clean, `nix fmt` reports the expected formatting-only diff, wire shapes (state string "destroyed", AgentDeclaration response) checked against swarm-queue-client's AgentState::as_str and swarm-controller's actual handler rather than assumed from the issue description. |
||
| .. | ||
| packages | ||
| .gitignore | ||
| npm-deps-hash | ||
| package-lock.json | ||
| package.json | ||
| README.md | ||
hyperhive frontend
npm workspaces project for the hyperhive browser-facing assets:
packages/shared/— shared modules used by both surfaces (terminal pane, Catppuccin palette + body typography).packages/dashboard/— the hive-c0re dashboard SPA.packages/agent/— the per-container web UI (default agent page, stats, screen).
Build
npm install # one-off; uses the checked-in package-lock.json
npm run build # builds every workspace into packages/*/dist/
The Rust binaries serve packages/dashboard/dist/ and
packages/agent/dist/ via tower_http::ServeDir at runtime; the
build derivation is wired up in nix/packages/frontend.nix. Per-agent
additions are layered on top of the default agent dist via the
hyperhive.frontend.extraFiles option in agent.nix.
Why npm + esbuild
- Hermetic: dependencies vendored via the checked-in lockfile;
buildNpmPackagein nix uses it as the source-of-truth so the output is reproducible without network access at build time. - esbuild: vanilla-JS bundler, no framework runtime overhead.
Each workspace's
build.mjsis ~30 lines. - Single-PR migration: see issue #273 for the design proposal and the four-commit shape (npm scaffold → nix derivations → container plumbing → Rust cutover).