Skip to content

cayu.evals.evidence

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 ArtifactScopeEvidenceV1

Bases: _PortableModel.

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
scope Literal['session', 'environment'] required
state EvidenceState required

Release source · Runtime guarantees · Capability guides

from cayu.evals import ArtifactStructuralEvidenceV1

One content-minimized artifact observation with no private store identity.

Bases: _PortableModel.

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
observation_index StrictInt Field(ge=1, le=EVAL_ARTIFACT_EVIDENCE_MAX_ARTIFACTS)
scope Literal['session', 'environment'] required
filename StrictStr required
content_type StrictStr required
size_bytes StrictInt Field(ge=0, le=EVIDENCE_MAX_TOTAL_TOKENS)
digest_state Literal['complete', 'limit_exceeded', 'unavailable'] required
sha256 StrictStr | None None
text_state ArtifactTextEvidenceState required
text StrictStr | None None
ArtifactStructuralEvidenceV1.validate_filename(value: str, info) -> str
ArtifactStructuralEvidenceV1.validate_content_type(value: str, info) -> str
ArtifactStructuralEvidenceV1.validate_text(value: str | None, info) -> str | None
ArtifactStructuralEvidenceV1.validate_contract() -> ArtifactStructuralEvidenceV1

Release source · Runtime guarantees · Capability guides

from cayu.evals import ASSERTION_EVIDENCE_MAX_BYTES
ASSERTION_EVIDENCE_MAX_BYTES = 10 << 20

Release source · Runtime guarantees · Capability guides

from cayu.evals import ASSERTION_EVIDENCE_SCHEMA_VERSION
ASSERTION_EVIDENCE_SCHEMA_VERSION = 5

Release source · Runtime guarantees · Capability guides

from cayu.evals import AssertionCostEvidenceV1

One currency-local aggregate with no provider, model, or line-item identity.

Bases: _PortableModel.

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
currency StrictStr required
total_cost StrictStr required
model_steps StrictInt Field(ge=0, le=EVIDENCE_MAX_MODEL_STEPS)
priced_model_steps StrictInt Field(ge=0, le=EVIDENCE_MAX_MODEL_STEPS)
unpriced_model_steps StrictInt Field(ge=0, le=EVIDENCE_MAX_MODEL_STEPS)
AssertionCostEvidenceV1.validate_currency(value: str, info) -> str
AssertionCostEvidenceV1.validate_total_cost(value: str, info) -> str
AssertionCostEvidenceV1.validate_step_partition() -> AssertionCostEvidenceV1

Release source · Runtime guarantees · Capability guides

from cayu.evals import AssertionEvidenceView

The bounded, content-minimized data consumed by every portable assertion.

