Repository navigation
feat(desktop): bots click, type, choose and scroll in the owner's apps, through accessibility - #174
Merged
Merged
Conversation
…s, through accessibility D2 (spec 24.5, 24.6): desktop_click, desktop_type, desktop_select and desktop_scroll act on a control of the bot's last reading (kept per bot in the daemon), found again by its RuntimeId, through UI Automation's patterns, without the owner's mouse or keyboard. Using an app is its own grant: the first action asks the owner, with the bot's why, to use it (level act), and a see grant goes up. A click is the first of Invoke, Toggle, Select and Expand/Collapse; typing is Value.SetValue, never in a password or read-only field; choosing selects the item where it shows, or opens a combo box and takes its default action, since a classic combo box cancels a choice closed any other way; scrolling uses Scroll or ScrollIntoView. Calls into the app have 5 seconds, so a dialog does not hang the bot; it reads that the app did not answer. Each action answers with the window read again, title included. One UI Automation session at a time in the process: two at once fail (seen on Windows 11). The app's request card says "wants to use" and what using means, and the four tools have names in the three languages. Tested with real controls: a click renaming the window, typing, a check box, a combo box, a long list scrolled, a password field refused, a control gone; end to end, seeing then using an app, each asked once.
httpsphl
enabled auto-merge
October 4, 2026 22:13
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.
What
D2 (spec 24.5, 24.6): bots act in the owner's apps through UI Automation, without the owner's mouse or keyboard.
desktop_click {ref},desktop_type {ref, text},desktop_select {ref, option}anddesktop_scroll {ref, to?}. Each also takeswhy?, which is needed only the first time in an app.desktop_look, or the reading an action returns). Before acting, the control is found again by itsRuntimeId. A control that is gone or disabled is refused with a clear message.level: "act"), showing the bot's why. Allowing it raises the existing see grant. Without a why at that moment, the tool asks for one.Value.SetValue. It refuses password fields (before asking anything) and read-only fields. Enter after typing comes with the real keyboard in D4.LegacyIAccessible.DoDefaultAction). A classic Win32 combo box cancels a choice when its list is closed any other way, the same as pressing Esc. I saw this on Windows 11.ScrollorSetScrollPercent; for a list item,ScrollIntoView.TransactionTimeout). A click that opens a dialog does not hang the bot; it reads that the app did not answer in time.Clicked button "Save".uia_control.rs.Checks
cargo fmt,clippy -D warningsandpnpm checkpass (395 tests).cargo test --workspacepasses. Two real-browser tests (browser_panel,command_requests) failed while a release build ran on the same machine, and both pass on their own.act_tests.rs):tests/desktop.rs):Manual check on the real app