@tokmizer/plugin 1.0.2 → 1.1.1
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/README.md +37 -37
- package/command-templates/tkr-status.md +1 -1
- package/dist/bin/tkr-codex-hook.js +58 -58
- package/dist/bin/tkr-context-hook.js +1 -1
- package/dist/bin/tkr-daemon.js +133 -133
- package/dist/bin/tkr-exec +11 -11
- package/dist/bin/tkr-exec.js +11 -11
- package/dist/bin/tkr-processor.js +14 -14
- package/dist/bin/tkr-shim.js +12 -12
- package/dist/bin/tkr.js +213 -213
- package/dist/hooks-host/post-tool-use.js +9 -9
- package/dist/hooks-host/reducer-prompt-submit.js +1 -1
- package/dist/hooks-host/reducer-session-start.js +1 -1
- package/dist/hooks-host/reducer-stop.js +25 -25
- package/dist/hooks-host/session-recap.js +2 -2
- package/dist/index.js +91 -91
- 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 +2 -2
- package/package.json +8 -8
- package/scripts/README-INSTALL.md +1 -1
- package/scripts/install-mac-linux.sh +2 -2
- package/scripts/install-windows.ps1 +4 -3
|
@@ -1,32 +1,32 @@
|
|
|
1
1
|
{
|
|
2
2
|
"darwin-arm64": {
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.1.1",
|
|
4
4
|
"file": "tkr-exec-darwin-arm64",
|
|
5
|
-
"sha256": "
|
|
5
|
+
"sha256": "7fa3f536b3bd8a88bd9efe9607c9b0bed2202ef8ab0efa0f6a30ef7fd3c02885"
|
|
6
6
|
},
|
|
7
7
|
"darwin-x64": {
|
|
8
|
-
"version": "1.
|
|
8
|
+
"version": "1.1.1",
|
|
9
9
|
"file": "tkr-exec-darwin-x64",
|
|
10
|
-
"sha256": "
|
|
10
|
+
"sha256": "deafe966f51a54ae72375dafbb0a0c2ff855d3ca9dbe82901dc0592f1d6fb215"
|
|
11
11
|
},
|
|
12
12
|
"linux-arm64": {
|
|
13
|
-
"version": "1.
|
|
13
|
+
"version": "1.1.1",
|
|
14
14
|
"file": "tkr-exec-linux-arm64",
|
|
15
|
-
"sha256": "
|
|
15
|
+
"sha256": "09b9ee932a3453f8c63994077d9c4567dd23a6758099ef9676d7919b0b816e91"
|
|
16
16
|
},
|
|
17
17
|
"linux-x64": {
|
|
18
|
-
"version": "1.
|
|
18
|
+
"version": "1.1.1",
|
|
19
19
|
"file": "tkr-exec-linux-x64",
|
|
20
|
-
"sha256": "
|
|
20
|
+
"sha256": "817c6a76dc53f8031261b129969daf5f4936531528befbb5ddd9b726ad9553b3"
|
|
21
21
|
},
|
|
22
22
|
"win32-arm64": {
|
|
23
|
-
"version": "1.
|
|
23
|
+
"version": "1.1.1",
|
|
24
24
|
"file": "tkr-exec-win32-arm64.exe",
|
|
25
|
-
"sha256": "
|
|
25
|
+
"sha256": "d40ff83d0b1fe54fe40f2a74c4900f58be862639f50eb4f763e3b0b8fd7decbc"
|
|
26
26
|
},
|
|
27
27
|
"win32-x64": {
|
|
28
|
-
"version": "1.
|
|
28
|
+
"version": "1.1.1",
|
|
29
29
|
"file": "tkr-exec-win32-x64.exe",
|
|
30
|
-
"sha256": "
|
|
30
|
+
"sha256": "af8d3e8360466a5156cb39990ca0c6bf5fc61f951a80b2742734d21427b99639"
|
|
31
31
|
}
|
|
32
32
|
}
|
package/dist/native/single.json
CHANGED
|
@@ -1,38 +1,38 @@
|
|
|
1
1
|
{
|
|
2
2
|
"darwin-arm64": {
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.1.1",
|
|
4
4
|
"package": "@tokmizer/plugin-darwin-arm64",
|
|
5
5
|
"file": "tkr",
|
|
6
|
-
"sha256": "
|
|
6
|
+
"sha256": "7de46cc287211e02b38c61ec227b86f5dbc6a7b14ed531f134be6c078893674b"
|
|
7
7
|
},
|
|
8
8
|
"darwin-x64": {
|
|
9
|
-
"version": "1.
|
|
9
|
+
"version": "1.1.1",
|
|
10
10
|
"package": "@tokmizer/plugin-darwin-x64",
|
|
11
11
|
"file": "tkr",
|
|
12
|
-
"sha256": "
|
|
12
|
+
"sha256": "d275c69921ec7b338d1d443f7c01b13f2cf8bcc951b39ce48996a70921bd3c79"
|
|
13
13
|
},
|
|
14
14
|
"linux-arm64": {
|
|
15
|
-
"version": "1.
|
|
15
|
+
"version": "1.1.1",
|
|
16
16
|
"package": "@tokmizer/plugin-linux-arm64",
|
|
17
17
|
"file": "tkr",
|
|
18
|
-
"sha256": "
|
|
18
|
+
"sha256": "ab18cf10ced6f4f91f0b2f102e6df1900f92918e8b8aa4f84db1ccab397c5223"
|
|
19
19
|
},
|
|
20
20
|
"linux-x64": {
|
|
21
|
-
"version": "1.
|
|
21
|
+
"version": "1.1.1",
|
|
22
22
|
"package": "@tokmizer/plugin-linux-x64",
|
|
23
23
|
"file": "tkr",
|
|
24
|
-
"sha256": "
|
|
24
|
+
"sha256": "171344872d93b2da158471607de4ec93b3aff4ea69eb94465a76724a90698686"
|
|
25
25
|
},
|
|
26
26
|
"win32-arm64": {
|
|
27
|
-
"version": "1.
|
|
27
|
+
"version": "1.1.1",
|
|
28
28
|
"package": "@tokmizer/plugin-win32-arm64",
|
|
29
29
|
"file": "tkr.exe",
|
|
30
|
-
"sha256": "
|
|
30
|
+
"sha256": "7ead22e4854f878e36b97e05d05cfc37c3cd6189edc3babbb62445a980f0404c"
|
|
31
31
|
},
|
|
32
32
|
"win32-x64": {
|
|
33
|
-
"version": "1.
|
|
33
|
+
"version": "1.1.1",
|
|
34
34
|
"package": "@tokmizer/plugin-win32-x64",
|
|
35
35
|
"file": "tkr.exe",
|
|
36
|
-
"sha256": "
|
|
36
|
+
"sha256": "4cbfeea2f8c6b16108649e42a63fb19494e0f80d24a4121e457df803f33661df"
|
|
37
37
|
}
|
|
38
38
|
}
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -105,8 +105,8 @@ try {
|
|
|
105
105
|
userMessages.push(
|
|
106
106
|
[
|
|
107
107
|
"Tokmizer contacts tokmizer.com to keep its rules up to date and to improve the product. No account or email is needed.",
|
|
108
|
-
"It sends a random install ID,
|
|
109
|
-
"Usage stats (command names, token counts and install health counts) are sent only while they are on. Check with: tkr telemetry status.",
|
|
108
|
+
"It sends a random install ID, the plugin version and how it was installed (npm, Homebrew, Claude Code...), nothing that describes your machine: no computer name, OS, hardware or user name. Command contents and output are never sent.",
|
|
109
|
+
"Usage stats (command names, token counts and install health counts) are sent only while they are on, to spot when compression gets worse and fix it before it reaches everyone. Check with: tkr telemetry status.",
|
|
110
110
|
"Turn all network access off: tkr network off. Usage stats only: tkr telemetry off."
|
|
111
111
|
].join("\n")
|
|
112
112
|
);
|
package/package.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tokmizer/plugin",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.1.1",
|
|
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": {
|
|
7
|
-
"node": ">=
|
|
7
|
+
"node": "^22.23.4 || ^24.22.1 || >=26.12.1"
|
|
8
8
|
},
|
|
9
9
|
"main": "dist/index.js",
|
|
10
10
|
"bin": {
|
|
@@ -61,12 +61,12 @@
|
|
|
61
61
|
"zod": "^3.23.8"
|
|
62
62
|
},
|
|
63
63
|
"optionalDependencies": {
|
|
64
|
-
"@tokmizer/plugin-darwin-arm64": "1.
|
|
65
|
-
"@tokmizer/plugin-darwin-x64": "1.
|
|
66
|
-
"@tokmizer/plugin-linux-arm64": "1.
|
|
67
|
-
"@tokmizer/plugin-linux-x64": "1.
|
|
68
|
-
"@tokmizer/plugin-win32-arm64": "1.
|
|
69
|
-
"@tokmizer/plugin-win32-x64": "1.
|
|
64
|
+
"@tokmizer/plugin-darwin-arm64": "1.1.1",
|
|
65
|
+
"@tokmizer/plugin-darwin-x64": "1.1.1",
|
|
66
|
+
"@tokmizer/plugin-linux-arm64": "1.1.1",
|
|
67
|
+
"@tokmizer/plugin-linux-x64": "1.1.1",
|
|
68
|
+
"@tokmizer/plugin-win32-arm64": "1.1.1",
|
|
69
|
+
"@tokmizer/plugin-win32-x64": "1.1.1"
|
|
70
70
|
},
|
|
71
71
|
"publishConfig": {
|
|
72
72
|
"access": "public"
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Tokmizer works with **Claude Code, OpenAI Codex, Cursor, Cline, Aider, Gemini CLI, Windsurf, and GitHub Copilot** — on **macOS, Linux, and Windows**.
|
|
4
4
|
|
|
5
|
-
Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Factory Droid, Trae, Qwen Code, Crush, Junie CLI, ZCode, Grok Build and Kilo Code use native hooks or plugins (`tkr setup-<tool>` installs them; see the table below). Aider, Cline and Windsurf have no hook system: Tokmizer reaches them through command shims that are active only inside the agent, never in your own terminals. Tokmizer does not edit your shell profile. Node.js
|
|
5
|
+
Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Factory Droid, Trae, Qwen Code, Crush, Junie CLI, ZCode, Grok Build and Kilo Code use native hooks or plugins (`tkr setup-<tool>` installs them; see the table below). Aider, Cline and Windsurf have no hook system: Tokmizer reaches them through command shims that are active only inside the agent, never in your own terminals. Tokmizer does not edit your shell profile. Node.js 24.22.1 or newer (or 22.23.4+) is required for npm installation. Tokmizer is free and requires no account.
|
|
6
6
|
|
|
7
7
|
## macOS / Linux
|
|
8
8
|
|
|
@@ -6,7 +6,7 @@ log() { printf 'tkr: %s\n' "$*"; }
|
|
|
6
6
|
|
|
7
7
|
node_ready() {
|
|
8
8
|
command -v node >/dev/null 2>&1 && command -v npm >/dev/null 2>&1 &&
|
|
9
|
-
node -e 'const [major, minor] = process.versions.node.split(".").map(Number); process.exit(major
|
|
9
|
+
node -e 'const [major, minor, patch] = process.versions.node.split(".").map(Number); const at = (m, p) => minor > m || minor === m && patch >= p; process.exit(major === 22 && at(23, 4) || major === 24 && at(22, 1) || major === 26 && at(12, 1) || major > 26 ? 0 : 1)' 2>/dev/null
|
|
10
10
|
}
|
|
11
11
|
|
|
12
12
|
work=""
|
|
@@ -65,7 +65,7 @@ sha256_of() {
|
|
|
65
65
|
|
|
66
66
|
install_standalone() {
|
|
67
67
|
local os arch key base line name sum root bindir unavailable
|
|
68
|
-
unavailable="Install Node.js
|
|
68
|
+
unavailable="Install Node.js 24.22.1+ (or 22.23.4+) and retry."
|
|
69
69
|
case "$(uname -s)" in
|
|
70
70
|
Darwin) os=darwin ;;
|
|
71
71
|
Linux) os=linux ;;
|
|
@@ -5,9 +5,10 @@ function Fail([string]$msg) { Write-Error "tkr install: $msg"; exit 1 }
|
|
|
5
5
|
|
|
6
6
|
try {
|
|
7
7
|
$nodeVersion = [version]((node --version).TrimStart('v'))
|
|
8
|
-
if ($LASTEXITCODE -ne 0) { Fail "Node.js
|
|
9
|
-
|
|
10
|
-
|
|
8
|
+
if ($LASTEXITCODE -ne 0) { Fail "Node.js 24.22.1+ (or 22.23.4+) is required." }
|
|
9
|
+
$patched = ($nodeVersion.Major -eq 22 -and $nodeVersion -ge [version]'22.23.4') -or ($nodeVersion.Major -eq 24 -and $nodeVersion -ge [version]'24.22.1') -or ($nodeVersion.Major -eq 26 -and $nodeVersion -ge [version]'26.12.1') -or $nodeVersion.Major -gt 26
|
|
10
|
+
if (-not $patched) { Fail "Node.js 24.22.1+ (or 22.23.4+) is required." }
|
|
11
|
+
} catch { Fail "Node.js 24.22.1+ (or 22.23.4+) is required." }
|
|
11
12
|
|
|
12
13
|
Write-Log "Installing @tokmizer/plugin from npm..."
|
|
13
14
|
npm.cmd install -g @tokmizer/plugin
|