/** * The console's autopilot section (aidlc-console/AC-32, aidlc-console/AC-34, * aidlc-console/AC-35). * * Pure apart from the reads passed in. The section prints one line per item that * changed rather than redrawing a frame above the prompt, which would flood the * scroll-back every two seconds (design D6). * * @module */ import type { AutopilotItem, AutopilotPaths } from '../autopilot/state.js'; /** What a change line reports for one item. */ export interface ItemView { name: string; step: string; phase: string; event: string; } export declare function itemView(read: (path: string) => string | null, item: AutopilotItem): ItemView; /** The fields whose change is worth a line (aidlc-console/AC-32). */ export declare function signature(v: ItemView): string; /** * Lines for every item that appeared, changed or left since `prev`, cut to * `columns` (aidlc-console/AC-35). Returns the new signatures to pass next time. */ export declare function changeLines(prev: ReadonlyMap, views: readonly ItemView[], columns: number | undefined): { lines: string[]; next: Map; }; export type FocusAction = 'approve' | 'read' | 'log' | 'open' | 'forget' | 'leave' | null; /** * One key in the focused section (aidlc-console/AC-34): up and down move the * selection, a letter names an action on it, Esc or Tab leaves. */ export declare function focusKey(selected: number, key: string, count: number): { selected: number; action: FocusAction; }; /** The focused list, the selected item marked, then the keys. */ export declare function focusLines(views: readonly ItemView[], selected: number, columns: number | undefined): string[]; /** * The artifact a person would review for an item: the first artifact of the phase it * stopped after, else of its current phase. Null when neither names one that exists. */ export declare function reviewArtifact(read: (path: string) => string | null, item: Pick): string | null; /** Where the driver writes an item's agent log (autopilot/driver.ts `logFile`). */ export declare function logFile(p: Pick, item: Pick): string; /** The last `n` lines of a text. */ export declare function tail(text: string, n: number): string[]; //# sourceMappingURL=autopilot-view.d.ts.map