import type { InspectApplyPayload } from './inspect.js'; import type { EditorTransport, TransportCallOptions } from '../contract/transport.js'; import type { DesignCodegenData } from './designCompiler.js'; export interface InspectQaArtifactHash { domStructureHash: string; screenshotHash: string; screenshotUrl?: string; } export interface InspectQaPixelDimensions { width: number; height: number; } export interface InspectQaPixelDiff { before: InspectQaPixelDimensions; after: InspectQaPixelDimensions; dimensionsMatch: boolean; changedPixels: number; totalPixels: number; diffRatio: number; threshold: number; heatmapUrl: string | null; } export interface InspectQaFrameResult { id: string; before: InspectQaArtifactHash; after?: InspectQaArtifactHash; domChanged?: boolean; screenshotChanged?: boolean; pixelDiff?: InspectQaPixelDiff; } export interface InspectQaFailure { id: string; error: string; } export interface InspectQaResult { phase: 'baseline' | 'changed'; baselineId: string; complete: boolean; frames: InspectQaFrameResult[]; failures: InspectQaFailure[]; } export interface InspectQaCaptureRequest { phase: 'baseline' | 'changed'; basePath: string; frameIds: string[]; baselineId?: string; /** Optional host capture mode forwarded to the configured capture script. */ variant?: string; /** Exact per-frame recipes, aligned one-to-one with frameIds. */ frames?: Array<{ id: string; fingerprint?: string; recipe?: Readonly>; }>; } export declare function inspectQaBaseUrl(basePath: string, origin: string): string; /** Among all change impact frames calculated by the source graph, only the canonical screen that the host can capture is selected. */ export declare function inspectQaFrameIds(payload: InspectApplyPayload, eligibleFrameIds?: readonly string[]): string[]; /** * Asks the transport's QA service for DOM and PNG hashes of the given frames * and strictly normalizes its answer. Artifact paths are accepted only under * the transport's QA artifact prefix and come back resolved for the document. */ export declare function requestInspectQaCapture(transport: EditorTransport, request: InspectQaCaptureRequest, options?: TransportCallOptions): Promise;