Skip to content

cayu.egress.transitions

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.egress import advance_egress_authority_transition

Build the next legal revision without mutating the current record.

advance_egress_authority_transition(current: EgressAuthorityTransitionRecord, *, state: EgressAuthorityTransitionState, reason: str, receipt: EgressAuthorityCutoverReceipt | None=None, environment_fingerprint: str | None=None) -> EgressAuthorityTransitionRecord

Release source · Runtime guarantees · Capability guides

from cayu.egress import authorized_egress_authority_transition

Convert one trusted adopted profile decision into installation authority.

authorized_egress_authority_transition(*, decision: ExecutionProfileDecision, transition_id: str, environment_name: str, owner_fingerprint: str, source_environment_fingerprint: str) -> EgressAuthorityTransitionRecord

Release source · Runtime guarantees · Capability guides

from cayu.egress import egress_authority_owner_fingerprint

Commit a private worker ownership token without persisting it.

egress_authority_owner_fingerprint(owner_token: str) -> str

Release source · Runtime guarantees · Capability guides

EGRESS_AUTHORITY_TRANSITION_CHECKPOINT_KEY

Section titled “EGRESS_AUTHORITY_TRANSITION_CHECKPOINT_KEY”
from cayu.egress import EGRESS_AUTHORITY_TRANSITION_CHECKPOINT_KEY
EGRESS_AUTHORITY_TRANSITION_CHECKPOINT_KEY = 'cayu:egress_authority_transition'

Release source · Runtime guarantees · Capability guides

from cayu.egress import egress_authority_transition_events

Project bounded, deterministic, credential-free evidence for one revision.

egress_authority_transition_events(record: EgressAuthorityTransitionRecord) -> tuple[Event, ...]

Release source · Runtime guarantees · Capability guides

EGRESS_AUTHORITY_TRANSITION_SCHEMA_VERSION

Section titled “EGRESS_AUTHORITY_TRANSITION_SCHEMA_VERSION”
from cayu.egress import EGRESS_AUTHORITY_TRANSITION_SCHEMA_VERSION
EGRESS_AUTHORITY_TRANSITION_SCHEMA_VERSION = 3

Release source · Runtime guarantees · Capability guides

from cayu.egress import EgressAuthorityAdoptionHandler

Application-owned installer invoked by real profile admission.

The runtime passes the exact sealed decision produced by its profile policy. Implementations own their retained environment, private worker token, and transition identity. They must use the supplied coordinator to durably finish the corresponding transition; the runtime independently reloads and verifies ACTIVE before admission.

Bases: ABC.

async EgressAuthorityAdoptionHandler.adopt(decision: ExecutionProfileDecision, *, coordinator: EgressAuthorityTransitionCoordinator, expected_environment_fingerprint: str, factory_result: EnvironmentFactoryResult) -> EgressAuthorityAdoptionResult

Return proof for the exact retained pre-cutover environment.

Release source · Runtime guarantees · Capability guides

from cayu.egress import EgressAuthorityAdoptionResult

Runtime-owned handoff from backend cutover to invocation lifecycle.

The result remains owned by the application handler until the invocation claims it after durable admission. Claiming is single-use, so the exact factory result cannot be adopted by two invocations or cleaned twice.

EgressAuthorityAdoptionResult.__init__(*, transition: EgressAuthorityTransitionRecord, factory_result: EnvironmentFactoryResult, coordinator_authority: object, _token: object) -> None
EgressAuthorityAdoptionResult.environment()

Return the retained environment for runtime verification only.

Release source · Runtime guarantees · Capability guides

from cayu.egress import EgressAuthorityTransitionConflict

A stale worker attempted to advance a different transition revision.

Bases: RuntimeError.

This type’s implementation and inherited behavior are available in the linked release source.

Release source · Runtime guarantees · Capability guides

from cayu.egress import EgressAuthorityTransitionCoordinator

Install one authorized target and durably classify every outcome.

EgressAuthorityTransitionCoordinator.__init__(store: SessionCheckpointEgressAuthorityTransitionStore, *, expected_source_environment_fingerprint: str | None=None) -> None
async EgressAuthorityTransitionCoordinator.authorize(record: EgressAuthorityTransitionRecord) -> EgressAuthorityTransitionRecord
async EgressAuthorityTransitionCoordinator.install(*, authorized: EgressAuthorityTransitionRecord, adapter: SandboxEgressAdapter, request: EgressAuthorityCutoverRequest, owner_token: str) -> tuple[EgressAuthorityTransitionRecord, EgressAuthorityCutoverResult | None]
async EgressAuthorityTransitionCoordinator.reconcile(*, current: EgressAuthorityTransitionRecord, adapter: SandboxEgressAdapter, request: EgressAuthorityCutoverRequest, owner_token: str) -> EgressAuthorityTransitionRecord

Activate only exact backend proof; otherwise persist needs-attention.

Release source · Runtime guarantees · Capability guides

from cayu.egress import EgressAuthorityTransitionRecord

One reconstructable state in an egress-authority adoption lifecycle.

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
record_type Literal['cayu.egress-authority-transition'] 'cayu.egress-authority-transition'
schema_version Literal[3] EGRESS_AUTHORITY_TRANSITION_SCHEMA_VERSION
transition_id str Field(max_length=256)
session_id str Field(max_length=256)
environment_name str Field(max_length=256)
revision StrictInt Field(ge=1)
state EgressAuthorityTransitionState required
owner_fingerprint str required
expected_authority EgressAuthorityIdentity required
target_authority EgressAuthorityIdentity required
classification EgressAuthorityChangeKind required
policy_identity str Field(max_length=256)
actor ResolutionActor required
authorization_reason str Field(max_length=_TEXT_MAX_CHARS)
reason str Field(max_length=_TEXT_MAX_CHARS)
strategy EgressAuthorityCutoverStrategy required
source_environment_fingerprint str required
environment_fingerprint str | None None
receipt EgressAuthorityCutoverReceipt | None None
fingerprint str required
EgressAuthorityTransitionRecord.validate_identity_text(value: str, info) -> str
EgressAuthorityTransitionRecord.validate_reason(value: str) -> str
EgressAuthorityTransitionRecord.copy_actor(value: object) -> ResolutionActor
EgressAuthorityTransitionRecord.copy_authority(value: object) -> EgressAuthorityIdentity
EgressAuthorityTransitionRecord.copy_receipt(value: object) -> EgressAuthorityCutoverReceipt | None
EgressAuthorityTransitionRecord.validate_digest(value: str | None, info) -> str | None
EgressAuthorityTransitionRecord.validate_transition() -> EgressAuthorityTransitionRecord

Release source · Runtime guarantees · Capability guides

SessionCheckpointEgressAuthorityTransitionStore

Section titled “SessionCheckpointEgressAuthorityTransitionStore”
from cayu.egress import SessionCheckpointEgressAuthorityTransitionStore

CAS transition storage using every SessionStore’s atomic checkpoint seam.

SessionCheckpointEgressAuthorityTransitionStore.__init__(session_store: SessionStore, *, event_writer: RuntimeEventWriter | None=None) -> None
async SessionCheckpointEgressAuthorityTransitionStore.load(session_id: str) -> EgressAuthorityTransitionRecord | None
async SessionCheckpointEgressAuthorityTransitionStore.compare_and_set(*, expected: EgressAuthorityTransitionRecord | None, replacement: EgressAuthorityTransitionRecord) -> EgressAuthorityTransitionRecord

Release source · Runtime guarantees · Capability guides