export declare const CONFIG_SCHEMA_VERSION_V2 = "2.0.0"; /** * Slim 2.0 schema for `~/.peaks/config.json`. After migration, * the only meaningful fields are `version` + `ocr.llm.*`; everything * else lives in sidecar files (`providers.json`, `proxy.json`, * `workspaces.json`) or per-project `preferences.json`. The type is * intentionally permissive: extra keys are ignored at runtime, not * rejected, so a hand-written or partially-migrated file does not * fail the loader. */ export interface ConfigV2 { readonly version: typeof CONFIG_SCHEMA_VERSION_V2; } export declare function isConfigV2(raw: unknown): raw is ConfigV2; /** * Per-project fields that the 1.x → 2.0 migration moves * from `~/.peaks/config.json` (global) to `/.peaks/preferences.json` * (per-project). Per spec §10.4 line 1215: "economyMode / swarmMode * 字段从 global 迁移到当前 workspace 的 .peaks/preferences.json". */ declare const PER_PROJECT_FIELDS: readonly ["economyMode", "swarmMode"]; type PerProjectField = (typeof PER_PROJECT_FIELDS)[number]; export interface MigrationOptions { currentProjectRoot: string; } export interface MigrationPlan { alreadyAtV2: boolean; detectedSchemaVersion: string | null; newConfigSchemaVersion: string; /** Field names that would be migrated on apply (1.x → 2.0). */ willMigrateFields: readonly PerProjectField[]; } export interface MigrationResult extends MigrationPlan { applied: boolean; backupPath?: string; newConfigPath?: string; error?: string; } export declare function globalConfigPath(): string; export declare function backupConfigPath(): string; export declare function planMigration(opts: MigrationOptions): MigrationPlan; export declare function executeMigration(opts: MigrationOptions & { apply: boolean; }): MigrationResult; export {};