@tokmizer/plugin 0.9.65 → 0.9.66
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/LICENSES.md +1 -1
- package/dist/bin/tkr-agent-hook.js +10 -10
- package/dist/bin/tkr-codex-hook.js +68 -68
- package/dist/bin/tkr-copilot-hook.js +9 -9
- package/dist/bin/tkr-crush-hook.js +9 -9
- package/dist/bin/tkr-cursor-hook.js +9 -9
- package/dist/bin/tkr-daemon.js +135 -119
- package/dist/bin/tkr-droid-hook.js +9 -9
- package/dist/bin/tkr-exec +74 -71
- package/dist/bin/tkr-exec.js +74 -71
- package/dist/bin/tkr-gemini-hook.js +9 -9
- package/dist/bin/tkr-grok-hook.js +9 -9
- package/dist/bin/tkr-junie-hook.js +9 -9
- package/dist/bin/tkr-processor.js +96 -93
- package/dist/bin/tkr-qwen-hook.js +9 -9
- package/dist/bin/tkr-shim.js +72 -69
- package/dist/bin/tkr-trae-hook.js +9 -9
- package/dist/bin/tkr-zcode-hook.js +9 -9
- package/dist/bin/tkr.js +267 -253
- package/dist/hooks-host/post-tool-use.js +83 -80
- package/dist/hooks-host/pre-tool-use.js +10 -10
- package/dist/hooks-host/reducer-stop.js +26 -23
- package/dist/hooks-host/session-recap.js +1 -1
- package/dist/index.js +97 -84
- 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/on-session-start.mjs +9 -1
- package/package.json +7 -7
- package/scripts/install-mac-linux.sh +47 -0
|
@@ -1,32 +1,32 @@
|
|
|
1
1
|
{
|
|
2
2
|
"darwin-arm64": {
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.66",
|
|
4
4
|
"file": "tkr-exec-darwin-arm64",
|
|
5
|
-
"sha256": "
|
|
5
|
+
"sha256": "fcd2ced9066aede941b8605011512364e9dcd3d2f61b2e94d45ce119aff59d18"
|
|
6
6
|
},
|
|
7
7
|
"darwin-x64": {
|
|
8
|
-
"version": "0.9.
|
|
8
|
+
"version": "0.9.66",
|
|
9
9
|
"file": "tkr-exec-darwin-x64",
|
|
10
|
-
"sha256": "
|
|
10
|
+
"sha256": "b342270fc372bf1b96cf764f6295884e120c10fcc5b535c1b98528fd825b6a96"
|
|
11
11
|
},
|
|
12
12
|
"linux-arm64": {
|
|
13
|
-
"version": "0.9.
|
|
13
|
+
"version": "0.9.66",
|
|
14
14
|
"file": "tkr-exec-linux-arm64",
|
|
15
|
-
"sha256": "
|
|
15
|
+
"sha256": "552de68d8873d429b849c30c93437a9c67f9d4bee1fa594f7f490f42f246a26b"
|
|
16
16
|
},
|
|
17
17
|
"linux-x64": {
|
|
18
|
-
"version": "0.9.
|
|
18
|
+
"version": "0.9.66",
|
|
19
19
|
"file": "tkr-exec-linux-x64",
|
|
20
|
-
"sha256": "
|
|
20
|
+
"sha256": "c7072b61ea57f4b695f46a5cd2fdafbcdf582068ff04b4f6cb175539a4e15724"
|
|
21
21
|
},
|
|
22
22
|
"win32-arm64": {
|
|
23
|
-
"version": "0.9.
|
|
23
|
+
"version": "0.9.66",
|
|
24
24
|
"file": "tkr-exec-win32-arm64.exe",
|
|
25
|
-
"sha256": "
|
|
25
|
+
"sha256": "53cf4ba88286f253730faeace27a252cb8ee172afca7e4f7c76348f6887bd84b"
|
|
26
26
|
},
|
|
27
27
|
"win32-x64": {
|
|
28
|
-
"version": "0.9.
|
|
28
|
+
"version": "0.9.66",
|
|
29
29
|
"file": "tkr-exec-win32-x64.exe",
|
|
30
|
-
"sha256": "
|
|
30
|
+
"sha256": "a262844b9dd721672d1a1740685b996a5a0680aeaad12abd918ebf2d582b5590"
|
|
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.66",
|
|
4
4
|
"package": "@tokmizer/plugin-darwin-arm64",
|
|
5
5
|
"file": "tkr",
|
|
6
|
-
"sha256": "
|
|
6
|
+
"sha256": "219dc76f9537c7bf3dfee78c2a78d9a4a92b972815f319bd77344763d67727e1"
|
|
7
7
|
},
|
|
8
8
|
"darwin-x64": {
|
|
9
|
-
"version": "0.9.
|
|
9
|
+
"version": "0.9.66",
|
|
10
10
|
"package": "@tokmizer/plugin-darwin-x64",
|
|
11
11
|
"file": "tkr",
|
|
12
|
-
"sha256": "
|
|
12
|
+
"sha256": "1306f71db7c45690d0fefa8d363036081fe3d1e829f89ba557f1088c835595ba"
|
|
13
13
|
},
|
|
14
14
|
"linux-arm64": {
|
|
15
|
-
"version": "0.9.
|
|
15
|
+
"version": "0.9.66",
|
|
16
16
|
"package": "@tokmizer/plugin-linux-arm64",
|
|
17
17
|
"file": "tkr",
|
|
18
|
-
"sha256": "
|
|
18
|
+
"sha256": "267eec55c5dd99b45ad69b9460c7e86075dc389d86474187446119098d8274ab"
|
|
19
19
|
},
|
|
20
20
|
"linux-x64": {
|
|
21
|
-
"version": "0.9.
|
|
21
|
+
"version": "0.9.66",
|
|
22
22
|
"package": "@tokmizer/plugin-linux-x64",
|
|
23
23
|
"file": "tkr",
|
|
24
|
-
"sha256": "
|
|
24
|
+
"sha256": "006b1e56394d263de1dec51bfb6036ff267487b413e30b063c06f864b1a4cb76"
|
|
25
25
|
},
|
|
26
26
|
"win32-arm64": {
|
|
27
|
-
"version": "0.9.
|
|
27
|
+
"version": "0.9.66",
|
|
28
28
|
"package": "@tokmizer/plugin-win32-arm64",
|
|
29
29
|
"file": "tkr.exe",
|
|
30
|
-
"sha256": "
|
|
30
|
+
"sha256": "3fdee6563ec1f659cadb6185225d1ae58d752b522f6c6a9a0617113ed4ffbd27"
|
|
31
31
|
},
|
|
32
32
|
"win32-x64": {
|
|
33
|
-
"version": "0.9.
|
|
33
|
+
"version": "0.9.66",
|
|
34
34
|
"package": "@tokmizer/plugin-win32-x64",
|
|
35
35
|
"file": "tkr.exe",
|
|
36
|
-
"sha256": "
|
|
36
|
+
"sha256": "c8dc60a5705f6d2a89350ee79f0d7cf26703e4d997f4c4ac3fad3a4df214b79a"
|
|
37
37
|
}
|
|
38
38
|
}
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -136,7 +136,15 @@ try {
|
|
|
136
136
|
if (latest && manifest.version && latest !== manifest.version) {
|
|
137
137
|
const nudgeFile = join(home, `update-nudge-${latest}`);
|
|
138
138
|
if (!existsSync(nudgeFile)) {
|
|
139
|
-
|
|
139
|
+
const claudeDir = join(homedir(), ".claude");
|
|
140
|
+
const fromCatalog = /[\\/]plugins[\\/]cache[\\/]tokmizer[\\/]/.test(pluginRoot) && (process.env.CLAUDE_CONFIG_DIR || claudeDir) === claudeDir;
|
|
141
|
+
let autoOn = false;
|
|
142
|
+
try {
|
|
143
|
+
autoOn = JSON.parse(readFileSync(join(claudeDir, "settings.json"), "utf8"))?.extraKnownMarketplaces?.tokmizer?.autoUpdate === true;
|
|
144
|
+
} catch {}
|
|
145
|
+
userMessages.push(fromCatalog && !autoOn
|
|
146
|
+
? `Tokmizer ${latest} is available. Run /tkr-update once: it updates now and turns on automatic updates.`
|
|
147
|
+
: `Tokmizer ${latest} is available. Update with: /tkr-update`);
|
|
140
148
|
writeFileSync(nudgeFile, String(Date.now()));
|
|
141
149
|
}
|
|
142
150
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tokmizer/plugin",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.66",
|
|
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.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"
|
|
70
70
|
},
|
|
71
71
|
"publishConfig": {
|
|
72
72
|
"access": "public"
|
|
@@ -11,6 +11,52 @@ node_ready() {
|
|
|
11
11
|
|
|
12
12
|
work=""
|
|
13
13
|
|
|
14
|
+
RELEASE_KEY_PEM='-----BEGIN PUBLIC KEY-----
|
|
15
|
+
MCowBQYDK2VwAyEAQqaFzuV5RhhcjaYgECQqM1faOtWjIE5U54zyPADPSgM=
|
|
16
|
+
-----END PUBLIC KEY-----'
|
|
17
|
+
RELEASE_KEY_SSH='ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIEKmhc7leUYYXI2mIBAkKjNX2jrVoyBOVOeM8jwAz0oD'
|
|
18
|
+
|
|
19
|
+
openssl_ed25519() {
|
|
20
|
+
local help
|
|
21
|
+
command -v openssl >/dev/null 2>&1 || return 1
|
|
22
|
+
openssl pkey -pubin -in "$1" -noout >/dev/null 2>&1 || return 1
|
|
23
|
+
help="$(openssl pkeyutl -help 2>&1 || true)"
|
|
24
|
+
case "$help" in *-rawin*) return 0 ;; esac
|
|
25
|
+
return 1
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
ssh_keygen_sig() {
|
|
29
|
+
local out
|
|
30
|
+
command -v ssh-keygen >/dev/null 2>&1 || return 1
|
|
31
|
+
out="$(ssh-keygen -Y verify </dev/null 2>&1 || true)"
|
|
32
|
+
case "$out" in *"unknown option"*|*"illegal option"*|*"invalid option"*) return 1 ;; esac
|
|
33
|
+
return 0
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
verify_sums() {
|
|
37
|
+
local dir="$1" base="$2"
|
|
38
|
+
printf '%s\n' "$RELEASE_KEY_PEM" > "$dir/release.pem"
|
|
39
|
+
if openssl_ed25519 "$dir/release.pem"; then
|
|
40
|
+
curl -fsSL "$base/SHA256SUMS.sig" -o "$dir/SHA256SUMS.sig" || err "The release is not signed (SHA256SUMS.sig is missing). Do not install this build."
|
|
41
|
+
openssl pkeyutl -verify -pubin -inkey "$dir/release.pem" -rawin -in "$dir/SHA256SUMS" -sigfile "$dir/SHA256SUMS.sig" >/dev/null 2>&1 ||
|
|
42
|
+
err "Release signature check failed. Do not install this build."
|
|
43
|
+
log "Release signature verified (openssl)."
|
|
44
|
+
return 0
|
|
45
|
+
fi
|
|
46
|
+
if ssh_keygen_sig; then
|
|
47
|
+
curl -fsSL "$base/SHA256SUMS.sshsig" -o "$dir/SHA256SUMS.sshsig" || err "The release is not signed (SHA256SUMS.sshsig is missing). Do not install this build."
|
|
48
|
+
printf 'tokmizer-release %s\n' "$RELEASE_KEY_SSH" > "$dir/allowed_signers"
|
|
49
|
+
ssh-keygen -Y verify -f "$dir/allowed_signers" -I tokmizer-release -n tokmizer-release -s "$dir/SHA256SUMS.sshsig" < "$dir/SHA256SUMS" >/dev/null 2>&1 ||
|
|
50
|
+
err "Release signature check failed. Do not install this build."
|
|
51
|
+
log "Release signature verified (ssh-keygen)."
|
|
52
|
+
return 0
|
|
53
|
+
fi
|
|
54
|
+
if [ "${TOKMIZER_REQUIRE_SIG:-}" = "1" ]; then
|
|
55
|
+
err "Cannot verify the release signature: install OpenSSL 3 or OpenSSH 8.1+, or unset TOKMIZER_REQUIRE_SIG."
|
|
56
|
+
fi
|
|
57
|
+
log "Warning: cannot verify the release signature (no OpenSSL 3 with Ed25519, no ssh-keygen -Y). Relying on SHA256SUMS only."
|
|
58
|
+
}
|
|
59
|
+
|
|
14
60
|
sha256_of() {
|
|
15
61
|
if command -v sha256sum >/dev/null 2>&1; then sha256sum "$1" | cut -d' ' -f1
|
|
16
62
|
else shasum -a 256 "$1" | cut -d' ' -f1
|
|
@@ -39,6 +85,7 @@ install_standalone() {
|
|
|
39
85
|
work="$(mktemp -d)"
|
|
40
86
|
trap 'rm -rf "${work:-}"' EXIT
|
|
41
87
|
curl -fsSL "$base/SHA256SUMS" -o "$work/SHA256SUMS" || err "Could not download the standalone build. $unavailable"
|
|
88
|
+
verify_sums "$work" "$base"
|
|
42
89
|
line="$(grep -E "^[0-9a-f]{64} tokmizer-[0-9][^ /]*-$key\.tar\.gz$" "$work/SHA256SUMS" | head -n 1)" || true
|
|
43
90
|
[ -n "$line" ] || err "No standalone build for $key. $unavailable"
|
|
44
91
|
sum="${line%% *}"
|