@tokmizer/plugin 0.9.71 → 1.0.0
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/command-templates/tkr-compression.md +1 -0
- package/command-templates/tkr-gain.md +1 -0
- package/command-templates/tkr-link.md +2 -1
- package/command-templates/tkr-status.md +1 -0
- package/command-templates/tkr-telemetry.md +1 -0
- package/command-templates/tkr-unlink.md +1 -0
- package/command-templates/tkr-update.md +1 -0
- package/command-templates/tkr-yolo.md +1 -0
- package/command-templates/tkr.md +1 -0
- package/dist/bin/tkr-agent-hook.js +13 -13
- package/dist/bin/tkr-codex-hook.js +77 -77
- package/dist/bin/tkr-context-hook.js +2 -2
- package/dist/bin/tkr-copilot-hook.js +12 -12
- package/dist/bin/tkr-crush-hook.js +12 -12
- package/dist/bin/tkr-cursor-hook.js +12 -12
- package/dist/bin/tkr-daemon.js +148 -142
- package/dist/bin/tkr-droid-hook.js +12 -12
- package/dist/bin/tkr-exec +0 -0
- package/dist/bin/tkr-exec.js +87 -84
- package/dist/bin/tkr-gemini-hook.js +12 -12
- package/dist/bin/tkr-grok-hook.js +12 -12
- package/dist/bin/tkr-junie-hook.js +12 -12
- package/dist/bin/tkr-processor.js +106 -103
- package/dist/bin/tkr-qwen-hook.js +12 -12
- package/dist/bin/tkr-shim.js +91 -87
- package/dist/bin/tkr-trae-hook.js +12 -12
- package/dist/bin/tkr-zcode-hook.js +12 -12
- package/dist/bin/tkr.js +280 -286
- package/dist/hooks-host/command-expansion.js +1 -1
- package/dist/hooks-host/post-tool-use.js +101 -98
- package/dist/hooks-host/pre-tool-use.js +13 -13
- package/dist/hooks-host/reducer-prompt-submit.js +2 -2
- package/dist/hooks-host/reducer-session-start.js +2 -2
- package/dist/hooks-host/reducer-stop.js +24 -24
- package/dist/hooks-host/session-recap.js +5 -5
- package/dist/index.js +105 -102
- 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 +4 -2
- package/package.json +7 -7
- package/scripts/README-INSTALL.md +8 -0
- package/scripts/install-mac-linux.sh +3 -3
- package/scripts/install-windows.ps1 +0 -7
|
@@ -1,32 +1,32 @@
|
|
|
1
1
|
{
|
|
2
2
|
"darwin-arm64": {
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "1.0.0",
|
|
4
4
|
"file": "tkr-exec-darwin-arm64",
|
|
5
|
-
"sha256": "
|
|
5
|
+
"sha256": "84924034de29a69eab4879242237dd75c280c2c6b0a67640664098dbaffbd285"
|
|
6
6
|
},
|
|
7
7
|
"darwin-x64": {
|
|
8
|
-
"version": "0.
|
|
8
|
+
"version": "1.0.0",
|
|
9
9
|
"file": "tkr-exec-darwin-x64",
|
|
10
|
-
"sha256": "
|
|
10
|
+
"sha256": "d1d07b4e8670ae748b568c56de407e4e84ed540beb7074c81af378b741f133dc"
|
|
11
11
|
},
|
|
12
12
|
"linux-arm64": {
|
|
13
|
-
"version": "0.
|
|
13
|
+
"version": "1.0.0",
|
|
14
14
|
"file": "tkr-exec-linux-arm64",
|
|
15
|
-
"sha256": "
|
|
15
|
+
"sha256": "e4de8e379595d6024e868cecb5eef58b9f03f0b470a3b16ccc6255b3727d96db"
|
|
16
16
|
},
|
|
17
17
|
"linux-x64": {
|
|
18
|
-
"version": "0.
|
|
18
|
+
"version": "1.0.0",
|
|
19
19
|
"file": "tkr-exec-linux-x64",
|
|
20
|
-
"sha256": "
|
|
20
|
+
"sha256": "f6e64d2863fd797850b2f5316f71f180bdfaaffff87b39e28c4258e64181676b"
|
|
21
21
|
},
|
|
22
22
|
"win32-arm64": {
|
|
23
|
-
"version": "0.
|
|
23
|
+
"version": "1.0.0",
|
|
24
24
|
"file": "tkr-exec-win32-arm64.exe",
|
|
25
|
-
"sha256": "
|
|
25
|
+
"sha256": "2ac38cc4417ba6bf7539137b5e6ea30e0ef9b35a40205ff7e2a0dec0a34d40ca"
|
|
26
26
|
},
|
|
27
27
|
"win32-x64": {
|
|
28
|
-
"version": "0.
|
|
28
|
+
"version": "1.0.0",
|
|
29
29
|
"file": "tkr-exec-win32-x64.exe",
|
|
30
|
-
"sha256": "
|
|
30
|
+
"sha256": "d104ab8b1d172cdac9e3f9a81dc254fd1370eca92a0464b1f7597654365d67ac"
|
|
31
31
|
}
|
|
32
32
|
}
|
package/dist/native/single.json
CHANGED
|
@@ -1,38 +1,38 @@
|
|
|
1
1
|
{
|
|
2
2
|
"darwin-arm64": {
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "1.0.0",
|
|
4
4
|
"package": "@tokmizer/plugin-darwin-arm64",
|
|
5
5
|
"file": "tkr",
|
|
6
|
-
"sha256": "
|
|
6
|
+
"sha256": "a2f5e76ce5fbcdedc2acd8397bb812b4da0ff54a5ab5a8022fc0fe978d64b9d0"
|
|
7
7
|
},
|
|
8
8
|
"darwin-x64": {
|
|
9
|
-
"version": "0.
|
|
9
|
+
"version": "1.0.0",
|
|
10
10
|
"package": "@tokmizer/plugin-darwin-x64",
|
|
11
11
|
"file": "tkr",
|
|
12
|
-
"sha256": "
|
|
12
|
+
"sha256": "84cdbc84941921d32588a8e765eaaa85dffed927fe53225b1393c0a3328d77f1"
|
|
13
13
|
},
|
|
14
14
|
"linux-arm64": {
|
|
15
|
-
"version": "0.
|
|
15
|
+
"version": "1.0.0",
|
|
16
16
|
"package": "@tokmizer/plugin-linux-arm64",
|
|
17
17
|
"file": "tkr",
|
|
18
|
-
"sha256": "
|
|
18
|
+
"sha256": "5713419d9807bf3d577c043cfb4e2075a03046cfff8cb73ee95673797f57d4ea"
|
|
19
19
|
},
|
|
20
20
|
"linux-x64": {
|
|
21
|
-
"version": "0.
|
|
21
|
+
"version": "1.0.0",
|
|
22
22
|
"package": "@tokmizer/plugin-linux-x64",
|
|
23
23
|
"file": "tkr",
|
|
24
|
-
"sha256": "
|
|
24
|
+
"sha256": "539f39fb64363c25490bf84e6ad016630f841d297b9b68725377ee4f53fed559"
|
|
25
25
|
},
|
|
26
26
|
"win32-arm64": {
|
|
27
|
-
"version": "0.
|
|
27
|
+
"version": "1.0.0",
|
|
28
28
|
"package": "@tokmizer/plugin-win32-arm64",
|
|
29
29
|
"file": "tkr.exe",
|
|
30
|
-
"sha256": "
|
|
30
|
+
"sha256": "38d3ab2118c7f251b50389484d158c3fbcbbb381145ee2cb1ed2018b116d2c5e"
|
|
31
31
|
},
|
|
32
32
|
"win32-x64": {
|
|
33
|
-
"version": "0.
|
|
33
|
+
"version": "1.0.0",
|
|
34
34
|
"package": "@tokmizer/plugin-win32-x64",
|
|
35
35
|
"file": "tkr.exe",
|
|
36
|
-
"sha256": "
|
|
36
|
+
"sha256": "5a7df5b10a92239c4e65801351b4bd1d3e4e7a31194e10deb0e7c8d4dd3861d8"
|
|
37
37
|
}
|
|
38
38
|
}
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -79,6 +79,8 @@ try {
|
|
|
79
79
|
if (n === keepNewest) continue;
|
|
80
80
|
const p = join(parent, n);
|
|
81
81
|
if (statSync(p).mtimeMs > cutoff) continue;
|
|
82
|
+
const orphaned = join(p, ".orphaned_at");
|
|
83
|
+
if (!existsSync(orphaned) || statSync(orphaned).mtimeMs > cutoff) continue;
|
|
82
84
|
rmSync(p, { recursive: true, force: true });
|
|
83
85
|
}
|
|
84
86
|
}
|
|
@@ -88,9 +90,9 @@ try {
|
|
|
88
90
|
const onboardFile = join(home, "onboarded");
|
|
89
91
|
if (!existsSync(onboardFile)) {
|
|
90
92
|
userMessages.push(
|
|
91
|
-
"Tokmizer is on with the recommended settings.
|
|
93
|
+
"Tokmizer is on with the recommended settings. No account needed.\n" +
|
|
92
94
|
"See it live anytime: /tkr-status. Your savings: /tkr-gain.\n" +
|
|
93
|
-
"Tune it with /tkr.
|
|
95
|
+
"Tune it with /tkr. Link an account with /tkr-link."
|
|
94
96
|
);
|
|
95
97
|
mkdirSync(home, { recursive: true });
|
|
96
98
|
writeFileSync(onboardFile, String(Date.now()));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tokmizer/plugin",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "1.0.0",
|
|
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.
|
|
65
|
-
"@tokmizer/plugin-darwin-x64": "0.
|
|
66
|
-
"@tokmizer/plugin-linux-arm64": "0.
|
|
67
|
-
"@tokmizer/plugin-linux-x64": "0.
|
|
68
|
-
"@tokmizer/plugin-win32-arm64": "0.
|
|
69
|
-
"@tokmizer/plugin-win32-x64": "0.
|
|
64
|
+
"@tokmizer/plugin-darwin-arm64": "1.0.0",
|
|
65
|
+
"@tokmizer/plugin-darwin-x64": "1.0.0",
|
|
66
|
+
"@tokmizer/plugin-linux-arm64": "1.0.0",
|
|
67
|
+
"@tokmizer/plugin-linux-x64": "1.0.0",
|
|
68
|
+
"@tokmizer/plugin-win32-arm64": "1.0.0",
|
|
69
|
+
"@tokmizer/plugin-win32-x64": "1.0.0"
|
|
70
70
|
},
|
|
71
71
|
"publishConfig": {
|
|
72
72
|
"access": "public"
|
|
@@ -10,6 +10,14 @@ Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Factory Droid, Trae, Qwe
|
|
|
10
10
|
curl -fsSL https://tokmizer.com/install.sh | bash
|
|
11
11
|
```
|
|
12
12
|
|
|
13
|
+
Without Node.js, the script installs the standalone executable and first checks the release signature with OpenSSL 3 or `ssh-keygen -Y verify` (OpenSSH 8.1+, included in macOS). If neither tool is available, the installation stops. To install anyway with only the SHA256SUMS checksums, at your own risk:
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
curl -fsSL https://tokmizer.com/install.sh | TOKMIZER_ALLOW_UNSIGNED=1 bash
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
`TOKMIZER_REQUIRE_SIG=1` keeps the signature mandatory even when `TOKMIZER_ALLOW_UNSIGNED=1` is set.
|
|
20
|
+
|
|
13
21
|
## Windows (PowerShell)
|
|
14
22
|
|
|
15
23
|
```powershell
|
|
@@ -51,10 +51,10 @@ verify_sums() {
|
|
|
51
51
|
log "Release signature verified (ssh-keygen)."
|
|
52
52
|
return 0
|
|
53
53
|
fi
|
|
54
|
-
if [ "${TOKMIZER_REQUIRE_SIG:-}" = "1" ]; then
|
|
55
|
-
err "Cannot verify the release signature
|
|
54
|
+
if [ "${TOKMIZER_ALLOW_UNSIGNED:-}" != "1" ] || [ "${TOKMIZER_REQUIRE_SIG:-}" = "1" ]; then
|
|
55
|
+
err "Cannot verify the release signature (no OpenSSL 3 with Ed25519, no ssh-keygen -Y). Install OpenSSL 3 or OpenSSH 8.1+ and retry, or set TOKMIZER_ALLOW_UNSIGNED=1 to install with SHA256SUMS checks only, at your own risk."
|
|
56
56
|
fi
|
|
57
|
-
log "Warning:
|
|
57
|
+
log "Warning: TOKMIZER_ALLOW_UNSIGNED=1, the release signature is not verified. Relying on SHA256SUMS only."
|
|
58
58
|
}
|
|
59
59
|
|
|
60
60
|
sha256_of() {
|
|
@@ -17,13 +17,6 @@ if (-not (Get-Command tkr.cmd -ErrorAction SilentlyContinue)) { Fail "tkr is not
|
|
|
17
17
|
tkr.cmd shim install
|
|
18
18
|
if ($LASTEXITCODE -ne 0) { Fail "Tokmizer setup failed. Fix the reported error and run tkr shim install again." }
|
|
19
19
|
|
|
20
|
-
$tokmizerDir = if ($env:TOKMIZER_HOME) { $env:TOKMIZER_HOME } else { Join-Path $env:USERPROFILE ".tokmizer" }
|
|
21
|
-
$shimsDir = Join-Path $tokmizerDir "shims"
|
|
22
|
-
$userPath = [Environment]::GetEnvironmentVariable("Path", "User")
|
|
23
|
-
if (($userPath -split ';') -notcontains $shimsDir) {
|
|
24
|
-
[Environment]::SetEnvironmentVariable("Path", "$shimsDir;$userPath", "User")
|
|
25
|
-
}
|
|
26
|
-
|
|
27
20
|
Write-Log "Done. Open a new terminal. Tokmizer is free and does not require an account."
|
|
28
21
|
Write-Log "For Codex, also run: tkr setup-codex"
|
|
29
22
|
Write-Log "Check the installation with: tkr status"
|