Skip to content

cayu.sessions.exports

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 SessionExportBoundary

Source-store positions captured together with every export-owned component.

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
event_sequences tuple[StrictInt, ...] required
through_sequence StrictInt Field(ge=0, le=MAX_DURABLE_JSON_INTEGER)
transcript_cursor StrictInt Field(ge=0, le=MAX_DURABLE_JSON_INTEGER)

Release source · Runtime guarantees · Capability guides

from cayu.sessions import SessionExportLimits

Explicit output ceilings; an oversized session is rejected, never truncated.

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
max_bytes StrictInt Field(default=64 * 1024 * 1024, ge=1, le=MAX_DURABLE_JSON_INTEGER)
max_record_bytes StrictInt Field(default=8 * 1024 * 1024, ge=1, le=MAX_DURABLE_JSON_INTEGER)

Release source · Runtime guarantees · Capability guides

from cayu.sessions import SessionExportSnapshot

Decorators: @dataclass(frozen=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
session Session required
events tuple[EventRecord, ...] required
transcript_records tuple[TranscriptRecord, ...] required
checkpoint dict[str, Any] | None required
deferred_interaction_input DeferredInteractionInput | None required
targeted_tool_grant_state TargetedToolGrantStateSnapshot required
boundary SessionExportBoundary required
SessionExportSnapshot.document() -> dict[str, Any]

Release source · Runtime guarantees · Capability guides

from cayu.sessions import SessionExportTooLarge

One session cannot be exported within the caller’s explicit byte bounds.

Bases: ValueError.

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

Release source · Runtime guarantees · Capability guides