@@ -61,6 +61,7 @@ remaining native acceptance scenarios separately.
6161- ` desktop_host/observation.rs ` , ` observation_cache.rs ` — observation identity and bounded screenshot geometry; never input authority
6262- ` desktop_host/state.rs ` — derived host feedback and view caches
6363- ` macos_* ` / ` windows_* ` — platform AX, capture, list-apps, shortcuts
64+ - ` macos_ax_dispatch ` — per-element AX thread routing and native exception boundary
6465- ` windows_capture.rs ` — WGC frame conversion and authoritative window bounds
6566- ` windows_wgc_capture.rs ` — Windows.Graphics.Capture (Direct3D11)
6667- ` windows_window_target.rs ` — Win32 window facts and portable default-target policy
@@ -111,6 +112,26 @@ inputs that can name a screenshot_id require one after a zoom.
111112
112113## Target-local macOS focus acceptance
113114
115+ AX walks and cached-node operations run on a blocking worker. Route each native
116+ message by the element's serving PID through ` macos_ax_dispatch ` : same-process
117+ AppKit callbacks require main, while WebKit subprocess messages need main free
118+ to answer synchronous IPC, including AX client authentication. Never dispatch an
119+ entire walk based on its root PID; a single tree spans both processes.
120+ ` AXUIElementGetPid ` reports the presenter for WebKit descendants; thread routing
121+ uses dynamically resolved ` _AXUIElementGetActualPid ` . Keep the presenter PID for
122+ target/permission validation. If the serving-PID SPI is unavailable, report an
123+ explicit unsupported state instead of guessing a thread. Keep the
124+ control token across same-process dispatch and catch Objective-C exceptions on
125+ the executing thread. Recheck input authority there before actions or user
126+ attribute writes, because Stop may revoke a queued message. Observation-only
127+ AX enablement does not acquire input authority. Enigo / HIToolbox input retains
128+ its main-thread wrapper.
129+
130+ Cross-process AX proxies can advertise a writable ` AXSelectedText ` whose setter
131+ does nothing (WebKit). Select the existing directed-keyboard route before
132+ submission for these proxies; native controls retain AX insertion at the current
133+ selection. Never retry a submitted text write based only on unchanged AX state.
134+
114135The directed-input route can change a target application's internal
115136focus without changing the human foreground application. Its window-addressed
116137focus pair at local ` (-8,-8) ` must remain outside content; the requested gesture
@@ -187,6 +208,9 @@ node scripts/test-macos-input-controls.mjs --latency
187208node scripts/test-macos-input-controls.mjs
188209# Full Tool -> provider -> native loop on a dedicated window, with main-thread runloop.
189210node scripts/test-macos-control-roundtrip.mjs
211+ # Same-process AppKit + real WebKit subtree: observe, capture, image/node clicks,
212+ # exact text, actual DOM results, shortcuts and Stop; external deadlock watchdog.
213+ node scripts/test-macos-computer-use-self.mjs
190214# Same-process popup panel over a dedicated window, once as an attached child
191215# window (inherits layer 0) and once at the pop-up menu level: composited pixels
192216# and auxiliary metadata, popup-routed press without focus preparation
0 commit comments