gm-skill 2.0.1861 → 2.0.1862
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 -2
- 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.1862",
|
|
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);
|
|
@@ -1473,7 +1483,7 @@ function resolveExistingBrowserEntry(cwd, claudeSessionId, pw, portsFile, sessio
|
|
|
1473
1483
|
const wantProfile = sessionProfileDir(cwd, claudeSessionId);
|
|
1474
1484
|
const pidOk = isProcessAliveSync(existing.pid);
|
|
1475
1485
|
const profileOk = !existing.profileDir || existing.profileDir === wantProfile || existing.profileDir.startsWith(wantProfile);
|
|
1476
|
-
const cdpOk = pidOk && !!
|
|
1486
|
+
const cdpOk = pidOk && !!fetchJsonSyncRetry(`http://127.0.0.1:${existing.port}/json/version`, 1000, 3);
|
|
1477
1487
|
if (pidOk && profileOk && cdpOk) {
|
|
1478
1488
|
const pwIds = sessions[claudeSessionId] || [];
|
|
1479
1489
|
if (pwIds.length > 0 && existing.pwSessionId) {
|
|
@@ -3882,7 +3892,7 @@ async function runSpoolWatcher(instance, spoolDir) {
|
|
|
3882
3892
|
logEvent('plugkit', 'browser.stale-reclaimed', { sid, pid: entry.pid || null, reason: 'pid-dead' });
|
|
3883
3893
|
continue;
|
|
3884
3894
|
}
|
|
3885
|
-
const cdpOk = !!
|
|
3895
|
+
const cdpOk = !!fetchJsonSyncRetry(`http://127.0.0.1:${entry.port}/json/version`, 1000, 3);
|
|
3886
3896
|
if (!cdpOk) {
|
|
3887
3897
|
try { gracefulCloseBrowser(entry, 'orphan-cdp-dead'); } catch (_) {}
|
|
3888
3898
|
delete ports[sid];
|
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.1862",
|
|
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",
|