pub struct SessionInspectorTool { /* private fields */ }Expand description
Server-only tool for inspecting V2 sessions stored under the Bamboo home dir.
Design goals:
- Return metadata first (index-backed) so the model can narrow scope.
- Allow bounded reads (pagination; from end; truncation).
- Support lightweight search across session titles and (optionally) tail messages.
- Keep inspection local by default; use child-session delegation only if the user explicitly asks.
Implementations§
Source§impl SessionInspectorTool
impl SessionInspectorTool
pub fn new( session_store: Arc<SessionStoreV2>, storage: Arc<dyn Storage>, ) -> SessionInspectorTool
Trait Implementations§
Source§impl Tool for SessionInspectorTool
impl Tool for SessionInspectorTool
fn name(&self) -> &str
Source§fn description(&self) -> &str
fn description(&self) -> &str
Human-readable tool description for LLM.
Source§fn parameters_schema(&self) -> Value
fn parameters_schema(&self) -> Value
JSON Schema for tool parameters.
Source§fn classify(&self, _args: &Value) -> ToolClass
fn classify(&self, _args: &Value) -> ToolClass
Per-call scheduling + permission-gating class (args-aware). Folds the
former
mutability/call_mutability/concurrency_safe/
call_concurrency_safe hooks into one value. Defaults to the conservative
ToolClass::MUTATING_SERIAL (mutating, serial, not promotable).Source§fn invoke<'life0, 'async_trait>(
&'life0 self,
args: Value,
ctx: ToolCtx,
) -> Pin<Box<dyn Future<Output = Result<ToolOutcome, ToolError>> + Send + 'async_trait>>where
'life0: 'async_trait,
SessionInspectorTool: 'async_trait,
fn invoke<'life0, 'async_trait>(
&'life0 self,
args: Value,
ctx: ToolCtx,
) -> Pin<Box<dyn Future<Output = Result<ToolOutcome, ToolError>> + Send + 'async_trait>>where
'life0: 'async_trait,
SessionInspectorTool: 'async_trait,
The sole execution entry: returns the call’s per-call
ToolOutcome
(Completed / Running
/ NeedsHuman), or a ToolError for
infrastructure / argument failures (preserved from the former execute). Read moreSource§fn to_schema(&self) -> ToolSchema
fn to_schema(&self) -> ToolSchema
Convert tool to LLM-compatible schema. Read more
Auto Trait Implementations§
impl !RefUnwindSafe for SessionInspectorTool
impl !UnwindSafe for SessionInspectorTool
impl Freeze for SessionInspectorTool
impl Send for SessionInspectorTool
impl Sync for SessionInspectorTool
impl Unpin for SessionInspectorTool
impl UnsafeUnpin for SessionInspectorTool
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more