Skip to content

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.

from cayu.tasks import completion_gap_fingerprint
completion_gap_fingerprint(value: CompletionDecisionCreate) -> str

Release source · Runtime guarantees · Capability guides

from cayu.tasks import completion_result_sha256
completion_result_sha256(value: dict[str, object]) -> str

Release source · Runtime guarantees · Capability guides

from cayu.tasks import CompletionConstraintOutcome

Bases: _CompletionOutcome.

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
CompletionConstraintOutcome.validate_reason_code(value: str) -> str
CompletionConstraintOutcome.validate_summary(value: str | None) -> str | None
CompletionConstraintOutcome.copy_evidence_references(value: object) -> object
CompletionConstraintOutcome.validate_evidence_references(value: tuple[WorkEvidenceReference, ...]) -> tuple[WorkEvidenceReference, ...]
CompletionConstraintOutcome.validate_satisfaction_basis() -> _CompletionOutcome
CompletionConstraintOutcome.validate_constraint_id(value: str) -> str

Release source · Runtime guarantees · Capability guides

from cayu.tasks import CompletionContinuationPolicy

Bases: FrozenWorkContractModel.

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

from cayu.tasks import CompletionCriterionOutcome

Bases: _CompletionOutcome.

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
CompletionCriterionOutcome.validate_reason_code(value: str) -> str
CompletionCriterionOutcome.validate_summary(value: str | None) -> str | None
CompletionCriterionOutcome.copy_evidence_references(value: object) -> object
CompletionCriterionOutcome.validate_evidence_references(value: tuple[WorkEvidenceReference, ...]) -> tuple[WorkEvidenceReference, ...]
CompletionCriterionOutcome.validate_satisfaction_basis() -> _CompletionOutcome
CompletionCriterionOutcome.validate_criterion_id(value: str) -> str

Release source · Runtime guarantees · Capability guides

from cayu.tasks import CompletionDecision

Bases: CompletionDecisionCreate.

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
CompletionDecision.validate_identity(value: str, info) -> str
CompletionDecision.validate_decision_version_type(value: object) -> object
CompletionDecision.copy_verifier(value: object) -> object

validate_verifier_profile_fingerprint (method)

Section titled “validate_verifier_profile_fingerprint (method)”
CompletionDecision.validate_verifier_profile_fingerprint(value: str) -> str
CompletionDecision.copy_criterion_outcomes(value: object) -> object
CompletionDecision.copy_constraint_outcomes(value: object) -> object
CompletionDecision.copy_gaps(value: object) -> object
CompletionDecision.copy_evidence_references(value: object) -> object
CompletionDecision.validate_evidence_references(value: tuple[WorkEvidenceReference, ...]) -> tuple[WorkEvidenceReference, ...]
CompletionDecision.validate_verdict_shape() -> CompletionDecisionCreate
CompletionDecision.validate_parent_identity(value: str, info) -> str
CompletionDecision.validate_task_id(value: str) -> str
CompletionDecision.copy_contract(value: object) -> object
CompletionDecision.validate_digest(value: str, info) -> str
CompletionDecision.normalize_decided_at(value: datetime) -> datetime

Release source · Runtime guarantees · Capability guides

from cayu.tasks import CompletionDecisionApplicationRequest

Bases: FrozenWorkContractModel.

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
CompletionDecisionApplicationRequest.validate_identity(value: str, info) -> str
CompletionDecisionApplicationRequest.validate_task_id(value: str) -> str
CompletionDecisionApplicationRequest.validate_idempotency_key(value: str) -> str
CompletionDecisionApplicationRequest.copy_result(value: object) -> object
CompletionDecisionApplicationRequest.copy_result_reference(value: object) -> object
CompletionDecisionApplicationRequest.validate_result_binding() -> CompletionDecisionApplicationRequest

Release source · Runtime guarantees · Capability guides

from cayu.tasks import CompletionDecisionCreate

