Expand description
The routes behind Desktop (docs/specs/SPEC_DESKTOP_DRIVING_2026_10_20.md
§5.4–5.10, §6). srv is the single gate: the MCP tool asks authorize
before it looks at or touches a native app, and srv answers from the
grants, the blocklist, the limits and the Stop flag in
backend::desktop_gate. The user’s answers (a prompt, Stop) come only
through the host (/api/v1/host/desktop_request, /desktop_stop), which
agents can’t impersonate.
Structs§
- Grant
Target 🔒 - What a desktop-control request was filed for, by the request’s id: the agent, its pane, the app and the minutes, which the countdown’s end turns into the grant.
- Host
Desktop 🔒Stop - Policy 🔒
Constants§
- ACTIONS 🔒
- Actions
authorizeis asked about. - MAX_
TARGETS 🔒 - The most targets remembered at once.
- OFF 🔒
Statics§
Functions§
- asker_
uid 🔒 - The uid of the agent that is calling: from its token, else from the running agent of that name.
- audit_
line 🔒 - caller_
block 🔒 - forget_
pane 🔒 - The person pressed Stop on the agent in
block_id: nothing already asked for may bring its access back. - grant_
after_ 🔒countdown - The grants a countdown that ended unvetoed makes (one for each agent that asked), and the audit lines saying who approved them.
- grouped_
pending_ 🔒message - What a call that asked for several apps answers for each app that had to be asked.
- handle_
authorize 🔒 POST /api/v1/agent/desktop/authorize: may this agent doactionon that window now? Waits while the user is asked.- handle_
host_ 🔒request POST /api/v1/host/desktop_request: the user’s answer to a prompt, relayed by the CEF host with its own token. The instance auth key, which every agent has, isn’t enough.- handle_
host_ 🔒stop POST /api/v1/host/desktop_stop: the user’s Stop on the agent in a pane.- handle_
policy 🔒 POST /api/v1/agent/desktop/policy: whetherDesktopis on, and each listed window’s state (blockedwith a reason, orgranted).- handle_
record 🔒 POST /api/v1/agent/desktop/record: what an authorized action did.- handle_
release 🔒 POST /api/v1/agent/desktop/release: the agent gives its grant back.- holds_
progress_ 🔒notes - Whether the notes about this request’s progress (approved, counting down) are left out, because its call asked for several apps and says it once at the end.
- host_
only 🔒 - names 🔒
- open_
ask 🔒 - The open request this agent already asked for to control
appfrom this pane, if it still waits. Asking again while it does answers the same, without a new audit row for each call. - pending_
message 🔒 - What a call that asked answers.
- policy 🔒
- publish 🔒
- Tell every window what is waiting and what is granted, and ask for the user’s attention while a prompt is open.
- register
- remember_
target 🔒 - Remember that
request_idwas asked for by this agent in this pane. Agents that join the request each leave their own, so each gets its grant when the countdown ends. - reply 🔒
- settled 🔒
- A request of a call that asked for several apps has ended. Records how, and returns whether the request belongs to such a call, so its own note is not sent: when the last one ends, the agent is told once about all of them.
- snapshot 🔒
- start_
group_ 🔒deadline - End a call’s group when its time is up, so a request that ends in a way nothing reported can’t hold its agent’s notes back: the agent is told what is known, and what is still waiting sends its own note.
- still_
asking 🔒 - The targets of agents that still ask: one that withdrew while the others’ request went on is left out.
- take_
targets 🔒 - Everything remembered for
request_id, taken. - tell 🔒
- Tell the agent in pane
block_idsomething, as an[AgentMux]note.