Skip to content

SimpleHarnessResult

SimpleHarnessResult<TOutput> = OutputField<TOutput> & 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 messages?: NormalizedMessage[]

Pre-normalized transcript messages. When omitted, a default user/assistant transcript is created.

optional metadata?: Record<string, unknown>

Raw session metadata to normalize into the session.

optional timings?: TimingSummary

Timing summary to attach to the run.

optional toolCalls?: SimpleToolCallRecord[]

Lightweight tool-call records to normalize into the session.

optional usage?: UsageSummary

Usage summary to attach to the run.

TOutput extends JsonValue | undefined = JsonValue | undefined

const result: SimpleHarnessResult<{ status: "approved" }> = {
output: { status: "approved" },
toolCalls: [{ name: "lookupInvoice", arguments: { invoiceId: "inv_123" } }],
usage: { totalTokens: 260 },
};