/**
 * Core upgrade logic - unified project maintenance.
 *
 * Handles:
 *   1. Storage engine migration (JSON → SQLite)
 *   2. Schema version upgrades
 *   3. Structural repairs (checksums, missing fields)
 *   4. Global ~/.cleo data migration
 *
 * Both CLI and MCP delegate here (shared-core pattern).
 *
 * @task T4699
 * @epic T4454
 */
/** A single upgrade action with status. */
export interface UpgradeAction {
    action: string;
    status: 'applied' | 'skipped' | 'preview' | 'error';
    details: string;
    fix?: string;
}
/** Full upgrade result. */
export interface UpgradeResult {
    success: boolean;
    upToDate: boolean;
    dryRun: boolean;
    actions: UpgradeAction[];
    applied: number;
    errors: string[];
    /** Storage migration sub-result (if migration was triggered). */
    storageMigration?: {
        migrated: boolean;
        tasksImported: number;
        archivedImported: number;
        sessionsImported: number;
        warnings: string[];
    };
}
/**
 * Run a full upgrade pass on the project .cleo/ directory.
 *
 * Steps:
 *   1. Pre-flight storage check (JSON → SQLite)
 *   2. If migration needed and not dry-run, run auto-migration with backup
 *   3. Schema version checks on JSON files
 *   4. Structural repairs (checksums, missing fields)
 *
 * @param options.dryRun  Preview changes without applying
 * @param options.includeGlobal  Also check global ~/.cleo
 * @param options.autoMigrate  Auto-migrate storage if needed (default: true)
 * @param options.cwd  Project directory override
 */
export declare function runUpgrade(options?: {
    dryRun?: boolean;
    includeGlobal?: boolean;
    autoMigrate?: boolean;
    cwd?: string;
}): Promise<UpgradeResult>;
//# sourceMappingURL=upgrade.d.ts.map