@adhdev/daemon-core 0.9.82-rc.296 → 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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adhdev/daemon-core",
3
- "version": "0.9.82-rc.296",
3
+ "version": "0.9.82-rc.297",
4
4
  "description": "ADHDev daemon core — CDP, IDE detection, providers, command execution",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -46,7 +46,7 @@
46
46
  "author": "vilmire",
47
47
  "license": "AGPL-3.0-or-later",
48
48
  "dependencies": {
49
- "@adhdev/mesh-shared": "0.9.82-rc.296",
49
+ "@adhdev/mesh-shared": "0.9.82-rc.297",
50
50
  "@adhdev/session-host-core": "*",
51
51
  "@agentclientprotocol/sdk": "^0.16.1",
52
52
  "ajv": "^8.20.0",
@@ -433,12 +433,21 @@ export function buildClaudeInteractiveTuiAnswerSteps(
433
433
  const treatAsMultiSelect = question.multiSelect || answer.selectedLabels.length > 1;
434
434
 
435
435
  if (treatAsMultiSelect) {
436
- // Multi-select: Claude TUI renders each option as a checkbox and the
437
- // footer reads "Space to select". A numeric digit jumps the cursor to
438
- // that option; Space toggles its checkbox. So for every selected label
439
- // emit `[digit, ' ']` to land on it and toggle it on. After toggling all
440
- // boxes for this question, Enter advances to the next question (or to the
441
- // final confirm screen for the last question).
436
+ // Multi-select: Claude TUI renders each option as a checkbox. The
437
+ // keystroke model here was reverse-engineered live against claude-cli
438
+ // v2.1.170 (do not "simplify" from the screen text it lies):
439
+ //
440
+ // * A numeric digit key TOGGLES that option's checkbox directly and
441
+ // does NOT move the cursor. So a digit alone checks the option.
442
+ // * Space toggles whatever row the cursor is sitting on (the digit
443
+ // never moved it), so a trailing Space would spuriously toggle the
444
+ // cursor's row (usually option 1) — NEVER pair digit+Space here.
445
+ // * Enter does NOT advance the page; it toggles the cursor's row too.
446
+ // The ONLY key that commits this question and advances (to the next
447
+ // question, or to the final "Review your answers" screen for the
448
+ // last question) is Tab.
449
+ //
450
+ // So: one digit per selected label, then a single Tab to advance.
442
451
  const labels = answer.selectedLabels;
443
452
  if (labels.length === 0) {
444
453
  throw new Error(`Expected at least one selected label for ${question.questionId}`);
@@ -447,12 +456,11 @@ export function buildClaudeInteractiveTuiAnswerSteps(
447
456
  const selectedIndex = question.options.findIndex(option => option.label === label);
448
457
  if (selectedIndex < 0) throw new Error(`Unknown option for ${question.questionId}: ${label}`);
449
458
  steps.push(String(selectedIndex + 1));
450
- steps.push(' ');
451
459
  }
452
- // Confirm this question's checked set and move on. Unlike single-select
453
- // (where the digit auto-advances), multi-select stays on the page until an
454
- // explicit Enter so the user can toggle multiple boxes.
455
- steps.push('\r');
460
+ // Tab commits this question's checked set and advances. (Unlike
461
+ // single-select, where the digit auto-advances, a multi-select page
462
+ // stays put under digit input so the user can toggle multiple boxes.)
463
+ steps.push('\t');
456
464
  } else if (freeformText) {
457
465
  // Freeform: select the "Type something." option (always the last visible
458
466
  // option before "Chat about this"), then type the text and confirm.