/**
 * @license
 * Copyright 2026 HopCode Team Team
 * SPDX-License-Identifier: Apache-2.0
 */
import { AuthType, type ContentGeneratorConfig, type ContentGeneratorConfigSources } from '@hoptrendy/hopcode-core';
import type { Settings } from '../config/settings.js';
export interface CliGenerationConfigInputs {
    argv: {
        model?: string | undefined;
        openaiApiKey?: string | undefined;
        openaiBaseUrl?: string | undefined;
        openaiLogging?: boolean | undefined;
        openaiLoggingDir?: string | undefined;
    };
    settings: Settings;
    selectedAuthType: AuthType | undefined;
    /**
     * Injectable env for testability. Defaults to process.env at callsites.
     */
    env?: Record<string, string | undefined>;
}
export interface ResolvedCliGenerationConfig {
    /** The resolved model id (may be empty string if not resolvable at CLI layer) */
    model: string;
    /** API key for OpenAI-compatible auth */
    apiKey: string;
    /** Base URL for OpenAI-compatible auth */
    baseUrl: string;
    /** The full generation config to pass to core Config */
    generationConfig: Partial<ContentGeneratorConfig>;
    /** Source attribution for each resolved field */
    sources: ContentGeneratorConfigSources;
    /** Warnings generated during resolution */
    warnings: string[];
}
export declare function getAuthTypeFromEnv(): AuthType | undefined;
/**
 * Unified resolver for CLI generation config.
 *
 * Precedence (for OpenAI auth):
 * - model: argv.model > OPENAI_MODEL > HOPCODE_MODEL > settings.model.name
 * - apiKey: argv.openaiApiKey > OPENAI_API_KEY > settings.security.auth.apiKey
 * - baseUrl: argv.openaiBaseUrl > OPENAI_BASE_URL > settings.security.auth.baseUrl
 *
 * For non-OpenAI auth, only argv.model override is respected at CLI layer.
 */
export declare function resolveCliGenerationConfig(inputs: CliGenerationConfigInputs): ResolvedCliGenerationConfig;
