pub trait JournalCallback: Send + Sync {
// Required method
fn on_agent_done<'life0, 'async_trait>(
&'life0 self,
agent_id: AgentId,
phase_id: PhaseId,
status: AgentStatus,
output: Value,
tokens: TokenUsage,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}Expand description
Callback invoked by the scheduler when an agent completes. Implemented by JournalStore to enable transparent persistence. Defined here (not in journal.rs) to avoid circular dependency: scheduler → journal → scheduler.
Required Methods§
Sourcefn on_agent_done<'life0, 'async_trait>(
&'life0 self,
agent_id: AgentId,
phase_id: PhaseId,
status: AgentStatus,
output: Value,
tokens: TokenUsage,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn on_agent_done<'life0, 'async_trait>(
&'life0 self,
agent_id: AgentId,
phase_id: PhaseId,
status: AgentStatus,
output: Value,
tokens: TokenUsage,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Called when an agent completes (success or non-retryable failure).
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".