/**
 * Capture Adapter Types
 *
 * Platform-agnostic interface for recording video/screenshots from applications.
 * Adapters implement this interface for different capture mechanisms:
 * - CDP (Chrome DevTools Protocol) — Electron, Tauri, browsers, React Native
 * - Playwright — web apps via browser automation
 * - ADB — Android devices and emulators
 * - Simulator — iOS simulator
 * - Manual — user provides their own recording
 */
/** Configuration for starting a capture session */
export interface CaptureConfig {
    /** Output file path for the recording */
    outputPath: string;
    /** Maximum duration in seconds (default: 60) */
    duration?: number;
    /** Target frames per second (default: 2 for efficiency, max ~15 via CDP) */
    fps?: number;
    /** Max width in pixels (default: 1280) */
    maxWidth?: number;
    /** Max height in pixels (default: 720) */
    maxHeight?: number;
    /** Image format for frames (default: 'jpeg') */
    format?: 'jpeg' | 'png';
    /** JPEG quality 0-100 (default: 80) */
    quality?: number;
}
/** Configuration specific to CDP-based capture */
export interface CDPCaptureConfig extends CaptureConfig {
    /** CDP debug port (default: 9222) */
    port?: number;
    /** CDP host (default: 'localhost') */
    host?: string;
    /** Target page index or ID (default: first page) */
    targetId?: string;
}
/** Result from a completed capture session */
export interface CaptureResult {
    /** Whether capture succeeded */
    success: boolean;
    /** Output file path */
    outputPath: string;
    /** Number of frames captured */
    frameCount: number;
    /** Actual duration in seconds */
    duration: number;
    /** File size in bytes */
    fileSizeBytes: number;
    /** Error message if failed */
    error?: string;
    /** Individual frame paths (if saved as frame sequence) */
    framePaths?: string[];
}
/** Metadata about a single captured frame */
export interface CaptureFrame {
    /** Frame index (0-based) */
    index: number;
    /** Timestamp offset from start in milliseconds */
    timestampMs: number;
    /** Base64-encoded image data */
    data: string;
    /** Image format */
    format: 'jpeg' | 'png';
    /** Frame dimensions */
    width?: number;
    height?: number;
}
/**
 * Platform-agnostic capture adapter interface.
 *
 * Lifecycle: create → start → (frames arrive) → stop → getResult
 */
export interface CaptureAdapter {
    /** Human-readable name of this adapter (e.g., 'cdp', 'playwright', 'adb') */
    readonly name: string;
    /** Check if this adapter can capture in the current environment */
    isAvailable(): Promise<boolean>;
    /** Start capturing. Returns when capture is actively recording. */
    start(config: CaptureConfig): Promise<void>;
    /** Stop capturing and finalize output. */
    stop(): Promise<CaptureResult>;
    /** Optional: callback for each frame as it arrives (for live preview) */
    onFrame?: (frame: CaptureFrame) => void;
}
//# sourceMappingURL=types.d.ts.map