gm-skill 2.0.1229 → 2.0.1231
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 +1 -1
- package/bin/bootstrap.js +28 -1
- package/gm-plugkit/bootstrap.js +26 -2
- package/gm-plugkit/plugkit-wasm-wrapper.js +10 -3
- package/gm.json +1 -1
- package/lib/daemon-bootstrap.js +9 -0
- package/package.json +2 -2
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.
|
|
38
|
+
`2.0.1231` — 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,14 +255,18 @@ 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
|
-
|
|
260
|
+
npxResolved,
|
|
237
261
|
[NPM_PACKAGE + '@' + version, '--prefix', tempDir],
|
|
238
262
|
{
|
|
239
263
|
stdio: ['ignore', 'pipe', 'pipe'],
|
|
240
264
|
timeout: ATTEMPT_TIMEOUT_MS,
|
|
241
265
|
encoding: 'utf8',
|
|
242
266
|
windowsHide: true,
|
|
267
|
+
// CREATE_NO_WINDOW — inherited by all .cmd shims npm/npx spawn
|
|
268
|
+
// during package extraction, so no conhost flash during install.
|
|
269
|
+
...(process.platform === 'win32' ? { creationFlags: 0x08000000 } : {}),
|
|
243
270
|
}
|
|
244
271
|
);
|
|
245
272
|
|
package/gm-plugkit/bootstrap.js
CHANGED
|
@@ -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 =
|
|
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,9 @@ async function extractNpmPackageWasm(destPath, version) {
|
|
|
189
211
|
timeout: ATTEMPT_TIMEOUT_MS,
|
|
190
212
|
encoding: 'utf8',
|
|
191
213
|
windowsHide: true,
|
|
192
|
-
|
|
214
|
+
// CREATE_NO_WINDOW — inherited by .cmd shims npm spawns during
|
|
215
|
+
// package install, so no conhost flash during the extract step.
|
|
216
|
+
...(process.platform === 'win32' ? { creationFlags: 0x08000000 } : {}),
|
|
193
217
|
});
|
|
194
218
|
|
|
195
219
|
if (result.error) throw result.error;
|
|
@@ -797,15 +797,22 @@ function ensureAcptoapi() {
|
|
|
797
797
|
}
|
|
798
798
|
// Resolve `bun` to its actual .exe on Windows so the spawned daemon
|
|
799
799
|
// doesn't enter conhost via a bun.cmd shim. See
|
|
800
|
-
// [[windows-spawn-cmd-shim-flash]]
|
|
801
|
-
//
|
|
802
|
-
//
|
|
800
|
+
// [[windows-spawn-cmd-shim-flash]].
|
|
801
|
+
//
|
|
802
|
+
// Use CREATE_NO_WINDOW (0x08000000) | DETACHED_PROCESS (0x00000008)
|
|
803
|
+
// creationFlags so the suppression is INHERITED by every descendant
|
|
804
|
+
// bun-x downloads and launches (acptoapi itself spawns 11 ACP sub-
|
|
805
|
+
// daemons via .cmd shims; without this flag each one pops a conhost
|
|
806
|
+
// window). windowsHide:true alone only hides the immediate child.
|
|
807
|
+
const CREATE_NO_WINDOW = 0x08000000;
|
|
808
|
+
const DETACHED_PROCESS = 0x00000008;
|
|
803
809
|
const cmd = resolveWindowsExeLocal('bun');
|
|
804
810
|
const child = spawn(cmd, ['x', 'acptoapi@latest'], {
|
|
805
811
|
detached: true,
|
|
806
812
|
stdio: 'ignore',
|
|
807
813
|
windowsHide: true,
|
|
808
814
|
shell: false,
|
|
815
|
+
creationFlags: CREATE_NO_WINDOW | DETACHED_PROCESS,
|
|
809
816
|
});
|
|
810
817
|
child.unref();
|
|
811
818
|
_acptoapiBoot.spawned_at = Date.now();
|
package/gm.json
CHANGED
package/lib/daemon-bootstrap.js
CHANGED
|
@@ -181,11 +181,16 @@ async function ensureRsLearningDaemonRunning() {
|
|
|
181
181
|
CLAUDE_SESSION_ID: sessionId,
|
|
182
182
|
});
|
|
183
183
|
|
|
184
|
+
// CREATE_NO_WINDOW (0x08000000) is inherited by all descendants —
|
|
185
|
+
// .cmd shims that bun-x downloads/launches never get a console window.
|
|
186
|
+
// DETACHED_PROCESS (0x00000008) detaches the process group. Windows-only;
|
|
187
|
+
// Node ignores creationFlags on POSIX.
|
|
184
188
|
const proc = spawn(resolveWindowsExe('bun'), ['x', 'rs-learn@latest'], {
|
|
185
189
|
detached: true,
|
|
186
190
|
stdio: 'ignore',
|
|
187
191
|
windowsHide: true,
|
|
188
192
|
env,
|
|
193
|
+
creationFlags: 0x08000000 | 0x00000008,
|
|
189
194
|
});
|
|
190
195
|
|
|
191
196
|
const pid = proc.pid;
|
|
@@ -235,11 +240,15 @@ async function ensureAcptoapiRunning() {
|
|
|
235
240
|
});
|
|
236
241
|
|
|
237
242
|
try {
|
|
243
|
+
// CREATE_NO_WINDOW | DETACHED_PROCESS — see ensureRsLearningDaemonRunning
|
|
244
|
+
// above. Inherited by acptoapi's 11 ACP sub-daemons so they don't pop
|
|
245
|
+
// conhost windows when bun-x launches their .cmd shims.
|
|
238
246
|
const child = spawn(resolveWindowsExe('bun'), ['x', 'acptoapi@latest'], {
|
|
239
247
|
detached: true,
|
|
240
248
|
stdio: 'ignore',
|
|
241
249
|
windowsHide: true,
|
|
242
250
|
env,
|
|
251
|
+
creationFlags: 0x08000000 | 0x00000008,
|
|
243
252
|
});
|
|
244
253
|
child.unref();
|
|
245
254
|
emitDaemonEvent('acptoapi', 'info', 'Daemon spawned', { pid: child.pid, port, sessionId });
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "gm-skill",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.1231",
|
|
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.
|
|
42
|
+
"gm-plugkit": "^2.0.1231"
|
|
43
43
|
},
|
|
44
44
|
"engines": {
|
|
45
45
|
"node": ">=16.0.0"
|