import { type FormFactor, type ResolvedConfig, type RunRecord, type Scheme, type ShotRecord } from "../types.js"; import type { ResolvedTarget } from "../targets.js"; import type { RouteHarvest, RoutePlan } from "../navigate/store.js"; import type { StaleStamp } from "../freshness.js"; export interface WebCaptureOptions { formFactors: FormFactor[]; schemes: Scheme[]; /** * "route" = the accessibility scan at every form factor at rest, a violation * filed at the widest form factor that shows it and, at narrower ones, only * the nodes the wider layouts did not; "all" = every violation on every * form factor's rest shot; "off". */ axe: "route" | "all" | "off"; axeContrast: boolean; /** Extra settle after load, ms. */ settleMs: number; /** Capture state recipes named on routes ("all"), or none ("off"). */ states: "all" | "off"; headless: boolean; /** Per-shot rendering-provenance sidecars; on unless config or flag opts out. */ provenance: boolean; /** Per-shot accessibility-tree sidecars; on unless config or flag opts out. */ aria: boolean; /** * The clipped-content measurement. On unless --no-edge-clip says otherwise: * it costs one page.evaluate and no model money, and what it measures is the * kind of defect a judge can only guess at. */ edgeClip: boolean; runId: string; /** * Targets whose served build looked older than the source when the run * started, so the run records its own doubt. Absent when there was no reason * to doubt it, which keeps a clean run's flags clean. */ staleBuild?: StaleStamp[]; onProgress?: (line: string) => void; /** * Called as each shot lands, not at the end of the run. Anything watching a * capture live needs the record while the capture is still going. */ onShot?: (shot: ShotRecord) => void; /** * Navigation discovery, when the config enables it: cached plans to execute * (keyed by target|route) and the sink each route's fresh affordance * harvest lands in. Absent = no harvesting, no synthesized states. */ navigation?: { plans: ReadonlyMap; onHarvest: (routeKey: string, harvest: RouteHarvest) => void; }; } export interface WebCaptureResult { run: RunRecord; shots: ShotRecord[]; } export declare function captureWeb(resolved: ResolvedConfig, targets: ResolvedTarget[], opts: WebCaptureOptions): Promise;