/**
 * ScreenReader — PTY screen state parser for Orchestrator-over-PTY
 *
 * Parses raw PTY byte streams into structured, LLM-readable screen state.
 * Uses @xterm/headless as the VT100/ANSI state machine so all escape
 * sequences (colour, cursor movement, clear-screen, etc.) are handled
 * correctly without a DOM.
 *
 * @issue #754
 * @see src/serve/pty-bridge.ts — PTY WebSocket bridge
 */
export interface ScreenState {
    /** Parsed grid of visible text (rows × cols) */
    text: string[][];
    /** Current cursor position within the visible viewport */
    cursor: {
        row: number;
        col: number;
    };
    /** Recent scrollback lines no longer in the visible viewport */
    scrollback: string[];
    /** Rendered as a single readable string */
    summary: string;
    /** Heuristic: is the terminal waiting for user input? */
    prompt_detected: boolean;
    /** The text of the detected prompt (when prompt_detected is true) */
    prompt_text?: string;
}
export declare class ScreenReader {
    private terminal;
    private _rows;
    private _cols;
    private emitter;
    private disposed;
    constructor(opts?: {
        rows?: number;
        cols?: number;
    });
    /** Feed raw PTY data into the parser */
    write(data: string): void;
    /** Get current parsed screen state */
    getState(): ScreenState;
    /**
     * Wait for the next screen change, with timeout.
     * Resolves with updated ScreenState when write() causes a change,
     * or with the current state if the timeout elapses first.
     */
    awaitChange(opts?: {
        timeout?: number;
    }): Promise<ScreenState>;
    /**
     * Flush all pending writes through xterm's internal write queue.
     * Enqueues an empty write and resolves when its callback fires, which
     * guarantees all previously queued writes have been processed.
     */
    flush(): Promise<void>;
    /** Get human-readable summary of visible screen */
    getSummary(): string;
    /** Clean up resources */
    dispose(): void;
}
//# sourceMappingURL=screen-reader.d.ts.map