/** * TUI Monitor - Real-time test execution monitor * Listens to Phase3Runner events and updates the terminal UI */ import type { TUIOptions, TUIState, TUIEvent, TUIGateState } from './types.js'; export declare class TUIMonitor { private options; private renderer; private state; private refreshInterval?; private eventBuffer; private gateStartTime; constructor(options?: TUIOptions); /** * Start monitoring a test run */ start(totalGates: number): void; /** * Emit an event during test execution */ emit(event: TUIEvent): void; /** * Update gate status */ updateGate(name: string, updates: Partial): void; /** * Mark gate as started */ startGate(name: string): void; /** * Mark gate as completed */ completeGate(name: string, success: boolean, results?: { total: number; passed: number; failed: number; }): void; /** * Set current phase */ setPhase(phase: string): void; /** * Set current progress (0-100) */ setProgress(progress: number): void; /** * Update test progress for current gate */ updateTestProgress(gateName: string, completed: number, total: number): void; /** * Mark run as failed */ fail(error: string): void; /** * Mark run as completed */ complete(): void; /** * Stop monitoring and cleanup */ stop(): void; /** * Cleanup and restore terminal */ cleanup(): void; /** * Get current state */ getState(): Readonly; /** * Get event buffer */ getEvents(): ReadonlyArray; private processEvent; private updateElapsed; private calculateETA; private updateProgress; private printSummary; private formatCount; private formatDuration; private setupExitHandlers; private removeExitHandlers; private handleExit; } /** * Create a monitor instance for programmatic use */ export declare function createMonitor(options?: TUIOptions): TUIMonitor; /** * Convenience function to monitor a Phase3Runner execution */ export declare function monitorExecution(execute: (emit: (event: TUIEvent) => void) => Promise, options?: TUIOptions): Promise;