squeez 1.9.0 → 1.11.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 +36 -1
- package/README.md +62 -23
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -9,6 +9,39 @@ conventional commit messages on `main`.
|
|
|
9
9
|
|
|
10
10
|
## [Unreleased]
|
|
11
11
|
|
|
12
|
+
## [1.10.0] - 2026-04-22
|
|
13
|
+
|
|
14
|
+
### Added
|
|
15
|
+
- feat(fs): auto-compress cat'd markdown via compress_md pipeline (#88)
|
|
16
|
+
- feat(economy): compress Agent/Task prompt at PreToolUse time (#87)
|
|
17
|
+
- feat(handlers): xcodebuild noise filter + log-file tail detection (#84)
|
|
18
|
+
|
|
19
|
+
### Changed
|
|
20
|
+
- chore(release): bump version to 1.10.0 [squeez-release-bot]
|
|
21
|
+
- docs(readme): document squeez's compression scope and architectural limits (#85)
|
|
22
|
+
- chore(release): bump version to 1.9.0 [squeez-release-bot]
|
|
23
|
+
- chore(release): bump version to 1.8.0 [squeez-release-bot]
|
|
24
|
+
- docs: update changelog and benchmarks for v1.7.7
|
|
25
|
+
- chore(release): bump version to 1.7.7 [squeez-release-bot]
|
|
26
|
+
- docs: update changelog and benchmarks for v1.7.6
|
|
27
|
+
- chore(release): bump version to 1.7.6 [squeez-release-bot]
|
|
28
|
+
- docs: update changelog and benchmarks for v1.7.5
|
|
29
|
+
- chore(release): bump version to 1.7.5 [squeez-release-bot]
|
|
30
|
+
- docs: update changelog and benchmarks for v1.7.4
|
|
31
|
+
- chore(release): bump version to 1.7.4 [squeez-release-bot]
|
|
32
|
+
- perf: O(log n) refactor — tail read, offset index, single-pass parser
|
|
33
|
+
- docs: update changelog and benchmarks for v1.7.3
|
|
34
|
+
- chore(release): bump version to 1.7.3 [squeez-release-bot]
|
|
35
|
+
|
|
36
|
+
### Fixed
|
|
37
|
+
- fix(hosts): expand PreToolUse matcher to cover Read, Grep, Glob, Agent, Task (#86)
|
|
38
|
+
- fix(json_util,statusline): whitespace-tolerant JSON parser + UTF-8 statusline on Windows (#81)
|
|
39
|
+
- fix(hosts): preserve user settings.json when existing JSON fails to parse (#83)
|
|
40
|
+
- prevent OOM from unbounded file reads + data integrity fixes
|
|
41
|
+
- fix(ci): use native ubuntu-24.04-arm runner for aarch64 build
|
|
42
|
+
|
|
43
|
+
## [1.9.0] - 2026-04-22
|
|
44
|
+
|
|
12
45
|
## [1.7.7] - 2026-04-21
|
|
13
46
|
|
|
14
47
|
### Changed
|
|
@@ -98,7 +131,7 @@ conventional commit messages on `main`.
|
|
|
98
131
|
## [1.5.1] and earlier
|
|
99
132
|
See the [git tag history](https://github.com/claudioemmanuel/squeez/tags) for pre-1.5.2 details. release-please takes over changelog generation from 1.7.1 onwards.
|
|
100
133
|
|
|
101
|
-
[Unreleased]: https://github.com/claudioemmanuel/squeez/compare/v1.
|
|
134
|
+
[Unreleased]: https://github.com/claudioemmanuel/squeez/compare/v1.10.0...HEAD
|
|
102
135
|
[1.7.0]: https://github.com/claudioemmanuel/squeez/compare/v1.6.1...v1.7.0
|
|
103
136
|
[1.6.1]: https://github.com/claudioemmanuel/squeez/compare/v1.6.0...v1.6.1
|
|
104
137
|
[1.6.0]: https://github.com/claudioemmanuel/squeez/compare/v1.5.2...v1.6.0
|
|
@@ -108,3 +141,5 @@ See the [git tag history](https://github.com/claudioemmanuel/squeez/tags) for pr
|
|
|
108
141
|
[1.7.5]: https://github.com/claudioemmanuel/squeez/compare/v1.7.2...v1.7.5
|
|
109
142
|
[1.7.6]: https://github.com/claudioemmanuel/squeez/compare/v1.7.2...v1.7.6
|
|
110
143
|
[1.7.7]: https://github.com/claudioemmanuel/squeez/compare/v1.7.2...v1.7.7
|
|
144
|
+
[1.9.0]: https://github.com/claudioemmanuel/squeez/compare/v1.10.0...v1.9.0
|
|
145
|
+
[1.10.0]: https://github.com/claudioemmanuel/squeez/compare/v1.7.2...v1.10.0
|
package/README.md
CHANGED
|
@@ -110,6 +110,45 @@ squeez update --insecure # skip checksum (not recommended)
|
|
|
110
110
|
|
|
111
111
|
---
|
|
112
112
|
|
|
113
|
+
## Scope & Limits
|
|
114
|
+
|
|
115
|
+
squeez optimizes what it can reach — the surfaces exposed by each host's hook API. It cannot fix token leaks outside those surfaces.
|
|
116
|
+
|
|
117
|
+
### Coverage table
|
|
118
|
+
|
|
119
|
+
| Surface | How | When | Supported hosts |
|
|
120
|
+
|---|---|---|---|
|
|
121
|
+
| **Bash stdout/stderr** | `PreToolUse` wraps command w/ 4-stage pipeline (smart-filter → dedup → grouping → truncation) | Every Bash invocation | all 5 |
|
|
122
|
+
| **Read / Grep / Glob limits** | `PreToolUse` injects `limit` / `head_limit` per `read_max_lines` / `grep_max_results` | Every Read/Grep/Glob call | Claude Code, Copilot, OpenCode (hard); Gemini + Codex soft via GEMINI.md / AGENTS.md |
|
|
123
|
+
| **Agent / Task prompt** | `PreToolUse` compresses `tool_input.prompt` (markdown-aware, via `compress-prompt`) | When prompt > `agent_prompt_max_tokens` | Claude Code (post–v1.8.0) |
|
|
124
|
+
| **Session memory** | `SessionStart` injects prior session summary + file-access cache | Once per session start | all 5 |
|
|
125
|
+
| **Markdown viewing** | Bash handler routes `.md` reads through `compress-md` when `auto_compress_md=true` | Viewer commands on .md paths | all 5 |
|
|
126
|
+
|
|
127
|
+
### What squeez CANNOT compress
|
|
128
|
+
|
|
129
|
+
**Agent/Task returned output.** `PostToolUse` hooks are observation-only — squeez sees the result *after* the model has received it. No hook API surface exists to rewrite an Agent's return value. Workaround: keep agent prompts compact (squeez compresses at dispatch time), and use `squeez_agent_costs` MCP tool to monitor spawn overhead.
|
|
130
|
+
|
|
131
|
+
**Skills & slash-command files.** Claude Code loads these into the system prompt before any hook fires. squeez has no visibility into session-start system prompt construction.
|
|
132
|
+
|
|
133
|
+
**User's top-level prompt.** squeez runs per tool call, not on user turns.
|
|
134
|
+
|
|
135
|
+
**Tools whose host doesn't expose PreToolUse / BeforeTool.** E.g. Codex `PreToolUse` today only fires on Bash (tracked upstream at [openai/codex#18491](https://github.com/openai/codex/issues/18491)), so Read/Grep caps for Codex are soft hints in AGENTS.md, not hard injections.
|
|
136
|
+
|
|
137
|
+
### Secondary wins (not compression, but token-saving)
|
|
138
|
+
|
|
139
|
+
- **Cross-call redundancy dedup** — exact-hash and fuzzy-trigram collapsing across 16 recent calls (see [Context engine](#what-it-does))
|
|
140
|
+
- **File-access cache** — subsequent Bash commands trimmed when re-reading a file squeez has already fingerprinted
|
|
141
|
+
- **Burn-rate warnings** — `[budget: ~N calls left]` nudges so the user changes behavior before context pressure spikes
|
|
142
|
+
|
|
143
|
+
### Reducing overall session cost
|
|
144
|
+
|
|
145
|
+
squeez cannot automate these, but you can:
|
|
146
|
+
- Fewer Agent/Task dispatches per session → use `squeez_agent_costs` to track, then refactor tasks to batch work
|
|
147
|
+
- Smaller prompts injected into agents → squeez compresses them at dispatch, but smaller is better
|
|
148
|
+
- Shorter CLAUDE.md / AGENTS.md files → run `squeez compress-md --ultra` to drop abbreviations and filler
|
|
149
|
+
|
|
150
|
+
---
|
|
151
|
+
|
|
113
152
|
## Benchmarks
|
|
114
153
|
|
|
115
154
|
<!-- BENCHMARK:START -->
|
|
@@ -119,49 +158,49 @@ Measured on macOS (Apple Silicon). Token count = `chars / 4` (matches Claude's ~
|
|
|
119
158
|
|
|
120
159
|
| Scenario | Before | After | Reduction | Latency |
|
|
121
160
|
|----------|--------|-------|-----------|---------|
|
|
122
|
-
| `summarize_huge` | 82,257 tk | 420 tk | **-99%** | 55.
|
|
123
|
-
| `repetitive_output` | 4,692 tk | 37 tk | **-99%** |
|
|
124
|
-
| `high_context_adaptive` | 4,418 tk | 52 tk | **-99%** |
|
|
161
|
+
| `summarize_huge` | 82,257 tk | 420 tk | **-99%** | 55.7 ms |
|
|
162
|
+
| `repetitive_output` | 4,692 tk | 37 tk | **-99%** | 211 µs |
|
|
163
|
+
| `high_context_adaptive` | 4,418 tk | 52 tk | **-99%** | 791 µs |
|
|
125
164
|
| `ps_aux` | 40,373 tk | 2,352 tk | **-94%** | 2.7 ms |
|
|
126
|
-
| `git_log_200` | 2,692 tk | 289 tk | **-89%** |
|
|
127
|
-
| `tsc_errors` | 731 tk | 101 tk | **-86%** |
|
|
128
|
-
| `cargo_build_noisy` | 2,106 tk | 452 tk | **-79%** |
|
|
129
|
-
| `docker_logs` | 665 tk | 186 tk | **-72%** |
|
|
130
|
-
| `find_deep` | 424 tk | 134 tk | **-68%** |
|
|
165
|
+
| `git_log_200` | 2,692 tk | 289 tk | **-89%** | 218 µs |
|
|
166
|
+
| `tsc_errors` | 731 tk | 101 tk | **-86%** | 30 µs |
|
|
167
|
+
| `cargo_build_noisy` | 2,106 tk | 452 tk | **-79%** | 247 µs |
|
|
168
|
+
| `docker_logs` | 665 tk | 186 tk | **-72%** | 49 µs |
|
|
169
|
+
| `find_deep` | 424 tk | 134 tk | **-68%** | 83 µs |
|
|
131
170
|
| `git_status` | 50 tk | 16 tk | **-68%** | 11 µs |
|
|
132
|
-
| `
|
|
133
|
-
| `verbose_app_log` | 4,957 tk | 1,991 tk | **-60%** | 289 µs |
|
|
171
|
+
| `verbose_app_log` | 4,957 tk | 1,991 tk | **-60%** | 287 µs |
|
|
134
172
|
| `npm_install` | 524 tk | 232 tk | **-56%** | 45 µs |
|
|
135
|
-
| `
|
|
136
|
-
| `crosscall_redundancy_3x` | 486 tk | 241 tk | **-50%** | 51.5 ms |
|
|
173
|
+
| `crosscall_redundancy_3x` | 486 tk | 241 tk | **-50%** | 51.6 ms |
|
|
137
174
|
| `ls_la` | 1,782 tk | 886 tk | **-50%** | 208 µs |
|
|
138
|
-
| `env_dump` | 441 tk | 287 tk | **-35%** |
|
|
175
|
+
| `env_dump` | 441 tk | 287 tk | **-35%** | 23 µs |
|
|
139
176
|
| `git_copilot` | 640 tk | 421 tk | **-34%** | 104 µs |
|
|
140
|
-
| `agent_heavy` | 2,306 tk | 1,564 tk | **-32%** |
|
|
141
|
-
| `md_prose` | 187 tk | 138 tk | **-26%** |
|
|
142
|
-
| `md_claude_md` | 316 tk | 247 tk | **-22%** | 1.
|
|
143
|
-
| `
|
|
144
|
-
| `
|
|
177
|
+
| `agent_heavy` | 2,306 tk | 1,564 tk | **-32%** | 386 µs |
|
|
178
|
+
| `md_prose` | 187 tk | 138 tk | **-26%** | 657 µs |
|
|
179
|
+
| `md_claude_md` | 316 tk | 247 tk | **-22%** | 1.2 ms |
|
|
180
|
+
| `claude_md_overhead` | 717 tk | 649 tk | **-9%** | 22 µs |
|
|
181
|
+
| `git_diff` | 502 tk | 497 tk | **-1%** | 41 µs |
|
|
182
|
+
| `state_first_simulation` | 182 tk | 181 tk | **-1%** | 5 µs |
|
|
183
|
+
| `kubectl_pods` | 1,513 tk | 1,513 tk | **-0%** | 25 µs |
|
|
145
184
|
|
|
146
185
|
### Aggregate
|
|
147
186
|
|
|
148
187
|
| Metric | Value |
|
|
149
188
|
|--------|-------|
|
|
150
|
-
| **Total token reduction** | **91.
|
|
189
|
+
| **Total token reduction** | **91.6%** — 152,961 tk → 12,886 tk |
|
|
151
190
|
| Bash output | **-84.9%** |
|
|
152
191
|
| Markdown / context files | **-23.5%** |
|
|
153
192
|
| Wrap / cross-call engine | **-99.2%** |
|
|
154
193
|
| Quality (signal terms preserved) | **23 / 23 pass** |
|
|
155
194
|
| Latency p50 (filter mode) | **5.0 ms** |
|
|
156
|
-
| Latency p95 (incl. wrap/summarize) | **
|
|
195
|
+
| Latency p95 (incl. wrap/summarize) | **52 ms** |
|
|
157
196
|
|
|
158
197
|
### Estimated cost savings — Claude Sonnet 4.6 · $3.00 / MTok input
|
|
159
198
|
|
|
160
199
|
| Usage | Baseline / month | Saved / month |
|
|
161
200
|
|-------|-----------------|---------------|
|
|
162
|
-
| 100 calls / day | $18.00 | **$16.
|
|
163
|
-
| 1,000 calls / day | $180.00 | **$
|
|
164
|
-
| 10,000 calls / day | $1800.00 | **$
|
|
201
|
+
| 100 calls / day | $18.00 | **$16.48 (92%)** |
|
|
202
|
+
| 1,000 calls / day | $180.00 | **$164.84 (92%)** |
|
|
203
|
+
| 10,000 calls / day | $1800.00 | **$1648.44 (92%)** |
|
|
165
204
|
<!-- BENCHMARK:END -->
|
|
166
205
|
|
|
167
206
|
---
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "squeez",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.11.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",
|