/** * Pure visual-diff verdict logic, split out of crawler.ts so it can be unit-tested * without pulling in crawler.ts's full import graph (Playwright, Stagehand, and * transitively @detiq/database, which instantiates a PrismaClient at module load and * so requires a live DATABASE_URL just to import the module). */ export interface VisualDiffVerdict { changeType: 'NONE' | 'MINOR' | 'SIGNIFICANT' | 'CRITICAL'; recommendation: 'APPROVE' | 'REVIEW' | 'FLAG' | 'BLOCK'; changes: Array<{ location: string; severity: string; description: string; }>; bugReportDraft?: { title: string; severity: string; steps: string[]; expected: string; actual: string; }; aiSummary?: string; } /** Cheap, always-on first-pass verdict from perceptual hash distance + layout/element diffs. */ export declare function pHashVerdict(pHashDistance: number, changeLevel: 'IDENTICAL' | 'MINOR' | 'MODERATE' | 'SIGNIFICANT', changes: Array<{ location: string; severity: string; description: string; }>): VisualDiffVerdict; /** Replaces a pHash-only verdict with the AI's semantic judgment once it's available, * and drafts a bug report for anything still CRITICAL/SIGNIFICANT after AI review * (pHash flags plenty of anti-aliasing/font-rendering noise the AI correctly discards * as NONE/MINOR — only what survives AI review is worth a draft). */ export declare function mergeAiVisualVerdict(pHashResult: VisualDiffVerdict, aiResult: { changeType: string; changes: any[]; recommendation: string; diffScore: number; summary?: string; }, screenName: string): VisualDiffVerdict;