Safari closes the tabs an agent opened.
Version 1.34.0 ·
Safari element ids also last across lists, pages read with their line breaks, and Shell's approval window shows the whole script.
Share this release
Safari closes the tabs an agent opened. Safari element ids also last across lists, pages read with their line breaks, and Shell's approval window shows the whole script. https://cupertino.mgcrea.io/changelog/1.34.0/
Added
Safari can close the tabs an agent opened.
apple_safari_close_tabstakes therefthatapple_safari_open_urlnow returns for a new tab, orall: truefor every tab an agent opened, from this session or another, in the last seven days. It closes a tab only while it still shows the URL it was opened on and no other tab shows that URL too. Anything else is reported and left open. A tab that redirected or was navigated away is let go rather than followed. Safari is not launched to close tabs, and the tool is registered only with writes on.
Fixed
Shell's window shows the whole script, not two and a half lines of it. The script box was measured before its text was laid out, so it opened at its least height whatever the script's length, and the rest had to be scrolled to. It now grows with the script up to its cap, and so does the box for a script's input.
A Safari element id lasts as long as its element, not as long as the last list. Every
apple_safari_page_elementscall voided the ids of the one before, so listing a field, then listing again to find its Submit button, left the field's id dead, with an error blaming a navigation that never happened. The same element now keeps its id across lists; an id dies when its element leaves the page or the page navigates, and the error says which.Safari reads a page as it is laid out.
apple_safari_read_page,apple_safari_wait_forand stored captures read the text from a detached copy of the page, which has no layout: blocks ran together ("HomeHomeSearch Performance…") and CSS-hidden labels came along. They now read the page itself, andwait_formatches a phrase the layout split across lines.Safari element labels are one line, without icon glyphs. A click's
labelnames the element as it was clicked ("Submit"), withlabelAfterwhen it changed ("Submitting"). TheidNoteandstaleNoterepeated in every result are gone; the tool descriptions say it once.