import * as _modelcontextprotocol_client from '@modelcontextprotocol/client';
import { Client, CallToolResult, ServerCapabilities, RequestOptions, LoggingLevel, ElicitResult } from '@modelcontextprotocol/client';
import { e as MCPClientManagerConfig, p as MCPClientManagerOptions, S as ServerSummary, f as MCPConnectionStatus, M as MCPServerConfig, q as ManagedMcpClient, r as ClientRequestOptions, L as ListToolsResult, s as Tool, A as AiSdkTool, E as ExecuteToolArguments, T as TaskOptions, t as ExecuteToolRequest, u as ListResourcesParams, v as ReadResourceParams, w as SubscribeResourceParams, U as UnsubscribeResourceParams, x as ListResourceTemplatesParams, y as ListPromptsParams, G as GetPromptParams, z as ElicitationHandler, D as ElicitationCallback } from './types-mAgSJ57j.js';
import { AssistantModelMessage, ModelMessage, ToolModelMessage, UserModelMessage, dynamicTool } from 'ai';

/**
 * Core types for SDK evals functionality
 */

type CoreMessage = ModelMessage;
type CoreUserMessage = UserModelMessage;
type CoreAssistantMessage = AssistantModelMessage;
type CoreToolMessage = ToolModelMessage;
/**
 * Built-in LLM providers with native SDK support
 */
type LLMProvider = "anthropic" | "openai" | "azure" | "deepseek" | "google" | "ollama" | "mistral" | "openrouter" | "xai";
/**
 * Compatible API protocols for custom providers
 */
type CompatibleProtocol = "openai-compatible" | "anthropic-compatible";
/**
 * Configuration for a custom provider (user-defined)
 */
interface CustomProvider {
    /** Unique name for this provider (used in model strings, e.g., "groq/llama-3") */
    name: string;
    /** API protocol this provider is compatible with */
    protocol: CompatibleProtocol;
    /** Base URL for the API endpoint */
    baseUrl: string;
    /** List of available model IDs */
    modelIds: string[];
    /** Optional API key (can also be provided at runtime) */
    apiKey?: string;
    /** Environment variable name to read API key from (fallback) */
    apiKeyEnvVar?: string;
    /**
     * Use Chat Completions API (.chat()) instead of default.
     * Required for some OpenAI-compatible providers like LiteLLM.
     * Only applies to openai-compatible protocol.
     */
    useChatCompletions?: boolean;
}
/**
 * Configuration for an LLM
 */
interface LLMConfig {
    provider: LLMProvider;
    model: string;
    apiKey: string;
}
/**
 * Represents a tool call made by the LLM
 */
interface ToolCall {
    toolName: string;
    arguments: Record<any, any>;
}
/**
 * Token usage statistics
 */
interface TokenUsage {
    inputTokens: number;
    outputTokens: number;
    totalTokens: number;
}
/**
 * Latency breakdown for prompt execution
 */
interface LatencyBreakdown {
    /** Total wall-clock time in milliseconds */
    e2eMs: number;
    /** LLM API time in milliseconds */
    llmMs: number;
    /** MCP tool execution time in milliseconds */
    mcpMs: number;
}
/**
 * Raw prompt result data (used internally)
 */
interface PromptResultData {
    /** The original prompt/query that was sent */
    prompt: string;
    /** The full conversation history (user, assistant, tool messages) */
    messages: ModelMessage[];
    text: string;
    toolCalls: ToolCall[];
    usage: TokenUsage;
    latency: LatencyBreakdown;
    error?: string;
    /** LLM provider name (e.g., "openai", "anthropic") */
    provider?: string;
    /** LLM model name (e.g., "gpt-4o", "claude-3-5-sonnet-20241022") */
    model?: string;
    /** Persisted widget snapshots captured during MCP App tool execution */
    widgetSnapshots?: EvalWidgetSnapshotInput[];
    /** Timeline spans for eval trace visualization (relative to prompt start) */
    spans?: EvalTraceSpanInput[];
}

/**
 * Eval tool-call matchers.
 *
 * This module is browser-safe and intentionally has no node-only deps so
 * it can be imported into client bundles via `@mcpjam/sdk/matchers`.
 *
 * `evaluateToolCalls` is a richer, configurable replacement for the
 * existing `matchToolCalls(expected: string[], actual: string[]): boolean`
 * in `./validators`. The simple boolean API in `./validators` stays
 * unchanged for SDK consumers that already depend on it.
 */

