export type Platform = "qianwen" | "bailian" | "anthropic"; export interface GlobalConfig { platform: Platform; modelName: string; workspaceId: string; apiKey?: string; } /** 确保 ~/.flagent/ 目录存在(0o700 权限,保护可能写入的 apiKey)。 */ export declare function ensureConfigDir(): void; /** 读取全局配置;文件不存在或解析失败返回 null(由调用方回退默认值)。 */ export declare function readGlobalConfig(): Partial | null; /** * 合并写入全局配置(原子写:先写 .tmp 再 rename,避免半写损坏)。 * 返回写入后的完整配置(合并 readGlobalConfig + partial)。 */ export declare function writeGlobalConfig(partial: Partial): Partial; /** 配置文件路径(测试/调试用)。 */ export declare function getConfigPath(): string; //# sourceMappingURL=global-config.d.ts.map