gm-skill 2.0.1396 → 2.0.1397
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/package.json +1 -1
- package/gm-plugkit/plugkit-wasm-wrapper.js +25 -0
- package/gm.json +1 -1
- package/package.json +1 -1
- package/skills/gm-skill/SKILL.md +1 -1
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.1397",
|
|
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": {
|
|
@@ -2789,6 +2789,30 @@ async function runSpoolWatcher(instance, spoolDir) {
|
|
|
2789
2789
|
updateAvailable = { installed: upd.installed, latest: upd.latest };
|
|
2790
2790
|
}
|
|
2791
2791
|
} catch (_) {}
|
|
2792
|
+
let deviations30m = 0;
|
|
2793
|
+
try {
|
|
2794
|
+
const day = new Date().toISOString().slice(0, 10);
|
|
2795
|
+
const cutoff = Date.now() - 30 * 60 * 1000;
|
|
2796
|
+
for (const sub of ['hook', 'plugkit']) {
|
|
2797
|
+
const p = path.join(GM_LOG_ROOT, day, `${sub}.jsonl`);
|
|
2798
|
+
if (!fs.existsSync(p)) continue;
|
|
2799
|
+
const raw = fs.readFileSync(p, 'utf-8');
|
|
2800
|
+
let idx = 0;
|
|
2801
|
+
while (true) {
|
|
2802
|
+
const nl = raw.indexOf('\n', idx);
|
|
2803
|
+
const line = nl === -1 ? raw.slice(idx) : raw.slice(idx, nl);
|
|
2804
|
+
if (line.includes('"event":"deviation.')) {
|
|
2805
|
+
const tsm = line.match(/"ts":"([^"]+)"/);
|
|
2806
|
+
if (tsm) {
|
|
2807
|
+
const t = Date.parse(tsm[1]);
|
|
2808
|
+
if (Number.isFinite(t) && t >= cutoff) deviations30m++;
|
|
2809
|
+
}
|
|
2810
|
+
}
|
|
2811
|
+
if (nl === -1) break;
|
|
2812
|
+
idx = nl + 1;
|
|
2813
|
+
}
|
|
2814
|
+
}
|
|
2815
|
+
} catch (_) {}
|
|
2792
2816
|
fs.writeFileSync(TURN_SUMMARY_PATH, JSON.stringify({
|
|
2793
2817
|
ts: Date.now(),
|
|
2794
2818
|
watcher_pid: process.pid,
|
|
@@ -2801,6 +2825,7 @@ async function runSpoolWatcher(instance, spoolDir) {
|
|
|
2801
2825
|
long_gap_threshold_ms: 300000,
|
|
2802
2826
|
browser_sessions_alive: browserSessions,
|
|
2803
2827
|
update_available: updateAvailable,
|
|
2828
|
+
deviations_30m: deviations30m,
|
|
2804
2829
|
}));
|
|
2805
2830
|
} catch (_) {}
|
|
2806
2831
|
}
|
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.1397",
|
|
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",
|
package/skills/gm-skill/SKILL.md
CHANGED
|
@@ -28,7 +28,7 @@ Your first tool call of every session is the boot probe, in one Bash invocation.
|
|
|
28
28
|
cat .gm/exec-spool/.status.json 2>/dev/null; echo ---; cat .gm/exec-spool/.turn-summary.json 2>/dev/null; echo ---; date +%s%3N
|
|
29
29
|
```
|
|
30
30
|
|
|
31
|
-
`.turn-summary.json` carries `phase`, `last_skill`, `prd_pending`, `last_instruction_ts`, `last_instruction_age_ms`, `long_gap_threshold_ms`, `browser_sessions_alive`, `update_available`. When age exceeds the threshold, your next non-orienting verb will be gated — dispatch `instruction` first. When `update_available` is non-null, the watcher has detected drift: kill the watcher and re-bootstrap before continuing so the next instruction lands on the fresh wasm.
|
|
31
|
+
`.turn-summary.json` carries `phase`, `last_skill`, `prd_pending`, `last_instruction_ts`, `last_instruction_age_ms`, `long_gap_threshold_ms`, `browser_sessions_alive`, `update_available`, `deviations_30m`. When age exceeds the threshold, your next non-orienting verb will be gated — dispatch `instruction` first. When `update_available` is non-null, the watcher has detected drift: kill the watcher and re-bootstrap before continuing so the next instruction lands on the fresh wasm. `deviations_30m` is the rolling count of `deviation.*` events from hook+plugkit logs in the past 30 min — read it instead of running gmsniff at session start; non-zero indicates active drift worth investigating before continuing.
|
|
32
32
|
|
|
33
33
|
Compare `.status.json` `ts` field to the printed epoch ms. If the gap is >15000, the watcher is dead — boot it:
|
|
34
34
|
|