pub enum OrchestratorEvent {
Show 13 variants
SubAgentStarted {
id: String,
agent_type: String,
description: String,
parent_id: Option<String>,
config: SubAgentConfig,
},
SubAgentCompleted {
id: String,
success: bool,
output: String,
duration_ms: u64,
token_usage: Option<TokenUsage>,
},
SubAgentStateChanged {
id: String,
old_state: SubAgentState,
new_state: SubAgentState,
},
SubAgentProgress {
id: String,
step: usize,
total_steps: usize,
message: String,
},
SubAgentInternalEvent {
id: String,
event: AgentEvent,
},
PlanningStarted {
id: String,
goal: String,
},
PlanningCompleted {
id: String,
plan: ExecutionPlan,
},
ToolExecutionStarted {
id: String,
tool_id: String,
tool_name: String,
args: Value,
},
ToolExecutionCompleted {
id: String,
tool_id: String,
tool_name: String,
result: String,
exit_code: i32,
duration_ms: u64,
},
ControlSignalReceived {
id: String,
signal: ControlSignal,
},
ControlSignalApplied {
id: String,
signal: ControlSignal,
success: bool,
error: Option<String>,
},
ExternalTaskPending {
id: String,
task_id: String,
lane: SessionLane,
command_type: String,
payload: Value,
timeout_ms: u64,
},
ExternalTaskCompleted {
id: String,
task_id: String,
success: bool,
},
}Expand description
Orchestrator 事件 - 统一的事件类型
Variants§
SubAgentStarted
SubAgent 启动
Fields
§
config: SubAgentConfigSubAgentCompleted
SubAgent 完成
SubAgentStateChanged
SubAgent 状态变更
SubAgentProgress
SubAgent 进度更新
SubAgentInternalEvent
SubAgent 内部事件(来自 AgentLoop)
PlanningStarted
规划开始
PlanningCompleted
规划完成
ToolExecutionStarted
工具执行开始
ToolExecutionCompleted
工具执行完成
ControlSignalReceived
控制信号接收
ControlSignalApplied
控制信号应用
ExternalTaskPending
A tool call inside a SubAgent is waiting for an external worker.
The consumer must call AgentOrchestrator::complete_external_task() with
the matching task_id and a result to unblock the SubAgent.
Fields
§
lane: SessionLaneExternalTaskCompleted
An external task was resolved (succeeded or failed).
Implementations§
Source§impl OrchestratorEvent
impl OrchestratorEvent
Sourcepub fn subagent_id(&self) -> Option<&str>
pub fn subagent_id(&self) -> Option<&str>
获取 SubAgent ID
Sourcepub fn event_name(&self) -> &'static str
pub fn event_name(&self) -> &'static str
获取事件类型名称
Trait Implementations§
Source§impl Clone for OrchestratorEvent
impl Clone for OrchestratorEvent
Source§fn clone(&self) -> OrchestratorEvent
fn clone(&self) -> OrchestratorEvent
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for OrchestratorEvent
impl Debug for OrchestratorEvent
Source§impl<'de> Deserialize<'de> for OrchestratorEvent
impl<'de> Deserialize<'de> for OrchestratorEvent
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for OrchestratorEvent
impl RefUnwindSafe for OrchestratorEvent
impl Send for OrchestratorEvent
impl Sync for OrchestratorEvent
impl Unpin for OrchestratorEvent
impl UnsafeUnpin for OrchestratorEvent
impl UnwindSafe for OrchestratorEvent
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more