Expand description
schema_compaction (canonical transform id: "schema_compaction", version 1.0.0): a
semantics-preserving transform for JSON payloads containing JSON-Schema-shaped fragments
and/or OpenAI-style tool/function definitions.
It never drops required semantic information — description, required, enum, type,
default, and name fields (and every other field) survive byte-for-byte. The only thing
this transform ever shortens is illustrative "examples" arrays, which are truncated down
to a configured maximum length wherever they appear in the document.
Enums§
- Schema
Compaction Error - Errors produced while compacting a schema/tool-definition payload.
Constants§
- TRANSFORM_
ID - Canonical stable id for this transform, as used in reports and
--disable. - TRANSFORM_
VERSION - Semantic version of this transform’s behavior (see
crate::modesfor the pipeline-wide version table this must stay in sync with).
Functions§
- compact_
schema - Parses
inputas JSON, truncates every"examples"array found anywhere in the document (object or array nesting, at any depth) down to at mostmax_exampleselements — keeping the firstmax_exampleselements in their original order — and re-serializes the result in compact form.