cayu.tasks.contracts
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.
completion_gap_fingerprint
Section titled “completion_gap_fingerprint”from cayu.tasks import completion_gap_fingerprintcompletion_gap_fingerprint(value: CompletionDecisionCreate) -> strRelease source · Runtime guarantees · Capability guides
completion_result_sha256
Section titled “completion_result_sha256”from cayu.tasks import completion_result_sha256completion_result_sha256(value: dict[str, object]) -> strRelease source · Runtime guarantees · Capability guides
CompletionConstraintOutcome
Section titled “CompletionConstraintOutcome”from cayu.tasks import CompletionConstraintOutcomeBases: _CompletionOutcome.
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 |
CriterionOutcomeStatus |
required |
reason_code |
str |
required |
satisfaction_basis |
CompletionSatisfactionBasis | None |
None |
evidence_references |
tuple[WorkEvidenceReference, ...] |
Field(default=(), max_length=WORK_COMPLETION_OUTCOME_MAX_EVIDENCE_REFERENCES) |
summary |
str | None |
None |
constraint_id |
str |
required |
validate_reason_code (method)
Section titled “validate_reason_code (method)”CompletionConstraintOutcome.validate_reason_code(value: str) -> strvalidate_summary (method)
Section titled “validate_summary (method)”CompletionConstraintOutcome.validate_summary(value: str | None) -> str | Nonecopy_evidence_references (method)
Section titled “copy_evidence_references (method)”CompletionConstraintOutcome.copy_evidence_references(value: object) -> objectvalidate_evidence_references (method)
Section titled “validate_evidence_references (method)”CompletionConstraintOutcome.validate_evidence_references(value: tuple[WorkEvidenceReference, ...]) -> tuple[WorkEvidenceReference, ...]validate_satisfaction_basis (method)
Section titled “validate_satisfaction_basis (method)”CompletionConstraintOutcome.validate_satisfaction_basis() -> _CompletionOutcomevalidate_constraint_id (method)
Section titled “validate_constraint_id (method)”CompletionConstraintOutcome.validate_constraint_id(value: str) -> strRelease source · Runtime guarantees · Capability guides
CompletionContinuationPolicy
Section titled “CompletionContinuationPolicy”from cayu.tasks import CompletionContinuationPolicyBases: FrozenWorkContractModel.
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 |
|---|---|---|
rejection_action |
CompletionRejectionAction |
CompletionRejectionAction.INTERRUPT |
max_attempts |
StrictInt |
Field(default=3, ge=1, le=100) |
max_repeated_gap_count |
StrictInt |
Field(default=2, ge=1, le=100) |
Release source · Runtime guarantees · Capability guides
CompletionCriterionOutcome
Section titled “CompletionCriterionOutcome”from cayu.tasks import CompletionCriterionOutcomeBases: _CompletionOutcome.
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 |
CriterionOutcomeStatus |
required |
reason_code |
str |
required |
satisfaction_basis |
CompletionSatisfactionBasis | None |
None |
evidence_references |
tuple[WorkEvidenceReference, ...] |
Field(default=(), max_length=WORK_COMPLETION_OUTCOME_MAX_EVIDENCE_REFERENCES) |
summary |
str | None |
None |
criterion_id |
str |
required |
validate_reason_code (method)
Section titled “validate_reason_code (method)”CompletionCriterionOutcome.validate_reason_code(value: str) -> strvalidate_summary (method)
Section titled “validate_summary (method)”CompletionCriterionOutcome.validate_summary(value: str | None) -> str | Nonecopy_evidence_references (method)
Section titled “copy_evidence_references (method)”CompletionCriterionOutcome.copy_evidence_references(value: object) -> objectvalidate_evidence_references (method)
Section titled “validate_evidence_references (method)”CompletionCriterionOutcome.validate_evidence_references(value: tuple[WorkEvidenceReference, ...]) -> tuple[WorkEvidenceReference, ...]validate_satisfaction_basis (method)
Section titled “validate_satisfaction_basis (method)”CompletionCriterionOutcome.validate_satisfaction_basis() -> _CompletionOutcomevalidate_criterion_id (method)
Section titled “validate_criterion_id (method)”CompletionCriterionOutcome.validate_criterion_id(value: str) -> strRelease source · Runtime guarantees · Capability guides
CompletionDecision
Section titled “CompletionDecision”from cayu.tasks import CompletionDecisionBases: CompletionDecisionCreate.
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 |
|---|---|---|
decision_id |
str |
required |
proposal_id |
str |
required |
claim_id |
str |
required |
worker_id |
str |
required |
verifier |
CompletionVerifierRef |
required |
verifier_profile_fingerprint |
str |
required |
decision_version |
Literal[1] |
1 |
verdict |
CompletionVerdict |
required |
criterion_outcomes |
tuple[CompletionCriterionOutcome, ...] |
Field(min_length=1, max_length=WORK_CONTRACT_MAX_CRITERIA) |
constraint_outcomes |
tuple[CompletionConstraintOutcome, ...] |
Field(default=(), max_length=WORK_CONTRACT_MAX_CONSTRAINTS) |
gaps |
tuple[CompletionGap, ...] |
Field(default=(), max_length=WORK_CONTRACT_MAX_CRITERIA + WORK_CONTRACT_MAX_CONSTRAINTS) |
evidence_references |
tuple[WorkEvidenceReference, ...] |
Field(default=(), max_length=WORK_CONTRACT_MAX_EVIDENCE_REFERENCES) |
task_id |
str |
required |
attempt_id |
str |
required |
contract |
WorkContractRef |
required |
claim_authority_sha256 |
str |
required |
request_sha256 |
str |
required |
gap_fingerprint |
str |
required |
decided_at |
datetime |
required |
validate_identity (method)
Section titled “validate_identity (method)”CompletionDecision.validate_identity(value: str, info) -> strvalidate_decision_version_type (method)
Section titled “validate_decision_version_type (method)”CompletionDecision.validate_decision_version_type(value: object) -> objectcopy_verifier (method)
Section titled “copy_verifier (method)”CompletionDecision.copy_verifier(value: object) -> objectvalidate_verifier_profile_fingerprint (method)
Section titled “validate_verifier_profile_fingerprint (method)”CompletionDecision.validate_verifier_profile_fingerprint(value: str) -> strcopy_criterion_outcomes (method)
Section titled “copy_criterion_outcomes (method)”CompletionDecision.copy_criterion_outcomes(value: object) -> objectcopy_constraint_outcomes (method)
Section titled “copy_constraint_outcomes (method)”CompletionDecision.copy_constraint_outcomes(value: object) -> objectcopy_gaps (method)
Section titled “copy_gaps (method)”CompletionDecision.copy_gaps(value: object) -> objectcopy_evidence_references (method)
Section titled “copy_evidence_references (method)”CompletionDecision.copy_evidence_references(value: object) -> objectvalidate_evidence_references (method)
Section titled “validate_evidence_references (method)”CompletionDecision.validate_evidence_references(value: tuple[WorkEvidenceReference, ...]) -> tuple[WorkEvidenceReference, ...]validate_verdict_shape (method)
Section titled “validate_verdict_shape (method)”CompletionDecision.validate_verdict_shape() -> CompletionDecisionCreatevalidate_parent_identity (method)
Section titled “validate_parent_identity (method)”CompletionDecision.validate_parent_identity(value: str, info) -> strvalidate_task_id (method)
Section titled “validate_task_id (method)”CompletionDecision.validate_task_id(value: str) -> strcopy_contract (method)
Section titled “copy_contract (method)”CompletionDecision.copy_contract(value: object) -> objectvalidate_digest (method)
Section titled “validate_digest (method)”CompletionDecision.validate_digest(value: str, info) -> strnormalize_decided_at (method)
Section titled “normalize_decided_at (method)”CompletionDecision.normalize_decided_at(value: datetime) -> datetimeRelease source · Runtime guarantees · Capability guides
CompletionDecisionApplicationRequest
Section titled “CompletionDecisionApplicationRequest”from cayu.tasks import CompletionDecisionApplicationRequestBases: FrozenWorkContractModel.
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 |
|---|---|---|
task_id |
str |
required |
decision_id |
str |
required |
idempotency_key |
str |
required |
result |
dict[str, object] | None |
None |
result_reference |
CompletionResultReference | None |
None |
validate_identity (method)
Section titled “validate_identity (method)”CompletionDecisionApplicationRequest.validate_identity(value: str, info) -> strvalidate_task_id (method)
Section titled “validate_task_id (method)”CompletionDecisionApplicationRequest.validate_task_id(value: str) -> strvalidate_idempotency_key (method)
Section titled “validate_idempotency_key (method)”CompletionDecisionApplicationRequest.validate_idempotency_key(value: str) -> strcopy_result (method)
Section titled “copy_result (method)”CompletionDecisionApplicationRequest.copy_result(value: object) -> objectcopy_result_reference (method)
Section titled “copy_result_reference (method)”CompletionDecisionApplicationRequest.copy_result_reference(value: object) -> objectvalidate_result_binding (method)
Section titled “validate_result_binding (method)”CompletionDecisionApplicationRequest.validate_result_binding() -> CompletionDecisionApplicationRequestRelease source · Runtime guarantees · Capability guides
CompletionDecisionCreate
Section titled “CompletionDecisionCreate”from cayu.tasks import CompletionDecisionCreateBases: FrozenWorkContractModel.
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 |
|---|---|---|
decision_id |
str |
required |
proposal_id |
str |
required |
claim_id |
str |
required |
worker_id |
str |
required |
verifier |
CompletionVerifierRef |
required |
verifier_profile_fingerprint |
str |
required |
decision_version |
Literal[1] |
1 |
verdict |
CompletionVerdict |
required |
criterion_outcomes |
tuple[CompletionCriterionOutcome, ...] |
Field(min_length=1, max_length=WORK_CONTRACT_MAX_CRITERIA) |
constraint_outcomes |
tuple[CompletionConstraintOutcome, ...] |
Field(default=(), max_length=WORK_CONTRACT_MAX_CONSTRAINTS) |
gaps |
tuple[CompletionGap, ...] |
Field(default=(), max_length=WORK_CONTRACT_MAX_CRITERIA + WORK_CONTRACT_MAX_CONSTRAINTS) |
evidence_references |
tuple[WorkEvidenceReference, ...] |
Field(default=(), max_length=WORK_CONTRACT_MAX_EVIDENCE_REFERENCES) |
validate_identity (method)
Section titled “validate_identity (method)”CompletionDecisionCreate.validate_identity(value: str, info) -> strvalidate_decision_version_type (method)
Section titled “validate_decision_version_type (method)”CompletionDecisionCreate.validate_decision_version_type(value: object) -> objectcopy_verifier (method)
Section titled “copy_verifier (method)”CompletionDecisionCreate.copy_verifier(value: object) -> objectvalidate_verifier_profile_fingerprint (method)
Section titled “validate_verifier_profile_fingerprint (method)”CompletionDecisionCreate.validate_verifier_profile_fingerprint(value: str) -> strcopy_criterion_outcomes (method)
Section titled “copy_criterion_outcomes (method)”CompletionDecisionCreate.copy_criterion_outcomes(value: object) -> objectcopy_constraint_outcomes (method)
Section titled “copy_constraint_outcomes (method)”CompletionDecisionCreate.copy_constraint_outcomes(value: object) -> objectcopy_gaps (method)
Section titled “copy_gaps (method)”CompletionDecisionCreate.copy_gaps(value: object) -> objectcopy_evidence_references (method)
Section titled “copy_evidence_references (method)”CompletionDecisionCreate.copy_evidence_references(value: object) -> objectvalidate_evidence_references (method)
Section titled “validate_evidence_references (method)”CompletionDecisionCreate.validate_evidence_references(value: tuple[WorkEvidenceReference, ...]) -> tuple[WorkEvidenceReference, ...]validate_verdict_shape (method)
Section titled “validate_verdict_shape (method)”CompletionDecisionCreate.validate_verdict_shape() -> CompletionDecisionCreateRelease source · Runtime guarantees · Capability guides
CompletionGap
Section titled “CompletionGap”from cayu.tasks import CompletionGapBases: FrozenWorkContractModel.
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 |
|---|---|---|
criterion_id |
str | None |
None |
constraint_id |
str | None |
None |
code |
str |
required |
evidence_requirement_ids |
tuple[str, ...] |
Field(default=(), max_length=WORK_CONTRACT_MAX_EVIDENCE_REQUIREMENTS) |
summary |
str | None |
None |
validate_subject_id (method)
Section titled “validate_subject_id (method)”CompletionGap.validate_subject_id(value: str | None, info) -> str | Nonevalidate_code (method)
Section titled “validate_code (method)”CompletionGap.validate_code(value: str) -> strvalidate_evidence_requirement_ids (method)
Section titled “validate_evidence_requirement_ids (method)”CompletionGap.validate_evidence_requirement_ids(value: tuple[str, ...]) -> tuple[str, ...]validate_summary (method)
Section titled “validate_summary (method)”CompletionGap.validate_summary(value: str | None) -> str | Nonevalidate_exact_subject (method)
Section titled “validate_exact_subject (method)”CompletionGap.validate_exact_subject() -> CompletionGapsubject_key (method)
Section titled “subject_key (method)”CompletionGap.subject_key() -> tuple[str, str]Release source · Runtime guarantees · Capability guides
CompletionProposal
Section titled “CompletionProposal”from cayu.tasks import CompletionProposalBases: CompletionProposalCreate.
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 |
|---|---|---|
proposal_id |
str |
required |
attempt_id |
str |
required |
result |
CompletionResultReference |
required |
evidence_references |
tuple[WorkEvidenceReference, ...] |
Field(default=(), max_length=WORK_CONTRACT_MAX_EVIDENCE_REFERENCES) |
task_id |
str |
required |
contract |
WorkContractRef |
required |
request_sha256 |
str |
required |
proposed_at |
datetime |
required |
validate_identity (method)
Section titled “validate_identity (method)”CompletionProposal.validate_identity(value: str, info) -> strcopy_result (method)
Section titled “copy_result (method)”CompletionProposal.copy_result(value: object) -> objectcopy_evidence_references (method)
Section titled “copy_evidence_references (method)”CompletionProposal.copy_evidence_references(value: object) -> objectvalidate_evidence_references (method)
Section titled “validate_evidence_references (method)”CompletionProposal.validate_evidence_references(value: tuple[WorkEvidenceReference, ...]) -> tuple[WorkEvidenceReference, ...]validate_proposal_size (method)
Section titled “validate_proposal_size (method)”CompletionProposal.validate_proposal_size() -> CompletionProposalCreatevalidate_task_id (method)
Section titled “validate_task_id (method)”CompletionProposal.validate_task_id(value: str) -> strcopy_contract (method)
Section titled “copy_contract (method)”CompletionProposal.copy_contract(value: object) -> objectvalidate_request_sha256 (method)
Section titled “validate_request_sha256 (method)”CompletionProposal.validate_request_sha256(value: str) -> strnormalize_proposed_at (method)
Section titled “normalize_proposed_at (method)”CompletionProposal.normalize_proposed_at(value: datetime) -> datetimeRelease source · Runtime guarantees · Capability guides
CompletionProposalCreate
Section titled “CompletionProposalCreate”from cayu.tasks import CompletionProposalCreateBases: FrozenWorkContractModel.
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 |
|---|---|---|
proposal_id |
str |
required |
attempt_id |
str |
required |
result |
CompletionResultReference |
required |
evidence_references |
tuple[WorkEvidenceReference, ...] |
Field(default=(), max_length=WORK_CONTRACT_MAX_EVIDENCE_REFERENCES) |
validate_identity (method)
Section titled “validate_identity (method)”CompletionProposalCreate.validate_identity(value: str, info) -> strcopy_result (method)
Section titled “copy_result (method)”CompletionProposalCreate.copy_result(value: object) -> objectcopy_evidence_references (method)
Section titled “copy_evidence_references (method)”CompletionProposalCreate.copy_evidence_references(value: object) -> objectvalidate_evidence_references (method)
Section titled “validate_evidence_references (method)”CompletionProposalCreate.validate_evidence_references(value: tuple[WorkEvidenceReference, ...]) -> tuple[WorkEvidenceReference, ...]validate_proposal_size (method)
Section titled “validate_proposal_size (method)”CompletionProposalCreate.validate_proposal_size() -> CompletionProposalCreateRelease source · Runtime guarantees · Capability guides
CompletionRejectionAction
Section titled “CompletionRejectionAction”from cayu.tasks import CompletionRejectionActionBases: 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 |
|---|---|---|
CONTINUE |
class attribute |
'continue' |
INTERRUPT |
class attribute |
'interrupt' |
Release source · Runtime guarantees · Capability guides
CompletionResultReference
Section titled “CompletionResultReference”from cayu.tasks import CompletionResultReferenceBases: FrozenWorkContractModel.
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 |
|---|---|---|
kind |
str |
required |
reference_id |
str |
required |
digest |
str |
required |
validate_kind (method)
Section titled “validate_kind (method)”CompletionResultReference.validate_kind(value: str) -> strvalidate_reference_id (method)
Section titled “validate_reference_id (method)”CompletionResultReference.validate_reference_id(value: str) -> strvalidate_digest (method)
Section titled “validate_digest (method)”CompletionResultReference.validate_digest(value: str) -> strRelease source · Runtime guarantees · Capability guides
CompletionResultResolverRef
Section titled “CompletionResultResolverRef”from cayu.tasks import CompletionResultResolverRefExact application-owned authority for reconstructing an accepted result.
Bases: FrozenWorkContractModel.
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 |
|---|---|---|
resolver_id |
str |
required |
version |
str |
required |
configuration_fingerprint |
str |
required |
validate_identity (method)
Section titled “validate_identity (method)”CompletionResultResolverRef.validate_identity(value: str, info) -> strvalidate_configuration_fingerprint (method)
Section titled “validate_configuration_fingerprint (method)”CompletionResultResolverRef.validate_configuration_fingerprint(value: str) -> strRelease source · Runtime guarantees · Capability guides
CompletionSatisfactionBasis
Section titled “CompletionSatisfactionBasis”from cayu.tasks import CompletionSatisfactionBasisBases: 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 |
|---|---|---|
EVIDENCE |
class attribute |
'evidence' |
VERIFIER_ASSERTION |
class attribute |
'verifier_assertion' |
Release source · Runtime guarantees · Capability guides
CompletionVerdict
Section titled “CompletionVerdict”from cayu.tasks import CompletionVerdictBases: 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 |
|---|---|---|
ACCEPTED |
class attribute |
'accepted' |
REJECTED |
class attribute |
'rejected' |
BLOCKED |
class attribute |
'blocked' |
NEEDS_REVIEW |
class attribute |
'needs_review' |
Release source · Runtime guarantees · Capability guides
CompletionVerificationClaim
Section titled “CompletionVerificationClaim”from cayu.tasks import CompletionVerificationClaimBases: FrozenWorkContractModel.
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 |
|---|---|---|
claim_id |
str |
required |
proposal_id |
str |
required |
worker_id |
str |
required |
lease_seconds |
StrictInt |
Field(ge=1, le=WORK_VERIFICATION_LEASE_MAX_SECONDS) |
execution_owner_id |
str | None |
None |
execution_timeout_seconds |
StrictFloat | None |
Field(default=None, gt=0, le=WORK_VERIFICATION_LEASE_MAX_SECONDS) |
verifier |
CompletionVerifierRef |
required |
verifier_profile_fingerprint |
str |
required |
attempt_number |
StrictInt |
Field(ge=1) |
request_sha256 |
str |
required |
claimed_at |
datetime |
required |
lease_expires_at |
datetime |
required |
validate_identity (method)
Section titled “validate_identity (method)”CompletionVerificationClaim.validate_identity(value: str, info) -> strvalidate_execution_owner_id (method)
Section titled “validate_execution_owner_id (method)”CompletionVerificationClaim.validate_execution_owner_id(value: str | None) -> str | Nonecopy_verifier (method)
Section titled “copy_verifier (method)”CompletionVerificationClaim.copy_verifier(value: object) -> objectvalidate_verifier_profile_fingerprint (method)
Section titled “validate_verifier_profile_fingerprint (method)”CompletionVerificationClaim.validate_verifier_profile_fingerprint(value: str) -> strvalidate_request_sha256 (method)
Section titled “validate_request_sha256 (method)”CompletionVerificationClaim.validate_request_sha256(value: str) -> strnormalize_timestamps (method)
Section titled “normalize_timestamps (method)”CompletionVerificationClaim.normalize_timestamps(value: datetime, info) -> datetimevalidate_lease_window (method)
Section titled “validate_lease_window (method)”CompletionVerificationClaim.validate_lease_window() -> CompletionVerificationClaimRelease source · Runtime guarantees · Capability guides
CompletionVerificationClaimLost
Section titled “CompletionVerificationClaimLost”from cayu.tasks import CompletionVerificationClaimLostA verifier no longer owns the live claim for a completion proposal.
Bases: ValueError.
This type’s implementation and inherited behavior are available in the linked release source.
Release source · Runtime guarantees · Capability guides
CompletionVerificationClaimRequest
Section titled “CompletionVerificationClaimRequest”from cayu.tasks import CompletionVerificationClaimRequestBases: FrozenWorkContractModel.
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 |
|---|---|---|
claim_id |
str |
required |
proposal_id |
str |
required |
worker_id |
str |
required |
execution_owner_id |
str | None |
None |
verifier |
CompletionVerifierRef |
required |
verifier_profile_fingerprint |
str |
required |
lease_seconds |
StrictInt |
Field(default=300, ge=1, le=WORK_VERIFICATION_LEASE_MAX_SECONDS) |
execution_timeout_seconds |
StrictFloat | None |
Field(default=None, gt=0, le=WORK_VERIFICATION_LEASE_MAX_SECONDS) |
validate_identity (method)
Section titled “validate_identity (method)”CompletionVerificationClaimRequest.validate_identity(value: str, info) -> strvalidate_execution_owner_id (method)
Section titled “validate_execution_owner_id (method)”CompletionVerificationClaimRequest.validate_execution_owner_id(value: str | None) -> str | Nonecopy_verifier (method)
Section titled “copy_verifier (method)”CompletionVerificationClaimRequest.copy_verifier(value: object) -> objectvalidate_verifier_profile_fingerprint (method)
Section titled “validate_verifier_profile_fingerprint (method)”CompletionVerificationClaimRequest.validate_verifier_profile_fingerprint(value: str) -> strvalidate_execution_timeout_within_lease (method)
Section titled “validate_execution_timeout_within_lease (method)”CompletionVerificationClaimRequest.validate_execution_timeout_within_lease() -> CompletionVerificationClaimRequestRelease source · Runtime guarantees · Capability guides
CompletionVerifierDecision
Section titled “CompletionVerifierDecision”from cayu.tasks import CompletionVerifierDecisionVerifier-owned outcome before Cayu binds durable decision authority.
Bases: FrozenWorkContractModel.
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 |
|---|---|---|
verdict |
CompletionVerdict |
required |
criterion_outcomes |
tuple[CompletionCriterionOutcome, ...] |
Field(min_length=1, max_length=WORK_CONTRACT_MAX_CRITERIA) |
constraint_outcomes |
tuple[CompletionConstraintOutcome, ...] |
Field(default=(), max_length=WORK_CONTRACT_MAX_CONSTRAINTS) |
gaps |
tuple[CompletionGap, ...] |
Field(default=(), max_length=WORK_CONTRACT_MAX_CRITERIA + WORK_CONTRACT_MAX_CONSTRAINTS) |
evidence_references |
tuple[WorkEvidenceReference, ...] |
Field(default=(), max_length=WORK_CONTRACT_MAX_EVIDENCE_REFERENCES) |
copy_criterion_outcomes (method)
Section titled “copy_criterion_outcomes (method)”CompletionVerifierDecision.copy_criterion_outcomes(value: object) -> objectcopy_constraint_outcomes (method)
Section titled “copy_constraint_outcomes (method)”CompletionVerifierDecision.copy_constraint_outcomes(value: object) -> objectcopy_gaps (method)
Section titled “copy_gaps (method)”CompletionVerifierDecision.copy_gaps(value: object) -> objectcopy_evidence_references (method)
Section titled “copy_evidence_references (method)”CompletionVerifierDecision.copy_evidence_references(value: object) -> objectvalidate_evidence_references (method)
Section titled “validate_evidence_references (method)”CompletionVerifierDecision.validate_evidence_references(value: tuple[WorkEvidenceReference, ...]) -> tuple[WorkEvidenceReference, ...]validate_verdict_shape (method)
Section titled “validate_verdict_shape (method)”CompletionVerifierDecision.validate_verdict_shape() -> CompletionVerifierDecisionRelease source · Runtime guarantees · Capability guides
CompletionVerifierKind
Section titled “CompletionVerifierKind”from cayu.tasks import CompletionVerifierKindBases: 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 |
|---|---|---|
DETERMINISTIC |
class attribute |
'deterministic' |
PROVIDER |
class attribute |
'provider' |
Release source · Runtime guarantees · Capability guides
CompletionVerifierRef
Section titled “CompletionVerifierRef”from cayu.tasks import CompletionVerifierRefBases: FrozenWorkContractModel.
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 |
|---|---|---|
verifier_id |
str |
required |
version |
str |
required |
kind |
CompletionVerifierKind |
CompletionVerifierKind.DETERMINISTIC |
configuration_fingerprint |
str |
required |
validate_identity (method)
Section titled “validate_identity (method)”CompletionVerifierRef.validate_identity(value: str, info) -> strvalidate_configuration_fingerprint (method)
Section titled “validate_configuration_fingerprint (method)”CompletionVerifierRef.validate_configuration_fingerprint(value: str) -> strRelease source · Runtime guarantees · Capability guides
CriterionOutcomeStatus
Section titled “CriterionOutcomeStatus”from cayu.tasks import CriterionOutcomeStatusBases: 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 |
|---|---|---|
SATISFIED |
class attribute |
'satisfied' |
UNSATISFIED |
class attribute |
'unsatisfied' |
UNVERIFIABLE |
class attribute |
'unverifiable' |
Release source · Runtime guarantees · Capability guides
TaskCompletionDecisionRequired
Section titled “TaskCompletionDecisionRequired”from cayu.tasks import TaskCompletionDecisionRequiredA contracted task cannot complete without an accepted durable decision.
Bases: ValueError.
This type’s implementation and inherited behavior are available in the linked release source.
Release source · Runtime guarantees · Capability guides
work_contract_fingerprint
Section titled “work_contract_fingerprint”from cayu.tasks import work_contract_fingerprintwork_contract_fingerprint(contract: WorkContractDraft) -> strRelease source · Runtime guarantees · Capability guides
work_contract_from_draft
Section titled “work_contract_from_draft”from cayu.tasks import work_contract_from_draftwork_contract_from_draft(draft: WorkContractDraft) -> WorkContractRelease source · Runtime guarantees · Capability guides
WorkAttempt
Section titled “WorkAttempt”from cayu.tasks import WorkAttemptBases: WorkAttemptCreate.
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 |
|---|---|---|
attempt_id |
str |
required |
task_id |
str |
required |
session_id |
str |
required |
contract |
WorkContractRef |
required |
execution_profile_fingerprint |
str |
required |
worker_id |
str | None |
None |
ordinal |
StrictInt |
Field(ge=1) |
request_sha256 |
str |
required |
started_at |
datetime |
required |
validate_identity (method)
Section titled “validate_identity (method)”WorkAttempt.validate_identity(value: str, info) -> strvalidate_inherited_identity (method)
Section titled “validate_inherited_identity (method)”WorkAttempt.validate_inherited_identity(value: str, info) -> strvalidate_worker_id (method)
Section titled “validate_worker_id (method)”WorkAttempt.validate_worker_id(value: str | None) -> str | Nonevalidate_execution_profile_fingerprint (method)
Section titled “validate_execution_profile_fingerprint (method)”WorkAttempt.validate_execution_profile_fingerprint(value: str) -> strcopy_contract (method)
Section titled “copy_contract (method)”WorkAttempt.copy_contract(value: object) -> objectvalidate_request_sha256 (method)
Section titled “validate_request_sha256 (method)”WorkAttempt.validate_request_sha256(value: str) -> strnormalize_started_at (method)
Section titled “normalize_started_at (method)”WorkAttempt.normalize_started_at(value: datetime) -> datetimeRelease source · Runtime guarantees · Capability guides
WorkAttemptCreate
Section titled “WorkAttemptCreate”from cayu.tasks import WorkAttemptCreateBases: FrozenWorkContractModel.
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 |
|---|---|---|
attempt_id |
str |
required |
task_id |
str |
required |
session_id |
str |
required |
contract |
WorkContractRef |
required |
execution_profile_fingerprint |
str |
required |
worker_id |
str | None |
None |
validate_identity (method)
Section titled “validate_identity (method)”WorkAttemptCreate.validate_identity(value: str, info) -> strvalidate_inherited_identity (method)
Section titled “validate_inherited_identity (method)”WorkAttemptCreate.validate_inherited_identity(value: str, info) -> strvalidate_worker_id (method)
Section titled “validate_worker_id (method)”WorkAttemptCreate.validate_worker_id(value: str | None) -> str | Nonevalidate_execution_profile_fingerprint (method)
Section titled “validate_execution_profile_fingerprint (method)”WorkAttemptCreate.validate_execution_profile_fingerprint(value: str) -> strcopy_contract (method)
Section titled “copy_contract (method)”WorkAttemptCreate.copy_contract(value: object) -> objectRelease source · Runtime guarantees · Capability guides
WorkCompletionConflict
Section titled “WorkCompletionConflict”from cayu.tasks import WorkCompletionConflictA stable work-completion identity is already bound to another operation.
Bases: ValueError.
This type’s implementation and inherited behavior are available in the linked release source.
Release source · Runtime guarantees · Capability guides
WorkConstraint
Section titled “WorkConstraint”from cayu.tasks import WorkConstraintBases: FrozenWorkContractModel.
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 |
|---|---|---|
constraint_id |
str |
required |
description |
str |
required |
evidence_requirement_ids |
tuple[str, ...] |
Field(default=(), max_length=WORK_CONTRACT_MAX_EVIDENCE_REQUIREMENTS) |
validate_constraint_id (method)
Section titled “validate_constraint_id (method)”WorkConstraint.validate_constraint_id(value: str) -> strvalidate_description (method)
Section titled “validate_description (method)”WorkConstraint.validate_description(value: str) -> strvalidate_evidence_requirement_ids (method)
Section titled “validate_evidence_requirement_ids (method)”WorkConstraint.validate_evidence_requirement_ids(value: tuple[str, ...]) -> tuple[str, ...]Release source · Runtime guarantees · Capability guides
WorkContract
Section titled “WorkContract”from cayu.tasks import WorkContractBases: WorkContractDraft.
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 |
|---|---|---|
contract_id |
str |
required |
version |
StrictInt |
Field(ge=1) |
supersedes |
WorkContractRef | None |
None |
objective |
str |
required |
criteria |
tuple[WorkCriterion, ...] |
Field(min_length=1, max_length=WORK_CONTRACT_MAX_CRITERIA) |
constraints |
tuple[WorkConstraint, ...] |
Field(default=(), max_length=WORK_CONTRACT_MAX_CONSTRAINTS) |
evidence_requirements |
tuple[WorkEvidenceRequirement, ...] |
Field(default=(), max_length=WORK_CONTRACT_MAX_EVIDENCE_REQUIREMENTS) |
verifier |
CompletionVerifierRef |
required |
result_resolver |
CompletionResultResolverRef |
required |
continuation_policy |
CompletionContinuationPolicy |
Field(default_factory=CompletionContinuationPolicy) |
fingerprint |
str |
required |
validate_contract_id (method)
Section titled “validate_contract_id (method)”WorkContract.validate_contract_id(value: str) -> strvalidate_objective (method)
Section titled “validate_objective (method)”WorkContract.validate_objective(value: str) -> strcopy_nested_model (method)
Section titled “copy_nested_model (method)”WorkContract.copy_nested_model(value: object) -> objectcopy_criteria (method)
Section titled “copy_criteria (method)”WorkContract.copy_criteria(value: object) -> objectcopy_constraints (method)
Section titled “copy_constraints (method)”WorkContract.copy_constraints(value: object) -> objectcopy_evidence_requirements (method)
Section titled “copy_evidence_requirements (method)”WorkContract.copy_evidence_requirements(value: object) -> objectvalidate_contract_definition (method)
Section titled “validate_contract_definition (method)”WorkContract.validate_contract_definition() -> WorkContractDraftvalidate_fingerprint_format (method)
Section titled “validate_fingerprint_format (method)”WorkContract.validate_fingerprint_format(value: str) -> strvalidate_fingerprint_matches_definition (method)
Section titled “validate_fingerprint_matches_definition (method)”WorkContract.validate_fingerprint_matches_definition() -> WorkContractreference (method)
Section titled “reference (method)”WorkContract.reference() -> WorkContractRefRelease source · Runtime guarantees · Capability guides
WorkContractConflict
Section titled “WorkContractConflict”from cayu.tasks import WorkContractConflictA stable work-contract identity is already bound to different content.
Bases: ValueError.
This type’s implementation and inherited behavior are available in the linked release source.
Release source · Runtime guarantees · Capability guides
WorkContractDraft
Section titled “WorkContractDraft”from cayu.tasks import WorkContractDraftBases: FrozenWorkContractModel.
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 |
|---|---|---|
contract_id |
str |
required |
version |
StrictInt |
Field(ge=1) |
supersedes |
WorkContractRef | None |
None |
objective |
str |
required |
criteria |
tuple[WorkCriterion, ...] |
Field(min_length=1, max_length=WORK_CONTRACT_MAX_CRITERIA) |
constraints |
tuple[WorkConstraint, ...] |
Field(default=(), max_length=WORK_CONTRACT_MAX_CONSTRAINTS) |
evidence_requirements |
tuple[WorkEvidenceRequirement, ...] |
Field(default=(), max_length=WORK_CONTRACT_MAX_EVIDENCE_REQUIREMENTS) |
verifier |
CompletionVerifierRef |
required |
result_resolver |
CompletionResultResolverRef |
required |
continuation_policy |
CompletionContinuationPolicy |
Field(default_factory=CompletionContinuationPolicy) |
validate_contract_id (method)
Section titled “validate_contract_id (method)”WorkContractDraft.validate_contract_id(value: str) -> strvalidate_objective (method)
Section titled “validate_objective (method)”WorkContractDraft.validate_objective(value: str) -> strcopy_nested_model (method)
Section titled “copy_nested_model (method)”WorkContractDraft.copy_nested_model(value: object) -> objectcopy_criteria (method)
Section titled “copy_criteria (method)”WorkContractDraft.copy_criteria(value: object) -> objectcopy_constraints (method)
Section titled “copy_constraints (method)”WorkContractDraft.copy_constraints(value: object) -> objectcopy_evidence_requirements (method)
Section titled “copy_evidence_requirements (method)”WorkContractDraft.copy_evidence_requirements(value: object) -> objectvalidate_contract_definition (method)
Section titled “validate_contract_definition (method)”WorkContractDraft.validate_contract_definition() -> WorkContractDraftRelease source · Runtime guarantees · Capability guides
WorkContractRef
Section titled “WorkContractRef”from cayu.tasks import WorkContractRefBases: FrozenWorkContractModel.
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 |
|---|---|---|
contract_id |
str |
required |
version |
StrictInt |
Field(ge=1) |
fingerprint |
str |
required |
validate_contract_id (method)
Section titled “validate_contract_id (method)”WorkContractRef.validate_contract_id(value: str) -> strvalidate_fingerprint (method)
Section titled “validate_fingerprint (method)”WorkContractRef.validate_fingerprint(value: str) -> strRelease source · Runtime guarantees · Capability guides
WorkCriterion
Section titled “WorkCriterion”from cayu.tasks import WorkCriterionBases: FrozenWorkContractModel.
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 |
|---|---|---|
criterion_id |
str |
required |
ordinal |
StrictInt |
Field(ge=1, le=WORK_CONTRACT_MAX_CRITERIA) |
description |
str |
required |
evidence_requirement_ids |
tuple[str, ...] |
Field(default=(), max_length=WORK_CONTRACT_MAX_EVIDENCE_REQUIREMENTS) |
validate_criterion_id (method)
Section titled “validate_criterion_id (method)”WorkCriterion.validate_criterion_id(value: str) -> strvalidate_description (method)
Section titled “validate_description (method)”WorkCriterion.validate_description(value: str) -> strvalidate_evidence_requirement_ids (method)
Section titled “validate_evidence_requirement_ids (method)”WorkCriterion.validate_evidence_requirement_ids(value: tuple[str, ...]) -> tuple[str, ...]Release source · Runtime guarantees · Capability guides
WorkEvidenceReference
Section titled “WorkEvidenceReference”from cayu.tasks import WorkEvidenceReferenceBases: FrozenWorkContractModel.
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 |
|---|---|---|
kind |
str |
required |
reference_id |
str |
required |
requirement_id |
str | None |
None |
version |
str | None |
None |
digest |
str | None |
None |
available |
StrictBool |
True |
unavailable_reason |
str | None |
None |
validate_kind (method)
Section titled “validate_kind (method)”WorkEvidenceReference.validate_kind(value: str) -> strvalidate_reference_id (method)
Section titled “validate_reference_id (method)”WorkEvidenceReference.validate_reference_id(value: str) -> strvalidate_requirement_id (method)
Section titled “validate_requirement_id (method)”WorkEvidenceReference.validate_requirement_id(value: str | None) -> str | Nonevalidate_version (method)
Section titled “validate_version (method)”WorkEvidenceReference.validate_version(value: str | None) -> str | Nonevalidate_digest (method)
Section titled “validate_digest (method)”WorkEvidenceReference.validate_digest(value: str | None) -> str | Nonevalidate_unavailable_reason (method)
Section titled “validate_unavailable_reason (method)”WorkEvidenceReference.validate_unavailable_reason(value: str | None) -> str | Nonevalidate_availability (method)
Section titled “validate_availability (method)”WorkEvidenceReference.validate_availability() -> WorkEvidenceReferenceRelease source · Runtime guarantees · Capability guides
WorkEvidenceRequirement
Section titled “WorkEvidenceRequirement”from cayu.tasks import WorkEvidenceRequirementBases: FrozenWorkContractModel.
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 |
|---|---|---|
requirement_id |
str |
required |
kind |
str |
required |
description |
str |
required |
validate_requirement_id (method)
Section titled “validate_requirement_id (method)”WorkEvidenceRequirement.validate_requirement_id(value: str) -> strvalidate_kind (method)
Section titled “validate_kind (method)”WorkEvidenceRequirement.validate_kind(value: str) -> strvalidate_description (method)
Section titled “validate_description (method)”WorkEvidenceRequirement.validate_description(value: str) -> str