The probability every Likelihood gets, given its instructions. Defaults to a confident yes, which passes a finishIf gate at its 0.9 threshold.
ProtectedapiOnly sub-classes can access the API key
Every call since the last Reset, in order.
Lets the stand-in answer.
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.
Makes every later call fail, so nothing outside the bundle gets a scripted answer.
ProtectedDoDriver-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.
Clears the recorded calls and puts the default Likelihood back.
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.
A decision driver that answers every question at once, with no provider. A Likelihood gets ScriptedDecision.LikelihoodFor of its instructions; a Choice or Score its first option or level, with all the probability on it. Calls are recorded on Calls.
While disarmed it fails every call instead: a name that had no real registration before the bundle keeps resolving to the stand-in after the restore, and must not hand later bundles an answer.