hive-agent: the per-agent page has no message box; its send route and the broker's operator message are removed
The page's composer (its input, slash commands and completion), POST /send in hive-agent, the OperatorMsg request of the agent socket and its handler in hive-c0re, and the broker-error helper only the send route used are deleted: writing to an agent is the swarm UI's terminal. cancel turn, new session and log out stay in the state badge's menu; POST /api/compact stays, with nothing on the page calling it. The request-line limit keeps its size, and its comment says it is a generous bound now. The docs describe the actions in place of the footer and the prompt.
This commit is contained in:
parent
e149ff3315
commit
23f4f1823b
2 changed files with 77 additions and 505 deletions
|
|
@ -75,8 +75,8 @@ JS renders — no full-page reloads.
|
|||
- **[Dashboard layout](dashboard.md)** — every tab and standalone page,
|
||||
in full implementation detail: endpoint shapes, event wiring, exact
|
||||
badge-derivation rules.
|
||||
- **[Per-agent page](agent.md)** — the per-agent terminal, composer,
|
||||
side panel, slash commands, and per-agent endpoints.
|
||||
- **[Per-agent page](agent.md)** — the per-agent terminal,
|
||||
side panel, actions, and per-agent endpoints.
|
||||
- **[Shape (shared by both)](shape.md)** — the SPA skeleton, SSE
|
||||
multiplexing, terminal pane, listener bind, per-agent relative
|
||||
paths, `data-async` form pattern, atomic repaint.
|
||||
|
|
@ -106,8 +106,8 @@ touching the code rather than using the UI:
|
|||
[`terminal-rendering.md`](terminal-rendering.md) (full row taxonomy
|
||||
and dispatch walkthrough); for a high-level summary see
|
||||
[`agent.md`](agent.md) (Per-stream rendering).
|
||||
- **"What slash commands does the agent accept?"** →
|
||||
[`agent.md`](agent.md) (Terminal-embedded prompt).
|
||||
- **"What actions does the agent page offer?"** →
|
||||
[`agent.md`](agent.md) (Actions).
|
||||
- **"What are the per-agent HTTP endpoints?"** →
|
||||
[`agent.md`](agent.md) (Per-agent endpoints).
|
||||
- **"Which CSS variable to use / where are colours defined?"** →
|
||||
|
|
|
|||
|
|
@ -4,9 +4,10 @@
|
|||
> [Shape (shared)](shape.md) · [Dashboard layout](dashboard.md)
|
||||
|
||||
|
||||
Three fixed-position layers frame a full-viewport terminal: a header,
|
||||
scrollable main content, and a footer composer — plus a slide-in side
|
||||
panel for flyouts and long content.
|
||||
Two fixed-position layers frame a full-viewport terminal: a header and
|
||||
scrollable main content — plus a slide-in side panel for flyouts and long
|
||||
content. The page has no message box: to write to an agent, use the swarm
|
||||
UI's terminal.
|
||||
|
||||
## Header
|
||||
|
||||
|
|
@ -91,13 +92,9 @@ at a given viewport width. Two columns:
|
|||
(`GET /api/state`'s `links` field) also feeds
|
||||
`DashboardState.links` for the dashboard card's icon strip —
|
||||
`agent_links()` in hive-agent is the single source of truth for
|
||||
both. The dashboard link lives in this 🔗 popover, and
|
||||
`/new-session` / `/logout` are
|
||||
typed slash commands with their own type-twice confirm (see
|
||||
below).
|
||||
- `/cancel` (slash command, below) is the only cancel-turn path; the
|
||||
turn-loop state badge already shows `thinking` as the
|
||||
discoverability cue.
|
||||
both. The dashboard link lives in this 🔗 popover. `cancel turn`,
|
||||
`new session` and `log out` are rows of the state badge's menu, each
|
||||
with a click-again confirm (see Actions below).
|
||||
<!-- vale write-good.Passive = YES -->
|
||||
|
||||
Values throughout come from `GET /api/state`'s cold-load snapshot,
|
||||
|
|
@ -129,22 +126,14 @@ and scrolls behind the fixed header + footer.
|
|||
`.terminal-wrap` applies `backdrop-filter: blur` for the frost
|
||||
effect, which creates a CSS stacking context — anchoring the
|
||||
pill inside that context would confine its `z-index` below the
|
||||
fixed composer in the root stacking context, and it'd never
|
||||
fixed header in the root stacking context, and it'd never
|
||||
float. `.agent-main` has no backdrop-filter (no stacking-context
|
||||
creators), so the pill's `z-index` reaches the root and properly
|
||||
composites above the composer. Geometry is unchanged —
|
||||
composites above the header. Geometry is unchanged —
|
||||
`.agent-main` and `.terminal-wrap` both `inset: 0` fill the same
|
||||
area.
|
||||
<!-- vale write-good.Passive = YES -->
|
||||
|
||||
## Footer / composer
|
||||
|
||||
**Fixed-overlay footer** (`<footer class="agent-composer">`): frosted
|
||||
glass, symmetric with the header. Contains the operator-input
|
||||
textarea (`#term-input`) — multi-line, Enter sends, Shift+Enter
|
||||
newlines, Tab-completes slash commands (see [Terminal-embedded
|
||||
prompt](#terminal-embedded-prompt) below).
|
||||
|
||||
## Side panel
|
||||
|
||||
**Side panel** (slide-in from right): singleton shared with the
|
||||
|
|
@ -226,35 +215,27 @@ the full row taxonomy and dispatch logic):
|
|||
turn-start), triggers a `refreshState()`. The time suffix is
|
||||
guarded on a numeric `ts`, so rows degrade cleanly when absent.
|
||||
|
||||
## Terminal-embedded prompt
|
||||
## Actions
|
||||
|
||||
The operator input lives *inside* the terminal-wrap as a
|
||||
prompt-style textarea below the live tail: multi-line (Enter
|
||||
sends, Shift+Enter newlines), tab-completes slash commands.
|
||||
The state badge's menu carries the actions on the agent's claude:
|
||||
|
||||
Slash commands today:
|
||||
|
||||
- `/help` — list commands locally.
|
||||
- `/clear` — wipe the local terminal view (server history kept).
|
||||
- `/cancel` — `POST /api/cancel` → SIGINT to the turn's claude and every
|
||||
- `cancel turn` — `POST /api/cancel` → SIGINT to the turn's claude and every
|
||||
command it started (its process group), emits a Note. On an ACP agent
|
||||
it sends the agent `session/cancel` instead, and SIGINT if the turn
|
||||
hasn't ended 10s later. Also surfaces as a `■ cancel turn` button in
|
||||
the state row while state=thinking.
|
||||
- `/compact` — `POST /api/compact` → sets the deferred
|
||||
`Bus::request_compact()` flag and returns immediately. The harness
|
||||
runs the `/compact` at the next turn boundary (end of the in-flight
|
||||
turn, or `turn::run_pending_compact` when idle); output streams into
|
||||
the live panel. Works mid-turn, not only when idle. Either way the live
|
||||
panel ends with a `/compact done` or `/compact failed: …` note.
|
||||
- `/new-session` — `POST /api/new-session` (confirms first).
|
||||
hasn't ended 10s later. Offered while the state is `thinking`.
|
||||
- `new session` — `POST /api/new-session` (confirms first).
|
||||
Arms a one-shot on the Bus; next turn runs without
|
||||
`--continue`, dropping the resume session entirely.
|
||||
- `/logout` — `POST /api/logout` (confirms first). Wipes OAuth
|
||||
- `log out` — `POST /api/logout` (confirms first). Wipes OAuth
|
||||
credential files, parks the agent in `needs_login`, and preserves
|
||||
session history (`~/.claude/projects/`).
|
||||
|
||||
Unknown `/foo` shows an error row instead of being silently sent.
|
||||
`POST /api/compact` sets the deferred `Bus::request_compact()` flag and
|
||||
returns immediately. The harness runs the `/compact` at the next turn
|
||||
boundary (end of the in-flight turn, or `turn::run_pending_compact` when
|
||||
idle); output streams into the live panel, which ends with a `/compact done`
|
||||
or `/compact failed: …` note. It works mid-turn, not only when idle. Nothing
|
||||
on this page calls it now.
|
||||
|
||||
## Per-agent endpoints
|
||||
|
||||
|
|
@ -270,7 +251,6 @@ delivers the new state faster anyway. Only the login flow still
|
|||
polls (session output streams in updates that aren't event-
|
||||
shaped).
|
||||
|
||||
- `POST /send` — operator-injected message into this agent's inbox.
|
||||
- `POST /login/{start,code,cancel}` — claude OAuth login flow.
|
||||
Start/cancel emit `LiveEvent::StatusChanged` to flip the
|
||||
badge to/from `needs_login_in_progress`.
|
||||
|
|
|
|||
Loading…
Reference in a new issue