import { DEFAULT_PREFERENCES, PREFERENCES_SCHEMA_VERSION, type ProjectPreferences } from './preferences-types.js'; export { DEFAULT_PREFERENCES, PREFERENCES_SCHEMA_VERSION }; export type { ProjectPreferences } from './preferences-types.js'; export declare function preferencesPath(projectRoot: string): string; export declare function loadPreferences(projectRoot: string): ProjectPreferences; export declare function savePreferences(projectRoot: string, overrides: Partial): ProjectPreferences; /** * Atomic write helper for preferences.json. Writes to `.tmp--` * and renames over the target. On Windows, `rename` is atomic for files * on the same volume; on POSIX, `rename(2)` is atomic by spec. */ export declare function writeAtomic(filePath: string, prefs: ProjectPreferences): void; /** * (any `schema_version` older than PREFERENCES_SCHEMA_VERSION) to the * current shape. Returns the migrated object + a list of changes * applied (for surfacing in the CLI envelope and the migration log). * * v1's `agentShieldPrompt` and `loopAutonomousEnabled` were already * present, so they carry through unchanged. The `fanout` field is new * in v2 — it defaults to `{ defaultMode: 'fan-out' }` so the pre-v2 * behavior (peak-code SKILL instructed fan-out when ≥ 2 leaves) is * preserved. */ export type MigrateResult = { readonly fromVersion: string; readonly toVersion: typeof PREFERENCES_SCHEMA_VERSION; readonly migrated: ProjectPreferences; readonly changes: readonly string[]; readonly written: boolean; }; export declare function migratePreferences(projectRoot: string, opts?: { write?: boolean; now?: () => Date; }): MigrateResult | null;