@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.
Files changed (51) hide show
  1. package/.claude-plugin/plugin.json +1 -1
  2. package/.codex-plugin/plugin.json +1 -1
  3. package/command-templates/tkr-compression.md +1 -0
  4. package/command-templates/tkr-gain.md +1 -0
  5. package/command-templates/tkr-link.md +2 -1
  6. package/command-templates/tkr-status.md +1 -0
  7. package/command-templates/tkr-telemetry.md +1 -0
  8. package/command-templates/tkr-unlink.md +1 -0
  9. package/command-templates/tkr-update.md +1 -0
  10. package/command-templates/tkr-yolo.md +1 -0
  11. package/command-templates/tkr.md +1 -0
  12. package/dist/bin/tkr-agent-hook.js +13 -13
  13. package/dist/bin/tkr-codex-hook.js +77 -77
  14. package/dist/bin/tkr-context-hook.js +2 -2
  15. package/dist/bin/tkr-copilot-hook.js +12 -12
  16. package/dist/bin/tkr-crush-hook.js +12 -12
  17. package/dist/bin/tkr-cursor-hook.js +12 -12
  18. package/dist/bin/tkr-daemon.js +148 -142
  19. package/dist/bin/tkr-droid-hook.js +12 -12
  20. package/dist/bin/tkr-exec +0 -0
  21. package/dist/bin/tkr-exec.js +87 -84
  22. package/dist/bin/tkr-gemini-hook.js +12 -12
  23. package/dist/bin/tkr-grok-hook.js +12 -12
  24. package/dist/bin/tkr-junie-hook.js +12 -12
  25. package/dist/bin/tkr-processor.js +106 -103
  26. package/dist/bin/tkr-qwen-hook.js +12 -12
  27. package/dist/bin/tkr-shim.js +91 -87
  28. package/dist/bin/tkr-trae-hook.js +12 -12
  29. package/dist/bin/tkr-zcode-hook.js +12 -12
  30. package/dist/bin/tkr.js +280 -286
  31. package/dist/hooks-host/command-expansion.js +1 -1
  32. package/dist/hooks-host/post-tool-use.js +101 -98
  33. package/dist/hooks-host/pre-tool-use.js +13 -13
  34. package/dist/hooks-host/reducer-prompt-submit.js +2 -2
  35. package/dist/hooks-host/reducer-session-start.js +2 -2
  36. package/dist/hooks-host/reducer-stop.js +24 -24
  37. package/dist/hooks-host/session-recap.js +5 -5
  38. package/dist/index.js +105 -102
  39. package/dist/native/manifest.json +12 -12
  40. package/dist/native/single.json +12 -12
  41. package/dist/native/tkr-exec-darwin-arm64 +0 -0
  42. package/dist/native/tkr-exec-darwin-x64 +0 -0
  43. package/dist/native/tkr-exec-linux-arm64 +0 -0
  44. package/dist/native/tkr-exec-linux-x64 +0 -0
  45. package/dist/native/tkr-exec-win32-arm64.exe +0 -0
  46. package/dist/native/tkr-exec-win32-x64.exe +0 -0
  47. package/hooks/on-session-start.mjs +4 -2
  48. package/package.json +7 -7
  49. package/scripts/README-INSTALL.md +8 -0
  50. package/scripts/install-mac-linux.sh +3 -3
  51. package/scripts/install-windows.ps1 +0 -7
@@ -1,32 +1,32 @@
1
1
  {
2
2
  "darwin-arm64": {
3
- "version": "0.9.71",
3
+ "version": "1.0.0",
4
4
  "file": "tkr-exec-darwin-arm64",
5
- "sha256": "24b511f01c64d71fbe18be3dc0f86a947cd1b2c1df764fb1ab900388005c1e0e"
5
+ "sha256": "84924034de29a69eab4879242237dd75c280c2c6b0a67640664098dbaffbd285"
6
6
  },
7
7
  "darwin-x64": {
8
- "version": "0.9.71",
8
+ "version": "1.0.0",
9
9
  "file": "tkr-exec-darwin-x64",
10
- "sha256": "1cde66e7494d54bf2aaa688258eca5ede228e3b385bb72bb51c117769e47c5e0"
10
+ "sha256": "d1d07b4e8670ae748b568c56de407e4e84ed540beb7074c81af378b741f133dc"
11
11
  },
12
12
  "linux-arm64": {
13
- "version": "0.9.71",
13
+ "version": "1.0.0",
14
14
  "file": "tkr-exec-linux-arm64",
15
- "sha256": "c67a73d7bddd64698b3e65b9c5644a92b1c290d5755b4caa5e120dc29ab0f191"
15
+ "sha256": "e4de8e379595d6024e868cecb5eef58b9f03f0b470a3b16ccc6255b3727d96db"
16
16
  },
17
17
  "linux-x64": {
18
- "version": "0.9.71",
18
+ "version": "1.0.0",
19
19
  "file": "tkr-exec-linux-x64",
20
- "sha256": "331b451c44b5fc717dcfef4cd4224ba78dde65d95977ae298e55d1ddb0fd8766"
20
+ "sha256": "f6e64d2863fd797850b2f5316f71f180bdfaaffff87b39e28c4258e64181676b"
21
21
  },
22
22
  "win32-arm64": {
23
- "version": "0.9.71",
23
+ "version": "1.0.0",
24
24
  "file": "tkr-exec-win32-arm64.exe",
25
- "sha256": "f213b6e49d2f6c0bac7fe54bdb39e2410639f298e4f0c2812beee9fdc0143d1e"
25
+ "sha256": "2ac38cc4417ba6bf7539137b5e6ea30e0ef9b35a40205ff7e2a0dec0a34d40ca"
26
26
  },
27
27
  "win32-x64": {
28
- "version": "0.9.71",
28
+ "version": "1.0.0",
29
29
  "file": "tkr-exec-win32-x64.exe",
30
- "sha256": "3fb1224332bda5ad24c60d0c975bda24c80e27bfd7f64c65cf73bcf5c6a9a317"
30
+ "sha256": "d104ab8b1d172cdac9e3f9a81dc254fd1370eca92a0464b1f7597654365d67ac"
31
31
  }
32
32
  }
