@zabuti/tools 0.1.5 → 0.1.7
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/README.md +45 -45
- package/dist/installer/src/index.js +11 -11
- package/dist/installer/src/skills.js +11 -3
- package/package.json +33 -33
package/README.md
CHANGED
|
@@ -1,45 +1,45 @@
|
|
|
1
|
-
# @zabuti/tools
|
|
2
|
-
|
|
3
|
-
Installs the licensed Zabuti developer tools (Logic Map, Logic Optimizer, Deadlock Map) as
|
|
4
|
-
Claude Code skills. Needs a Zabuti license and a download token from zabuti.com/account (CLI
|
|
5
|
-
access).
|
|
6
|
-
|
|
7
|
-
```
|
|
8
|
-
npx @zabuti/tools login zct_…
|
|
9
|
-
npx @zabuti/tools add logic-map
|
|
10
|
-
npx @zabuti/tools add logic-optimizer
|
|
11
|
-
npx @zabuti/tools add deadlock-map # beta
|
|
12
|
-
```
|
|
13
|
-
|
|
14
|
-
## Updates
|
|
15
|
-
|
|
16
|
-
```
|
|
17
|
-
npx @zabuti/tools status # what is installed, and whether updates exist
|
|
18
|
-
npx @zabuti/tools update # update every installed skill that has a newer version
|
|
19
|
-
npx @zabuti/tools rollback logic-map # switch back to the copy the last update replaced
|
|
20
|
-
```
|
|
21
|
-
|
|
22
|
-
An update keeps the copy it replaces in `~/.zabuti/previous/<name>/`, outside the skills
|
|
23
|
-
folder so Claude Code doesn't load it as a second skill. Running `rollback` again swaps back.
|
|
24
|
-
Re-running `add` or `update` when nothing changed leaves the kept copy alone.
|
|
25
|
-
|
|
26
|
-
The skill is written to `~/.claude/skills/<name>/`. The server checks your token and your
|
|
27
|
-
organization's license on every download. Nothing from your project is sent. The free
|
|
28
|
-
`zabuti` CLI (components and icons) is a separate package and makes no network calls.
|
|
29
|
-
|
|
30
|
-
## Behind a corporate network
|
|
31
|
-
|
|
32
|
-
If `add` says it couldn't reach zabuti.com and the cause is a certificate error
|
|
33
|
-
(`UNABLE_TO_GET_ISSUER_CERT_LOCALLY`, `SELF_SIGNED_CERT_IN_CHAIN`, `CERT_HAS_EXPIRED`), your
|
|
34
|
-
network is probably re-signing secure traffic with a company certificate. The browser trusts it
|
|
35
|
-
because the operating system does; Node keeps its own list. Tell Node to use the system's
|
|
36
|
-
certificates (Node 22.15 or later), then run the command again:
|
|
37
|
-
|
|
38
|
-
```
|
|
39
|
-
$env:NODE_OPTIONS = "--use-system-ca" # PowerShell, this window only
|
|
40
|
-
npx @zabuti/tools add logic-map
|
|
41
|
-
```
|
|
42
|
-
|
|
43
|
-
Make it permanent with `setx NODE_OPTIONS "--use-system-ca"`. On older Node, set
|
|
44
|
-
`NODE_EXTRA_CA_CERTS` to your company's root certificate file instead. Please don't use
|
|
45
|
-
`NODE_TLS_REJECT_UNAUTHORIZED=0`: it turns certificate checks off entirely.
|
|
1
|
+
# @zabuti/tools
|
|
2
|
+
|
|
3
|
+
Installs the licensed Zabuti developer tools (Logic Map, Logic Optimizer, Deadlock Map) as
|
|
4
|
+
Claude Code skills. Needs a Zabuti license and a download token from zabuti.com/account (CLI
|
|
5
|
+
access).
|
|
6
|
+
|
|
7
|
+
```
|
|
8
|
+
npx @zabuti/tools login zct_…
|
|
9
|
+
npx @zabuti/tools add logic-map
|
|
10
|
+
npx @zabuti/tools add logic-optimizer
|
|
11
|
+
npx @zabuti/tools add deadlock-map # beta
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
## Updates
|
|
15
|
+
|
|
16
|
+
```
|
|
17
|
+
npx @zabuti/tools status # what is installed, and whether updates exist
|
|
18
|
+
npx @zabuti/tools update # update every installed skill that has a newer version
|
|
19
|
+
npx @zabuti/tools rollback logic-map # switch back to the copy the last update replaced
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
An update keeps the copy it replaces in `~/.zabuti/previous/<name>/`, outside the skills
|
|
23
|
+
folder so Claude Code doesn't load it as a second skill. Running `rollback` again swaps back.
|
|
24
|
+
Re-running `add` or `update` when nothing changed leaves the kept copy alone.
|
|
25
|
+
|
|
26
|
+
The skill is written to `~/.claude/skills/<name>/`. The server checks your token and your
|
|
27
|
+
organization's license on every download. Nothing from your project is sent. The free
|
|
28
|
+
`zabuti` CLI (components and icons) is a separate package and makes no network calls.
|
|
29
|
+
|
|
30
|
+
## Behind a corporate network
|
|
31
|
+
|
|
32
|
+
If `add` says it couldn't reach zabuti.com and the cause is a certificate error
|
|
33
|
+
(`UNABLE_TO_GET_ISSUER_CERT_LOCALLY`, `SELF_SIGNED_CERT_IN_CHAIN`, `CERT_HAS_EXPIRED`), your
|
|
34
|
+
network is probably re-signing secure traffic with a company certificate. The browser trusts it
|
|
35
|
+
because the operating system does; Node keeps its own list. Tell Node to use the system's
|
|
36
|
+
certificates (Node 22.15 or later), then run the command again:
|
|
37
|
+
|
|
38
|
+
```
|
|
39
|
+
$env:NODE_OPTIONS = "--use-system-ca" # PowerShell, this window only
|
|
40
|
+
npx @zabuti/tools add logic-map
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
Make it permanent with `setx NODE_OPTIONS "--use-system-ca"`. On older Node, set
|
|
44
|
+
`NODE_EXTRA_CA_CERTS` to your company's root certificate file instead. Please don't use
|
|
45
|
+
`NODE_TLS_REJECT_UNAUTHORIZED=0`: it turns certificate checks off entirely.
|
|
@@ -5,17 +5,17 @@
|
|
|
5
5
|
*/
|
|
6
6
|
import { readFileSync } from "node:fs";
|
|
7
7
|
import { cmdAddSkill, cmdLogin, cmdRollback, cmdStatus, cmdUpdate, SKILL_NAMES } from "./skills.js";
|
|
8
|
-
const USAGE = `zabuti-tools: install the licensed Zabuti developer tools
|
|
9
|
-
|
|
10
|
-
zabuti-tools login <token> save your download token (make one at zabuti.com/account)
|
|
11
|
-
zabuti-tools add <skill> install a skill into ~/.claude/skills/
|
|
12
|
-
skills: ${SKILL_NAMES.join(", ")}
|
|
13
|
-
zabuti-tools update [skill] update installed skills that have a newer version
|
|
14
|
-
zabuti-tools rollback <skill> switch back to the copy the last update replaced
|
|
15
|
-
|
|
16
|
-
zabuti-tools status show what is installed and whether updates exist
|
|
17
|
-
zabuti-tools --version
|
|
18
|
-
|
|
8
|
+
const USAGE = `zabuti-tools: install the licensed Zabuti developer tools
|
|
9
|
+
|
|
10
|
+
zabuti-tools login <token> save your download token (make one at zabuti.com/account)
|
|
11
|
+
zabuti-tools add <skill> install a skill into ~/.claude/skills/
|
|
12
|
+
skills: ${SKILL_NAMES.join(", ")}
|
|
13
|
+
zabuti-tools update [skill] update installed skills that have a newer version
|
|
14
|
+
zabuti-tools rollback <skill> switch back to the copy the last update replaced
|
|
15
|
+
|
|
16
|
+
zabuti-tools status show what is installed and whether updates exist
|
|
17
|
+
zabuti-tools --version
|
|
18
|
+
|
|
19
19
|
Options: --dry-run (list the files without writing), --out=<folder> (install there instead)`;
|
|
20
20
|
function die(msg) {
|
|
21
21
|
console.error(`zabuti-tools: ${msg}`);
|
|
@@ -104,6 +104,10 @@ export async function cmdAddSkill(name, dryRun, outDir) {
|
|
|
104
104
|
// Same files already on disk: leave everything alone, so the one kept backup
|
|
105
105
|
// stays a real older version instead of being replaced by an identical copy.
|
|
106
106
|
if (files.every((f) => existsSync(f.full) && sha256(readFileSync(f.full, "utf8")) === sha256(f.content))) {
|
|
107
|
+
// Installs from before manifests existed: record this one so status stops
|
|
108
|
+
// asking for a reinstall that would land here again.
|
|
109
|
+
if (!existsSync(join(root, MANIFEST)))
|
|
110
|
+
writeManifest(root, name, files);
|
|
107
111
|
console.log(`✓ ${name} is already up to date at ${root}`);
|
|
108
112
|
return;
|
|
109
113
|
}
|
|
@@ -118,14 +122,18 @@ export async function cmdAddSkill(name, dryRun, outDir) {
|
|
|
118
122
|
mkdirSync(dirname(f.full), { recursive: true });
|
|
119
123
|
writeFileSync(f.full, f.content);
|
|
120
124
|
}
|
|
121
|
-
|
|
122
|
-
writeFileSync(join(root, ".zabuti-install.json"), JSON.stringify(manifest, null, 2));
|
|
125
|
+
writeManifest(root, name, files);
|
|
123
126
|
console.log(`✓ Installed ${name} (${files.length} files) → ${root}`);
|
|
124
127
|
if (existsSync(previous))
|
|
125
128
|
console.log(` Previous copy kept at ${previous} (undo with \`zabuti-tools rollback ${name}\`)`);
|
|
126
129
|
console.log(" Open Claude Code in your project and ask it to use the skill.");
|
|
127
130
|
}
|
|
128
131
|
const sha256 = (s) => createHash("sha256").update(s, "utf8").digest("hex");
|
|
132
|
+
const MANIFEST = ".zabuti-install.json";
|
|
133
|
+
function writeManifest(root, name, files) {
|
|
134
|
+
const manifest = { name, installedAt: new Date().toISOString(), source: BASE_URL, files: files.map((f) => ({ path: f.rel, sha256: sha256(f.content) })) };
|
|
135
|
+
writeFileSync(join(root, MANIFEST), JSON.stringify(manifest, null, 2));
|
|
136
|
+
}
|
|
129
137
|
const skillRoot = (name) => join(homedir(), ".claude", "skills", name);
|
|
130
138
|
/** Where the replaced copy goes: never inside a skills folder. */
|
|
131
139
|
function previousDir(root, name) {
|
|
@@ -232,7 +240,7 @@ export async function cmdStatus() {
|
|
|
232
240
|
migrateLegacyBackup(root, previousDir(root, name));
|
|
233
241
|
const m = readManifest(root);
|
|
234
242
|
if (!m) {
|
|
235
|
-
console.log(`${name}: ${existsSync(root) ? "installed (no manifest;
|
|
243
|
+
console.log(`${name}: ${existsSync(root) ? "installed (no manifest; run `zabuti-tools update` to add one)" : "not installed"}`);
|
|
236
244
|
continue;
|
|
237
245
|
}
|
|
238
246
|
console.log(`${name}: installed ${m.installedAt ?? "?"} from ${m.source ?? "?"} (${m.files?.length ?? "?"} files) at ${root}`);
|
package/package.json
CHANGED
|
@@ -1,33 +1,33 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@zabuti/tools",
|
|
3
|
-
"version": "0.1.
|
|
4
|
-
"description": "Installs the licensed Zabuti developer tools (Logic Map, Logic Optimizer, Deadlock Map) as Claude Code skills. Needs a license and a download token from zabuti.com.",
|
|
5
|
-
"homepage": "https://zabuti.com",
|
|
6
|
-
"license": "MIT",
|
|
7
|
-
"type": "module",
|
|
8
|
-
"bin": {
|
|
9
|
-
"zabuti-tools": "dist/installer/src/index.js"
|
|
10
|
-
},
|
|
11
|
-
"files": [
|
|
12
|
-
"dist",
|
|
13
|
-
"README.md"
|
|
14
|
-
],
|
|
15
|
-
"engines": {
|
|
16
|
-
"node": ">=20"
|
|
17
|
-
},
|
|
18
|
-
"keywords": [
|
|
19
|
-
"claude-code",
|
|
20
|
-
"skills",
|
|
21
|
-
"zabuti"
|
|
22
|
-
],
|
|
23
|
-
"scripts": {
|
|
24
|
-
"build": "tsc -p tsconfig.json",
|
|
25
|
-
"check": "tsc -p tsconfig.json --noEmit",
|
|
26
|
-
"smoke": "node scripts/smoke.mjs",
|
|
27
|
-
"prepack": "npm run build"
|
|
28
|
-
},
|
|
29
|
-
"devDependencies": {
|
|
30
|
-
"@types/node": "^22.0.0",
|
|
31
|
-
"typescript": "^5.6.0"
|
|
32
|
-
}
|
|
33
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@zabuti/tools",
|
|
3
|
+
"version": "0.1.7",
|
|
4
|
+
"description": "Installs the licensed Zabuti developer tools (Logic Map, Logic Optimizer, Deadlock Map) as Claude Code skills. Needs a license and a download token from zabuti.com.",
|
|
5
|
+
"homepage": "https://zabuti.com",
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"type": "module",
|
|
8
|
+
"bin": {
|
|
9
|
+
"zabuti-tools": "dist/installer/src/index.js"
|
|
10
|
+
},
|
|
11
|
+
"files": [
|
|
12
|
+
"dist",
|
|
13
|
+
"README.md"
|
|
14
|
+
],
|
|
15
|
+
"engines": {
|
|
16
|
+
"node": ">=20"
|
|
17
|
+
},
|
|
18
|
+
"keywords": [
|
|
19
|
+
"claude-code",
|
|
20
|
+
"skills",
|
|
21
|
+
"zabuti"
|
|
22
|
+
],
|
|
23
|
+
"scripts": {
|
|
24
|
+
"build": "tsc -p tsconfig.json",
|
|
25
|
+
"check": "tsc -p tsconfig.json --noEmit",
|
|
26
|
+
"smoke": "node scripts/smoke.mjs",
|
|
27
|
+
"prepack": "npm run build"
|
|
28
|
+
},
|
|
29
|
+
"devDependencies": {
|
|
30
|
+
"@types/node": "^22.0.0",
|
|
31
|
+
"typescript": "^5.6.0"
|
|
32
|
+
}
|
|
33
|
+
}
|