@tokmizer/plugin 0.9.66 → 0.9.68

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.
Files changed (37) hide show
  1. package/.claude-plugin/plugin.json +1 -1
  2. package/.codex-plugin/plugin.json +1 -1
  3. package/dist/bin/tkr-agent-hook.js +53 -9
  4. package/dist/bin/tkr-codex-hook.js +72 -70
  5. package/dist/bin/tkr-copilot-hook.js +53 -9
  6. package/dist/bin/tkr-crush-hook.js +53 -9
  7. package/dist/bin/tkr-cursor-hook.js +52 -8
  8. package/dist/bin/tkr-daemon.js +131 -129
  9. package/dist/bin/tkr-droid-hook.js +53 -9
  10. package/dist/bin/tkr-exec +0 -0
  11. package/dist/bin/tkr-exec.js +79 -77
  12. package/dist/bin/tkr-gemini-hook.js +52 -8
  13. package/dist/bin/tkr-grok-hook.js +53 -9
  14. package/dist/bin/tkr-junie-hook.js +53 -9
  15. package/dist/bin/tkr-processor.js +97 -95
  16. package/dist/bin/tkr-qwen-hook.js +53 -9
  17. package/dist/bin/tkr-shim.js +80 -78
  18. package/dist/bin/tkr-trae-hook.js +53 -9
  19. package/dist/bin/tkr-zcode-hook.js +53 -9
  20. package/dist/bin/tkr.js +263 -260
  21. package/dist/hooks-host/post-tool-use.js +91 -89
  22. package/dist/hooks-host/pre-tool-use.js +53 -9
  23. package/dist/hooks-host/reducer-stop.js +24 -24
  24. package/dist/hooks-host/session-recap.js +5 -4
  25. package/dist/index.js +87 -85
  26. package/dist/native/manifest.json +12 -12
  27. package/dist/native/single.json +12 -12
  28. package/dist/native/tkr-exec-darwin-arm64 +0 -0
  29. package/dist/native/tkr-exec-darwin-x64 +0 -0
  30. package/dist/native/tkr-exec-linux-arm64 +0 -0
  31. package/dist/native/tkr-exec-linux-x64 +0 -0
  32. package/dist/native/tkr-exec-win32-arm64.exe +0 -0
  33. package/dist/native/tkr-exec-win32-x64.exe +0 -0
  34. package/hooks/hooks.json +7 -2
  35. package/hooks/on-session-start.mjs +12 -0
  36. package/package.json +7 -7
  37. package/scripts/install-native.mjs +7 -3
@@ -1,32 +1,32 @@
1
1
  {
2
2
  "darwin-arm64": {
3
- "version": "0.9.66",
3
+ "version": "0.9.68",
4
4
  "file": "tkr-exec-darwin-arm64",
5
- "sha256": "fcd2ced9066aede941b8605011512364e9dcd3d2f61b2e94d45ce119aff59d18"
5
+ "sha256": "cc848513cc2bfdae0f8e2d2d751b43d7ffc668fec9d27194be5ffa80a854cdf6"
6
6
  },
7
7
  "darwin-x64": {
8
- "version": "0.9.66",
8
+ "version": "0.9.68",
9
9
  "file": "tkr-exec-darwin-x64",
10
- "sha256": "b342270fc372bf1b96cf764f6295884e120c10fcc5b535c1b98528fd825b6a96"
10
+ "sha256": "6143e4d90cee2fec3d2a3c4d4eebab0a5c52939287cc141daafe75d31f5bc259"
11
11
  },
12
12
  "linux-arm64": {
13
- "version": "0.9.66",
13
+ "version": "0.9.68",
14
14
  "file": "tkr-exec-linux-arm64",
15
- "sha256": "552de68d8873d429b849c30c93437a9c67f9d4bee1fa594f7f490f42f246a26b"
15
+ "sha256": "524ebd22779d126e280d44cccde4666f9c14cff17b741987109c995584427d3c"
16
16
  },
17
17
  "linux-x64": {
18
- "version": "0.9.66",
18
+ "version": "0.9.68",
19
19
  "file": "tkr-exec-linux-x64",
20
- "sha256": "c7072b61ea57f4b695f46a5cd2fdafbcdf582068ff04b4f6cb175539a4e15724"
20
+ "sha256": "8989b3bff7a35ce34f3d0486df066c00ceba572b6458c57dae03ec01051973ad"
21
21
  },
22
22
  "win32-arm64": {
23
- "version": "0.9.66",
23
+ "version": "0.9.68",
24
24
  "file": "tkr-exec-win32-arm64.exe",
25
- "sha256": "53cf4ba88286f253730faeace27a252cb8ee172afca7e4f7c76348f6887bd84b"
25
+ "sha256": "91be6a577bca3e7efa7dfee7338a4e415df1758b2e6d037d0c7546161286722b"
26
26
  },
27
27
  "win32-x64": {
28
- "version": "0.9.66",
28
+ "version": "0.9.68",
29
29
  "file": "tkr-exec-win32-x64.exe",
30
- "sha256": "a262844b9dd721672d1a1740685b996a5a0680aeaad12abd918ebf2d582b5590"
30
+ "sha256": "6830f187e1c7827cb48f9737f0aed57adec8e70fa0b8a253794bd521ba46adf6"
31
31
  }
32
32
  }
