gm-skill 2.0.1708 → 2.0.1710

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.
@@ -1083,6 +1083,7 @@ module.exports = {
1083
1083
  readDaemonVersion,
1084
1084
  writeDaemonVersion,
1085
1085
  daemonVersionSentinel,
1086
+ readVersionFile,
1086
1087
  };
1087
1088
 
1088
1089
  if (require.main === module) {
package/gm-plugkit/cli.js CHANGED
@@ -5,7 +5,7 @@ const fs = require('fs');
5
5
  const os = require('os');
6
6
  const path = require('path');
7
7
  const cp = require('child_process');
8
- const { ensureReady, startSpoolDaemon, gmToolsDir } = require('./bootstrap');
8
+ const { ensureReady, startSpoolDaemon, gmToolsDir, readVersionFile } = require('./bootstrap');
9
9
 
10
10
  const usage = `gm-plugkit -- Bootstrap and daemon-spawn for gm plugkit binary.
11
11
 
@@ -199,7 +199,10 @@ function writeCliError(phase, err) {
199
199
  writeCliStatus({ phase: 'starting', args });
200
200
 
201
201
  const already = readStatus(spoolDir());
202
- if (statusServing(already, 12000)) {
202
+ let onDiskVersion = null;
203
+ try { onDiskVersion = readVersionFile(); } catch (_) { onDiskVersion = null; }
204
+ const versionDrifted = !!(already && onDiskVersion && already.version && already.version !== onDiskVersion);
205
+ if (statusServing(already, 12000) && !versionDrifted) {
203
206
  writeCliStatus({ phase: 'ready', already_serving: true, watcher_pid: already.pid });
204
207
  console.log(JSON.stringify({
205
208
  ok: true,
@@ -210,6 +213,14 @@ function writeCliError(phase, err) {
210
213
  }));
211
214
  process.exit(0);
212
215
  }
216
+ if (versionDrifted) {
217
+ writeCliStatus({ phase: 'version-drift-detected', running_version: already.version, disk_version: onDiskVersion });
218
+ console.error(`[gm-plugkit] running watcher (pid=${already.pid}) serves stale version ${already.version}, disk has ${onDiskVersion} -- forcing reboot`);
219
+ try {
220
+ if (process.platform === 'win32') cp.execFileSync('taskkill', ['/F', '/T', '/PID', String(already.pid)], { stdio: 'ignore', windowsHide: true });
221
+ else process.kill(already.pid, 'SIGTERM');
222
+ } catch (_) {}
223
+ }
213
224
 
214
225
  let bootstrapResult;
215
226
  try {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gm-plugkit",
3
- "version": "2.0.1708",
3
+ "version": "2.0.1710",
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.752
1
+ 0.1.753
package/gm.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gm",
3
- "version": "2.0.1708",
3
+ "version": "2.0.1710",
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.1708",
3
+ "version": "2.0.1710",
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",