Skip to main content

Module contract

Module contract 

Source

Structs§

AiNodeContract
RAO node contract carried by an ai node (scalar fields on the node body, so it round-trips through the DSL). Presence of contract: true opts the node into contract-bound output: the model must return an AiOutputEnvelope, and the engine validates and routes it.
AiOutputEnvelope
Structured output a contract-bound AI node must return (RAO node-contract expected_output). Anything outside this schema is a node failure.
NodeConstraints
NodeContract
RoutingThresholds
RAO routing thresholds. Applied by the orchestration engine to the model’s reported confidence; defined on the node contract, never in the prompt.

Enums§

ConfidenceType
How an AI node’s reported confidence was produced (RAO node-contract confidence_type). Self-reported in-text confidence is verbalized; token_level derives from token logprobs; calibrated is post-processed against a calibration set.
ContractError
Error raised while reading a RAO contract off a node or validating a model output against it (RAO Spec v1.0, docs/rao-spec).
RouteDecision
Where the orchestration engine routes a contract-bound AI output. Decided by RoutingThresholds::route - never by the model (RAO constraint 5).