/**
 * `vyuh-dxkit upgrade` — combined CLI for the dxkit upgrade flow.
 *
 * Two modes, one subcommand:
 *
 *   `--plan [--json]` — preview only. Emits UpgradePlan JSON
 *   (consumed by dxkit-update skill) or text-prose summary. No
 *   mutations. Used to inspect what an upgrade would do before
 *   committing.
 *
 *   (no flag, or `--yes`) — execute. Runs the three-step upgrade:
 *     1. `npm install @vyuhlabs/dxkit@<target>`     (binary)
 *     2. `npx vyuh-dxkit update`                    (scaffold refresh)
 *     3. `npx vyuh-dxkit doctor`                    (verify)
 *   Then prints devcontainer-rebuild instructions if .devcontainer/
 *   was refreshed.
 *
 * Architectural mirror of the doctor → dxkit-fix pattern: structured
 * CLI output (--plan --json) for skill consumption, execution mode
 * for direct human use. Same shape, different content.
 */
export type DeltaKind = 'none' | 'patch' | 'minor' | 'major' | 'downgrade';
export interface UpgradeStep {
    /** Shell command to run (verbatim — what gets executed). */
    command: string;
    /** One-line purpose shown in plan + before each execution. */
    purpose: string;
    /** Optional steps the customer can decline (e.g. devcontainer rebuild). */
    optional?: boolean;
}
export interface UpgradePlan {
    schema: 'upgrade-plan.v1';
    generatedAt: string;
    cwd: string;
    current: {
        /** Installed binary version (from `npx vyuh-dxkit --version`). */
        binary: string | null;
        /** Scaffold version recorded in manifest. */
        scaffold: string | null;
    };
    /** Target version — `--target=X.Y.Z` or 'latest' from npm. */
    target: string;
    delta: DeltaKind;
    /**
     * Recommended execution sequence. Each step is independently
     * idempotent — re-running is safe.
     */
    steps: UpgradeStep[];
    /**
     * Customer-facing warnings (peer-dep risks, breaking changes,
     * "devcontainer will need rebuild after"). Empty when nothing
     * actionable.
     */
    warnings: string[];
    /**
     * Brief note pointing the customer at the canonical changelog.
     * Detailed per-version highlight parsing is a future enhancement —
     * for now we keep this simple and link to the source of truth.
     */
    changelogNote: string;
}
export interface UpgradeOpts {
    /** Pin to a specific version. Default: latest from npm. */
    target?: string;
    /** Skip interactive confirmations. */
    yes?: boolean;
    /** Print commands without executing. */
    dryRun?: boolean;
    /** Emit plan only; don't execute. */
    planOnly?: boolean;
    /** Emit plan as JSON instead of prose (only meaningful with planOnly). */
    json?: boolean;
    /**
     * Injectable version reads. Useful for tests that need deterministic
     * plans without subprocess fanout; production code leaves these
     * undefined and the readers shell out as needed.
     */
    _readBinary?: (cwd: string) => string | null;
    _readLatest?: () => string;
}
/**
 * Classify the delta between two semver-shaped strings. Returns
 * `'none'` if equal, `'downgrade'` if target < current.
 */
export declare function classifyDelta(current: string | null, target: string): DeltaKind;
export declare function buildUpgradePlan(cwd: string, opts?: UpgradeOpts): UpgradePlan;
export declare function runUpgrade(cwd: string, opts?: UpgradeOpts): Promise<void>;
//# sourceMappingURL=upgrade.d.ts.map