Comments cite nix modules, scripts and crate source files constantly,
and nothing evaluates a comment — so when a file moves, the reference
rots silently and `nix flake check` stays green. A reader following one
finds nothing and cannot tell whether the file was renamed, deleted, or
never existed.
Seven such references, each repointed at the file that actually holds
the thing the sentence is about rather than at the directory the old
name became:
hive-c0re/src/agent_config/limits.rs hive-agent/src/mcp.rs
-> hive-agent-mcp/src/mcp/mod.rs
hive-agent-mcp/src/mcp/mod.rs hive-c0re/src/limits.rs
-> hive-c0re/src/agent_config/limits.rs
(and the module path in the doc
comment above it, which was stale
in the same way)
hive-c0re/src/forge/mod.rs hive-c0re/src/knowledge.rs
-> hive-c0re/src/workers/knowledge.rs
nix/host-modules/hive-c0re/options.nix hive-c0re/src/hive_stats.rs
-> hive-c0re/src/stats/hive_stats.rs
nix/packages/default.nix nix/host-modules/hive-c0re.nix
-> .../hive-c0re/options.nix
nix/agent-modules/network.nix nix/host-modules/hive-gateway.nix
-> .../hive-gateway/dnsmasq.nix
frontend/README.md nix/modules/frontend.nix
-> nix/packages/frontend.nix
The two `limits.rs` comments are a matched pair: each names the other's
old path, so the "keep in sync" instruction they exist to carry pointed
both ways at nothing.
Where a flat module became a directory the target is the file that
declares the named thing, not `default.nix` by reflex — the
`preBuildAgentTemplates` option is declared in `options.nix`, and the
DHCP pool that sentence is about lives in `dnsmasq.nix`.
Comments only; no behaviour change. Refs #3923, which is about whether a
gate should cover this class at all — that question is unanswered and
this does not close it.
33 lines
1.3 KiB
Markdown
33 lines
1.3 KiB
Markdown
# 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;
|
|
`buildNpmPackage` in 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.mjs` is ~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).
|