/** * Shared session refresh for gateway auth. * * Used by `supen login` (expired-session recovery) and the gateway transport * (auto-refresh). Refresh requests are bounded by a timeout so a hung gateway * can never block the CLI indefinitely. */ import { type AuthData } from './store.js'; export declare const AUTH_REQUEST_TIMEOUT_MS: number; export interface RefreshResult { access_token: string; refresh_token: string; expires_in?: number; user?: { email: string; id: string; }; } export declare function parseJsonSafe(res: Response): Promise; export declare function isAbortError(err: any): boolean; /** * Exchange a refresh token for a new session and persist it. * Throws an actionable error on timeout, unreachable gateway, or rejection. */ export declare function refreshSession(gatewayUrl: string, refreshToken: string, timeoutMs?: number): Promise;