gm-skill 2.0.1512 → 2.0.1513

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/AGENTS.md CHANGED
@@ -28,6 +28,8 @@ This repo IS the published `gm-skill` npm package. The repo root is the package
28
28
 
29
29
  The plugkit stack runs as a wasm cdylib loaded by `plugkit-wasm-wrapper.js` under Node/bun. No native binaries are built, downloaded, or published. The shipped `plugkit.wasm` (~149MB, embeds bge-small-en-v1.5 for offline in-wasm embeddings) is fetched at bootstrap from `plugkit-wasm` npm / `plugkit-bin` gh-releases, sha256-pinned, not bundled in `gm-skill`. Full size/embedding mechanics in rs-learn (`recall: WASM-only plugkit size mechanics`).
30
30
 
31
+ **Every wasm host-import `extern "C"` block carries `#[link(wasm_import_module = "env")]`.** The host provides every possible host fn (host_kv_get/put/query, host_vec_search, host_git, host_log, host_now_ms, host_fs_*, host_env_get, host_exec_js, host_random_fill, …) under the `env` import module (`plugkit-wasm-wrapper.js` `importObject.env`). A bare `extern "C"` block links only because lenient linkers tolerate the unresolved module; the strict Linux release `rust-lld` in CI errors `undefined symbol: host_*` and Build-WASM fails. This holds in rs-plugkit AND every dep crate linked into the cdylib (rs-learn) AND any sibling that builds wasm (rs-exec, rs-search). The trap: `cargo check` and even `cargo build --release` on a non-Linux host both pass while CI fails — the linker differs by host, so the only reproduction is a Linux release link; the CI job log is admin-gated, so Build-WASM echoes `::error::` annotations to surface the lld error publicly. Add a host import anywhere and the block carries the attribute or the cascade goes dark. Full incident in rs-learn (`recall: cascade outage wasm import module link`).
32
+
31
33
  ## Spool dispatch ABI
32
34
 
33
35
  Agents dispatch verbs by writing to `.gm/exec-spool/in/<verb>/<N>.txt` (request body) and reading the response from `.gm/exec-spool/out/<verb>-<N>.json` (nested verbs) or `.gm/exec-spool/out/<N>.json` (root verbs). The wasm orchestrator services every possible verb; the harness never executes side effects directly.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gm-plugkit",
3
- "version": "2.0.1512",
3
+ "version": "2.0.1513",
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": {
@@ -12,6 +12,9 @@ import { fileURLToPath } from 'url';
12
12
  // (browser/chromium spawn, long exec) stamp a busy_until window into .status.json before the
13
13
  // blocking call, so a liveness probe reads "busy" not "dead" while the event loop is blocked.
14
14
  let _writeStatusBusy = () => {};
15
+ // Latest busy_until epoch ms stamped by a long synchronous verb (codesearch rebuild, chromium
16
+ // spawn). scanStalledTurns reads it so a busy watcher is not mis-flagged as an idle stall.
17
+ let _lastBusyUntil = 0;
15
18
 
16
19
  function spawnSync(cmd, args, opts) {
17
20
  return _rawSpawnSync(cmd, args, { windowsHide: true, ...(opts || {}) });
@@ -373,6 +376,10 @@ function turnTick(sess, verb, taskBase, phase, prdPending) {
373
376
  const STALL_MS = 300_000;
374
377
  function scanStalledTurns() {
375
378
  const now = Date.now();
379
+ // A long synchronous verb (codesearch index rebuild, chromium spawn) stamps busy_until and
380
+ // blocks the spool — the agent is legitimately waiting, not stalled. Honor it exactly as
381
+ // supervisor.js checkWatcherHealth does, so a busy watcher never emits a false mid-chain-stall.
382
+ if (_lastBusyUntil && _lastBusyUntil > now) return;
376
383
  for (const [key, t] of _turns) {
377
384
  if (!t || typeof t !== 'object' || !Number.isFinite(t.startTs)) continue;
378
385
  if (t.stallEmitted) continue;
@@ -3095,7 +3102,7 @@ async function runSpoolWatcher(instance, spoolDir) {
3095
3102
  // busy_until tells probes "alive but synchronously busy until this epoch ms" — read it
3096
3103
  // alongside ts: a stale ts whose busy_until is still in the future is a busy watcher, not
3097
3104
  // a dead one. The pre-verb writeStatus(busyMs) stamps it before the blocking call.
3098
- if (busyMs && busyMs > 0) rec.busy_until = now + busyMs;
3105
+ if (busyMs && busyMs > 0) { rec.busy_until = now + busyMs; _lastBusyUntil = rec.busy_until; }
3099
3106
  fs.writeFileSync(STATUS_PATH, JSON.stringify(rec));
3100
3107
  } catch (_) {}
3101
3108
  }
package/gm.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gm",
3
- "version": "2.0.1512",
3
+ "version": "2.0.1513",
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.1512",
3
+ "version": "2.0.1513",
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",