gm-skill 2.0.1228 → 2.0.1230

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/README.md CHANGED
@@ -35,7 +35,7 @@ An earlier generation fanned out fifteen per-platform downstream repos (gm-cc, g
35
35
 
36
36
  ## Version
37
37
 
38
- `2.0.1228` — auto-bumped from the canonical `gm` repo. Every push to `AnEntrypoint/gm` (or any cascading sibling crate) republishes this package.
38
+ `2.0.1230` — auto-bumped from the canonical `gm` repo. Every push to `AnEntrypoint/gm` (or any cascading sibling crate) republishes this package.
39
39
 
40
40
  ## Source of truth
41
41
 
package/bin/bootstrap.js CHANGED
@@ -17,6 +17,29 @@ function log(msg) {
17
17
  try { process.stderr.write(`[plugkit-bootstrap] ${msg}\n`); } catch (_) {}
18
18
  }
19
19
 
20
+ // Resolve a bare command name to its actual .exe on Windows. cmd.exe + .cmd
21
+ // shim chains re-enter conhost (visible window flash) even with
22
+ // windowsHide:true on the parent. Spawning the real .exe directly lets
23
+ // CREATE_NO_WINDOW propagate. Falls back to .cmd or the original name when
24
+ // no .exe is found. See [[windows-spawn-cmd-shim-flash]].
25
+ function resolveWindowsExe(cmd) {
26
+ if (process.platform !== 'win32') return cmd;
27
+ try {
28
+ const r = spawnSync('where', [cmd], {
29
+ encoding: 'utf-8',
30
+ stdio: ['ignore', 'pipe', 'ignore'],
31
+ windowsHide: true,
32
+ timeout: 800,
33
+ });
34
+ if (r.status !== 0) return cmd;
35
+ const lines = (r.stdout || '').split(/\r?\n/).map(l => l.trim()).filter(Boolean);
36
+ const exe = lines.find(l => /\.exe$/i.test(l));
37
+ return exe || lines[0] || cmd;
38
+ } catch {
39
+ return cmd;
40
+ }
41
+ }
42
+
20
43
  function probeBinaryVersion(binPath) {
21
44
  try {
22
45
  const { spawnSync } = require('child_process');
@@ -232,8 +255,9 @@ async function extractNpmPackageWasm(destPath, version) {
232
255
  log(`extracting npm package ${NPM_PACKAGE}@${version} to ${tempDir}`);
233
256
  obsEvent('bootstrap', 'npm.extract.start', { package: NPM_PACKAGE, version });
234
257
 
258
+ const npxResolved = resolveWindowsExe('npx');
235
259
  const result = spawnSync(
236
- process.platform === 'win32' ? 'npx.cmd' : 'npx',
260
+ npxResolved,
237
261
  [NPM_PACKAGE + '@' + version, '--prefix', tempDir],
238
262
  {
239
263
  stdio: ['ignore', 'pipe', 'pipe'],
@@ -7,6 +7,28 @@ const os = require('os');
7
7
  const crypto = require('crypto');
8
8
  const { spawn, spawnSync } = require('child_process');
9
9
 
10
+ // Resolve a bare command name to its actual .exe on Windows. cmd.exe + .cmd
11
+ // shim chains re-enter conhost (visible window flash) even with
12
+ // windowsHide:true on the parent. Spawning the real .exe directly lets
13
+ // CREATE_NO_WINDOW propagate. See [[windows-spawn-cmd-shim-flash]].
14
+ function resolveWindowsExe(cmd) {
15
+ if (process.platform !== 'win32') return cmd;
16
+ try {
17
+ const r = spawnSync('where', [cmd], {
18
+ encoding: 'utf-8',
19
+ stdio: ['ignore', 'pipe', 'ignore'],
20
+ windowsHide: true,
21
+ timeout: 800,
22
+ });
23
+ if (r.status !== 0) return cmd;
24
+ const lines = (r.stdout || '').split(/\r?\n/).map(l => l.trim()).filter(Boolean);
25
+ const exe = lines.find(l => /\.exe$/i.test(l));
26
+ return exe || lines[0] || cmd;
27
+ } catch {
28
+ return cmd;
29
+ }
30
+ }
31
+
10
32
  const NPM_PACKAGE = 'plugkit-wasm';
11
33
  const ATTEMPT_TIMEOUT_MS = 10 * 60 * 1000;
12
34
  const MAX_ATTEMPTS = 3;
@@ -180,7 +202,7 @@ async function extractNpmPackageWasm(destPath, version) {
180
202
 
181
203
  fs.writeFileSync(path.join(tempDir, 'package.json'), JSON.stringify({ name: 'plugkit-extract', version: '0.0.0', private: true }));
182
204
 
183
- const cmd = process.platform === 'win32' ? 'npm.cmd' : 'npm';
205
+ const cmd = resolveWindowsExe('npm');
184
206
  const args = ['install', '--no-audit', '--no-fund', '--no-save', NPM_PACKAGE + '@' + version];
185
207
 
186
208
  const result = spawnSync(cmd, args, {
@@ -189,7 +211,6 @@ async function extractNpmPackageWasm(destPath, version) {
189
211
  timeout: ATTEMPT_TIMEOUT_MS,
190
212
  encoding: 'utf8',
191
213
  windowsHide: true,
192
- shell: process.platform === 'win32',
193
214
  });
194
215
 
195
216
  if (result.error) throw result.error;
@@ -736,6 +736,24 @@ function cleanDeadProfileFragments(cwd) {
736
736
  }
737
737
  }
738
738
 
739
+ function resolveWindowsExeLocal(cmd) {
740
+ if (process.platform !== 'win32') return cmd;
741
+ try {
742
+ const out = spawnSync('where', [cmd], {
743
+ encoding: 'utf-8',
744
+ stdio: ['ignore', 'pipe', 'ignore'],
745
+ windowsHide: true,
746
+ timeout: 800,
747
+ });
748
+ if (out.status !== 0) return cmd;
749
+ const lines = (out.stdout || '').split(/\r?\n/).map(l => l.trim()).filter(Boolean);
750
+ const exe = lines.find(l => /\.exe$/i.test(l));
751
+ return exe || lines[0] || cmd;
752
+ } catch {
753
+ return cmd;
754
+ }
755
+ }
756
+
739
757
  function isPortReachableSync(host, port, timeoutMs) {
740
758
  const r = spawnSync(process.execPath, ['-e', `
741
759
  const net = require('net');
@@ -777,8 +795,12 @@ function ensureAcptoapi() {
777
795
  if (_acptoapiBoot.spawned_at && Date.now() - _acptoapiBoot.spawned_at < 30000) {
778
796
  return;
779
797
  }
780
- const isWindows = process.platform === 'win32';
781
- const cmd = isWindows ? 'bun.exe' : 'bun';
798
+ // Resolve `bun` to its actual .exe on Windows so the spawned daemon
799
+ // doesn't enter conhost via a bun.cmd shim. See
800
+ // [[windows-spawn-cmd-shim-flash]] — cmd.exe + .cmd chain re-enters
801
+ // conhost even with windowsHide:true on the parent. Falls back to
802
+ // the bare name on non-Windows / when `where` can't resolve.
803
+ const cmd = resolveWindowsExeLocal('bun');
782
804
  const child = spawn(cmd, ['x', 'acptoapi@latest'], {
783
805
  detached: true,
784
806
  stdio: 'ignore',
package/gm.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gm",
3
- "version": "2.0.1228",
3
+ "version": "2.0.1230",
4
4
  "description": "Spool-dispatch orchestration engine with unified state machine, skills, and automated git enforcement",
5
5
  "author": "AnEntrypoint",
6
6
  "license": "MIT",
@@ -5,6 +5,28 @@ const { spawn, execSync } = require('child_process');
5
5
  const os = require('os');
6
6
  const spool = require('./spool.js');
7
7
 
8
+ // Resolve a bare command name to its .exe on Windows. cmd.exe + .cmd shim
9
+ // chains re-enter conhost (visible window flash) even with windowsHide:true
10
+ // on the parent. Spawning the real .exe directly lets CREATE_NO_WINDOW
11
+ // propagate cleanly. Falls back to the original name if no .exe is found.
12
+ // See [[windows-spawn-cmd-shim-flash]] for the discipline rationale.
13
+ function resolveWindowsExe(cmd) {
14
+ if (process.platform !== 'win32') return cmd;
15
+ try {
16
+ const out = execSync(`where ${cmd}`, {
17
+ encoding: 'utf-8',
18
+ stdio: ['ignore', 'pipe', 'ignore'],
19
+ windowsHide: true,
20
+ timeout: 800,
21
+ });
22
+ const lines = out.split(/\r?\n/).map(l => l.trim()).filter(Boolean);
23
+ const exe = lines.find(l => /\.exe$/i.test(l));
24
+ return exe || lines[0] || cmd;
25
+ } catch {
26
+ return cmd;
27
+ }
28
+ }
29
+
8
30
  const LOG_DIR = path.join(os.homedir(), '.claude', 'gm-log');
9
31
  const GM_STATE_DIR = path.join(os.homedir(), '.gm');
10
32
 
@@ -159,7 +181,7 @@ async function ensureRsLearningDaemonRunning() {
159
181
  CLAUDE_SESSION_ID: sessionId,
160
182
  });
161
183
 
162
- const proc = spawn('bun', ['x', 'rs-learn@latest'], {
184
+ const proc = spawn(resolveWindowsExe('bun'), ['x', 'rs-learn@latest'], {
163
185
  detached: true,
164
186
  stdio: 'ignore',
165
187
  windowsHide: true,
@@ -213,7 +235,7 @@ async function ensureAcptoapiRunning() {
213
235
  });
214
236
 
215
237
  try {
216
- const child = spawn('bun', ['x', 'acptoapi@latest'], {
238
+ const child = spawn(resolveWindowsExe('bun'), ['x', 'acptoapi@latest'], {
217
239
  detached: true,
218
240
  stdio: 'ignore',
219
241
  windowsHide: true,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gm-skill",
3
- "version": "2.0.1228",
3
+ "version": "2.0.1230",
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",
@@ -39,7 +39,7 @@
39
39
  "gm.json"
40
40
  ],
41
41
  "dependencies": {
42
- "gm-plugkit": "^2.0.1228"
42
+ "gm-plugkit": "^2.0.1230"
43
43
  },
44
44
  "engines": {
45
45
  "node": ">=16.0.0"