/** * Pending device-authorization state, at ~/.config/remixmate/pending.json. * * Exists so authorization can outlive a single process. `login --start` requests * a device code, persists it and returns immediately; `login --wait` picks it up * and polls with a bounded window, as many times as needed. That split is what * makes authorization workable from an agent host, whose tool calls are * time-bounded and cannot sit on a 10-minute blocking poll. * * The device_code IS a short-lived bearer secret (it can be exchanged for the * PrivToken until it expires or is used), so the file is written 0600 like the * credential store, and is deleted as soon as it is redeemed or found expired. */ export declare const PENDING_FILE: string; export interface PendingAuth { apiBaseUrl: string; deviceCode: string; userCode: string; verificationUri: string; verificationUriComplete?: string; /** Poll interval in seconds, as instructed by the backend. */ interval: number; /** Absolute epoch-ms deadline after which the device code is dead. */ expiresAt: number; } export declare function setPending(pending: PendingAuth): Promise; /** * Read the pending authorization for `apiBaseUrl`. Returns null when absent, * unreadable, bound to a different backend, or already expired — callers then * tell the user to run `login --start` again. */ export declare function getPending(apiBaseUrl: string): Promise; export declare function clearPending(): Promise;