The board spec is the wire format. There is no intermediate UI protocol and
no compiled catalog: the server streams each board's own blocks, exactly as
stored, and the client renders them directly. This page describes the wire
shape and the render contract that the client is expected to honour.
GET /api/stream is a Server-Sent Events stream. Each frame is a complete
snapshot of every board:
{
"config": {"default_ttl": 1800, "stale_ttl": 3600, "max_boards": 12},
"now": 1759938000.5,
"boards": [
{
"id": "migration",
"title": "Migration",
"subtitle": "",
"status": "running",
"updated": 1759937990.0,
"age": 10.5,
"version": 3,
"ttl": null,
"effective_ttl": 1800,
"expires_in": null,
"progress": 0.98,
"tab": {"label": "Migration", "accent": "violet",
"indicator": {"kind": "bar", "value": 6836, "max": 6950}},
"blocks": [
{"id": "p", "type": "progress", "label": "Rows copied",
"value": 6836, "max": 6950, "unit": "rows"},
{"id": "l", "type": "log", "title": "recent", "lines": ["batch 41 ok"]}
]
}
]
}- Every field except
blocksis the summary also returned byGET /api/boards(seeapi.md). blocksis the board's block list exactly as stored — the same objects that were validated on write. The server does not transform them.nowis the server clock the frame was measured against; the client advances ages on its own clock between frames.
There is no per-field delta on the wire: the snapshot is the unit of consistency.
A block is an object with a required type and the fields that type declares;
the full list is in blocks.md and the single source of truth is
backend/contract.py. There are 17 block types rendered by 14
components: chart is an alias of sparkline, stat/stats share one chip
component, and log/code share one log component.
Because the raw blocks are the wire, the client owns the small amount of behaviour that used to be applied server-side. It must be preserved exactly:
- Numbers are exact by default. A
stat/statsvalue that is a number renders exact (6836, never6.8K); a string renders verbatim (the agent opts into compaction by pre-formatting it, e.g."1.5M").progress/gauge/barvalues are coerced to real numbers (a ratio needs one). The rule lives inweb/src/livewall/format.ts. - Log cap. A
logblock is stored with up toMAX_LOG_LINES(400) lines but rendered with the most recentRENDER_LOG_LINES(80). Thecodeblock renders through the log component but is not subject to that cap: it renders from its statictext, which the contract caps atMAX_TEXT_LEN(8192 chars). - Empty state. A board with no title, no subtitle and no blocks shows
waiting for the agent to program the board…. - Unknown block. An unrecognised
typerenders[unknown block: <type>]rather than crashing. - Totality. The renderer never throws on hostile input: a malformed block
degrades to a visible value (an empty string,
0, a default), so one bad block cannot blank a board.
The contract validates on write, so a well-behaved agent never hits these paths; the renderer's totality is the second line of defence for a board already in memory.
See architecture.md for how the pieces fit and
blocks.md for the component each block renders as.