cayu.memory.attribution
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.
MEMORY_ATTRIBUTION_VERSION
Section titled “MEMORY_ATTRIBUTION_VERSION”from cayu.memory import MEMORY_ATTRIBUTION_VERSIONMEMORY_ATTRIBUTION_VERSION = 'cayu.memory_attribution.v1'Release source · Runtime guarantees · Capability guides
MemoryAttribution
Section titled “MemoryAttribution”from cayu.memory import MemoryAttributionVersioned bounded projection of one session’s durable memory-use truth.
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.memory_attribution.v1'] |
MEMORY_ATTRIBUTION_VERSION |
status |
MemoryAttributionStatus |
required |
truncated |
StrictBool |
required |
reason |
MemoryAttributionUnavailableReason | None |
None |
observed_receipt_count |
StrictInt |
Field(ge=0, le=MEMORY_ATTRIBUTION_HARD_MAX_RECEIPTS) |
observed_exposure_count |
StrictInt |
Field(ge=0, le=MEMORY_ATTRIBUTION_HARD_MAX_EXPOSURES) |
observed_item_count |
StrictInt |
Field(ge=0, le=MAX_DURABLE_JSON_INTEGER) |
omitted_receipt_count_at_least |
StrictInt |
Field(ge=0, le=MAX_DURABLE_JSON_INTEGER) |
omitted_exposure_count_at_least |
StrictInt |
Field(ge=0, le=MAX_DURABLE_JSON_INTEGER) |
omitted_item_count_at_least |
StrictInt |
Field(ge=0, le=MAX_DURABLE_JSON_INTEGER) |
receipts |
tuple[MemoryRecallAttribution, ...] |
Field(default=(), max_length=MEMORY_ATTRIBUTION_HARD_MAX_RECEIPTS) |
exposures |
tuple[MemoryContextExposureAttribution, ...] |
Field(default=(), max_length=MEMORY_ATTRIBUTION_HARD_MAX_EXPOSURES) |
validate_state (method)
Section titled “validate_state (method)”MemoryAttribution.validate_state() -> SelfRelease source · Runtime guarantees · Capability guides
MemoryAttributionBounds
Section titled “MemoryAttributionBounds”from cayu.memory import MemoryAttributionBoundsGlobal bounds shared by every session in one evidence capture.
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 |
|---|---|---|
max_receipts |
StrictInt |
Field(default=MEMORY_ATTRIBUTION_DEFAULT_MAX_RECEIPTS, ge=1, le=MEMORY_ATTRIBUTION_HARD_MAX_RECEIPTS) |
max_exposures |
StrictInt |
Field(default=MEMORY_ATTRIBUTION_DEFAULT_MAX_EXPOSURES, ge=1, le=MEMORY_ATTRIBUTION_HARD_MAX_EXPOSURES) |
max_items |
StrictInt |
Field(default=MEMORY_ATTRIBUTION_DEFAULT_MAX_ITEMS, ge=1, le=MEMORY_ATTRIBUTION_HARD_MAX_ITEMS) |
max_source_bytes |
StrictInt |
Field(default=MEMORY_ATTRIBUTION_DEFAULT_MAX_SOURCE_BYTES, ge=1, le=MEMORY_ATTRIBUTION_HARD_MAX_SOURCE_BYTES) |
max_projection_bytes |
StrictInt |
Field(default=MEMORY_ATTRIBUTION_DEFAULT_MAX_PROJECTION_BYTES, ge=1, le=MEMORY_ATTRIBUTION_HARD_MAX_PROJECTION_BYTES) |
Release source · Runtime guarantees · Capability guides
MemoryAttributionStatus
Section titled “MemoryAttributionStatus”from cayu.memory import MemoryAttributionStatusTrust state of one session’s projected memory evidence.
Bases: 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' |
REDACTED |
class attribute |
'redacted' |
CONTRADICTORY |
class attribute |
'contradictory' |
Release source · Runtime guarantees · Capability guides
MemoryAttributionUnavailableReason
Section titled “MemoryAttributionUnavailableReason”from cayu.memory import MemoryAttributionUnavailableReasonStable reason memory attribution could not be represented.
Bases: 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 |
|---|---|---|
STORE_UNSUPPORTED |
class attribute |
'store_unsupported' |
EVIDENCE_READ_FAILED |
class attribute |
'evidence_read_failed' |
ALIAS_KEY_UNAVAILABLE |
class attribute |
'alias_key_unavailable' |
CONTRADICTORY_EVIDENCE |
class attribute |
'contradictory_evidence' |
Release source · Runtime guarantees · Capability guides
MemoryContextExposureAttribution
Section titled “MemoryContextExposureAttribution”from cayu.memory import MemoryContextExposureAttributionSecret-free structural and lifecycle facts from one context exposure.
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 |
|---|---|---|
exposure_alias |
MemoryEvidenceAlias |
required |
interaction_alias |
MemoryEvidenceAlias |
required |
projection_ordinal |
StrictInt |
Field(ge=0, lt=MEMORY_ATTRIBUTION_HARD_MAX_EXPOSURES) |
model_step_id |
str |
Field(max_length=MAX_MEMORY_EVIDENCE_ID_CHARS) |
model_attempt_id |
str |
Field(max_length=MAX_MEMORY_EVIDENCE_ID_CHARS) |
provider_attempt_id |
str |
Field(max_length=MAX_MEMORY_EVIDENCE_ID_CHARS) |
created_at |
datetime |
required |
updated_at |
datetime |
required |
state |
ContextExposureState |
required |
state_revision |
StrictInt |
Field(ge=0, le=MAX_DURABLE_JSON_INTEGER) |
provider_exposure_proven |
StrictBool |
required |
receipt_aliases |
tuple[MemoryEvidenceAlias, ...] |
Field(default=(), max_length=MAX_CONTEXT_EXPOSURE_RECEIPTS) |
contributor_count |
StrictInt |
Field(ge=0, le=MAX_CONTEXT_EXPOSURE_CONTRIBUTORS) |
transitions |
tuple[MemoryExposureTransitionAttribution, ...] |
Field(default=(), max_length=MAX_CONTEXT_EXPOSURE_TRANSITIONS) |
items |
tuple[MemoryExposureItemAttribution, ...] |
Field(default=(), max_length=MAX_RECALL_RECEIPT_ITEMS) |
items_truncated |
StrictBool |
False |
omitted_item_count_at_least |
StrictInt |
Field(ge=0, le=MAX_DURABLE_JSON_INTEGER) |
validate_attempt_ids (method)
Section titled “validate_attempt_ids (method)”MemoryContextExposureAttribution.validate_attempt_ids(value: str, info: Any) -> strnormalize_timestamps (method)
Section titled “normalize_timestamps (method)”MemoryContextExposureAttribution.normalize_timestamps(value: datetime, info: Any) -> datetimevalidate_structure (method)
Section titled “validate_structure (method)”MemoryContextExposureAttribution.validate_structure() -> SelfRelease source · Runtime guarantees · Capability guides
MemoryEvidenceAlias
Section titled “MemoryEvidenceAlias”from cayu.memory import MemoryEvidenceAliasA domain- and session-scoped HMAC alias for a private durable identity.
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 |
|---|---|---|
algorithm |
Literal['hmac-sha256'] |
'hmac-sha256' |
key_id |
str |
Field(max_length=64) |
kind |
Literal['receipt', 'exposure', 'item', 'interaction'] |
required |
digest |
str |
Field(min_length=64, max_length=64) |
validate_key_id (method)
Section titled “validate_key_id (method)”MemoryEvidenceAlias.validate_key_id(value: str) -> strvalidate_digest (method)
Section titled “validate_digest (method)”MemoryEvidenceAlias.validate_digest(value: str) -> strRelease source · Runtime guarantees · Capability guides
MemoryExposureItemAttribution
Section titled “MemoryExposureItemAttribution”from cayu.memory import MemoryExposureItemAttributionBases: 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 |
|---|---|---|
item_alias |
MemoryEvidenceAlias |
required |
receipt_alias |
MemoryEvidenceAlias |
required |
ordinal |
StrictInt |
Field(ge=0, lt=MAX_RECALL_RECEIPT_ITEMS) |
receipt_item_ordinal |
StrictInt |
Field(ge=0, lt=MAX_RECALL_RECEIPT_ITEMS) |
admission |
RecallItemAdmission |
required |
selection_reason |
RecallItemSelectionReason |
required |
validate_structure (method)
Section titled “validate_structure (method)”MemoryExposureItemAttribution.validate_structure() -> SelfRelease source · Runtime guarantees · Capability guides
MemoryExposureTransitionAttribution
Section titled “MemoryExposureTransitionAttribution”from cayu.memory import MemoryExposureTransitionAttributionBases: 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 |
|---|---|---|
revision |
StrictInt |
Field(ge=0, lt=MAX_CONTEXT_EXPOSURE_TRANSITIONS) |
state |
ContextExposureState |
required |
occurred_at |
datetime |
required |
evidence_kind |
ContextExposureEvidenceKind |
required |
normalize_occurred_at (method)
Section titled “normalize_occurred_at (method)”MemoryExposureTransitionAttribution.normalize_occurred_at(value: datetime) -> datetimevalidate_evidence_kind (method)
Section titled “validate_evidence_kind (method)”MemoryExposureTransitionAttribution.validate_evidence_kind() -> SelfRelease source · Runtime guarantees · Capability guides
MemoryRecallAttribution
Section titled “MemoryRecallAttribution”from cayu.memory import MemoryRecallAttributionSecret-free structural facts from one recall receipt.
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 |
|---|---|---|
receipt_alias |
MemoryEvidenceAlias |
required |
interaction_alias |
MemoryEvidenceAlias |
required |
projection_ordinal |
StrictInt |
Field(ge=0, lt=MEMORY_ATTRIBUTION_HARD_MAX_RECEIPTS) |
model_step_id |
str |
Field(max_length=MAX_MEMORY_EVIDENCE_ID_CHARS) |
created_at |
datetime |
required |
inspected_count |
StrictInt |
Field(ge=0, le=MAX_DURABLE_JSON_INTEGER) |
eligible_count |
StrictInt |
Field(ge=0, le=MAX_DURABLE_JSON_INTEGER) |
admitted_count |
StrictInt |
Field(ge=0, le=MAX_DURABLE_JSON_INTEGER) |
offered_count |
StrictInt |
Field(ge=0, le=MAX_DURABLE_JSON_INTEGER) |
silent_count |
StrictInt |
Field(ge=0, le=MAX_DURABLE_JSON_INTEGER) |
omitted_count |
StrictInt |
Field(ge=0, le=MAX_DURABLE_JSON_INTEGER) |
complete_source_count |
StrictInt |
Field(ge=0, le=MAX_DURABLE_JSON_INTEGER) |
partial_source_count |
StrictInt |
Field(ge=0, le=MAX_DURABLE_JSON_INTEGER) |
unavailable_source_count |
StrictInt |
Field(ge=0, le=MAX_DURABLE_JSON_INTEGER) |
failed_source_count |
StrictInt |
Field(ge=0, le=MAX_DURABLE_JSON_INTEGER) |
truncated |
StrictBool |
required |
items |
tuple[MemoryRecallItemAttribution, ...] |
Field(default=(), max_length=MAX_RECALL_RECEIPT_ITEMS) |
items_truncated |
StrictBool |
False |
omitted_item_count_at_least |
StrictInt |
Field(ge=0, le=MAX_DURABLE_JSON_INTEGER) |
validate_model_step_id (method)
Section titled “validate_model_step_id (method)”MemoryRecallAttribution.validate_model_step_id(value: str) -> strnormalize_created_at (method)
Section titled “normalize_created_at (method)”MemoryRecallAttribution.normalize_created_at(value: datetime) -> datetimevalidate_structure (method)
Section titled “validate_structure (method)”MemoryRecallAttribution.validate_structure() -> SelfRelease source · Runtime guarantees · Capability guides
MemoryRecallItemAttribution
Section titled “MemoryRecallItemAttribution”from cayu.memory import MemoryRecallItemAttributionBases: 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 |
|---|---|---|
item_alias |
MemoryEvidenceAlias |
required |
ordinal |
StrictInt |
Field(ge=0, lt=MAX_RECALL_RECEIPT_ITEMS) |
admission |
RecallItemAdmission |
required |
selection_reason |
RecallItemSelectionReason |
required |
validate_structure (method)
Section titled “validate_structure (method)”MemoryRecallItemAttribution.validate_structure() -> Self