Skip to content

cayu.sessions.execution

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.sessions import SessionExecutionConfig

Bounded independent heartbeat: one small write per 15s, a 60s lease by default.

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
heartbeat_interval_seconds float Field(default=15.0, ge=0.05, le=300)
lease_seconds float Field(default=60.0, ge=0.15, le=1200)
owner_label str | None Field(default=None, min_length=1, max_length=128)
SessionExecutionConfig.validate_interval()
SessionExecutionConfig.validate_label(value)

Release source · Runtime guarantees · Capability guides

from cayu.sessions import SessionExecutionState

Content-free liveness evaluated by the store clock; reading never renews it.

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
schema_version Literal[1] 1
session_id str required
state Literal['executing', 'idle', 'waiting', 'owner_lost', 'terminal', 'unknown'] required
owner_kind ExecutionOwnerKind | None None
owner_id str | None None
owner_label str | None None
local_owner bool False
run_epoch int Field(ge=0)
operation_id str | None None
claimed_at datetime | None None
heartbeat_at datetime | None None
lease_expires_at datetime | None None
last_progress_at datetime | None None
last_progress_kind ExecutionProgressKind | None None
SessionExecutionState.aware(value)

Release source · Runtime guarantees · Capability guides