Skip to content

cayu.evals.workflow_target

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.

WORKFLOW_EVAL_DEFAULT_CLOSE_TIMEOUT_SECONDS

Section titled “WORKFLOW_EVAL_DEFAULT_CLOSE_TIMEOUT_SECONDS”
from cayu.evals import WORKFLOW_EVAL_DEFAULT_CLOSE_TIMEOUT_SECONDS
WORKFLOW_EVAL_DEFAULT_CLOSE_TIMEOUT_SECONDS = 30.0

Release source · Runtime guarantees · Capability guides

from cayu.evals import workflow_eval_input_messages_sha256

Bind the exact candidate input retained on a workflow-root trajectory.

workflow_eval_input_messages_sha256(messages: tuple[Message, ...]) -> str

Release source · Runtime guarantees · Capability guides

WORKFLOW_EVAL_MAX_APPLICATION_CONTEXT_BYTES

Section titled “WORKFLOW_EVAL_MAX_APPLICATION_CONTEXT_BYTES”
from cayu.evals import WORKFLOW_EVAL_MAX_APPLICATION_CONTEXT_BYTES
WORKFLOW_EVAL_MAX_APPLICATION_CONTEXT_BYTES = 64 << 10

Release source · Runtime guarantees · Capability guides

from cayu.evals import WORKFLOW_EVAL_MAX_CLOSE_TIMEOUT_SECONDS
WORKFLOW_EVAL_MAX_CLOSE_TIMEOUT_SECONDS = 300.0

Release source · Runtime guarantees · Capability guides

from cayu.evals import WORKFLOW_EVAL_MAX_FINAL_OUTPUT_CHARS
WORKFLOW_EVAL_MAX_FINAL_OUTPUT_CHARS = 1048576

Release source · Runtime guarantees · Capability guides

from cayu.evals import WORKFLOW_EVAL_MAX_INPUT_BYTES
WORKFLOW_EVAL_MAX_INPUT_BYTES = 8 << 20

Release source · Runtime guarantees · Capability guides

from cayu.evals import WORKFLOW_EVAL_MAX_INPUT_MESSAGES
WORKFLOW_EVAL_MAX_INPUT_MESSAGES = 32

Release source · Runtime guarantees · Capability guides

from cayu.evals import WORKFLOW_EVAL_MAX_STRUCTURED_OUTPUT_BYTES
WORKFLOW_EVAL_MAX_STRUCTURED_OUTPUT_BYTES = 256 << 10

Release source · Runtime guarantees · Capability guides

from cayu.evals import workflow_eval_output_sha256

Bind one projected text result without duplicating it in evidence metadata.

workflow_eval_output_sha256(final_output: str) -> str

Release source · Runtime guarantees · Capability guides

from cayu.evals import workflow_eval_trial_session_id

Derive the recovery-stable root identity for one concrete workflow trial.

workflow_eval_trial_session_id(*, target_revision: str, run_id: str, suite_id: str, case_id: str, trial_number: int) -> str

Release source · Runtime guarantees · Capability guides

from cayu.evals import workflow_spec_revision

Return the canonical public revision of one workflow specification.

workflow_spec_revision(spec: WorkflowSpec) -> str

Release source · Runtime guarantees · Capability guides

from cayu.evals import WorkflowEvalExecution

The exact application/workflow pair and optional quiescence callback for one trial.

Decorators: @dataclass(frozen=True, slots=True).

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
app CayuApp required
workflow WorkflowBase required
close Callable[[], Awaitable[None]] | None None

Release source · Runtime guarantees · Capability guides

from cayu.evals import WorkflowEvalFactory
WorkflowEvalFactory: TypeAlias = Callable[[WorkflowEvalInvocation], WorkflowEvalExecution | Awaitable[WorkflowEvalExecution]]

Release source · Runtime guarantees · Capability guides

from cayu.evals import WorkflowEvalInstanceScope

How a target constructs application/workflow state for concrete trials.

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
SHARED class attribute 'shared'
PER_TRIAL class attribute 'per_trial'

Release source · Runtime guarantees · Capability guides

from cayu.evals import WorkflowEvalInvocation

