brainwires_tool_system/
lib.rs1#![deny(missing_docs)]
2pub use brainwires_core::{
35 CommitResult, IdempotencyRecord, IdempotencyRegistry, StagedWrite, StagingBackend, Tool,
36 ToolContext, ToolInputSchema, ToolResult,
37};
38
39mod error;
42pub mod executor;
43mod registry;
44pub mod sanitization;
45mod tool_search;
46
47#[cfg(feature = "native")]
50mod bash;
51#[cfg(feature = "native")]
52mod file_ops;
53#[cfg(feature = "native")]
54mod git;
55#[cfg(feature = "native")]
56mod search;
57#[cfg(feature = "native")]
58pub mod transaction;
59#[cfg(feature = "native")]
60pub mod validation;
61#[cfg(feature = "native")]
62mod web;
63
64#[cfg(any(feature = "orchestrator", feature = "orchestrator-wasm"))]
67pub mod orchestrator;
68
69#[cfg(feature = "interpreters")]
70mod code_exec;
71
72#[cfg(feature = "rag")]
73mod semantic_search;
74
75#[cfg(feature = "rag")]
76mod tool_embedding;
77
78#[cfg(feature = "smart-router")]
79pub mod smart_router;
80
81#[cfg(feature = "openapi")]
82pub mod openapi;
83
84pub use error::{ResourceType, RetryStrategy, ToolErrorCategory, ToolOutcome, classify_error};
88pub use executor::{PreHookDecision, ToolExecutor, ToolPreHook};
89pub use registry::{ToolCategory, ToolRegistry};
90pub use sanitization::{
91 contains_sensitive_data, filter_tool_output, is_injection_attempt, redact_sensitive_data,
92 sanitize_external_content, wrap_with_content_source,
93};
94pub use tool_search::ToolSearchTool;
95
96#[cfg(feature = "native")]
98pub use bash::BashTool;
99#[cfg(feature = "native")]
100pub use file_ops::FileOpsTool;
101#[cfg(feature = "native")]
102pub use git::GitTool;
103#[cfg(feature = "native")]
104pub use search::SearchTool;
105#[cfg(feature = "native")]
106pub use transaction::TransactionManager;
107#[cfg(feature = "native")]
108pub use validation::{ValidationTool, get_validation_tools};
109#[cfg(feature = "native")]
110pub use web::WebTool;
111
112#[cfg(any(feature = "orchestrator", feature = "orchestrator-wasm"))]
114pub use orchestrator::OrchestratorTool;
115
116#[cfg(feature = "interpreters")]
117pub use code_exec::CodeExecTool;
118
119#[cfg(feature = "rag")]
120pub use semantic_search::SemanticSearchTool;
121
122#[cfg(feature = "rag")]
123pub use tool_embedding::ToolEmbeddingIndex;
124
125#[cfg(feature = "smart-router")]
126pub use smart_router::{
127 analyze_messages, analyze_query, get_context_for_analysis, get_smart_tools,
128 get_smart_tools_with_mcp, get_tools_for_categories,
129};
130
131#[cfg(feature = "openapi")]
132pub use openapi::{
133 HttpMethod, OpenApiAuth, OpenApiEndpoint, OpenApiParam, OpenApiTool, execute_openapi_tool,
134 openapi_to_tools,
135};