Skip to content

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.

from cayu.evals import capture_eval_scenario_from_session

Compile 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) -> ScenarioCaptureResultV2

Release 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_CONCURRENCY
SCENARIO_CAPTURE_ARTIFACT_READ_CONCURRENCY = 8

Release source · Runtime guarantees · Capability guides

from cayu.evals import SCENARIO_CAPTURE_MAX_DIAGNOSTICS
SCENARIO_CAPTURE_MAX_DIAGNOSTICS = 1024

Release source · Runtime guarantees · Capability guides

from cayu.evals import ScenarioCaptureDiagnosticCode

Stable factual reason why retained stimuli cannot become one scenario.

Bases: StrEnum.

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

from cayu.evals import ScenarioCaptureDiagnosticV2

Bases: _ScenarioCaptureModel.

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)
ScenarioCaptureDiagnosticV2.validate_text(value: str, info) -> str
ScenarioCaptureDiagnosticV2.validate_artifact_requirement_id(value: str | None) -> str | None
ScenarioCaptureDiagnosticV2.validate_copy() -> ScenarioCaptureDiagnosticV2

Release source · Runtime guarantees · Capability guides

from cayu.evals import ScenarioCaptureResultV2

Bases: _ScenarioCaptureModel.

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)
ScenarioCaptureResultV2.validate_availability() -> ScenarioCaptureResultV2

Release source · Runtime guarantees · Capability guides