#[non_exhaustive]pub enum AgentRunMessage {
Event(RuntimeEvent),
ToolInvocations {
batch: PendingToolCallBatch,
},
HookInvocation {
invocation: HookInvocation,
},
}Expand description
Message emitted by an AgentRun.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Event(RuntimeEvent)
Public SDK/UI event.
ToolInvocations
Ordered host-owned tool calls from one runtime execution wave.
Runtime-owned calls from the same model response are executed internally and are not emitted here. A single host call is represented as a one-call batch; calls are never combined across model responses or separate run reads.
Fields
batch: PendingToolCallBatchRuntime-owned batch ID and host-owned calls in provider/model order. Every call must be resolved before the run can request the next runtime execution wave or model response.
HookInvocation
Subscribed host-bridged lifecycle hook awaiting a typed decision.
Emitted only when the host explicitly subscribed to this hook point (and matching tool name, for tool hooks).
Fields
invocation: HookInvocationPending hook invocation payload and identifier.
Implementations§
Source§impl AgentRunMessage
impl AgentRunMessage
pub fn as_event(&self) -> Option<&RuntimeEvent>
Sourcepub fn as_tool_invocations(&self) -> Option<&PendingToolCallBatch>
pub fn as_tool_invocations(&self) -> Option<&PendingToolCallBatch>
Borrows the runtime-owned tool batch when this message carries a host invocation handoff.
Sourcepub fn as_hook_invocation(&self) -> Option<&HookInvocation>
pub fn as_hook_invocation(&self) -> Option<&HookInvocation>
Borrows the hook invocation when this message carries a bridged hook request.
Trait Implementations§
Source§impl Clone for AgentRunMessage
impl Clone for AgentRunMessage
Source§impl Debug for AgentRunMessage
impl Debug for AgentRunMessage
impl Eq for AgentRunMessage
Source§impl PartialEq for AgentRunMessage
impl PartialEq for AgentRunMessage
impl StructuralPartialEq for AgentRunMessage
Auto Trait Implementations§
impl Forget for AgentRunMessage
impl Freeze for AgentRunMessagewhere
*const u8 is !null: Freeze,
PhantomData<u8>: Freeze,
*const LeafNode<String, Value> is !null: Freeze,
PhantomData<(Owned, LeafOrInternal)>: Freeze,
PhantomData<Box<(String, Value)>>: Freeze,
PhantomData<PendingToolCall>: Freeze,
PhantomData<String>: Freeze,
PhantomData<TodoItem>: Freeze,
PhantomData<QueuedInputView>: Freeze,
PhantomData<ToolName>: Freeze,
impl Move for AgentRunMessage
impl RefUnwindSafe for AgentRunMessage
impl Send for AgentRunMessage
impl Sync for AgentRunMessage
impl Unpin for AgentRunMessage
impl UnsafeUnpin for AgentRunMessagewhere
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
*const LeafNode<String, Value> is !null: UnsafeUnpin,
PhantomData<(Owned, LeafOrInternal)>: UnsafeUnpin,
PhantomData<Box<(String, Value)>>: UnsafeUnpin,
PhantomData<PendingToolCall>: UnsafeUnpin,
PhantomData<String>: UnsafeUnpin,
PhantomData<TodoItem>: UnsafeUnpin,
PhantomData<QueuedInputView>: UnsafeUnpin,
PhantomData<ToolName>: UnsafeUnpin,
impl UnwindSafe for AgentRunMessage
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.