/** * Cross-process file lock for the auto device-login flow. * * When several skill processes start without a token at the same time, only one * should drive the Device Flow (= open one browser). The rest wait for the * winner to write the credential, then read it. This lock coordinates that. * * The lock file lives next to the credential store, contains only non-secret * metadata, and self-heals: a lock left behind by a crashed process is reclaimed * once it is older than `staleMs` (Requirement 3.1/3.4/3.5). */ export interface LockHandle { release(): Promise; } /** * Try to acquire the auth lock for `apiBaseUrl`. * - Returns a handle when acquired. * - Returns null when another live process holds it. * - Reclaims a stale lock (older than `staleMs`) and retries once. */ export declare function acquireLock(apiBaseUrl: string, staleMs: number): Promise; /** * Poll the credential store until a usable credential for `apiBaseUrl` appears * or `timeoutMs` elapses. Used by processes that did NOT win the lock. */ export declare function waitForCredential(apiBaseUrl: string, timeoutMs: number): Promise;