@tokmizer/plugin 0.9.67 → 0.9.69

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 +13 -12
  4. package/dist/bin/tkr-codex-hook.js +75 -69
  5. package/dist/bin/tkr-copilot-hook.js +12 -11
  6. package/dist/bin/tkr-crush-hook.js +12 -11
  7. package/dist/bin/tkr-cursor-hook.js +12 -11
  8. package/dist/bin/tkr-daemon.js +134 -128
  9. package/dist/bin/tkr-droid-hook.js +12 -11
  10. package/dist/bin/tkr-exec +0 -0
  11. package/dist/bin/tkr-exec.js +83 -78
  12. package/dist/bin/tkr-gemini-hook.js +12 -11
  13. package/dist/bin/tkr-grok-hook.js +12 -11
  14. package/dist/bin/tkr-junie-hook.js +12 -11
  15. package/dist/bin/tkr-processor.js +102 -96
  16. package/dist/bin/tkr-qwen-hook.js +12 -11
  17. package/dist/bin/tkr-shim.js +85 -80
  18. package/dist/bin/tkr-trae-hook.js +12 -11
  19. package/dist/bin/tkr-zcode-hook.js +12 -11
  20. package/dist/bin/tkr.js +281 -277
  21. package/dist/hooks-host/post-tool-use.js +95 -90
  22. package/dist/hooks-host/pre-tool-use.js +13 -12
  23. package/dist/hooks-host/reducer-stop.js +24 -24
  24. package/dist/hooks-host/session-recap.js +1 -1
  25. package/dist/index.js +95 -90
  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.67",
3
+ "version": "0.9.69",
4
4
  "file": "tkr-exec-darwin-arm64",
5
- "sha256": "1b444958877111e7860d4d882d58330aec294c43cdf4c1fc101d6d32c8e571a4"
5
+ "sha256": "6940de68790cd26ab6535ee368f7719850dafbfb0f6d8b6932879b5f6d859a92"
6
6
  },
7
7
  "darwin-x64": {
8
- "version": "0.9.67",
8
+ "version": "0.9.69",
9
9
  "file": "tkr-exec-darwin-x64",
10
- "sha256": "35c6e3f6b055bc23e587514868175462c4a65e39001584e9e076e152e9e60eb0"
10
+ "sha256": "ace35c38d33022f09401b14ff05f9cc6edb6821ad19e79345990ffe6749da350"
11
11
  },
12
12
  "linux-arm64": {
13
- "version": "0.9.67",
13
+ "version": "0.9.69",
14
14
  "file": "tkr-exec-linux-arm64",
15
- "sha256": "24c226733be10467b50310783133004589b2d6d1fa47eb40cd62a258c82fbe14"
15
+ "sha256": "764903555e8976e827c70bfba0dbe05fc44959d96260d53f3046c904ca6cb0d9"
16
16
  },
17
17
  "linux-x64": {
18
- "version": "0.9.67",
18
+ "version": "0.9.69",
19
19
  "file": "tkr-exec-linux-x64",
20
- "sha256": "c8787764a24f576aea2fb86b4d26b79f4911a5adcdadf2923594a0910a6b812c"
20
+ "sha256": "e1f3cf706aca1939f188622dc76e12e2c27181cc5d281e2fef8e7472c272eeb3"
21
21
  },
22
22
  "win32-arm64": {
23
- "version": "0.9.67",
23
+ "version": "0.9.69",
24
24
  "file": "tkr-exec-win32-arm64.exe",
25
- "sha256": "19f69258b8be68cbef6b500515ea93c61cbfd541a86d3b8c823643068ce0ab6b"
25
+ "sha256": "8893031738c3a8ecea3e37aa8b609e84475cd1229e971422db10d08605c1e73b"
26
26
  },
27
27
  "win32-x64": {
28
- "version": "0.9.67",
28
+ "version": "0.9.69",
29
29
  "file": "tkr-exec-win32-x64.exe",
30
- "sha256": "2e35cac5f1ec24b8d071d1bab7902d912c94e80b130e2d25612e188acc6ad8fb"
30
+ "sha256": "841391deb14690763f3452939bc36e25b97de907c8f6f60762b5f003dbf0f6ff"
31
31
  }
