Expand description
Tool Execution Hooks System
This module provides a hook system for tool execution, allowing pre and post execution checks and modifications.
§Hook Types
PreExecute: Before tool execution, can block or modify paramsPostExecute: After tool execution, can modify result
§Usage
// Create a hook registry
let registry = HookRegistry::new();
// Register hooks
registry.register(Box::new(CodeQualityHook::new("pre")));
// Execute with hooks
let result = registry.execute_with_hooks(tool, params);Structs§
- Hook
Registry - Hook registry for managing multiple hooks
Enums§
- Hook
Result - Hook execution result
Traits§
- Tool
Hook - Tool execution hook trait
Functions§
- global_
hook_ registry - Get the global hook registry
- set_
global_ hook_ registry - Set the global hook registry