const CLAUDE_MODELS = [
    {
        value: 'claude-sonnet-4-6',
        label: 'Claude Sonnet 4.6',
        effortOptions: ['low', 'medium', 'high', 'xhigh', 'max'],
        defaultEffort: 'medium'
    },
    {
        value: 'sonnet',
        label: 'Sonnet',
        effortOptions: ['low', 'medium', 'high', 'xhigh', 'max'],
        defaultEffort: 'medium'
    },
    {
        value: 'claude-opus-4-8',
        label: 'Claude Opus 4.8',
        effortOptions: ['low', 'medium', 'high', 'xhigh', 'max'],
        defaultEffort: 'high'
    },
    {
        value: 'claude-opus-4-7',
        label: 'Claude Opus 4.7',
        effortOptions: ['low', 'medium', 'high', 'xhigh', 'max'],
        defaultEffort: 'high'
    },
    {
        value: 'opus',
        label: 'Opus',
        effortOptions: ['low', 'medium', 'high', 'xhigh', 'max'],
        defaultEffort: 'high'
    },
    {
        value: 'claude-opus-4-6',
        label: 'Claude Opus 4.6',
        effortOptions: ['low', 'medium', 'high', 'xhigh', 'max'],
        defaultEffort: 'high'
    },
    {
        value: 'claude-opus-4-5',
        label: 'Claude Opus 4.5',
        effortOptions: ['low', 'medium', 'high', 'xhigh', 'max'],
        defaultEffort: 'high'
    },
    {
        value: 'claude-haiku-4-5',
        label: 'Claude Haiku 4.5',
        effortOptions: ['low', 'medium', 'high'],
        defaultEffort: 'low'
    },
    {
        value: 'haiku',
        label: 'Haiku',
        effortOptions: ['low', 'medium', 'high'],
        defaultEffort: 'low'
    }
];
const CODEX_MODELS = [
    {
        value: 'gpt-5.5',
        label: 'GPT-5.5',
        effortOptions: ['low', 'medium', 'high', 'xhigh'],
        defaultEffort: 'medium'
    },
    {
        value: 'gpt-5.4',
        label: 'GPT-5.4',
        effortOptions: ['low', 'medium', 'high', 'xhigh'],
        defaultEffort: 'medium'
    },
    {
        value: 'gpt-5-codex',
        label: 'GPT-5 Codex',
        effortOptions: ['low', 'medium', 'high', 'xhigh'],
        defaultEffort: 'high'
    },
    {
        value: 'gpt-5.4-mini',
        label: 'GPT-5.4 Mini',
        effortOptions: ['low', 'medium', 'high', 'xhigh'],
        defaultEffort: 'medium'
    },
    {
        value: 'gpt-5.3-codex',
        label: 'GPT-5.3 Codex',
        effortOptions: ['low', 'medium', 'high', 'xhigh'],
        defaultEffort: 'medium'
    },
    {
        value: '5.3',
        label: '5.3',
        effortOptions: ['low', 'medium', 'high', 'xhigh'],
        defaultEffort: 'medium'
    },
    {
        value: 'gpt-5.3',
        label: 'GPT-5.3',
        effortOptions: ['low', 'medium', 'high', 'xhigh'],
        defaultEffort: 'medium'
    },
    {
        value: '5.3-spark',
        label: '5.3 Spark',
        effortOptions: ['low', 'medium', 'high', 'xhigh'],
        defaultEffort: 'medium'
    },
    {
        value: 'gpt-5.3-spark',
        label: 'GPT-5.3 Spark',
        effortOptions: ['low', 'medium', 'high', 'xhigh'],
        defaultEffort: 'medium'
    }
];
const PROVIDER_CAPABILITIES = {
    claude: {
        id: 'claude',
        label: 'Claude Agent SDK',
        command: 'claude',
        defaultModel: 'claude-sonnet-4-6',
        commitMessageDefaultModel: 'claude-haiku-4-5',
        defaultEffort: 'medium',
        fallbackEffortOptions: ['low', 'medium', 'high', 'xhigh', 'max'],
        models: CLAUDE_MODELS
    },
    codex: {
        id: 'codex',
        label: 'OpenAI Codex',
        command: 'codex',
        defaultModel: 'gpt-5.5',
        commitMessageDefaultModel: 'gpt-5.4-mini',
        defaultEffort: 'medium',
        fallbackEffortOptions: ['low', 'medium', 'high', 'xhigh'],
        models: CODEX_MODELS
    }
};
function uniqueEffortOptions(options) {
    return [...new Set(options.map((option) => option.trim()).filter(Boolean))];
}
export function providerCapability(provider) {
    return PROVIDER_CAPABILITIES[provider];
}
export function providerModelOptions(provider) {
    if (!provider)
        return [];
    return providerCapability(provider).models;
}
export function providerModelCapability(provider, model) {
    const normalized = model?.trim() ?? '';
    if (!provider || !normalized)
        return null;
    return providerModelOptions(provider).find((option) => option.value === normalized) ?? null;
}
export function providerDefaultModel(provider) {
    if (!provider)
        return null;
    return providerCapability(provider).defaultModel;
}
export function providerCommitMessageDefaultModel(provider) {
    if (!provider)
        return null;
    return providerCapability(provider).commitMessageDefaultModel;
}
export function providerEffortOptions(provider, model) {
    if (!provider)
        return [''];
    const capability = providerCapability(provider);
    const modelCapability = providerModelCapability(provider, model) ?? null;
    const modelValue = model?.trim() ? model.trim() : capability.defaultModel;
    const effectiveModelCapability = modelCapability ?? (modelValue ? capability.models.find((option) => option.value === modelValue) ?? null : null);
    const options = uniqueEffortOptions(effectiveModelCapability?.effortOptions?.length
        ? effectiveModelCapability.effortOptions
        : capability.fallbackEffortOptions);
    return ['', ...options];
}
export function providerDefaultEffort(provider, model) {
    if (!provider)
        return '';
    const capability = providerCapability(provider);
    const modelCapability = providerModelCapability(provider, model);
    if (modelCapability?.defaultEffort)
        return modelCapability.defaultEffort;
    return capability.defaultEffort ?? '';
}
export function normalizeProviderEffort(provider, model, effort) {
    const trimmedEffort = effort?.trim() ?? '';
    if (!trimmedEffort)
        return '';
    const options = providerEffortOptions(provider, model).filter((option) => option.length > 0);
    if (options.includes(trimmedEffort))
        return trimmedEffort;
    const defaultEffort = providerDefaultEffort(provider, model);
    if (defaultEffort && options.includes(defaultEffort))
        return defaultEffort;
    return options[0] ?? '';
}
//# sourceMappingURL=agent-provider-catalog.js.map