pub struct BasicSupervisor { /* private fields */ }Expand description
Basic in-memory supervisor implementation with AgentRuntime integration.
Implementations§
Source§impl BasicSupervisor
impl BasicSupervisor
Sourcepub fn new(event_bus: EventBus, runtime: AgentRuntime) -> Self
pub fn new(event_bus: EventBus, runtime: AgentRuntime) -> Self
Creates a new supervisor with the given event bus and agent runtime.
Sourcepub fn set_resource_monitor(&mut self, rm: Arc<ResourceMonitor>)
pub fn set_resource_monitor(&mut self, rm: Arc<ResourceMonitor>)
Attach a resource monitor for agent count tracking.
Trait Implementations§
Source§impl Supervisor for BasicSupervisor
impl Supervisor for BasicSupervisor
Source§fn fork<'life0, 'life1, 'async_trait>(
&'life0 self,
spec: &'life1 Seed,
) -> Pin<Box<dyn Future<Output = Result<AgentId>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn fork<'life0, 'life1, 'async_trait>(
&'life0 self,
spec: &'life1 Seed,
) -> Pin<Box<dyn Future<Output = Result<AgentId>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Fork a new agent from a seed specification.
Source§fn exec<'life0, 'async_trait>(
&'life0 self,
id: AgentId,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn exec<'life0, 'async_trait>(
&'life0 self,
id: AgentId,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Start executing an agent.
Source§fn run_with_seed<'life0, 'life1, 'async_trait>(
&'life0 self,
id: AgentId,
seed: &'life1 Seed,
) -> Pin<Box<dyn Future<Output = Result<ExecutionResult>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn run_with_seed<'life0, 'life1, 'async_trait>(
&'life0 self,
id: AgentId,
seed: &'life1 Seed,
) -> Pin<Box<dyn Future<Output = Result<ExecutionResult>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Fork and execute an agent with its seed, running to completion.
Returns the execution result from the agent runtime.
Source§fn wait<'life0, 'async_trait>(
&'life0 self,
id: AgentId,
) -> Pin<Box<dyn Future<Output = Result<AgentStatus>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn wait<'life0, 'async_trait>(
&'life0 self,
id: AgentId,
) -> Pin<Box<dyn Future<Output = Result<AgentStatus>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Wait for an agent to complete and return its final status.
Auto Trait Implementations§
impl !Freeze for BasicSupervisor
impl !RefUnwindSafe for BasicSupervisor
impl !UnwindSafe for BasicSupervisor
impl Send for BasicSupervisor
impl Sync for BasicSupervisor
impl Unpin for BasicSupervisor
impl UnsafeUnpin for BasicSupervisor
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