@@ -1,38 +1,38 @@
1
1
  {
2
2
  "darwin-arm64": {
3
- "version": "0.9.66",
3
+ "version": "0.9.68",
4
4
  "package": "@tokmizer/plugin-darwin-arm64",
5
5
  "file": "tkr",
6
- "sha256": "219dc76f9537c7bf3dfee78c2a78d9a4a92b972815f319bd77344763d67727e1"
6
+ "sha256": "ce69e918d6db995ed203956a1c98a06ec51219888443b43ffd988cacf2f8c0d4"
7
7
  },
8
8
  "darwin-x64": {
9
- "version": "0.9.66",
9
+ "version": "0.9.68",
10
10
  "package": "@tokmizer/plugin-darwin-x64",
11
11
  "file": "tkr",
12
- "sha256": "1306f71db7c45690d0fefa8d363036081fe3d1e829f89ba557f1088c835595ba"
12
+ "sha256": "16fbeded2ae2a0c266f80d2308d13396acb6d57aaee77a9e793fc58c327387bf"
13
13
  },
14
14
  "linux-arm64": {
15
- "version": "0.9.66",
15
+ "version": "0.9.68",
16
16
  "package": "@tokmizer/plugin-linux-arm64",
17
17
  "file": "tkr",
18
- "sha256": "267eec55c5dd99b45ad69b9460c7e86075dc389d86474187446119098d8274ab"
18
+ "sha256": "df689868a1f827849dcf4680161b61a6aa0999bf159eb229b8f72e433ac98083"
19
19
  },
20
20
  "linux-x64": {
21
- "version": "0.9.66",
21
+ "version": "0.9.68",
22
22
  "package": "@tokmizer/plugin-linux-x64",
23
23
  "file": "tkr",
24
- "sha256": "006b1e56394d263de1dec51bfb6036ff267487b413e30b063c06f864b1a4cb76"
24
+ "sha256": "2f2c5bcf42f2bd5262fb13634c787ec3d74c9c97ea7f6e3a28212d0b8ac181fd"
25
25
  },
26
26
  "win32-arm64": {
27
- "version": "0.9.66",
27
+ "version": "0.9.68",
28
28
  "package": "@tokmizer/plugin-win32-arm64",
29
29
  "file": "tkr.exe",
30
- "sha256": "3fdee6563ec1f659cadb6185225d1ae58d752b522f6c6a9a0617113ed4ffbd27"
30
+ "sha256": "f3c40d85afd0972c008b42a6be3d5eba50d7abae16b27aada0cc7d2093cca34e"
31
31
  },
32
32
  "win32-x64": {
33
- "version": "0.9.66",
33
+ "version": "0.9.68",
34
34
  "package": "@tokmizer/plugin-win32-x64",
35
35
  "file": "tkr.exe",
36
- "sha256": "c8dc60a5705f6d2a89350ee79f0d7cf26703e4d997f4c4ac3fad3a4df214b79a"
36
+ "sha256": "01419e2902ba467c9da1ef50c277d207b9ae52e644c3a9f8a0ced032a22c6db6"
37
37
  }
38
38
  }
