pub struct TurnOutcome {
pub new_messages: Vec<Message>,
pub final_text: Option<String>,
pub finish_reason: FinishReason,
pub usage: TokenUsage,
pub llm_latency_ms: u64,
pub steps: usize,
pub side_effects: Vec<SideEffect>,
pub plan_buffer: Option<Vec<ToolCall>>,
pub tool_audits: HashMap<String, AuditMeta>,
pub plan_confirmed: bool,
}Expand description
The result of executing one turn.
Returned to the Wrapper, which appends new_messages to its transcript, persists them, handles side effects, and tracks costs.
Fields§
§new_messages: Vec<Message>All messages produced during this turn (assistant responses + tool results). Does NOT include the input messages — only what the kernel generated.
final_text: Option<String>The final assistant text (convenience — also the last assistant msg in new_messages).
finish_reason: FinishReasonWhy the turn ended.
usage: TokenUsageCumulative token usage across all LLM calls in this turn.
llm_latency_ms: u64Total LLM call latency in milliseconds (excluding tool execution time).
steps: usizeNumber of steps (LLM invocations) executed in this turn.
side_effects: Vec<SideEffect>Side effects the Wrapper should adopt (background jobs, scheduled tasks).
plan_buffer: Option<Vec<ToolCall>>Buffered tool calls from a proposed plan (when plan is pending).
tool_audits: HashMap<String, AuditMeta>Goal-153: audit records for tool results, keyed by tool_call_id.
Passed through from RunInnerOutcome so the persistence layer
can emit MessageAppendedWithAudit for tool messages.
plan_confirmed: boolWhether the plan was confirmed by the user.
Trait Implementations§
Source§impl Debug for TurnOutcome
impl Debug for TurnOutcome
Source§impl From<TurnOutcome> for RuntimeOutcome
impl From<TurnOutcome> for RuntimeOutcome
Source§fn from(t: TurnOutcome) -> Self
fn from(t: TurnOutcome) -> Self
Auto Trait Implementations§
impl Freeze for TurnOutcome
impl RefUnwindSafe for TurnOutcome
impl Send for TurnOutcome
impl Sync for TurnOutcome
impl Unpin for TurnOutcome
impl UnsafeUnpin for TurnOutcome
impl UnwindSafe for TurnOutcome
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<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more