Skip to content

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.

from cayu.verification import VerifiedTaskHandler

Deterministic, 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.

async VerifiedTaskHandler.prepare(context: VerifiedTaskPreparationContext) -> RunRequest
async VerifiedTaskHandler.propose(context: VerifiedTaskProposalContext) -> VerifiedTaskHandlerReport

Release source · Runtime guarantees · Capability guides

from cayu.verification import VerifiedTaskHandlerReport

Bases: BaseModel.

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
VerifiedTaskHandlerReport.copy_proposal(value: object) -> object

Release source · Runtime guarantees · Capability guides

from cayu.verification import VerifiedTaskPreparationContext

Detached application data, never a live queue or session lease.

Decorators: @dataclass(frozen=True, slots=True).

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

from cayu.verification import VerifiedTaskProposalContext

Explicit proposal coordinates after governed execution has quiesced.

Decorators: @dataclass(frozen=True, slots=True).

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

from cayu.verification import VerifiedTaskWorker
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) -> None
async VerifiedTaskWorker.run(stop: asyncio.Event | None=None, max_tasks: int | None=None) -> int
async VerifiedTaskWorker.aclose() -> None
async VerifiedTaskWorker.__aenter__() -> VerifiedTaskWorker
async VerifiedTaskWorker.__aexit__(*exc: object) -> None

Release source · Runtime guarantees · Capability guides

from cayu.verification import VerifiedTaskWorkerDraining

Owned 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.

Release source · Runtime guarantees · Capability guides