Bases: FrozenWorkContractModel.

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)
CompletionDecisionCreate.validate_identity(value: str, info) -> str
CompletionDecisionCreate.validate_decision_version_type(value: object) -> object
CompletionDecisionCreate.copy_verifier(value: object) -> object

validate_verifier_profile_fingerprint (method)

Section titled “validate_verifier_profile_fingerprint (method)”
CompletionDecisionCreate.validate_verifier_profile_fingerprint(value: str) -> str
CompletionDecisionCreate.copy_criterion_outcomes(value: object) -> object
CompletionDecisionCreate.copy_constraint_outcomes(value: object) -> object
CompletionDecisionCreate.copy_gaps(value: object) -> object
CompletionDecisionCreate.copy_evidence_references(value: object) -> object
CompletionDecisionCreate.validate_evidence_references(value: tuple[WorkEvidenceReference, ...]) -> tuple[WorkEvidenceReference, ...]
CompletionDecisionCreate.validate_verdict_shape() -> CompletionDecisionCreate

Release source · Runtime guarantees · Capability guides

from cayu.tasks import CompletionGap

Bases: FrozenWorkContractModel.

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
CompletionGap.validate_subject_id(value: str | None, info) -> str | None
CompletionGap.validate_code(value: str) -> str

validate_evidence_requirement_ids (method)

Section titled “validate_evidence_requirement_ids (method)”
CompletionGap.validate_evidence_requirement_ids(value: tuple[str, ...]) -> tuple[str, ...]
CompletionGap.validate_summary(value: str | None) -> str | None
CompletionGap.validate_exact_subject() -> CompletionGap
CompletionGap.subject_key() -> tuple[str, str]

Release source · Runtime guarantees · Capability guides

from cayu.tasks import CompletionProposal

Bases: CompletionProposalCreate.

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
CompletionProposal.validate_identity(value: str, info) -> str
CompletionProposal.copy_result(value: object) -> object
CompletionProposal.copy_evidence_references(value: object) -> object
CompletionProposal.validate_evidence_references(value: tuple[WorkEvidenceReference, ...]) -> tuple[WorkEvidenceReference, ...]
CompletionProposal.validate_proposal_size() -> CompletionProposalCreate
CompletionProposal.validate_task_id(value: str) -> str
CompletionProposal.copy_contract(value: object) -> object
CompletionProposal.validate_request_sha256(value: str) -> str
CompletionProposal.normalize_proposed_at(value: datetime) -> datetime

Release source · Runtime guarantees · Capability guides

from cayu.tasks import CompletionProposalCreate

Bases: FrozenWorkContractModel.

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)
CompletionProposalCreate.validate_identity(value: str, info) -> str
CompletionProposalCreate.copy_result(value: object) -> object
CompletionProposalCreate.copy_evidence_references(value: object) -> object
CompletionProposalCreate.validate_evidence_references(value: tuple[WorkEvidenceReference, ...]) -> tuple[WorkEvidenceReference, ...]
CompletionProposalCreate.validate_proposal_size() -> CompletionProposalCreate

Release source · Runtime guarantees · Capability guides

from cayu.tasks import CompletionRejectionAction

Bases: StrEnum.

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

from cayu.tasks import CompletionResultReference

Bases: FrozenWorkContractModel.

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
CompletionResultReference.validate_kind(value: str) -> str
CompletionResultReference.validate_reference_id(value: str) -> str
CompletionResultReference.validate_digest(value: str) -> str

Release source · Runtime guarantees · Capability guides

from cayu.tasks import CompletionResultResolverRef

Exact application-owned authority for reconstructing an accepted result.

Bases: FrozenWorkContractModel.

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
CompletionResultResolverRef.validate_identity(value: str, info) -> str

validate_configuration_fingerprint (method)

Section titled “validate_configuration_fingerprint (method)”
CompletionResultResolverRef.validate_configuration_fingerprint(value: str) -> str

Release source · Runtime guarantees · Capability guides

from cayu.tasks import CompletionSatisfactionBasis

Bases: StrEnum.

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

from cayu.tasks import CompletionVerdict

Bases: StrEnum.

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

