Repository navigation
feat(macos): re-identify refs through the element's own accessibility address - #441
Merged
Merged
Conversation
…pture rule macOS refs now carry a retained object from the accessibility remote-token calls, looked up at runtime: a ref resolves to that exact element in a later process, and a dead or mismatched one returns STALE_REF without a search. Refs without one resolve only when they were unique over complete evidence at capture and exactly one live element matches the same predicate now; anything else is refused. Linux paths and Windows runtime ids no longer count as identity. The in-memory retained session from the removed host is deleted.
…busy reads, resolve anchors by token
…m each landing The census now reads the observed evidence, so a twin holding an id second-hand or an unread field still counts. A path landing is re-checked against the recorded predicate before it is used, a resolution under a held lease reuses it, and shell-surface refs find their container again.
Tokenless refs already go through the shared capture rule in core, so the macOS path fast path and broad search had no CLI caller left. FFI find now lands its fresh match through the locator anchor on every platform.
Saved refs on Windows resolve through core's capture rule and the locator anchor, and FFI find lands through the anchor too, so the strict path walk, broad search, tie-break and chrome repair tiers were dead. The verified process stamp check moved into an anchor test.
… read A shallow capture without element tokens now reads the whole window once, counts uniqueness there, and presents its skeleton or subtree cut from that same read, so skeleton anchors and drilled refs can resolve on Linux and Windows. A drill reuses the walk its root resolution performs. Captures whose refs all carry element tokens keep their single walk.
… substitution macOS ships bash 3.2, which cannot parse a case pattern's closing paren inside $( ), so the assertion failed with a syntax error even though the hint was right.
…rills to their own capture Pre-dispatch validation compared only a native id, so a recycled Linux path with new text could still take the action. A re-drill compared paths across captures and could prune its own root. Drill depth now counts from the drilled element, and a cut boundary that can never become a ref no longer forces a whole-window read.
The ref churn checks were skipped while a removed row's ref could land on its surviving neighbour. Element tokens fix that, so the checks run again, and the CHANGELOG limitation becomes the fix it now is.
Contributor
|
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
… the lease for final pointer checks Interval typing reused one handle after the first keystroke, so a replacement element could take the rest of the text; each keystroke now repeats the live identity check under its lease. Final hover and drag checks dropped the held lease and could wait on it again, and a tokenless drill skipped the depth validation every other snapshot runs.
… came from find materialized every tokenless ref with unique_at_capture false, so a unique match could not be used on Linux or Windows. It now runs the same census over its own observation when that observation is a complete whole-window read.
… Windows, prove rooted find refs Linux menu refs scope a tokenless entry to the open popup instead of refusing it, and tests that relied on an AT-SPI path as identity now refuse replacements through the predicate. Windows anchors land by position and leave identity to core's full-predicate check. A tokenless find --root evaluates over the whole-window read its root resolution performs, so its refs carry that read's capture proof.
…andings in FFI find, popup-bound menu refs Every tokenless ref is now proven by its own recorded predicate over the whole-window read it was published from, at snapshot, drill, find and hydration alike. FFI find re-identifies a landed handle before publishing it. A Linux menu ref keeps its popup binding through positional landing and is refused without it.
…e exhaustive check, align docs The exact-entry FFI calls now always refuse, so the ABI major moves to 7 and the docs say so. Capture proof and tokenless resolution share one ObservedTree::is_exhaustive check, LivePredicate moves to its own file, and AGENTS.md, the CHANGELOG, the Linux skill and the Windows twin E2E leg describe the capture rule as shipped.
…dentified A boundary container is offered as a drill anchor only when it carries an element token or the capture proof found it once, so twins and unread windows no longer hand out anchors that fail when drilled.
The Linux and Windows capture rule moves to a stacked follow-up. This leaves the macOS element-address resolution on top of the existing resolvers, with the core and the other platforms as they were before this branch.
This was referenced Nov 1, 2026
ctate
approved these changes
Nov 1, 2026
ctate
approved these changes
Nov 2, 2026
lahfir
added a commit
that referenced
this pull request
Nov 2, 2026
lucamaraschi
added a commit
to lucamaraschi/agent-desktop
that referenced
this pull request
Nov 3, 2026
Main removed the macOS command host (vercel-labs#414) and re-identifies tokenless refs through a capture rule (vercel-labs#441, vercel-labs#442). - Every command is now its own process on macOS too, so the policy layer drops the host forwarding of AGENT_DESKTOP_POLICY_DIR, reads it directly, and the one-shot checkpoint test runs on macOS as well. - A ref action now finds the ref's app and window before it reads the element, so the policy scenario desk lists each seeded ref's app and window and counts the element read at observe_tree. - The live window_at_point grid test accepts the owner's name over another user's window when the hit test can read that owner's identity (root's loginwindow), as well as the refusal.
lucamaraschi
added a commit
to lucamaraschi/agent-desktop
that referenced
this pull request
Nov 4, 2026
Main removed the macOS command host (vercel-labs#414) and re-identifies tokenless refs through a capture rule (vercel-labs#441, vercel-labs#442). - Every command is now its own process on macOS too, so the policy layer drops the host forwarding of AGENT_DESKTOP_POLICY_DIR, reads it directly, and the one-shot checkpoint test runs on macOS as well. - A ref action now finds the ref's app and window before it reads the element, so the policy scenario desk lists each seeded ref's app and window and counts the element read at observe_tree. - The live window_at_point grid test accepts the owner's name over another user's window when the hit test can read that owner's identity (root's loginwindow), as well as the refusal.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
STALE_REFonce it is gone._AXUIElementRemoteTokenCreategives the element, looked up at runtime. A later command rebuilds that exact element with_AXUIElementCreateWithRemoteToken.probes/macos/FINDINGS.mdM1-11).Speed (ms, native binary)
get @ref#414get @refthis PR