export interface UpgradeInput { readonly projectRoot: string; /** * When true, the umbrella is being invoked from the * `npm i -g peaks-cli` postinstall. Suppresses the * interactive prompts and accepts soft-fail on any * sub-step. */ readonly auto?: boolean; /** * When omitted, the sub-commands are inferred from PATH * (the postinstall puts the binary there). The umbrella * never blocks on a missing binary — it surfaces the * install hint in `nextActions` instead. */ readonly peaksBin?: string; } export interface SubStepResult { readonly name: string; readonly status: 'pass' | 'fail' | 'skipped'; readonly exitCode: number | null; readonly stdout: string; readonly stderr: string; readonly durationMs: number; } export interface UpgradeResult { readonly applied: boolean; readonly fromVersion: string | null; readonly toVersion: string; readonly projectRoot: string; readonly steps: readonly SubStepResult[]; readonly passedCount: number; readonly failedCount: number; readonly skippedCount: number; readonly auditBefore: { totalRedLines: number; cliBacked: number; } | null; readonly auditAfter: { totalRedLines: number; cliBacked: number; } | null; readonly upgradeRecordPath: string | null; readonly nextActions: readonly string[]; readonly warnings: readonly string[]; } export declare function runUpgrade(input: UpgradeInput): UpgradeResult;