pub fn decide(
required: CapabilitySet,
granted: CapabilitySet,
policy: &CallPolicy,
tool_name: &str,
) -> GateOutcomeExpand description
The one pure decision: compare what the call requires with what it is
granted, under the argument-aware policy verdicts, and return the single
GateOutcome.
Precedence, pinned by test:
- hard policy veto ⇒
GateOutcome::Deny; - required ⊄ granted ⇒
GateOutcome::Escalatecarrying the missing set and a plain-language reason; - the policy demands a human (argument-aware gate or sandbox-denial
escalation) ⇒
GateOutcome::Escalatewith an empty missing set; - otherwise honor the argument transform or allow.
The engine is pure set algebra over the capability sets — it never
matches on a specific Capability, so extending the taxonomy requires
no change here (pinned by test).