cayu.workflows.models
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.
GateOutcome
Section titled “GateOutcome”from cayu.workflows import GateOutcomeVerdict of a gated_loop gate for one item.
Decorators: @dataclass(frozen=True, slots=True).
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 |
|---|---|---|
passed |
bool |
required |
detail |
Any |
None |
Release source · Runtime guarantees · Capability guides
normalize_gate_outcome
Section titled “normalize_gate_outcome”from cayu.workflows import normalize_gate_outcomeAccept either a GateOutcome or a bare bool from a gate callable.
normalize_gate_outcome(value: GateOutcome | bool) -> GateOutcomeRelease source · Runtime guarantees · Capability guides
ParallelResult
Section titled “ParallelResult”from cayu.workflows import ParallelResultOutcomes of a parallel fan-out, in submission order.
Decorators: @dataclass(frozen=True, slots=True).
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 |
|---|---|---|
results |
tuple[StepResult | StepFailure, ...] |
() |
successes (property)
Section titled “successes (property)”ParallelResult.successes() -> tuple[StepResult, ...]failures (property)
Section titled “failures (property)”ParallelResult.failures() -> tuple[StepFailure, ...]ok (property)
Section titled “ok (property)”ParallelResult.ok() -> boolraise_for_failures (method)
Section titled “raise_for_failures (method)”ParallelResult.raise_for_failures() -> NoneRaise ParallelStepError if any branch failed; else no-op.
outputs (property)
Section titled “outputs (property)”ParallelResult.outputs() -> tuple[Any, ...]Validated outputs in order; raises if any branch failed.
Release source · Runtime guarantees · Capability guides
ParallelStepError
Section titled “ParallelStepError”from cayu.workflows import ParallelStepErrorRaised by the fail-closed ParallelResult accessors when branches failed.
Bases: Exception.
init (method)
Section titled “init (method)”ParallelStepError.__init__(failures: Iterable[StepFailure]) -> NoneRelease source · Runtime guarantees · Capability guides
StepError
Section titled “StepError”from cayu.workflows import StepErrorA step failed and carries ids for correlation.
Bases: Exception.
init (method)
Section titled “init (method)”StepError.__init__(message: str, *, step_id: str | None=None, session_id: str | None=None, evidence: FailureEvidence | None=None, workflow_attempt_id: str | None=None) -> Noneevidence (property)
Section titled “evidence (property)”StepError.evidence() -> FailureEvidenceStructured snapshot, including a direct exception cause when present.
Release source · Runtime guarantees · Capability guides
StepFailure
Section titled “StepFailure”from cayu.workflows import StepFailureA failed parallel branch.
Decorators: @dataclass(frozen=True, slots=True).
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 |
|---|---|---|
error |
str |
required |
error_type |
str |
required |
step_id |
str | None |
None |
session_id |
str | None |
None |
evidence |
FailureEvidence |
field(default_factory=FailureEvidence) |
workflow_attempt_id |
str | None |
None |
Release source · Runtime guarantees · Capability guides
StepResult
Section titled “StepResult”from cayu.workflows import StepResultOutcome of one successful step.
Decorators: @dataclass(frozen=True, slots=True).
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 |
|---|---|---|
step_id |
str |
required |
session_id |
str |
required |
text |
str |
'' |
output |
Any |
None |
has_output (property)
Section titled “has_output (property)”StepResult.has_output() -> bool