import type { ModelChoice, PromptDescriptor, PromptLibrary } from "./prompts.js"; import type { PromptFn } from "./types.js"; /** * Rejects explicitly supplied but empty/whitespace-only flag values. * * An explicit flag always means the user asked for something specific, so an * empty value is a mistake rather than a request for the default: it must never * fall back to a default, a stored credential or be silently dropped. */ export declare function requireNonEmpty(value: string, label: string): string; export interface ApiKeyStore { read(options?: { readOnly?: boolean; }): Promise; write(value: string): Promise; } export interface EnsureOptionInput { value?: string; fallback?: string; descriptor: PromptDescriptor; } export interface ResolveApiKeyInput { value?: string; envValue?: string; dryRun: boolean; assumeYes?: boolean; allowStored?: boolean; } export interface ResolveModelInput { value?: string; assumeDefault?: boolean; defaultValue: string; choices?: ReadonlyArray; /** Short names accepted on the command line, mapped to their catalog id. */ aliases?: Readonly>; /** Set when `choices` is the complete catalog, so unknown ids can be rejected. */ strictChoices?: boolean; label: string; onResolve?: (label: string, value: string) => void; } export interface ResolveReasoningInput { value: string; /** Levels the selected model accepts; anything else is rejected. */ levels: ReadonlyArray; label: string; onResolve?: (label: string, value: string) => void; } export interface OptionResolvers { ensure(input: EnsureOptionInput): Promise; resolveModel(input: ResolveModelInput): Promise; resolveReasoning(input: ResolveReasoningInput): Promise; resolveConfigName(value: string | undefined, defaultValue: string): Promise; resolveApiKey(input: ResolveApiKeyInput): Promise; } export interface OptionResolverInit { prompts: PromptFn; promptLibrary: PromptLibrary; apiKeyStore: ApiKeyStore; confirm: (message: string) => Promise; checkAuth: (apiKey: string) => Promise; loginViaOAuth?: () => Promise; } export declare function createOptionResolvers(init: OptionResolverInit): OptionResolvers;