Repository navigation
What's Changed
ContactsTool(confirmation:)creates a contact only after the host app confirms it. Every create produces aToolMutationReceipt: access denied isnotAttempted, and a failed save isnotCommitted. (#34)- Tool execution now treats app authorization and user confirmation as separate checks. A domain-neutral authorizer runs
beforeConfirmationandbeforeExecution, and a denial comes back as a typed policy result, kept through result routing and evaluation events. (#30, thanks @viazikarai) - On iOS 27 and macOS 27, text-generation requests can take typed file-backed image attachments. Labels, file type, count and byte budgets are checked before the model runs. Evaluation cassettes redact image paths and pixels and replay deterministically through SHA-256 content descriptors. (#31, thanks @viazikarai)
- A call denied at
beforeExecutionnow releases its idempotency key, so a corrected retry can run. Image attachments were also hardened, including on visionOS. (#32) LocationToolcompiles on visionOS and accepts when-in-use authorization there. (#33)
Migration
ContactsTool() still searches and reads, but create now fails closed and throws ToolMutationExecutionError.confirmationRequired without writing. To keep creating contacts, pass an app-owned confirmer:
let tool = ContactsTool(confirmation: myConfirmer)This is why the release is a major version: 3.0.0 made the same change for CalendarTool and RemindersTool.
Validation
- Xcode 27.3 beta, on the merged
maincommit:swift testpassed 228 tests (71 + 140 + 17). - New test: contact creation fails closed with no confirmer and with a denying confirmer, and never touches Contacts.
- Foundation Lab builds for macOS and iOS against this commit, and its 55 core tests pass.
- Cursor Bugbot passed on #34.
Full Changelog: 3.1.0...4.0.0