import type { ClientAdapter } from './types.js'; export interface JsonAdapterSpec { name: string; scope: 'project' | 'global'; /** 配置文件绝对路径(project scope 用 projectDir;global scope 忽略之) */ configPath(projectDir: string): string; /** detect() 的 existsSync 探测路径列表(任一存在即视为已安装;与 configPath 正交, * 如 claude-code 探测 ~/.claude 目录而非项目内 settings.json) */ detectPaths(): string[]; /** MCP entry 所在根键路径(嵌套用数组,如 ZCode 的 ['mcp','servers']);默认 ['mcpServers'] */ rootKeys?: readonly string[]; /** entry 附加字段(尾部 merge,如 CherryStudio 的 type:'stdio'、Warp 的 working_directory) */ entryExtras?(projectDir: string): Record; /** user-state 白名单:旧 entry 已有则保留;defaults 有则首建 seed */ preserveUserState?: { keys: readonly string[]; defaults?: Record; }; /** env 字段名(默认 'env';无适配器需要覆盖,预留给未来 opencode 形态收编) */ envKey?: string; } export declare class JsonAdapterBase implements ClientAdapter { protected readonly spec: JsonAdapterSpec; readonly name: string; readonly scope: 'project' | 'global'; constructor(spec: JsonAdapterSpec); detect(): Promise; /** 沿 rootKeys 取(或建)entry 容器,返回持有 godot 键的对象。 */ private entryContainer; isConfigured(projectDir: string): Promise; configure(projectDir: string, godotPath: string, mcpCommand: string, mcpArgs: string[]): Promise; }