import { d as Model } from "./types-CBQ0-JNc.js"; //#region extensions/openai/openai-codex-oauth-types.runtime.d.ts type OAuthCredentials = { refresh: string; access: string; expires: number; [key: string]: unknown; }; type OAuthProviderId = string; /** @deprecated Use OAuthProviderId instead */ type OAuthProvider = OAuthProviderId; type OAuthPrompt = { message: string; placeholder?: string; allowEmpty?: boolean; }; type OAuthAuthInfo = { url: string; instructions?: string; }; type OAuthSelectOption = { id: string; label: string; }; type OAuthSelectPrompt = { message: string; options: OAuthSelectOption[]; }; interface OAuthLoginCallbacks { onAuth: (info: OAuthAuthInfo) => void; onPrompt: (prompt: OAuthPrompt) => Promise; onProgress?: (message: string) => void; onManualCodeInput?: () => Promise; /** Show an interactive selector and return the selected option id, or undefined on cancel. */ onSelect?: (prompt: OAuthSelectPrompt) => Promise; signal?: AbortSignal; } interface OAuthProviderInterface { readonly id: OAuthProviderId; readonly name: string; /** Run the login flow, return credentials to persist */ login(callbacks: OAuthLoginCallbacks): Promise; /** Whether login uses a local callback server and supports manual code input. */ usesCallbackServer?: boolean; /** Refresh expired credentials, return updated credentials to persist */ refreshToken(credentials: OAuthCredentials): Promise; /** Convert credentials to API key string for the provider */ getApiKey(credentials: OAuthCredentials): string; /** Optional: modify models for this provider (e.g., update baseUrl) */ modifyModels?(models: Model[], credentials: OAuthCredentials): Model[]; } /** @deprecated Use OAuthProviderInterface instead */ interface OAuthProviderInfo { id: OAuthProviderId; name: string; available: boolean; } //#endregion export { OAuthProvider as a, OAuthProviderInterface as c, OAuthPrompt as i, OAuthSelectOption as l, OAuthCredentials as n, OAuthProviderId as o, OAuthLoginCallbacks as r, OAuthProviderInfo as s, OAuthAuthInfo as t, OAuthSelectPrompt as u };