Skip to content

cayu.knowledge.activation_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.

from cayu.storage import KnowledgeActivationAuthority

Validated request/decision pair handed to the mechanical store boundary.

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
request KnowledgeActivationRequest required
decision KnowledgeActivationDecision required
KnowledgeActivationAuthority.copy_request(value: object) -> object
KnowledgeActivationAuthority.copy_decision(value: object) -> object
KnowledgeActivationAuthority.validate_binding() -> KnowledgeActivationAuthority

Release source · Runtime guarantees · Capability guides

from cayu.storage import KnowledgeActivationConflict

An idempotent activation operation conflicts with durable state.

Bases: RuntimeError.

KnowledgeActivationConflict.__init__(reason: str) -> None

Release source · Runtime guarantees · Capability guides

from cayu.storage import KnowledgeActivationDecision

Exact application-owned disposition for one activation request.

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
request_sha256 str required
disposition KnowledgeActivationDisposition required
policy_identity str required
policy_version str required
code str required
annotations dict[str, Any] Field(default_factory=dict)
KnowledgeActivationDecision.validate_schema_version(value: object) -> int
KnowledgeActivationDecision.validate_request_sha256(value: str) -> str
KnowledgeActivationDecision.validate_identity(value: object, info) -> str
KnowledgeActivationDecision.copy_annotations(value: dict[str, Any]) -> dict[str, Any]
KnowledgeActivationDecision.fingerprint() -> str

Release source · Runtime guarantees · Capability guides

from cayu.storage import KnowledgeActivationDisposition

Application-policy outcome for one exact activation request.

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
ACTIVATE class attribute 'activate'
ROUTE_TO_REVIEW class attribute 'route_to_review'
REJECT class attribute 'reject'

Release source · Runtime guarantees · Capability guides

from cayu.storage import KnowledgeActivationReceipt

Immutable store-authored attribution for one governed revision operation.

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
entry_id str required
entry_revision int required
expected_revision int | None required
publication_request_sha256 str required
authority KnowledgeActivationAuthority required
committed_at datetime required
replayed bool False
KnowledgeActivationReceipt.validate_schema_version(value: object) -> int
KnowledgeActivationReceipt.validate_operation_id(value: str) -> str
KnowledgeActivationReceipt.validate_entry_id(value: str) -> str
KnowledgeActivationReceipt.validate_entry_revision(value: object) -> int
KnowledgeActivationReceipt.validate_expected_revision(value: object) -> int | None

validate_publication_request_sha256 (method)

Section titled “validate_publication_request_sha256 (method)”
KnowledgeActivationReceipt.validate_publication_request_sha256(value: str) -> str
KnowledgeActivationReceipt.validate_committed_at(value: datetime) -> datetime
KnowledgeActivationReceipt.validate_replayed(value: object) -> bool
KnowledgeActivationReceipt.validate_exact_binding() -> KnowledgeActivationReceipt

Release source · Runtime guarantees · Capability guides

from cayu.storage import KnowledgeActivationRequest

Copied bounded material presented to one application activation policy.

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
mode KnowledgeGovernanceMode required
source KnowledgeActivationSource required
candidate_entry KnowledgeEntry required
chunks tuple[KnowledgeChunk, ...] required
evidence tuple[KnowledgeEvidence, ...] ()
expected_revision int | None None
target_revision int required
access_scope KnowledgeAccessScope required
evaluator_identity str | None None
evaluator_result dict[str, Any] | None None
evaluator_decision_sha256 str | None None
forbidden_authority_identities tuple[str, ...] ()
KnowledgeActivationRequest.validate_schema_version(value: object) -> int
KnowledgeActivationRequest.validate_operation_id(value: str) -> str
KnowledgeActivationRequest.copy_entry(value: object) -> object
KnowledgeActivationRequest.copy_chunks(value: object) -> object
KnowledgeActivationRequest.copy_evidence(value: object) -> object
KnowledgeActivationRequest.validate_expected_revision(value: object) -> int | None
KnowledgeActivationRequest.validate_target_revision(value: object) -> int
KnowledgeActivationRequest.copy_access_scope(value: object) -> object
KnowledgeActivationRequest.validate_sha256(value: str | None, info) -> str | None
KnowledgeActivationRequest.validate_evaluator_identity(value: object) -> str | None
KnowledgeActivationRequest.copy_evaluator_result(value: object) -> object
KnowledgeActivationRequest.copy_forbidden_identities(value: object) -> tuple[str, ...]
KnowledgeActivationRequest.validate_exact_material() -> KnowledgeActivationRequest
KnowledgeActivationRequest.fingerprint() -> str
KnowledgeActivationRequest.access_scope_sha256() -> str

