cayu.evals.runtime_replay
Public Cayu API. Definitions are grouped by their public source module, and definitions from private implementation modules appear on their package’s page; adding a symbol does not move existing links. The import shown at each entry is a supported public namespace. Read the Python API overview and install the required extra.
replay_session
Section titled “replay_session”from cayu.evals import replay_sessionReplay one promoted two-step tool round through an isolated ordinary runtime.
Recorded model completions and tool results are fixtures. The operation never calls a live provider, registered tool, environment, runner, vault, or source session store. A match proves only the versioned runtime/request contracts represented by the retained identities.
async replay_session(app: CayuApp, request: RuntimeReplayRequest) -> RuntimeReplayReportRelease source · Runtime guarantees · Capability guides
RUNTIME_REPLAY_DEFAULT_MAX_EVENTS
Section titled “RUNTIME_REPLAY_DEFAULT_MAX_EVENTS”from cayu.evals import RUNTIME_REPLAY_DEFAULT_MAX_EVENTSRUNTIME_REPLAY_DEFAULT_MAX_EVENTS = 10000Release source · Runtime guarantees · Capability guides
RUNTIME_REPLAY_DEFAULT_MAX_MODEL_STEPS
Section titled “RUNTIME_REPLAY_DEFAULT_MAX_MODEL_STEPS”from cayu.evals import RUNTIME_REPLAY_DEFAULT_MAX_MODEL_STEPSRUNTIME_REPLAY_DEFAULT_MAX_MODEL_STEPS = 2Release source · Runtime guarantees · Capability guides
RUNTIME_REPLAY_DEFAULT_MAX_TOOL_CALLS
Section titled “RUNTIME_REPLAY_DEFAULT_MAX_TOOL_CALLS”from cayu.evals import RUNTIME_REPLAY_DEFAULT_MAX_TOOL_CALLSRUNTIME_REPLAY_DEFAULT_MAX_TOOL_CALLS = 16Release source · Runtime guarantees · Capability guides
RUNTIME_REPLAY_DEFAULT_MAX_TRANSCRIPT_MESSAGES
Section titled “RUNTIME_REPLAY_DEFAULT_MAX_TRANSCRIPT_MESSAGES”from cayu.evals import RUNTIME_REPLAY_DEFAULT_MAX_TRANSCRIPT_MESSAGESRUNTIME_REPLAY_DEFAULT_MAX_TRANSCRIPT_MESSAGES = 1000Release source · Runtime guarantees · Capability guides
RUNTIME_REPLAY_DEFAULT_TIMEOUT_SECONDS
Section titled “RUNTIME_REPLAY_DEFAULT_TIMEOUT_SECONDS”from cayu.evals import RUNTIME_REPLAY_DEFAULT_TIMEOUT_SECONDSRUNTIME_REPLAY_DEFAULT_TIMEOUT_SECONDS = 30.0Release source · Runtime guarantees · Capability guides
RUNTIME_REPLAY_HARD_MAX_EVENTS
Section titled “RUNTIME_REPLAY_HARD_MAX_EVENTS”from cayu.evals import RUNTIME_REPLAY_HARD_MAX_EVENTSRUNTIME_REPLAY_HARD_MAX_EVENTS = 100000Release source · Runtime guarantees · Capability guides
RUNTIME_REPLAY_HARD_MAX_MODEL_STEPS
Section titled “RUNTIME_REPLAY_HARD_MAX_MODEL_STEPS”from cayu.evals import RUNTIME_REPLAY_HARD_MAX_MODEL_STEPSRUNTIME_REPLAY_HARD_MAX_MODEL_STEPS = 16Release source · Runtime guarantees · Capability guides
RUNTIME_REPLAY_HARD_MAX_TOOL_CALLS
Section titled “RUNTIME_REPLAY_HARD_MAX_TOOL_CALLS”from cayu.evals import RUNTIME_REPLAY_HARD_MAX_TOOL_CALLSRUNTIME_REPLAY_HARD_MAX_TOOL_CALLS = 256Release source · Runtime guarantees · Capability guides
RUNTIME_REPLAY_HARD_MAX_TRANSCRIPT_MESSAGES
Section titled “RUNTIME_REPLAY_HARD_MAX_TRANSCRIPT_MESSAGES”from cayu.evals import RUNTIME_REPLAY_HARD_MAX_TRANSCRIPT_MESSAGESRUNTIME_REPLAY_HARD_MAX_TRANSCRIPT_MESSAGES = 10000Release source · Runtime guarantees · Capability guides
RUNTIME_REPLAY_HARD_TIMEOUT_SECONDS
Section titled “RUNTIME_REPLAY_HARD_TIMEOUT_SECONDS”from cayu.evals import RUNTIME_REPLAY_HARD_TIMEOUT_SECONDSRUNTIME_REPLAY_HARD_TIMEOUT_SECONDS = 300.0Release source · Runtime guarantees · Capability guides
RUNTIME_REPLAY_SCHEMA_VERSION
Section titled “RUNTIME_REPLAY_SCHEMA_VERSION”from cayu.evals import RUNTIME_REPLAY_SCHEMA_VERSIONRUNTIME_REPLAY_SCHEMA_VERSION = 1Release source · Runtime guarantees · Capability guides
RuntimeReplayAttemptComparison
Section titled “RuntimeReplayAttemptComparison”from cayu.evals import RuntimeReplayAttemptComparisonBases: BaseModel.
Fields and attributes
Section titled “Fields and attributes”Defaults below are source expressions; Field(...) includes schema/validation settings and default_factory creates a fresh value. Inherited declarations are included. Constructor behavior follows the model or dataclass shown in the bases/decorators.
| Name | Type | Default |
|---|---|---|
index |
StrictInt |
Field(ge=1) |
source_event_id |
str |
Field(min_length=1, max_length=512) |
source_footprint_schema_version |
StrictInt |
Field(ge=1) |
candidate_footprint_schema_version |
StrictInt |
Field(ge=1) |
source_provider_name |
str |
Field(min_length=1, max_length=256) |
source_model |
str |
Field(min_length=1, max_length=512) |
candidate_provider_name |
str |
Field(min_length=1, max_length=256) |
candidate_model |
str |
Field(min_length=1, max_length=512) |
source_provider_neutral |
RuntimeReplayFingerprintIdentity |
required |
candidate_provider_neutral |
RuntimeReplayFingerprintIdentity |
required |
source_provider_wire |
RuntimeReplayFingerprintIdentity | None |
None |
candidate_provider_wire |
RuntimeReplayFingerprintIdentity | None |
None |
matched |
StrictBool |
required |
validate_match (method)
Section titled “validate_match (method)”RuntimeReplayAttemptComparison.validate_match() -> RuntimeReplayAttemptComparisonRelease source · Runtime guarantees · Capability guides
RuntimeReplayBoundaryKind
Section titled “RuntimeReplayBoundaryKind”from cayu.evals import RuntimeReplayBoundaryKindBases: StrEnum.
Fields and attributes
Section titled “Fields and attributes”Defaults below are source expressions; Field(...) includes schema/validation settings and default_factory creates a fresh value. Inherited declarations are included. Constructor behavior follows the model or dataclass shown in the bases/decorators.
| Name | Type | Default |
|---|---|---|
PREFLIGHT |
class attribute |
'preflight' |
EXECUTION_PROFILE |
class attribute |
'execution_profile' |
MODEL_REQUEST |
class attribute |
'model_request' |
TOOL_POLICY |
class attribute |
'tool_policy' |
TOOL_CALL |
class attribute |
'tool_call' |
TOOL_RESULT |
class attribute |
'tool_result' |
TERMINAL_OUTCOME |
class attribute |
'terminal_outcome' |
Release source · Runtime guarantees · Capability guides
RuntimeReplayBounds
Section titled “RuntimeReplayBounds”from cayu.evals import RuntimeReplayBoundsHard limits for one isolated replay attempt.
Bases: BaseModel.
Fields and attributes
Section titled “Fields and attributes”Defaults below are source expressions; Field(...) includes schema/validation settings and default_factory creates a fresh value. Inherited declarations are included. Constructor behavior follows the model or dataclass shown in the bases/decorators.
| Name | Type | Default |
|---|---|---|
max_events |
StrictInt |
Field(default=RUNTIME_REPLAY_DEFAULT_MAX_EVENTS, ge=1, le=RUNTIME_REPLAY_HARD_MAX_EVENTS) |
max_transcript_messages |
StrictInt |
Field(default=RUNTIME_REPLAY_DEFAULT_MAX_TRANSCRIPT_MESSAGES, ge=1, le=RUNTIME_REPLAY_HARD_MAX_TRANSCRIPT_MESSAGES) |
max_model_steps |
StrictInt |
Field(default=RUNTIME_REPLAY_DEFAULT_MAX_MODEL_STEPS, ge=1, le=RUNTIME_REPLAY_HARD_MAX_MODEL_STEPS) |
max_tool_calls |
StrictInt |
Field(default=RUNTIME_REPLAY_DEFAULT_MAX_TOOL_CALLS, ge=0, le=RUNTIME_REPLAY_HARD_MAX_TOOL_CALLS) |
timeout_seconds |
StrictFloat |
Field(default=RUNTIME_REPLAY_DEFAULT_TIMEOUT_SECONDS, gt=0, le=RUNTIME_REPLAY_HARD_TIMEOUT_SECONDS) |
Release source · Runtime guarantees · Capability guides
RuntimeReplayDisposition
Section titled “RuntimeReplayDisposition”from cayu.evals import RuntimeReplayDispositionBases: StrEnum.
Fields and attributes
Section titled “Fields and attributes”Defaults below are source expressions; Field(...) includes schema/validation settings and default_factory creates a fresh value. Inherited declarations are included. Constructor behavior follows the model or dataclass shown in the bases/decorators.
| Name | Type | Default |
|---|---|---|
MATCHED |
class attribute |
'matched' |
DIVERGED |
class attribute |
'diverged' |
UNAVAILABLE |
class attribute |
'unavailable' |
BOUNDS_EXCEEDED |
class attribute |
'bounds_exceeded' |
FAILED |
class attribute |
'failed' |
Release source · Runtime guarantees · Capability guides
RuntimeReplayDivergence
Section titled “RuntimeReplayDivergence”from cayu.evals import RuntimeReplayDivergenceBases: BaseModel.
Fields and attributes
Section titled “Fields and attributes”Defaults below are source expressions; Field(...) includes schema/validation settings and default_factory creates a fresh value. Inherited declarations are included. Constructor behavior follows the model or dataclass shown in the bases/decorators.
| Name | Type | Default |
|---|---|---|
kind |
RuntimeReplayDivergenceKind |
required |
boundary |
RuntimeReplayBoundaryKind |
required |
index |
StrictInt | None |
Field(default=None, ge=1) |
source_event_id |
str | None |
Field(default=None, min_length=1, max_length=512) |
Release source · Runtime guarantees · Capability guides
RuntimeReplayDivergenceKind
Section titled “RuntimeReplayDivergenceKind”from cayu.evals import RuntimeReplayDivergenceKindBases: StrEnum.
Fields and attributes
Section titled “Fields and attributes”Defaults below are source expressions; Field(...) includes schema/validation settings and default_factory creates a fresh value. Inherited declarations are included. Constructor behavior follows the model or dataclass shown in the bases/decorators.
| Name | Type | Default |
|---|---|---|
EXECUTION_PROFILE_MISMATCH |
class attribute |
'execution_profile_mismatch' |
REQUEST_FOOTPRINT_MISMATCH |
class attribute |
'request_footprint_mismatch' |
POLICY_DECISION_MISMATCH |
class attribute |
'policy_decision_mismatch' |
TOOL_CALL_MISMATCH |
class attribute |
'tool_call_mismatch' |
RECORDED_OUTCOME_MISMATCH |
class attribute |
'recorded_outcome_mismatch' |
TERMINAL_OUTCOME_MISMATCH |
class attribute |
'terminal_outcome_mismatch' |
Release source · Runtime guarantees · Capability guides
RuntimeReplayFingerprintIdentity
Section titled “RuntimeReplayFingerprintIdentity”from cayu.evals import RuntimeReplayFingerprintIdentityBases: BaseModel.
Fields and attributes
Section titled “Fields and attributes”Defaults below are source expressions; Field(...) includes schema/validation settings and default_factory creates a fresh value. Inherited declarations are included. Constructor behavior follows the model or dataclass shown in the bases/decorators.
| Name | Type | Default |
|---|---|---|
algorithm |
Literal['hmac-sha256'] |
'hmac-sha256' |
canonicalization_version |
Literal[1] |
1 |
key_id |
str |
Field(min_length=1, max_length=64, pattern='^[a-z0-9](?:[a-z0-9._-]{0,62}[a-z0-9])?$') |
value |
str |
Field(pattern='^[0-9a-f]{64}$') |
Release source · Runtime guarantees · Capability guides
RuntimeReplayReason
Section titled “RuntimeReplayReason”from cayu.evals import RuntimeReplayReasonBases: StrEnum.
Fields and attributes
Section titled “Fields and attributes”Defaults below are source expressions; Field(...) includes schema/validation settings and default_factory creates a fresh value. Inherited declarations are included. Constructor behavior follows the model or dataclass shown in the bases/decorators.
| Name | Type | Default |
|---|---|---|
SOURCE_SESSION_MISSING |
class attribute |
'source_session_missing' |
SOURCE_SESSION_NOT_COMPLETED |
class attribute |
'source_session_not_completed' |
SOURCE_TRAJECTORY_INVALID |
class attribute |
'source_trajectory_invalid' |
SOURCE_CHILDREN_UNSUPPORTED |
class attribute |
'source_children_unsupported' |
SOURCE_INPUT_EVIDENCE_UNAVAILABLE |
class attribute |
'source_input_evidence_unavailable' |
SOURCE_INPUT_EVIDENCE_INCONSISTENT |
class attribute |
'source_input_evidence_inconsistent' |
SOURCE_SHAPE_UNSUPPORTED |
class attribute |
'source_shape_unsupported' |
SOURCE_MODEL_EVIDENCE_UNAVAILABLE |
class attribute |
'source_model_evidence_unavailable' |
SOURCE_TOOL_EVIDENCE_UNAVAILABLE |
class attribute |
'source_tool_evidence_unavailable' |
SOURCE_TOOL_ARGUMENT_EVIDENCE_UNAVAILABLE |
class attribute |
'source_tool_argument_evidence_unavailable' |
SOURCE_REQUEST_FOOTPRINT_UNAVAILABLE |
class attribute |
'source_request_footprint_unavailable' |
SOURCE_EXECUTION_PROFILE_UNAVAILABLE |
class attribute |
'source_execution_profile_unavailable' |
SOURCE_BILLING_EVIDENCE_UNAVAILABLE |
class attribute |
'source_billing_evidence_unavailable' |
SOURCE_INVOCATION_EVIDENCE_UNAVAILABLE |
class attribute |
'source_invocation_evidence_unavailable' |
REQUEST_FINGERPRINT_INCOMPARABLE |
class attribute |
'request_fingerprint_incomparable' |
CANDIDATE_AGENT_UNAVAILABLE |
class attribute |
'candidate_agent_unavailable' |
CANDIDATE_MODEL_TARGET_UNAVAILABLE |
class attribute |
'candidate_model_target_unavailable' |
CANDIDATE_ENVIRONMENT_UNSUPPORTED |
class attribute |
'candidate_environment_unsupported' |
CANDIDATE_KNOWLEDGE_CONTEXT_UNSUPPORTED |
class attribute |
'candidate_knowledge_context_unsupported' |
CANDIDATE_HOOKS_UNSUPPORTED |
class attribute |
'candidate_hooks_unsupported' |
CANDIDATE_LOOP_POLICIES_UNSUPPORTED |
class attribute |
'candidate_loop_policies_unsupported' |
CANDIDATE_CONTEXT_POLICY_UNSUPPORTED |
class attribute |
'candidate_context_policy_unsupported' |
CANDIDATE_TOOL_POLICY_UNSUPPORTED |
class attribute |
'candidate_tool_policy_unsupported' |
CANDIDATE_COMMAND_POLICY_UNSUPPORTED |
class attribute |
'candidate_command_policy_unsupported' |
CANDIDATE_TOOL_EXPOSURE_UNSUPPORTED |
class attribute |
'candidate_tool_exposure_unsupported' |
CANDIDATE_TOOL_LIFECYCLE_UNSUPPORTED |
class attribute |
'candidate_tool_lifecycle_unsupported' |
CANDIDATE_TOOL_DISCOVERY_UNSUPPORTED |
class attribute |
'candidate_tool_discovery_unsupported' |
CANDIDATE_MCP_UNSUPPORTED |
class attribute |
'candidate_mcp_unsupported' |
CANDIDATE_HOSTED_TOOLS_UNSUPPORTED |
class attribute |
'candidate_hosted_tools_unsupported' |
CANDIDATE_TOOL_RESULT_PROJECTION_UNSUPPORTED |
class attribute |
'candidate_tool_result_projection_unsupported' |
CANDIDATE_PROVIDER_OPERATION_UNSUPPORTED |
class attribute |
'candidate_provider_operation_unsupported' |
CANDIDATE_PROFILE_UNAVAILABLE |
class attribute |
'candidate_profile_unavailable' |
CANDIDATE_EXECUTION_FAILED |
class attribute |
'candidate_execution_failed' |
EVENT_BOUND_EXCEEDED |
class attribute |
'event_bound_exceeded' |
TRANSCRIPT_BOUND_EXCEEDED |
class attribute |
'transcript_bound_exceeded' |
MODEL_STEP_BOUND_EXCEEDED |
class attribute |
'model_step_bound_exceeded' |
TOOL_CALL_BOUND_EXCEEDED |
class attribute |
'tool_call_bound_exceeded' |
WALL_CLOCK_BOUND_EXCEEDED |
class attribute |
'wall_clock_bound_exceeded' |
Release source · Runtime guarantees · Capability guides
RuntimeReplayReport
Section titled “RuntimeReplayReport”from cayu.evals import RuntimeReplayReportSecret-safe, versioned proof boundary for one runtime-contract replay.
Bases: BaseModel.
Fields and attributes
Section titled “Fields and attributes”Defaults below are source expressions; Field(...) includes schema/validation settings and default_factory creates a fresh value. Inherited declarations are included. Constructor behavior follows the model or dataclass shown in the bases/decorators.
| Name | Type | Default |
|---|---|---|
schema_version |
Literal[1] |
RUNTIME_REPLAY_SCHEMA_VERSION |
disposition |
RuntimeReplayDisposition |
required |
reason |
RuntimeReplayReason | None |
None |
source_session_identity |
str | None |
Field(default=None, pattern='^sha256:[0-9a-f]{64}$') |
trajectory_identity |
str | None |
Field(default=None, pattern='^sha256:[0-9a-f]{64}$') |
source_execution_profile |
ExecutionProfileIdentity | None |
None |
candidate_execution_profile |
ExecutionProfileIdentity | None |
None |
changed_execution_profile_components |
tuple[str, ...] |
Field(default=(), max_length=32) |
request_attempts |
tuple[RuntimeReplayAttemptComparison, ...] |
Field(default=(), max_length=RUNTIME_REPLAY_HARD_MAX_MODEL_STEPS) |
compared_model_steps |
StrictInt |
Field(default=0, ge=0) |
compared_tool_rounds |
StrictInt |
Field(default=0, ge=0) |
first_divergence |
RuntimeReplayDivergence | None |
None |
supporting_source_event_ids |
tuple[str, ...] |
Field(default=(), max_length=RUNTIME_REPLAY_HARD_MAX_SUPPORTING_SOURCE_EVENTS) |
warnings |
tuple[RuntimeReplayWarning, ...] |
Field(default=(), max_length=16) |
validate_disposition (method)
Section titled “validate_disposition (method)”RuntimeReplayReport.validate_disposition() -> RuntimeReplayReportRelease source · Runtime guarantees · Capability guides
RuntimeReplayRequest
Section titled “RuntimeReplayRequest”from cayu.evals import RuntimeReplayRequestCandidate app and immutable promoted trajectory selected for replay.
Bases: BaseModel.
Fields and attributes
Section titled “Fields and attributes”Defaults below are source expressions; Field(...) includes schema/validation settings and default_factory creates a fresh value. Inherited declarations are included. Constructor behavior follows the model or dataclass shown in the bases/decorators.
| Name | Type | Default |
|---|---|---|
trajectory |
SkipValidation[Trajectory] |
Field(exclude=True, repr=False) |
agent_name |
str | None |
None |
bounds |
RuntimeReplayBounds |
Field(default_factory=RuntimeReplayBounds) |
validate_trajectory (method)
Section titled “validate_trajectory (method)”RuntimeReplayRequest.validate_trajectory(value: object) -> Trajectoryvalidate_agent_name (method)
Section titled “validate_agent_name (method)”RuntimeReplayRequest.validate_agent_name(value: str | None) -> str | NoneRelease source · Runtime guarantees · Capability guides
RuntimeReplayWarning
Section titled “RuntimeReplayWarning”from cayu.evals import RuntimeReplayWarningBases: StrEnum.
Fields and attributes
Section titled “Fields and attributes”Defaults below are source expressions; Field(...) includes schema/validation settings and default_factory creates a fresh value. Inherited declarations are included. Constructor behavior follows the model or dataclass shown in the bases/decorators.
| Name | Type | Default |
|---|---|---|
SOURCE_USAGE_UNAVAILABLE |
class attribute |
'source_usage_unavailable' |
PROVIDER_WIRE_IDENTITY_UNAVAILABLE |
class attribute |
'provider_wire_identity_unavailable' |