pub fn check_trifecta<I>(tags: I, allow_trifecta: bool) -> TrifectaVerdictwhere
I: IntoIterator<Item = TrifectaTag>,Expand description
Pure Rule-of-Two check. Folds the tags of a granted tool set (OR across
legs) and judges the accumulated budget:
- fewer than three legs →
TrifectaVerdict::Ok(any two is fine); - all three legs →
TrifectaVerdict::RefusedTrifecta, unlessallow_trifectadowngrades it toTrifectaVerdict::AllowedWithWarning.
Structural only — it never inspects tool content and never asks the model to judge; it is a budget on co-located capability. Call it over the tags of the already-narrowed grant and before the grant is handed out: refusing once a child already holds the capability is too late.