type EvalToolCall = ToolCall;
type EvalArgumentMismatch = {
    toolName: string;
    expectedArgs: Record<string, unknown>;
    actualArgs: Record<string, unknown>;
};
type EvalOutOfOrderToolCall = {
    toolName: string;
    expectedIndex: number;
    actualIndex: number;
};
type EvalMatchOptions = {
    /**
     * Trajectory pairing mode for actual vs. expected tool calls.
     *
     * `"ignore"` (default) — order-agnostic greedy pairing: for each expected
     * call in iteration order, the matcher consumes the earliest still-unmatched
     * actual call whose tool name + arguments are compatible. Out-of-order
     * pairings are never flagged.
     *
     * `"strict"` — index-aligned positional match. expected[i] is paired with
     * actual[i] if compatible; otherwise expected[i] is missing. Any extras
     * (j ≥ |expected| or mismatched at index j) are unconsumed actuals.
     *
     * `"superset"` — greedy left-to-right consume. The cursor walks forward
     * through actual once; for each expected call in iteration order, the
     * matcher advances the cursor until it finds a compatible actual call.
     * Useful for "the agent must perform these steps in order, but extra
     * unrelated steps interleaved are fine."
     */
    toolCallOrder?: "ignore" | "strict" | "superset";
    /**
     * Bound on extra actual tool calls beyond what was paired with expected.
     *
     * `null` (default) — extras allowed without bound (previous
     * `allowExtraToolCalls: true` behavior).
     *
     * `0` — strict, no extras allowed (previous `allowExtraToolCalls: false`).
     *
     * `N > 0` (must be a non-negative integer) — up to N extras allowed.
     *
     * Evaluated **independently** of `toolCallOrder`: extras = |actual| − |matched|.
     */
    maxExtraToolCalls?: number | null;
    /**
     * LEGACY: prefer `maxExtraToolCalls`. When present without
     * `maxExtraToolCalls`, the matcher entry shims `true → null`, `false → 0`.
     * Remove after v<NEXT_MINOR>.
     */
    allowExtraToolCalls?: boolean;
    /**
     * `"partial"` (default) — only expected keys are checked; actual may
     * carry extra keys; empty expected args match anything; placeholder
     * strings like `"string"`, `"number"`, `"any"` are interpreted as type
     * checks (matches current inspector behavior).
     *
     * `"exact"` — deep equality on the args object; no extras allowed; no
     * placeholders.
     *
     * `"ignore"` — args are not compared.
     */
    argumentMatching?: "exact" | "partial" | "ignore";
};
type EvalToolCallMatchResult = {
    missing: EvalToolCall[];
    extra: EvalToolCall[];
    outOfOrder: EvalOutOfOrderToolCall[];
    argumentMismatches: EvalArgumentMismatch[];
    passed: boolean;
};
/**
 * Canonical defaults for {@link EvalMatchOptions}. Exported so the
 * inspector server, client, and tests share a single source of truth
 * with `evaluateToolCalls` instead of redefining the same literals.
 *
 * `maxExtraToolCalls: null` preserves the previous `allowExtraToolCalls: true`
 * behavior: extras are reported in `extra[]` but never fail the test by
 * themselves.
 */
declare const MATCH_OPTIONS_DEFAULTS: Required<Omit<EvalMatchOptions, "allowExtraToolCalls">>;
/**
 * Merge match options from suite → case → run-override layers on top of
 * defaults. `undefined` fields inherit from the next layer; explicit
 * values win at their layer. Returns a fully-populated options object
 * suitable to snapshot or pass directly to `evaluateToolCalls`.
 *
 * Legacy `allowExtraToolCalls` on any layer is shimmed to
 * `maxExtraToolCalls` (`true → null`, `false → 0`). An explicit
 * `maxExtraToolCalls` on the same layer wins.
 */
declare function resolveMatchOptions(suite?: EvalMatchOptions, testCase?: EvalMatchOptions, runOverride?: EvalMatchOptions): Required<Omit<EvalMatchOptions, "allowExtraToolCalls">>;
/**
 * Evaluate actual tool calls against expected.
 *
 * Defaults preserve today's inspector behavior precisely:
 *   - `toolCallOrder: "ignore"` (order does not matter)
 *   - `maxExtraToolCalls: null` (extras reported but non-fatal)
 *   - `argumentMatching: "partial"` (placeholders, empty-expected matches
 *     anything, extras allowed on actual args)
 *
 * Pass `isNegativeTest: true` to flip the test: it then passes iff *no*
 * tool calls were made.
 */
declare function evaluateToolCalls(expected: EvalToolCall[], actual: EvalToolCall[], options?: EvalMatchOptions & {
    isNegativeTest?: boolean;
}): EvalToolCallMatchResult;

