@adhdev/daemon-standalone 0.9.82-rc.295 → 0.9.82-rc.297
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 +46 -10
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -29983,10 +29983,10 @@ var require_dist3 = __commonJS({
|
|
|
29983
29983
|
}
|
|
29984
29984
|
function getDaemonBuildInfo() {
|
|
29985
29985
|
if (cached2) return cached2;
|
|
29986
|
-
const commit = readInjected(true ? "
|
|
29987
|
-
const commitShort = readInjected(true ? "
|
|
29988
|
-
const version2 = readInjected(true ? "0.9.82-rc.
|
|
29989
|
-
const builtAt = readInjected(true ? "2026-06-
|
|
29986
|
+
const commit = readInjected(true ? "5f22e3d153ae396b06c67b4eb88a98c7461a28d8" : void 0) ?? "unknown";
|
|
29987
|
+
const commitShort = readInjected(true ? "5f22e3d1" : void 0) ?? (commit !== "unknown" ? commit.slice(0, 7) : "unknown");
|
|
29988
|
+
const version2 = readInjected(true ? "0.9.82-rc.297" : void 0) ?? readInjected(typeof process !== "undefined" ? process.env?.ADHDEV_PKG_VERSION : void 0) ?? "unknown";
|
|
29989
|
+
const builtAt = readInjected(true ? "2026-06-16T16:24:13.401Z" : void 0);
|
|
29990
29990
|
cached2 = builtAt ? { commit, commitShort, version: version2, builtAt } : { commit, commitShort, version: version2 };
|
|
29991
29991
|
return cached2;
|
|
29992
29992
|
}
|
|
@@ -45589,7 +45589,8 @@ ${lastSnapshot}`;
|
|
|
45589
45589
|
const answer = response.answers[question.questionId];
|
|
45590
45590
|
if (!answer) throw new Error(`Missing answer for ${question.questionId}`);
|
|
45591
45591
|
const freeformText = answer.freeformText?.trim() ?? "";
|
|
45592
|
-
|
|
45592
|
+
const treatAsMultiSelect = question.multiSelect || answer.selectedLabels.length > 1;
|
|
45593
|
+
if (treatAsMultiSelect) {
|
|
45593
45594
|
const labels = answer.selectedLabels;
|
|
45594
45595
|
if (labels.length === 0) {
|
|
45595
45596
|
throw new Error(`Expected at least one selected label for ${question.questionId}`);
|
|
@@ -45598,9 +45599,8 @@ ${lastSnapshot}`;
|
|
|
45598
45599
|
const selectedIndex = question.options.findIndex((option) => option.label === label);
|
|
45599
45600
|
if (selectedIndex < 0) throw new Error(`Unknown option for ${question.questionId}: ${label}`);
|
|
45600
45601
|
steps.push(String(selectedIndex + 1));
|
|
45601
|
-
steps.push(" ");
|
|
45602
45602
|
}
|
|
45603
|
-
steps.push("
|
|
45603
|
+
steps.push(" ");
|
|
45604
45604
|
} else if (freeformText) {
|
|
45605
45605
|
const typeOptionIndex = question.options.findIndex((o) => /^Type something\.?$/i.test(o.label));
|
|
45606
45606
|
const optionNumber = typeOptionIndex >= 0 ? typeOptionIndex + 1 : question.options.length;
|
|
@@ -61748,6 +61748,15 @@ ${formatManifestValidationIssues2(validation.issues)}`,
|
|
|
61748
61748
|
* spirit as the approval FSM's `approvalCooldown` modal-lost hysteresis.
|
|
61749
61749
|
*/
|
|
61750
61750
|
static INTERACTIVE_PROMPT_LOST_GRACE_MS = 1500;
|
|
61751
|
+
/**
|
|
61752
|
+
* Multi-question TUI capture: after Tabbing to a page, re-snapshot at this
|
|
61753
|
+
* interval until its checkbox glyph column has settled, up to the timeout.
|
|
61754
|
+
* The interval matches the legacy single fixed wait (120ms); the timeout
|
|
61755
|
+
* bounds total capture time so a single-select page (which never shows
|
|
61756
|
+
* glyphs) doesn't stall the capture indefinitely.
|
|
61757
|
+
*/
|
|
61758
|
+
static CLAUDE_TUI_PAGE_POLL_INTERVAL_MS = 120;
|
|
61759
|
+
static CLAUDE_TUI_PAGE_SETTLE_TIMEOUT_MS = 600;
|
|
61751
61760
|
/**
|
|
61752
61761
|
* Clear a held interactive prompt once the user has resolved it directly
|
|
61753
61762
|
* in the terminal (the choice picker leaves the screen without going
|
|
@@ -61860,16 +61869,43 @@ ${formatManifestValidationIssues2(validation.issues)}`,
|
|
|
61860
61869
|
}
|
|
61861
61870
|
return headers;
|
|
61862
61871
|
}
|
|
61872
|
+
/**
|
|
61873
|
+
* Snapshot the currently-focused claude TUI page, polling until its
|
|
61874
|
+
* option-row checkbox glyph column has settled (or a bounded timeout).
|
|
61875
|
+
*
|
|
61876
|
+
* Why poll: right after a Tab keypress the newly-focused page's glyph
|
|
61877
|
+
* column has not redrawn yet, so an immediate snapshot shows the question +
|
|
61878
|
+
* option labels but NO per-option checkbox markers — freezing that page as
|
|
61879
|
+
* single-select. A fixed delay either races (too short) or is wasteful (too
|
|
61880
|
+
* long). Instead we re-snapshot at a fixed interval and stop as soon as the
|
|
61881
|
+
* frame shows multi-select glyphs, falling back to the last frame at the
|
|
61882
|
+
* timeout. Single-select pages never show glyphs, so they always poll to the
|
|
61883
|
+
* timeout — bounded small to keep capture snappy.
|
|
61884
|
+
*/
|
|
61885
|
+
async snapshotSettledClaudeTuiPage() {
|
|
61886
|
+
let screenText = this.driver.snapshot();
|
|
61887
|
+
const deadline = Date.now() + _SpecCliAdapter.CLAUDE_TUI_PAGE_SETTLE_TIMEOUT_MS;
|
|
61888
|
+
while (!detectClaudeTuiMultiSelect(screenText) && Date.now() < deadline) {
|
|
61889
|
+
await new Promise((resolve24) => setTimeout(resolve24, _SpecCliAdapter.CLAUDE_TUI_PAGE_POLL_INTERVAL_MS));
|
|
61890
|
+
screenText = this.driver.snapshot();
|
|
61891
|
+
}
|
|
61892
|
+
return screenText;
|
|
61893
|
+
}
|
|
61863
61894
|
async captureClaudeTuiPrompt(firstScreen, headers) {
|
|
61864
61895
|
const pages = [{ screenText: firstScreen, header: headers[0] }];
|
|
61865
61896
|
for (let index = 1; index < headers.length; index += 1) {
|
|
61866
61897
|
this.driver.dispatch({ kind: "pty_write", data: " " });
|
|
61867
|
-
await new Promise((resolve24) => setTimeout(resolve24,
|
|
61868
|
-
pages.push({ screenText: this.
|
|
61898
|
+
await new Promise((resolve24) => setTimeout(resolve24, _SpecCliAdapter.CLAUDE_TUI_PAGE_POLL_INTERVAL_MS));
|
|
61899
|
+
pages.push({ screenText: await this.snapshotSettledClaudeTuiPage(), header: headers[index] });
|
|
61869
61900
|
}
|
|
61870
61901
|
for (let index = headers.length - 1; index > 0; index -= 1) {
|
|
61871
61902
|
this.driver.dispatch({ kind: "pty_write", data: "\x1B[Z" });
|
|
61872
|
-
await new Promise((resolve24) => setTimeout(resolve24,
|
|
61903
|
+
await new Promise((resolve24) => setTimeout(resolve24, _SpecCliAdapter.CLAUDE_TUI_PAGE_POLL_INTERVAL_MS));
|
|
61904
|
+
const reread = await this.snapshotSettledClaudeTuiPage();
|
|
61905
|
+
const landed = pages[index - 1];
|
|
61906
|
+
if (landed && !detectClaudeTuiMultiSelect(landed.screenText) && detectClaudeTuiMultiSelect(reread)) {
|
|
61907
|
+
landed.screenText = reread;
|
|
61908
|
+
}
|
|
61873
61909
|
}
|
|
61874
61910
|
const prompt = detectClaudeAskUserQuestionPromptFromTuiPages(pages, {
|
|
61875
61911
|
promptId: `ask-user-${this.providerSessionId || "claude"}-${Date.now()}`,
|