A personal assistant that lives on your desktop, remembers what matters, and can use your Mac for you.
TypeScript
Merge pull request #180 from MarsSall/fix/windows-store-app-names
Quique1c4f31b96a28
diff --cc apps/desktop/src-tauri/src/computer/win.rsindex d3fbe38,57bc653..2d630c8--- a/apps/desktop/src-tauri/src/computer/win.rs+++ b/apps/desktop/src-tauri/src/computer/win.rs@@@ -29,10 -29,10 +29,10 @@@ use super::risk::{AxElement, Focus}use super::glow::Frame;use super::winaccess::{element, is_default, known_chain, unreadable, UIA_BUTTON, UIA_WINDOW};use super::winapps::{- answers_to, app_pids, executable_target, fronts_same_app, hosted_page, request, shortcut_named, strip_ci, Request,- TopWindow,+ active_entries, answers_to, distinct_names, executable_target, fronts_same_app, hosted_page, listed_name,+ listed_windows, request, shortcut_named, strip_ci, Request, TopWindow,};-use super::winput::{checks_typing_target, releases, send_batches, settles, steps, Step, VirtualScreen};+use super::winput::{checks_typing_target, releases, send_batches, settles, steps, without_held_modifiers, Step, VirtualScreen};use super::{runs_as_administrator, AppInfo, Capture, InputEvent, KeyboardRecipient, MouseButton, TypedError,KEYS_CHANGED_WHILE_TYPING,diff --cc docs/design.mdindex 5835bd2,470cca3..720363a--- a/docs/design.md+++ b/docs/design.md@@@ -170,11 -170,9 +170,11 @@@ The UI shows one endless chat: no conveThe assistant can see the screen and operate apps through a built-in MCP server that the desktop app serves. macOS (L59) and Windows (S24.11); Linux, the web page and a VPS never offer it.- S24.1 Helper: native Rust inside the Tauri app (`apps/desktop/src-tauri`), never in the daemon or the engine. It serves MCP (JSON-RPC 2.0 over streamable HTTP) on `http://127.0.0.1:<random port>/mcp` and requires `Authorization: Bearer <key>`, a fresh random key per app launch.- - S24.2 Tools: `screenshot`, `click`, `move`, `drag`, `scroll`, `type`, `key`, `open_app`, `list_apps`, `wait`, each with an optional `intent`. Screenshots of the display under the pointer are downscaled to a long edge of 1280 px; coordinates are pixels of the latest screenshot; actions return a fresh one; Gentle Dot's own windows are left out.+ - S24.2 Tools: `screenshot`, `click`, `move`, `drag`, `scroll`, `type`, `key`, `open_app`, `list_apps`, `wait`, each with an optional `intent`. Screenshots of the display under the pointer are downscaled to a long edge of 1280 px; coordinates are pixels of the latest screenshot; actions return a fresh one; Gentle Dot's own windows are left out. On Windows, a detached Store app frame is listed by its shell display name (or its window title, or the frame host when neither is available), separately from other detached frames; two of them with the same name get their window titles appended (`Fotos — img.jpg`), and one is marked active only when it is the foreground window itself. This name is for listing only: the minimized app cannot be acted on until it is restored and identified; the action blocklist is unchanged.- S24.3 Session grant: the first call without a session shows a native dialog ("Allow Gentle Dot to see and control this Mac for 30 minutes?"). A session ends on timeout, Stop, the tray item, or the panic shortcut ⌥⇧Esc, and queued actions are dropped.- S24.4 Guards: a fixed blocklist (Gentle Dot itself, System Settings, SecurityAgent, loginwindow, Keychain Access, password managers), 10 actions per second, and a native per-action confirmation for risky actions (send, pay, buy, delete, submit, confirm, transfer, and their Spanish equivalents, by Accessibility role and title, by `return` on a default button, or by the declared `intent`). Keyboard actions go only to the app that was steadily in front during the latest screenshot; their recipient is fixed when they are checked and confirmed and rechecked before each chunk of text, each Return, and the key, and a change stops the input with the count of characters already sent. After a confirmation, the app in front before the dialog must be back in front within 500 ms, or nothing is done.+ - Windows held-modifier guard: before each keyboard post (text chunk, Return, or key), read both sides of Ctrl, Alt, Shift and Win with `GetAsyncKeyState`. Refuse before pressing the event's own modifiers, so an injected `ctrl+t` does not refuse itself. A pressed modifier may be the user's or one a failed post could not release, so the message names both ways out. One key reports exactly "Ctrl is pressed, so nothing was sent. Release Ctrl, or press and release it once if no one is holding it, and try again." Several keys are named once in Ctrl/Alt/Shift/Win order, joined with ", " and a final " and ", e.g. "Ctrl, Alt and Shift are pressed, so nothing was sent. Release them, or press and release each once if no one is holding them, and try again." After earlier text landed, "nothing was sent" becomes "the rest was not sent" and the character count is appended, e.g. "Shift is pressed, so the rest was not sent. Release Shift, or press and release it once if no one is holding it, and try again. Typing stopped after 5 of 11 characters." Before any text lands, the suffix is "Typing stopped after 0 of M characters." This is a pre-post snapshot, not a fence against keys pressed during the post. Pointer actions do not check held modifiers yet; macOS/Linux behavior is unchanged.+ - The guard also refuses when the agent's own combo needs the modifier the user is resting on (a finger on Shift while it sends `shift+tab`); this is conservative and intended.- S24.5 Permissions: the app reports and requests Accessibility and Screen Recording (`computer_permissions`, `computer_request_permission {kind}`). The Connectors screen shows a built-in "Computer" entry with both statuses, Grant buttons, Check again, the note that debug builds lose the grants on every rebuild (macOS ties them to the code signature), and a note when the current model does not accept images (`ConnectorInfo.noImages`, from the model's `input` in the engine's `get_state` and `set_model` answers).- S24.6 Visible state: the app emits `computer://state {active, endsAt?, reason?}` (`computer_status` gives the current one). Between calls, the rose shows the "in control" state (`dot-in_control`, mood `control`: accent rim, steady traveling light) and the panel shows "Controlling your Mac · mm:ss left" with Stop (`computer_stop`). During a screenshot or action call (including an entire batch and its final screenshot), the Dot and panel are temporarily hidden and the top edge of the controlled display glows in the rose's neon with a light traveling along it, without text or logo. The click-through glow must be ready and hiding confirmed before capture or input; failed preparation sends no input. Completion and normal error/Stop paths restore prior visibility without changing saved preferences or taking focus. The tray's "Stop computer control" and the panic shortcut remain independent of the hidden panel; shortcut registration and full-screen tray availability must be verified on the target Mac.- S24.7 Wiring: the app registers its helper itself, over the app channel, right after it spawns the daemon (`computer_register {url, token}`; the daemon accepts only `http://127.0.0.1:<port>/mcp` and a header-safe key). A window cannot register, repoint, or remove it (L61 closed): the panel only calls `computer_endpoint` to know whether a helper exists. The daemon keeps the endpoint in memory, never in `connectors.json`, and renders `computer: {url, headers: {Authorization: "Bearer <key>"}, exposure: "direct"}` into `mcp.json`, then restarts the engine when idle. The guard's policy lists it under `builtin`, so its tools run without in-engine approval cards. It is removed on `computer_unregister` from the app or when the app's channel closes; windows coming and going do not touch it. A daemon without a channel (`pnpm dev`) gets no helper; the app never uses one (§9, Daemon lifecycle). The key is never logged or sent to a window: `connectors` lists only a built-in "Computer" entry (`builtin: true`) that the connector messages cannot change or remove, no saved or imported connector can take the name `computer`, and the import scan never offers the helper.