Skip to main content

aether_core/events/
message_event.rs

1use schemars::JsonSchema;
2use serde::{Deserialize, Serialize};
3
4/// Streaming message content from the agent.
5///
6/// Chunks stream with `is_complete: false`; a final event with `is_complete: true`
7/// carries the full accumulated text. The completion event is emitted when the
8/// turn wraps up, which may be after the originating LLM call's
9/// [`TurnEvent::LlmCallEnded`](crate::events::TurnEvent::LlmCallEnded).
10#[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema)]
11#[serde(tag = "type", rename_all = "snake_case")]
12pub enum MessageEvent {
13    /// Assistant response text.
14    Text { message_id: String, chunk: String, is_complete: bool },
15    /// Assistant reasoning summary text.
16    Thought { message_id: String, chunk: String, is_complete: bool },
17}