pub enum ToolResultStatus {
Succeeded,
Failed,
Rejected,
Cancelled,
TimedOut,
UnknownOutcome,
}Expand description
Terminal status of one tool invocation, recorded verbatim as a fact; mapping from execution errors is the driver’s job, not the kernel’s.
The boundary between these statuses is whether a result was reported or observed, not whether the call could have had an effect:
Succeeded,Failed,CancelledandTimedOutare results for the call.CancelledandTimedOutare the tool’s own report of a terminal state; they may carry partial output and do not prove that nothing happened.Rejectedrecords a call that never ran: an unknown tool, a denying processor or another refusal stopped it before execution, so no tool reported a result.UnknownOutcomeis a placeholder synthesized by the executor or a tool-source bridge when no result was observed — for example, a call stopped before its first poll or one that did not return.
Exhaustive on purpose: renderers and the runtime decide by status, so a new one is a breaking change.
Variants§
Succeeded
The tool returned a successful result.
Failed
The tool ran and reported failure (including panic isolation).
Rejected
The call never ran — unknown tool, denied by a processor, or otherwise refused before execution.
Cancelled
The tool reported that the invocation was cancelled before completing. The result may carry partial output, and it does not prove that no side effect happened.
TimedOut
The tool reported that the invocation exceeded its time budget. The result may carry partial output, and it does not prove that no side effect happened.
UnknownOutcome
No result was observed: the executor recorded it for a call stopped before the first poll or one that did not return, or a tool-source bridge recorded it for a source that reported an unobserved timeout or cancellation. It does not mean the tool failed or had no effect.