@tokmizer/plugin 0.9.51 → 0.9.53

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": "0.9.51",
3
+ "version": "0.9.53",
4
4
  "description": "Tokmizer reduces token consumption for AI agents.",
5
5
  "author": {
6
6
  "name": "Tokmizer",
package/README.md CHANGED
@@ -83,7 +83,11 @@ From any terminal (after the shell-shim install, or `npm install -g @tokmizer/pl
83
83
 
84
84
  ## Choosing a compression mode
85
85
 
86
- Choose `light` for gentle reduction, `balanced` (the default) for more compact output, or `max` for the strongest standard reduction. The aliases `normal`, `compact`, and `minimal` map to these levels respectively. Short or exact output can be identical across levels. Recognized failures retain their content apart from terminal colors.
86
+ Choose `light` for gentle reduction, `balanced` (the default) for more compact output, or `max` for the strongest standard reduction. The aliases `normal`, `compact`, and `minimal` map to these levels respectively. Short or exact output can be identical across levels.
87
+
88
+ In the next release, Light keeps recognized file reads complete by default, including large reads. Balanced and Max can still fold code bodies in large files. Choose Light when you need implementation details. Explicit outlining remains available to callers that request it. Host limits and the CLI's output buffer still apply.
89
+
90
+ Since 0.9.52, short code reads and small explicit excerpts stay complete by default in all three standard modes. Larger reads can still be shortened. Recognized failures retain their diagnostics; Max can summarize repeated log lines with an occurrence count. Distinct diagnostic messages and command exit codes are preserved.
87
91
 
88
92
  Without a linked account, standard settings stay on this machine and work offline after initial activation. With a linked account, changes require a connection and sync across machines. Linking an account restores its server settings.
89
93
 
@@ -106,10 +110,16 @@ Terminal commands managed by Tokmizer use the mode selected when execution start
106
110
 
107
111
  `tkr gain` measures output size before and after compression and estimates tokens as UTF-8 bytes divided by four. Token and cost figures are estimates about command output, not your actual bill or a measure of task quality or completion speed.
108
112
 
113
+ In the next release, successful `tkr restore` calls are counted as additional output in the local gain history, even with telemetry disabled. They reduce the net saving; repeated restorations count again and can make it negative. The display shows restored tokens separately. `gain --json` exposes the net estimate in `observed.savedTokens` and restoration totals in `restoration`; the existing top-level `savedTokens` remains the total for reduced outputs only. Earlier restorations cannot be reconstructed from local history. Manually repeated commands, prompts, replies and replayed conversation context are not attributed to restoration costs.
114
+
115
+ The percentages in `tkr gain` measure byte reduction. A byte percentage can differ substantially from the reduction counted by a model's tokenizer. Restoring a full file after reading its outline can cost more tokens than reading it once. Compression is not a promise of faster task completion or a correct answer.
116
+
109
117
  ## Measured comparison
110
118
 
111
119
  On October 9, 2026, a fixed set of 30 real and synthetic command outputs contained 774,863 tokens before compression. The table counts tokens with the cl100k tokenizer, excluding restoration notices. It is a test corpus, not a sample of customer usage.
112
120
 
121
+ These are historical results for the earlier mode behavior, not measurements of the upcoming Light read policy.
122
+
113
123
  | Mode | Output tokens | Preservation checks passed |
114
124
  | --- | ---: | ---: |
115
125
  | `light` | 112,816 | 85 / 85 |
@@ -123,6 +133,8 @@ The result also depends on the output. In a separate set of five JSON examples,
123
133
 
124
134
  In one real failed test, `max` kept 302 tokens and YOLO kept 77. Both retained the actual and expected values. YOLO removed the explanation about invoice 42 and the location `payment.test.mjs:4:10`, which were retained by `max`. That missing context can matter when fixing the failure.
125
135
 
136
+ In a separate controlled test for 0.9.52, a repetitive failure log went from 1,094 to 84 tokens in Max (92.3% fewer, counted with cl100k). Every distinct diagnostic and the repetition counts were retained. This result applies to that example, not to typical usage.
137
+
126
138
  These tokenizer counts are separate from the byte-based estimates in `tkr gain`. They measure output volume, not your bill, an agent's task success, or execution speed. See the [mode guide](https://tokmizer.com/en/docs#configuration) for usage and limits.
127
139
 
128
140
  ## Distribution
@@ -137,6 +149,9 @@ The optimization engine and API client ship compiled with [`@tokmizer/plugin`](h
137
149
  ## Privacy
138
150
 
139
151
  - When telemetry is enabled, Tokmizer reports command names, usage counters, and session metadata, without your source code, arguments, or command output. Turn it off with `tkr telemetry off`.
152
+ - In 0.9.52, telemetry defaults to on unless setup or saved settings turn it off. Check `tkr telemetry status`; using Tokmizer without an account does not itself disable telemetry.
153
+ - Turning telemetry off stops optional usage reporting. Initial activation, rule downloads, update checks and account synchronization are separate network operations. Activation includes device and installation metadata. Offline use requires previously downloaded rules and is subject to cache availability and expiry.
154
+ - Restoration copies are local and temporary. A restore hint identifies available cached content; there is no guarantee that every removed detail has a saved copy. YOLO creates no new restoration copies.
140
155
  - The public [redaction helpers](https://github.com/norwelltw/Tokmizer/blob/main/src/learn/redact.ts) are available for inspection.
141
156
  - Local state lives in `~/.tokmizer/`.
142
157
 
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tokmizer",
3
- "version": "0.9.51",
3
+ "version": "0.9.53",
4
4
  "description": "Tokmizer reduces token consumption for OpenAI Codex.",
5
5
  "author": "Tokmizer",
6
6
  "homepage": "https://tokmizer.com"
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  description: Show estimated token reductions in recorded tool outputs.
3
- argument-hint: [--day | --week]
3
+ argument-hint: [--day | --week | --month]
4
4
  ---
5
5
 
6
6
  Show the user Tokmizer's recorded tool-output reductions.
@@ -13,12 +13,13 @@ node "${CLAUDE_PLUGIN_ROOT}/dist/bin/tkr.js" gain
13
13
 
14
14
  Choose the scope the user requested:
15
15
 
16
- - Default: `gain` for the retained local history.
16
+ - Default: `gain` for all recorded activity, with today, last 7 days and all-time lines.
17
17
  - Today or `--day`: `gain --day` for the current local calendar day.
18
18
  - Last seven days or `--week`: `gain --week`.
19
+ - Last thirty days or `--month`: `gain --month`.
19
20
  - This session: `session` for session coverage. This command reports routing counts, not token or dollar savings.
20
21
 
21
- Print the output as is, including its measurement scope and caveats. Token counts are estimates from output bytes, not model tokenizer counts. Dollar values use reference input prices and do not measure a bill reduction. Percentages apply only to the recorded tool outputs, not all tokens used by the agent.
22
+ Show the CLI output verbatim inside a fenced code block: do not summarize, translate, reformat or rebuild it as a table. After the block, add at most one short sentence. Keep its measurement scope and caveats. Token counts are estimates from output bytes, not model tokenizer counts. Dollar values use reference input prices and do not measure a bill reduction. Percentages apply only to the recorded tool outputs, not all tokens used by the agent.
22
23
 
23
24
  Keep modeled reducer estimates separate from observed output reductions. Do not add them together, invent replay or repeated-context savings, or infer avoided model calls. Do not turn a period's estimate into a monthly projection or paid-plan payback. A comparison with another optimizer requires measurements on the same workload; these local totals alone do not establish one.
24
25