import { type UpdateStrategy } from './strategies.js';
import type { Installation, UpdateOutcome } from './types.js';
export interface UpdateInstallationOptions {
    /** `latest` (default), `oldest`, or a concrete release. */
    to?: string;
    onProgress?: (message: string) => void;
    /**
     * Replace the registry-selected strategy. The seam exists so the transaction
     * below can be exercised against a real filesystem without a vendor fetch, and
     * so a track that installs a harness differently (per-installation Cursor
     * isolation) can reuse this orchestration instead of re-implementing it.
     * Omitted in every normal call — `selectUpdateStrategy` is the default.
     */
    strategy?: UpdateStrategy;
}
/**
 * Move one frozen installation to a new vendor release, preserving its identity.
 *
 * The transaction is stage → verify → commit → record, with rollback on any
 * failure after the swap:
 *
 *   1. **stage**   — fetch the target release somewhere that is not yet live.
 *   2. **verify**  — launch the STAGED binary. This is the gate that makes the
 *                    update safe: a release that cannot start is discarded while
 *                    the working one is still in place, so the failure mode is
 *                    "nothing changed", not "the agent no longer runs".
 *   3. **commit**  — swap it in, keeping the displaced release until step 4.
 *   4. **record**  — re-verify in place, then write the new release into the
 *                    installation record and drop the rollback material.
 *
 * The installation's `id` and `label` are never touched, so the global default,
 * an isolated default, a project pin, a routine's `version:`, and a profile's
 * `host.version` all keep resolving to this installation across the update —
 * that reference preservation is the whole point of freezing the label.
 *
 * Strategies whose vendor artifact is global (a self-updating binary) report
 * `transactional: false`; for those, step 3 is a no-op and a failed verify is
 * surfaced as a failed update rather than pretended to be reversible.
 */
export declare function updateInstallation(installation: Installation, options?: UpdateInstallationOptions): Promise<UpdateOutcome>;
