From 4769d7ce5a59075efc8e4311548f07016bddcce5 Mon Sep 17 00:00:00 2001 From: iris Date: Thu, 4 Jun 2026 21:45:32 +0200 Subject: [PATCH 1/4] docs: remove stale /api/agent/{name}/links references The c0re-proxy endpoint was removed in the dashboard-state refactor. Links are now served by agent_links() via two agent-local endpoints: StateSnapshot.links (GET /api/state, per-agent page) and DashboardState.links (GET /api/dashboard-state, dashboard card). Update docs/web-ui/agent.md and the StateSnapshot.links doc comment to reflect the current source of truth. --- docs/web-ui/agent.md | 8 ++++++-- hive-ag3nt/src/web_ui.rs | 11 +++++------ 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/docs/web-ui/agent.md b/docs/web-ui/agent.md index fd2039c4..288012b3 100644 --- a/docs/web-ui/agent.md +++ b/docs/web-ui/agent.md @@ -27,8 +27,12 @@ through. Three flex columns: `⬡ forge` (profile) + `↳ config` (agent-configs mirror) when the agent has a forge account; any `hyperhive.dashboardLinks` extras (`kind = External`). A `↑ dashboard` link is prepended by the JS - so the host dashboard is one click away. `GET /api/agent/{name}/links` - is the single source of truth. Each `NavLink.kind` resolves + so the host dashboard is one click away. Links come from + `StateSnapshot.links` (served by `GET /api/state`); the same set + also appears in `DashboardState.links` (`GET /api/dashboard-state`) + for the dashboard card's icon strip. Both are produced by + `agent_links()` in hive-ag3nt — the single source of truth. + Each `NavLink.kind` resolves differently in the frontend: `Container` → same-origin path (the agent page is itself container-local); `Forge` → `http://:3000`; `External` → already absolute. diff --git a/hive-ag3nt/src/web_ui.rs b/hive-ag3nt/src/web_ui.rs index 799682a9..e81021c4 100644 --- a/hive-ag3nt/src/web_ui.rs +++ b/hive-ag3nt/src/web_ui.rs @@ -416,12 +416,11 @@ struct StateSnapshot { /// Cumulative token usage across the most recent turn's inferences /// (cost signal). `null` until the first turn finishes. cost_usage: Option, - /// Navigation links for this agent page. The same list feeds the - /// dashboard card's icon-only nav strip via hive-c0re's - /// `GET /api/agent/{name}/links` same-origin passthrough proxy - /// — single source of truth, no CORS. Per-agent page also reads - /// this directly. See [`docs/web-ui/dashboard.md::Container row`] for the - /// frontend resolver + which links appear in which conditions. + /// Navigation links for this agent page. Also served via + /// `DashboardState.links` (`GET /api/dashboard-state`) for the + /// dashboard card's icon strip. Both are produced by `agent_links()` + /// — single source of truth. See [`docs/web-ui/dashboard.md::Container row`] + /// for the frontend resolver + which links appear in which conditions. links: Vec, /// Public URL of the forge served by hive-gateway (e.g. /// `"https://forge.pr1ma.darkest.space"`). Sourced from From 30c2d94f13fb7d22e1e2cec3e474d3c1911de009 Mon Sep 17 00:00:00 2001 From: iris Date: Thu, 4 Jun 2026 21:47:25 +0200 Subject: [PATCH 2/4] docs: fix remaining stale AgentLink comment (per damocles review) --- hive-ag3nt/src/web_ui.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/hive-ag3nt/src/web_ui.rs b/hive-ag3nt/src/web_ui.rs index e81021c4..98579a74 100644 --- a/hive-ag3nt/src/web_ui.rs +++ b/hive-ag3nt/src/web_ui.rs @@ -438,11 +438,11 @@ struct StateSnapshot { swarm_name: Option, } -/// One navigation link in the agent page header row. Same JSON -/// shape feeds the dashboard's icon-only nav strip via the host's -/// `GET /api/agent/{name}/links` passthrough proxy, so the agent -/// backend is the single source of truth for what links an agent -/// exposes. +/// One navigation link in the agent page header row. The same JSON +/// shape appears in both `StateSnapshot.links` (`GET /api/state`, +/// per-agent page) and `DashboardState.links` (`GET /api/dashboard-state`, +/// dashboard card icon strip). `agent_links()` is the single source +/// of truth for what links an agent exposes. #[derive(Serialize)] struct AgentLink { /// `kind = Container | Forge` → path; `kind = External` → full URL. From 33be854c502c6346204f9496c9af41e4efcf471e Mon Sep 17 00:00:00 2001 From: iris Date: Thu, 4 Jun 2026 22:04:00 +0200 Subject: [PATCH 3/4] docs: fix stale /api/agent/{name}/links reference in gateway.md --- docs/gateway.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/gateway.md b/docs/gateway.md index a0b16d63..2be01b92 100644 --- a/docs/gateway.md +++ b/docs/gateway.md @@ -156,7 +156,7 @@ as same-origin `/agent//…` URLs instead of the legacy direct `services.hyperhive.gateway.enable = true`. Three render sites flip together: the primary agent-name link, the favicon fetch (`/icon`), and the nav-strip `container`-kind links from -`/api/agent//links`. `forge`-kind nav-strip links still +`DashboardState.links` (`GET /api/dashboard-state`). `forge`-kind nav-strip links still resolve against `http://:3000` (separate sub-domain transition tracked by `forge.behindGateway`); `external`-kind links are already absolute. See `docs/web-ui/dashboard.md::Container row` for the From 86165f07c8bfa15228b4dd2bda0fb53b0c419e92 Mon Sep 17 00:00:00 2001 From: iris Date: Fri, 5 Jun 2026 00:38:11 +0200 Subject: [PATCH 4/4] docs: update hivectl verb list in CLAUDE.md (add gateway, agents, choom) --- CLAUDE.md | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/CLAUDE.md b/CLAUDE.md index 2da3cccf..96477a8c 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -27,13 +27,19 @@ hive-c0re/ host daemon + sibling operator CLI (lib + 2 bins) vacuum tasks. src/bin/hivectl.rs `hivectl` binary: operator-facing host CLI for ad-hoc administration that doesn't go - through the broker. v0 verbs: `forge - create-user `, `matrix create-user - ` — wrap the same idempotent - `forge::ensure_user_for` / - `matrix::ensure_user_for` flows c0re runs - in its boot sweeps, callable manually for - recovery / debug. + through the broker. Verbs: `forge + create-user ` / `matrix create-user + ` — manual entry points to the same + idempotent provisioning flows c0re runs at + boot; `gateway create-user|delete-user| + list-users` — BCrypt htpasswd management for + gateway HTTP Basic auth; `agents list|kill| + restart|restart-all` — container management + without the broker; `choom [--fresh]` + — exec into `machinectl shell h-` + running `claude --continue` (or fresh) so + the operator can drop into the agent's live + Claude session interactively. src/server.rs host admin socket (HostRequest → dispatch) src/client.rs admin-socket client src/manager_server.rs manager-privileged socket (ManagerRequest)