import type { CritiqueProvider } from "./critique.js"; import { type PageReviewContextRecord, type PageReviewCritiqueRecord } from "./page-review-pack.js"; import type { CritiqueReusePlan } from "./qa-reuse.js"; import { type QaSnapshotStoreOptions } from "./qa-snapshot.js"; export interface JudgePageReviewPackOptions { packDir: string; /** Host-injected vision call. Absent: every context reports `skipped`. */ provider: CritiqueProvider | undefined; rubric: string; /** Vision calls in flight across the whole pack. Default: the provider's * own concurrency, then 4. */ concurrency?: number; /** Subset of context ids to judge (default: every context in the pack). */ contextIds?: string[]; /** Band-diff reuse against persisted snapshots keyed by `target`. */ reuse?: { target: string; store?: QaSnapshotStoreOptions; mismatchThreshold?: number; }; /** Absolute epoch-ms deadline. Workers stop claiming tiles once past it; * a context with unjudged tiles reports `incomplete`, never `pass`. */ deadlineAt?: number; onLog?: (message: string) => void; } export interface JudgedContext extends PageReviewCritiqueRecord { record: PageReviewContextRecord; /** Tiles selected for review that the pool never reached (deadline). */ tiles_unjudged: number; reuse?: Pick; } export interface JudgePageReviewPackResult { contexts: JudgedContext[]; pool: { concurrency: number; wall_time_ms: number; provider: string; }; tiles_total: number; tiles_reviewed: number; tiles_reused: number; outcome: "pass" | "fail" | "skipped" | "incomplete"; provider_meta?: Record; } /** * Orientation the provider reads before the rubric: which band this tile is, * where it sits on the page, how much of it repeats a neighbour, whether it * touches the page top or bottom, and how it was captured. A tile edge that * continues in the next band is not a clipped element, and a fixed header at * the top of a scrolled-band capture is not a layout defect; the preamble * says so where the pixels cannot. Adds context only: the finding taxonomy * the rubric defines is unchanged. Empty for an unknown tile id. */ export declare function tileRubricPreamble(record: PageReviewContextRecord, tileId: string): string; /** * Judge every tile in the pack through one pool. Findings keep the tiler * index (`tile`) for compatibility with `CritiqueFinding` and add the pack's * stable `tile_id`. A provider throw on one tile becomes a `high` * `provider-error` finding for that tile; nothing else is affected. */ export declare function judgePageReviewPack(options: JudgePageReviewPackOptions): Promise; /** Strip the in-memory `record` so the result can be written into the pack. */ export declare function toCritiqueRecords(result: JudgePageReviewPackResult): PageReviewCritiqueRecord[]; //# sourceMappingURL=page-review-judge.d.ts.map