1pub mod config;
4pub use config::ToolConfig;
5
6pub mod calculator;
7pub mod fence;
8pub mod http_tool;
9pub mod plugins;
10pub(crate) mod registry;
11pub mod rhai_tool;
12pub mod script_tool;
13pub mod tool_service;
14pub mod tools;
15
16#[cfg(any(feature = "postgres", test))]
17pub(crate) mod runtime_registry;
18
19#[cfg(any(feature = "postgres", test))]
20pub(crate) use runtime_registry::RuntimeToolRegistry;
21
22#[cfg(any(feature = "postgres", test))]
23pub mod sql_tool;
24
25#[cfg(any(feature = "search-tools", test))]
26pub mod search;
27
28#[cfg(any(feature = "search-tools", test))]
29pub mod web_scrape;
30
31#[cfg(any(feature = "mcp", test))]
32pub mod mcp_bridge;
33
34#[cfg(any(feature = "postgres", test))]
35pub mod connectors;
36
37pub use calculator::{Calculator, CalculatorConfig, CalculatorService};
38pub use plugins::register_plugins;
39pub use registry::Tool;
40pub use rhai_tool::{RhaiTool, RhaiToolConfig};
41pub use tool_service::Tools;
42
43#[cfg(test)]
44mod tests {
45 use super::{calculator::Calculator, Tool, Tools};
46 use std::sync::Arc;
47
48 #[test]
49 fn calculator_and_tools_are_wired() {
50 let tools = Tools::from_static([Arc::new(Calculator) as Arc<dyn Tool>]);
51 let ctx = cordis::Context::new_root();
52 assert!(tools.resolve(&ctx, "calculator").is_some());
53 assert!(tools
54 .list(&ctx)
55 .iter()
56 .any(|definition| definition.name == "calculator"));
57 }
58
59 #[test]
60 fn search_and_scrape_modules_compile_under_test_cfg() {
61 let _ = std::any::type_name::<crate::search::WebSearch>();
62 let _ = std::any::type_name::<crate::web_scrape::WebScrape>();
63 }
64}