/**
 * Fixed mapping table: preset → concrete per-provider values.
 * This is the single authority for preset compilation; the resolver and skills
 * must not re-map these values.
 *
 * Design notes:
 * - cost-conscious holds Claude at `sonnet` (no Haiku reviewers by default).
 * - The table is `as const` to preserve literal types for downstream consumers.
 */
export const DISPATCH_CEILING_PRESETS = {
    balanced: { codex: 'high', claude: 'sonnet' },
    maximum: { codex: 'xhigh', claude: 'opus' },
    'cost-conscious': { codex: 'medium', claude: 'sonnet' },
};
export const DISPATCH_POLICY_PRESETS = {
    economy: { codex: 'medium', claude: 'sonnet' },
    balanced: { codex: 'high', claude: 'sonnet' },
    high: { codex: 'xhigh', claude: 'opus' },
    frontier: { codex: 'xhigh', claude: 'fable' },
};
/**
 * Compile a preset label into concrete per-provider values.
 * The returned `preset` field is provenance only; runtime dispatch reads
 * only `providers`.
 */
export function compileDispatchCeilingPreset(preset) {
    return {
        preset,
        providers: { ...DISPATCH_CEILING_PRESETS[preset] },
    };
}
/**
 * Pass through advanced/manual per-provider values with no `preset` key.
 * Advanced selections do not set a preset so the persisted shape omits it.
 */
export function compileAdvancedDispatchCeiling(providers) {
    return { providers };
}
export function dispatchPolicyProviderTargets(policy) {
    return { ...DISPATCH_POLICY_PRESETS[policy] };
}
/**
 * Compile the managed dispatch-policy ladder into concrete provider caps.
 * `uncapped` is intentionally explicit but has no provider caps.
 */
export function compileDispatchPolicyPreset(policy) {
    if (policy === 'uncapped') {
        return { mode: 'managed', policy };
    }
    return {
        mode: 'managed',
        policy,
        providers: { ...DISPATCH_POLICY_PRESETS[policy] },
    };
}
