import type { CodexV6CredentialLossPrompt } from "./types.js"; import { type CodexAccountSummary } from "./protocol.js"; export interface CodexTuiOptions { columns?: number; color?: boolean; unicode?: boolean; now?: number; } export declare function quotaRemainingPercent(usedPercent: number | null | undefined): number | undefined; export declare function renderQuotaBar(remaining: number | undefined, width: number, options?: Pick): string; export declare function terminalCellWidth(value: string): number; export declare function formatQuotaRefresh(value: number | string | null | undefined, now?: number): string; export interface CodexSubscriptionState { subscriptionStatus?: string | null; subscriptionExpiresAt?: number | string | null; } export declare function isCodexSubscriptionExpired(subscription: CodexSubscriptionState, now?: number): boolean; export declare function isCodexAccountAvailable(account: CodexAccountSummary, now?: number): boolean; export declare function codexAccountStatusText(account: CodexAccountSummary, now?: number): string | undefined; export declare function renderCodexAccountDashboard(accounts: readonly CodexAccountSummary[], selectedAccountId?: string, tuiOptions?: CodexTuiOptions): string; export interface CodexAccountSelectionOptions { requested?: string; selectedAccountId?: string; interactive?: boolean; nonInteractiveCommand?: string; noAvailableMessage?: string; output?: NodeJS.WritableStream; prompt?: typeof promptCodexAccount; } /** * Resolve an explicit account alias or present the shared quota-aware account * picker when several accounts are available. */ export declare function selectCodexAccount(accounts: readonly CodexAccountSummary[], options?: CodexAccountSelectionOptions): Promise; export declare function promptCodexAccount(accounts: readonly CodexAccountSummary[], selectedAccountId?: string): Promise; export declare function confirmCodexV6CredentialReplacement(input: CodexV6CredentialLossPrompt): Promise;