/**
 * Sign-in flow for ChatGPT (Codex) accounts over OAuth.
 *
 * NOTE: this module reaches for Node's crypto and http modules to run the local
 * OAuth callback server, so it is meant for CLI use and will not work in a browser.
 */
import type { OAuthCredentials, OAuthPrompt, OAuthProviderInterface } from "./types.js";
/**
 * Drive the ChatGPT (Codex) OAuth sign-in end to end.
 *
 * @param options.onAuth - Called once at the start with the authorize URL (and any
 *   instructions) so the caller can surface or open it.
 * @param options.onPrompt - Fallback path for collecting a hand-pasted code, used
 *   only when onManualCodeInput is not supplied.
 * @param options.onProgress - Optional callback for intermediate status text.
 * @param options.onManualCodeInput - Optional promise that yields a code the user
 *   pasted. We wait on it and the local callback server together and take whichever
 *   answer arrives first, so a paste box and the browser round-trip can coexist.
 * @param options.originator - Originator tag sent to OpenAI; defaults to the value
 *   resolved by this module.
 */
export declare function loginOpenAICodex(options: {
    onAuth: (info: {
        url: string;
        instructions?: string;
    }) => void;
    onPrompt: (prompt: OAuthPrompt) => Promise<string>;
    onProgress?: (message: string) => void;
    onManualCodeInput?: () => Promise<string>;
    originator?: string;
}): Promise<OAuthCredentials>;
/**
 * Renew a ChatGPT (Codex) OAuth credential from its refresh token.
 */
export declare function refreshOpenAICodexToken(refreshToken: string): Promise<OAuthCredentials>;
export declare const openaiCodexOAuthProvider: OAuthProviderInterface;
