pub struct BackgroundTasksPlugin { /* private fields */ }Expand description
Behavior that keeps a lightweight owner-thread task projection in sync and injects reminders about active background tasks.
Durable task truth remains in task threads; the owner-thread state is only a prompt/UI cache.
Implementations§
Source§impl BackgroundTasksPlugin
impl BackgroundTasksPlugin
pub fn new(manager: Arc<BackgroundTaskManager>) -> Self
pub fn with_task_store(self, task_store: Option<Arc<TaskStore>>) -> Self
Trait Implementations§
Source§impl AgentBehavior for BackgroundTasksPlugin
impl AgentBehavior for BackgroundTasksPlugin
fn id(&self) -> &str
Source§fn register_lattice_paths(&self, registry: &mut LatticeRegistry)
fn register_lattice_paths(&self, registry: &mut LatticeRegistry)
Register lattice (CRDT) paths with the registry.
Source§fn register_state_scopes(&self, registry: &mut StateScopeRegistry)
fn register_state_scopes(&self, registry: &mut StateScopeRegistry)
Register state scopes with the registry.
Source§fn register_state_action_deserializers(
&self,
registry: &mut StateActionDeserializerRegistry,
)
fn register_state_action_deserializers( &self, registry: &mut StateActionDeserializerRegistry, )
Register state-action deserializers for persisted intent-log replay and recovery.
fn run_start<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ctx: &'life1 ReadOnlyContext<'life2>,
) -> Pin<Box<dyn Future<Output = ActionSet<LifecycleAction>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn before_inference<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ctx: &'life1 ReadOnlyContext<'life2>,
) -> Pin<Box<dyn Future<Output = ActionSet<BeforeInferenceAction>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn after_tool_execute<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ctx: &'life1 ReadOnlyContext<'life2>,
) -> Pin<Box<dyn Future<Output = ActionSet<AfterToolExecuteAction>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn behavior_ids(&self) -> Vec<&str>
fn step_start<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_ctx: &'life1 ReadOnlyContext<'life2>,
) -> Pin<Box<dyn Future<Output = ActionSet<LifecycleAction>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
fn after_inference<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_ctx: &'life1 ReadOnlyContext<'life2>,
) -> Pin<Box<dyn Future<Output = ActionSet<AfterInferenceAction>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
fn before_tool_execute<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_ctx: &'life1 ReadOnlyContext<'life2>,
) -> Pin<Box<dyn Future<Output = ActionSet<BeforeToolExecuteAction>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
fn step_end<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_ctx: &'life1 ReadOnlyContext<'life2>,
) -> Pin<Box<dyn Future<Output = ActionSet<LifecycleAction>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
fn run_end<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_ctx: &'life1 ReadOnlyContext<'life2>,
) -> Pin<Box<dyn Future<Output = ActionSet<LifecycleAction>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
Auto Trait Implementations§
impl Freeze for BackgroundTasksPlugin
impl !RefUnwindSafe for BackgroundTasksPlugin
impl Send for BackgroundTasksPlugin
impl Sync for BackgroundTasksPlugin
impl Unpin for BackgroundTasksPlugin
impl !UnwindSafe for BackgroundTasksPlugin
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