export interface GitHubReleaseAsset {
    name: string;
    browserDownloadUrl: string;
}
export interface LatestReleaseInfo {
    version: string;
    tagName: string;
    releaseUrl: string;
    assets: GitHubReleaseAsset[];
}
export type InstalledUpdateSource = 'npm' | 'release';
interface DirectoryOps {
    existsSync(path: string): boolean;
    renameSync(oldPath: string, newPath: string): void;
    rmSync(path: string, options: {
        force?: boolean;
        recursive?: boolean;
    }): void;
}
export type ReleaseTarget = 'win32-x64' | 'darwin-x64' | 'darwin-arm64';
export declare function detectInstalledUpdateSource(installDir: string): InstalledUpdateSource;
export declare function resolveReleaseTarget(platform?: NodeJS.Platform, arch?: string): ReleaseTarget;
export declare function fetchLatestReleaseInfo({ fetchImpl, repo, timeoutMs, }?: {
    fetchImpl?: typeof fetch;
    repo?: string;
    timeoutMs?: number;
}): Promise<LatestReleaseInfo>;
export declare function selectReleaseAsset(release: LatestReleaseInfo, target: ReleaseTarget): GitHubReleaseAsset;
export declare function findExtractedBundleRoot(extractDir: string): string;
export declare function validateCliBundle(bundleRoot: string): void;
export declare function replaceDirectoryWithRollback(targetDir: string, preparedDir: string, ops?: DirectoryOps): void;
export {};
//# sourceMappingURL=update.d.ts.map