pub enum ApprovalDecision {
Approve,
Reject,
RejectWithFeedback {
feedback: String,
},
RejectAuto {
reason: String,
},
}Expand description
The user’s decision on an approval request.
Variants§
Approve
Approve and execute the action.
Reject
Reject the action (interactive: a human said no).
RejectWithFeedback
Reject with feedback (tells the LLM what to change).
RejectAuto
Reject automatically, with no human in the loop. Distinct from
ApprovalDecision::Reject because the model needs to know why it was
rejected to act intelligently — a human “no” is a signal to
re-plan or ask, but an auto-reject (e.g. headless mode
refusing destructive ops by policy) is a structural constraint
the model should adapt around for the rest of the session.
#1022 B15: pre-fix, headless mode emitted Reject for
auto-blocked destructive tools, which the model saw as "User rejected this action." — indistinguishable from a real human
reject. The model would then ask the (nonexistent) user how to
proceed, then time out.
Trait Implementations§
Source§impl Clone for ApprovalDecision
impl Clone for ApprovalDecision
Source§fn clone(&self) -> ApprovalDecision
fn clone(&self) -> ApprovalDecision
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ApprovalDecision
impl Debug for ApprovalDecision
Source§impl<'de> Deserialize<'de> for ApprovalDecision
impl<'de> Deserialize<'de> for ApprovalDecision
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl PartialEq for ApprovalDecision
impl PartialEq for ApprovalDecision
Source§impl Serialize for ApprovalDecision
impl Serialize for ApprovalDecision
impl StructuralPartialEq for ApprovalDecision
Auto Trait Implementations§
impl Freeze for ApprovalDecision
impl RefUnwindSafe for ApprovalDecision
impl Send for ApprovalDecision
impl Sync for ApprovalDecision
impl Unpin for ApprovalDecision
impl UnsafeUnpin for ApprovalDecision
impl UnwindSafe for ApprovalDecision
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more