pub struct ToolHook {
pub pattern: String,
pub pre: Option<PreToolHookFn>,
pub post: Option<PostToolHookFn>,
}Expand description
A registered tool hook with a name pattern and callbacks.
Fields§
§pattern: StringGlob-style pattern matched against tool names (e.g. "*", "exec*", "read_file").
pre: Option<PreToolHookFn>Called before tool execution. Return Deny to reject, Modify to rewrite args.
post: Option<PostToolHookFn>Called after tool execution with the result text. Return Modify to rewrite.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ToolHook
impl !RefUnwindSafe for ToolHook
impl !Send for ToolHook
impl !Sync for ToolHook
impl Unpin for ToolHook
impl UnsafeUnpin for ToolHook
impl !UnwindSafe for ToolHook
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