Bases: _PortableModel.

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[5] ASSERTION_EVIDENCE_SCHEMA_VERSION
revision StrictStr required
policy_revision StrictStr required
pricing_profile_fingerprint StrictStr | None None
root_evidence_available StrictBool required
root_status TerminalEvidenceStatus | None None
child_statuses tuple[TerminalEvidenceStatus, ...] Field(max_length=EVIDENCE_MAX_CHILD_SESSIONS)
child_evidence_state EvidenceState required
final_output StrictStr required
final_output_state EvidenceState required
requested_tool_names tuple[StrictStr, ...] Field(max_length=EVIDENCE_MAX_TOOL_CALLS)
started_tool_names tuple[StrictStr, ...] Field(max_length=EVIDENCE_MAX_TOOL_CALLS)
tool_calls_started StrictInt | None Field(default=None, ge=0, le=EVIDENCE_MAX_TOTAL_TOKENS)
tool_evidence_state EvidenceState required
tool_calls tuple[ToolCallEvidenceV1, ...] Field(max_length=EVAL_TOOL_CALL_EVIDENCE_MAX_CALLS)
tool_call_evidence_state ToolCallEvidenceState required
process_events tuple[EvalProcessEventKind, ...] Field(max_length=EVAL_PROCESS_EVENT_EVIDENCE_MAX_EVENTS)
process_event_evidence_state EvidenceState required
workspace_files tuple[WorkspaceStructuralEvidenceV1, ...] Field(default_factory=tuple, max_length=EVAL_CORPUS_MAX_ASSERTIONS_PER_CASE)
workspace_evidence_state EvidenceState 'unavailable'
artifacts tuple[ArtifactStructuralEvidenceV1, ...] Field(default_factory=tuple, max_length=EVAL_ARTIFACT_EVIDENCE_MAX_ARTIFACTS)
artifact_scopes tuple[ArtifactScopeEvidenceV1, ...] Field(default_factory=tuple, max_length=2)
model_steps StrictInt | None Field(default=None, ge=0, le=EVIDENCE_MAX_TOTAL_TOKENS)
model_step_evidence_state EvidenceState required
total_tokens AggregateCount | None Field(default=None, ge=0)
usage_evidence_state EvidenceState required
costs tuple[AssertionCostEvidenceV1, ...] Field(max_length=ASSERTION_EVIDENCE_MAX_COST_CURRENCIES)
memory_attribution EvalMemoryAttributionEvidenceV1 required
AssertionEvidenceView.validate_collections_are_ordered(value: object, info) -> object
AssertionEvidenceView.validate_revision_shape(value: str, info) -> str
AssertionEvidenceView.validate_schema_version_type(value: object) -> object
AssertionEvidenceView.validate_pricing_fingerprint(value: str | None, info) -> str | None
AssertionEvidenceView.validate_final_output(value: str, info) -> str
AssertionEvidenceView.validate_tool_names(value: tuple[str, ...], info) -> tuple[str, ...]
AssertionEvidenceView.validate_contract() -> AssertionEvidenceView

Release source · Runtime guarantees · Capability guides

from cayu.evals import project_assertion_evidence_view

Build a detached, redacted assertion view from one validated trajectory.

project_assertion_evidence_view(app: CayuApp, trajectory: Trajectory, *, evidence_policy: EvaluationEvidencePolicySpec, pricing: PriceBook | None=None, cost_currencies: Sequence[str]=(), memory_attribution_evidence: EvalMemoryAttributionEvidenceV1 | None=None) -> AssertionEvidenceView

Release source · Runtime guarantees · Capability guides

from cayu.evals import ToolCallEvidenceV1

Stable ordered identity plus bounded argument and result observations.

Bases: _PortableModel.

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
invocation_index StrictInt Field(ge=1, le=EVAL_TOOL_CALL_EVIDENCE_MAX_CALLS)
invocation_revision StrictStr required
tool_name StrictStr required
occurrence StrictInt Field(ge=1, le=EVAL_TOOL_CALL_EVIDENCE_MAX_CALLS)
arguments ToolCallValueEvidenceV1 required
result ToolCallValueEvidenceV1 required
ToolCallEvidenceV1.validate_invocation_revision(value: str, info) -> str
ToolCallEvidenceV1.validate_tool_name(value: str, info) -> str

Release source · Runtime guarantees · Capability guides

from cayu.evals import ToolCallValueEvidenceV1

One bounded public value or an exact reason no comparison is possible.

Bases: _PortableModel.

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
state ToolValueEvidenceState required
value dict[str, Any] | None None
ToolCallValueEvidenceV1.validate_value(value: object, info) -> dict[str, Any] | None
ToolCallValueEvidenceV1.validate_contract() -> ToolCallValueEvidenceV1

Release source · Runtime guarantees · Capability guides

from cayu.evals import WorkspaceStructuralEvidenceV1

One declared workspace path without retained content bytes.

Bases: _PortableModel.

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
path StrictStr required
state Literal['present', 'missing', 'unavailable'] required
total_bytes StrictInt | None Field(default=None, ge=0, le=EVIDENCE_MAX_TOTAL_TOKENS)
digest_state Literal['complete', 'limit_exceeded', 'unavailable'] required
sha256 StrictStr | None None
WorkspaceStructuralEvidenceV1.validate_path(value: str, info) -> str
WorkspaceStructuralEvidenceV1.validate_contract() -> WorkspaceStructuralEvidenceV1

Release source · Runtime guarantees · Capability guides