import type { VariantQaIssue, VariantQaResult } from './contracts';
/** Inputs passed to the runtime QA seam. The orchestrator constructs this
 *  from the static-preview HTML and the source identifier it would have
 *  used (e.g. the wrapped preview URL). */
export interface RuntimeQaInput {
    html: string;
    /** Source identifier — typically the preview URL or a fallback marker
     *  like `inline:<workItemId>`. Surfaced in the QA result. */
    source: string;
}
/** A pluggable runtime QA runner. Returns the issues it observed; the
 *  caller wraps them in the final `VariantQaResult`. Returning an empty
 *  list means the runtime check passed. */
export type RuntimeQaRunner = (input: RuntimeQaInput) => Promise<VariantQaIssue[]>;
/**
 * No-op runtime QA runner used when no real (e.g. Playwright-based)
 * runner is injected. Returns an empty issue list so the gate decision
 * is driven entirely by the static asset layer.
 */
export declare const DEFAULT_RUNTIME_QA_RUNNER: RuntimeQaRunner;
/**
 * Lightweight HTTP HEAD/GET probe abstraction. Defaults to the global
 * HTTP client with DNS pinning; tests inject a stub so they can simulate
 * 404s, network failures, and timeouts deterministically.
 */
export type AssetProber = (url: string, timeoutMs: number) => Promise<{
    ok: boolean;
    status: number;
    message?: string;
}>;
export declare const DEFAULT_ASSET_PROBER: AssetProber;
export interface PreviewQaOptions {
    /** Override the asset reachability probe. */
    assetProber?: AssetProber;
    /** Override the runtime QA seam. */
    runtimeQaRunner?: RuntimeQaRunner;
    /** Per-asset timeout. Defaults to 4s. */
    assetTimeoutMs?: number;
    /** Source identifier surfaced on the QA result. */
    source?: string;
}
export interface PreviewQaInput {
    html: string;
    options?: PreviewQaOptions;
}
/**
 * Run preview QA against a generated static-preview HTML document. The
 * static layer extracts external asset URLs and probes each one; the
 * injectable runtime layer adds console/runtime checks. Returns a single
 * `VariantQaResult` with the combined verdict.
 */
export declare function runPreviewQa(input: PreviewQaInput): Promise<VariantQaResult>;
/**
 * Extract external asset URLs from a generated HTML document. Pulls from
 * the common attributes (`src`, `href`, `poster`, `data-*` images) and
 * inline CSS `url(...)` references. Keeps only http(s) URLs — relative
 * paths and inline data URIs can't fail the QA gate because they don't
 * touch the network.
 */
export declare function extractExternalAssetUrls(html: string): string[];
//# sourceMappingURL=previewQa.d.ts.map