import type { z } from 'zod'; /** * Options for the AI fallback decorator. */ interface AIFallbackStepOptions { taskDescription?: string; extractionSchema?: z.ZodType; } /** * Lightweight decorator that wraps a method with AI fallback error recovery. * This is the OSS-compatible version of @RecordableStep — no recording, * just AI-powered recovery when selectors/actions fail. * * When the decorated method throws, the decorator: * 1. Creates an AIBrowserAgent with the active session * 2. If extractionSchema is provided: uses AI vision to extract data * 3. Otherwise: asks AI to suggest a recovery action (click, type, scroll, etc.) * 4. Executes the suggested action * 5. For wait/scroll: retries the original method * 6. For click/type/click_coordinates: returns true (action completed) * * @param stepName - Human-readable name for logging * @param options - Task description and optional extraction schema */ export declare function AIFallbackStep(stepName: string, options?: AIFallbackStepOptions): (originalMethod: (this: This, ...args: Args) => Promise, _context: ClassMethodDecoratorContext Promise>) => (this: This, ...args: Args) => Promise; export {}; //# sourceMappingURL=ai-fallback-step.d.ts.map