Skip to main content

assistant_actions_generator 0.0.18 copy "assistant_actions_generator: ^0.0.18" to clipboard
assistant_actions_generator: ^0.0.18 copied to clipboard

build_runner generator for assistant_actions: turns annotated Dart actions, entities and App Schema adoptions into App Intents Swift for iOS and macOS.

0.0.18 #

  • Generates apple/AssistantWidgets.g.swift (writeAppWidgets) with extension-safe ControlWidgets (@AssistantControl), WidgetConfigurationIntents (@AssistantWidgetConfig), and assistantControlsBundle without FlutterFramework linkage, plus AssistantActionsAppGroup (appGroup:) and AssistantActionsAppIntents lookup for AssistantSiriTip.
  • Generates FocusFilterAppContext (filterCriteriaParam:) and the focusFilter.current cold-start host handler (supporting schema entity parameters and availability guards).
  • Generates AssistantPromptingIntent conformances and decoders registry entries for mid-call AssistantCall.requestValue / disambiguate across primitives, enums, currency, measurements, plain entities and schema entities; generates UndoableIntent + .undo registry entries for plain @AssistantAction(undo: ...) functions; and generates AssistantDonations methods and donate.action cases for adopted schema intents alongside plain actions.
  • Resolves adopted schema entity parameters (T, T?, List<T>) on @AssistantAction and @AssistantFocusFilter, @Param numeric ranges / control styles / string input options / file UTTypes / DynamicOptionsProvider (with @IntentParameterDependency and snapshot fallbacks), IntentCurrencyAmount and Measurement<Unit...> value types, and conditional When / Switch parameterSummary builders.
  • Populates CSSearchableItemAttributeSet (keywords, textContent, contentCreationDate, contentModificationDate) from Spotlight field annotations, emits AssistantQuery.Filter predicates from SnapshotFilter, expands plain EntityPropertyQuery comparators (String prefix/suffix/equal/notEqual, @AssistantEnum, Duration), and generates #if canImport(FoundationModels) FoundationModels.Tool structs and AssistantFoundationTools.all (including currency, measurement and plain/schema entity parameters).
  • Needs assistant_actions 0.0.21.

0.0.17 #

  • Generates authenticationPolicy from requiresUnlock, raised to Apple's schema minimum where needed (system.open, journal.* and others need .requiresLocalDeviceAuthentication). Without it the output is unchanged.
  • Generates parameterSummary, listing parameters the sentence leaves out under it, and DisplayRepresentation images for entities and App Enum cases, with Spotlight thumbnails for local files.
  • Reply intents show their card through a generated AssistantCardSnippetIntent (SnippetIntent, with AssistantCardButtonIntent for its buttons) when the deployment target or the intent's own floor is iOS / macOS 26 (ShowsSnippetIntent). Below that, intents that opt in with cardButtons use it from 26 and the plain card view before; other intents' output is unchanged.
  • Build-time checks for summary placeholders, summaries and cardButtons intent names, SF Symbol names and @EntityImage() types.
  • tool/validate_schemas.dart adopts every schema with unlock policies, summaries, images and card buttons.
  • Needs assistant_actions 0.0.20.

0.0.16 #

  • Every generated entity is Transferable: as text, a file entity also as its file, and with the exports Apple's query schemas ask for when the member is mapped (IntentValueRepresentation, iOS / macOS 26.4).
  • Importing query schemas become IntentValueQuerys (with maps.placeIntentValueQuery on, the processor reports "Start Navigation" as implemented), answered by the handler while Dart runs, else from the published items.
  • Deep links: url: makes a URLRepresentableEntity, and its system.open a URLRepresentableIntent that opens the link (App Shortcuts for it, with @IntentShortcut, keep working).
  • IntentValueRepresentation exports and the Visual Intelligence query are inside #if compiler(>=6.4), so the generated code builds with Xcodes before 27 too.
  • Plain actions and snapshot answers are PredictableIntents; generated AssistantDonations and the donation host calls. Focus filters are left out.
  • AssistantActionsAppHostCalls: on-screen entity identifiers and donations.
  • Visual Intelligence search: one IntentValueQuery over a SemanticContentDescriptor (a union of the types from iOS 27) and the registry's visualSearch callback. Queries start the headless engine with @AssistantBackground(), else wait briefly for the app's Dart, then answer from the published items.
  • tool/export_catalog.dart exports querySchema; tool/validate_schemas.dart turns on every importing query, deep links and Visual Intelligence search, adds a plain entity and action, and reports queries.
  • Needs assistant_actions 0.0.19.

