@tokmizer/plugin 1.0.2 → 1.1.1

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.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tokmizer",
3
- "version": "1.0.2",
3
+ "version": "1.1.1",
4
4
  "description": "Tokmizer reduces token consumption for AI agents.",
5
5
  "author": {
6
6
  "name": "Tokmizer",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tokmizer",
3
- "version": "1.0.2",
3
+ "version": "1.1.1",
4
4
  "description": "Tokmizer reduces token consumption for OpenAI Codex.",
5
5
  "author": {
6
6
  "name": "Tokmizer",
package/README.md CHANGED
@@ -8,7 +8,7 @@ Free · no account · Claude Code, Codex, Cursor, Gemini CLI, Copilot and 16 mor
8
8
 
9
9
  [![npm](https://img.shields.io/npm/v/@tokmizer/plugin?label=npm&color=cb3837)](https://www.npmjs.com/package/@tokmizer/plugin)
10
10
  [![licence](https://img.shields.io/badge/licence-Apache--2.0%20%2B%20BUSL--1.1-blue)](https://github.com/norwelltw/Tokmizer/blob/main/packages/plugin/LICENSES.md)
11
- [![node](https://img.shields.io/badge/node-%E2%89%A5%2020.11-339933)](https://nodejs.org)
11
+ [![node](https://img.shields.io/badge/node-%E2%89%A5%2024.22.1-339933)](https://nodejs.org)
12
12
 
13
13
  [Website](https://tokmizer.com) · [Docs](https://tokmizer.com/en/docs) · [Benchmark vs rtk](https://tokmizer.com/en/compare/rtk) · [CI](https://tokmizer.com/en/ci)
14
14
 
@@ -77,7 +77,7 @@ curl -fsSL https://tokmizer.com/install.sh | bash
77
77
  tkr setup --all
78
78
  ```
79
79
 
80
- The script uses npm when Node.js 20.11+ is installed, and otherwise downloads a standalone build for macOS or Linux after checking its signature and SHA-256. Your shell profile is not touched.
80
+ The script uses npm when a patched Node.js (24.22.1+, or 22.23.4+) is installed, and otherwise downloads a standalone build for macOS or Linux after checking its signature and SHA-256. Your shell profile is not touched.
81
81
 
82
82
  <table>
83
83
  <tr><td><b>npm</b></td><td>
@@ -190,9 +190,9 @@ Agents check their allow, ask and deny rules against the command text. Tokmizer
190
190
 
191
191
  | Mode | What Tokmizer does |
192
192
  | --- | --- |
193
- | Default | Build and test commands (`npm test`, `cargo test`, `pytest`, `./gradlew build`…) are shortened before they run; Claude Code asks for them once, as it would anyway. Read-only commands (`ls`, `cat`, `git status`) run as typed, so Claude Code still approves them on its own, and their output is shortened once they succeed. Claude Code runs that after-command hook only for successful commands, so a failing read-only command reaches Claude in full. |
194
- | Default, with a narrow allow rule of yours | A single command typed on its own (no `&&`, `;`, pipe, redirection, `$( )` or wildcard) that one of your allow rules covers, such as `Bash(pytest:*)` in your user or managed settings, is rewritten too when no deny or ask rule matches. Tokmizer then gives the approval Claude Code would have given to the command as typed, so no new prompt appears. |
195
- | `bypassPermissions`, or a plain `Bash` allow rule | In `bypassPermissions` mode, or when a plain `Bash` allow rule in your user or managed settings applies and the session is in default, `acceptEdits` or `dontAsk` mode, every routed command is rewritten, and failing output is shortened too. |
193
+ | Default | Build and test commands (`npm test`, `cargo test`, `pytest`, `./gradlew build`…) are shortened before they run; Claude Code asks for them once, as it would anyway. Read-only commands (`ls`, `cat`, `git status`) run as typed, so Claude Code still approves them on its own, and their output is shortened once they succeed. |
194
+ | Default, with a narrow allow rule of yours such as `Bash(pytest:*)` | A single command it covers is rewritten too, with no new prompt. |
195
+ | `bypassPermissions`, or a plain `Bash` allow rule | Every routed command is rewritten, and failing output is shortened too. |
196
196
 
197
197
  Your deny and ask rules, `--disallowedTools`, `--settings`, managed policies and the claude.ai console rules always win. In a linked git worktree, commands that mention git run as typed so Claude Code's worktree check never refuses them.
198
198
 
@@ -210,11 +210,11 @@ Your deny and ask rules, `--disallowedTools`, `--settings`, managed policies and
210
210
  | `/power` | `$power` in Codex, `/power` in most agents | plan, build, test and ship a change in one go |
211
211
  | `/tkr` | `tkr settings show\|set\|configure` | every setting |
212
212
  | `/tkr-telemetry` | `tkr telemetry on\|off\|status` | usage stats |
213
- | `/tkr-link` | `tkr link <key>` | optional account: synced settings and a dashboard |
213
+ | `/tkr-link` | `tkr link <key>` | optional account: synced settings and a dashboard, up to 15 devices at once |
214
214
  | `/tkr-unlink` | `tkr unlink` | detach this machine from the account |
215
215
  | `/tkr-update` | npm, brew or auto-update | latest version |
216
216
 
217
- Also in the terminal: `tkr restore`, `tkr doctor [--fix]`, `tkr discover`, `tkr session`, `tkr network`, `tkr filters`, `tkr migrate rtk`, `tkr setup`, `tkr uninstall`. `tkr --help` lists everything.
217
+ Also in the terminal: `tkr restore`, `tkr doctor [--fix]`, `tkr discover`, `tkr session`, `tkr network`, `tkr filters`, `tkr migrate rtk`, `tkr setup`, `tkr uninstall`. `tkr help` lists everything.
218
218
 
219
219
  ## Compression modes
220
220
 
@@ -235,12 +235,12 @@ The **reducer** is separate: from the next session it asks the model to answer i
235
235
  ```bash
236
236
  tkr restore <hash> # the whole original output
237
237
  tkr restore <hash> --lines 120:180 # only some lines
238
- tkr restore <hash> --grep <pattern> # matching lines with their numbers
239
- tkr restore --grep <pattern> # search every cached output of this project
238
+ tkr restore <hash> --grep timeout # matching lines with their numbers
239
+ tkr restore --grep timeout # search every cached output of this project
240
240
  tkr restore --list # what is cached here; --all-projects for every project
241
241
  ```
242
242
 
243
- Copies stay on your machine. Entries are kept 30 days, up to 8 MB each and 200 MB in total; the oldest go first. Private keys, GitHub, npm, AWS, Slack and Stripe tokens, `Bearer` headers and passwords in URLs are masked before a copy is saved; what the agent sees is unchanged. `TOKMIZER_CCR_DISABLED=1` turns copies off.
243
+ Copies stay on your machine for 30 days, up to 8 MB each and 200 MB in total. Private keys, GitHub, npm, AWS, Slack and Stripe tokens, `Bearer` headers and passwords in URLs are masked before a copy is saved; what the agent sees is unchanged. `TOKMIZER_CCR_DISABLED=1` turns copies off.
244
244
 
245
245
  ## Measuring your own savings
246
246
 
@@ -263,28 +263,28 @@ Each view also takes `--project` and `--json`. `tkr gain` estimates command-outp
263
263
 
264
264
  | Agent | `/power` | Reducer |
265
265
  | --- | --- | --- |
266
- | Claude Code | native: `/power` command | native: SessionStart and UserPromptSubmit hooks |
267
- | Codex | skill `~/.agents/skills/power`, type `$power <request>` | native: SessionStart and UserPromptSubmit hooks (approve them in `/hooks`) |
268
- | Gemini CLI | native: `~/.gemini/commands/power.toml` | native: SessionStart and BeforeAgent hooks |
269
- | Cursor | skill `/power` (`~/.agents/skills`) | native: sessionStart hook (no per-prompt context hook exists) |
270
- | GitHub Copilot CLI | skill `/power` (`~/.agents/skills`) | native: sessionStart hook (per-prompt hook output is dropped by Copilot) |
271
- | Factory Droid | skill `/power` (`~/.agents/skills`) | native: SessionStart and UserPromptSubmit hooks |
272
- | Qwen Code | native: `~/.qwen/commands/power.md` | native: SessionStart and UserPromptSubmit hooks |
273
- | ZCode | skill `/power` (`~/.zcode/skills`) | native: SessionStart and UserPromptSubmit hooks |
274
- | Trae | not possible: no documented location for custom commands or skills | native: SessionStart and UserPromptSubmit hooks |
275
- | Antigravity | skill `/power` (`~/.gemini/config/skills`) | native: SessionStart hook (system message) |
276
- | Crush | skill `user:power` in the command palette (`~/.agents/skills`) | via rules: managed block in `~/.config/crush/CRUSH.md` (no session or prompt hook) |
277
- | Junie CLI | native: `~/.junie/commands/power.md` | via rules: managed block in `~/.junie/AGENTS.md` (session-start context is ignored) |
278
- | Grok Build | skill `/power` (`~/.grok/skills`) | via rules: managed block in `~/.grok/AGENTS.md` (hook output is ignored) |
279
- | Mistral Vibe | skill `/power` (`~/.vibe/skills`) | via rules: managed block in `~/.vibe/AGENTS.md` (no session or prompt hook) |
280
- | OpenCode | native: `~/.config/opencode/commands/power.md` | via plugin: system prompt, experimental `experimental.chat.system.transform` hook |
281
- | Kilo Code | native: `~/.config/kilo/commands/power.md` | via plugin: system prompt, experimental `experimental.chat.system.transform` hook |
282
- | Amp | skill `power` (`~/.agents/skills`); ask Amp to use it, Amp has no custom slash commands | via rules: managed block in `~/.config/amp/AGENTS.md` |
283
- | Pi | native: `~/.pi/agent/prompts/power.md` | via rules: managed block in `~/.pi/agent/APPEND_SYSTEM.md` |
284
- | Oh My Pi | native: `~/.omp/agent/commands/power.md` | via rules: managed block in `~/.omp/agent/APPEND_SYSTEM.md` |
285
- | Hermes | skill `/power` (`~/.hermes/skills`) | via plugin: system prompt section |
286
- | OpenClaw | skill `/power` (`~/.openclaw/skills`) | via plugin: `before_prompt_build`, once you set `plugins.entries.tokmizer.hooks.allowConversationAccess` to `true` |
287
- | Cline, Windsurf, Aider | not installed: these agents only get command shims and have no `tkr setup-<agent>` command | not installed |
266
+ | Claude Code | `/power` command | SessionStart and UserPromptSubmit hooks |
267
+ | Codex | skill `~/.agents/skills/power`, type `$power <request>` | SessionStart and UserPromptSubmit hooks |
268
+ | Gemini CLI | `~/.gemini/commands/power.toml` | SessionStart and BeforeAgent hooks |
269
+ | Cursor | skill `/power`, `~/.agents/skills` | sessionStart hook |
270
+ | GitHub Copilot CLI | skill `/power`, `~/.agents/skills` | sessionStart hook |
271
+ | Factory Droid | skill `/power`, `~/.agents/skills` | SessionStart and UserPromptSubmit hooks |
272
+ | Qwen Code | `~/.qwen/commands/power.md` | SessionStart and UserPromptSubmit hooks |
273
+ | ZCode | skill `/power`, `~/.zcode/skills` | SessionStart and UserPromptSubmit hooks |
274
+ | Trae | no documented location | SessionStart and UserPromptSubmit hooks |
275
+ | Antigravity | skill `/power`, `~/.gemini/config/skills` | SessionStart hook |
276
+ | Crush | skill `user:power`, `~/.agents/skills` | managed block in `~/.config/crush/CRUSH.md` |
277
+ | Junie CLI | `~/.junie/commands/power.md` | managed block in `~/.junie/AGENTS.md` |
278
+ | Grok Build | skill `/power`, `~/.grok/skills` | managed block in `~/.grok/AGENTS.md` |
279
+ | Mistral Vibe | skill `/power`, `~/.vibe/skills` | managed block in `~/.vibe/AGENTS.md` |
280
+ | OpenCode | `~/.config/opencode/commands/power.md` | plugin, experimental system prompt hook |
281
+ | Kilo Code | `~/.config/kilo/commands/power.md` | plugin, experimental system prompt hook |
282
+ | Amp | skill `power`, `~/.agents/skills`; ask Amp to use it | managed block in `~/.config/amp/AGENTS.md` |
283
+ | Pi | `~/.pi/agent/prompts/power.md` | managed block in `~/.pi/agent/APPEND_SYSTEM.md` |
284
+ | Oh My Pi | `~/.omp/agent/commands/power.md` | managed block in `~/.omp/agent/APPEND_SYSTEM.md` |
285
+ | Hermes | skill `/power`, `~/.hermes/skills` | plugin, system prompt section |
286
+ | OpenClaw | skill `/power`, `~/.openclaw/skills` | plugin, once `plugins.entries.tokmizer.hooks.allowConversationAccess` is `true` |
287
+ | Aider, Cline, Windsurf | not installed | not installed |
288
288
 
289
289
  </details>
290
290
 
@@ -355,16 +355,16 @@ tkr network off # stop every connection; compression keeps working with the
355
355
 
356
356
  | When | What is sent | Why |
357
357
  | --- | --- | --- |
358
- | First online run | A random install ID, computer name, OS and version, CPU model and core count, SHA-256 hashes of your network card address and user name, a fingerprint of these, your time zone and the plugin version | create the install token used to download rules |
359
- | `tkr link <key>` | The same, plus your key, and your email only with `--email` | attach this machine to your account |
358
+ | First online run | A random install ID, its SHA-256 hash (the fingerprint), your time zone, the plugin version and how it was installed (Claude Code, Codex, npm, npx, Homebrew or the install script, read from where it runs). Nothing that describes your machine: no computer name, OS, hardware or user name | create the install token used to download rules |
359
+ | `tkr link <key>` | The same, plus your key, and your email only with `--email` | attach this machine to your account (up to 15 connected at once) |
360
360
  | Check-in (heartbeat) | Install ID, fingerprint, plugin version, local date and time zone; while usage stats are on, install health counts such as outdated shims, broken hooks and repairs | refresh access, announce new versions, spot broken installs |
361
361
  | Rule downloads | Install ID, fingerprint, plugin version | latest rules, `/power` and reducer instructions |
362
362
  | Settings sync, linked accounts only | Your Tokmizer settings | keep them in sync with the dashboard |
363
- | Usage stats, only while on | Command names such as `npm install` (never arguments), token counts, rule IDs with output sizes, session ID, agent name | see which commands to optimize next |
363
+ | Usage stats, only while on | Command names such as `npm install` (never arguments), token counts, rule IDs with output sizes, session ID, agent name | see which commands to optimize next, and spot when compression gets worse to fix it before it reaches everyone |
364
364
  | `tkr unlink` | Install ID, fingerprint | remove this device from your account |
365
365
  | Self-update | `npm i -g @tokmizer/plugin@<version>` or `brew upgrade tokmizer` | keep the CLI current; `tkr auto-update off` stops it |
366
366
 
367
- The hashes are not anonymous: the same machine always gives the same values, and a user name hash can be guessed. Like any web server, `tokmizer.com` sees your IP address and keeps it in its security log. Usage stats are on by default; Tokmizer says so once before anything is sent, and turning them off survives updates. Detailed rows are kept 90 days, then only a running total. With the network off, Tokmizer uses the last downloaded rules for up to 7 days, then the rules built into the CLI. `tkr network off` does not cover Claude Code's own marketplace auto-update. Full policy: [tokmizer.com/en/privacy](https://tokmizer.com/en/privacy).
367
+ The install ID is drawn at random on first run and says nothing about your machine. Like any web server, `tokmizer.com` sees your IP address and keeps it in its security log. Usage stats are on by default; Tokmizer says so once before anything is sent, and turning them off survives updates. Detailed rows are kept 90 days, then only a running total. The server also keeps daily totals with no identifier: installs per day by plugin version and install channel, and commands, tokens and active installs per day. They cannot be linked to you and stay when you turn stats off or delete your account; your own data is still deleted. With the network off, Tokmizer uses the last downloaded rules for up to 7 days, then the rules built into the CLI. `tkr network off` does not cover Claude Code's own marketplace auto-update. Full policy: [tokmizer.com/en/privacy](https://tokmizer.com/en/privacy).
368
368
 
369
369
  </details>
370
370
 
@@ -379,7 +379,7 @@ In Claude Code: `/plugin uninstall tokmizer@tokmizer`. Your savings history stay
379
379
 
380
380
  ## Build from source
381
381
 
382
- Node.js 20.11+ and npm. The optional native launcher needs Rust.
382
+ Node.js 24.22.1+ (or 22.23.4+) and npm. The optional native launcher needs Rust.
383
383
 
384
384
  ```bash
385
385
  git clone https://github.com/norwelltw/Tokmizer
@@ -13,7 +13,7 @@ node "${CLAUDE_PLUGIN_ROOT}/dist/bin/tkr.js" status
13
13
 
14
14
  Print the output as is. It includes the network state, the token state, whether the device is linked and whether `/power` is available right now. Tokmizer is free: there is no plan or subscription to mention.
15
15
 
16
- If the user asks what Tokmizer sends over the network, answer plainly. No account or email is needed. Tokmizer contacts tokmizer.com to keep its rules up to date and to improve the product. It sends a random install ID, the computer name, OS and CPU model, a hash of the network card address and of the user name, and the plugin version. This is not anonymous: the same machine always gives the same values. Command contents and output are never sent. Usage stats (command names, token counts and install health counts) are on by default and sent only while they are on; `tkr telemetry off` stops them. Git and GitHub commands are recorded only as the tool and its action, such as `git push`.
16
+ If the user asks what Tokmizer sends over the network, answer plainly. No account or email is needed. Tokmizer contacts tokmizer.com to keep its rules up to date and to improve the product. It sends a random install ID, the plugin version and how it was installed (npm, Homebrew, Claude Code and so on), nothing that describes the machine: no computer name, OS, hardware or user name. Command contents and output are never sent. Usage stats (command names, token counts and install health counts) are on by default and sent only while they are on, to spot when compression gets worse and fix it before it reaches everyone; `tkr telemetry off` stops them. The server keeps daily totals with no identifier (installs per day by version and install channel, commands and tokens per day), which stay after stats are turned off. Git and GitHub commands are recorded only as the tool and its action, such as `git push`.
17
17
 
18
18
  If the output shows `Network: off`, explain that nothing leaves the machine and Tokmizer keeps compressing with the rules already on it. To turn it back on: `tkr network on`. To turn everything off: `tkr network off`; usage stats only: `tkr telemetry off`.
19
19