/** * A single-line terminal progress bar for long waits (editor startup, builds). * * Everything goes to stderr: stdout is the MCP stdio channel and a stray byte * there corrupts the protocol. On a TTY the line rewrites in place; when the * output is piped or logged (CI, an agent transcript) it degrades to one plain * line per change, so a log does not fill with escape codes. */ export interface ProgressState { /** 0..1, or null when the work has no measurable fraction yet. */ fraction: number | null; /** Short label: what is happening right now. */ message: string; /** Optional right-hand detail (module counts, elapsed time). */ detail?: string; } export interface ProgressBar { update(state: ProgressState): void; /** Stop rendering. `finalLine`, if given, is left on screen. */ stop(finalLine?: string): void; } /** * Start a progress bar. Returns a handle even when stderr is not a TTY, so * callers never branch on it. */ export declare function startProgress(title: string): ProgressBar;