things-api 0.16.0 → 0.17.0

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.
Files changed (86) hide show
  1. package/README.md +1 -1
  2. package/dist/cli/commands/repeat-flags.d.ts +3 -3
  3. package/dist/cli/commands/repeat-flags.js +90 -33
  4. package/dist/cli/commands/repeat-flags.js.map +1 -1
  5. package/dist/cli/commands/writes.js +59 -5
  6. package/dist/cli/commands/writes.js.map +1 -1
  7. package/dist/cli/help.js +9 -2
  8. package/dist/cli/help.js.map +1 -1
  9. package/dist/cli/interrupt.d.ts +42 -0
  10. package/dist/cli/interrupt.js +105 -0
  11. package/dist/cli/interrupt.js.map +1 -0
  12. package/dist/cli/main.js +5 -0
  13. package/dist/cli/main.js.map +1 -1
  14. package/dist/client.js +3 -0
  15. package/dist/client.js.map +1 -1
  16. package/dist/config.d.ts +39 -0
  17. package/dist/config.js +16 -1
  18. package/dist/config.js.map +1 -1
  19. package/dist/contracts.d.ts +9 -2
  20. package/dist/contracts.js +1 -1
  21. package/dist/contracts.js.map +1 -1
  22. package/dist/index.d.ts +3 -0
  23. package/dist/index.js +7 -0
  24. package/dist/index.js.map +1 -1
  25. package/dist/model/occurrences.d.ts +14 -1
  26. package/dist/model/occurrences.js +20 -4
  27. package/dist/model/occurrences.js.map +1 -1
  28. package/dist/model/recurrence.d.ts +60 -9
  29. package/dist/model/recurrence.js +76 -19
  30. package/dist/model/recurrence.js.map +1 -1
  31. package/dist/paths.d.ts +8 -0
  32. package/dist/paths.js +10 -0
  33. package/dist/paths.js.map +1 -1
  34. package/dist/sync-health.js +2 -1
  35. package/dist/sync-health.js.map +1 -1
  36. package/dist/trace/tracer.d.ts +87 -0
  37. package/dist/trace/tracer.js +167 -0
  38. package/dist/trace/tracer.js.map +1 -0
  39. package/dist/write/clear-reminder.js +24 -21
  40. package/dist/write/clear-reminder.js.map +1 -1
  41. package/dist/write/commands.js +50 -45
  42. package/dist/write/commands.js.map +1 -1
  43. package/dist/write/completion-context.d.ts +57 -0
  44. package/dist/write/completion-context.js +49 -0
  45. package/dist/write/completion-context.js.map +1 -0
  46. package/dist/write/failure-hints.d.ts +10 -1
  47. package/dist/write/failure-hints.js +8 -0
  48. package/dist/write/failure-hints.js.map +1 -1
  49. package/dist/write/guards.d.ts +1 -1
  50. package/dist/write/guards.js +10 -0
  51. package/dist/write/guards.js.map +1 -1
  52. package/dist/write/operations.d.ts +12 -3
  53. package/dist/write/pipeline.d.ts +39 -0
  54. package/dist/write/pipeline.js +230 -17
  55. package/dist/write/pipeline.js.map +1 -1
  56. package/dist/write/pre-state.d.ts +1 -1
  57. package/dist/write/pre-state.js +2 -2
  58. package/dist/write/pre-state.js.map +1 -1
  59. package/dist/write/promote-clone.js +260 -13
  60. package/dist/write/promote-clone.js.map +1 -1
  61. package/dist/write/repeat-anchor.d.ts +110 -0
  62. package/dist/write/repeat-anchor.js +238 -0
  63. package/dist/write/repeat-anchor.js.map +1 -0
  64. package/dist/write/repeat-asserts.d.ts +28 -0
  65. package/dist/write/repeat-asserts.js +169 -0
  66. package/dist/write/repeat-asserts.js.map +1 -0
  67. package/dist/write/repeat-rule.js +27 -12
  68. package/dist/write/repeat-rule.js.map +1 -1
  69. package/dist/write/vectors/session-reachability.d.ts +78 -0
  70. package/dist/write/vectors/session-reachability.js +103 -0
  71. package/dist/write/vectors/session-reachability.js.map +1 -0
  72. package/dist/write/vectors/simulator.js +68 -29
  73. package/dist/write/vectors/simulator.js.map +1 -1
  74. package/dist/write/vectors/types.d.ts +117 -10
  75. package/dist/write/vectors/ui-recipes.d.ts +8 -0
  76. package/dist/write/vectors/ui-recipes.js +120 -22
  77. package/dist/write/vectors/ui-recipes.js.map +1 -1
  78. package/dist/write/vectors/ui.d.ts +79 -13
  79. package/dist/write/vectors/ui.js +415 -59
  80. package/dist/write/vectors/ui.js.map +1 -1
  81. package/dist/write/verify/delta.d.ts +12 -14
  82. package/dist/write/verify/delta.js +35 -34
  83. package/dist/write/verify/delta.js.map +1 -1
  84. package/package.json +1 -1
  85. package/schema/envelope.schema.json +22 -0
  86. package/skills/things-cli/SKILL.md +5 -2
