import type { GrokBuildProviderConfig } from "./types.js"; declare const DEFAULT_AUTH_PATH: string; declare const XAI_AUTH_KEY = "https://auth.x.ai::b1a00492-073a-47ea-816f-4c329264a828"; declare const DEFAULT_CLIENT_ID = "b1a00492-073a-47ea-816f-4c329264a828"; export interface GrokAuthTokens { accessToken: string; refreshToken: string; expiresAt: number; } interface GrokAuthEntry { key: string; refresh_token: string; expires_at?: string; [extra: string]: unknown; } type GrokAuthFile = Record; export declare function readGrokAuthFile(customPath?: string): GrokAuthFile | null; export declare function readGrokTokensFromFile(customPath?: string): GrokAuthTokens | null; export declare function refreshGrokToken(refreshToken: string, clientId?: string): Promise; /** * Ensure we have a non-expired access token. Reads from disk (or config), * refreshes via the x.ai OAuth endpoint when needed, and writes the new * tokens back so that subsequent calls and the grok TUI stay in sync. */ export declare function ensureFreshGrokToken(config?: GrokBuildProviderConfig): Promise; /** Legacy alias retained for backwards compatibility. */ export declare const getValidGrokAccessToken: typeof ensureFreshGrokToken; export { DEFAULT_AUTH_PATH, XAI_AUTH_KEY, DEFAULT_CLIENT_ID }; //# sourceMappingURL=grok-auth.d.ts.map