from cayu.tasks import CompletionVerificationClaim

Bases: FrozenWorkContractModel.

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
CompletionVerificationClaim.validate_identity(value: str, info) -> str
CompletionVerificationClaim.validate_execution_owner_id(value: str | None) -> str | None
CompletionVerificationClaim.copy_verifier(value: object) -> object

validate_verifier_profile_fingerprint (method)

Section titled “validate_verifier_profile_fingerprint (method)”
CompletionVerificationClaim.validate_verifier_profile_fingerprint(value: str) -> str
CompletionVerificationClaim.validate_request_sha256(value: str) -> str
CompletionVerificationClaim.normalize_timestamps(value: datetime, info) -> datetime
CompletionVerificationClaim.validate_lease_window() -> CompletionVerificationClaim

Release source · Runtime guarantees · Capability guides

from cayu.tasks import CompletionVerificationClaimLost

A 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

from cayu.tasks import CompletionVerificationClaimRequest

Bases: FrozenWorkContractModel.

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)
CompletionVerificationClaimRequest.validate_identity(value: str, info) -> str
CompletionVerificationClaimRequest.validate_execution_owner_id(value: str | None) -> str | None
CompletionVerificationClaimRequest.copy_verifier(value: object) -> object

validate_verifier_profile_fingerprint (method)

Section titled “validate_verifier_profile_fingerprint (method)”
CompletionVerificationClaimRequest.validate_verifier_profile_fingerprint(value: str) -> str

validate_execution_timeout_within_lease (method)

Section titled “validate_execution_timeout_within_lease (method)”
CompletionVerificationClaimRequest.validate_execution_timeout_within_lease() -> CompletionVerificationClaimRequest

Release source · Runtime guarantees · Capability guides

from cayu.tasks import CompletionVerifierDecision

Verifier-owned outcome before Cayu binds durable decision authority.

Bases: FrozenWorkContractModel.

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)
CompletionVerifierDecision.copy_criterion_outcomes(value: object) -> object
CompletionVerifierDecision.copy_constraint_outcomes(value: object) -> object
CompletionVerifierDecision.copy_gaps(value: object) -> object
CompletionVerifierDecision.copy_evidence_references(value: object) -> object
CompletionVerifierDecision.validate_evidence_references(value: tuple[WorkEvidenceReference, ...]) -> tuple[WorkEvidenceReference, ...]
CompletionVerifierDecision.validate_verdict_shape() -> CompletionVerifierDecision

Release source · Runtime guarantees · Capability guides

from cayu.tasks import CompletionVerifierKind

Bases: StrEnum.

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

from cayu.tasks import CompletionVerifierRef

Bases: FrozenWorkContractModel.

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
CompletionVerifierRef.validate_identity(value: str, info) -> str

validate_configuration_fingerprint (method)

Section titled “validate_configuration_fingerprint (method)”
CompletionVerifierRef.validate_configuration_fingerprint(value: str) -> str

Release source · Runtime guarantees · Capability guides

from cayu.tasks import CriterionOutcomeStatus

Bases: StrEnum.

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

from cayu.tasks import TaskCompletionDecisionRequired

A 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

from cayu.tasks import work_contract_fingerprint
work_contract_fingerprint(contract: WorkContractDraft) -> str

Release source · Runtime guarantees · Capability guides

from cayu.tasks import work_contract_from_draft
work_contract_from_draft(draft: WorkContractDraft) -> WorkContract

Release source · Runtime guarantees · Capability guides

from cayu.tasks import WorkAttempt

Bases: WorkAttemptCreate.

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
WorkAttempt.validate_identity(value: str, info) -> str
WorkAttempt.validate_inherited_identity(value: str, info) -> str
WorkAttempt.validate_worker_id(value: str | None) -> str | None

validate_execution_profile_fingerprint (method)

Section titled “validate_execution_profile_fingerprint (method)”
WorkAttempt.validate_execution_profile_fingerprint(value: str) -> str
WorkAttempt.copy_contract(value: object) -> object
WorkAttempt.validate_request_sha256(value: str) -> str
WorkAttempt.normalize_started_at(value: datetime) -> datetime