type EvalExpectedToolCall = {
    toolName: string;
    arguments?: Record<string, unknown>;
};
type EvalCiMetadata = {
    provider?: string;
    pipelineId?: string;
    jobId?: string;
    runUrl?: string;
    branch?: string;
    commitSha?: string;
};
type EvalTraceSpanCategory = "step" | "llm" | "tool" | "error";
type EvalTraceSpanStatus = "ok" | "error";
type EvalTraceSpanInput = {
    id: string;
    parentId?: string;
    name: string;
    category: EvalTraceSpanCategory;
    startMs: number;
    endMs: number;
    promptIndex?: number;
    stepIndex?: number;
    status?: EvalTraceSpanStatus;
    toolCallId?: string;
    toolName?: string;
    serverId?: string;
    modelId?: string;
    inputTokens?: number;
    outputTokens?: number;
    totalTokens?: number;
    messageStartIndex?: number;
    messageEndIndex?: number;
};
type EvalTraceInput = string | Array<{
    role: string;
    content: unknown;
}> | {
    messages?: Array<{
        role: string;
        content: unknown;
    }>;
    spans?: EvalTraceSpanInput[];
    prompts?: unknown[];
    raw?: unknown;
};
type EvalWidgetCsp = {
    connectDomains?: string[];
    resourceDomains?: string[];
    frameDomains?: string[];
    baseUriDomains?: string[];
};
type EvalWidgetPermissions = {
    camera?: Record<string, never>;
    microphone?: Record<string, never>;
    geolocation?: Record<string, never>;
    clipboardWrite?: Record<string, never>;
};
type EvalWidgetSnapshotInput = {
    toolCallId: string;
    toolName: string;
    protocol: "mcp-apps";
    serverId: string;
    resourceUri: string;
    toolMetadata: Record<string, unknown>;
    widgetCsp: EvalWidgetCsp | null;
    widgetPermissions: EvalWidgetPermissions | null;
    widgetPermissive: boolean;
    prefersBorder: boolean;
    widgetHtml?: string;
    widgetHtmlBlobId?: string;
    injectedOpenAiCompat?: boolean;
};
type EvalResultInput = {
    caseTitle: string;
    query?: string;
    passed: boolean;
    durationMs?: number;
    provider?: string;
    model?: string;
    expectedToolCalls?: EvalExpectedToolCall[];
    actualToolCalls?: EvalExpectedToolCall[];
    tokens?: {
        input?: number;
        output?: number;
        total?: number;
    };
    error?: string;
    errorDetails?: string;
    trace?: EvalTraceInput;
    externalIterationId?: string;
    externalCaseId?: string;
    metadata?: Record<string, string | number | boolean>;
    isNegativeTest?: boolean;
    advancedConfig?: Record<string, unknown>;
    widgetSnapshots?: EvalWidgetSnapshotInput[];
    /**
     * Per-result match options. When present, the inspector snapshots
     * these onto the appended iteration's `testCaseSnapshot.matchOptions`
     * so historical pass/fail computation honors them.
     */
    matchOptions?: EvalMatchOptions;
};
type MCPServerReplayConfig = {
    serverId: string;
    url: string;
    preferSSE?: boolean;
    accessToken?: string;
    refreshToken?: string;
    clientId?: string;
    clientSecret?: string;
};
type MCPJamReportingConfig = {
    enabled?: boolean;
    apiKey?: string;
    baseUrl?: string;
    serverNames?: string[];
    serverReplayConfigs?: MCPServerReplayConfig[];
    suiteName?: string;
    suiteDescription?: string;
    notes?: string;
    passCriteria?: {
        minimumPassRate: number;
    };
    strict?: boolean;
    /**
     * When not `false`, auto-reported results fail if the trace shows tool
     * execution errors. Default: strict tool outcomes (equivalent to `true`).
     */
    failOnToolError?: boolean;
    externalRunId?: string;
    framework?: string;
    ci?: EvalCiMetadata;
    expectedIterations?: number;
    tags?: string[];
};
type ReportEvalResultsInput = MCPJamReportingConfig & {
    suiteName: string;
    results: EvalResultInput[];
    agent?: {
        getServerReplayConfigs?: () => MCPServerReplayConfig[] | undefined;
    };
    mcpClientManager?: MCPClientManager;
};
type ReportEvalResultsOutput = {
    suiteId: string;
    runId: string;
    status: "completed" | "failed";
    result: "passed" | "failed";
    summary: {
        total: number;
        passed: number;
        failed: number;
        passRate: number;
    };
};

/**
 * Notification handler management for MCPClientManager
 */

type NotificationMethodName = Parameters<Client["setNotificationHandler"]>[0];
type NotificationHandler = Parameters<Client["setNotificationHandler"]>[1];

/**
 * Tool conversion utilities for integrating MCP tools with Vercel AI SDK
 */

/**
 * Input schema type for tool definitions
 */
type ToolInputSchema = Parameters<typeof dynamicTool>[0]["inputSchema"];
/**
 * Schema overrides for specific tools
 * Maps tool name to custom input schema definition
 */
type ToolSchemaOverrides = Record<string, {
    inputSchema: ToolInputSchema;
}>;
/**
 * Checks whether a tool is an MCP App by inspecting its _meta for a UI resource URI.
 *
 * @param toolMeta - The tool's _meta field from listTools result
 * @returns true if the tool is an MCP App
 */
declare function isMcpAppTool(toolMeta: Record<string, unknown> | undefined): boolean;
/**
 * Checks whether a tool is a ChatGPT App by inspecting its _meta for an output template.
 *
 * @param toolMeta - The tool's _meta field from listTools result
 * @returns true if the tool is a ChatGPT App
 */
declare function isChatGPTAppTool(toolMeta: Record<string, unknown> | undefined): boolean;
/**
 * Removes only the _meta field from a tool result (shallow copy).
 *
 * @param result - The full tool call result
 * @returns A shallow copy of the result without _meta
 */
declare function scrubMetaFromToolResult(result: CallToolResult): CallToolResult;
/**
 * Returns a shallow copy of a CallToolResult with _meta and structuredContent removed.
 *
 * @param result - The full tool call result
 * @returns A scrubbed shallow copy without _meta and structuredContent
 */
declare function scrubMetaAndStructuredContentFromToolResult(result: CallToolResult): CallToolResult;

/**
 * Manages multiple MCP server connections with support for tools, resources,
 * prompts, notifications, elicitation, and tasks.
 *
 * @example
 * ```typescript
 * const manager = new MCPClientManager({
 *   everything: {
 *     command: "npx",
 *     args: ["-y", "@modelcontextprotocol/server-everything"],
 *   },
 *   myServer: {
 *     url: "https://my-server.com/mcp",
 *     accessToken: "my-token",
 *   },
 * });
 *
 * const tools = await manager.listTools("everything");
 * const result = await manager.executeTool("everything", "add", { a: 1, b: 2 });
 * ```
 */
