@adhdev/daemon-standalone 0.9.82-rc.363 → 0.9.82-rc.364

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/dist/index.js CHANGED
@@ -30036,10 +30036,10 @@ var require_dist3 = __commonJS({
30036
30036
  }
30037
30037
  function getDaemonBuildInfo() {
30038
30038
  if (cached2) return cached2;
30039
- const commit = readInjected(true ? "4c5b30b1b0527ec5234c037893ba4fc24b88a8a0" : void 0) ?? "unknown";
30040
- const commitShort = readInjected(true ? "4c5b30b1" : void 0) ?? (commit !== "unknown" ? commit.slice(0, 7) : "unknown");
30041
- const version2 = readInjected(true ? "0.9.82-rc.363" : void 0) ?? readInjected(typeof process !== "undefined" ? process.env?.ADHDEV_PKG_VERSION : void 0) ?? "unknown";
30042
- const builtAt = readInjected(true ? "2026-06-23T16:14:01.927Z" : void 0);
30039
+ const commit = readInjected(true ? "1428e9d027beefe860a77f34dea34d202db80f00" : void 0) ?? "unknown";
30040
+ const commitShort = readInjected(true ? "1428e9d0" : void 0) ?? (commit !== "unknown" ? commit.slice(0, 7) : "unknown");
30041
+ const version2 = readInjected(true ? "0.9.82-rc.364" : void 0) ?? readInjected(typeof process !== "undefined" ? process.env?.ADHDEV_PKG_VERSION : void 0) ?? "unknown";
30042
+ const builtAt = readInjected(true ? "2026-06-24T00:06:20.085Z" : void 0);
30043
30043
  cached2 = builtAt ? { commit, commitShort, version: version2, builtAt } : { commit, commitShort, version: version2 };
30044
30044
  return cached2;
30045
30045
  }
@@ -64729,6 +64729,11 @@ ${body}
64729
64729
  lastWin32WriteAt = 0;
64730
64730
  /** Pending paced chunk-write timer for a large win32 body (see writeWin32Body). */
64731
64731
  win32WriteTimer = null;
64732
+ /** Timer driving the win32 verification-based modal-confirm CR resend loop (see
64733
+ * scheduleWin32ModalConfirm). A lone CR that confirms an approval/picker choice
64734
+ * is absorbed by ConPTY the same way a send_message submit CR is, so the confirm
64735
+ * must be resent until the modal actually resolves (status leaves 'approval'). */
64736
+ win32ModalConfirmTimer = null;
64732
64737
  currentEval = null;
64733
64738
  stateHistory = [];
64734
64739
  prevStateAt = 0;
@@ -64853,6 +64858,10 @@ ${body}
64853
64858
  clearTimeout(this.win32WriteTimer);
64854
64859
  this.win32WriteTimer = null;
64855
64860
  }
64861
+ if (this.win32ModalConfirmTimer) {
64862
+ clearTimeout(this.win32ModalConfirmTimer);
64863
+ this.win32ModalConfirmTimer = null;
64864
+ }
64856
64865
  this.specWatcher?.close();
64857
64866
  this.adapter.kill();
64858
64867
  }
@@ -65448,10 +65457,61 @@ ${body}
65448
65457
  const nav = step.repeat(Math.abs(delta));
65449
65458
  const confirm = (rule.key_for_index || "\r").replace(/\{index\}/g, "") || "\r";
65450
65459
  if (nav) this.adapter.send_keys(nav);
65451
- this.adapter.send_keys(confirm);
65460
+ this.submitModalConfirm(confirm);
65461
+ return;
65462
+ }
65463
+ this.submitModalConfirm(btn.key);
65464
+ }
65465
+ /**
65466
+ * Submit a modal-confirm key sequence (the choice key + its trailing CR).
65467
+ *
65468
+ * On win32 the trailing CR is the SAME lone-CR-swallow case as a send_message
65469
+ * submit: ConPTY can absorb a single CR as a literal newline instead of a
65470
+ * confirm, so the approval/picker modal never resolves and the FSM flaps
65471
+ * approval↔busy while auto-approve keeps firing into the void (APPROVESTUCK).
65472
+ * So we split any non-CR prefix (e.g. the "1" of "1\r") off, write it once, and
65473
+ * resend the CR on a fixed cadence until the modal actually resolves (status
65474
+ * leaves 'approval'). Non-win32 keeps the single direct write — its CR submits
65475
+ * on the first try.
65476
+ */
65477
+ submitModalConfirm(keys) {
65478
+ if (process.platform !== "win32") {
65479
+ this.adapter.send_keys(keys);
65452
65480
  return;
65453
65481
  }
65454
- this.adapter.send_keys(btn.key);
65482
+ const m = /^([\s\S]*?)([\r\n]+)$/.exec(keys);
65483
+ const prefix = m ? m[1] : keys;
65484
+ const cr = m ? m[2] : "";
65485
+ if (prefix) this.adapter.send_keys(prefix);
65486
+ if (!cr) return;
65487
+ this.scheduleWin32ModalConfirm(cr);
65488
+ }
65489
+ /**
65490
+ * win32 modal-confirm CR resend loop. Mirrors scheduleWin32Submit's phase-2
65491
+ * verified resend, but gated on still being IN a modal (status 'approval')
65492
+ * rather than still idle: the first CR fires immediately, then resends every
65493
+ * WIN32_SUBMIT_RESEND_GAP_MS while the FSM is still showing the modal, up to
65494
+ * WIN32_SUBMIT_MAX_RESENDS. The instant the modal resolves (status flips to
65495
+ * generating/idle) we stop, so no stray CR leaks into the next turn's composer.
65496
+ */
65497
+ scheduleWin32ModalConfirm(submitKey) {
65498
+ if (this.win32ModalConfirmTimer) {
65499
+ clearTimeout(this.win32ModalConfirmTimer);
65500
+ this.win32ModalConfirmTimer = null;
65501
+ }
65502
+ const fire = (attempt) => {
65503
+ this.win32ModalConfirmTimer = null;
65504
+ this.adapter.send_keys(submitKey);
65505
+ if (attempt + 1 >= WIN32_SUBMIT_MAX_RESENDS) return;
65506
+ this.win32ModalConfirmTimer = setTimeout(() => {
65507
+ if (this.currentStatus() !== "approval") {
65508
+ this.win32ModalConfirmTimer = null;
65509
+ return;
65510
+ }
65511
+ fire(attempt + 1);
65512
+ }, WIN32_SUBMIT_RESEND_GAP_MS);
65513
+ };
65514
+ fire(0);
65455
65515
  }
65456
65516
  handleAttachImage(blob, mime) {
65457
65517
  const ctl = (this.spec.control_bar ?? []).find((c) => c.action.type === "attach_image");