export interface SchedulerLockOptions { dir?: string; sessionId?: string; } /** * Try to acquire the scheduler lock using an atomic exclusive create. * If the lock already exists, checks PID liveness for stale recovery. * Returns true if this process now owns the lock. */ export declare function tryAcquireSchedulerLock(opts?: SchedulerLockOptions): Promise; /** * Release the scheduler lock if this process owns it. */ export declare function releaseSchedulerLock(opts?: SchedulerLockOptions): Promise; /** * Synchronous version for use in process exit handlers where async is not available. */ export declare function releaseSchedulerLockSync(opts?: SchedulerLockOptions): void; /** * Register a cleanup handler to release the lock on process exit. * Returns a dispose function to remove the listeners (call in test teardown). */ export declare function registerSchedulerLockCleanup(opts?: SchedulerLockOptions): () => void;