declare class MCPClientManager {
    private readonly registeredServers;
    private readonly liveClientStates;
    private readonly toolsMetadataCache;
    private readonly retryAbortControllers;
    private readonly unauthorizedRefreshInFlight;
    private readonly notificationManager;
    private readonly elicitationManager;
    private readonly defaultClientName;
    private readonly defaultClientVersion;
    /**
     * Extra `clientInfo` fields (e.g. `title`) merged into the per-connection
     * `clientInfo` object alongside name/version. Per-server `clientInfo`
     * overrides individual keys. Lets the inspector pass forward-compat MCP
     * spec additions (the `title` field, future fields) without an SDK bump.
     */
    private readonly defaultClientInfoExtras;
    /**
     * Default supported protocol versions accept-list. Forwarded to the
     * upstream Client as `ClientOptions.supportedProtocolVersions`. Per-
     * server `supportedProtocolVersions` overrides this. Undefined here
     * preserves historical behavior (upstream Client's built-in
     * `SUPPORTED_PROTOCOL_VERSIONS` default).
     */
    private readonly defaultSupportedProtocolVersions;
    private readonly defaultCapabilities;
    private readonly defaultTimeout;
    private readonly defaultLogJsonRpc;
    private readonly defaultRpcLogger?;
    private readonly defaultProgressHandler?;
    private readonly defaultRetryPolicy;
    private readonly lazyConnect;
    private progressTokenCounter;
    /**
     * Creates a new MCPClientManager.
     *
     * @param servers - Configuration map of server IDs to server configs
     * @param options - Global options for the manager
     */
    constructor(servers?: MCPClientManagerConfig, options?: MCPClientManagerOptions);
    /**
     * Lists all registered server IDs.
     */
    listServers(): string[];
    /**
     * Checks if a server is registered.
     */
    hasServer(serverId: string): boolean;
    /**
     * Gets summaries for all registered servers.
     */
    getServerSummaries(): ServerSummary[];
    /**
     * Gets replayable HTTP server configs for eval reporting.
     */
    getServerReplayConfigs(): MCPServerReplayConfig[];
    /**
     * Gets the connection status for a server.
     */
    getConnectionStatus(serverId: string): MCPConnectionStatus;
    /**
     * Gets the configuration for a server.
     */
    getServerConfig(serverId: string): MCPServerConfig | undefined;
    /**
     * Gets the capabilities reported by a server.
     */
    getServerCapabilities(serverId: string): ServerCapabilities | undefined;
    /**
     * Gets the underlying upstream MCP `Client` for a server. Returns the
     * legacy adapter's wrapped `Client` instance, or `undefined` for
     * stateless-preview connections (which have no upstream `Client`).
     *
     * **Deprecated for new code** — prefer `getManagedClient()`. Kept
     * because external SDK consumers reference this API; retyping it
     * would be a breaking change.
     */
    getClient(serverId: string): Client | undefined;
    /**
     * Gets the `ManagedMcpClient` for a server — works for both the legacy
     * adapter and the 2026-07-28 stateless preview. Use this in new
     * code instead of `getClient()`.
     */
    getManagedClient(serverId: string): ManagedMcpClient | undefined;
    /**
     * Gets initialization information for a connected server.
     */
    getInitializationInfo(serverId: string): {
        protocolVersion: string | undefined;
        transport: string;
        serverCapabilities: {
            experimental?: {
                [x: string]: {
                    [x: string]: string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | /*elided*/ any | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null;
                };
            } | undefined;
            logging?: {
                [x: string]: string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | /*elided*/ any | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null;
            } | undefined;
            completions?: {
                [x: string]: string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | /*elided*/ any | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null;
            } | undefined;
            prompts?: {
                listChanged?: boolean | undefined;
            } | undefined;
            resources?: {
                subscribe?: boolean | undefined;
                listChanged?: boolean | undefined;
            } | undefined;
            tools?: {
                listChanged?: boolean | undefined;
            } | undefined;
            tasks?: {
                [x: string]: unknown;
                list?: {
                    [x: string]: string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | /*elided*/ any | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null;
                } | undefined;
                cancel?: {
                    [x: string]: string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | /*elided*/ any | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null;
                } | undefined;
                requests?: {
                    [x: string]: unknown;
                    tools?: {
                        [x: string]: unknown;
                        call?: {
                            [x: string]: string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | /*elided*/ any | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null;
                        } | undefined;
                    } | undefined;
                } | undefined;
            } | undefined;
            extensions?: {
                [x: string]: {
                    [x: string]: string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | /*elided*/ any | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null;
                };
            } | undefined;
        } | undefined;
        serverVersion: {
            version: string;
            name: string;
            websiteUrl?: string | undefined;
            description?: string | undefined;
            icons?: {
                src: string;
                mimeType?: string | undefined;
                sizes?: string[] | undefined;
                theme?: "light" | "dark" | undefined;
            }[] | undefined;
            title?: string | undefined;
        } | undefined;
        instructions: string | undefined;
        clientCapabilities: Omit<{
            experimental?: {
                [x: string]: {
                    [x: string]: string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | /*elided*/ any | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null;
                };
            } | undefined;
            sampling?: {
                context?: {
                    [x: string]: string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | /*elided*/ any | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null;
                } | undefined;
                tools?: {
                    [x: string]: string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | /*elided*/ any | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null;
                } | undefined;
            } | undefined;
            elicitation?: {
                [x: string]: string | number | boolean | {
                    [x: string]: string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | /*elided*/ any | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null;
                } | (string | number | boolean | {
                    [x: string]: string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | /*elided*/ any | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null;
                } | (string | number | boolean | {
                    [x: string]: string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | /*elided*/ any | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null;
                } | (string | number | boolean | {
                    [x: string]: string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | /*elided*/ any | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null;
                } | (string | number | boolean | {
                    [x: string]: string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | /*elided*/ any | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null;
                } | (string | number | boolean | {
                    [x: string]: string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | /*elided*/ any | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null;
                } | (string | number | boolean | {
                    [x: string]: string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | /*elided*/ any | null)[] | null)[] | null)[] | null)[] | null)[] | null;
                } | (string | number | boolean | {
                    [x: string]: string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | /*elided*/ any | null)[] | null)[] | null)[] | null)[] | null;
                } | (string | number | boolean | {
                    [x: string]: string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | /*elided*/ any | null)[] | null)[] | null)[] | null;
                } | (string | number | boolean | {
                    [x: string]: string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | /*elided*/ any | null)[] | null)[] | null;
                } | (string | number | boolean | {
                    [x: string]: string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | /*elided*/ any | null)[] | null;
                } | (string | number | boolean | {
                    [x: string]: string | number | boolean | /*elided*/ any | /*elided*/ any | null;
                } | /*elided*/ any | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null;
                form?: {
                    [x: string]: string | number | boolean | {
                        [x: string]: string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | /*elided*/ any | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null;
                    } | (string | number | boolean | {
                        [x: string]: string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | /*elided*/ any | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null;
                    } | (string | number | boolean | {
                        [x: string]: string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | /*elided*/ any | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null;
                    } | (string | number | boolean | {
                        [x: string]: string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | /*elided*/ any | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null;
                    } | (string | number | boolean | {
                        [x: string]: string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | /*elided*/ any | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null;
                    } | (string | number | boolean | {
                        [x: string]: string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | /*elided*/ any | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null;
                    } | (string | number | boolean | {
                        [x: string]: string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | /*elided*/ any | null)[] | null)[] | null)[] | null)[] | null)[] | null;
                    } | (string | number | boolean | {
                        [x: string]: string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | /*elided*/ any | null)[] | null)[] | null)[] | null)[] | null;
                    } | (string | number | boolean | {
                        [x: string]: string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | /*elided*/ any | null)[] | null)[] | null)[] | null;
                    } | (string | number | boolean | {
                        [x: string]: string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | /*elided*/ any | null)[] | null)[] | null;
                    } | (string | number | boolean | {
                        [x: string]: string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | /*elided*/ any | null)[] | null;
                    } | (string | number | boolean | {
                        [x: string]: string | number | boolean | /*elided*/ any | /*elided*/ any | null;
                    } | /*elided*/ any | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null;
                    applyDefaults?: boolean | undefined;
                } | undefined;
                url?: {
                    [x: string]: string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | /*elided*/ any | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null;
                } | undefined;
            } | undefined;
            roots?: {
                listChanged?: boolean | undefined;
            } | undefined;
            tasks?: {
                [x: string]: unknown;
                list?: {
                    [x: string]: string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | /*elided*/ any | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null;
                } | undefined;
                cancel?: {
                    [x: string]: string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | /*elided*/ any | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null;
                } | undefined;
                requests?: {
                    [x: string]: unknown;
                    sampling?: {
                        [x: string]: unknown;
                        createMessage?: {
                            [x: string]: string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | /*elided*/ any | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null;
                        } | undefined;
                    } | undefined;
                    elicitation?: {
                        [x: string]: unknown;
                        create?: {
                            [x: string]: string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | /*elided*/ any | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null;
                        } | undefined;
                    } | undefined;
                } | undefined;
            } | undefined;
            extensions?: {
                [x: string]: {
                    [x: string]: string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | /*elided*/ any | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null;
                };
            } | undefined;
        }, "tasks"> & {
            tasks?: {
                [x: string]: unknown;
                list?: {
                    [x: string]: string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | /*elided*/ any | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null;
                } | undefined;
                cancel?: {
                    [x: string]: string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | /*elided*/ any | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null;
                } | undefined;
                requests?: {
                    [x: string]: unknown;
                    sampling?: {
                        [x: string]: unknown;
                        createMessage?: {
                            [x: string]: string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | /*elided*/ any | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null;
                        } | undefined;
                    } | undefined;
                    elicitation?: {
                        [x: string]: unknown;
                        create?: {
                            [x: string]: string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | /*elided*/ any | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null;
                        } | undefined;
                    } | undefined;
                } | undefined;
            } & _modelcontextprotocol_client.TaskManagerOptions;
        };
    } | undefined;
    /**
     * Connects to an MCP server.
     *
     * @param serverId - Unique identifier for the server
     * @param config - Server configuration
     * @returns The connected MCP Client
     */
    connectToServer(serverId: string, config: MCPServerConfig): Promise<ManagedMcpClient>;
    /**
     * Disconnects from a server.
     */
    disconnectServer(serverId: string): Promise<void>;
    /**
     * Removes a server from the manager entirely.
     */
    removeServer(serverId: string): Promise<void>;
    /**
     * Disconnects from all servers.
     */
    disconnectAllServers(): Promise<void>;
    /**
     * Lists tools available from a server.
     */
    listTools(serverId: string, params?: Parameters<Client["listTools"]>[0], options?: ClientRequestOptions): Promise<ListToolsResult>;
    /**
     * Gets tools from multiple servers (or all servers if none specified).
     * Returns tools with execute functions pre-wired to call this manager.
     *
     * @param serverIds - Server IDs to get tools from (or all if omitted)
     * @returns Array of executable tools
     *
     * @example
     * ```typescript
     * const tools = await manager.getTools(["asana"]);
     * const agent = new TestAgent({ tools, model: "openai/gpt-4o", apiKey });
     * ```
     */
    getTools(serverIds?: string[]): Promise<Tool[]>;
    /**
     * Gets cached tool metadata for a server.
     */
    getAllToolsMetadata(serverId: string): Record<string, Record<string, any>>;
    /**
     * Gets cached metadata for a specific tool.
     * Metadata is populated when tools are listed via listTools()/getTools()/getToolsForAiSdk().
     */
    getToolMetadata(serverId: string, toolName: string): Record<string, unknown> | undefined;
    /**
     * Gets tools formatted for Vercel AI SDK.
     *
     * @param serverIds - Server IDs to get tools from (or all if omitted)
     * @param options - Schema options
     * @returns AiSdkTool compatible with Vercel AI SDK's generateText()
     */
    getToolsForAiSdk(serverIds?: string[] | string, options?: {
        schemas?: ToolSchemaOverrides | "automatic";
        needsApproval?: boolean;
        /**
         * When true, include SEP-1865 app-only tools (`_meta.ui.visibility = ["app"]`)
         * in the returned tool set. Defaults to `false` (spec-compliant: app-only
         * tools are hidden from the model). Use this only when intentionally
         * mirroring a host that does not implement visibility filtering.
         */
        includeAppOnly?: boolean;
    }): Promise<AiSdkTool>;
    /**
     * Executes a tool on a server.
     *
     * @param serverId - The server ID
     * @param toolName - The tool name
     * @param args - Tool arguments
     * @param options - Request options
     * @param taskOptions - Task options for async execution
     */
    executeTool(serverId: string, toolName: string, args?: ExecuteToolArguments, options?: ClientRequestOptions, taskOptions?: TaskOptions): Promise<CallToolResult | Record<string, unknown>>;
    executeTool(serverId: string, toolName: string, args: ExecuteToolArguments | undefined, options: ExecuteToolRequest): Promise<CallToolResult | Record<string, unknown>>;
    /**
     * Lists resources available from a server.
     */
    listResources(serverId: string, params?: ListResourcesParams, options?: ClientRequestOptions): Promise<{
        [x: string]: unknown;
        resources: {
            uri: string;
            name: string;
            description?: string | undefined;
            mimeType?: string | undefined;
            size?: number | undefined;
            annotations?: {
                audience?: ("user" | "assistant")[] | undefined;
                priority?: number | undefined;
                lastModified?: string | undefined;
            } | undefined;
            _meta?: {
                [x: string]: unknown;
            } | undefined;
            icons?: {
                src: string;
                mimeType?: string | undefined;
                sizes?: string[] | undefined;
                theme?: "light" | "dark" | undefined;
            }[] | undefined;
            title?: string | undefined;
        }[];
        _meta?: {
            [x: string]: unknown;
            progressToken?: string | number | undefined;
            "io.modelcontextprotocol/related-task"?: {
                taskId: string;
            } | undefined;
        } | undefined;
        nextCursor?: string | undefined;
    }>;
    /**
     * Reads a resource from a server.
     */
    readResource(serverId: string, params: ReadResourceParams, options?: ClientRequestOptions): Promise<{
        [x: string]: unknown;
        contents: ({
            uri: string;
            text: string;
            mimeType?: string | undefined;
            _meta?: {
                [x: string]: unknown;
            } | undefined;
        } | {
            uri: string;
            blob: string;
            mimeType?: string | undefined;
            _meta?: {
                [x: string]: unknown;
            } | undefined;
        })[];
        _meta?: {
            [x: string]: unknown;
            progressToken?: string | number | undefined;
            "io.modelcontextprotocol/related-task"?: {
                taskId: string;
            } | undefined;
        } | undefined;
    }>;
    /**
     * Subscribes to resource updates.
     */
    subscribeResource(serverId: string, params: SubscribeResourceParams, options?: ClientRequestOptions): Promise<{
        _meta?: {
            [x: string]: unknown;
            progressToken?: string | number | undefined;
            "io.modelcontextprotocol/related-task"?: {
                taskId: string;
            } | undefined;
        } | undefined;
    }>;
    /**
     * Unsubscribes from resource updates.
     */
    unsubscribeResource(serverId: string, params: UnsubscribeResourceParams, options?: ClientRequestOptions): Promise<{
        _meta?: {
            [x: string]: unknown;
            progressToken?: string | number | undefined;
            "io.modelcontextprotocol/related-task"?: {
                taskId: string;
            } | undefined;
        } | undefined;
    }>;
    /**
     * Lists resource templates from a server.
     */
    listResourceTemplates(serverId: string, params?: ListResourceTemplatesParams, options?: ClientRequestOptions): Promise<{
        [x: string]: unknown;
        resourceTemplates: {
            uriTemplate: string;
            name: string;
            description?: string | undefined;
            mimeType?: string | undefined;
            annotations?: {
                audience?: ("user" | "assistant")[] | undefined;
                priority?: number | undefined;
                lastModified?: string | undefined;
            } | undefined;
            _meta?: {
                [x: string]: unknown;
            } | undefined;
            icons?: {
                src: string;
                mimeType?: string | undefined;
                sizes?: string[] | undefined;
                theme?: "light" | "dark" | undefined;
            }[] | undefined;
            title?: string | undefined;
        }[];
        _meta?: {
            [x: string]: unknown;
            progressToken?: string | number | undefined;
            "io.modelcontextprotocol/related-task"?: {
                taskId: string;
            } | undefined;
        } | undefined;
        nextCursor?: string | undefined;
    }>;
    /**
     * Lists prompts available from a server.
     */
    listPrompts(serverId: string, params?: ListPromptsParams, options?: ClientRequestOptions): Promise<{
        [x: string]: unknown;
        prompts: {
            name: string;
            description?: string | undefined;
            arguments?: {
                name: string;
                description?: string | undefined;
                required?: boolean | undefined;
            }[] | undefined;
            _meta?: {
                [x: string]: unknown;
            } | undefined;
            icons?: {
                src: string;
                mimeType?: string | undefined;
                sizes?: string[] | undefined;
                theme?: "light" | "dark" | undefined;
            }[] | undefined;
            title?: string | undefined;
        }[];
        _meta?: {
            [x: string]: unknown;
            progressToken?: string | number | undefined;
            "io.modelcontextprotocol/related-task"?: {
                taskId: string;
            } | undefined;
        } | undefined;
        nextCursor?: string | undefined;
    }>;
    /**
     * Gets a prompt from a server.
     */
    getPrompt(serverId: string, params: GetPromptParams, options?: ClientRequestOptions): Promise<{
        [x: string]: unknown;
        messages: {
            role: "user" | "assistant";
            content: {
                type: "text";
                text: string;
                annotations?: {
                    audience?: ("user" | "assistant")[] | undefined;
                    priority?: number | undefined;
                    lastModified?: string | undefined;
                } | undefined;
                _meta?: {
                    [x: string]: unknown;
                } | undefined;
            } | {
                type: "image";
                data: string;
                mimeType: string;
                annotations?: {
                    audience?: ("user" | "assistant")[] | undefined;
                    priority?: number | undefined;
                    lastModified?: string | undefined;
                } | undefined;
                _meta?: {
                    [x: string]: unknown;
                } | undefined;
            } | {
                type: "audio";
                data: string;
                mimeType: string;
                annotations?: {
                    audience?: ("user" | "assistant")[] | undefined;
                    priority?: number | undefined;
                    lastModified?: string | undefined;
                } | undefined;
                _meta?: {
                    [x: string]: unknown;
                } | undefined;
            } | {
                uri: string;
                name: string;
                type: "resource_link";
                description?: string | undefined;
                mimeType?: string | undefined;
                size?: number | undefined;
                annotations?: {
                    audience?: ("user" | "assistant")[] | undefined;
                    priority?: number | undefined;
                    lastModified?: string | undefined;
                } | undefined;
                _meta?: {
                    [x: string]: unknown;
                } | undefined;
                icons?: {
                    src: string;
                    mimeType?: string | undefined;
                    sizes?: string[] | undefined;
                    theme?: "light" | "dark" | undefined;
                }[] | undefined;
                title?: string | undefined;
            } | {
                type: "resource";
                resource: {
                    uri: string;
                    text: string;
                    mimeType?: string | undefined;
                    _meta?: {
                        [x: string]: unknown;
                    } | undefined;
                } | {
                    uri: string;
                    blob: string;
                    mimeType?: string | undefined;
                    _meta?: {
                        [x: string]: unknown;
                    } | undefined;
                };
                annotations?: {
                    audience?: ("user" | "assistant")[] | undefined;
                    priority?: number | undefined;
                    lastModified?: string | undefined;
                } | undefined;
                _meta?: {
                    [x: string]: unknown;
                } | undefined;
            };
        }[];
        _meta?: {
            [x: string]: unknown;
            progressToken?: string | number | undefined;
            "io.modelcontextprotocol/related-task"?: {
                taskId: string;
            } | undefined;
        } | undefined;
        description?: string | undefined;
    }>;
    /**
     * Pings a server to check connectivity.
     */
    pingServer(serverId: string, options?: RequestOptions): Promise<Awaited<ReturnType<Client["ping"]>>>;
    /**
     * Sets the logging level for a server.
     */
    setLoggingLevel(serverId: string, level?: LoggingLevel): Promise<void>;
    /**
     * Gets the session ID for a Streamable HTTP server.
     */
    getSessionIdByServer(serverId: string): string | undefined;
    /**
     * Adds a notification handler for a server.
     */
    addNotificationHandler(serverId: string, method: NotificationMethodName, handler: NotificationHandler): void;
    /**
     * Registers a handler for resource list changes.
     */
    onResourceListChanged(serverId: string, handler: NotificationHandler): void;
    /**
     * Registers a handler for resource updates.
     */
    onResourceUpdated(serverId: string, handler: NotificationHandler): void;
    /**
     * Registers a handler for prompt list changes.
     */
    onPromptListChanged(serverId: string, handler: NotificationHandler): void;
    /**
     * Registers a handler for task status changes.
     */
    onTaskStatusChanged(serverId: string, handler: NotificationHandler): void;
    /**
     * Sets a server-specific elicitation handler.
     */
    setElicitationHandler(serverId: string, handler: ElicitationHandler): void;
    /**
     * Clears a server-specific elicitation handler.
     */
    clearElicitationHandler(serverId: string): void;
    /**
     * Sets a global elicitation callback for all servers.
     */
    setElicitationCallback(callback: ElicitationCallback): void;
    /**
     * Clears the global elicitation callback.
     */
    clearElicitationCallback(): void;
    /**
     * Gets the pending elicitations map for external resolvers.
     */
    getPendingElicitations(): Map<string, {
        resolve: (value: ElicitResult) => void;
        reject: (error: unknown) => void;
    }>;
    /**
     * Responds to a pending elicitation.
     */
    respondToElicitation(requestId: string, response: ElicitResult): boolean;
    /**
     * Lists tasks from a server.
     */
    listTasks(serverId: string, cursor?: string, options?: ClientRequestOptions): Promise<{
        [x: string]: unknown;
        tasks: {
            taskId: string;
            status: "working" | "input_required" | "completed" | "failed" | "cancelled";
            ttl: number | null;
            createdAt: string;
            lastUpdatedAt: string;
            pollInterval?: number | undefined;
            statusMessage?: string | undefined;
        }[];
        _meta?: {
            [x: string]: unknown;
            progressToken?: string | number | undefined;
            "io.modelcontextprotocol/related-task"?: {
                taskId: string;
            } | undefined;
        } | undefined;
        nextCursor?: string | undefined;
    }>;
    /**
     * Gets a task by ID.
     */
    getTask(serverId: string, taskId: string, options?: ClientRequestOptions): Promise<{
        taskId: string;
        status: "working" | "input_required" | "completed" | "failed" | "cancelled";
        ttl: number | null;
        createdAt: string;
        lastUpdatedAt: string;
        pollInterval?: number | undefined;
        statusMessage?: string | undefined;
    }>;
    /**
     * Gets the result of a completed task.
     */
    getTaskResult(serverId: string, taskId: string, options?: ClientRequestOptions): Promise<unknown>;
    /**
     * Cancels a task.
     */
    cancelTask(serverId: string, taskId: string, options?: ClientRequestOptions): Promise<{
        taskId: string;
        status: "working" | "input_required" | "completed" | "failed" | "cancelled";
        ttl: number | null;
        createdAt: string;
        lastUpdatedAt: string;
        pollInterval?: number | undefined;
        statusMessage?: string | undefined;
    }>;
    /**
     * Checks if server supports task-augmented tool calls.
     */
    supportsTasksForToolCalls(serverId: string): boolean;
    /**
     * Checks if server supports listing tasks.
     */
    supportsTasksList(serverId: string): boolean;
    /**
     * Checks if server supports canceling tasks.
     */
    supportsTasksCancel(serverId: string): boolean;
    private registerServer;
    private connectToServerOnce;
    private performConnection;
    private connectViaStdio;
    private connectViaHttp;
    private safeCloseTransport;
    private getProcessEnvironment;
    private createStdioStderrDrain;
    private annotateStdioConnectError;
    private ensureConnected;
    private getClientOrThrow;
    private clearLiveState;
    private clearClosedPendingConnectionState;
    private destroyLiveState;
    private buildServerReplayConfig;
    private isHttpConfig;
    private extractReplayAccessToken;
    private hasReplayableRequestInit;
    private extractBearerAccessToken;
    private withTimeout;
    private withProgressHandler;
    private buildCapabilities;
    private hasNegotiatedElicitation;
    private resolveRpcLogger;
    private cacheToolsMetadata;
    private isStdioConfig;
    private isExecuteToolRequest;
    private normalizeExecuteToolRequest;
    private runRetryableReadOperation;
    private runRetriedOperation;
    private refreshAccessTokenAfterUnauthorized;
    private createRetrySignal;
    private abortRetrySignals;
    private throwIfAborted;
    private awaitWithAbort;
}

