squeez 1.7.5 → 1.7.6

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 CHANGED
@@ -9,6 +9,20 @@ conventional commit messages on `main`.
9
9
 
10
10
  ## [Unreleased]
11
11
 
12
+ ## [1.7.5] - 2026-04-19
13
+
14
+ ### Changed
15
+ - chore(release): bump version to 1.7.5 [squeez-release-bot]
16
+ - docs: update changelog and benchmarks for v1.7.4
17
+ - chore(release): bump version to 1.7.4 [squeez-release-bot]
18
+ - perf: O(log n) refactor — tail read, offset index, single-pass parser
19
+ - docs: update changelog and benchmarks for v1.7.3
20
+ - chore(release): bump version to 1.7.3 [squeez-release-bot]
21
+
22
+ ### Fixed
23
+ - prevent OOM from unbounded file reads + data integrity fixes
24
+ - fix(ci): use native ubuntu-24.04-arm runner for aarch64 build
25
+
12
26
  ## [1.7.4] - 2026-04-19
13
27
 
14
28
  ### Changed
@@ -47,10 +61,11 @@ conventional commit messages on `main`.
47
61
  ## [1.5.1] and earlier
48
62
  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.
49
63
 
50
- [Unreleased]: https://github.com/claudioemmanuel/squeez/compare/v1.7.4...HEAD
64
+ [Unreleased]: https://github.com/claudioemmanuel/squeez/compare/v1.7.5...HEAD
51
65
  [1.7.0]: https://github.com/claudioemmanuel/squeez/compare/v1.6.1...v1.7.0
52
66
  [1.6.1]: https://github.com/claudioemmanuel/squeez/compare/v1.6.0...v1.6.1
53
67
  [1.6.0]: https://github.com/claudioemmanuel/squeez/compare/v1.5.2...v1.6.0
54
68
  [1.5.2]: https://github.com/claudioemmanuel/squeez/releases/tag/v1.5.2
55
69
  [1.7.3]: https://github.com/claudioemmanuel/squeez/compare/v1.7.2...v1.7.3
56
70
  [1.7.4]: https://github.com/claudioemmanuel/squeez/compare/v1.7.2...v1.7.4
