import type { OutputEvent } from '../../../agent/types.js'; export type LoopStage = 'observing' | 'modeling' | 'choosing' | 'acting' | 'updating'; export interface StageSignals { toolErrored?: boolean; } export declare const LOOP_STAGES: readonly LoopStage[]; export declare const STAGE_LABEL: Record; export interface StageTrackerState { stage: LoopStage; pendingTools: Set; } export declare function createStageTracker(): StageTrackerState; export declare function resetStageTracker(s: StageTrackerState): void; export declare function advanceStage(s: StageTrackerState, event: OutputEvent): boolean; export declare function formatStageRail(active: LoopStage, fmt: { dim: (s: string) => string; accent: (s: string) => string; bold: (s: string) => string; }): string; export declare class LoopStageBar { private readonly stream; private readonly getExtraRows; private started; private currentStage; private resizeUnsub; private onRowCountChange?; constructor(opts: { getExtraRows: () => number; stream?: NodeJS.WriteStream; }); setRowCountChangeHandler(handler: (rows: number) => void): void; start(): void; stop(): void; repaint(stage: LoopStage): void; redraw(): void; private clearRow; }