/**
 * CAE enforcement allowlist — enumerated blocks only (`.ai/cae/enforcement-lane.md`).
 */
/**
 * Pilot: block `enable-plugin` when phase-70 policy activation is present in the effective bundle.
 * Enforcement remains opt-in via `kit.cae.enforcement.enabled`.
 */
export const CAE_ENFORCEMENT_BLOCK_ALLOWLIST = [
    {
        id: "pilot-enable-plugin-when-phase70-policy-activation",
        commandNameExact: "enable-plugin",
        whenBundle: (bundle) => {
            const fam = bundle.families;
            return (fam?.policy ?? []).some((p) => p.activationId === "cae.activation.policy.phase70-playbook");
        }
    }
];
export function findCaeEnforcementBlock(commandName, bundle) {
    for (const row of CAE_ENFORCEMENT_BLOCK_ALLOWLIST) {
        if (row.commandNameExact !== commandName)
            continue;
        if (row.whenBundle) {
            if (row.whenBundle(bundle))
                return row;
        }
        else {
            return row;
        }
    }
    return null;
}
