/**
 * Bridge between judge system and Playwright MCP server.
 *
 * Provides a high-level interface for browser automation
 * through the MCP protocol.
 */
import { type McpLogger } from "@superblocksteam/clark";
import type { PlaywrightActionParams, PlaywrightActionResult } from "../types.js";
/**
 * High-level Playwright action parameters.
 */
export interface PlaywrightAction {
    navigate?: {
        url: string;
    };
    click?: {
        selector: string;
    };
    fill?: {
        selector: string;
        value: string;
    };
    screenshot?: {
        fullPage?: boolean;
    };
    getText?: {
        selector: string;
    };
    waitForSelector?: {
        selector: string;
        timeout?: number;
    };
    evaluate?: {
        script: string;
    };
    getUrl?: Record<string, never>;
    reload?: Record<string, never>;
}
/**
 * Bridge to Playwright MCP server for browser automation.
 *
 * Provides a simplified interface for common browser
 * automation tasks used by the judge system.
 */
export declare class PlaywrightBridge {
    private logger;
    private mcpClient;
    constructor(serverUrl: string, logger: McpLogger);
    /**
     * Initializes the bridge connection.
     */
    initialize(): Promise<void>;
    /**
     * Navigates to a URL.
     *
     * @param url - Target URL
     * @returns Navigation result
     */
    navigate(url: string): Promise<PlaywrightActionResult>;
    /**
     * Clicks an element.
     *
     * @param selector - Element selector
     * @returns Click result
     */
    click(selector: string): Promise<PlaywrightActionResult>;
    /**
     * Fills an input field.
     *
     * @param selector - Input selector
     * @param value - Value to fill
     * @returns Fill result
     */
    fill(selector: string, value: string): Promise<PlaywrightActionResult>;
    /**
     * Captures a screenshot.
     *
     * @param fullPage - Whether to capture full page
     * @returns Screenshot result with base64 data
     */
    screenshot(fullPage?: boolean): Promise<PlaywrightActionResult>;
    /**
     * Gets text content from an element.
     *
     * @param selector - Element selector
     * @returns Text content
     */
    getText(selector: string): Promise<PlaywrightActionResult>;
    /**
     * Waits for a selector to appear.
     *
     * @param selector - Element selector
     * @param timeout - Wait timeout in milliseconds
     * @returns Wait result
     */
    waitForSelector(selector: string, timeout?: number): Promise<PlaywrightActionResult>;
    /**
     * Evaluates JavaScript in the page context.
     *
     * @param script - JavaScript to execute
     * @returns Evaluation result
     */
    evaluate(script: string): Promise<PlaywrightActionResult>;
    /**
     * Gets the current page URL.
     *
     * @returns Current URL
     */
    getUrl(): Promise<PlaywrightActionResult>;
    /**
     * Reloads the current page.
     *
     * @returns Reload result
     */
    reload(): Promise<PlaywrightActionResult>;
    /**
     * Executes a generic Playwright action.
     *
     * @param action - Action name
     * @param params - Action parameters
     * @returns Action result
     */
    executeAction(action: PlaywrightActionParams["action"], params: Record<string, any>): Promise<PlaywrightActionResult>;
    /**
     * Executes multiple actions in sequence.
     *
     * @param actions - Array of actions to execute
     * @returns Results of all actions
     */
    executeSequence(actions: PlaywrightAction[]): Promise<PlaywrightActionResult[]>;
    /**
     * Cleans up the bridge connection.
     */
    cleanup(): Promise<void>;
    /**
     * Checks if the bridge is connected.
     *
     * @returns True if connected
     */
    isConnected(): boolean;
}
//# sourceMappingURL=playwright-bridge.d.ts.map