pub struct BackgroundTool { /* private fields */ }Expand description
Run and supervise long-running processes without blocking the agent loop.
Output is redirected to a per-task log file (so the pipe never fills and
blocks), which the agent tails via the logs action.
Implementations§
Source§impl BackgroundTool
impl BackgroundTool
Sourcepub fn with_backend(self, backend: BgBackend) -> Self
pub fn with_backend(self, backend: BgBackend) -> Self
Set the execution backend (from [tools] background_backend config).
Trait Implementations§
Source§impl Default for BackgroundTool
impl Default for BackgroundTool
Source§impl Tool for BackgroundTool
impl Tool for BackgroundTool
fn name(&self) -> &str
fn description(&self) -> &str
fn parameters(&self) -> Value
fn execute<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
args: Value,
ctx: &'life1 ToolContext<'life2>,
) -> Pin<Box<dyn Future<Output = Result<String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Auto Trait Implementations§
impl Freeze for BackgroundTool
impl RefUnwindSafe for BackgroundTool
impl Send for BackgroundTool
impl Sync for BackgroundTool
impl Unpin for BackgroundTool
impl UnsafeUnpin for BackgroundTool
impl UnwindSafe for BackgroundTool
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