71
+ [1.7.5]: https://github.com/claudioemmanuel/squeez/compare/v1.7.2...v1.7.5
package/README.md CHANGED
@@ -119,29 +119,29 @@ Measured on macOS (Apple Silicon). Token count = `chars / 4` (matches Claude's ~
119
119
 
120
120
  | Scenario | Before | After | Reduction | Latency |
121
121
  |----------|--------|-------|-----------|---------|
122
- | `summarize_huge` | 82,257 tk | 420 tk | **-99%** | 54.5 ms |
123
- | `repetitive_output` | 4,692 tk | 37 tk | **-99%** | 165 µs |
124
- | `high_context_adaptive` | 4,418 tk | 52 tk | **-99%** | 666 µs |
125
- | `ps_aux` | 40,373 tk | 2,352 tk | **-94%** | 2.3 ms |
126
- | `git_log_200` | 2,692 tk | 289 tk | **-89%** | 170 µs |
127
- | `tsc_errors` | 731 tk | 101 tk | **-86%** | 23 µs |
128
- | `cargo_build_noisy` | 2,106 tk | 452 tk | **-79%** | 225 µs |
129
- | `docker_logs` | 665 tk | 186 tk | **-72%** | 36 µs |
130
- | `find_deep` | 424 tk | 134 tk | **-68%** | 70 µs |
131
- | `git_status` | 50 tk | 16 tk | **-68%** | 9 µs |
132
- | `state_first_simulation` | 182 tk | 69 tk | **-62%** | 10 µs |
133
- | `verbose_app_log` | 4,957 tk | 1,991 tk | **-60%** | 257 µs |
134
- | `npm_install` | 524 tk | 232 tk | **-56%** | 37 µs |
135
- | `claude_md_overhead` | 717 tk | 318 tk | **-56%** | 335 µs |
136
- | `crosscall_redundancy_3x` | 486 tk | 241 tk | **-50%** | 51.2 ms |
137
- | `ls_la` | 1,782 tk | 886 tk | **-50%** | 185 µs |
138
- | `env_dump` | 441 tk | 287 tk | **-35%** | 22 µs |
139
- | `git_copilot` | 640 tk | 421 tk | **-34%** | 88 µs |
140
- | `agent_heavy` | 2,306 tk | 1,564 tk | **-32%** | 336 µs |
141
- | `md_prose` | 187 tk | 138 tk | **-26%** | 549 µs |
142
- | `md_claude_md` | 316 tk | 247 tk | **-22%** | 1.0 ms |
143
- | `git_diff` | 502 tk | 497 tk | **-1%** | 33 µs |
144
- | `kubectl_pods` | 1,513 tk | 1,513 tk | **-0%** | 21 µs |
122
+ | `summarize_huge` | 82,257 tk | 420 tk | **-99%** | 55.9 ms |
123
+ | `repetitive_output` | 4,692 tk | 37 tk | **-99%** | 207 µs |
124
+ | `high_context_adaptive` | 4,418 tk | 52 tk | **-99%** | 819 µs |
125
+ | `ps_aux` | 40,373 tk | 2,352 tk | **-94%** | 2.8 ms |
126
+ | `git_log_200` | 2,692 tk | 289 tk | **-89%** | 227 µs |
127
+ | `tsc_errors` | 731 tk | 101 tk | **-86%** | 27 µs |
128
+ | `cargo_build_noisy` | 2,106 tk | 452 tk | **-79%** | 253 µs |
129
+ | `docker_logs` | 665 tk | 186 tk | **-72%** | 45 µs |
130
+ | `find_deep` | 424 tk | 134 tk | **-68%** | 81 µs |
131
+ | `git_status` | 50 tk | 16 tk | **-68%** | 12 µs |
132
+ | `state_first_simulation` | 182 tk | 69 tk | **-62%** | 12 µs |
133
+ | `verbose_app_log` | 4,957 tk | 1,991 tk | **-60%** | 304 µs |
134
+ | `npm_install` | 524 tk | 232 tk | **-56%** | 48 µs |
135
+ | `claude_md_overhead` | 717 tk | 318 tk | **-56%** | 356 µs |
136
+ | `crosscall_redundancy_3x` | 486 tk | 241 tk | **-50%** | 51.5 ms |
137
+ | `ls_la` | 1,782 tk | 886 tk | **-50%** | 213 µs |
138
+ | `env_dump` | 441 tk | 287 tk | **-35%** | 24 µs |
139
+ | `git_copilot` | 640 tk | 421 tk | **-34%** | 104 µs |
140
+ | `agent_heavy` | 2,306 tk | 1,564 tk | **-32%** | 396 µs |
141
+ | `md_prose` | 187 tk | 138 tk | **-26%** | 674 µs |
142
+ | `md_claude_md` | 316 tk | 247 tk | **-22%** | 1.3 ms |
143
+ | `git_diff` | 502 tk | 497 tk | **-1%** | 42 µs |
144
+ | `kubectl_pods` | 1,513 tk | 1,513 tk | **-0%** | 29 µs |
145
145
 
146
146
  ### Aggregate
147
147
 
@@ -152,8 +152,8 @@ Measured on macOS (Apple Silicon). Token count = `chars / 4` (matches Claude's ~
152
152
  | Markdown / context files | **-23.5%** |
153
153
  | Wrap / cross-call engine | **-99.2%** |
154
154
  | Quality (signal terms preserved) | **23 / 23 pass** |
155
- | Latency p50 (filter mode) | **4.9 ms** |
156
- | Latency p95 (incl. wrap/summarize) | **51 ms** |
155
+ | Latency p50 (filter mode) | **5.0 ms** |
156
+ | Latency p95 (incl. wrap/summarize) | **52 ms** |
157
157
 
158
158
  ### Estimated cost savings — Claude Sonnet 4.6 · $3.00 / MTok input
159
159
 
package/install.js CHANGED
@@ -111,11 +111,28 @@ async function main() {
111
111
  function registerHooks() {
112
112
  const settingsPath = path.join(os.homedir(), '.claude', 'settings.json');
113
113
  let settings = {};
114
- try {
115
- if (fs.existsSync(settingsPath)) {
116
- settings = JSON.parse(fs.readFileSync(settingsPath, 'utf8'));
114
+ const fileExisted = fs.existsSync(settingsPath);
115
+ if (fileExisted) {
116
+ let raw;
117
+ try {
118
+ raw = fs.readFileSync(settingsPath, 'utf8');
119
+ if (raw.charCodeAt(0) === 0xFEFF) raw = raw.slice(1); // strip BOM
120
+ } catch (err) {
121
+ warn(`could not read ${settingsPath}: ${err.message} — skipping hook registration.`);
122
+ return;
117
123
  }
118
- } catch (_) {}
124
+ try {
125
+ settings = JSON.parse(raw);
126
+ } catch (err) {
127
+ warn(`refusing to overwrite ${settingsPath}: could not parse existing JSON (${err.message}).`);
128
+ warn(`fix or remove the file, then re-run: squeez setup`);
129
+ return;
130
+ }
131
+ if (typeof settings !== 'object' || settings === null || Array.isArray(settings)) {
132
+ warn(`refusing to overwrite ${settingsPath}: top-level value is not a JSON object.`);
133
+ return;
134
+ }
135
+ }
119
136
 
120
137
  let changed = false;
121
138
 
@@ -153,6 +170,9 @@ function registerHooks() {
153
170
 
154
171
  if (changed) {
155
172
  try {
173
+ if (fileExisted) {
174
+ try { fs.copyFileSync(settingsPath, settingsPath + '.bak'); } catch (_) {}
175
+ }
156
176
  fs.writeFileSync(settingsPath + '.tmp', JSON.stringify(settings, null, 2));
157
177
  fs.renameSync(settingsPath + '.tmp', settingsPath);
158
178
  log('Claude Code hooks registered.');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "squeez",
3
- "version": "1.7.5",
3
+ "version": "1.7.6",
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",