CreateHarnessOptions
CreateHarnessOptions<
TInput,TOutput> =object
Options for creating a lightweight custom application harness.
Prefer this helper for custom harnesses. Implement Harness directly only
when the callback already returns a full HarnessRun with canonical
session.events.
Example
Section titled “Example”const options: CreateHarnessOptions<string, { status: "approved" }> = { name: "refund-agent", run: async ({ input }) => ({ output: await classifyRefund(input), events: [{ type: "message", role: "user", content: input }], }),};Type Parameters
Section titled “Type Parameters”TInput
Section titled “TInput”TInput = unknown
TOutput
Section titled “TOutput”TOutput extends JsonValue | undefined = JsonValue | undefined
Properties
Section titled “Properties”name:
string
Stable harness name used in reports.
run: (
args) =>MaybePromise<HarnessResultLike<TOutput>>
Executes application code and returns either a lightweight result or full HarnessRun.
Parameters
Section titled “Parameters”CreateHarnessRunArgs<TInput>
Returns
Section titled “Returns”MaybePromise<HarnessResultLike<TOutput>>