gm-skill 2.0.1097 → 2.0.1099

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 CHANGED
@@ -28,7 +28,7 @@ npx gm-skill-bootstrap
28
28
 
29
29
  ## Version
30
30
 
31
- `2.0.1097` — auto-bumped from the canonical `gm` repo. Every push to `AnEntrypoint/gm` republishes this package alongside all 15 platform packages.
31
+ `2.0.1099` — auto-bumped from the canonical `gm` repo. Every push to `AnEntrypoint/gm` republishes this package alongside all 15 platform packages.
32
32
 
33
33
  ## Source of truth
34
34
 
@@ -1 +1 @@
1
- 0.1.381
1
+ 0.1.382
package/bin/plugkit.wasm CHANGED
Binary file
@@ -1 +1 @@
1
- 5cf4e39ea3a9a26a1426d5e7b59d3341afee79838340eece2f37ecf5bcb432dd plugkit.wasm
1
+ 49766ca6d16a3c4388117f00ccb1e70ba15c16802b8537d30c10267bae6e1be4 plugkit.wasm
@@ -187,19 +187,24 @@ function makeHostFunctions(instanceRef) {
187
187
 
188
188
  host_vec_search: (qPtr, qLen, k) => {
189
189
  try {
190
- const q = readWasmStr(instanceRef.value, qPtr, qLen);
191
- if (!q) return writeWasmJson(instanceRef.value, []);
190
+ const raw = readWasmStr(instanceRef.value, qPtr, qLen);
191
+ if (!raw) return writeWasmJson(instanceRef.value, []);
192
+ let parsedQ;
193
+ try { parsedQ = JSON.parse(raw); } catch (_) { parsedQ = { query: raw }; }
194
+ const q = parsedQ.query || raw;
195
+ const scope = parsedQ.scope || 'all';
192
196
  const k_ = k > 0 ? k : VEC_K_DEFAULT;
193
- const body = JSON.stringify({ query: q, limit: k_, scope: 'episodes' });
197
+ const body = JSON.stringify({ query: q, limit: k_, scope });
194
198
  const result = spawnSync(process.execPath, ['-e', `
195
199
  fetch('${RS_LEARN_URL}/search', { method: 'POST', headers: { 'content-type': 'application/json' }, body: ${JSON.stringify(body)} })
196
200
  .then(r => r.text().then(t => process.stdout.write(t)))
197
- .catch(e => process.stdout.write(JSON.stringify({ error: e.message, results: [] })));
201
+ .catch(e => process.stdout.write(JSON.stringify({ error: e.message })));
198
202
  `], { encoding: 'utf-8', timeout: 5000 });
199
203
  if (result.status !== 0 || !result.stdout) return writeWasmJson(instanceRef.value, []);
200
204
  try {
201
205
  const parsed = JSON.parse(result.stdout);
202
- return writeWasmJson(instanceRef.value, parsed.results || parsed);
206
+ const hits = parsed.hits || parsed.results || parsed.episodes || [];
207
+ return writeWasmJson(instanceRef.value, hits);
203
208
  } catch (_) {
204
209
  return writeWasmJson(instanceRef.value, []);
205
210
  }
@@ -375,7 +380,7 @@ async function runSpoolWatcher(instance, spoolDir) {
375
380
  try { instance.exports.plugkit_free(bodyPtr, bodyBytes.length); } catch (_) {}
376
381
  try { instance.exports.plugkit_free(ptr, len); } catch (_) {}
377
382
 
378
- fs.unlinkSync(filePath);
383
+ try { if (fs.existsSync(filePath)) fs.unlinkSync(filePath); } catch (_) {}
379
384
  processed.delete(key);
380
385
  } catch (e) {
381
386
  console.error(`[plugkit-wasm] error processing ${key}: ${e.message}`);
package/gm.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gm",
3
- "version": "2.0.1097",
3
+ "version": "2.0.1099",
4
4
  "description": "Spool-dispatch orchestration engine with unified state machine, skills, and automated git enforcement",
5
5
  "author": "AnEntrypoint",
6
6
  "license": "MIT",
@@ -23,5 +23,5 @@
23
23
  "publishConfig": {
24
24
  "access": "public"
25
25
  },
26
- "plugkitVersion": "0.1.381"
26
+ "plugkitVersion": "0.1.382"
27
27
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gm-skill",
3
- "version": "2.0.1097",
3
+ "version": "2.0.1099",
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.1097"
42
+ "gm-plugkit": "^2.0.1099"
43
43
  },
44
44
  "engines": {
45
45
  "node": ">=16.0.0"
@@ -10,7 +10,7 @@ Plugkit owns every instruction, every phase transition, every guardrail. The ski
10
10
 
11
11
  ## The loop
12
12
 
13
- 1. Write `.gm/exec-spool/in/instruction/<N>.txt` with empty body (or `phase=<override>` to force a phase). Read `.gm/exec-spool/out/<N>.json`.
13
+ 1. Write `.gm/exec-spool/in/instruction/<N>.txt` with empty body (or `phase=<override>` to force a phase). Read `.gm/exec-spool/out/instruction-<N>.json`.
14
14
  2. The response contains `phase`, `instruction` (prose to follow), `mutables_pending`, `prd_pending_count`, `next_phase_hint`.
15
15
  3. Follow the `instruction` body imperatively. Resolve mutables, execute work, dispatch other verbs (`recall`, `codesearch`, `memorize`, `mutable-resolve`, `transition`, all language stems) as the instruction directs.
16
16
  4. When the phase's exit condition is met, dispatch `in/transition/<N>.txt` to advance. Then re-enter step 1 with the new phase.