cayu.evals.scenario_capture
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.
capture_eval_scenario_from_session
Section titled “capture_eval_scenario_from_session”from cayu.evals import capture_eval_scenario_from_sessionCompile exact retained external stimuli without executing application work.
The operation reads one bounded terminal snapshot and, for file inputs, the exact referenced artifact bytes. It never calls providers, tools, environments, hooks, recovery, or application mutation paths.
async capture_eval_scenario_from_session(app: CayuApp, session_id: str, *, target_key: str, source_agent_name: str, source: EvaluationSourceIdentityV1, scenario_id: str | None=None, name: str='Captured production scenario', description: str | None=None, limits: TerminalSessionEvidenceLimits | None=None) -> ScenarioCaptureResultV2Release source · Runtime guarantees · Capability guides
SCENARIO_CAPTURE_ARTIFACT_READ_CONCURRENCY
Section titled “SCENARIO_CAPTURE_ARTIFACT_READ_CONCURRENCY”from cayu.evals import SCENARIO_CAPTURE_ARTIFACT_READ_CONCURRENCYSCENARIO_CAPTURE_ARTIFACT_READ_CONCURRENCY = 8Release source · Runtime guarantees · Capability guides
SCENARIO_CAPTURE_MAX_DIAGNOSTICS
Section titled “SCENARIO_CAPTURE_MAX_DIAGNOSTICS”from cayu.evals import SCENARIO_CAPTURE_MAX_DIAGNOSTICSSCENARIO_CAPTURE_MAX_DIAGNOSTICS = 1024Release source · Runtime guarantees · Capability guides
ScenarioCaptureDiagnosticCode
Section titled “ScenarioCaptureDiagnosticCode”from cayu.evals import ScenarioCaptureDiagnosticCodeStable factual reason why retained stimuli cannot become one scenario.
Bases: 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 |
|---|---|---|
TERMINAL_EVIDENCE_NOT_SUPPORTED |
class attribute |
'terminal_evidence_not_supported' |
SESSION_NOT_FOUND |
class attribute |
'session_not_found' |
SESSION_NOT_TERMINAL |
class attribute |
'session_not_terminal' |
CAPTURED_EVIDENCE_INCOMPLETE |
class attribute |
'captured_evidence_incomplete' |
CAPTURED_EVIDENCE_CONTRADICTORY |
class attribute |
'captured_evidence_contradictory' |
CAPTURE_LIMIT_EXCEEDED |
class attribute |
'capture_limit_exceeded' |
SOURCE_AGENT_MISMATCH |
class attribute |
'source_agent_mismatch' |
SOURCE_PAYLOAD_UNAVAILABLE |
class attribute |
'source_payload_unavailable' |
SOURCE_PAYLOAD_REDACTED |
class attribute |
'source_payload_redacted' |
SOURCE_PAYLOAD_INCONSISTENT |
class attribute |
'source_payload_inconsistent' |
SOURCE_INPUT_ROLE_UNSUPPORTED |
class attribute |
'source_input_role_unsupported' |
SOURCE_INPUT_PART_UNSUPPORTED |
class attribute |
'source_input_part_unsupported' |
ARTIFACT_NOT_RETAINED |
class attribute |
'artifact_not_retained' |
ARTIFACT_ACCESS_DENIED |
class attribute |
'artifact_access_denied' |
ARTIFACT_STORE_UNAVAILABLE |
class attribute |
'artifact_store_unavailable' |
ARTIFACT_CONTENT_INCONSISTENT |
class attribute |
'artifact_content_inconsistent' |
SCENARIO_LIMIT_EXCEEDED |
class attribute |
'scenario_limit_exceeded' |
SOURCE_CHANGED |
class attribute |
'source_changed' |
Release source · Runtime guarantees · Capability guides
ScenarioCaptureDiagnosticV2
Section titled “ScenarioCaptureDiagnosticV2”from cayu.evals import ScenarioCaptureDiagnosticV2Bases: _ScenarioCaptureModel.
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 |
|---|---|---|
code |
ScenarioCaptureDiagnosticCode |
required |
message |
StrictStr |
Field(min_length=1, max_length=512) |
remediation |
StrictStr |
Field(min_length=1, max_length=512) |
event_sequence |
StrictInt | None |
Field(default=None, ge=1) |
transcript_index |
StrictInt | None |
Field(default=None, ge=0) |
artifact_requirement_id |
StrictStr | None |
Field(default=None, max_length=128) |
validate_text (method)
Section titled “validate_text (method)”ScenarioCaptureDiagnosticV2.validate_text(value: str, info) -> strvalidate_artifact_requirement_id (method)
Section titled “validate_artifact_requirement_id (method)”ScenarioCaptureDiagnosticV2.validate_artifact_requirement_id(value: str | None) -> str | Nonevalidate_copy (method)
Section titled “validate_copy (method)”ScenarioCaptureDiagnosticV2.validate_copy() -> ScenarioCaptureDiagnosticV2Release source · Runtime guarantees · Capability guides
ScenarioCaptureResultV2
Section titled “ScenarioCaptureResultV2”from cayu.evals import ScenarioCaptureResultV2Bases: _ScenarioCaptureModel.
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 |
|---|---|---|
available |
StrictBool |
required |
scenario |
EvalScenarioDocumentV2 | None |
None |
diagnostics |
tuple[ScenarioCaptureDiagnosticV2, ...] |
Field(default_factory=tuple, max_length=SCENARIO_CAPTURE_MAX_DIAGNOSTICS) |
validate_availability (method)
Section titled “validate_availability (method)”ScenarioCaptureResultV2.validate_availability() -> ScenarioCaptureResultV2