cayu.sessions.child_context
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.
CHILD_SESSION_CONTEXT_PROJECTION_VERSION
Section titled “CHILD_SESSION_CONTEXT_PROJECTION_VERSION”from cayu.sessions import CHILD_SESSION_CONTEXT_PROJECTION_VERSIONCHILD_SESSION_CONTEXT_PROJECTION_VERSION = 'cayu.child-session-context.v1'Release source · Runtime guarantees · Capability guides
CHILD_SESSION_PUBLIC_ALIAS_MAX_CHARS
Section titled “CHILD_SESSION_PUBLIC_ALIAS_MAX_CHARS”from cayu.sessions import CHILD_SESSION_PUBLIC_ALIAS_MAX_CHARSCHILD_SESSION_PUBLIC_ALIAS_MAX_CHARS = 256Release source · Runtime guarantees · Capability guides
CHILD_SESSION_PUBLIC_OCCURRENCE_ID_MAX_CHARS
Section titled “CHILD_SESSION_PUBLIC_OCCURRENCE_ID_MAX_CHARS”from cayu.sessions import CHILD_SESSION_PUBLIC_OCCURRENCE_ID_MAX_CHARSCHILD_SESSION_PUBLIC_OCCURRENCE_ID_MAX_CHARS = 128Release source · Runtime guarantees · Capability guides
CHILD_SESSION_RESULT_REFERENCE_VERSION
Section titled “CHILD_SESSION_RESULT_REFERENCE_VERSION”from cayu.sessions import CHILD_SESSION_RESULT_REFERENCE_VERSIONCHILD_SESSION_RESULT_REFERENCE_VERSION = 'cayu.child-session-result-reference.v1'Release source · Runtime guarantees · Capability guides
ChildSessionContextContribution
Section titled “ChildSessionContextContribution”from cayu.sessions import ChildSessionContextContributionInternal composition result kept separate from durable transcript messages.
Bases: BaseModel.
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 |
|---|---|---|
projection |
ChildSessionContextProjection | None |
None |
message |
Message | None |
None |
stage_binding |
ChildSessionNotificationStageBinding | None |
None |
validate_contribution (method)
Section titled “validate_contribution (method)”ChildSessionContextContribution.validate_contribution() -> ChildSessionContextContributionRelease source · Runtime guarantees · Capability guides
ChildSessionContextContributor
Section titled “ChildSessionContextContributor”from cayu.sessions import ChildSessionContextContributorProject current direct-child state after transcript context selection.
The contributor stores no child lifecycle truth. Terminal freshness is consumed only when the owning model stage crosses Cayu’s durable dispatch fence; nonterminal state remains a current level-triggered snapshot.
Decorators: @dataclass(frozen=True, slots=True, kw_only=True).
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 |
|---|---|---|
max_children_inspected |
int |
CHILD_SESSION_NOTIFICATION_DEFAULT_CHILDREN_INSPECTED |
max_entries |
int |
CHILD_SESSION_NOTIFICATION_DEFAULT_ENTRIES |
max_projection_bytes |
int |
CHILD_SESSION_NOTIFICATION_DEFAULT_PROJECTION_BYTES |
configuration_material (method)
Section titled “configuration_material (method)”ChildSessionContextContributor.configuration_material() -> dict[str, Any]build (method)
Section titled “build (method)”async ChildSessionContextContributor.build(*, session_store: SessionStore, session: Session) -> ChildSessionContextContributionRelease source · Runtime guarantees · Capability guides
ChildSessionContextCoverage
Section titled “ChildSessionContextCoverage”from cayu.sessions import ChildSessionContextCoverageBases: BaseModel.
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 |
|---|---|---|
state |
ChildSessionContextCoverageState |
required |
inspected_child_count |
StrictInt |
Field(ge=0, le=CHILD_SESSION_NOTIFICATION_MAX_CHILDREN_INSPECTED) |
rendered_entry_count |
StrictInt |
Field(ge=0, le=min(CHILD_SESSION_NOTIFICATION_MAX_ENTRIES, CHILD_SESSION_NOTIFICATION_MAX_RETRIEVAL_REFERENCES)) |
unavailable_child_count |
StrictInt |
Field(ge=0, le=CHILD_SESSION_NOTIFICATION_MAX_CHILDREN_INSPECTED) |
more_children |
StrictBool |
False |
reasons |
tuple[ChildSessionContextTruncationReason, ...] |
() |
validate_coverage (method)
Section titled “validate_coverage (method)”ChildSessionContextCoverage.validate_coverage() -> ChildSessionContextCoverageRelease source · Runtime guarantees · Capability guides
ChildSessionContextCoverageState
Section titled “ChildSessionContextCoverageState”from cayu.sessions import ChildSessionContextCoverageStateBases: StrEnum.
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 |
|---|---|---|
COMPLETE |
class attribute |
'complete' |
TRUNCATED |
class attribute |
'truncated' |
UNAVAILABLE |
class attribute |
'unavailable' |
Release source · Runtime guarantees · Capability guides
ChildSessionContextEntry
Section titled “ChildSessionContextEntry”from cayu.sessions import ChildSessionContextEntrySecret-free lifecycle state rendered to the parent model.
Bases: BaseModel.
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 |
|---|---|---|
parent_session_id |
str |
Field(max_length=CHILD_SESSION_PUBLIC_ALIAS_MAX_CHARS) |
child_session_id |
str |
Field(max_length=CHILD_SESSION_PUBLIC_ALIAS_MAX_CHARS) |
relationship |
ChildSessionRelationship |
required |
state |
ChildSessionLifecycleState |
required |
occurrence |
ChildSessionContextOccurrence |
required |
freshness |
Literal['current', 'fresh'] |
required |
terminal_result_available |
StrictBool |
required |
result_reference |
ChildSessionResultReference | None |
None |
validate_identity (method)
Section titled “validate_identity (method)”ChildSessionContextEntry.validate_identity(value: str, info: Any) -> strvalidate_terminal_result (method)
Section titled “validate_terminal_result (method)”ChildSessionContextEntry.validate_terminal_result() -> ChildSessionContextEntryRelease source · Runtime guarantees · Capability guides
ChildSessionContextOccurrence
Section titled “ChildSessionContextOccurrence”from cayu.sessions import ChildSessionContextOccurrenceBases: BaseModel.
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 |
|---|---|---|
id |
str |
Field(max_length=CHILD_SESSION_PUBLIC_OCCURRENCE_ID_MAX_CHARS) |
source |
ChildSessionLifecycleOccurrenceSource |
required |
source_type |
str |
Field(max_length=_PUBLIC_SOURCE_TYPE_MAX_CHARS) |
source_sequence |
StrictInt | None |
Field(default=None, ge=1) |
validate_occurrence_id (method)
Section titled “validate_occurrence_id (method)”ChildSessionContextOccurrence.validate_occurrence_id(value: str) -> strvalidate_identity (method)
Section titled “validate_identity (method)”ChildSessionContextOccurrence.validate_identity(value: str, info: Any) -> strRelease source · Runtime guarantees · Capability guides
ChildSessionContextProjection
Section titled “ChildSessionContextProjection”from cayu.sessions import ChildSessionContextProjectionOne versioned, bounded, secret-free model-facing projection.
Bases: BaseModel.
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 |
|---|---|---|
schema_version |
Literal['cayu.child-session-context.v1'] |
CHILD_SESSION_CONTEXT_PROJECTION_VERSION |
parent_session_id |
str |
Field(max_length=CHILD_SESSION_PUBLIC_ALIAS_MAX_CHARS) |
consumption_scope |
Literal['parent_session_instance'] |
'parent_session_instance' |
entries |
tuple[ChildSessionContextEntry, ...] |
() |
coverage |
ChildSessionContextCoverage |
required |
authority_notice |
Literal['notification and retrieval references do not grant tools, workspace, credentials, budgets, or external effects'] |
'notification and retrieval references do not grant tools, workspace, credentials, budgets, or external effects' |
validate_parent_session_id (method)
Section titled “validate_parent_session_id (method)”ChildSessionContextProjection.validate_parent_session_id(value: str) -> strcopy_entries (method)
Section titled “copy_entries (method)”ChildSessionContextProjection.copy_entries(value: Any) -> tuple[ChildSessionContextEntry, ...]validate_projection (method)
Section titled “validate_projection (method)”ChildSessionContextProjection.validate_projection() -> ChildSessionContextProjectionRelease source · Runtime guarantees · Capability guides
ChildSessionContextTruncationReason
Section titled “ChildSessionContextTruncationReason”from cayu.sessions import ChildSessionContextTruncationReasonBases: StrEnum.
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 |
|---|---|---|
CHILD_INSPECTION_LIMIT |
class attribute |
'child_inspection_limit' |
ENTRY_LIMIT |
class attribute |
'entry_limit' |
PROJECTION_BYTE_LIMIT |
class attribute |
'projection_byte_limit' |
SOURCE_OCCURRENCE_UNAVAILABLE |
class attribute |
'source_occurrence_unavailable' |
Release source · Runtime guarantees · Capability guides
ChildSessionResultReference
Section titled “ChildSessionResultReference”from cayu.sessions import ChildSessionResultReferencePublic, non-authorizing locator for a separately authorized bounded read.
Bases: BaseModel.
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 |
|---|---|---|
schema_version |
Literal['cayu.child-session-result-reference.v1'] |
CHILD_SESSION_RESULT_REFERENCE_VERSION |
resolver |
Literal['child_session_result'] |
'child_session_result' |
child_session_id |
str |
Field(max_length=CHILD_SESSION_PUBLIC_ALIAS_MAX_CHARS) |
terminal_occurrence_id |
str |
Field(max_length=CHILD_SESSION_PUBLIC_OCCURRENCE_ID_MAX_CHARS) |
validate_child_session_id (method)
Section titled “validate_child_session_id (method)”ChildSessionResultReference.validate_child_session_id(value: str) -> strvalidate_terminal_occurrence_id (method)
Section titled “validate_terminal_occurrence_id (method)”ChildSessionResultReference.validate_terminal_occurrence_id(value: str) -> str