pub enum AllowBehavior {
Allow {
updated_input: Value,
updated_permissions: Option<Value>,
},
Deny {
message: String,
interrupt: bool,
},
}Expand description
Serialisable shape for the response field inside a successful
can_use_tool response.
Wraps the CLI’s PermissionResultAllow / PermissionResultDeny.
NOTE: wire keys are camelCase (updatedInput, updatedPermissions) -
do not rename to snake_case.
Variants§
Allow
Allow the call. updated_input is ALWAYS populated on the wire -
when the callback had no override, caller must echo the original
input into this field (the CLI always does).
Fields
Deny
Deny the call with a user-visible message, optionally signalling that the model should be interrupted rather than continue a turn.
Trait Implementations§
Source§impl Clone for AllowBehavior
impl Clone for AllowBehavior
Source§impl Debug for AllowBehavior
impl Debug for AllowBehavior
Source§impl<'de> Deserialize<'de> for AllowBehavior
impl<'de> Deserialize<'de> for AllowBehavior
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
Auto Trait Implementations§
impl Freeze for AllowBehavior
impl RefUnwindSafe for AllowBehavior
impl Send for AllowBehavior
impl Sync for AllowBehavior
impl Unpin for AllowBehavior
impl UnsafeUnpin for AllowBehavior
impl UnwindSafe for AllowBehavior
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