pub struct RunStream {
pub thread_id: String,
pub run_id: String,
pub decision_tx: UnboundedSender<ToolCallDecision>,
pub events: Pin<Box<dyn Stream<Item = AgentEvent> + Send>>,
}Expand description
Result of AgentOs::run_stream: an event stream plus metadata.
Checkpoint persistence is handled internally in stream order — callers only consume the event stream and use the IDs for protocol encoding.
The final thread is not exposed here; storage is updated incrementally
via ThreadChangeSet appends.
Fields§
§thread_id: StringResolved thread ID (may have been auto-generated).
run_id: StringResolved run ID (may have been auto-generated).
decision_tx: UnboundedSender<ToolCallDecision>Sender for runtime interaction decisions (approve/deny payloads).
The receiver is owned by the running loop. Sending a decision while the run is active allows mid-run resolution of suspended tool calls.
events: Pin<Box<dyn Stream<Item = AgentEvent> + Send>>The agent event stream.
Implementations§
Source§impl RunStream
impl RunStream
Sourcepub fn submit_decision(
&self,
decision: ToolCallDecision,
) -> Result<(), SendError<ToolCallDecision>>
pub fn submit_decision( &self, decision: ToolCallDecision, ) -> Result<(), SendError<ToolCallDecision>>
Submit one interaction decision to the active run.
Auto Trait Implementations§
impl Freeze for RunStream
impl !RefUnwindSafe for RunStream
impl Send for RunStream
impl !Sync for RunStream
impl Unpin for RunStream
impl !UnwindSafe for RunStream
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