v1.4.2
Release v1.4.2
Highlights
File content processor rewrite - Source code and sensitive config files are now never compressed. Lock files, JSON, YAML, TOML, and XML are compressed with structure-preserving strategies. This eliminates the risk of missing lines causing wrong patches.
37 processor audit fixes - Systematic fixes across all 15 processors improving compression quality, coverage, and precision.
Aggressive thresholds - Compression triggers from the first token saved (min_input_length=1, min_compression_ratio=0.0), with all thresholds precision-tested to safe minimums.
What's New
File Content: Two-Category Dispatch
| Category | Extensions | Behavior |
|---|---|---|
| Never compress | .py, .js, .ts, .tsx, .jsx, .go, .rs, .java, .kt, .scala, .c, .cpp, .h, .hpp, .cs, .rb, .php, .swift, .sh, .bash, .zsh, .sql, .tf, .hcl, .env, .ini, .cfg, .conf, + 20 more |
Pass through byte-for-byte |
| Lock files | package-lock.json, yarn.lock, poetry.lock, Cargo.lock, composer.lock, Pipfile.lock, go.sum |
Dependency names + versions only |
| Structured data | .json, .yaml, .yml, .toml, .xml |
Preserve keys and structure hierarchy |
| Logs | .log |
Error-focused with context lines |
| CSV/TSV | .csv, .tsv |
Header + head/tail rows |
| Documentation | .md, .rst |
Head/tail truncation |
| Unknown | everything else | Conservative generic truncation |
Processor Fixes
- build_output: warning samples preserved, bun support, duplicate regex fix
- cloud_cli: important key preservation at depth (InstanceId, ResourceName)
- test_output: accurate Jest test counts, tighter Go test boundary detection
- git:
git status -sbbranch header detection - lint_output: oxlint, deno lint, golangci-lint, rubocop parser support
- search: extensionless file handling
- network: inverted wget filter (keep useful lines only)
- db_query: stricter psql table detection (
|count >= 2) - terraform:
validateandfmtsubcommand support - gh:
apisubcommand routing, shared diff compression - generic: digit threshold raised to 30% (fewer false positives on tabular data)
Engine Improvements
- Processor passthrough respected: when a processor explicitly returns output unchanged, no generic fallback applied
- Size guard: compression only reported when output actually gets smaller
Session Tracking
TOKEN_SAVER_SESSIONembedded in rewritten commands for per-session aggregation- Safe trailing pipe allowlist (
head,tail,grep,sort,uniq,cut)
Shared Utilities
- New
src/processors/utils.py:compress_diff(),compress_json_value(),group_files_by_dir()used across multiple processors
Quality
- 430 tests passing (39 precision tests)
- 0 lint errors (ruff)
- 26 files changed, +1580 / -457
Upgrade
No configuration changes required. All new defaults are backward-compatible. Existing ~/.token-saver/config.json overrides continue to work.