export type OAuthCredentials = { refresh: string; access: string; expires: number; projectId?: string; email?: string; }; export type OAuthCallbacks = { onAuth(params: { url: string; instructions?: string; }): void; onPrompt?(params: { message: string; }): Promise; onSelect?(params: { message: string; options: { id: string; label: string; }[]; }): Promise; }; export type AntigravityApiKey = { token: string; projectId: string; }; export declare const DEFAULT_ENDPOINT = "https://cloudcode-pa.googleapis.com"; export declare const ENDPOINT_FALLBACKS: string[]; export declare const REDIRECT_URI = "http://localhost:51121/oauth-callback"; export declare function antigravityEnv(name: string): string | undefined; export declare const CALLBACK_HOST: string; export declare const DEFAULT_PROJECT_ID: string; export declare const CLIENT_ID: string; export declare const CLIENT_SECRET: string; export declare const SCOPES: string[]; export declare const AUTH_URL = "https://accounts.google.com/o/oauth2/v2/auth"; export declare const TOKEN_URL = "https://oauth2.googleapis.com/token"; export declare let lastStatus: number | undefined; export declare function setLastStatus(status: number | undefined): void; export declare let lastEndpoint: string | undefined; export declare function setLastEndpoint(endpoint: string | undefined): void; export declare let lastError: string | undefined; export declare function setLastError(error: string | undefined): void; export declare let lastProjectId: string | undefined; export declare function setLastProjectId(projectId: string | undefined): void; export declare let lastResolvedRuntimeModel: string | undefined; export declare function setLastResolvedRuntimeModel(model: string | undefined): void; export declare let lastAvailableModels: string | undefined; export declare function setLastAvailableModels(models: string | undefined): void; export declare let lastMatchedModelDebug: string | undefined; export declare function setLastMatchedModelDebug(debug: string | undefined): void; export declare function nowRequestId(): string; export declare function stableProjectId(seed: string): string; export declare function endpointCandidates(): string[]; export declare function safeError(error: unknown): string; export declare function sanitizeText(text: unknown): string; export declare function parseApiKey(apiKeyRaw: string | undefined): AntigravityApiKey; export declare function antigravityHeaders(token: string): Record; export declare function jsonOrTextError(text: string): string; export declare function extractProjectId(data: any): string | undefined; export type DynamicModelInfo = { id: string; experiments?: string[]; apiProvider?: string; modelProvider?: string; }; export declare function fetchAvailableRuntimeModel(token: string, projectId: string, requestedRuntimeModel: string): Promise; export declare function loadCodeAssist(token: string): Promise; export declare function loginAntigravity(callbacks: OAuthCallbacks): Promise; export declare function refreshAntigravityToken(credentials: OAuthCredentials): Promise; export declare function getApiKey(credentials: OAuthCredentials): string;