AbstractCreates an instance of BaseDecision.
The API key for the decision service provider.
Executes a typed decision request across one or more questions about a given state. This method wraps driver execution with input validation, output verification, execution timing, and structured error handling. It never throws.
Decision request parameters including state, questions, and model.
A Promise resolving to a DecisionResult.
Protected AbstractDoDriver-specific implementation of the decision logic. Must be implemented by concrete provider subclasses. Returned probabilities must already be normalised, in range, and keyed correctly.
The driver owns cancellation: Decide() passes params.CancellationToken through
unchecked, so the driver should check it before calling the provider and hand it to
the provider's HTTP client.
Decision parameters to evaluate.
A Promise resolving to a DecisionResult.
ProtectedValidateValidates driver output DecisionResult against the requested questions.
Original decision request parameters.
Result returned by the driver.
An array of error descriptions, empty if valid.
ProtectedValidateValidates input DecisionParams against the decision contract.
Parameters to validate.
An array of error descriptions, empty if valid.
Abstract base class for typed decision model implementations. Subclasses wrap provider APIs to produce structured Likelihood, Choice, and Score answers.
Implementations should:
@RegisterClass(BaseDecision, 'ProviderName')DoDecide()methodparams.CancellationToken, which the base does not checkDecide()validates the request before callingDoDecide()and the answers after it, so a driver does not repeat those checks.Example: