brainwires-tool-runtime 0.11.0

Tool execution runtime for the Brainwires Agent Framework — executor trait, registry, error taxonomy, sanitization, validation, transactions, smart router, plus optional orchestrator / OAuth / OpenAPI / sandbox / sessions / RAG-tool-search modules
Documentation

brainwires-tool-runtime

Crates.io Documentation License

The execution-runtime layer for Brainwires tool dispatch. Companion crate to brainwires-tool-builtins, which provides the concrete bash / file_ops / git / web / etc. tools that this runtime knows how to dispatch.

What lives here

  • executor::ToolExecutor — the trait every tool dispatcher implements.
  • registry::ToolRegistry + ToolCategory — composable tool registry and category metadata.
  • error — tool-error taxonomy with retry classification.
  • sanitization — content-source tagging, injection detection, sensitive-data redaction.
  • tool_search::ToolSearchTool — meta-tool for keyword / regex / semantic tool discovery.
  • smart_router — query-driven category filtering.
  • transaction::TransactionManager — idempotency + staging for file-mutating tools (native).
  • validation::ValidationTool — duplicate / syntax / build checks (native).

Feature-gated runtime modules

Feature Module Notes
orchestrator (or orchestrator-wasm) orchestrator::OrchestratorTool Rhai script executor
oauth oauth OAuth 2.0 client, PKCE, pluggable token store
openapi openapi OpenAPI 3 spec → tool descriptor conversion
sandbox sandbox_executor::SandboxedToolExecutor Wrap any executor to route bash/code-exec through brainwires-sandbox
sessions sessions::SessionsTool sessions_list / sessions_history / sessions_send / sessions_spawn over a brainwires-session::SessionBroker
rag tool_embedding::ToolEmbeddingIndex RAG-backed semantic mode for ToolSearchTool

Usage

[dependencies]
brainwires-tool-runtime = "0.11"
# Or, for the standard built-in tools too:
brainwires-tool-builtins = "0.11"  # already pulls brainwires-tool-runtime
use brainwires_tool_runtime::{ToolExecutor, ToolRegistry};
use brainwires_tool_builtins::{registry_with_builtins, BuiltinToolExecutor};

let registry = registry_with_builtins();
let executor = BuiltinToolExecutor::new(registry, Default::default());

See also

License

MIT OR Apache-2.0