CouncilEvent

Enum CouncilEvent 

Source
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.

Fields

§

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).

Fields

§attempt: u32

1-based retry count.

§reason: String

Human-readable reason for re-planning.

§

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

§node_count: usize

Total aggregate node count across all subgraphs.

§est_tokens: u64

Rough token estimate (input + output) for the entire run.

§est_wall_seconds: u64

Estimated wall-clock seconds at 50 tokens / second.

§

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.

Fields

§reason: Option<String>

Optional user-provided rejection reason / edit instructions.

§

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: String

Unique id for this approval request (correlates with the back-channel ApprovalResponse).

§kind: ApprovalKind

What is being approved.

§

NodeStarted

A worker node has started executing.

Fields

§node_id: String

Unique id of the node.

§goal: String

The worker’s goal text.

§

NodeTextDelta

Incremental text token from the currently-executing worker node.

Fields

§node_id: String

Source node id.

§delta: String

The new text fragment.

§

NodeReasoningDelta

Incremental reasoning / chain-of-thought token from a worker node (for models that expose CoT).

Fields

§node_id: String

Source node id.

§delta: String

The reasoning fragment.

§

NodeProgress

Prompt-processing progress during a worker’s LLM pre-fill phase.

Fields

§node_id: String

Source node id.

§processed: u32

Tokens processed so far.

§total: u32

Total tokens in the prompt.

§cached: u32

Tokens served from the KV cache.

§time_ms: u64

Wall-clock time elapsed in milliseconds.

§

NodeToolCallStart

A worker node has initiated a tool call.

Fields

§node_id: String

Source node id.

§tool_call: ToolCall

The tool call details.

§display_name: String

Human-readable display name for the tool.

§args_summary: Option<String>

Optional one-line summary of the arguments for UI rendering.

§

NodeToolCallComplete

A tool call by a worker node has completed.

Fields

§node_id: String

Source node id.

§tool_name: String

The name of the tool that ran.

§result: ToolResult

The tool’s result payload.

§display_name: String

Human-readable display name.

§duration_display: String

Human-readable elapsed time (e.g. "1.2s").

§

NodeSystemWarning

A non-fatal warning from a worker node’s agent loop.

Fields

§node_id: String

Source node id.

§message: String

Warning message text.

§suggested_action: Option<String>

Optional actionable hint for the user.

§

NodeCompacting

A worker node’s output is being compacted before downstream nodes receive it as context.

Fields

§node_id: String

Source node id.

§

NodeComplete

A worker node finished successfully.

Fields

§node_id: String

Source node id.

§output_preview: String

First ≤ 200 characters of the output (for UI preview).

§

NodeFailed

A worker node failed with an unrecoverable error.

The orchestrator will mark all downstream nodes as NodeStatus::Skipped and then emit CouncilEvent::CouncilError.

Fields

§node_id: String

Source node id.

§error: String

Error description.

§

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

§processed: u32

Tokens processed so far.

§total: u32

Total tokens in the prompt.

§cached: u32

Tokens served from the KV cache.

§time_ms: u64

Wall-clock elapsed time in milliseconds.

§

SynthesisTextDelta

Incremental text token from the synthesiser.

Fields

§delta: String

The new text fragment.

§

SynthesisComplete

The synthesiser has finished.

Fields

§content: String

Full synthesised answer.

§

CouncilComplete

The orchestrator run completed successfully.

answer is the synthesiser’s final output (same as the content field of the preceding CouncilEvent::SynthesisComplete).

Fields

§answer: String
§

CouncilError

The orchestrator run failed with an unrecoverable error.

Fields

§message: String
§

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

§team_id: String

The id of the Team node in the parent graph.

§role: Option<RoleId>

The optional specialist role assigned to this team.

§

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

§team_id: String

The id of the Team node in the parent graph.

§compacted_output: String

Compacted summary of the team’s synthesised output.

§

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

§parent_node_id: String

The leaf node that triggered the spawn.

§child_graph_summary: String

One-line summary of the child graph that was planned.

§

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

§diff: GraphDiff

The diff that was applied.

