gm-skill 2.0.1504 → 2.0.1506
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 +20 -3
- package/gm.json +1 -1
- package/package.json +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.1506",
|
|
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": {
|
|
@@ -563,7 +563,17 @@ function browserStateDir(cwd) {
|
|
|
563
563
|
function browserPortsFile(cwd) { return path.join(browserStateDir(cwd), 'browser-ports.json'); }
|
|
564
564
|
function browserSessionsFile(cwd) { return path.join(browserStateDir(cwd), 'browser-sessions.json'); }
|
|
565
565
|
|
|
566
|
-
|
|
566
|
+
function selectIdleBrowserSessions(ports, now, limitMs) {
|
|
567
|
+
const idle = [];
|
|
568
|
+
if (!ports || typeof ports !== 'object') return idle;
|
|
569
|
+
for (const [sid, entry] of Object.entries(ports)) {
|
|
570
|
+
if (!entry || typeof entry !== 'object') continue;
|
|
571
|
+
const lastUse = Number.isFinite(entry.lastUse) ? entry.lastUse : 0;
|
|
572
|
+
const idleMs = now - lastUse;
|
|
573
|
+
if (idleMs >= limitMs) idle.push({ sid, entry, idleMs });
|
|
574
|
+
}
|
|
575
|
+
return idle;
|
|
576
|
+
}
|
|
567
577
|
|
|
568
578
|
function stampBrowserLastUse(cwd, claudeSessionId) {
|
|
569
579
|
try {
|
|
@@ -1691,6 +1701,7 @@ function makeHostFunctions(instanceRef) {
|
|
|
1691
1701
|
const HALF_LIFE_MS = 30 * 24 * 60 * 60 * 1000;
|
|
1692
1702
|
const DEDUP_JACCARD = 0.7;
|
|
1693
1703
|
const RECENCY_FLOOR = 0.4;
|
|
1704
|
+
const COS_FLOOR = namespace === 'codeinsight' ? 0.55 : 0;
|
|
1694
1705
|
const nowMs = Date.now();
|
|
1695
1706
|
const scored = [];
|
|
1696
1707
|
const seen = new Set();
|
|
@@ -1702,6 +1713,7 @@ function makeHostFunctions(instanceRef) {
|
|
|
1702
1713
|
for (const f of fs.readdirSync(vecDir)) {
|
|
1703
1714
|
if (!f.endsWith('.json')) continue;
|
|
1704
1715
|
const key = f.replace(/\.json$/, '');
|
|
1716
|
+
if (key === '__digest__') continue;
|
|
1705
1717
|
const seenKey = `${ns}::${key}`;
|
|
1706
1718
|
if (seen.has(seenKey)) continue;
|
|
1707
1719
|
seen.add(seenKey);
|
|
@@ -1716,6 +1728,7 @@ function makeHostFunctions(instanceRef) {
|
|
|
1716
1728
|
: Array.isArray(emb) ? emb : null;
|
|
1717
1729
|
if (!vector) continue;
|
|
1718
1730
|
const cos = cosineSim(queryEmbedding, vector);
|
|
1731
|
+
if (cos < COS_FLOOR) continue;
|
|
1719
1732
|
const ageMs = Math.max(0, nowMs - mtimeMs);
|
|
1720
1733
|
const recency = RECENCY_FLOOR + (1 - RECENCY_FLOOR) * Math.exp(-ageMs / HALF_LIFE_MS);
|
|
1721
1734
|
const score = cos * recency;
|
|
@@ -2886,8 +2899,12 @@ async function runSpoolWatcher(instance, spoolDir) {
|
|
|
2886
2899
|
// so the 5s heartbeat cannot fire and the supervisor would reap the watcher as hung
|
|
2887
2900
|
// (the VERB ABORT). Stamp a busy_until window before the synchronous dispatch so the
|
|
2888
2901
|
// supervisor's heartbeat-stale check honors it, exactly as the browser runner does.
|
|
2889
|
-
|
|
2890
|
-
|
|
2902
|
+
// codesearch is the longest synchronous verb: a cold first call loads the 133MB bge-small
|
|
2903
|
+
// bert model AND re-indexes the tree, far exceeding the 30s stale limit. Without busy_until
|
|
2904
|
+
// the supervisor reaps the watcher mid-index and respawns it, which cold-loads again =
|
|
2905
|
+
// respawn-thrash that never completes the index (the codeinsight-stale symptom).
|
|
2906
|
+
if (verb === 'git_finalize' || verb === 'git_push' || verb === 'git_fetch' || verb === 'codesearch') {
|
|
2907
|
+
try { _writeStatusBusy(180000); } catch (_) {}
|
|
2891
2908
|
}
|
|
2892
2909
|
|
|
2893
2910
|
if (verb === 'memorize-fire' || verb === 'transition' || verb === 'prd-resolve' || verb === 'mutable-resolve') {
|
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.1506",
|
|
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",
|