/** * MCP (Model Context Protocol) integration for Z.AI and MiniMax. * * Provides config discovery and API call helpers used by toolExecution.ts. */ export interface McpContentItem { text?: string; } export interface MinimaxApiResponse { content?: McpContentItem[]; } export interface ZaiMcpResponse { error?: { message?: string; }; result?: { content?: McpContentItem[]; } | string; } export declare const ZAI_MCP_TOOLS: string[]; export declare const ZAI_VISION_TOOLS: string[]; export declare const ZAI_PROVIDER_IDS: string[]; export declare const ZAI_ALL_PROVIDER_IDS: string[]; export declare const MINIMAX_MCP_TOOLS: string[]; export declare const MINIMAX_PROVIDER_IDS: string[]; /** * Find a Z.AI provider that has an API key configured. * Returns the provider ID and API key, or null if none found. * Prefers the active provider if it's Z.AI, otherwise checks all Z.AI providers. */ export declare function getZaiMcpConfig(): { providerId: string; apiKey: string; endpoints: { webSearch: string; webReader: string; zread: string; }; } | null; /** * Check if Z.AI MCP tools are available (user has any Z.AI API key) */ export declare function hasZaiMcpAccess(): boolean; /** * Find a MiniMax provider that has an API key configured. * Returns the base host URL and API key, or null if none found. */ export declare function getMinimaxMcpConfig(): { host: string; apiKey: string; } | null; /** * Check if MiniMax MCP tools are available */ export declare function hasMinimaxMcpAccess(): boolean; /** * Call a MiniMax MCP REST API endpoint */ export declare function callMinimaxApi(host: string, path: string, body: Record, apiKey: string): Promise; /** * Find a Z.AI provider (any variant) that has an API key configured. * Used for vision tool access which works with all Z.AI providers. */ export declare function getZaiVisionConfig(): { baseUrl: string; apiKey: string; } | null; /** * Check if Z.AI Vision tools are available */ export declare function hasZaiVisionAccess(): boolean; /** * Call Z.AI vision API (OpenAI-compatible chat completions with image content) */ export declare function callZaiVisionApi(baseUrl: string, apiKey: string, prompt: string, imageUrl: string): Promise; /** * Call a Z.AI MCP endpoint via JSON-RPC 2.0 */ export declare function callZaiMcp(endpoint: string, toolName: string, args: Record, apiKey: string): Promise;