PixelWeaver v0.5.0 /server.src.pixelweaver._gen.constraint_manifest
On this page

Generated strictspec validator for the constraint-manifest document: the project palette and its palette classes, with range and distinctness checks.

#server.src.pixelweaver._gen.constraint_manifest

#server.src.pixelweaver._gen.constraint_manifest

#validate_bytes

python
def validate_bytes(input: bytes, syntax: str) -> tuple[ConstraintManifest | 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[ConstraintManifest | 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[ConstraintManifest | 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.

#ConstraintManifest

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

#with_version

python
def with_version(self, v: str) -> ConstraintManifest

#with_palette

python
def with_palette(self, v: list[str]) -> ConstraintManifest

#with_classes

python
def with_classes(self, v: list[PaletteClass]) -> ConstraintManifest

#with_alphaPolicy

python
def with_alphaPolicy(self, v: str) -> ConstraintManifest

#PaletteClass

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

#with_id

python
def with_id(self, v: str) -> PaletteClass

#with_name

python
def with_name(self, v: str) -> PaletteClass

#with_start

python
def with_start(self, v: int) -> PaletteClass

#with_len

python
def with_len(self, v: int) -> PaletteClass

#with_reserved

python
def with_reserved(self, v: bool) -> PaletteClass
Search