gm-skill 2.0.1262 → 2.0.1264
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/plugkit-wasm-wrapper.js +39 -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.1264` — 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
|
|
|
@@ -27,6 +27,35 @@ const ORCHESTRATOR_VERBS = new Set(['instruction', 'transition', 'phase-status',
|
|
|
27
27
|
const TURN_IDLE_MS = 30_000;
|
|
28
28
|
const _turns = new Map();
|
|
29
29
|
|
|
30
|
+
function emitShutdownReason(reason, err) {
|
|
31
|
+
try {
|
|
32
|
+
const spoolDir = process.env.CLAUDE_PROJECT_DIR
|
|
33
|
+
? path.join(process.env.CLAUDE_PROJECT_DIR, '.gm', 'exec-spool')
|
|
34
|
+
: path.join(process.cwd(), '.gm', 'exec-spool');
|
|
35
|
+
fs.mkdirSync(spoolDir, { recursive: true });
|
|
36
|
+
const body = {
|
|
37
|
+
reason,
|
|
38
|
+
ts: Date.now(),
|
|
39
|
+
pid: process.pid,
|
|
40
|
+
message: err && (err.message || String(err)),
|
|
41
|
+
stack: err && err.stack ? String(err.stack).slice(0, 4000) : null,
|
|
42
|
+
version: typeof PLUGKIT_VERSION !== 'undefined' ? PLUGKIT_VERSION : null,
|
|
43
|
+
};
|
|
44
|
+
fs.writeFileSync(path.join(spoolDir, '.shutdown-reason.json'), JSON.stringify(body, null, 2));
|
|
45
|
+
} catch (_) {}
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
process.on('uncaughtException', (err) => {
|
|
49
|
+
try { console.error('[plugkit-wasm] uncaught:', err && err.stack || err); } catch (_) {}
|
|
50
|
+
emitShutdownReason('uncaughtException', err);
|
|
51
|
+
process.exit(1);
|
|
52
|
+
});
|
|
53
|
+
|
|
54
|
+
process.on('unhandledRejection', (reason) => {
|
|
55
|
+
try { console.error('[plugkit-wasm] unhandled rejection:', reason && reason.stack || reason); } catch (_) {}
|
|
56
|
+
emitShutdownReason('unhandledRejection', reason instanceof Error ? reason : new Error(String(reason)));
|
|
57
|
+
process.exit(1);
|
|
58
|
+
});
|
|
30
59
|
|
|
31
60
|
function applyDisciplineSigil(rawBody) {
|
|
32
61
|
let parsed;
|
|
@@ -270,6 +299,8 @@ function readCurrentSess() {
|
|
|
270
299
|
return __sessCache.value;
|
|
271
300
|
}
|
|
272
301
|
|
|
302
|
+
const __lockRejectedEmitAt = new Map();
|
|
303
|
+
|
|
273
304
|
function logEvent(sub, event, fields) {
|
|
274
305
|
if (process.env.GM_LOG_DISABLE) return;
|
|
275
306
|
try {
|
|
@@ -1433,7 +1464,14 @@ async function runSpoolWatcher(instance, spoolDir) {
|
|
|
1433
1464
|
const msg = JSON.stringify({ ok: false, reason: 'another-watcher-active', pid: pidStr, age_ms: age });
|
|
1434
1465
|
console.error(`[plugkit-wasm] ${msg}; refusing to start`);
|
|
1435
1466
|
try { fs.writeFileSync(path.join(spoolDir, '.lock-rejection.json'), msg); } catch (_) {}
|
|
1436
|
-
try {
|
|
1467
|
+
try {
|
|
1468
|
+
const __now = Date.now();
|
|
1469
|
+
const __last = __lockRejectedEmitAt.get(pidStr) || 0;
|
|
1470
|
+
if (__now - __last > 60000) {
|
|
1471
|
+
__lockRejectedEmitAt.set(pidStr, __now);
|
|
1472
|
+
logEvent('plugkit', 'watcher.lock-rejected', { severity: 'info', holder_pid: pidStr, lock_age_ms: age });
|
|
1473
|
+
}
|
|
1474
|
+
} catch (_) {}
|
|
1437
1475
|
process.exit(75);
|
|
1438
1476
|
}
|
|
1439
1477
|
} else {
|
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.1264",
|
|
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.1264"
|
|
43
43
|
},
|
|
44
44
|
"engines": {
|
|
45
45
|
"node": ">=16.0.0"
|