Repository navigation
Match Xcode App Intents input options, output flags, and parameter summaries - #370
Merged
Merged
Conversation
The parameter extractor rejected any @parameter that passes inputOptions, a documented String parameter option, with "unsupported App Intents parameter option 'inputOptions'". Xcode encodes each argument the source passes as an LNValueTypeMetadataKeyString* entry in the parameter's typeSpecificMetadata (keyboardType, capitalizationType, multiline, autocorrect, smartQuotes, smartDashes) and omits arguments left at their defaults. Adds a probe covering every option and case, its Xcode 27.2 (27B52) capture, and a test comparing the action with Xcode's output. The test normalizes typeSpecificMetadata pair order, which Xcode writes in hash order. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Two registration differences against Xcode 27.2 (27B52) captures:
- outputFlags had the ProvidesDialog and ShowsSnippetView bits swapped
and ignored OpensIntent. Xcode writes OpensIntent = 1,
ShowsSnippetView = 2, ProvidesDialog = 4 (ReturnsValue sets none).
The existing Files probe uses both dialog and snippet, so its 6 hid
the swap.
- static parameterSummary was dropped. Xcode writes it as
actionConfiguration.actionSummary: the summary text with ${parameter}
placeholders, the parameters it interpolates, and the parameters its
trailing builder lists. Conditional summaries and localization tables
now stop extraction instead of being dropped silently.
Adds an OutputProbe fixture with its Xcode capture and checks every
probe's actions against Xcode's.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…summaries Preserve the difference between omitted and empty summary text, and look up the static summary independently of an instance parameter with the same name. Encode string arrays and sets with their native capability masks. Regenerate both probes with Xcode 27.2. Exercise repeated and ordered parameter references, and compare input-option metadata as key/value pairs in the bundle checks.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #369.
The Linux App Intents extractor rejected
@Parameter(inputOptions:), wrote incorrectoutputFlags, and dropped plainparameterSummarydeclarations. This PR includes Brandon Elliott’s two original commits from #369 and extends their Xcode fixtures to cover string collections and summaries with omitted text.String,[String], andSet<String>. Omitted options produce no metadata entry.OpensIntentsets1,ShowsSnippetViewsets2, andProvidesDialogsets4.ReturnsValueadds no bit.Summary()omits the text field, whileSummary("")emits an empty format string.When,Switch, and custom localization tables now produce explicit errors.Verification
The original #369 probe app built from the same Swift source on Linux and with Xcode 27.2 (
27B52). The two bundles matched onextract.actionsdatafor all 11 actions and 24 parameters, and onversion.json. The comparison keeps each input-option key paired with its value when Xcode changes dictionary order.The Rust workspace suite passed 2,348 tests with one ignored. All 16 App Intents tests passed on Linux, along with 35 Python CI tests and five SDK and registration checks. Formatting and workspace Clippy with
-D warningspassed.Interactive snippets and SDK coverage
The follow-up fixes the missing interactive-snippet result flag and registers the backing snippet’s system protocol, default visibility, and availability. Explicitly discoverable snippets and snippets returning a value have separate native controls. Explicit
inputConnectionBehaviorvalues now match Xcode for all three enum cases.ShowsSnippetIntentOpensIntent & ShowsSnippetViewOpensIntent & ProvidesDialogA fresh build of the same nine-action, five-parameter Swift app with Xcode 27.2 and SweetPad on Linux produced the same registration file inventory and zero semantic differences in
extract.actionsdataandversion.json. The hosted workflow compiles the Swift sources on macOS and replays the compiler outputs through the Linux extractor. Across six supported apps, Linux matched all 27 actions captured by each Xcode version. A seventh app supplies five native diagnostic probes. The checker also tests the named diagnostic for each of 20 unsupported parameter labels.Xcode 26.6 (
17F113) exposed two more compatibility differences. It omits three newer enum and entity fields. For an instance parameter namedparameterSummary, it infers the title and drops the explicit description, default, and string options. Xcode 27.2 preserves them. The extractor selects the schema using the compiler’s Xcode build identifier.The checklist links 63 entries to evidence for 37 matches, 25 diagnostics and one native no-effect control (
requestValueDialog). The reviewed SDK inventories cover 542 declarations in iOS 26.5 and 587 in iOS 27.2. CI checks the newest stable Xcode on its runner and flags new labels, changed overloads, native registration changes, and differences between Linux and Xcode. The full comparison preserves parameter order and checks the Xcode build identifier. Versioned checklist · App Intents CIConditional parameter summaries, non-nil localization tables, and the 20 classified parameter options still produce explicit diagnostics. Siri presentation and tapping a rendered snippet require separate runtime verification.