import type { BotConfig } from "../config/types.js"; import { type SecretInput, type SecretRef } from "../config/types.secrets.js"; import type { WizardPrompter } from "../wizard/prompts.js"; import type { ApplyAuthChoiceParams } from "./auth-choice.apply.js"; import { applyDefaultModelChoice } from "./auth-choice.default-model.js"; import type { SecretInputMode } from "./onboard-types.js"; export type SecretInputModePromptCopy = { modeMessage?: string; plaintextLabel?: string; plaintextHint?: string; refLabel?: string; refHint?: string; }; export type SecretRefOnboardingPromptCopy = { sourceMessage?: string; envVarMessage?: string; envVarPlaceholder?: string; envVarFormatError?: string; envVarMissingError?: (envVar: string) => string; noProvidersMessage?: string; envValidatedMessage?: (envVar: string) => string; providerValidatedMessage?: (provider: string, id: string, source: "file" | "exec") => string; }; export declare function promptSecretRefForOnboarding(params: { provider: string; config: BotConfig; prompter: WizardPrompter; preferredEnvVar?: string; copy?: SecretRefOnboardingPromptCopy; }): Promise<{ ref: SecretRef; resolvedValue: string; }>; export declare function createAuthChoiceAgentModelNoter(params: ApplyAuthChoiceParams): (model: string) => Promise; export interface ApplyAuthChoiceModelState { config: ApplyAuthChoiceParams["config"]; agentModelOverride: string | undefined; } export declare function createAuthChoiceModelStateBridge(bindings: { getConfig: () => ApplyAuthChoiceParams["config"]; setConfig: (config: ApplyAuthChoiceParams["config"]) => void; getAgentModelOverride: () => string | undefined; setAgentModelOverride: (model: string | undefined) => void; }): ApplyAuthChoiceModelState; export declare function createAuthChoiceDefaultModelApplier(params: ApplyAuthChoiceParams, state: ApplyAuthChoiceModelState): (options: Omit[0], "config" | "setDefaultModel" | "noteAgentModel" | "prompter">) => Promise; export declare function createAuthChoiceDefaultModelApplierForMutableState(params: ApplyAuthChoiceParams, getConfig: () => ApplyAuthChoiceParams["config"], setConfig: (config: ApplyAuthChoiceParams["config"]) => void, getAgentModelOverride: () => string | undefined, setAgentModelOverride: (model: string | undefined) => void): ReturnType; export declare function normalizeTokenProviderInput(tokenProvider: string | null | undefined): string | undefined; export declare function normalizeSecretInputModeInput(secretInputMode: string | null | undefined): SecretInputMode | undefined; export declare function resolveSecretInputModeForEnvSelection(params: { prompter: WizardPrompter; explicitMode?: SecretInputMode; copy?: SecretInputModePromptCopy; }): Promise; export declare function maybeApplyApiKeyFromOption(params: { token: string | undefined; tokenProvider: string | undefined; secretInputMode?: SecretInputMode; expectedProviders: string[]; normalize: (value: string) => string; setCredential: (apiKey: SecretInput, mode?: SecretInputMode) => Promise; }): Promise; export declare function ensureApiKeyFromOptionEnvOrPrompt(params: { token: string | undefined; tokenProvider: string | undefined; secretInputMode?: SecretInputMode; config: BotConfig; expectedProviders: string[]; provider: string; envLabel: string; promptMessage: string; normalize: (value: string) => string; validate: (value: string) => string | undefined; prompter: WizardPrompter; setCredential: (apiKey: SecretInput, mode?: SecretInputMode) => Promise; noteMessage?: string; noteTitle?: string; }): Promise; export declare function ensureApiKeyFromEnvOrPrompt(params: { config: BotConfig; provider: string; envLabel: string; promptMessage: string; normalize: (value: string) => string; validate: (value: string) => string | undefined; prompter: WizardPrompter; secretInputMode?: SecretInputMode; setCredential: (apiKey: SecretInput, mode?: SecretInputMode) => Promise; }): Promise;