Skip to content

0.2.0

Pre-release
Pre-release

Choose a tag to compare

@airowe airowe released this 11 Nov 14:56
· 94 commits to main since this release
18b7dbb

SiriAIKit no longer does auth. Keep your app's own networking and token storage, and wrap your existing API call in a Siri tool.

Breaking changes

  • Removed: ToolHTTPClient, HTTPMethod, TokenAuthenticator, KeychainTokenStore, TokenStore, Tokens, KeychainAccessibility.
  • ToolError is now ToolFailure: signedOut, timedOut, unreachable, failed. .rejected and .invalidResponse became .failed, and .keychain is gone.
  • Outcomes: "used saved token" and "refreshed after 401" are no longer recorded automatically.

Upgrading from 0.1.0

  1. Wrap your existing API call: await tool.answer { … } or try await tool.run { … } on a SiriTool.
  2. Keep tokens in your own store, saved with kSecAttrAccessibleAfterFirstUnlockThisDeviceOnly. Check it at launch with KeychainLockCheck.warnIfLockedOut(service:) in debug builds.
  3. Add details to outcomes from your code with ToolOutcomeLog.standard.note("refreshed after 401").

The example app's DemoAPI.swift shows refreshing inside a Siri call: one refresh at a time, and sign out only on a rejected refresh.

New

  • SiriTool: keeps to Siri's time budget (10 seconds by default, or when Siri cancels), turns failures into sentences Siri can say, and records each call's outcome. It stops waiting at the deadline without cancelling your code, so a token refresh still saves.
  • ToolOutcomeLog.note(_:): details per call, as in "succeeded (refreshed after 401)".
  • KeychainLockCheck (debug only): warns when a Keychain item can't be read while the phone is locked.
  • siri-ai-eval summarize: flags runs where Siri gave the right answer without calling your tool, which usually means it answered from the Spotlight index.
  • expo-siri-ai-kit: an Expo config plugin (in expo-plugin/) that adds SiriAIKit to your app target during prebuild and turns on the preview flag. Its npm release follows separately.

Verified on a device

iPhone 16 Pro, iOS 27.3 beta, Xcode 27.3 beta (27C5020n), using the example app:

Evaluation Real pass rate
Cart from the demo API 5 of 5
Cart after the one-minute token expires 4 of 4 complete runs, refreshed in all 5
Negative control, refresh off 0 of 1, as it should

In an Expo SDK 58 app using the plugin, a SiriAIKit tool passed 3 of 3 runs.

APIs may change before 1.0 while Apple's APIs are in beta.