Skip to content

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_KEY
KNOWLEDGE_MAINTENANCE_GOVERNANCE_METADATA_KEY = 'cayu_knowledge_maintenance_governance'

Release source · Runtime guarantees · Capability guides

from cayu.storage import KnowledgeMaintenanceConflict

A maintenance identity conflicts with immutable durable state.

Bases: RuntimeError.

KnowledgeMaintenanceConflict.__init__(reason: str) -> None

Release source · Runtime guarantees · Capability guides

from cayu.storage import KnowledgeMaintenanceDecision

Immutable external review over one exact maintenance proposal.

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
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)
KnowledgeMaintenanceDecision.validate_schema_version(value: object) -> object
KnowledgeMaintenanceDecision.validate_identity(value: str, info) -> str
KnowledgeMaintenanceDecision.validate_proposal_fingerprint(value: str) -> str
KnowledgeMaintenanceDecision.validate_reason(value: str) -> str
KnowledgeMaintenanceDecision.validate_decided_at(value: datetime) -> datetime
KnowledgeMaintenanceDecision.copy_metadata(value: dict[str, Any]) -> dict[str, Any]
KnowledgeMaintenanceDecision.validate_reviewer() -> KnowledgeMaintenanceDecision
KnowledgeMaintenanceDecision.fingerprint() -> str

Release source · Runtime guarantees · Capability guides

from cayu.storage import KnowledgeMaintenanceDecisionKind

Reviewer disposition for one exact maintenance proposal.

Bases: StrEnum.

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

from cayu.storage import KnowledgeMaintenanceDecisionReceipt

Immutable evidence for one atomic reviewed maintenance outcome.

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
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
KnowledgeMaintenanceDecisionReceipt.validate_identity(value: str, info) -> str
KnowledgeMaintenanceDecisionReceipt.validate_sha256(value: str, info) -> str
KnowledgeMaintenanceDecisionReceipt.copy_replacement(value)
KnowledgeMaintenanceDecisionReceipt.copy_archived_revisions(value) -> list[KnowledgeRevisionRef]
KnowledgeMaintenanceDecisionReceipt.copy_relation_ids(value) -> list[str]
KnowledgeMaintenanceDecisionReceipt.validate_committed_at(value: datetime) -> datetime
KnowledgeMaintenanceDecisionReceipt.validate_replayed(value) -> bool
KnowledgeMaintenanceDecisionReceipt.validate_outcome() -> KnowledgeMaintenanceDecisionReceipt

Release source · Runtime guarantees · Capability guides

from cayu.storage import KnowledgeMaintenanceOutcome

Durable outcome of an applied maintenance decision.

Bases: StrEnum.

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

from cayu.storage import KnowledgeMaintenanceProposal

Immutable 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.

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)
KnowledgeMaintenanceProposal.validate_schema_version(value: object) -> object
KnowledgeMaintenanceProposal.validate_identity(value: str, info) -> str
KnowledgeMaintenanceProposal.copy_replacement(value)
KnowledgeMaintenanceProposal.copy_sources(value) -> list[KnowledgeRevisionRef]
KnowledgeMaintenanceProposal.copy_relations(value) -> list[KnowledgeRelation]
KnowledgeMaintenanceProposal.copy_access_scope(value)
KnowledgeMaintenanceProposal.validate_created_at(value: datetime) -> datetime
KnowledgeMaintenanceProposal.validate_bounded_text(value: str, info) -> str
KnowledgeMaintenanceProposal.copy_metadata(value: dict[str, Any]) -> dict[str, Any]
KnowledgeMaintenanceProposal.validate_plan() -> KnowledgeMaintenanceProposal
KnowledgeMaintenanceProposal.fingerprint() -> str

Release source · Runtime guarantees · Capability guides

from cayu.storage import KnowledgeMaintenanceStale

A reviewed maintenance proposal no longer matches current knowledge.

Bases: RuntimeError.

KnowledgeMaintenanceStale.__init__(reason: str) -> None

Release source · Runtime guarantees · Capability guides

from cayu.storage import MAX_KNOWLEDGE_MAINTENANCE_BYTES
MAX_KNOWLEDGE_MAINTENANCE_BYTES = 256000

Release source · Runtime guarantees · Capability guides

from cayu.storage import MAX_KNOWLEDGE_MAINTENANCE_METADATA_BYTES
MAX_KNOWLEDGE_MAINTENANCE_METADATA_BYTES = 16384

Release source · Runtime guarantees · Capability guides

from cayu.storage import MAX_KNOWLEDGE_MAINTENANCE_SOURCES
MAX_KNOWLEDGE_MAINTENANCE_SOURCES = 50

Release source · Runtime guarantees · Capability guides

from cayu.storage import MAX_KNOWLEDGE_MAINTENANCE_TEXT_BYTES
MAX_KNOWLEDGE_MAINTENANCE_TEXT_BYTES = 16384

Release source · Runtime guarantees · Capability guides

from cayu.storage import prepare_knowledge_maintenance_decision

Copy and bind one exact proposal and external review decision.

prepare_knowledge_maintenance_decision(proposal: KnowledgeMaintenanceProposal, decision: KnowledgeMaintenanceDecision) -> tuple[KnowledgeMaintenanceProposal, KnowledgeMaintenanceDecision, str]

Release source · Runtime guarantees · Capability guides