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
78pub mod smart_router;
79
80#[cfg(feature = "openapi")]
81pub mod openapi;
82
83pub use error::{ResourceType, RetryStrategy, ToolErrorCategory, ToolOutcome, classify_error};
87pub use executor::{PreHookDecision, ToolExecutor, ToolPreHook};
88pub use registry::{ToolCategory, ToolRegistry};
89pub use sanitization::{
90 contains_sensitive_data, filter_tool_output, is_injection_attempt, redact_sensitive_data,
91 sanitize_external_content, wrap_with_content_source,
92};
93pub use tool_search::ToolSearchTool;
94
95#[cfg(feature = "native")]
97pub use bash::BashTool;
98#[cfg(feature = "native")]
99pub use file_ops::FileOpsTool;
100#[cfg(feature = "native")]
101pub use git::GitTool;
102#[cfg(feature = "native")]
103pub use search::SearchTool;
104#[cfg(feature = "native")]
105pub use transaction::TransactionManager;
106#[cfg(feature = "native")]
107pub use validation::{ValidationTool, get_validation_tools};
108#[cfg(feature = "native")]
109pub use web::WebTool;
110
111#[cfg(any(feature = "orchestrator", feature = "orchestrator-wasm"))]
113pub use orchestrator::OrchestratorTool;
114
115#[cfg(feature = "interpreters")]
116pub use code_exec::CodeExecTool;
117
118#[cfg(feature = "rag")]
119pub use semantic_search::SemanticSearchTool;
120
121#[cfg(feature = "rag")]
122pub use tool_embedding::ToolEmbeddingIndex;
123
124pub use smart_router::{
125 analyze_messages, analyze_query, get_context_for_analysis, get_smart_tools,
126 get_smart_tools_with_mcp, get_tools_for_categories,
127};
128
129#[cfg(feature = "openapi")]
130pub use openapi::{
131 HttpMethod, OpenApiAuth, OpenApiEndpoint, OpenApiParam, OpenApiTool, execute_openapi_tool,
132 openapi_to_tools,
133};