gm-plugkit 2.0.1561 → 2.0.1563

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gm-plugkit",
3
- "version": "2.0.1561",
3
+ "version": "2.0.1563",
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": {
@@ -411,6 +411,17 @@ function scanStalledTurns() {
411
411
  }
412
412
  }
413
413
 
414
+ // Every spool dispatch is the agent actively driving the chain, including wasm-direct verbs
415
+ // (recall/codesearch/exec_js/git/fetch) that never reach turnTick. Refresh the open turn's stall
416
+ // clock so a Bash-free stretch of pure wasm-direct verbs does not trip a false mid-chain-stall
417
+ // (the recurring audit-fire own-defect). Never create or split a turn -- that stays turnTick's job.
418
+ function touchActiveTurn(sess) {
419
+ const t = _turns.get(sess || '(no-session)');
420
+ if (!t) return;
421
+ t.lastTs = Date.now();
422
+ t.stallEmitted = false;
423
+ }
424
+
414
425
  let __sessCache = { value: '', mtimeMs: 0, readAt: 0, srcMtimeMs: 0 };
415
426
  function readCurrentSess() {
416
427
  const now = Date.now();
@@ -479,10 +490,14 @@ function logEvent(sub, event, fields) {
479
490
  }
480
491
 
481
492
  function emitOrchestratorEvents(verb, taskBase, resultStr) {
482
- if (!ORCHESTRATOR_VERBS.has(verb)) return;
483
493
  let parsed;
484
- try { parsed = JSON.parse(resultStr); } catch (_) { return; }
485
- if (!parsed || parsed.ok !== true) {
494
+ try { parsed = JSON.parse(resultStr); } catch (_) { parsed = null; }
495
+ if (!ORCHESTRATOR_VERBS.has(verb)) {
496
+ if (parsed && parsed.ok === true) { try { touchActiveTurn(readCurrentSess()); } catch (_) {} }
497
+ return;
498
+ }
499
+ if (!parsed) return;
500
+ if (parsed.ok !== true) {
486
501
  let errData = null;
487
502
  if (parsed && typeof parsed.stdout === 'string' && parsed.stdout.length > 0) {
488
503
  try { errData = JSON.parse(parsed.stdout); } catch (_) {}
package/plugkit.version CHANGED
@@ -1 +1 @@
1
- 0.1.645
1
+ 0.1.647