@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.
- package/.claude-plugin/plugin.json +1 -1
- package/.codex-plugin/plugin.json +1 -1
- package/dist/bin/tkr-agent-hook.js +53 -9
- package/dist/bin/tkr-codex-hook.js +72 -70
- package/dist/bin/tkr-copilot-hook.js +53 -9
- package/dist/bin/tkr-crush-hook.js +53 -9
- package/dist/bin/tkr-cursor-hook.js +52 -8
- package/dist/bin/tkr-daemon.js +131 -129
- package/dist/bin/tkr-droid-hook.js +53 -9
- package/dist/bin/tkr-exec +0 -0
- package/dist/bin/tkr-exec.js +79 -77
- package/dist/bin/tkr-gemini-hook.js +52 -8
- package/dist/bin/tkr-grok-hook.js +53 -9
- package/dist/bin/tkr-junie-hook.js +53 -9
- package/dist/bin/tkr-processor.js +97 -95
- package/dist/bin/tkr-qwen-hook.js +53 -9
- package/dist/bin/tkr-shim.js +80 -78
- package/dist/bin/tkr-trae-hook.js +53 -9
- package/dist/bin/tkr-zcode-hook.js +53 -9
- package/dist/bin/tkr.js +263 -260
- package/dist/hooks-host/post-tool-use.js +91 -89
- package/dist/hooks-host/pre-tool-use.js +53 -9
- package/dist/hooks-host/reducer-stop.js +24 -24
- package/dist/hooks-host/session-recap.js +5 -4
- package/dist/index.js +87 -85
- package/dist/native/manifest.json +12 -12
- package/dist/native/single.json +12 -12
- package/dist/native/tkr-exec-darwin-arm64 +0 -0
- package/dist/native/tkr-exec-darwin-x64 +0 -0
- package/dist/native/tkr-exec-linux-arm64 +0 -0
- package/dist/native/tkr-exec-linux-x64 +0 -0
- package/dist/native/tkr-exec-win32-arm64.exe +0 -0
- package/dist/native/tkr-exec-win32-x64.exe +0 -0
- package/hooks/hooks.json +7 -2
- package/hooks/on-session-start.mjs +12 -0
- package/package.json +7 -7
- package/scripts/install-native.mjs +7 -3
|
@@ -1,32 +1,32 @@
|
|
|
1
1
|
{
|
|
2
2
|
"darwin-arm64": {
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.68",
|
|
4
4
|
"file": "tkr-exec-darwin-arm64",
|
|
5
|
-
"sha256": "
|
|
5
|
+
"sha256": "cc848513cc2bfdae0f8e2d2d751b43d7ffc668fec9d27194be5ffa80a854cdf6"
|
|
6
6
|
},
|
|
7
7
|
"darwin-x64": {
|
|
8
|
-
"version": "0.9.
|
|
8
|
+
"version": "0.9.68",
|
|
9
9
|
"file": "tkr-exec-darwin-x64",
|
|
10
|
-
"sha256": "
|
|
10
|
+
"sha256": "6143e4d90cee2fec3d2a3c4d4eebab0a5c52939287cc141daafe75d31f5bc259"
|
|
11
11
|
},
|
|
12
12
|
"linux-arm64": {
|
|
13
|
-
"version": "0.9.
|
|
13
|
+
"version": "0.9.68",
|
|
14
14
|
"file": "tkr-exec-linux-arm64",
|
|
15
|
-
"sha256": "
|
|
15
|
+
"sha256": "524ebd22779d126e280d44cccde4666f9c14cff17b741987109c995584427d3c"
|
|
16
16
|
},
|
|
17
17
|
"linux-x64": {
|
|
18
|
-
"version": "0.9.
|
|
18
|
+
"version": "0.9.68",
|
|
19
19
|
"file": "tkr-exec-linux-x64",
|
|
20
|
-
"sha256": "
|
|
20
|
+
"sha256": "8989b3bff7a35ce34f3d0486df066c00ceba572b6458c57dae03ec01051973ad"
|
|
21
21
|
},
|
|
22
22
|
"win32-arm64": {
|
|
23
|
-
"version": "0.9.
|
|
23
|
+
"version": "0.9.68",
|
|
24
24
|
"file": "tkr-exec-win32-arm64.exe",
|
|
25
|
-
"sha256": "
|
|
25
|
+
"sha256": "91be6a577bca3e7efa7dfee7338a4e415df1758b2e6d037d0c7546161286722b"
|
|
26
26
|
},
|
|
27
27
|
"win32-x64": {
|
|
28
|
-
"version": "0.9.
|
|
28
|
+
"version": "0.9.68",
|
|
29
29
|
"file": "tkr-exec-win32-x64.exe",
|
|
30
|
-
"sha256": "
|
|
30
|
+
"sha256": "6830f187e1c7827cb48f9737f0aed57adec8e70fa0b8a253794bd521ba46adf6"
|
|
31
31
|
}
|
|
32
32
|
}
|
package/dist/native/single.json
CHANGED
|
@@ -1,38 +1,38 @@
|
|
|
1
1
|
{
|
|
2
2
|
"darwin-arm64": {
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.68",
|
|
4
4
|
"package": "@tokmizer/plugin-darwin-arm64",
|
|
5
5
|
"file": "tkr",
|
|
6
|
-
"sha256": "
|
|
6
|
+
"sha256": "ce69e918d6db995ed203956a1c98a06ec51219888443b43ffd988cacf2f8c0d4"
|
|
7
7
|
},
|
|
8
8
|
"darwin-x64": {
|
|
9
|
-
"version": "0.9.
|
|
9
|
+
"version": "0.9.68",
|
|
10
10
|
"package": "@tokmizer/plugin-darwin-x64",
|
|
11
11
|
"file": "tkr",
|
|
12
|
-
"sha256": "
|
|
12
|
+
"sha256": "16fbeded2ae2a0c266f80d2308d13396acb6d57aaee77a9e793fc58c327387bf"
|
|
13
13
|
},
|
|
14
14
|
"linux-arm64": {
|
|
15
|
-
"version": "0.9.
|
|
15
|
+
"version": "0.9.68",
|
|
16
16
|
"package": "@tokmizer/plugin-linux-arm64",
|
|
17
17
|
"file": "tkr",
|
|
18
|
-
"sha256": "
|
|
18
|
+
"sha256": "df689868a1f827849dcf4680161b61a6aa0999bf159eb229b8f72e433ac98083"
|
|
19
19
|
},
|
|
20
20
|
"linux-x64": {
|
|
21
|
-
"version": "0.9.
|
|
21
|
+
"version": "0.9.68",
|
|
22
22
|
"package": "@tokmizer/plugin-linux-x64",
|
|
23
23
|
"file": "tkr",
|
|
24
|
-
"sha256": "
|
|
24
|
+
"sha256": "2f2c5bcf42f2bd5262fb13634c787ec3d74c9c97ea7f6e3a28212d0b8ac181fd"
|
|
25
25
|
},
|
|
26
26
|
"win32-arm64": {
|
|
27
|
-
"version": "0.9.
|
|
27
|
+
"version": "0.9.68",
|
|
28
28
|
"package": "@tokmizer/plugin-win32-arm64",
|
|
29
29
|
"file": "tkr.exe",
|
|
30
|
-
"sha256": "
|
|
30
|
+
"sha256": "f3c40d85afd0972c008b42a6be3d5eba50d7abae16b27aada0cc7d2093cca34e"
|
|
31
31
|
},
|
|
32
32
|
"win32-x64": {
|
|
33
|
-
"version": "0.9.
|
|
33
|
+
"version": "0.9.68",
|
|
34
34
|
"package": "@tokmizer/plugin-win32-x64",
|
|
35
35
|
"file": "tkr.exe",
|
|
36
|
-
"sha256": "
|
|
36
|
+
"sha256": "01419e2902ba467c9da1ef50c277d207b9ae52e644c3a9f8a0ced032a22c6db6"
|
|
37
37
|
}
|
|
38
38
|
}
|
|
Binary file
|
|
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": "
|
|
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": "
|
|
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.
|
|
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.
|
|
65
|
-
"@tokmizer/plugin-darwin-x64": "0.9.
|
|
66
|
-
"@tokmizer/plugin-linux-arm64": "0.9.
|
|
67
|
-
"@tokmizer/plugin-linux-x64": "0.9.
|
|
68
|
-
"@tokmizer/plugin-win32-arm64": "0.9.
|
|
69
|
-
"@tokmizer/plugin-win32-x64": "0.9.
|
|
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
|
-
|
|
216
|
-
|
|
217
|
-
|
|
215
|
+
if (process.argv.includes("--native-only")) {
|
|
216
|
+
installNative();
|
|
217
|
+
} else {
|
|
218
|
+
installSingle();
|
|
219
|
+
installNative();
|
|
220
|
+
healShims();
|
|
221
|
+
}
|
|
218
222
|
}
|