//! Tool execution middleware pipeline.
//!
//! Middleware hooks that run before and after tool execution, allowing
//! cross-cutting concerns like logging, rate limiting, and auditing.
use HashMap;
use crate;
/// Middleware that can intercept tool execution.
///
/// Implementations can inspect/modify tool calls before execution and
/// observe results after execution. If `before_execute` returns an error,
/// the tool is not executed and the error is returned as a failed `ToolResult`.