gm-skill 2.0.1441 → 2.0.1443
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/bootstrap.js +21 -2
- package/gm-plugkit/package.json +3 -1
- package/gm-plugkit/supervisor.js +20 -8
- package/gm.json +1 -1
- package/package.json +1 -1
package/gm-plugkit/bootstrap.js
CHANGED
|
@@ -879,13 +879,32 @@ function probeUnsupervisedWatcher(spoolDir) {
|
|
|
879
879
|
} catch (_) {}
|
|
880
880
|
}
|
|
881
881
|
|
|
882
|
+
function resolveNodeRuntime() {
|
|
883
|
+
const isNodeExe = (p) => /(^|[\\/])node(\.exe)?$/i.test(String(p || ''));
|
|
884
|
+
const candidates = [];
|
|
885
|
+
if (isNodeExe(process.env.GM_NODE_PATH)) candidates.push(process.env.GM_NODE_PATH);
|
|
886
|
+
if (isNodeExe(process.execPath)) candidates.push(process.execPath);
|
|
887
|
+
try {
|
|
888
|
+
const which = process.platform === 'win32' ? 'where' : 'which';
|
|
889
|
+
const out = require('child_process').spawnSync(which, ['node'], { encoding: 'utf8', windowsHide: true });
|
|
890
|
+
if (out && out.stdout) {
|
|
891
|
+
const first = out.stdout.split(/\r?\n/).map((s) => s.trim()).filter(Boolean)[0];
|
|
892
|
+
if (first) candidates.push(first);
|
|
893
|
+
}
|
|
894
|
+
} catch (_) {}
|
|
895
|
+
for (const c of candidates) {
|
|
896
|
+
try { const r = require('child_process').spawnSync(c, ['--version'], { stdio: 'ignore', windowsHide: true }); if (r && r.status === 0) return c; } catch (_) {}
|
|
897
|
+
}
|
|
898
|
+
return process.execPath;
|
|
899
|
+
}
|
|
900
|
+
|
|
882
901
|
function startSpoolDaemon() {
|
|
883
902
|
try {
|
|
884
903
|
const wrapper = path.join(gmToolsDir(), 'plugkit-wasm-wrapper.js');
|
|
885
904
|
if (!fs.existsSync(wrapper)) {
|
|
886
905
|
return { ok: false, error: `wrapper not at ${wrapper} — ensureReady() must run first` };
|
|
887
906
|
}
|
|
888
|
-
const runtime =
|
|
907
|
+
const runtime = resolveNodeRuntime();
|
|
889
908
|
const projectDir = process.env.CLAUDE_PROJECT_DIR || process.cwd();
|
|
890
909
|
const spoolDir = path.join(projectDir, '.gm', 'exec-spool');
|
|
891
910
|
fs.mkdirSync(spoolDir, { recursive: true });
|
|
@@ -919,7 +938,7 @@ function startSpoolDaemon() {
|
|
|
919
938
|
|
|
920
939
|
const logFd = fs.openSync(logPath, 'a');
|
|
921
940
|
try { fs.writeSync(logFd, `\n--- supervisor spawn ${new Date().toISOString()} parent=${process.pid} ---\n`); } catch (_) {}
|
|
922
|
-
const child = require('child_process').spawn(
|
|
941
|
+
const child = require('child_process').spawn(runtime, [supervisor], {
|
|
923
942
|
detached: true,
|
|
924
943
|
stdio: ['ignore', logFd, logFd],
|
|
925
944
|
windowsHide: true,
|
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.1443",
|
|
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": {
|
|
@@ -11,6 +11,8 @@
|
|
|
11
11
|
"cli.js",
|
|
12
12
|
"index.js",
|
|
13
13
|
"bootstrap.js",
|
|
14
|
+
"supervisor.js",
|
|
15
|
+
"lang-host-runner.js",
|
|
14
16
|
"plugkit-wasm-wrapper.js",
|
|
15
17
|
"plugkit.version",
|
|
16
18
|
"plugkit.sha256",
|
package/gm-plugkit/supervisor.js
CHANGED
|
@@ -94,15 +94,27 @@ function spawnWatcher(bootReason) {
|
|
|
94
94
|
process.exit(3);
|
|
95
95
|
}
|
|
96
96
|
|
|
97
|
-
|
|
98
|
-
|
|
97
|
+
const isNodeExe = (p) => /(^|[\\/])node(\.exe)?$/i.test(String(p || ''));
|
|
98
|
+
const resolveNode = () => {
|
|
99
|
+
const candidates = [];
|
|
100
|
+
if (isNodeExe(process.env.PLUGKIT_RUNTIME)) candidates.push(process.env.PLUGKIT_RUNTIME);
|
|
101
|
+
if (isNodeExe(process.execPath)) candidates.push(process.execPath);
|
|
102
|
+
if (process.env.GM_NODE_PATH) candidates.push(process.env.GM_NODE_PATH);
|
|
103
|
+
try {
|
|
104
|
+
const which = process.platform === 'win32' ? 'where' : 'which';
|
|
105
|
+
const out = spawnSync(which, ['node'], { encoding: 'utf8', windowsHide: true });
|
|
106
|
+
if (out && out.stdout) {
|
|
107
|
+
const first = out.stdout.split(/\r?\n/).map((s) => s.trim()).filter(Boolean)[0];
|
|
108
|
+
if (first) candidates.push(first);
|
|
109
|
+
}
|
|
110
|
+
} catch (_) {}
|
|
111
|
+
for (const c of candidates) {
|
|
112
|
+
try { const r = spawnSync(c, ['--version'], { stdio: 'ignore', windowsHide: true }); if (r && r.status === 0) return c; } catch (_) {}
|
|
113
|
+
}
|
|
114
|
+
return process.execPath;
|
|
115
|
+
};
|
|
116
|
+
let cmd = resolveNode();
|
|
99
117
|
let args = [wrapper, 'spool'];
|
|
100
|
-
try {
|
|
101
|
-
spawnSync(runtime, ['--version'], { stdio: 'ignore', windowsHide: true });
|
|
102
|
-
} catch (_) {
|
|
103
|
-
cmd = process.execPath;
|
|
104
|
-
args = [wrapper, 'spool'];
|
|
105
|
-
}
|
|
106
118
|
|
|
107
119
|
let logFd = null;
|
|
108
120
|
try { logFd = fs.openSync(LOG_PATH, 'a'); } catch (_) {}
|
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.1443",
|
|
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",
|