gm-skill 2.0.1946 → 2.0.1948

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.890
1
+ 0.1.891
@@ -1 +1 @@
1
- b8cabcbd2fb106d24afa9530feecd7b31683840bce271b356642741102ee963d plugkit.wasm
1
+ 96c2b96a577ce3d5df1e07878997644facd29fc9663df549c8b8e6292e92db93 plugkit.wasm
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gm-plugkit",
3
- "version": "2.0.1946",
3
+ "version": "2.0.1948",
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": {
@@ -1 +1 @@
1
- 0.1.890
1
+ 0.1.891
@@ -165,13 +165,28 @@ function readShutdownReason() {
165
165
  // deliberate upgrade recycle as a SILENT ABORT / unplanned-restart critical. Write
166
166
  // the planned reason on the child's behalf BEFORE killing, so the next boot reads a
167
167
  // fresh planned shutdown reason and classifies the restart correctly.
168
+ function pidAliveSync(pid) {
169
+ try { process.kill(pid, 0); return true; } catch (_) { return false; }
170
+ }
171
+
172
+ function waitForPidDeath(pid, timeoutMs) {
173
+ const deadline = Date.now() + timeoutMs;
174
+ while (Date.now() < deadline) {
175
+ if (!pidAliveSync(pid)) return true;
176
+ try { spawnSync(process.platform === 'win32' ? 'ping' : 'sleep', process.platform === 'win32' ? ['-n', '2', '127.0.0.1'] : ['0.3'], { stdio: 'ignore', windowsHide: true }); } catch (_) {}
177
+ }
178
+ return !pidAliveSync(pid);
179
+ }
180
+
168
181
  function killChild(reason) {
169
182
  if (!currentChildPid) return;
170
- try { fs.writeFileSync(SHUTDOWN_REASON_PATH, JSON.stringify({ reason, ts: Date.now(), pid: currentChildPid, killed_by_supervisor: true })); } catch (_) {}
171
- try { process.kill(currentChildPid, 'SIGTERM'); } catch (_) {}
183
+ const pid = currentChildPid;
184
+ try { fs.writeFileSync(SHUTDOWN_REASON_PATH, JSON.stringify({ reason, ts: Date.now(), pid, killed_by_supervisor: true })); } catch (_) {}
185
+ try { process.kill(pid, 'SIGTERM'); } catch (_) {}
172
186
  if (process.platform === 'win32') {
173
- try { spawnSync('taskkill', ['/F', '/T', '/PID', String(currentChildPid)], { stdio: 'ignore', windowsHide: true, timeout: 3000 }); } catch (_) {}
187
+ try { spawnSync('taskkill', ['/F', '/T', '/PID', String(pid)], { stdio: 'ignore', windowsHide: true, timeout: 3000 }); } catch (_) {}
174
188
  }
189
+ waitForPidDeath(pid, 5000);
175
190
  }
176
191
 
177
192
  let lastSpawnedAt = 0;
package/gm.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gm",
3
- "version": "2.0.1946",
3
+ "version": "2.0.1948",
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.890"
20
+ "plugkitVersion": "0.1.891"
21
21
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gm-skill",
3
- "version": "2.0.1946",
3
+ "version": "2.0.1948",
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",