//! Unified function call routing for AI agents.
//!
//! Provides a type-safe, request-scoped tool registry and executor.
//!
//! # Architecture
//!
//! - [`definition`](definition) — Tool schemas: name, description, parameter JSON schema
//! - [`registry`](registry) — Request-scoped `ToolRegistry` mapping names → handlers
//! - [`call`](call) — Execution types: `ToolCall`, `ToolResult`, `ToolError`
//! - [`context`](context) — Execution context passed to each tool handler
//! - [`executor`](executor) — `ToolExecutor` coordinating lookup → execute → result
//! - [`rig_adapter`](rig_adapter) — Adapter to bridge with rig's Tool trait
//! - [`examples`](examples) — `#[tool]` macro usage guide

pub mod call;
pub mod context;
pub mod definition;
pub mod executor;
pub mod registry;

#[cfg(feature = "rig")]
pub mod rig_adapter;

#[cfg(test)]
mod examples;

pub use call::{ToolCall, ToolCallResult, ToolError, ToolResult};
pub use context::ToolContext;
pub use definition::{ToolDefinition, ToolParam, ToolSchema};
pub use executor::ToolExecutor;
pub use registry::{ToolHandler, ToolRegistry};