Release source · Runtime guarantees · Capability guides

from cayu.tasks import WorkAttemptCreate

Bases: FrozenWorkContractModel.

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
WorkAttemptCreate.validate_identity(value: str, info) -> str
WorkAttemptCreate.validate_inherited_identity(value: str, info) -> str
WorkAttemptCreate.validate_worker_id(value: str | None) -> str | None

validate_execution_profile_fingerprint (method)

Section titled “validate_execution_profile_fingerprint (method)”
WorkAttemptCreate.validate_execution_profile_fingerprint(value: str) -> str
WorkAttemptCreate.copy_contract(value: object) -> object

Release source · Runtime guarantees · Capability guides

from cayu.tasks import WorkCompletionConflict

A 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

from cayu.tasks import WorkConstraint

Bases: FrozenWorkContractModel.

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)
WorkConstraint.validate_constraint_id(value: str) -> str
WorkConstraint.validate_description(value: str) -> str

validate_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

from cayu.tasks import WorkContract

Bases: WorkContractDraft.

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
WorkContract.validate_contract_id(value: str) -> str
WorkContract.validate_objective(value: str) -> str
WorkContract.copy_nested_model(value: object) -> object
WorkContract.copy_criteria(value: object) -> object
WorkContract.copy_constraints(value: object) -> object
WorkContract.copy_evidence_requirements(value: object) -> object
WorkContract.validate_contract_definition() -> WorkContractDraft
WorkContract.validate_fingerprint_format(value: str) -> str

validate_fingerprint_matches_definition (method)

Section titled “validate_fingerprint_matches_definition (method)”
WorkContract.validate_fingerprint_matches_definition() -> WorkContract
WorkContract.reference() -> WorkContractRef

Release source · Runtime guarantees · Capability guides

from cayu.tasks import WorkContractConflict

A 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

from cayu.tasks import WorkContractDraft

Bases: FrozenWorkContractModel.

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)
WorkContractDraft.validate_contract_id(value: str) -> str
WorkContractDraft.validate_objective(value: str) -> str
WorkContractDraft.copy_nested_model(value: object) -> object
WorkContractDraft.copy_criteria(value: object) -> object
WorkContractDraft.copy_constraints(value: object) -> object
WorkContractDraft.copy_evidence_requirements(value: object) -> object
WorkContractDraft.validate_contract_definition() -> WorkContractDraft

Release source · Runtime guarantees · Capability guides

from cayu.tasks import WorkContractRef

Bases: FrozenWorkContractModel.

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
WorkContractRef.validate_contract_id(value: str) -> str
WorkContractRef.validate_fingerprint(value: str) -> str

Release source · Runtime guarantees · Capability guides

from cayu.tasks import WorkCriterion

Bases: FrozenWorkContractModel.

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)
WorkCriterion.validate_criterion_id(value: str) -> str
WorkCriterion.validate_description(value: str) -> str

validate_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

from cayu.tasks import WorkEvidenceReference

Bases: FrozenWorkContractModel.

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
WorkEvidenceReference.validate_kind(value: str) -> str
WorkEvidenceReference.validate_reference_id(value: str) -> str
WorkEvidenceReference.validate_requirement_id(value: str | None) -> str | None
WorkEvidenceReference.validate_version(value: str | None) -> str | None
WorkEvidenceReference.validate_digest(value: str | None) -> str | None
WorkEvidenceReference.validate_unavailable_reason(value: str | None) -> str | None
WorkEvidenceReference.validate_availability() -> WorkEvidenceReference

Release source · Runtime guarantees · Capability guides

from cayu.tasks import WorkEvidenceRequirement

Bases: FrozenWorkContractModel.

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
WorkEvidenceRequirement.validate_requirement_id(value: str) -> str
WorkEvidenceRequirement.validate_kind(value: str) -> str
WorkEvidenceRequirement.validate_description(value: str) -> str

Release source · Runtime guarantees · Capability guides