export function codexNativeFeatureState(input) {
    const blockers = uniq(input.blockers || []);
    return {
        ok: input.ok && blockers.length === 0,
        status: input.ok && blockers.length === 0 ? 'available' : input.unavailableStatus || (blockers.length ? 'blocked' : 'unavailable'),
        source: input.source,
        artifact_path: input.artifact_path ?? null,
        evidence: uniq(input.evidence || []),
        blockers,
        warnings: uniq(input.warnings || [])
    };
}
export function computeCodexNativeInvocationDefaults(matrix) {
    const features = matrix.features;
    const hookStatus = features.hook_approval.status;
    return {
        loop_worker_role_strategy: features.agent_type.ok ? 'agent_type' : 'message-role',
        qa_visual_review_strategy: features.app_handoff.ok ? 'app-handoff' : 'headless-artifact',
        research_source_strategy: features.mcp_inventory.ok ? 'mcp-plugin-candidates' : features.code_mode_web_search.ok ? 'web-sources' : 'local-files',
        image_followup_strategy: features.image_path_exposure.ok ? 'model-visible-path' : 'artifact-path',
        hook_evidence_policy: hookStatus === 'available' ? 'approved-only' : hookStatus === 'unavailable' ? 'not-installed' : 'unknown-do-not-count',
        skill_bridge_strategy: features.skill_sync.ok || features.skill_picker.ok ? 'sks-managed-skills' : 'cli-only'
    };
}
export function matrixFeatureOk(matrix, key) {
    return matrix.features[key].ok;
}
export function uniq(values) {
    return [...new Set(values.map((value) => String(value || '').trim()).filter(Boolean))];
}
//# sourceMappingURL=codex-native-feature-matrix.js.map