@@ -4,6 +4,7 @@
4
4
  * the lab (url-scheme.matrix / applescript.matrix), never hardcoded logic.
5
5
  */
6
6
  import type { DisruptionTier } from "../../config.ts";
7
+ import type { HazardId } from "../guards.ts";
7
8
  import type { OperationKind } from "../operations.ts";
8
9
  export type VectorId = "url-scheme" | "applescript" | "shortcuts" | "ui";
9
10
  export interface CompiledInvocation {
@@ -46,6 +47,18 @@ export interface UiRecipe {
46
47
  /** The item the recipe acts on (revealed/selected via things:///show?id=). */
47
48
  targetUuid: string;
48
49
  steps: UiStep[];
50
+ /**
51
+ * DIALOG-class recipe: it opens a SHEET on the main Things window (the Repeat
52
+ * editor, the Convert confirm, the Move picker) and waits for it through the
53
+ * Accessibility tree. Such a recipe needs a Things window that is AX-reachable
54
+ * on the current Space — on a locked screen or in a full-screen app's Space
55
+ * the sheet opens on an unreachable window and the wait times out (SESSGATE,
56
+ * #480). The driver runs a session-reachability probe after the reveal and
57
+ * refuses (`blocked`) when the window is unreachable. Menu-only recipes (todo
58
+ * pause/resume — a pure menu-item press that works even under lock, AXVM1) do
59
+ * NOT set this and are never gated.
60
+ */
61
+ needsWindowReachability?: boolean;
49
62
  }
50
63
  export type UiPrimitive = "reveal" | "activate" | "resolve" | "press" | "set-value" | "select-popup" | "wait" | "key"
51
64
  /**
@@ -94,17 +107,56 @@ export type UiPrimitive = "reveal" | "activate" | "resolve" | "press" | "set-val
94
107
  */
95
108
  | "select-heading-row"
96
109
  /**
97
- * Set the Repeat dialog's date/time control (the reminder time, the "ends on
98
- * date" bound) an `AXDateTimeArea` whose value is an NSDate, NOT a text
99
- * field (UIC6). System Events cannot set it (`set value to <date>` errors
100
- * -10000), so the driver sets `AXValue` to an NSDate through the ObjC bridge
101
- * (JXA), the same bridge the mouse-synthesis primitive rides. `value` is the
102
- * spec: `time:HH:mm` (keep the control's date, set the time-of-day, for the
103
- * reminder) or `date:YYYY-MM-DD` (set the calendar date, for the end bound).
104
- * The control is located by role within the open dialog and fails closed if
105
- * it is absent.
110
+ * Assert the reveal actually landed an ELIGIBLE selection before a menu press
111
+ * (ADR1, issue #480). A `things:///show?id=<uuid>` reveal is assumed to select
112
+ * the to-do row, but on some surfaces (a future-scheduled to-do in Upcoming, an
113
+ * area view) it may navigate without leaving the row selected and an AXPress
114
+ * on the resulting DISABLED `Items Repeat…` "succeeds" as a silent no-op, so
115
+ * the dialog never opens and the drive dies at the dialog-wait timeout with no
116
+ * hint of the real cause. This step closes that gap fail-closed: it reads back
117
+ * `Things3 id of selected to dos` and requires EXACTLY the target uuid to be
118
+ * selected, then reads the addressed menu item's `AXEnabled`. It returns "OK"
119
+ * only when the target is the sole selection AND the menu item is enabled;
120
+ * otherwise it returns a diagnostic (`NOTSEL…`/`WRONGSEL…`/`DISABLED…`) the
121
+ * driver surfaces as an EARLY, named failure. `value` is the target uuid; `path`
122
+ * the menu item to enabled-check. Pure System Events, background-capable.
123
+ */
124
+ | "assert-eligible"
125
+ /**
126
+ * Set one of the Repeat dialog's date/time controls — each an `AXDateTimeArea`
127
+ * whose value is an NSDate, NOT a text field (UIC6). System Events cannot set
128
+ * it (`set value … to <date>` errors -10000), so the driver sets `AXValue` to
129
+ * an NSDate through the ObjC bridge (JXA), the same bridge the mouse-synthesis
130
+ * primitive rides. `value` is the spec: `time:HH:mm` (keep the control's date,
131
+ * set the time-of-day) or `date:YYYY-MM-DD` (set the calendar date).
132
+ *
133
+ * A fixed rule can expose up to THREE date areas at once — "Next:" (the first
134
+ * occurrence), the "Ends: on date" bound, and the reminder time (ANCH2 census,
135
+ * docs/lab/anch2-next-field.md) — so the target is chosen DETERMINISTICALLY by
136
+ * {@link UiStep.dtTarget}, never "the first AXDateTimeArea by role" (that
137
+ * ambiguity was the §8v collapse + the UIC6-g reminder mis-verdict). The
138
+ * reminder is the only time-bearing area; among the midnight date pickers the
139
+ * "Next" field is the top row and the "Ends" field the bottom row. Fails
140
+ * closed if the addressed control is absent.
106
141
  */
107
- | "set-datetime";
142
+ | "set-datetime"
143
+ /**
144
+ * Converge a dialog CHECKBOX to a target state via a deterministic closed loop
145
+ * (RRD1): read the checkbox's `AXValue` (0/1), press ONLY when the observed
146
+ * state differs from the requested {@link UiStep.checkboxTarget}, then re-read to
147
+ * confirm it landed — never a blind toggle. This is what makes the Repeat
148
+ * dialog's "Add deadlines" / "Add reminders" checkboxes safe on a PRE-POPULATED
149
+ * reschedule dialog: the dialog opens with the item's CURRENT deadline/reminder
150
+ * state already reflected, so an unconditional press flips an already-correct box
151
+ * the wrong way (the live bug — a blind "Add deadlines" press UNCHECKED an
152
+ * already-deadlined rule, hiding the "start N days earlier" field it had already
153
+ * revealed). Only fields the caller actually requested emit a step; an
154
+ * unspecified `--deadline` / `--reminder` on reschedule emits NO step, so the
155
+ * pre-populated state is PRESERVED (requested-fields-only law, #492). Fails
156
+ * closed (an `error` the pipeline re-verifies) if the box will not converge
157
+ * within the bounded retries.
158
+ */
159
+ | "ensure-checkbox";
108
160
  export interface UiStep {
109
161
  primitive: UiPrimitive;
110
162
  /** Human-readable step label — surfaced in the partial-state report. */
@@ -173,6 +225,19 @@ export interface UiStep {
173
225
  activateFallback?: boolean;
174
226
  /** drag-reorder only: the sidebar move the drag driver performs. */
175
227
  drag?: import("./ui-drag.ts").SidebarDragSpec;
228
+ /**
229
+ * set-datetime only: WHICH of the dialog's date areas to drive (ANCH2). The
230
+ * driver selects deterministically — `reminder` = the only time-bearing area;
231
+ * `next` = the top (smaller-y) midnight date picker; `ends` = the bottom
232
+ * (larger-y) midnight date picker. Required for every set-datetime step.
233
+ */
234
+ dtTarget?: "next" | "ends" | "reminder";
235
+ /**
236
+ * ensure-checkbox only: the desired checkbox state. The driver reads the
237
+ * control's `AXValue` and presses ONLY when it differs from this target, then
238
+ * confirms convergence (RRD1 closed loop). Required for every ensure-checkbox step.
239
+ */
240
+ checkboxTarget?: boolean;
176
241
  }
177
242
  export interface VectorSupport {
178
243
  support: "yes" | "partial" | "no";
@@ -200,11 +265,53 @@ export interface ExecuteResult {
200
265
  stderr: string;
201
266
  /** The transport was killed by its own deadline — the signature of an unanswered consent dialog. */
202
267
  timedOut?: boolean;
268
+ /**
269
+ * The vector REFUSED at runtime BEFORE touching the app — a precondition it
270
+ * can only check live (the ui vector's session-reachability gate: a locked
271
+ * screen / full-screen Space leaves no AX-reachable Things window for the
272
+ * dialog, SESSGATE #480). The pipeline maps this to a `blocked` outcome
273
+ * (exit 4), never a transport failure — nothing was mutated.
274
+ */
275
+ blocked?: {
276
+ hazard: HazardId;
277
+ detail: string;
278
+ remediation: string;
279
+ };
280
+ /**
281
+ * The ui vector's overall-drive WATCHDOG fired: the drive exceeded its budget
282
+ * so the CLI — not the caller — gave up first, cleared any open dialog, and
283
+ * returned (TRACE1, #487). Carried alongside a nonzero `exitCode` + `timedOut`
284
+ * so the pipeline routes it through the existing transport-failure re-verify
285
+ * (a mid-commit OK may still have landed), then shapes an HONEST timeout:
286
+ * confirmed-landed → ok with a disclosure; not-confirmed → verify-failed with
287
+ * `uncertain` set and the trace path, since a drive aborted mid-commit cannot
288
+ * promise the app is untouched. See {@link drive}.
289
+ */
290
+ watchdog?: {
291
+ budgetMs: number;
292
+ elapsedMs: number;
293
+ /** The step the drive was about to run (or running) when the budget blew. */
294
+ lastStep: string;
295
+ /** How the open dialog was cleaned up (SESSGATE clearDialog outcome). */
296
+ clear: "dismissed" | "cleared-blind" | "may-remain";
297
+ /** The local trace file reconstructing the timeline, when tracing is on. */
298
+ tracePath?: string | null;
299
+ };
203
300
  }
204
301
  export interface WriteVector {
205
302
  id: VectorId;
206
303
  matrix: VectorMatrix;
207
304
  execute(invocation: CompiledInvocation): Promise<ExecuteResult>;
305
+ /**
306
+ * ui vector ONLY: probe whether a Things window is AX-reachable on the current
307
+ * Space, so a promote ORCHESTRATOR can gate BEFORE it seeds a row (SESSGATE
308
+ * #480). It returns a not-reachable verdict scoped "session" (locked screen /
309
+ * full-screen — the certain-failure case the orchestrator refuses on, zero
310
+ * mutation) or "window" (only Things' window is off-Space — the orchestrator
311
+ * proceeds; the in-drive gate relocates it). Absent on the real transport
312
+ * vectors and the simulator, so a caller with no ui vector simply skips the gate.
313
+ */
314
+ probeReachability?: () => Promise<import("./session-reachability.ts").ReachabilityVerdict>;
208
315
  /**
209
316
  * The bench-harness SIMULATOR vector (src/write/vectors/simulator.ts). It
210
317
  * presents under a real {@link VectorId} but applies mutations via SQL from
@@ -38,6 +38,14 @@ export interface RepeatDialogRule {
38
38
  reminder?: string;
39
39
  deadline?: boolean;
40
40
  startDaysEarlier?: number;
41
+ /**
42
+ * The requested FIRST occurrence (ISO `YYYY-MM-DD`), driven into the dialog's
43
+ * "Next:" date field (ANCH2, issue #476). The default value of Next is the
44
+ * app's today-anchored first match; overwriting it makes the series start on
45
+ * the requested date verbatim (subsequent occurrences follow the rule). Omit
46
+ * to accept the app default. Not applicable to after-completion (no calendar).
47
+ */
48
+ next?: string;
41
49
  }
42
50
  export declare function pauseRepeatRecipe(targetUuid: string): UiRecipe;
43
51
  export declare function resumeRepeatRecipe(targetUuid: string): UiRecipe;
@@ -32,6 +32,23 @@ function menuPress(label, path, canaryPath) {
32
32
  };
33
33
  }
34
34
  const REPEAT_SUBMENU_ANCHOR = `menu item "Repeat" of ${ITEMS_MENU}`;
35
+ /**
36
+ * Assert the reveal landed an eligible selection before pressing a menu item
37
+ * (ADR1, issue #480). `menuItemPath` is the item whose `AXEnabled` gates the
38
+ * action. Dynamic (its verdict depends on the runtime selection the reveal
39
+ * produced), so it is never canaried; the driver surfaces a non-OK verdict as an
40
+ * early, named failure instead of a downstream dialog-wait timeout.
41
+ */
42
+ function assertEligible(targetUuid, menuItemPath) {
43
+ return {
44
+ primitive: "assert-eligible",
45
+ label: "confirm the target to-do is selected and Items ▸ Repeat… is enabled",
46
+ value: targetUuid,
47
+ path: menuItemPath,
48
+ dynamic: true,
49
+ addressing: "title",
50
+ };
51
+ }
35
52
  /** Wait for a dynamic element (sheet/popover) to appear, then abort on timeout. */
36
53
  function waitFor(label, path, timeoutMs = 5000) {
37
54
  return { primitive: "wait", label, path, timeoutMs, dynamic: true, addressing: "title" };
@@ -61,6 +78,7 @@ export function convertToProjectRecipe(op, targetUuid) {
61
78
  return {
62
79
  op,
63
80
  targetUuid,
81
+ needsWindowReachability: true,
64
82
  steps: [
65
83
  ...preamble(targetUuid),
66
84
  menuPress("Items ▸ Convert to Project…", `menu item "Convert to Project…" of ${ITEMS_MENU}`),
@@ -93,6 +111,7 @@ export function headingConvertToProjectRecipe(projectUuid, ordinal) {
93
111
  return {
94
112
  op: "project.promote-heading",
95
113
  targetUuid: projectUuid,
114
+ needsWindowReachability: true,
96
115
  steps: [
97
116
  {
98
117
  primitive: "reveal",
@@ -288,13 +307,41 @@ function pressControl(label, pathCandidates) {
288
307
  return { primitive: "press", label, pathCandidates, dynamic: true, addressing: "title" };
289
308
  }
290
309
  /**
291
- * Set the dialog's date/time picker (reminder time / end-date bound). The
292
- * control is an `AXDateTimeArea` located by role within the front dialog (UIC6),
293
- * so it carries no element path the driver's set-datetime primitive finds it.
294
- * `spec` is `time:HH:mm` or `date:YYYY-MM-DD`.
310
+ * Converge a dialog checkbox to `target` via the deterministic closed-loop
311
+ * ensure-checkbox primitive (RRD1) read, press only on a mismatch, confirm.
312
+ * Replaces the old blind `pressControl`, which flipped an already-correct box on a
313
+ * PRE-POPULATED reschedule dialog (the live bug: a blind "Add deadlines" press
314
+ * unchecked an already-deadlined rule, hiding the start-earlier field). Emitted
315
+ * ONLY for a checkbox the caller actually addressed; an unspecified deadline/
316
+ * reminder emits no step, so the pre-populated state is preserved (#492).
317
+ */
318
+ function ensureCheckbox(label, pathCandidates, target) {
319
+ return {
320
+ primitive: "ensure-checkbox",
321
+ label,
322
+ pathCandidates,
323
+ checkboxTarget: target,
324
+ dynamic: true,
325
+ addressing: "title",
326
+ };
327
+ }
328
+ /**
329
+ * Set ONE of the dialog's date/time pickers (Next first-occurrence / end-date
330
+ * bound / reminder time). Each is an `AXDateTimeArea` located by role within the
331
+ * front dialog, so it carries no element path — the driver's set-datetime
332
+ * primitive selects DETERMINISTICALLY by `target` (ANCH2: reminder = the
333
+ * time-bearing area; next = top midnight picker; ends = bottom midnight picker),
334
+ * never "the first area by role". `spec` is `time:HH:mm` or `date:YYYY-MM-DD`.
295
335
  */
296
- function setDateTime(label, spec) {
297
- return { primitive: "set-datetime", label, value: spec, dynamic: true, addressing: "title" };
336
+ function setDateTime(label, spec, target) {
337
+ return {
338
+ primitive: "set-datetime",
339
+ label,
340
+ value: spec,
341
+ dtTarget: target,
342
+ dynamic: true,
343
+ addressing: "title",
344
+ };
298
345
  }
299
346
  /** Steps that drive the day anchor of a monthly rule into the mode + ordinal pop-ups. */
300
347
  function monthlyAnchorSteps(anchor, mode, ordinal) {
@@ -374,25 +421,65 @@ function repeatDialogEntry(rule) {
374
421
  steps.push(selectPopup(`yearly month = ${y.month}`, DIALOG_YEAR_MONTH, MONTH_TITLE[y.month - 1] ?? ""));
375
422
  steps.push(...monthlyAnchorSteps(y, DIALOG_YEAR_MODE, DIALOG_YEAR_ORDINAL));
376
423
  }
377
- if (rule.ends !== undefined && rule.ends.kind !== "never") {
378
- if (rule.ends.kind === "after") {
379
- steps.push(selectPopup("ends = after", DIALOG_ENDS, "after"));
380
- steps.push(setField(`ends after = ${rule.ends.count}`, DIALOG_ENDS_COUNT, String(rule.ends.count)));
381
- }
382
- else {
383
- steps.push(selectPopup("ends = on date", DIALOG_ENDS, "on date"));
384
- steps.push(setDateTime(`ends on = ${rule.ends.date}`, `date:${rule.ends.date}`));
424
+ // "Add deadlines" / "start N days earlier" — DEADLINE MODE, converged (RRD1)
425
+ // BEFORE the "Next:" field is driven below. In deadline mode the "Next:" field IS
426
+ // the deadline date and the instance start = deadline startDaysEarlier (YANCH1
427
+ // #493), so the deadline-date shift `deadlineDriveNext` computes must be applied
428
+ // against the CONVERGED checkbox state; a box flipped AFTER Next was driven (the
429
+ // old order) changed Next's meaning under an already-committed value — the live
430
+ // bug where a blind press on an already-deadlined reschedule dialog UNCHECKED the
431
+ // box and hid the start-earlier field. Converging the checkbox reveals only a
432
+ // NUMBER field ("start N days earlier"), never a date area (YANCH1 census), so it
433
+ // does not perturb the date-area targeting the ends/Next drives below rely on.
434
+ //
435
+ // Target (requested-fields-only, #492): an explicit `deadline` converges to it; a
436
+ // bare `startDaysEarlier > 0` implies deadline:true; an UNSPECIFIED deadline emits
437
+ // NO step, PRESERVING the pre-populated checkbox state (a reschedule that does not
438
+ // address the deadline leaves it exactly as it was).
439
+ const deadlineTarget = rule.deadline !== undefined
440
+ ? rule.deadline
441
+ : (rule.startDaysEarlier ?? 0) > 0
442
+ ? true
443
+ : undefined;
444
+ if (deadlineTarget !== undefined) {
445
+ steps.push(ensureCheckbox("Add deadlines", DIALOG_ADD_DEADLINES, deadlineTarget));
446
+ // startDaysEarlier is requested-fields-only too: drive the offset field only
447
+ // when it was given (>0), else leave it at its pre-populated value.
448
+ if (deadlineTarget && (rule.startDaysEarlier ?? 0) > 0) {
449
+ steps.push(setField(`start ${rule.startDaysEarlier} days earlier`, DIALOG_START_EARLIER, String(rule.startDaysEarlier)));
385
450
  }
386
451
  }
387
- if (rule.reminder !== undefined) {
388
- steps.push(pressControl("check Add reminders", DIALOG_ADD_REMINDERS));
389
- steps.push(setDateTime(`reminder = ${rule.reminder}`, `time:${rule.reminder}`));
452
+ // Ends bound + "Next:" first-occurrence field (ANCH2, issue #476). ORDER MATTERS:
453
+ // select "Ends: on date" FIRST (revealing its date area) BEFORE driving Next, so
454
+ // both date areas already exist when each is set through its own deterministic
455
+ // target. Driving Next while it is the SOLE date area and THEN adding the ends
456
+ // area collapses the whole series to the ends date (ANCH2 RC4); selecting the
457
+ // ends bound first — the proven-clean order (cell d) — keeps them distinct.
458
+ const endsOnDate = rule.ends !== undefined && rule.ends.kind === "on-date" ? rule.ends : null;
459
+ if (rule.ends !== undefined && rule.ends.kind === "after") {
460
+ steps.push(selectPopup("ends = after", DIALOG_ENDS, "after"));
461
+ steps.push(setField(`ends after = ${rule.ends.count}`, DIALOG_ENDS_COUNT, String(rule.ends.count)));
390
462
  }
391
- if (rule.deadline === true || (rule.startDaysEarlier ?? 0) > 0) {
392
- steps.push(pressControl("check Add deadlines", DIALOG_ADD_DEADLINES));
393
- if ((rule.startDaysEarlier ?? 0) > 0) {
394
- steps.push(setField(`start ${rule.startDaysEarlier} days earlier`, DIALOG_START_EARLIER, String(rule.startDaysEarlier)));
395
- }
463
+ else if (endsOnDate !== null) {
464
+ steps.push(selectPopup("ends = on date", DIALOG_ENDS, "on date"));
465
+ }
466
+ // After-completion has no calendar, so no Next.
467
+ if (rule.next !== undefined && rule.afterCompletion !== true) {
468
+ steps.push(setDateTime(`Next (first occurrence) = ${rule.next}`, `date:${rule.next}`, "next"));
469
+ }
470
+ if (endsOnDate !== null) {
471
+ steps.push(setDateTime(`ends on = ${endsOnDate.date}`, `date:${endsOnDate.date}`, "ends"));
472
+ }
473
+ // "Add reminders" — converged (RRD1), then its time driven. Kept AFTER the Next/
474
+ // ends date drives (its ANCH2-certified position): a freshly-checked reminder
475
+ // area defaults to a NON-midnight 12:00 (ANCH2 census), so the set-datetime
476
+ // tod discriminator never confuses it with the midnight Next/ends pickers,
477
+ // whatever the creation order. Requested-fields-only (#492): an unspecified
478
+ // reminder emits NO step, PRESERVING the pre-populated checkbox + time. (The rule
479
+ // vocabulary carries no "reminder off", so the only requested target is checked.)
480
+ if (rule.reminder !== undefined) {
481
+ steps.push(ensureCheckbox("Add reminders", DIALOG_ADD_REMINDERS, true));
482
+ steps.push(setDateTime(`reminder = ${rule.reminder}`, `time:${rule.reminder}`, "reminder"));
396
483
  }
397
484
  steps.push(pressControl('press "OK"', DIALOG_OK));
398
485
  return steps;
@@ -401,8 +488,15 @@ export function makeRepeatingRecipe(targetUuid, frequency, interval, extras = {}
401
488
  return {
402
489
  op: "todo.make-repeating",
403
490
  targetUuid,
491
+ needsWindowReachability: true,
404
492
  steps: [
405
493
  ...preamble(targetUuid),
494
+ // ADR1 (#480): the reveal is assumed to select the to-do row, but on some
495
+ // surfaces it can navigate without selecting — and an AXPress on the
496
+ // resulting DISABLED Repeat… item silently no-ops, so the dialog never
497
+ // opens and the drive died opaquely at the dialog-wait timeout. Assert the
498
+ // eligible selection FIRST, failing early + named on a miss.
499
+ assertEligible(targetUuid, `menu item "Repeat…" of ${ITEMS_MENU}`),
406
500
  menuPress("Items ▸ Repeat…", `menu item "Repeat…" of ${ITEMS_MENU}`),
407
501
  ...repeatDialogEntry({ frequency, interval, ...extras }),
408
502
  ],
@@ -430,6 +524,7 @@ export function projectMakeRepeatingRecipe(containerReveal, projectUuid, title,
430
524
  return {
431
525
  op: "project.make-repeating",
432
526
  targetUuid: projectUuid,
527
+ needsWindowReachability: true,
433
528
  steps: [
434
529
  {
435
530
  primitive: "reveal",
@@ -474,6 +569,7 @@ export function rescheduleRepeatRecipe(targetUuid, frequency, interval, extras =
474
569
  return {
475
570
  op: "todo.reschedule-repeat",
476
571
  targetUuid,
572
+ needsWindowReachability: true,
477
573
  steps: [
478
574
  ...preamble(targetUuid),
479
575
  menuPress("Items ▸ Repeat ▸ Reschedule…", `menu item "Reschedule…" of menu 1 of menu item "Repeat" of ${ITEMS_MENU}`, REPEAT_SUBMENU_ANCHOR),
@@ -584,6 +680,7 @@ export function projectRescheduleRepeatRecipe(targetUuid, frequency, interval, e
584
680
  return {
585
681
  op: "project.reschedule-repeat",
586
682
  targetUuid,
683
+ needsWindowReachability: true,
587
684
  steps: [
588
685
  ...projectPreamble(targetUuid),
589
686
  openProjectRepeatPopover(),
@@ -633,6 +730,7 @@ export function moveHeadingToProjectRecipe(sourceProjectUuid, headingTitle, dest
633
730
  return {
634
731
  op: "project.move-heading-to-project",
635
732
  targetUuid: sourceProjectUuid,
733
+ needsWindowReachability: true,
636
734
  steps: [
637
735
  {
638
736
  primitive: "reveal",
@@ -1 +1 @@
1
- {"version":3,"file":"ui-rec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1
+ import { type ThingsApiConfig } from "../../config.ts";
2
2
  import { type UiDriveAux } from "./ui-drag.ts";
3
3
  import type { UiPrimitive, UiStep, WriteVector } from "./types.ts";
4
4
  /**
@@ -53,6 +53,24 @@ export declare function axPressScript(path: string): string;
53
53
  * reveal/activate preamble puts Things there. One stable command shape.
54
54
  */
55
55
  export declare function axSetValueScript(path: string, value: string, attempts?: number): string;
56
+ /**
57
+ * ensure-checkbox: converge a dialog checkbox to a target state through a
58
+ * DETERMINISTIC CLOSED LOOP (RRD1, determinism doctrine) — never a blind toggle.
59
+ * It reads the checkbox's `AXValue` (0 = unchecked, 1 = checked), presses it ONLY
60
+ * when the observed value differs from `target`, then RE-READS to confirm the new
61
+ * value equals `target`. A press that did not register (or a value that has not
62
+ * settled) is retried a bounded number of times; if it never converges the script
63
+ * FAILS CLOSED (an `error`, i.e. a transport failure the pipeline re-verifies).
64
+ *
65
+ * This is what makes the "Add deadlines" / "Add reminders" checkboxes safe on a
66
+ * PRE-POPULATED reschedule dialog: the dialog opens with the item's CURRENT
67
+ * deadline/reminder state already ticked, so the old unconditional `click`
68
+ * FLIPPED an already-correct box the wrong way — the live #493-adjacent bug where
69
+ * a blind "Add deadlines" press UNCHECKED an already-deadlined rule and hid the
70
+ * "start N days earlier" field, collapsing the drive. Reading before pressing
71
+ * makes an already-correct box a no-op. One stable command shape per primitive.
72
+ */
73
+ export declare function axEnsureCheckboxScript(path: string, target: boolean, attempts?: number): string;
56
74
  /**
57
75
  * select-popup: choose an item in a pop-up button by NAME. Setting `value` on a
58
76
  * Things pop-up button is a silent no-op (UIC1 / UI2-i) — the control must be
@@ -112,12 +130,41 @@ export declare function axSelectRowScript(tablePath: string, title: string): str
112
130
  * One stable command shape per primitive.
113
131
  */
114
132
  export declare function axSelectHeadingRowScript(tablePath: string, ordinal: number): string;
133
+ /**
134
+ * assert-eligible: after a `things:///show?id=` reveal, VERIFY the target to-do
135
+ * is genuinely the sole selection AND that the menu item that acts on it is
136
+ * enabled — before the menu is pressed (ADR1, issue #480). The reveal is assumed
137
+ * to select the row, but on some surfaces it can navigate without selecting; an
138
+ * AXPress on the resulting DISABLED `Items ▸ Repeat…` is a silent no-op, so the
139
+ * dialog never opens and the drive dies far downstream at the dialog-wait timeout
140
+ * with no hint of the real cause. Reading `Things3 → id of selected to dos` is
141
+ * uuid-precise (never a fuzzy title match), so a match GUARANTEES the intended row
142
+ * is selected. Returns "OK" only when exactly the target is selected and the menu
143
+ * item is enabled; otherwise a diagnostic (`NOTSEL…`/`WRONGSEL…`/`DISABLED…`)
144
+ * naming expected vs observed. Pure System Events + Things scripting, background-
145
+ * capable. One stable command shape per primitive.
146
+ */
147
+ export declare function axAssertEligibleScript(targetUuid: string, menuItemPath: string): string;
115
148
  /** activate: foreground Things (the fallback preamble step). */
116
149
  export declare function axActivateScript(): string;
117
150
  /** key: a space-separated keystroke spec (e.g. "down down return"). */
118
151
  export declare function axKeyScript(keys: string): string;
119
152
  /** The abort keystroke sent to dismiss a half-open sheet/popover on failure. */
120
153
  export declare function axAbortScript(): string;
154
+ /**
155
+ * The PROVEN app-level clearance / relocation maneuver (SESSGATE, #480, live-host
156
+ * recovery): close the front Things window — which takes an attached modal sheet
157
+ * with it — then reopen and activate. Runs entirely through Things' own
158
+ * AppleScript dictionary, so it works WITHOUT the Accessibility tree (the exact
159
+ * property needed when the session is AX-blind). Two uses:
160
+ * - CLEANUP: clear a stuck modal sheet a failed drive left open (unblocks the
161
+ * app-wide AppleScript-mutation freeze that sheet imposes);
162
+ * - RELOCATION: pull a window that was on another Space back to the current one
163
+ * so its dialog can open AX-reachably (the wrong-Space recovery branch).
164
+ * `reopen` restores the default window on the CURRENT Space; `activate` foregrounds
165
+ * it. Returns "OK".
166
+ */
167
+ export declare function axCloseReopenActivateScript(): string;
121
168
  /**
122
169
  * sheet-open probe: is a modal SHEET attached to the Things standard window, OR
123
170
  * a detached repeat-editor / popover window (an `AXUnknown` that is not the
@@ -147,19 +194,38 @@ export declare function axFrameScript(path: string): string;
147
194
  */
148
195
  export declare function jxaClickScript(x: number, y: number): string;
149
196
  /**
150
- * set-datetime: set the Repeat dialog's `AXDateTimeArea` (reminder time / "ends
151
- * on date" bound) via the ObjC AX bridge. Things' date/time control holds an
152
- * NSDate, and System Events cannot write it (`set value … to <date>` → -10000,
153
- * UIC6), so — like the mouse-synthesis primitive — this runs in JXA and calls
154
- * `AXUIElementSetAttributeValue(…, AXValue, <NSDate>)` directly. The control is
155
- * found by ROLE within Things' front dialog (there is exactly one during a
156
- * reminder/end-date step; the matrix never sets both at once), polled briefly
157
- * so it is caught right after the checkbox/pop-up that reveals it, and the
158
- * script THROWS when absent so the driver fails closed. `spec` is
159
- * `time:HH:mm` (keep the control's date, overwrite the time-of-day) or
160
- * `date:YYYY-MM-DD` (overwrite the date at midnight). One stable JXA shape.
197
+ * set-datetime: set ONE of the Repeat dialog's `AXDateTimeArea` controls via the
198
+ * ObjC AX bridge. Things' date/time controls hold an NSDate, and System Events
199
+ * cannot write them (`set value … to <date>` → -10000, UIC6), so — like the
200
+ * mouse-synthesis primitive — this runs in JXA and calls
201
+ * `AXUIElementSetAttributeValue(…, AXValue, <NSDate>)` directly.
202
+ *
203
+ * A fixed rule can expose up to THREE date areas at once "Next:" (first
204
+ * occurrence), "Ends: on date", and the reminder time (ANCH2 census). Targeting
205
+ * "the first AXDateTimeArea by role" is therefore AMBIGUOUS that ambiguity
206
+ * collapsed the series when `--ends-on` added a second area (oddities §8v, now
207
+ * retracted) and made the reminder look undrivable (UIC6-g, now retracted). This
208
+ * driver selects DETERMINISTICALLY by `target` (ANCH2, docs/lab/anch2-next-field.md):
209
+ * - `reminder` — the only area carrying a time-of-day (the date pickers sit at
210
+ * midnight); falls back to the bottom-most area if none carry a time.
211
+ * - `next` — the TOP (smallest-y) midnight date picker.
212
+ * - `ends` — the BOTTOM (largest-y) midnight date picker (present only once
213
+ * "Ends: on date" is selected).
214
+ * The areas are polled briefly (revealed a beat after the checkbox/pop-up), and
215
+ * the script THROWS a NAMED, structured error when the addressed control is
216
+ * absent — reporting which target was sought and the FULL date-area inventory of
217
+ * the current dialog state (count + per-area y / time-of-day) — so a dialog shape
218
+ * that does not present the target (e.g. the deadline-mode variant, YANCH1 #493)
219
+ * fails closed with an actionable message, never an uncaught `-[__NSArray0
220
+ * objectAtIndex:]` (-2700) from indexing an empty collection. It then READS THE
221
+ * CONTROL BACK after the write and throws if the committed value differs from the
222
+ * request: a control that silently rejects the write (the macOS error beep the
223
+ * user hears) must fail the step loudly, never leave a garbled/default value to be
224
+ * verified as ok (YANCH1; UIC6-g refuse-rather-than-commit precedent). `spec` is
225
+ * `time:HH:mm` (keep the date, set the time-of-day) or `date:YYYY-MM-DD` (set the
226
+ * calendar date at midnight). One stable JXA shape.
161
227
  */
162
- export declare function axSetDateTimeScript(spec: string): string;
228
+ export declare function axSetDateTimeScript(spec: string, target: "next" | "ends" | "reminder"): string;
163
229
  /** Parse a resolve-frame "x y w h" line into the frame's center point. */
164
230
  export declare function parseFrameCenter(stdout: string): {
165
231
  x: number;