gm-skill 2.0.1353 → 2.0.1355

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,6 +1,6 @@
1
1
  {
2
2
  "name": "gm-plugkit",
3
- "version": "2.0.1353",
3
+ "version": "2.0.1355",
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": {
@@ -1631,14 +1631,12 @@ function makeHostFunctions(instanceRef) {
1631
1631
  return 0;
1632
1632
  }
1633
1633
  if (level >= 2) {
1634
- const gateMatch = msg.match(/^plugkit gate:\s+([\w-]+)\s+(.*)$/);
1635
- if (gateMatch) {
1636
- logEvent('hook', `deviation.${gateMatch[1]}`, { detail: gateMatch[2], source: 'stderr-bridge' });
1637
- } else {
1638
- const noiseRe = /^(instruction::handle|recall::recall_hits|embed::|memorize::)/;
1639
- if (!noiseRe.test(msg)) {
1640
- logEvent('plugkit', level >= 3 ? 'wasm.err' : 'wasm.warn', { msg: msg.slice(0, 500) });
1641
- }
1634
+ if (/^plugkit gate:\s+[\w-]+\s+/.test(msg)) {
1635
+ return 0;
1636
+ }
1637
+ const noiseRe = /^(instruction::handle|recall::recall_hits|embed::|memorize::)/;
1638
+ if (!noiseRe.test(msg)) {
1639
+ logEvent('plugkit', level >= 3 ? 'wasm.err' : 'wasm.warn', { msg: msg.slice(0, 500) });
1642
1640
  }
1643
1641
  }
1644
1642
  return 0;
@@ -2060,6 +2058,49 @@ async function runSpoolWatcher(instance, spoolDir) {
2060
2058
  try { reapTimedOutTasks(); } catch (_) {}
2061
2059
  }, 5000);
2062
2060
 
2061
+ let _selfStaleLoggedOnce = false;
2062
+ function probeGmPlugkitSelfStale() {
2063
+ try {
2064
+ const ownPkgPath = path.join(__dirname, 'package.json');
2065
+ if (!fs.existsSync(ownPkgPath)) return;
2066
+ const own = JSON.parse(fs.readFileSync(ownPkgPath, 'utf-8')).version;
2067
+ if (!own) return;
2068
+ const https = require('https');
2069
+ const req = https.get('https://registry.npmjs.org/gm-plugkit/latest', { timeout: 3000 }, (res) => {
2070
+ let body = '';
2071
+ res.on('data', (c) => body += c);
2072
+ res.on('end', () => {
2073
+ try {
2074
+ const latest = JSON.parse(body).version;
2075
+ const stalePath = path.join(spoolDir, '.gm-plugkit-stale.json');
2076
+ if (!latest || latest === own) {
2077
+ if (fs.existsSync(stalePath)) { try { fs.unlinkSync(stalePath); } catch (_) {} }
2078
+ return;
2079
+ }
2080
+ const marker = {
2081
+ ts: new Date().toISOString(),
2082
+ reason: 'gm-plugkit-self-stale',
2083
+ running_version: own,
2084
+ latest_version: latest,
2085
+ instruction: `gm-plugkit running ${own} but npm has ${latest}. The npx/bun cache served a stale copy. Clear the cache so the next invocation picks up the latest wrapper fixes: bun pm cache rm; or npx clear-npx-cache; or rm -rf ~/.npm/_npx ~/AppData/Local/npm-cache/_npx`,
2086
+ detected_by: 'watcher-periodic-probe',
2087
+ };
2088
+ try { fs.writeFileSync(stalePath, JSON.stringify(marker, null, 2)); } catch (_) {}
2089
+ if (!_selfStaleLoggedOnce) {
2090
+ _selfStaleLoggedOnce = true;
2091
+ try { logEvent('plugkit', 'gm-plugkit.self-stale', { running_version: own, latest_version: latest, detected_by: 'watcher-periodic-probe' }); } catch (_) {}
2092
+ console.error(`[plugkit-wasm] gm-plugkit self-stale: running ${own}, latest npm ${latest} (marker at .gm/exec-spool/.gm-plugkit-stale.json)`);
2093
+ }
2094
+ } catch (_) {}
2095
+ });
2096
+ });
2097
+ req.on('error', () => {});
2098
+ req.on('timeout', () => { try { req.destroy(); } catch (_) {} });
2099
+ } catch (_) {}
2100
+ }
2101
+ setTimeout(probeGmPlugkitSelfStale, 5000);
2102
+ setInterval(probeGmPlugkitSelfStale, 300_000);
2103
+
2063
2104
  const _instanceVersionAtBoot = readInstanceVersion(instance);
2064
2105
  let _driftLoggedOnce = false;
2065
2106
  setInterval(() => {
package/gm.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gm",
3
- "version": "2.0.1353",
3
+ "version": "2.0.1355",
4
4
  "description": "Spool-dispatch orchestration engine with unified state machine, skills, and automated git enforcement",
5
5
  "author": "AnEntrypoint",
6
6
  "license": "MIT",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gm-skill",
3
- "version": "2.0.1353",
3
+ "version": "2.0.1355",
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",