decide
Purpose and behavior
Section titled “Purpose and behavior”Execute one decision-provider request against lossless JSON state, validate all answers and return normalized usage and native metadata. Distribution totals and weighted scores allow accumulated four-decimal rounding without changing native values. Reported truncation fails unless explicitly allowed.
Complete example and detailed rules.
Parameters and properties
Section titled “Parameters and properties”optionsRequiredDecideOptions<Q>Provider, named model, declaration and lossless JSON state for one immediate evaluation.options.providerRequiredDecisionProviderDecision provider that performs this evaluation.options.modelRequiredstringNonempty decision model name, without generation or reasoning settings.options.decisionRequiredDecision<Q>Frozen typed question declaration created with defineDecision.options.stateRequiredDecisionStateText, object or array validated as lossless JSON before the request.options.signalOptionalAbortSignal | undefinedOptional caller cancellation signal forwarded to the decision provider.options.observationOptionalObservationHub | undefinedOptional scoped observation hub; detailed state and answers require verbose mode.options.allowTruncatedOptionalboolean | undefinedFalse by default; true accepts a reported truncation while retaining its flag in the result.