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