@adhdev/daemon-core 0.9.82-rc.354 → 0.9.82-rc.356

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.
@@ -34,6 +34,21 @@ export type ControlAction =
34
34
  wait_for: WaitForCondition;
35
35
  extract_choices: SectionPattern;
36
36
  submit_key: string;
37
+ /**
38
+ * How a parsed choice is committed once the picker is open.
39
+ * 'index' (default) — type the on-screen number then `submit_key`
40
+ * (`{index}\r`). Correct for CLIs whose picker is number-selectable
41
+ * (codex-cli, hermes-cli).
42
+ * 'arrow_keys' — the picker is a cursor list that ignores number keys
43
+ * (claude-cli /model): move the cursor from its current row to the
44
+ * target row with up/down arrows, then confirm with the `submit_key`
45
+ * tail (the `\r` left after stripping `{index}`). Requires the
46
+ * extracted choices to flag the current cursor row.
47
+ */
48
+ select_mode?: 'index' | 'arrow_keys';
49
+ /** Arrow byte sequences for `select_mode: 'arrow_keys'`. Defaults to
50
+ * ANSI cursor up/down (`` / ``) when omitted. */
51
+ cursor_keys?: { up: string; down: string };
37
52
  }
38
53
  | {
39
54
  type: 'attach_image';
@@ -154,11 +169,15 @@ export interface SectionDef {
154
169
  until?: string; // section id OR regex (starts with ^)
155
170
  /**
156
171
  * Anchor regex(es). A single string anchors on the first/last matching line
157
- * (per `anchor_last`). An array is an OR-set: every candidate line is one
158
- * that matches ANY entry; with `anchor_last` the LAST such line across all
159
- * patterns wins, otherwise the FIRST. This lets one section capture two
160
- * different shapese.g. a box-divider modal AND a divider-less modal whose
161
- * only stable landmark is the question line above its numbered choices.
172
+ * (per `anchor_last`). An array is an OR-set of candidate shapes: each
173
+ * candidate resolves its OWN anchor line independently (anchor_last that
174
+ * candidate's last matching line, else its first), then the TOPMOST resolved
175
+ * line across candidates wins — a section's anchor marks the top of its
176
+ * block, so the highest recognized landmark bounds the whole block. This
177
+ * lets one section capture two shapes — e.g. a box-divider modal AND a
178
+ * divider-less modal whose only stable landmark is the question line above
179
+ * its numbered choices — while preventing a stray LOWER landmark (e.g. an
180
+ * input-box `────` rule below the choices) from clipping the block.
162
181
  */
163
182
  anchor?: string | string[];
164
183
  anchor_flags?: string;
@@ -223,4 +242,21 @@ export interface ExtractButtons {
223
242
  key_for_index: string;
224
243
  min_count?: number;
225
244
  continuation_lines?: boolean;
245
+ /**
246
+ * How a button is committed when its modal is resolved (auto-approve or an
247
+ * explicit dashboard click).
248
+ * 'index' (default) — send `key_for_index` with `{index}` filled in
249
+ * (`{index}\r` → `1\r`). Correct for modals whose buttons are
250
+ * number-selectable (codex, hermes, antigravity number rows).
251
+ * 'arrow_keys' — the modal is a cursor list that IGNORES number keys
252
+ * (claude-cli's new TUI approval modal): a typed `1` leaks into the
253
+ * composer as literal text and `\r` submits it. Instead move the cursor
254
+ * from its current row to the target row with up/down arrows, then
255
+ * confirm with the `key_for_index` tail (the `\r` left after stripping
256
+ * `{index}`). Mirrors the `open_picker` `select_mode` of the same name.
257
+ */
258
+ select_mode?: 'index' | 'arrow_keys';
259
+ /** Arrow byte sequences for `select_mode: 'arrow_keys'`. Defaults to ANSI
260
+ * cursor up/down (`[A` / `[B`) when omitted. */
261
+ cursor_keys?: { up: string; down: string };
226
262
  }