export type SidecarLockRetryOptions = { retries?: number; factor?: number; minTimeout?: number; maxTimeout?: number; randomize?: boolean; }; export type SidecarLockStaleRecovery = "fail-closed" | "remove-if-unchanged"; export type SidecarLockStaleSnapshot = { lockPath: string; normalizedTargetPath: string; raw: string; payload: Record | null; }; export type SidecarLockAcquireOptions> = { targetPath: string; lockPath?: string; staleMs: number; timeoutMs?: number; retry?: SidecarLockRetryOptions; staleRecovery?: SidecarLockStaleRecovery; allowReentrant?: boolean; payload: () => TPayload | Promise; shouldReclaim?: (params: { lockPath: string; normalizedTargetPath: string; payload: Record | null; staleMs: number; nowMs: number; heldByThisProcess: boolean; }) => boolean | Promise; shouldRemoveStaleLock?: (snapshot: SidecarLockStaleSnapshot) => boolean | Promise; metadata?: Record; }; export type SidecarLockHandle = { lockPath: string; normalizedTargetPath: string; release: () => Promise; [Symbol.asyncDispose](): Promise; }; export type SidecarLockHeldEntry = { normalizedTargetPath: string; lockPath: string; acquiredAt: number; metadata: Record; forceRelease: () => Promise; }; export type WithSidecarLockOptions> = Omit, "targetPath"> & { managerKey?: string; }; export declare function createSidecarLockManager(key: string): { acquire: >(options: SidecarLockAcquireOptions) => Promise; withLock: >(options: SidecarLockAcquireOptions, fn: () => Promise) => Promise; drain: () => Promise; reset: () => void; heldEntries: () => SidecarLockHeldEntry[]; }; export declare function withSidecarLock>(targetPath: string, options: WithSidecarLockOptions, fn: () => Promise): Promise; //# sourceMappingURL=sidecar-lock.d.ts.map