gm-skill 2.0.1973 → 2.0.1975

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 +1 @@
1
- 0.1.903
1
+ 0.1.905
@@ -1 +1 @@
1
- 23578c20939f8d090f7219836cb12ea187d4f184041bf0449e3eedab4840fafb plugkit.wasm
1
+ 5e637cfefaddd54c2fdf06d6e718bc8834b6c026fed6e542ef1d18de2b5bebfc plugkit.wasm
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gm-plugkit",
3
- "version": "2.0.1973",
3
+ "version": "2.0.1975",
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": {
@@ -2548,6 +2548,55 @@ function hostEmbedViaGmRunner(text) {
2548
2548
  }
2549
2549
  }
2550
2550
 
2551
+ let _agentplugRunnerBinPath;
2552
+ function resolveAgentplugRunnerBin() {
2553
+ if (_agentplugRunnerBinPath !== undefined) return _agentplugRunnerBinPath;
2554
+ const exe = path.join(GM_TOOLS_ROOT, process.platform === 'win32' ? 'agentplug-runner.exe' : 'agentplug-runner');
2555
+ _agentplugRunnerBinPath = fs.existsSync(exe) ? exe : null;
2556
+ return _agentplugRunnerBinPath;
2557
+ }
2558
+
2559
+ // plugkit-core's wasm now imports env:host_plugin_call unconditionally (the
2560
+ // agentplug migration routes libsql/bert/treesitter through it instead of
2561
+ // linking them in-process) -- WITHOUT this import registered, WebAssembly.
2562
+ // instantiate throws a hard LinkError and the wasm never boots at all, not
2563
+ // just a degraded-capability fallback like host_vec_embed's absence. This
2564
+ // delegates to agentplug-runner's `dispatch <plugin> <verb> <body>` one-shot
2565
+ // subcommand (same synchronous spawnSync shape as hostEmbedViaGmRunner
2566
+ // above) when a real ~/.gm-tools/agentplug-runner(.exe) is present; when
2567
+ // absent, returns a real, typed {"ok":false,"error":"not_implemented_js_wrapper"}
2568
+ // envelope instead of a JS-side exception -- lets wasm instantiation and
2569
+ // every non-plugin-dependent verb keep working, with only the specific
2570
+ // libsql/bert/treesitter-backed verbs (sql_*, recall, memorize, codesearch)
2571
+ // failing loud and typed rather than the whole session going dark.
2572
+ function hostPluginCallViaAgentplugRunner(plugin, verb, body) {
2573
+ const bin = resolveAgentplugRunnerBin();
2574
+ if (!bin) return null;
2575
+ try {
2576
+ const r = spawnSync(bin, ['dispatch', plugin, verb, body], {
2577
+ encoding: 'utf-8',
2578
+ windowsHide: true,
2579
+ timeout: 30000,
2580
+ maxBuffer: 64 * 1024 * 1024,
2581
+ });
2582
+ if (r.error || r.status !== 0) return null;
2583
+ return r.stdout;
2584
+ } catch (_) {
2585
+ return null;
2586
+ }
2587
+ }
2588
+
2589
+ globalThis.__hostPluginCallSync = function __hostPluginCallSync(pluginPtr, pluginLen, verbPtr, verbLen, bodyPtr, bodyLen, instance) {
2590
+ const plugin = readWasmStr(instance, pluginPtr, pluginLen);
2591
+ const verb = readWasmStr(instance, verbPtr, verbLen);
2592
+ const body = readWasmStr(instance, bodyPtr, bodyLen);
2593
+ const result = hostPluginCallViaAgentplugRunner(plugin, verb, body);
2594
+ const out = result != null
2595
+ ? result
2596
+ : JSON.stringify({ ok: false, error: 'not_implemented_js_wrapper', plugin });
2597
+ return writeWasmJson(instance, JSON.parse(out));
2598
+ };
2599
+
2551
2600
  globalThis.__hostEmbedSync = function __hostEmbedSync(textPtr, textLen, outPtr, outLen, instance) {
2552
2601
  try {
2553
2602
  const text = readWasmStr(instance, textPtr, textLen);
@@ -2737,6 +2786,14 @@ function makeHostFunctions(instanceRef) {
2737
2786
  return -1;
2738
2787
  },
2739
2788
 
2789
+ host_plugin_call: (pluginPtr, pluginLen, verbPtr, verbLen, bodyPtr, bodyLen) => {
2790
+ try {
2791
+ return globalThis.__hostPluginCallSync(pluginPtr, pluginLen, verbPtr, verbLen, bodyPtr, bodyLen, instanceRef.value);
2792
+ } catch (_) {
2793
+ return 0n;
2794
+ }
2795
+ },
2796
+
2740
2797
  host_vec_search: (qPtr, qLen, k) => {
2741
2798
  try {
2742
2799
  const raw = readWasmStr(instanceRef.value, qPtr, qLen);
@@ -1 +1 @@
1
- 0.1.903
1
+ 0.1.905
package/gm.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gm",
3
- "version": "2.0.1973",
3
+ "version": "2.0.1975",
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.903"
20
+ "plugkitVersion": "0.1.905"
21
21
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gm-skill",
3
- "version": "2.0.1973",
3
+ "version": "2.0.1975",
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",