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

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 ? "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);
273
+ const commit = readInjected(true ? "473dc8f049daf72ff7977b90e35ddde4e54f1c2f" : void 0) ?? "unknown";
274
+ const commitShort = readInjected(true ? "473dc8f0" : void 0) ?? (commit !== "unknown" ? commit.slice(0, 7) : "unknown");
275
+ const version = readInjected(true ? "0.9.82-rc.296" : void 0) ?? readInjected(typeof process !== "undefined" ? process.env?.ADHDEV_PKG_VERSION : void 0) ?? "unknown";
276
+ const builtAt = readInjected(true ? "2026-06-16T14:24:31.127Z" : void 0);
277
277
  cached = builtAt ? { commit, commitShort, version, builtAt } : { commit, commitShort, version };
278
278
  return cached;
279
279
  }
@@ -15481,7 +15481,8 @@ function buildClaudeInteractiveTuiAnswerSteps(prompt, response) {
15481
15481
  const answer = response.answers[question.questionId];
15482
15482
  if (!answer) throw new Error(`Missing answer for ${question.questionId}`);
15483
15483
  const freeformText = answer.freeformText?.trim() ?? "";
15484
- if (question.multiSelect) {
15484
+ const treatAsMultiSelect = question.multiSelect || answer.selectedLabels.length > 1;
15485
+ if (treatAsMultiSelect) {
15485
15486
  const labels = answer.selectedLabels;
15486
15487
  if (labels.length === 0) {
15487
15488
  throw new Error(`Expected at least one selected label for ${question.questionId}`);
@@ -31808,6 +31809,15 @@ var SpecCliAdapter = class _SpecCliAdapter {
31808
31809
  * spirit as the approval FSM's `approvalCooldown` modal-lost hysteresis.
31809
31810
  */
31810
31811
  static INTERACTIVE_PROMPT_LOST_GRACE_MS = 1500;
31812
+ /**
31813
+ * Multi-question TUI capture: after Tabbing to a page, re-snapshot at this
31814
+ * interval until its checkbox glyph column has settled, up to the timeout.
31815
+ * The interval matches the legacy single fixed wait (120ms); the timeout
31816
+ * bounds total capture time so a single-select page (which never shows
31817
+ * glyphs) doesn't stall the capture indefinitely.
31818
+ */
31819
+ static CLAUDE_TUI_PAGE_POLL_INTERVAL_MS = 120;
31820
+ static CLAUDE_TUI_PAGE_SETTLE_TIMEOUT_MS = 600;
31811
31821
  /**
31812
31822
  * Clear a held interactive prompt once the user has resolved it directly
31813
31823
  * in the terminal (the choice picker leaves the screen without going
@@ -31920,16 +31930,43 @@ var SpecCliAdapter = class _SpecCliAdapter {
31920
31930
  }
31921
31931
  return headers;
31922
31932
  }
31933
+ /**
31934
+ * Snapshot the currently-focused claude TUI page, polling until its
31935
+ * option-row checkbox glyph column has settled (or a bounded timeout).
31936
+ *
31937
+ * Why poll: right after a Tab keypress the newly-focused page's glyph
31938
+ * column has not redrawn yet, so an immediate snapshot shows the question +
31939
+ * option labels but NO per-option checkbox markers — freezing that page as
31940
+ * single-select. A fixed delay either races (too short) or is wasteful (too
31941
+ * long). Instead we re-snapshot at a fixed interval and stop as soon as the
31942
+ * frame shows multi-select glyphs, falling back to the last frame at the
31943
+ * timeout. Single-select pages never show glyphs, so they always poll to the
31944
+ * timeout — bounded small to keep capture snappy.
31945
+ */
31946
+ async snapshotSettledClaudeTuiPage() {
31947
+ let screenText = this.driver.snapshot();
31948
+ const deadline = Date.now() + _SpecCliAdapter.CLAUDE_TUI_PAGE_SETTLE_TIMEOUT_MS;
31949
+ while (!detectClaudeTuiMultiSelect(screenText) && Date.now() < deadline) {
31950
+ await new Promise((resolve24) => setTimeout(resolve24, _SpecCliAdapter.CLAUDE_TUI_PAGE_POLL_INTERVAL_MS));
31951
+ screenText = this.driver.snapshot();
31952
+ }
31953
+ return screenText;
31954
+ }
31923
31955
  async captureClaudeTuiPrompt(firstScreen, headers) {
31924
31956
  const pages = [{ screenText: firstScreen, header: headers[0] }];
31925
31957
  for (let index = 1; index < headers.length; index += 1) {
31926
31958
  this.driver.dispatch({ kind: "pty_write", data: " " });
31927
- await new Promise((resolve24) => setTimeout(resolve24, 120));
31928
- pages.push({ screenText: this.driver.snapshot(), header: headers[index] });
31959
+ await new Promise((resolve24) => setTimeout(resolve24, _SpecCliAdapter.CLAUDE_TUI_PAGE_POLL_INTERVAL_MS));
31960
+ pages.push({ screenText: await this.snapshotSettledClaudeTuiPage(), header: headers[index] });
31929
31961
  }
31930
31962
  for (let index = headers.length - 1; index > 0; index -= 1) {
31931
31963
  this.driver.dispatch({ kind: "pty_write", data: "\x1B[Z" });
31932
- await new Promise((resolve24) => setTimeout(resolve24, 80));
31964
+ await new Promise((resolve24) => setTimeout(resolve24, _SpecCliAdapter.CLAUDE_TUI_PAGE_POLL_INTERVAL_MS));
31965
+ const reread = await this.snapshotSettledClaudeTuiPage();
31966
+ const landed = pages[index - 1];
31967
+ if (landed && !detectClaudeTuiMultiSelect(landed.screenText) && detectClaudeTuiMultiSelect(reread)) {
31968
+ landed.screenText = reread;
31969
+ }
31933
31970
  }
31934
31971
  const prompt = detectClaudeAskUserQuestionPromptFromTuiPages(pages, {
31935
31972
  promptId: `ask-user-${this.providerSessionId || "claude"}-${Date.now()}`,