@adhdev/daemon-standalone 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.js +45 -8
- 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 ? "473dc8f049daf72ff7977b90e35ddde4e54f1c2f" : void 0) ?? "unknown";
|
|
29987
|
+
const commitShort = readInjected(true ? "473dc8f0" : void 0) ?? (commit !== "unknown" ? commit.slice(0, 7) : "unknown");
|
|
29988
|
+
const version2 = readInjected(true ? "0.9.82-rc.296" : void 0) ?? readInjected(typeof process !== "undefined" ? process.env?.ADHDEV_PKG_VERSION : void 0) ?? "unknown";
|
|
29989
|
+
const builtAt = readInjected(true ? "2026-06-16T14:24:57.627Z" : 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}`);
|
|
@@ -61748,6 +61749,15 @@ ${formatManifestValidationIssues2(validation.issues)}`,
|
|
|
61748
61749
|
* spirit as the approval FSM's `approvalCooldown` modal-lost hysteresis.
|
|
61749
61750
|
*/
|
|
61750
61751
|
static INTERACTIVE_PROMPT_LOST_GRACE_MS = 1500;
|
|
61752
|
+
/**
|
|
61753
|
+
* Multi-question TUI capture: after Tabbing to a page, re-snapshot at this
|
|
61754
|
+
* interval until its checkbox glyph column has settled, up to the timeout.
|
|
61755
|
+
* The interval matches the legacy single fixed wait (120ms); the timeout
|
|
61756
|
+
* bounds total capture time so a single-select page (which never shows
|
|
61757
|
+
* glyphs) doesn't stall the capture indefinitely.
|
|
61758
|
+
*/
|
|
61759
|
+
static CLAUDE_TUI_PAGE_POLL_INTERVAL_MS = 120;
|
|
61760
|
+
static CLAUDE_TUI_PAGE_SETTLE_TIMEOUT_MS = 600;
|
|
61751
61761
|
/**
|
|
61752
61762
|
* Clear a held interactive prompt once the user has resolved it directly
|
|
61753
61763
|
* in the terminal (the choice picker leaves the screen without going
|
|
@@ -61860,16 +61870,43 @@ ${formatManifestValidationIssues2(validation.issues)}`,
|
|
|
61860
61870
|
}
|
|
61861
61871
|
return headers;
|
|
61862
61872
|
}
|
|
61873
|
+
/**
|
|
61874
|
+
* Snapshot the currently-focused claude TUI page, polling until its
|
|
61875
|
+
* option-row checkbox glyph column has settled (or a bounded timeout).
|
|
61876
|
+
*
|
|
61877
|
+
* Why poll: right after a Tab keypress the newly-focused page's glyph
|
|
61878
|
+
* column has not redrawn yet, so an immediate snapshot shows the question +
|
|
61879
|
+
* option labels but NO per-option checkbox markers — freezing that page as
|
|
61880
|
+
* single-select. A fixed delay either races (too short) or is wasteful (too
|
|
61881
|
+
* long). Instead we re-snapshot at a fixed interval and stop as soon as the
|
|
61882
|
+
* frame shows multi-select glyphs, falling back to the last frame at the
|
|
61883
|
+
* timeout. Single-select pages never show glyphs, so they always poll to the
|
|
61884
|
+
* timeout — bounded small to keep capture snappy.
|
|
61885
|
+
*/
|
|
61886
|
+
async snapshotSettledClaudeTuiPage() {
|
|
61887
|
+
let screenText = this.driver.snapshot();
|
|
61888
|
+
const deadline = Date.now() + _SpecCliAdapter.CLAUDE_TUI_PAGE_SETTLE_TIMEOUT_MS;
|
|
61889
|
+
while (!detectClaudeTuiMultiSelect(screenText) && Date.now() < deadline) {
|
|
61890
|
+
await new Promise((resolve24) => setTimeout(resolve24, _SpecCliAdapter.CLAUDE_TUI_PAGE_POLL_INTERVAL_MS));
|
|
61891
|
+
screenText = this.driver.snapshot();
|
|
61892
|
+
}
|
|
61893
|
+
return screenText;
|
|
61894
|
+
}
|
|
61863
61895
|
async captureClaudeTuiPrompt(firstScreen, headers) {
|
|
61864
61896
|
const pages = [{ screenText: firstScreen, header: headers[0] }];
|
|
61865
61897
|
for (let index = 1; index < headers.length; index += 1) {
|
|
61866
61898
|
this.driver.dispatch({ kind: "pty_write", data: " " });
|
|
61867
|
-
await new Promise((resolve24) => setTimeout(resolve24,
|
|
61868
|
-
pages.push({ screenText: this.
|
|
61899
|
+
await new Promise((resolve24) => setTimeout(resolve24, _SpecCliAdapter.CLAUDE_TUI_PAGE_POLL_INTERVAL_MS));
|
|
61900
|
+
pages.push({ screenText: await this.snapshotSettledClaudeTuiPage(), header: headers[index] });
|
|
61869
61901
|
}
|
|
61870
61902
|
for (let index = headers.length - 1; index > 0; index -= 1) {
|
|
61871
61903
|
this.driver.dispatch({ kind: "pty_write", data: "\x1B[Z" });
|
|
61872
|
-
await new Promise((resolve24) => setTimeout(resolve24,
|
|
61904
|
+
await new Promise((resolve24) => setTimeout(resolve24, _SpecCliAdapter.CLAUDE_TUI_PAGE_POLL_INTERVAL_MS));
|
|
61905
|
+
const reread = await this.snapshotSettledClaudeTuiPage();
|
|
61906
|
+
const landed = pages[index - 1];
|
|
61907
|
+
if (landed && !detectClaudeTuiMultiSelect(landed.screenText) && detectClaudeTuiMultiSelect(reread)) {
|
|
61908
|
+
landed.screenText = reread;
|
|
61909
|
+
}
|
|
61873
61910
|
}
|
|
61874
61911
|
const prompt = detectClaudeAskUserQuestionPromptFromTuiPages(pages, {
|
|
61875
61912
|
promptId: `ask-user-${this.providerSessionId || "claude"}-${Date.now()}`,
|