orxtra v0.13.0 /overseer.src.orxtra.overseer._gen_knowledge
On this page

Strictspec-generated validator for the knowledge TOML schema (do not edit; regenerate via strictspec gen). Provides validate_bytes/validate_value plus frozen typed bindings: KnowledgeFile, Constraint.

#overseer.src.orxtra.overseer._gen_knowledge

#overseer.src.orxtra.overseer._gen_knowledge

#validate_bytes

python
def validate_bytes(input: bytes, syntax: str) -> tuple[KnowledgeFile | None, tuple[Diagnostic, ...]]

RAW-BYTES entry point: lossless parse of input in the given syntax ("json" | "toml" | "jsonl"), then validate. Returns the typed root value (None when any diagnostic fired) and the ordered diagnostics.

#validate_bytes_with_evidence

python
def validate_bytes_with_evidence(input: bytes, syntax: str, evidence: dict | None) -> tuple[KnowledgeFile | None, tuple[Diagnostic, ...]]

validate_bytes plus cross-document resolver evidence for the phase-2 constraint vocabulary.

#validate_value

python
def validate_value(v: Value) -> tuple[KnowledgeFile | None, tuple[Diagnostic, ...]]

TAGGED-VALUE entry point: validate an already-parsed tagged document value (from strictspec.load_value or a typed constructor). Raw untagged dicts are never accepted.

#KnowledgeFile

Frozen typed binding of the "KnowledgeFile" record. Immutable; use with_* for copy-on-write.

#with_constraints

python
def with_constraints(self, v: list[Constraint]) -> KnowledgeFile

#Constraint

Frozen typed binding of the "Constraint" record. Immutable; use with_* for copy-on-write.

#with_text

python
def with_text(self, v: str) -> Constraint

#with_tier

python
def with_tier(self, v: str) -> Constraint

#with_kind

python
def with_kind(self, v: str) -> Constraint
Search