gm-skill 2.0.1821 → 2.0.1823

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.
@@ -1 +1 @@
1
- 0.1.834
1
+ 0.1.835
@@ -1 +1 @@
1
- 06a2301e7233c3a59cb8e96ad2707c83809deab8cfc60acf012ce4b610558bdf plugkit.wasm
1
+ dae6507c9f7c28e66cb4ca0000b1ed3cc6077b943b4af3d35b975f7abba88951 plugkit.wasm
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gm-plugkit",
3
- "version": "2.0.1821",
3
+ "version": "2.0.1823",
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": {
@@ -4397,6 +4397,35 @@ async function runSpoolWatcher(instance, spoolDir) {
4397
4397
  } catch (_) {}
4398
4398
  logEvent('plugkit', 'update.available', { installed, latest });
4399
4399
  _lastKnownDrift = latest;
4400
+ selfRespawnOnUpdate(installed, latest);
4401
+ }
4402
+ }
4403
+ function selfRespawnOnUpdate(installed, latest) {
4404
+ const guardPath = path.join(GM_TOOLS_ROOT, '.wasm-update-respawn-guard.json');
4405
+ let guard = {};
4406
+ try { guard = JSON.parse(fs.readFileSync(guardPath, 'utf8')); } catch (_) {}
4407
+ const sameTarget = guard.last_latest === latest;
4408
+ const attempts = sameTarget ? (guard.attempts || 0) : 0;
4409
+ if (attempts >= 3) {
4410
+ logEvent('plugkit', 'update.auto-respawn-abandoned', { installed, latest, attempts, note: 'wasm-registry version keeps drifting after 3 self-respawn attempts; agent must run bun x gm-plugkit@latest spool manually' });
4411
+ return;
4412
+ }
4413
+ try {
4414
+ fs.writeFileSync(guardPath, JSON.stringify({ attempts: attempts + 1, last_latest: latest, ts: Date.now() }));
4415
+ } catch (_) {}
4416
+ logEvent('plugkit', 'update.auto-applying', { installed, latest, attempt: attempts + 1, note: 'plugkit-wasm registry drift; self-respawning via bun x gm-plugkit@latest spool' });
4417
+ try {
4418
+ const bunPath = process.env.GM_BUN_PATH || 'bun';
4419
+ const child = _childProcess.spawn(bunPath, ['x', 'gm-plugkit@latest', 'spool'], {
4420
+ cwd: process.cwd(),
4421
+ detached: true,
4422
+ stdio: 'ignore',
4423
+ windowsHide: true,
4424
+ env: { ...process.env, PLUGKIT_BOOT_REASON: 'self-respawn-from-wasm-registry-drift' },
4425
+ });
4426
+ child.unref();
4427
+ } catch (e) {
4428
+ logEvent('plugkit', 'update.auto-respawn-spawn-failed', { installed, latest, error: String(e && e.message || e) });
4400
4429
  }
4401
4430
  }
4402
4431
  function checkUpdateViaNpm(installed) {
@@ -1 +1 @@
1
- 0.1.834
1
+ 0.1.835
package/gm.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gm",
3
- "version": "2.0.1821",
3
+ "version": "2.0.1823",
4
4
  "description": "Spool-dispatch orchestration engine with unified state machine, skills, and automated git enforcement",
5
5
  "author": "AnEntrypoint",
6
6
  "license": "MIT",
@@ -17,5 +17,5 @@
17
17
  "publishConfig": {
18
18
  "access": "public"
19
19
  },
20
- "plugkitVersion": "0.1.834"
20
+ "plugkitVersion": "0.1.835"
21
21
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gm-skill",
3
- "version": "2.0.1821",
3
+ "version": "2.0.1823",
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",