ToolOutcome
type ToolOutcome<O> = | { callId: string; durationMs: number; ok: true; output: O; summary: string;} | { callId: string; cause?: unknown; durationMs: number; error: string; kind: ToolFailure; ok: false;};Defined in: core/src/tools.ts:26
Type Parameters
Section titled “Type Parameters”| Type Parameter |
|---|
O |
Union Members
Section titled “Union Members”Type Literal
Section titled “Type Literal”{ callId: string; durationMs: number; ok: true; output: O; summary: string;}Type Literal
Section titled “Type Literal”{ callId: string; cause?: unknown; durationMs: number; error: string; kind: ToolFailure; ok: false;}callId
Section titled “callId”callId: string;cause?
Section titled “cause?”optional cause?: unknown;durationMs
Section titled “durationMs”durationMs: number;error: string;Fed back to the model verbatim, so it must read as an instruction to a reader who cannot see our stack trace.
kind: ToolFailure;ok: false;