UNPKG

vibe-tools

Version:
63 lines (62 loc) 1.57 kB
import type { z } from 'zod'; export interface Stagehand { act(action: string): Promise<void>; extract<T>(schema: z.ZodType<T>): Promise<T>; observe(): Promise<ObservationResult>; } export interface StagehandConfig { env: 'LOCAL' | 'BROWSERBASE'; headless: boolean; verbose: 0 | 1 | 2; debugDom: boolean; enableCaching: boolean; browserbaseApiKey?: string; browserbaseProjectId?: string; llmProvider?: LLMProvider; openaiApiKey?: string; anthropicApiKey?: string; googleApiKey?: string; } export type LLMProvider = 'openai' | 'anthropic' | 'google'; export interface ActOptions { instruction: string; timeout?: number; retries?: number; } export interface ExtractOptions { timeout?: number; retries?: number; } export interface ObserveOptions { timeout?: number; retries?: number; } export interface ObservationResult { elements: { type: string; description: string; actions: string[]; location: string; }[]; summary: string; } export interface BrowserCommandOptions { url: string; debug?: boolean; saveTo?: string; headless?: boolean; timeout?: number; viewport?: { width: number; height: number; }; } export interface ExtractCommandOptions extends BrowserCommandOptions { schema?: string | object; } export interface ActCommandOptions extends BrowserCommandOptions { instruction: string; } export interface ObserveCommandOptions extends BrowserCommandOptions { instruction?: string; }