Expand description
Transform implementations. Each submodule exposes a pure function over bytes/text; the
pipeline (crate::pipeline) owns all bookkeeping (token counts, TransformReport,
safety validation/rollback). Canonical IDs and ordering live in crate::modes.
Re-exports§
pub use crate::modes::TransformId;
Modules§
- diff
diff_compaction(canonical id:"diff_compaction", v1.0.0).- json
json_minifytransform (canonical id"json_minify", v1.0.0).- json_
dict json_value_dicttransform (canonical id"json_value_dict", v1.0.0).- json_
fold json_field_foldtransform (canonical id"json_field_fold", v1.0.0).- json_
prune json_prune— Phase 1 opt-in lossy JSON array-item selection (canonical id"json_prune"). Unlike every other transform in this module, this one is NOT lossless: it drops array items to hit a token budget, replacing each with a recoverable{"$tf_ref":...}marker. It is never part of the default lossless pipeline (modes.rs/apply_transforms) — seepipeline::apply_lossy_reduction, which only runs it whenpolicy.lossy.is_some(), as a terminal stage strictly after the normal lossless transform loop.- log_
fold log_field_foldtransform (canonical id"log_field_fold", v1.0.0).- logs
log_compactiontransform (canonical id"log_compaction", v1.0.0).- redaction
secret_redaction(canonical transform id:"secret_redaction"): a mandatory safety preprocessor that scans text for common enterprise secret shapes (JWTs, API keys, AWS access key IDs, basic-auth-in-URL credentials, and bearer tokens) and replaces each match with a fixed marker naming which kind of secret was found, without ever echoing the secret’s actual value back into the output.- schema
schema_compaction(canonical transform id:"schema_compaction", version1.0.0): a semantics-preserving transform for JSON payloads containing JSON-Schema-shaped fragments and/or OpenAI-style tool/function definitions.