@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.js +40 -10
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +40 -10
- package/dist/index.mjs.map +1 -1
- package/dist/providers/spec/cli-adapter.d.ts +9 -0
- package/dist/providers/types/interactive-prompt.d.ts +17 -0
- package/package.json +2 -2
- package/src/providers/spec/cli-adapter.ts +30 -9
- package/src/providers/types/interactive-prompt.ts +36 -7
package/dist/index.js
CHANGED
|
@@ -275,10 +275,10 @@ function readInjected(value) {
|
|
|
275
275
|
}
|
|
276
276
|
function getDaemonBuildInfo() {
|
|
277
277
|
if (cached) return cached;
|
|
278
|
-
const commit = readInjected(true ? "
|
|
279
|
-
const commitShort = readInjected(true ? "
|
|
280
|
-
const version = readInjected(true ? "0.9.82-rc.
|
|
281
|
-
const builtAt = readInjected(true ? "2026-06-
|
|
278
|
+
const commit = readInjected(true ? "dc26917ced80beb84689897738b6edb82208c146" : void 0) ?? "unknown";
|
|
279
|
+
const commitShort = readInjected(true ? "dc26917c" : void 0) ?? (commit !== "unknown" ? commit.slice(0, 7) : "unknown");
|
|
280
|
+
const version = readInjected(true ? "0.9.82-rc.295" : void 0) ?? readInjected(typeof process !== "undefined" ? process.env?.ADHDEV_PKG_VERSION : void 0) ?? "unknown";
|
|
281
|
+
const builtAt = readInjected(true ? "2026-06-16T13:44:28.663Z" : void 0);
|
|
282
282
|
cached = builtAt ? { commit, commitShort, version, builtAt } : { commit, commitShort, version };
|
|
283
283
|
return cached;
|
|
284
284
|
}
|
|
@@ -15644,10 +15644,12 @@ function detectClaudeTuiMultiSelect(screenText) {
|
|
|
15644
15644
|
if (/Space to (?:select|toggle)|toggle selection|select multiple|select all that apply/i.test(screenText)) {
|
|
15645
15645
|
return true;
|
|
15646
15646
|
}
|
|
15647
|
-
const optionCheckbox =
|
|
15647
|
+
const optionCheckbox = `(?:\\[[ xX]\\]|[\u2610\u2612\u25FB\u25FC])`;
|
|
15648
|
+
const beforeNumber = new RegExp(`^\\s*(?:[\u276F\u203A>]\\s*)?${optionCheckbox}\\s*\\d+\\.\\s+\\S`);
|
|
15649
|
+
const afterNumber = new RegExp(`^\\s*(?:[\u276F\u203A>]\\s*)?\\d+\\.\\s*${optionCheckbox}\\s+\\S`);
|
|
15648
15650
|
for (const line of screenText.split(/\r?\n/)) {
|
|
15649
15651
|
if (line.includes("\u2714 Submit")) continue;
|
|
15650
|
-
if (
|
|
15652
|
+
if (beforeNumber.test(line) || afterNumber.test(line)) return true;
|
|
15651
15653
|
}
|
|
15652
15654
|
return false;
|
|
15653
15655
|
}
|
|
@@ -15787,6 +15789,16 @@ function parseClaudeInteractiveTuiQuestion(page, index) {
|
|
|
15787
15789
|
...allowFreeform ? { allowFreeform: true } : {}
|
|
15788
15790
|
};
|
|
15789
15791
|
}
|
|
15792
|
+
function readFocusedClaudeTuiQuestion(screenText) {
|
|
15793
|
+
if (!screenText.includes("Enter to select")) return null;
|
|
15794
|
+
const parsed = parseClaudeInteractiveTuiQuestion({ screenText }, 0);
|
|
15795
|
+
if (!parsed) return null;
|
|
15796
|
+
return {
|
|
15797
|
+
question: parsed.question,
|
|
15798
|
+
...parsed.header ? { header: parsed.header } : {},
|
|
15799
|
+
multiSelect: parsed.multiSelect
|
|
15800
|
+
};
|
|
15801
|
+
}
|
|
15790
15802
|
function detectClaudeAskUserQuestionPromptFromTuiPages(pages, options) {
|
|
15791
15803
|
if (pages.length === 0) return null;
|
|
15792
15804
|
const headers = claudeTuiQuestionHeaders(pages[0].screenText);
|
|
@@ -32204,12 +32216,20 @@ var SpecCliAdapter = class _SpecCliAdapter {
|
|
|
32204
32216
|
* question to multi-select and re-emit status. Promotion is one-way
|
|
32205
32217
|
* (false→true only) — once a question is known multi-select we never demote
|
|
32206
32218
|
* it, since the glyph column can scroll out of view on later frames.
|
|
32219
|
+
*
|
|
32220
|
+
* For MULTI-question prompts the per-page Tab capture is the actual source
|
|
32221
|
+
* of the bug: pages 2..N are snapshotted ~120ms after the Tab keypress,
|
|
32222
|
+
* before their option-row glyph column has redrawn, so those questions
|
|
32223
|
+
* freeze as single-select while page 1 (already settled) is correct. We
|
|
32224
|
+
* cannot upgrade blindly — the live snapshot shows only ONE focused page —
|
|
32225
|
+
* but we CAN read that page's question text/header and upgrade the matching
|
|
32226
|
+
* question. As the user navigates the picker (or it settles), each page is
|
|
32227
|
+
* eventually re-read and repaired.
|
|
32207
32228
|
*/
|
|
32208
32229
|
maybeUpgradeClaudeTuiMultiSelect() {
|
|
32209
32230
|
if (this.cliType !== "claude-cli" || this.interactivePromptTransport !== "tui" || !this.activeInteractivePrompt) return;
|
|
32210
32231
|
const questions = this.activeInteractivePrompt.questions;
|
|
32211
|
-
if (questions.
|
|
32212
|
-
if (questions[0].multiSelect) return;
|
|
32232
|
+
if (questions.every((q) => q.multiSelect)) return;
|
|
32213
32233
|
let screenText = "";
|
|
32214
32234
|
try {
|
|
32215
32235
|
screenText = this.driver.snapshot();
|
|
@@ -32217,8 +32237,18 @@ var SpecCliAdapter = class _SpecCliAdapter {
|
|
|
32217
32237
|
return;
|
|
32218
32238
|
}
|
|
32219
32239
|
if (!screenText.includes("Enter to select")) return;
|
|
32220
|
-
if (
|
|
32221
|
-
|
|
32240
|
+
if (questions.length === 1) {
|
|
32241
|
+
if (questions[0].multiSelect) return;
|
|
32242
|
+
if (!detectClaudeTuiMultiSelect(screenText)) return;
|
|
32243
|
+
questions[0].multiSelect = true;
|
|
32244
|
+
this.statusCallback?.();
|
|
32245
|
+
return;
|
|
32246
|
+
}
|
|
32247
|
+
const focused = readFocusedClaudeTuiQuestion(screenText);
|
|
32248
|
+
if (!focused || !focused.multiSelect) return;
|
|
32249
|
+
const match = questions.find((q) => focused.header && q.header && q.header === focused.header || q.question === focused.question);
|
|
32250
|
+
if (!match || match.multiSelect) return;
|
|
32251
|
+
match.multiSelect = true;
|
|
32222
32252
|
this.statusCallback?.();
|
|
32223
32253
|
}
|
|
32224
32254
|
readClaudeTuiHeaders(screenText) {
|