OpenProgram Docs

Transcript model

The server is the only code that decides what a transcript looks like. A package, transcript/, turns store nodes into Turns: a prompt plus everything it owns. Ownership is settled before any page is cut, so a page edge cannot separate a card from its reply.

A Row is the existing ChatMsg, built on the server with the same field names, so components keep drawing what they draw. Reads return whole turns fresh from the store at a numbered revision.

Later changes reach the browser in two forms only: text and thinking stay on the existing stream_event frame, and everything else is a numbered transcript_update built by the same projection functions that serve history. The CLI, ACP, channels, worker_turn and bound replies read the same projection as flat rows.

The browser does not fold, does not mint rows from misses and does not merge. It draws each row by the rowKind the server sent. Nothing is stored beyond the existing append-only log.

Every delivery step is built; Implementation status lists them.

Pages of this record

PageCovers
Rows and ownershipView, TranscriptView, Turn, Row, Block, local rows, overlays, and who owns each fact
Reads and client rulesCursor and text-frame rules, parking, first open, paging, reconnect, panes, non-web consumers
Live updatesLive text, observer and publisher, Stop, trees, foreign writes, sends, optimistic writes, sub-agents
Wire protocol and modulesFrames, new and changed modules, what is deleted at which step
Delivery stepsApproval gate, steps 0 to 10, and which step closes each finding
Limits and enforcementOld data, contract and behaviour tests, remaining limits, alternatives not taken

Invariants kept

InvariantHow it holds
DAG meaningThe log stays append-only, seq stays the only sort key, caller and predecessor stay orthogonal. Display folding changes nothing in render_context, model replay, or list_branches.
Stored history is never rewrittenEvery old shape is read at display time (Old data).
Row identityMessage ids, tool_call_id and card_id are stable. Anchors, measured heights, the arrival animation and the rail keep working. A replaced window restores by message id before paint.
Scroll ownershipuseChatAreaStick alone writes follow position. history-viewport alone restores anchors. Loaders and WebSocket handlers do not scroll.
Sub-agent isolationjob_id frames never enter the conversation. The store key stays <session_id>#sub-agent:<first job id>. Collapsed rows load nothing. Sub-agent transcripts are in branch order. HEAD never moves while a run is active.
Reconnect contractTranscript read first, then execution recovery, snapshot-only. Request-id correlation, the 15 s deadline with a quiet retry (backoff, cached rows kept; a missing conversation closes), stale replies ignored, run_seq ordering, open questions and approvals replayed. Retry state stays live-only.
Merge guaranteesSnapshot and replacement rules are in Transcript update ownership. Failed sends and local rows survive a load. Reads and client rules and Live updates state the mechanism for each.
BoundsServer pages: first read 6 turns or 128 KiB, later pages 25 turns or 512 KiB, one whole turn always allowed. Browser: 6 pages, 8 MiB, four cached conversations (MAX_CACHED_SESSIONS = 4). Page reads never run full hydration. Acceptance is a real server benchmark at 300,000 nodes plus the existing 300,000-row browser test, restated in turns at step 5.
Delta batchingOne animation frame per batch. Pending text of a row flushes before any item or terminal change for that row.
No second storeNo new runtime, database, event log or in-memory row source.

Implementation status

All eleven delivery steps are done, and the pages of this record describe the running code. Every read and every live change comes from the projection, the browser draws what the server sent through one reducer and one row list, and the old history paths, the reload frame and the web mapper are gone.

StepScopeState
0Harness and baselines (tests only)Done
1Server data repairs, no wire changeDone
2Whole-turn pages, no wire changeDone
3Writers record ownershipDone
4Bubble owns data by id, old transportDone
5Projection, turn index and read flipDone
6Per-view rows and sub-agent readsDone
7Observer, publisher, non-reply updatesDone
8Live through one pathDone
9Draw only what the server sentDone
10Remove old paths and finish the recordsDone

Rows and ownership

Last updated · 2026-11-25