import { rename as fsRename } from 'node:fs/promises'; export type ProcessStatus = 'alive' | 'absent' | 'ambiguous'; export interface OperationLockOptions { readonly timeoutMs?: number; readonly retryDelayMs?: number; readonly processStatus?: (pid: number) => ProcessStatus; readonly rename?: typeof fsRename; readonly now?: () => string; /** Internal deterministic fault injection; never exposed by application composition. */ readonly fault?: (phase: 'after-create' | 'after-write' | 'after-sync') => void; } export interface OperationLock { readonly path: string; readonly token: string; readonly rootIdentity: string; readonly forensicArtifacts: readonly string[]; assertOwnership(): Promise; release(): Promise; abandonForTest(): Promise; } export declare function verifyLockedRoot(stateRootValue: string, expectedIdentity: string): Promise; export declare function acquireOperationLock(stateRootValue: string, options?: OperationLockOptions): Promise;