gm-skill 2.0.1408 → 2.0.1410

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.556
1
+ 0.1.557
@@ -1 +1 @@
1
- c08168ba1ad7cc47cc9d4b6db25d64056d5fd5b4d21e15fe0d8109e7181c7229 plugkit.wasm
1
+ 469a601895dcd777bad765c6cf8dcd4dc5f6293c1a7db3f15fad430b5db14304 plugkit.wasm
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gm-plugkit",
3
- "version": "2.0.1408",
3
+ "version": "2.0.1410",
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": {
@@ -2862,7 +2862,6 @@ async function runSpoolWatcher(instance, spoolDir) {
2862
2862
  const UPDATE_CHECK_SHARED_CACHE = path.join(GM_TOOLS_ROOT, '.update-check-cache.json');
2863
2863
  const UPDATE_CHECK_CACHE_TTL_MS = 4 * 60 * 1000;
2864
2864
  let _lastKnownDrift = null;
2865
- let _autoUpdateArmedFor = null;
2866
2865
  function readSharedUpdateCache() {
2867
2866
  try {
2868
2867
  const content = fs.readFileSync(UPDATE_CHECK_SHARED_CACHE, 'utf-8');
@@ -2964,18 +2963,9 @@ async function runSpoolWatcher(instance, spoolDir) {
2964
2963
  logEvent('plugkit', 'update.available', { installed, latest });
2965
2964
  _lastKnownDrift = latest;
2966
2965
  }
2967
- // Auto-update from the shared-cache path too, so any watcher (not only the one that hit the
2968
- // network) arms the self-respawn. The cache entry is only written after a 200 from
2969
- // /releases/latest, and the respawn's ensureReady re-verifies the wasm asset before downloading,
2970
- // so a bump here is safe even without per-asset confirmation in this branch.
2971
- if (isDrift && _autoUpdateArmedFor !== latest) {
2972
- try {
2973
- _autoUpdateArmedFor = latest;
2974
- const verFile = path.join(GM_TOOLS_ROOT, 'plugkit.version');
2975
- fs.writeFileSync(verFile, latest + '\n');
2976
- logEvent('plugkit', 'update.auto-armed', { installed, latest, source: 'shared-cache', action: 'bumped-version-file-for-drift-respawn' });
2977
- } catch (_) {}
2978
- }
2966
+ // NOTE: no version-file bump here either see the network-path comment above. Bumping the version
2967
+ // file ahead of a verified binary download poisons installedVersionAtTools() and causes an infinite
2968
+ // drift-respawn thrash. Auto-update is notify-only until a sha-verified force-download path exists.
2979
2969
  }
2980
2970
  function checkForUpdate() {
2981
2971
  const installed = resolveVersion(instance);
@@ -3018,7 +3008,7 @@ async function runSpoolWatcher(instance, spoolDir) {
3018
3008
  installed,
3019
3009
  latest,
3020
3010
  checked_at_ms: Date.now(),
3021
- instruction: 'plugkit is out of date. The watcher auto-updates: on the next drift-check tick it bumps the disk version file and self-respawns into the fresh wasm. No manual action needed.',
3011
+ instruction: 'plugkit is out of date. Update with: bun x gm-plugkit@latest --kill-stale-watchers; bun x gm-plugkit@latest spool. A fresh boot downloads the new wasm and respawns; an in-place running watcher does not self-download.',
3022
3012
  update_url,
3023
3013
  }, null, 2));
3024
3014
  console.log(`[update] available: installed=${installed} latest=${latest} → wrote ${UPDATE_AVAILABLE_PATH}`);
@@ -3026,27 +3016,14 @@ async function runSpoolWatcher(instance, spoolDir) {
3026
3016
  logEvent('plugkit', 'update.available', { installed, latest, update_url });
3027
3017
  _lastKnownDrift = latest;
3028
3018
  }
3029
- // Auto-update: a running healthy watcher otherwise never self-updates — checkForUpdate
3030
- // only NOTIFIED, and the version-drift self-respawn compares instance-vs-disk-file, but
3031
- // the disk file only moved on a fresh boot that never ran while the watcher held the lock.
3032
- // Close the loop: once the release is fully published (wasm asset present, confirmed by
3033
- // this /releases/latest response carrying it), bump the disk version file to `latest`.
3034
- // The existing drift-check tick then sees instance != file and self-respawns; the respawn's
3035
- // ensureReady downloads the wasm matching the bumped version file. Guard against partial
3036
- // releases and respawn thrash: require the wasm asset, and write the file at most once per
3037
- // detected version (dedupe via _autoUpdateArmedFor).
3038
- try {
3039
- const hasWasmAsset = Array.isArray(rel.assets) && rel.assets.some(a => a && a.name === 'plugkit.wasm');
3040
- if (hasWasmAsset && latest !== installed && _autoUpdateArmedFor !== latest) {
3041
- _autoUpdateArmedFor = latest;
3042
- const verFile = path.join(GM_TOOLS_ROOT, 'plugkit.version');
3043
- fs.writeFileSync(verFile, latest + '\n');
3044
- logEvent('plugkit', 'update.auto-armed', { installed, latest, action: 'bumped-version-file-for-drift-respawn' });
3045
- console.log(`[update] auto-armed: bumped ${verFile} ${installed} -> ${latest}; drift-check will self-respawn into fresh wasm`);
3046
- }
3047
- } catch (e) {
3048
- logUpdateCheckError({ error: `auto-arm failed: ${String(e && e.message || e)}` });
3049
- }
3019
+ // NOTE: do NOT bump the disk version file here to "arm" a drift-respawn. installedVersionAtTools()
3020
+ // reads that file as the source of truth for the installed version; bumping it ahead of the actual
3021
+ // wasm download makes ensureReady compute versionDrift=false (file==target) and isReady()=true, so it
3022
+ // returns already-ready WITHOUT downloading the new binary while the running instance is still the
3023
+ // old version. The drift-check then sees instance(old) != file(new) forever and self-respawns in an
3024
+ // infinite loop, each respawn reloading the same old wasm. The version file must only advance AFTER
3025
+ // a verified binary download (bootstrap's job). Auto-update stays notify-only until ensureReady gains
3026
+ // a sha-verified force-download path; see PRD watcher-autoupdate-thrash-fix.
3050
3027
  } catch (e) {
3051
3028
  logUpdateCheckError({ error: String(e && e.message || e) });
3052
3029
  }
package/gm.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gm",
3
- "version": "2.0.1408",
3
+ "version": "2.0.1410",
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.556"
20
+ "plugkitVersion": "0.1.557"
21
21
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gm-skill",
3
- "version": "2.0.1408",
3
+ "version": "2.0.1410",
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",