/** * Headless progress (progress §8): one plain, unstyled, append-only line per state transition. * * This is the surface for `json` and `print` mode — benchmark runs and CI, which is to say the runs * that actually matter. Per LESSONS, every serious bug in this project was invisible offline and * obvious within one live run, and those live runs are exactly the headless ones; a progress feature * that only worked when someone was watching a terminal would miss all of them. * * Three properties, each load-bearing: * * - **Plain words, not glyphs** (§8.1). This stream is read in log files and CI output where the * theme, the width, and often the font are all unknown. * - **stderr, never stdout** (§8.2) — a correctness requirement, not a preference. In JSON mode stdout * IS the event protocol; in print mode it is the assistant's answer, which callers parse. * Interleaving progress into either corrupts a contract someone depends on. The stream is injected * here rather than written directly so that fact is testable, and so nothing in this file can reach * stdout by accident. * - **Append-only, never a redraw** (§8.3). The parent's stderr is shared with everything else in the * process, and cursor movement in a stream being appended to from more than one place corrupts all * of it. * * A per-event mapping rather than a re-projection: a transition is exactly what an append-only log * wants to record, and the panel's collapse/alignment machinery has nothing to contribute to a line. */ import type { RunEvent } from "../engine/types.ts"; import type { Outline } from "../progress/types.ts"; /** Where a headless line goes. Injected so a test can capture it and so stdout is unreachable from here. */ export type LineWriter = (line: string) => void; export interface PlainProgress { accept(event: RunEvent): void; } /** * A headless line writer for one run. `outline` supplies the one fact the log does not carry on its * own — a loop's declared `maxIterations`, so `iteration 2/10` can say how close the guard is. */ export declare function createPlainProgress(outline: Outline, write: LineWriter): PlainProgress; //# sourceMappingURL=progress-plain.d.ts.map