Bounded candidate input and runtime identities supplied to one trusted factory.

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
run_id StrictStr Field(max_length=256)
suite_id StrictStr Field(max_length=128)
case_id StrictStr Field(max_length=128)
trial_number StrictInt Field(ge=1, le=100)
workflow_run_id StrictStr Field(max_length=128)
idempotency_key StrictStr Field(max_length=256)
messages tuple[Message, ...] required
application_context dict[str, Any] Field(default_factory=dict)
WorkflowEvalInvocation.validate_ids(value: str, info) -> str
WorkflowEvalInvocation.copy_messages(value: object) -> tuple[Message, ...]
WorkflowEvalInvocation.copy_application_context(value: object) -> dict[str, Any]

Release source · Runtime guarantees · Capability guides

from cayu.evals import WorkflowEvalOutputEvidenceV1

Replay-safe binding from projected output to one exact workflow completion.

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
target_revision StrictStr required
projector_revision StrictStr required
workflow_name StrictStr required
attempt_id StrictStr required
completion_event_id StrictStr required
input_message_count StrictInt Field(ge=0, le=WORKFLOW_EVAL_MAX_INPUT_MESSAGES)
input_messages_sha256 StrictStr required
final_output_sha256 StrictStr required
structured_output dict[str, Any] | None None
WorkflowEvalOutputEvidenceV1.validate_schema_version_type(value: object) -> object
WorkflowEvalOutputEvidenceV1.validate_revisions(value: str, info) -> str
WorkflowEvalOutputEvidenceV1.validate_sha256(value: str, info) -> str
WorkflowEvalOutputEvidenceV1.validate_ids(value: str, info) -> str
WorkflowEvalOutputEvidenceV1.copy_structured_output(value: object) -> dict[str, Any] | None

Release source · Runtime guarantees · Capability guides

from cayu.evals import WorkflowEvalResult

Typed bounded candidate output returned by an application-owned projector.

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
final_output StrictStr required
structured_output dict[str, Any] | None None
WorkflowEvalResult.validate_final_output(value: str, info) -> str
WorkflowEvalResult.copy_structured_output(value: object) -> dict[str, Any] | None

Release source · Runtime guarantees · Capability guides

from cayu.evals import WorkflowEvalResultProjector
WorkflowEvalResultProjector: TypeAlias = Callable[[WorkflowEvalTerminalEvidence], WorkflowEvalResult | Awaitable[WorkflowEvalResult]]

Release source · Runtime guarantees · Capability guides

from cayu.evals import WorkflowEvalTargetIdentityV1

Portable behavior identity for a trusted workflow-root eval target.

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
revision StrictStr required
workflow_name StrictStr required
workflow_spec_revision StrictStr required
implementation_revision StrictStr required
result_projector_revision StrictStr required
execution_scope_revision StrictStr required
application_context_revision StrictStr required
evidence_policy_revision StrictStr required
capture_bounds SessionTrajectoryBounds | None Field(default=None, exclude_if=lambda value: value is None)
instance_scope WorkflowEvalInstanceScope required
close_timeout_seconds float Field(gt=0, le=WORKFLOW_EVAL_MAX_CLOSE_TIMEOUT_SECONDS)
WorkflowEvalTargetIdentityV1.validate_schema_version_type(value: object) -> object
WorkflowEvalTargetIdentityV1.validate_workflow_name(value: str, info) -> str
WorkflowEvalTargetIdentityV1.validate_revisions(value: str, info) -> str
WorkflowEvalTargetIdentityV1.validate_close_timeout(value: object) -> object
WorkflowEvalTargetIdentityV1.validate_revision() -> WorkflowEvalTargetIdentityV1
WorkflowEvalTargetIdentityV1.create(*, workflow_spec: WorkflowSpec, implementation_revision: str, result_projector_revision: str, execution_scope_revision: str, application_context: dict[str, Any], evidence_policy_revision: str, instance_scope: WorkflowEvalInstanceScope | str, close_timeout_seconds: float, capture_bounds: SessionTrajectoryBounds | None=None) -> WorkflowEvalTargetIdentityV1

Release source · Runtime guarantees · Capability guides

from cayu.evals import WorkflowEvalTerminalEvidence

Exact current-attempt completion evidence visible to the result projector.

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
workflow_run_id StrictStr required
workflow_name StrictStr required
attempt_id StrictStr required
completion_event Event required
WorkflowEvalTerminalEvidence.validate_ids(value: str, info) -> str
WorkflowEvalTerminalEvidence.copy_completion_event(value: object) -> object
WorkflowEvalTerminalEvidence.validate_completion_boundary() -> WorkflowEvalTerminalEvidence

Release source · Runtime guarantees · Capability guides