cayu.sessions.SessionOutcome
Part of cayu.sessions.base. Read the Python API overview and install the required extra.
from cayu.sessions import SessionOutcomeDerived reason for the current session state.
The outcome is computed from durable events. It is intentionally not stored as separate state so event replay remains the source of truth.
Bases: BaseModel.
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 |
|---|---|---|
session_id |
str |
required |
status |
SessionStatus |
required |
reason |
str |
required |
details |
dict[str, Any] |
Field(default_factory=dict) |
retry |
dict[str, Any] | None |
None |
terminal_event |
EventRecord | None |
None |
latest_retry_event |
EventRecord | None |
None |
validate_nonblank_fields (method)
Section titled “validate_nonblank_fields (method)”SessionOutcome.validate_nonblank_fields(value: str, info) -> strcopy_details (method)
Section titled “copy_details (method)”SessionOutcome.copy_details(value: dict[str, Any]) -> dict[str, Any]copy_retry (method)
Section titled “copy_retry (method)”SessionOutcome.copy_retry(value: dict[str, Any] | None) -> dict[str, Any] | None