gm-skill 2.0.1505 → 2.0.1507

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.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gm-plugkit",
3
- "version": "2.0.1505",
3
+ "version": "2.0.1507",
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": {
@@ -1701,6 +1701,7 @@ function makeHostFunctions(instanceRef) {
1701
1701
  const HALF_LIFE_MS = 30 * 24 * 60 * 60 * 1000;
1702
1702
  const DEDUP_JACCARD = 0.7;
1703
1703
  const RECENCY_FLOOR = 0.4;
1704
+ const COS_FLOOR = namespace === 'codeinsight' ? 0.55 : 0;
1704
1705
  const nowMs = Date.now();
1705
1706
  const scored = [];
1706
1707
  const seen = new Set();
@@ -1712,6 +1713,7 @@ function makeHostFunctions(instanceRef) {
1712
1713
  for (const f of fs.readdirSync(vecDir)) {
1713
1714
  if (!f.endsWith('.json')) continue;
1714
1715
  const key = f.replace(/\.json$/, '');
1716
+ if (key === '__digest__') continue;
1715
1717
  const seenKey = `${ns}::${key}`;
1716
1718
  if (seen.has(seenKey)) continue;
1717
1719
  seen.add(seenKey);
@@ -1726,6 +1728,7 @@ function makeHostFunctions(instanceRef) {
1726
1728
  : Array.isArray(emb) ? emb : null;
1727
1729
  if (!vector) continue;
1728
1730
  const cos = cosineSim(queryEmbedding, vector);
1731
+ if (cos < COS_FLOOR) continue;
1729
1732
  const ageMs = Math.max(0, nowMs - mtimeMs);
1730
1733
  const recency = RECENCY_FLOOR + (1 - RECENCY_FLOOR) * Math.exp(-ageMs / HALF_LIFE_MS);
1731
1734
  const score = cos * recency;
@@ -2896,8 +2899,15 @@ async function runSpoolWatcher(instance, spoolDir) {
2896
2899
  // so the 5s heartbeat cannot fire and the supervisor would reap the watcher as hung
2897
2900
  // (the VERB ABORT). Stamp a busy_until window before the synchronous dispatch so the
2898
2901
  // supervisor's heartbeat-stale check honors it, exactly as the browser runner does.
2899
- if (verb === 'git_finalize' || verb === 'git_push' || verb === 'git_fetch') {
2900
- try { _writeStatusBusy(90000); } catch (_) {}
2902
+ // codesearch is the longest synchronous verb: a cold first call loads the 133MB bge-small
2903
+ // bert model AND re-indexes the tree. A cold build was witnessed at ~252s (dispatch log
2904
+ // codesearch ms=251772), so a 180s window let the supervisor reap the watcher mid-index and
2905
+ // respawn it, cold-loading again = respawn-thrash that never completes (the codeinsight-stale
2906
+ // symptom). codesearch gets a 360s window; the bounded git verbs keep 180s.
2907
+ if (verb === 'codesearch') {
2908
+ try { _writeStatusBusy(360000); } catch (_) {}
2909
+ } else if (verb === 'git_finalize' || verb === 'git_push' || verb === 'git_fetch') {
2910
+ try { _writeStatusBusy(180000); } catch (_) {}
2901
2911
  }
2902
2912
 
2903
2913
  if (verb === 'memorize-fire' || verb === 'transition' || verb === 'prd-resolve' || verb === 'mutable-resolve') {
package/gm.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gm",
3
- "version": "2.0.1505",
3
+ "version": "2.0.1507",
4
4
  "description": "Spool-dispatch orchestration engine with unified state machine, skills, and automated git enforcement",
5
5
  "author": "AnEntrypoint",
6
6
  "license": "MIT",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gm-skill",
3
- "version": "2.0.1505",
3
+ "version": "2.0.1507",
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",