squeez 1.8.0 → 1.10.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/README.md +39 -0
- package/package.json +1 -1
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 -->
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "squeez",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.10.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",
|