@tokenade/cli 0.8.8 → 0.8.10
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/install.js +22 -0
- package/package.json +1 -1
package/install.js
CHANGED
|
@@ -312,6 +312,28 @@ async function main() {
|
|
|
312
312
|
}
|
|
313
313
|
}
|
|
314
314
|
|
|
315
|
+
// macOS: guarantee the binary can execute. On Apple Silicon the kernel
|
|
316
|
+
// SIGKILLs (exit 137, "killed: 9") any arm64 Mach-O with NO code signature
|
|
317
|
+
// the moment it's exec'd — an unsigned binary never reaches main(), so
|
|
318
|
+
// tokenade cannot self-heal its own signature after a fresh install. The
|
|
319
|
+
// published build is ad-hoc (linker-)signed, but we self-heal defensively:
|
|
320
|
+
// strip com.apple.quarantine (browser/zip/AV can set it) and, if the
|
|
321
|
+
// signature does not verify, apply an ad-hoc one. codesign/xattr ship in
|
|
322
|
+
// macOS base + the Command Line Tools; failures are non-fatal.
|
|
323
|
+
if (process.platform === "darwin") {
|
|
324
|
+
const { spawnSync } = require("node:child_process");
|
|
325
|
+
const f = path.join(VENDOR, "tokenade");
|
|
326
|
+
if (fs.existsSync(f)) {
|
|
327
|
+
const q = (cmd, args) =>
|
|
328
|
+
spawnSync(cmd, args, { stdio: "ignore" });
|
|
329
|
+
q("/usr/bin/xattr", ["-dr", "com.apple.quarantine", f]);
|
|
330
|
+
const ok =
|
|
331
|
+
q("/usr/bin/codesign", ["--verify", f]).status === 0;
|
|
332
|
+
if (!ok)
|
|
333
|
+
q("/usr/bin/codesign", ["--force", "--sign", "-", f]);
|
|
334
|
+
}
|
|
335
|
+
}
|
|
336
|
+
|
|
315
337
|
console.log(`✓ tokenade ${manifest.version} installed (${target})`);
|
|
316
338
|
console.log(" Next: run `tokenade install` — that's it, savings start immediately.");
|
|
317
339
|
console.log(
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tokenade/cli",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.10",
|
|
4
4
|
"description": "Tokenade \u2014 cut your AI coding agent's token bill. Installs the Tokenade CLI (a local, paid token-reduction tool; activate via your browser).",
|
|
5
5
|
"homepage": "https://tokenade.net",
|
|
6
6
|
"license": "UNLICENSED",
|