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