Skip to content

cayu.evals.workflow_recovery

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_workflow_eval_attempt

Recapture an exact completed attempt without invoking application callbacks.

Supply the original target (including its original capture policy) and exact input. Omit output to use the private retained projection, or supply the trusted original projected output. bounds controls this revision. To reject changes since a prior successful capture, supply its evidence_sha256. Persist the returned document separately from the original EvalRun.

async capture_workflow_eval_attempt(target: WorkflowEvalTarget, source_trial: EvalTrialResult, *, messages: tuple[Message, ...], output: WorkflowEvalResult | None=None, bounds: SessionTrajectoryBounds, expected_evidence_sha256: str | None=None) -> SavedWorkflowEvalCapture

Release source · Runtime guarantees · Capability guides

from cayu.evals import import_workflow_eval_attempt

Explicitly adopt a legacy report’s saved completion, without rewriting that report.

The caller supplies the original target/input and an explicitly projected result, plus the exact persisted attempt and completion IDs. This import establishes an anchor now, not a claim of an earlier full-evidence seal. Keep source_run unchanged.

async import_workflow_eval_attempt(target: WorkflowEvalTarget, source_run: EvalRun, *, case_id: str, trial_number: int, attempt_id: str, completion_event_id: str, messages: tuple[Message, ...], output: WorkflowEvalResult) -> EvalTrialResult

Release source · Runtime guarantees · Capability guides

from cayu.evals import SavedWorkflowEvalCapture

An independently inspectable capture revision linked to the original report trial.

Bases: BaseModel.

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] 1
capture_id str Field(default_factory=lambda: str(uuid4()))
captured_at datetime Field(default_factory=lambda: datetime.now(UTC))
source_trial EvalTrialResult required
source_attempt WorkflowAttemptAnchor required
bounds SessionTrajectoryBounds required
evidence_sha256 str required
trajectory Trajectory required

Release source · Runtime guarantees · Capability guides

from cayu.evals import SavedWorkflowEvalScore

Separate deterministic scoring revision; source execution cost is not incurred again.

Bases: BaseModel.

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] 1
score_id str Field(default_factory=lambda: str(uuid4()))
scored_at datetime Field(default_factory=lambda: datetime.now(UTC))
source_capture_id str required
target_revision str required
evidence_policy_revision str required
pricing_profile_fingerprint str | None None
source_evidence_sha256 str required
assertion_revisions tuple[str, ...] required
assertions tuple[EvalAssertionResult, ...] required
score float | None required
model_calls Literal[0] 0

Release source · Runtime guarantees · Capability guides

from cayu.evals import score_workflow_eval_capture

Freshly validate a sealed attempt, then run deterministic portable assertions only.

Model judge specs are rejected before store reads or scoring. Environment probes absent from the saved evidence remain unavailable; no tools run to recreate them.

async score_workflow_eval_capture(target: WorkflowEvalTarget, capture: SavedWorkflowEvalCapture, assertions: tuple[AssertionSpec, ...]) -> SavedWorkflowEvalScore

Release source · Runtime guarantees · Capability guides