import type { TraceSnapshot, TraceSnapshotOptions } from '../models/index.js'; export declare enum AdapterCapability { FULL_CDP = "full_cdp", FRAME_TIMING = "frame_timing", LONG_TASKS = "long_tasks", DOM_SIGNALS = "dom_signals", GPU_EVENTS = "gpu_events", PAINT_EVENTS = "paint_events", SOURCE_MAPS = "source_maps", LIVE_MONITORING = "live_monitoring" } export type AdapterType = 'chromium-cdp' | 'webkit-native' | 'firefox-rdp' | 'custom'; export interface AdapterConnectionOptions { browserPath?: string; port?: number; host?: string; wsEndpoint?: string; headless?: boolean; timeout?: number; launchArgs?: string[]; traceDir?: string; } export interface TraceCollectionOptions extends TraceSnapshotOptions { durationMs?: number; url?: string; scenario?: string; fpsTarget?: number; traceCategories?: string[]; samplingRate?: number; includeRawEvents?: boolean; } export interface AdapterStatus { connected: boolean; collecting: boolean; browserVersion?: string; platform?: string; lastError?: string; connectedAt?: Date; } export interface AdapterMetadata { type: AdapterType; name: string; description: string; capabilities: AdapterCapability[]; browserPatterns?: RegExp[]; priority?: number; } export interface IBrowserAdapter { readonly metadata: AdapterMetadata; connect(options: AdapterConnectionOptions): Promise; disconnect(): Promise; isConnected(): boolean; getStatus(): AdapterStatus; collectTrace(options: TraceCollectionOptions): Promise; hasCapability(capability: AdapterCapability): boolean; getCapabilities(): AdapterCapability[]; navigateTo?(url: string): Promise; executeScenario?(scenario: string): Promise; } export declare abstract class BaseBrowserAdapter implements IBrowserAdapter { abstract readonly metadata: AdapterMetadata; protected _connected: boolean; protected _collecting: boolean; protected _browserVersion?: string; protected _connectedAt?: Date; protected _lastError?: string; abstract connect(options: AdapterConnectionOptions): Promise; abstract disconnect(): Promise; abstract collectTrace(options: TraceCollectionOptions): Promise; isConnected(): boolean; getStatus(): AdapterStatus; hasCapability(capability: AdapterCapability): boolean; getCapabilities(): AdapterCapability[]; protected setConnected(connected: boolean, browserVersion?: string): void; protected setCollecting(collecting: boolean): void; protected setError(error: string | undefined): void; } export type AdapterFactory = () => IBrowserAdapter; export interface AdapterRegistration { metadata: AdapterMetadata; factory: AdapterFactory; }