@tokmizer/plugin 0.9.67 → 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.
@@ -1,32 +1,32 @@
1
1
  {
2
2
  "darwin-arm64": {
3
- "version": "0.9.67",
3
+ "version": "0.9.68",
4
4
  "file": "tkr-exec-darwin-arm64",
5
- "sha256": "1b444958877111e7860d4d882d58330aec294c43cdf4c1fc101d6d32c8e571a4"
5
+ "sha256": "cc848513cc2bfdae0f8e2d2d751b43d7ffc668fec9d27194be5ffa80a854cdf6"
6
6
  },
7
7
  "darwin-x64": {
8
- "version": "0.9.67",
8
+ "version": "0.9.68",
9
9
  "file": "tkr-exec-darwin-x64",
10
- "sha256": "35c6e3f6b055bc23e587514868175462c4a65e39001584e9e076e152e9e60eb0"
10
+ "sha256": "6143e4d90cee2fec3d2a3c4d4eebab0a5c52939287cc141daafe75d31f5bc259"
11
11
  },
12
12
  "linux-arm64": {
13
- "version": "0.9.67",
13
+ "version": "0.9.68",
14
14
  "file": "tkr-exec-linux-arm64",
15
- "sha256": "24c226733be10467b50310783133004589b2d6d1fa47eb40cd62a258c82fbe14"
15
+ "sha256": "524ebd22779d126e280d44cccde4666f9c14cff17b741987109c995584427d3c"
16
16
  },
17
17
  "linux-x64": {
18
- "version": "0.9.67",
18
+ "version": "0.9.68",
19
19
  "file": "tkr-exec-linux-x64",
20
- "sha256": "c8787764a24f576aea2fb86b4d26b79f4911a5adcdadf2923594a0910a6b812c"
20
+ "sha256": "8989b3bff7a35ce34f3d0486df066c00ceba572b6458c57dae03ec01051973ad"
21
21
  },
22
22
  "win32-arm64": {
23
- "version": "0.9.67",
23
+ "version": "0.9.68",
24
24
  "file": "tkr-exec-win32-arm64.exe",
25
- "sha256": "19f69258b8be68cbef6b500515ea93c61cbfd541a86d3b8c823643068ce0ab6b"
25
+ "sha256": "91be6a577bca3e7efa7dfee7338a4e415df1758b2e6d037d0c7546161286722b"
26
26
  },
27
27
  "win32-x64": {
28
- "version": "0.9.67",
28
+ "version": "0.9.68",
29
29
  "file": "tkr-exec-win32-x64.exe",
30
- "sha256": "2e35cac5f1ec24b8d071d1bab7902d912c94e80b130e2d25612e188acc6ad8fb"
30
+ "sha256": "6830f187e1c7827cb48f9737f0aed57adec8e70fa0b8a253794bd521ba46adf6"
31
31
  }
32
32
  }
@@ -1,38 +1,38 @@
1
1
  {
2
2
  "darwin-arm64": {
3
- "version": "0.9.67",
3
+ "version": "0.9.68",
4
4
  "package": "@tokmizer/plugin-darwin-arm64",
5
5
  "file": "tkr",
6
- "sha256": "77f5ec715776878b8fb8430c60895b7195cca3b1805da014e2f6a5a5ea11d7c8"
6
+ "sha256": "ce69e918d6db995ed203956a1c98a06ec51219888443b43ffd988cacf2f8c0d4"
7
7
  },
8
8
  "darwin-x64": {
9
- "version": "0.9.67",
9
+ "version": "0.9.68",
10
10
  "package": "@tokmizer/plugin-darwin-x64",
11
11
  "file": "tkr",
12
- "sha256": "eb16d7908d62485fbda3ccf685d7d4032a74eb543d85f1fde29ea6f5d6b2378e"
12
+ "sha256": "16fbeded2ae2a0c266f80d2308d13396acb6d57aaee77a9e793fc58c327387bf"
13
13
  },
14
14
  "linux-arm64": {
15
- "version": "0.9.67",
15
+ "version": "0.9.68",
16
16
  "package": "@tokmizer/plugin-linux-arm64",
17
17
  "file": "tkr",
18
- "sha256": "1c8af8dfcf33e4e22e20e2f7d2f534afb22acea5e1eb9bc5c264aa7cfafe5f83"
18
+ "sha256": "df689868a1f827849dcf4680161b61a6aa0999bf159eb229b8f72e433ac98083"
19
19
  },
20
20
  "linux-x64": {
21
- "version": "0.9.67",
21
+ "version": "0.9.68",
22
22
  "package": "@tokmizer/plugin-linux-x64",
23
23
  "file": "tkr",
24
- "sha256": "9bcf7091817d7cb0178a3de988faf5fbb8c2eff0c8ad0dec9fda1e6814741563"
24
+ "sha256": "2f2c5bcf42f2bd5262fb13634c787ec3d74c9c97ea7f6e3a28212d0b8ac181fd"
25
25
  },
26
26
  "win32-arm64": {
27
- "version": "0.9.67",
27
+ "version": "0.9.68",
28
28
  "package": "@tokmizer/plugin-win32-arm64",
29
29
  "file": "tkr.exe",
30
- "sha256": "b8c43b930f586db372ff7ad786f8a12f0a08ef6941a565d5d6a59459c15b4a02"
30
+ "sha256": "f3c40d85afd0972c008b42a6be3d5eba50d7abae16b27aada0cc7d2093cca34e"
31
31
  },
32
32
  "win32-x64": {
33
- "version": "0.9.67",
33
+ "version": "0.9.68",
34
34
  "package": "@tokmizer/plugin-win32-x64",
35
35
  "file": "tkr.exe",
36
- "sha256": "8300e43a7a1400331dfeac4c975e7e57a274ca0b31c0a349234daf10bde5b386"
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.67",
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.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.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
  }