import xtermHeadless from "@xterm/headless"; declare const Terminal: typeof xtermHeadless.Terminal; type Terminal = InstanceType; export declare const INLINE_SIZE_THRESHOLD = 4000000; export declare const MAX_FRAME_HALVING_ATTEMPTS = 2; export interface Frame { pixels: Uint8Array; delay: number; width: number; height: number; } export declare class Recorder { private terminal; private minIntervalMs; private maxDurationMs; private onAutoStop?; private frames; private lastFrameTime; private debounceTimer?; private maxTimer?; private stopped; constructor(terminal: Terminal, minIntervalMs?: number, maxDurationMs?: number, onAutoStop?: (() => void) | undefined); /** * Called when PTY output arrives. Captures a frame if enough time has passed, * or schedules one after the debounce interval. */ onOutput(): void; private captureFrame; /** * Finalize recording and return captured frames. */ stop(): Frame[]; getFrameCount(): number; dispose(): void; } /** * Encode an array of frames as an animated GIF. */ export declare function encodeGif(frames: Frame[]): Buffer; /** * Drop every other frame, doubling delays to preserve timing. */ export declare function halveFrames(frames: Frame[]): Frame[]; export {};