Return the canonical identity of the copied policy-visible scope.

Release source · Runtime guarantees · Capability guides

from cayu.storage import KnowledgeActivationSource

High-level boundary that requested an activation 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
CURATOR class attribute 'curator'
MODEL_TOOL class attribute 'model_tool'
REVIEW_APPROVAL class attribute 'review_approval'

Release source · Runtime guarantees · Capability guides

from cayu.storage import KnowledgeGovernanceConfig

Host-owned mode, policy identity, and execution bound for knowledge authority.

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
mode KnowledgeGovernanceMode KnowledgeGovernanceMode.REVIEWED
policy_identity str | None None
policy_version str | None None
policy_timeout_seconds float 30.0
KnowledgeGovernanceConfig.validate_schema_version(value: object) -> int
KnowledgeGovernanceConfig.validate_optional_identity(value: object, info) -> str | None
KnowledgeGovernanceConfig.validate_timeout(value: object) -> float
KnowledgeGovernanceConfig.validate_policy_authority() -> KnowledgeGovernanceConfig

Release source · Runtime guarantees · Capability guides

from cayu.storage import KnowledgeGovernanceMode

Application-selected authority model for one high-level knowledge write.

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
REVIEWED class attribute 'reviewed'
POLICY_AUTOMATIC class attribute 'policy_automatic'
AUTONOMOUS class attribute 'autonomous'

Release source · Runtime guarantees · Capability guides

from cayu.storage import KnowledgeReviewApproval

Exact activated revision and durable reviewed-approval attribution.

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
entry KnowledgeEntry required
receipt KnowledgeActivationReceipt required
KnowledgeReviewApproval.validate_binding() -> KnowledgeReviewApproval

Release source · Runtime guarantees · Capability guides

from cayu.storage import MAX_KNOWLEDGE_ACTIVATION_ANNOTATION_BYTES
MAX_KNOWLEDGE_ACTIVATION_ANNOTATION_BYTES = 16384

Release source · Runtime guarantees · Capability guides

from cayu.storage import MAX_KNOWLEDGE_ACTIVATION_CHUNKS
MAX_KNOWLEDGE_ACTIVATION_CHUNKS = 10000

Release source · Runtime guarantees · Capability guides

MAX_KNOWLEDGE_ACTIVATION_EVALUATOR_RESULT_BYTES

Section titled “MAX_KNOWLEDGE_ACTIVATION_EVALUATOR_RESULT_BYTES”
from cayu.storage import MAX_KNOWLEDGE_ACTIVATION_EVALUATOR_RESULT_BYTES
MAX_KNOWLEDGE_ACTIVATION_EVALUATOR_RESULT_BYTES = 65536

Release source · Runtime guarantees · Capability guides

from cayu.storage import MAX_KNOWLEDGE_ACTIVATION_EVIDENCE_RECORDS
MAX_KNOWLEDGE_ACTIVATION_EVIDENCE_RECORDS = 10000

Release source · Runtime guarantees · Capability guides

from cayu.storage import MAX_KNOWLEDGE_ACTIVATION_RECEIPT_BYTES
MAX_KNOWLEDGE_ACTIVATION_RECEIPT_BYTES = 1114112

Release source · Runtime guarantees · Capability guides

from cayu.storage import MAX_KNOWLEDGE_ACTIVATION_REQUEST_BYTES
MAX_KNOWLEDGE_ACTIVATION_REQUEST_BYTES = 1048576

Release source · Runtime guarantees · Capability guides

from cayu.storage import prepare_knowledge_activation_request

Copy the exact bounded candidate material presented to activation policy.

prepare_knowledge_activation_request(entry: KnowledgeEntry, chunks: list[KnowledgeChunk], *, evidence: list[KnowledgeEvidence] | None=None, access_scope: KnowledgeAccessScope, operation_id: str, governance_mode: KnowledgeGovernanceMode, source: KnowledgeActivationSource, expected_revision: int | None=None, evaluator_identity: str | None=None, evaluator_result: dict[str, Any] | None=None, evaluator_decision_sha256: str | None=None, forbidden_authority_identities: tuple[str, ...]=()) -> KnowledgeActivationRequest

Release source · Runtime guarantees · Capability guides