Skip to content

noracu 0.2.7

Choose a tag to compare

@sgInnora sgInnora released this 08 Nov 02:16
· 4 commits to main since this release

noracu 0.2.7

noracu now shares the Mac with the person sitting at it: Mac and iPhone input waits while you are using the keyboard or mouse, and the pointer goes back where it was after a click. The experimental iPhone layer also gets fixes: phone_open works again with the iOS 27 Spotlight that puts the search field at the top, typing through iPhone Mirroring is more careful about Universal Clipboard, and the phone keyboard's candidate bar no longer blocks input. No new tools; one new setting, NORACU_USER_IDLE_S.

Changed

  • The person at the Mac goes first. Before a Mac or iPhone input tool acts, noracu checks how long ago the Mac's keyboard or mouse was last used. If that was less than 2 s ago and not noracu's own input, the call returns user_active and sends nothing (delivery=not_delivered, retry=safe) — the agent retries after a pause. Read-only tools and the browser layer are not held up.
  • The pointer goes back. After a physical Mac click, drag or scroll, and after a phone gesture, the pointer returns to where it was — unless someone moved it in the meantime.
  • NORACU_USER_IDLE_S sets the wait (default 2, 0–60). 0 turns both off, for a Mac dedicated to the agent. mac_status reports it as user_idle_s.
  • Limits: the check runs once, before the call acts; a key pressed or the mouse moved while noracu's previous input was still running is not seen (noracu's own events reset the same idle time macOS keeps).

Fixed

  • phone_open opens apps with the top-field Spotlight (iOS 27 "Search or Ask"). There Spotlight shows no "Top Hit" card, and every phone_open failed with open_not_confirmed: … never showed up on the phone although the name had been pasted (0.2.6 too). It now reads the search field, which shows the query completed as " — Open", and taps the exact label just under the field only when that completion names exactly this app; any other completion, or none, is app not found with nothing tapped. In a device run (iOS 27, macOS 27.2) Calculator 2/2 and Clock 2/2 opened back to back, and an unknown name returned app not found. The "Open" completion is read in English only.
  • phone_type and phone_open wait for Universal Clipboard. iPhone Mirroring pastes through Universal Clipboard, which tells the phone about new Mac clipboard content with a delay. A ⌘V that arrived first could paste the phone's own older clipboard instead of the new text (seen once in about 30 pastes on macOS 27.2). Both tools now wait at least 1.5 s between writing the clipboard and ⌘V. The 1.5 s is a judgement, not a measured delay: it is meant to let the new text reach the phone first and does not rule the race out, and it does not help when the phone shows "Pasting from …" and then pastes nothing. Each call takes about 1.5 s longer.
  • The screen count that decides whether a paste showed up — and whether your clipboard is put back — is read right before ⌘V, after the wait, so text that appears during the wait cannot pass for the paste.
  • ⌘V is called off instead of stealing focus. If another app (or another Space) comes to the front during the wait — checked right after the wait and again right before ⌘V — noracu no longer brings iPhone Mirroring back to paste: phone_type returns focus_lost saying nothing was sent (or, with replace, that only the select-all went out), phone_open returns focus_lost without going back to the Home Screen, and your clipboard is put back unless something else copied meanwhile.
  • Honest results after an unconfirmed paste. type_not_confirmed, the phone_type results OCR cannot confirm, and phone_open's open_not_confirmed now say the field may hold the phone's older clipboard; phone_open no longer claims the name was pasted. When another app or device writes the clipboard before ⌘V, phone_open goes back to the Home Screen and says so instead of ending with an input error. The phone's "Pasting from …" box also counts when OCR splits it over two lines.
  • The phone keyboard's candidate bar no longer hides the mirror window. While the phone keyboard was composing (for example a Pinyin letter still underlined), iPhone Mirroring showed a small candidate-bar window that the window lookup took for the phone: phone_status reported live: null and every input returned mirror_state_unknown — even the delete that ends the composition. The lookups now use the iPhone Mirroring window itself, and a failed bounds read is retried once.

Security

  • SECURITY.md threat 18 (clipboard on the phone path) describes the wait and the focus_lost call-off, and lists what remains: an early ⌘V can still paste the phone's own older clipboard (possibly something once pasted on the phone), an older clipboard that contains the typed text can pass for the paste, and the "Pasting from" box is recognized only in English.

Docs

  • README (English and Chinese): a "Shares the Mac with you" section, a user_active troubleshooting row and the NORACU_USER_IDLE_S setting; open_not_confirmed: … never showed up no longer reads as "the name did not arrive" only, and the known limits describe the top-field Spotlight.

Upgrade

npm install noracu@0.2.7 (or update the version your MCP client runs), then fully quit and reopen the client app so it starts the new server.