import type { ToolArguments } from '../tool';
export type McpDiagnosticTextI18n = Readonly<{
    en: string;
    zh: string;
}>;
export type McpListedTool = {
    name: string;
    description?: string;
    inputSchema: Record<string, unknown>;
};
export type McpListedPrompt = {
    name: string;
    description?: string;
    arguments?: ReadonlyArray<{
        name: string;
        description?: string;
        required?: boolean;
    }>;
};
export type McpPromptContent = {
    description?: string;
    messages: unknown[];
};
export type McpListedResource = {
    uri: string;
    name: string;
    description?: string;
    mimeType?: string;
};
export type McpListedResourceTemplate = {
    uriTemplate: string;
    name: string;
    description?: string;
    mimeType?: string;
};
export type McpReadResourceContent = {
    uri: string;
    mimeType?: string;
    text?: string;
    blob?: string;
};
export declare class McpDiagnosticError extends Error {
    readonly detailTextI18n: McpDiagnosticTextI18n;
    constructor(detailTextI18n: McpDiagnosticTextI18n);
}
export declare function extractMcpDiagnosticTextI18n(err: unknown): McpDiagnosticTextI18n | undefined;
export declare class McpSdkClient {
    private readonly serverId;
    private readonly client;
    private closed;
    private constructor();
    static connectStdio(params: {
        serverId: string;
        command: string;
        args: string[];
        env: Record<string, string>;
        cwd: string;
    }): Promise<McpSdkClient>;
    static connectStreamableHttp(params: {
        serverId: string;
        url: string;
        headers: Record<string, string>;
        sessionId?: string;
    }): Promise<McpSdkClient>;
    private static connectWithTransport;
    listTools(timeoutMs?: number): Promise<McpListedTool[]>;
    listPrompts(timeoutMs?: number): Promise<McpListedPrompt[]>;
    getPrompt(name: string, args: Record<string, string> | undefined, timeoutMs?: number): Promise<McpPromptContent>;
    listResources(timeoutMs?: number): Promise<McpListedResource[]>;
    listResourceTemplates(timeoutMs?: number): Promise<McpListedResourceTemplate[]>;
    readResource(uri: string, timeoutMs?: number): Promise<McpReadResourceContent[]>;
    callTool(mcpToolName: string, args: ToolArguments, timeoutMs?: number): Promise<string>;
    callToolRaw(mcpToolName: string, args: ToolArguments, timeoutMs?: number): Promise<unknown>;
    close(): Promise<void>;
    private ensureOpen;
}
