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
38
39
40
41
42
43
44
45
46
47
//! # pe-tools — Tool system for Potential Expectations
//!
//! Provides the tool abstraction and execution infrastructure:
//!
//! - [`Tool`] trait — interface every callable tool implements
//! - [`FunctionTool`] — wraps any async function as a tool
//! - [`ToolRegistry`] — stores and retrieves tools by name
//! - [`ToolNode`] — built-in graph node that handles parallel tool execution
//! - [`ToolCallInterceptor`] — hook to inspect/modify tool calls before execution
//! - [`InjectedState`], [`InjectedStore`] — dependency injection markers
//! - [`tools_condition`] — standard ReAct routing condition
//!
//! ## Usage
//!
//! ```ignore
//! // Register tools
//! let mut registry = ToolRegistry::new();
//! registry.register(my_search_tool)?;
//! registry.register(my_calculator_tool)?;
//!
//! // Create a ToolNode for the graph
//! let tool_node = ToolNode::<MyState>::new(Arc::new(registry));
//!
//! // Wire into ReAct pattern
//! graph.add_node("tools", tool_node);
//! graph.add_conditional_edge("chat", tools_condition::<MyState>);
//! graph.add_edge("tools", "chat");
//! ```
// Re-export primary types at crate root
pub use tools_condition;
pub use ;
pub use ;
pub use ToolRegistry;
pub use ;
pub use ;
pub use ToolNode;