/** * Jev headless browser delegation. * * A mechanical navigation loop where Jev picks the next action from an enumerated set * of things visible on the page. The loop is always HEADLESS: it never launches a * visible window, never types text the model chose (values come from `inputs` only), * blocks main-frame document navigation outside `allowDomains`, and hands control back when the page * needs judgement (login, captcha, payment, free text). * * Subresources are not confined by this navigation policy. Playwright is loaded lazily. * * @module core/jev/browse */ import { type JevClient } from './client.js'; export interface BrowseOptions { goal: string; url?: string; allowDomains?: string[]; maxSteps?: number; maxMs?: number; minConfidence?: number; inputs?: Record; screenshotDir?: string; allowSensitive?: boolean; projectRoot?: string; client?: JevClient; playwright?: unknown; } export interface BrowseStep { n: number; url: string; action: string; choice: string; confidence: number; apiMs: number; executed: boolean; reason?: string; } export interface BrowseResult { status: 'done' | 'blocked' | 'needs_agent' | 'low_confidence' | 'step_limit' | 'budget' | 'error'; handoff?: string; url: string; title: string; steps: BrowseStep[]; pageText: string; screenshots: string[]; elapsedMs: number; cost: number; error?: string; } /** * Run the headless browse loop. Always resolves — failures come back as * `status: 'error'` so an agent can keep going without a try/catch. */ export declare function runBrowse(opts: BrowseOptions): Promise; //# sourceMappingURL=browse.d.ts.map