pub enum RunInput {
UserMessageReceived {
content: Vec<ContentPart>,
},
ModelChunkReceived {
delta: String,
},
ModelCompleted {
message: Message,
usage: TokenUsage,
},
ToolCallRequested {
calls: Vec<ToolCall>,
},
ToolResultReceived {
call_id: String,
output: Value,
},
ToolApprovalGranted {
call_id: String,
},
ToolApprovalRejected {
call_id: String,
reason: Option<String>,
},
MemoryCompactionCompleted {
summary: String,
},
RuntimeErrorReceived {
error: String,
},
CancellationRequested,
}Expand description
Input events that drive the state machine forward.
Variants§
UserMessageReceived
A user message has been received.
Fields
§
content: Vec<ContentPart>Content parts of the user message.
ModelChunkReceived
A streaming text chunk was received from the model.
ModelCompleted
The model completed its response (non-streaming or end of stream).
Fields
§
usage: TokenUsageToken usage for this model call.
ToolCallRequested
Tool calls were requested by the model.
ToolResultReceived
A tool execution completed.
ToolApprovalGranted
Human approval was granted for a pending tool call.
ToolApprovalRejected
Human approval was rejected for a pending tool call.
Fields
MemoryCompactionCompleted
Memory compaction completed.
RuntimeErrorReceived
A runtime-level error occurred.
CancellationRequested
Cancellation was requested.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for RunInput
impl<'de> Deserialize<'de> for RunInput
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 RunInput
impl RefUnwindSafe for RunInput
impl Send for RunInput
impl Sync for RunInput
impl Unpin for RunInput
impl UnsafeUnpin for RunInput
impl UnwindSafe for RunInput
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