gm-skill 2.0.1265 → 2.0.1267
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/plugkit.version +1 -1
- package/bin/plugkit.wasm +0 -0
- package/bin/plugkit.wasm.sha256 +1 -1
- package/gm-plugkit/plugkit-wasm-wrapper.js +60 -3
- package/gm.json +2 -2
- package/package.json +2 -2
- package/skills/gm-skill/SKILL.md +1 -1
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.1267` — 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/plugkit.version
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
0.1.
|
|
1
|
+
0.1.468
|
package/bin/plugkit.wasm
CHANGED
|
Binary file
|
package/bin/plugkit.wasm.sha256
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
89f0141b6e50ced98a5216b7ed553da3f529bac96f6d9e2927a1ed1737223d62 plugkit.wasm
|
|
@@ -42,6 +42,7 @@ function emitShutdownReason(reason, err) {
|
|
|
42
42
|
version: typeof PLUGKIT_VERSION !== 'undefined' ? PLUGKIT_VERSION : null,
|
|
43
43
|
};
|
|
44
44
|
fs.writeFileSync(path.join(spoolDir, '.shutdown-reason.json'), JSON.stringify(body, null, 2));
|
|
45
|
+
try { fs.unlinkSync(path.join(spoolDir, '.boot-active.json')); } catch (_) {}
|
|
45
46
|
} catch (_) {}
|
|
46
47
|
}
|
|
47
48
|
|
|
@@ -1497,6 +1498,47 @@ async function runSpoolWatcher(instance, spoolDir) {
|
|
|
1497
1498
|
acquireLock();
|
|
1498
1499
|
setInterval(refreshLock, 5000);
|
|
1499
1500
|
|
|
1501
|
+
const BOOT_ACTIVE_PATH = path.join(spoolDir, '.boot-active.json');
|
|
1502
|
+
const SHUTDOWN_REASON_PATH_EARLY = path.join(spoolDir, '.shutdown-reason.json');
|
|
1503
|
+
try {
|
|
1504
|
+
let priorBoot = null;
|
|
1505
|
+
let priorShutdownForAbort = null;
|
|
1506
|
+
try { priorBoot = JSON.parse(fs.readFileSync(BOOT_ACTIVE_PATH, 'utf-8')); } catch (_) {}
|
|
1507
|
+
try { priorShutdownForAbort = JSON.parse(fs.readFileSync(SHUTDOWN_REASON_PATH_EARLY, 'utf-8')); } catch (_) {}
|
|
1508
|
+
if (priorBoot && Number.isFinite(priorBoot.ts) && priorBoot.pid !== process.pid) {
|
|
1509
|
+
const ageMs = Date.now() - priorBoot.ts;
|
|
1510
|
+
const shutdownIsNewer = priorShutdownForAbort && Number.isFinite(priorShutdownForAbort.ts) && priorShutdownForAbort.ts >= priorBoot.ts;
|
|
1511
|
+
if (ageMs > 30_000 && !shutdownIsNewer) {
|
|
1512
|
+
logEvent('plugkit', 'watcher.silent-abort', {
|
|
1513
|
+
prior_pid: priorBoot.pid,
|
|
1514
|
+
prior_ts: priorBoot.ts,
|
|
1515
|
+
prior_sha: priorBoot.wrapper_sha || null,
|
|
1516
|
+
prior_version: priorBoot.version || null,
|
|
1517
|
+
detected_at: Date.now(),
|
|
1518
|
+
age_ms: ageMs,
|
|
1519
|
+
shutdown_reason_present: !!priorShutdownForAbort,
|
|
1520
|
+
shutdown_reason_ts: priorShutdownForAbort ? priorShutdownForAbort.ts : null,
|
|
1521
|
+
});
|
|
1522
|
+
try { console.error(`[plugkit-wasm] SILENT ABORT detected: prior watcher pid=${priorBoot.pid} sha=${priorBoot.wrapper_sha} died without writing .shutdown-reason.json (age=${ageMs}ms)`); } catch (_) {}
|
|
1523
|
+
}
|
|
1524
|
+
}
|
|
1525
|
+
} catch (_) {}
|
|
1526
|
+
function writeBootActive() {
|
|
1527
|
+
try {
|
|
1528
|
+
const _v = readInstanceVersion(instance);
|
|
1529
|
+
fs.writeFileSync(BOOT_ACTIVE_PATH, JSON.stringify({
|
|
1530
|
+
pid: process.pid,
|
|
1531
|
+
ts: Date.now(),
|
|
1532
|
+
wrapper_sha: _ownWrapperSha12 || null,
|
|
1533
|
+
version: _v || null,
|
|
1534
|
+
}));
|
|
1535
|
+
} catch (_) {}
|
|
1536
|
+
}
|
|
1537
|
+
function clearBootActive() {
|
|
1538
|
+
try { fs.unlinkSync(BOOT_ACTIVE_PATH); } catch (_) {}
|
|
1539
|
+
}
|
|
1540
|
+
writeBootActive();
|
|
1541
|
+
|
|
1500
1542
|
const PEER_REGISTRY_PATH = path.join(os.homedir(), '.claude', 'gm-tools', 'peer-registry.json');
|
|
1501
1543
|
function registerSelfAsPeer() {
|
|
1502
1544
|
try {
|
|
@@ -1593,6 +1635,7 @@ async function runSpoolWatcher(instance, spoolDir) {
|
|
|
1593
1635
|
} catch (_) {}
|
|
1594
1636
|
|
|
1595
1637
|
try { fs.unlinkSync(STATUS_PATH_FOR_TEARDOWN); } catch (_) {}
|
|
1638
|
+
try { clearBootActive(); } catch (_) {}
|
|
1596
1639
|
try { releaseLock(); } catch (_) {}
|
|
1597
1640
|
process.exit(0);
|
|
1598
1641
|
}
|
|
@@ -1624,6 +1667,7 @@ async function runSpoolWatcher(instance, spoolDir) {
|
|
|
1624
1667
|
} catch (_) {}
|
|
1625
1668
|
try { releaseLock(); } catch (_) {}
|
|
1626
1669
|
try { fs.unlinkSync(STATUS_PATH_FOR_TEARDOWN); } catch (_) {}
|
|
1670
|
+
try { clearBootActive(); } catch (_) {}
|
|
1627
1671
|
process.exit(0);
|
|
1628
1672
|
} catch (e) {
|
|
1629
1673
|
console.error(`[version-drift-check] error: ${e.message}`);
|
|
@@ -1659,6 +1703,7 @@ async function runSpoolWatcher(instance, spoolDir) {
|
|
|
1659
1703
|
} catch (_) {}
|
|
1660
1704
|
try { releaseLock(); } catch (_) {}
|
|
1661
1705
|
try { fs.unlinkSync(STATUS_PATH_FOR_TEARDOWN); } catch (_) {}
|
|
1706
|
+
try { clearBootActive(); } catch (_) {}
|
|
1662
1707
|
process.exit(0);
|
|
1663
1708
|
} catch (e) {
|
|
1664
1709
|
console.error(`[wrapper-drift-check] error: ${e.message}`);
|
|
@@ -1690,9 +1735,21 @@ async function runSpoolWatcher(instance, spoolDir) {
|
|
|
1690
1735
|
}
|
|
1691
1736
|
}, IDLE_CHECK_MS);
|
|
1692
1737
|
|
|
1693
|
-
|
|
1694
|
-
|
|
1695
|
-
|
|
1738
|
+
function handleSignalShutdown(sig) {
|
|
1739
|
+
try {
|
|
1740
|
+
fs.writeFileSync(SHUTDOWN_REASON_PATH, JSON.stringify({
|
|
1741
|
+
reason: sig.toLowerCase(),
|
|
1742
|
+
ts: Date.now(),
|
|
1743
|
+
pid: process.pid,
|
|
1744
|
+
}));
|
|
1745
|
+
} catch (_) {}
|
|
1746
|
+
try { clearBootActive(); } catch (_) {}
|
|
1747
|
+
try { releaseLock(); } catch (_) {}
|
|
1748
|
+
process.exit(0);
|
|
1749
|
+
}
|
|
1750
|
+
process.on('SIGINT', () => handleSignalShutdown('SIGINT'));
|
|
1751
|
+
process.on('SIGTERM', () => handleSignalShutdown('SIGTERM'));
|
|
1752
|
+
process.on('exit', () => { try { clearBootActive(); } catch (_) {} releaseLock(); });
|
|
1696
1753
|
|
|
1697
1754
|
try {
|
|
1698
1755
|
const wrapperDst = path.join(os.homedir(), '.claude', 'gm-tools', 'plugkit-wasm-wrapper.js');
|
package/gm.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "gm",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.1267",
|
|
4
4
|
"description": "Spool-dispatch orchestration engine with unified state machine, skills, and automated git enforcement",
|
|
5
5
|
"author": "AnEntrypoint",
|
|
6
6
|
"license": "MIT",
|
|
@@ -17,5 +17,5 @@
|
|
|
17
17
|
"publishConfig": {
|
|
18
18
|
"access": "public"
|
|
19
19
|
},
|
|
20
|
-
"plugkitVersion": "0.1.
|
|
20
|
+
"plugkitVersion": "0.1.468"
|
|
21
21
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "gm-skill",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.1267",
|
|
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.1267"
|
|
43
43
|
},
|
|
44
44
|
"engines": {
|
|
45
45
|
"node": ">=16.0.0"
|
package/skills/gm-skill/SKILL.md
CHANGED
|
@@ -22,6 +22,6 @@ bun x gm-plugkit@latest spool > /dev/null 2>&1 &
|
|
|
22
22
|
|
|
23
23
|
**Batch writes, waits, and reads together.** Each agent turn costs cycles; the dispatch shape `Write request → wait → Read response` is one logical step, not three. Issue all three in a single message — the Write tool call and the Read tool call go in the same `<function_calls>` block. The Read may return "file does not exist" if plugkit is mid-verb; that's fine, retry with one more Read in the next message rather than spreading the cycle across three turns. Fan-out is the same shape — dispatching three independent verbs (`prd-add g1`, `prd-add g2`, `prd-add g3`) means three Write tool calls in one block, then three Read tool calls in one block. Serial dispatch when you could be parallel is wasted cycles. The only sequencing constraint is real data dependency: if verb B needs the response of verb A, those go in separate turns; otherwise batch.
|
|
24
24
|
|
|
25
|
-
Response body is not a mutation surface. Memory writes route through `memorize-fire` only — another verb YOU dispatch.
|
|
25
|
+
Response body is not a mutation surface. Memory writes route through `memorize-fire` only — another verb YOU dispatch. **Never** write persistent memory to platform-specific paths (`~/.claude/projects/*/memory/`, `~/.codex/memory/`, `~/.cursor/*`, etc.) — those don't transport between agent platforms and break the moment a session runs under a different harness. The only two portable surfaces are (a) dispatched `memorize-fire` (which writes through plugkit to the rs-learn store that travels with the project) and (b) `AGENTS.md` for project-tracked rules. If you reach for a `Write` tool on a memory directory under `~/`, stop — that's the lock-in anti-pattern.
|
|
26
26
|
|
|
27
27
|
On turn entry (first `instruction` dispatch after a >30s idle gap or session-start), plugkit attaches an `auto_recall` pack to your `instruction` response: `{query, hits, fired_at, turn_entry: true}`. The query is derived from `.gm/last-prompt.txt` / `.gm/turn-state.json`; hits are the top recall results plugkit pulled before serving your instruction. Read `auto_recall.hits` alongside the existing `recall_hits` (which is the phase+PRD-subject pack) — both surface prior memory, but `auto_recall` is the per-turn user-prompt pack and only fires on turn entry. Subsequent `instruction` dispatches in the same turn carry no `auto_recall` field (or carry the same pack from the turn-start fire); do not re-trigger it manually.
|