Cupertino 1.21.0
Version 1.21.0 ·
Added
apple_desktop_click,apple_desktop_typeandapple_desktop_keycan name the application they are meant for. An agent that opened an application and clicked into it, while the person at the keyboard had switched to their editor, clicked into the editor — and the driving notice said so, "Cupertino is driving com.microsoft.VSCode", because it was true. These three verbs post into the session and took no target, so the event went to whatever was in front.clicknow takesbundleId, andtypeandkeytakebundleIdor thehandleof the field that was focused. The application is brought to the front and waited for; if it does not come, nothing is posted and the call says so, and the notice names the application meant. Leaving it out keeps the old behaviour.hoveralready worked this way and now shares the same refusal.Mail and Maps pass one. Mail's paste and its send and save shortcuts name the composer they are meant for, so Mail is brought forward or nothing is pressed, rather than ⌘V landing in whatever window someone switched to. Maps names itself when it closes its menu with Escape: its card opens behind whatever is in front, so a bare Escape went to that other application instead.
One scope hole closed along the way: bringing an application forward skipped the reach check when that application was already in front, so
hovercould drive an application outside "Reach any application" as long as it happened to be frontmost.Mail, Safari, Notes and the other Node surfaces now say when they change the screen. The notice naming what Cupertino is driving was lit only by the in-process surfaces, because that is where synthetic input is posted. Everything else reaches its app by Apple Event, System Events or the Safari extension, so a Safari tab switching under someone, or Notes starting up because a note was written, came with no word from Cupertino at all.
The app now decides from each call's tool name, before the server has acted on it, and the notice comes in tiers. Mail's compose tools raise Mail and press keys, so they get the orange card that asks for hands off the keyboard and mouse. Safari's page verbs and adding a Maps favourite change what is on screen without touching either, and get a quieter blue card that says you can keep working. A write to Notes, Reminders, Calendar, Contacts or Messages gets one only when it had to start the app, since that is all a person sees. A call that outlasts the notice's usual linger holds it until the reply arrives.
Fixed
A reply that was sent came back as a reply that failed, and the note argued against the wrong retry.
apple_mail_reply_to_messagecomposed a reply correctly and it went out — and then reportedok: false,bodyVerified: false, "the body did not go in", and "SOMETHING DID land in it that could not be read back, a retry would paste the reply in twice". Every part of that was false. What actually happened is that the person at the keyboard pressed Send while the call was still running.A composer that closes takes its Accessibility handle with it, so every read after that is a refusal — and
bodySize()answered-1for a refusal while the caller compared it as an element count.-1against a real count reads as "the body changed", which is the signature of a paste that landed and cannot be matched. The same sentinel had a second edge in the System Events fallback:-1against-1reads as "nothing landed", which is the one branch that DISCARDS the composer, so an unreadable body could be thrown away rather than left on screen.Blind and different are now different answers. Before blaming the body, both compose paths ask whether the composer window is still there at all — nothing in them ever closes one, so a missing composer was taken by whoever is using the Mac. The native path then asks Mail whether the message reached Sent and says so with the timestamp, because sending and discarding leave the same empty screen and guessing wrong in either direction is expensive: a sent reply called a failure invites a retry that sends it twice. The Sent lookup deliberately does not use the envelope index, which is rebuilt on a schedule and was 47 minutes stale when this was found.
Two smaller holes closed along the way. A composer that vanished before the paste's second attempt escaped as a bare channel error with no note at all; it now returns a described failure. And the send shortcut was posted without re-raising the composer, so a person who changed the foreground between the verifying read and the send took ⌘⇧D into their own window — it is raised again first, and if it cannot be raised nothing is pressed.
Listing Safari's tabs opened Safari.
apple_safari_list_tabsasked Safari for its windows by Apple Event, and an Apple Event launches an application that is not running, so a question about open tabs could put a browser on someone's screen. It now asks whether Safari is running first, which launches nothing. When it is not, the tool says so in words, withrunning: false, rather than returning an empty list that reads as a Safari with every window closed or as a missing permission.