squeez 0.4.1 → 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +121 -1
- package/README.md +33 -29
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,125 @@ This project uses [Semantic Versioning](https://semver.org/).
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [0.4.1] - 2026-04-16
|
|
11
|
+
|
|
12
|
+
### Added
|
|
13
|
+
- feat(opus47): adapt squeez for Opus 4.7 tokenizer and xhigh effort
|
|
14
|
+
- feat(setup): auto-detect lang from CLAUDE.md/locale + stderr update notification (#29)
|
|
15
|
+
- v0.3.0 — token economy, pt-BR caveman, aggressive defaults, full hook install
|
|
16
|
+
- structured session memory, cross-session search, error snippets, configurable tunables
|
|
17
|
+
- feat(setup): create config.ini on first install
|
|
18
|
+
- feat(i18n): locale-aware compress-md with pt-BR support (#25)
|
|
19
|
+
- fuzzy dedup, adaptive intensity, benign summarize, MCP server, temporal memory, protocol payload
|
|
20
|
+
- Windows setup via cargo/npm + squeez update fix
|
|
21
|
+
- feat(benchmark): add squeez benchmark command with 19-scenario test suite
|
|
22
|
+
- feat(ci): re-add promote-develop workflow with correct registration
|
|
23
|
+
- feat(init): inject persona into ~/.claude/CLAUDE.md on every session start
|
|
24
|
+
- feat(npm+crates): add npm package and publish jobs to release workflow
|
|
25
|
+
- feat(statusline): add statusline.sh to repo; install via install.sh; show all-time stats
|
|
26
|
+
- compress-md, caveman persona, squeez update, track-result hook
|
|
27
|
+
- feat(context): adaptive intensity always picks Ultra
|
|
28
|
+
- feat(context): aggressive token-engine — adaptive intensity, redundancy cache, summarize fallback
|
|
29
|
+
- add Windows support to install.sh and release.yml
|
|
30
|
+
- add home_dir() helper with USERPROFILE fallback for Windows
|
|
31
|
+
- cross-platform wrap — shell_command() helper, cfg(unix) signal gates, libc unix-only
|
|
32
|
+
- add GitHub Copilot CLI support
|
|
33
|
+
- add OpenCode plugin for automatic Bash compression
|
|
34
|
+
- add universal installer support for macOS and Linux
|
|
35
|
+
- expand benchmarks, edge-case tests, and README polish
|
|
36
|
+
- add SessionStart + PostToolUse hooks, update install.sh and README
|
|
37
|
+
- wrap.rs — artifact capture (files/errors/git/tests) + compact warning header
|
|
38
|
+
- squeez init — session start, prior memory banner, session finalization (TDD)
|
|
39
|
+
- squeez track — token accumulation + session event log (TDD)
|
|
40
|
+
- memory.rs — Summary, read_last_n, write_summary, prune_old (TDD)
|
|
41
|
+
- session.rs — CurrentSession, append_event, date math (TDD)
|
|
42
|
+
- json_util helpers + compact_threshold_tokens, memory_retention_days config
|
|
43
|
+
- benchmark system — all fixtures passing
|
|
44
|
+
- build.sh compiles + installs squeez, registers hook
|
|
45
|
+
- PreToolUse hook script
|
|
46
|
+
- fs and runtime handlers — all handler tests passing
|
|
47
|
+
- cloud, database, network handlers (TDD)
|
|
48
|
+
- typescript and build handlers (TDD)
|
|
49
|
+
- package_mgr and test_runner handlers (TDD)
|
|
50
|
+
- git and docker handlers (TDD)
|
|
51
|
+
- wrap subcommand — sh -c, 120s timeout, signal forwarding, bypass check
|
|
52
|
+
- Handler trait with cmd+config, generic handler, command router, filter_stdin
|
|
53
|
+
- truncation strategy (TDD) — all strategy tests passing
|
|
54
|
+
- grouping strategy (TDD)
|
|
55
|
+
- dedup strategy (TDD)
|
|
56
|
+
- smart_filter strategy with node_modules frame removal (TDD)
|
|
57
|
+
- implement config.ini parser (TDD)
|
|
58
|
+
|
|
59
|
+
### Changed
|
|
60
|
+
- chore(release): bump version to 0.4.1
|
|
61
|
+
- chore(release): bump version to 0.4.0
|
|
62
|
+
- docs: update changelog and benchmarks for v0.3.2 [skip release] (#30)
|
|
63
|
+
- chore: bump version to 0.3.2
|
|
64
|
+
- docs: add shields.io badge for changelog link
|
|
65
|
+
- chore: bump version to 0.3.1
|
|
66
|
+
- chore: bump version to 0.2.3
|
|
67
|
+
- docs: update README with 11 MCP tools, structured memory, and advanced tunables
|
|
68
|
+
- chore: bump version to 0.2.2
|
|
69
|
+
- docs: rewrite README with full install instructions (curl/npm/cargo) and all commands
|
|
70
|
+
- chore: refresh bench/report.md from latest run [skip release]
|
|
71
|
+
- chore(ci): remove promote-develop workflow (re-adding to fix broken registration)
|
|
72
|
+
- chore: bump version to 0.2.1 + auto-release on merge to main [skip release]
|
|
73
|
+
- chore: bump version to 0.2.0; add Cargo.toml metadata
|
|
74
|
+
- ci: PR template, linked-issue enforcement, no-claude-trailer check
|
|
75
|
+
- docs: update README with PR1+PR2 features, fresh benchmarks, changelog
|
|
76
|
+
- ci: auto-delete branches after PR merge
|
|
77
|
+
- docs: update Windows installation instructions and prerequisites in README
|
|
78
|
+
- docs: add Windows support and Rust install instructions to README
|
|
79
|
+
- refactor: use session::home_dir() in config and init (Windows compat)
|
|
80
|
+
- ci: trigger promote workflow (test)
|
|
81
|
+
- ci(workflow): avoid failing promote job when PR creation is not permitted; add PR_CREATION_TOKEN guidance
|
|
82
|
+
- docs(readme): add changelog, contribution workflow, and benchmark notes
|
|
83
|
+
- ci(workflow): create/update PR from develop to main on push
|
|
84
|
+
- chore: add .worktrees/ to gitignore
|
|
85
|
+
- chore: add docs/ to gitignore (local design specs)
|
|
86
|
+
- docs: update README for GitHub Copilot CLI support
|
|
87
|
+
- security: fix remaining LOW findings in wrap.rs
|
|
88
|
+
- security: fix 2 follow-up findings from second audit
|
|
89
|
+
- security: fix all 8 findings from security audit
|
|
90
|
+
- ci: build and install binary before running benchmarks
|
|
91
|
+
- chore: add GitHub sponsor button
|
|
92
|
+
- chore: ignore .omc/ directory, remove from tracking
|
|
93
|
+
- chore: update benchmark report (7/7 passing)
|
|
94
|
+
- docs: update README — real benchmarks, Phase 2 config, how it works
|
|
95
|
+
- style: cargo fmt on session.rs and test_session.rs
|
|
96
|
+
- chore: open source files — README, LICENSE, CI/release workflows, install.sh
|
|
97
|
+
- chore: scaffold squeez Rust project
|
|
98
|
+
|
|
99
|
+
### Fixed
|
|
100
|
+
- fix(ci): add --allow-dirty to cargo publish for Cargo.lock changes
|
|
101
|
+
- fix(ci): skip publish gracefully when version already exists on crates.io/npm
|
|
102
|
+
- fix(ci): run update-docs even if publish jobs fail (already published)
|
|
103
|
+
- fix(ci): continue-on-error for publish jobs so update-docs always runs
|
|
104
|
+
- fix(ci): add pull-requests write permission to update-docs job
|
|
105
|
+
- fix(update): cargo-managed self-update + Windows deferred install + session update check (#27)
|
|
106
|
+
- fix(ci): update-docs creates PR instead of pushing directly to protected main
|
|
107
|
+
- fix(npm): copy README.md into npm package before publish; add readme field
|
|
108
|
+
- fix(ci): add toolchain: stable to all dtolnay/rust-toolchain steps
|
|
109
|
+
- fix(ci): handle no previous tags in generate-changelog.sh (pipefail + grep -v)
|
|
110
|
+
- fix(ci): dispatch release.yml from auto-release to bypass GITHUB_TOKEN chain limit [skip release]
|
|
111
|
+
- fix(ci): fix flaky test tmp dir collision + simplify auto-release
|
|
112
|
+
- fix(bench): exclude synthetic fixtures from filter-mode bench/run.sh
|
|
113
|
+
- fix(ci): remove secrets in step if-conditions — check token inside script instead
|
|
114
|
+
- fix(ci): rename promote-develop → promote-to-main to fix broken workflow registration
|
|
115
|
+
- fix(ci): bump github-script to v7 in promote-develop to force workflow re-registration
|
|
116
|
+
- fix(compress_md): use byte slice comparison to avoid UTF-8 char boundary panic
|
|
117
|
+
- fix(statusline): remove Ctx% — show only squeez compression metrics
|
|
118
|
+
- fix(statusline): green ✓, proper capitalization, real-time context %, all metrics
|
|
119
|
+
- resolve gap analysis — new handlers, wider redundancy window, token budget
|
|
120
|
+
- install.sh — clarify PostToolUse no-matcher intent, guard version echo
|
|
121
|
+
- wrap.rs — safe git hex check, O(n) dedup, full cmd in event log
|
|
122
|
+
- use ends_with for files_committed check in init finalize
|
|
123
|
+
- json_util — guard extract_u64 empty digit, add json_util test coverage
|
|
124
|
+
- add pre-flight binary check to bench/run.sh
|
|
125
|
+
- atomic settings.json write + uninstall safety guards
|
|
126
|
+
- harden pretooluse hook (shlex.quote, error handling, single path source)
|
|
127
|
+
- wrap — process_group(0) for correct signal forwarding, tighten is_streaming
|
|
128
|
+
|
|
10
129
|
## [0.4.0] - 2026-04-16
|
|
11
130
|
|
|
12
131
|
### Added
|
|
@@ -227,10 +346,11 @@ This project uses [Semantic Versioning](https://semver.org/).
|
|
|
227
346
|
- Wider redundancy window, token budget improvements
|
|
228
347
|
- CI: PR template, linked-issue enforcement
|
|
229
348
|
|
|
230
|
-
[Unreleased]: https://github.com/claudioemmanuel/squeez/compare/v0.
|
|
349
|
+
[Unreleased]: https://github.com/claudioemmanuel/squeez/compare/v0.4.1...HEAD
|
|
231
350
|
[0.3.0]: https://github.com/claudioemmanuel/squeez/compare/v0.2.3...v0.3.0
|
|
232
351
|
[0.2.3]: https://github.com/claudioemmanuel/squeez/compare/v0.2.2...v0.2.3
|
|
233
352
|
[0.2.2]: https://github.com/claudioemmanuel/squeez/compare/v0.2.1...v0.2.2
|
|
234
353
|
[0.2.1]: https://github.com/claudioemmanuel/squeez/compare/v0.2.0...v0.2.1
|
|
235
354
|
[0.2.0]: https://github.com/claudioemmanuel/squeez/releases/tag/v0.2.0
|
|
236
355
|
[0.3.2]: https://github.com/claudioemmanuel/squeez/releases/tag/v0.3.2
|
|
356
|
+
[0.4.1]: https://github.com/claudioemmanuel/squeez/releases/tag/v0.4.1
|
package/README.md
CHANGED
|
@@ -94,49 +94,53 @@ squeez update --insecure # skip checksum (not recommended)
|
|
|
94
94
|
<!-- BENCHMARK:START -->
|
|
95
95
|
Measured on macOS (Apple Silicon). Token count = `chars / 4` (matches Claude's ~4 chars/token). Run `squeez benchmark` to reproduce.
|
|
96
96
|
|
|
97
|
-
### Per-scenario results —
|
|
97
|
+
### Per-scenario results — 23 scenarios × 5 iterations
|
|
98
98
|
|
|
99
99
|
| Scenario | Before | After | Reduction | Latency |
|
|
100
100
|
|----------|--------|-------|-----------|---------|
|
|
101
|
-
| `summarize_huge` | 82,257 tk | 420 tk | **-99%** | 55.
|
|
102
|
-
| `repetitive_output` | 4,692 tk | 37 tk | **-99%** |
|
|
103
|
-
| `
|
|
104
|
-
| `
|
|
105
|
-
| `
|
|
106
|
-
| `
|
|
107
|
-
| `
|
|
108
|
-
| `
|
|
109
|
-
| `
|
|
110
|
-
| `
|
|
111
|
-
| `
|
|
101
|
+
| `summarize_huge` | 82,257 tk | 420 tk | **-99%** | 55.7 ms |
|
|
102
|
+
| `repetitive_output` | 4,692 tk | 37 tk | **-99%** | 191 µs |
|
|
103
|
+
| `high_context_adaptive` | 4,418 tk | 52 tk | **-99%** | 768 µs |
|
|
104
|
+
| `ps_aux` | 40,373 tk | 2,352 tk | **-94%** | 2.2 ms |
|
|
105
|
+
| `git_log_200` | 2,692 tk | 289 tk | **-89%** | 159 µs |
|
|
106
|
+
| `tsc_errors` | 731 tk | 101 tk | **-86%** | 26 µs |
|
|
107
|
+
| `cargo_build_noisy` | 2,106 tk | 452 tk | **-79%** | 194 µs |
|
|
108
|
+
| `docker_logs` | 665 tk | 186 tk | **-72%** | 39 µs |
|
|
109
|
+
| `find_deep` | 424 tk | 134 tk | **-68%** | 70 µs |
|
|
110
|
+
| `git_status` | 50 tk | 16 tk | **-68%** | 10 µs |
|
|
111
|
+
| `state_first_simulation` | 182 tk | 69 tk | **-62%** | 18 µs |
|
|
112
|
+
| `verbose_app_log` | 4,957 tk | 1,991 tk | **-60%** | 226 µs |
|
|
113
|
+
| `npm_install` | 524 tk | 232 tk | **-56%** | 37 µs |
|
|
114
|
+
| `claude_md_overhead` | 717 tk | 318 tk | **-56%** | 80 µs |
|
|
112
115
|
| `crosscall_redundancy_3x` | 486 tk | 241 tk | **-50%** | 51.5 ms |
|
|
113
|
-
| `ls_la` | 1,782 tk | 886 tk | **-50%** |
|
|
116
|
+
| `ls_la` | 1,782 tk | 886 tk | **-50%** | 159 µs |
|
|
114
117
|
| `env_dump` | 441 tk | 287 tk | **-35%** | 19 µs |
|
|
115
|
-
| `git_copilot` | 640 tk | 421 tk | **-34%** |
|
|
116
|
-
| `
|
|
117
|
-
| `
|
|
118
|
-
| `
|
|
119
|
-
| `
|
|
118
|
+
| `git_copilot` | 640 tk | 421 tk | **-34%** | 85 µs |
|
|
119
|
+
| `agent_heavy` | 2,306 tk | 1,564 tk | **-32%** | 303 µs |
|
|
120
|
+
| `md_prose` | 187 tk | 138 tk | **-26%** | 555 µs |
|
|
121
|
+
| `md_claude_md` | 316 tk | 247 tk | **-22%** | 881 µs |
|
|
122
|
+
| `git_diff` | 502 tk | 497 tk | **-1%** | 35 µs |
|
|
123
|
+
| `kubectl_pods` | 1,513 tk | 1,513 tk | **-0%** | 26 µs |
|
|
120
124
|
|
|
121
125
|
### Aggregate
|
|
122
126
|
|
|
123
127
|
| Metric | Value |
|
|
124
128
|
|--------|-------|
|
|
125
|
-
| **Total token reduction** | **
|
|
129
|
+
| **Total token reduction** | **91.9%** — 152,961 tk → 12,443 tk |
|
|
126
130
|
| Bash output | **-84.9%** |
|
|
127
131
|
| Markdown / context files | **-23.5%** |
|
|
128
132
|
| Wrap / cross-call engine | **-99.2%** |
|
|
129
|
-
| Quality (signal terms preserved) | **
|
|
130
|
-
| Latency p50 (filter mode) | **
|
|
131
|
-
| Latency p95 (incl. wrap/summarize) | **
|
|
133
|
+
| Quality (signal terms preserved) | **23 / 23 pass** |
|
|
134
|
+
| Latency p50 (filter mode) | **4.9 ms** |
|
|
135
|
+
| Latency p95 (incl. wrap/summarize) | **51 ms** |
|
|
132
136
|
|
|
133
137
|
### Estimated cost savings — Claude Sonnet 4.6 · $3.00 / MTok input
|
|
134
138
|
|
|
135
139
|
| Usage | Baseline / month | Saved / month |
|
|
136
140
|
|-------|-----------------|---------------|
|
|
137
|
-
| 100 calls / day | $18.00 | **$16.
|
|
138
|
-
| 1,000 calls / day | $180.00 | **$
|
|
139
|
-
| 10,000 calls / day | $1800.00 | **$
|
|
141
|
+
| 100 calls / day | $18.00 | **$16.54 (92%)** |
|
|
142
|
+
| 1,000 calls / day | $180.00 | **$165.37 (92%)** |
|
|
143
|
+
| 10,000 calls / day | $1800.00 | **$1653.66 (92%)** |
|
|
140
144
|
<!-- BENCHMARK:END -->
|
|
141
145
|
|
|
142
146
|
---
|
|
@@ -342,11 +346,11 @@ Each bash command passes through four strategies in order:
|
|
|
342
346
|
| Git | `git` |
|
|
343
347
|
| Docker / containers | `docker`, `docker-compose`, `podman` |
|
|
344
348
|
| Package managers | `npm`, `pnpm`, `bun`, `yarn` |
|
|
345
|
-
| Build systems | `make`, `cmake`, `gradle`, `mvn`, `xcodebuild`, `cargo` (build) |
|
|
346
|
-
| Test runners | `cargo test`, `jest`, `vitest`, `pytest`, `nextest` |
|
|
349
|
+
| Build systems | `make`, `cmake`, `gradle`, `mvn`, `xcodebuild`, `cargo` (build), `next build/dev/start` |
|
|
350
|
+
| Test runners | `cargo test`, `jest`, `vitest`, `pytest`, `nextest`, `playwright`, `bun test` |
|
|
347
351
|
| TypeScript / linters | `tsc`, `eslint`, `biome` |
|
|
348
|
-
| Cloud CLIs | `kubectl`, `gh`, `aws`, `gcloud`, `az` |
|
|
349
|
-
| Databases | `psql`, `prisma`, `mysql` |
|
|
352
|
+
| Cloud CLIs | `kubectl`, `gh`, `aws`, `gcloud`, `az`, `wrangler` |
|
|
353
|
+
| Databases | `psql`, `prisma`, `mysql`, `drizzle-kit` |
|
|
350
354
|
| Filesystem | `find`, `ls`, `du`, `ps`, `env`, `lsof`, `netstat` |
|
|
351
355
|
| JSON / YAML / IaC | `jq`, `yq`, `terraform`, `tofu`, `helm`, `pulumi` |
|
|
352
356
|
| Text processing | `grep`, `rg`, `awk`, `sed` |
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "squeez",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "1.2.0",
|
|
4
4
|
"description": "Hook-based token compressor for Claude Code, Copilot CLI, and OpenCode. Compresses bash output up to 95%, collapses redundant calls, injects caveman persona.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"claude-code",
|