Compare commits
41 changed files with 3519 additions and 1553 deletions
49
CLAUDE.md
49
CLAUDE.md
|
|
@ -87,28 +87,35 @@ hive-c0re/ host daemon + CLI (one binary, subcommand-dispatched)
|
||||||
and meta read access; mirrors each applied repo
|
and meta read access; mirrors each applied repo
|
||||||
into `agent-configs/<n>` (core-only); agents are
|
into `agent-configs/<n>` (core-only); agents are
|
||||||
read-only collaborators on `core/meta`
|
read-only collaborators on `core/meta`
|
||||||
src/dashboard.rs axum HTTP: /api/state JSON + actions
|
src/dashboard.rs axum HTTP: static shell + /api/state JSON + actions
|
||||||
+ journald viewer + bind-with-retry (SO_REUSEADDR)
|
+ journald viewer + bind-with-retry (SO_REUSEADDR)
|
||||||
+ deployed_sha chip per container +
|
+ deployed_sha chip per container +
|
||||||
/dashboard/{stream,history} subscribing to the
|
/dashboard/{stream,history} subscribing to the
|
||||||
unified DashboardEvent channel. Static assets
|
unified DashboardEvent channel
|
||||||
(HTML/CSS/JS/favicon) served by
|
assets/ index.html, dashboard.css, app.js (include_str!)
|
||||||
tower_http::ServeDir from $HIVE_STATIC_DIR
|
|
||||||
(= `${frontend}/dashboard` per the c0re module).
|
|
||||||
|
|
||||||
frontend/ npm workspaces (esbuild → static dist). Built
|
hive-fr0nt/ shared frontend-assets crate (browser only).
|
||||||
hermetically by `nix/frontend.nix`
|
src/lib.rs pub const BASE_CSS / TERMINAL_CSS / TERMINAL_JS /
|
||||||
(`packages.${system}.frontend`).
|
MARKED_JS re-exports; both binaries
|
||||||
packages/shared/ @hive/shared: terminal pane + Catppuccin palette
|
`include_str!` them and prepend to their per-
|
||||||
+ base typography (was hive-fr0nt). ES module
|
page serving routes.
|
||||||
exporting { create, linkify }; pure JS, no IIFE
|
assets/base.css Catppuccin palette + body typography (one source
|
||||||
globals; consumed by dashboard + agent.
|
of truth, no per-page redeclaration).
|
||||||
packages/dashboard/ @hive/dashboard SPA: src/{index.html, app.js,
|
assets/terminal.css `.terminal-wrap` + `.live` + `.tail-pill` +
|
||||||
dashboard.css} + build.mjs → dist/{index.html,
|
`.row` / `details.row` styling for both
|
||||||
static/{app.js, dashboard.css}}.
|
pages' lit log panes. Unified prefix-column
|
||||||
packages/agent/ @hive/agent default per-container UI: src/
|
(padding-left + negative text-indent) so glyph
|
||||||
{index, stats, screen}.html + {app, stats}.js
|
alignment is consistent across row kinds + a
|
||||||
+ agent.css → dist/{*.html, static/*}.
|
`.md` block scope for marked-rendered bodies.
|
||||||
|
assets/terminal.js `window.HiveTerminal.create(opts)`: scroll-
|
||||||
|
sticky log + "↓ N new" pill + history
|
||||||
|
backfill + SSE subscribe-buffer-snapshot-
|
||||||
|
dedupe dance. Pages register a kind→renderer
|
||||||
|
map; the terminal owns the lifecycle.
|
||||||
|
assets/marked.umd.js vendored marked v4.0.2 UMD bundle. Per-agent
|
||||||
|
terminal uses the global `marked.parse` for
|
||||||
|
markdown bodies on send / recv / ask / answer
|
||||||
|
/ assistant text rows.
|
||||||
|
|
||||||
hive-ag3nt/ in-container harness crate; produces TWO binaries
|
hive-ag3nt/ in-container harness crate; produces TWO binaries
|
||||||
src/lib.rs re-exports + DEFAULT_SOCKET, DEFAULT_WEB_PORT
|
src/lib.rs re-exports + DEFAULT_SOCKET, DEFAULT_WEB_PORT
|
||||||
|
|
@ -132,10 +139,8 @@ hive-ag3nt/ in-container harness crate; produces TWO binaries
|
||||||
src/login_session.rs drives `claude auth login` over stdio pipes
|
src/login_session.rs drives `claude auth login` over stdio pipes
|
||||||
src/bin/hive-ag3nt.rs sub-agent main (Serve + Mcp subcommands)
|
src/bin/hive-ag3nt.rs sub-agent main (Serve + Mcp subcommands)
|
||||||
src/bin/hive-m1nd.rs manager main (Serve + Mcp subcommands)
|
src/bin/hive-m1nd.rs manager main (Serve + Mcp subcommands)
|
||||||
Static UI assets served by ServeDir from
|
assets/ index.html, agent.css, app.js, stats.html,
|
||||||
$HIVE_STATIC_DIR (= hyperhive.frontend
|
stats.js, screen.html (include_str!)
|
||||||
.mergedDist — default agent dist + per-agent
|
|
||||||
extraFiles, set per the harness-base module).
|
|
||||||
prompts/ static role/tools/settings for claude (include_str!):
|
prompts/ static role/tools/settings for claude (include_str!):
|
||||||
agent.md — sub-agent system prompt
|
agent.md — sub-agent system prompt
|
||||||
manager.md — manager system prompt
|
manager.md — manager system prompt
|
||||||
|
|
|
||||||
39
Cargo.lock
generated
39
Cargo.lock
generated
|
|
@ -565,6 +565,7 @@ dependencies = [
|
||||||
"axum",
|
"axum",
|
||||||
"clap",
|
"clap",
|
||||||
"futures-util",
|
"futures-util",
|
||||||
|
"hive-fr0nt",
|
||||||
"hive-sh4re",
|
"hive-sh4re",
|
||||||
"reqwest",
|
"reqwest",
|
||||||
"rmcp",
|
"rmcp",
|
||||||
|
|
@ -574,7 +575,6 @@ dependencies = [
|
||||||
"serde_json",
|
"serde_json",
|
||||||
"tokio",
|
"tokio",
|
||||||
"tokio-stream",
|
"tokio-stream",
|
||||||
"tower-http",
|
|
||||||
"tracing",
|
"tracing",
|
||||||
"tracing-subscriber",
|
"tracing-subscriber",
|
||||||
]
|
]
|
||||||
|
|
@ -587,6 +587,7 @@ dependencies = [
|
||||||
"axum",
|
"axum",
|
||||||
"base64",
|
"base64",
|
||||||
"clap",
|
"clap",
|
||||||
|
"hive-fr0nt",
|
||||||
"hive-sh4re",
|
"hive-sh4re",
|
||||||
"libc",
|
"libc",
|
||||||
"reqwest",
|
"reqwest",
|
||||||
|
|
@ -596,11 +597,14 @@ dependencies = [
|
||||||
"tempfile",
|
"tempfile",
|
||||||
"tokio",
|
"tokio",
|
||||||
"tokio-stream",
|
"tokio-stream",
|
||||||
"tower-http",
|
|
||||||
"tracing",
|
"tracing",
|
||||||
"tracing-subscriber",
|
"tracing-subscriber",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "hive-fr0nt"
|
||||||
|
version = "0.1.0"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "hive-sh4re"
|
name = "hive-sh4re"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
|
|
@ -641,12 +645,6 @@ dependencies = [
|
||||||
"pin-project-lite",
|
"pin-project-lite",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "http-range-header"
|
|
||||||
version = "0.4.2"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "9171a2ea8a68358193d15dd5d70c1c10a2afc3e7e4c5bc92bc9f025cebd7359c"
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "httparse"
|
name = "httparse"
|
||||||
version = "1.10.1"
|
version = "1.10.1"
|
||||||
|
|
@ -956,16 +954,6 @@ version = "0.3.17"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a"
|
checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a"
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "mime_guess"
|
|
||||||
version = "2.0.5"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "f7c44f8e672c00fe5308fa235f821cb4198414e1c77935c1ab6948d3fd78550e"
|
|
||||||
dependencies = [
|
|
||||||
"mime",
|
|
||||||
"unicase",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "mio"
|
name = "mio"
|
||||||
version = "1.2.0"
|
version = "1.2.0"
|
||||||
|
|
@ -1735,19 +1723,10 @@ checksum = "4cfcf7e2740e6fc6d4d688b4ef00650406bb94adf4731e43c096c3a19fe40840"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"bitflags",
|
"bitflags",
|
||||||
"bytes",
|
"bytes",
|
||||||
"futures-core",
|
|
||||||
"futures-util",
|
"futures-util",
|
||||||
"http",
|
"http",
|
||||||
"http-body",
|
"http-body",
|
||||||
"http-body-util",
|
|
||||||
"http-range-header",
|
|
||||||
"httpdate",
|
|
||||||
"mime",
|
|
||||||
"mime_guess",
|
|
||||||
"percent-encoding",
|
|
||||||
"pin-project-lite",
|
"pin-project-lite",
|
||||||
"tokio",
|
|
||||||
"tokio-util",
|
|
||||||
"tower",
|
"tower",
|
||||||
"tower-layer",
|
"tower-layer",
|
||||||
"tower-service",
|
"tower-service",
|
||||||
|
|
@ -1856,12 +1835,6 @@ version = "1.20.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "40ce102ab67701b8526c123c1bab5cbe42d7040ccfd0f64af1a385808d2f43de"
|
checksum = "40ce102ab67701b8526c123c1bab5cbe42d7040ccfd0f64af1a385808d2f43de"
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "unicase"
|
|
||||||
version = "2.9.0"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "dbc4bc3a9f746d862c45cb89d705aa10f187bb96c76001afab07a0d35ce60142"
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "unicode-ident"
|
name = "unicode-ident"
|
||||||
version = "1.0.24"
|
version = "1.0.24"
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
[workspace]
|
[workspace]
|
||||||
resolver = "3"
|
resolver = "3"
|
||||||
members = ["hive-ag3nt", "hive-c0re", "hive-sh4re"]
|
members = ["hive-ag3nt", "hive-c0re", "hive-fr0nt", "hive-sh4re"]
|
||||||
|
|
||||||
[workspace.package]
|
[workspace.package]
|
||||||
edition = "2024"
|
edition = "2024"
|
||||||
|
|
@ -19,8 +19,8 @@ anyhow = "1"
|
||||||
axum = { version = "0.8", features = ["ws"] }
|
axum = { version = "0.8", features = ["ws"] }
|
||||||
base64 = "0.22"
|
base64 = "0.22"
|
||||||
clap = { version = "4", features = ["derive"] }
|
clap = { version = "4", features = ["derive"] }
|
||||||
|
hive-fr0nt = { path = "hive-fr0nt" }
|
||||||
hive-sh4re = { path = "hive-sh4re" }
|
hive-sh4re = { path = "hive-sh4re" }
|
||||||
tower-http = { version = "0.6", features = ["fs"] }
|
|
||||||
rmcp = { version = "1.7", default-features = false, features = [
|
rmcp = { version = "1.7", default-features = false, features = [
|
||||||
"server",
|
"server",
|
||||||
"macros",
|
"macros",
|
||||||
|
|
|
||||||
|
|
@ -2,11 +2,11 @@
|
||||||
|
|
||||||
Snapshot of how the per-agent web UI's live pane renders each
|
Snapshot of how the per-agent web UI's live pane renders each
|
||||||
event kind today. Source of truth lives in
|
event kind today. Source of truth lives in
|
||||||
`frontend/packages/agent/src/app.js` (`renderStream`, `fmtToolUse`,
|
`hive-ag3nt/assets/app.js` (`renderStream`, `fmtToolUse`,
|
||||||
`renderRichToolUse`, `renderToolResult`, `renderTaskEvent`,
|
`renderRichToolUse`, `renderToolResult`, `renderTaskEvent`,
|
||||||
`mdNode`, `detailsOpenMd`, `fmtArgsGeneric`) +
|
`mdNode`, `detailsOpenMd`, `fmtArgsGeneric`) +
|
||||||
`frontend/packages/shared/src/terminal.css` (the shared
|
`hive-fr0nt/assets/terminal.css` (the shared `.live .<class>`
|
||||||
`.live .<class>` styling) + the `marked` npm package (markdown).
|
styling) + `hive-fr0nt/assets/marked.umd.js` (markdown).
|
||||||
|
|
||||||
## Layout contract
|
## Layout contract
|
||||||
|
|
||||||
|
|
@ -82,8 +82,8 @@ parent's negative pull.
|
||||||
|
|
||||||
## Markdown
|
## Markdown
|
||||||
|
|
||||||
`mdNode(text)` wraps `marked.parse(text)` (the `marked` v4.x npm
|
`mdNode(text)` wraps `window.marked.parse(text)` (vendored
|
||||||
dep, bundled by esbuild into the page's `app.js`) in a `<div
|
v4.0.2 UMD via `hive-fr0nt::MARKED_JS`) in a `<div
|
||||||
class="md">`. CSS in `terminal.css` scopes paragraph / code /
|
class="md">`. CSS in `terminal.css` scopes paragraph / code /
|
||||||
list / blockquote / link styling under `.live .row .md` so
|
list / blockquote / link styling under `.live .row .md` so
|
||||||
the markdown body doesn't bleed into the row's own
|
the markdown body doesn't bleed into the row's own
|
||||||
|
|
|
||||||
|
|
@ -7,32 +7,22 @@ and the per-agent UIs (manager on :8000, sub-agents on a hashed
|
||||||
|
|
||||||
## Shape (shared by both)
|
## Shape (shared by both)
|
||||||
|
|
||||||
- `GET /` → `index.html` from the bundled frontend dist (see
|
- `GET /` → `assets/index.html` (placeholders for state-driven
|
||||||
`frontend/`). Both binaries' routers declare their dynamic
|
sections, shipped via `include_str!` so the binary has no runtime
|
||||||
endpoints first and then `fallback_service(ServeDir::new(...))`
|
file dependency).
|
||||||
pointed at `HIVE_STATIC_DIR` — anything not matched by an API or
|
- `GET /static/*.css` + `GET /static/*.js` → static assets. Both
|
||||||
action route is served from the dist. Dashboard dist lives at
|
pages prepend `hive_fr0nt::BASE_CSS` + `TERMINAL_CSS` to their
|
||||||
`${frontend}/dashboard`; per-agent dist is the merged
|
per-page stylesheet, and `GET /static/hive-fr0nt.js` serves the
|
||||||
`hyperhive.frontend.mergedDist` (default agent dist + per-agent
|
shared `window.HiveTerminal.create` runtime. The dashboard's
|
||||||
`extraFiles` overlay).
|
|
||||||
- `GET /static/*` → bundled CSS + JS produced by esbuild
|
|
||||||
(`frontend/packages/{dashboard,agent}/build.mjs`). Both pages
|
|
||||||
pull the shared terminal pane + Catppuccin palette + typography
|
|
||||||
from `@hive/shared` (was `hive-fr0nt`); the CSS bundle inlines
|
|
||||||
`base.css` + `terminal.css` via esbuild's `@import` resolution.
|
|
||||||
`terminal.js` exports `{ create, linkify }` as ES module
|
|
||||||
members (no more `window.HiveTerminal` global outside the
|
|
||||||
back-compat shim the IIFE bodies still use). The dashboard's
|
|
||||||
`#msgflow` and the per-agent `#live` log are both backed by
|
`#msgflow` and the per-agent `#live` log are both backed by
|
||||||
this terminal — sticky-bottom auto-scroll, "↓ N new" pill,
|
this terminal — sticky-bottom auto-scroll, "↓ N new" pill,
|
||||||
history backfill, SSE plumbing all live there. Each page
|
history backfill, SSE plumbing all live there. Each page
|
||||||
registers a kind→renderer map; unknown kinds fall through to
|
registers a kind→renderer map; unknown kinds fall through to
|
||||||
a JSON-dump note row. Bare `http(s)://` URLs in row text are
|
a JSON-dump note row. Bare `http(s)://` URLs in row text are
|
||||||
turned into clickable new-tab links by `linkify` (text-node
|
turned into clickable new-tab links by `HiveTerminal.linkify`
|
||||||
based, no `innerHTML` — XSS-safe); markdown bodies get the
|
(text-node based, no `innerHTML` — XSS-safe); markdown bodies
|
||||||
same treatment via `marked`'s autolink (npm dep, replacing the
|
get the same treatment via `marked`'s autolink, with the
|
||||||
vendored UMD bundle), with the rendered `<a>`s rewritten to
|
rendered `<a>`s rewritten to `target="_blank"` (issue #233).
|
||||||
`target="_blank"` (issue #233).
|
|
||||||
- `GET /api/state` → JSON snapshot the JS app renders into the
|
- `GET /api/state` → JSON snapshot the JS app renders into the
|
||||||
DOM. Includes a top-level `seq` (the dashboard event channel's
|
DOM. Includes a top-level `seq` (the dashboard event channel's
|
||||||
high-water mark at the moment the snapshot was assembled);
|
high-water mark at the moment the snapshot was assembled);
|
||||||
|
|
|
||||||
16
flake.nix
16
flake.nix
|
|
@ -51,31 +51,18 @@
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
packages = forAllSystems (
|
packages = forAllSystems (
|
||||||
{ pkgs, naersk-lib, ... }:
|
{ naersk-lib, ... }:
|
||||||
{
|
{
|
||||||
default = naersk-lib.buildPackage {
|
default = naersk-lib.buildPackage {
|
||||||
src = ./.;
|
src = ./.;
|
||||||
meta.description = "hyperhive workspace (hive-c0re, hive-ag3nt, hive-m1nd)";
|
meta.description = "hyperhive workspace (hive-c0re, hive-ag3nt, hive-m1nd)";
|
||||||
};
|
};
|
||||||
# Bundled browser assets — see ./nix/frontend.nix. Output is
|
|
||||||
# $out/{dashboard,agent}/ which the Rust binaries serve via
|
|
||||||
# tower_http::ServeDir (wired up in Phase 4 of #273).
|
|
||||||
frontend = pkgs.callPackage ./nix/frontend.nix {
|
|
||||||
branding-svg = ./branding/hyperhive.svg;
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
overlays = {
|
overlays = {
|
||||||
default = final: prev: {
|
default = final: prev: {
|
||||||
hyperhive = self.packages.${prev.stdenv.hostPlatform.system}.default;
|
hyperhive = self.packages.${prev.stdenv.hostPlatform.system}.default;
|
||||||
# Bundled frontend dist (see ./nix/frontend.nix). Output is
|
|
||||||
# $out/{dashboard,agent}/; consumers pick the surface they
|
|
||||||
# need. Exposed via the overlay so containers' nix evaluations
|
|
||||||
# can reach it as `pkgs.hyperhive-frontend` once the overlay
|
|
||||||
# is applied (manager + agent containers both apply it via
|
|
||||||
# `mkContainer` further down).
|
|
||||||
hyperhive-frontend = self.packages.${prev.stdenv.hostPlatform.system}.frontend;
|
|
||||||
};
|
};
|
||||||
claude-unstable =
|
claude-unstable =
|
||||||
final: prev:
|
final: prev:
|
||||||
|
|
@ -109,7 +96,6 @@
|
||||||
# builds (already applied internally in `nixosConfigurations`).
|
# builds (already applied internally in `nixosConfigurations`).
|
||||||
hive-c0re = import ./nix/modules/hive-c0re.nix {
|
hive-c0re = import ./nix/modules/hive-c0re.nix {
|
||||||
hyperhivePackage = system: self.packages.${system}.default;
|
hyperhivePackage = system: self.packages.${system}.default;
|
||||||
hyperhiveFrontend = system: self.packages.${system}.frontend;
|
|
||||||
hyperhiveFlake = "${self}";
|
hyperhiveFlake = "${self}";
|
||||||
};
|
};
|
||||||
hive-forge = ./nix/modules/hive-forge.nix;
|
hive-forge = ./nix/modules/hive-forge.nix;
|
||||||
|
|
|
||||||
2
frontend/.gitignore
vendored
2
frontend/.gitignore
vendored
|
|
@ -1,2 +0,0 @@
|
||||||
node_modules/
|
|
||||||
packages/*/dist/
|
|
||||||
|
|
@ -1,33 +0,0 @@
|
||||||
# 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/modules/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).
|
|
||||||
549
frontend/package-lock.json
generated
549
frontend/package-lock.json
generated
|
|
@ -1,549 +0,0 @@
|
||||||
{
|
|
||||||
"name": "hyperhive-frontend",
|
|
||||||
"version": "0.0.0",
|
|
||||||
"lockfileVersion": 3,
|
|
||||||
"requires": true,
|
|
||||||
"packages": {
|
|
||||||
"": {
|
|
||||||
"name": "hyperhive-frontend",
|
|
||||||
"version": "0.0.0",
|
|
||||||
"workspaces": [
|
|
||||||
"packages/shared",
|
|
||||||
"packages/dashboard",
|
|
||||||
"packages/agent"
|
|
||||||
],
|
|
||||||
"devDependencies": {
|
|
||||||
"esbuild": "0.25.5"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/@esbuild/aix-ppc64": {
|
|
||||||
"version": "0.25.5",
|
|
||||||
"resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.25.5.tgz",
|
|
||||||
"integrity": "sha512-9o3TMmpmftaCMepOdA5k/yDw8SfInyzWWTjYTFCX3kPSDJMROQTb8jg+h9Cnwnmm1vOzvxN7gIfB5V2ewpjtGA==",
|
|
||||||
"cpu": [
|
|
||||||
"ppc64"
|
|
||||||
],
|
|
||||||
"dev": true,
|
|
||||||
"license": "MIT",
|
|
||||||
"optional": true,
|
|
||||||
"os": [
|
|
||||||
"aix"
|
|
||||||
],
|
|
||||||
"engines": {
|
|
||||||
"node": ">=18"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/@esbuild/android-arm": {
|
|
||||||
"version": "0.25.5",
|
|
||||||
"resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.25.5.tgz",
|
|
||||||
"integrity": "sha512-AdJKSPeEHgi7/ZhuIPtcQKr5RQdo6OO2IL87JkianiMYMPbCtot9fxPbrMiBADOWWm3T2si9stAiVsGbTQFkbA==",
|
|
||||||
"cpu": [
|
|
||||||
"arm"
|
|
||||||
],
|
|
||||||
"dev": true,
|
|
||||||
"license": "MIT",
|
|
||||||
"optional": true,
|
|
||||||
"os": [
|
|
||||||
"android"
|
|
||||||
],
|
|
||||||
"engines": {
|
|
||||||
"node": ">=18"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/@esbuild/android-arm64": {
|
|
||||||
"version": "0.25.5",
|
|
||||||
"resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.25.5.tgz",
|
|
||||||
"integrity": "sha512-VGzGhj4lJO+TVGV1v8ntCZWJktV7SGCs3Pn1GRWI1SBFtRALoomm8k5E9Pmwg3HOAal2VDc2F9+PM/rEY6oIDg==",
|
|
||||||
"cpu": [
|
|
||||||
"arm64"
|
|
||||||
],
|
|
||||||
"dev": true,
|
|
||||||
"license": "MIT",
|
|
||||||
"optional": true,
|
|
||||||
"os": [
|
|
||||||
"android"
|
|
||||||
],
|
|
||||||
"engines": {
|
|
||||||
"node": ">=18"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/@esbuild/android-x64": {
|
|
||||||
"version": "0.25.5",
|
|
||||||
"resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.25.5.tgz",
|
|
||||||
"integrity": "sha512-D2GyJT1kjvO//drbRT3Hib9XPwQeWd9vZoBJn+bu/lVsOZ13cqNdDeqIF/xQ5/VmWvMduP6AmXvylO/PIc2isw==",
|
|
||||||
"cpu": [
|
|
||||||
"x64"
|
|
||||||
],
|
|
||||||
"dev": true,
|
|
||||||
"license": "MIT",
|
|
||||||
"optional": true,
|
|
||||||
"os": [
|
|
||||||
"android"
|
|
||||||
],
|
|
||||||
"engines": {
|
|
||||||
"node": ">=18"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/@esbuild/darwin-arm64": {
|
|
||||||
"version": "0.25.5",
|
|
||||||
"resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.25.5.tgz",
|
|
||||||
"integrity": "sha512-GtaBgammVvdF7aPIgH2jxMDdivezgFu6iKpmT+48+F8Hhg5J/sfnDieg0aeG/jfSvkYQU2/pceFPDKlqZzwnfQ==",
|
|
||||||
"cpu": [
|
|
||||||
"arm64"
|
|
||||||
],
|
|
||||||
"dev": true,
|
|
||||||
"license": "MIT",
|
|
||||||
"optional": true,
|
|
||||||
"os": [
|
|
||||||
"darwin"
|
|
||||||
],
|
|
||||||
"engines": {
|
|
||||||
"node": ">=18"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/@esbuild/darwin-x64": {
|
|
||||||
"version": "0.25.5",
|
|
||||||
"resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.25.5.tgz",
|
|
||||||
"integrity": "sha512-1iT4FVL0dJ76/q1wd7XDsXrSW+oLoquptvh4CLR4kITDtqi2e/xwXwdCVH8hVHU43wgJdsq7Gxuzcs6Iq/7bxQ==",
|
|
||||||
"cpu": [
|
|
||||||
"x64"
|
|
||||||
],
|
|
||||||
"dev": true,
|
|
||||||
"license": "MIT",
|
|
||||||
"optional": true,
|
|
||||||
"os": [
|
|
||||||
"darwin"
|
|
||||||
],
|
|
||||||
"engines": {
|
|
||||||
"node": ">=18"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/@esbuild/freebsd-arm64": {
|
|
||||||
"version": "0.25.5",
|
|
||||||
"resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.25.5.tgz",
|
|
||||||
"integrity": "sha512-nk4tGP3JThz4La38Uy/gzyXtpkPW8zSAmoUhK9xKKXdBCzKODMc2adkB2+8om9BDYugz+uGV7sLmpTYzvmz6Sw==",
|
|
||||||
"cpu": [
|
|
||||||
"arm64"
|
|
||||||
],
|
|
||||||
"dev": true,
|
|
||||||
"license": "MIT",
|
|
||||||
"optional": true,
|
|
||||||
"os": [
|
|
||||||
"freebsd"
|
|
||||||
],
|
|
||||||
"engines": {
|
|
||||||
"node": ">=18"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/@esbuild/freebsd-x64": {
|
|
||||||
"version": "0.25.5",
|
|
||||||
"resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.25.5.tgz",
|
|
||||||
"integrity": "sha512-PrikaNjiXdR2laW6OIjlbeuCPrPaAl0IwPIaRv+SMV8CiM8i2LqVUHFC1+8eORgWyY7yhQY+2U2fA55mBzReaw==",
|
|
||||||
"cpu": [
|
|
||||||
"x64"
|
|
||||||
],
|
|
||||||
"dev": true,
|
|
||||||
"license": "MIT",
|
|
||||||
"optional": true,
|
|
||||||
"os": [
|
|
||||||
"freebsd"
|
|
||||||
],
|
|
||||||
"engines": {
|
|
||||||
"node": ">=18"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/@esbuild/linux-arm": {
|
|
||||||
"version": "0.25.5",
|
|
||||||
"resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.25.5.tgz",
|
|
||||||
"integrity": "sha512-cPzojwW2okgh7ZlRpcBEtsX7WBuqbLrNXqLU89GxWbNt6uIg78ET82qifUy3W6OVww6ZWobWub5oqZOVtwolfw==",
|
|
||||||
"cpu": [
|
|
||||||
"arm"
|
|
||||||
],
|
|
||||||
"dev": true,
|
|
||||||
"license": "MIT",
|
|
||||||
"optional": true,
|
|
||||||
"os": [
|
|
||||||
"linux"
|
|
||||||
],
|
|
||||||
"engines": {
|
|
||||||
"node": ">=18"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/@esbuild/linux-arm64": {
|
|
||||||
"version": "0.25.5",
|
|
||||||
"resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.25.5.tgz",
|
|
||||||
"integrity": "sha512-Z9kfb1v6ZlGbWj8EJk9T6czVEjjq2ntSYLY2cw6pAZl4oKtfgQuS4HOq41M/BcoLPzrUbNd+R4BXFyH//nHxVg==",
|
|
||||||
"cpu": [
|
|
||||||
"arm64"
|
|
||||||
],
|
|
||||||
"dev": true,
|
|
||||||
"license": "MIT",
|
|
||||||
"optional": true,
|
|
||||||
"os": [
|
|
||||||
"linux"
|
|
||||||
],
|
|
||||||
"engines": {
|
|
||||||
"node": ">=18"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/@esbuild/linux-ia32": {
|
|
||||||
"version": "0.25.5",
|
|
||||||
"resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.25.5.tgz",
|
|
||||||
"integrity": "sha512-sQ7l00M8bSv36GLV95BVAdhJ2QsIbCuCjh/uYrWiMQSUuV+LpXwIqhgJDcvMTj+VsQmqAHL2yYaasENvJ7CDKA==",
|
|
||||||
"cpu": [
|
|
||||||
"ia32"
|
|
||||||
],
|
|
||||||
"dev": true,
|
|
||||||
"license": "MIT",
|
|
||||||
"optional": true,
|
|
||||||
"os": [
|
|
||||||
"linux"
|
|
||||||
],
|
|
||||||
"engines": {
|
|
||||||
"node": ">=18"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/@esbuild/linux-loong64": {
|
|
||||||
"version": "0.25.5",
|
|
||||||
"resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.25.5.tgz",
|
|
||||||
"integrity": "sha512-0ur7ae16hDUC4OL5iEnDb0tZHDxYmuQyhKhsPBV8f99f6Z9KQM02g33f93rNH5A30agMS46u2HP6qTdEt6Q1kg==",
|
|
||||||
"cpu": [
|
|
||||||
"loong64"
|
|
||||||
],
|
|
||||||
"dev": true,
|
|
||||||
"license": "MIT",
|
|
||||||
"optional": true,
|
|
||||||
"os": [
|
|
||||||
"linux"
|
|
||||||
],
|
|
||||||
"engines": {
|
|
||||||
"node": ">=18"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/@esbuild/linux-mips64el": {
|
|
||||||
"version": "0.25.5",
|
|
||||||
"resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.25.5.tgz",
|
|
||||||
"integrity": "sha512-kB/66P1OsHO5zLz0i6X0RxlQ+3cu0mkxS3TKFvkb5lin6uwZ/ttOkP3Z8lfR9mJOBk14ZwZ9182SIIWFGNmqmg==",
|
|
||||||
"cpu": [
|
|
||||||
"mips64el"
|
|
||||||
],
|
|
||||||
"dev": true,
|
|
||||||
"license": "MIT",
|
|
||||||
"optional": true,
|
|
||||||
"os": [
|
|
||||||
"linux"
|
|
||||||
],
|
|
||||||
"engines": {
|
|
||||||
"node": ">=18"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/@esbuild/linux-ppc64": {
|
|
||||||
"version": "0.25.5",
|
|
||||||
"resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.25.5.tgz",
|
|
||||||
"integrity": "sha512-UZCmJ7r9X2fe2D6jBmkLBMQetXPXIsZjQJCjgwpVDz+YMcS6oFR27alkgGv3Oqkv07bxdvw7fyB71/olceJhkQ==",
|
|
||||||
"cpu": [
|
|
||||||
"ppc64"
|
|
||||||
],
|
|
||||||
"dev": true,
|
|
||||||
"license": "MIT",
|
|
||||||
"optional": true,
|
|
||||||
"os": [
|
|
||||||
"linux"
|
|
||||||
],
|
|
||||||
"engines": {
|
|
||||||
"node": ">=18"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/@esbuild/linux-riscv64": {
|
|
||||||
"version": "0.25.5",
|
|
||||||
"resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.25.5.tgz",
|
|
||||||
"integrity": "sha512-kTxwu4mLyeOlsVIFPfQo+fQJAV9mh24xL+y+Bm6ej067sYANjyEw1dNHmvoqxJUCMnkBdKpvOn0Ahql6+4VyeA==",
|
|
||||||
"cpu": [
|
|
||||||
"riscv64"
|
|
||||||
],
|
|
||||||
"dev": true,
|
|
||||||
"license": "MIT",
|
|
||||||
"optional": true,
|
|
||||||
"os": [
|
|
||||||
"linux"
|
|
||||||
],
|
|
||||||
"engines": {
|
|
||||||
"node": ">=18"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/@esbuild/linux-s390x": {
|
|
||||||
"version": "0.25.5",
|
|
||||||
"resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.25.5.tgz",
|
|
||||||
"integrity": "sha512-K2dSKTKfmdh78uJ3NcWFiqyRrimfdinS5ErLSn3vluHNeHVnBAFWC8a4X5N+7FgVE1EjXS1QDZbpqZBjfrqMTQ==",
|
|
||||||
"cpu": [
|
|
||||||
"s390x"
|
|
||||||
],
|
|
||||||
"dev": true,
|
|
||||||
"license": "MIT",
|
|
||||||
"optional": true,
|
|
||||||
"os": [
|
|
||||||
"linux"
|
|
||||||
],
|
|
||||||
"engines": {
|
|
||||||
"node": ">=18"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/@esbuild/linux-x64": {
|
|
||||||
"version": "0.25.5",
|
|
||||||
"resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.25.5.tgz",
|
|
||||||
"integrity": "sha512-uhj8N2obKTE6pSZ+aMUbqq+1nXxNjZIIjCjGLfsWvVpy7gKCOL6rsY1MhRh9zLtUtAI7vpgLMK6DxjO8Qm9lJw==",
|
|
||||||
"cpu": [
|
|
||||||
"x64"
|
|
||||||
],
|
|
||||||
"dev": true,
|
|
||||||
"license": "MIT",
|
|
||||||
"optional": true,
|
|
||||||
"os": [
|
|
||||||
"linux"
|
|
||||||
],
|
|
||||||
"engines": {
|
|
||||||
"node": ">=18"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/@esbuild/netbsd-arm64": {
|
|
||||||
"version": "0.25.5",
|
|
||||||
"resolved": "https://registry.npmjs.org/@esbuild/netbsd-arm64/-/netbsd-arm64-0.25.5.tgz",
|
|
||||||
"integrity": "sha512-pwHtMP9viAy1oHPvgxtOv+OkduK5ugofNTVDilIzBLpoWAM16r7b/mxBvfpuQDpRQFMfuVr5aLcn4yveGvBZvw==",
|
|
||||||
"cpu": [
|
|
||||||
"arm64"
|
|
||||||
],
|
|
||||||
"dev": true,
|
|
||||||
"license": "MIT",
|
|
||||||
"optional": true,
|
|
||||||
"os": [
|
|
||||||
"netbsd"
|
|
||||||
],
|
|
||||||
"engines": {
|
|
||||||
"node": ">=18"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/@esbuild/netbsd-x64": {
|
|
||||||
"version": "0.25.5",
|
|
||||||
"resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.25.5.tgz",
|
|
||||||
"integrity": "sha512-WOb5fKrvVTRMfWFNCroYWWklbnXH0Q5rZppjq0vQIdlsQKuw6mdSihwSo4RV/YdQ5UCKKvBy7/0ZZYLBZKIbwQ==",
|
|
||||||
"cpu": [
|
|
||||||
"x64"
|
|
||||||
],
|
|
||||||
"dev": true,
|
|
||||||
"license": "MIT",
|
|
||||||
"optional": true,
|
|
||||||
"os": [
|
|
||||||
"netbsd"
|
|
||||||
],
|
|
||||||
"engines": {
|
|
||||||
"node": ">=18"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/@esbuild/openbsd-arm64": {
|
|
||||||
"version": "0.25.5",
|
|
||||||
"resolved": "https://registry.npmjs.org/@esbuild/openbsd-arm64/-/openbsd-arm64-0.25.5.tgz",
|
|
||||||
"integrity": "sha512-7A208+uQKgTxHd0G0uqZO8UjK2R0DDb4fDmERtARjSHWxqMTye4Erz4zZafx7Di9Cv+lNHYuncAkiGFySoD+Mw==",
|
|
||||||
"cpu": [
|
|
||||||
"arm64"
|
|
||||||
],
|
|
||||||
"dev": true,
|
|
||||||
"license": "MIT",
|
|
||||||
"optional": true,
|
|
||||||
"os": [
|
|
||||||
"openbsd"
|
|
||||||
],
|
|
||||||
"engines": {
|
|
||||||
"node": ">=18"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/@esbuild/openbsd-x64": {
|
|
||||||
"version": "0.25.5",
|
|
||||||
"resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.25.5.tgz",
|
|
||||||
"integrity": "sha512-G4hE405ErTWraiZ8UiSoesH8DaCsMm0Cay4fsFWOOUcz8b8rC6uCvnagr+gnioEjWn0wC+o1/TAHt+It+MpIMg==",
|
|
||||||
"cpu": [
|
|
||||||
"x64"
|
|
||||||
],
|
|
||||||
"dev": true,
|
|
||||||
"license": "MIT",
|
|
||||||
"optional": true,
|
|
||||||
"os": [
|
|
||||||
"openbsd"
|
|
||||||
],
|
|
||||||
"engines": {
|
|
||||||
"node": ">=18"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/@esbuild/sunos-x64": {
|
|
||||||
"version": "0.25.5",
|
|
||||||
"resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.25.5.tgz",
|
|
||||||
"integrity": "sha512-l+azKShMy7FxzY0Rj4RCt5VD/q8mG/e+mDivgspo+yL8zW7qEwctQ6YqKX34DTEleFAvCIUviCFX1SDZRSyMQA==",
|
|
||||||
"cpu": [
|
|
||||||
"x64"
|
|
||||||
],
|
|
||||||
"dev": true,
|
|
||||||
"license": "MIT",
|
|
||||||
"optional": true,
|
|
||||||
"os": [
|
|
||||||
"sunos"
|
|
||||||
],
|
|
||||||
"engines": {
|
|
||||||
"node": ">=18"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/@esbuild/win32-arm64": {
|
|
||||||
"version": "0.25.5",
|
|
||||||
"resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.25.5.tgz",
|
|
||||||
"integrity": "sha512-O2S7SNZzdcFG7eFKgvwUEZ2VG9D/sn/eIiz8XRZ1Q/DO5a3s76Xv0mdBzVM5j5R639lXQmPmSo0iRpHqUUrsxw==",
|
|
||||||
"cpu": [
|
|
||||||
"arm64"
|
|
||||||
],
|
|
||||||
"dev": true,
|
|
||||||
"license": "MIT",
|
|
||||||
"optional": true,
|
|
||||||
"os": [
|
|
||||||
"win32"
|
|
||||||
],
|
|
||||||
"engines": {
|
|
||||||
"node": ">=18"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/@esbuild/win32-ia32": {
|
|
||||||
"version": "0.25.5",
|
|
||||||
"resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.25.5.tgz",
|
|
||||||
"integrity": "sha512-onOJ02pqs9h1iMJ1PQphR+VZv8qBMQ77Klcsqv9CNW2w6yLqoURLcgERAIurY6QE63bbLuqgP9ATqajFLK5AMQ==",
|
|
||||||
"cpu": [
|
|
||||||
"ia32"
|
|
||||||
],
|
|
||||||
"dev": true,
|
|
||||||
"license": "MIT",
|
|
||||||
"optional": true,
|
|
||||||
"os": [
|
|
||||||
"win32"
|
|
||||||
],
|
|
||||||
"engines": {
|
|
||||||
"node": ">=18"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/@esbuild/win32-x64": {
|
|
||||||
"version": "0.25.5",
|
|
||||||
"resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.25.5.tgz",
|
|
||||||
"integrity": "sha512-TXv6YnJ8ZMVdX+SXWVBo/0p8LTcrUYngpWjvm91TMjjBQii7Oz11Lw5lbDV5Y0TzuhSJHwiH4hEtC1I42mMS0g==",
|
|
||||||
"cpu": [
|
|
||||||
"x64"
|
|
||||||
],
|
|
||||||
"dev": true,
|
|
||||||
"license": "MIT",
|
|
||||||
"optional": true,
|
|
||||||
"os": [
|
|
||||||
"win32"
|
|
||||||
],
|
|
||||||
"engines": {
|
|
||||||
"node": ">=18"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/@hive/agent": {
|
|
||||||
"resolved": "packages/agent",
|
|
||||||
"link": true
|
|
||||||
},
|
|
||||||
"node_modules/@hive/dashboard": {
|
|
||||||
"resolved": "packages/dashboard",
|
|
||||||
"link": true
|
|
||||||
},
|
|
||||||
"node_modules/@hive/shared": {
|
|
||||||
"resolved": "packages/shared",
|
|
||||||
"link": true
|
|
||||||
},
|
|
||||||
"node_modules/@kurkle/color": {
|
|
||||||
"version": "0.3.4",
|
|
||||||
"resolved": "https://registry.npmjs.org/@kurkle/color/-/color-0.3.4.tgz",
|
|
||||||
"integrity": "sha512-M5UknZPHRu3DEDWoipU6sE8PdkZ6Z/S+v4dD+Ke8IaNlpdSQah50lz1KtcFBa2vsdOnwbbnxJwVM4wty6udA5w==",
|
|
||||||
"license": "MIT"
|
|
||||||
},
|
|
||||||
"node_modules/chart.js": {
|
|
||||||
"version": "4.4.4",
|
|
||||||
"resolved": "https://registry.npmjs.org/chart.js/-/chart.js-4.4.4.tgz",
|
|
||||||
"integrity": "sha512-emICKGBABnxhMjUjlYRR12PmOXhJ2eJjEHL2/dZlWjxRAZT1D8xplLFq5M0tMQK8ja+wBS/tuVEJB5C6r7VxJA==",
|
|
||||||
"license": "MIT",
|
|
||||||
"dependencies": {
|
|
||||||
"@kurkle/color": "^0.3.0"
|
|
||||||
},
|
|
||||||
"engines": {
|
|
||||||
"pnpm": ">=8"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/esbuild": {
|
|
||||||
"version": "0.25.5",
|
|
||||||
"resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.25.5.tgz",
|
|
||||||
"integrity": "sha512-P8OtKZRv/5J5hhz0cUAdu/cLuPIKXpQl1R9pZtvmHWQvrAUVd0UNIPT4IB4W3rNOqVO0rlqHmCIbSwxh/c9yUQ==",
|
|
||||||
"dev": true,
|
|
||||||
"hasInstallScript": true,
|
|
||||||
"license": "MIT",
|
|
||||||
"bin": {
|
|
||||||
"esbuild": "bin/esbuild"
|
|
||||||
},
|
|
||||||
"engines": {
|
|
||||||
"node": ">=18"
|
|
||||||
},
|
|
||||||
"optionalDependencies": {
|
|
||||||
"@esbuild/aix-ppc64": "0.25.5",
|
|
||||||
"@esbuild/android-arm": "0.25.5",
|
|
||||||
"@esbuild/android-arm64": "0.25.5",
|
|
||||||
"@esbuild/android-x64": "0.25.5",
|
|
||||||
"@esbuild/darwin-arm64": "0.25.5",
|
|
||||||
"@esbuild/darwin-x64": "0.25.5",
|
|
||||||
"@esbuild/freebsd-arm64": "0.25.5",
|
|
||||||
"@esbuild/freebsd-x64": "0.25.5",
|
|
||||||
"@esbuild/linux-arm": "0.25.5",
|
|
||||||
"@esbuild/linux-arm64": "0.25.5",
|
|
||||||
"@esbuild/linux-ia32": "0.25.5",
|
|
||||||
"@esbuild/linux-loong64": "0.25.5",
|
|
||||||
"@esbuild/linux-mips64el": "0.25.5",
|
|
||||||
"@esbuild/linux-ppc64": "0.25.5",
|
|
||||||
"@esbuild/linux-riscv64": "0.25.5",
|
|
||||||
"@esbuild/linux-s390x": "0.25.5",
|
|
||||||
"@esbuild/linux-x64": "0.25.5",
|
|
||||||
"@esbuild/netbsd-arm64": "0.25.5",
|
|
||||||
"@esbuild/netbsd-x64": "0.25.5",
|
|
||||||
"@esbuild/openbsd-arm64": "0.25.5",
|
|
||||||
"@esbuild/openbsd-x64": "0.25.5",
|
|
||||||
"@esbuild/sunos-x64": "0.25.5",
|
|
||||||
"@esbuild/win32-arm64": "0.25.5",
|
|
||||||
"@esbuild/win32-ia32": "0.25.5",
|
|
||||||
"@esbuild/win32-x64": "0.25.5"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/marked": {
|
|
||||||
"version": "4.3.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/marked/-/marked-4.3.0.tgz",
|
|
||||||
"integrity": "sha512-PRsaiG84bK+AMvxziE/lCFss8juXjNaWzVbN5tXAm4XjeaS9NAHhop+PjQxz2A9h8Q4M/xGmzP8vqNwy6JeK0A==",
|
|
||||||
"license": "MIT",
|
|
||||||
"bin": {
|
|
||||||
"marked": "bin/marked.js"
|
|
||||||
},
|
|
||||||
"engines": {
|
|
||||||
"node": ">= 12"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"packages/agent": {
|
|
||||||
"name": "@hive/agent",
|
|
||||||
"version": "0.0.0",
|
|
||||||
"dependencies": {
|
|
||||||
"@hive/shared": "*",
|
|
||||||
"chart.js": "4.4.4",
|
|
||||||
"marked": "4.3.0"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"packages/dashboard": {
|
|
||||||
"name": "@hive/dashboard",
|
|
||||||
"version": "0.0.0",
|
|
||||||
"dependencies": {
|
|
||||||
"@hive/shared": "*",
|
|
||||||
"marked": "4.3.0"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"packages/shared": {
|
|
||||||
"name": "@hive/shared",
|
|
||||||
"version": "0.0.0"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,18 +0,0 @@
|
||||||
{
|
|
||||||
"name": "hyperhive-frontend",
|
|
||||||
"version": "0.0.0",
|
|
||||||
"private": true,
|
|
||||||
"description": "Frontend assets for the hyperhive dashboard and per-agent UIs. Built with esbuild into static dist directories that the Rust binaries serve via tower_http::ServeDir.",
|
|
||||||
"workspaces": [
|
|
||||||
"packages/shared",
|
|
||||||
"packages/dashboard",
|
|
||||||
"packages/agent"
|
|
||||||
],
|
|
||||||
"scripts": {
|
|
||||||
"build": "npm run build --workspaces --if-present",
|
|
||||||
"clean": "rm -rf packages/*/dist"
|
|
||||||
},
|
|
||||||
"devDependencies": {
|
|
||||||
"esbuild": "0.25.5"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,60 +0,0 @@
|
||||||
// esbuild build for @hive/agent. Output layout (`dist/`):
|
|
||||||
//
|
|
||||||
// dist/index.html served at GET /
|
|
||||||
// dist/stats.html served at GET /stats
|
|
||||||
// dist/screen.html served at GET /screen
|
|
||||||
// dist/static/app.js served at /static/app.js (ESM bundle,
|
|
||||||
// pulls in @hive/shared + marked)
|
|
||||||
// dist/static/app.js.map source map sibling
|
|
||||||
// dist/static/stats.js served at /static/stats.js (pulls in
|
|
||||||
// chart.js/auto)
|
|
||||||
// dist/static/stats.js.map source map sibling
|
|
||||||
// dist/static/agent.css served at /static/agent.css (@import
|
|
||||||
// resolved from @hive/shared)
|
|
||||||
//
|
|
||||||
// The in-container Rust binary mounts `dist/` (with per-agent
|
|
||||||
// `hyperhive.frontend.extraFiles` layered on top) as a
|
|
||||||
// `tower_http::ServeDir` fallback; the layout above keeps every URL
|
|
||||||
// the HTML references reachable without rewriting paths.
|
|
||||||
|
|
||||||
import { build } from 'esbuild';
|
|
||||||
import { mkdirSync, copyFileSync, rmSync } from 'node:fs';
|
|
||||||
import { dirname, resolve } from 'node:path';
|
|
||||||
import { fileURLToPath } from 'node:url';
|
|
||||||
|
|
||||||
const here = dirname(fileURLToPath(import.meta.url));
|
|
||||||
const src = (p) => resolve(here, 'src', p);
|
|
||||||
const dist = (p) => resolve(here, 'dist', p);
|
|
||||||
const staticDir = (p) => resolve(here, 'dist', 'static', p);
|
|
||||||
|
|
||||||
rmSync(dist(''), { recursive: true, force: true });
|
|
||||||
mkdirSync(staticDir(''), { recursive: true });
|
|
||||||
|
|
||||||
// Two JS entries: the main app + the stats page. Both bundle their
|
|
||||||
// own deps so each page can be loaded independently.
|
|
||||||
await build({
|
|
||||||
entryPoints: [src('app.js'), src('stats.js')],
|
|
||||||
outdir: staticDir(''),
|
|
||||||
bundle: true,
|
|
||||||
format: 'esm',
|
|
||||||
platform: 'browser',
|
|
||||||
target: ['es2022'],
|
|
||||||
sourcemap: true,
|
|
||||||
logLevel: 'info',
|
|
||||||
});
|
|
||||||
|
|
||||||
// Bundle the CSS — the @import lines pull in shared/base.css and
|
|
||||||
// shared/terminal.css from the @hive/shared workspace dep.
|
|
||||||
await build({
|
|
||||||
entryPoints: [src('agent.css')],
|
|
||||||
outfile: staticDir('agent.css'),
|
|
||||||
bundle: true,
|
|
||||||
loader: { '.css': 'css' },
|
|
||||||
logLevel: 'info',
|
|
||||||
});
|
|
||||||
|
|
||||||
for (const html of ['index.html', 'stats.html', 'screen.html']) {
|
|
||||||
copyFileSync(src(html), dist(html));
|
|
||||||
}
|
|
||||||
|
|
||||||
console.log('agent build ok →', dist(''));
|
|
||||||
|
|
@ -1,15 +0,0 @@
|
||||||
{
|
|
||||||
"name": "@hive/agent",
|
|
||||||
"version": "0.0.0",
|
|
||||||
"private": true,
|
|
||||||
"description": "hive-ag3nt per-container web UI. Bundled by esbuild into a static dist; served by the in-container Rust binary at runtime via tower_http::ServeDir. Per-agent additions are layered on top via the hyperhive.frontend.extraFiles nix option.",
|
|
||||||
"type": "module",
|
|
||||||
"scripts": {
|
|
||||||
"build": "node ./build.mjs"
|
|
||||||
},
|
|
||||||
"dependencies": {
|
|
||||||
"@hive/shared": "*",
|
|
||||||
"marked": "4.3.0",
|
|
||||||
"chart.js": "4.4.4"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,53 +0,0 @@
|
||||||
// esbuild build for @hive/dashboard. Output layout (`dist/`):
|
|
||||||
//
|
|
||||||
// dist/index.html served by the Rust router at GET /
|
|
||||||
// dist/static/app.js served at /static/app.js (ESM bundle,
|
|
||||||
// pulls in @hive/shared + marked)
|
|
||||||
// dist/static/app.js.map source map sibling
|
|
||||||
// dist/static/dashboard.css served at /static/dashboard.css
|
|
||||||
// (@import resolved from @hive/shared)
|
|
||||||
//
|
|
||||||
// The Rust binary mounts `dist/` as a `tower_http::ServeDir` fallback;
|
|
||||||
// the layout above keeps every URL the index.html references reachable
|
|
||||||
// without rewriting paths in the HTML.
|
|
||||||
|
|
||||||
import { build } from 'esbuild';
|
|
||||||
import { mkdirSync, copyFileSync, rmSync } from 'node:fs';
|
|
||||||
import { dirname, resolve } from 'node:path';
|
|
||||||
import { fileURLToPath } from 'node:url';
|
|
||||||
|
|
||||||
const here = dirname(fileURLToPath(import.meta.url));
|
|
||||||
const src = (p) => resolve(here, 'src', p);
|
|
||||||
const dist = (p) => resolve(here, 'dist', p);
|
|
||||||
const staticDir = (p) => resolve(here, 'dist', 'static', p);
|
|
||||||
|
|
||||||
rmSync(dist(''), { recursive: true, force: true });
|
|
||||||
mkdirSync(staticDir(''), { recursive: true });
|
|
||||||
|
|
||||||
// Bundle the JS entry. ES-module output, browser target, no minify
|
|
||||||
// (line-aligned source aids debugging; minification belongs in a later
|
|
||||||
// follow-up once asset sizes warrant it).
|
|
||||||
await build({
|
|
||||||
entryPoints: [src('app.js')],
|
|
||||||
outfile: staticDir('app.js'),
|
|
||||||
bundle: true,
|
|
||||||
format: 'esm',
|
|
||||||
platform: 'browser',
|
|
||||||
target: ['es2022'],
|
|
||||||
sourcemap: true,
|
|
||||||
logLevel: 'info',
|
|
||||||
});
|
|
||||||
|
|
||||||
// Bundle the CSS — esbuild resolves @import including the package
|
|
||||||
// re-exports from @hive/shared.
|
|
||||||
await build({
|
|
||||||
entryPoints: [src('dashboard.css')],
|
|
||||||
outfile: staticDir('dashboard.css'),
|
|
||||||
bundle: true,
|
|
||||||
loader: { '.css': 'css' },
|
|
||||||
logLevel: 'info',
|
|
||||||
});
|
|
||||||
|
|
||||||
copyFileSync(src('index.html'), dist('index.html'));
|
|
||||||
|
|
||||||
console.log('dashboard build ok →', dist(''));
|
|
||||||
|
|
@ -1,14 +0,0 @@
|
||||||
{
|
|
||||||
"name": "@hive/dashboard",
|
|
||||||
"version": "0.0.0",
|
|
||||||
"private": true,
|
|
||||||
"description": "hive-c0re dashboard SPA. Bundled by esbuild into a static dist; served by the hive-c0re Rust binary at runtime via tower_http::ServeDir.",
|
|
||||||
"type": "module",
|
|
||||||
"scripts": {
|
|
||||||
"build": "node ./build.mjs"
|
|
||||||
},
|
|
||||||
"dependencies": {
|
|
||||||
"@hive/shared": "*",
|
|
||||||
"marked": "4.3.0"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,17 +0,0 @@
|
||||||
{
|
|
||||||
"name": "@hive/shared",
|
|
||||||
"version": "0.0.0",
|
|
||||||
"private": true,
|
|
||||||
"description": "Shared frontend modules used by both the dashboard and the per-agent UI: terminal log pane, Catppuccin palette, base typography. Imported by sibling workspaces; not bundled standalone.",
|
|
||||||
"type": "module",
|
|
||||||
"main": "./src/index.js",
|
|
||||||
"exports": {
|
|
||||||
".": "./src/index.js",
|
|
||||||
"./terminal.js": "./src/terminal.js",
|
|
||||||
"./base.css": "./src/base.css",
|
|
||||||
"./terminal.css": "./src/terminal.css"
|
|
||||||
},
|
|
||||||
"files": [
|
|
||||||
"src/"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
|
|
@ -1,3 +0,0 @@
|
||||||
// Convenience re-export so consumers can `import { create, linkify }
|
|
||||||
// from '@hive/shared'` without naming the sub-module path.
|
|
||||||
export { create, linkify } from './terminal.js';
|
|
||||||
|
|
@ -1,342 +0,0 @@
|
||||||
// Shared terminal pane: sticky-bottom log + "↓ N new" pill + history
|
|
||||||
// backfill + live SSE. Pages provide a kind→renderer map; this module
|
|
||||||
// owns scroll behaviour, animation suppression on backfill, and the
|
|
||||||
// EventSource lifecycle.
|
|
||||||
//
|
|
||||||
// Usage:
|
|
||||||
//
|
|
||||||
// import { create, linkify } from '@hive/shared/terminal.js';
|
|
||||||
//
|
|
||||||
// create({
|
|
||||||
// logEl: document.getElementById('msgflow'),
|
|
||||||
// historyUrl: '/messages/history?limit=200', // optional
|
|
||||||
// streamUrl: '/messages/stream',
|
|
||||||
// renderers: {
|
|
||||||
// sent: (ev, api) => api.row('msgrow sent', ...),
|
|
||||||
// delivered: (ev, api) => api.row('msgrow delivered', ...),
|
|
||||||
// _default: (ev, api) => api.row('note', JSON.stringify(ev)),
|
|
||||||
// },
|
|
||||||
// onLiveEvent: (ev) => { /* live-only side effects (notif, state pokes) */ },
|
|
||||||
// onAnyEvent: (ev, { fromHistory }) => { /* runs for every event in
|
|
||||||
// both backfill replay and live — use for derived views that need
|
|
||||||
// the full picture (e.g. a per-recipient inbox built from broker
|
|
||||||
// events) */ },
|
|
||||||
// onBackfillDone: (count) => { /* one-shot after history replay */ },
|
|
||||||
// onStreamOpen: () => { /* fires on every EventSource (re)connect —
|
|
||||||
// use to re-sync snapshot-derived state after a reconnect gap */ },
|
|
||||||
// pillAnchor: document.getElementById('msgflow').parentElement,
|
|
||||||
// });
|
|
||||||
//
|
|
||||||
// Renderers receive (ev, api) where api exposes:
|
|
||||||
//
|
|
||||||
// api.row(cls, text) → appends a flat <div class="row cls">
|
|
||||||
// api.details(cls, summary, body) → appends <details class="row cls">
|
|
||||||
// with a <pre.tool-body>
|
|
||||||
// api.detailsDiff(cls, summary, body) → ditto but body is line-coloured by
|
|
||||||
// leading "+ " / "- " prefix
|
|
||||||
// api.placeholder(text) → replaces log content with a single
|
|
||||||
// muted "(placeholder)" row, cleared
|
|
||||||
// on the next real row
|
|
||||||
// api.fromHistory → true while backfill is replaying
|
|
||||||
//
|
|
||||||
// Each kind is dispatched to `renderers[ev.kind]`; unknown kinds fall
|
|
||||||
// through to `renderers._default` (which itself defaults to a JSON-dump
|
|
||||||
// note row). The convention is that the SSE/history endpoints emit
|
|
||||||
// objects with a `kind` field.
|
|
||||||
//
|
|
||||||
// Backfill is best-effort: if `historyUrl` is unset or the fetch fails,
|
|
||||||
// we skip straight to SSE. The optional `onBackfillDone(count)` hook
|
|
||||||
// fires after replay finishes (or after a failed/skipped fetch with
|
|
||||||
// count=0); pages use it to set state flags from the replayed history.
|
|
||||||
|
|
||||||
const NEAR_BOTTOM_PX = 48;
|
|
||||||
|
|
||||||
export function create(opts) {
|
|
||||||
const log = opts.logEl;
|
|
||||||
if (!log) throw new Error('HiveTerminal.create: logEl is required');
|
|
||||||
const renderers = opts.renderers || {};
|
|
||||||
const defaultRender = renderers._default
|
|
||||||
|| ((ev, api) => api.row('note', JSON.stringify(ev)));
|
|
||||||
const pillAnchor = opts.pillAnchor || log.parentElement || log;
|
|
||||||
|
|
||||||
let placeholderEl = null;
|
|
||||||
let pill = null;
|
|
||||||
let unseen = 0;
|
|
||||||
let currentNoAnim = false;
|
|
||||||
|
|
||||||
function isNearBottom() {
|
|
||||||
return log.scrollHeight - log.scrollTop - log.clientHeight <= NEAR_BOTTOM_PX;
|
|
||||||
}
|
|
||||||
function ensurePill() {
|
|
||||||
if (pill) return pill;
|
|
||||||
pill = document.createElement('button');
|
|
||||||
pill.type = 'button';
|
|
||||||
pill.className = 'tail-pill';
|
|
||||||
pill.addEventListener('click', () => { log.scrollTop = log.scrollHeight; });
|
|
||||||
pillAnchor.appendChild(pill);
|
|
||||||
return pill;
|
|
||||||
}
|
|
||||||
function updatePill() {
|
|
||||||
if (unseen <= 0) {
|
|
||||||
if (pill) pill.classList.remove('visible');
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
ensurePill();
|
|
||||||
pill.textContent = '↓ ' + unseen + ' new';
|
|
||||||
pill.classList.add('visible');
|
|
||||||
}
|
|
||||||
log.addEventListener('scroll', () => {
|
|
||||||
if (isNearBottom()) { unseen = 0; updatePill(); }
|
|
||||||
});
|
|
||||||
function afterAppend() {
|
|
||||||
if (currentNoAnim || isNearBottom()) {
|
|
||||||
log.scrollTop = log.scrollHeight;
|
|
||||||
} else {
|
|
||||||
unseen += 1;
|
|
||||||
updatePill();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
function clearPlaceholder() {
|
|
||||||
if (placeholderEl && placeholderEl.parentElement === log) {
|
|
||||||
log.removeChild(placeholderEl);
|
|
||||||
}
|
|
||||||
placeholderEl = null;
|
|
||||||
}
|
|
||||||
function placeholder(text) {
|
|
||||||
clearPlaceholder();
|
|
||||||
const e = document.createElement('div');
|
|
||||||
e.className = 'row note';
|
|
||||||
e.textContent = text;
|
|
||||||
log.appendChild(e);
|
|
||||||
placeholderEl = e;
|
|
||||||
}
|
|
||||||
function row(cls, text) {
|
|
||||||
clearPlaceholder();
|
|
||||||
const e = document.createElement('div');
|
|
||||||
e.className = 'row ' + (cls || '') + (currentNoAnim ? ' no-anim' : '');
|
|
||||||
e.appendChild(linkify(text));
|
|
||||||
log.appendChild(e);
|
|
||||||
afterAppend();
|
|
||||||
return e;
|
|
||||||
}
|
|
||||||
function details(cls, summary, body) {
|
|
||||||
clearPlaceholder();
|
|
||||||
const d = document.createElement('details');
|
|
||||||
d.className = 'row ' + (cls || '') + (currentNoAnim ? ' no-anim' : '');
|
|
||||||
const s = document.createElement('summary');
|
|
||||||
s.textContent = summary;
|
|
||||||
d.appendChild(s);
|
|
||||||
const pre = document.createElement('pre');
|
|
||||||
pre.className = 'tool-body';
|
|
||||||
pre.appendChild(linkify(body));
|
|
||||||
d.appendChild(pre);
|
|
||||||
log.appendChild(d);
|
|
||||||
afterAppend();
|
|
||||||
return d;
|
|
||||||
}
|
|
||||||
function detailsDiff(cls, summary, body) {
|
|
||||||
clearPlaceholder();
|
|
||||||
const d = document.createElement('details');
|
|
||||||
d.className = 'row ' + (cls || '') + (currentNoAnim ? ' no-anim' : '');
|
|
||||||
const s = document.createElement('summary');
|
|
||||||
s.textContent = summary;
|
|
||||||
d.appendChild(s);
|
|
||||||
const pre = document.createElement('pre');
|
|
||||||
pre.className = 'tool-body diff-body';
|
|
||||||
for (const line of String(body).split('\n')) {
|
|
||||||
const span = document.createElement('span');
|
|
||||||
if (line.startsWith('+ ')) span.className = 'diff-add';
|
|
||||||
else if (line.startsWith('- ')) span.className = 'diff-del';
|
|
||||||
else span.className = 'diff-ctx';
|
|
||||||
span.textContent = line + '\n';
|
|
||||||
pre.appendChild(span);
|
|
||||||
}
|
|
||||||
d.appendChild(pre);
|
|
||||||
log.appendChild(d);
|
|
||||||
afterAppend();
|
|
||||||
return d;
|
|
||||||
}
|
|
||||||
|
|
||||||
function api(extra) {
|
|
||||||
return Object.assign({
|
|
||||||
row, details, detailsDiff, placeholder, linkify,
|
|
||||||
fromHistory: false,
|
|
||||||
}, extra || {});
|
|
||||||
}
|
|
||||||
function dispatch(ev, fromHistory) {
|
|
||||||
const r = renderers[ev.kind] || defaultRender;
|
|
||||||
try {
|
|
||||||
r(ev, api({ fromHistory }));
|
|
||||||
} catch (err) {
|
|
||||||
console.error('terminal renderer threw', ev, err);
|
|
||||||
row('note', '[render err] ' + (err && err.message ? err.message : err));
|
|
||||||
}
|
|
||||||
if (opts.onAnyEvent) {
|
|
||||||
try { opts.onAnyEvent(ev, { fromHistory }); }
|
|
||||||
catch (err) { console.error('onAnyEvent threw', err); }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Subscribe → buffer → fetch history → dedupe → apply.
|
|
||||||
//
|
|
||||||
// Race the SSE subscription opens before the history fetch starts.
|
|
||||||
// Live events that land before history resolves are buffered, not
|
|
||||||
// rendered. Once the history response (`{ seq, events }`) arrives we:
|
|
||||||
// 1. Replay `events` (fromHistory=true).
|
|
||||||
// 2. Drop buffered events with `seq <= history.seq` — they're
|
|
||||||
// already reflected in the history rows above.
|
|
||||||
// 3. Apply remaining buffered events (fromHistory=false).
|
|
||||||
// 4. Switch to live mode: each new SSE event dispatches immediately.
|
|
||||||
//
|
|
||||||
// Without this dance an event that fires between history-fetch and
|
|
||||||
// SSE-subscribe goes missing; without seq dedupe the same event
|
|
||||||
// shows twice (once via history, once via live buffer). Both bugs
|
|
||||||
// were latent before.
|
|
||||||
//
|
|
||||||
// If `historyUrl` is unset we skip the dance: buffered events apply
|
|
||||||
// as live the moment the buffer flushes (no dedupe possible without
|
|
||||||
// a boundary seq).
|
|
||||||
function start() {
|
|
||||||
let live = false;
|
|
||||||
let buffered = [];
|
|
||||||
|
|
||||||
const es = new EventSource(opts.streamUrl);
|
|
||||||
es.onmessage = (e) => {
|
|
||||||
let ev;
|
|
||||||
try { ev = JSON.parse(e.data); }
|
|
||||||
catch (err) { row('note', '[parse err] ' + e.data); return; }
|
|
||||||
if (!live) { buffered.push(ev); return; }
|
|
||||||
dispatch(ev, false);
|
|
||||||
if (opts.onLiveEvent) {
|
|
||||||
try { opts.onLiveEvent(ev); }
|
|
||||||
catch (err) { console.error('onLiveEvent threw', err); }
|
|
||||||
}
|
|
||||||
};
|
|
||||||
es.onerror = () => {
|
|
||||||
if (es.readyState === EventSource.CONNECTING) row('note', '[reconnecting…]');
|
|
||||||
else row('note', '[disconnected]');
|
|
||||||
};
|
|
||||||
es.onopen = () => {
|
|
||||||
// Fires on the initial connect and on every automatic
|
|
||||||
// reconnect. EventSource never replays events that fired
|
|
||||||
// during a disconnect window, so a consumer with
|
|
||||||
// snapshot-derived state (the dashboard's /api/state stores)
|
|
||||||
// must re-sync here or it shows stale state until a manual
|
|
||||||
// reload (issue #163).
|
|
||||||
if (opts.onStreamOpen) {
|
|
||||||
try { opts.onStreamOpen(); }
|
|
||||||
catch (err) { console.error('onStreamOpen threw', err); }
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
function flushBuffered(boundarySeq, historyKinds) {
|
|
||||||
const drained = buffered;
|
|
||||||
buffered = [];
|
|
||||||
live = true;
|
|
||||||
for (const ev of drained) {
|
|
||||||
// Seq-dedupe only events of a kind that actually appeared in
|
|
||||||
// the history replay — those are the only ones that could
|
|
||||||
// double (once via history, once via the live buffer).
|
|
||||||
// Mutation events (approval/question/container/…) are never
|
|
||||||
// carried by the history endpoint; deduping them against the
|
|
||||||
// broker-history seq would wrongly drop ones that fired
|
|
||||||
// between a consumer's own snapshot read and this history
|
|
||||||
// fetch (issue #163). ev.seq absent/0 → no dedupe possible.
|
|
||||||
if (boundarySeq != null
|
|
||||||
&& typeof ev.seq === 'number' && ev.seq <= boundarySeq
|
|
||||||
&& historyKinds && historyKinds.has(ev.kind)) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
dispatch(ev, false);
|
|
||||||
if (opts.onLiveEvent) {
|
|
||||||
try { opts.onLiveEvent(ev); }
|
|
||||||
catch (err) { console.error('onLiveEvent threw', err); }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
async function backfill() {
|
|
||||||
if (!opts.historyUrl) {
|
|
||||||
flushBuffered(null);
|
|
||||||
if (opts.onBackfillDone) opts.onBackfillDone(0);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
try {
|
|
||||||
const resp = await fetch(opts.historyUrl);
|
|
||||||
if (!resp.ok) {
|
|
||||||
flushBuffered(null);
|
|
||||||
if (opts.onBackfillDone) opts.onBackfillDone(0);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
const body = await resp.json();
|
|
||||||
// Accept the envelope `{ seq, events }`. A bare array means
|
|
||||||
// the server hasn't been updated to include seq yet — treat
|
|
||||||
// it as "no dedupe possible."
|
|
||||||
const events = Array.isArray(body) ? body : (body.events || []);
|
|
||||||
const boundarySeq = Array.isArray(body) ? null : (body.seq ?? null);
|
|
||||||
// Kinds present in the history replay — the only kinds that
|
|
||||||
// can double and therefore the only ones to seq-dedupe.
|
|
||||||
const historyKinds = new Set(events.map((ev) => ev.kind));
|
|
||||||
currentNoAnim = true;
|
|
||||||
for (const ev of events) dispatch(ev, true);
|
|
||||||
currentNoAnim = false;
|
|
||||||
if (events.length) row('note', '─── live (older above) ───');
|
|
||||||
else placeholder('(connected — waiting for events)');
|
|
||||||
flushBuffered(boundarySeq, historyKinds);
|
|
||||||
if (opts.onBackfillDone) opts.onBackfillDone(events.length);
|
|
||||||
} catch (err) {
|
|
||||||
console.warn('history backfill failed', err);
|
|
||||||
flushBuffered(null);
|
|
||||||
if (opts.onBackfillDone) opts.onBackfillDone(0);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return backfill();
|
|
||||||
}
|
|
||||||
|
|
||||||
const ready = start();
|
|
||||||
return { row, details, detailsDiff, placeholder, ready };
|
|
||||||
}
|
|
||||||
|
|
||||||
// Build a DocumentFragment from `text`, turning bare http(s) URLs into
|
|
||||||
// clickable links that open in a new tab. Non-URL text stays as plain
|
|
||||||
// text nodes — no innerHTML, so this is XSS-safe. Trailing sentence
|
|
||||||
// punctuation is kept out of the link. (issue #233)
|
|
||||||
const LINKIFY_URL_RE = /https?:\/\/[^\s<>"']+/g;
|
|
||||||
export function linkify(text) {
|
|
||||||
const str = text == null ? '' : String(text);
|
|
||||||
const frag = document.createDocumentFragment();
|
|
||||||
if (str.indexOf('://') === -1) { // fast path: no URLs
|
|
||||||
if (str) frag.appendChild(document.createTextNode(str));
|
|
||||||
return frag;
|
|
||||||
}
|
|
||||||
let last = 0;
|
|
||||||
let m;
|
|
||||||
LINKIFY_URL_RE.lastIndex = 0;
|
|
||||||
while ((m = LINKIFY_URL_RE.exec(str)) !== null) {
|
|
||||||
let url = m[0];
|
|
||||||
// Don't swallow trailing punctuation that's really sentence text.
|
|
||||||
const trail = url.match(/[.,;:!?)\]}'"]+$/);
|
|
||||||
const tail = trail ? trail[0] : '';
|
|
||||||
if (tail) url = url.slice(0, -tail.length);
|
|
||||||
if (m.index > last) {
|
|
||||||
frag.appendChild(document.createTextNode(str.slice(last, m.index)));
|
|
||||||
}
|
|
||||||
if (!url.slice(url.indexOf('://') + 3)) {
|
|
||||||
// Nothing past the scheme — not a real URL, emit verbatim.
|
|
||||||
frag.appendChild(document.createTextNode(m[0]));
|
|
||||||
} else {
|
|
||||||
const a = document.createElement('a');
|
|
||||||
a.href = url; // regex only matches https?:// — safe
|
|
||||||
a.textContent = url;
|
|
||||||
a.target = '_blank';
|
|
||||||
a.rel = 'noopener noreferrer';
|
|
||||||
frag.appendChild(a);
|
|
||||||
if (tail) frag.appendChild(document.createTextNode(tail));
|
|
||||||
}
|
|
||||||
last = m.index + m[0].length;
|
|
||||||
}
|
|
||||||
if (last < str.length) {
|
|
||||||
frag.appendChild(document.createTextNode(str.slice(last)));
|
|
||||||
}
|
|
||||||
return frag;
|
|
||||||
}
|
|
||||||
|
|
@ -12,6 +12,7 @@ axum.workspace = true
|
||||||
reqwest.workspace = true
|
reqwest.workspace = true
|
||||||
futures-util = "0.3"
|
futures-util = "0.3"
|
||||||
clap.workspace = true
|
clap.workspace = true
|
||||||
|
hive-fr0nt.workspace = true
|
||||||
hive-sh4re.workspace = true
|
hive-sh4re.workspace = true
|
||||||
rmcp.workspace = true
|
rmcp.workspace = true
|
||||||
rusqlite.workspace = true
|
rusqlite.workspace = true
|
||||||
|
|
@ -20,7 +21,6 @@ serde.workspace = true
|
||||||
serde_json.workspace = true
|
serde_json.workspace = true
|
||||||
tokio.workspace = true
|
tokio.workspace = true
|
||||||
tokio-stream.workspace = true
|
tokio-stream.workspace = true
|
||||||
tower-http.workspace = true
|
|
||||||
tracing.workspace = true
|
tracing.workspace = true
|
||||||
tracing-subscriber.workspace = true
|
tracing-subscriber.workspace = true
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,5 @@
|
||||||
/* Shared Catppuccin palette + body typography + terminal pane styles.
|
/* Palette + base body typography live in hive-fr0nt::BASE_CSS, prepended
|
||||||
Bundled in front of the agent-only rules below via esbuild. */
|
to this stylesheet by `serve_css` at runtime. */
|
||||||
@import "@hive/shared/base.css";
|
|
||||||
@import "@hive/shared/terminal.css";
|
|
||||||
|
|
||||||
body {
|
body {
|
||||||
max-width: 110em;
|
max-width: 110em;
|
||||||
margin: 1.5em auto;
|
margin: 1.5em auto;
|
||||||
|
|
@ -2,18 +2,6 @@
|
||||||
// tails `/events/stream` for live claude events, drives async-form
|
// tails `/events/stream` for live claude events, drives async-form
|
||||||
// actions (send / login/* / dashboard rebuild).
|
// actions (send / login/* / dashboard rebuild).
|
||||||
|
|
||||||
import { create as termCreate, linkify as termLinkify } from '@hive/shared/terminal.js';
|
|
||||||
import { marked } from 'marked';
|
|
||||||
|
|
||||||
// Expose the previously-script-tag-provided globals so the IIFE below
|
|
||||||
// keeps working unchanged. Pre-split these were attached by
|
|
||||||
// `/static/hive-fr0nt.js` (HiveTerminal) and `/static/marked.js`
|
|
||||||
// (marked) loading before app.js. The bundle now pulls them in via ES
|
|
||||||
// imports; once the IIFE is opened up these aliases can be dropped in
|
|
||||||
// favour of direct named imports.
|
|
||||||
window.HiveTerminal = { create: termCreate, linkify: termLinkify };
|
|
||||||
window.marked = marked;
|
|
||||||
|
|
||||||
(() => {
|
(() => {
|
||||||
// ─── helpers ────────────────────────────────────────────────────────────
|
// ─── helpers ────────────────────────────────────────────────────────────
|
||||||
const $ = (id) => document.getElementById(id);
|
const $ = (id) => document.getElementById(id);
|
||||||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue