import { CheckProvider, CheckProviderConfig } from './check-provider.interface';
import { PRInfo } from '../pr-analyzer';
import { ReviewSummary } from '../reviewer';
import { CustomToolDefinition } from '../types/config';
/**
 * MCP Check Provider Configuration
 */
export interface McpCheckConfig extends CheckProviderConfig {
    /** Transport type: stdio (default), sse (legacy), http (streamable HTTP), or custom (YAML-defined tools) */
    transport?: 'stdio' | 'sse' | 'http' | 'custom';
    /** Command to execute (for stdio transport) */
    command?: string;
    /** Command arguments (for stdio transport) */
    args?: string[];
    /** Environment variables (for stdio transport) */
    env?: Record<string, string>;
    /** Working directory (for stdio transport) */
    workingDirectory?: string;
    /** URL for SSE/HTTP transport */
    url?: string;
    /** HTTP headers (for SSE/HTTP transport) */
    headers?: Record<string, string>;
    /** Session ID for HTTP transport (optional, server may generate one) */
    sessionId?: string;
    /** MCP method/tool to call */
    method: string;
    /** Arguments to pass to the MCP method (supports Liquid templates) */
    methodArgs?: Record<string, unknown>;
    /** Transform template for method arguments (Liquid) */
    argsTransform?: string;
    /** Transform template for output (Liquid) */
    transform?: string;
    /** Transform using JavaScript expressions */
    transform_js?: string;
    /** Timeout in seconds */
    timeout?: number;
}
/**
 * Check provider that calls MCP tools directly
 * Supports stdio, SSE (legacy), Streamable HTTP transports, and custom YAML-defined tools
 */
export declare class McpCheckProvider extends CheckProvider {
    private liquid;
    private sandbox?;
    private customToolExecutor?;
    private isRetryableError;
    private isTimeoutError;
    private getTimeoutSeverity;
    constructor();
    /**
     * Set custom tools for this provider
     */
    setCustomTools(tools: Record<string, CustomToolDefinition>): void;
    /**
     * Create a secure sandbox for JavaScript execution
     * - Uses Sandbox.SAFE_GLOBALS which excludes: Function, eval, require, process, etc.
     * - Only allows explicitly whitelisted prototype methods
     * - No access to filesystem, network, or system resources
     */
    private createSecureSandbox;
    getName(): string;
    getDescription(): string;
    validateConfig(config: unknown): Promise<boolean>;
    execute(prInfo: PRInfo, config: CheckProviderConfig, dependencyResults?: Map<string, ReviewSummary>, sessionInfo?: any): Promise<ReviewSummary>;
    /**
     * Execute an MCP method using the configured transport
     */
    private executeMcpMethod;
    /**
     * Generic method to execute MCP method with any transport
     */
    private executeWithTransport;
    /**
     * Execute MCP method using stdio transport
     */
    private executeStdioMethod;
    /**
     * Execute MCP method using SSE transport
     */
    private executeSseMethod;
    /**
     * Execute MCP method using Streamable HTTP transport
     */
    private executeHttpMethod;
    /**
     * Build output context from dependency results
     */
    private buildOutputContext;
    /**
     * Get safe environment variables
     */
    private getSafeEnvironmentVariables;
    /**
     * Extract issues from MCP output
     */
    private extractIssuesFromOutput;
    private normalizeIssueArray;
    private normalizeIssue;
    getSupportedConfigKeys(): string[];
    isAvailable(): Promise<boolean>;
    getRequirements(): string[];
}
//# sourceMappingURL=mcp-check-provider.d.ts.map