gm-skill 2.0.1409 → 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.
- package/gm-plugkit/package.json +1 -1
- package/gm-plugkit/plugkit-wasm-wrapper.js +12 -35
- package/gm.json +1 -1
- package/package.json +1 -1
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.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
|
-
//
|
|
2968
|
-
//
|
|
2969
|
-
//
|
|
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.
|
|
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
|
-
//
|
|
3030
|
-
//
|
|
3031
|
-
//
|
|
3032
|
-
//
|
|
3033
|
-
//
|
|
3034
|
-
//
|
|
3035
|
-
//
|
|
3036
|
-
//
|
|
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
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "gm-skill",
|
|
3
|
-
"version": "2.0.
|
|
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",
|