UNPKG

vibe-tools

Version:
34 lines (33 loc) 1.31 kB
import type { Browser, Page } from 'playwright'; import { z } from 'zod'; import type { StagehandConfig } from '../../../types/browser/browser'; export declare class StagehandError extends Error { readonly details?: any; constructor(message: string, details?: any); } export declare class ActionError extends StagehandError { constructor(message: string, details?: any); } export declare class ExtractionSchemaError extends StagehandError { constructor(message: string, details?: any); } export declare class ObservationError extends StagehandError { constructor(message: string, details?: any); } export declare class NavigationError extends StagehandError { constructor(message: string, details?: any); } export declare class PlaywrightError extends StagehandError { constructor(message: string, details?: any); } export declare function initializeBrowser(options?: { headless?: boolean; timeout?: number; }): Promise<{ browser: Browser; page: Page; }>; export declare function loadBrowserConfig(): StagehandConfig; export declare function loadSchema(schemaPath: string | object): Promise<z.ZodType<any>>; export declare function formatOutput<T>(result: T, debug?: boolean): string; export declare function handleBrowserError(error: unknown, debug?: boolean): string;