gm-skill 2.0.1936 → 2.0.1937

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.1936",
3
+ "version": "2.0.1937",
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": {
@@ -4439,11 +4439,14 @@ async function runSpoolWatcher(instance, spoolDir) {
4439
4439
  const dir = path.dirname(relPath);
4440
4440
  const verb = dir === '.' ? taskBase : dir;
4441
4441
  const outName = dir === '.' ? `${taskBase}.json` : `${verb}-${taskBase}.json`;
4442
- fs.writeFileSync(path.join(outDir, outName), JSON.stringify({
4442
+ const abortOutPath = path.join(outDir, outName);
4443
+ const abortTmpPath = abortOutPath + '.tmp.' + process.pid;
4444
+ fs.writeFileSync(abortTmpPath, JSON.stringify({
4443
4445
  ok: false,
4444
4446
  error: `wasm aborted earlier (exit_code=${__wasmAbortFlag.code}); watcher will respawn`,
4445
4447
  wasm_aborted: true,
4446
4448
  }));
4449
+ fs.renameSync(abortTmpPath, abortOutPath);
4447
4450
  try { fs.unlinkSync(filePath); } catch (_) {}
4448
4451
  } catch (_) {}
4449
4452
  unmarkProcessed(key);
@@ -4561,7 +4564,10 @@ async function runSpoolWatcher(instance, spoolDir) {
4561
4564
  }
4562
4565
 
4563
4566
  const outName = dir === '.' ? `${taskBase}.json` : `${verb}-${taskBase}.json`;
4564
- fs.writeFileSync(path.join(outDir, outName), resultStr);
4567
+ const outPath = path.join(outDir, outName);
4568
+ const outTmpPath = outPath + '.tmp.' + process.pid;
4569
+ fs.writeFileSync(outTmpPath, resultStr);
4570
+ fs.renameSync(outTmpPath, outPath);
4565
4571
  const dur_ms = Date.now() - t0;
4566
4572
  console.log(`[dispatch] <- verb=${verb} task=${taskBase} ms=${dur_ms} out=${resultStr.length}b`);
4567
4573
  logEvent('plugkit', 'dispatch.end', { verb, task: taskBase, dur_ms, out_bytes: resultStr.length });
@@ -4603,7 +4609,10 @@ async function runSpoolWatcher(instance, spoolDir) {
4603
4609
  const verb = dir === '.' ? taskBase : dir;
4604
4610
  const outName = dir === '.' ? `${taskBase}.json` : `${verb}-${taskBase}.json`;
4605
4611
  try {
4606
- fs.writeFileSync(path.join(outDir, outName), JSON.stringify({ ok: false, error: e.message }));
4612
+ const errOutPath = path.join(outDir, outName);
4613
+ const errTmpPath = errOutPath + '.tmp.' + process.pid;
4614
+ fs.writeFileSync(errTmpPath, JSON.stringify({ ok: false, error: e.message }));
4615
+ fs.renameSync(errTmpPath, errOutPath);
4607
4616
  } catch (_) {}
4608
4617
  try { fs.unlinkSync(filePath); } catch (_) {}
4609
4618
  unmarkProcessed(key);
package/gm.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gm",
3
- "version": "2.0.1936",
3
+ "version": "2.0.1937",
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.1936",
3
+ "version": "2.0.1937",
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",