-
released this
2026-08-12 12:28:12 -05:00 | 54 commits to main since this releaseTwo corrections to mail's tool surface, both found by reading it against the calendar's
rather than by anything failing.Added
-
delete_message(permanent=true)now requiresexpected_subject, checked against what
the handle actually resolves to, and refuses naming both subjects on a mismatch.Every other destructive tool in this project already worked this way —
delete_event
requiresexpected_title,delete_calendarrequiresexpected_nameand an event count —
and mail's was the only one taking a handle alone. It was also the worst place for the
omission: a deleted calendar event can be rebuilt from a listing you already have, while
an expunged message is gone from Apple's servers with no trash, no device copy and no
recovery. The most dangerous operation here was the least guarded.The default delete is deliberately left alone. It lands in trash and returns the
handle to undo it, so demanding a subject every time would be friction with nothing behind
it. Guard the irreversible branch, keep the reversible one cheap.Comparison is stripped and case-folded, matching
delete_event: a caller echoing a
subject back through a model does not reproduce whitespace exactly, and refusing on a
trailing space teaches it to stop passing the argument. The refusal is raised before
anything is flagged, and the tool description says that a mismatch means the wrong message
was addressed — so re-read the folder rather than retrying with the subject from the error,
which would delete precisely the message the guard just saved.
Changed
-
get_unread_count→list_unread_counts. It answers with a collection of folders,
andget_is reserved for fetching exactly one named thing. The old name promised a
number and returned every folder on the account. The optionalfolderargument stays, and
now reads the same waylist_messages(folder=…)does — a list narrowed by a filter, not a
lookup.The rule this settles, now written in
CLAUDE.md:get_returns one named thing,
list_returns a collection. The rest of the surface already obeyed it.
Downloads
-
Source code (ZIP)
0 downloads
-
Source code (TAR.GZ)
0 downloads
-