import { PKCECodes } from './pkce'; import { OAuthTokenStorage } from './store'; /** * xAI Grok OAuth — port từ `internal/auth/xai/xai.go` + `types.go`. * * Khác Claude/Codex: dùng OIDC discovery để resolve endpoint thật. PKCE bắt buộc. */ export declare const XAI_DEFAULT_API_BASE = "https://api.x.ai/v1"; export declare const XAI_ISSUER = "https://auth.x.ai"; export declare const XAI_DISCOVERY_URL = "https://auth.x.ai/.well-known/openid-configuration"; export declare const XAI_CLIENT_ID = "b1a00492-073a-47ea-816f-4c329264a828"; export declare const XAI_SCOPE = "openid profile email offline_access grok-cli:access api:access"; export declare const XAI_DEFAULT_CALLBACK_PORT = 56121; export declare const XAI_CALLBACK_PATH = "/callback"; export interface XAIDiscovery { authorizationEndpoint: string; tokenEndpoint: string; } export interface XAIAuthSession { authUrl: string; state: string; pkce: PKCECodes; redirectUri: string; discovery: XAIDiscovery; } export declare function startXAIAuth(callbackPort?: number): Promise; export declare function exchangeXAICodeForTokens(code: string, pkce: PKCECodes, redirectUri: string, tokenEndpoint: string, account?: string): Promise; export declare function refreshXAIToken(current: OAuthTokenStorage): Promise;