@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.js +45 -8
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +45 -8
- package/dist/index.mjs.map +1 -1
- package/dist/providers/spec/cli-adapter.d.ts +23 -0
- package/package.json +2 -2
- package/src/providers/spec/cli-adapter.ts +50 -3
- package/src/providers/types/interactive-prompt.ts +12 -1
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 ? "473dc8f049daf72ff7977b90e35ddde4e54f1c2f" : void 0) ?? "unknown";
|
|
279
|
+
const commitShort = readInjected(true ? "473dc8f0" : void 0) ?? (commit !== "unknown" ? commit.slice(0, 7) : "unknown");
|
|
280
|
+
const version = readInjected(true ? "0.9.82-rc.296" : void 0) ?? readInjected(typeof process !== "undefined" ? process.env?.ADHDEV_PKG_VERSION : void 0) ?? "unknown";
|
|
281
|
+
const builtAt = readInjected(true ? "2026-06-16T14:24:31.127Z" : void 0);
|
|
282
282
|
cached = builtAt ? { commit, commitShort, version, builtAt } : { commit, commitShort, version };
|
|
283
283
|
return cached;
|
|
284
284
|
}
|
|
@@ -15822,7 +15822,8 @@ function buildClaudeInteractiveTuiAnswerSteps(prompt, response) {
|
|
|
15822
15822
|
const answer = response.answers[question.questionId];
|
|
15823
15823
|
if (!answer) throw new Error(`Missing answer for ${question.questionId}`);
|
|
15824
15824
|
const freeformText = answer.freeformText?.trim() ?? "";
|
|
15825
|
-
|
|
15825
|
+
const treatAsMultiSelect = question.multiSelect || answer.selectedLabels.length > 1;
|
|
15826
|
+
if (treatAsMultiSelect) {
|
|
15826
15827
|
const labels = answer.selectedLabels;
|
|
15827
15828
|
if (labels.length === 0) {
|
|
15828
15829
|
throw new Error(`Expected at least one selected label for ${question.questionId}`);
|
|
@@ -32149,6 +32150,15 @@ var SpecCliAdapter = class _SpecCliAdapter {
|
|
|
32149
32150
|
* spirit as the approval FSM's `approvalCooldown` modal-lost hysteresis.
|
|
32150
32151
|
*/
|
|
32151
32152
|
static INTERACTIVE_PROMPT_LOST_GRACE_MS = 1500;
|
|
32153
|
+
/**
|
|
32154
|
+
* Multi-question TUI capture: after Tabbing to a page, re-snapshot at this
|
|
32155
|
+
* interval until its checkbox glyph column has settled, up to the timeout.
|
|
32156
|
+
* The interval matches the legacy single fixed wait (120ms); the timeout
|
|
32157
|
+
* bounds total capture time so a single-select page (which never shows
|
|
32158
|
+
* glyphs) doesn't stall the capture indefinitely.
|
|
32159
|
+
*/
|
|
32160
|
+
static CLAUDE_TUI_PAGE_POLL_INTERVAL_MS = 120;
|
|
32161
|
+
static CLAUDE_TUI_PAGE_SETTLE_TIMEOUT_MS = 600;
|
|
32152
32162
|
/**
|
|
32153
32163
|
* Clear a held interactive prompt once the user has resolved it directly
|
|
32154
32164
|
* in the terminal (the choice picker leaves the screen without going
|
|
@@ -32261,16 +32271,43 @@ var SpecCliAdapter = class _SpecCliAdapter {
|
|
|
32261
32271
|
}
|
|
32262
32272
|
return headers;
|
|
32263
32273
|
}
|
|
32274
|
+
/**
|
|
32275
|
+
* Snapshot the currently-focused claude TUI page, polling until its
|
|
32276
|
+
* option-row checkbox glyph column has settled (or a bounded timeout).
|
|
32277
|
+
*
|
|
32278
|
+
* Why poll: right after a Tab keypress the newly-focused page's glyph
|
|
32279
|
+
* column has not redrawn yet, so an immediate snapshot shows the question +
|
|
32280
|
+
* option labels but NO per-option checkbox markers — freezing that page as
|
|
32281
|
+
* single-select. A fixed delay either races (too short) or is wasteful (too
|
|
32282
|
+
* long). Instead we re-snapshot at a fixed interval and stop as soon as the
|
|
32283
|
+
* frame shows multi-select glyphs, falling back to the last frame at the
|
|
32284
|
+
* timeout. Single-select pages never show glyphs, so they always poll to the
|
|
32285
|
+
* timeout — bounded small to keep capture snappy.
|
|
32286
|
+
*/
|
|
32287
|
+
async snapshotSettledClaudeTuiPage() {
|
|
32288
|
+
let screenText = this.driver.snapshot();
|
|
32289
|
+
const deadline = Date.now() + _SpecCliAdapter.CLAUDE_TUI_PAGE_SETTLE_TIMEOUT_MS;
|
|
32290
|
+
while (!detectClaudeTuiMultiSelect(screenText) && Date.now() < deadline) {
|
|
32291
|
+
await new Promise((resolve24) => setTimeout(resolve24, _SpecCliAdapter.CLAUDE_TUI_PAGE_POLL_INTERVAL_MS));
|
|
32292
|
+
screenText = this.driver.snapshot();
|
|
32293
|
+
}
|
|
32294
|
+
return screenText;
|
|
32295
|
+
}
|
|
32264
32296
|
async captureClaudeTuiPrompt(firstScreen, headers) {
|
|
32265
32297
|
const pages = [{ screenText: firstScreen, header: headers[0] }];
|
|
32266
32298
|
for (let index = 1; index < headers.length; index += 1) {
|
|
32267
32299
|
this.driver.dispatch({ kind: "pty_write", data: " " });
|
|
32268
|
-
await new Promise((resolve24) => setTimeout(resolve24,
|
|
32269
|
-
pages.push({ screenText: this.
|
|
32300
|
+
await new Promise((resolve24) => setTimeout(resolve24, _SpecCliAdapter.CLAUDE_TUI_PAGE_POLL_INTERVAL_MS));
|
|
32301
|
+
pages.push({ screenText: await this.snapshotSettledClaudeTuiPage(), header: headers[index] });
|
|
32270
32302
|
}
|
|
32271
32303
|
for (let index = headers.length - 1; index > 0; index -= 1) {
|
|
32272
32304
|
this.driver.dispatch({ kind: "pty_write", data: "\x1B[Z" });
|
|
32273
|
-
await new Promise((resolve24) => setTimeout(resolve24,
|
|
32305
|
+
await new Promise((resolve24) => setTimeout(resolve24, _SpecCliAdapter.CLAUDE_TUI_PAGE_POLL_INTERVAL_MS));
|
|
32306
|
+
const reread = await this.snapshotSettledClaudeTuiPage();
|
|
32307
|
+
const landed = pages[index - 1];
|
|
32308
|
+
if (landed && !detectClaudeTuiMultiSelect(landed.screenText) && detectClaudeTuiMultiSelect(reread)) {
|
|
32309
|
+
landed.screenText = reread;
|
|
32310
|
+
}
|
|
32274
32311
|
}
|
|
32275
32312
|
const prompt = detectClaudeAskUserQuestionPromptFromTuiPages(pages, {
|
|
32276
32313
|
promptId: `ask-user-${this.providerSessionId || "claude"}-${Date.now()}`,
|