import type { OhPConfig } from "../types.js"; /** * 确保目录存在,若不存在则递归创建 */ export declare function ensureDir(dir: string): void; /** * 增量同步目录:只复制有变化的文件,删除源中不存在的文件 */ export declare function syncDir(src: string, dest: string): void; /** * 应用 OhP 配置,生成并写入 ~/.pi/agent/ 下的所有配置文件 */ export declare function applyConfig(config: OhPConfig): void; /** * Remove all files/dirs managed by oh-pi before strict replace apply. */ export declare function cleanupManagedConfig(agentDir: string): void; /** * 全局安装 pi-coding-agent,安装失败时抛出异常 */ export declare function installPi(): void; /** * 备份 ~/.pi/agent/ 目录到 ~/.pi/agent.bak-{timestamp}/ * @returns 备份目录路径,若原目录不存在则返回空字符串 */ export declare function backupConfig(): string;