Skip to main content

ToolResultStore

Trait ToolResultStore 

Source
pub trait ToolResultStore: Send + Sync {
    // Required methods
    fn store(
        &self,
        tool_call_id: &str,
        tool_name: &str,
        content: &str,
    ) -> Result<StoredToolResult, ToolResultStoreError>;
    fn read_range(
        &self,
        handle: &str,
        start_byte: usize,
        byte_count: usize,
    ) -> Result<ToolResultPage, ToolResultStoreError>;
    fn search(
        &self,
        handle: &str,
        query: &str,
        max_matches: usize,
    ) -> Result<Vec<ToolResultMatch>, ToolResultStoreError>;
}
Expand description

Session-scoped durable storage for complete textual tool results.

The port is synchronous because results are bounded and local adapters use atomic filesystem operations. Network-backed implementations should stage asynchronously before returning a crate::ToolOutput to the Agent.

Required Methods§

Source

fn store( &self, tool_call_id: &str, tool_name: &str, content: &str, ) -> Result<StoredToolResult, ToolResultStoreError>

Source

fn read_range( &self, handle: &str, start_byte: usize, byte_count: usize, ) -> Result<ToolResultPage, ToolResultStoreError>

Source

fn search( &self, handle: &str, query: &str, max_matches: usize, ) -> Result<Vec<ToolResultMatch>, ToolResultStoreError>

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§