pub struct TaskOutputTool { /* private fields */ }Expand description
Read the output of a background task.
For agent_run tasks, returns the last assistant message from the sub-agent
thread. For other task types, returns the task result from the manager.
Reads durable task state from task threads and overlays live in-memory
results when available.
Implementations§
Source§impl TaskOutputTool
impl TaskOutputTool
pub fn new( manager: Arc<BackgroundTaskManager>, thread_store: Option<Arc<dyn ThreadStore>>, ) -> Self
pub fn with_task_store(self, task_store: Option<Arc<TaskStore>>) -> Self
Trait Implementations§
Source§impl Clone for TaskOutputTool
impl Clone for TaskOutputTool
Source§fn clone(&self) -> TaskOutputTool
fn clone(&self) -> TaskOutputTool
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for TaskOutputTool
impl Debug for TaskOutputTool
Source§impl TypedTool for TaskOutputTool
impl TypedTool for TaskOutputTool
Source§fn description(&self) -> &str
fn description(&self) -> &str
Tool description shown to the LLM.
Source§fn validate(&self, args: &Self::Args) -> Result<(), String>
fn validate(&self, args: &Self::Args) -> Result<(), String>
Optional business-logic validation after deserialization. Read more
Source§fn execute<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
args: TaskOutputArgs,
ctx: &'life1 ToolCallContext<'life2>,
) -> Pin<Box<dyn Future<Output = Result<ToolResult, ToolError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn execute<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
args: TaskOutputArgs,
ctx: &'life1 ToolCallContext<'life2>,
) -> Pin<Box<dyn Future<Output = Result<ToolResult, ToolError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Execute with typed arguments.
Source§fn execute_effect<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
args: Self::Args,
ctx: &'life1 ToolCallContext<'life2>,
) -> Pin<Box<dyn Future<Output = Result<ToolExecutionEffect, ToolError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
fn execute_effect<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
args: Self::Args,
ctx: &'life1 ToolCallContext<'life2>,
) -> Pin<Box<dyn Future<Output = Result<ToolExecutionEffect, ToolError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
Execute with typed arguments and return structured effects. Read more
Auto Trait Implementations§
impl Freeze for TaskOutputTool
impl !RefUnwindSafe for TaskOutputTool
impl Send for TaskOutputTool
impl Sync for TaskOutputTool
impl Unpin for TaskOutputTool
impl !UnwindSafe for TaskOutputTool
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> Tool for Twhere
T: TypedTool,
impl<T> Tool for Twhere
T: TypedTool,
Source§fn validate_args(&self, _args: &Value) -> Result<(), ToolError>
fn validate_args(&self, _args: &Value) -> Result<(), ToolError>
Skips JSON Schema validation — from_value deserialization covers it.
Source§fn descriptor(&self) -> ToolDescriptor
fn descriptor(&self) -> ToolDescriptor
Get the tool descriptor.
Source§fn execute<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
args: Value,
ctx: &'life1 ToolCallContext<'life2>,
) -> Pin<Box<dyn Future<Output = Result<ToolResult, ToolError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
T: 'async_trait,
fn execute<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
args: Value,
ctx: &'life1 ToolCallContext<'life2>,
) -> Pin<Box<dyn Future<Output = Result<ToolResult, ToolError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
T: 'async_trait,
Execute the tool. Read more
Source§fn execute_effect<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
args: Value,
ctx: &'life1 ToolCallContext<'life2>,
) -> Pin<Box<dyn Future<Output = Result<ToolExecutionEffect, ToolError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
T: 'async_trait,
fn execute_effect<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
args: Value,
ctx: &'life1 ToolCallContext<'life2>,
) -> Pin<Box<dyn Future<Output = Result<ToolExecutionEffect, ToolError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
T: 'async_trait,
Execute tool and return structured effects. Read more