Skip to content
1 min read · 77 words

Function: validateReasonerOutput()

ts
function validateReasonerOutput(
  schema: Schema,
  args: Record<string, EncodableValue>,
): string | true;

Defined in: src/batteries/orchestration/reason.ts:101

Validate captured tool arguments against the decoded schema, returning a discriminated result rather than throwing.

Parameters

ParameterTypeDescription
schemaSchemaThe decoded output schema
argsRecord<string, EncodableValue>The captured tool arguments to validate

Returns

string | true

true if validation succeeds, or the validation error message if it fails