pub struct BackgroundAgentManager { /* private fields */ }Expand description
Manages background agents running in sessions
Implementations§
Source§impl BackgroundAgentManager
impl BackgroundAgentManager
Sourcepub async fn start_agent(&self, agent: BackgroundAgent) -> SessionResult<String>
pub async fn start_agent(&self, agent: BackgroundAgent) -> SessionResult<String>
Start a background agent asynchronously
Sourcepub async fn get_agent_status(
&self,
agent_id: &str,
) -> SessionResult<AgentStatus>
pub async fn get_agent_status( &self, agent_id: &str, ) -> SessionResult<AgentStatus>
Get the status of a background agent
Sourcepub async fn get_agent(&self, agent_id: &str) -> SessionResult<BackgroundAgent>
pub async fn get_agent(&self, agent_id: &str) -> SessionResult<BackgroundAgent>
Get a background agent by ID
Sourcepub async fn pause_agent(&self, agent_id: &str) -> SessionResult<()>
pub async fn pause_agent(&self, agent_id: &str) -> SessionResult<()>
Pause a background agent
Sourcepub async fn cancel_agent(&self, agent_id: &str) -> SessionResult<()>
pub async fn cancel_agent(&self, agent_id: &str) -> SessionResult<()>
Cancel a background agent
Sourcepub async fn list_agents(&self) -> Vec<BackgroundAgent>
pub async fn list_agents(&self) -> Vec<BackgroundAgent>
List all background agents
Sourcepub async fn get_completion_events(&self) -> Vec<AgentCompletionEvent>
pub async fn get_completion_events(&self) -> Vec<AgentCompletionEvent>
Get all completion events
Sourcepub async fn clear_completion_events(&self)
pub async fn clear_completion_events(&self)
Clear completion events
Sourcepub async fn is_agent_running(&self, agent_id: &str) -> bool
pub async fn is_agent_running(&self, agent_id: &str) -> bool
Check if an agent is running
Sourcepub async fn wait_for_agent(&self, agent_id: &str) -> SessionResult<AgentStatus>
pub async fn wait_for_agent(&self, agent_id: &str) -> SessionResult<AgentStatus>
Wait for an agent to complete
Trait Implementations§
Source§impl Clone for BackgroundAgentManager
impl Clone for BackgroundAgentManager
Source§fn clone(&self) -> BackgroundAgentManager
fn clone(&self) -> BackgroundAgentManager
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 BackgroundAgentManager
impl Debug for BackgroundAgentManager
Auto Trait Implementations§
impl Freeze for BackgroundAgentManager
impl !RefUnwindSafe for BackgroundAgentManager
impl Send for BackgroundAgentManager
impl Sync for BackgroundAgentManager
impl Unpin for BackgroundAgentManager
impl !UnwindSafe for BackgroundAgentManager
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