pub trait AgentOutput: Send + Sync {
// Required method
fn emit_event<'life0, 'async_trait>(
&'life0 self,
event: AgentEvent,
) -> Pin<Box<dyn Future<Output = Result<(), Box<dyn Error + Send + Sync>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
// Provided methods
fn emit_message<'life0, 'life1, 'async_trait>(
&'life0 self,
level: MessageLevel,
content: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<(), Box<dyn Error + Send + Sync>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait { ... }
fn debug<'life0, 'life1, 'async_trait>(
&'life0 self,
content: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<(), Box<dyn Error + Send + Sync>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait { ... }
fn emit_token_update<'life0, 'async_trait>(
&'life0 self,
token_usage: TokenUsage,
) -> Pin<Box<dyn Future<Output = Result<(), Box<dyn Error + Send + Sync>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait { ... }
fn info<'life0, 'life1, 'async_trait>(
&'life0 self,
content: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<(), Box<dyn Error + Send + Sync>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait { ... }
fn warning<'life0, 'life1, 'async_trait>(
&'life0 self,
content: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<(), Box<dyn Error + Send + Sync>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait { ... }
fn error<'life0, 'life1, 'async_trait>(
&'life0 self,
content: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<(), Box<dyn Error + Send + Sync>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait { ... }
fn normal<'life0, 'life1, 'async_trait>(
&'life0 self,
content: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<(), Box<dyn Error + Send + Sync>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait { ... }
fn emit_status_update<'life0, 'life1, 'async_trait>(
&'life0 self,
status: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<(), Box<dyn Error + Send + Sync>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait { ... }
fn request_confirmation<'life0, 'life1, 'async_trait>(
&'life0 self,
_request: &'life1 ConfirmationRequest,
) -> Pin<Box<dyn Future<Output = Result<ConfirmationDecision, Box<dyn Error + Send + Sync>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait { ... }
fn supports_realtime_updates(&self) -> bool { ... }
fn flush<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<(), Box<dyn Error + Send + Sync>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait { ... }
}Expand description
Abstract output interface for agent execution
Required Methods§
Provided Methods§
Sourcefn emit_message<'life0, 'life1, 'async_trait>(
&'life0 self,
level: MessageLevel,
content: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<(), Box<dyn Error + Send + Sync>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn emit_message<'life0, 'life1, 'async_trait>(
&'life0 self,
level: MessageLevel,
content: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<(), Box<dyn Error + Send + Sync>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Emit a message with specified level
Sourcefn debug<'life0, 'life1, 'async_trait>(
&'life0 self,
content: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<(), Box<dyn Error + Send + Sync>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn debug<'life0, 'life1, 'async_trait>(
&'life0 self,
content: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<(), Box<dyn Error + Send + Sync>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Emit debug message
Sourcefn emit_token_update<'life0, 'async_trait>(
&'life0 self,
token_usage: TokenUsage,
) -> Pin<Box<dyn Future<Output = Result<(), Box<dyn Error + Send + Sync>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn emit_token_update<'life0, 'async_trait>(
&'life0 self,
token_usage: TokenUsage,
) -> Pin<Box<dyn Future<Output = Result<(), Box<dyn Error + Send + Sync>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Emit token usage update
Sourcefn info<'life0, 'life1, 'async_trait>(
&'life0 self,
content: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<(), Box<dyn Error + Send + Sync>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn info<'life0, 'life1, 'async_trait>(
&'life0 self,
content: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<(), Box<dyn Error + Send + Sync>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Emit info message
Sourcefn warning<'life0, 'life1, 'async_trait>(
&'life0 self,
content: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<(), Box<dyn Error + Send + Sync>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn warning<'life0, 'life1, 'async_trait>(
&'life0 self,
content: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<(), Box<dyn Error + Send + Sync>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Emit warning message
Sourcefn error<'life0, 'life1, 'async_trait>(
&'life0 self,
content: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<(), Box<dyn Error + Send + Sync>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn error<'life0, 'life1, 'async_trait>(
&'life0 self,
content: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<(), Box<dyn Error + Send + Sync>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Emit error message
Sourcefn normal<'life0, 'life1, 'async_trait>(
&'life0 self,
content: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<(), Box<dyn Error + Send + Sync>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn normal<'life0, 'life1, 'async_trait>(
&'life0 self,
content: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<(), Box<dyn Error + Send + Sync>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Emit normal text message
Sourcefn emit_status_update<'life0, 'life1, 'async_trait>(
&'life0 self,
status: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<(), Box<dyn Error + Send + Sync>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn emit_status_update<'life0, 'life1, 'async_trait>(
&'life0 self,
status: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<(), Box<dyn Error + Send + Sync>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Emit status update (for interactive mode status reporting)
Sourcefn request_confirmation<'life0, 'life1, 'async_trait>(
&'life0 self,
_request: &'life1 ConfirmationRequest,
) -> Pin<Box<dyn Future<Output = Result<ConfirmationDecision, Box<dyn Error + Send + Sync>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn request_confirmation<'life0, 'life1, 'async_trait>(
&'life0 self,
_request: &'life1 ConfirmationRequest,
) -> Pin<Box<dyn Future<Output = Result<ConfirmationDecision, Box<dyn Error + Send + Sync>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Request a confirmation decision from the output handler (UI/API) Default: deny (safe). Concrete outputs (CLI/UI) should override to prompt.
Sourcefn supports_realtime_updates(&self) -> bool
fn supports_realtime_updates(&self) -> bool
Check if this output handler supports real-time updates