HarnessRun
HarnessRun<
TOutput> =OutputField<TOutput> &object
Normalized result returned by every harness execution.
Type Declaration
Section titled “Type Declaration”artifacts?
Section titled “artifacts?”
optionalartifacts?:Record<string,JsonValue>
JSON-safe run artifacts captured by the harness or test context.
errors
Section titled “errors”errors:
Record<string,JsonValue>[]
Normalized errors captured during execution.
session
Section titled “session”session:
NormalizedSession
Normalized transcript and provider/session metadata.
timings?
Section titled “timings?”
optionaltimings?:TimingSummary
Optional timing summary for the run.
usage:
UsageSummary
Stable provider usage units such as tokens, tools, and retries.
Type Parameters
Section titled “Type Parameters”TOutput
Section titled “TOutput”TOutput extends JsonValue | undefined = JsonValue | undefined
Example
Section titled “Example”const run: HarnessRun<{ status: "approved" }> = { output: { status: "approved" }, session: { messages: [ { role: "user", content: "Refund invoice inv_123" }, { role: "assistant", content: { status: "approved" } }, ], }, usage: { totalTokens: 260 }, errors: [],};