pub enum CouncilEvent {
Show 42 variants
PlanProposed {
graph: TaskGraph,
},
ReplanAttempt {
attempt: u32,
reason: String,
},
RunCostEstimate {
node_count: usize,
est_tokens: u64,
est_wall_seconds: u64,
},
PlanApproved,
PlanRejected {
reason: Option<String>,
},
AwaitingApproval {
approval_id: String,
kind: ApprovalKind,
},
NodeStarted {
node_id: String,
goal: String,
},
NodeTextDelta {
node_id: String,
delta: String,
},
NodeReasoningDelta {
node_id: String,
delta: String,
},
NodeProgress {
node_id: String,
processed: u32,
total: u32,
cached: u32,
time_ms: u64,
},
NodeToolCallStart {
node_id: String,
tool_call: ToolCall,
display_name: String,
args_summary: Option<String>,
},
NodeToolCallComplete {
node_id: String,
tool_name: String,
result: ToolResult,
display_name: String,
duration_display: String,
},
NodeSystemWarning {
node_id: String,
message: String,
suggested_action: Option<String>,
},
NodeCompacting {
node_id: String,
},
NodeComplete {
node_id: String,
output_preview: String,
},
NodeFailed {
node_id: String,
error: String,
},
SynthesisStart,
SynthesisProgress {
processed: u32,
total: u32,
cached: u32,
time_ms: u64,
},
SynthesisTextDelta {
delta: String,
},
SynthesisComplete {
content: String,
},
CouncilComplete {
answer: String,
},
CouncilError {
message: String,
},
TeamStarted {
team_id: String,
role: Option<RoleId>,
},
TeamSynthesized {
team_id: String,
compacted_output: String,
},
SubteamSpawned {
parent_node_id: String,
child_graph_summary: String,
},
SteeringApplied {
diff: GraphDiff,
applied_at_wave: u32,
},
DebateRoundStarted {
node_id: String,
round: u32,
},
DebateAgentTurnStarted {
node_id: String,
agent_id: String,
agent_name: String,
color: String,
round: u32,
contentiousness: f32,
},
DebateAgentTextDelta {
node_id: String,
agent_id: String,
delta: String,
},
DebateAgentReasoningDelta {
node_id: String,
agent_id: String,
delta: String,
},
DebateAgentToolCallStart {
node_id: String,
agent_id: String,
tool_call: ToolCall,
display_name: String,
args_summary: Option<String>,
},
DebateAgentToolCallComplete {
node_id: String,
agent_id: String,
result: ToolResult,
display_name: String,
duration_display: String,
},
DebateAgentTurnComplete {
node_id: String,
agent_id: String,
round: u32,
final_text: String,
},
DebateJudgeStarted {
node_id: String,
round: u32,
},
DebateJudgeTextDelta {
node_id: String,
delta: String,
},
DebateJudgeSummary {
node_id: String,
round: u32,
consensus_reached: bool,
early_stop_recommended: bool,
assessment_text: String,
},
DebateRoundCompacted {
node_id: String,
round: u32,
summary: String,
},
DebateStanceMap {
node_id: String,
stances: Vec<AgentStance>,
},
DebateSynthesisStarted {
node_id: String,
},
DebateSynthesisTextDelta {
node_id: String,
delta: String,
},
DebateSynthesisComplete {
node_id: String,
final_text: String,
},
WaveCompleted {
wave_index: u32,
node_count: usize,
},
}Expand description
A single event in an orchestrator execution stream.
Consumers receive these over SSE (web) or an mpsc channel (CLI).
Each variant is independently useful — the frontend can render
progressively as events arrive without buffering the full stream.
Variants§
PlanProposed
The director has produced an initial task plan.
If hitl_mode requires plan approval, the executor immediately
emits CouncilEvent::AwaitingApproval after this and
pauses until the frontend responds.
ReplanAttempt
A re-planning attempt was triggered (e.g. because the user rejected the initial plan or a node failed and the director proposes recovery).
RunCostEstimate
Warn-only cost estimate emitted immediately after
CouncilEvent::PlanProposed.
Never suppressed, never fatal — the run always proceeds. The
frontend may display a yellow warning banner when
est_wall_seconds > 60 or node_count exceeds 80 % of the active
[NodeBudget] upper bound.
Fields
PlanApproved
The plan was approved (by the user or automatically when
hitl_mode == None).
PlanRejected
The plan was rejected by the user. The orchestrator will either re-plan or stop, depending on the caller’s retry policy.
AwaitingApproval
The orchestrator is paused waiting for human approval.
The frontend should display the kind payload and allow the user
to approve or reject. The executor resumes when it receives an
ApprovalResponse back-channel message.
Fields
approval_id: StringUnique id for this approval request (correlates with the
back-channel ApprovalResponse).
kind: ApprovalKindWhat is being approved.
NodeStarted
A worker node has started executing.
NodeTextDelta
Incremental text token from the currently-executing worker node.
NodeReasoningDelta
Incremental reasoning / chain-of-thought token from a worker node
(for models that expose CoT).
NodeProgress
Prompt-processing progress during a worker’s LLM pre-fill phase.
Fields
NodeToolCallStart
A worker node has initiated a tool call.
Fields
NodeToolCallComplete
A tool call by a worker node has completed.
Fields
result: ToolResultThe tool’s result payload.
NodeSystemWarning
A non-fatal warning from a worker node’s agent loop.
Fields
NodeCompacting
A worker node’s output is being compacted before downstream nodes receive it as context.
NodeComplete
A worker node finished successfully.
Fields
NodeFailed
A worker node failed with an unrecoverable error.
The orchestrator will mark all downstream nodes as
NodeStatus::Skipped and
then emit CouncilEvent::CouncilError.
SynthesisStart
The synthesis phase has started.
The synthesiser assembles all node outputs into a unified answer.
SynthesisProgress
Prompt-processing progress during the synthesis LLM call.
Fields
SynthesisTextDelta
Incremental text token from the synthesiser.
SynthesisComplete
The synthesiser has finished.
CouncilComplete
The orchestrator run completed successfully.
answer is the synthesiser’s final output (same as the content
field of the preceding CouncilEvent::SynthesisComplete).
CouncilError
The orchestrator run failed with an unrecoverable error.
TeamStarted
A [TaskNodeKind::Team] node has started executing its nested subgraph.
Emitted by the executor before it begins scheduling the first wave of
the team’s subgraph. Paired with CouncilEvent::TeamSynthesized
when the subgraph completes.
Fields
TeamSynthesized
A [TaskNodeKind::Team] node’s subgraph has completed and its output
has been compacted for passing to downstream nodes in the parent graph.
The compacted_output is what downstream nodes receive as context from
this team node — identical in shape to a leaf node’s compacted_output.
Fields
SubteamSpawned
A worker node requested dynamic team spawning and the executor approved it; the child sub-team subgraph has been planned and is about to run.
parent_node_id is the leaf node that triggered the spawn. The child
graph runs as a nested [run_wave_loop] inside the parent’s wave.
Fields
SteeringApplied
A GraphDiff was applied to the task graph at a wave boundary.
Emitted after super::task_graph::TaskGraph::apply_diff succeeds.
Informational only — execution continues with the updated graph.
Fields
DebateRoundStarted
A new debate round has started inside a TaskNodeKind::Debate node.
Emitted once per round, before any agent turn events for that round.
Fields
DebateAgentTurnStarted
An agent’s turn within a debate round has started.
Immediately followed by zero or more CouncilEvent::DebateAgentTextDelta
events for this agent and then CouncilEvent::DebateAgentTurnComplete.
Fields
agent_id: StringShort id of the agent (matches DebateAgent::id).
DebateAgentTextDelta
Incremental text token from a debating agent.
Fields
DebateAgentReasoningDelta
Incremental reasoning / chain-of-thought token from a debating agent.
Fields
DebateAgentToolCallStart
A debating agent has initiated a tool call.
Fields
DebateAgentToolCallComplete
A tool call by a debating agent has completed.
Fields
result: ToolResultThe tool’s result payload.
DebateAgentTurnComplete
An agent’s turn within a debate round has finished.
Fields
DebateJudgeStarted
The judge LLM call for a debate round has started.
Only emitted when a DebateJudgeConfig is present.
DebateJudgeTextDelta
Incremental text token from the debate judge.
DebateJudgeSummary
The judge has finished assessing a debate round.
Fields
DebateRoundCompacted
A debate round’s transcript has been compacted to reduce context pressure.
Only emitted when the running context window would otherwise overflow.
Fields
DebateStanceMap
Final stance outcomes for all agents after all rounds complete.
Emitted once after the last debate round, before synthesis starts.
Fields
stances: Vec<AgentStance>Per-agent stance outcomes.
DebateSynthesisStarted
The debate synthesis phase has started.
The synthesiser assembles the full round history into a verdict.
DebateSynthesisTextDelta
Incremental text token from the debate synthesiser.
DebateSynthesisComplete
The debate synthesis has finished.
final_text becomes the node’s output and is passed to the
compaction step before downstream nodes receive it as context.
Fields
WaveCompleted
All nodes in a topological wave have completed.
Emitted once at the end of each wave (depth 0 only). The frontend uses these events as scrubber waypoints so the user can rewind to any completed wave.
Trait Implementations§
Source§impl Clone for CouncilEvent
impl Clone for CouncilEvent
Source§fn clone(&self) -> CouncilEvent
fn clone(&self) -> CouncilEvent
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more