/** * Capture Agent — Smart Wait * * Detects if the page is still loading before capture. * Uses Playwright-native checks (no LLM) to wait for: * - Network idle * - No visible spinners/skeletons * - DOM stability */ import type { RuntimeAdapter } from './execution-types.js'; export interface SmartWaitResult { /** Whether the page appears stable */ stable: boolean; /** What we waited for */ waitedFor: string[]; /** Total time spent waiting (ms) */ waitedMs: number; } /** * Waits for the page to be visually stable before capture. * Checks for common loading patterns and waits for them to resolve. * * This runs BEFORE CAPTURE_SCREENSHOT — deterministic, no LLM. */ export declare function smartWaitForStability(adapter: RuntimeAdapter, options?: { maxWaitMs?: number; }): Promise;