32
32
  }
@@ -1,38 +1,38 @@
1
1
  {
2
2
  "darwin-arm64": {
3
- "version": "0.9.67",
3
+ "version": "0.9.69",
4
4
  "package": "@tokmizer/plugin-darwin-arm64",
5
5
  "file": "tkr",
6
- "sha256": "77f5ec715776878b8fb8430c60895b7195cca3b1805da014e2f6a5a5ea11d7c8"
6
+ "sha256": "ec4b3f5f1a011b3c37589941290ce5fb065077f12892f495d36e9be2f2f3fbbd"
7
7
  },
8
8
  "darwin-x64": {
9
- "version": "0.9.67",
9
+ "version": "0.9.69",
10
10
  "package": "@tokmizer/plugin-darwin-x64",
11
11
  "file": "tkr",
12
- "sha256": "eb16d7908d62485fbda3ccf685d7d4032a74eb543d85f1fde29ea6f5d6b2378e"
12
+ "sha256": "d43eccbabf9bf9e5026cb4abfa7bd4ed4dfb73070fa3e180d35a26d8ab3e5a9e"
13
13
  },
14
14
  "linux-arm64": {
15
- "version": "0.9.67",
15
+ "version": "0.9.69",
16
16
  "package": "@tokmizer/plugin-linux-arm64",
17
17
  "file": "tkr",
18
- "sha256": "1c8af8dfcf33e4e22e20e2f7d2f534afb22acea5e1eb9bc5c264aa7cfafe5f83"
18
+ "sha256": "82e93e28aa4bd5bb164ec12f6a30f587594a5a4b3cd73deea65e2e230a95158b"
19
19
  },
20
20
  "linux-x64": {
21
- "version": "0.9.67",
21
+ "version": "0.9.69",
22
22
  "package": "@tokmizer/plugin-linux-x64",
23
23
  "file": "tkr",
24
- "sha256": "9bcf7091817d7cb0178a3de988faf5fbb8c2eff0c8ad0dec9fda1e6814741563"
24
+ "sha256": "bfd59524acc2b2c817f01fe936bf12197f1fe8598fd9f6dd74c6445c5563417c"
25
25
  },
26
26
  "win32-arm64": {
27
- "version": "0.9.67",
27
+ "version": "0.9.69",
28
28
  "package": "@tokmizer/plugin-win32-arm64",
29
29
  "file": "tkr.exe",
30
- "sha256": "b8c43b930f586db372ff7ad786f8a12f0a08ef6941a565d5d6a59459c15b4a02"
30
+ "sha256": "66dff6390255eee0489ee95a3bb58009e2a0206c23a86ecba5be92008982337f"
31
31
  },
32
32
  "win32-x64": {
33
- "version": "0.9.67",
33
+ "version": "0.9.69",
34
34
  "package": "@tokmizer/plugin-win32-x64",
35
35
  "file": "tkr.exe",
36
- "sha256": "8300e43a7a1400331dfeac4c975e7e57a274ca0b31c0a349234daf10bde5b386"
36
+ "sha256": "37b6c6186379096bb15cef10dd96906c7284d77c170b60fe4df0aa162b7ad08d"
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.67",
3
+ "version": "0.9.69",
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.67",
65
- "@tokmizer/plugin-darwin-x64": "0.9.67",
66
- "@tokmizer/plugin-linux-arm64": "0.9.67",
67
- "@tokmizer/plugin-linux-x64": "0.9.67",
68
- "@tokmizer/plugin-win32-arm64": "0.9.67",
69
- "@tokmizer/plugin-win32-x64": "0.9.67"
64
+ "@tokmizer/plugin-darwin-arm64": "0.9.69",
65
+ "@tokmizer/plugin-darwin-x64": "0.9.69",
66
+ "@tokmizer/plugin-linux-arm64": "0.9.69",
67
+ "@tokmizer/plugin-linux-x64": "0.9.69",
68
+ "@tokmizer/plugin-win32-arm64": "0.9.69",
69
+ "@tokmizer/plugin-win32-x64": "0.9.69"
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
  }