cayu.runtime.provider_operations
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.
inspect_provider_operation
Section titled “inspect_provider_operation”from cayu.runtime import inspect_provider_operationInspect at most one latest model attempt without hydrating stream deltas.
async inspect_provider_operation(session_store: SessionStore, session_id: str) -> ProviderOperationInspectionRelease source · Runtime guarantees · Capability guides
ProviderOperationAccountingStatus
Section titled “ProviderOperationAccountingStatus”from cayu import ProviderOperationAccountingStatusBases: StrEnum.
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 |
|---|---|---|
NOT_APPLICABLE |
class attribute |
'not_applicable' |
RESERVED |
class attribute |
'reserved' |
SETTLED |
class attribute |
'settled' |
Release source · Runtime guarantees · Capability guides
ProviderOperationCancellationStatus
Section titled “ProviderOperationCancellationStatus”from cayu import ProviderOperationCancellationStatusBases: StrEnum.
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 |
|---|---|---|
NOT_REQUESTED |
class attribute |
'not_requested' |
REQUESTED |
class attribute |
'requested' |
UNSUPPORTED |
class attribute |
'unsupported' |
PENDING |
class attribute |
'pending' |
CANCELLED |
class attribute |
'cancelled' |
COMPLETED |
class attribute |
'completed' |
FAILED |
class attribute |
'failed' |
UNAVAILABLE |
class attribute |
'unavailable' |
Release source · Runtime guarantees · Capability guides
ProviderOperationEvidenceError
Section titled “ProviderOperationEvidenceError”from cayu import ProviderOperationEvidenceErrorDurable provider-operation evidence is malformed or contradictory.
Bases: RuntimeError.
This type’s implementation and inherited behavior are available in the linked release source.
Release source · Runtime guarantees · Capability guides
ProviderOperationInspection
Section titled “ProviderOperationInspection”from cayu import ProviderOperationInspectionBounded public view of the latest model attempt’s dispatch mode.
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 |
|---|---|---|
status |
ProviderOperationInspectionStatus |
required |
provider |
str | None |
Field(default=None, max_length=256) |
operation_id |
str | None |
Field(default=None, max_length=PROVIDER_OPERATION_ID_MAX_CHARS) |
stream_protocol |
str | None |
Field(default=None, max_length=PROVIDER_OPERATION_STREAM_PROTOCOL_MAX_CHARS) |
cancellation_status |
ProviderOperationCancellationStatus |
ProviderOperationCancellationStatus.NOT_REQUESTED |
accounting_status |
ProviderOperationAccountingStatus |
ProviderOperationAccountingStatus.NOT_APPLICABLE |
reservation_count |
int |
Field(default=0, ge=0, le=32) |
stage_id |
str | None |
Field(default=None, max_length=256) |
run_epoch |
int | None |
Field(default=None, ge=0, le=MAX_DURABLE_JSON_INTEGER) |
recovery_reason |
ProviderOperationUnavailableReason | None |
None |
duplicate_request_risk |
bool |
False |
allowed_resolutions |
tuple[ProviderOperationResolutionAction, ...] |
() |
resolution_action |
ProviderOperationResolutionAction | None |
None |
resolution_id |
str | None |
Field(default=None, max_length=256) |
Release source · Runtime guarantees · Capability guides
ProviderOperationInspectionStatus
Section titled “ProviderOperationInspectionStatus”from cayu import ProviderOperationInspectionStatusBases: StrEnum.
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 |
|---|---|---|
SYNCHRONOUS |
class attribute |
'synchronous' |
PROVIDER_OPERATION_IN_PROGRESS |
class attribute |
'provider_operation_in_progress' |
RECONNECT_SCHEDULED |
class attribute |
'reconnect_scheduled' |
RECONNECT_IN_PROGRESS |
class attribute |
'reconnect_in_progress' |
PROVIDER_OPERATION_RECONCILED |
class attribute |
'provider_operation_reconciled' |
PROVIDER_OPERATION_UNAVAILABLE |
class attribute |
'provider_operation_unavailable' |
AMBIGUOUS_SUBMISSION |
class attribute |
'ambiguous_submission' |
FALLBACK_RETRY |
class attribute |
'fallback_retry' |
Release source · Runtime guarantees · Capability guides
ProviderOperationResolutionAction
Section titled “ProviderOperationResolutionAction”from cayu import ProviderOperationResolutionActionExplicit dispositions for a provider operation Cayu cannot continue exactly.
Bases: StrEnum.
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 |
|---|---|---|
FALLBACK_RETRY |
class attribute |
'fallback_retry' |
FAIL |
class attribute |
'fail' |
Release source · Runtime guarantees · Capability guides
ProviderOperationResolutionConflict
Section titled “ProviderOperationResolutionConflict”from cayu import ProviderOperationResolutionConflictA provider operation already has a different durable disposition.
Bases: RuntimeError.
This type’s implementation and inherited behavior are available in the linked release source.
Release source · Runtime guarantees · Capability guides
ProviderOperationResolutionRecord
Section titled “ProviderOperationResolutionRecord”from cayu import ProviderOperationResolutionRecordImmutable audit record for one provider-operation disposition.
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.provider-operation-resolution'] |
_PROVIDER_OPERATION_RESOLUTION_RECORD_TYPE |
schema_version |
Literal[1] |
1 |
resolution_id |
str |
required |
session_id |
str |
required |
stage_id |
str |
required |
logical_step_id |
str |
required |
dispatch_ordinal |
StrictInt |
Field(ge=0, le=MAX_DURABLE_JSON_INTEGER) |
preparation_digest |
str |
Field(pattern='^[0-9a-f]{64}$') |
model_attempt_id |
str |
required |
source_run_epoch |
StrictInt |
Field(ge=0, le=MAX_DURABLE_JSON_INTEGER) |
resolved_run_epoch |
StrictInt |
Field(ge=0, le=MAX_DURABLE_JSON_INTEGER) |
action |
ProviderOperationResolutionAction |
required |
recovery_reason |
ProviderOperationUnavailableReason |
required |
duplicate_request_risk |
bool |
required |
reason |
str | None |
None |
metadata |
dict[str, Any] |
Field(default_factory=dict) |
resolved_by |
dict[str, Any] | None |
None |
resolved_at |
datetime |
required |
event_id |
str |
required |
request_digest |
str |
Field(pattern='^[0-9a-f]{64}$') |
execution_profile_fingerprint |
str | None |
Field(default=None, min_length=64, max_length=64, pattern='^[0-9a-f]{64}$') |
record_digest |
str |
Field(pattern='^[0-9a-f]{64}$') |
Release source · Runtime guarantees · Capability guides
ProviderOperationResolutionRequest
Section titled “ProviderOperationResolutionRequest”from cayu import ProviderOperationResolutionRequestOne explicit, run-epoch-fenced disposition of unavailable provider work.
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 |
task_worker_id |
str | None |
None |
task_handoff_id |
str | None |
None |
stage_id |
str |
required |
expected_run_epoch |
StrictInt |
Field(ge=0, le=MAX_DURABLE_JSON_INTEGER) |
action |
ProviderOperationResolutionAction |
required |
reason |
str | None |
Field(default=None, max_length=4096) |
metadata |
dict[str, Any] |
Field(default_factory=dict) |
resolved_by |
ResolutionActor | None |
None |
validate_identity (method)
Section titled “validate_identity (method)”ProviderOperationResolutionRequest.validate_identity(value: str, info) -> strvalidate_task_worker_id (method)
Section titled “validate_task_worker_id (method)”ProviderOperationResolutionRequest.validate_task_worker_id(value: str | None) -> str | Nonevalidate_task_handoff_authority (method)
Section titled “validate_task_handoff_authority (method)”ProviderOperationResolutionRequest.validate_task_handoff_authority() -> ProviderOperationResolutionRequestvalidate_reason (method)
Section titled “validate_reason (method)”ProviderOperationResolutionRequest.validate_reason(value: str | None) -> str | Nonevalidate_metadata (method)
Section titled “validate_metadata (method)”ProviderOperationResolutionRequest.validate_metadata(value: object) -> dict[str, Any]validate_resolved_by (method)
Section titled “validate_resolved_by (method)”ProviderOperationResolutionRequest.validate_resolved_by(value: ResolutionActor | None) -> ResolutionActor | NoneRelease source · Runtime guarantees · Capability guides
ProviderOperationResolutionResult
Section titled “ProviderOperationResolutionResult”from cayu import ProviderOperationResolutionResultA newly committed provider disposition or its exact replay.
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 |
ProviderOperationResolutionRecord |
required |
event |
Event |
required |
replayed |
bool |
required |
Release source · Runtime guarantees · Capability guides
ProviderOperationUnavailableReason
Section titled “ProviderOperationUnavailableReason”from cayu import ProviderOperationUnavailableReasonWhy exact continuation of one submitted model attempt is unavailable.
Bases: StrEnum.
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 |
|---|---|---|
FAILED |
class attribute |
'failed' |
EXPIRED |
class attribute |
'expired' |
CANCELLED |
class attribute |
'cancelled' |
MALFORMED |
class attribute |
'malformed' |
WRONG_PROVIDER |
class attribute |
'wrong_provider' |
UNAVAILABLE |
class attribute |
'unavailable' |
AMBIGUOUS_SUBMISSION |
class attribute |
'ambiguous_submission' |