export type ArtifactKind = "file" | "directory";
export interface ArtifactTransactionFileSystem {
    existsSync(path: string): boolean;
    renameSync(source: string, destination: string): void;
    rmSync(path: string, options: {
        recursive: true;
        force: true;
    }): void;
}
/**
 * Stages a render beside its final destination and promotes only a validated
 * artifact. File promotion uses one atomic replacement rename, so an existing
 * file remains addressable until the new file replaces it. Replacing a
 * non-empty directory cannot be expressed as one portable rename; that case
 * uses a recoverable backup handoff while preserving the previous contents on
 * ordinary failures.
 */
export declare class ArtifactTransaction {
    private readonly kind;
    private readonly fileSystem;
    readonly destinationPath: string;
    readonly stagingPath: string;
    private readonly transactionDirectory;
    private readonly backupPath;
    private state;
    constructor(destinationPath: string, kind: ArtifactKind, fileSystem?: ArtifactTransactionFileSystem);
    validate(): void;
    commit(): void;
    rollback(): void;
    private restoreBackupIfDestinationUnclaimed;
    private cleanupTransactionDirectory;
}
//# sourceMappingURL=artifactTransaction.d.ts.map