0.0.15 #

  • Every live intent (Runs.withFlutter and Live Activity actions, live schema calls and replies, record intents) calls Dart through callDart: ProgressReportingIntent, CancellableIntent from 26.4, and LongRunningIntent (27) with longRunning / @AssistantLongRunning().
  • From a deployment target of iOS 26 / macOS 26 (the plugin's Package.swift, or the ios_deployment_target / macos_deployment_target options), live intents declare supportedModes (.foreground(.dynamic), .foreground for those that open the app, [.background, .foreground(.dynamic)] with @AssistantBackground()) instead of the deprecated ForegroundContinuableIntent, per platform. Warning-free at 17 / 14, 26 and mixed targets.
  • SyncableEntity for syncable schemas and @AssistantSyncable(); IndexedEntityQuery (27) on every entity query; UndoableIntent with @AssistantUndoable(), including inbox changes that say a dialog.
  • files.file with FileEntityIdentifier ids and all five files.* intents.
  • CancellableIntent, LongRunningIntent, SyncableEntity and IndexedEntityQuery conformances are inside #if compiler(>=6.4), so the generated code still builds with Xcodes before 27, whose SDKs lack them.
  • tool/validate_schemas.dart adopts files.file, makes every class undoable and long-running, and takes --deployment=26.0.
  • Needs assistant_actions 0.0.18.

0.0.14 #

  • With an @AssistantBackground() function, writes the headless engine's entrypoint (assistantActionsBackgroundMain) and AssistantActionsAppBackground. Live intents that don't need the app's screen (Runs.withFlutter actions, including those returning values, replies, confirmations and Live Activity actions, and live schema calls and replies) call AssistantBackground.prepare() instead of asking to open the app, falling back to the foreground if Dart can't start. They declare supportedModes [.background, .foreground(.dynamic)] from iOS 26 and keep ForegroundContinuableIntent before. Intents that open the app or record audio still come to the foreground. Queued intents, Focus filters and deferred Live Activity actions apply right away on the headless engine.
  • @AssistantAction(opensApp: true).
  • tool/validate_schemas.dart sets up background execution; --no-background checks the output without it.
  • Without @AssistantBackground(), the output is unchanged.
  • Needs assistant_actions 0.0.17.

0.0.13 #

  • Generates App Enums, the new action parameter types and their defaults, and ReturnsValue results, including with AssistantReply<T> (with ShowsSnippetView and requestChoice). Availability follows places, schema enums and schema entities. Confirmations, dialogs and Focus filter summaries say the new parameter types; Focus filters take them too.
  • App Shortcuts: phrases naming entity and enum parameters, schema intents (@IntentShortcut) behind if #available / #if os, the tile color, and the AssistantActionsAppShortcuts class that refreshes entity phrases. Generated types the Runner or public actions reach are made public.
  • Checks at build time: phrase parameters, Apple's limit of 10 App Shortcuts, hidden actions as shortcuts, deferred or Live Activity actions returning values, unsupported parameter and result types, placeholders Siri can't say, and @IntentShortcut placement.
  • Needs assistant_actions 0.0.16.

0.0.12 #

  • Generates Focus filters from @AssistantFocusFilter, checking that each parameter is nullable or has a constant default.
  • liveActivity: true actions conform to LiveActivityIntent on iOS, and call Dart without coming forward when it's already running. They can also return an AssistantReply. On a SnapshotAnswer the option is a build error.

0.0.11 #

  • Generates requestConfirmation (deletes by default), ProvidesDialog from dialogs templates, ShowsSnippetView result cards, and requestChoice for intents that use replies.
  • Checks intent names, placeholders and whether an intent can reply, at build time.
  • tool/validate_schemas.dart exercises these options on every other intent.
  • Needs assistant_actions 0.0.14.

0.0.10 #

  • Maps people, places, files, recurrence rules and unions to the runtime's Dart types, for parameters, results and fields. Unions encode with their case and decode by case; entity cases resolve when the app adopts the entity.
  • Union results (audio.recognizeAudio): the handler returns AssistantUnions.
  • List members of any supported type map to Dart lists; sets decode as Swift Sets.
  • LinkMetadata is the Swift type for link previews (iOS / macOS 26.4).
  • Validated: 73 of 74 public entities and 167 of 172 intents adopted at once, accepted by Apple's metadata processor on macOS and the iOS simulator.
  • Needs assistant_actions 0.0.12.

0.0.9 #

  • Generates every shape in Apple's schema catalog, not only create, update and delete:
    • Calls: any other intent calls a handler method named after it, with its parameters as Dart values (enums, Duration, entity ids, lists). Intents that open the app, record audio or return an item run live (from the foreground on iOS; supportedModes = .foreground from iOS 26). Others are queued in the inbox, like Runs.deferred. Results are item ids that Swift looks up.
    • Domain intents (camera.*, system.searchInApp, assistant.activate) get a <Domain>AssistantHandler and a registry parameter.
    • system.open generates an open intent per adopted entity, unless the entity's own domain has one (Apple allows one per target).
    • Unions become @UnionValue enums. Person, file, place, recurrence, link and scene members get their Swift types (IntentPerson, IntentFile, …). These aren't passed to Dart yet; the docs list them.
    • Unique entities (maps.navigationSession) get a UniqueAppEntityQuery.
    • Entity references: a member that is another adopted entity maps to its id. Swift resolves it from the snapshot, one level deep.
    • Clear build errors for what isn't supported: file entities (files.file), union results, results of entities the app doesn't adopt, and app-defined enum cases the app didn't give.
  • Availability: enums use their own catalog availability, a platform missing from the catalog is unavailable (assistant.activate is iOS 26.2 only), and valueState (clearing a field) raises update intents to iOS 18.2 / macOS 15.2.
  • Create/update/delete are decided by the intent's verb and shape, so clock.cancelTimer and photos.addAssetsToAlbum become calls rather than deletes or updates.
  • tool/export_catalog.dart exports every public domain by default and skips private or deprecated schemas, including ones that use a private schema.
  • tool/validate_schemas.dart adopts every schema in a throwaway app and runs the builder, flutter analyze and Apple's appintentsmetadataprocessor for macOS and the iOS simulator.
  • Needs assistant_actions 0.0.11.

0.0.8 #

  • Supports Apple's journal schemas (assistant_actions 0.0.10): create, update and delete for journal.entry, with Spotlight indexing (title, text content, creation date) and property queries on the mapped members.
  • Record intents: a schema intent that adopts AudioRecordingIntent, takes no parameters and is named after the entity (journal.createAudioEntry) is an opt-in flag on the entity annotation. It generates an intent that brings the app forward on iOS (requestToContinueInForeground) or activates it on macOS, then calls the handler's new startAudioEntry() live over the FFI bridge.
  • Availability follows the Swift types a schema uses, not only Apple's catalog: PlaceDescriptor (journal entry location) needs iOS / macOS 26, so journal types are generated for 26 though the schema dates from 18.
  • export_catalog.dart exports each intent's system protocols and _openApp.

0.0.7 #

  • Generated entity queries are also EntityPropertyQuery, modelled on Apple's Notes, so Siri can filter and sort entities:
    • schema entities, for mapped members: bools take equal; dates and date components take ==, !=, <, <=, >, >= and between; strings and attributed strings take contains. They sort by the title member and dates. Queryable members get @Property(title:) from the catalog, which Apple's metadata needs.
    • @AssistantEntity types: the title takes contains, and published bool, number, date and string fields become properties with the same comparators. They sort by title, numbers and dates.
  • Needs assistant_actions 0.0.8 or later.

0.0.6 #

  • Generated entity queries also conform to EnumerableEntityQuery (allEntities(): everything published plus Siri's pending changes), and entities(matching:) uses the runtime's forgiving AssistantMatch with the type's own words (class, schema and app names) ignored.
  • Needs assistant_actions 0.0.7 or later.

0.0.5 #

  • Generated entities conform to IndexedEntity (iOS 18+ / macOS 15+). Schema entities fill Spotlight attributes from the catalog's indexing keys (title, display name, text content, due, completion, creation and modification dates); @AssistantEntity types use their title and subtitle.
  • Generates AssistantActionsAppSpotlight, which assistant_actions 0.0.6 calls to index each collection.
  • Needs assistant_actions 0.0.6 or later.

0.0.4 #

  • Generated Swift compiles without warnings:
    • valueState switches handle @unknown default (treated as unchanged), which Swift 6 mode would otherwise reject;
    • update intents with no clearable field declare cleared as a constant.

0.0.3 #

  • Generates snapshot-answer actions (@AssistantAction on a const SnapshotAnswer<T>) and checks their fields and value types at build time.
  • Update intents read $param.valueState, so Siri clearing an optional field arrives as cleared, not unchanged; …Values classes get cleared and <field>Cleared.
  • @AssistantEntity classes publish their String, int, double, bool, DateTime and Uri fields, so snapshot answers can use them.
  • Needs assistant_actions 0.0.5 or later, and says so if it's older.
  • README: install with flutter pub add.

0.0.2 #

  • Add repository and issue tracker links.

0.0.1 #

  • First preview: iOS 17+ / macOS 14+.
  • Actions (@AssistantAction), entities (@AssistantEntity) and App Schema adoption for reminders.* and notes.* with typed annotations.
  • Deferred actions and schema changes work without Flutter running, through a UserDefaults inbox that Dart applies on start and resume.
0
likes
120
points
1.12k
downloads

Documentation

API reference

Publisher

verified publisherabdallahshaban.com

Weekly Downloads

build_runner generator for assistant_actions: turns annotated Dart actions, entities and App Schema adoptions into App Intents Swift for iOS and macOS.

Repository (GitHub)
View/report issues

Topics

#siri #app-intents #codegen #build-runner

License

MIT (license)

Dependencies

analyzer, build, dart_style, path, source_gen

More

Packages that depend on assistant_actions_generator