/** * Hardware Lock Management * Singleton tracking global session leases for hardware operations. * * Provides: * - HardwareLockManager: Singleton class to lock/unlock execution flows. * - hardwareLockManager: Default exported instance. */ import { PlatformIOError } from "./errors.js"; /** * Exception thrown when a process fails to acquire the global pipeline lock. */ export declare class QueueEnforcementError extends PlatformIOError { constructor(message: string, context?: Record); } /** * Internal representation of an actively held system hardware lock stream. */ export interface LockState { isLocked: boolean; sessionId?: string; reason?: string; lockedAt?: number; } export declare class HardwareLockManager { private static instance; private state; private constructor(); /** * Retrieves the global singleton instance */ static getInstance(): HardwareLockManager; /** * Explicitly claim the internal lock for a session. * Throws if another session currently holds the lock. */ acquireLock(sessionId: string, reason?: string): void; /** * Release the explicit lock, if it matches the current session ID. */ releaseLock(sessionId: string): void; /** * Get the current global lock state. */ getLockStatus(): LockState; /** * Validate that an operation can proceed. * Operation can proceed if unlocked, or if the requester IS the locker. */ requireLock(sessionId?: string): void; /** * Implicit wrapping block for safe execution of a single task. * Grabs the lock implicitly, awaits the job, then releases it. */ withImplicitLock(action: () => Promise): Promise; } export declare const hardwareLockManager: HardwareLockManager; //# sourceMappingURL=lock-manager.d.ts.map