/**
 * Central place for OAuth-based provider authentication.
 *
 * Brings together sign-in, token renewal, and the provider registry for the
 * providers that authenticate over OAuth:
 * - Anthropic (Claude Pro / Max)
 * - GitHub Copilot
 * - ChatGPT (Codex)
 * - Kimi (Moonshot AI)
 */
export { anthropicOAuthProvider, loginAnthropic, refreshAnthropicToken } from "./anthropic.js";
export { getGitHubCopilotBaseUrl, githubCopilotOAuthProvider, loginGitHubCopilot, normalizeDomain, refreshGitHubCopilotToken, } from "./github-copilot.js";
export { loginOpenAICodex, openaiCodexOAuthProvider, refreshOpenAICodexToken } from "./openai-codex.js";
export { loginKimi, refreshKimiToken } from "./kimi.js";
export * from "./types.js";
import type { OAuthCredentials, OAuthProviderId, OAuthProviderInfo, OAuthProviderInterface, OAuthRefreshResult } from "./types.js";
/**
 * Look up a registered OAuth provider by its id.
 */
export declare function getOAuthProvider(id: OAuthProviderId): OAuthProviderInterface | undefined;
/**
 * Add (or replace) an OAuth provider in the registry.
 */
export declare function registerOAuthProvider(provider: OAuthProviderInterface): void;
/**
 * List every OAuth provider currently in the registry.
 */
export declare function getOAuthProviders(): OAuthProviderInterface[];
/**
 * @deprecated Prefer getOAuthProviders(), which returns the full provider objects.
 */
export declare function getOAuthProviderInfoList(): OAuthProviderInfo[];
/**
 * Renew a credential through whichever provider owns it.
 * @deprecated Call getOAuthProvider(id).refreshToken() directly instead.
 */
export declare function refreshOAuthToken(providerId: OAuthProviderId, credentials: OAuthCredentials): Promise<OAuthCredentials>;
/**
 * Resolve a provider's API key from its stored OAuth credential, renewing the
 * credential first when it has already expired.
 *
 * @returns The API key plus the (possibly refreshed) credential, or null when no
 *          credential exists for the provider.
 * @throws When a refresh is needed but fails.
 */
export declare function getOAuthApiKey(providerId: OAuthProviderId, credentials: Record<string, OAuthCredentials>): Promise<{
    newCredentials: OAuthCredentials;
    apiKey: string;
} | null>;
export declare function ensureFreshOAuthCredentials(providerId: OAuthProviderId, credentials: OAuthCredentials): Promise<OAuthRefreshResult>;
