import { AgentWSClient } from '../websocket/client';
export interface UpgradeInfo {
    targetVersion: string;
    packageUrl: string;
    downloadUrl?: string;
    checksum: string;
    mandatory: boolean;
    rollbackVersion?: string;
    releaseNotes?: string;
    agentId?: string;
}
export interface UpgradeCommand {
    version: string;
    downloadUrl: string;
    checksum: string;
    mandatory: boolean;
    releaseNotes?: string;
}
export declare class UpgradeService {
    private wsClient;
    private upgrading;
    private upgradingVersion;
    private pendingUpgrade;
    constructor(wsClient: AgentWSClient);
    sanitizeLocalCache(reason?: string): Promise<void>;
    handleUpgradeAvailable(info: UpgradeInfo): void;
    handleUpgradeCommand(command: UpgradeCommand | UpgradeInfo): Promise<void>;
    acceptPendingUpgrade(): boolean;
    rejectPendingUpgrade(): boolean;
    getPendingUpgrade(): UpgradeInfo | null;
    isUpgrading(): boolean;
    private performUpgrade;
    private normalizeBaseUrl;
    private deriveHttpBaseFromWsUrl;
    private buildDownloadCandidates;
    private downloadPackage;
    private calculateChecksum;
    private extractPackage;
    private backupCurrent;
    private replaceFiles;
    private copyRecursive;
    private getPathSize;
    private removeRecursive;
    private restartAgent;
    private reportStatus;
    private reportUpgradeResponse;
    getCurrentVersion(): string;
}
//# sourceMappingURL=upgrade.d.ts.map