pub enum AskForApproval {
UnlessTrusted,
OnFailure,
OnRequest,
Reject {
sandbox_approval: bool,
rules: bool,
mcp_elicitations: bool,
},
Never,
}Expand description
Policy controlling when the agent must ask the user for approval before acting.
Variants§
UnlessTrusted
Ask for approval unless the action is on a trusted path/resource.
OnFailure
Only ask after a tool call fails.
OnRequest
Ask every time a tool call is requested.
Reject
Reject the action without asking, with details on which categories are blocked.
Never
Never ask; auto-approve all actions.
Trait Implementations§
Source§impl Clone for AskForApproval
impl Clone for AskForApproval
Source§fn clone(&self) -> AskForApproval
fn clone(&self) -> AskForApproval
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 AskForApproval
impl Debug for AskForApproval
Source§impl<'de> Deserialize<'de> for AskForApproval
impl<'de> Deserialize<'de> for AskForApproval
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>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for AskForApproval
Source§impl PartialEq for AskForApproval
impl PartialEq for AskForApproval
Source§fn eq(&self, other: &AskForApproval) -> bool
fn eq(&self, other: &AskForApproval) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for AskForApproval
impl Serialize for AskForApproval
impl StructuralPartialEq for AskForApproval
Auto Trait Implementations§
impl Freeze for AskForApproval
impl RefUnwindSafe for AskForApproval
impl Send for AskForApproval
impl Sync for AskForApproval
impl Unpin for AskForApproval
impl UnsafeUnpin for AskForApproval
impl UnwindSafe for AskForApproval
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