gm-skill 2.0.1861 → 2.0.1863

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.1861",
3
+ "version": "2.0.1863",
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": {
@@ -1212,6 +1212,16 @@ function fetchJsonSync(url, timeoutMs) {
1212
1212
  try { return JSON.parse(r.stdout); } catch (_) { return null; }
1213
1213
  }
1214
1214
 
1215
+ function fetchJsonSyncRetry(url, timeoutMs, attempts) {
1216
+ const n = attempts || 3;
1217
+ for (let i = 0; i < n; i++) {
1218
+ const r = fetchJsonSync(url, timeoutMs);
1219
+ if (r) return r;
1220
+ if (i < n - 1) sleepSyncMs(150);
1221
+ }
1222
+ return null;
1223
+ }
1224
+
1215
1225
  function closeExtraBlankTabs(port, keepWsEndpoint) {
1216
1226
  try {
1217
1227
  const targets = fetchJsonSync(`http://127.0.0.1:${port}/json/list`, 1500);
@@ -1361,7 +1371,8 @@ function startManagedBrowser(pw, profileDir, cwd) {
1361
1371
  }
1362
1372
  try { reapOrphanChromiums(cwd, 'pre-spawn'); } catch (_) {}
1363
1373
  const port = findFreePortSync();
1364
- let noSandbox = process.env.GM_BROWSER_NO_SANDBOX === '1';
1374
+ const noSandboxEnv = process.env.GM_BROWSER_NO_SANDBOX;
1375
+ let noSandbox = noSandboxEnv === '0' ? false : (noSandboxEnv === '1' || process.platform === 'win32');
1365
1376
  let { pid, chromeLogPath } = spawnChromiumOnce(browserBin, profileDir, port, headless, noSandbox, cwd);
1366
1377
  logEvent('plugkit', 'browser.chromium-launched', { pid, port, profileDir, headless, noSandbox, binary: browserBin, chromeLogPath });
1367
1378
  let ready = waitForCdpReady(port, 30000);
@@ -1473,7 +1484,7 @@ function resolveExistingBrowserEntry(cwd, claudeSessionId, pw, portsFile, sessio
1473
1484
  const wantProfile = sessionProfileDir(cwd, claudeSessionId);
1474
1485
  const pidOk = isProcessAliveSync(existing.pid);
1475
1486
  const profileOk = !existing.profileDir || existing.profileDir === wantProfile || existing.profileDir.startsWith(wantProfile);
1476
- const cdpOk = pidOk && !!fetchJsonSync(`http://127.0.0.1:${existing.port}/json/version`, 1000);
1487
+ const cdpOk = pidOk && !!fetchJsonSyncRetry(`http://127.0.0.1:${existing.port}/json/version`, 1000, 3);
1477
1488
  if (pidOk && profileOk && cdpOk) {
1478
1489
  const pwIds = sessions[claudeSessionId] || [];
1479
1490
  if (pwIds.length > 0 && existing.pwSessionId) {
@@ -3882,7 +3893,7 @@ async function runSpoolWatcher(instance, spoolDir) {
3882
3893
  logEvent('plugkit', 'browser.stale-reclaimed', { sid, pid: entry.pid || null, reason: 'pid-dead' });
3883
3894
  continue;
3884
3895
  }
3885
- const cdpOk = !!fetchJsonSync(`http://127.0.0.1:${entry.port}/json/version`, 1000);
3896
+ const cdpOk = !!fetchJsonSyncRetry(`http://127.0.0.1:${entry.port}/json/version`, 1000, 3);
3886
3897
  if (!cdpOk) {
3887
3898
  try { gracefulCloseBrowser(entry, 'orphan-cdp-dead'); } catch (_) {}
3888
3899
  delete ports[sid];
package/gm.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gm",
3
- "version": "2.0.1861",
3
+ "version": "2.0.1863",
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.1861",
3
+ "version": "2.0.1863",
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",