§applied_at_wave: u32

Zero-based wave index at which the diff was applied.

§

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

§node_id: String

The id of the Debate node in the parent graph.

§round: u32

1-based round number.

§

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

§node_id: String

The id of the Debate node.

§agent_id: String

Short id of the agent (matches DebateAgent::id).

§agent_name: String

Display name of the agent.

§color: String

Hex colour code (#rrggbb) for this agent’s text in the UI.

§round: u32

1-based round number.

§contentiousness: f32

Temperature the LLM was called with (mapped from contentiousness).

§

DebateAgentTextDelta

Incremental text token from a debating agent.

Fields

§node_id: String

The id of the Debate node.

§agent_id: String

Short id of the agent.

§delta: String

The new text fragment.

§

DebateAgentReasoningDelta

Incremental reasoning / chain-of-thought token from a debating agent.

Fields

§node_id: String

The id of the Debate node.

§agent_id: String

Short id of the agent.

§delta: String

The reasoning fragment.

§

DebateAgentToolCallStart

A debating agent has initiated a tool call.

Fields

§node_id: String

The id of the Debate node.

§agent_id: String

Short id of the agent.

§tool_call: ToolCall

The tool call details.

§display_name: String

Human-readable display name for the tool.

§args_summary: Option<String>

Optional one-line summary of the arguments for UI rendering.

§

DebateAgentToolCallComplete

A tool call by a debating agent has completed.

Fields

§node_id: String

The id of the Debate node.

§agent_id: String

Short id of the agent.

§result: ToolResult

The tool’s result payload.

§display_name: String

Human-readable display name.

§duration_display: String

Human-readable elapsed time (e.g. "1.2s").

§

DebateAgentTurnComplete

An agent’s turn within a debate round has finished.

Fields

§node_id: String

The id of the Debate node.

§agent_id: String

Short id of the agent.

§round: u32

1-based round number.

§final_text: String

The agent’s complete response for this turn.

§

DebateJudgeStarted

The judge LLM call for a debate round has started.

Only emitted when a DebateJudgeConfig is present.

Fields

§node_id: String

The id of the Debate node.

§round: u32

1-based round number being judged.

§

DebateJudgeTextDelta

Incremental text token from the debate judge.

Fields

§node_id: String

The id of the Debate node.

§delta: String

The new text fragment.

§

DebateJudgeSummary

The judge has finished assessing a debate round.

Fields

§node_id: String

The id of the Debate node.

§round: u32

1-based round number that was judged.

§consensus_reached: bool

Whether the judge determined that consensus has been reached.

§early_stop_recommended: bool

Whether the judge recommends stopping early (only acted on if round >= judge.min_rounds_before_stop).

§assessment_text: String

The judge’s full written assessment.

§

DebateRoundCompacted

A debate round’s transcript has been compacted to reduce context pressure.

Only emitted when the running context window would otherwise overflow.

Fields

§node_id: String

The id of the Debate node.

§round: u32

1-based round number that was compacted.

§summary: String

Compressed summary replacing the full round transcript.

§

DebateStanceMap

Final stance outcomes for all agents after all rounds complete.

Emitted once after the last debate round, before synthesis starts.

Fields

§node_id: String

The id of the Debate node.

§stances: Vec<AgentStance>

Per-agent stance outcomes.

§

DebateSynthesisStarted

The debate synthesis phase has started.

The synthesiser assembles the full round history into a verdict.

Fields

§node_id: String

The id of the Debate node.

§

DebateSynthesisTextDelta

Incremental text token from the debate synthesiser.

Fields

§node_id: String

The id of the Debate node.

§delta: String

The new text fragment.

§

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

§node_id: String

The id of the Debate node.

§final_text: String

The synthesiser’s complete verdict text.

§

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.

Fields

§wave_index: u32

Zero-based index of the wave that just finished.

§node_count: usize

Number of nodes that completed in this wave.

Trait Implementations§

Source§

impl Clone for CouncilEvent

Source§

fn clone(&self) -> CouncilEvent

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for CouncilEvent

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for CouncilEvent

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Serialize for CouncilEvent

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,