/**
 * MCP 工具函数
 *
 * 提供 MCP 服务器配置的构建、转换和规范化功能
 */
import type { LegacyMcpStateItem, McpPayload, McpServerConfig, SdkApps } from '../types.js';
import type { McpServerSpec } from '@cc-switch/sdk';
/**
 * 构建 MCP 配置内容
 *
 * @param mcpServers - MCP 服务器列表
 * @returns JSON 格式的配置内容
 */
export declare function buildMcpConfigContent(mcpServers: LegacyMcpStateItem[]): string;
/**
 * 规范化 MCP Payload
 *
 * @param payload - 原始 payload
 * @returns 规范化后的 MCP Payload，无效返回 null
 */
export declare function normalizeMcpPayload(payload: unknown): McpPayload | null;
/**
 * 规范化 SDK App 标志
 *
 * @param rawApps - 原始 apps 配置
 * @returns 规范化后的 SdkApps
 */
export declare function normalizeSdkAppFlags(rawApps: unknown): SdkApps | undefined;
/**
 * 规范化 SDK MCP 服务器规格
 *
 * @param rawMcp - 原始 MCP 配置
 * @returns 规范化后的服务器配置
 */
export declare function normalizeSdkMcpServerSpec(rawMcp: unknown): McpServerSpec;
/**
 * SDK MCP 服务器接口
 */
export interface McpServerFromSdk {
    id?: string;
    name?: string;
    server?: McpServerConfig;
    apps?: SdkApps;
}
/**
 * 转换为 Legacy MCP State Item
 *
 * @param mcpServer - SDK MCP 服务器对象
 * @returns Legacy MCP State Item
 */
export declare function toLegacyMcpStateItem(mcpServer: McpServerFromSdk): LegacyMcpStateItem;
/**
 * 转换为 Legacy Skill State Item
 *
 * @param skill - Skill 对象
 * @returns Legacy Skill State Item
 */
export declare function toLegacySkillStateItem(skill: {
    id?: string;
    name?: string;
    directory?: string;
    sourceDir?: string;
    filePath?: string;
    apps?: SdkApps;
    installedAt?: string | number;
}): {
    id: string;
    name: string;
    fileName: string;
    filePath: string;
    bytes: number;
    apps?: SdkApps;
    installedAt: string;
};
//# sourceMappingURL=mcp-utils.d.ts.map