Binary file
Binary file
Binary file
Binary file
Binary file
package/hooks/hooks.json CHANGED
@@ -4,6 +4,11 @@
4
4
  {
5
5
  "matcher": "",
6
6
  "hooks": [
7
+ {
8
+ "type": "command",
9
+ "command": "\"${CLAUDE_PLUGIN_ROOT}/dist/bin/tkr-exec\" --session-start",
10
+ "timeout": 5
11
+ },
7
12
  {
8
13
  "type": "command",
9
14
  "command": "node \"${CLAUDE_PLUGIN_ROOT}/hooks/on-session-start.mjs\"",
@@ -52,7 +57,7 @@
52
57
  "hooks": [
53
58
  {
54
59
  "type": "command",
55
- "command": "node \"${CLAUDE_PLUGIN_ROOT}/dist/hooks-host/pre-tool-use.js\"",
60
+ "command": "\"${CLAUDE_PLUGIN_ROOT}/dist/bin/tkr-exec\" --pre-tool-use",
56
61
  "timeout": 5
57
62
  }
58
63
  ]
@@ -64,7 +69,7 @@
64
69
  "hooks": [
65
70
  {
66
71
  "type": "command",
67
- "command": "node \"${CLAUDE_PLUGIN_ROOT}/dist/hooks-host/post-tool-use.js\"",
72
+ "command": "\"${CLAUDE_PLUGIN_ROOT}/dist/bin/tkr-exec\" --post-tool-use",
68
73
  "timeout": 10
69
74
  }
70
75
  ]
@@ -19,6 +19,18 @@ const networkOff =
19
19
  const userMessages = [];
20
20
  let context = "";
21
21
 
22
+ try {
23
+ const hooksFile = join(pluginRoot, "hooks", "hooks.json");
24
+ const installer = join(pluginRoot, "scripts", "install-native.mjs");
25
+ const { version } = JSON.parse(readFileSync(join(pluginRoot, "package.json"), "utf8"));
26
+ const attempt = join(home, `native-attempt-${version}`);
27
+ if (!single && process.env.TOKMIZER_NATIVE_EXEC !== "0" && existsSync(installer) && !existsSync(attempt) && readFileSync(hooksFile, "utf8").includes('"node \\"${CLAUDE_PLUGIN_ROOT}')) {
28
+ mkdirSync(home, { recursive: true });
29
+ writeFileSync(attempt, String(Date.now()), { mode: 0o600 });
30
+ spawn(process.execPath, [installer, "--native-only"], { detached: true, stdio: "ignore", windowsHide: true }).unref();
31
+ }
32
+ } catch {}
33
+
22
34
  try {
23
35
  const srcDir = join(pluginRoot, "command-templates");
24
36
  const destDir = process.env.TOKMIZER_CLAUDE_COMMANDS_DIR || join(homedir(), ".claude", "commands");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tokmizer/plugin",
3
- "version": "0.9.66",
3
+ "version": "0.9.68",
4
4
  "description": "Tokmizer reduces token consumption for AI coding tools (Claude Code, Codex, Cursor, Aider, Gemini CLI, Cline, Windsurf, Copilot). Cross-OS.",
5
5
  "type": "module",
6
6
  "engines": {
@@ -61,12 +61,12 @@
61
61
  "zod": "^3.23.8"
62
62
  },
63
63
  "optionalDependencies": {
64
- "@tokmizer/plugin-darwin-arm64": "0.9.66",
65
- "@tokmizer/plugin-darwin-x64": "0.9.66",
66
- "@tokmizer/plugin-linux-arm64": "0.9.66",
67
- "@tokmizer/plugin-linux-x64": "0.9.66",
68
- "@tokmizer/plugin-win32-arm64": "0.9.66",
69
- "@tokmizer/plugin-win32-x64": "0.9.66"
64
+ "@tokmizer/plugin-darwin-arm64": "0.9.68",
65
+ "@tokmizer/plugin-darwin-x64": "0.9.68",
66
+ "@tokmizer/plugin-linux-arm64": "0.9.68",
67
+ "@tokmizer/plugin-linux-x64": "0.9.68",
68
+ "@tokmizer/plugin-win32-arm64": "0.9.68",
69
+ "@tokmizer/plugin-win32-x64": "0.9.68"
70
70
  },
71
71
  "publishConfig": {
72
72
  "access": "public"
@@ -212,7 +212,11 @@ export function healShims(directory = packageDirectory) {
212
212
  }
213
213
 
214
214
  if (process.argv[1] && resolve(process.argv[1]) === fileURLToPath(import.meta.url)) {
215
- installSingle();
216
- installNative();
217
- healShims();
215
+ if (process.argv.includes("--native-only")) {
216
+ installNative();
217
+ } else {
218
+ installSingle();
219
+ installNative();
220
+ healShims();
221
+ }
218
222
  }