Watch
0
0
Fork
You've already forked hyperhive
0

remove the agent's live terminal page and the endpoints only it used

This commit is contained in:
iris 2026-11-16 04:31:36 +01:00 • committed by mara
commit 6289b8d64b
4 changed files with 127 additions and 4053 deletions

View file

@ -11,8 +11,8 @@ config changes, what its own page shows and how far you can trust it.
- **[Persistence and config changes](persistence.md)** — what survives a
restart, a destroy and a purge, and how a change to an agent's config flows
from a pull request to its container.
- **[The agent's web page](web-page.md)** — the per-agent terminal view, its
actions and its endpoints.
- **[The agent's web server](web-page.md)** — the stats and screen pages and
what the dashboard reads from each agent.
- **[Security model](security.md)** — the trust model, the prompt-injection
threat model and credential isolation.

View file

@ -1,24 +1,18 @@
# Per-agent page
# Per-agent web server
> Part of [Agents](README.md). See also: [Dashboard layout](../hives/dashboard.md)
Every agent's harness serves a page of its own, reached from the agent's row on
the hive dashboard. It shows a live terminal view of what the agent is doing: its
turns, tool calls and results as they happen, with the recent history replayed
when you open it. The page has no message box; to write to an agent, use the
terminal in the [swarm UI](../swarm/ui.md). Like the hive dashboard, it
keeps shrinking, bit by bit.
Every agent's harness serves a small web server of its own, reached from the
agent's row on the hive dashboard. It has no terminal and no message box: to
watch an agent work or write to it, use its terminal in the
[swarm UI](../swarm/ui.md), and `hivectl watch` follows it from the command
line. What the server offers:
- **Header**: the agent's icon and name, a state badge (idle, thinking, needs
login), and pills for its inbox and todos. Selecting a pill opens the list in
a side panel. The inbox panel has **mark all read**, and the todos panel lets
you dismiss todos.
- **State badge menu**: **cancel turn** stops the turn in flight, **new session**
starts the next turn without the resume session, and **log out** wipes the
agent's claude login (it then waits in `needs_login`).
- **Stats page**: the agent's turn statistics. The same figures are in Grafana's
`agents` board.
- **Stats page**: the agent's turn statistics. The same figures are in
Grafana's `agents` board.
- **Screen page**: a live view of the agent's desktop, for an agent with a GUI.
- **Dashboard card data**: the status text and the links the hive dashboard shows
for the agent.
The header's parts, the live view, the endpoints the page and the harness serve,
and the stats page are in
[the agent page reference](../../4-implementation/web-ui/agent-page.md).
The endpoints and the stats page are in
[the per-agent web server reference](../../4-implementation/web-ui/agent-page.md).

View file

@ -36,17 +36,17 @@ The dashboard is a single page with these tabs:
- **K3PT ST4T3** — kept state from agents with no container (tombstones),
with a purge button per entry.
Each agent also has its own page, a full terminal view of that agent's
session. Select its name anywhere in the dashboard, or open `/agent/<name>/`
(or `http://<host>:<port>/` if the gateway isn't in front). [The agent's web page](../agents/web-page.md)
covers it.
Each agent also serves a small web server, with its stats and screen pages: open
`/agent/<name>/` (or `http://<host>:<port>/` if the gateway isn't in front).
[The agent's web server](../agents/web-page.md) covers it. To watch an agent
work, use its terminal in the swarm UI.
## The things you do here
**Check on an agent.** 4G3NTS shows every container as a row: name, whether
it's running, what it's doing (a live status pill such as `rebuilding…` or
`starting…` while something's in flight), and quick links (stats, screen).
Select the name to open its terminal and watch it work.
Open the agent in the swarm UI to watch it work.
**Review a config change.** Agent config changes (new packages, env vars, MCP
servers) are pull requests on the agent's `agent-configs` repo. Review and
@ -79,9 +79,8 @@ schedules card on the swarm UI's messages tab ([`swarm-ui.md`](../../4-implement
## More depth
The dashboard and the per-agent pages are single-page apps that share one
skeleton: `GET /` returns a static shell, `/api/state` returns JSON, and
JavaScript renders, with no full-page reloads.
The dashboard is a single-page app: `GET /` returns a static shell, `/api/state`
returns JSON, and JavaScript renders, with no full-page reloads.
- **[Shape (shared by both)](../../4-implementation/web-ui/shape.md)** — the
SPA skeleton, SSE multiplexing, terminal pane, listener bind, per-agent
@ -105,10 +104,9 @@ For the code, these jump straight to the relevant section:
- **"What endpoints does the dashboard expose?"** →
[`dashboard.md`](../../4-implementation/web-ui/dashboard.md) (Dashboard endpoints,
Dashboard event channel).
- **"How does the per-agent terminal render tool calls?"** →
- **"How does a terminal render tool calls?"** →
[`terminal-rendering.md`](../../4-implementation/web-ui/terminal-rendering.md)
(the full row taxonomy and dispatch walkthrough); for a summary see
[`agent-page.md`](../../4-implementation/web-ui/agent-page.md) (Per-stream rendering).
(the full row taxonomy and dispatch walkthrough).
- **"Which CSS variable to use, and where are the colours defined?"** →
[`css-vars.md`](../../4-implementation/web-ui/css-vars.md) (Palette, the
single-source `base.css` rule).

View file

@ -17,7 +17,7 @@ always on), the gateway proxies all operator-facing traffic, and
## Two principals, two paths
- **Operator** — reaches every UI (the dashboard + every
per-agent page) through the gateway, on one origin.
per-agent web server) through the gateway, on one origin.
The core daemon serves operator-authority actions
(answer-as-operator, lifecycle POSTs), reachable only via the
gateway.
@ -67,13 +67,11 @@ netns-isolated for the same reason.
The boundary rests on three layers:
1. **Gateway** — fronts all surfaces (dashboard + every per-agent UI)
on one origin. An nginx nixos-container proxies per-agent UIs under
`/agent/<name>/`, which is what lets each agent page's inbox panel
POST `mark-all-read` to the core dashboard's
`/api/agent/{name}/mark-all-read` go same-origin instead of needing
a cross-origin CORS shim. Pure ergonomics — no behavioural risk on
its own.
1. **Gateway** — fronts all surfaces (dashboard + every per-agent web
server) on one origin. An nginx nixos-container proxies the per-agent
servers under `/agent/<name>/`, so the dashboard's links to them go
same-origin instead of needing a cross-origin CORS shim. Pure
ergonomics — no behavioural risk on its own.
2. **Network isolation** — the load-bearing layer: every agent
container runs in a private netns behind the hive bridge, always
on and unconditional. This is what turns the operator/agent split