import type { z } from 'zod';
import type { AIBrowserAction, AIBrowserAgentConfig } from './ai-browser-agent.types.js';
/**
 * AI Browser Agent for error recovery and data extraction.
 *
 * Uses AIAgentBubble from @bubblelab/bubble-core to analyze screenshots
 * and suggest recovery actions or extract structured data.
 */
export declare class AIBrowserAgent {
    private sessionId;
    private context?;
    private credentials?;
    constructor(config: AIBrowserAgentConfig);
    /**
     * Suggest a recovery action for a failed step.
     *
     * @param task - Description of what the step was trying to accomplish
     * @param error - The error message from the failed step
     * @returns The suggested recovery action
     */
    suggestRecoveryAction(task: string, error: string): Promise<AIBrowserAction>;
    /**
     * Extract structured data from the page using AI vision.
     *
     * @param schema - Zod schema defining the expected data structure
     * @param task - Description of what data to extract
     * @returns The extracted data matching the schema, or null if extraction fails
     */
    extractData<T>(schema: z.ZodType<T>, task: string): Promise<T | null>;
    /**
     * Execute the suggested recovery action on the page.
     *
     * @param action - The action to execute
     * @returns true if the action was executed successfully
     */
    executeAction(action: AIBrowserAction): Promise<boolean>;
    /**
     * Capture a screenshot from the current browser session.
     */
    private captureScreenshot;
    /**
     * Get the current page URL.
     */
    private getCurrentUrl;
    /**
     * Extract interactive elements from the page.
     */
    private extractInteractiveElements;
    /**
     * Call the AI agent with a message and optional screenshot.
     */
    private callAI;
    /**
     * Build the prompt for recovery action suggestion.
     */
    private buildRecoveryPrompt;
    /**
     * Parse the AI response into a typed action.
     */
    private parseRecoveryAction;
    /**
     * Generate a human-readable description of a Zod schema.
     */
    private describeZodSchema;
}
//# sourceMappingURL=ai-browser-agent.d.ts.map