gm-skill 2.0.1828 → 2.0.1829
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/bin/bootstrap.js +16 -2
- package/bin/install.js +17 -3
- package/gm-plugkit/bootstrap.js +30 -13
- package/gm-plugkit/package.json +2 -3
- package/gm.json +1 -1
- package/lib/skill-bootstrap.js +16 -2
- package/package.json +1 -1
package/bin/bootstrap.js
CHANGED
|
@@ -17,12 +17,26 @@ function log(msg) {
|
|
|
17
17
|
try { process.stderr.write(`[plugkit-bootstrap] ${msg}\n`); } catch (_) {}
|
|
18
18
|
}
|
|
19
19
|
|
|
20
|
-
|
|
20
|
+
function discoverBundledSkills(wrapperDir) {
|
|
21
|
+
const roots = [
|
|
22
|
+
path.join(wrapperDir, '..', 'skills'),
|
|
23
|
+
path.join(wrapperDir, '..', '..', 'skills'),
|
|
24
|
+
];
|
|
25
|
+
const root = roots.find(r => { try { return fs.existsSync(r) && fs.statSync(r).isDirectory(); } catch (_) { return false; } });
|
|
26
|
+
if (!root) return [];
|
|
27
|
+
try {
|
|
28
|
+
return fs.readdirSync(root, { withFileTypes: true })
|
|
29
|
+
.filter(e => e.isDirectory())
|
|
30
|
+
.map(e => e.name)
|
|
31
|
+
.filter(name => { try { return fs.existsSync(path.join(root, name, 'SKILL.md')); } catch (_) { return false; } })
|
|
32
|
+
.sort();
|
|
33
|
+
} catch (_) { return []; }
|
|
34
|
+
}
|
|
21
35
|
|
|
22
36
|
function ensureSkillMdCurrent(wrapperDir) {
|
|
23
37
|
const home = os.homedir();
|
|
24
38
|
const allRefreshed = [];
|
|
25
|
-
for (const skillName of
|
|
39
|
+
for (const skillName of discoverBundledSkills(wrapperDir)) {
|
|
26
40
|
try {
|
|
27
41
|
const candidates = [
|
|
28
42
|
path.join(wrapperDir, '..', 'skills', skillName, 'SKILL.md'),
|
package/bin/install.js
CHANGED
|
@@ -6,11 +6,25 @@ const path = require('path');
|
|
|
6
6
|
const os = require('os');
|
|
7
7
|
const readline = require('readline');
|
|
8
8
|
|
|
9
|
-
const BUNDLED_SKILLS = ['gm', 'gm-continue', 'wfgy-method'];
|
|
10
|
-
|
|
11
9
|
function out(msg) { process.stdout.write(msg + '\n'); }
|
|
12
10
|
function err(msg) { process.stderr.write(msg + '\n'); }
|
|
13
11
|
|
|
12
|
+
function discoverBundledSkills() {
|
|
13
|
+
const roots = [
|
|
14
|
+
path.join(__dirname, '..', 'skills'),
|
|
15
|
+
path.join(__dirname, '..', '..', 'skills'),
|
|
16
|
+
];
|
|
17
|
+
const root = roots.find(r => { try { return fs.existsSync(r) && fs.statSync(r).isDirectory(); } catch (_) { return false; } });
|
|
18
|
+
if (!root) return [];
|
|
19
|
+
try {
|
|
20
|
+
return fs.readdirSync(root, { withFileTypes: true })
|
|
21
|
+
.filter(e => e.isDirectory())
|
|
22
|
+
.map(e => e.name)
|
|
23
|
+
.filter(name => { try { return fs.existsSync(path.join(root, name, 'SKILL.md')); } catch (_) { return false; } })
|
|
24
|
+
.sort();
|
|
25
|
+
} catch (_) { return []; }
|
|
26
|
+
}
|
|
27
|
+
|
|
14
28
|
function parseArgs(argv) {
|
|
15
29
|
const flags = { yes: false, project: false, help: false };
|
|
16
30
|
for (const a of argv) {
|
|
@@ -179,7 +193,7 @@ async function main() {
|
|
|
179
193
|
const nonInteractive = flags.yes || !process.stdin.isTTY;
|
|
180
194
|
|
|
181
195
|
let anyInstalled = false;
|
|
182
|
-
for (const skillName of
|
|
196
|
+
for (const skillName of discoverBundledSkills()) {
|
|
183
197
|
const skillSrc = bundledSkillDir(skillName);
|
|
184
198
|
if (!skillSrc) { err(`bundled skill directory skills/${skillName} not found in package`); continue; }
|
|
185
199
|
const installed = installSkillDir(skillSrc, skillName, home, flags.project);
|
package/gm-plugkit/bootstrap.js
CHANGED
|
@@ -774,7 +774,32 @@ function ensureGmPlugkitVersionFresh() {
|
|
|
774
774
|
} catch (_) { return false; }
|
|
775
775
|
}
|
|
776
776
|
|
|
777
|
-
|
|
777
|
+
function discoverBundledSkillsAndSources() {
|
|
778
|
+
const found = new Map();
|
|
779
|
+
found.set('gm', path.join(__dirname, 'SKILL.md'));
|
|
780
|
+
try {
|
|
781
|
+
for (const f of fs.readdirSync(__dirname)) {
|
|
782
|
+
const m = f.match(/^SKILL-(.+)\.md$/);
|
|
783
|
+
if (m) found.set(m[1], path.join(__dirname, f));
|
|
784
|
+
}
|
|
785
|
+
} catch (_) {}
|
|
786
|
+
const devSkillsRoots = [
|
|
787
|
+
path.join(__dirname, '..', 'gm-skill', 'skills'),
|
|
788
|
+
path.join(__dirname, '..', '..', 'gm-skill', 'skills'),
|
|
789
|
+
path.join(__dirname, '..', 'skills'),
|
|
790
|
+
];
|
|
791
|
+
for (const root of devSkillsRoots) {
|
|
792
|
+
try {
|
|
793
|
+
if (!fs.existsSync(root) || !fs.statSync(root).isDirectory()) continue;
|
|
794
|
+
for (const e of fs.readdirSync(root, { withFileTypes: true })) {
|
|
795
|
+
if (!e.isDirectory()) continue;
|
|
796
|
+
const p = path.join(root, e.name, 'SKILL.md');
|
|
797
|
+
if (fs.existsSync(p) && !found.has(e.name)) found.set(e.name, p);
|
|
798
|
+
}
|
|
799
|
+
} catch (_) {}
|
|
800
|
+
}
|
|
801
|
+
return found;
|
|
802
|
+
}
|
|
778
803
|
|
|
779
804
|
function ensureSkillMdFresh() {
|
|
780
805
|
const home = process.env.HOME || process.env.USERPROFILE || require('os').homedir();
|
|
@@ -782,19 +807,11 @@ function ensureSkillMdFresh() {
|
|
|
782
807
|
const _norm = s => s.replace(/\r\n/g, '\n');
|
|
783
808
|
const allRefreshed = [];
|
|
784
809
|
const sources = {};
|
|
785
|
-
|
|
810
|
+
const discovered = discoverBundledSkillsAndSources();
|
|
811
|
+
for (const [skillName, bundledPath] of discovered) {
|
|
786
812
|
try {
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
path.join(__dirname, '..', 'gm-skill', 'skills', skillName, 'SKILL.md'),
|
|
790
|
-
path.join(__dirname, '..', '..', 'gm-skill', 'skills', skillName, 'SKILL.md'),
|
|
791
|
-
path.join(__dirname, '..', 'skills', skillName, 'SKILL.md'),
|
|
792
|
-
];
|
|
793
|
-
const bundledPath = candidates.find(p => {
|
|
794
|
-
try { return fs.existsSync(p); } catch (_) { return false; }
|
|
795
|
-
});
|
|
796
|
-
if (!bundledPath) {
|
|
797
|
-
try { obsEvent('bootstrap', 'skill-md.refresh.bundled-not-found', { skillName, searched: candidates }); } catch (_) {}
|
|
813
|
+
if (!fs.existsSync(bundledPath)) {
|
|
814
|
+
try { obsEvent('bootstrap', 'skill-md.refresh.bundled-not-found', { skillName, searched: [bundledPath] }); } catch (_) {}
|
|
798
815
|
continue;
|
|
799
816
|
}
|
|
800
817
|
const bundled = fs.readFileSync(bundledPath, 'utf-8');
|
package/gm-plugkit/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "gm-plugkit",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.1829",
|
|
4
4
|
"description": "Bootstrap and daemon-spawn tool for gm plugkit binary. Downloads the correct platform binary, verifies SHA256, and starts the spool watcher daemon. Includes plugkit-wasm-wrapper for WASM-based spool watching.",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"bin": {
|
|
@@ -17,8 +17,7 @@
|
|
|
17
17
|
"plugkit.version",
|
|
18
18
|
"plugkit.sha256",
|
|
19
19
|
"SKILL.md",
|
|
20
|
-
"SKILL
|
|
21
|
-
"SKILL-wfgy-method.md",
|
|
20
|
+
"SKILL-*.md",
|
|
22
21
|
"instructions/"
|
|
23
22
|
],
|
|
24
23
|
"keywords": [
|
package/gm.json
CHANGED
package/lib/skill-bootstrap.js
CHANGED
|
@@ -290,12 +290,26 @@ function ensureBuildToolIgnores(cwd) {
|
|
|
290
290
|
}
|
|
291
291
|
|
|
292
292
|
|
|
293
|
-
|
|
293
|
+
function discoverBundledSkills() {
|
|
294
|
+
const roots = [
|
|
295
|
+
path.join(__dirname, '..', 'skills'),
|
|
296
|
+
path.join(__dirname, '..', '..', 'skills'),
|
|
297
|
+
];
|
|
298
|
+
const root = roots.find(r => { try { return fs.existsSync(r) && fs.statSync(r).isDirectory(); } catch (_) { return false; } });
|
|
299
|
+
if (!root) return [];
|
|
300
|
+
try {
|
|
301
|
+
return fs.readdirSync(root, { withFileTypes: true })
|
|
302
|
+
.filter(e => e.isDirectory())
|
|
303
|
+
.map(e => e.name)
|
|
304
|
+
.filter(name => { try { return fs.existsSync(path.join(root, name, 'SKILL.md')); } catch (_) { return false; } })
|
|
305
|
+
.sort();
|
|
306
|
+
} catch (_) { return []; }
|
|
307
|
+
}
|
|
294
308
|
|
|
295
309
|
function ensureSkillMdCurrent() {
|
|
296
310
|
const allRefreshed = [];
|
|
297
311
|
let anySkipped = false;
|
|
298
|
-
for (const skillName of
|
|
312
|
+
for (const skillName of discoverBundledSkills()) {
|
|
299
313
|
try {
|
|
300
314
|
const bundledPath = resolveFromCandidates([
|
|
301
315
|
path.join(__dirname, '..', 'skills', skillName, 'SKILL.md'),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "gm-skill",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.1829",
|
|
4
4
|
"description": "Canonical universal harness — AI-native software engineering via skill-driven orchestration; bootstraps plugkit for task execution and session isolation. Install in any AI coding agent host.",
|
|
5
5
|
"author": "AnEntrypoint",
|
|
6
6
|
"license": "MIT",
|