export interface StagedExtensionInstall { extensionId: string; stagingRoot: string; stagedExtensionDir: string; targetDir: string; backupDir?: string; committed: boolean; } /** Extract, validate, install dependencies, and import-check an extension away from its live path. */ export declare function stageExtensionStoreZip(buffer: Buffer, extensionsDir: string): Promise; /** Move a staged extension into its live path, preserving the previous version for rollback. */ export declare function commitStagedExtensionInstall(state: StagedExtensionInstall, overwrite: boolean): void; /** Restore the previous live extension, or remove a newly committed install. */ export declare function rollbackStagedExtensionInstall(state: StagedExtensionInstall): void; /** Delete the preserved previous version after every durable metadata write succeeds. */ export declare function finalizeStagedExtensionInstall(state: StagedExtensionInstall): void;