@adhdev/daemon-standalone 1.0.58-rc.55 → 1.0.58-rc.56

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
@@ -36911,10 +36911,10 @@ var require_dist3 = __commonJS({
36911
36911
  }
36912
36912
  function getDaemonBuildInfo() {
36913
36913
  if (cached2) return cached2;
36914
- const commit = readInjected(true ? "f6e2e8552cb27f341450b69d2f6c5c0bdc511003" : void 0) ?? "unknown";
36915
- const commitShort = readInjected(true ? "f6e2e855" : void 0) ?? (commit !== "unknown" ? commit.slice(0, 7) : "unknown");
36916
- const version2 = readInjected(true ? "1.0.58-rc.55" : void 0) ?? readInjected(typeof process !== "undefined" ? process.env?.ADHDEV_PKG_VERSION : void 0) ?? "unknown";
36917
- const builtAt = readInjected(true ? "2026-08-31T13:05:59.798Z" : void 0);
36914
+ const commit = readInjected(true ? "43f93dcf63e5cbf8071a6823ef9bf15cd26da0ee" : void 0) ?? "unknown";
36915
+ const commitShort = readInjected(true ? "43f93dcf" : void 0) ?? (commit !== "unknown" ? commit.slice(0, 7) : "unknown");
36916
+ const version2 = readInjected(true ? "1.0.58-rc.56" : void 0) ?? readInjected(typeof process !== "undefined" ? process.env?.ADHDEV_PKG_VERSION : void 0) ?? "unknown";
36917
+ const builtAt = readInjected(true ? "2026-09-01T08:32:25.689Z" : void 0);
36918
36918
  cached2 = builtAt ? { commit, commitShort, version: version2, builtAt } : { commit, commitShort, version: version2 };
36919
36919
  return cached2;
36920
36920
  }
@@ -124042,24 +124042,30 @@ ${text}` : text;
124042
124042
  }
124043
124043
  if (this.interactivePromptTransport === "tui") {
124044
124044
  const allowsFreeform = prompt.questions.some((q) => q.allowFreeform);
124045
- for (const question of prompt.questions) {
124045
+ let completedWithoutReview = false;
124046
+ questionLoop: for (const question of prompt.questions) {
124046
124047
  const questionSteps = buildClaudeInteractiveTuiAnswerSteps({
124047
124048
  ...prompt,
124048
124049
  questions: [question]
124049
124050
  }, response).slice(0, -1);
124050
124051
  for (const step of questionSteps) {
124051
- this.assertFocusedClaudeTuiQuestion(question);
124052
+ if (this.assertFocusedClaudeTuiQuestion(question, prompt) === "completed") {
124053
+ completedWithoutReview = true;
124054
+ break questionLoop;
124055
+ }
124052
124056
  this.driver.dispatch({ kind: "pty_write", data: step });
124053
124057
  await new Promise((resolve32) => setTimeout(resolve32, 180));
124054
124058
  }
124055
124059
  }
124056
- await this.assertFocusedClaudeTuiReview(prompt, allowsFreeform);
124057
- if (!this.activeInteractivePrompt) return;
124058
- if (this.activeInteractivePrompt.promptId !== prompt.promptId) {
124059
- throw new Error("Claude TUI active interactive prompt changed before review submission");
124060
+ if (!completedWithoutReview) {
124061
+ await this.assertFocusedClaudeTuiReview(prompt, allowsFreeform);
124062
+ if (!this.activeInteractivePrompt) return;
124063
+ if (this.activeInteractivePrompt.promptId !== prompt.promptId) {
124064
+ throw new Error("Claude TUI active interactive prompt changed before review submission");
124065
+ }
124066
+ this.driver.dispatch({ kind: "pty_write", data: "\r" });
124067
+ await new Promise((resolve32) => setTimeout(resolve32, 180));
124060
124068
  }
124061
- this.driver.dispatch({ kind: "pty_write", data: "\r" });
124062
- await new Promise((resolve32) => setTimeout(resolve32, 180));
124063
124069
  } else {
124064
124070
  this.driver.dispatch({ kind: "pty_write", data: `${buildClaudeInteractiveToolResult(response)}
124065
124071
  ` });
@@ -124817,12 +124823,17 @@ ${text}` : text;
124817
124823
  throw new Error(`Cannot verify the focused Claude TUI question before answering: ${error48?.message || error48}`);
124818
124824
  }
124819
124825
  }
124820
- assertFocusedClaudeTuiQuestion(expected) {
124826
+ assertFocusedClaudeTuiQuestion(expected, prompt) {
124821
124827
  const screenText = this.readClaudeTuiSnapshotForAnswer();
124822
124828
  const focused = readFocusedClaudeTuiQuestion(screenText);
124823
- if (focused && this.claudeTuiQuestionMatches(expected, focused)) return;
124824
- const observed = focused?.question ? `; focused question is "${focused.question}"` : "";
124825
- throw new Error(`Claude TUI focused question does not match the active interactive prompt (expected "${expected.question}"${observed})`);
124829
+ if (focused) {
124830
+ if (this.claudeTuiQuestionMatches(expected, focused)) return "focused";
124831
+ throw new Error(`Claude TUI focused question does not match the active interactive prompt (expected "${expected.question}"; focused question is "${focused.question}")`);
124832
+ }
124833
+ const resolvedByBoundToolResult = this.hasBoundClaudeAskUserQuestionToolResult(prompt);
124834
+ const resolvedByBusyAdvance = this.latestState?.status === "generating";
124835
+ if (resolvedByBoundToolResult || resolvedByBusyAdvance) return "completed";
124836
+ throw new Error(`Claude TUI focused question does not match the active interactive prompt (expected "${expected.question}")`);
124826
124837
  }
124827
124838
  /**
124828
124839
  * Wait for the review page to actually be on screen before the final Enter.