1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
//! Client-side tool execution for HTTP-based LLM providers.
//!
//! This module provides a [`Tool`] trait and [`ToolRegistry`] that enable
//! HTTP providers to execute tools locally and loop back results to the model,
//! turning a single-turn API call into a full agentic loop.
//!
//! # Architecture
//!
//! 1. Tools are registered in a [`ToolRegistry`].
//! 2. The registry converts tools to the OpenAI `tools` array format for the request.
//! 3. When the model responds with `tool_calls`, the provider executes them via the registry.
//! 4. Results are appended to the messages and the model is called again.
//!
//! # Feature Gates
//!
//! Each concrete tool is behind its own feature flag:
//! - `tool-bash` - `BashTool`
//! - `tool-read-file` - `ReadFileTool`
//! - `tool-web-fetch` - `WebFetchTool`
//! - `tool-web-search` - `WebSearchTool`
pub use ToolRegistry;
pub use ;