/**
 * Headless terminal renderer: feeds PTY data into an xterm-headless instance
 * and exposes viewport snapshots for the Feishu streaming card (PNG render,
 * export-text action, ScreenAnalyzer).
 *
 * Snapshot semantics match PNG: both read the current viewport
 * [baseY, baseY + rows). This keeps text export and screenshot consistent
 * even for alt-screen CLIs (Claude Code) where scrollback isn't meaningful.
 */
import xtermHeadless from '@xterm/headless';
declare const Terminal: typeof xtermHeadless.Terminal;
/**
 * Read the current viewport of an xterm-headless Terminal as plain text.
 *
 * Extracted as a free function so transient renderers (capture-pane seeded)
 * can reuse the same line-filtering + trimming logic without instantiating
 * a full TerminalRenderer (which is built for long-lived buffer accumulation).
 *
 * `filter=true` drops the bare-prompt line and the input-echo line — the
 * card text should show CLI output, not the live cursor reflection.
 */
export declare function readViewportText(terminal: InstanceType<typeof Terminal>, opts: {
    filter: boolean;
    readCols?: number;
    startY?: number;
    rows?: number;
}): string;
export declare class TerminalRenderer {
    private terminal;
    private lastHash;
    constructor(cols: number, rows: number);
    /** Feed raw PTY data into the virtual terminal. */
    write(data: string): void;
    /** Reset the change-detection hash so the next snapshot registers as changed. */
    markNewTurn(): void;
    /** Filtered viewport snapshot — drops the bare prompt + input echo lines. */
    snapshot(): {
        content: string;
        changed: boolean;
    };
    /**
     * Raw viewport snapshot — no line filtering. Used by ScreenAnalyzer which
     * needs the full screen including ❯ cursor lines.
     */
    rawSnapshot(): string;
    private readViewport;
    resize(cols: number, rows: number): void;
    /** Expose the underlying xterm-headless instance for screenshot rendering. */
    get xterm(): InstanceType<typeof Terminal>;
    dispose(): void;
}
export {};
//# sourceMappingURL=terminal-renderer.d.ts.map