import type { Terminal } from '@xterm/headless'; export interface ScreenState { timestamp: string; bufferType: 'normal' | 'alternate'; cursorX: number; cursorY: number; cols: number; rows: number; lines: string[]; } /** * Captures the current screen state of the terminal. * This correctly handles both normal and alternate screen buffers, * capturing only the visible screen content (not scrollback history). * * @param terminal - The xterm terminal instance * @returns The current screen state including all visible lines */ export declare function captureScreen(terminal: Terminal): ScreenState; /** * Formats the screen state into a human-readable string. * * @param state - The screen state to format * @returns Formatted string representation of the screen state */ export declare function formatScreenState(state: ScreenState): string; /** * Gets the terminal content as a single string. * This is a convenience function that captures the screen and returns * just the lines joined together. * * @param terminal - The xterm terminal instance * @param maxLines - Optional maximum number of lines to return (from the bottom) * @returns The terminal content as a string */ export declare function getTerminalScreenContent(terminal: Terminal, maxLines?: number): string;