Expand description
Desktop: look at and control a native app, with the user’s consent for each app (docs/specs/SPEC_DESKTOP_DRIVING_2026_10_20.md §5.1).
The last rung of the ladder: connectors, an app’s own API, Browser,
Terminal and UI come first. Every action but apps and wait asks
srv’s gate (/api/v1/agent/desktop/authorize) first; srv answers from the
grants, the blocklist, the limits and Stop, and asks the user in the app
when there is no grant. The tool then acts (desktop_input) and tells srv
what happened, for the audit log.
Structs§
- Captured 🔒
- What a
lookmade: the image’s path and hash, and either the whole window’s look or the zoom of a region. - Drag
Args 🔒 - A drag’s two ends, the points it passes through, and what it holds, read from the call’s arguments.
Enums§
- Asked 🔒
- What srv answered about one window in a call that asks for several.
- Capture
Kind 🔒
Constants§
- FRAME_
HOST 🔒 - The process that hosts every Windows Store (UWP) app’s window.
- MAX_
LISTED 🔒 - Windows
appslists at most. - MAX_
REQUEST_ 🔒WINDOWS - Windows one
requestcall may name. - UNIDENTIFIED_
STORE_ 🔒APP - Why a Windows Store app’s window can’t be used right now.
Functions§
- app_
label 🔒 - The app’s name as shown: the executable’s file name without
.exe. - apps 🔒
- authorize 🔒
- Ask srv whether
actiononwmay go ahead. Returns the grant’s id, or srv’s reason as an error. It never waits for the user: with no grant srv asks them and answerspendingat once, and their answer reaches the agent as an [AgentMux] note. - call 🔒
- click 🔒
- drag 🔒
- drive 🔒
- What every input action does after the gate: bring the window forward and
check every point isn’t covered, run
actwith the points’ screen positions, and record the outcome. - find_
window 🔒 - A window by the id
appsgave. Only a foreign app of the user’s own can be driven (spec §5.3); the others are refused with where to go instead. - int_arg 🔒
- key 🔒
- look 🔒
- parse_
drag 🔒 - Read a drag’s arguments. Refuses what can’t be a drag, with the fix.
- parse_
region 🔒 regionof alook: x, y, w, h in the pixels of the last look.- post 🔒
- read_
answer 🔒 - Sort srv’s answer to one window of a
requestcall. - record 🔒
- Tell srv what an authorized action did. Best effort: the action has happened (or failed) either way.
- release 🔒
- request_
many 🔒 - Ask for several apps in one call. Each app is its own request to the user, with its own card,
countdown, veto and grant; nothing about one decides another. What is shared is the answer: one
[AgentMux]note names every app as allowed, declined or vetoed once all have been decided. - request_
windows 🔒 - The windows a
requestcall names, without repeats, at mostMAX_REQUEST_WINDOWS. - screen_
point 🔒 - The screen point for image point (x, y) of window
id, from its last look. Errors say what to do (look again, stay inside the image). - scroll 🔒
- type_
text 🔒 - wait 🔒
- window_
id 🔒 - window_
ref 🔒 - The window as srv names it. The app is what grants, denials and the
blocklist key on, so a Windows Store app is named by its own executable,
not by
ApplicationFrameHost.exe, which hosts all of them: a grant for Calculator must not cover every other Store app, and a Store password manager must stay blockable by name. When the hosted app can’t be found (it is suspended while minimised), the window is refused, never keyed on the frame host. - with_
look 🔒 - After an action that asked for it (
look: true), the fresh look at the window, appended to what the action said: one call instead of three. A look that fails doesn’t fail the action, which has happened.