Skip to content

SimpleHarnessResult

SimpleHarnessResult<TOutput> = OutputField<TOutput> & SimpleTranscriptInput & object

Lightweight result shape normalized by createHarness(...).

optional artifacts?: Record<string, unknown>

Raw artifact values to normalize and merge into the run.

optional errors?: unknown[]

Raw errors to normalize into the run.

optional metadata?: Record<string, unknown>

Raw session metadata to normalize into the session.

optional timings?: TimingSummary

Timing summary to attach to the run.

optional traces?: SimpleTraceRecord[]

Lightweight traces and spans to normalize into the run.

optional usage?: UsageSummary

Usage summary to attach to the run.

TOutput extends JsonValue | undefined = JsonValue | undefined

const result: SimpleHarnessResult<{ status: "approved" }> = {
output: { status: "approved" },
events: [
{ type: "message", role: "user", content: "Refund invoice inv_123" },
{ type: "message", role: "assistant", content: { status: "approved" } },
],
usage: { totalTokens: 260 },
};