@@ -1,38 +1,38 @@
1
1
  {
2
2
  "darwin-arm64": {
3
- "version": "0.9.71",
3
+ "version": "1.0.0",
4
4
  "package": "@tokmizer/plugin-darwin-arm64",
5
5
  "file": "tkr",
6
- "sha256": "f29f12926c462b41dbc4cad0310ab825d584442987c8039354cf7f5b9aef07ba"
6
+ "sha256": "a2f5e76ce5fbcdedc2acd8397bb812b4da0ff54a5ab5a8022fc0fe978d64b9d0"
7
7
  },
8
8
  "darwin-x64": {
9
- "version": "0.9.71",
9
+ "version": "1.0.0",
10
10
  "package": "@tokmizer/plugin-darwin-x64",
11
11
  "file": "tkr",
12
- "sha256": "0a4b913b8db95ad47e075bdb06f648232ab1e29e344b380533d218e54dfc3379"
12
+ "sha256": "84cdbc84941921d32588a8e765eaaa85dffed927fe53225b1393c0a3328d77f1"
13
13
  },
14
14
  "linux-arm64": {
15
- "version": "0.9.71",
15
+ "version": "1.0.0",
16
16
  "package": "@tokmizer/plugin-linux-arm64",
17
17
  "file": "tkr",
18
- "sha256": "f3f065e61ff1cbfe1b535bd8af9e7e352845a6322d424579effc44f56ce08ed1"
18
+ "sha256": "5713419d9807bf3d577c043cfb4e2075a03046cfff8cb73ee95673797f57d4ea"
19
19
  },
20
20
  "linux-x64": {
21
- "version": "0.9.71",
21
+ "version": "1.0.0",
22
22
  "package": "@tokmizer/plugin-linux-x64",
23
23
  "file": "tkr",
24
- "sha256": "ce30a31552d559dbcbf6f102d9650cb2d6ac9f890903d7ba2cc2a6e63734a166"
24
+ "sha256": "539f39fb64363c25490bf84e6ad016630f841d297b9b68725377ee4f53fed559"
25
25
  },
26
26
  "win32-arm64": {
27
- "version": "0.9.71",
27
+ "version": "1.0.0",
28
28
  "package": "@tokmizer/plugin-win32-arm64",
29
29
  "file": "tkr.exe",
30
- "sha256": "5b824f5f7dbbdec9a514b2f2af5417c13ae3781c6fd6842095ffab5e7133e58e"
30
+ "sha256": "38d3ab2118c7f251b50389484d158c3fbcbbb381145ee2cb1ed2018b116d2c5e"
31
31
  },
32
32
  "win32-x64": {
33
- "version": "0.9.71",
33
+ "version": "1.0.0",
34
34
  "package": "@tokmizer/plugin-win32-x64",
35
35
  "file": "tkr.exe",
36
- "sha256": "efb7ff7fa24dbdd941daae2da95ae5fe461c56d82a41d124b495b8f92ed4ffd2"
36
+ "sha256": "5a7df5b10a92239c4e65801351b4bd1d3e4e7a31194e10deb0e7c8d4dd3861d8"
37
37
  }
38
38
  }
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. Free tier, no account needed.\n" +
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. Paid plan? Link it with /tkr-link."
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.9.71",
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.9.71",
65
- "@tokmizer/plugin-darwin-x64": "0.9.71",
66
- "@tokmizer/plugin-linux-arm64": "0.9.71",
67
- "@tokmizer/plugin-linux-x64": "0.9.71",
68
- "@tokmizer/plugin-win32-arm64": "0.9.71",
69
- "@tokmizer/plugin-win32-x64": "0.9.71"
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: install OpenSSL 3 or OpenSSH 8.1+, or unset TOKMIZER_REQUIRE_SIG."
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: cannot verify the release signature (no OpenSSL 3 with Ed25519, no ssh-keygen -Y). Relying on SHA256SUMS only."
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"