UNPKG

jevrun

Version:

Run natural-language browser tasks on a Playwright page using Jev decisions.

23 lines (22 loc) • 783 B
import type { Page } from "playwright-core"; export interface RunOptions { /** Defaults to TYPESAFE_API_KEY. */ apiKey?: string; /** Defaults to jev-latest. */ model?: string; /** Maximum browser actions; defaults to 10. */ maxSteps?: number; /** Minimum Jev Choice confidence; defaults to 0.7. */ minConfidence?: number; /** Timeout per API request / Playwright operation; defaults to 30,000 ms. */ timeoutMs?: number; } export interface RunResult { status: "completed"; steps: Array<{ action: string; confidence: number; }>; } /** Execute a prompt against a caller-owned page. Throws on uncertainty or failure. */ export declare function run(page: Page, prompt: string, options?: RunOptions): Promise<RunResult>;