import { QaProfile } from '@mcoda/shared/qa/QaProfile.js'; import type { QaBrowserAction } from '@mcoda/shared/qa/QaPlan.js'; import { QaAdapter } from './QaAdapter.js'; import { QaContext, QaEnsureResult, QaRunResult } from './QaTypes.js'; type BrowserFetchResult = { html: string; innerText?: string; textContent?: string; status?: number; finalUrl?: string; }; type BrowserActionResult = { index: number; type: QaBrowserAction['type']; ok: boolean; message?: string; url?: string; durationMs?: number; }; type BrowserActionSnapshot = { index: number; name: string; html: string; innerText?: string; textContent?: string; url?: string; }; export declare const resolveChromiumBinary: () => Promise; declare class NetworkIdleTracker { inflight: number; lastActivity: number; sawLoad: boolean; documentStatus?: number; documentUrl?: string; handle(method: string, params?: any): void; } declare class CdpClient { private ws; private queue; private nextId; private closed; static connect(wsUrl: string): Promise; private constructor(); call(method: string, params: Record, tracker?: NetworkIdleTracker, timeoutMs?: number): Promise; waitForNetworkIdle(tracker: NetworkIdleTracker, timeoutMs: number): Promise; close(): void; } export declare class ChromiumQaAdapter implements QaAdapter { ensureInstalled(profile: QaProfile, ctx: QaContext): Promise; private persistLogs; private persistBrowserArtifacts; invoke(profile: QaProfile, ctx: QaContext): Promise; private runBrowserActions; private runBrowser; } export declare const __testing: { resolveActionUrl: (actionUrl: string | undefined, baseUrl: string | undefined) => string | undefined; resolveActionTimeoutMs: (action: QaBrowserAction, fallbackMs: number) => number; runBrowserActionsWithClient: (client: CdpClient, actions: QaBrowserAction[], baseUrl: string | undefined, timeoutMs: number) => Promise<{ outcome: "pass" | "fail"; errorMessage?: string; results: BrowserActionResult[]; snapshots: BrowserActionSnapshot[]; finalDom?: BrowserFetchResult; }>; }; export {}; //# sourceMappingURL=ChromiumQaAdapter.d.ts.map