pub struct AllowAllHooks;Expand description
Hooks that allow all tools without confirmation
Trait Implementations§
Source§impl AgentHooks for AllowAllHooks
impl AgentHooks for AllowAllHooks
Source§fn pre_tool_use<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_tool_name: &'life1 str,
_input: &'life2 Value,
_tier: ToolTier,
) -> Pin<Box<dyn Future<Output = ToolDecision> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn pre_tool_use<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_tool_name: &'life1 str,
_input: &'life2 Value,
_tier: ToolTier,
) -> Pin<Box<dyn Future<Output = ToolDecision> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Called before a tool is executed.
Return
ToolDecision::Allow to proceed, or block/require confirmation.Source§fn post_tool_use<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_tool_name: &'life1 str,
_result: &'life2 ToolResult,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn post_tool_use<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_tool_name: &'life1 str,
_result: &'life2 ToolResult,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Called after a tool completes execution.
Source§fn on_event<'life0, 'life1, 'async_trait>(
&'life0 self,
_event: &'life1 AgentEvent,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn on_event<'life0, 'life1, 'async_trait>(
&'life0 self,
_event: &'life1 AgentEvent,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Called when the agent emits an event.
Can be used for logging, metrics, or custom handling.
Source§fn on_error<'life0, 'life1, 'async_trait>(
&'life0 self,
_error: &'life1 Error,
) -> Pin<Box<dyn Future<Output = bool> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn on_error<'life0, 'life1, 'async_trait>(
&'life0 self,
_error: &'life1 Error,
) -> Pin<Box<dyn Future<Output = bool> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Called when an error occurs.
Return true to attempt recovery, false to abort.
Source§fn on_context_compact<'life0, 'life1, 'async_trait>(
&'life0 self,
_messages: &'life1 [Message],
) -> Pin<Box<dyn Future<Output = Option<String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn on_context_compact<'life0, 'life1, 'async_trait>(
&'life0 self,
_messages: &'life1 [Message],
) -> Pin<Box<dyn Future<Output = Option<String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Called when context is about to be compacted due to length.
Return a summary to use, or None to use default summarization.
Source§impl Clone for AllowAllHooks
impl Clone for AllowAllHooks
Source§fn clone(&self) -> AllowAllHooks
fn clone(&self) -> AllowAllHooks
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Default for AllowAllHooks
impl Default for AllowAllHooks
Source§fn default() -> AllowAllHooks
fn default() -> AllowAllHooks
Returns the “default value” for a type. Read more
impl Copy for AllowAllHooks
Auto Trait Implementations§
impl Freeze for AllowAllHooks
impl RefUnwindSafe for AllowAllHooks
impl Send for AllowAllHooks
impl Sync for AllowAllHooks
impl Unpin for AllowAllHooks
impl UnwindSafe for AllowAllHooks
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