cayu.tasks.admission
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.
AdmittedCompletionProposalRequest
Section titled “AdmittedCompletionProposalRequest”from cayu.tasks import AdmittedCompletionProposalRequestA completion proposal fenced to an exact active execution claim.
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 |
|---|---|---|
admission_id |
str |
required |
claim_id |
str |
required |
execution_owner_id |
str |
required |
generation |
StrictInt |
Field(ge=1, le=WORK_ATTEMPT_ADMISSION_MAX_GENERATIONS) |
proposal |
CompletionProposalCreate |
required |
validate_identity (method)
Section titled “validate_identity (method)”AdmittedCompletionProposalRequest.validate_identity(value: str, info) -> strcopy_proposal (method)
Section titled “copy_proposal (method)”AdmittedCompletionProposalRequest.copy_proposal(value: object) -> objectRelease source · Runtime guarantees · Capability guides
WorkAttemptAdmission
Section titled “WorkAttemptAdmission”from cayu.tasks import WorkAttemptAdmissionDurable, bounded admission intent or active receipt.
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 |
|---|---|---|
admission_id |
str |
required |
prepare_request_sha256 |
str |
required |
state |
WorkAttemptAdmissionState |
required |
attempt_id |
str |
required |
task_id |
str |
required |
session_id |
str |
required |
interaction_id |
str |
required |
kind |
Literal['initial', 'continuation'] |
required |
source_request_sha256 |
str |
required |
contract |
WorkContractRef |
required |
session_invocation |
SessionInvocationBinding |
required |
source_execution_profile_fingerprint |
str |
required |
run_semantics |
WorkAttemptRunSemantics | None |
None |
source_request |
WorkAttemptSourceRequest | None |
None |
claim |
WorkAttemptExecutionClaim |
required |
attempt |
WorkAttempt | None |
None |
continuation |
WorkAttemptContinuationContext | None |
None |
session_evidence_sha256 |
str | None |
None |
recovery_evidence_sha256 |
str | None |
None |
prepared_at |
datetime |
required |
activated_at |
datetime | None |
None |
execution_entry |
WorkAttemptExecutionEntry | None |
None |
execution_stop |
WorkAttemptExecutionStop | None |
None |
copy_source_request (method)
Section titled “copy_source_request (method)”WorkAttemptAdmission.copy_source_request(value: object) -> objectcopy_execution_stop (method)
Section titled “copy_execution_stop (method)”WorkAttemptAdmission.copy_execution_stop(value: object) -> objectcopy_execution_entry (method)
Section titled “copy_execution_entry (method)”WorkAttemptAdmission.copy_execution_entry(value: object) -> objectcopy_run_semantics (method)
Section titled “copy_run_semantics (method)”WorkAttemptAdmission.copy_run_semantics(value: object) -> objectvalidate_identity (method)
Section titled “validate_identity (method)”WorkAttemptAdmission.validate_identity(value: str, info) -> strvalidate_linked_identity (method)
Section titled “validate_linked_identity (method)”WorkAttemptAdmission.validate_linked_identity(value: str, info) -> strvalidate_digest (method)
Section titled “validate_digest (method)”WorkAttemptAdmission.validate_digest(value: str | None, info) -> str | Nonecopy_contract (method)
Section titled “copy_contract (method)”WorkAttemptAdmission.copy_contract(value: object) -> objectcopy_session_invocation (method)
Section titled “copy_session_invocation (method)”WorkAttemptAdmission.copy_session_invocation(value: object) -> objectcopy_claim (method)
Section titled “copy_claim (method)”WorkAttemptAdmission.copy_claim(value: object) -> objectcopy_attempt (method)
Section titled “copy_attempt (method)”WorkAttemptAdmission.copy_attempt(value: object) -> objectcopy_continuation (method)
Section titled “copy_continuation (method)”WorkAttemptAdmission.copy_continuation(value: object) -> objectnormalize_timestamp (method)
Section titled “normalize_timestamp (method)”WorkAttemptAdmission.normalize_timestamp(value: datetime | None, info) -> datetime | Nonevalidate_state (method)
Section titled “validate_state (method)”WorkAttemptAdmission.validate_state() -> WorkAttemptAdmissionRelease source · Runtime guarantees · Capability guides
WorkAttemptAdmissionActivate
Section titled “WorkAttemptAdmissionActivate”from cayu.tasks import WorkAttemptAdmissionActivateExact session evidence required to publish one prepared admission.
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 |
|---|---|---|
admission_id |
str |
required |
claim_id |
str |
required |
prepare_request_sha256 |
str |
required |
session_evidence_sha256 |
str |
required |
validate_identity (method)
Section titled “validate_identity (method)”WorkAttemptAdmissionActivate.validate_identity(value: str, info) -> strvalidate_digest (method)
Section titled “validate_digest (method)”WorkAttemptAdmissionActivate.validate_digest(value: str, info) -> strRelease source · Runtime guarantees · Capability guides
WorkAttemptAdmissionConflict
Section titled “WorkAttemptAdmissionConflict”from cayu.tasks import WorkAttemptAdmissionConflictA stable admission identity is bound to conflicting authority.
Bases: ValueError.
This type’s implementation and inherited behavior are available in the linked release source.
Release source · Runtime guarantees · Capability guides
WorkAttemptAdmissionPrepare
Section titled “WorkAttemptAdmissionPrepare”from cayu.tasks import WorkAttemptAdmissionPrepareStore request that reserves one exact attempt before session mutation.
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 |
|---|---|---|
admission_id |
str |
required |
claim_id |
str |
required |
attempt_id |
str |
required |
task_id |
str |
required |
session_id |
str |
required |
interaction_id |
str |
required |
worker_id |
str |
required |
task_lease_expires_at |
datetime | None |
None |
execution_owner_id |
str |
required |
generation |
StrictInt |
Field(ge=1, le=WORK_ATTEMPT_ADMISSION_MAX_GENERATIONS) |
lease_seconds |
StrictInt |
Field(ge=1, le=WORK_ATTEMPT_ADMISSION_LEASE_MAX_SECONDS) |
kind |
Literal['initial', 'continuation'] |
required |
predecessor_admission_id |
str | None |
None |
source_request_sha256 |
str |
required |
contract |
WorkContractRef |
required |
session_invocation |
SessionInvocationBinding |
required |
source_execution_profile_fingerprint |
str |
required |
run_semantics |
WorkAttemptRunSemantics | None |
None |
source_request |
WorkAttemptSourceRequest | None |
None |
copy_source_request (method)
Section titled “copy_source_request (method)”WorkAttemptAdmissionPrepare.copy_source_request(value: object) -> objectcopy_run_semantics (method)
Section titled “copy_run_semantics (method)”WorkAttemptAdmissionPrepare.copy_run_semantics(value: object) -> objectvalidate_identity (method)
Section titled “validate_identity (method)”WorkAttemptAdmissionPrepare.validate_identity(value: str | None, info) -> str | Nonevalidate_linked_identity (method)
Section titled “validate_linked_identity (method)”WorkAttemptAdmissionPrepare.validate_linked_identity(value: str, info) -> strnormalize_task_lease_expires_at (method)
Section titled “normalize_task_lease_expires_at (method)”WorkAttemptAdmissionPrepare.normalize_task_lease_expires_at(value: datetime | None) -> datetime | Nonevalidate_digest (method)
Section titled “validate_digest (method)”WorkAttemptAdmissionPrepare.validate_digest(value: str, info) -> strcopy_contract (method)
Section titled “copy_contract (method)”WorkAttemptAdmissionPrepare.copy_contract(value: object) -> objectcopy_session_invocation (method)
Section titled “copy_session_invocation (method)”WorkAttemptAdmissionPrepare.copy_session_invocation(value: object) -> objectvalidate_predecessor (method)
Section titled “validate_predecessor (method)”WorkAttemptAdmissionPrepare.validate_predecessor() -> WorkAttemptAdmissionPrepareRelease source · Runtime guarantees · Capability guides
WorkAttemptAdmissionState
Section titled “WorkAttemptAdmissionState”from cayu.tasks import WorkAttemptAdmissionStateBases: 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 |
|---|---|---|
PREPARING |
class attribute |
'preparing' |
ACTIVE |
class attribute |
'active' |
RECOVERING |
class attribute |
'recovering' |
RELEASED |
class attribute |
'released' |
Release source · Runtime guarantees · Capability guides
WorkAttemptClaimRenewalRequest
Section titled “WorkAttemptClaimRenewalRequest”from cayu.tasks import WorkAttemptClaimRenewalRequestPublic request to renew the caller’s current execution generation.
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 |
|---|---|---|
admission_id |
str |
required |
claim_id |
str |
required |
worker_id |
str |
required |
generation |
StrictInt |
Field(ge=1, le=WORK_ATTEMPT_ADMISSION_MAX_GENERATIONS) |
lease_seconds |
StrictInt |
Field(ge=1, le=WORK_ATTEMPT_ADMISSION_LEASE_MAX_SECONDS) |
validate_identity (method)
Section titled “validate_identity (method)”WorkAttemptClaimRenewalRequest.validate_identity(value: str, info) -> strRelease source · Runtime guarantees · Capability guides
WorkAttemptContinuationContext
Section titled “WorkAttemptContinuationContext”from cayu.tasks import WorkAttemptContinuationContextExact bounded rejection evidence supplied to the next attempt.
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 |
|---|---|---|
prior_admission_id |
str |
required |
prior_attempt_id |
str |
required |
proposal_id |
str |
required |
decision |
CompletionDecision |
required |
application_idempotency_key |
str |
required |
gap_fingerprint |
str |
required |
validate_identity (method)
Section titled “validate_identity (method)”WorkAttemptContinuationContext.validate_identity(value: str, info) -> strvalidate_gap_fingerprint (method)
Section titled “validate_gap_fingerprint (method)”WorkAttemptContinuationContext.validate_gap_fingerprint(value: str) -> strcopy_decision (method)
Section titled “copy_decision (method)”WorkAttemptContinuationContext.copy_decision(value: object) -> objectvalidate_decision_gaps (method)
Section titled “validate_decision_gaps (method)”WorkAttemptContinuationContext.validate_decision_gaps() -> WorkAttemptContinuationContextgaps (property)
Section titled “gaps (property)”WorkAttemptContinuationContext.gaps() -> tuple[CompletionGap, ...]Return the decision-owned typed gaps without persisting a duplicate.
Release source · Runtime guarantees · Capability guides
WorkAttemptExecutionClaim
Section titled “WorkAttemptExecutionClaim”from cayu.tasks import WorkAttemptExecutionClaimOne immutable generation of renewable work-attempt execution authority.
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 |
|---|---|---|
admission_id |
str |
required |
claim_id |
str |
required |
worker_id |
str |
required |
execution_owner_id |
str |
required |
generation |
StrictInt |
Field(ge=1, le=WORK_ATTEMPT_ADMISSION_MAX_GENERATIONS) |
request_sha256 |
str |
required |
claimed_at |
datetime |
required |
lease_expires_at |
datetime |
required |
renewal |
WorkAttemptExecutionClaimRenewal | None |
None |
copy_renewal (method)
Section titled “copy_renewal (method)”WorkAttemptExecutionClaim.copy_renewal(value: object) -> objectvalidate_identity (method)
Section titled “validate_identity (method)”WorkAttemptExecutionClaim.validate_identity(value: str, info) -> strvalidate_request_sha256 (method)
Section titled “validate_request_sha256 (method)”WorkAttemptExecutionClaim.validate_request_sha256(value: str) -> strnormalize_timestamp (method)
Section titled “normalize_timestamp (method)”WorkAttemptExecutionClaim.normalize_timestamp(value: datetime, info) -> datetimevalidate_lease_window (method)
Section titled “validate_lease_window (method)”WorkAttemptExecutionClaim.validate_lease_window() -> WorkAttemptExecutionClaimRelease source · Runtime guarantees · Capability guides
WorkAttemptExecutionClaimLost
Section titled “WorkAttemptExecutionClaimLost”from cayu.tasks import WorkAttemptExecutionClaimLostThe caller no longer owns the exact active work-attempt generation.
Bases: ValueError.
This type’s implementation and inherited behavior are available in the linked release source.
Release source · Runtime guarantees · Capability guides
WorkAttemptExecutionClaimRenewal
Section titled “WorkAttemptExecutionClaimRenewal”from cayu import WorkAttemptExecutionClaimRenewalStore-clock evidence for the enclosing claim’s latest lease extension.
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 |
|---|---|---|
renewed_at |
datetime |
required |
lease_seconds |
StrictInt |
Field(ge=1, le=WORK_ATTEMPT_ADMISSION_LEASE_MAX_SECONDS) |
normalize_timestamp (method)
Section titled “normalize_timestamp (method)”WorkAttemptExecutionClaimRenewal.normalize_timestamp(value: datetime) -> datetimeRelease source · Runtime guarantees · Capability guides
WorkAttemptExecutionClaimRequest
Section titled “WorkAttemptExecutionClaimRequest”from cayu.tasks import WorkAttemptExecutionClaimRequestRenew or replace one attempt’s process-aware execution generation.
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 |
|---|---|---|
admission_id |
str |
required |
claim_id |
str |
required |
worker_id |
str |
required |
execution_owner_id |
str |
required |
generation |
StrictInt |
Field(ge=1, le=WORK_ATTEMPT_ADMISSION_MAX_GENERATIONS) |
lease_seconds |
StrictInt |
Field(ge=1, le=WORK_ATTEMPT_ADMISSION_LEASE_MAX_SECONDS) |
validate_identity (method)
Section titled “validate_identity (method)”WorkAttemptExecutionClaimRequest.validate_identity(value: str, info) -> strRelease source · Runtime guarantees · Capability guides
WorkAttemptExecutionRequest
Section titled “WorkAttemptExecutionRequest”from cayu.tasks import WorkAttemptExecutionRequestPublic, stable identities for one runtime-owned execution entrance.
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 |
|---|---|---|
admission_id |
str |
required |
claim_id |
str |
required |
attempt_id |
str |
required |
interaction_id |
str |
required |
worker_id |
str |
required |
task_id |
str | None |
None |
task_lease_expires_at |
datetime | None |
None |
predecessor_admission_id |
str | None |
None |
generation |
StrictInt |
Field(ge=1, le=WORK_ATTEMPT_ADMISSION_MAX_GENERATIONS) |
lease_seconds |
StrictInt |
Field(ge=1, le=WORK_ATTEMPT_ADMISSION_LEASE_MAX_SECONDS) |
validate_identity (method)
Section titled “validate_identity (method)”WorkAttemptExecutionRequest.validate_identity(value: str | None, info) -> str | Nonevalidate_task_id (method)
Section titled “validate_task_id (method)”WorkAttemptExecutionRequest.validate_task_id(value: str | None) -> str | Nonenormalize_task_lease_expires_at (method)
Section titled “normalize_task_lease_expires_at (method)”WorkAttemptExecutionRequest.normalize_task_lease_expires_at(value: datetime | None) -> datetime | NoneRelease source · Runtime guarantees · Capability guides
WorkAttemptProposalRequest
Section titled “WorkAttemptProposalRequest”from cayu.tasks import WorkAttemptProposalRequestPublic proposal request completed with process authority by CayuApp.
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 |
|---|---|---|
admission_id |
str |
required |
claim_id |
str |
required |
generation |
StrictInt |
Field(ge=1, le=WORK_ATTEMPT_ADMISSION_MAX_GENERATIONS) |
proposal |
CompletionProposalCreate |
required |
validate_identity (method)
Section titled “validate_identity (method)”WorkAttemptProposalRequest.validate_identity(value: str, info) -> strcopy_proposal (method)
Section titled “copy_proposal (method)”WorkAttemptProposalRequest.copy_proposal(value: object) -> objectRelease source · Runtime guarantees · Capability guides
WorkAttemptRecoveryActivate
Section titled “WorkAttemptRecoveryActivate”from cayu.tasks import WorkAttemptRecoveryActivatePositive session-settlement evidence that activates a recovery generation.
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 |
|---|---|---|
admission_id |
str |
required |
claim_id |
str |
required |
generation |
StrictInt |
Field(ge=2, le=WORK_ATTEMPT_ADMISSION_MAX_GENERATIONS) |
recovery_evidence_sha256 |
str |
required |
validate_identity (method)
Section titled “validate_identity (method)”WorkAttemptRecoveryActivate.validate_identity(value: str, info) -> strvalidate_recovery_evidence_sha256 (method)
Section titled “validate_recovery_evidence_sha256 (method)”WorkAttemptRecoveryActivate.validate_recovery_evidence_sha256(value: str) -> strRelease source · Runtime guarantees · Capability guides
WorkAttemptRecoveryRequest
Section titled “WorkAttemptRecoveryRequest”from cayu.tasks import WorkAttemptRecoveryRequestPublic request to replace one expired execution generation.
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 |
|---|---|---|
admission_id |
str |
required |
claim_id |
str |
required |
worker_id |
str |
required |
generation |
StrictInt |
Field(ge=2, le=WORK_ATTEMPT_ADMISSION_MAX_GENERATIONS) |
lease_seconds |
StrictInt |
Field(ge=1, le=WORK_ATTEMPT_ADMISSION_LEASE_MAX_SECONDS) |
validate_identity (method)
Section titled “validate_identity (method)”WorkAttemptRecoveryRequest.validate_identity(value: str, info) -> strRelease source · Runtime guarantees · Capability guides
WorkAttemptRecoveryRequired
Section titled “WorkAttemptRecoveryRequired”from cayu.tasks import WorkAttemptRecoveryRequiredDurable admission remains fenced pending exact session reconciliation.
Bases: RuntimeError.
This type’s implementation and inherited behavior are available in the linked release source.