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.
KnowledgeActivationAuthority
Section titled “KnowledgeActivationAuthority”from cayu.storage import KnowledgeActivationAuthorityValidated request/decision pair handed to the mechanical store boundary.
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 |
|---|---|---|
request |
KnowledgeActivationRequest |
required |
decision |
KnowledgeActivationDecision |
required |
copy_request (method)
Section titled “copy_request (method)”KnowledgeActivationAuthority.copy_request(value: object) -> objectcopy_decision (method)
Section titled “copy_decision (method)”KnowledgeActivationAuthority.copy_decision(value: object) -> objectvalidate_binding (method)
Section titled “validate_binding (method)”KnowledgeActivationAuthority.validate_binding() -> KnowledgeActivationAuthorityRelease source · Runtime guarantees · Capability guides
KnowledgeActivationConflict
Section titled “KnowledgeActivationConflict”from cayu.storage import KnowledgeActivationConflictAn idempotent activation operation conflicts with durable state.
Bases: RuntimeError.
init (method)
Section titled “init (method)”KnowledgeActivationConflict.__init__(reason: str) -> NoneRelease source · Runtime guarantees · Capability guides
KnowledgeActivationDecision
Section titled “KnowledgeActivationDecision”from cayu.storage import KnowledgeActivationDecisionExact application-owned disposition for one activation request.
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 |
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) |
validate_schema_version (method)
Section titled “validate_schema_version (method)”KnowledgeActivationDecision.validate_schema_version(value: object) -> intvalidate_request_sha256 (method)
Section titled “validate_request_sha256 (method)”KnowledgeActivationDecision.validate_request_sha256(value: str) -> strvalidate_identity (method)
Section titled “validate_identity (method)”KnowledgeActivationDecision.validate_identity(value: object, info) -> strcopy_annotations (method)
Section titled “copy_annotations (method)”KnowledgeActivationDecision.copy_annotations(value: dict[str, Any]) -> dict[str, Any]fingerprint (property)
Section titled “fingerprint (property)”KnowledgeActivationDecision.fingerprint() -> strRelease source · Runtime guarantees · Capability guides
KnowledgeActivationDisposition
Section titled “KnowledgeActivationDisposition”from cayu.storage import KnowledgeActivationDispositionApplication-policy outcome for one exact activation request.
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 |
|---|---|---|
ACTIVATE |
class attribute |
'activate' |
ROUTE_TO_REVIEW |
class attribute |
'route_to_review' |
REJECT |
class attribute |
'reject' |
Release source · Runtime guarantees · Capability guides
KnowledgeActivationReceipt
Section titled “KnowledgeActivationReceipt”from cayu.storage import KnowledgeActivationReceiptImmutable store-authored attribution for one governed revision operation.
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 |
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 |
validate_schema_version (method)
Section titled “validate_schema_version (method)”KnowledgeActivationReceipt.validate_schema_version(value: object) -> intvalidate_operation_id (method)
Section titled “validate_operation_id (method)”KnowledgeActivationReceipt.validate_operation_id(value: str) -> strvalidate_entry_id (method)
Section titled “validate_entry_id (method)”KnowledgeActivationReceipt.validate_entry_id(value: str) -> strvalidate_entry_revision (method)
Section titled “validate_entry_revision (method)”KnowledgeActivationReceipt.validate_entry_revision(value: object) -> intvalidate_expected_revision (method)
Section titled “validate_expected_revision (method)”KnowledgeActivationReceipt.validate_expected_revision(value: object) -> int | Nonevalidate_publication_request_sha256 (method)
Section titled “validate_publication_request_sha256 (method)”KnowledgeActivationReceipt.validate_publication_request_sha256(value: str) -> strvalidate_committed_at (method)
Section titled “validate_committed_at (method)”KnowledgeActivationReceipt.validate_committed_at(value: datetime) -> datetimevalidate_replayed (method)
Section titled “validate_replayed (method)”KnowledgeActivationReceipt.validate_replayed(value: object) -> boolvalidate_exact_binding (method)
Section titled “validate_exact_binding (method)”KnowledgeActivationReceipt.validate_exact_binding() -> KnowledgeActivationReceiptRelease source · Runtime guarantees · Capability guides
KnowledgeActivationRequest
Section titled “KnowledgeActivationRequest”from cayu.storage import KnowledgeActivationRequestCopied bounded material presented to one application activation policy.
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 |
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, ...] |
() |
validate_schema_version (method)
Section titled “validate_schema_version (method)”KnowledgeActivationRequest.validate_schema_version(value: object) -> intvalidate_operation_id (method)
Section titled “validate_operation_id (method)”KnowledgeActivationRequest.validate_operation_id(value: str) -> strcopy_entry (method)
Section titled “copy_entry (method)”KnowledgeActivationRequest.copy_entry(value: object) -> objectcopy_chunks (method)
Section titled “copy_chunks (method)”KnowledgeActivationRequest.copy_chunks(value: object) -> objectcopy_evidence (method)
Section titled “copy_evidence (method)”KnowledgeActivationRequest.copy_evidence(value: object) -> objectvalidate_expected_revision (method)
Section titled “validate_expected_revision (method)”KnowledgeActivationRequest.validate_expected_revision(value: object) -> int | Nonevalidate_target_revision (method)
Section titled “validate_target_revision (method)”KnowledgeActivationRequest.validate_target_revision(value: object) -> intcopy_access_scope (method)
Section titled “copy_access_scope (method)”KnowledgeActivationRequest.copy_access_scope(value: object) -> objectvalidate_sha256 (method)
Section titled “validate_sha256 (method)”KnowledgeActivationRequest.validate_sha256(value: str | None, info) -> str | Nonevalidate_evaluator_identity (method)
Section titled “validate_evaluator_identity (method)”KnowledgeActivationRequest.validate_evaluator_identity(value: object) -> str | Nonecopy_evaluator_result (method)
Section titled “copy_evaluator_result (method)”KnowledgeActivationRequest.copy_evaluator_result(value: object) -> objectcopy_forbidden_identities (method)
Section titled “copy_forbidden_identities (method)”KnowledgeActivationRequest.copy_forbidden_identities(value: object) -> tuple[str, ...]validate_exact_material (method)
Section titled “validate_exact_material (method)”KnowledgeActivationRequest.validate_exact_material() -> KnowledgeActivationRequestfingerprint (property)
Section titled “fingerprint (property)”KnowledgeActivationRequest.fingerprint() -> straccess_scope_sha256 (property)
Section titled “access_scope_sha256 (property)”KnowledgeActivationRequest.access_scope_sha256() -> strReturn the canonical identity of the copied policy-visible scope.
Release source · Runtime guarantees · Capability guides
KnowledgeActivationSource
Section titled “KnowledgeActivationSource”from cayu.storage import KnowledgeActivationSourceHigh-level boundary that requested an activation 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 |
|---|---|---|
CURATOR |
class attribute |
'curator' |
MODEL_TOOL |
class attribute |
'model_tool' |
REVIEW_APPROVAL |
class attribute |
'review_approval' |
Release source · Runtime guarantees · Capability guides
KnowledgeGovernanceConfig
Section titled “KnowledgeGovernanceConfig”from cayu.storage import KnowledgeGovernanceConfigHost-owned mode, policy identity, and execution bound for knowledge authority.
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 |
mode |
KnowledgeGovernanceMode |
KnowledgeGovernanceMode.REVIEWED |
policy_identity |
str | None |
None |
policy_version |
str | None |
None |
policy_timeout_seconds |
float |
30.0 |
validate_schema_version (method)
Section titled “validate_schema_version (method)”KnowledgeGovernanceConfig.validate_schema_version(value: object) -> intvalidate_optional_identity (method)
Section titled “validate_optional_identity (method)”KnowledgeGovernanceConfig.validate_optional_identity(value: object, info) -> str | Nonevalidate_timeout (method)
Section titled “validate_timeout (method)”KnowledgeGovernanceConfig.validate_timeout(value: object) -> floatvalidate_policy_authority (method)
Section titled “validate_policy_authority (method)”KnowledgeGovernanceConfig.validate_policy_authority() -> KnowledgeGovernanceConfigRelease source · Runtime guarantees · Capability guides
KnowledgeGovernanceMode
Section titled “KnowledgeGovernanceMode”from cayu.storage import KnowledgeGovernanceModeApplication-selected authority model for one high-level knowledge write.
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 |
|---|---|---|
REVIEWED |
class attribute |
'reviewed' |
POLICY_AUTOMATIC |
class attribute |
'policy_automatic' |
AUTONOMOUS |
class attribute |
'autonomous' |
Release source · Runtime guarantees · Capability guides
KnowledgeReviewApproval
Section titled “KnowledgeReviewApproval”from cayu.storage import KnowledgeReviewApprovalExact activated revision and durable reviewed-approval attribution.
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 |
|---|---|---|
entry |
KnowledgeEntry |
required |
receipt |
KnowledgeActivationReceipt |
required |
validate_binding (method)
Section titled “validate_binding (method)”KnowledgeReviewApproval.validate_binding() -> KnowledgeReviewApprovalRelease source · Runtime guarantees · Capability guides
MAX_KNOWLEDGE_ACTIVATION_ANNOTATION_BYTES
Section titled “MAX_KNOWLEDGE_ACTIVATION_ANNOTATION_BYTES”from cayu.storage import MAX_KNOWLEDGE_ACTIVATION_ANNOTATION_BYTESMAX_KNOWLEDGE_ACTIVATION_ANNOTATION_BYTES = 16384Release source · Runtime guarantees · Capability guides
MAX_KNOWLEDGE_ACTIVATION_CHUNKS
Section titled “MAX_KNOWLEDGE_ACTIVATION_CHUNKS”from cayu.storage import MAX_KNOWLEDGE_ACTIVATION_CHUNKSMAX_KNOWLEDGE_ACTIVATION_CHUNKS = 10000Release 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_BYTESMAX_KNOWLEDGE_ACTIVATION_EVALUATOR_RESULT_BYTES = 65536Release source · Runtime guarantees · Capability guides
MAX_KNOWLEDGE_ACTIVATION_EVIDENCE_RECORDS
Section titled “MAX_KNOWLEDGE_ACTIVATION_EVIDENCE_RECORDS”from cayu.storage import MAX_KNOWLEDGE_ACTIVATION_EVIDENCE_RECORDSMAX_KNOWLEDGE_ACTIVATION_EVIDENCE_RECORDS = 10000Release source · Runtime guarantees · Capability guides
MAX_KNOWLEDGE_ACTIVATION_RECEIPT_BYTES
Section titled “MAX_KNOWLEDGE_ACTIVATION_RECEIPT_BYTES”from cayu.storage import MAX_KNOWLEDGE_ACTIVATION_RECEIPT_BYTESMAX_KNOWLEDGE_ACTIVATION_RECEIPT_BYTES = 1114112Release source · Runtime guarantees · Capability guides
MAX_KNOWLEDGE_ACTIVATION_REQUEST_BYTES
Section titled “MAX_KNOWLEDGE_ACTIVATION_REQUEST_BYTES”from cayu.storage import MAX_KNOWLEDGE_ACTIVATION_REQUEST_BYTESMAX_KNOWLEDGE_ACTIVATION_REQUEST_BYTES = 1048576Release source · Runtime guarantees · Capability guides
prepare_knowledge_activation_request
Section titled “prepare_knowledge_activation_request”from cayu.storage import prepare_knowledge_activation_requestCopy 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