cayu.external_waits
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.
ExternalEventWaits
Section titled “ExternalEventWaits”from cayu import ExternalEventWaitsinit (method)
Section titled “init (method)”ExternalEventWaits.__init__(*, store: SessionStore, access_policy: ExternalWaitAccessPolicy, limits: ExternalWaitLimits | None=None, redactor: SecretRedactor | None=None, projectors: Mapping[tuple[str, int], ExternalWaitProjector] | None=None) -> Nonereserve_correlation (method)
Section titled “reserve_correlation (method)”async ExternalEventWaits.reserve_correlation(request: ExternalCorrelationRequest, *, context: ExternalWaitContext) -> ExternalCorrelationregister (method)
Section titled “register (method)”async ExternalEventWaits.register(registration: ExternalWaitRegistration, *, context: ExternalWaitContext) -> ExternalWaitSnapshotdeliver (method)
Section titled “deliver (method)”async ExternalEventWaits.deliver(delivery: ExternalEventDelivery, *, context: ExternalWaitContext) -> ExternalDeliveryReceiptproject (method)
Section titled “project (method)”async ExternalEventWaits.project(registration: ExternalWaitRegistration, *, context: ExternalWaitContext) -> ExternalWaitSnapshotFreeze result input once; replay never reruns a previously committed projector.
cancel (method)
Section titled “cancel (method)”async ExternalEventWaits.cancel(correlation: ExternalCorrelation, *, operation_key: str, context: ExternalWaitContext) -> ExternalWaitSnapshotobserve (method)
Section titled “observe (method)”async ExternalEventWaits.observe(correlation: ExternalCorrelation, *, context: ExternalWaitContext) -> ExternalWaitSnapshotlookup (method)
Section titled “lookup (method)”async ExternalEventWaits.lookup(request: ExternalCorrelationRequest, *, context: ExternalWaitContext) -> ExternalWaitSnapshot | Noneinspect (method)
Section titled “inspect (method)”async ExternalEventWaits.inspect(correlation: ExternalCorrelation, *, context: ExternalWaitContext) -> ExternalWaitSnapshotlist (method)
Section titled “list (method)”async ExternalEventWaits.list(*, scope: ExternalWaitScope, source: str, context: ExternalWaitContext, after: str='', limit: int=EXTERNAL_WAIT_PAGE_SIZE) -> tuple[ExternalWaitSnapshot, ...]retire_scope (method)
Section titled “retire_scope (method)”async ExternalEventWaits.retire_scope(scope: ExternalWaitScope, *, operation_key: str, context: ExternalWaitContext) -> ExternalWaitRetirementFence a terminal generation permanently; requires scope-wide authority.
The policy receives source=“*” and action=“retire”. Unresolved runtime or timer handoffs reject retirement without changing any records.
prune_retired_scope (method)
Section titled “prune_retired_scope (method)”async ExternalEventWaits.prune_retired_scope(retirement: ExternalWaitRetirement, *, context: ExternalWaitContext, limit: int=EXTERNAL_WAIT_PAGE_SIZE) -> ExternalWaitPruneResultRemove a bounded terminal page, retaining the exact retirement tombstone.
Retrying after acknowledgement loss may prune the next page. This is maintenance progress, not a replayable per-record deletion receipt.
observe_page (method)
Section titled “observe_page (method)”async ExternalEventWaits.observe_page(*, scope: ExternalWaitScope, source: str, context: ExternalWaitContext, after: str='', limit: int=EXTERNAL_WAIT_PAGE_SIZE) -> tuple[ExternalWaitSnapshot, ...]Elect due outcomes in a bounded page using the native owner clock.
Each item commits separately. Resume from the last returned correlation key; interrupted pages are safe to repeat. No worker starts implicitly.
aclose (method)
Section titled “aclose (method)”async ExternalEventWaits.aclose(*, timeout_s: float=10.0) -> boolRelease source · Runtime guarantees · Capability guides
ExternalWaitAccessPolicy
Section titled “ExternalWaitAccessPolicy”from cayu import ExternalWaitAccessPolicyBases: ABC.
authorize (method)
Section titled “authorize (method)”ExternalWaitAccessPolicy.authorize(context: ExternalWaitContext, *, scope: ExternalWaitScope, source: str, action: ExternalWaitAction) -> boolReturn exactly True to grant this operation; perform no external effects.
Release source · Runtime guarantees · Capability guides
ExternalWaitAction
Section titled “ExternalWaitAction”from cayu import ExternalWaitActionExternalWaitAction = Literal['reserve', 'register', 'deliver', 'read', 'cancel', 'service', 'retire', 'cleanup']Release source · Runtime guarantees · Capability guides
ExternalWaitContext
Section titled “ExternalWaitContext”from cayu import ExternalWaitContextPrincipal supplied by the trusted SDK host, never decoded from a webhook.
Bases: _Value.
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 |
|---|---|---|
principal |
Identifier |
required |
clean_strings (method)
Section titled “clean_strings (method)”ExternalWaitContext.clean_strings(value: object) -> objectRelease source · Runtime guarantees · Capability guides
ExternalWaitProjector
Section titled “ExternalWaitProjector”from cayu import ExternalWaitProjectorBases: ABC.
project (method)
Section titled “project (method)”ExternalWaitProjector.project(outcome: ExternalWaitOutcome) -> strReturn deterministic bounded JSON; no side effects or execution authority.
Release source · Runtime guarantees · Capability guides
ExternalWaitSnapshot
Section titled “ExternalWaitSnapshot”from cayu import ExternalWaitSnapshotBases: _Value.
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 |
|---|---|---|
correlation |
ExternalCorrelation |
required |
registration |
ExternalWaitRegistration | None |
required |
revision |
int |
required |
outcome |
ExternalWaitOutcome | None |
required |
handoff |
Literal['unbound', 'pending', 'settled', 'excluded'] |
required |
pending_handoff |
bool |
required |
execution_excluded |
bool |
required |
retirement_requested |
bool |
required |
timer_published |
bool |
required |
pending_timer |
bool |
required |
projection_json |
str | None |
None |
clean_strings (method)
Section titled “clean_strings (method)”ExternalWaitSnapshot.clean_strings(value: object) -> objectRelease source · Runtime guarantees · Capability guides
JsonExternalWaitProjector
Section titled “JsonExternalWaitProjector”from cayu import JsonExternalWaitProjectorBases: ExternalWaitProjector.
project (method)
Section titled “project (method)”JsonExternalWaitProjector.project(outcome: ExternalWaitOutcome) -> str