pub enum ToolSpanOutcome<'a> {
Completed {
output: &'a str,
success: bool,
duration_ms: Option<u64>,
},
AwaitingConfirmation,
EventStoreError {
message: &'a str,
},
}Available on crate feature
otel only.Expand description
Terminal outcome of a tool execution, used to stamp the outcome
attributes + metric labels on an execute_tool span.
Mirrors the match arms of
agent_loop::tool_execution::finish_tool_span so the
agent_sdk.tool.outcome value and error.type value match across
loops.
Variants§
Completed
Tool ran (or was short-circuited) and produced a result. The outcome string is derived from the result body / success flag exactly as the in-process loop does.
Fields
AwaitingConfirmation
Tool requires user confirmation before running.
EventStoreError
The execution boundary itself errored (e.g. event-store commit
failure). Recorded with error.type = event_store.
Auto Trait Implementations§
impl<'a> Freeze for ToolSpanOutcome<'a>
impl<'a> RefUnwindSafe for ToolSpanOutcome<'a>
impl<'a> Send for ToolSpanOutcome<'a>
impl<'a> Sync for ToolSpanOutcome<'a>
impl<'a> Unpin for ToolSpanOutcome<'a>
impl<'a> UnsafeUnpin for ToolSpanOutcome<'a>
impl<'a> UnwindSafe for ToolSpanOutcome<'a>
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