cayu.verification.verified_task_worker
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.
VerifiedTaskHandler
Section titled “VerifiedTaskHandler”from cayu.verification import VerifiedTaskHandlerDeterministic, read-only callbacks; retry may call either again.
Domain effects belong to the governed session. A final model message is neither this report nor a verifier decision.
Bases: ABC.
prepare (method)
Section titled “prepare (method)”async VerifiedTaskHandler.prepare(context: VerifiedTaskPreparationContext) -> RunRequestpropose (method)
Section titled “propose (method)”async VerifiedTaskHandler.propose(context: VerifiedTaskProposalContext) -> VerifiedTaskHandlerReportRelease source · Runtime guarantees · Capability guides
VerifiedTaskHandlerReport
Section titled “VerifiedTaskHandlerReport”from cayu.verification import VerifiedTaskHandlerReportBases: 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 |
|---|---|---|
proposal |
CompletionProposalCreate |
required |
copy_proposal (method)
Section titled “copy_proposal (method)”VerifiedTaskHandlerReport.copy_proposal(value: object) -> objectRelease source · Runtime guarantees · Capability guides
VerifiedTaskPreparationContext
Section titled “VerifiedTaskPreparationContext”from cayu.verification import VerifiedTaskPreparationContextDetached application data, never a live queue or session lease.
Decorators: @dataclass(frozen=True, slots=True).
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 |
Task |
required |
contract |
WorkContract |
required |
session_id |
str |
required |
Release source · Runtime guarantees · Capability guides
VerifiedTaskProposalContext
Section titled “VerifiedTaskProposalContext”from cayu.verification import VerifiedTaskProposalContextExplicit proposal coordinates after governed execution has quiesced.
Decorators: @dataclass(frozen=True, slots=True).
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 |
Task |
required |
contract |
WorkContract |
required |
attempt |
WorkAttempt |
required |
proposal_id |
str |
required |
Release source · Runtime guarantees · Capability guides
VerifiedTaskWorker
Section titled “VerifiedTaskWorker”from cayu.verification import VerifiedTaskWorkerinit (method)
Section titled “init (method)”VerifiedTaskWorker.__init__(app: CayuApp, handler: VerifiedTaskHandler, *, worker_id: str, query: TaskQuery | None=None, lease_seconds: int=300, poll_interval_s: float=1.0, max_elapsed_seconds: int=3600, callback_timeout_seconds: float=30.0) -> Nonerun (method)
Section titled “run (method)”async VerifiedTaskWorker.run(stop: asyncio.Event | None=None, max_tasks: int | None=None) -> intaclose (method)
Section titled “aclose (method)”async VerifiedTaskWorker.aclose() -> Noneaenter (method)
Section titled “aenter (method)”async VerifiedTaskWorker.__aenter__() -> VerifiedTaskWorkeraexit (method)
Section titled “aexit (method)”async VerifiedTaskWorker.__aexit__(*exc: object) -> NoneRelease source · Runtime guarantees · Capability guides
VerifiedTaskWorkerDraining
Section titled “VerifiedTaskWorkerDraining”from cayu.verification import VerifiedTaskWorkerDrainingOwned work is still settling; retain the worker and retry aclose().
Bases: RuntimeError.
This type’s implementation and inherited behavior are available in the linked release source.