import * as _modelcontextprotocol_client from '@modelcontextprotocol/client';
import { M as MCPClientManager } from './MCPClientManager-D9Cqa92W.js';
import { R as RpcLogger, a as RetryPolicy, M as MCPServerConfig, b as MCPPrompt, c as MCPResourceTemplate, d as MCPResource, L as ListToolsResult } from './types-mAgSJ57j.js';
import 'ai';
import './mcp-protocol-version-cf74324S.js';

interface ListResourcesParams {
    serverId: string;
    cursor?: string;
}
interface ReadResourceParams {
    serverId: string;
    uri: string;
}
interface ListPromptsParams {
    serverId: string;
    cursor?: string;
}
interface ListPromptsMultiParams {
    serverIds: string[];
}
interface GetPromptParams {
    serverId: string;
    name: string;
    arguments?: Record<string, unknown>;
}
interface ListToolsParams {
    serverId: string;
    cursor?: string;
}
interface ListAllToolsParams {
    serverId: string;
}
interface ListAllToolsResult {
    tools: ListToolsResult["tools"];
    toolsMetadata: Record<string, unknown>;
}
interface ListAllResourcesParams {
    serverId: string;
}
interface ListAllResourcesResult {
    resources: MCPResource[];
}
interface ListAllPromptsParams {
    serverId: string;
}
interface ListAllPromptsResult {
    prompts: MCPPrompt[];
}
interface ListAllResourceTemplatesParams {
    serverId: string;
}
interface ListAllResourceTemplatesResult {
    resourceTemplates: MCPResourceTemplate[];
    unsupported?: boolean;
}
interface WithEphemeralClientOptions {
    /** Override the serverId (default: "__ephemeral__") */
    serverId?: string;
    /** Client name reported to the MCP server (default: "mcpjam-sdk") */
    clientName?: string;
    /** Request timeout in ms (default: 30_000) */
    timeout?: number;
    /** Optional RPC logger for request/response tracing. */
    rpcLogger?: RpcLogger;
    /** Retry policy for the ephemeral manager and initial connect. */
    retryPolicy?: RetryPolicy;
}
declare function listResources(manager: MCPClientManager, params: ListResourcesParams): Promise<{
    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;
    }[];
    nextCursor: string | undefined;
}>;
declare function readResource(manager: MCPClientManager, params: ReadResourceParams): Promise<{
    content: {
        [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;
    };
}>;
declare function listPrompts(manager: MCPClientManager, params: ListPromptsParams): Promise<{
    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;
    }[];
    nextCursor: string | undefined;
}>;
declare function listPromptsMulti(manager: MCPClientManager, params: ListPromptsMultiParams): Promise<Record<string, unknown>>;
declare function getPrompt(manager: MCPClientManager, params: GetPromptParams): Promise<{
    content: {
        [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;
    };
}>;
declare function listTools(manager: MCPClientManager, params: ListToolsParams): Promise<{
    tools: {
        inputSchema: {
            [x: string]: unknown;
            type: "object";
            properties?: Record<string, _modelcontextprotocol_client.JSONValue> | undefined;
            required?: string[] | undefined;
        };
        name: string;
        description?: string | undefined;
        outputSchema?: {
            [x: string]: unknown;
            type: "object";
            properties?: Record<string, _modelcontextprotocol_client.JSONValue> | undefined;
            required?: string[] | undefined;
        } | undefined;
        annotations?: {
            title?: string | undefined;
            readOnlyHint?: boolean | undefined;
            destructiveHint?: boolean | undefined;
            idempotentHint?: boolean | undefined;
            openWorldHint?: boolean | undefined;
        } | undefined;
        execution?: {
            taskSupport?: "optional" | "required" | "forbidden" | undefined;
        } | undefined;
        _meta?: Record<string, unknown> | undefined;
        icons?: {
            src: string;
            mimeType?: string | undefined;
            sizes?: string[] | undefined;
            theme?: "light" | "dark" | undefined;
        }[] | undefined;
        title?: string | undefined;
    }[];
    nextCursor: string | undefined;
}>;
declare function listAllTools(manager: MCPClientManager, params: ListAllToolsParams): Promise<ListAllToolsResult>;
declare function listAllResources(manager: MCPClientManager, params: ListAllResourcesParams): Promise<ListAllResourcesResult>;
declare function listAllPrompts(manager: MCPClientManager, params: ListAllPromptsParams): Promise<ListAllPromptsResult>;
declare function listAllResourceTemplates(manager: MCPClientManager, params: ListAllResourceTemplatesParams): Promise<ListAllResourceTemplatesResult>;
declare function withEphemeralClient<T>(config: MCPServerConfig, fn: (manager: MCPClientManager, serverId: string) => Promise<T>, options?: WithEphemeralClientOptions): Promise<T>;
declare function withDisposableManager<T>(managerOrPromise: MCPClientManager | Promise<MCPClientManager>, fn: (manager: MCPClientManager) => Promise<T>): Promise<T>;

export { type GetPromptParams, type ListAllPromptsParams, type ListAllPromptsResult, type ListAllResourceTemplatesParams, type ListAllResourceTemplatesResult, type ListAllResourcesParams, type ListAllResourcesResult, type ListAllToolsParams, type ListAllToolsResult, type ListPromptsMultiParams, type ListPromptsParams, type ListResourcesParams, type ListToolsParams, type ReadResourceParams, type WithEphemeralClientOptions, getPrompt, listAllPrompts, listAllResourceTemplates, listAllResources, listAllTools, listPrompts, listPromptsMulti, listResources, listTools, readResource, withDisposableManager, withEphemeralClient };
