From 7ddf62efb6308beafc7d346b2e1003f7358dad93 Mon Sep 17 00:00:00 2001 From: Drew Stone Date: Sat, 1 Aug 2026 01:50:38 -0600 Subject: [PATCH 1/2] feat(tui): host the supervisor run view where the run layout is written MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The terminal view over live supervisor runs lived in the loops repo, where it carried its own hand-joined copy of the on-disk layout: [join(root, '.agent', 'supervisor'), join(root, '.loops', 'supervisor')] agent-runtime owns and exports that contract, and agent-runtime is what WRITES the state the view renders. A reader versioning independently of its writer drifts; keeping the two in one package makes drift impossible by construction. Moved verbatim except where a hand-joined path became a call into the contract: src/tui/top-model.ts read the layout into a TopSnapshot, render an ANSI frame src/tui/top-app.ts keypress/mouse loop, steer and cancel controls src/tui/bin.ts agent-runtime-top [root] [--once] [--no-color] Three fixes fall out of consuming the contract rather than copying it: - The view read only `journal.jsonl`, the retired bare-event file. This repo's own `createFileRunContext` writes `spawn-journal.jsonl`, so the view showed zero workers for every current run. Both names are read, newest first. - Worker tails are keyed by file stem, which the writer puts through `safeWorkerFile`; a label that stem alters never found its own events. - `