cayu.sessions.ModelCompletionStage
Part of cayu.sessions.base. Read the Python API overview and install the required extra.
from cayu.sessions import ModelCompletionStageVerified view assembled from append-only preparation and completion records.
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 |
|---|---|---|
record_type |
Literal['cayu.model-completion-stage'] |
MODEL_COMPLETION_STAGE_RECORD_TYPE |
schema_version |
Literal[1] |
MODEL_COMPLETION_STAGE_SCHEMA_VERSION |
session_id |
str |
required |
stage_id |
str |
Field(max_length=256) |
logical_step_id |
str |
Field(max_length=256) |
dispatch_ordinal |
StrictInt |
Field(ge=0, le=MAX_DURABLE_JSON_INTEGER) |
purpose |
ModelCompletionPurpose |
required |
state |
Literal['in_flight', 'completed'] |
required |
intent |
dict[str, Any] |
required |
reservation_ids |
tuple[str, ...] |
required |
preparation_request_digest |
str |
required |
preparation_digest |
str |
required |
source_status |
SessionStatus |
required |
source_run_epoch |
StrictInt |
Field(ge=0, le=MAX_DURABLE_JSON_INTEGER) |
source_transcript_cursor |
StrictInt |
Field(ge=0, le=MAX_DURABLE_JSON_INTEGER) |
prepared_at |
datetime |
required |
publication |
RuntimePublicationRequest | None |
None |
publication_material_digest |
str | None |
None |
completion_digest |
str | None |
None |
completed_at |
datetime | None |
None |
validate_identity (method)
Section titled “validate_identity (method)”ModelCompletionStage.validate_identity(value: str, info) -> strcopy_intent (method)
Section titled “copy_intent (method)”ModelCompletionStage.copy_intent(value: dict[str, Any]) -> dict[str, Any]copy_reservation_ids (method)
Section titled “copy_reservation_ids (method)”ModelCompletionStage.copy_reservation_ids(value) -> tuple[str, ...]validate_digest (method)
Section titled “validate_digest (method)”ModelCompletionStage.validate_digest(value: str | None, info) -> str | Nonenormalize_timestamp (method)
Section titled “normalize_timestamp (method)”ModelCompletionStage.normalize_timestamp(value: datetime | None, info) -> datetime | Nonevalidate_state (method)
Section titled “validate_state (method)”ModelCompletionStage.validate_state() -> ModelCompletionStage