pub trait Supervisor: Send + Sync {
// Required methods
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 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 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 fork_directive<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
directive: &'life1 Directive,
env: &'life2 ExecEnv,
) -> Pin<Box<dyn Future<Output = Result<AgentId>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn run_with_directive<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
id: AgentId,
directive: &'life1 Directive,
env: &'life2 ExecEnv,
) -> Pin<Box<dyn Future<Output = Result<ExecutionResult>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: '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;
fn kill<'life0, 'async_trait>(
&'life0 self,
id: AgentId,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn list<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<AgentInfo>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}Expand description
Supervisor trait for managing agent lifecycles.
Required Methods§
Sourcefn 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.
Sourcefn 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.
Sourcefn 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.
Sourcefn fork_directive<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
directive: &'life1 Directive,
env: &'life2 ExecEnv,
) -> Pin<Box<dyn Future<Output = Result<AgentId>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn fork_directive<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
directive: &'life1 Directive,
env: &'life2 ExecEnv,
) -> Pin<Box<dyn Future<Output = Result<AgentId>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Fork a new agent from a Directive and ExecEnv (RFC-027).
Mirrors Supervisor::fork but reads the goal / project_id from
the unified-intent types. The resulting agent has no seed_id (a
Directive has no stable per-execution UUID yet — Phase 6 will mint
one in Orchestrator::handle()).
Sourcefn run_with_directive<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
id: AgentId,
directive: &'life1 Directive,
env: &'life2 ExecEnv,
) -> Pin<Box<dyn Future<Output = Result<ExecutionResult>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn run_with_directive<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
id: AgentId,
directive: &'life1 Directive,
env: &'life2 ExecEnv,
) -> Pin<Box<dyn Future<Output = Result<ExecutionResult>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Fork and execute an agent with a Directive + ExecEnv, running to completion.
Mirrors Supervisor::run_with_seed but dispatches to
AgentRuntime::execute_directive_with_session. The legacy Seed
variants stay until Phase 6 removes them.
Sourcefn 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.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".