gm-skill 2.0.1177 → 2.0.1179
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/gm-plugkit/bootstrap.js +6 -15
- package/gm-plugkit/plugkit-wasm-wrapper.js +18 -0
- package/gm-plugkit/supervisor.js +1 -1
- package/gm.json +1 -1
- 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.1179` — 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/gm-plugkit/bootstrap.js
CHANGED
|
@@ -178,27 +178,18 @@ async function extractNpmPackageWasm(destPath, version) {
|
|
|
178
178
|
log(`extracting npm package ${NPM_PACKAGE}@${version} to ${tempDir}`);
|
|
179
179
|
obsEvent('bootstrap', 'npm.extract.start', { package: NPM_PACKAGE, version });
|
|
180
180
|
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
cmd = process.execPath;
|
|
186
|
-
args = [npxCli, NPM_PACKAGE + '@' + version, '--prefix', tempDir];
|
|
187
|
-
} else {
|
|
188
|
-
cmd = 'npx.cmd';
|
|
189
|
-
args = [NPM_PACKAGE + '@' + version, '--prefix', tempDir];
|
|
190
|
-
}
|
|
191
|
-
} else {
|
|
192
|
-
cmd = 'npx';
|
|
193
|
-
args = [NPM_PACKAGE + '@' + version, '--prefix', tempDir];
|
|
194
|
-
}
|
|
181
|
+
fs.writeFileSync(path.join(tempDir, 'package.json'), JSON.stringify({ name: 'plugkit-extract', version: '0.0.0', private: true }));
|
|
182
|
+
|
|
183
|
+
const cmd = process.platform === 'win32' ? 'npm.cmd' : 'npm';
|
|
184
|
+
const args = ['install', '--no-audit', '--no-fund', '--no-save', NPM_PACKAGE + '@' + version];
|
|
195
185
|
|
|
196
186
|
const result = spawnSync(cmd, args, {
|
|
187
|
+
cwd: tempDir,
|
|
197
188
|
stdio: ['ignore', 'pipe', 'pipe'],
|
|
198
189
|
timeout: ATTEMPT_TIMEOUT_MS,
|
|
199
190
|
encoding: 'utf8',
|
|
200
191
|
windowsHide: true,
|
|
201
|
-
shell: process.platform === 'win32'
|
|
192
|
+
shell: process.platform === 'win32',
|
|
202
193
|
});
|
|
203
194
|
|
|
204
195
|
if (result.error) throw result.error;
|
|
@@ -1008,6 +1008,15 @@ async function runSpoolWatcher(instance, spoolDir) {
|
|
|
1008
1008
|
if (_ownWrapperSha12 && holderSha && holderSha !== _ownWrapperSha12) {
|
|
1009
1009
|
try { logEvent('plugkit', 'peer.stale-wrapper-takeover', { holder_pid: pidStr, holder_sha: holderSha, own_sha: _ownWrapperSha12, lock_age_ms: age }); } catch (_) {}
|
|
1010
1010
|
console.error(`[plugkit-wasm] peer wrapper-sha mismatch (holder=${holderSha} own=${_ownWrapperSha12}); killing pid=${pidStr} and taking over`);
|
|
1011
|
+
try {
|
|
1012
|
+
fs.writeFileSync(path.join(spoolDir, '.shutdown-reason.json'), JSON.stringify({
|
|
1013
|
+
reason: 'peer-stale-takeover',
|
|
1014
|
+
ts: Date.now(),
|
|
1015
|
+
taker_pid: process.pid,
|
|
1016
|
+
taker_sha: _ownWrapperSha12,
|
|
1017
|
+
holder_sha: holderSha,
|
|
1018
|
+
}));
|
|
1019
|
+
} catch (_) {}
|
|
1011
1020
|
try { process.kill(parseInt(pidStr, 10), 'SIGTERM'); } catch (_) {}
|
|
1012
1021
|
} else {
|
|
1013
1022
|
const msg = JSON.stringify({ ok: false, reason: 'another-watcher-active', pid: pidStr, age_ms: age });
|
|
@@ -1073,6 +1082,15 @@ async function runSpoolWatcher(instance, spoolDir) {
|
|
|
1073
1082
|
} catch (_) { continue; }
|
|
1074
1083
|
logEvent('plugkit', 'peer.stale-wrapper-killed', { peer_cwd: peerCwd, peer_pid: peerPid, peer_sha: peerSha, own_sha: _ownWrapperSha12, lock_age_ms: age });
|
|
1075
1084
|
console.error(`[plugkit-wasm] peer-sweep killing stale-wrapper watcher pid=${peerPid} cwd=${peerCwd} sha=${peerSha} (own=${_ownWrapperSha12})`);
|
|
1085
|
+
try {
|
|
1086
|
+
fs.writeFileSync(path.join(peerCwd, '.gm', 'exec-spool', '.shutdown-reason.json'), JSON.stringify({
|
|
1087
|
+
reason: 'peer-stale-takeover',
|
|
1088
|
+
ts: Date.now(),
|
|
1089
|
+
killer_pid: process.pid,
|
|
1090
|
+
killer_sha: _ownWrapperSha12,
|
|
1091
|
+
peer_sha: peerSha,
|
|
1092
|
+
}));
|
|
1093
|
+
} catch (_) {}
|
|
1076
1094
|
try { process.kill(peerPid, 'SIGTERM'); } catch (_) {}
|
|
1077
1095
|
}
|
|
1078
1096
|
}
|
package/gm-plugkit/supervisor.js
CHANGED
|
@@ -130,7 +130,7 @@ function spawnWatcher(bootReason) {
|
|
|
130
130
|
const shutdownReason = readShutdownReason();
|
|
131
131
|
const reason = shutdownReason && shutdownReason.reason;
|
|
132
132
|
const idleClean = reason === 'idle';
|
|
133
|
-
const plannedReasons = new Set(['idle', 'sigterm', 'version-change']);
|
|
133
|
+
const plannedReasons = new Set(['idle', 'sigterm', 'version-change', 'wrapper-change', 'peer-stale-takeover', 'external-planned']);
|
|
134
134
|
const isPlanned = plannedReasons.has(reason);
|
|
135
135
|
const eventName = idleClean
|
|
136
136
|
? 'supervisor.watcher-exited-idle'
|
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.1179",
|
|
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.1179"
|
|
43
43
|
},
|
|
44
44
|
"engines": {
|
|
45
45
|
"node": ">=16.0.0"
|