@guandata/guanetl 0.1.16 → 0.1.17
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/CHANGELOG.md +4 -0
- package/README.md +4 -0
- package/bin/run.js +26 -14
- package/binaries/guanetl-darwin-arm64 +0 -0
- package/binaries/guanetl-darwin-x64 +0 -0
- package/binaries/guanetl-linux-arm64 +0 -0
- package/binaries/guanetl-linux-x64 +0 -0
- package/binaries/guanetl-win32-x64.exe +0 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
package/README.md
CHANGED
package/bin/run.js
CHANGED
|
@@ -51,20 +51,32 @@ function copyDirectory(src, dest) {
|
|
|
51
51
|
}
|
|
52
52
|
}
|
|
53
53
|
|
|
54
|
-
function
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
}
|
|
54
|
+
function installBuddySkills(pkgRoot, skill) {
|
|
55
|
+
const srcDir = path.join(pkgRoot, "skills", skill);
|
|
56
|
+
if (!fs.existsSync(path.join(srcDir, "SKILL.md"))) {
|
|
57
|
+
console.warn(`Warning: skipping buddy install; skill not found: ${srcDir}`);
|
|
58
|
+
return;
|
|
59
|
+
}
|
|
61
60
|
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
61
|
+
const targets = [
|
|
62
|
+
{
|
|
63
|
+
name: "CodeBuddy",
|
|
64
|
+
configDir: process.env.CODEBUDDY_CONFIG_DIR || path.join(os.homedir(), ".codebuddy"),
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
name: "WorkBuddy",
|
|
68
|
+
configDir: process.env.WORKBUDDY_CONFIG_DIR || path.join(os.homedir(), ".workbuddy"),
|
|
69
|
+
},
|
|
70
|
+
];
|
|
71
|
+
|
|
72
|
+
for (const target of targets) {
|
|
73
|
+
try {
|
|
74
|
+
const destDir = path.join(target.configDir, "skills", skill);
|
|
75
|
+
copyDirectory(srcDir, destDir);
|
|
76
|
+
console.log(`Installed ${skill} to ${target.name}: ${destDir}`);
|
|
77
|
+
} catch (err) {
|
|
78
|
+
console.warn(`Warning: ${target.name} install failed for ${skill}: ${err.message}`);
|
|
79
|
+
}
|
|
68
80
|
}
|
|
69
81
|
}
|
|
70
82
|
|
|
@@ -91,7 +103,7 @@ if (process.argv[2] === "install-skill") {
|
|
|
91
103
|
const result = spawnSync("npx", args, { stdio: "inherit", env: process.env, shell: true });
|
|
92
104
|
if (result.error) throw result.error;
|
|
93
105
|
const status = result.status || 0;
|
|
94
|
-
if (status === 0)
|
|
106
|
+
if (status === 0) installBuddySkills(pkgRoot, "guanetl");
|
|
95
107
|
process.exit(status);
|
|
96
108
|
}
|
|
97
109
|
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|