import type { ActiveProvider } from "./commands/shared.js"; import type { CliEnvironment } from "./environment.js"; import type { HttpClient } from "./http.js"; export type ModelChoice = { title: string; value: string; }; export type ModelChoices = ReadonlyArray | ((ctx: { httpClient: HttpClient; provider: ActiveProvider; env: CliEnvironment; }) => Promise>); export interface PromptDescriptor { readonly name: TName; readonly message: string; readonly type?: string; readonly initial?: string | number; readonly choices?: ReadonlyArray; readonly validate?: (value: string | undefined) => string | undefined; } export interface ModelPromptInput { label: string; defaultValue: string; choices?: ModelChoices; /** Short names accepted on the command line, mapped to their catalog id. */ aliases?: Readonly>; /** Set when `choices` is the complete set the agent accepts, so unknown ids are rejected. */ strictChoices?: boolean; } export interface ResolvedModelPromptInput { label: string; defaultValue: string; choices?: ReadonlyArray; } /** Levels an agent accepts, as a function when support varies by model. */ export type ReasoningLevels = ReadonlyArray | ((model: string | undefined) => ReadonlyArray); export interface ReasoningEffortInput { label: string; levels: ReasoningLevels; } export interface ServiceSelectionInput { message: string; choices: ReadonlyArray; } export interface PromptLibrary { loginApiKey(): PromptDescriptor<"apiKey">; providerBaseUrl(label: string): PromptDescriptor<"baseUrl">; model(input: ResolvedModelPromptInput): PromptDescriptor<"model">; configName(defaultName: string): PromptDescriptor<"configName">; serviceSelection(input: ServiceSelectionInput): PromptDescriptor<"serviceSelection"> & { type: "select"; }; } export declare function createPromptLibrary(): PromptLibrary;