agent_kernel/event.rs
1/// Observability events emitted during a multi-agent discussion.
2///
3/// `AgentEvent` is a first-class output of the kernel (observability-first principle).
4/// Callers receive a full stream of events via `mpsc::Sender<AgentEvent>`.
5///
6/// Phase 1 has exactly 6 variants. `Evolved` is a Phase 2 variant added in the
7/// independent agent-kernel repository.
8#[derive(Debug)]
9pub enum AgentEvent {
10 /// Emitted at the start of each round to report overall progress.
11 Progress {
12 current_round: usize,
13 max_rounds: usize,
14 },
15 /// One agent's contribution in a discussion round.
16 Round {
17 round: usize,
18 agent_name: String,
19 content: String,
20 },
21 /// Discussion converged before reaching `max_rounds`.
22 Converged { reason: String },
23 /// Final synthesized summary produced by the primary agent.
24 Summary { content: String },
25 /// Discussion was cancelled via `CancellationToken`.
26 Cancelled,
27 /// Discussion finished (all rounds completed or converged).
28 Completed,
29 /// An agent's SOUL.md was evolved to a new version (Phase 2).
30 Evolved {
31 agent: String,
32 old_version: u32,
33 new_version: u32,
34 },
35}