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    LedgerScheduleBridge, LedgerTool, LoadSkillTool, MemoryTool, NotificationDispatcher,
15    NotifyTool, OverlayToolExecutor, ReadSkillResourceTool, SessionInspectorTool, SubAgentTool,
16    ToolSurface, ToolSurfaceFactory,
17};
18
19pub mod child_session_adapter;
20pub mod model_catalog;
21pub mod notify_dispatcher;
22
23// Integration tests that wire `SubAgentTool` to a real `ChildSessionAdapter`
24// (the tool itself + its pure unit tests live in `bamboo-server-tools`).
25#[cfg(test)]
26mod sub_agent_tests;
27
28pub type SubagentModelResolver = std::sync::Arc<
29    dyn Fn(String) -> futures::future::BoxFuture<'static, Option<bamboo_domain::ProviderModelRef>>
30        + Send
31        + Sync,
32>;
33pub type OptionalSubagentModelResolver = Option<SubagentModelResolver>;
34
35// Re-export server-specific tool types for convenience
36pub use child_session_adapter::ChildSessionAdapter;
37pub use model_catalog::RegistryModelCatalog;
38pub use notify_dispatcher::ServerNotificationDispatcher;