export declare const DEVICE_ISOLATION_ACTIVATION_VERSION: 1; export declare const DEVICE_ISOLATION_FREEZE_LEASE_MS = 30000; export interface DeviceIsolationFreezeLease { activationVersion: typeof DEVICE_ISOLATION_ACTIVATION_VERSION; leaseId: string; nonce: string; inventoryGeneration: string; acquiredAt: number; expiresAt: number; } export declare function currentDeviceIsolationFreezeLease(now?: number): DeviceIsolationFreezeLease | null; export type AcquireDeviceIsolationFreezeResult = { ok: true; lease: DeviceIsolationFreezeLease; reused: boolean; } | { ok: false; reason: 'busy'; }; export declare function acquireDeviceIsolationFreeze(input: { nonce: string; inventoryGeneration: string; now?: number; leaseMs?: number; leaseIdFactory?: () => string; }): AcquireDeviceIsolationFreezeResult; export declare function requireDeviceIsolationFreeze(input: { nonce: string; leaseId: string; now?: number; }): DeviceIsolationFreezeLease | null; /** * Bind the post-freeze inventory to the lease. Prepare must acquire the spawn * barrier before it looks at sessions; otherwise a worker can appear between * inventory and freeze. Only the holder may replace the provisional value. */ export declare function bindDeviceIsolationFreezeInventoryGeneration(input: { nonce: string; leaseId: string; inventoryGeneration: string; now?: number; }): DeviceIsolationFreezeLease | null; export declare function releaseDeviceIsolationFreeze(input: { nonce: string; leaseId: string; now?: number; }): boolean; /** * Queue only the first spawn request for a logical session. Later turns are * already retained by the session's normal pending-input machinery; replaying * multiple fork requests would instead kill and replace the first new worker. */ export declare function deferWorkerSpawnDuringDeviceIsolation(sessionId: string, callback: () => void, now?: number): boolean; /** Test-only reset; production callers release through the lease protocol. */ export declare function resetDeviceIsolationActivationForTest(): void; //# sourceMappingURL=device-isolation-activation.d.ts.map