cayu.knowledge.publication_contracts
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.
KnowledgePublicationConflict
Section titled “KnowledgePublicationConflict”from cayu.storage import KnowledgePublicationConflictAn idempotent knowledge publication conflicts with durable state.
Bases: RuntimeError.
init (method)
Section titled “init (method)”KnowledgePublicationConflict.__init__(reason: str) -> NoneRelease source · Runtime guarantees · Capability guides
KnowledgePublicationReceipt
Section titled “KnowledgePublicationReceipt”from cayu.storage import KnowledgePublicationReceiptBounded immutable evidence for one atomic entry-and-chunks publication.
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 |
|---|---|---|
operation_id |
str |
Field(max_length=256) |
entry_id |
str |
required |
entry_revision |
int |
required |
expected_revision |
int | None |
required |
request_sha256 |
str |
required |
entry_created_at |
datetime |
required |
entry_updated_at |
datetime |
required |
committed_at |
datetime |
required |
replayed |
bool |
False |
validate_clean_ids (method)
Section titled “validate_clean_ids (method)”KnowledgePublicationReceipt.validate_clean_ids(value: str, info) -> strvalidate_entry_id (method)
Section titled “validate_entry_id (method)”KnowledgePublicationReceipt.validate_entry_id(value: str) -> strvalidate_request_sha256 (method)
Section titled “validate_request_sha256 (method)”KnowledgePublicationReceipt.validate_request_sha256(value: str) -> strvalidate_entry_revision (method)
Section titled “validate_entry_revision (method)”KnowledgePublicationReceipt.validate_entry_revision(value: int) -> intvalidate_expected_revision (method)
Section titled “validate_expected_revision (method)”KnowledgePublicationReceipt.validate_expected_revision(value: int | None) -> int | Nonevalidate_revision_transition (method)
Section titled “validate_revision_transition (method)”KnowledgePublicationReceipt.validate_revision_transition() -> KnowledgePublicationReceiptvalidate_receipt_datetime (method)
Section titled “validate_receipt_datetime (method)”KnowledgePublicationReceipt.validate_receipt_datetime(value: datetime, info) -> datetimevalidate_replayed (method)
Section titled “validate_replayed (method)”KnowledgePublicationReceipt.validate_replayed(value: bool) -> boolvalidate_entry_timestamp_order (method)
Section titled “validate_entry_timestamp_order (method)”KnowledgePublicationReceipt.validate_entry_timestamp_order() -> KnowledgePublicationReceiptRelease source · Runtime guarantees · Capability guides
prepare_knowledge_publication
Section titled “prepare_knowledge_publication”from cayu.storage import prepare_knowledge_publicationCopy and bind one complete revision-publication authority tuple.
prepare_knowledge_publication(entry: KnowledgeEntry, chunks: list[KnowledgeChunk], *, evidence: list[KnowledgeEvidence] | None=None, operation_id: str, expected_revision: int | None=None, activation_authority: KnowledgeActivationAuthority | None=None) -> tuple[str, KnowledgeEntry, list[KnowledgeChunk], list[KnowledgeEvidence], str]