noracu 0.3.0 → 0.3.2

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/CHANGELOG.md CHANGED
@@ -1,5 +1,649 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.3.2] — 2026-11-19
4
+
5
+ - **Orca gets no input by default.** Orca, an agent IDE whose terminals run a
6
+ shell, is on the default deny list — by its bundle id `com.stablyai.orca`
7
+ and by name — and a client running in one of its terminals is recognised as
8
+ hosted by it.
9
+ - **Docs from a first install on another Mac.** The Quickstart says to paste
10
+ what `--doctor` prints, and how to replace an entry left by an earlier
11
+ install; Finder can be read with `app: "Finder"` without bringing it
12
+ forward; Claude Code's way to set a variable (`-e` after the server name) is
13
+ shown next to the JSON form, with the error the other order gives; the
14
+ README says that reading an Electron or Chromium app tries to turn on its
15
+ web accessibility (Google Chrome refuses it); macOS 26.7.1 is in the list of
16
+ where it was tested.
17
+ - **XCUITest backend: a simulator is found with Xcode 26 too.** `noracu
18
+ ios-setup --udid` and the `ios_*` tools now look a simulator up with
19
+ `simctl`. `devicectl`, which with Xcode 26.6 listed no simulators or gave no
20
+ answer for 30 s, is asked about iPhones only.
21
+ - **`browser_scroll` reads the page once it has had the wheel.** It used to
22
+ read the position 80 ms after sending the wheel; on a busy machine, or with
23
+ the server running at background priority (a launchd job, a CI runner), the
24
+ page could take half a second to get it, and the result then said that a
25
+ scroll that went through did not move, took the late end of the scroll
26
+ before for its own (`delivered_verified`), or missed a navigation the wheel
27
+ started. Now it waits until the page reports the wheel and the position
28
+ stops changing (up to 3 s). It verifies a movement only when the one wheel
29
+ the page had was this call's and every earlier wheel that may have reached
30
+ that page was verified (a page loaded again starts afresh, unless it came in
31
+ while a wheel may still have been on its way), and never when the wheel was
32
+ over a frame; two calls on one page take turns; the result says which of
33
+ these kept it from verifying.
34
+ - **XCUITest backend: build the runner again once.** Its sources changed in
35
+ comments only, but the runner's build check counts every byte of them:
36
+ `ios_*` answers `runner_version_mismatch` until `npx noracu ios-setup` (the
37
+ same flags as the first time) builds it again.
38
+
39
+ ## [0.3.1] — 2026-11-19
40
+
41
+ Fixes and stricter checks on top of 0.3.0; no tool was added or removed. The
42
+ ten that matter most:
43
+
44
+ - **A call whose text holds U+2028 or U+2029 is answered.** In 0.3.0 such a
45
+ call never got an answer.
46
+ - **An app name that two running apps share is not resolved to one of them.**
47
+ The answer is `ambiguous_app` with the pids; name the one you mean as
48
+ `pid:<number>`.
49
+ - **The client's Stop reaches a call that is already running**, and
50
+ `browser_type` stops when the stop file appears.
51
+ - **Keystrokes and pastes wait for the person at the Mac right before they go
52
+ out**, not only when the call starts.
53
+ - **An `element_index` stays with its row.** A number that names an item is
54
+ part of its identity, and two look-alike buttons in one list row stay tied to
55
+ that row.
56
+ - **iPhone (XCUITest): nothing is sent while Control Center covers the app**,
57
+ and input named for the Home Screen is not sent into an app that is still in
58
+ front.
59
+ - **iPhone (Mirroring): no old picture of a minimized mirror.**
60
+ `phone_screenshot`, `phone_ocr` and `phone_find` answer `capture_failed`
61
+ instead.
62
+ - **`initialize` answers in the protocol revision the client asked for**
63
+ (2024-11-05, 2025-06-18 or 2025-11-25).
64
+ - **`ax_empty` says when an app's windows are off screen** — on another Space,
65
+ minimized or hidden — and what to do next. Windows on another Space still
66
+ cannot be read.
67
+ - **Docs:** a short README that starts with `npx noracu --doctor`, a page of
68
+ known issues, the apps noracu was run against, and an error reference that
69
+ names every code.
70
+
71
+ Several results also claim less than before: `mac_scroll`, `browser_fill` and
72
+ `browser_scroll` report success only for what was seen, and `mac_wait` no
73
+ longer reports something gone while the app is not answering.
74
+
75
+ **Upgrading with the XCUITest backend:** the runner changed in this version.
76
+ `ios_*` answers `runner_version_mismatch` until the runner is built again with
77
+ `npx noracu ios-setup` (the same flags as the first time).
78
+
79
+ ### Added
80
+ - **`noracu doctor`.** Run in a terminal, it prints the client configuration
81
+ with the absolute paths of `node` and the server filled in (a GUI client does
82
+ not inherit the shell's `PATH`), and says whether Node, cliclick and
83
+ Playwright's Chromium are where the server will look; `--json` gives the same
84
+ as JSON. It reads this machine only and sends nothing. `noracu --help` and
85
+ `--version` exist too, and a server started by hand in a terminal says that
86
+ it is waiting for a client. `noracu --doctor` is the same command. It exits 1
87
+ when something the configured layers need is missing (Node 20; macOS for the
88
+ Mac and iPhone layers; cliclick for the Mac layer) or a setting in the shell
89
+ is one the server would refuse (`NORACU_LAYERS`) or
90
+ replace (`NORACU_PHONE_BACKEND`) — such a setting is left out of the printed
91
+ configuration, and a valid `NORACU_PHONE_BACKEND` goes into it. It ends with
92
+ one line of versions and findings to paste into an issue, with no path or
93
+ user name in it.
94
+ - `phone_type` and `phone_open`: a clipboard that could not be put back is
95
+ reported on every path that ends the call — a capture or window error before
96
+ ⌘V as well as a lost focus — and the report says which case it is: the
97
+ clipboard may be empty (it was cleared, then refused the write), or it still
98
+ holds the typed text (what it held could not be saved: another device's
99
+ clipboard, or one too large).
100
+ - **`mac_ax_state` with `skeleton` (or a snapshot cut short by `depth` or
101
+ `max_nodes`): an element of a row whose texts were not read is refused for
102
+ actions.** Nothing in such a snapshot told the row's control from the same
103
+ control of another row of the same shape that took its place, so an action
104
+ could land on the other row. The answer is `element_no_longer_valid`
105
+ (`row_unread`) and says to drill into the row with `root` or take a fuller
106
+ snapshot. Reading the element (`mac_get`, `mac_wait`) and drilling into it
107
+ work as before.
108
+ - **A key of the person's that is less than 2 s old is waited out once.** Mac
109
+ and iPhone Mirroring input answered `user_active` at once when the keyboard or
110
+ mouse had been used in the last `NORACU_USER_IDLE_S` seconds — often the
111
+ Return that sent the request, so the first call of a quick client failed. The
112
+ call now waits out the rest of that time, reads it again, and goes ahead when
113
+ nothing more came from the person; when something did, it answers
114
+ `user_active` as before, saying that it waited. Nothing is sent during the
115
+ wait, and a stop file made during it still stops the input.
116
+ - **An approval file can let one app of the default deny list through.** An
117
+ `allow` entry of `NORACU_APPROVAL_FILE` that names a terminal or IDE exactly —
118
+ its bundle id or its name, without `*` or `?` — now lets that app receive
119
+ input; before, the default deny list won and the only way out was dropping
120
+ the whole list. A wildcard entry does not open it, the file's own `deny` wins,
121
+ and so does every entry of `NORACU_DENY_APPS`. The refusal says how the
122
+ person can let an app through.
123
+ - `mac_click` and the other `element_index` actions: a number is a reading that
124
+ may change in place (a time span, a percentage, a count) only when nothing is
125
+ glued to its front — no letter or digit, no currency sign, no 第 — and a
126
+ one-letter unit has nothing glued after it. "$12m" → "$15m", "Order 104s-2" →
127
+ "Order 105s-2" and "第3天" → "第4天" are other items now. And a snapshot that
128
+ lists only some elements (`mac_find`, `interactive`) and left out a
129
+ look-alike in the same row as a listed one no longer tells them apart by the
130
+ texts of that row: the element is not looked for elsewhere when it moved.
131
+ - **cliclick on an Intel Mac.** Without `NORACU_CLICLICK` the server runs
132
+ `/opt/homebrew/bin/cliclick` or, when that is not there, `/usr/local/bin/cliclick`
133
+ — where Homebrew installs it on an Intel Mac. It looked only in the first.
134
+
135
+ ### Security
136
+ - `ios_*` input (XCUITest backend) reads the lock again right before it goes
137
+ out when its last "unlocked" answer is older than a second, and looks at the
138
+ stop file again last — right before the command is written to the runner,
139
+ after any connection it first had to open. The reads made just before an
140
+ input (what the iPhone shows over the app, that lock read, a new connection)
141
+ can take seconds after the first checks, and a stop file made or a lock in
142
+ that time did not stop the input.
143
+ - `ios_launch` looks at the stop file again right before devicectl or simctl
144
+ starts. Its gate can start the runner and read the lock, which takes seconds
145
+ after the input queue looked at the stop file, and the launch — with
146
+ `terminate_existing`, the stop of the running app too — went out after a stop
147
+ file made in that time.
148
+ - `mac_app` launch with `cdp_port` records the DevTools port as the app's
149
+ only when the process listening on it is the launched app (or one of its
150
+ child processes) and `/json/version` names a websocket on that port. Any
151
+ answer on the port was recorded, so a local process that took the port
152
+ first could later be attached to as the app. Otherwise the result says the
153
+ endpoint is not the app's own, with `cdp: null`.
154
+ - The default deny list names Tabby (`org.tabby`), Rio
155
+ (`com.raphaelamorim.rio`) and Wave (`dev.commandline.waveterm`) by bundle
156
+ id too. They were on it by name only, which a renamed or localized app name
157
+ did not match.
158
+ - On the Mac, input to an app whose name cannot be read is refused while a
159
+ rule that names apps by name is in force (the default deny list has some).
160
+ Such an app was let through when its bundle id matched no rule, as if the
161
+ rules that name apps had been checked. iPhone apps are matched on their
162
+ bundle id, as before.
163
+ - `NORACU_APPROVAL_FILE`: a file that is not valid JSON is refused without
164
+ quoting a piece of it (the parser's message, passed on to the agent, did),
165
+ and a file over 64 KB is refused before it is read. Input stays refused
166
+ (fail closed) in both cases, as before.
167
+ - `phone_*` ⌘ chords (paste, select all, the app switcher): the iPhone
168
+ Mirroring window is checked to be in front again between ⌘ down and the
169
+ key. If another app came forward in those 30 ms, ⌘ is released and the key
170
+ is not sent — it would have been a ⌘ shortcut in that app.
171
+ - iOS runner (XCUITest backend; rebuild the runner after upgrading): when
172
+ SpringBoard's frame could not be read, the runner found "no Home Screen
173
+ icon, no system alert" against the empty frame, and `ios_type` / `ios_key`
174
+ were let through without the alert check. Such a frame now counts as
175
+ unreadable: input that needs the check is refused (`system_alert` /
176
+ `app_not_foreground`), as when SpringBoard cannot be read at all.
177
+ - `imctl verify` (a command-line check of the iPhone driver, not a tool)
178
+ wrote two screenshots of the phone to paths from `tempfile.mktemp`, and
179
+ took them as a capture of the screen region under the mirror window. It
180
+ now reads the window's own pixels and hashes them in memory.
181
+ - **An app name that two running apps share is no longer resolved to one of them.** `app` took the first
182
+ match — the active one when there was one — so input, a menu command or Quit could go to another copy than
183
+ the one meant. Every tool that takes `app` now answers `ambiguous_app`, lists the pids and which of them is
184
+ frontmost, and does nothing; `app: "pid:<number>"` names one (`mac_apps` lists them). A helper process of
185
+ the same name is not counted, nor one started from the same `.app` bundle. `mac_app` `activate` with
186
+ `pid:<number>` brings that very process forward (`open -a` picked a copy itself), and `mac_windows` takes
187
+ `app` the same way — a word that names no app exactly still filters the window owners' names.
188
+ - `phone_open`: the words "Top Hit" count as Spotlight's card header only in the top part of the screen. A
189
+ line reading "Top Hit" further down — in a list or a page — was taken for the header, and the name under it
190
+ for the app to tap.
191
+ - `phone_type` and `phone_open`: when the Mac's clipboard refuses to take back what it held before the paste,
192
+ the result says so (it said the clipboard had been put back).
193
+ - **`phone_screenshot`, `phone_ocr` and `phone_find` do not return an old picture of a minimized mirror.**
194
+ A capture by window id succeeds for a minimized iPhone Mirroring window — with the picture the window had
195
+ when it went away (seen on a device: a full-size PNG, no error) — and these read-only tools passed it on as
196
+ the phone's screen. A window that is not on screen (hidden, minimized or on another Space) now answers
197
+ `capture_failed` and says so; the input tools already refused it.
198
+ - **`mac_click` and the other `element_index` actions: a number that names an item is part of its identity.**
199
+ A unique element's item ignored every digit, so a row replaced in place by one that differed only in a
200
+ number ("Invoice 12" → "Invoice 13") was taken for the same row, and its button was pressed. Now only a
201
+ number that reads as a clock time or a duration, a percentage, a time span with its unit ("5 min ago"), an
202
+ explicit count ("3 unread", "12 items") or a count against a fixed total ("12/280") may change in place;
203
+ any other changed number answers `element_no_longer_valid` — take a new snapshot.
204
+ - **`ios_tap`, `ios_swipe` and `ios_type` named for the Home Screen are not sent into an app.**
205
+ `com.apple.springboard` always reports itself in front, so after `ios_home` an input without a `bundle_id`
206
+ went out even when another app had come forward since (a call, the person opening one) — and landed in that
207
+ app. noracu now looks at SpringBoard first: with no Home Screen icon showing, only one tap on a button of a
208
+ system alert is sent; anything else answers `app_not_foreground` and nothing goes out. Seen on a device: the
209
+ Home Screen's pages, Today View and the App Library show icons; an app or Spotlight in front shows none.
210
+ While the app the session last launched, acted on or read in front still reads as in front, the same rule
211
+ holds without looking for icons — one can stay on screen for a moment after an app came forward, and Control
212
+ Center over an app shows them too — also after a call that named the Home Screen in between. When that app's
213
+ state cannot be read, nothing is sent.
214
+ - **`mac_menu_command`: Quit is refused for a protected app even when the
215
+ menu item has no shortcut and no AppKit action.** Quit was recognised only by
216
+ ⌘Q / ⌥⌘Q or its AppKit action, so a menu built another way let "Quit <App>"
217
+ through for the MCP host and the session apps. The title counts now ("Quit",
218
+ "Quit …", "Exit", "Exit <app>"), and an item directly in the application menu
219
+ with neither a shortcut nor an identifier is refused for those apps.
220
+ - `noracu ios-setup`: a build that fails because this Mac's keychain is locked no longer says "unlock the
221
+ iPhone".
222
+ - `noracu ios-setup --bundle-prefix`: a prefix that ends in a dot or has two dots in a row is refused
223
+ before the build instead of producing a bundle identifier Xcode rejects.
224
+ - `noracu ios-setup`: when something else ends xcodebuild with a signal, the message says so instead of
225
+ "could not be run — is Xcode installed?".
226
+ - `mac_windows` without Screen Recording permission: two windows of one app at the same position each get
227
+ their own title (the second one was left untitled and the first got the second's).
228
+ - `mac_windows`: `titles_from_screen_recording` is true only when the window server gave a non-empty title
229
+ for another process's window (this process's own windows and empty titles made it true).
230
+ - `mac_ax_state`: `depth` must be a whole number (a fraction such as 2.5 was accepted).
231
+ - `phone_*`: when the iPhone Mirroring driver is stopped for printing more than 10 MB, the error now says
232
+ that the action may have partly run and to look before retrying, as the timeout error does.
233
+ - `phone_*`: when the python that was picked lacks a pyobjc module, the install command in the error names
234
+ that python instead of `python3`, which may be a different one.
235
+ - **`phone_open` taps nothing when the app's row is gone at the re-read.** The row found in Spotlight's Top
236
+ Hit card is read again half a second later; when that read did not show the name, the first position was
237
+ tapped anyway — onto whatever had moved there — and another app that opened was reported as opened. One
238
+ more read is made now, and without the name in the card nothing is tapped (`open_not_confirmed`). The
239
+ same holds when the row moved between those two reads: the read after that must still show the name, or
240
+ nothing is tapped.
241
+ - `phone_type`: the phone's "Pasting from …" box is recognised when its two words are read as two hits of
242
+ one line in swapped order (it was missed then, and a paste still on its way could be taken as done).
243
+ - `phone_type`: the words of the "Pasting from …" box are left out of the count of the typed text also when
244
+ the box was read as two hits (a Mac named "M5pro" made "pro" look typed).
245
+ - `phone_scroll`: the frontmost app is checked again after the short pause that follows the pointer move,
246
+ before the first wheel event (the first check came after the fifth: an app that came to the front in that
247
+ pause got the start of the scroll).
248
+ - `phone_type` with a text of two or three characters: a paste that was not confirmed is reported as
249
+ `type_not_confirmed` at once. It used to be watched for 15 more seconds, and the same two or three letters
250
+ showing up anywhere ("in" inside "Sign in") were reported as "the text showed up late".
251
+ - `phone_longpress`: a hold longer than a second looks at the frontmost app again every second; when another
252
+ app has come to the front the button is let go at once and the call fails with `focus_lost`, instead of
253
+ the button staying down for the rest of the hold (up to 10 s) under whatever is done next.
254
+ - `NORACU_TRACE`: a call that is refused before the tool runs — an unknown tool, a tool outside
255
+ `NORACU_READ_ONLY`'s list, invalid arguments, a browser input tool while the stop file exists — gets its line
256
+ too, with the code `unknown_tool`, `read_only`, `invalid_args` or `user_stopped` (such calls left no line).
257
+ The name of an unknown tool is the caller's text and is not written: its line has `unknown(<length>)`.
258
+ - **A tool call whose text holds U+2028 or U+2029 is answered.** The server read its input with a line reader that
259
+ also ends a line at those two characters, and JSON leaves them as they are inside a string: such a call (a
260
+ `mac_type` or `browser_type` of text copied from a web page, say) was cut in two, answered with parse errors
261
+ that carried no id, and never answered under its own — the client waited until its own timeout. A message
262
+ now ends at a line feed only.
263
+ - `phone_open`: an app name with a line break, a tab or another control character is refused before anything
264
+ is sent (the name is pasted into Spotlight as it is).
265
+ - `phone_key` and the clearing of a field before `phone_open` types: a key pressed by itself no longer picks
266
+ up a modifier that is held on the Mac's keyboard at that moment (with ⌘ down, Delete went out as ⌘Delete).
267
+ - `mac_set_value` on a pop-up: when no option matches and the menu that was opened for it does not close
268
+ again, the result says the menu may still be open (`delivery=unknown`) instead of "opened and closed again,
269
+ retry is safe".
270
+ - **A list item's texts identify it however deep they sit.** The snapshot collected an item's texts only four
271
+ levels below it, while the check before an action read them at any depth. A row whose texts were deeper
272
+ (common in web content) had no item key, so a list that was re-sorted or recycled could send a stale
273
+ `element_index` to another row's look-alike button; a row with texts on both sides of that line never
274
+ matched again (`element_no_longer_valid` on an unchanged window). Both sides read the same texts now.
275
+ - **Two unlabelled look-alike buttons in one list row stay tied to their row.** Both read the same row
276
+ texts, and a key that two look-alikes share was dropped as telling nothing apart — which left such
277
+ buttons identified by their place alone, so a list recycled in place sent a stale `element_index` to the
278
+ same button of another row. The key is kept now and must still match when the element is found at its
279
+ old place; it is only never used to pick one look-alike over another.
280
+ - `mac_ax_state` with `skeleton: true`: an element of such an outline is no longer taken to be the only one
281
+ of its kind (the outline stops three levels down and has not seen what lies below), so after it is gone
282
+ its `element_index` does not move to a same-named control deeper in the window.
283
+ - A look-alike control that moved is followed by its row's texts only when the whole window could be read.
284
+ When part of it did not answer, the one match that was read is accepted only where the element was (it
285
+ was accepted anywhere, though the real one may sit in the part that was not read).
286
+ - `mac_ax_state` / `mac_find` with `surface: "app"`: an element inside a window that has no window ID is
287
+ refused for `element_index` actions (`policy_denied`), as it already was when that window was read by
288
+ itself, and the result carries `window_identity: "unverifiable"`. Such an element used to skip the check
289
+ that it is still in the window it was seen in.
290
+ - `mac_menu_command`: a change in the focused element counts as the command's effect (`delivered_verified`)
291
+ only when the keyboard and mouse were not used since the item was pressed. A selection the person moved in
292
+ that moment was taken for the command's effect.
293
+ - **An element that had to be waited for is checked again before it is acted on.** A disabled control is
294
+ waited for (up to 30 s); a list can re-use the same accessibility element for another row in that time, and
295
+ the click, value or press then went to that row. After a wait the element is looked up once more and the
296
+ action is refused (`element_no_longer_valid`) when it is no longer the one that was asked for.
297
+ - **The client's Stop reaches a call that is already running.** `notifications/cancelled` was honoured only for
298
+ a call still waiting in the input queue. For a call whose tool had started it was ignored: a `browser_type` of
299
+ a long text went on typing for up to 40 s after the client had given the call up, and the result was sent
300
+ anyway. A cancelled call is no longer answered, and `browser_type` stops at the character it is on.
301
+ - **`browser_type` stops when the stop file appears.** `NORACU_STOP_FILE` was looked at before the call
302
+ only; a long text went on being typed after the person had put the file there. It is looked at before
303
+ each character now, and the result says how much had gone out.
304
+ - `browser_click`: when the click made the page navigate, the result says so and where the tab is now (as
305
+ `browser_fill` and `browser_scroll` do) — the snapshot's `element_index` values are gone with the page.
306
+ - `browser_snapshot`: the clickable-elements list does not go into shadow roots or frames; it now says so
307
+ when the page has any ("not listed: what is inside 1 shadow root(s)…"), instead of reading as a full list.
308
+ - **A physical click on a Finder desktop icon is refused while a window covers the icon.** The desktop is
309
+ below every window; with one of Finder's own windows over the icon and an inconclusive hit test the click
310
+ went ahead and landed on that window. Any window at the point now refuses it (`OCCLUDED`).
311
+ - `ios_launch`: a launch that timed out, or failed after `terminate_existing` may have stopped the app, ends
312
+ the `element_index` values read before it, as a launch that worked does.
313
+ - **`ios_*` input is not sent while Control Center covers the app.** With
314
+ Control Center pulled down, the app still reports that it is in front and
315
+ reads as usual, but a tap went to Control Center — on one of its controls it
316
+ would have switched it. Taps, swipes, keys and text now answer
317
+ `system_overlay` and send nothing while the iPhone shows something of its
318
+ own over the app. No runner rebuild is needed.
319
+ - **A session attached over a DevTools port (`NORACU_ALLOW_CDP`) never takes a
320
+ DevTools window as its active page.** When the app's own pages were closed,
321
+ or none was open at attach, the first page left could be a DevTools window;
322
+ keys sent to it go into its console and run as script, which
323
+ `browser_evaluate` needs `NORACU_ENABLE_EVAL` for. Such a window is not
324
+ counted as a tab and is not read or acted on. The same holds for the DevTools
325
+ front end that a DevTools port serves over http, in every kind of session:
326
+ the browser tools do not navigate to it, nor to any address on a DevTools
327
+ port this server opened or is attached to.
328
+ - **`browser_tabs` list does not return the title of a page the tools do not
329
+ read.** A tab that went to such a page (a `blob:` page a site made, a local
330
+ file a person opened in it) was listed with its title, which is page
331
+ content, and its whole address. It is now listed with `not_read:true`, no
332
+ title, and the first 60 characters of the address.
333
+
334
+ ### Changed
335
+ - `mac_ax_state` with `window` as a title: when no window has exactly that
336
+ title and one contains it (in any case), the answer reads that window, as
337
+ before, and now says so — `window.title_match: "partial"`.
338
+ - The first `browser_launch` on a Mac without Playwright's Chromium no
339
+ longer holds its answer for the whole download, which can take minutes —
340
+ longer than a client waits. After 20 s it answers `browser_installing`
341
+ while the download goes on; `browser_launch` again takes the browser once it
342
+ is there, and reports a download that failed in the meantime.
343
+ - `mac_screenshot` says when Screen Recording looks not granted to the app
344
+ that runs noracu (no other app's window title can be read):
345
+ `screen_recording_note` in its meta says the image then holds the desktop
346
+ picture and that app's own windows only, and where to turn the permission
347
+ on. Once seen granted, it is not checked again.
348
+ - **The client's Stop reaches `mac_wait` and `phone_type`.** When the client
349
+ cancels a call (`notifications/cancelled`, e.g. its Stop button), a running
350
+ `mac_wait` ends its accessibility wait and a running `phone_type` ends imctl
351
+ at once, as a timeout does: `phone_type` puts the clipboard back only if the
352
+ paste had not gone out yet. Neither call is answered, as before. With
353
+ `NORACU_TRACE`, a cancelled call is logged as an error with code
354
+ `cancelled`, or `cancelled_queued` if it was still waiting in the input
355
+ queue (such a call had no line before).
356
+ - A physical click refused because the element's window has no window ID no
357
+ longer says to use "mechanism auto" — under `auto` a click is physical only
358
+ when the element has no accessibility action, so that advice led back to the
359
+ same refusal. It names `mechanism: "semantic"` for an element that has an
360
+ action, and bringing the window forward otherwise.
361
+ - **`ax_empty` says when an app's windows are off screen.** An app whose windows
362
+ are all on another Space (or minimized, or hidden) gave the same `ax_empty` as
363
+ an app with no window at all. The answer now says how many of the app's windows
364
+ the window server lists off screen, points to `mac_windows` with
365
+ `include_offscreen: true`, and says that `mac_app` `activate` may move the
366
+ person's desktop to that app; an app with no window open says so. Windows on
367
+ another Space still cannot be read.
368
+ - `ios_launch`, `ios_home`, `ios_type` and input by `element_index`: a read made inside the call — whether the app
369
+ came to the front or left it, the text fields around the typed text, the element read again before the input —
370
+ no longer starts the runner when it has stopped meanwhile. A runner that starts puts its own app in front of the
371
+ screen the call is about; the result now says what could not be read, and the next call that asks for the
372
+ iPhone starts the runner.
373
+ - **`initialize` answers in the protocol revision the client asked for** —
374
+ 2024-11-05, 2025-06-18 or 2025-11-25 (it always answered 2024-11-05). A
375
+ client that asks for 2025-03-26 gets 2024-11-05, because that revision
376
+ requires a server to accept JSON-RPC batches and noracu does not; any other
377
+ version gets 2025-11-25.
378
+ - **Keystrokes and pastes wait for the person at the Mac right before they go
379
+ out, as clicks do.** `mac_key`, the keystrokes of `mac_type`, `mac_paste` and
380
+ the wheel event of `mac_scroll` on an element had only the check made when the
381
+ call left the queue. When `mac_type` clicks first and the person takes over
382
+ before the keystrokes, the result says that the click went out
383
+ (`delivery=unknown, retry=unsafe`).
384
+ - **`browser_fill` requires `value`.** A call without it (the text passed under
385
+ another name, say) used to empty the field and report `delivered_verified`.
386
+ An empty string still clears the field when it is given.
387
+ - **The README is short now.** What it does, the quickstart, how it behaves, what it does not protect against,
388
+ non-goals and links. Troubleshooting moved to `docs/troubleshooting.md`, the iPhone setup, requirements and
389
+ known limits to `docs/iphone.md`, the list of defaults and switches to `SECURITY.md`; the environment
390
+ variables were already in `docs/usage.md`. The Chinese README follows the same outline.
391
+ - **The Chinese README is at `docs/README.zh-CN.md`.** npm takes a package's
392
+ page from a README file in the package folder and showed the Chinese one for
393
+ 0.3.0; the folder now holds `README.md` only, and the pack check enforces it.
394
+ - **Bug reports no longer need a clone.** The issue form asks for the tool and
395
+ the text it returned; `npm test` output is optional, and there is a short
396
+ form for an app or site that noracu handles badly.
397
+
398
+ ### Fixed
399
+ - With the Dock set to hide and show automatically, a Dock that has popped up
400
+ now counts as covering what is under it, so a physical click there is
401
+ refused (`occluded`) instead of landing on a Dock icon. macOS keeps no strip
402
+ for such a Dock; noracu now reads where its tiles are drawn.
403
+ - The `system_overlay` refusal (XCUITest backend) no longer says that what
404
+ covers the app is Control Center, which it cannot tell; it says to look again
405
+ in a moment, and that `ios_home` would leave the app for the Home Screen.
406
+ - `mac_type` with `element_index` and an `app` name that two running copies
407
+ share types into the element when its process is one of them. It answered
408
+ `ambiguous_app`, although the index already names the process.
409
+ - `mac_wait` `app_running` / `app_gone` with an app name that several running
410
+ copies share: the app counts as running, so `app_gone` waits until none is
411
+ left. Both answered `ambiguous_app`.
412
+ - `mac_notifications` finds the menu-bar clock (which opens Notification
413
+ Center's history) by its accessibility identifier, or an item named exactly
414
+ "Clock". Any menu-bar extra whose name contained "clock", such as a timer,
415
+ could be taken for it.
416
+ - `mac_window` raise says `delivered_verified` only when the window became its
417
+ app's main window and is not minimized. Any change to the window counted,
418
+ so a raise that only took the window out of the Dock was reported as
419
+ verified.
420
+ - A window whose attributes the app did not answer for is never the window a
421
+ Mac snapshot picks by default (it read as an untitled window that was not
422
+ minimized), and window lists in errors mark it `unreadable`.
423
+ - An input tool that fails in a way noracu did not plan for (an exception)
424
+ answers `internal_error: … (delivery=unknown, retry=unsafe)`. It answered
425
+ the bare exception text, with nothing about what had been sent.
426
+ - `mac_scroll` on an element looks once more, right before the wheel event,
427
+ at what is on top at the element's point, as a click does. A window that
428
+ came up there since the hit test is no longer scrolled (`occluded`, nothing
429
+ sent).
430
+ - A physical click or drag made while the pointer's position could not be
431
+ read went out and left the pointer where the click put it, without saying
432
+ so. The result now says the pointer was not put back.
433
+ - A `phone_*` input whose driver could not import its modules (pyobjc
434
+ missing) sent nothing; it no longer counts as noracu's own input of that
435
+ moment, so the person's keyboard or mouse use then still makes the next
436
+ input wait for them first (`user_active` if they go on).
437
+ - `mac_type` with `element_index` and an `app` the element does not belong to
438
+ is refused before anything is written. The check ran only before physical
439
+ keystrokes; through accessibility (the default) the text went into the
440
+ element whatever app was named.
441
+ - `mac_set_value` on a pop-up menu: when the press on the option did not
442
+ answer and the control already showed that option before, the result was
443
+ `delivered_verified`. It is now `delivered_unverified`, with a note.
444
+ - `mac_ax_state` / `mac_find`: `web_accessibility: "unsupported"` (the window
445
+ holds no web content the app exposes) is said only after the whole window
446
+ was looked through. A window too large to look through in time answers
447
+ `"unknown"`, with the same hint.
448
+ - XCUITest backend: stopping a runner whose `xcodebuild` had already exited
449
+ no longer signals its process group (TERM, then KILL 3 s later). By then
450
+ that pid could belong to another process.
451
+ - XCUITest backend: a call to the runner that was in flight when the
452
+ connection was closed (the runner stopped, the server shutting down) is
453
+ answered at once; it waited for its own timeout, up to 30 s.
454
+ - XCUITest backend: the size limit on the runner's answers held only for an
455
+ answer still waiting for its newline; a whole line over the limit was read.
456
+ Both now end the connection (`runner_protocol`).
457
+ - `mac_ax_state` with `surface: dialog` or `alert`, for an app with several
458
+ windows and none focused: a dialog that is a window of its own is read when
459
+ it is the only one, instead of answering `ambiguous_window` before looking.
460
+ - `mac_ax_state` and the tools that pick a window: an app whose window list
461
+ did not answer (busy or hung) is reported as `app_unresponsive`. It was
462
+ reported as having no window open, or its windows being minimized or on
463
+ another Space.
464
+ - `ios_home` looks at `NORACU_STOP_FILE` again right before the press: the
465
+ read of the app's state before it can take up to 10 s after the input
466
+ queue's own check, and a stop file made meanwhile did not stop the press.
467
+ - `noracu ios-setup` with `NORACU_IOS_RUNNER_DIR` set to a folder that is
468
+ already there no longer changes that folder's mode to `0700`; the device
469
+ folder it makes inside is still private.
470
+ - `mac_app` `unhide`: when the app's hidden state could not be read
471
+ afterwards, it was taken for "not hidden" and the call reported
472
+ `delivered_verified`. An unread state now gives `delivered_unverified`
473
+ (and `hidden: null`); `hide` likewise.
474
+ - `phone_find` prefers a label that reads exactly the text: "X" finds the app
475
+ X, not the "Xcode" listed above it. A label that only contains the text
476
+ still stands in when none reads it exactly.
477
+ - `phone_type` with `replace: true` that a clipboard change stopped before
478
+ the paste said "nothing was typed"; it now adds that ⌘A had already
479
+ selected the field's text.
480
+ - `phone_open`: when Spotlight could not be opened, the answer is
481
+ `spotlight_unavailable: …`, which says the steps before it may have gone
482
+ out. It was an uncoded line that a warning from the driver could hide.
483
+ - `phone_open`: a capture that failed partway through answered only "could
484
+ not capture the iPhone Mirroring window". It now says the steps before it
485
+ may have gone out and Spotlight may still be open, and to look before
486
+ retrying.
487
+ - `phone_*` input: when iPhone Mirroring quit while noracu brought it forward,
488
+ the answer said its state was unknown (`mirror_state_unknown`); it now says
489
+ it is not running, as when it was not running to begin with. Nothing is sent
490
+ either way.
491
+ - `phone_swipe` / `phone_scroll`: "a swipe moved clear of the window's margin
492
+ and left shorter than about 10 pt is a press, not sent" is measured in the
493
+ mirror window's own size; it assumed the 280 × 620 pt window it was first
494
+ measured on.
495
+ - `phone_type` of a single character: a sighting in the banner strip at the
496
+ top of the screen, where a notification can carry the character, no longer
497
+ confirms it, as it already did not for a longer text.
498
+ - iOS runner: a listener still waiting for the network (the device tunnel
499
+ coming up) is waited for, instead of ending the start at once with
500
+ `bind_failed`; when it never comes up, `bind_failed` names every state it
501
+ went through. A listener that goes away after the runner is up ends the
502
+ runner (`listener_failed`) instead of leaving it running for 12 hours with
503
+ nothing listening.
504
+ - iOS runner (XCUITest backend; rebuild the runner after upgrading — `noracu
505
+ ios-setup`): a bind address that parses but is not one the runner listens on
506
+ (`0.0.0.0`, `::`, a Wi-Fi address) is reported as `bad_bind`; it was
507
+ `bad_port`.
508
+ - `phone_*`: an x or y of 1.0 is the mirror window's last point, not the
509
+ first point past its edge.
510
+ - `phone_open`: when OCR misread a letter of the app's name in Spotlight's
511
+ search field, Spotlight was taken for gone after the tap, and the app could
512
+ be reported as opened while Spotlight still showed. The field is now matched
513
+ as its echo is (a letter off still counts from 6 characters, two from 14).
514
+ - `mac_ax_state` with `root` and any of `app`, `window`, `window_id` or
515
+ `surface` is refused. A `root` is an element of an earlier snapshot and
516
+ names its app and window; the others were not looked at.
517
+ - `mac_window` with a `window_id` and an `app` that does not own that window
518
+ is refused (`invalid_args`, nothing done). Before, the `window_id` won and
519
+ the `app` was not looked at.
520
+ - `phone_*`: when iPhone Mirroring lists another of its standard windows (a
521
+ near-square one, such as a settings or welcome window) ahead of the phone's,
522
+ reading the window's position, checking for an overlay and clicking Resume
523
+ use the window shaped like a phone. Before, they used the first one listed.
524
+ - `phone_*` input: while the pointer rests on the mirror window's top edge, an
525
+ empty group in the window is no longer taken for the window's toolbar. It
526
+ may be an overlay that has not drawn its content yet, so the mirror does not
527
+ read as live and nothing is sent (`mirror_not_live`).
528
+ - A `tools/call` under a request id that another call is still using is refused with a JSON-RPC error. It took
529
+ over the first call's entry, so a cancellation meant for one could stop the other. The refusal comes before
530
+ anything else is answered for that call — a tool this server does not have, arguments that do not validate,
531
+ the stop file — so no tool result goes out under the id before the first call's.
532
+ - A request of more than about 4 million characters on one line is dropped unread and answered with an error
533
+ (`request too large`); before, the server kept whatever a client sent without a line end.
534
+ - `phone_open` and `phone_type` report `delivered_verified` only for the driver's own confirmed result
535
+ ("opened '<app>'", "typed <n> chars"). Any other line the driver ends successfully with was verified unless
536
+ it matched a list of known "not confirmed" wordings; it is `delivered_unverified` now.
537
+ - `mac_click` with both `element_index` and `x`,`y`, and `browser_click` with more than one of `element_index`,
538
+ `selector` and `xy`, are refused (`invalid_args`): one was used and the other dropped without a word. A
539
+ `snapshot_id` given to `mac_click`, `mac_scroll` or `mac_type` without an `element_index` is refused as well —
540
+ it was ignored.
541
+ - `browser_navigate`: when the server answers with an error status (404, 500 …) the result says that an error
542
+ page loaded, next to the status code. The navigation itself is still reported as delivered.
543
+ - **`mac_wait` no longer reports something gone while the app is not
544
+ answering.** An app that did not answer in time read as having no windows, no
545
+ sheet, no open menu and no text, so `window_gone`, `sheet_gone`, `menu_closed`
546
+ and `text_gone` were met at once. The wait now goes on until the app can be
547
+ read. `value_equals` and `value_contains` are no longer met by an element
548
+ that has no value.
549
+ - **`mac_ax_state` of a window that closed as the snapshot started is an
550
+ error** (`element_no_longer_valid`), not an empty tree marked complete.
551
+ - **`mac_scroll` says an element was scrolled into view only when it is.** The
552
+ accessibility action returning success was reported as "scrolled into view"
553
+ without looking; what can be seen of the element (cut by its window and by
554
+ scroll areas above it) is now read afterwards.
555
+ - **After `mac_scroll` on an element, the next input is not refused as
556
+ `user_active`.** The wheel event was not recorded as noracu's own.
557
+ - **`mac_scroll` reports `delivery=not_delivered, retry=safe` when the wheel
558
+ script could not be started** (it said `unknown`). A script that did start
559
+ and failed is still `unknown`.
560
+ - **`browser_fill` does not report `delivered_verified` from a page it did not
561
+ fill.** When the fill made the page navigate, the value read back could be
562
+ that of a field on the next page. The result now says that the page navigated
563
+ and is `delivered_unverified`.
564
+ - **`browser_type` stops when its time runs out.** Typing that outlasted its
565
+ time (a page answering each key slowly) returned an error while the rest of
566
+ the text kept arriving, into whatever had the focus by then. The remaining
567
+ characters are no longer sent, and the error says how many went out. Typing
568
+ also stops when the tab turns into a page noracu does not act on.
569
+ - **`browser_scroll` reports `delivered_verified` only when the page moved the
570
+ way that was asked.** Any change of the scroll position counted — also one
571
+ the other way, or the jump to the top that a navigation brings.
572
+ - **A physical click on a menu item is not sent when its menu closed in
573
+ between.** For an element with no window of its own, the check made right
574
+ before the click only looked at which app owned the window on top, so the
575
+ click could land on the app's own window under the menu, or on the desktop.
576
+ The window on top must now be the one it was at the hit test. Physical clicks
577
+ on menu bar items, which were always refused as covered, go out.
578
+ - **`ios_type` with `element_index` takes a text field only.** Given the index
579
+ of a button or a row it pressed that element and then typed into whatever
580
+ held the keyboard. It now answers `not_a_text_field` and sends nothing.
581
+ - **Releasing a stuck modifier no longer clears the modifiers the person is
582
+ holding.** The extra release after a key chord went to every modifier of the
583
+ chord with all flags cleared; it now goes only to a modifier that is still
584
+ set and keeps the other flags.
585
+ - **A press that did nothing is not `delivered_verified` because another
586
+ window's title changed.** For an action on an element, the app's window list
587
+ counts as evidence only when a window opened, closed or changed kind, or when
588
+ the element's own window's title changed.
589
+ - **An app that stops answering before an action is reported as
590
+ `app_unresponsive`**, not as a vanished element; an app that has exited is
591
+ still a vanished element.
592
+ - **`mac_paste` without the Accessibility permission returns the permission
593
+ error** before the clipboard is touched, instead of `delivered_unverified`.
594
+ - **`browser_snapshot` lists controls nested deeper than 20 elements.** The walk
595
+ behind the clickable-element list stopped 20 levels under `<body>` without
596
+ saying so; it now goes 64 deep and says when a page is deeper than that.
597
+ - **iPhone (XCUITest): a refusal for a system prompt says how to see it.**
598
+ When input is not sent because a system prompt is up (`system_alert`), the
599
+ message now also says to look at it with `ios_screenshot`, so the client can
600
+ tell the person what the prompt asks before they answer it on the phone.
601
+
602
+ ### Docs
603
+ - Tool descriptions: `browser_click` takes exactly one of `element_index`,
604
+ `selector` or `xy`; an `app` argument takes `pid:<n>` too, and
605
+ `ambiguous_app` says to pick one that way (the server's instructions and
606
+ `mac_ax_state`); `snapshot_id` goes only with `element_index`; `root` goes
607
+ alone. The `mac_click`, `browser_tabs` and `mac_ax_state` descriptions are
608
+ shorter; the tools work as before.
609
+ - The Screen Recording permission is called **Screen & System Audio
610
+ Recording** on macOS 15 and later (录屏与系统录音 in Chinese); the README,
611
+ its Chinese version, usage and troubleshooting say so. A screenshot taken
612
+ without it shows the desktop picture without other apps' windows, or comes
613
+ back black; the docs said only black.
614
+
615
+ - `docs/iphone.md` names the paste prompt iOS shows when an app reads the
616
+ clipboard: while it is up, `ios_*` input answers `system_alert`.
617
+ - README: the quickstart starts with `npx noracu --doctor`, lists three
618
+ read-only things to try and links the issue forms; the first picture's caption
619
+ and the Browser row say what working in your own Chrome needs; it says that
620
+ noracu is device-tested only on Apple silicon Macs running macOS 27.
621
+ `docs/README.zh-CN.md` follows.
622
+ - **`docs/known-issues.md`** (new): where noracu was tested and where not (one
623
+ Apple silicon Mac on macOS 27.2; no Intel Mac, no macOS 15 or 26), limits such
624
+ as windows on another Space, what is known and not fixed in this version, and
625
+ what was changed without a new run on a real machine.
626
+ - **`docs/apps.md`** (new): the apps noracu was run against, each with what was
627
+ exercised and the record of it, and how to report one more app with the issue
628
+ form — no clone needed. `CONTRIBUTING.md` starts with the same.
629
+ - `docs/iphone.md`: a Live Activity in the Dynamic Island was checked — it does
630
+ not get input refused.
631
+ - `server.json` declares eight of the environment variables (observation-only
632
+ mode, the layers, the stop and approval files, the deny list, the idle wait,
633
+ the two opt-in switches), so a registry page can show them.
634
+ - **The error reference names every code.** `docs/usage.md` listed about half of
635
+ the codes an answer can open with; `ambiguous_app`, `user_active`,
636
+ `eval_disabled`, the `browser_tabs` and DevTools-port refusals, the approval
637
+ and stop-file errors and the XCUITest runner's codes were not in it. They are
638
+ now, each with what it means and what to do next, and a test
639
+ (`test/docs-codes-unit.mjs`, part of `npm test`) fails when the source can
640
+ answer a code the reference does not name.
641
+ - `docs/usage.md`: the environment table has rows for `NORACU_ENABLE_EVAL`,
642
+ `NORACU_PHONE_BACKEND`, `NORACU_IOS_UDID` and `NORACU_IOS_RUNNER_DIR`.
643
+ - `docs/architecture.md` no longer names an old Playwright version, counts the
644
+ 21 tools of observation-only mode (it said 18, without the `ios_*` ones) and
645
+ says that `browser_tabs` selects tabs (it said there was no tab switching).
646
+
3
647
  ## [0.3.0] — 2026-11-15
4
648
 
5
649
  Background input, a stop switch and per-app input rules, and clicks by
@@ -190,7 +834,7 @@ screenshot pixels.
190
834
 
191
835
  ### Fixed
192
836
 
193
- - **Deep code audit (S5A), 2026-11-14.**
837
+ - **Deep code audit, 2026-11-14.**
194
838
  - The stop file, a cancelled request and a server shutdown are checked
195
839
  again right before an input runs: after the read of the time since the
196
840
  last keyboard or mouse event, and after waiting for an earlier phone
@@ -234,7 +878,7 @@ screenshot pixels.
234
878
  `mac_status`), the note that the server is older than its files on disk
235
879
  now comes in a text block of its own after it; before, it was put in
236
880
  front of the JSON, which then no longer parsed.
237
- - **Formal pre-release review (S4A), 2026-11-13.**
881
+ - **Formal pre-release review, 2026-11-13.**
238
882
  - iPhone, XCUITest backend: no input goes to an app while a system alert (a
239
883
  permission prompt) is up, or while SpringBoard cannot be read
240
884
  (`system_alert`, nothing sent); the runner listens only on loopback or the
@@ -260,7 +904,7 @@ screenshot pixels.
260
904
  instead of verified when it did not see it; closing in your Chrome waits for
261
905
  the disconnect and counts only tabs noracu's close reached; a session with
262
906
  no tab left answers `no_active_page` with what to do.
263
- - **Second review (S4B) and the device run of 2026-11-14** (iPhone 16 Pro, iOS 27.2.1).
907
+ - **Second review and the device run of 2026-11-14** (iPhone 16 Pro, iOS 27.2.1).
264
908
  - iPhone, XCUITest backend: taps, long presses and drags go out without
265
909
  XCTest's wait for the app to go idle — with a context menu up (a
266
910
  long-pressed note in Notes), a tap went out in about a second instead of