@adhdev/daemon-core 0.9.82-rc.294 → 0.9.82-rc.295

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.mjs CHANGED
@@ -270,10 +270,10 @@ function readInjected(value) {
270
270
  }
271
271
  function getDaemonBuildInfo() {
272
272
  if (cached) return cached;
273
- const commit = readInjected(true ? "6ee0e52b0b7347870577ebe598054d87127078fe" : void 0) ?? "unknown";
274
- const commitShort = readInjected(true ? "6ee0e52b" : void 0) ?? (commit !== "unknown" ? commit.slice(0, 7) : "unknown");
275
- const version = readInjected(true ? "0.9.82-rc.294" : void 0) ?? readInjected(typeof process !== "undefined" ? process.env?.ADHDEV_PKG_VERSION : void 0) ?? "unknown";
276
- const builtAt = readInjected(true ? "2026-06-16T12:15:42.290Z" : void 0);
273
+ const commit = readInjected(true ? "dc26917ced80beb84689897738b6edb82208c146" : void 0) ?? "unknown";
274
+ const commitShort = readInjected(true ? "dc26917c" : void 0) ?? (commit !== "unknown" ? commit.slice(0, 7) : "unknown");
275
+ const version = readInjected(true ? "0.9.82-rc.295" : void 0) ?? readInjected(typeof process !== "undefined" ? process.env?.ADHDEV_PKG_VERSION : void 0) ?? "unknown";
276
+ const builtAt = readInjected(true ? "2026-06-16T13:44:28.663Z" : void 0);
277
277
  cached = builtAt ? { commit, commitShort, version, builtAt } : { commit, commitShort, version };
278
278
  return cached;
279
279
  }
@@ -15303,10 +15303,12 @@ function detectClaudeTuiMultiSelect(screenText) {
15303
15303
  if (/Space to (?:select|toggle)|toggle selection|select multiple|select all that apply/i.test(screenText)) {
15304
15304
  return true;
15305
15305
  }
15306
- const optionCheckbox = /^\s*(?:[❯›>]\s*)?(?:\[[ xX]\]|[☐☒◻◼])\s*\d+\.\s+\S/;
15306
+ const optionCheckbox = `(?:\\[[ xX]\\]|[\u2610\u2612\u25FB\u25FC])`;
15307
+ const beforeNumber = new RegExp(`^\\s*(?:[\u276F\u203A>]\\s*)?${optionCheckbox}\\s*\\d+\\.\\s+\\S`);
15308
+ const afterNumber = new RegExp(`^\\s*(?:[\u276F\u203A>]\\s*)?\\d+\\.\\s*${optionCheckbox}\\s+\\S`);
15307
15309
  for (const line of screenText.split(/\r?\n/)) {
15308
15310
  if (line.includes("\u2714 Submit")) continue;
15309
- if (optionCheckbox.test(line)) return true;
15311
+ if (beforeNumber.test(line) || afterNumber.test(line)) return true;
15310
15312
  }
15311
15313
  return false;
15312
15314
  }
@@ -15446,6 +15448,16 @@ function parseClaudeInteractiveTuiQuestion(page, index) {
15446
15448
  ...allowFreeform ? { allowFreeform: true } : {}
15447
15449
  };
15448
15450
  }
15451
+ function readFocusedClaudeTuiQuestion(screenText) {
15452
+ if (!screenText.includes("Enter to select")) return null;
15453
+ const parsed = parseClaudeInteractiveTuiQuestion({ screenText }, 0);
15454
+ if (!parsed) return null;
15455
+ return {
15456
+ question: parsed.question,
15457
+ ...parsed.header ? { header: parsed.header } : {},
15458
+ multiSelect: parsed.multiSelect
15459
+ };
15460
+ }
15449
15461
  function detectClaudeAskUserQuestionPromptFromTuiPages(pages, options) {
15450
15462
  if (pages.length === 0) return null;
15451
15463
  const headers = claudeTuiQuestionHeaders(pages[0].screenText);
@@ -31863,12 +31875,20 @@ var SpecCliAdapter = class _SpecCliAdapter {
31863
31875
  * question to multi-select and re-emit status. Promotion is one-way
31864
31876
  * (false→true only) — once a question is known multi-select we never demote
31865
31877
  * it, since the glyph column can scroll out of view on later frames.
31878
+ *
31879
+ * For MULTI-question prompts the per-page Tab capture is the actual source
31880
+ * of the bug: pages 2..N are snapshotted ~120ms after the Tab keypress,
31881
+ * before their option-row glyph column has redrawn, so those questions
31882
+ * freeze as single-select while page 1 (already settled) is correct. We
31883
+ * cannot upgrade blindly — the live snapshot shows only ONE focused page —
31884
+ * but we CAN read that page's question text/header and upgrade the matching
31885
+ * question. As the user navigates the picker (or it settles), each page is
31886
+ * eventually re-read and repaired.
31866
31887
  */
31867
31888
  maybeUpgradeClaudeTuiMultiSelect() {
31868
31889
  if (this.cliType !== "claude-cli" || this.interactivePromptTransport !== "tui" || !this.activeInteractivePrompt) return;
31869
31890
  const questions = this.activeInteractivePrompt.questions;
31870
- if (questions.length !== 1) return;
31871
- if (questions[0].multiSelect) return;
31891
+ if (questions.every((q) => q.multiSelect)) return;
31872
31892
  let screenText = "";
31873
31893
  try {
31874
31894
  screenText = this.driver.snapshot();
@@ -31876,8 +31896,18 @@ var SpecCliAdapter = class _SpecCliAdapter {
31876
31896
  return;
31877
31897
  }
31878
31898
  if (!screenText.includes("Enter to select")) return;
31879
- if (!detectClaudeTuiMultiSelect(screenText)) return;
31880
- questions[0].multiSelect = true;
31899
+ if (questions.length === 1) {
31900
+ if (questions[0].multiSelect) return;
31901
+ if (!detectClaudeTuiMultiSelect(screenText)) return;
31902
+ questions[0].multiSelect = true;
31903
+ this.statusCallback?.();
31904
+ return;
31905
+ }
31906
+ const focused = readFocusedClaudeTuiQuestion(screenText);
31907
+ if (!focused || !focused.multiSelect) return;
31908
+ const match = questions.find((q) => focused.header && q.header && q.header === focused.header || q.question === focused.question);
31909
+ if (!match || match.multiSelect) return;
31910
+ match.multiSelect = true;
31881
31911
  this.statusCallback?.();
31882
31912
  }
31883
31913
  readClaudeTuiHeaders(screenText) {