/** * What lookout writes beside a shot, while the page still shows what the PNG * shows: the rendering provenance and the accessibility tree. * * Split out of web-route.ts, which is the shape of the capture walk rather than * the shape of the files it drops. Both sidecars follow the same rule, and it * is the rule this module exists to state once: a sidecar that cannot be taken * costs the sidecar and never the shot. A screenshot lookout failed to describe * is still a screenshot the judges can rule on; a screenshot lookout failed to * take is a hole in the evidence. */ import type { Locator, Page } from "playwright"; import { type ShotAxes } from "./store.js"; import type { DeterministicFinding, ResolvedConfig } from "../types.js"; export interface SidecarRefs { /** Evidence-relative path of the provenance sidecar, when one was written. */ provenance?: string; /** Evidence-relative path of the accessibility-tree sidecar, when one was written. */ aria?: string; /** sha256 of the tree, which is a judge input and so a ledger input. */ ariaHash?: string; } export declare function writeSidecars(args: { resolved: ResolvedConfig; page: Page; element: Locator | null; elementSelector: string | null; axes: ShotAxes; runId: string; capturedAt: string; pngHash: string; image: { width: number; height: number; }; /** Findings whose selectors the provenance walk resolves against the live DOM. */ findings: DeterministicFinding[]; want: { provenance: boolean; aria: boolean; }; progress: (line: string) => void; }): Promise;