/**
 * MCP (Model Context Protocol) client for Playwright server integration.
 *
 * Handles communication with the Playwright MCP server to enable
 * browser automation capabilities for the judge system.
 */
import type { Logger } from "../../../util/logger.js";
import type { McpToolDefinition, McpClientInterface } from "../../mcp/types.js";
import type { PlaywrightActionParams, PlaywrightActionResult } from "../types.js";
/**
 * MCP client for communicating with Playwright MCP server.
 *
 * Implements the Model Context Protocol to interact with
 * a Playwright automation server for browser testing.
 */
export declare class MCPClient implements McpClientInterface {
    private serverUrl;
    private logger;
    private nextId;
    private connected;
    private tools;
    constructor(serverUrl: string, logger: Logger);
    /**
     * Connects to the MCP server and discovers available tools.
     *
     * @throws Error if connection fails
     */
    connect(): Promise<void>;
    /**
     * Lists available tools from the MCP server.
     *
     * @returns Array of tool definitions
     */
    private listTools;
    /**
     * Calls a tool on the MCP server.
     *
     * @param toolName - Name of the tool to call
     * @param args - Arguments for the tool
     * @returns Tool execution result
     */
    callTool(toolName: string, args: any): Promise<any>;
    /**
     * Executes a Playwright action via MCP.
     *
     * @param params - Playwright action parameters
     * @returns Action execution result
     */
    executePlaywrightAction(params: PlaywrightActionParams): Promise<PlaywrightActionResult>;
    /**
     * Parses SSE (Server-Sent Events) response text.
     *
     * @param text - Raw SSE response text
     * @param requestId - Expected request ID
     * @returns Parsed MCP response
     */
    private parseSSEResponse;
    /**
     * Sends a request to the MCP server.
     *
     * @param method - RPC method name
     * @param params - Method parameters
     * @returns Server response
     */
    private sendRequest;
    /**
     * Disconnects from the MCP server.
     */
    disconnect(): Promise<void>;
    /**
     * Checks if the client is connected.
     *
     * @returns True if connected
     */
    isConnected(): boolean;
    /**
     * Gets available tool names.
     *
     * @returns Array of tool names
     */
    getAvailableTools(): string[];
    /**
     * Gets full tool definitions including schemas.
     *
     * Returns tool definitions with name, description, and inputSchema
     * for use with the MCP adapter.
     *
     * @returns Array of tool definitions with metadata
     */
    getToolDefinitions(): McpToolDefinition[];
}
//# sourceMappingURL=mcp-client.d.ts.map