55 — Rich Terminal Surface (vak term)
Status: Real API-connected in v3.0.32. Greenfield interactive console surface implemented in crates/vak-terminal, invoked via vak term / Surface::Terminal. Connects to a live vak server over HTTP/SSE — every rendered value (health, sessions, models, MCP inventory, approval state, telemetry, incidents) is fetched from real API endpoints or derived from real SSE event streams. Replaces the previous offline prototype that hardcoded all session names, model names, URLs, and mock data.
1. Product Decision & Visual Identity
vak term delivers an ultra-dense, cinematic command console inspired by high-density operational cockpits (Territory Studio, Iron Man, Ghost in the Shell, The Martian). It pairs high information density with modern terminal capabilities: 24-bit TrueColor palettes, dual-deck layouts, inline framebuffers (Kitty/Sixel/ANSI half-block), real-time telemetry waveforms, and Human-In-The-Loop (HIL) controls.

Strict Minimalist Typography & Iconography Contract
Rule: Zero emojis and zero playful markdown icons workspace-wide. All visual indicators use precision geometric Unicode glyphs and uppercase micro-tags:
| Purpose | Icon / Glyph | Usage |
|---|---|---|
| Web & Dev Server Previews | [PREVIEW] / ↗ | Live dev server and image preview pills |
| Diff Inspector | [DIFF] / Δ | Side-by-side git diffs |
| Execution Timers | 1.4s / [RUN] | Worker and bash worker execution duration |
| Human Gates & Approvals | ! / [GATE] | HIL approval modal requests |
| Profile & Memory | • / [USER] | USER.md memory notes |
| Tool Success | OK / hairline ✓ | Tool execution completions |
| Tool Denial / Failure | FAIL / hairline ✗ | Permission denials or failures |
| Service Status | ● (solid) / ○ (hollow) | Live service indicators (solid = active, hollow = idle) |
| Collapsible Sections | ▸ (collapsed) / ▾ (expanded) | Tool cards and CorePool workspace tree |
| Input Prompt | ❯ | REPL composer prompt chevron |
2. Frozen Color Palette (24-bit TrueColor)
Directly derived from the canonical Vak Web Client palette (crates/vak-client-ui/src/styles.css), cyclable via F2 or /theme:
// Canonical Vak Warm Palette (Default)
pub const BG_GROUND: Color = Color::Rgb(0x17, 0x17, 0x14); // #171714 Deep Warm Charcoal
pub const SURFACE_CARD: Color = Color::Rgb(0x1c, 0x1c, 0x19); // #1c1c19 Elevated Card Surface
pub const SURFACE_HOVER: Color = Color::Rgb(0x29, 0x29, 0x25); // #292925 Interactive Hover
pub const BORDER_RESTING: Color = Color::Rgb(0x34, 0x34, 0x2f); // #34342f Subtle Hairline
pub const BORDER_FOCUS: Color = Color::Rgb(0xdf, 0x79, 0x5f); // #df795f Terracotta Focus Glow
pub const ACCENT_PRIMARY: Color = Color::Rgb(0xdf, 0x79, 0x5f); // #df795f Warm Terracotta
pub const ACCENT_BRIGHT: Color = Color::Rgb(0xee, 0x92, 0x78); // #ee9278 Highlight Terracotta
pub const STATUS_OK: Color = Color::Rgb(0x73, 0xa9, 0x82); // #73a982 Sage Green (Additions/Verified)
pub const STATUS_WARN: Color = Color::Rgb(0xd4, 0xa8, 0x5d); // #d4a85d Warm Ochre / Amber
pub const STATUS_DANGER: Color = Color::Rgb(0xd8, 0x6f, 0x72); // #d86f72 Dusty Rose (Deletions/Denied)
pub const STATUS_INFO: Color = Color::Rgb(0x7c, 0x9f, 0xc9); // #7c9fc9 Slate Blue (Metadata)
pub const TEXT_MAIN: Color = Color::Rgb(0xee, 0xea, 0xe2); // #eeeae2 Soft Warm Parchment
pub const TEXT_MUTED: Color = Color::Rgb(0x91, 0x8e, 0x86); // #918e86 Secondary Text
pub const TEXT_FAINT: Color = Color::Rgb(0x8b, 0x88, 0x80); // #8b8880 Tertiary / Timestamps
Supported Theme Suites:
- Vak Warm (
#171714/#df795fTerracotta) - Vak Slate (
#121419/#7f9fcaDark Slate) - Vak Paper (
#f4f1ea/#a8462aLight Parchment) - Vak Contrast (
#080808/#ff8e70Deep OLED) - Tokyo Night (
#1a1b26/#7aa2f7Cyberpunk)
3. The 4-Screen Cohesive Suite
┌──────────────────────────────────────────────────────────────────────────────────────────────┐
│ [● 1: Studio] [2: Observability & Ops] [3: Settings & Remote Admin] [4: Inbox & Tasks] │
├────────────────────────────────────────┬─────────────────────────────────────────────────────┤
│ LEFT DECK (60% Width) │ RIGHT DECK (40% Width - HUD / INSPECTOR) │
│ Primary Stream / Flow / Tables │ Telemetry Radar / Merkle Graph / MCP / Inbox Deck │
├────────────────────────────────────────┴─────────────────────────────────────────────────────┤
│ FLOATING COMPOSER & QUICK ACTION PALETTE (Ctrl+K / /) │
└──────────────────────────────────────────────────────────────────────────────────────────────┘
Screen 1: Agent Studio ([1: Studio])

- Left Deck (60% Width):
- Inline Webpage Preview: 24-bit TrueColor halfblock wireframe (
▀▄█) rendering live dev server (http://localhost:5173) with mouse-clickable[ [PREVIEW] in Browser (o) ]. - Rendered Markdown & Tables: Clean code blocks with syntax styling (
react-app.ts) and test coverage badges. - Collapsible Tool Execution Cards: Real-time bash worker output with spinner, PID, and sandbox lease.
- Inline Webpage Preview: 24-bit TrueColor halfblock wireframe (
- Right Deck (40% Width HUD):
- System Metrics: CPU utilization dial and memory RSS with visual meters.
- Agent Swarm Radar: 360° rotating radar sweep tracking active child agents and queued tasks.
- Token Velocity Waveform: Live frequency audio/token velocity graph (
tok/s). - Multi-File Git Diff Inspector: Line-by-line diff inspector with additions/deletions.
Screen 2: Remote Observability & Operations ([2: Observability & Ops])

- Top KPI Row:
FinOps Spend: $0.142 / $5.00 Cap(with visual meter)Circuit Breakers: 100% HEALTHYLive Services: 3/3 ONLINEBus Queue: 0 DLQ
- Left Deck (60% Width):
- Live Real-Time Incident Stream: Streaming log records with severity markers (
● CRITICAL,● WARN,● INFO). - Audit Receipts Table: Action log with verified revisions and SHA-256 state fingerprints.
- Causal Lineage Merkle Graph: Node DAG tracking turns, genesis roots, and dispatched child flows.
- Live Real-Time Incident Stream: Streaming log records with severity markers (
- Right Deck (40% Width HUD):
- System Gauges & Radar: Shared telemetry dials for continuity.
- Live Network Traffic Waveform: Real-time throughput graph for
vak-bus. - Distributed Bus Queue Health: JetStream topic depths and throughput.
- Model Provider Latency: Hosted and local provider p50/p95 latency bars.
Screen 3: Remote Administration & Settings ([3: Settings & Remote Admin])

- Left Deck (60% Width):
- CorePool Multi-Tenant Workspaces: Interactive directory tree displaying the Shared Base Layer, Active Project Workspace, and
USER.mdprofile notes. - Interactive Security Engine:
- Mode Switches:
[● WorkspaceWrite],[○ ReadOnly],[○ FullAccess] - Approvals Policy:
[● Ask],[○ AutoApprove]
- Mode Switches:
- CorePool Multi-Tenant Workspaces: Interactive directory tree displaying the Shared Base Layer, Active Project Workspace, and
- Right Deck (40% Width HUD):
- MCP Server Inventory: Status table for
tavily,docker, andgithubwith tool count and status. - Channel Gateways: Status of Telegram, Discord, and Slack bot bridges.
- Pending Chat Authorization Queue: Inbound chat gate review with one-click
[Approve]and[Deny].
- MCP Server Inventory: Status table for
Screen 4: Attention Inbox, Memory & Scheduled Tasks ([4: Inbox, Memory & Tasks])

- Left Deck (60% Width):
- Prioritized Attention Inbox:
- Cost-limit threshold alerts with
[Ack]button. - Execution approval requests with
[Approve]/[Deny]. - Watchdog failures with
[Restart]and[Analyze]triggers.
- Cost-limit threshold alerts with
- Prioritized Attention Inbox:
- Right Deck (40% Width HUD):
- Durable Memory Store:
USER.mdprofile notes and learned preferences. - Skill Proposals Queue: Self-evolved candidate skills with
[Promote]and[Reject]. - Scheduled Tasks & Automation: Cron jobs with live countdown timers (
Next: 2h 14m).
- Durable Memory Store:
4. Human-In-The-Loop (HIL) Protocol & In-Place Editing

When an effectful tool execution is requested, a floating modal overlay dims the active background:
- Displays tool name, directory path, risk assessment, and estimated financial cost.
- In-Place Command Editor (
[e]): Pressing[e]transforms the command box into an inline editor, permitting the operator to modify shell arguments directly before granting approval. - Fast key decisions:
[y] Approve Once,[a] Always for Session,[d] Deny,[Esc] Cancel.
5. Input, Mouse & Hardware Protocol Contract
- Terminal Guard RAII:
TerminalGuard::enter()enables raw mode, alternate screen, andEnableMouseCapture. Dropping the guard unconditionally disables mouse capture and restores terminal mode. - Mouse Controls: Left-click on header tabs (
1–4) switches screens directly; left-click in Admin toggles security modes; left-click in HIL modal triggers actions; mouse wheel scrolls viewports. - Keyboard Controls:
1,2,3,4: Tab switching.Tab: Cycle active decks.F2: Cycle TrueColor themes./orCtrl+K: Quick Action Palette.Ctrl+D: Detach from session (leaves daemon running).Ctrl+C: Exit terminal.