gm-skill 2.0.1282 → 2.0.1283

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 CHANGED
@@ -35,7 +35,7 @@ An earlier generation fanned out fifteen per-platform downstream repos (gm-cc, g
35
35
 
36
36
  ## Version
37
37
 
38
- `2.0.1282` — auto-bumped from the canonical `gm` repo. Every push to `AnEntrypoint/gm` (or any cascading sibling crate) republishes this package.
38
+ `2.0.1283` — auto-bumped from the canonical `gm` repo. Every push to `AnEntrypoint/gm` (or any cascading sibling crate) republishes this package.
39
39
 
40
40
  ## Source of truth
41
41
 
package/gm.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gm",
3
- "version": "2.0.1282",
3
+ "version": "2.0.1283",
4
4
  "description": "Spool-dispatch orchestration engine with unified state machine, skills, and automated git enforcement",
5
5
  "author": "AnEntrypoint",
6
6
  "license": "MIT",
@@ -282,6 +282,52 @@ function ensureBuildToolIgnores(cwd) {
282
282
  }
283
283
 
284
284
 
285
+ function ensureSkillMdCurrent() {
286
+ try {
287
+ const bundledPath = resolveFromCandidates([
288
+ path.join(__dirname, '..', 'skills', 'gm-skill', 'SKILL.md'),
289
+ path.join(__dirname, '..', '..', 'skills', 'gm-skill', 'SKILL.md'),
290
+ ], 'gm-skill/skills/gm-skill/SKILL.md');
291
+ if (!bundledPath || !fs.existsSync(bundledPath)) {
292
+ emitBootstrapEvent('warn', 'bundled SKILL.md not found; skipping refresh');
293
+ return { refreshed: [], skipped: true };
294
+ }
295
+ const bundled = fs.readFileSync(bundledPath, 'utf8');
296
+ const bundledHash = crypto.createHash('sha256').update(bundled).digest('hex');
297
+ const targets = [
298
+ path.join(os.homedir(), '.agents', 'skills', 'gm-skill', 'SKILL.md'),
299
+ path.join(os.homedir(), '.claude', 'skills', 'gm-skill', 'SKILL.md'),
300
+ ];
301
+ const refreshed = [];
302
+ for (const target of targets) {
303
+ try {
304
+ let needsWrite = true;
305
+ if (fs.existsSync(target)) {
306
+ const existing = fs.readFileSync(target, 'utf8');
307
+ const existingHash = crypto.createHash('sha256').update(existing).digest('hex');
308
+ if (existingHash === bundledHash) needsWrite = false;
309
+ }
310
+ if (needsWrite) {
311
+ fs.mkdirSync(path.dirname(target), { recursive: true });
312
+ const tmp = target + '.tmp';
313
+ fs.writeFileSync(tmp, bundled);
314
+ fs.renameSync(tmp, target);
315
+ refreshed.push(target);
316
+ }
317
+ } catch (e) {
318
+ emitBootstrapEvent('warn', 'SKILL.md refresh failed for target', { target, error: e.message });
319
+ }
320
+ }
321
+ if (refreshed.length > 0) {
322
+ emitBootstrapEvent('info', 'SKILL.md refreshed', { hash: bundledHash.slice(0, 12), targets: refreshed });
323
+ }
324
+ return { refreshed, bundledHash };
325
+ } catch (e) {
326
+ emitBootstrapEvent('warn', 'ensureSkillMdCurrent failed', { error: e.message });
327
+ return { refreshed: [], error: e.message };
328
+ }
329
+ }
330
+
285
331
  function writeSessionSidecar(sessionId) {
286
332
  try {
287
333
  const spool = path.join(process.cwd(), '.gm', 'exec-spool');
@@ -488,6 +534,7 @@ async function bootstrapPlugkit(sessionId, options) {
488
534
 
489
535
  writeSessionSidecar(sessionId);
490
536
  ensureBuildToolIgnores(process.cwd());
537
+ ensureSkillMdCurrent();
491
538
 
492
539
  const manifest = readManifest();
493
540
  let targetVersion = manifest.version;
@@ -660,4 +707,5 @@ module.exports = {
660
707
  checkPortReachable,
661
708
  ensureBuildToolIgnores,
662
709
  detectBuildToolConfigs,
710
+ ensureSkillMdCurrent,
663
711
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gm-skill",
3
- "version": "2.0.1282",
3
+ "version": "2.0.1283",
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",
@@ -39,7 +39,7 @@
39
39
  "gm.json"
40
40
  ],
41
41
  "dependencies": {
42
- "gm-plugkit": "^2.0.1282"
42
+ "gm-plugkit": "^2.0.1283"
43
43
  },
44
44
  "engines": {
45
45
  "node": ">=16.0.0"