pub enum GateOutcome {
Allow,
Modify(String),
InjectContext(String),
Escalate {
reason: String,
missing: CapabilitySet,
},
Deny(String),
}Expand description
The single unified gate result for one tool call — replaces both the
argument-aware ToolDecision and the needs_approval/override booleans.
Variants§
Allow
Execute the call as proposed.
Modify(String)
Execute the call with rewritten arguments.
InjectContext(String)
Prepend this context as an internal-only note, then execute.
Escalate
Pause for a human decision.
Fields
§
reason: StringWhy, in plain language for the approval card. Empty for an ordinary policy/sandbox gate (the edge renders its default prompt); non-empty when capabilities are missing.
§
missing: CapabilitySetThe required capabilities the call’s granted set does not cover. Empty when the escalation is a policy/sandbox gate rather than a capability shortfall.
Deny(String)
Block the call without a human prompt; the reason is surfaced to the model as the tool result so it can adapt.
Implementations§
Trait Implementations§
Source§impl Clone for GateOutcome
impl Clone for GateOutcome
Source§fn clone(&self) -> GateOutcome
fn clone(&self) -> GateOutcome
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for GateOutcome
impl Debug for GateOutcome
impl Eq for GateOutcome
Source§impl PartialEq for GateOutcome
impl PartialEq for GateOutcome
Source§fn eq(&self, other: &GateOutcome) -> bool
fn eq(&self, other: &GateOutcome) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for GateOutcome
Auto Trait Implementations§
impl Freeze for GateOutcome
impl RefUnwindSafe for GateOutcome
impl Send for GateOutcome
impl Sync for GateOutcome
impl Unpin for GateOutcome
impl UnsafeUnpin for GateOutcome
impl UnwindSafe for GateOutcome
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more