Files
zesdex/src/app/subagent/event.rs
T

37 lines
788 B
Rust

//! Event variants that a running subagent can emit to its parent via the
//! shared mpsc channel.
use serde_json::Value;
/// Progress and outcome events emitted by `run_subagent` as it processes
/// LLM responses and tool calls.
#[derive(Debug, Clone)]
pub enum SubagentEvent {
StepCompleted {
#[allow(dead_code)]
step: usize,
#[allow(dead_code)]
output: String,
},
StepFailed {
step: usize,
error: String,
},
Completed {
#[allow(dead_code)]
output: String,
},
ToolCall {
tool: String,
#[allow(dead_code)]
args: Value,
},
ToolResult {
tool: String,
args: Value,
#[allow(dead_code)]
output: String,
},
Progress(String),
}