import type { CliDiagnostic, PackageSummary } from "./types.js";
export interface VaultInstallResult extends PackageSummary {
    readonly destination: string;
    readonly replaced: boolean;
}
export interface VaultMigrationResult {
    readonly pluginId: string;
    readonly runtime: "native" | "sandboxed-page" | "live-sandboxed";
    readonly source: string;
    readonly destination: string;
}
export type VaultMutationResult<T> = {
    readonly ok: true;
    readonly result: T;
} | {
    readonly ok: false;
    readonly diagnostics: readonly CliDiagnostic[];
};
/**
 * Validates a complete archive before creating any destination files, stages
 * on the vault filesystem, and makes one atomic directory rename visible.
 */
export declare function installReleaseArchive(archivePath: string, vaultRoot: string, { replace, platform, }?: {
    readonly replace?: boolean;
    readonly platform?: string;
}): Promise<VaultMutationResult<VaultInstallResult>>;
/**
 * Relocates only a valid manifest-v2 package or canonical live bundle. Legacy
 * packages are intentionally rejected so they can be upgraded outside Thortiq.
 */
export declare function migrateLegacyPluginDirectory(pluginId: string, vaultRoot: string, { platform, }?: {
    readonly platform?: string;
}): Promise<VaultMutationResult<VaultMigrationResult>>;
