import type { ProcessIdentity } from './upgrade-job.js'; export interface UpgradeLockOwner { schemaVersion: 1; jobId: string; nonce: string; dataRoot: string; controller: ProcessIdentity; worker?: ProcessIdentity; createdAt: string; } export interface UpgradeLock { path: string; owner: UpgradeLockOwner; tryClaimControllerCleanup(): boolean; tryReclaimDeadWorkerCleanup(worker: ProcessIdentity): boolean; abandonControllerCleanup(): void; release(): void; } export declare function getUpgradeLockPath(): string; export declare function loadUpgradeLockOwner(): UpgradeLockOwner; export declare function acquireUpgradeLock(jobId: string, nonce?: string): UpgradeLock; export declare function assignUpgradeLockWorker(jobId: string, nonce: string, worker: ProcessIdentity): UpgradeLockOwner; export declare function releaseUpgradeLockForWorker(jobId: string, nonce: string, worker: ProcessIdentity): void; export declare function hasUpgradeLock(): boolean; export declare function isUpgradeLockGenerationActive(jobId: string, nonce: string): boolean; export declare function loadUpgradeLockWorkerClaim(): ProcessIdentity | null; export declare function reclaimStaleUpgradeLock(jobId: string, nonce: string): boolean;