Provider contract
Provider capabilities
Request and result validation
Policy rules
Exports
Choice
Choose one key from an unordered map of labels and descriptions.— means no declared default):
Parameters and example
Parameters and example
ChoicePolicy
Map every allowed choice to an outcome, optionally requiring confidence.— means no declared default):
Parameters and example
Parameters and example
ChoicePolicy.validate
Parameters and example
Parameters and example
ChoicePolicy.apply
Parameters and example
Parameters and example
ChoiceResult
A selected option with optional native distribution and confidence.— means no declared default):
Parameters and example
Parameters and example
DecisionAction
Authored control-flow signals; none grants permission to execute a tool.Example
Example
DecisionAnswer
Example
Example
DecisionBinding
Bind a reusable definition to a provider name and optional pure policy.— means no declared default):
Parameters and example
Parameters and example
DecisionCapabilities
Provider guarantees checked before evaluation, without guessing calibration.— means no declared default):
Parameters and example
Parameters and example
DecisionContext
A revocable decision facade bound to the invocation that obtained it.Parameters and example
Parameters and example
DecisionContext.evaluate
Parameters and example
Parameters and example
DecisionDefinition
A versioned set of independent questions, separate from provider selection.— means no declared default):
Parameters and example
Parameters and example
DecisionError
A decision could not be evaluated without violating its contract.Example
Example
DecisionEvaluation
Validated results or an explicit failure outcome, with provider provenance.— means no declared default):
Parameters and example
Parameters and example
DecisionOutcome
A policy action and, for routing, an authored destination identity.— means no declared default):
Parameters and example
Parameters and example
DecisionProvider
Implement in application code or an extension; lifecycle owns the client.— means no declared default):
Example
Example
DecisionProvider.evaluate
Parameters and example
Parameters and example
DecisionProviderError
A provider failed; its private exception is intentionally not exposed.Example
Example
DecisionQuestion
Example
Example
DecisionRequest
A definition and isolated state snapshot sent to one provider evaluation.— means no declared default):
Parameters and example
Parameters and example
DecisionResponse
Typed answers keyed by the exact question identities in the request.— means no declared default):
Parameters and example
Parameters and example
DecisionTimeoutError
A decision exceeded its configured evaluation deadline.Example
Example
DecisionValidationError
A provider response did not match the declared decision contract.Example
Example
Decisions
Register providers and named decisions; lifecycle resources own client cleanup.Parameters and example
Parameters and example
Decisions.evaluate
Parameters and example
Parameters and example
Decisions.evaluate_definition
Parameters and example
Parameters and example
FixtureDecisionProvider
Return fixtures keyed by (decision name, version), without retaining private state.Parameters and example
Parameters and example
FixtureDecisionProvider.evaluate
Parameters and example
Parameters and example
Predicate
Judge a proposition by returning the probability that it is true.— means no declared default):
Parameters and example
Parameters and example
PredicateResult
The probability of true; this is not a generic confidence score.— means no declared default):
Parameters and example
Parameters and example
QuestionKind
Portable question shapes a decision provider can explicitly support.Example
Example
Score
Judge a rubric on the numeric scale 0 through len(levels) minus one.— means no declared default):
Parameters and example
Parameters and example
ScoreResult
A rubric position with optional probabilities in the declared level order.— means no declared default):
Parameters and example
Parameters and example
ThresholdPolicy
Use inclusive lower/upper boundaries and an explicit middle uncertainty band.— means no declared default):
Parameters and example
Parameters and example
ThresholdPolicy.validate
Parameters and example
Parameters and example
ThresholdPolicy.apply
Parameters and example
Parameters and example