cayu.knowledge.maintenance_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.
KNOWLEDGE_MAINTENANCE_GOVERNANCE_METADATA_KEY
Section titled “KNOWLEDGE_MAINTENANCE_GOVERNANCE_METADATA_KEY”from cayu import KNOWLEDGE_MAINTENANCE_GOVERNANCE_METADATA_KEYKNOWLEDGE_MAINTENANCE_GOVERNANCE_METADATA_KEY = 'cayu_knowledge_maintenance_governance'Release source · Runtime guarantees · Capability guides
KnowledgeMaintenanceConflict
Section titled “KnowledgeMaintenanceConflict”from cayu.storage import KnowledgeMaintenanceConflictA maintenance identity conflicts with immutable durable state.
Bases: RuntimeError.
init (method)
Section titled “init (method)”KnowledgeMaintenanceConflict.__init__(reason: str) -> NoneRelease source · Runtime guarantees · Capability guides
KnowledgeMaintenanceDecision
Section titled “KnowledgeMaintenanceDecision”from cayu.storage import KnowledgeMaintenanceDecisionImmutable external review over one exact maintenance proposal.
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[1] |
1 |
operation_id |
str |
required |
proposal_id |
str |
required |
proposal_fingerprint |
str |
required |
kind |
KnowledgeMaintenanceDecisionKind |
required |
reviewer_type |
KnowledgeActorType |
required |
reviewer |
str |
required |
reason |
str |
required |
decided_at |
datetime |
Field(default_factory=lambda: datetime.now(UTC)) |
metadata |
dict[str, Any] |
Field(default_factory=dict) |
validate_schema_version (method)
Section titled “validate_schema_version (method)”KnowledgeMaintenanceDecision.validate_schema_version(value: object) -> objectvalidate_identity (method)
Section titled “validate_identity (method)”KnowledgeMaintenanceDecision.validate_identity(value: str, info) -> strvalidate_proposal_fingerprint (method)
Section titled “validate_proposal_fingerprint (method)”KnowledgeMaintenanceDecision.validate_proposal_fingerprint(value: str) -> strvalidate_reason (method)
Section titled “validate_reason (method)”KnowledgeMaintenanceDecision.validate_reason(value: str) -> strvalidate_decided_at (method)
Section titled “validate_decided_at (method)”KnowledgeMaintenanceDecision.validate_decided_at(value: datetime) -> datetimecopy_metadata (method)
Section titled “copy_metadata (method)”KnowledgeMaintenanceDecision.copy_metadata(value: dict[str, Any]) -> dict[str, Any]validate_reviewer (method)
Section titled “validate_reviewer (method)”KnowledgeMaintenanceDecision.validate_reviewer() -> KnowledgeMaintenanceDecisionfingerprint (property)
Section titled “fingerprint (property)”KnowledgeMaintenanceDecision.fingerprint() -> strRelease source · Runtime guarantees · Capability guides
KnowledgeMaintenanceDecisionKind
Section titled “KnowledgeMaintenanceDecisionKind”from cayu.storage import KnowledgeMaintenanceDecisionKindReviewer disposition for one exact maintenance proposal.
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 |
|---|---|---|
APPROVE |
class attribute |
'approve' |
REJECT |
class attribute |
'reject' |
Release source · Runtime guarantees · Capability guides
KnowledgeMaintenanceDecisionReceipt
Section titled “KnowledgeMaintenanceDecisionReceipt”from cayu.storage import KnowledgeMaintenanceDecisionReceiptImmutable evidence for one atomic reviewed maintenance outcome.
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 |
required |
proposal_id |
str |
required |
proposal_fingerprint |
str |
required |
request_sha256 |
str |
required |
outcome |
KnowledgeMaintenanceOutcome |
required |
replacement |
KnowledgeRevisionRef | None |
None |
archived_revisions |
list[KnowledgeRevisionRef] |
Field(default_factory=list) |
relation_ids |
list[str] |
Field(default_factory=list) |
committed_at |
datetime |
required |
replayed |
bool |
False |
validate_identity (method)
Section titled “validate_identity (method)”KnowledgeMaintenanceDecisionReceipt.validate_identity(value: str, info) -> strvalidate_sha256 (method)
Section titled “validate_sha256 (method)”KnowledgeMaintenanceDecisionReceipt.validate_sha256(value: str, info) -> strcopy_replacement (method)
Section titled “copy_replacement (method)”KnowledgeMaintenanceDecisionReceipt.copy_replacement(value)copy_archived_revisions (method)
Section titled “copy_archived_revisions (method)”KnowledgeMaintenanceDecisionReceipt.copy_archived_revisions(value) -> list[KnowledgeRevisionRef]copy_relation_ids (method)
Section titled “copy_relation_ids (method)”KnowledgeMaintenanceDecisionReceipt.copy_relation_ids(value) -> list[str]validate_committed_at (method)
Section titled “validate_committed_at (method)”KnowledgeMaintenanceDecisionReceipt.validate_committed_at(value: datetime) -> datetimevalidate_replayed (method)
Section titled “validate_replayed (method)”KnowledgeMaintenanceDecisionReceipt.validate_replayed(value) -> boolvalidate_outcome (method)
Section titled “validate_outcome (method)”KnowledgeMaintenanceDecisionReceipt.validate_outcome() -> KnowledgeMaintenanceDecisionReceiptRelease source · Runtime guarantees · Capability guides
KnowledgeMaintenanceOutcome
Section titled “KnowledgeMaintenanceOutcome”from cayu.storage import KnowledgeMaintenanceOutcomeDurable outcome of an applied maintenance decision.
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 |
|---|---|---|
APPLIED |
class attribute |
'applied' |
REJECTED |
class attribute |
'rejected' |
Release source · Runtime guarantees · Capability guides
KnowledgeMaintenanceProposal
Section titled “KnowledgeMaintenanceProposal”from cayu.storage import KnowledgeMaintenanceProposalImmutable reviewed plan over exact current knowledge revisions.
Relations bind the replacement’s deterministic active successor revision.
A supersedes relation archives its object; derived_from and
contradicts preserve their source as active knowledge.
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[1] |
1 |
id |
str |
required |
replacement |
KnowledgeRevisionRef |
required |
sources |
list[KnowledgeRevisionRef] |
required |
relations |
list[KnowledgeRelation] |
required |
access_scope |
KnowledgeAccessScope |
required |
policy_id |
str |
required |
proposed_by_type |
KnowledgeActorType |
KnowledgeActorType.APP |
proposed_by |
str |
'app' |
created_at |
datetime |
Field(default_factory=lambda: datetime.now(UTC)) |
rationale |
str |
required |
evidence_summary |
str |
required |
metadata |
dict[str, Any] |
Field(default_factory=dict) |
validate_schema_version (method)
Section titled “validate_schema_version (method)”KnowledgeMaintenanceProposal.validate_schema_version(value: object) -> objectvalidate_identity (method)
Section titled “validate_identity (method)”KnowledgeMaintenanceProposal.validate_identity(value: str, info) -> strcopy_replacement (method)
Section titled “copy_replacement (method)”KnowledgeMaintenanceProposal.copy_replacement(value)copy_sources (method)
Section titled “copy_sources (method)”KnowledgeMaintenanceProposal.copy_sources(value) -> list[KnowledgeRevisionRef]copy_relations (method)
Section titled “copy_relations (method)”KnowledgeMaintenanceProposal.copy_relations(value) -> list[KnowledgeRelation]copy_access_scope (method)
Section titled “copy_access_scope (method)”KnowledgeMaintenanceProposal.copy_access_scope(value)validate_created_at (method)
Section titled “validate_created_at (method)”KnowledgeMaintenanceProposal.validate_created_at(value: datetime) -> datetimevalidate_bounded_text (method)
Section titled “validate_bounded_text (method)”KnowledgeMaintenanceProposal.validate_bounded_text(value: str, info) -> strcopy_metadata (method)
Section titled “copy_metadata (method)”KnowledgeMaintenanceProposal.copy_metadata(value: dict[str, Any]) -> dict[str, Any]validate_plan (method)
Section titled “validate_plan (method)”KnowledgeMaintenanceProposal.validate_plan() -> KnowledgeMaintenanceProposalfingerprint (property)
Section titled “fingerprint (property)”KnowledgeMaintenanceProposal.fingerprint() -> strRelease source · Runtime guarantees · Capability guides
KnowledgeMaintenanceStale
Section titled “KnowledgeMaintenanceStale”from cayu.storage import KnowledgeMaintenanceStaleA reviewed maintenance proposal no longer matches current knowledge.
Bases: RuntimeError.
init (method)
Section titled “init (method)”KnowledgeMaintenanceStale.__init__(reason: str) -> NoneRelease source · Runtime guarantees · Capability guides
MAX_KNOWLEDGE_MAINTENANCE_BYTES
Section titled “MAX_KNOWLEDGE_MAINTENANCE_BYTES”from cayu.storage import MAX_KNOWLEDGE_MAINTENANCE_BYTESMAX_KNOWLEDGE_MAINTENANCE_BYTES = 256000Release source · Runtime guarantees · Capability guides
MAX_KNOWLEDGE_MAINTENANCE_METADATA_BYTES
Section titled “MAX_KNOWLEDGE_MAINTENANCE_METADATA_BYTES”from cayu.storage import MAX_KNOWLEDGE_MAINTENANCE_METADATA_BYTESMAX_KNOWLEDGE_MAINTENANCE_METADATA_BYTES = 16384Release source · Runtime guarantees · Capability guides
MAX_KNOWLEDGE_MAINTENANCE_SOURCES
Section titled “MAX_KNOWLEDGE_MAINTENANCE_SOURCES”from cayu.storage import MAX_KNOWLEDGE_MAINTENANCE_SOURCESMAX_KNOWLEDGE_MAINTENANCE_SOURCES = 50Release source · Runtime guarantees · Capability guides
MAX_KNOWLEDGE_MAINTENANCE_TEXT_BYTES
Section titled “MAX_KNOWLEDGE_MAINTENANCE_TEXT_BYTES”from cayu.storage import MAX_KNOWLEDGE_MAINTENANCE_TEXT_BYTESMAX_KNOWLEDGE_MAINTENANCE_TEXT_BYTES = 16384Release source · Runtime guarantees · Capability guides
prepare_knowledge_maintenance_decision
Section titled “prepare_knowledge_maintenance_decision”from cayu.storage import prepare_knowledge_maintenance_decisionCopy and bind one exact proposal and external review decision.
prepare_knowledge_maintenance_decision(proposal: KnowledgeMaintenanceProposal, decision: KnowledgeMaintenanceDecision) -> tuple[KnowledgeMaintenanceProposal, KnowledgeMaintenanceDecision, str]