@clickzetta/cz-cli 1.0.0 → 1.0.2

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 (2) hide show
  1. package/bin/postinstall.js +16 -2
  2. package/package.json +6 -6
@@ -74,7 +74,9 @@ async function main() {
74
74
  const skillsSrc = path.join(installed.rootDir, "skills");
75
75
  const builtinDest = path.join(home, ".clickzetta", "skills", ".builtin");
76
76
 
77
- // Clean up legacy skill installations in agent directories
77
+ // Register the cz-cli skill into external agent skill directories so that
78
+ // Claude Code / Kiro / Codex / Cursor etc. can call cz-cli directly. The
79
+ // builtin (.builtin) install below is unchanged.
78
80
  const agentDirs = [
79
81
  path.join(home, ".claude", "skills"),
80
82
  path.join(home, ".kiro", "skills"),
@@ -83,10 +85,22 @@ async function main() {
83
85
  path.join(home, ".openclaw", "workspace", "skills"),
84
86
  path.join(home, ".singclaw", "workspace", "skills"),
85
87
  ];
88
+ const externalSkillSrc = path.join(skillsSrc, "cz-cli");
89
+ const hasExternalSkill = fs.existsSync(externalSkillSrc);
86
90
  for (const dir of agentDirs) {
87
- for (const legacy of ["czagent", "czcli", "cz-cli-v2", "cz-cli"]) {
91
+ // Clean up deprecated skill aliases (do not reinstall folded into cz-cli).
92
+ for (const legacy of ["czagent", "czcli", "cz-cli-v2"]) {
88
93
  try { fs.rmSync(path.join(dir, legacy), { recursive: true, force: true }); } catch (e) {}
89
94
  }
95
+ // Delete-then-install the cz-cli skill. A per-dir failure must not abort
96
+ // the npm install or the remaining agent directories.
97
+ if (hasExternalSkill) {
98
+ try {
99
+ fs.mkdirSync(dir, { recursive: true });
100
+ fs.rmSync(path.join(dir, "cz-cli"), { recursive: true, force: true });
101
+ fs.cpSync(externalSkillSrc, path.join(dir, "cz-cli"), { recursive: true });
102
+ } catch (e) {}
103
+ }
90
104
  }
91
105
 
92
106
  // Clear .builtin/ entirely then re-populate with all bundled skills
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@clickzetta/cz-cli",
3
- "version": "1.0.0",
3
+ "version": "1.0.2",
4
4
  "description": "AI-Agent-friendly CLI for ClickZetta Lakehouse",
5
5
  "bin": {
6
6
  "cz-cli": "bin/run.js",
@@ -13,11 +13,11 @@
13
13
  "bin/"
14
14
  ],
15
15
  "optionalDependencies": {
16
- "@clickzetta/cz-cli-darwin-arm64": "1.0.0",
17
- "@clickzetta/cz-cli-darwin-x64": "1.0.0",
18
- "@clickzetta/cz-cli-linux-arm64": "1.0.0",
19
- "@clickzetta/cz-cli-linux-x64": "1.0.0",
20
- "@clickzetta/cz-cli-win32-x64": "1.0.0"
16
+ "@clickzetta/cz-cli-darwin-arm64": "1.0.2",
17
+ "@clickzetta/cz-cli-darwin-x64": "1.0.2",
18
+ "@clickzetta/cz-cli-linux-arm64": "1.0.2",
19
+ "@clickzetta/cz-cli-linux-x64": "1.0.2",
20
+ "@clickzetta/cz-cli-win32-x64": "1.0.2"
21
21
  },
22
22
  "license": "MIT",
23
23
  "repository": {