Skip to content

Harness

Harness<TInput, TOutput, TMetadata> = object

Adapter that executes the system under test and returns a normalized run.

const harness: Harness<string, { status: "approved" | "denied" }> = {
name: "refund-agent",
async run(input, context) {
return normalizeHarnessRun(input, await runRefundFlow(input), context);
},
};

TInput = unknown

TOutput extends JsonValue | undefined = JsonValue | undefined

TMetadata extends HarnessMetadata = HarnessMetadata

name: string

Stable harness name used in reports.


run: (input, context) => Promise<HarnessRun<TOutput>>

Executes the system under test and returns a normalized run.

TInput

HarnessContext<TMetadata>

Promise<HarnessRun<TOutput>>