/** * Capture Agent — Capture Verification * * Post-capture quality check via LLM vision. * Detects: blank pages, error pages, loading spinners, skeletons, * obstructing overlays, and other visual issues. * * This is the ONLY place where AutoKap uses AI at runtime. * Cost: ~0.002 EUR per check (1 image + short prompt). */ import { type LLMProviderConfig, type LLMCallResult } from './llm-provider.js'; export interface VerificationResult { /** Whether the screenshot is acceptable for delivery */ passed: boolean; /** Issue detected (if failed) */ issue?: 'blank_page' | 'error_page' | 'loading' | 'overlay_blocking' | 'wrong_content' | 'other'; /** Human-readable explanation */ reason: string; /** LLM call metadata */ llmResult?: LLMCallResult; } export interface VerificationContext { /** What was this screenshot supposed to show? */ expectedDescription: string; /** Target URL */ url: string; /** Locale of this variant */ locale?: string; /** Theme of this variant */ theme?: string; } /** * Verifies a captured screenshot is clean and ready for delivery. */ export declare function verifyCaptureQuality(screenshot: Buffer, context: VerificationContext, llmConfig: LLMProviderConfig): Promise;