pub struct RunSink<'a, 'l> {
pub log: &'a mut LogTarget<'l>,
pub transcript: &'a mut (dyn Write + Send),
}Expand description
Where a run’s event stream lands: every event’s raw JSON goes to the
transcript (one line each, scrubbed); selected events are recorded to the
LogTarget as worker.message deltas (scrubbed + truncated).
Fields§
§log: &'a mut LogTarget<'l>§transcript: &'a mut (dyn Write + Send)Implementations§
Source§impl RunSink<'_, '_>
impl RunSink<'_, '_>
Sourcepub fn handle(&mut self, run_id: &str, event: &AgentEvent) -> Result<bool>
pub fn handle(&mut self, run_id: &str, event: &AgentEvent) -> Result<bool>
Process one event. Returns true when the event was a denied tool
result (a guardrail hit, §4.7).
Log mapping: Text → tag "text", ToolUse → "tool-use"
(<tool>: <summary>), ToolResult → "denied" or "tool-result";
everything else is transcript-only.
Auto Trait Implementations§
impl<'a, 'l> !RefUnwindSafe for RunSink<'a, 'l>
impl<'a, 'l> !Sync for RunSink<'a, 'l>
impl<'a, 'l> !UnwindSafe for RunSink<'a, 'l>
impl<'a, 'l> Freeze for RunSink<'a, 'l>
impl<'a, 'l> Send for RunSink<'a, 'l>
impl<'a, 'l> Unpin for RunSink<'a, 'l>
impl<'a, 'l> UnsafeUnpin for RunSink<'a, 'l>
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