export { isMcpAppTool as A, scrubMetaAndStructuredContentFromToolResult as B, type CustomProvider as C, scrubMetaFromToolResult as D, type EvalMatchOptions as E, MATCH_OPTIONS_DEFAULTS as F, resolveMatchOptions as G, type LLMProvider as L, MCPClientManager as M, type PromptResultData as P, type ReportEvalResultsInput as R, type ToolCall as T, type EvalTraceInput as a, type CompatibleProtocol as b, type CoreMessage as c, type CoreUserMessage as d, type CoreAssistantMessage as e, type CoreToolMessage as f, type LatencyBreakdown as g, type TokenUsage as h, type EvalWidgetSnapshotInput as i, type EvalTraceSpanInput as j, type EvalResultInput as k, type MCPServerReplayConfig as l, type EvalExpectedToolCall as m, type MCPJamReportingConfig as n, type ReportEvalResultsOutput as o, type EvalCiMetadata as p, type EvalArgumentMismatch as q, type EvalOutOfOrderToolCall as r, type EvalToolCall as s, type EvalToolCallMatchResult as t, type EvalTraceSpanCategory as u, type EvalWidgetCsp as v, type EvalWidgetPermissions as w, type LLMConfig as x, evaluateToolCalls as y, isChatGPTAppTool as z };
