things-api 0.16.0 → 0.18.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.
- package/README.md +1 -1
- package/deputy/VERSION +1 -0
- package/deputy/helpers-Info.plist +23 -0
- package/deputy/prebuilt/Things API Helper.app/Contents/CodeResources +0 -0
- package/deputy/prebuilt/Things API Helper.app/Contents/Helpers/things-reader.app/Contents/Info.plist +20 -0
- package/deputy/prebuilt/Things API Helper.app/Contents/Helpers/things-reader.app/Contents/MacOS/things-reader +0 -0
- package/deputy/prebuilt/Things API Helper.app/Contents/Helpers/things-reader.app/Contents/_CodeSignature/CodeResources +115 -0
- package/deputy/prebuilt/Things API Helper.app/Contents/Info.plist +23 -0
- package/deputy/prebuilt/Things API Helper.app/Contents/MacOS/things-deputy +0 -0
- package/deputy/prebuilt/Things API Helper.app/Contents/_CodeSignature/CodeResources +125 -0
- package/deputy/reader/Info.plist +20 -0
- package/deputy/reader/entitlements.plist +15 -0
- package/deputy/reader/main.swift +491 -0
- package/deputy/src/main.swift +133 -0
- package/deputy/src/osascript.swift +102 -0
- package/deputy/src/server.swift +350 -0
- package/deputy/src/sqlite.swift +121 -0
- package/dist/cli/commands/doctor.js +55 -2
- package/dist/cli/commands/doctor.js.map +1 -1
- package/dist/cli/commands/helpers.d.ts +17 -0
- package/dist/cli/commands/helpers.js +148 -0
- package/dist/cli/commands/helpers.js.map +1 -0
- package/dist/cli/commands/op-result.d.ts +15 -0
- package/dist/cli/commands/op-result.js +39 -0
- package/dist/cli/commands/op-result.js.map +1 -0
- package/dist/cli/commands/repeat-flags.d.ts +3 -3
- package/dist/cli/commands/repeat-flags.js +90 -33
- package/dist/cli/commands/repeat-flags.js.map +1 -1
- package/dist/cli/commands/writes.js +79 -6
- package/dist/cli/commands/writes.js.map +1 -1
- package/dist/cli/help.js +13 -2
- package/dist/cli/help.js.map +1 -1
- package/dist/cli/helpers-check.d.ts +10 -0
- package/dist/cli/helpers-check.js +59 -0
- package/dist/cli/helpers-check.js.map +1 -0
- package/dist/cli/interrupt.d.ts +42 -0
- package/dist/cli/interrupt.js +105 -0
- package/dist/cli/interrupt.js.map +1 -0
- package/dist/cli/main.js +27 -1
- package/dist/cli/main.js.map +1 -1
- package/dist/client.js +19 -2
- package/dist/client.js.map +1 -1
- package/dist/config.d.ts +70 -0
- package/dist/config.js +25 -1
- package/dist/config.js.map +1 -1
- package/dist/contracts.d.ts +9 -2
- package/dist/contracts.js +1 -1
- package/dist/contracts.js.map +1 -1
- package/dist/db/baselines/db-v26.js +8 -4
- package/dist/db/baselines/db-v26.js.map +1 -1
- package/dist/db/baselines/db-v27.d.ts +42 -0
- package/dist/db/baselines/db-v27.js +47 -0
- package/dist/db/baselines/db-v27.js.map +1 -0
- package/dist/db/baselines/index.js +2 -1
- package/dist/db/baselines/index.js.map +1 -1
- package/dist/db/locate.d.ts +4 -1
- package/dist/db/locate.js +3 -1
- package/dist/db/locate.js.map +1 -1
- package/dist/db/schema.d.ts +1 -1
- package/dist/db/schema.js +9 -0
- package/dist/db/schema.js.map +1 -1
- package/dist/deputy/bridge-worker.d.ts +1 -0
- package/dist/deputy/bridge-worker.js +79 -0
- package/dist/deputy/bridge-worker.js.map +1 -0
- package/dist/deputy/bridge.d.ts +14 -0
- package/dist/deputy/bridge.js +70 -0
- package/dist/deputy/bridge.js.map +1 -0
- package/dist/deputy/client.d.ts +19 -0
- package/dist/deputy/client.js +104 -0
- package/dist/deputy/client.js.map +1 -0
- package/dist/deputy/db-facade.d.ts +18 -0
- package/dist/deputy/db-facade.js +71 -0
- package/dist/deputy/db-facade.js.map +1 -0
- package/dist/deputy/files.d.ts +1 -0
- package/dist/deputy/files.js +16 -0
- package/dist/deputy/files.js.map +1 -0
- package/dist/deputy/install.d.ts +105 -0
- package/dist/deputy/install.js +467 -0
- package/dist/deputy/install.js.map +1 -0
- package/dist/deputy/notice.d.ts +6 -0
- package/dist/deputy/notice.js +28 -0
- package/dist/deputy/notice.js.map +1 -0
- package/dist/deputy/notices.d.ts +31 -0
- package/dist/deputy/notices.js +94 -0
- package/dist/deputy/notices.js.map +1 -0
- package/dist/deputy/osa.d.ts +21 -0
- package/dist/deputy/osa.js +72 -0
- package/dist/deputy/osa.js.map +1 -0
- package/dist/deputy/protocol.d.ts +86 -0
- package/dist/deputy/protocol.js +106 -0
- package/dist/deputy/protocol.js.map +1 -0
- package/dist/deputy/routing.d.ts +63 -0
- package/dist/deputy/routing.js +338 -0
- package/dist/deputy/routing.js.map +1 -0
- package/dist/deputy/shortcuts-exec.d.ts +10 -0
- package/dist/deputy/shortcuts-exec.js +50 -0
- package/dist/deputy/shortcuts-exec.js.map +1 -0
- package/dist/diagnose.d.ts +43 -1
- package/dist/diagnose.js +64 -2
- package/dist/diagnose.js.map +1 -1
- package/dist/index.d.ts +16 -2
- package/dist/index.js +17 -1
- package/dist/index.js.map +1 -1
- package/dist/mcp/server.js +25 -7
- package/dist/mcp/server.js.map +1 -1
- package/dist/model/mappers.d.ts +12 -3
- package/dist/model/mappers.js +6 -1
- package/dist/model/mappers.js.map +1 -1
- package/dist/model/occurrences.d.ts +14 -1
- package/dist/model/occurrences.js +20 -4
- package/dist/model/occurrences.js.map +1 -1
- package/dist/model/recurrence.d.ts +64 -9
- package/dist/model/recurrence.js +94 -19
- package/dist/model/recurrence.js.map +1 -1
- package/dist/model/template-projection.d.ts +26 -0
- package/dist/model/template-projection.js +113 -0
- package/dist/model/template-projection.js.map +1 -0
- package/dist/op-result.d.ts +46 -0
- package/dist/op-result.js +156 -0
- package/dist/op-result.js.map +1 -0
- package/dist/paths.d.ts +8 -0
- package/dist/paths.js +10 -0
- package/dist/paths.js.map +1 -1
- package/dist/read/detail.js +7 -1
- package/dist/read/detail.js.map +1 -1
- package/dist/read/queries.js +8 -1
- package/dist/read/queries.js.map +1 -1
- package/dist/read/views.d.ts +6 -4
- package/dist/read/views.js +60 -18
- package/dist/read/views.js.map +1 -1
- package/dist/sync-health.js +8 -3
- package/dist/sync-health.js.map +1 -1
- package/dist/trace/tracer.d.ts +87 -0
- package/dist/trace/tracer.js +167 -0
- package/dist/trace/tracer.js.map +1 -0
- package/dist/write/accessibility-probe.js +4 -2
- package/dist/write/accessibility-probe.js.map +1 -1
- package/dist/write/automation-probe.js +5 -1
- package/dist/write/automation-probe.js.map +1 -1
- package/dist/write/availability.js +7 -3
- package/dist/write/availability.js.map +1 -1
- package/dist/write/clear-reminder.js +24 -21
- package/dist/write/clear-reminder.js.map +1 -1
- package/dist/write/commands.js +95 -45
- package/dist/write/commands.js.map +1 -1
- package/dist/write/completion-context.d.ts +57 -0
- package/dist/write/completion-context.js +49 -0
- package/dist/write/completion-context.js.map +1 -0
- package/dist/write/experimental.d.ts +19 -0
- package/dist/write/experimental.js +50 -0
- package/dist/write/experimental.js.map +1 -1
- package/dist/write/failure-hints.d.ts +10 -1
- package/dist/write/failure-hints.js +8 -0
- package/dist/write/failure-hints.js.map +1 -1
- package/dist/write/guards.d.ts +1 -1
- package/dist/write/guards.js +10 -0
- package/dist/write/guards.js.map +1 -1
- package/dist/write/move.js +14 -6
- package/dist/write/move.js.map +1 -1
- package/dist/write/operations.d.ts +40 -7
- package/dist/write/pipeline.d.ts +41 -0
- package/dist/write/pipeline.js +289 -19
- package/dist/write/pipeline.js.map +1 -1
- package/dist/write/pre-state.d.ts +1 -1
- package/dist/write/pre-state.js +35 -17
- package/dist/write/pre-state.js.map +1 -1
- package/dist/write/promote-clone.js +434 -19
- package/dist/write/promote-clone.js.map +1 -1
- package/dist/write/reorder.js +76 -27
- package/dist/write/reorder.js.map +1 -1
- package/dist/write/repeat-anchor.d.ts +140 -0
- package/dist/write/repeat-anchor.js +403 -0
- package/dist/write/repeat-anchor.js.map +1 -0
- package/dist/write/repeat-asserts.d.ts +28 -0
- package/dist/write/repeat-asserts.js +169 -0
- package/dist/write/repeat-asserts.js.map +1 -0
- package/dist/write/repeat-rule.js +37 -12
- package/dist/write/repeat-rule.js.map +1 -1
- package/dist/write/vectors/applescript.js +7 -16
- package/dist/write/vectors/applescript.js.map +1 -1
- package/dist/write/vectors/session-reachability.d.ts +133 -0
- package/dist/write/vectors/session-reachability.js +151 -0
- package/dist/write/vectors/session-reachability.js.map +1 -0
- package/dist/write/vectors/shortcuts.js +5 -14
- package/dist/write/vectors/shortcuts.js.map +1 -1
- package/dist/write/vectors/simulator.d.ts +16 -1
- package/dist/write/vectors/simulator.js +122 -32
- package/dist/write/vectors/simulator.js.map +1 -1
- package/dist/write/vectors/types.d.ts +183 -10
- package/dist/write/vectors/ui-recipes.d.ts +8 -0
- package/dist/write/vectors/ui-recipes.js +246 -58
- package/dist/write/vectors/ui-recipes.js.map +1 -1
- package/dist/write/vectors/ui.d.ts +156 -14
- package/dist/write/vectors/ui.js +846 -84
- package/dist/write/vectors/ui.js.map +1 -1
- package/dist/write/verify/delta.d.ts +12 -14
- package/dist/write/verify/delta.js +35 -34
- package/dist/write/verify/delta.js.map +1 -1
- package/dist/write/verify/poller.d.ts +13 -0
- package/dist/write/verify/poller.js +38 -0
- package/dist/write/verify/poller.js.map +1 -1
- package/package.json +8 -1
- package/schema/envelope.schema.json +22 -0
- package/scripts/build-helpers.sh +104 -0
- package/scripts/deputy-cert-setup.sh +60 -0
- package/skills/things-cli/SKILL.md +11 -3
- package/skills/things-cli/references/errors.md +4 -0
- package/skills/things-cli/references/repeating.md +69 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type
|
|
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
|
|
@@ -78,6 +96,74 @@ export declare function axSelectPopupScript(path: string, value: string): string
|
|
|
78
96
|
* plural-safe. One stable command shape per primitive.
|
|
79
97
|
*/
|
|
80
98
|
export declare function axSelectPopupCandidatesScript(path: string, values: string[]): string;
|
|
99
|
+
/**
|
|
100
|
+
* probe-dialog-shape: MEASURE which Repeat dialog is open (RDLG2) — the whole
|
|
101
|
+
* version fork, decided by STRUCTURE rather than by the app version, so the
|
|
102
|
+
* recipe self-selects on any host and a future redesign refuses instead of
|
|
103
|
+
* silently pressing the wrong control:
|
|
104
|
+
*
|
|
105
|
+
* - `next-popup` (Things 3.23+) — the first occurrence is an `AXPopUpButton`
|
|
106
|
+
* listing the rule's own upcoming occurrences. It sits between Ends and every
|
|
107
|
+
* per-frequency control, so weekday / monthly / yearly pop-ups are one index
|
|
108
|
+
* further along.
|
|
109
|
+
* - `legacy` (Things ≤ 3.22) — the first occurrence is a free-form
|
|
110
|
+
* `AXDateTimeArea`, and the per-frequency controls follow Ends directly.
|
|
111
|
+
*
|
|
112
|
+
* The discriminator is the CONTROL CLASS on the `Next:` row, not the presence of
|
|
113
|
+
* the label: RDLG2d measured Things 3.22.14 and found it carries the same
|
|
114
|
+
* `Next:` static text (and the same occurrence-preview line) as 3.23 — only the
|
|
115
|
+
* control beside it changed. So the probe reads the label's row position and asks
|
|
116
|
+
* what kind of control shares that row, which also keeps it independent of the
|
|
117
|
+
* dialog's Ends state (an `Ends: on date` bound adds a SECOND date area, on a
|
|
118
|
+
* different row, in both shapes). Each branch is a POSITIVE match, so an
|
|
119
|
+
* unrecognized third dialog returns "unknown" and the driver refuses. Labels are
|
|
120
|
+
* pinned English, exactly like every other selector here.
|
|
121
|
+
*/
|
|
122
|
+
export declare function axProbeDialogShapeScript(groupPath: string, rowTolerance?: number): string;
|
|
123
|
+
/**
|
|
124
|
+
* select-next-occurrence: set the first occurrence through the Things 3.23
|
|
125
|
+
* `Next:` POP-UP (RDLG2). 3.23 replaced the free-form first-occurrence date area
|
|
126
|
+
* with a bounded MENU — `Today`, then the rule's own upcoming occurrences, then a
|
|
127
|
+
* `More…` item whose submenu carries the next hundred, cascading further the same
|
|
128
|
+
* way. Two consequences this script encodes:
|
|
129
|
+
*
|
|
130
|
+
* - a requested date is reachable ONLY if the rule itself produces it (or it is
|
|
131
|
+
* today): the menu offers nothing else, so an OFF-RULE first occurrence — free
|
|
132
|
+
* to set on ≤3.22 — is UNEXPRESSIBLE in this dialog and must fail closed with
|
|
133
|
+
* a named reason rather than land some neighbouring date;
|
|
134
|
+
* - item titles are localized (`Sun, Jul 12, 2026`), so the match is made by
|
|
135
|
+
* PARSING each title to a date (with a leading-weekday retry) and comparing
|
|
136
|
+
* calendar components — never by rebuilding the app's display string.
|
|
137
|
+
*
|
|
138
|
+
* The cascade is walked to a bounded depth; the click is verified by reading the
|
|
139
|
+
* pop-up's value back and requiring it to equal the clicked item's own title
|
|
140
|
+
* (the fail-closed read-back the ANCH2/YANCH1 date drives established).
|
|
141
|
+
*/
|
|
142
|
+
export declare function axSelectNextOccurrenceScript(popupPath: string, isoDate: string, maxLevels?: number): string;
|
|
143
|
+
/**
|
|
144
|
+
* converge-weekdays: drive the weekly dialog's weekday ROWS onto an exact target
|
|
145
|
+
* set through a deterministic closed loop (RDLG2 — the RRD1 fix).
|
|
146
|
+
*
|
|
147
|
+
* The shipped drive set the FIRST weekday row and then pressed "+" and re-drove
|
|
148
|
+
* THE SAME row index per extra weekday, which on a PRE-POPULATED reschedule
|
|
149
|
+
* dialog left the rule's existing weekdays untouched: `{mon,wed}` retargeted to
|
|
150
|
+
* `{tue,thu,sat}` committed `{mon,tue,thu,sat}` (VMQ1 cell 2Tb — caught only by
|
|
151
|
+
* the write pipeline's verify). It also had no way to SHRINK a set.
|
|
152
|
+
*
|
|
153
|
+
* The loop instead: (1) read the live row count; (2) press the row-add button —
|
|
154
|
+
* the smaller-x button of a weekday row, resolved from live geometry rather than
|
|
155
|
+
* a pinned index, because the row buttons enumerate in an unstable order — until
|
|
156
|
+
* there are at least as many rows as target weekdays; (3) assign EVERY row from
|
|
157
|
+
* the target set, cycling, so a surplus row duplicates a target weekday instead
|
|
158
|
+
* of keeping a stale one (the app stores the weekdays as a SET, so duplicates
|
|
159
|
+
* collapse on commit — this is what makes shrinking possible without the
|
|
160
|
+
* remove button); (4) read every row back and require the set to match exactly.
|
|
161
|
+
* Anything else errors — the pipeline re-verifies against the DB regardless.
|
|
162
|
+
*
|
|
163
|
+
* `base` is the 1-based group pop-up index of the first weekday row (2 on the
|
|
164
|
+
* legacy dialog, 3 once the 3.23 `Next:` pop-up sits in front of them).
|
|
165
|
+
*/
|
|
166
|
+
export declare function axConvergeWeekdaysScript(groupPath: string, base: number, titles: string[]): string;
|
|
81
167
|
/**
|
|
82
168
|
* select-row: select a PROJECT row by title, purely via AX (UIC4-a). Walks the
|
|
83
169
|
* content table's rows, issues the row `select` action on each (which REPLACES
|
|
@@ -112,12 +198,41 @@ export declare function axSelectRowScript(tablePath: string, title: string): str
|
|
|
112
198
|
* One stable command shape per primitive.
|
|
113
199
|
*/
|
|
114
200
|
export declare function axSelectHeadingRowScript(tablePath: string, ordinal: number): string;
|
|
201
|
+
/**
|
|
202
|
+
* assert-eligible: after a `things:///show?id=` reveal, VERIFY the target to-do
|
|
203
|
+
* is genuinely the sole selection AND that the menu item that acts on it is
|
|
204
|
+
* enabled — before the menu is pressed (ADR1, issue #480). The reveal is assumed
|
|
205
|
+
* to select the row, but on some surfaces it can navigate without selecting; an
|
|
206
|
+
* AXPress on the resulting DISABLED `Items ▸ Repeat…` is a silent no-op, so the
|
|
207
|
+
* dialog never opens and the drive dies far downstream at the dialog-wait timeout
|
|
208
|
+
* with no hint of the real cause. Reading `Things3 → id of selected to dos` is
|
|
209
|
+
* uuid-precise (never a fuzzy title match), so a match GUARANTEES the intended row
|
|
210
|
+
* is selected. Returns "OK" only when exactly the target is selected and the menu
|
|
211
|
+
* item is enabled; otherwise a diagnostic (`NOTSEL…`/`WRONGSEL…`/`DISABLED…`)
|
|
212
|
+
* naming expected vs observed. Pure System Events + Things scripting, background-
|
|
213
|
+
* capable. One stable command shape per primitive.
|
|
214
|
+
*/
|
|
215
|
+
export declare function axAssertEligibleScript(targetUuid: string, menuItemPath: string): string;
|
|
115
216
|
/** activate: foreground Things (the fallback preamble step). */
|
|
116
217
|
export declare function axActivateScript(): string;
|
|
117
218
|
/** key: a space-separated keystroke spec (e.g. "down down return"). */
|
|
118
219
|
export declare function axKeyScript(keys: string): string;
|
|
119
220
|
/** The abort keystroke sent to dismiss a half-open sheet/popover on failure. */
|
|
120
221
|
export declare function axAbortScript(): string;
|
|
222
|
+
/**
|
|
223
|
+
* The PROVEN app-level clearance / relocation maneuver (SESSGATE, #480, live-host
|
|
224
|
+
* recovery): close the front Things window — which takes an attached modal sheet
|
|
225
|
+
* with it — then reopen and activate. Runs entirely through Things' own
|
|
226
|
+
* AppleScript dictionary, so it works WITHOUT the Accessibility tree (the exact
|
|
227
|
+
* property needed when the session is AX-blind). Two uses:
|
|
228
|
+
* - CLEANUP: clear a stuck modal sheet a failed drive left open (unblocks the
|
|
229
|
+
* app-wide AppleScript-mutation freeze that sheet imposes);
|
|
230
|
+
* - RELOCATION: pull a window that was on another Space back to the current one
|
|
231
|
+
* so its dialog can open AX-reachably (the wrong-Space recovery branch).
|
|
232
|
+
* `reopen` restores the default window on the CURRENT Space; `activate` foregrounds
|
|
233
|
+
* it. Returns "OK".
|
|
234
|
+
*/
|
|
235
|
+
export declare function axCloseReopenActivateScript(): string;
|
|
121
236
|
/**
|
|
122
237
|
* sheet-open probe: is a modal SHEET attached to the Things standard window, OR
|
|
123
238
|
* a detached repeat-editor / popover window (an `AXUnknown` that is not the
|
|
@@ -147,19 +262,46 @@ export declare function axFrameScript(path: string): string;
|
|
|
147
262
|
*/
|
|
148
263
|
export declare function jxaClickScript(x: number, y: number): string;
|
|
149
264
|
/**
|
|
150
|
-
* set-datetime: set the Repeat dialog's `AXDateTimeArea`
|
|
151
|
-
*
|
|
152
|
-
*
|
|
153
|
-
*
|
|
154
|
-
* `AXUIElementSetAttributeValue(…, AXValue, <NSDate>)` directly.
|
|
155
|
-
*
|
|
156
|
-
*
|
|
157
|
-
*
|
|
158
|
-
*
|
|
159
|
-
* `
|
|
160
|
-
*
|
|
161
|
-
|
|
162
|
-
|
|
265
|
+
* set-datetime: set ONE of the Repeat dialog's `AXDateTimeArea` controls via the
|
|
266
|
+
* ObjC AX bridge. Things' date/time controls hold an NSDate, and System Events
|
|
267
|
+
* cannot write them (`set value … to <date>` → -10000, UIC6), so — like the
|
|
268
|
+
* mouse-synthesis primitive — this runs in JXA and calls
|
|
269
|
+
* `AXUIElementSetAttributeValue(…, AXValue, <NSDate>)` directly.
|
|
270
|
+
*
|
|
271
|
+
* A fixed rule can expose up to THREE date areas at once — "Next:" (first
|
|
272
|
+
* occurrence), "Ends: on date", and the reminder time (ANCH2 census). Targeting
|
|
273
|
+
* "the first AXDateTimeArea by role" is therefore AMBIGUOUS — that ambiguity
|
|
274
|
+
* collapsed the series when `--ends-on` added a second area (oddities §8v, now
|
|
275
|
+
* retracted) and made the reminder look undrivable (UIC6-g, now retracted). This
|
|
276
|
+
* driver selects DETERMINISTICALLY by `target` (ANCH2, docs/lab/anch2-next-field.md):
|
|
277
|
+
* - `reminder` — the only area carrying a time-of-day (the date pickers sit at
|
|
278
|
+
* midnight); falls back to the bottom-most area if none carry a time.
|
|
279
|
+
* - `next` — the TOP (smallest-y) midnight date picker.
|
|
280
|
+
* - `ends` — the BOTTOM (largest-y) midnight date picker (present only once
|
|
281
|
+
* "Ends: on date" is selected).
|
|
282
|
+
* The areas are polled briefly (revealed a beat after the checkbox/pop-up), and
|
|
283
|
+
* the script THROWS a NAMED, structured error when the addressed control is
|
|
284
|
+
* absent — reporting which target was sought and the FULL date-area inventory of
|
|
285
|
+
* the current dialog state (count + per-area y / time-of-day) — so a dialog shape
|
|
286
|
+
* that does not present the target (e.g. the deadline-mode variant, YANCH1 #493)
|
|
287
|
+
* fails closed with an actionable message, never an uncaught `-[__NSArray0
|
|
288
|
+
* objectAtIndex:]` (-2700) from indexing an empty collection. It then READS THE
|
|
289
|
+
* CONTROL BACK after the write and throws if the committed value differs from the
|
|
290
|
+
* request: a control that silently rejects the write (the macOS error beep the
|
|
291
|
+
* user hears) must fail the step loudly, never leave a garbled/default value to be
|
|
292
|
+
* verified as ok (YANCH1; UIC6-g refuse-rather-than-commit precedent). `spec` is
|
|
293
|
+
* `time:HH:mm` (keep the date, set the time-of-day) or `date:YYYY-MM-DD` (set the
|
|
294
|
+
* calendar date at midnight). One stable JXA shape.
|
|
295
|
+
*/
|
|
296
|
+
export declare function axSetDateTimeScript(spec: string, target: "next" | "ends" | "reminder"): string;
|
|
297
|
+
/**
|
|
298
|
+
* The converge-weekdays step encodes both of its inputs in `value` as
|
|
299
|
+
* `"<base>|<Weekday>,<Weekday>…"`: the base is the group pop-up index of the
|
|
300
|
+
* FIRST weekday row, which the dialog SHAPE decides (2 legacy / 3 next-popup),
|
|
301
|
+
* so it rides the same shape-selected `value` the driver merges in.
|
|
302
|
+
*/
|
|
303
|
+
export declare function weekdayBaseOf(value: string): number;
|
|
304
|
+
export declare function weekdayTitlesOf(value: string): string[];
|
|
163
305
|
/** Parse a resolve-frame "x y w h" line into the frame's center point. */
|
|
164
306
|
export declare function parseFrameCenter(stdout: string): {
|
|
165
307
|
x: number;
|