Skip to main content

bamboo_server/tools/
mod.rs

1//! Server-only tools and tool executors.
2//!
3//! These tools are registered only when running the Bamboo HTTP server.
4//! They may depend on `AppState` components (storage, schedulers, etc.).
5//!
6//! Framework-agnostic tools (MemoryTool, OverlayToolExecutor, SubAgentTool,
7//! etc.) live in the `bamboo-server-tools` crate. This module re-exports them
8//! for convenience and keeps the server-bound glue (`ChildSessionAdapter`,
9//! `ScheduleTasksTool`) that wires those tools to `AppState` via ports.
10
11// Re-export framework-agnostic tools from the bamboo-server-tools crate.
12pub use bamboo_server_tools::{
13    AskAgentTool, ClusterTool, CompactContextTool, DeployAgentTool, DeployedRegistry,
14    LoadSkillTool, MemoryTool, NotificationDispatcher, NotifyTool, OverlayToolExecutor,
15    ReadSkillResourceTool, SessionInspectorTool, SubAgentTool, ToolSurface, ToolSurfaceFactory,
16};
17
18pub mod child_session_adapter;
19pub mod model_catalog;
20pub mod notify_dispatcher;
21
22// Integration tests that wire `SubAgentTool` to a real `ChildSessionAdapter`
23// (the tool itself + its pure unit tests live in `bamboo-server-tools`).
24#[cfg(test)]
25mod sub_agent_tests;
26
27pub type SubagentModelResolver = std::sync::Arc<
28    dyn Fn(String) -> futures::future::BoxFuture<'static, Option<bamboo_domain::ProviderModelRef>>
29        + Send
30        + Sync,
31>;
32pub type OptionalSubagentModelResolver = Option<SubagentModelResolver>;
33
34// Re-export server-specific tool types for convenience
35pub use child_session_adapter::ChildSessionAdapter;
36pub use model_catalog::RegistryModelCatalog;
37pub use notify_dispatcher::ServerNotificationDispatcher;