export declare const PTY_SNAPSHOT_SCROLLBACK_LINES = 1500; export declare const PTY_SNAPSHOT_MAX_BYTES: number; export interface SerializedPtySnapshot { data: string; cols: number; rows: number; visible: boolean; } interface PtySnapshotOptions { cols: number; rows: number; initial?: SerializedPtySnapshot; } /** * A server-side terminal emulator fed from the same byte stream as the browser. * Writes are explicitly serialized so split escape sequences and snapshot * boundaries retain the PTY's exact order. */ export declare class PtySnapshot { private readonly terminal; private readonly serializeAddon; private pending; constructor(options: PtySnapshotOptions); write(data: string | Buffer): Promise; resize(cols: number, rows: number): Promise; capture(): Promise; /** Capture exactly through the writes queued when this method is called. */ captureAtBoundary(): Promise; private captureNow; /** viewport() read through the same write queue capture() uses, so callers see * the screen as of every byte written before this call rather than a frame * torn mid-escape-sequence. Answering a TUI dialog depends on that ordering. */ viewportAtBoundary(): Promise; viewport(): string[]; dispose(): void; private writeQueued; private hasVisibleContent; private serializePlainViewport; } interface StoreOptions { debounceMs?: number; } /** Debounced, atomic, per-session persistence for the last good PTY snapshot. */ export declare class PtySnapshotStore { private readonly directory; private readonly debounceMs; private readonly pending; private readonly epochs; constructor(directory?: string, options?: StoreOptions); load(sessionId: string): Promise; schedule(sessionId: string, snapshot: SerializedPtySnapshot): void; flush(sessionId: string): Promise; delete(sessionId: string): Promise; deleteSync(sessionId: string): void; private queueWrite; private writeAtomic; private fileFor; private epoch; } export declare const ptySnapshotStore: PtySnapshotStore; export {}; //# sourceMappingURL=pty-snapshot.d.ts.map