From 61a83ee68ae3f3e89700cbd20f50c56dd620be58 Mon Sep 17 00:00:00 2001 From: Brandon Elliott Date: Fri, 27 Nov 2026 14:55:15 -0600 Subject: [PATCH 1/7] Encode String.IntentInputOptions in App Intents metadata 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 --- .../appintents/InputOptionsProbe.action.json | 941 ++++++ .../appintents/InputOptionsProbe.swift | 36 + .../InputOptionsProbe.swiftconstvalues | 2989 +++++++++++++++++ sweetpad-cli/fixtures/appintents/README.md | 5 +- sweetpad-cli/fixtures/appintents/regen.py | 15 +- sweetpad-cli/src/cli/appintents/metadata.rs | 72 + .../src/cli/appintents/metadata/parameters.rs | 66 + 7 files changed, 4118 insertions(+), 6 deletions(-) create mode 100644 sweetpad-cli/fixtures/appintents/InputOptionsProbe.action.json create mode 100644 sweetpad-cli/fixtures/appintents/InputOptionsProbe.swift create mode 100644 sweetpad-cli/fixtures/appintents/InputOptionsProbe.swiftconstvalues diff --git a/sweetpad-cli/fixtures/appintents/InputOptionsProbe.action.json b/sweetpad-cli/fixtures/appintents/InputOptionsProbe.action.json new file mode 100644 index 00000000..d94bb00e --- /dev/null +++ b/sweetpad-cli/fixtures/appintents/InputOptionsProbe.action.json @@ -0,0 +1,941 @@ +{ + "assistantDefinedSchemaTraits": [], + "assistantDefinedSchemas": [], + "authenticationPolicy": 0, + "availabilityAnnotations": { + "LNPlatformNameWildcard": { + "introducedVersion": "*" + } + }, + "effectiveBundleIdentifiers": [], + "fullyQualifiedTypeName": "Sev.InputOptionsProbeIntent", + "identifier": "InputOptionsProbeIntent", + "isAuthPolExplicit": false, + "isDiscoverable": true, + "mangledTypeName": "3Sev23InputOptionsProbeIntentV", + "mangledTypeNameByBundleIdentifier": {}, + "mangledTypeNameByBundleIdentifierV2": {}, + "mangledTypeNameV2": "3Sev23InputOptionsProbeIntentV", + "openAppWhenRun": false, + "outputFlags": 0, + "parameters": [ + { + "capabilities": 0, + "dynamicOptionsSupport": 0, + "inputConnectionBehavior": 0, + "isInput": false, + "isOptional": true, + "name": "allOff", + "resolvableInputTypes": [ + { + "kindValue": 0, + "valueType": { + "primitive": { + "wrapper": { + "typeIdentifier": 0 + } + } + } + }, + { + "kindValue": 0, + "valueType": { + "primitive": { + "wrapper": { + "typeIdentifier": 2 + } + } + } + }, + { + "kindValue": 0, + "valueType": { + "array": { + "wrapper": { + "capabilities": 3, + "memberValueType": { + "primitive": { + "wrapper": { + "typeIdentifier": 2 + } + } + } + } + } + } + } + ], + "title": { + "alternatives": [], + "key": "All off" + }, + "typeSpecificMetadata": [ + "LNValueTypeMetadataKeyStringSmartQuotes", + { + "int": { + "wrapper": 0 + } + }, + "LNValueTypeMetadataKeyStringCapitalizationType", + { + "int": { + "wrapper": 0 + } + }, + "LNValueTypeMetadataKeyStringMultiline", + { + "int": { + "wrapper": 0 + } + }, + "LNValueTypeMetadataKeyStringKeyboardType", + { + "int": { + "wrapper": 4 + } + }, + "LNValueTypeMetadataKeyStringSmartDashes", + { + "int": { + "wrapper": 0 + } + }, + "LNValueTypeMetadataKeyStringAutocorrect", + { + "int": { + "wrapper": 0 + } + } + ], + "valueType": { + "primitive": { + "wrapper": { + "typeIdentifier": 0 + } + } + } + }, + { + "capabilities": 0, + "dynamicOptionsSupport": 0, + "inputConnectionBehavior": 0, + "isInput": false, + "isOptional": true, + "name": "allOn", + "resolvableInputTypes": [ + { + "kindValue": 0, + "valueType": { + "primitive": { + "wrapper": { + "typeIdentifier": 0 + } + } + } + }, + { + "kindValue": 0, + "valueType": { + "primitive": { + "wrapper": { + "typeIdentifier": 2 + } + } + } + }, + { + "kindValue": 0, + "valueType": { + "array": { + "wrapper": { + "capabilities": 3, + "memberValueType": { + "primitive": { + "wrapper": { + "typeIdentifier": 2 + } + } + } + } + } + } + } + ], + "title": { + "alternatives": [], + "key": "All on" + }, + "typeSpecificMetadata": [ + "LNValueTypeMetadataKeyStringCapitalizationType", + { + "int": { + "wrapper": 3 + } + }, + "LNValueTypeMetadataKeyStringSmartQuotes", + { + "int": { + "wrapper": 1 + } + }, + "LNValueTypeMetadataKeyStringMultiline", + { + "int": { + "wrapper": 1 + } + }, + "LNValueTypeMetadataKeyStringAutocorrect", + { + "int": { + "wrapper": 1 + } + }, + "LNValueTypeMetadataKeyStringKeyboardType", + { + "int": { + "wrapper": 0 + } + }, + "LNValueTypeMetadataKeyStringSmartDashes", + { + "int": { + "wrapper": 1 + } + } + ], + "valueType": { + "primitive": { + "wrapper": { + "typeIdentifier": 0 + } + } + } + }, + { + "capabilities": 0, + "dynamicOptionsSupport": 0, + "inputConnectionBehavior": 0, + "isInput": false, + "isOptional": true, + "name": "empty", + "resolvableInputTypes": [ + { + "kindValue": 0, + "valueType": { + "primitive": { + "wrapper": { + "typeIdentifier": 0 + } + } + } + }, + { + "kindValue": 0, + "valueType": { + "primitive": { + "wrapper": { + "typeIdentifier": 2 + } + } + } + }, + { + "kindValue": 0, + "valueType": { + "array": { + "wrapper": { + "capabilities": 3, + "memberValueType": { + "primitive": { + "wrapper": { + "typeIdentifier": 2 + } + } + } + } + } + } + } + ], + "title": { + "alternatives": [], + "key": "Empty" + }, + "typeSpecificMetadata": [], + "valueType": { + "primitive": { + "wrapper": { + "typeIdentifier": 0 + } + } + } + }, + { + "capabilities": 0, + "dynamicOptionsSupport": 0, + "inputConnectionBehavior": 0, + "isInput": false, + "isOptional": true, + "name": "punct", + "resolvableInputTypes": [ + { + "kindValue": 0, + "valueType": { + "primitive": { + "wrapper": { + "typeIdentifier": 0 + } + } + } + }, + { + "kindValue": 0, + "valueType": { + "primitive": { + "wrapper": { + "typeIdentifier": 2 + } + } + } + }, + { + "kindValue": 0, + "valueType": { + "array": { + "wrapper": { + "capabilities": 3, + "memberValueType": { + "primitive": { + "wrapper": { + "typeIdentifier": 2 + } + } + } + } + } + } + } + ], + "title": { + "alternatives": [], + "key": "Punct" + }, + "typeSpecificMetadata": [ + "LNValueTypeMetadataKeyStringCapitalizationType", + { + "int": { + "wrapper": 1 + } + }, + "LNValueTypeMetadataKeyStringKeyboardType", + { + "int": { + "wrapper": 1 + } + } + ], + "valueType": { + "primitive": { + "wrapper": { + "typeIdentifier": 0 + } + } + } + }, + { + "capabilities": 0, + "dynamicOptionsSupport": 0, + "inputConnectionBehavior": 0, + "isInput": false, + "isOptional": true, + "name": "url", + "resolvableInputTypes": [ + { + "kindValue": 0, + "valueType": { + "primitive": { + "wrapper": { + "typeIdentifier": 0 + } + } + } + }, + { + "kindValue": 0, + "valueType": { + "primitive": { + "wrapper": { + "typeIdentifier": 2 + } + } + } + }, + { + "kindValue": 0, + "valueType": { + "array": { + "wrapper": { + "capabilities": 3, + "memberValueType": { + "primitive": { + "wrapper": { + "typeIdentifier": 2 + } + } + } + } + } + } + } + ], + "title": { + "alternatives": [], + "key": "URL" + }, + "typeSpecificMetadata": [ + "LNValueTypeMetadataKeyStringCapitalizationType", + { + "int": { + "wrapper": 2 + } + }, + "LNValueTypeMetadataKeyStringKeyboardType", + { + "int": { + "wrapper": 2 + } + } + ], + "valueType": { + "primitive": { + "wrapper": { + "typeIdentifier": 0 + } + } + } + }, + { + "capabilities": 0, + "dynamicOptionsSupport": 0, + "inputConnectionBehavior": 0, + "isInput": false, + "isOptional": true, + "name": "numberPad", + "resolvableInputTypes": [ + { + "kindValue": 0, + "valueType": { + "array": { + "wrapper": { + "capabilities": 3, + "memberValueType": { + "primitive": { + "wrapper": { + "typeIdentifier": 2 + } + } + } + } + } + } + }, + { + "kindValue": 0, + "valueType": { + "primitive": { + "wrapper": { + "typeIdentifier": 0 + } + } + } + }, + { + "kindValue": 0, + "valueType": { + "primitive": { + "wrapper": { + "typeIdentifier": 2 + } + } + } + } + ], + "title": { + "alternatives": [], + "key": "Number pad" + }, + "typeSpecificMetadata": [ + "LNValueTypeMetadataKeyStringKeyboardType", + { + "int": { + "wrapper": 3 + } + } + ], + "valueType": { + "primitive": { + "wrapper": { + "typeIdentifier": 0 + } + } + } + }, + { + "capabilities": 0, + "dynamicOptionsSupport": 0, + "inputConnectionBehavior": 0, + "isInput": false, + "isOptional": true, + "name": "quotes", + "resolvableInputTypes": [ + { + "kindValue": 0, + "valueType": { + "array": { + "wrapper": { + "capabilities": 3, + "memberValueType": { + "primitive": { + "wrapper": { + "typeIdentifier": 2 + } + } + } + } + } + } + }, + { + "kindValue": 0, + "valueType": { + "primitive": { + "wrapper": { + "typeIdentifier": 0 + } + } + } + }, + { + "kindValue": 0, + "valueType": { + "primitive": { + "wrapper": { + "typeIdentifier": 2 + } + } + } + } + ], + "title": { + "alternatives": [], + "key": "Smart quotes only" + }, + "typeSpecificMetadata": [ + "LNValueTypeMetadataKeyStringSmartQuotes", + { + "int": { + "wrapper": 0 + } + } + ], + "valueType": { + "primitive": { + "wrapper": { + "typeIdentifier": 0 + } + } + } + }, + { + "capabilities": 0, + "dynamicOptionsSupport": 0, + "inputConnectionBehavior": 0, + "isInput": false, + "isOptional": true, + "name": "dashes", + "resolvableInputTypes": [ + { + "kindValue": 0, + "valueType": { + "array": { + "wrapper": { + "capabilities": 3, + "memberValueType": { + "primitive": { + "wrapper": { + "typeIdentifier": 2 + } + } + } + } + } + } + }, + { + "kindValue": 0, + "valueType": { + "primitive": { + "wrapper": { + "typeIdentifier": 0 + } + } + } + }, + { + "kindValue": 0, + "valueType": { + "primitive": { + "wrapper": { + "typeIdentifier": 2 + } + } + } + } + ], + "title": { + "alternatives": [], + "key": "Smart dashes only" + }, + "typeSpecificMetadata": [ + "LNValueTypeMetadataKeyStringSmartDashes", + { + "int": { + "wrapper": 0 + } + } + ], + "valueType": { + "primitive": { + "wrapper": { + "typeIdentifier": 0 + } + } + } + }, + { + "capabilities": 0, + "dynamicOptionsSupport": 0, + "inputConnectionBehavior": 0, + "isInput": false, + "isOptional": true, + "name": "autocorrect", + "resolvableInputTypes": [ + { + "kindValue": 0, + "valueType": { + "array": { + "wrapper": { + "capabilities": 3, + "memberValueType": { + "primitive": { + "wrapper": { + "typeIdentifier": 2 + } + } + } + } + } + } + }, + { + "kindValue": 0, + "valueType": { + "primitive": { + "wrapper": { + "typeIdentifier": 0 + } + } + } + }, + { + "kindValue": 0, + "valueType": { + "primitive": { + "wrapper": { + "typeIdentifier": 2 + } + } + } + } + ], + "title": { + "alternatives": [], + "key": "Autocorrect only" + }, + "typeSpecificMetadata": [ + "LNValueTypeMetadataKeyStringAutocorrect", + { + "int": { + "wrapper": 0 + } + } + ], + "valueType": { + "primitive": { + "wrapper": { + "typeIdentifier": 0 + } + } + } + }, + { + "capabilities": 1, + "dynamicOptionsSupport": 0, + "inputConnectionBehavior": 0, + "isInput": false, + "isOptional": false, + "name": "withDefault", + "resolvableInputTypes": [ + { + "kindValue": 0, + "valueType": { + "primitive": { + "wrapper": { + "typeIdentifier": 0 + } + } + } + }, + { + "kindValue": 0, + "valueType": { + "primitive": { + "wrapper": { + "typeIdentifier": 2 + } + } + } + }, + { + "kindValue": 0, + "valueType": { + "array": { + "wrapper": { + "capabilities": 3, + "memberValueType": { + "primitive": { + "wrapper": { + "typeIdentifier": 2 + } + } + } + } + } + } + } + ], + "title": { + "alternatives": [], + "key": "With default" + }, + "typeSpecificMetadata": [ + "LNValueTypeSpecificMetadataKeyDefaultValue", + { + "string": { + "wrapper": "hi" + } + }, + "LNValueTypeMetadataKeyStringMultiline", + { + "int": { + "wrapper": 1 + } + } + ], + "valueType": { + "primitive": { + "wrapper": { + "typeIdentifier": 0 + } + } + } + }, + { + "capabilities": 0, + "dynamicOptionsSupport": 0, + "inputConnectionBehavior": 0, + "isInput": false, + "isOptional": false, + "name": "dialog", + "parameterDescription": { + "alternatives": [], + "key": "Described" + }, + "resolvableInputTypes": [ + { + "kindValue": 0, + "valueType": { + "primitive": { + "wrapper": { + "typeIdentifier": 0 + } + } + } + }, + { + "kindValue": 0, + "valueType": { + "primitive": { + "wrapper": { + "typeIdentifier": 2 + } + } + } + }, + { + "kindValue": 0, + "valueType": { + "array": { + "wrapper": { + "capabilities": 3, + "memberValueType": { + "primitive": { + "wrapper": { + "typeIdentifier": 2 + } + } + } + } + } + } + } + ], + "title": { + "alternatives": [], + "key": "Options and dialog" + }, + "typeSpecificMetadata": [ + "LNValueTypeMetadataKeyStringAutocorrect", + { + "int": { + "wrapper": 0 + } + }, + "LNValueTypeMetadataKeyStringKeyboardType", + { + "int": { + "wrapper": 3 + } + } + ], + "valueType": { + "primitive": { + "wrapper": { + "typeIdentifier": 0 + } + } + } + }, + { + "capabilities": 0, + "dynamicOptionsSupport": 0, + "inputConnectionBehavior": 0, + "isInput": false, + "isOptional": true, + "name": "explicitDefaults", + "resolvableInputTypes": [ + { + "kindValue": 0, + "valueType": { + "primitive": { + "wrapper": { + "typeIdentifier": 0 + } + } + } + }, + { + "kindValue": 0, + "valueType": { + "primitive": { + "wrapper": { + "typeIdentifier": 2 + } + } + } + }, + { + "kindValue": 0, + "valueType": { + "array": { + "wrapper": { + "capabilities": 3, + "memberValueType": { + "primitive": { + "wrapper": { + "typeIdentifier": 2 + } + } + } + } + } + } + } + ], + "title": { + "alternatives": [], + "key": "Explicit defaults" + }, + "typeSpecificMetadata": [ + "LNValueTypeMetadataKeyStringSmartQuotes", + { + "int": { + "wrapper": 1 + } + }, + "LNValueTypeMetadataKeyStringKeyboardType", + { + "int": { + "wrapper": 0 + } + }, + "LNValueTypeMetadataKeyStringMultiline", + { + "int": { + "wrapper": 0 + } + }, + "LNValueTypeMetadataKeyStringSmartDashes", + { + "int": { + "wrapper": 1 + } + }, + "LNValueTypeMetadataKeyStringAutocorrect", + { + "int": { + "wrapper": 1 + } + }, + "LNValueTypeMetadataKeyStringCapitalizationType", + { + "int": { + "wrapper": 2 + } + } + ], + "valueType": { + "primitive": { + "wrapper": { + "typeIdentifier": 0 + } + } + } + } + ], + "presentationStyle": 0, + "requiredCapabilities": [], + "supportedModes": 1, + "systemProtocolMetadata": [], + "systemProtocolMetadataV2": [], + "systemProtocols": [], + "title": { + "alternatives": [], + "key": "Input options probe" + }, + "typeSpecificMetadata": [], + "visibilityMetadata": { + "assistantOnly": false, + "isDiscoverable": true + } +} diff --git a/sweetpad-cli/fixtures/appintents/InputOptionsProbe.swift b/sweetpad-cli/fixtures/appintents/InputOptionsProbe.swift new file mode 100644 index 00000000..1c804420 --- /dev/null +++ b/sweetpad-cli/fixtures/appintents/InputOptionsProbe.swift @@ -0,0 +1,36 @@ +// Every String.IntentInputOptions argument, explicit and defaulted. +import AppIntents + +struct InputOptionsProbeIntent: AppIntent { + static let title: LocalizedStringResource = "Input options probe" + static let openAppWhenRun: Bool = false + + @Parameter(title: "All off", inputOptions: String.IntentInputOptions(keyboardType: .default, capitalizationType: .none, multiline: false, autocorrect: false, smartQuotes: false, smartDashes: false)) + var allOff: String? + @Parameter(title: "All on", inputOptions: String.IntentInputOptions(keyboardType: .asciiCapable, capitalizationType: .allCharacters, multiline: true, autocorrect: true, smartQuotes: true, smartDashes: true)) + var allOn: String? + @Parameter(title: "Empty", inputOptions: String.IntentInputOptions()) + var empty: String? + @Parameter(title: "Punct", inputOptions: String.IntentInputOptions(keyboardType: .numbersAndPunctuation, capitalizationType: .words)) + var punct: String? + @Parameter(title: "URL", inputOptions: String.IntentInputOptions(keyboardType: .URL, capitalizationType: .sentences)) + var url: String? + @Parameter(title: "Number pad", inputOptions: String.IntentInputOptions(keyboardType: .numberPad)) + var numberPad: String? + @Parameter(title: "Smart quotes only", inputOptions: String.IntentInputOptions(smartQuotes: false)) + var quotes: String? + @Parameter(title: "Smart dashes only", inputOptions: String.IntentInputOptions(smartDashes: false)) + var dashes: String? + @Parameter(title: "Autocorrect only", inputOptions: String.IntentInputOptions(autocorrect: false)) + var autocorrect: String? + @Parameter(title: "With default", default: "hi", inputOptions: String.IntentInputOptions(multiline: true)) + var withDefault: String + @Parameter(title: "Options and dialog", description: "Described", inputOptions: String.IntentInputOptions(keyboardType: .numberPad, autocorrect: false), requestValueDialog: "Which?") + var dialog: String + + @Parameter(title: "Explicit defaults", inputOptions: String.IntentInputOptions(keyboardType: .asciiCapable, capitalizationType: .sentences, multiline: false, autocorrect: true, smartQuotes: true, smartDashes: true)) + var explicitDefaults: String? + + @MainActor + func perform() async throws -> some IntentResult { .result() } +} diff --git a/sweetpad-cli/fixtures/appintents/InputOptionsProbe.swiftconstvalues b/sweetpad-cli/fixtures/appintents/InputOptionsProbe.swiftconstvalues new file mode 100644 index 00000000..2ead657d --- /dev/null +++ b/sweetpad-cli/fixtures/appintents/InputOptionsProbe.swiftconstvalues @@ -0,0 +1,2989 @@ +[ + { + "allConformances": [ + { + "conformanceDefiningModule": "Sev", + "protocolName": "AppIntents.AppIntent" + }, + { + "conformanceDefiningModule": "Sev", + "protocolName": "AppIntents.PersistentlyIdentifiable" + }, + { + "conformanceDefiningModule": "Sev", + "protocolName": "AppIntents._SupportsAppDependencies" + }, + { + "conformanceDefiningModule": "Sev", + "protocolName": "Swift.Sendable" + }, + { + "conformanceDefiningModule": "Sev", + "protocolName": "Swift.SendableMetatype" + } + ], + "associatedTypeAliases": [ + { + "opaqueTypeProtocolRequirements": [ + "AppIntents.IntentResult" + ], + "opaqueTypeSameTypeRequirements": [], + "substitutedMangledTypeName": "3Sev23InputOptionsProbeIntentV7performQryYaKFQOy_Qo_", + "substitutedTypeName": "some AppIntents.IntentResult", + "typeAliasName": "PerformResult" + }, + { + "opaqueTypeProtocolRequirements": [ + "AppIntents.ParameterSummary" + ], + "opaqueTypeSameTypeRequirements": [], + "substitutedMangledTypeName": "10AppIntents0A6IntentPAAE16parameterSummaryQrvpZQOy3Sev017InputOptionsProbeC0V_Qo_", + "substitutedTypeName": "some AppIntents.ParameterSummary", + "typeAliasName": "SummaryContent" + } + ], + "conformances": [ + "AppIntents.AppIntent", + "AppIntents.PersistentlyIdentifiable", + "AppIntents._SupportsAppDependencies", + "Swift.Sendable", + "Swift.SendableMetatype" + ], + "file": "InputOptionsProbe.swift", + "kind": "struct", + "line": 4, + "mangledTypeName": "3Sev23InputOptionsProbeIntentV", + "properties": [ + { + "file": "InputOptionsProbe.swift", + "isComputed": "false", + "isStatic": "false", + "label": "_allOff", + "line": 9, + "mangledTypeName": "n/a - deprecated", + "type": "AppIntents.IntentParameter>", + "value": { + "arguments": [ + { + "label": "title", + "type": "Foundation.LocalizedStringResource", + "value": "All off", + "valueKind": "RawLiteral" + }, + { + "label": "description", + "type": "Swift.Optional", + "valueKind": "NilLiteral" + }, + { + "label": "default", + "type": "Swift.Optional", + "valueKind": "NilLiteral" + }, + { + "label": "inputOptions", + "type": "Swift.Optional", + "value": { + "arguments": [ + { + "label": "keyboardType", + "type": "Swift.String.IntentInputOptions.KeyboardType", + "value": { + "name": "default" + }, + "valueKind": "Enum" + }, + { + "label": "capitalizationType", + "type": "Swift.String.IntentInputOptions.CapitalizationType", + "value": { + "name": "none" + }, + "valueKind": "Enum" + }, + { + "label": "multiline", + "type": "Swift.Bool", + "value": "false", + "valueKind": "RawLiteral" + }, + { + "label": "autocorrect", + "type": "Swift.Bool", + "value": "false", + "valueKind": "RawLiteral" + }, + { + "label": "smartQuotes", + "type": "Swift.Bool", + "value": "false", + "valueKind": "RawLiteral" + }, + { + "label": "smartDashes", + "type": "Swift.Bool", + "value": "false", + "valueKind": "RawLiteral" + } + ], + "type": "Swift.String.IntentInputOptions" + }, + "valueKind": "InitCall" + }, + { + "label": "requestValueDialog", + "type": "Swift.Optional", + "valueKind": "NilLiteral" + }, + { + "label": "inputConnectionBehavior", + "type": "AppIntents.InputConnectionBehavior", + "valueKind": "Runtime" + } + ], + "type": "AppIntents.IntentParameter>" + }, + "valueKind": "InitCall" + }, + { + "file": "InputOptionsProbe.swift", + "isComputed": "false", + "isStatic": "false", + "label": "_allOn", + "line": 11, + "mangledTypeName": "n/a - deprecated", + "type": "AppIntents.IntentParameter>", + "value": { + "arguments": [ + { + "label": "title", + "type": "Foundation.LocalizedStringResource", + "value": "All on", + "valueKind": "RawLiteral" + }, + { + "label": "description", + "type": "Swift.Optional", + "valueKind": "NilLiteral" + }, + { + "label": "default", + "type": "Swift.Optional", + "valueKind": "NilLiteral" + }, + { + "label": "inputOptions", + "type": "Swift.Optional", + "value": { + "arguments": [ + { + "label": "keyboardType", + "type": "Swift.String.IntentInputOptions.KeyboardType", + "value": { + "name": "asciiCapable" + }, + "valueKind": "Enum" + }, + { + "label": "capitalizationType", + "type": "Swift.String.IntentInputOptions.CapitalizationType", + "value": { + "name": "allCharacters" + }, + "valueKind": "Enum" + }, + { + "label": "multiline", + "type": "Swift.Bool", + "value": "true", + "valueKind": "RawLiteral" + }, + { + "label": "autocorrect", + "type": "Swift.Bool", + "value": "true", + "valueKind": "RawLiteral" + }, + { + "label": "smartQuotes", + "type": "Swift.Bool", + "value": "true", + "valueKind": "RawLiteral" + }, + { + "label": "smartDashes", + "type": "Swift.Bool", + "value": "true", + "valueKind": "RawLiteral" + } + ], + "type": "Swift.String.IntentInputOptions" + }, + "valueKind": "InitCall" + }, + { + "label": "requestValueDialog", + "type": "Swift.Optional", + "valueKind": "NilLiteral" + }, + { + "label": "inputConnectionBehavior", + "type": "AppIntents.InputConnectionBehavior", + "valueKind": "Runtime" + } + ], + "type": "AppIntents.IntentParameter>" + }, + "valueKind": "InitCall" + }, + { + "file": "InputOptionsProbe.swift", + "isComputed": "false", + "isStatic": "false", + "label": "_empty", + "line": 13, + "mangledTypeName": "n/a - deprecated", + "type": "AppIntents.IntentParameter>", + "value": { + "arguments": [ + { + "label": "title", + "type": "Foundation.LocalizedStringResource", + "value": "Empty", + "valueKind": "RawLiteral" + }, + { + "label": "description", + "type": "Swift.Optional", + "valueKind": "NilLiteral" + }, + { + "label": "default", + "type": "Swift.Optional", + "valueKind": "NilLiteral" + }, + { + "label": "inputOptions", + "type": "Swift.Optional", + "value": { + "arguments": [ + { + "label": "keyboardType", + "type": "Swift.String.IntentInputOptions.KeyboardType", + "valueKind": "Runtime" + }, + { + "label": "capitalizationType", + "type": "Swift.String.IntentInputOptions.CapitalizationType", + "valueKind": "Runtime" + }, + { + "label": "multiline", + "type": "Swift.Bool", + "valueKind": "Runtime" + }, + { + "label": "autocorrect", + "type": "Swift.Bool", + "valueKind": "Runtime" + }, + { + "label": "smartQuotes", + "type": "Swift.Bool", + "valueKind": "Runtime" + }, + { + "label": "smartDashes", + "type": "Swift.Bool", + "valueKind": "Runtime" + } + ], + "type": "Swift.String.IntentInputOptions" + }, + "valueKind": "InitCall" + }, + { + "label": "requestValueDialog", + "type": "Swift.Optional", + "valueKind": "NilLiteral" + }, + { + "label": "inputConnectionBehavior", + "type": "AppIntents.InputConnectionBehavior", + "valueKind": "Runtime" + } + ], + "type": "AppIntents.IntentParameter>" + }, + "valueKind": "InitCall" + }, + { + "file": "InputOptionsProbe.swift", + "isComputed": "false", + "isStatic": "false", + "label": "_punct", + "line": 15, + "mangledTypeName": "n/a - deprecated", + "type": "AppIntents.IntentParameter>", + "value": { + "arguments": [ + { + "label": "title", + "type": "Foundation.LocalizedStringResource", + "value": "Punct", + "valueKind": "RawLiteral" + }, + { + "label": "description", + "type": "Swift.Optional", + "valueKind": "NilLiteral" + }, + { + "label": "default", + "type": "Swift.Optional", + "valueKind": "NilLiteral" + }, + { + "label": "inputOptions", + "type": "Swift.Optional", + "value": { + "arguments": [ + { + "label": "keyboardType", + "type": "Swift.String.IntentInputOptions.KeyboardType", + "value": { + "name": "numbersAndPunctuation" + }, + "valueKind": "Enum" + }, + { + "label": "capitalizationType", + "type": "Swift.String.IntentInputOptions.CapitalizationType", + "value": { + "name": "words" + }, + "valueKind": "Enum" + }, + { + "label": "multiline", + "type": "Swift.Bool", + "valueKind": "Runtime" + }, + { + "label": "autocorrect", + "type": "Swift.Bool", + "valueKind": "Runtime" + }, + { + "label": "smartQuotes", + "type": "Swift.Bool", + "valueKind": "Runtime" + }, + { + "label": "smartDashes", + "type": "Swift.Bool", + "valueKind": "Runtime" + } + ], + "type": "Swift.String.IntentInputOptions" + }, + "valueKind": "InitCall" + }, + { + "label": "requestValueDialog", + "type": "Swift.Optional", + "valueKind": "NilLiteral" + }, + { + "label": "inputConnectionBehavior", + "type": "AppIntents.InputConnectionBehavior", + "valueKind": "Runtime" + } + ], + "type": "AppIntents.IntentParameter>" + }, + "valueKind": "InitCall" + }, + { + "file": "InputOptionsProbe.swift", + "isComputed": "false", + "isStatic": "false", + "label": "_url", + "line": 17, + "mangledTypeName": "n/a - deprecated", + "type": "AppIntents.IntentParameter>", + "value": { + "arguments": [ + { + "label": "title", + "type": "Foundation.LocalizedStringResource", + "value": "URL", + "valueKind": "RawLiteral" + }, + { + "label": "description", + "type": "Swift.Optional", + "valueKind": "NilLiteral" + }, + { + "label": "default", + "type": "Swift.Optional", + "valueKind": "NilLiteral" + }, + { + "label": "inputOptions", + "type": "Swift.Optional", + "value": { + "arguments": [ + { + "label": "keyboardType", + "type": "Swift.String.IntentInputOptions.KeyboardType", + "value": { + "name": "URL" + }, + "valueKind": "Enum" + }, + { + "label": "capitalizationType", + "type": "Swift.String.IntentInputOptions.CapitalizationType", + "value": { + "name": "sentences" + }, + "valueKind": "Enum" + }, + { + "label": "multiline", + "type": "Swift.Bool", + "valueKind": "Runtime" + }, + { + "label": "autocorrect", + "type": "Swift.Bool", + "valueKind": "Runtime" + }, + { + "label": "smartQuotes", + "type": "Swift.Bool", + "valueKind": "Runtime" + }, + { + "label": "smartDashes", + "type": "Swift.Bool", + "valueKind": "Runtime" + } + ], + "type": "Swift.String.IntentInputOptions" + }, + "valueKind": "InitCall" + }, + { + "label": "requestValueDialog", + "type": "Swift.Optional", + "valueKind": "NilLiteral" + }, + { + "label": "inputConnectionBehavior", + "type": "AppIntents.InputConnectionBehavior", + "valueKind": "Runtime" + } + ], + "type": "AppIntents.IntentParameter>" + }, + "valueKind": "InitCall" + }, + { + "file": "InputOptionsProbe.swift", + "isComputed": "false", + "isStatic": "false", + "label": "_numberPad", + "line": 19, + "mangledTypeName": "n/a - deprecated", + "type": "AppIntents.IntentParameter>", + "value": { + "arguments": [ + { + "label": "title", + "type": "Foundation.LocalizedStringResource", + "value": "Number pad", + "valueKind": "RawLiteral" + }, + { + "label": "description", + "type": "Swift.Optional", + "valueKind": "NilLiteral" + }, + { + "label": "default", + "type": "Swift.Optional", + "valueKind": "NilLiteral" + }, + { + "label": "inputOptions", + "type": "Swift.Optional", + "value": { + "arguments": [ + { + "label": "keyboardType", + "type": "Swift.String.IntentInputOptions.KeyboardType", + "value": { + "name": "numberPad" + }, + "valueKind": "Enum" + }, + { + "label": "capitalizationType", + "type": "Swift.String.IntentInputOptions.CapitalizationType", + "valueKind": "Runtime" + }, + { + "label": "multiline", + "type": "Swift.Bool", + "valueKind": "Runtime" + }, + { + "label": "autocorrect", + "type": "Swift.Bool", + "valueKind": "Runtime" + }, + { + "label": "smartQuotes", + "type": "Swift.Bool", + "valueKind": "Runtime" + }, + { + "label": "smartDashes", + "type": "Swift.Bool", + "valueKind": "Runtime" + } + ], + "type": "Swift.String.IntentInputOptions" + }, + "valueKind": "InitCall" + }, + { + "label": "requestValueDialog", + "type": "Swift.Optional", + "valueKind": "NilLiteral" + }, + { + "label": "inputConnectionBehavior", + "type": "AppIntents.InputConnectionBehavior", + "valueKind": "Runtime" + } + ], + "type": "AppIntents.IntentParameter>" + }, + "valueKind": "InitCall" + }, + { + "file": "InputOptionsProbe.swift", + "isComputed": "false", + "isStatic": "false", + "label": "_quotes", + "line": 21, + "mangledTypeName": "n/a - deprecated", + "type": "AppIntents.IntentParameter>", + "value": { + "arguments": [ + { + "label": "title", + "type": "Foundation.LocalizedStringResource", + "value": "Smart quotes only", + "valueKind": "RawLiteral" + }, + { + "label": "description", + "type": "Swift.Optional", + "valueKind": "NilLiteral" + }, + { + "label": "default", + "type": "Swift.Optional", + "valueKind": "NilLiteral" + }, + { + "label": "inputOptions", + "type": "Swift.Optional", + "value": { + "arguments": [ + { + "label": "keyboardType", + "type": "Swift.String.IntentInputOptions.KeyboardType", + "valueKind": "Runtime" + }, + { + "label": "capitalizationType", + "type": "Swift.String.IntentInputOptions.CapitalizationType", + "valueKind": "Runtime" + }, + { + "label": "multiline", + "type": "Swift.Bool", + "valueKind": "Runtime" + }, + { + "label": "autocorrect", + "type": "Swift.Bool", + "valueKind": "Runtime" + }, + { + "label": "smartQuotes", + "type": "Swift.Bool", + "value": "false", + "valueKind": "RawLiteral" + }, + { + "label": "smartDashes", + "type": "Swift.Bool", + "valueKind": "Runtime" + } + ], + "type": "Swift.String.IntentInputOptions" + }, + "valueKind": "InitCall" + }, + { + "label": "requestValueDialog", + "type": "Swift.Optional", + "valueKind": "NilLiteral" + }, + { + "label": "inputConnectionBehavior", + "type": "AppIntents.InputConnectionBehavior", + "valueKind": "Runtime" + } + ], + "type": "AppIntents.IntentParameter>" + }, + "valueKind": "InitCall" + }, + { + "file": "InputOptionsProbe.swift", + "isComputed": "false", + "isStatic": "false", + "label": "_dashes", + "line": 23, + "mangledTypeName": "n/a - deprecated", + "type": "AppIntents.IntentParameter>", + "value": { + "arguments": [ + { + "label": "title", + "type": "Foundation.LocalizedStringResource", + "value": "Smart dashes only", + "valueKind": "RawLiteral" + }, + { + "label": "description", + "type": "Swift.Optional", + "valueKind": "NilLiteral" + }, + { + "label": "default", + "type": "Swift.Optional", + "valueKind": "NilLiteral" + }, + { + "label": "inputOptions", + "type": "Swift.Optional", + "value": { + "arguments": [ + { + "label": "keyboardType", + "type": "Swift.String.IntentInputOptions.KeyboardType", + "valueKind": "Runtime" + }, + { + "label": "capitalizationType", + "type": "Swift.String.IntentInputOptions.CapitalizationType", + "valueKind": "Runtime" + }, + { + "label": "multiline", + "type": "Swift.Bool", + "valueKind": "Runtime" + }, + { + "label": "autocorrect", + "type": "Swift.Bool", + "valueKind": "Runtime" + }, + { + "label": "smartQuotes", + "type": "Swift.Bool", + "valueKind": "Runtime" + }, + { + "label": "smartDashes", + "type": "Swift.Bool", + "value": "false", + "valueKind": "RawLiteral" + } + ], + "type": "Swift.String.IntentInputOptions" + }, + "valueKind": "InitCall" + }, + { + "label": "requestValueDialog", + "type": "Swift.Optional", + "valueKind": "NilLiteral" + }, + { + "label": "inputConnectionBehavior", + "type": "AppIntents.InputConnectionBehavior", + "valueKind": "Runtime" + } + ], + "type": "AppIntents.IntentParameter>" + }, + "valueKind": "InitCall" + }, + { + "file": "InputOptionsProbe.swift", + "isComputed": "false", + "isStatic": "false", + "label": "_autocorrect", + "line": 25, + "mangledTypeName": "n/a - deprecated", + "type": "AppIntents.IntentParameter>", + "value": { + "arguments": [ + { + "label": "title", + "type": "Foundation.LocalizedStringResource", + "value": "Autocorrect only", + "valueKind": "RawLiteral" + }, + { + "label": "description", + "type": "Swift.Optional", + "valueKind": "NilLiteral" + }, + { + "label": "default", + "type": "Swift.Optional", + "valueKind": "NilLiteral" + }, + { + "label": "inputOptions", + "type": "Swift.Optional", + "value": { + "arguments": [ + { + "label": "keyboardType", + "type": "Swift.String.IntentInputOptions.KeyboardType", + "valueKind": "Runtime" + }, + { + "label": "capitalizationType", + "type": "Swift.String.IntentInputOptions.CapitalizationType", + "valueKind": "Runtime" + }, + { + "label": "multiline", + "type": "Swift.Bool", + "valueKind": "Runtime" + }, + { + "label": "autocorrect", + "type": "Swift.Bool", + "value": "false", + "valueKind": "RawLiteral" + }, + { + "label": "smartQuotes", + "type": "Swift.Bool", + "valueKind": "Runtime" + }, + { + "label": "smartDashes", + "type": "Swift.Bool", + "valueKind": "Runtime" + } + ], + "type": "Swift.String.IntentInputOptions" + }, + "valueKind": "InitCall" + }, + { + "label": "requestValueDialog", + "type": "Swift.Optional", + "valueKind": "NilLiteral" + }, + { + "label": "inputConnectionBehavior", + "type": "AppIntents.InputConnectionBehavior", + "valueKind": "Runtime" + } + ], + "type": "AppIntents.IntentParameter>" + }, + "valueKind": "InitCall" + }, + { + "file": "InputOptionsProbe.swift", + "isComputed": "false", + "isStatic": "false", + "label": "_withDefault", + "line": 27, + "mangledTypeName": "n/a - deprecated", + "type": "AppIntents.IntentParameter", + "value": { + "arguments": [ + { + "label": "title", + "type": "Foundation.LocalizedStringResource", + "value": "With default", + "valueKind": "RawLiteral" + }, + { + "label": "description", + "type": "Swift.Optional", + "valueKind": "NilLiteral" + }, + { + "label": "default", + "type": "Swift.Optional", + "value": "hi", + "valueKind": "RawLiteral" + }, + { + "label": "inputOptions", + "type": "Swift.Optional", + "value": { + "arguments": [ + { + "label": "keyboardType", + "type": "Swift.String.IntentInputOptions.KeyboardType", + "valueKind": "Runtime" + }, + { + "label": "capitalizationType", + "type": "Swift.String.IntentInputOptions.CapitalizationType", + "valueKind": "Runtime" + }, + { + "label": "multiline", + "type": "Swift.Bool", + "value": "true", + "valueKind": "RawLiteral" + }, + { + "label": "autocorrect", + "type": "Swift.Bool", + "valueKind": "Runtime" + }, + { + "label": "smartQuotes", + "type": "Swift.Bool", + "valueKind": "Runtime" + }, + { + "label": "smartDashes", + "type": "Swift.Bool", + "valueKind": "Runtime" + } + ], + "type": "Swift.String.IntentInputOptions" + }, + "valueKind": "InitCall" + }, + { + "label": "requestValueDialog", + "type": "Swift.Optional", + "valueKind": "NilLiteral" + }, + { + "label": "inputConnectionBehavior", + "type": "AppIntents.InputConnectionBehavior", + "valueKind": "Runtime" + } + ], + "type": "AppIntents.IntentParameter" + }, + "valueKind": "InitCall" + }, + { + "file": "InputOptionsProbe.swift", + "isComputed": "false", + "isStatic": "false", + "label": "_dialog", + "line": 29, + "mangledTypeName": "n/a - deprecated", + "type": "AppIntents.IntentParameter", + "value": { + "arguments": [ + { + "label": "title", + "type": "Foundation.LocalizedStringResource", + "value": "Options and dialog", + "valueKind": "RawLiteral" + }, + { + "label": "description", + "type": "Swift.Optional", + "value": "Described", + "valueKind": "RawLiteral" + }, + { + "label": "default", + "type": "Swift.Optional", + "valueKind": "NilLiteral" + }, + { + "label": "inputOptions", + "type": "Swift.Optional", + "value": { + "arguments": [ + { + "label": "keyboardType", + "type": "Swift.String.IntentInputOptions.KeyboardType", + "value": { + "name": "numberPad" + }, + "valueKind": "Enum" + }, + { + "label": "capitalizationType", + "type": "Swift.String.IntentInputOptions.CapitalizationType", + "valueKind": "Runtime" + }, + { + "label": "multiline", + "type": "Swift.Bool", + "valueKind": "Runtime" + }, + { + "label": "autocorrect", + "type": "Swift.Bool", + "value": "false", + "valueKind": "RawLiteral" + }, + { + "label": "smartQuotes", + "type": "Swift.Bool", + "valueKind": "Runtime" + }, + { + "label": "smartDashes", + "type": "Swift.Bool", + "valueKind": "Runtime" + } + ], + "type": "Swift.String.IntentInputOptions" + }, + "valueKind": "InitCall" + }, + { + "label": "requestValueDialog", + "type": "Swift.Optional", + "value": "Which?", + "valueKind": "RawLiteral" + }, + { + "label": "inputConnectionBehavior", + "type": "AppIntents.InputConnectionBehavior", + "valueKind": "Runtime" + } + ], + "type": "AppIntents.IntentParameter" + }, + "valueKind": "InitCall" + }, + { + "file": "InputOptionsProbe.swift", + "isComputed": "false", + "isStatic": "false", + "label": "_explicitDefaults", + "line": 32, + "mangledTypeName": "n/a - deprecated", + "type": "AppIntents.IntentParameter>", + "value": { + "arguments": [ + { + "label": "title", + "type": "Foundation.LocalizedStringResource", + "value": "Explicit defaults", + "valueKind": "RawLiteral" + }, + { + "label": "description", + "type": "Swift.Optional", + "valueKind": "NilLiteral" + }, + { + "label": "default", + "type": "Swift.Optional", + "valueKind": "NilLiteral" + }, + { + "label": "inputOptions", + "type": "Swift.Optional", + "value": { + "arguments": [ + { + "label": "keyboardType", + "type": "Swift.String.IntentInputOptions.KeyboardType", + "value": { + "name": "asciiCapable" + }, + "valueKind": "Enum" + }, + { + "label": "capitalizationType", + "type": "Swift.String.IntentInputOptions.CapitalizationType", + "value": { + "name": "sentences" + }, + "valueKind": "Enum" + }, + { + "label": "multiline", + "type": "Swift.Bool", + "value": "false", + "valueKind": "RawLiteral" + }, + { + "label": "autocorrect", + "type": "Swift.Bool", + "value": "true", + "valueKind": "RawLiteral" + }, + { + "label": "smartQuotes", + "type": "Swift.Bool", + "value": "true", + "valueKind": "RawLiteral" + }, + { + "label": "smartDashes", + "type": "Swift.Bool", + "value": "true", + "valueKind": "RawLiteral" + } + ], + "type": "Swift.String.IntentInputOptions" + }, + "valueKind": "InitCall" + }, + { + "label": "requestValueDialog", + "type": "Swift.Optional", + "valueKind": "NilLiteral" + }, + { + "label": "inputConnectionBehavior", + "type": "AppIntents.InputConnectionBehavior", + "valueKind": "Runtime" + } + ], + "type": "AppIntents.IntentParameter>" + }, + "valueKind": "InitCall" + }, + { + "file": "InputOptionsProbe.swift", + "isComputed": "false", + "isStatic": "true", + "label": "title", + "line": 5, + "mangledTypeName": "n/a - deprecated", + "type": "Foundation.LocalizedStringResource", + "value": "Input options probe", + "valueKind": "RawLiteral" + }, + { + "file": "InputOptionsProbe.swift", + "isComputed": "false", + "isStatic": "true", + "label": "openAppWhenRun", + "line": 6, + "mangledTypeName": "n/a - deprecated", + "type": "Swift.Bool", + "value": "false", + "valueKind": "RawLiteral" + }, + { + "file": "InputOptionsProbe.swift", + "isComputed": "true", + "isStatic": "false", + "label": "allOff", + "line": 9, + "mangledTypeName": "n/a - deprecated", + "propertyWrappers": [ + { + "arguments": [ + { + "label": "title", + "type": "Foundation.LocalizedStringResource", + "value": "All off", + "valueKind": "RawLiteral" + }, + { + "label": "inputOptions", + "type": "Swift.Optional", + "value": { + "arguments": [ + { + "label": "keyboardType", + "type": "Swift.String.IntentInputOptions.KeyboardType", + "value": { + "name": "default" + }, + "valueKind": "Enum" + }, + { + "label": "capitalizationType", + "type": "Swift.String.IntentInputOptions.CapitalizationType", + "value": { + "name": "none" + }, + "valueKind": "Enum" + }, + { + "label": "multiline", + "type": "Swift.Bool", + "value": "false", + "valueKind": "RawLiteral" + }, + { + "label": "autocorrect", + "type": "Swift.Bool", + "value": "false", + "valueKind": "RawLiteral" + }, + { + "label": "smartQuotes", + "type": "Swift.Bool", + "value": "false", + "valueKind": "RawLiteral" + }, + { + "label": "smartDashes", + "type": "Swift.Bool", + "value": "false", + "valueKind": "RawLiteral" + } + ], + "type": "Swift.String.IntentInputOptions" + }, + "valueKind": "InitCall" + } + ], + "file": "InputOptionsProbe.swift", + "line": 8, + "type": "AppIntents.IntentParameter" + } + ], + "type": "Swift.Optional", + "value": { + "arguments": [ + { + "label": "title", + "type": "Foundation.LocalizedStringResource", + "value": "All off", + "valueKind": "RawLiteral" + }, + { + "label": "description", + "type": "Swift.Optional", + "valueKind": "NilLiteral" + }, + { + "label": "default", + "type": "Swift.Optional", + "valueKind": "NilLiteral" + }, + { + "label": "inputOptions", + "type": "Swift.Optional", + "value": { + "arguments": [ + { + "label": "keyboardType", + "type": "Swift.String.IntentInputOptions.KeyboardType", + "value": { + "name": "default" + }, + "valueKind": "Enum" + }, + { + "label": "capitalizationType", + "type": "Swift.String.IntentInputOptions.CapitalizationType", + "value": { + "name": "none" + }, + "valueKind": "Enum" + }, + { + "label": "multiline", + "type": "Swift.Bool", + "value": "false", + "valueKind": "RawLiteral" + }, + { + "label": "autocorrect", + "type": "Swift.Bool", + "value": "false", + "valueKind": "RawLiteral" + }, + { + "label": "smartQuotes", + "type": "Swift.Bool", + "value": "false", + "valueKind": "RawLiteral" + }, + { + "label": "smartDashes", + "type": "Swift.Bool", + "value": "false", + "valueKind": "RawLiteral" + } + ], + "type": "Swift.String.IntentInputOptions" + }, + "valueKind": "InitCall" + }, + { + "label": "requestValueDialog", + "type": "Swift.Optional", + "valueKind": "NilLiteral" + }, + { + "label": "inputConnectionBehavior", + "type": "AppIntents.InputConnectionBehavior", + "valueKind": "Runtime" + } + ], + "type": "AppIntents.IntentParameter>" + }, + "valueKind": "InitCall" + }, + { + "file": "InputOptionsProbe.swift", + "isComputed": "true", + "isStatic": "false", + "label": "$allOff", + "line": 9, + "mangledTypeName": "n/a - deprecated", + "type": "AppIntents.IntentParameter>", + "valueKind": "Runtime" + }, + { + "file": "InputOptionsProbe.swift", + "isComputed": "true", + "isStatic": "false", + "label": "allOn", + "line": 11, + "mangledTypeName": "n/a - deprecated", + "propertyWrappers": [ + { + "arguments": [ + { + "label": "title", + "type": "Foundation.LocalizedStringResource", + "value": "All on", + "valueKind": "RawLiteral" + }, + { + "label": "inputOptions", + "type": "Swift.Optional", + "value": { + "arguments": [ + { + "label": "keyboardType", + "type": "Swift.String.IntentInputOptions.KeyboardType", + "value": { + "name": "asciiCapable" + }, + "valueKind": "Enum" + }, + { + "label": "capitalizationType", + "type": "Swift.String.IntentInputOptions.CapitalizationType", + "value": { + "name": "allCharacters" + }, + "valueKind": "Enum" + }, + { + "label": "multiline", + "type": "Swift.Bool", + "value": "true", + "valueKind": "RawLiteral" + }, + { + "label": "autocorrect", + "type": "Swift.Bool", + "value": "true", + "valueKind": "RawLiteral" + }, + { + "label": "smartQuotes", + "type": "Swift.Bool", + "value": "true", + "valueKind": "RawLiteral" + }, + { + "label": "smartDashes", + "type": "Swift.Bool", + "value": "true", + "valueKind": "RawLiteral" + } + ], + "type": "Swift.String.IntentInputOptions" + }, + "valueKind": "InitCall" + } + ], + "file": "InputOptionsProbe.swift", + "line": 10, + "type": "AppIntents.IntentParameter" + } + ], + "type": "Swift.Optional", + "value": { + "arguments": [ + { + "label": "title", + "type": "Foundation.LocalizedStringResource", + "value": "All on", + "valueKind": "RawLiteral" + }, + { + "label": "description", + "type": "Swift.Optional", + "valueKind": "NilLiteral" + }, + { + "label": "default", + "type": "Swift.Optional", + "valueKind": "NilLiteral" + }, + { + "label": "inputOptions", + "type": "Swift.Optional", + "value": { + "arguments": [ + { + "label": "keyboardType", + "type": "Swift.String.IntentInputOptions.KeyboardType", + "value": { + "name": "asciiCapable" + }, + "valueKind": "Enum" + }, + { + "label": "capitalizationType", + "type": "Swift.String.IntentInputOptions.CapitalizationType", + "value": { + "name": "allCharacters" + }, + "valueKind": "Enum" + }, + { + "label": "multiline", + "type": "Swift.Bool", + "value": "true", + "valueKind": "RawLiteral" + }, + { + "label": "autocorrect", + "type": "Swift.Bool", + "value": "true", + "valueKind": "RawLiteral" + }, + { + "label": "smartQuotes", + "type": "Swift.Bool", + "value": "true", + "valueKind": "RawLiteral" + }, + { + "label": "smartDashes", + "type": "Swift.Bool", + "value": "true", + "valueKind": "RawLiteral" + } + ], + "type": "Swift.String.IntentInputOptions" + }, + "valueKind": "InitCall" + }, + { + "label": "requestValueDialog", + "type": "Swift.Optional", + "valueKind": "NilLiteral" + }, + { + "label": "inputConnectionBehavior", + "type": "AppIntents.InputConnectionBehavior", + "valueKind": "Runtime" + } + ], + "type": "AppIntents.IntentParameter>" + }, + "valueKind": "InitCall" + }, + { + "file": "InputOptionsProbe.swift", + "isComputed": "true", + "isStatic": "false", + "label": "$allOn", + "line": 11, + "mangledTypeName": "n/a - deprecated", + "type": "AppIntents.IntentParameter>", + "valueKind": "Runtime" + }, + { + "file": "InputOptionsProbe.swift", + "isComputed": "true", + "isStatic": "false", + "label": "empty", + "line": 13, + "mangledTypeName": "n/a - deprecated", + "propertyWrappers": [ + { + "arguments": [ + { + "label": "title", + "type": "Foundation.LocalizedStringResource", + "value": "Empty", + "valueKind": "RawLiteral" + }, + { + "label": "inputOptions", + "type": "Swift.Optional", + "value": { + "arguments": [ + { + "label": "keyboardType", + "type": "Swift.String.IntentInputOptions.KeyboardType", + "valueKind": "Runtime" + }, + { + "label": "capitalizationType", + "type": "Swift.String.IntentInputOptions.CapitalizationType", + "valueKind": "Runtime" + }, + { + "label": "multiline", + "type": "Swift.Bool", + "valueKind": "Runtime" + }, + { + "label": "autocorrect", + "type": "Swift.Bool", + "valueKind": "Runtime" + }, + { + "label": "smartQuotes", + "type": "Swift.Bool", + "valueKind": "Runtime" + }, + { + "label": "smartDashes", + "type": "Swift.Bool", + "valueKind": "Runtime" + } + ], + "type": "Swift.String.IntentInputOptions" + }, + "valueKind": "InitCall" + } + ], + "file": "InputOptionsProbe.swift", + "line": 12, + "type": "AppIntents.IntentParameter" + } + ], + "type": "Swift.Optional", + "value": { + "arguments": [ + { + "label": "title", + "type": "Foundation.LocalizedStringResource", + "value": "Empty", + "valueKind": "RawLiteral" + }, + { + "label": "description", + "type": "Swift.Optional", + "valueKind": "NilLiteral" + }, + { + "label": "default", + "type": "Swift.Optional", + "valueKind": "NilLiteral" + }, + { + "label": "inputOptions", + "type": "Swift.Optional", + "value": { + "arguments": [ + { + "label": "keyboardType", + "type": "Swift.String.IntentInputOptions.KeyboardType", + "valueKind": "Runtime" + }, + { + "label": "capitalizationType", + "type": "Swift.String.IntentInputOptions.CapitalizationType", + "valueKind": "Runtime" + }, + { + "label": "multiline", + "type": "Swift.Bool", + "valueKind": "Runtime" + }, + { + "label": "autocorrect", + "type": "Swift.Bool", + "valueKind": "Runtime" + }, + { + "label": "smartQuotes", + "type": "Swift.Bool", + "valueKind": "Runtime" + }, + { + "label": "smartDashes", + "type": "Swift.Bool", + "valueKind": "Runtime" + } + ], + "type": "Swift.String.IntentInputOptions" + }, + "valueKind": "InitCall" + }, + { + "label": "requestValueDialog", + "type": "Swift.Optional", + "valueKind": "NilLiteral" + }, + { + "label": "inputConnectionBehavior", + "type": "AppIntents.InputConnectionBehavior", + "valueKind": "Runtime" + } + ], + "type": "AppIntents.IntentParameter>" + }, + "valueKind": "InitCall" + }, + { + "file": "InputOptionsProbe.swift", + "isComputed": "true", + "isStatic": "false", + "label": "$empty", + "line": 13, + "mangledTypeName": "n/a - deprecated", + "type": "AppIntents.IntentParameter>", + "valueKind": "Runtime" + }, + { + "file": "InputOptionsProbe.swift", + "isComputed": "true", + "isStatic": "false", + "label": "punct", + "line": 15, + "mangledTypeName": "n/a - deprecated", + "propertyWrappers": [ + { + "arguments": [ + { + "label": "title", + "type": "Foundation.LocalizedStringResource", + "value": "Punct", + "valueKind": "RawLiteral" + }, + { + "label": "inputOptions", + "type": "Swift.Optional", + "value": { + "arguments": [ + { + "label": "keyboardType", + "type": "Swift.String.IntentInputOptions.KeyboardType", + "value": { + "name": "numbersAndPunctuation" + }, + "valueKind": "Enum" + }, + { + "label": "capitalizationType", + "type": "Swift.String.IntentInputOptions.CapitalizationType", + "value": { + "name": "words" + }, + "valueKind": "Enum" + }, + { + "label": "multiline", + "type": "Swift.Bool", + "valueKind": "Runtime" + }, + { + "label": "autocorrect", + "type": "Swift.Bool", + "valueKind": "Runtime" + }, + { + "label": "smartQuotes", + "type": "Swift.Bool", + "valueKind": "Runtime" + }, + { + "label": "smartDashes", + "type": "Swift.Bool", + "valueKind": "Runtime" + } + ], + "type": "Swift.String.IntentInputOptions" + }, + "valueKind": "InitCall" + } + ], + "file": "InputOptionsProbe.swift", + "line": 14, + "type": "AppIntents.IntentParameter" + } + ], + "type": "Swift.Optional", + "value": { + "arguments": [ + { + "label": "title", + "type": "Foundation.LocalizedStringResource", + "value": "Punct", + "valueKind": "RawLiteral" + }, + { + "label": "description", + "type": "Swift.Optional", + "valueKind": "NilLiteral" + }, + { + "label": "default", + "type": "Swift.Optional", + "valueKind": "NilLiteral" + }, + { + "label": "inputOptions", + "type": "Swift.Optional", + "value": { + "arguments": [ + { + "label": "keyboardType", + "type": "Swift.String.IntentInputOptions.KeyboardType", + "value": { + "name": "numbersAndPunctuation" + }, + "valueKind": "Enum" + }, + { + "label": "capitalizationType", + "type": "Swift.String.IntentInputOptions.CapitalizationType", + "value": { + "name": "words" + }, + "valueKind": "Enum" + }, + { + "label": "multiline", + "type": "Swift.Bool", + "valueKind": "Runtime" + }, + { + "label": "autocorrect", + "type": "Swift.Bool", + "valueKind": "Runtime" + }, + { + "label": "smartQuotes", + "type": "Swift.Bool", + "valueKind": "Runtime" + }, + { + "label": "smartDashes", + "type": "Swift.Bool", + "valueKind": "Runtime" + } + ], + "type": "Swift.String.IntentInputOptions" + }, + "valueKind": "InitCall" + }, + { + "label": "requestValueDialog", + "type": "Swift.Optional", + "valueKind": "NilLiteral" + }, + { + "label": "inputConnectionBehavior", + "type": "AppIntents.InputConnectionBehavior", + "valueKind": "Runtime" + } + ], + "type": "AppIntents.IntentParameter>" + }, + "valueKind": "InitCall" + }, + { + "file": "InputOptionsProbe.swift", + "isComputed": "true", + "isStatic": "false", + "label": "$punct", + "line": 15, + "mangledTypeName": "n/a - deprecated", + "type": "AppIntents.IntentParameter>", + "valueKind": "Runtime" + }, + { + "file": "InputOptionsProbe.swift", + "isComputed": "true", + "isStatic": "false", + "label": "url", + "line": 17, + "mangledTypeName": "n/a - deprecated", + "propertyWrappers": [ + { + "arguments": [ + { + "label": "title", + "type": "Foundation.LocalizedStringResource", + "value": "URL", + "valueKind": "RawLiteral" + }, + { + "label": "inputOptions", + "type": "Swift.Optional", + "value": { + "arguments": [ + { + "label": "keyboardType", + "type": "Swift.String.IntentInputOptions.KeyboardType", + "value": { + "name": "URL" + }, + "valueKind": "Enum" + }, + { + "label": "capitalizationType", + "type": "Swift.String.IntentInputOptions.CapitalizationType", + "value": { + "name": "sentences" + }, + "valueKind": "Enum" + }, + { + "label": "multiline", + "type": "Swift.Bool", + "valueKind": "Runtime" + }, + { + "label": "autocorrect", + "type": "Swift.Bool", + "valueKind": "Runtime" + }, + { + "label": "smartQuotes", + "type": "Swift.Bool", + "valueKind": "Runtime" + }, + { + "label": "smartDashes", + "type": "Swift.Bool", + "valueKind": "Runtime" + } + ], + "type": "Swift.String.IntentInputOptions" + }, + "valueKind": "InitCall" + } + ], + "file": "InputOptionsProbe.swift", + "line": 16, + "type": "AppIntents.IntentParameter" + } + ], + "type": "Swift.Optional", + "value": { + "arguments": [ + { + "label": "title", + "type": "Foundation.LocalizedStringResource", + "value": "URL", + "valueKind": "RawLiteral" + }, + { + "label": "description", + "type": "Swift.Optional", + "valueKind": "NilLiteral" + }, + { + "label": "default", + "type": "Swift.Optional", + "valueKind": "NilLiteral" + }, + { + "label": "inputOptions", + "type": "Swift.Optional", + "value": { + "arguments": [ + { + "label": "keyboardType", + "type": "Swift.String.IntentInputOptions.KeyboardType", + "value": { + "name": "URL" + }, + "valueKind": "Enum" + }, + { + "label": "capitalizationType", + "type": "Swift.String.IntentInputOptions.CapitalizationType", + "value": { + "name": "sentences" + }, + "valueKind": "Enum" + }, + { + "label": "multiline", + "type": "Swift.Bool", + "valueKind": "Runtime" + }, + { + "label": "autocorrect", + "type": "Swift.Bool", + "valueKind": "Runtime" + }, + { + "label": "smartQuotes", + "type": "Swift.Bool", + "valueKind": "Runtime" + }, + { + "label": "smartDashes", + "type": "Swift.Bool", + "valueKind": "Runtime" + } + ], + "type": "Swift.String.IntentInputOptions" + }, + "valueKind": "InitCall" + }, + { + "label": "requestValueDialog", + "type": "Swift.Optional", + "valueKind": "NilLiteral" + }, + { + "label": "inputConnectionBehavior", + "type": "AppIntents.InputConnectionBehavior", + "valueKind": "Runtime" + } + ], + "type": "AppIntents.IntentParameter>" + }, + "valueKind": "InitCall" + }, + { + "file": "InputOptionsProbe.swift", + "isComputed": "true", + "isStatic": "false", + "label": "$url", + "line": 17, + "mangledTypeName": "n/a - deprecated", + "type": "AppIntents.IntentParameter>", + "valueKind": "Runtime" + }, + { + "file": "InputOptionsProbe.swift", + "isComputed": "true", + "isStatic": "false", + "label": "numberPad", + "line": 19, + "mangledTypeName": "n/a - deprecated", + "propertyWrappers": [ + { + "arguments": [ + { + "label": "title", + "type": "Foundation.LocalizedStringResource", + "value": "Number pad", + "valueKind": "RawLiteral" + }, + { + "label": "inputOptions", + "type": "Swift.Optional", + "value": { + "arguments": [ + { + "label": "keyboardType", + "type": "Swift.String.IntentInputOptions.KeyboardType", + "value": { + "name": "numberPad" + }, + "valueKind": "Enum" + }, + { + "label": "capitalizationType", + "type": "Swift.String.IntentInputOptions.CapitalizationType", + "valueKind": "Runtime" + }, + { + "label": "multiline", + "type": "Swift.Bool", + "valueKind": "Runtime" + }, + { + "label": "autocorrect", + "type": "Swift.Bool", + "valueKind": "Runtime" + }, + { + "label": "smartQuotes", + "type": "Swift.Bool", + "valueKind": "Runtime" + }, + { + "label": "smartDashes", + "type": "Swift.Bool", + "valueKind": "Runtime" + } + ], + "type": "Swift.String.IntentInputOptions" + }, + "valueKind": "InitCall" + } + ], + "file": "InputOptionsProbe.swift", + "line": 18, + "type": "AppIntents.IntentParameter" + } + ], + "type": "Swift.Optional", + "value": { + "arguments": [ + { + "label": "title", + "type": "Foundation.LocalizedStringResource", + "value": "Number pad", + "valueKind": "RawLiteral" + }, + { + "label": "description", + "type": "Swift.Optional", + "valueKind": "NilLiteral" + }, + { + "label": "default", + "type": "Swift.Optional", + "valueKind": "NilLiteral" + }, + { + "label": "inputOptions", + "type": "Swift.Optional", + "value": { + "arguments": [ + { + "label": "keyboardType", + "type": "Swift.String.IntentInputOptions.KeyboardType", + "value": { + "name": "numberPad" + }, + "valueKind": "Enum" + }, + { + "label": "capitalizationType", + "type": "Swift.String.IntentInputOptions.CapitalizationType", + "valueKind": "Runtime" + }, + { + "label": "multiline", + "type": "Swift.Bool", + "valueKind": "Runtime" + }, + { + "label": "autocorrect", + "type": "Swift.Bool", + "valueKind": "Runtime" + }, + { + "label": "smartQuotes", + "type": "Swift.Bool", + "valueKind": "Runtime" + }, + { + "label": "smartDashes", + "type": "Swift.Bool", + "valueKind": "Runtime" + } + ], + "type": "Swift.String.IntentInputOptions" + }, + "valueKind": "InitCall" + }, + { + "label": "requestValueDialog", + "type": "Swift.Optional", + "valueKind": "NilLiteral" + }, + { + "label": "inputConnectionBehavior", + "type": "AppIntents.InputConnectionBehavior", + "valueKind": "Runtime" + } + ], + "type": "AppIntents.IntentParameter>" + }, + "valueKind": "InitCall" + }, + { + "file": "InputOptionsProbe.swift", + "isComputed": "true", + "isStatic": "false", + "label": "$numberPad", + "line": 19, + "mangledTypeName": "n/a - deprecated", + "type": "AppIntents.IntentParameter>", + "valueKind": "Runtime" + }, + { + "file": "InputOptionsProbe.swift", + "isComputed": "true", + "isStatic": "false", + "label": "quotes", + "line": 21, + "mangledTypeName": "n/a - deprecated", + "propertyWrappers": [ + { + "arguments": [ + { + "label": "title", + "type": "Foundation.LocalizedStringResource", + "value": "Smart quotes only", + "valueKind": "RawLiteral" + }, + { + "label": "inputOptions", + "type": "Swift.Optional", + "value": { + "arguments": [ + { + "label": "keyboardType", + "type": "Swift.String.IntentInputOptions.KeyboardType", + "valueKind": "Runtime" + }, + { + "label": "capitalizationType", + "type": "Swift.String.IntentInputOptions.CapitalizationType", + "valueKind": "Runtime" + }, + { + "label": "multiline", + "type": "Swift.Bool", + "valueKind": "Runtime" + }, + { + "label": "autocorrect", + "type": "Swift.Bool", + "valueKind": "Runtime" + }, + { + "label": "smartQuotes", + "type": "Swift.Bool", + "value": "false", + "valueKind": "RawLiteral" + }, + { + "label": "smartDashes", + "type": "Swift.Bool", + "valueKind": "Runtime" + } + ], + "type": "Swift.String.IntentInputOptions" + }, + "valueKind": "InitCall" + } + ], + "file": "InputOptionsProbe.swift", + "line": 20, + "type": "AppIntents.IntentParameter" + } + ], + "type": "Swift.Optional", + "value": { + "arguments": [ + { + "label": "title", + "type": "Foundation.LocalizedStringResource", + "value": "Smart quotes only", + "valueKind": "RawLiteral" + }, + { + "label": "description", + "type": "Swift.Optional", + "valueKind": "NilLiteral" + }, + { + "label": "default", + "type": "Swift.Optional", + "valueKind": "NilLiteral" + }, + { + "label": "inputOptions", + "type": "Swift.Optional", + "value": { + "arguments": [ + { + "label": "keyboardType", + "type": "Swift.String.IntentInputOptions.KeyboardType", + "valueKind": "Runtime" + }, + { + "label": "capitalizationType", + "type": "Swift.String.IntentInputOptions.CapitalizationType", + "valueKind": "Runtime" + }, + { + "label": "multiline", + "type": "Swift.Bool", + "valueKind": "Runtime" + }, + { + "label": "autocorrect", + "type": "Swift.Bool", + "valueKind": "Runtime" + }, + { + "label": "smartQuotes", + "type": "Swift.Bool", + "value": "false", + "valueKind": "RawLiteral" + }, + { + "label": "smartDashes", + "type": "Swift.Bool", + "valueKind": "Runtime" + } + ], + "type": "Swift.String.IntentInputOptions" + }, + "valueKind": "InitCall" + }, + { + "label": "requestValueDialog", + "type": "Swift.Optional", + "valueKind": "NilLiteral" + }, + { + "label": "inputConnectionBehavior", + "type": "AppIntents.InputConnectionBehavior", + "valueKind": "Runtime" + } + ], + "type": "AppIntents.IntentParameter>" + }, + "valueKind": "InitCall" + }, + { + "file": "InputOptionsProbe.swift", + "isComputed": "true", + "isStatic": "false", + "label": "$quotes", + "line": 21, + "mangledTypeName": "n/a - deprecated", + "type": "AppIntents.IntentParameter>", + "valueKind": "Runtime" + }, + { + "file": "InputOptionsProbe.swift", + "isComputed": "true", + "isStatic": "false", + "label": "dashes", + "line": 23, + "mangledTypeName": "n/a - deprecated", + "propertyWrappers": [ + { + "arguments": [ + { + "label": "title", + "type": "Foundation.LocalizedStringResource", + "value": "Smart dashes only", + "valueKind": "RawLiteral" + }, + { + "label": "inputOptions", + "type": "Swift.Optional", + "value": { + "arguments": [ + { + "label": "keyboardType", + "type": "Swift.String.IntentInputOptions.KeyboardType", + "valueKind": "Runtime" + }, + { + "label": "capitalizationType", + "type": "Swift.String.IntentInputOptions.CapitalizationType", + "valueKind": "Runtime" + }, + { + "label": "multiline", + "type": "Swift.Bool", + "valueKind": "Runtime" + }, + { + "label": "autocorrect", + "type": "Swift.Bool", + "valueKind": "Runtime" + }, + { + "label": "smartQuotes", + "type": "Swift.Bool", + "valueKind": "Runtime" + }, + { + "label": "smartDashes", + "type": "Swift.Bool", + "value": "false", + "valueKind": "RawLiteral" + } + ], + "type": "Swift.String.IntentInputOptions" + }, + "valueKind": "InitCall" + } + ], + "file": "InputOptionsProbe.swift", + "line": 22, + "type": "AppIntents.IntentParameter" + } + ], + "type": "Swift.Optional", + "value": { + "arguments": [ + { + "label": "title", + "type": "Foundation.LocalizedStringResource", + "value": "Smart dashes only", + "valueKind": "RawLiteral" + }, + { + "label": "description", + "type": "Swift.Optional", + "valueKind": "NilLiteral" + }, + { + "label": "default", + "type": "Swift.Optional", + "valueKind": "NilLiteral" + }, + { + "label": "inputOptions", + "type": "Swift.Optional", + "value": { + "arguments": [ + { + "label": "keyboardType", + "type": "Swift.String.IntentInputOptions.KeyboardType", + "valueKind": "Runtime" + }, + { + "label": "capitalizationType", + "type": "Swift.String.IntentInputOptions.CapitalizationType", + "valueKind": "Runtime" + }, + { + "label": "multiline", + "type": "Swift.Bool", + "valueKind": "Runtime" + }, + { + "label": "autocorrect", + "type": "Swift.Bool", + "valueKind": "Runtime" + }, + { + "label": "smartQuotes", + "type": "Swift.Bool", + "valueKind": "Runtime" + }, + { + "label": "smartDashes", + "type": "Swift.Bool", + "value": "false", + "valueKind": "RawLiteral" + } + ], + "type": "Swift.String.IntentInputOptions" + }, + "valueKind": "InitCall" + }, + { + "label": "requestValueDialog", + "type": "Swift.Optional", + "valueKind": "NilLiteral" + }, + { + "label": "inputConnectionBehavior", + "type": "AppIntents.InputConnectionBehavior", + "valueKind": "Runtime" + } + ], + "type": "AppIntents.IntentParameter>" + }, + "valueKind": "InitCall" + }, + { + "file": "InputOptionsProbe.swift", + "isComputed": "true", + "isStatic": "false", + "label": "$dashes", + "line": 23, + "mangledTypeName": "n/a - deprecated", + "type": "AppIntents.IntentParameter>", + "valueKind": "Runtime" + }, + { + "file": "InputOptionsProbe.swift", + "isComputed": "true", + "isStatic": "false", + "label": "autocorrect", + "line": 25, + "mangledTypeName": "n/a - deprecated", + "propertyWrappers": [ + { + "arguments": [ + { + "label": "title", + "type": "Foundation.LocalizedStringResource", + "value": "Autocorrect only", + "valueKind": "RawLiteral" + }, + { + "label": "inputOptions", + "type": "Swift.Optional", + "value": { + "arguments": [ + { + "label": "keyboardType", + "type": "Swift.String.IntentInputOptions.KeyboardType", + "valueKind": "Runtime" + }, + { + "label": "capitalizationType", + "type": "Swift.String.IntentInputOptions.CapitalizationType", + "valueKind": "Runtime" + }, + { + "label": "multiline", + "type": "Swift.Bool", + "valueKind": "Runtime" + }, + { + "label": "autocorrect", + "type": "Swift.Bool", + "value": "false", + "valueKind": "RawLiteral" + }, + { + "label": "smartQuotes", + "type": "Swift.Bool", + "valueKind": "Runtime" + }, + { + "label": "smartDashes", + "type": "Swift.Bool", + "valueKind": "Runtime" + } + ], + "type": "Swift.String.IntentInputOptions" + }, + "valueKind": "InitCall" + } + ], + "file": "InputOptionsProbe.swift", + "line": 24, + "type": "AppIntents.IntentParameter" + } + ], + "type": "Swift.Optional", + "value": { + "arguments": [ + { + "label": "title", + "type": "Foundation.LocalizedStringResource", + "value": "Autocorrect only", + "valueKind": "RawLiteral" + }, + { + "label": "description", + "type": "Swift.Optional", + "valueKind": "NilLiteral" + }, + { + "label": "default", + "type": "Swift.Optional", + "valueKind": "NilLiteral" + }, + { + "label": "inputOptions", + "type": "Swift.Optional", + "value": { + "arguments": [ + { + "label": "keyboardType", + "type": "Swift.String.IntentInputOptions.KeyboardType", + "valueKind": "Runtime" + }, + { + "label": "capitalizationType", + "type": "Swift.String.IntentInputOptions.CapitalizationType", + "valueKind": "Runtime" + }, + { + "label": "multiline", + "type": "Swift.Bool", + "valueKind": "Runtime" + }, + { + "label": "autocorrect", + "type": "Swift.Bool", + "value": "false", + "valueKind": "RawLiteral" + }, + { + "label": "smartQuotes", + "type": "Swift.Bool", + "valueKind": "Runtime" + }, + { + "label": "smartDashes", + "type": "Swift.Bool", + "valueKind": "Runtime" + } + ], + "type": "Swift.String.IntentInputOptions" + }, + "valueKind": "InitCall" + }, + { + "label": "requestValueDialog", + "type": "Swift.Optional", + "valueKind": "NilLiteral" + }, + { + "label": "inputConnectionBehavior", + "type": "AppIntents.InputConnectionBehavior", + "valueKind": "Runtime" + } + ], + "type": "AppIntents.IntentParameter>" + }, + "valueKind": "InitCall" + }, + { + "file": "InputOptionsProbe.swift", + "isComputed": "true", + "isStatic": "false", + "label": "$autocorrect", + "line": 25, + "mangledTypeName": "n/a - deprecated", + "type": "AppIntents.IntentParameter>", + "valueKind": "Runtime" + }, + { + "file": "InputOptionsProbe.swift", + "isComputed": "true", + "isStatic": "false", + "label": "withDefault", + "line": 27, + "mangledTypeName": "n/a - deprecated", + "propertyWrappers": [ + { + "arguments": [ + { + "label": "title", + "type": "Foundation.LocalizedStringResource", + "value": "With default", + "valueKind": "RawLiteral" + }, + { + "label": "default", + "type": "Swift.Optional", + "value": "hi", + "valueKind": "RawLiteral" + }, + { + "label": "inputOptions", + "type": "Swift.Optional", + "value": { + "arguments": [ + { + "label": "keyboardType", + "type": "Swift.String.IntentInputOptions.KeyboardType", + "valueKind": "Runtime" + }, + { + "label": "capitalizationType", + "type": "Swift.String.IntentInputOptions.CapitalizationType", + "valueKind": "Runtime" + }, + { + "label": "multiline", + "type": "Swift.Bool", + "value": "true", + "valueKind": "RawLiteral" + }, + { + "label": "autocorrect", + "type": "Swift.Bool", + "valueKind": "Runtime" + }, + { + "label": "smartQuotes", + "type": "Swift.Bool", + "valueKind": "Runtime" + }, + { + "label": "smartDashes", + "type": "Swift.Bool", + "valueKind": "Runtime" + } + ], + "type": "Swift.String.IntentInputOptions" + }, + "valueKind": "InitCall" + } + ], + "file": "InputOptionsProbe.swift", + "line": 26, + "type": "AppIntents.IntentParameter" + } + ], + "type": "Swift.String", + "value": { + "arguments": [ + { + "label": "title", + "type": "Foundation.LocalizedStringResource", + "value": "With default", + "valueKind": "RawLiteral" + }, + { + "label": "description", + "type": "Swift.Optional", + "valueKind": "NilLiteral" + }, + { + "label": "default", + "type": "Swift.Optional", + "value": "hi", + "valueKind": "RawLiteral" + }, + { + "label": "inputOptions", + "type": "Swift.Optional", + "value": { + "arguments": [ + { + "label": "keyboardType", + "type": "Swift.String.IntentInputOptions.KeyboardType", + "valueKind": "Runtime" + }, + { + "label": "capitalizationType", + "type": "Swift.String.IntentInputOptions.CapitalizationType", + "valueKind": "Runtime" + }, + { + "label": "multiline", + "type": "Swift.Bool", + "value": "true", + "valueKind": "RawLiteral" + }, + { + "label": "autocorrect", + "type": "Swift.Bool", + "valueKind": "Runtime" + }, + { + "label": "smartQuotes", + "type": "Swift.Bool", + "valueKind": "Runtime" + }, + { + "label": "smartDashes", + "type": "Swift.Bool", + "valueKind": "Runtime" + } + ], + "type": "Swift.String.IntentInputOptions" + }, + "valueKind": "InitCall" + }, + { + "label": "requestValueDialog", + "type": "Swift.Optional", + "valueKind": "NilLiteral" + }, + { + "label": "inputConnectionBehavior", + "type": "AppIntents.InputConnectionBehavior", + "valueKind": "Runtime" + } + ], + "type": "AppIntents.IntentParameter" + }, + "valueKind": "InitCall" + }, + { + "file": "InputOptionsProbe.swift", + "isComputed": "true", + "isStatic": "false", + "label": "$withDefault", + "line": 27, + "mangledTypeName": "n/a - deprecated", + "type": "AppIntents.IntentParameter", + "valueKind": "Runtime" + }, + { + "file": "InputOptionsProbe.swift", + "isComputed": "true", + "isStatic": "false", + "label": "dialog", + "line": 29, + "mangledTypeName": "n/a - deprecated", + "propertyWrappers": [ + { + "arguments": [ + { + "label": "title", + "type": "Foundation.LocalizedStringResource", + "value": "Options and dialog", + "valueKind": "RawLiteral" + }, + { + "label": "description", + "type": "Swift.Optional", + "value": "Described", + "valueKind": "RawLiteral" + }, + { + "label": "inputOptions", + "type": "Swift.Optional", + "value": { + "arguments": [ + { + "label": "keyboardType", + "type": "Swift.String.IntentInputOptions.KeyboardType", + "value": { + "name": "numberPad" + }, + "valueKind": "Enum" + }, + { + "label": "capitalizationType", + "type": "Swift.String.IntentInputOptions.CapitalizationType", + "valueKind": "Runtime" + }, + { + "label": "multiline", + "type": "Swift.Bool", + "valueKind": "Runtime" + }, + { + "label": "autocorrect", + "type": "Swift.Bool", + "value": "false", + "valueKind": "RawLiteral" + }, + { + "label": "smartQuotes", + "type": "Swift.Bool", + "valueKind": "Runtime" + }, + { + "label": "smartDashes", + "type": "Swift.Bool", + "valueKind": "Runtime" + } + ], + "type": "Swift.String.IntentInputOptions" + }, + "valueKind": "InitCall" + }, + { + "label": "requestValueDialog", + "type": "Swift.Optional", + "value": "Which?", + "valueKind": "RawLiteral" + } + ], + "file": "InputOptionsProbe.swift", + "line": 28, + "type": "AppIntents.IntentParameter" + } + ], + "type": "Swift.String", + "value": { + "arguments": [ + { + "label": "title", + "type": "Foundation.LocalizedStringResource", + "value": "Options and dialog", + "valueKind": "RawLiteral" + }, + { + "label": "description", + "type": "Swift.Optional", + "value": "Described", + "valueKind": "RawLiteral" + }, + { + "label": "default", + "type": "Swift.Optional", + "valueKind": "NilLiteral" + }, + { + "label": "inputOptions", + "type": "Swift.Optional", + "value": { + "arguments": [ + { + "label": "keyboardType", + "type": "Swift.String.IntentInputOptions.KeyboardType", + "value": { + "name": "numberPad" + }, + "valueKind": "Enum" + }, + { + "label": "capitalizationType", + "type": "Swift.String.IntentInputOptions.CapitalizationType", + "valueKind": "Runtime" + }, + { + "label": "multiline", + "type": "Swift.Bool", + "valueKind": "Runtime" + }, + { + "label": "autocorrect", + "type": "Swift.Bool", + "value": "false", + "valueKind": "RawLiteral" + }, + { + "label": "smartQuotes", + "type": "Swift.Bool", + "valueKind": "Runtime" + }, + { + "label": "smartDashes", + "type": "Swift.Bool", + "valueKind": "Runtime" + } + ], + "type": "Swift.String.IntentInputOptions" + }, + "valueKind": "InitCall" + }, + { + "label": "requestValueDialog", + "type": "Swift.Optional", + "value": "Which?", + "valueKind": "RawLiteral" + }, + { + "label": "inputConnectionBehavior", + "type": "AppIntents.InputConnectionBehavior", + "valueKind": "Runtime" + } + ], + "type": "AppIntents.IntentParameter" + }, + "valueKind": "InitCall" + }, + { + "file": "InputOptionsProbe.swift", + "isComputed": "true", + "isStatic": "false", + "label": "$dialog", + "line": 29, + "mangledTypeName": "n/a - deprecated", + "type": "AppIntents.IntentParameter", + "valueKind": "Runtime" + }, + { + "file": "InputOptionsProbe.swift", + "isComputed": "true", + "isStatic": "false", + "label": "explicitDefaults", + "line": 32, + "mangledTypeName": "n/a - deprecated", + "propertyWrappers": [ + { + "arguments": [ + { + "label": "title", + "type": "Foundation.LocalizedStringResource", + "value": "Explicit defaults", + "valueKind": "RawLiteral" + }, + { + "label": "inputOptions", + "type": "Swift.Optional", + "value": { + "arguments": [ + { + "label": "keyboardType", + "type": "Swift.String.IntentInputOptions.KeyboardType", + "value": { + "name": "asciiCapable" + }, + "valueKind": "Enum" + }, + { + "label": "capitalizationType", + "type": "Swift.String.IntentInputOptions.CapitalizationType", + "value": { + "name": "sentences" + }, + "valueKind": "Enum" + }, + { + "label": "multiline", + "type": "Swift.Bool", + "value": "false", + "valueKind": "RawLiteral" + }, + { + "label": "autocorrect", + "type": "Swift.Bool", + "value": "true", + "valueKind": "RawLiteral" + }, + { + "label": "smartQuotes", + "type": "Swift.Bool", + "value": "true", + "valueKind": "RawLiteral" + }, + { + "label": "smartDashes", + "type": "Swift.Bool", + "value": "true", + "valueKind": "RawLiteral" + } + ], + "type": "Swift.String.IntentInputOptions" + }, + "valueKind": "InitCall" + } + ], + "file": "InputOptionsProbe.swift", + "line": 31, + "type": "AppIntents.IntentParameter" + } + ], + "type": "Swift.Optional", + "value": { + "arguments": [ + { + "label": "title", + "type": "Foundation.LocalizedStringResource", + "value": "Explicit defaults", + "valueKind": "RawLiteral" + }, + { + "label": "description", + "type": "Swift.Optional", + "valueKind": "NilLiteral" + }, + { + "label": "default", + "type": "Swift.Optional", + "valueKind": "NilLiteral" + }, + { + "label": "inputOptions", + "type": "Swift.Optional", + "value": { + "arguments": [ + { + "label": "keyboardType", + "type": "Swift.String.IntentInputOptions.KeyboardType", + "value": { + "name": "asciiCapable" + }, + "valueKind": "Enum" + }, + { + "label": "capitalizationType", + "type": "Swift.String.IntentInputOptions.CapitalizationType", + "value": { + "name": "sentences" + }, + "valueKind": "Enum" + }, + { + "label": "multiline", + "type": "Swift.Bool", + "value": "false", + "valueKind": "RawLiteral" + }, + { + "label": "autocorrect", + "type": "Swift.Bool", + "value": "true", + "valueKind": "RawLiteral" + }, + { + "label": "smartQuotes", + "type": "Swift.Bool", + "value": "true", + "valueKind": "RawLiteral" + }, + { + "label": "smartDashes", + "type": "Swift.Bool", + "value": "true", + "valueKind": "RawLiteral" + } + ], + "type": "Swift.String.IntentInputOptions" + }, + "valueKind": "InitCall" + }, + { + "label": "requestValueDialog", + "type": "Swift.Optional", + "valueKind": "NilLiteral" + }, + { + "label": "inputConnectionBehavior", + "type": "AppIntents.InputConnectionBehavior", + "valueKind": "Runtime" + } + ], + "type": "AppIntents.IntentParameter>" + }, + "valueKind": "InitCall" + }, + { + "file": "InputOptionsProbe.swift", + "isComputed": "true", + "isStatic": "false", + "label": "$explicitDefaults", + "line": 32, + "mangledTypeName": "n/a - deprecated", + "type": "AppIntents.IntentParameter>", + "valueKind": "Runtime" + } + ], + "typeName": "Sev.InputOptionsProbeIntent" + } +] diff --git a/sweetpad-cli/fixtures/appintents/README.md b/sweetpad-cli/fixtures/appintents/README.md index a1f2de58..473b6b09 100644 --- a/sweetpad-cli/fixtures/appintents/README.md +++ b/sweetpad-cli/fixtures/appintents/README.md @@ -1,7 +1,7 @@ # App Intents compiler captures The Swift files are synthetic probes owned by this repository. -`regen.py` builds both probes with Xcode through the local sweetpad binary. +`regen.py` builds the probes with Xcode through the local sweetpad binary. It requires macOS, Xcode, and XcodeGen. ```sh @@ -16,7 +16,8 @@ The language-model test compares decoded phrases and negative examples. It ignores native phrase order and generation timestamps. Registration covers basic intents, primitive parameters, enums, entities, -queries, widget configuration, authentication policies, and App Shortcuts. +queries, widget configuration, authentication policies, App Shortcuts, +and `String.IntentInputOptions` (`InputOptionsProbe.action.json` holds that probe's action only). Assistant schemas, explicit supported modes, custom parameter options, and dependency metadata currently stop extraction with an error. Localized shortcut phrase models and availability-specific metadata need more coverage. diff --git a/sweetpad-cli/fixtures/appintents/regen.py b/sweetpad-cli/fixtures/appintents/regen.py index e1e0295b..189b903c 100644 --- a/sweetpad-cli/fixtures/appintents/regen.py +++ b/sweetpad-cli/fixtures/appintents/regen.py @@ -55,7 +55,7 @@ def decompress(path): def main(): parser = argparse.ArgumentParser(description=__doc__) - parser.add_argument("--only", choices=["DataApp", "Types", "Files"]) + parser.add_argument("--only", choices=["DataApp", "Types", "Files", "InputOptionsProbe"]) selected = parser.parse_args().only developer = Path(os.environ.get("DEVELOPER_DIR") or capture("xcode-select", "-p")) sweetpad = HERE.parents[2] / "target/debug/sweetpad" @@ -64,7 +64,8 @@ def main(): work = Path(tmp) (work / "Host.swift").write_text('import SwiftUI\n@main struct ProbeApp: App { var body: some Scene { WindowGroup { Text("Metadata") } } }\n') spec = {"name": "AppIntentsOracle", "options": {"deploymentTarget": {"iOS": "18.0"}}, "targets": {}} - for source, module in [("DataApp", "DataApp"), ("Types", "MetadataProbe"), ("Files", "FileProbe")]: + for source, module in [("DataApp", "DataApp"), ("Types", "MetadataProbe"), ("Files", "FileProbe"), + ("InputOptionsProbe", "InputOptionsProbe")]: spec["targets"][module] = {"type": "application", "platform": "iOS", "sources": [{"path": str(HERE / f"{source}.swift")}, {"path": "Host.swift"}], "settings": {"base": {"GENERATE_INFOPLIST_FILE": "YES", "SWIFT_VERSION": "6.0", "SWIFT_EMIT_LOC_STRINGS": "YES", @@ -74,7 +75,8 @@ def main(): derived = work / "DerivedData" for source, module, expected in [("DataApp", "DataApp", "extract.actionsdata"), ("Types", "MetadataProbe", "Types.actionsdata"), - ("Files", "FileProbe", "Files.actionsdata")]: + ("Files", "FileProbe", "Files.actionsdata"), + ("InputOptionsProbe", "InputOptionsProbe", "InputOptionsProbe.action.json")]: if selected and source != selected: continue command = [str(sweetpad), "build", "--developer-dir", str(developer), @@ -91,7 +93,12 @@ def main(): values = json.loads(constants.read_text()) normalize_paths(values) outputs[f"{source}.swiftconstvalues"] = json.dumps(values, indent=2, sort_keys=True).encode() + b"\n" - outputs[expected] = (metadata / "extract.actionsdata").read_bytes() + if expected.endswith(".action.json"): + # One action, compared on its own: the parameter metadata under test. + actions = json.loads((metadata / "extract.actionsdata").read_text())["actions"] + outputs[expected] = json.dumps(actions["InputOptionsProbeIntent"], indent=2, sort_keys=True).encode() + b"\n" + else: + outputs[expected] = (metadata / "extract.actionsdata").read_bytes() if source == "DataApp": strings = json.loads((objects / "Objects-normal/arm64/ExtractedAppShortcutsMetadata.stringsdata").read_text()) normalize_paths(strings) diff --git a/sweetpad-cli/src/cli/appintents/metadata.rs b/sweetpad-cli/src/cli/appintents/metadata.rs index f8f0dff1..6985320e 100644 --- a/sweetpad-cli/src/cli/appintents/metadata.rs +++ b/sweetpad-cli/src/cli/appintents/metadata.rs @@ -353,6 +353,13 @@ mod tests { *v = json!({"name":"normalized"}); } else if key == "resolvableInputTypes" { v.as_array_mut().unwrap().sort_by_key(Value::to_string); + } else if key == "typeSpecificMetadata" { + // A flat key/value list that Xcode writes in hash order. + let values = v.as_array_mut().unwrap(); + let mut pairs: Vec> = + values.chunks(2).map(<[Value]>::to_vec).collect(); + pairs.sort_by_key(|pair| pair[0].to_string()); + *values = pairs.concat(); } else { normalize(v); } @@ -380,4 +387,69 @@ mod tests { assert_eq!(actual, expected, "{input}"); } } + #[test] + fn string_input_options_match_xcode() { + let dir = Path::new(env!("CARGO_MANIFEST_DIR")).join("fixtures/appintents"); + let types: Vec = serde_json::from_slice( + &std::fs::read(dir.join("InputOptionsProbe.swiftconstvalues")).unwrap(), + ) + .unwrap(); + let mut actual = extract(&types).unwrap()["actions"]["InputOptionsProbeIntent"].take(); + let mut expected: Value = serde_json::from_slice( + &std::fs::read(dir.join("InputOptionsProbe.action.json")).unwrap(), + ) + .unwrap(); + normalize(&mut actual); + normalize(&mut expected); + assert_eq!(actual, expected); + } + #[test] + fn input_options_reject_what_they_cannot_encode() { + fn options(types: &mut [Value]) -> &mut Value { + let intent = types + .iter_mut() + .find(|t| text(&t["typeName"]).ends_with(".InputOptionsProbeIntent")) + .unwrap(); + let property = intent["properties"] + .as_array_mut() + .unwrap() + .iter_mut() + .find(|p| p["label"] == "allOn") + .unwrap(); + property["propertyWrappers"][0]["arguments"] + .as_array_mut() + .unwrap() + .iter_mut() + .find(|a| a["label"] == "inputOptions") + .unwrap() + } + let base: Vec = serde_json::from_str(include_str!( + "../../../fixtures/appintents/InputOptionsProbe.swiftconstvalues" + )) + .unwrap(); + let mut types = base.clone(); + options(&mut types)["value"]["arguments"][0]["value"]["name"] = json!("futureKeyboard"); + assert!( + extract(&types) + .unwrap_err() + .contains("keyboardType 'futureKeyboard'") + ); + let mut types = base.clone(); + *options(&mut types) = json!({"label":"inputOptions","valueKind":"Runtime"}); + assert!( + extract(&types) + .unwrap_err() + .contains("constant String.IntentInputOptions") + ); + let mut types = base; + options(&mut types)["value"]["arguments"][2]["valueKind"] = json!("Runtime"); + let metadata = extract(&types).unwrap()["actions"]["InputOptionsProbeIntent"]["parameters"] + .as_array() + .unwrap() + .iter() + .find(|p| p["name"] == "allOn") + .unwrap()["typeSpecificMetadata"] + .clone(); + assert!(!metadata.to_string().contains("StringMultiline")); + } } diff --git a/sweetpad-cli/src/cli/appintents/metadata/parameters.rs b/sweetpad-cli/src/cli/appintents/metadata/parameters.rs index 59f596dd..c2180277 100644 --- a/sweetpad-cli/src/cli/appintents/metadata/parameters.rs +++ b/sweetpad-cli/src/cli/appintents/metadata/parameters.rs @@ -67,6 +67,7 @@ pub(super) fn parameter(value: &Value, types: &[Value]) -> Result | "requestValueDialog" | "supportedContentTypes" | "inputConnectionBehavior" + | "inputOptions" ) }) { return Err(format!( @@ -116,6 +117,7 @@ pub(super) fn parameter(value: &Value, types: &[Value]) -> Result { parameter["parameterDescription"] = localized(&literal(description)?); } + input_options(arguments, &mut parameter)?; if let Some(content_types) = arguments .iter() .find(|a| a["label"] == "supportedContentTypes") @@ -154,6 +156,70 @@ pub(super) fn parameter(value: &Value, types: &[Value]) -> Result Ok(parameter) } +/// `String.IntentInputOptions`, in the order of each option's metadata value. +const KEYBOARD_TYPES: [&str; 5] = [ + "asciiCapable", + "numbersAndPunctuation", + "URL", + "numberPad", + "default", +]; +const CAPITALIZATION_TYPES: [&str; 4] = ["none", "words", "sentences", "allCharacters"]; + +/// Xcode writes one key per `String.IntentInputOptions` argument the source passes. +/// Arguments left at their defaults are captured as `Runtime` and omitted. +fn input_options(arguments: &[Value], parameter: &mut Value) -> Result<(), String> { + let Some(options) = arguments + .iter() + .find(|a| a["label"] == "inputOptions" && a["valueKind"] != "NilLiteral") + else { + return Ok(()); + }; + if parameter["valueType"]["primitive"]["wrapper"]["typeIdentifier"] != 0 { + return Err("inputOptions requires a String parameter".into()); + } + if options["valueKind"] != "InitCall" + || options["value"]["type"] != "Swift.String.IntentInputOptions" + { + return Err("inputOptions must be a constant String.IntentInputOptions initializer".into()); + } + let mut metadata = Vec::new(); + for option in array(&options["value"]["arguments"]) { + if option["valueKind"] == "Runtime" { + continue; + } + let label = text(&option["label"]); + let (key, cases): (&str, &[&str]) = match label { + "keyboardType" => ("KeyboardType", &KEYBOARD_TYPES), + "capitalizationType" => ("CapitalizationType", &CAPITALIZATION_TYPES), + "multiline" => ("Multiline", &["false", "true"]), + "autocorrect" => ("Autocorrect", &["false", "true"]), + "smartQuotes" => ("SmartQuotes", &["false", "true"]), + "smartDashes" => ("SmartDashes", &["false", "true"]), + _ => return Err(format!("unsupported inputOptions argument '{label}'")), + }; + let (expected, name) = if label.ends_with("Type") { + ("Enum", text(&option["value"]["name"])) + } else { + ("RawLiteral", text(&option["value"])) + }; + let value = cases + .iter() + .position(|c| *c == name) + .filter(|_| option["valueKind"] == expected) + .ok_or_else(|| format!("unsupported inputOptions {label} '{name}'"))?; + metadata.extend([ + json!(format!("LNValueTypeMetadataKeyString{key}")), + json!({"int":{"wrapper":value}}), + ]); + } + parameter["typeSpecificMetadata"] + .as_array_mut() + .unwrap() + .extend(metadata); + Ok(()) +} + fn resolvers(kind: &Value) -> Vec { let ids: &[u64] = match kind["primitive"]["wrapper"]["typeIdentifier"].as_u64() { Some(0) => &[2, 0], From e48615267078cc69fbe829fc83ef3b90f15e16db Mon Sep 17 00:00:00 2001 From: Brandon Elliott Date: Fri, 27 Nov 2026 15:14:43 -0600 Subject: [PATCH 2/7] Match Xcode's App Intents output flags and parameter summaries 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 --- .../appintents/InputOptionsProbe.action.json | 941 ----------- .../appintents/InputOptionsProbe.actions.json | 943 +++++++++++ .../appintents/OutputProbe.actions.json | 605 +++++++ .../fixtures/appintents/OutputProbe.swift | 56 + .../appintents/OutputProbe.swiftconstvalues | 1399 +++++++++++++++++ sweetpad-cli/fixtures/appintents/README.md | 9 +- sweetpad-cli/fixtures/appintents/regen.py | 13 +- sweetpad-cli/src/cli/appintents/metadata.rs | 122 +- 8 files changed, 3124 insertions(+), 964 deletions(-) delete mode 100644 sweetpad-cli/fixtures/appintents/InputOptionsProbe.action.json create mode 100644 sweetpad-cli/fixtures/appintents/InputOptionsProbe.actions.json create mode 100644 sweetpad-cli/fixtures/appintents/OutputProbe.actions.json create mode 100644 sweetpad-cli/fixtures/appintents/OutputProbe.swift create mode 100644 sweetpad-cli/fixtures/appintents/OutputProbe.swiftconstvalues diff --git a/sweetpad-cli/fixtures/appintents/InputOptionsProbe.action.json b/sweetpad-cli/fixtures/appintents/InputOptionsProbe.action.json deleted file mode 100644 index d94bb00e..00000000 --- a/sweetpad-cli/fixtures/appintents/InputOptionsProbe.action.json +++ /dev/null @@ -1,941 +0,0 @@ -{ - "assistantDefinedSchemaTraits": [], - "assistantDefinedSchemas": [], - "authenticationPolicy": 0, - "availabilityAnnotations": { - "LNPlatformNameWildcard": { - "introducedVersion": "*" - } - }, - "effectiveBundleIdentifiers": [], - "fullyQualifiedTypeName": "Sev.InputOptionsProbeIntent", - "identifier": "InputOptionsProbeIntent", - "isAuthPolExplicit": false, - "isDiscoverable": true, - "mangledTypeName": "3Sev23InputOptionsProbeIntentV", - "mangledTypeNameByBundleIdentifier": {}, - "mangledTypeNameByBundleIdentifierV2": {}, - "mangledTypeNameV2": "3Sev23InputOptionsProbeIntentV", - "openAppWhenRun": false, - "outputFlags": 0, - "parameters": [ - { - "capabilities": 0, - "dynamicOptionsSupport": 0, - "inputConnectionBehavior": 0, - "isInput": false, - "isOptional": true, - "name": "allOff", - "resolvableInputTypes": [ - { - "kindValue": 0, - "valueType": { - "primitive": { - "wrapper": { - "typeIdentifier": 0 - } - } - } - }, - { - "kindValue": 0, - "valueType": { - "primitive": { - "wrapper": { - "typeIdentifier": 2 - } - } - } - }, - { - "kindValue": 0, - "valueType": { - "array": { - "wrapper": { - "capabilities": 3, - "memberValueType": { - "primitive": { - "wrapper": { - "typeIdentifier": 2 - } - } - } - } - } - } - } - ], - "title": { - "alternatives": [], - "key": "All off" - }, - "typeSpecificMetadata": [ - "LNValueTypeMetadataKeyStringSmartQuotes", - { - "int": { - "wrapper": 0 - } - }, - "LNValueTypeMetadataKeyStringCapitalizationType", - { - "int": { - "wrapper": 0 - } - }, - "LNValueTypeMetadataKeyStringMultiline", - { - "int": { - "wrapper": 0 - } - }, - "LNValueTypeMetadataKeyStringKeyboardType", - { - "int": { - "wrapper": 4 - } - }, - "LNValueTypeMetadataKeyStringSmartDashes", - { - "int": { - "wrapper": 0 - } - }, - "LNValueTypeMetadataKeyStringAutocorrect", - { - "int": { - "wrapper": 0 - } - } - ], - "valueType": { - "primitive": { - "wrapper": { - "typeIdentifier": 0 - } - } - } - }, - { - "capabilities": 0, - "dynamicOptionsSupport": 0, - "inputConnectionBehavior": 0, - "isInput": false, - "isOptional": true, - "name": "allOn", - "resolvableInputTypes": [ - { - "kindValue": 0, - "valueType": { - "primitive": { - "wrapper": { - "typeIdentifier": 0 - } - } - } - }, - { - "kindValue": 0, - "valueType": { - "primitive": { - "wrapper": { - "typeIdentifier": 2 - } - } - } - }, - { - "kindValue": 0, - "valueType": { - "array": { - "wrapper": { - "capabilities": 3, - "memberValueType": { - "primitive": { - "wrapper": { - "typeIdentifier": 2 - } - } - } - } - } - } - } - ], - "title": { - "alternatives": [], - "key": "All on" - }, - "typeSpecificMetadata": [ - "LNValueTypeMetadataKeyStringCapitalizationType", - { - "int": { - "wrapper": 3 - } - }, - "LNValueTypeMetadataKeyStringSmartQuotes", - { - "int": { - "wrapper": 1 - } - }, - "LNValueTypeMetadataKeyStringMultiline", - { - "int": { - "wrapper": 1 - } - }, - "LNValueTypeMetadataKeyStringAutocorrect", - { - "int": { - "wrapper": 1 - } - }, - "LNValueTypeMetadataKeyStringKeyboardType", - { - "int": { - "wrapper": 0 - } - }, - "LNValueTypeMetadataKeyStringSmartDashes", - { - "int": { - "wrapper": 1 - } - } - ], - "valueType": { - "primitive": { - "wrapper": { - "typeIdentifier": 0 - } - } - } - }, - { - "capabilities": 0, - "dynamicOptionsSupport": 0, - "inputConnectionBehavior": 0, - "isInput": false, - "isOptional": true, - "name": "empty", - "resolvableInputTypes": [ - { - "kindValue": 0, - "valueType": { - "primitive": { - "wrapper": { - "typeIdentifier": 0 - } - } - } - }, - { - "kindValue": 0, - "valueType": { - "primitive": { - "wrapper": { - "typeIdentifier": 2 - } - } - } - }, - { - "kindValue": 0, - "valueType": { - "array": { - "wrapper": { - "capabilities": 3, - "memberValueType": { - "primitive": { - "wrapper": { - "typeIdentifier": 2 - } - } - } - } - } - } - } - ], - "title": { - "alternatives": [], - "key": "Empty" - }, - "typeSpecificMetadata": [], - "valueType": { - "primitive": { - "wrapper": { - "typeIdentifier": 0 - } - } - } - }, - { - "capabilities": 0, - "dynamicOptionsSupport": 0, - "inputConnectionBehavior": 0, - "isInput": false, - "isOptional": true, - "name": "punct", - "resolvableInputTypes": [ - { - "kindValue": 0, - "valueType": { - "primitive": { - "wrapper": { - "typeIdentifier": 0 - } - } - } - }, - { - "kindValue": 0, - "valueType": { - "primitive": { - "wrapper": { - "typeIdentifier": 2 - } - } - } - }, - { - "kindValue": 0, - "valueType": { - "array": { - "wrapper": { - "capabilities": 3, - "memberValueType": { - "primitive": { - "wrapper": { - "typeIdentifier": 2 - } - } - } - } - } - } - } - ], - "title": { - "alternatives": [], - "key": "Punct" - }, - "typeSpecificMetadata": [ - "LNValueTypeMetadataKeyStringCapitalizationType", - { - "int": { - "wrapper": 1 - } - }, - "LNValueTypeMetadataKeyStringKeyboardType", - { - "int": { - "wrapper": 1 - } - } - ], - "valueType": { - "primitive": { - "wrapper": { - "typeIdentifier": 0 - } - } - } - }, - { - "capabilities": 0, - "dynamicOptionsSupport": 0, - "inputConnectionBehavior": 0, - "isInput": false, - "isOptional": true, - "name": "url", - "resolvableInputTypes": [ - { - "kindValue": 0, - "valueType": { - "primitive": { - "wrapper": { - "typeIdentifier": 0 - } - } - } - }, - { - "kindValue": 0, - "valueType": { - "primitive": { - "wrapper": { - "typeIdentifier": 2 - } - } - } - }, - { - "kindValue": 0, - "valueType": { - "array": { - "wrapper": { - "capabilities": 3, - "memberValueType": { - "primitive": { - "wrapper": { - "typeIdentifier": 2 - } - } - } - } - } - } - } - ], - "title": { - "alternatives": [], - "key": "URL" - }, - "typeSpecificMetadata": [ - "LNValueTypeMetadataKeyStringCapitalizationType", - { - "int": { - "wrapper": 2 - } - }, - "LNValueTypeMetadataKeyStringKeyboardType", - { - "int": { - "wrapper": 2 - } - } - ], - "valueType": { - "primitive": { - "wrapper": { - "typeIdentifier": 0 - } - } - } - }, - { - "capabilities": 0, - "dynamicOptionsSupport": 0, - "inputConnectionBehavior": 0, - "isInput": false, - "isOptional": true, - "name": "numberPad", - "resolvableInputTypes": [ - { - "kindValue": 0, - "valueType": { - "array": { - "wrapper": { - "capabilities": 3, - "memberValueType": { - "primitive": { - "wrapper": { - "typeIdentifier": 2 - } - } - } - } - } - } - }, - { - "kindValue": 0, - "valueType": { - "primitive": { - "wrapper": { - "typeIdentifier": 0 - } - } - } - }, - { - "kindValue": 0, - "valueType": { - "primitive": { - "wrapper": { - "typeIdentifier": 2 - } - } - } - } - ], - "title": { - "alternatives": [], - "key": "Number pad" - }, - "typeSpecificMetadata": [ - "LNValueTypeMetadataKeyStringKeyboardType", - { - "int": { - "wrapper": 3 - } - } - ], - "valueType": { - "primitive": { - "wrapper": { - "typeIdentifier": 0 - } - } - } - }, - { - "capabilities": 0, - "dynamicOptionsSupport": 0, - "inputConnectionBehavior": 0, - "isInput": false, - "isOptional": true, - "name": "quotes", - "resolvableInputTypes": [ - { - "kindValue": 0, - "valueType": { - "array": { - "wrapper": { - "capabilities": 3, - "memberValueType": { - "primitive": { - "wrapper": { - "typeIdentifier": 2 - } - } - } - } - } - } - }, - { - "kindValue": 0, - "valueType": { - "primitive": { - "wrapper": { - "typeIdentifier": 0 - } - } - } - }, - { - "kindValue": 0, - "valueType": { - "primitive": { - "wrapper": { - "typeIdentifier": 2 - } - } - } - } - ], - "title": { - "alternatives": [], - "key": "Smart quotes only" - }, - "typeSpecificMetadata": [ - "LNValueTypeMetadataKeyStringSmartQuotes", - { - "int": { - "wrapper": 0 - } - } - ], - "valueType": { - "primitive": { - "wrapper": { - "typeIdentifier": 0 - } - } - } - }, - { - "capabilities": 0, - "dynamicOptionsSupport": 0, - "inputConnectionBehavior": 0, - "isInput": false, - "isOptional": true, - "name": "dashes", - "resolvableInputTypes": [ - { - "kindValue": 0, - "valueType": { - "array": { - "wrapper": { - "capabilities": 3, - "memberValueType": { - "primitive": { - "wrapper": { - "typeIdentifier": 2 - } - } - } - } - } - } - }, - { - "kindValue": 0, - "valueType": { - "primitive": { - "wrapper": { - "typeIdentifier": 0 - } - } - } - }, - { - "kindValue": 0, - "valueType": { - "primitive": { - "wrapper": { - "typeIdentifier": 2 - } - } - } - } - ], - "title": { - "alternatives": [], - "key": "Smart dashes only" - }, - "typeSpecificMetadata": [ - "LNValueTypeMetadataKeyStringSmartDashes", - { - "int": { - "wrapper": 0 - } - } - ], - "valueType": { - "primitive": { - "wrapper": { - "typeIdentifier": 0 - } - } - } - }, - { - "capabilities": 0, - "dynamicOptionsSupport": 0, - "inputConnectionBehavior": 0, - "isInput": false, - "isOptional": true, - "name": "autocorrect", - "resolvableInputTypes": [ - { - "kindValue": 0, - "valueType": { - "array": { - "wrapper": { - "capabilities": 3, - "memberValueType": { - "primitive": { - "wrapper": { - "typeIdentifier": 2 - } - } - } - } - } - } - }, - { - "kindValue": 0, - "valueType": { - "primitive": { - "wrapper": { - "typeIdentifier": 0 - } - } - } - }, - { - "kindValue": 0, - "valueType": { - "primitive": { - "wrapper": { - "typeIdentifier": 2 - } - } - } - } - ], - "title": { - "alternatives": [], - "key": "Autocorrect only" - }, - "typeSpecificMetadata": [ - "LNValueTypeMetadataKeyStringAutocorrect", - { - "int": { - "wrapper": 0 - } - } - ], - "valueType": { - "primitive": { - "wrapper": { - "typeIdentifier": 0 - } - } - } - }, - { - "capabilities": 1, - "dynamicOptionsSupport": 0, - "inputConnectionBehavior": 0, - "isInput": false, - "isOptional": false, - "name": "withDefault", - "resolvableInputTypes": [ - { - "kindValue": 0, - "valueType": { - "primitive": { - "wrapper": { - "typeIdentifier": 0 - } - } - } - }, - { - "kindValue": 0, - "valueType": { - "primitive": { - "wrapper": { - "typeIdentifier": 2 - } - } - } - }, - { - "kindValue": 0, - "valueType": { - "array": { - "wrapper": { - "capabilities": 3, - "memberValueType": { - "primitive": { - "wrapper": { - "typeIdentifier": 2 - } - } - } - } - } - } - } - ], - "title": { - "alternatives": [], - "key": "With default" - }, - "typeSpecificMetadata": [ - "LNValueTypeSpecificMetadataKeyDefaultValue", - { - "string": { - "wrapper": "hi" - } - }, - "LNValueTypeMetadataKeyStringMultiline", - { - "int": { - "wrapper": 1 - } - } - ], - "valueType": { - "primitive": { - "wrapper": { - "typeIdentifier": 0 - } - } - } - }, - { - "capabilities": 0, - "dynamicOptionsSupport": 0, - "inputConnectionBehavior": 0, - "isInput": false, - "isOptional": false, - "name": "dialog", - "parameterDescription": { - "alternatives": [], - "key": "Described" - }, - "resolvableInputTypes": [ - { - "kindValue": 0, - "valueType": { - "primitive": { - "wrapper": { - "typeIdentifier": 0 - } - } - } - }, - { - "kindValue": 0, - "valueType": { - "primitive": { - "wrapper": { - "typeIdentifier": 2 - } - } - } - }, - { - "kindValue": 0, - "valueType": { - "array": { - "wrapper": { - "capabilities": 3, - "memberValueType": { - "primitive": { - "wrapper": { - "typeIdentifier": 2 - } - } - } - } - } - } - } - ], - "title": { - "alternatives": [], - "key": "Options and dialog" - }, - "typeSpecificMetadata": [ - "LNValueTypeMetadataKeyStringAutocorrect", - { - "int": { - "wrapper": 0 - } - }, - "LNValueTypeMetadataKeyStringKeyboardType", - { - "int": { - "wrapper": 3 - } - } - ], - "valueType": { - "primitive": { - "wrapper": { - "typeIdentifier": 0 - } - } - } - }, - { - "capabilities": 0, - "dynamicOptionsSupport": 0, - "inputConnectionBehavior": 0, - "isInput": false, - "isOptional": true, - "name": "explicitDefaults", - "resolvableInputTypes": [ - { - "kindValue": 0, - "valueType": { - "primitive": { - "wrapper": { - "typeIdentifier": 0 - } - } - } - }, - { - "kindValue": 0, - "valueType": { - "primitive": { - "wrapper": { - "typeIdentifier": 2 - } - } - } - }, - { - "kindValue": 0, - "valueType": { - "array": { - "wrapper": { - "capabilities": 3, - "memberValueType": { - "primitive": { - "wrapper": { - "typeIdentifier": 2 - } - } - } - } - } - } - } - ], - "title": { - "alternatives": [], - "key": "Explicit defaults" - }, - "typeSpecificMetadata": [ - "LNValueTypeMetadataKeyStringSmartQuotes", - { - "int": { - "wrapper": 1 - } - }, - "LNValueTypeMetadataKeyStringKeyboardType", - { - "int": { - "wrapper": 0 - } - }, - "LNValueTypeMetadataKeyStringMultiline", - { - "int": { - "wrapper": 0 - } - }, - "LNValueTypeMetadataKeyStringSmartDashes", - { - "int": { - "wrapper": 1 - } - }, - "LNValueTypeMetadataKeyStringAutocorrect", - { - "int": { - "wrapper": 1 - } - }, - "LNValueTypeMetadataKeyStringCapitalizationType", - { - "int": { - "wrapper": 2 - } - } - ], - "valueType": { - "primitive": { - "wrapper": { - "typeIdentifier": 0 - } - } - } - } - ], - "presentationStyle": 0, - "requiredCapabilities": [], - "supportedModes": 1, - "systemProtocolMetadata": [], - "systemProtocolMetadataV2": [], - "systemProtocols": [], - "title": { - "alternatives": [], - "key": "Input options probe" - }, - "typeSpecificMetadata": [], - "visibilityMetadata": { - "assistantOnly": false, - "isDiscoverable": true - } -} diff --git a/sweetpad-cli/fixtures/appintents/InputOptionsProbe.actions.json b/sweetpad-cli/fixtures/appintents/InputOptionsProbe.actions.json new file mode 100644 index 00000000..1a1190f8 --- /dev/null +++ b/sweetpad-cli/fixtures/appintents/InputOptionsProbe.actions.json @@ -0,0 +1,943 @@ +{ + "InputOptionsProbeIntent": { + "assistantDefinedSchemaTraits": [], + "assistantDefinedSchemas": [], + "authenticationPolicy": 0, + "availabilityAnnotations": { + "LNPlatformNameWildcard": { + "introducedVersion": "*" + } + }, + "effectiveBundleIdentifiers": [], + "fullyQualifiedTypeName": "Sev.InputOptionsProbeIntent", + "identifier": "InputOptionsProbeIntent", + "isAuthPolExplicit": false, + "isDiscoverable": true, + "mangledTypeName": "3Sev23InputOptionsProbeIntentV", + "mangledTypeNameByBundleIdentifier": {}, + "mangledTypeNameByBundleIdentifierV2": {}, + "mangledTypeNameV2": "3Sev23InputOptionsProbeIntentV", + "openAppWhenRun": false, + "outputFlags": 0, + "parameters": [ + { + "capabilities": 0, + "dynamicOptionsSupport": 0, + "inputConnectionBehavior": 0, + "isInput": false, + "isOptional": true, + "name": "allOff", + "resolvableInputTypes": [ + { + "kindValue": 0, + "valueType": { + "primitive": { + "wrapper": { + "typeIdentifier": 0 + } + } + } + }, + { + "kindValue": 0, + "valueType": { + "primitive": { + "wrapper": { + "typeIdentifier": 2 + } + } + } + }, + { + "kindValue": 0, + "valueType": { + "array": { + "wrapper": { + "capabilities": 3, + "memberValueType": { + "primitive": { + "wrapper": { + "typeIdentifier": 2 + } + } + } + } + } + } + } + ], + "title": { + "alternatives": [], + "key": "All off" + }, + "typeSpecificMetadata": [ + "LNValueTypeMetadataKeyStringSmartQuotes", + { + "int": { + "wrapper": 0 + } + }, + "LNValueTypeMetadataKeyStringCapitalizationType", + { + "int": { + "wrapper": 0 + } + }, + "LNValueTypeMetadataKeyStringMultiline", + { + "int": { + "wrapper": 0 + } + }, + "LNValueTypeMetadataKeyStringKeyboardType", + { + "int": { + "wrapper": 4 + } + }, + "LNValueTypeMetadataKeyStringSmartDashes", + { + "int": { + "wrapper": 0 + } + }, + "LNValueTypeMetadataKeyStringAutocorrect", + { + "int": { + "wrapper": 0 + } + } + ], + "valueType": { + "primitive": { + "wrapper": { + "typeIdentifier": 0 + } + } + } + }, + { + "capabilities": 0, + "dynamicOptionsSupport": 0, + "inputConnectionBehavior": 0, + "isInput": false, + "isOptional": true, + "name": "allOn", + "resolvableInputTypes": [ + { + "kindValue": 0, + "valueType": { + "primitive": { + "wrapper": { + "typeIdentifier": 0 + } + } + } + }, + { + "kindValue": 0, + "valueType": { + "primitive": { + "wrapper": { + "typeIdentifier": 2 + } + } + } + }, + { + "kindValue": 0, + "valueType": { + "array": { + "wrapper": { + "capabilities": 3, + "memberValueType": { + "primitive": { + "wrapper": { + "typeIdentifier": 2 + } + } + } + } + } + } + } + ], + "title": { + "alternatives": [], + "key": "All on" + }, + "typeSpecificMetadata": [ + "LNValueTypeMetadataKeyStringCapitalizationType", + { + "int": { + "wrapper": 3 + } + }, + "LNValueTypeMetadataKeyStringSmartQuotes", + { + "int": { + "wrapper": 1 + } + }, + "LNValueTypeMetadataKeyStringMultiline", + { + "int": { + "wrapper": 1 + } + }, + "LNValueTypeMetadataKeyStringAutocorrect", + { + "int": { + "wrapper": 1 + } + }, + "LNValueTypeMetadataKeyStringKeyboardType", + { + "int": { + "wrapper": 0 + } + }, + "LNValueTypeMetadataKeyStringSmartDashes", + { + "int": { + "wrapper": 1 + } + } + ], + "valueType": { + "primitive": { + "wrapper": { + "typeIdentifier": 0 + } + } + } + }, + { + "capabilities": 0, + "dynamicOptionsSupport": 0, + "inputConnectionBehavior": 0, + "isInput": false, + "isOptional": true, + "name": "empty", + "resolvableInputTypes": [ + { + "kindValue": 0, + "valueType": { + "primitive": { + "wrapper": { + "typeIdentifier": 0 + } + } + } + }, + { + "kindValue": 0, + "valueType": { + "primitive": { + "wrapper": { + "typeIdentifier": 2 + } + } + } + }, + { + "kindValue": 0, + "valueType": { + "array": { + "wrapper": { + "capabilities": 3, + "memberValueType": { + "primitive": { + "wrapper": { + "typeIdentifier": 2 + } + } + } + } + } + } + } + ], + "title": { + "alternatives": [], + "key": "Empty" + }, + "typeSpecificMetadata": [], + "valueType": { + "primitive": { + "wrapper": { + "typeIdentifier": 0 + } + } + } + }, + { + "capabilities": 0, + "dynamicOptionsSupport": 0, + "inputConnectionBehavior": 0, + "isInput": false, + "isOptional": true, + "name": "punct", + "resolvableInputTypes": [ + { + "kindValue": 0, + "valueType": { + "primitive": { + "wrapper": { + "typeIdentifier": 0 + } + } + } + }, + { + "kindValue": 0, + "valueType": { + "primitive": { + "wrapper": { + "typeIdentifier": 2 + } + } + } + }, + { + "kindValue": 0, + "valueType": { + "array": { + "wrapper": { + "capabilities": 3, + "memberValueType": { + "primitive": { + "wrapper": { + "typeIdentifier": 2 + } + } + } + } + } + } + } + ], + "title": { + "alternatives": [], + "key": "Punct" + }, + "typeSpecificMetadata": [ + "LNValueTypeMetadataKeyStringCapitalizationType", + { + "int": { + "wrapper": 1 + } + }, + "LNValueTypeMetadataKeyStringKeyboardType", + { + "int": { + "wrapper": 1 + } + } + ], + "valueType": { + "primitive": { + "wrapper": { + "typeIdentifier": 0 + } + } + } + }, + { + "capabilities": 0, + "dynamicOptionsSupport": 0, + "inputConnectionBehavior": 0, + "isInput": false, + "isOptional": true, + "name": "url", + "resolvableInputTypes": [ + { + "kindValue": 0, + "valueType": { + "primitive": { + "wrapper": { + "typeIdentifier": 0 + } + } + } + }, + { + "kindValue": 0, + "valueType": { + "primitive": { + "wrapper": { + "typeIdentifier": 2 + } + } + } + }, + { + "kindValue": 0, + "valueType": { + "array": { + "wrapper": { + "capabilities": 3, + "memberValueType": { + "primitive": { + "wrapper": { + "typeIdentifier": 2 + } + } + } + } + } + } + } + ], + "title": { + "alternatives": [], + "key": "URL" + }, + "typeSpecificMetadata": [ + "LNValueTypeMetadataKeyStringCapitalizationType", + { + "int": { + "wrapper": 2 + } + }, + "LNValueTypeMetadataKeyStringKeyboardType", + { + "int": { + "wrapper": 2 + } + } + ], + "valueType": { + "primitive": { + "wrapper": { + "typeIdentifier": 0 + } + } + } + }, + { + "capabilities": 0, + "dynamicOptionsSupport": 0, + "inputConnectionBehavior": 0, + "isInput": false, + "isOptional": true, + "name": "numberPad", + "resolvableInputTypes": [ + { + "kindValue": 0, + "valueType": { + "array": { + "wrapper": { + "capabilities": 3, + "memberValueType": { + "primitive": { + "wrapper": { + "typeIdentifier": 2 + } + } + } + } + } + } + }, + { + "kindValue": 0, + "valueType": { + "primitive": { + "wrapper": { + "typeIdentifier": 0 + } + } + } + }, + { + "kindValue": 0, + "valueType": { + "primitive": { + "wrapper": { + "typeIdentifier": 2 + } + } + } + } + ], + "title": { + "alternatives": [], + "key": "Number pad" + }, + "typeSpecificMetadata": [ + "LNValueTypeMetadataKeyStringKeyboardType", + { + "int": { + "wrapper": 3 + } + } + ], + "valueType": { + "primitive": { + "wrapper": { + "typeIdentifier": 0 + } + } + } + }, + { + "capabilities": 0, + "dynamicOptionsSupport": 0, + "inputConnectionBehavior": 0, + "isInput": false, + "isOptional": true, + "name": "quotes", + "resolvableInputTypes": [ + { + "kindValue": 0, + "valueType": { + "array": { + "wrapper": { + "capabilities": 3, + "memberValueType": { + "primitive": { + "wrapper": { + "typeIdentifier": 2 + } + } + } + } + } + } + }, + { + "kindValue": 0, + "valueType": { + "primitive": { + "wrapper": { + "typeIdentifier": 0 + } + } + } + }, + { + "kindValue": 0, + "valueType": { + "primitive": { + "wrapper": { + "typeIdentifier": 2 + } + } + } + } + ], + "title": { + "alternatives": [], + "key": "Smart quotes only" + }, + "typeSpecificMetadata": [ + "LNValueTypeMetadataKeyStringSmartQuotes", + { + "int": { + "wrapper": 0 + } + } + ], + "valueType": { + "primitive": { + "wrapper": { + "typeIdentifier": 0 + } + } + } + }, + { + "capabilities": 0, + "dynamicOptionsSupport": 0, + "inputConnectionBehavior": 0, + "isInput": false, + "isOptional": true, + "name": "dashes", + "resolvableInputTypes": [ + { + "kindValue": 0, + "valueType": { + "array": { + "wrapper": { + "capabilities": 3, + "memberValueType": { + "primitive": { + "wrapper": { + "typeIdentifier": 2 + } + } + } + } + } + } + }, + { + "kindValue": 0, + "valueType": { + "primitive": { + "wrapper": { + "typeIdentifier": 0 + } + } + } + }, + { + "kindValue": 0, + "valueType": { + "primitive": { + "wrapper": { + "typeIdentifier": 2 + } + } + } + } + ], + "title": { + "alternatives": [], + "key": "Smart dashes only" + }, + "typeSpecificMetadata": [ + "LNValueTypeMetadataKeyStringSmartDashes", + { + "int": { + "wrapper": 0 + } + } + ], + "valueType": { + "primitive": { + "wrapper": { + "typeIdentifier": 0 + } + } + } + }, + { + "capabilities": 0, + "dynamicOptionsSupport": 0, + "inputConnectionBehavior": 0, + "isInput": false, + "isOptional": true, + "name": "autocorrect", + "resolvableInputTypes": [ + { + "kindValue": 0, + "valueType": { + "array": { + "wrapper": { + "capabilities": 3, + "memberValueType": { + "primitive": { + "wrapper": { + "typeIdentifier": 2 + } + } + } + } + } + } + }, + { + "kindValue": 0, + "valueType": { + "primitive": { + "wrapper": { + "typeIdentifier": 0 + } + } + } + }, + { + "kindValue": 0, + "valueType": { + "primitive": { + "wrapper": { + "typeIdentifier": 2 + } + } + } + } + ], + "title": { + "alternatives": [], + "key": "Autocorrect only" + }, + "typeSpecificMetadata": [ + "LNValueTypeMetadataKeyStringAutocorrect", + { + "int": { + "wrapper": 0 + } + } + ], + "valueType": { + "primitive": { + "wrapper": { + "typeIdentifier": 0 + } + } + } + }, + { + "capabilities": 1, + "dynamicOptionsSupport": 0, + "inputConnectionBehavior": 0, + "isInput": false, + "isOptional": false, + "name": "withDefault", + "resolvableInputTypes": [ + { + "kindValue": 0, + "valueType": { + "primitive": { + "wrapper": { + "typeIdentifier": 0 + } + } + } + }, + { + "kindValue": 0, + "valueType": { + "primitive": { + "wrapper": { + "typeIdentifier": 2 + } + } + } + }, + { + "kindValue": 0, + "valueType": { + "array": { + "wrapper": { + "capabilities": 3, + "memberValueType": { + "primitive": { + "wrapper": { + "typeIdentifier": 2 + } + } + } + } + } + } + } + ], + "title": { + "alternatives": [], + "key": "With default" + }, + "typeSpecificMetadata": [ + "LNValueTypeSpecificMetadataKeyDefaultValue", + { + "string": { + "wrapper": "hi" + } + }, + "LNValueTypeMetadataKeyStringMultiline", + { + "int": { + "wrapper": 1 + } + } + ], + "valueType": { + "primitive": { + "wrapper": { + "typeIdentifier": 0 + } + } + } + }, + { + "capabilities": 0, + "dynamicOptionsSupport": 0, + "inputConnectionBehavior": 0, + "isInput": false, + "isOptional": false, + "name": "dialog", + "parameterDescription": { + "alternatives": [], + "key": "Described" + }, + "resolvableInputTypes": [ + { + "kindValue": 0, + "valueType": { + "primitive": { + "wrapper": { + "typeIdentifier": 0 + } + } + } + }, + { + "kindValue": 0, + "valueType": { + "primitive": { + "wrapper": { + "typeIdentifier": 2 + } + } + } + }, + { + "kindValue": 0, + "valueType": { + "array": { + "wrapper": { + "capabilities": 3, + "memberValueType": { + "primitive": { + "wrapper": { + "typeIdentifier": 2 + } + } + } + } + } + } + } + ], + "title": { + "alternatives": [], + "key": "Options and dialog" + }, + "typeSpecificMetadata": [ + "LNValueTypeMetadataKeyStringAutocorrect", + { + "int": { + "wrapper": 0 + } + }, + "LNValueTypeMetadataKeyStringKeyboardType", + { + "int": { + "wrapper": 3 + } + } + ], + "valueType": { + "primitive": { + "wrapper": { + "typeIdentifier": 0 + } + } + } + }, + { + "capabilities": 0, + "dynamicOptionsSupport": 0, + "inputConnectionBehavior": 0, + "isInput": false, + "isOptional": true, + "name": "explicitDefaults", + "resolvableInputTypes": [ + { + "kindValue": 0, + "valueType": { + "primitive": { + "wrapper": { + "typeIdentifier": 0 + } + } + } + }, + { + "kindValue": 0, + "valueType": { + "primitive": { + "wrapper": { + "typeIdentifier": 2 + } + } + } + }, + { + "kindValue": 0, + "valueType": { + "array": { + "wrapper": { + "capabilities": 3, + "memberValueType": { + "primitive": { + "wrapper": { + "typeIdentifier": 2 + } + } + } + } + } + } + } + ], + "title": { + "alternatives": [], + "key": "Explicit defaults" + }, + "typeSpecificMetadata": [ + "LNValueTypeMetadataKeyStringSmartQuotes", + { + "int": { + "wrapper": 1 + } + }, + "LNValueTypeMetadataKeyStringKeyboardType", + { + "int": { + "wrapper": 0 + } + }, + "LNValueTypeMetadataKeyStringMultiline", + { + "int": { + "wrapper": 0 + } + }, + "LNValueTypeMetadataKeyStringSmartDashes", + { + "int": { + "wrapper": 1 + } + }, + "LNValueTypeMetadataKeyStringAutocorrect", + { + "int": { + "wrapper": 1 + } + }, + "LNValueTypeMetadataKeyStringCapitalizationType", + { + "int": { + "wrapper": 2 + } + } + ], + "valueType": { + "primitive": { + "wrapper": { + "typeIdentifier": 0 + } + } + } + } + ], + "presentationStyle": 0, + "requiredCapabilities": [], + "supportedModes": 1, + "systemProtocolMetadata": [], + "systemProtocolMetadataV2": [], + "systemProtocols": [], + "title": { + "alternatives": [], + "key": "Input options probe" + }, + "typeSpecificMetadata": [], + "visibilityMetadata": { + "assistantOnly": false, + "isDiscoverable": true + } + } +} diff --git a/sweetpad-cli/fixtures/appintents/OutputProbe.actions.json b/sweetpad-cli/fixtures/appintents/OutputProbe.actions.json new file mode 100644 index 00000000..601788c6 --- /dev/null +++ b/sweetpad-cli/fixtures/appintents/OutputProbe.actions.json @@ -0,0 +1,605 @@ +{ + "AllOutputsProbeIntent": { + "assistantDefinedSchemaTraits": [], + "assistantDefinedSchemas": [], + "authenticationPolicy": 0, + "availabilityAnnotations": { + "LNPlatformNameWildcard": { + "introducedVersion": "*" + } + }, + "effectiveBundleIdentifiers": [], + "fullyQualifiedTypeName": "Sev.AllOutputsProbeIntent", + "identifier": "AllOutputsProbeIntent", + "isAuthPolExplicit": false, + "isDiscoverable": true, + "mangledTypeName": "3Sev21AllOutputsProbeIntentV", + "mangledTypeNameByBundleIdentifier": {}, + "mangledTypeNameByBundleIdentifierV2": {}, + "mangledTypeNameV2": "3Sev21AllOutputsProbeIntentV", + "openAppWhenRun": false, + "outputFlags": 7, + "outputType": { + "primitive": { + "wrapper": { + "typeIdentifier": 0 + } + } + }, + "parameters": [], + "presentationStyle": 0, + "requiredCapabilities": [], + "supportedModes": 1, + "systemProtocolMetadata": [], + "systemProtocolMetadataV2": [], + "systemProtocols": [], + "title": { + "alternatives": [], + "key": "All outputs" + }, + "typeSpecificMetadata": [], + "visibilityMetadata": { + "assistantOnly": false, + "isDiscoverable": true + } + }, + "DialogOnlyProbeIntent": { + "assistantDefinedSchemaTraits": [], + "assistantDefinedSchemas": [], + "authenticationPolicy": 0, + "availabilityAnnotations": { + "LNPlatformNameWildcard": { + "introducedVersion": "*" + } + }, + "effectiveBundleIdentifiers": [], + "fullyQualifiedTypeName": "Sev.DialogOnlyProbeIntent", + "identifier": "DialogOnlyProbeIntent", + "isAuthPolExplicit": false, + "isDiscoverable": true, + "mangledTypeName": "3Sev21DialogOnlyProbeIntentV", + "mangledTypeNameByBundleIdentifier": {}, + "mangledTypeNameByBundleIdentifierV2": {}, + "mangledTypeNameV2": "3Sev21DialogOnlyProbeIntentV", + "openAppWhenRun": false, + "outputFlags": 4, + "parameters": [], + "presentationStyle": 0, + "requiredCapabilities": [], + "supportedModes": 1, + "systemProtocolMetadata": [], + "systemProtocolMetadataV2": [], + "systemProtocols": [], + "title": { + "alternatives": [], + "key": "Dialog only" + }, + "typeSpecificMetadata": [], + "visibilityMetadata": { + "assistantOnly": false, + "isDiscoverable": true + } + }, + "OpensProbeIntent": { + "assistantDefinedSchemaTraits": [], + "assistantDefinedSchemas": [], + "authenticationPolicy": 0, + "availabilityAnnotations": { + "LNPlatformNameWildcard": { + "introducedVersion": "*" + } + }, + "effectiveBundleIdentifiers": [], + "fullyQualifiedTypeName": "Sev.OpensProbeIntent", + "identifier": "OpensProbeIntent", + "isAuthPolExplicit": false, + "isDiscoverable": true, + "mangledTypeName": "3Sev16OpensProbeIntentV", + "mangledTypeNameByBundleIdentifier": {}, + "mangledTypeNameByBundleIdentifierV2": {}, + "mangledTypeNameV2": "3Sev16OpensProbeIntentV", + "openAppWhenRun": false, + "outputFlags": 1, + "parameters": [], + "presentationStyle": 0, + "requiredCapabilities": [], + "supportedModes": 1, + "systemProtocolMetadata": [], + "systemProtocolMetadataV2": [], + "systemProtocols": [], + "title": { + "alternatives": [], + "key": "Opens" + }, + "typeSpecificMetadata": [], + "visibilityMetadata": { + "assistantOnly": false, + "isDiscoverable": true + } + }, + "SnippetOnlyProbeIntent": { + "assistantDefinedSchemaTraits": [], + "assistantDefinedSchemas": [], + "authenticationPolicy": 0, + "availabilityAnnotations": { + "LNPlatformNameWildcard": { + "introducedVersion": "*" + } + }, + "effectiveBundleIdentifiers": [], + "fullyQualifiedTypeName": "Sev.SnippetOnlyProbeIntent", + "identifier": "SnippetOnlyProbeIntent", + "isAuthPolExplicit": false, + "isDiscoverable": true, + "mangledTypeName": "3Sev22SnippetOnlyProbeIntentV", + "mangledTypeNameByBundleIdentifier": {}, + "mangledTypeNameByBundleIdentifierV2": {}, + "mangledTypeNameV2": "3Sev22SnippetOnlyProbeIntentV", + "openAppWhenRun": false, + "outputFlags": 2, + "parameters": [], + "presentationStyle": 0, + "requiredCapabilities": [], + "supportedModes": 1, + "systemProtocolMetadata": [], + "systemProtocolMetadataV2": [], + "systemProtocols": [], + "title": { + "alternatives": [], + "key": "Snippet only" + }, + "typeSpecificMetadata": [], + "visibilityMetadata": { + "assistantOnly": false, + "isDiscoverable": true + } + }, + "SummaryBuilderProbeIntent": { + "actionConfiguration": { + "actionSummary": { + "wrapper": { + "otherParameterIdentifiers": [ + "third", + "first" + ], + "summaryString": { + "formatString": "Just text", + "parameterIdentifiers": [] + } + } + } + }, + "assistantDefinedSchemaTraits": [], + "assistantDefinedSchemas": [], + "authenticationPolicy": 0, + "availabilityAnnotations": { + "LNPlatformNameWildcard": { + "introducedVersion": "*" + } + }, + "effectiveBundleIdentifiers": [], + "fullyQualifiedTypeName": "Sev.SummaryBuilderProbeIntent", + "identifier": "SummaryBuilderProbeIntent", + "isAuthPolExplicit": false, + "isDiscoverable": true, + "mangledTypeName": "3Sev25SummaryBuilderProbeIntentV", + "mangledTypeNameByBundleIdentifier": {}, + "mangledTypeNameByBundleIdentifierV2": {}, + "mangledTypeNameV2": "3Sev25SummaryBuilderProbeIntentV", + "openAppWhenRun": false, + "outputFlags": 0, + "parameters": [ + { + "capabilities": 0, + "dynamicOptionsSupport": 0, + "inputConnectionBehavior": 0, + "isInput": false, + "isOptional": false, + "name": "first", + "resolvableInputTypes": [ + { + "kindValue": 0, + "valueType": { + "array": { + "wrapper": { + "capabilities": 3, + "memberValueType": { + "primitive": { + "wrapper": { + "typeIdentifier": 2 + } + } + } + } + } + } + }, + { + "kindValue": 0, + "valueType": { + "primitive": { + "wrapper": { + "typeIdentifier": 0 + } + } + } + }, + { + "kindValue": 0, + "valueType": { + "primitive": { + "wrapper": { + "typeIdentifier": 2 + } + } + } + } + ], + "title": { + "alternatives": [], + "key": "First" + }, + "typeSpecificMetadata": [], + "valueType": { + "primitive": { + "wrapper": { + "typeIdentifier": 0 + } + } + } + }, + { + "capabilities": 0, + "dynamicOptionsSupport": 0, + "inputConnectionBehavior": 0, + "isInput": false, + "isOptional": false, + "name": "second", + "resolvableInputTypes": [ + { + "kindValue": 0, + "valueType": { + "primitive": { + "wrapper": { + "typeIdentifier": 7 + } + } + } + }, + { + "kindValue": 0, + "valueType": { + "primitive": { + "wrapper": { + "typeIdentifier": 0 + } + } + } + }, + { + "kindValue": 0, + "valueType": { + "primitive": { + "wrapper": { + "typeIdentifier": 2 + } + } + } + } + ], + "title": { + "alternatives": [], + "key": "Second" + }, + "typeSpecificMetadata": [], + "valueType": { + "primitive": { + "wrapper": { + "typeIdentifier": 2 + } + } + } + }, + { + "capabilities": 1, + "dynamicOptionsSupport": 0, + "inputConnectionBehavior": 0, + "isInput": false, + "isOptional": false, + "name": "third", + "resolvableInputTypes": [ + { + "kindValue": 0, + "valueType": { + "primitive": { + "wrapper": { + "typeIdentifier": 1 + } + } + } + } + ], + "title": { + "alternatives": [], + "key": "Third" + }, + "typeSpecificMetadata": [ + "LNValueTypeSpecificMetadataKeyDefaultValue", + { + "int": { + "wrapper": 0 + } + } + ], + "valueType": { + "primitive": { + "wrapper": { + "typeIdentifier": 1 + } + } + } + } + ], + "presentationStyle": 0, + "requiredCapabilities": [], + "supportedModes": 1, + "systemProtocolMetadata": [], + "systemProtocolMetadataV2": [], + "systemProtocols": [], + "title": { + "alternatives": [], + "key": "Summary builder" + }, + "typeSpecificMetadata": [], + "visibilityMetadata": { + "assistantOnly": false, + "isDiscoverable": true + } + }, + "SummaryTwoProbeIntent": { + "actionConfiguration": { + "actionSummary": { + "wrapper": { + "otherParameterIdentifiers": [], + "summaryString": { + "formatString": "Send ${first} to ${second}", + "parameterIdentifiers": [ + "first", + "second" + ] + } + } + } + }, + "assistantDefinedSchemaTraits": [], + "assistantDefinedSchemas": [], + "authenticationPolicy": 0, + "availabilityAnnotations": { + "LNPlatformNameWildcard": { + "introducedVersion": "*" + } + }, + "effectiveBundleIdentifiers": [], + "fullyQualifiedTypeName": "Sev.SummaryTwoProbeIntent", + "identifier": "SummaryTwoProbeIntent", + "isAuthPolExplicit": false, + "isDiscoverable": true, + "mangledTypeName": "3Sev21SummaryTwoProbeIntentV", + "mangledTypeNameByBundleIdentifier": {}, + "mangledTypeNameByBundleIdentifierV2": {}, + "mangledTypeNameV2": "3Sev21SummaryTwoProbeIntentV", + "openAppWhenRun": false, + "outputFlags": 0, + "parameters": [ + { + "capabilities": 0, + "dynamicOptionsSupport": 0, + "inputConnectionBehavior": 0, + "isInput": false, + "isOptional": false, + "name": "first", + "resolvableInputTypes": [ + { + "kindValue": 0, + "valueType": { + "primitive": { + "wrapper": { + "typeIdentifier": 2 + } + } + } + }, + { + "kindValue": 0, + "valueType": { + "array": { + "wrapper": { + "capabilities": 3, + "memberValueType": { + "primitive": { + "wrapper": { + "typeIdentifier": 2 + } + } + } + } + } + } + }, + { + "kindValue": 0, + "valueType": { + "primitive": { + "wrapper": { + "typeIdentifier": 0 + } + } + } + } + ], + "title": { + "alternatives": [], + "key": "First" + }, + "typeSpecificMetadata": [], + "valueType": { + "primitive": { + "wrapper": { + "typeIdentifier": 0 + } + } + } + }, + { + "capabilities": 0, + "dynamicOptionsSupport": 0, + "inputConnectionBehavior": 0, + "isInput": false, + "isOptional": false, + "name": "second", + "resolvableInputTypes": [ + { + "kindValue": 0, + "valueType": { + "primitive": { + "wrapper": { + "typeIdentifier": 2 + } + } + } + }, + { + "kindValue": 0, + "valueType": { + "primitive": { + "wrapper": { + "typeIdentifier": 0 + } + } + } + }, + { + "kindValue": 0, + "valueType": { + "primitive": { + "wrapper": { + "typeIdentifier": 7 + } + } + } + } + ], + "title": { + "alternatives": [], + "key": "Second" + }, + "typeSpecificMetadata": [], + "valueType": { + "primitive": { + "wrapper": { + "typeIdentifier": 2 + } + } + } + }, + { + "capabilities": 1, + "dynamicOptionsSupport": 0, + "inputConnectionBehavior": 0, + "isInput": false, + "isOptional": false, + "name": "third", + "resolvableInputTypes": [ + { + "kindValue": 0, + "valueType": { + "primitive": { + "wrapper": { + "typeIdentifier": 1 + } + } + } + } + ], + "title": { + "alternatives": [], + "key": "Third" + }, + "typeSpecificMetadata": [ + "LNValueTypeSpecificMetadataKeyDefaultValue", + { + "int": { + "wrapper": 0 + } + } + ], + "valueType": { + "primitive": { + "wrapper": { + "typeIdentifier": 1 + } + } + } + } + ], + "presentationStyle": 0, + "requiredCapabilities": [], + "supportedModes": 1, + "systemProtocolMetadata": [], + "systemProtocolMetadataV2": [], + "systemProtocols": [], + "title": { + "alternatives": [], + "key": "Summary two" + }, + "typeSpecificMetadata": [], + "visibilityMetadata": { + "assistantOnly": false, + "isDiscoverable": true + } + }, + "ValueSnippetProbeIntent": { + "assistantDefinedSchemaTraits": [], + "assistantDefinedSchemas": [], + "authenticationPolicy": 0, + "availabilityAnnotations": { + "LNPlatformNameWildcard": { + "introducedVersion": "*" + } + }, + "effectiveBundleIdentifiers": [], + "fullyQualifiedTypeName": "Sev.ValueSnippetProbeIntent", + "identifier": "ValueSnippetProbeIntent", + "isAuthPolExplicit": false, + "isDiscoverable": true, + "mangledTypeName": "3Sev23ValueSnippetProbeIntentV", + "mangledTypeNameByBundleIdentifier": {}, + "mangledTypeNameByBundleIdentifierV2": {}, + "mangledTypeNameV2": "3Sev23ValueSnippetProbeIntentV", + "openAppWhenRun": false, + "outputFlags": 2, + "outputType": { + "primitive": { + "wrapper": { + "typeIdentifier": 0 + } + } + }, + "parameters": [], + "presentationStyle": 0, + "requiredCapabilities": [], + "supportedModes": 1, + "systemProtocolMetadata": [], + "systemProtocolMetadataV2": [], + "systemProtocols": [], + "title": { + "alternatives": [], + "key": "Value and snippet" + }, + "typeSpecificMetadata": [], + "visibilityMetadata": { + "assistantOnly": false, + "isDiscoverable": true + } + } +} diff --git a/sweetpad-cli/fixtures/appintents/OutputProbe.swift b/sweetpad-cli/fixtures/appintents/OutputProbe.swift new file mode 100644 index 00000000..16e368e5 --- /dev/null +++ b/sweetpad-cli/fixtures/appintents/OutputProbe.swift @@ -0,0 +1,56 @@ +// Output flags and parameter summaries. +import AppIntents +import SwiftUI + +struct DialogOnlyProbeIntent: AppIntent { + static let title: LocalizedStringResource = "Dialog only" + func perform() async throws -> some IntentResult & ProvidesDialog { .result(dialog: "Done") } +} + +struct SnippetOnlyProbeIntent: AppIntent { + static let title: LocalizedStringResource = "Snippet only" + @MainActor + func perform() async throws -> some IntentResult & ShowsSnippetView { .result(view: Text("Done")) } +} + +struct ValueSnippetProbeIntent: AppIntent { + static let title: LocalizedStringResource = "Value and snippet" + @MainActor + func perform() async throws -> some IntentResult & ReturnsValue & ShowsSnippetView { .result(value: "v", view: Text("Done")) } +} + +struct OpensProbeIntent: AppIntent { + static let title: LocalizedStringResource = "Opens" + func perform() async throws -> some IntentResult & OpensIntent { .result(opensIntent: DialogOnlyProbeIntent()) } +} + +struct AllOutputsProbeIntent: AppIntent { + static let title: LocalizedStringResource = "All outputs" + @MainActor + func perform() async throws -> some IntentResult & ReturnsValue & ProvidesDialog & ShowsSnippetView & OpensIntent { + .result(value: "v", opensIntent: DialogOnlyProbeIntent(), dialog: "Done", view: Text("Done")) + } +} + +struct SummaryTwoProbeIntent: AppIntent { + static let title: LocalizedStringResource = "Summary two" + @Parameter(title: "First") var first: String + @Parameter(title: "Second") var second: Int + @Parameter(title: "Third", default: false) var third: Bool + static var parameterSummary: some ParameterSummary { Summary("Send \(\.$first) to \(\.$second)") } + func perform() async throws -> some IntentResult { .result() } +} + +struct SummaryBuilderProbeIntent: AppIntent { + static let title: LocalizedStringResource = "Summary builder" + @Parameter(title: "First") var first: String + @Parameter(title: "Second") var second: Int + @Parameter(title: "Third", default: false) var third: Bool + static var parameterSummary: some ParameterSummary { + Summary("Just text") { + \.$third + \.$first + } + } + func perform() async throws -> some IntentResult { .result() } +} diff --git a/sweetpad-cli/fixtures/appintents/OutputProbe.swiftconstvalues b/sweetpad-cli/fixtures/appintents/OutputProbe.swiftconstvalues new file mode 100644 index 00000000..f60949b8 --- /dev/null +++ b/sweetpad-cli/fixtures/appintents/OutputProbe.swiftconstvalues @@ -0,0 +1,1399 @@ +[ + { + "allConformances": [ + { + "conformanceDefiningModule": "Sev", + "protocolName": "AppIntents.AppIntent" + }, + { + "conformanceDefiningModule": "Sev", + "protocolName": "AppIntents.PersistentlyIdentifiable" + }, + { + "conformanceDefiningModule": "Sev", + "protocolName": "AppIntents._SupportsAppDependencies" + }, + { + "conformanceDefiningModule": "Sev", + "protocolName": "Swift.Sendable" + }, + { + "conformanceDefiningModule": "Sev", + "protocolName": "Swift.SendableMetatype" + }, + { + "conformanceDefiningModule": "Sev", + "protocolName": "Swift.BitwiseCopyable" + } + ], + "associatedTypeAliases": [ + { + "opaqueTypeProtocolRequirements": [ + "AppIntents.ProvidesDialog" + ], + "opaqueTypeSameTypeRequirements": [], + "substitutedMangledTypeName": "3Sev21DialogOnlyProbeIntentV7performQryYaKFQOy_Qo_", + "substitutedTypeName": "some AppIntents.ProvidesDialog", + "typeAliasName": "PerformResult" + }, + { + "opaqueTypeProtocolRequirements": [ + "AppIntents.ParameterSummary" + ], + "opaqueTypeSameTypeRequirements": [], + "substitutedMangledTypeName": "10AppIntents0A6IntentPAAE16parameterSummaryQrvpZQOy3Sev015DialogOnlyProbeC0V_Qo_", + "substitutedTypeName": "some AppIntents.ParameterSummary", + "typeAliasName": "SummaryContent" + } + ], + "conformances": [ + "AppIntents.AppIntent", + "AppIntents.PersistentlyIdentifiable", + "AppIntents._SupportsAppDependencies", + "Swift.Sendable", + "Swift.SendableMetatype", + "Swift.BitwiseCopyable" + ], + "file": "OutputProbe.swift", + "kind": "struct", + "line": 5, + "mangledTypeName": "3Sev21DialogOnlyProbeIntentV", + "properties": [ + { + "file": "OutputProbe.swift", + "isComputed": "false", + "isStatic": "true", + "label": "title", + "line": 6, + "mangledTypeName": "n/a - deprecated", + "type": "Foundation.LocalizedStringResource", + "value": "Dialog only", + "valueKind": "RawLiteral" + } + ], + "typeName": "Sev.DialogOnlyProbeIntent" + }, + { + "allConformances": [ + { + "conformanceDefiningModule": "Sev", + "protocolName": "AppIntents.AppIntent" + }, + { + "conformanceDefiningModule": "Sev", + "protocolName": "AppIntents.PersistentlyIdentifiable" + }, + { + "conformanceDefiningModule": "Sev", + "protocolName": "AppIntents._SupportsAppDependencies" + }, + { + "conformanceDefiningModule": "Sev", + "protocolName": "Swift.Sendable" + }, + { + "conformanceDefiningModule": "Sev", + "protocolName": "Swift.SendableMetatype" + }, + { + "conformanceDefiningModule": "Sev", + "protocolName": "Swift.BitwiseCopyable" + } + ], + "associatedTypeAliases": [ + { + "opaqueTypeProtocolRequirements": [ + "AppIntents.ShowsSnippetView" + ], + "opaqueTypeSameTypeRequirements": [], + "substitutedMangledTypeName": "3Sev22SnippetOnlyProbeIntentV7performQryYaKFQOy_Qo_", + "substitutedTypeName": "some AppIntents.ShowsSnippetView", + "typeAliasName": "PerformResult" + }, + { + "opaqueTypeProtocolRequirements": [ + "AppIntents.ParameterSummary" + ], + "opaqueTypeSameTypeRequirements": [], + "substitutedMangledTypeName": "10AppIntents0A6IntentPAAE16parameterSummaryQrvpZQOy3Sev016SnippetOnlyProbeC0V_Qo_", + "substitutedTypeName": "some AppIntents.ParameterSummary", + "typeAliasName": "SummaryContent" + } + ], + "conformances": [ + "AppIntents.AppIntent", + "AppIntents.PersistentlyIdentifiable", + "AppIntents._SupportsAppDependencies", + "Swift.Sendable", + "Swift.SendableMetatype", + "Swift.BitwiseCopyable" + ], + "file": "OutputProbe.swift", + "kind": "struct", + "line": 10, + "mangledTypeName": "3Sev22SnippetOnlyProbeIntentV", + "properties": [ + { + "file": "OutputProbe.swift", + "isComputed": "false", + "isStatic": "true", + "label": "title", + "line": 11, + "mangledTypeName": "n/a - deprecated", + "type": "Foundation.LocalizedStringResource", + "value": "Snippet only", + "valueKind": "RawLiteral" + } + ], + "typeName": "Sev.SnippetOnlyProbeIntent" + }, + { + "allConformances": [ + { + "conformanceDefiningModule": "Sev", + "protocolName": "AppIntents.AppIntent" + }, + { + "conformanceDefiningModule": "Sev", + "protocolName": "AppIntents.PersistentlyIdentifiable" + }, + { + "conformanceDefiningModule": "Sev", + "protocolName": "AppIntents._SupportsAppDependencies" + }, + { + "conformanceDefiningModule": "Sev", + "protocolName": "Swift.Sendable" + }, + { + "conformanceDefiningModule": "Sev", + "protocolName": "Swift.SendableMetatype" + }, + { + "conformanceDefiningModule": "Sev", + "protocolName": "Swift.BitwiseCopyable" + } + ], + "associatedTypeAliases": [ + { + "opaqueTypeProtocolRequirements": [ + "AppIntents.ReturnsValue", + "AppIntents.ShowsSnippetView" + ], + "opaqueTypeSameTypeRequirements": [ + { + "substitutedMangledTypeName": "SS", + "substitutedTypeName": "Swift.String", + "typeAliasName": "AppIntents.IntentResult.Value" + } + ], + "substitutedMangledTypeName": "3Sev23ValueSnippetProbeIntentV7performQryYaKFQOy_Qo_", + "substitutedTypeName": "some AppIntents.ReturnsValue & AppIntents.ShowsSnippetView", + "typeAliasName": "PerformResult" + }, + { + "opaqueTypeProtocolRequirements": [ + "AppIntents.ParameterSummary" + ], + "opaqueTypeSameTypeRequirements": [], + "substitutedMangledTypeName": "10AppIntents0A6IntentPAAE16parameterSummaryQrvpZQOy3Sev017ValueSnippetProbeC0V_Qo_", + "substitutedTypeName": "some AppIntents.ParameterSummary", + "typeAliasName": "SummaryContent" + } + ], + "conformances": [ + "AppIntents.AppIntent", + "AppIntents.PersistentlyIdentifiable", + "AppIntents._SupportsAppDependencies", + "Swift.Sendable", + "Swift.SendableMetatype", + "Swift.BitwiseCopyable" + ], + "file": "OutputProbe.swift", + "kind": "struct", + "line": 16, + "mangledTypeName": "3Sev23ValueSnippetProbeIntentV", + "properties": [ + { + "file": "OutputProbe.swift", + "isComputed": "false", + "isStatic": "true", + "label": "title", + "line": 17, + "mangledTypeName": "n/a - deprecated", + "type": "Foundation.LocalizedStringResource", + "value": "Value and snippet", + "valueKind": "RawLiteral" + } + ], + "typeName": "Sev.ValueSnippetProbeIntent" + }, + { + "allConformances": [ + { + "conformanceDefiningModule": "Sev", + "protocolName": "AppIntents.AppIntent" + }, + { + "conformanceDefiningModule": "Sev", + "protocolName": "AppIntents.PersistentlyIdentifiable" + }, + { + "conformanceDefiningModule": "Sev", + "protocolName": "AppIntents._SupportsAppDependencies" + }, + { + "conformanceDefiningModule": "Sev", + "protocolName": "Swift.Sendable" + }, + { + "conformanceDefiningModule": "Sev", + "protocolName": "Swift.SendableMetatype" + }, + { + "conformanceDefiningModule": "Sev", + "protocolName": "Swift.BitwiseCopyable" + } + ], + "associatedTypeAliases": [ + { + "opaqueTypeProtocolRequirements": [ + "AppIntents.OpensIntent" + ], + "opaqueTypeSameTypeRequirements": [], + "substitutedMangledTypeName": "3Sev16OpensProbeIntentV7performQryYaKFQOy_Qo_", + "substitutedTypeName": "some AppIntents.OpensIntent", + "typeAliasName": "PerformResult" + }, + { + "opaqueTypeProtocolRequirements": [ + "AppIntents.ParameterSummary" + ], + "opaqueTypeSameTypeRequirements": [], + "substitutedMangledTypeName": "10AppIntents0A6IntentPAAE16parameterSummaryQrvpZQOy3Sev010OpensProbeC0V_Qo_", + "substitutedTypeName": "some AppIntents.ParameterSummary", + "typeAliasName": "SummaryContent" + } + ], + "conformances": [ + "AppIntents.AppIntent", + "AppIntents.PersistentlyIdentifiable", + "AppIntents._SupportsAppDependencies", + "Swift.Sendable", + "Swift.SendableMetatype", + "Swift.BitwiseCopyable" + ], + "file": "OutputProbe.swift", + "kind": "struct", + "line": 22, + "mangledTypeName": "3Sev16OpensProbeIntentV", + "properties": [ + { + "file": "OutputProbe.swift", + "isComputed": "false", + "isStatic": "true", + "label": "title", + "line": 23, + "mangledTypeName": "n/a - deprecated", + "type": "Foundation.LocalizedStringResource", + "value": "Opens", + "valueKind": "RawLiteral" + } + ], + "typeName": "Sev.OpensProbeIntent" + }, + { + "allConformances": [ + { + "conformanceDefiningModule": "Sev", + "protocolName": "AppIntents.AppIntent" + }, + { + "conformanceDefiningModule": "Sev", + "protocolName": "AppIntents.PersistentlyIdentifiable" + }, + { + "conformanceDefiningModule": "Sev", + "protocolName": "AppIntents._SupportsAppDependencies" + }, + { + "conformanceDefiningModule": "Sev", + "protocolName": "Swift.Sendable" + }, + { + "conformanceDefiningModule": "Sev", + "protocolName": "Swift.SendableMetatype" + }, + { + "conformanceDefiningModule": "Sev", + "protocolName": "Swift.BitwiseCopyable" + } + ], + "associatedTypeAliases": [ + { + "opaqueTypeProtocolRequirements": [ + "AppIntents.OpensIntent", + "AppIntents.ProvidesDialog", + "AppIntents.ReturnsValue", + "AppIntents.ShowsSnippetView" + ], + "opaqueTypeSameTypeRequirements": [ + { + "substitutedMangledTypeName": "SS", + "substitutedTypeName": "Swift.String", + "typeAliasName": "AppIntents.IntentResult.Value" + } + ], + "substitutedMangledTypeName": "3Sev21AllOutputsProbeIntentV7performQryYaKFQOy_Qo_", + "substitutedTypeName": "some AppIntents.OpensIntent & AppIntents.ProvidesDialog & AppIntents.ReturnsValue & AppIntents.ShowsSnippetView", + "typeAliasName": "PerformResult" + }, + { + "opaqueTypeProtocolRequirements": [ + "AppIntents.ParameterSummary" + ], + "opaqueTypeSameTypeRequirements": [], + "substitutedMangledTypeName": "10AppIntents0A6IntentPAAE16parameterSummaryQrvpZQOy3Sev015AllOutputsProbeC0V_Qo_", + "substitutedTypeName": "some AppIntents.ParameterSummary", + "typeAliasName": "SummaryContent" + } + ], + "conformances": [ + "AppIntents.AppIntent", + "AppIntents.PersistentlyIdentifiable", + "AppIntents._SupportsAppDependencies", + "Swift.Sendable", + "Swift.SendableMetatype", + "Swift.BitwiseCopyable" + ], + "file": "OutputProbe.swift", + "kind": "struct", + "line": 27, + "mangledTypeName": "3Sev21AllOutputsProbeIntentV", + "properties": [ + { + "file": "OutputProbe.swift", + "isComputed": "false", + "isStatic": "true", + "label": "title", + "line": 28, + "mangledTypeName": "n/a - deprecated", + "type": "Foundation.LocalizedStringResource", + "value": "All outputs", + "valueKind": "RawLiteral" + } + ], + "typeName": "Sev.AllOutputsProbeIntent" + }, + { + "allConformances": [ + { + "conformanceDefiningModule": "Sev", + "protocolName": "AppIntents.AppIntent" + }, + { + "conformanceDefiningModule": "Sev", + "protocolName": "AppIntents.PersistentlyIdentifiable" + }, + { + "conformanceDefiningModule": "Sev", + "protocolName": "AppIntents._SupportsAppDependencies" + }, + { + "conformanceDefiningModule": "Sev", + "protocolName": "Swift.Sendable" + }, + { + "conformanceDefiningModule": "Sev", + "protocolName": "Swift.SendableMetatype" + } + ], + "associatedTypeAliases": [ + { + "opaqueTypeProtocolRequirements": [ + "AppIntents.IntentResult" + ], + "opaqueTypeSameTypeRequirements": [], + "substitutedMangledTypeName": "3Sev21SummaryTwoProbeIntentV7performQryYaKFQOy_Qo_", + "substitutedTypeName": "some AppIntents.IntentResult", + "typeAliasName": "PerformResult" + }, + { + "opaqueTypeProtocolRequirements": [ + "AppIntents.ParameterSummary" + ], + "opaqueTypeSameTypeRequirements": [], + "substitutedMangledTypeName": "3Sev21SummaryTwoProbeIntentV09parameterB0QrvpZQOy_Qo_", + "substitutedTypeName": "some AppIntents.ParameterSummary", + "typeAliasName": "SummaryContent" + } + ], + "conformances": [ + "AppIntents.AppIntent", + "AppIntents.PersistentlyIdentifiable", + "AppIntents._SupportsAppDependencies", + "Swift.Sendable", + "Swift.SendableMetatype" + ], + "file": "OutputProbe.swift", + "kind": "struct", + "line": 35, + "mangledTypeName": "3Sev21SummaryTwoProbeIntentV", + "properties": [ + { + "file": "OutputProbe.swift", + "isComputed": "false", + "isStatic": "false", + "label": "_first", + "line": 37, + "mangledTypeName": "n/a - deprecated", + "type": "AppIntents.IntentParameter", + "value": { + "arguments": [ + { + "label": "title", + "type": "Foundation.LocalizedStringResource", + "value": "First", + "valueKind": "RawLiteral" + }, + { + "label": "description", + "type": "Swift.Optional", + "valueKind": "NilLiteral" + }, + { + "label": "default", + "type": "Swift.Optional", + "valueKind": "NilLiteral" + }, + { + "label": "inputOptions", + "type": "Swift.Optional", + "valueKind": "NilLiteral" + }, + { + "label": "requestValueDialog", + "type": "Swift.Optional", + "valueKind": "NilLiteral" + }, + { + "label": "inputConnectionBehavior", + "type": "AppIntents.InputConnectionBehavior", + "valueKind": "Runtime" + } + ], + "type": "AppIntents.IntentParameter" + }, + "valueKind": "InitCall" + }, + { + "file": "OutputProbe.swift", + "isComputed": "false", + "isStatic": "false", + "label": "_second", + "line": 38, + "mangledTypeName": "n/a - deprecated", + "type": "AppIntents.IntentParameter", + "value": { + "arguments": [ + { + "label": "title", + "type": "Foundation.LocalizedStringResource", + "value": "Second", + "valueKind": "RawLiteral" + }, + { + "label": "description", + "type": "Swift.Optional", + "valueKind": "NilLiteral" + }, + { + "label": "default", + "type": "Swift.Optional", + "valueKind": "NilLiteral" + }, + { + "label": "controlStyle", + "type": "AppIntents.IntentParameter.IntControlStyle", + "valueKind": "Runtime" + }, + { + "label": "inclusiveRange", + "type": "Swift.Optional<(lowerBound: Swift.Int, upperBound: Swift.Int)>", + "valueKind": "NilLiteral" + }, + { + "label": "requestValueDialog", + "type": "Swift.Optional", + "valueKind": "NilLiteral" + }, + { + "label": "inputConnectionBehavior", + "type": "AppIntents.InputConnectionBehavior", + "valueKind": "Runtime" + } + ], + "type": "AppIntents.IntentParameter" + }, + "valueKind": "InitCall" + }, + { + "file": "OutputProbe.swift", + "isComputed": "false", + "isStatic": "false", + "label": "_third", + "line": 39, + "mangledTypeName": "n/a - deprecated", + "type": "AppIntents.IntentParameter", + "value": { + "arguments": [ + { + "label": "title", + "type": "Foundation.LocalizedStringResource", + "value": "Third", + "valueKind": "RawLiteral" + }, + { + "label": "description", + "type": "Swift.Optional", + "valueKind": "NilLiteral" + }, + { + "label": "default", + "type": "Swift.Optional", + "value": "false", + "valueKind": "RawLiteral" + }, + { + "label": "displayName", + "type": "Swift.Optional", + "valueKind": "NilLiteral" + }, + { + "label": "requestValueDialog", + "type": "Swift.Optional", + "valueKind": "NilLiteral" + }, + { + "label": "inputConnectionBehavior", + "type": "AppIntents.InputConnectionBehavior", + "valueKind": "Runtime" + } + ], + "type": "AppIntents.IntentParameter" + }, + "valueKind": "InitCall" + }, + { + "file": "OutputProbe.swift", + "isComputed": "false", + "isStatic": "true", + "label": "title", + "line": 36, + "mangledTypeName": "n/a - deprecated", + "type": "Foundation.LocalizedStringResource", + "value": "Summary two", + "valueKind": "RawLiteral" + }, + { + "file": "OutputProbe.swift", + "isComputed": "true", + "isStatic": "false", + "label": "first", + "line": 37, + "mangledTypeName": "n/a - deprecated", + "propertyWrappers": [ + { + "arguments": [ + { + "label": "title", + "type": "Foundation.LocalizedStringResource", + "value": "First", + "valueKind": "RawLiteral" + } + ], + "file": "OutputProbe.swift", + "line": 37, + "type": "AppIntents.IntentParameter" + } + ], + "type": "Swift.String", + "value": { + "arguments": [ + { + "label": "title", + "type": "Foundation.LocalizedStringResource", + "value": "First", + "valueKind": "RawLiteral" + }, + { + "label": "description", + "type": "Swift.Optional", + "valueKind": "NilLiteral" + }, + { + "label": "default", + "type": "Swift.Optional", + "valueKind": "NilLiteral" + }, + { + "label": "inputOptions", + "type": "Swift.Optional", + "valueKind": "NilLiteral" + }, + { + "label": "requestValueDialog", + "type": "Swift.Optional", + "valueKind": "NilLiteral" + }, + { + "label": "inputConnectionBehavior", + "type": "AppIntents.InputConnectionBehavior", + "valueKind": "Runtime" + } + ], + "type": "AppIntents.IntentParameter" + }, + "valueKind": "InitCall" + }, + { + "file": "OutputProbe.swift", + "isComputed": "true", + "isStatic": "false", + "label": "$first", + "line": 37, + "mangledTypeName": "n/a - deprecated", + "type": "AppIntents.IntentParameter", + "valueKind": "Runtime" + }, + { + "file": "OutputProbe.swift", + "isComputed": "true", + "isStatic": "false", + "label": "second", + "line": 38, + "mangledTypeName": "n/a - deprecated", + "propertyWrappers": [ + { + "arguments": [ + { + "label": "title", + "type": "Foundation.LocalizedStringResource", + "value": "Second", + "valueKind": "RawLiteral" + } + ], + "file": "OutputProbe.swift", + "line": 38, + "type": "AppIntents.IntentParameter" + } + ], + "type": "Swift.Int", + "value": { + "arguments": [ + { + "label": "title", + "type": "Foundation.LocalizedStringResource", + "value": "Second", + "valueKind": "RawLiteral" + }, + { + "label": "description", + "type": "Swift.Optional", + "valueKind": "NilLiteral" + }, + { + "label": "default", + "type": "Swift.Optional", + "valueKind": "NilLiteral" + }, + { + "label": "controlStyle", + "type": "AppIntents.IntentParameter.IntControlStyle", + "valueKind": "Runtime" + }, + { + "label": "inclusiveRange", + "type": "Swift.Optional<(lowerBound: Swift.Int, upperBound: Swift.Int)>", + "valueKind": "NilLiteral" + }, + { + "label": "requestValueDialog", + "type": "Swift.Optional", + "valueKind": "NilLiteral" + }, + { + "label": "inputConnectionBehavior", + "type": "AppIntents.InputConnectionBehavior", + "valueKind": "Runtime" + } + ], + "type": "AppIntents.IntentParameter" + }, + "valueKind": "InitCall" + }, + { + "file": "OutputProbe.swift", + "isComputed": "true", + "isStatic": "false", + "label": "$second", + "line": 38, + "mangledTypeName": "n/a - deprecated", + "type": "AppIntents.IntentParameter", + "valueKind": "Runtime" + }, + { + "file": "OutputProbe.swift", + "isComputed": "true", + "isStatic": "false", + "label": "third", + "line": 39, + "mangledTypeName": "n/a - deprecated", + "propertyWrappers": [ + { + "arguments": [ + { + "label": "title", + "type": "Foundation.LocalizedStringResource", + "value": "Third", + "valueKind": "RawLiteral" + }, + { + "label": "default", + "type": "Swift.Optional", + "value": "false", + "valueKind": "RawLiteral" + } + ], + "file": "OutputProbe.swift", + "line": 39, + "type": "AppIntents.IntentParameter" + } + ], + "type": "Swift.Bool", + "value": { + "arguments": [ + { + "label": "title", + "type": "Foundation.LocalizedStringResource", + "value": "Third", + "valueKind": "RawLiteral" + }, + { + "label": "description", + "type": "Swift.Optional", + "valueKind": "NilLiteral" + }, + { + "label": "default", + "type": "Swift.Optional", + "value": "false", + "valueKind": "RawLiteral" + }, + { + "label": "displayName", + "type": "Swift.Optional", + "valueKind": "NilLiteral" + }, + { + "label": "requestValueDialog", + "type": "Swift.Optional", + "valueKind": "NilLiteral" + }, + { + "label": "inputConnectionBehavior", + "type": "AppIntents.InputConnectionBehavior", + "valueKind": "Runtime" + } + ], + "type": "AppIntents.IntentParameter" + }, + "valueKind": "InitCall" + }, + { + "file": "OutputProbe.swift", + "isComputed": "true", + "isStatic": "false", + "label": "$third", + "line": 39, + "mangledTypeName": "n/a - deprecated", + "type": "AppIntents.IntentParameter", + "valueKind": "Runtime" + }, + { + "file": "OutputProbe.swift", + "isComputed": "true", + "isStatic": "true", + "label": "parameterSummary", + "line": 40, + "mangledTypeName": "n/a - deprecated", + "type": "some AppIntents.ParameterSummary", + "value": { + "arguments": [ + { + "label": "", + "type": "AppIntents.ParameterSummaryString", + "value": { + "segments": [ + { + "value": "Send ", + "valueKind": "RawLiteral" + }, + { + "value": { + "components": [ + { + "label": "$first", + "type": "AppIntents.IntentParameter" + } + ], + "path": "$first", + "rootType": "Sev.SummaryTwoProbeIntent" + }, + "valueKind": "KeyPath" + }, + { + "value": " to ", + "valueKind": "RawLiteral" + }, + { + "value": { + "components": [ + { + "label": "$second", + "type": "AppIntents.IntentParameter" + } + ], + "path": "$second", + "rootType": "Sev.SummaryTwoProbeIntent" + }, + "valueKind": "KeyPath" + }, + { + "value": "", + "valueKind": "RawLiteral" + } + ] + }, + "valueKind": "InterpolatedStringLiteral" + }, + { + "label": "table", + "type": "Swift.Optional", + "valueKind": "NilLiteral" + } + ], + "type": "AppIntents.IntentParameterSummary" + }, + "valueKind": "InitCall" + } + ], + "typeName": "Sev.SummaryTwoProbeIntent" + }, + { + "allConformances": [ + { + "conformanceDefiningModule": "Sev", + "protocolName": "AppIntents.AppIntent" + }, + { + "conformanceDefiningModule": "Sev", + "protocolName": "AppIntents.PersistentlyIdentifiable" + }, + { + "conformanceDefiningModule": "Sev", + "protocolName": "AppIntents._SupportsAppDependencies" + }, + { + "conformanceDefiningModule": "Sev", + "protocolName": "Swift.Sendable" + }, + { + "conformanceDefiningModule": "Sev", + "protocolName": "Swift.SendableMetatype" + } + ], + "associatedTypeAliases": [ + { + "opaqueTypeProtocolRequirements": [ + "AppIntents.IntentResult" + ], + "opaqueTypeSameTypeRequirements": [], + "substitutedMangledTypeName": "3Sev25SummaryBuilderProbeIntentV7performQryYaKFQOy_Qo_", + "substitutedTypeName": "some AppIntents.IntentResult", + "typeAliasName": "PerformResult" + }, + { + "opaqueTypeProtocolRequirements": [ + "AppIntents.ParameterSummary" + ], + "opaqueTypeSameTypeRequirements": [], + "substitutedMangledTypeName": "3Sev25SummaryBuilderProbeIntentV09parameterB0QrvpZQOy_Qo_", + "substitutedTypeName": "some AppIntents.ParameterSummary", + "typeAliasName": "SummaryContent" + } + ], + "conformances": [ + "AppIntents.AppIntent", + "AppIntents.PersistentlyIdentifiable", + "AppIntents._SupportsAppDependencies", + "Swift.Sendable", + "Swift.SendableMetatype" + ], + "file": "OutputProbe.swift", + "kind": "struct", + "line": 44, + "mangledTypeName": "3Sev25SummaryBuilderProbeIntentV", + "properties": [ + { + "file": "OutputProbe.swift", + "isComputed": "false", + "isStatic": "false", + "label": "_first", + "line": 46, + "mangledTypeName": "n/a - deprecated", + "type": "AppIntents.IntentParameter", + "value": { + "arguments": [ + { + "label": "title", + "type": "Foundation.LocalizedStringResource", + "value": "First", + "valueKind": "RawLiteral" + }, + { + "label": "description", + "type": "Swift.Optional", + "valueKind": "NilLiteral" + }, + { + "label": "default", + "type": "Swift.Optional", + "valueKind": "NilLiteral" + }, + { + "label": "inputOptions", + "type": "Swift.Optional", + "valueKind": "NilLiteral" + }, + { + "label": "requestValueDialog", + "type": "Swift.Optional", + "valueKind": "NilLiteral" + }, + { + "label": "inputConnectionBehavior", + "type": "AppIntents.InputConnectionBehavior", + "valueKind": "Runtime" + } + ], + "type": "AppIntents.IntentParameter" + }, + "valueKind": "InitCall" + }, + { + "file": "OutputProbe.swift", + "isComputed": "false", + "isStatic": "false", + "label": "_second", + "line": 47, + "mangledTypeName": "n/a - deprecated", + "type": "AppIntents.IntentParameter", + "value": { + "arguments": [ + { + "label": "title", + "type": "Foundation.LocalizedStringResource", + "value": "Second", + "valueKind": "RawLiteral" + }, + { + "label": "description", + "type": "Swift.Optional", + "valueKind": "NilLiteral" + }, + { + "label": "default", + "type": "Swift.Optional", + "valueKind": "NilLiteral" + }, + { + "label": "controlStyle", + "type": "AppIntents.IntentParameter.IntControlStyle", + "valueKind": "Runtime" + }, + { + "label": "inclusiveRange", + "type": "Swift.Optional<(lowerBound: Swift.Int, upperBound: Swift.Int)>", + "valueKind": "NilLiteral" + }, + { + "label": "requestValueDialog", + "type": "Swift.Optional", + "valueKind": "NilLiteral" + }, + { + "label": "inputConnectionBehavior", + "type": "AppIntents.InputConnectionBehavior", + "valueKind": "Runtime" + } + ], + "type": "AppIntents.IntentParameter" + }, + "valueKind": "InitCall" + }, + { + "file": "OutputProbe.swift", + "isComputed": "false", + "isStatic": "false", + "label": "_third", + "line": 48, + "mangledTypeName": "n/a - deprecated", + "type": "AppIntents.IntentParameter", + "value": { + "arguments": [ + { + "label": "title", + "type": "Foundation.LocalizedStringResource", + "value": "Third", + "valueKind": "RawLiteral" + }, + { + "label": "description", + "type": "Swift.Optional", + "valueKind": "NilLiteral" + }, + { + "label": "default", + "type": "Swift.Optional", + "value": "false", + "valueKind": "RawLiteral" + }, + { + "label": "displayName", + "type": "Swift.Optional", + "valueKind": "NilLiteral" + }, + { + "label": "requestValueDialog", + "type": "Swift.Optional", + "valueKind": "NilLiteral" + }, + { + "label": "inputConnectionBehavior", + "type": "AppIntents.InputConnectionBehavior", + "valueKind": "Runtime" + } + ], + "type": "AppIntents.IntentParameter" + }, + "valueKind": "InitCall" + }, + { + "file": "OutputProbe.swift", + "isComputed": "false", + "isStatic": "true", + "label": "title", + "line": 45, + "mangledTypeName": "n/a - deprecated", + "type": "Foundation.LocalizedStringResource", + "value": "Summary builder", + "valueKind": "RawLiteral" + }, + { + "file": "OutputProbe.swift", + "isComputed": "true", + "isStatic": "false", + "label": "first", + "line": 46, + "mangledTypeName": "n/a - deprecated", + "propertyWrappers": [ + { + "arguments": [ + { + "label": "title", + "type": "Foundation.LocalizedStringResource", + "value": "First", + "valueKind": "RawLiteral" + } + ], + "file": "OutputProbe.swift", + "line": 46, + "type": "AppIntents.IntentParameter" + } + ], + "type": "Swift.String", + "value": { + "arguments": [ + { + "label": "title", + "type": "Foundation.LocalizedStringResource", + "value": "First", + "valueKind": "RawLiteral" + }, + { + "label": "description", + "type": "Swift.Optional", + "valueKind": "NilLiteral" + }, + { + "label": "default", + "type": "Swift.Optional", + "valueKind": "NilLiteral" + }, + { + "label": "inputOptions", + "type": "Swift.Optional", + "valueKind": "NilLiteral" + }, + { + "label": "requestValueDialog", + "type": "Swift.Optional", + "valueKind": "NilLiteral" + }, + { + "label": "inputConnectionBehavior", + "type": "AppIntents.InputConnectionBehavior", + "valueKind": "Runtime" + } + ], + "type": "AppIntents.IntentParameter" + }, + "valueKind": "InitCall" + }, + { + "file": "OutputProbe.swift", + "isComputed": "true", + "isStatic": "false", + "label": "$first", + "line": 46, + "mangledTypeName": "n/a - deprecated", + "type": "AppIntents.IntentParameter", + "valueKind": "Runtime" + }, + { + "file": "OutputProbe.swift", + "isComputed": "true", + "isStatic": "false", + "label": "second", + "line": 47, + "mangledTypeName": "n/a - deprecated", + "propertyWrappers": [ + { + "arguments": [ + { + "label": "title", + "type": "Foundation.LocalizedStringResource", + "value": "Second", + "valueKind": "RawLiteral" + } + ], + "file": "OutputProbe.swift", + "line": 47, + "type": "AppIntents.IntentParameter" + } + ], + "type": "Swift.Int", + "value": { + "arguments": [ + { + "label": "title", + "type": "Foundation.LocalizedStringResource", + "value": "Second", + "valueKind": "RawLiteral" + }, + { + "label": "description", + "type": "Swift.Optional", + "valueKind": "NilLiteral" + }, + { + "label": "default", + "type": "Swift.Optional", + "valueKind": "NilLiteral" + }, + { + "label": "controlStyle", + "type": "AppIntents.IntentParameter.IntControlStyle", + "valueKind": "Runtime" + }, + { + "label": "inclusiveRange", + "type": "Swift.Optional<(lowerBound: Swift.Int, upperBound: Swift.Int)>", + "valueKind": "NilLiteral" + }, + { + "label": "requestValueDialog", + "type": "Swift.Optional", + "valueKind": "NilLiteral" + }, + { + "label": "inputConnectionBehavior", + "type": "AppIntents.InputConnectionBehavior", + "valueKind": "Runtime" + } + ], + "type": "AppIntents.IntentParameter" + }, + "valueKind": "InitCall" + }, + { + "file": "OutputProbe.swift", + "isComputed": "true", + "isStatic": "false", + "label": "$second", + "line": 47, + "mangledTypeName": "n/a - deprecated", + "type": "AppIntents.IntentParameter", + "valueKind": "Runtime" + }, + { + "file": "OutputProbe.swift", + "isComputed": "true", + "isStatic": "false", + "label": "third", + "line": 48, + "mangledTypeName": "n/a - deprecated", + "propertyWrappers": [ + { + "arguments": [ + { + "label": "title", + "type": "Foundation.LocalizedStringResource", + "value": "Third", + "valueKind": "RawLiteral" + }, + { + "label": "default", + "type": "Swift.Optional", + "value": "false", + "valueKind": "RawLiteral" + } + ], + "file": "OutputProbe.swift", + "line": 48, + "type": "AppIntents.IntentParameter" + } + ], + "type": "Swift.Bool", + "value": { + "arguments": [ + { + "label": "title", + "type": "Foundation.LocalizedStringResource", + "value": "Third", + "valueKind": "RawLiteral" + }, + { + "label": "description", + "type": "Swift.Optional", + "valueKind": "NilLiteral" + }, + { + "label": "default", + "type": "Swift.Optional", + "value": "false", + "valueKind": "RawLiteral" + }, + { + "label": "displayName", + "type": "Swift.Optional", + "valueKind": "NilLiteral" + }, + { + "label": "requestValueDialog", + "type": "Swift.Optional", + "valueKind": "NilLiteral" + }, + { + "label": "inputConnectionBehavior", + "type": "AppIntents.InputConnectionBehavior", + "valueKind": "Runtime" + } + ], + "type": "AppIntents.IntentParameter" + }, + "valueKind": "InitCall" + }, + { + "file": "OutputProbe.swift", + "isComputed": "true", + "isStatic": "false", + "label": "$third", + "line": 48, + "mangledTypeName": "n/a - deprecated", + "type": "AppIntents.IntentParameter", + "valueKind": "Runtime" + }, + { + "file": "OutputProbe.swift", + "isComputed": "true", + "isStatic": "true", + "label": "parameterSummary", + "line": 49, + "mangledTypeName": "n/a - deprecated", + "type": "some AppIntents.ParameterSummary", + "value": { + "arguments": [ + { + "label": "", + "type": "AppIntents.ParameterSummaryString", + "value": "Just text", + "valueKind": "RawLiteral" + }, + { + "label": "table", + "type": "Swift.Optional", + "valueKind": "NilLiteral" + }, + { + "label": "", + "type": "() -> Swift.Array>", + "value": { + "members": [ + { + "element": { + "value": { + "components": [ + { + "label": "$third", + "type": "AppIntents.IntentParameter" + } + ], + "path": "$third", + "rootType": "Sev.SummaryBuilderProbeIntent" + }, + "valueKind": "KeyPath" + }, + "kind": "buildExpression" + }, + { + "element": { + "value": { + "components": [ + { + "label": "$first", + "type": "AppIntents.IntentParameter" + } + ], + "path": "$first", + "rootType": "Sev.SummaryBuilderProbeIntent" + }, + "valueKind": "KeyPath" + }, + "kind": "buildExpression" + } + ], + "type": "" + }, + "valueKind": "Builder" + } + ], + "type": "AppIntents.IntentParameterSummary" + }, + "valueKind": "InitCall" + } + ], + "typeName": "Sev.SummaryBuilderProbeIntent" + } +] diff --git a/sweetpad-cli/fixtures/appintents/README.md b/sweetpad-cli/fixtures/appintents/README.md index 473b6b09..82e5562a 100644 --- a/sweetpad-cli/fixtures/appintents/README.md +++ b/sweetpad-cli/fixtures/appintents/README.md @@ -11,14 +11,17 @@ DEVELOPER_DIR=/Applications/Xcode.app/Contents/Developer python3 -I sweetpad-cli The current captures use Xcode 27.2 (`27B52`). The generator normalizes source paths to file names. -The tests normalize the generator identity and the order of resolver sets. +The tests normalize the generator identity, the order of resolver sets, +and the order of `typeSpecificMetadata` pairs, which Xcode writes in hash order. The language-model test compares decoded phrases and negative examples. It ignores native phrase order and generation timestamps. Registration covers basic intents, primitive parameters, enums, entities, queries, widget configuration, authentication policies, App Shortcuts, -and `String.IntentInputOptions` (`InputOptionsProbe.action.json` holds that probe's action only). -Assistant schemas, explicit supported modes, custom parameter options, +`String.IntentInputOptions`, output flags, and plain parameter summaries +(`*.actions.json` hold the probes' actions only). +Assistant schemas, explicit supported modes, other custom parameter options, +conditional parameter summaries, and dependency metadata currently stop extraction with an error. Localized shortcut phrase models and availability-specific metadata need more coverage. These captures establish format compatibility, not device registration or Siri behavior. diff --git a/sweetpad-cli/fixtures/appintents/regen.py b/sweetpad-cli/fixtures/appintents/regen.py index 189b903c..db49e01d 100644 --- a/sweetpad-cli/fixtures/appintents/regen.py +++ b/sweetpad-cli/fixtures/appintents/regen.py @@ -55,7 +55,7 @@ def decompress(path): def main(): parser = argparse.ArgumentParser(description=__doc__) - parser.add_argument("--only", choices=["DataApp", "Types", "Files", "InputOptionsProbe"]) + parser.add_argument("--only", choices=["DataApp", "Types", "Files", "InputOptionsProbe", "OutputProbe"]) selected = parser.parse_args().only developer = Path(os.environ.get("DEVELOPER_DIR") or capture("xcode-select", "-p")) sweetpad = HERE.parents[2] / "target/debug/sweetpad" @@ -65,7 +65,7 @@ def main(): (work / "Host.swift").write_text('import SwiftUI\n@main struct ProbeApp: App { var body: some Scene { WindowGroup { Text("Metadata") } } }\n') spec = {"name": "AppIntentsOracle", "options": {"deploymentTarget": {"iOS": "18.0"}}, "targets": {}} for source, module in [("DataApp", "DataApp"), ("Types", "MetadataProbe"), ("Files", "FileProbe"), - ("InputOptionsProbe", "InputOptionsProbe")]: + ("InputOptionsProbe", "InputOptionsProbe"), ("OutputProbe", "OutputProbe")]: spec["targets"][module] = {"type": "application", "platform": "iOS", "sources": [{"path": str(HERE / f"{source}.swift")}, {"path": "Host.swift"}], "settings": {"base": {"GENERATE_INFOPLIST_FILE": "YES", "SWIFT_VERSION": "6.0", "SWIFT_EMIT_LOC_STRINGS": "YES", @@ -76,7 +76,8 @@ def main(): for source, module, expected in [("DataApp", "DataApp", "extract.actionsdata"), ("Types", "MetadataProbe", "Types.actionsdata"), ("Files", "FileProbe", "Files.actionsdata"), - ("InputOptionsProbe", "InputOptionsProbe", "InputOptionsProbe.action.json")]: + ("InputOptionsProbe", "InputOptionsProbe", "InputOptionsProbe.actions.json"), + ("OutputProbe", "OutputProbe", "OutputProbe.actions.json")]: if selected and source != selected: continue command = [str(sweetpad), "build", "--developer-dir", str(developer), @@ -93,10 +94,10 @@ def main(): values = json.loads(constants.read_text()) normalize_paths(values) outputs[f"{source}.swiftconstvalues"] = json.dumps(values, indent=2, sort_keys=True).encode() + b"\n" - if expected.endswith(".action.json"): - # One action, compared on its own: the parameter metadata under test. + if expected.endswith(".actions.json"): + # The probe's actions only: the metadata under test. actions = json.loads((metadata / "extract.actionsdata").read_text())["actions"] - outputs[expected] = json.dumps(actions["InputOptionsProbeIntent"], indent=2, sort_keys=True).encode() + b"\n" + outputs[expected] = json.dumps(actions, indent=2, sort_keys=True).encode() + b"\n" else: outputs[expected] = (metadata / "extract.actionsdata").read_bytes() if source == "DataApp": diff --git a/sweetpad-cli/src/cli/appintents/metadata.rs b/sweetpad-cli/src/cli/appintents/metadata.rs index 6985320e..d0a818ee 100644 --- a/sweetpad-cli/src/cli/appintents/metadata.rs +++ b/sweetpad-cli/src/cli/appintents/metadata.rs @@ -1,6 +1,7 @@ //! The registration schema, checked against Xcode's constant-value captures. use serde_json::{Value, json}; +use std::fmt::Write as _; mod parameters; mod representations; @@ -214,6 +215,9 @@ fn action(value: &Value, types: &[Value]) -> Result { .unwrap() .push(parameters::parameter(parameter, types)?); } + if let Some(summary) = action_summary(value, id)? { + action["actionConfiguration"] = summary; + } for alias in array(&value["associatedTypeAliases"]) .iter() .filter(|a| a["typeAliasName"] == "PerformResult") @@ -221,8 +225,9 @@ fn action(value: &Value, types: &[Value]) -> Result { let mut flags = action["outputFlags"].as_u64().unwrap(); for requirement in array(&alias["opaqueTypeProtocolRequirements"]) { match text(requirement) { - "AppIntents.ProvidesDialog" => flags |= 2, - "AppIntents.ShowsSnippetView" => flags |= 4, + "AppIntents.OpensIntent" => flags |= 1, + "AppIntents.ShowsSnippetView" => flags |= 2, + "AppIntents.ProvidesDialog" => flags |= 4, _ => {} } } @@ -238,6 +243,65 @@ fn action(value: &Value, types: &[Value]) -> Result { Ok(action) } +/// `parameterSummary` as a plain `Summary`: constant text with parameter key paths, +/// plus the parameters its trailing builder lists. Conditional summaries +/// (`When`, `Switch`) and localization tables are not supported yet. +fn action_summary(value: &Value, id: &str) -> Result, String> { + let Some(summary) = property(value, "parameterSummary") else { + return Ok(None); + }; + let unsupported = |what: &str| format!("unsupported parameterSummary {what} in intent '{id}'"); + if summary["valueKind"] != "InitCall" + || !text(&summary["value"]["type"]).starts_with("AppIntents.IntentParameterSummary<") + { + return Err(unsupported(&format!( + "'{}'", + text(&summary["value"]["type"]) + ))); + } + let (mut string, mut inline, mut other) = (String::new(), Vec::new(), Vec::new()); + for argument in array(&summary["value"]["arguments"]) { + match (text(&argument["label"]), text(&argument["valueKind"])) { + ("", "RawLiteral") => string.push_str(text(&argument["value"])), + ("", "InterpolatedStringLiteral") => { + for segment in array(&argument["value"]["segments"]) { + if segment["valueKind"] == "RawLiteral" { + string.push_str(text(&segment["value"])); + } else { + let name = summary_parameter(segment).ok_or_else(|| unsupported("text"))?; + let _ = write!(string, "${{{name}}}"); + inline.push(name); + } + } + } + ("", "Builder") => { + for member in array(&argument["value"]["members"]) { + other.push( + summary_parameter(&member["element"]) + .filter(|_| member["kind"] == "buildExpression") + .ok_or_else(|| unsupported("parameter list"))?, + ); + } + } + ("table", "NilLiteral") => {} + (label, _) => return Err(unsupported(&format!("argument '{label}'"))), + } + } + Ok(Some(json!({"actionSummary":{"wrapper":{ + "otherParameterIdentifiers":other, + "summaryString":{"formatString":string,"parameterIdentifiers":inline}, + }}}))) +} + +/// A `\.$name` key path to one of the intent's parameters. +fn summary_parameter(value: &Value) -> Option<&str> { + let components = array(&value["value"]["components"]); + if value["valueKind"] != "KeyPath" || components.len() != 1 { + return None; + } + text(&components[0]["label"]).strip_prefix('$') +} + fn shortcuts(provider: &Value) -> Result { let value = property(provider, "appShortcuts").ok_or("an AppShortcutsProvider has no appShortcuts")?; @@ -388,20 +452,50 @@ mod tests { } } #[test] - fn string_input_options_match_xcode() { + fn probe_actions_match_xcode() { let dir = Path::new(env!("CARGO_MANIFEST_DIR")).join("fixtures/appintents"); - let types: Vec = serde_json::from_slice( - &std::fs::read(dir.join("InputOptionsProbe.swiftconstvalues")).unwrap(), - ) - .unwrap(); - let mut actual = extract(&types).unwrap()["actions"]["InputOptionsProbeIntent"].take(); - let mut expected: Value = serde_json::from_slice( - &std::fs::read(dir.join("InputOptionsProbe.action.json")).unwrap(), - ) + for probe in ["InputOptionsProbe", "OutputProbe"] { + let read = |name: String| -> Value { + serde_json::from_slice(&std::fs::read(dir.join(name)).unwrap()).unwrap() + }; + let types: Vec = + serde_json::from_value(read(format!("{probe}.swiftconstvalues"))).unwrap(); + let mut actual = extract(&types).unwrap()["actions"].take(); + let mut expected = read(format!("{probe}.actions.json")); + normalize(&mut actual); + normalize(&mut expected); + assert_eq!(actual, expected, "{probe}"); + } + } + #[test] + fn unsupported_parameter_summaries_stop_extraction() { + fn summary(types: &mut [Value]) -> &mut Value { + types + .iter_mut() + .find(|t| text(&t["typeName"]).ends_with(".SummaryTwoProbeIntent")) + .unwrap()["properties"] + .as_array_mut() + .unwrap() + .iter_mut() + .find(|p| p["label"] == "parameterSummary") + .unwrap() + } + let mut types: Vec = serde_json::from_str(include_str!( + "../../../fixtures/appintents/OutputProbe.swiftconstvalues" + )) .unwrap(); - normalize(&mut actual); - normalize(&mut expected); - assert_eq!(actual, expected); + summary(&mut types)["value"]["arguments"][1]["valueKind"] = json!("RawLiteral"); + assert!( + extract(&types) + .unwrap_err() + .contains("unsupported parameterSummary argument 'table'") + ); + summary(&mut types)["value"]["type"] = json!("AppIntents.ParameterSummaryWhenCondition"); + assert!( + extract(&types).unwrap_err().contains( + "unsupported parameterSummary 'AppIntents.ParameterSummaryWhenCondition'" + ) + ); } #[test] fn input_options_reject_what_they_cannot_encode() { From 12d9e794d0df5ceaecd8ae04f4560993c032faff Mon Sep 17 00:00:00 2001 From: Yevhenii Hyzyla Date: Sat, 28 Nov 2026 00:01:54 +0100 Subject: [PATCH 3/7] Match Xcode App Intents metadata for string collections and textless 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. --- .../appintents/InputOptionsProbe.actions.json | 326 +++- .../appintents/InputOptionsProbe.swift | 9 + .../InputOptionsProbe.swiftconstvalues | 1417 +++++++++++++---- .../appintents/OutputProbe.actions.json | 333 +++- .../fixtures/appintents/OutputProbe.swift | 31 +- .../appintents/OutputProbe.swiftconstvalues | 796 +++++++-- sweetpad-cli/fixtures/appintents/README.md | 10 +- sweetpad-cli/fixtures/appintents/regen.py | 7 +- sweetpad-cli/src/cli/appintents/metadata.rs | 46 +- .../src/cli/appintents/metadata/parameters.rs | 28 +- sweetpad-lib/ci/bundle_comparison.py | 5 + sweetpad-lib/ci/test_linux_project_checks.py | 18 + 12 files changed, 2487 insertions(+), 539 deletions(-) diff --git a/sweetpad-cli/fixtures/appintents/InputOptionsProbe.actions.json b/sweetpad-cli/fixtures/appintents/InputOptionsProbe.actions.json index 1a1190f8..df8f7359 100644 --- a/sweetpad-cli/fixtures/appintents/InputOptionsProbe.actions.json +++ b/sweetpad-cli/fixtures/appintents/InputOptionsProbe.actions.json @@ -9,14 +9,14 @@ } }, "effectiveBundleIdentifiers": [], - "fullyQualifiedTypeName": "Sev.InputOptionsProbeIntent", + "fullyQualifiedTypeName": "InputOptionsProbe.InputOptionsProbeIntent", "identifier": "InputOptionsProbeIntent", "isAuthPolExplicit": false, "isDiscoverable": true, - "mangledTypeName": "3Sev23InputOptionsProbeIntentV", + "mangledTypeName": "17InputOptionsProbe0abC6IntentV", "mangledTypeNameByBundleIdentifier": {}, "mangledTypeNameByBundleIdentifierV2": {}, - "mangledTypeNameV2": "3Sev23InputOptionsProbeIntentV", + "mangledTypeNameV2": "17InputOptionsProbe0abC6IntentV", "openAppWhenRun": false, "outputFlags": 0, "parameters": [ @@ -71,37 +71,37 @@ "key": "All off" }, "typeSpecificMetadata": [ - "LNValueTypeMetadataKeyStringSmartQuotes", + "LNValueTypeMetadataKeyStringMultiline", { "int": { "wrapper": 0 } }, - "LNValueTypeMetadataKeyStringCapitalizationType", + "LNValueTypeMetadataKeyStringSmartDashes", { "int": { "wrapper": 0 } }, - "LNValueTypeMetadataKeyStringMultiline", + "LNValueTypeMetadataKeyStringAutocorrect", { "int": { "wrapper": 0 } }, - "LNValueTypeMetadataKeyStringKeyboardType", + "LNValueTypeMetadataKeyStringSmartQuotes", { "int": { - "wrapper": 4 + "wrapper": 0 } }, - "LNValueTypeMetadataKeyStringSmartDashes", + "LNValueTypeMetadataKeyStringKeyboardType", { "int": { - "wrapper": 0 + "wrapper": 4 } }, - "LNValueTypeMetadataKeyStringAutocorrect", + "LNValueTypeMetadataKeyStringCapitalizationType", { "int": { "wrapper": 0 @@ -173,28 +173,28 @@ "wrapper": 3 } }, - "LNValueTypeMetadataKeyStringSmartQuotes", + "LNValueTypeMetadataKeyStringMultiline", { "int": { "wrapper": 1 } }, - "LNValueTypeMetadataKeyStringMultiline", + "LNValueTypeMetadataKeyStringKeyboardType", { "int": { - "wrapper": 1 + "wrapper": 0 } }, - "LNValueTypeMetadataKeyStringAutocorrect", + "LNValueTypeMetadataKeyStringSmartQuotes", { "int": { "wrapper": 1 } }, - "LNValueTypeMetadataKeyStringKeyboardType", + "LNValueTypeMetadataKeyStringAutocorrect", { "int": { - "wrapper": 0 + "wrapper": 1 } }, "LNValueTypeMetadataKeyStringSmartDashes", @@ -322,13 +322,13 @@ "key": "Punct" }, "typeSpecificMetadata": [ - "LNValueTypeMetadataKeyStringCapitalizationType", + "LNValueTypeMetadataKeyStringKeyboardType", { "int": { "wrapper": 1 } }, - "LNValueTypeMetadataKeyStringKeyboardType", + "LNValueTypeMetadataKeyStringCapitalizationType", { "int": { "wrapper": 1 @@ -426,16 +426,9 @@ { "kindValue": 0, "valueType": { - "array": { + "primitive": { "wrapper": { - "capabilities": 3, - "memberValueType": { - "primitive": { - "wrapper": { - "typeIdentifier": 2 - } - } - } + "typeIdentifier": 0 } } } @@ -445,7 +438,7 @@ "valueType": { "primitive": { "wrapper": { - "typeIdentifier": 0 + "typeIdentifier": 2 } } } @@ -453,9 +446,16 @@ { "kindValue": 0, "valueType": { - "primitive": { + "array": { "wrapper": { - "typeIdentifier": 2 + "capabilities": 3, + "memberValueType": { + "primitive": { + "wrapper": { + "typeIdentifier": 2 + } + } + } } } } @@ -492,16 +492,9 @@ { "kindValue": 0, "valueType": { - "array": { + "primitive": { "wrapper": { - "capabilities": 3, - "memberValueType": { - "primitive": { - "wrapper": { - "typeIdentifier": 2 - } - } - } + "typeIdentifier": 0 } } } @@ -511,7 +504,7 @@ "valueType": { "primitive": { "wrapper": { - "typeIdentifier": 0 + "typeIdentifier": 2 } } } @@ -519,9 +512,16 @@ { "kindValue": 0, "valueType": { - "primitive": { + "array": { "wrapper": { - "typeIdentifier": 2 + "capabilities": 3, + "memberValueType": { + "primitive": { + "wrapper": { + "typeIdentifier": 2 + } + } + } } } } @@ -558,16 +558,9 @@ { "kindValue": 0, "valueType": { - "array": { + "primitive": { "wrapper": { - "capabilities": 3, - "memberValueType": { - "primitive": { - "wrapper": { - "typeIdentifier": 2 - } - } - } + "typeIdentifier": 0 } } } @@ -577,7 +570,7 @@ "valueType": { "primitive": { "wrapper": { - "typeIdentifier": 0 + "typeIdentifier": 2 } } } @@ -585,9 +578,16 @@ { "kindValue": 0, "valueType": { - "primitive": { + "array": { "wrapper": { - "typeIdentifier": 2 + "capabilities": 3, + "memberValueType": { + "primitive": { + "wrapper": { + "typeIdentifier": 2 + } + } + } } } } @@ -624,16 +624,9 @@ { "kindValue": 0, "valueType": { - "array": { + "primitive": { "wrapper": { - "capabilities": 3, - "memberValueType": { - "primitive": { - "wrapper": { - "typeIdentifier": 2 - } - } - } + "typeIdentifier": 0 } } } @@ -643,7 +636,7 @@ "valueType": { "primitive": { "wrapper": { - "typeIdentifier": 0 + "typeIdentifier": 2 } } } @@ -651,9 +644,16 @@ { "kindValue": 0, "valueType": { - "primitive": { + "array": { "wrapper": { - "typeIdentifier": 2 + "capabilities": 3, + "memberValueType": { + "primitive": { + "wrapper": { + "typeIdentifier": 2 + } + } + } } } } @@ -806,16 +806,16 @@ "key": "Options and dialog" }, "typeSpecificMetadata": [ - "LNValueTypeMetadataKeyStringAutocorrect", + "LNValueTypeMetadataKeyStringKeyboardType", { "int": { - "wrapper": 0 + "wrapper": 3 } }, - "LNValueTypeMetadataKeyStringKeyboardType", + "LNValueTypeMetadataKeyStringAutocorrect", { "int": { - "wrapper": 3 + "wrapper": 0 } } ], @@ -878,22 +878,28 @@ "key": "Explicit defaults" }, "typeSpecificMetadata": [ - "LNValueTypeMetadataKeyStringSmartQuotes", + "LNValueTypeMetadataKeyStringMultiline", + { + "int": { + "wrapper": 0 + } + }, + "LNValueTypeMetadataKeyStringAutocorrect", { "int": { "wrapper": 1 } }, - "LNValueTypeMetadataKeyStringKeyboardType", + "LNValueTypeMetadataKeyStringSmartQuotes", { "int": { - "wrapper": 0 + "wrapper": 1 } }, - "LNValueTypeMetadataKeyStringMultiline", + "LNValueTypeMetadataKeyStringCapitalizationType", { "int": { - "wrapper": 0 + "wrapper": 2 } }, "LNValueTypeMetadataKeyStringSmartDashes", @@ -902,19 +908,183 @@ "wrapper": 1 } }, - "LNValueTypeMetadataKeyStringAutocorrect", + "LNValueTypeMetadataKeyStringKeyboardType", + { + "int": { + "wrapper": 0 + } + } + ], + "valueType": { + "primitive": { + "wrapper": { + "typeIdentifier": 0 + } + } + } + }, + { + "capabilities": 0, + "dynamicOptionsSupport": 0, + "inputConnectionBehavior": 0, + "isInput": false, + "isOptional": false, + "name": "words", + "resolvableInputTypes": [], + "title": { + "alternatives": [], + "key": "Words" + }, + "typeSpecificMetadata": [ + "LNValueTypeMetadataKeyStringMultiline", { "int": { "wrapper": 1 } }, - "LNValueTypeMetadataKeyStringCapitalizationType", + "LNValueTypeMetadataKeyStringKeyboardType", { "int": { "wrapper": 2 } } ], + "valueType": { + "array": { + "wrapper": { + "capabilities": 3, + "memberValueType": { + "primitive": { + "wrapper": { + "typeIdentifier": 0 + } + } + } + } + } + } + }, + { + "capabilities": 0, + "dynamicOptionsSupport": 0, + "inputConnectionBehavior": 0, + "isInput": false, + "isOptional": true, + "name": "optionalWords", + "resolvableInputTypes": [], + "title": { + "alternatives": [], + "key": "Optional words" + }, + "typeSpecificMetadata": [ + "LNValueTypeMetadataKeyStringAutocorrect", + { + "int": { + "wrapper": 0 + } + } + ], + "valueType": { + "array": { + "wrapper": { + "capabilities": 3, + "memberValueType": { + "primitive": { + "wrapper": { + "typeIdentifier": 0 + } + } + } + } + } + } + }, + { + "capabilities": 0, + "dynamicOptionsSupport": 0, + "inputConnectionBehavior": 0, + "isInput": false, + "isOptional": false, + "name": "distinctWords", + "resolvableInputTypes": [], + "title": { + "alternatives": [], + "key": "Distinct words" + }, + "typeSpecificMetadata": [ + "LNValueTypeMetadataKeyStringSmartQuotes", + { + "int": { + "wrapper": 1 + } + } + ], + "valueType": { + "array": { + "wrapper": { + "capabilities": 0, + "memberValueType": { + "primitive": { + "wrapper": { + "typeIdentifier": 0 + } + } + } + } + } + } + }, + { + "capabilities": 0, + "dynamicOptionsSupport": 0, + "inputConnectionBehavior": 0, + "isInput": false, + "isOptional": true, + "name": "parameterSummary", + "resolvableInputTypes": [ + { + "kindValue": 0, + "valueType": { + "primitive": { + "wrapper": { + "typeIdentifier": 0 + } + } + } + }, + { + "kindValue": 0, + "valueType": { + "primitive": { + "wrapper": { + "typeIdentifier": 2 + } + } + } + }, + { + "kindValue": 0, + "valueType": { + "array": { + "wrapper": { + "capabilities": 3, + "memberValueType": { + "primitive": { + "wrapper": { + "typeIdentifier": 2 + } + } + } + } + } + } + } + ], + "title": { + "alternatives": [], + "key": "User's summary" + }, + "typeSpecificMetadata": [], "valueType": { "primitive": { "wrapper": { diff --git a/sweetpad-cli/fixtures/appintents/InputOptionsProbe.swift b/sweetpad-cli/fixtures/appintents/InputOptionsProbe.swift index 1c804420..ad720c1b 100644 --- a/sweetpad-cli/fixtures/appintents/InputOptionsProbe.swift +++ b/sweetpad-cli/fixtures/appintents/InputOptionsProbe.swift @@ -31,6 +31,15 @@ struct InputOptionsProbeIntent: AppIntent { @Parameter(title: "Explicit defaults", inputOptions: String.IntentInputOptions(keyboardType: .asciiCapable, capitalizationType: .sentences, multiline: false, autocorrect: true, smartQuotes: true, smartDashes: true)) var explicitDefaults: String? + @Parameter(title: "Words", inputOptions: .init(keyboardType: .URL, multiline: true)) + var words: [String] + @Parameter(title: "Optional words", inputOptions: .init(autocorrect: false)) + var optionalWords: [String]? + @Parameter(title: "Distinct words", inputOptions: .init(smartQuotes: true)) + var distinctWords: Set + @Parameter(title: "User's summary", inputOptions: nil) + var parameterSummary: String? + @MainActor func perform() async throws -> some IntentResult { .result() } } diff --git a/sweetpad-cli/fixtures/appintents/InputOptionsProbe.swiftconstvalues b/sweetpad-cli/fixtures/appintents/InputOptionsProbe.swiftconstvalues index 2ead657d..b83b1349 100644 --- a/sweetpad-cli/fixtures/appintents/InputOptionsProbe.swiftconstvalues +++ b/sweetpad-cli/fixtures/appintents/InputOptionsProbe.swiftconstvalues @@ -2,23 +2,23 @@ { "allConformances": [ { - "conformanceDefiningModule": "Sev", + "conformanceDefiningModule": "InputOptionsProbe", "protocolName": "AppIntents.AppIntent" }, { - "conformanceDefiningModule": "Sev", + "conformanceDefiningModule": "InputOptionsProbe", "protocolName": "AppIntents.PersistentlyIdentifiable" }, { - "conformanceDefiningModule": "Sev", + "conformanceDefiningModule": "InputOptionsProbe", "protocolName": "AppIntents._SupportsAppDependencies" }, { - "conformanceDefiningModule": "Sev", + "conformanceDefiningModule": "InputOptionsProbe", "protocolName": "Swift.Sendable" }, { - "conformanceDefiningModule": "Sev", + "conformanceDefiningModule": "InputOptionsProbe", "protocolName": "Swift.SendableMetatype" } ], @@ -28,7 +28,7 @@ "AppIntents.IntentResult" ], "opaqueTypeSameTypeRequirements": [], - "substitutedMangledTypeName": "3Sev23InputOptionsProbeIntentV7performQryYaKFQOy_Qo_", + "substitutedMangledTypeName": "17InputOptionsProbe0abC6IntentV7performQryYaKFQOy_Qo_", "substitutedTypeName": "some AppIntents.IntentResult", "typeAliasName": "PerformResult" }, @@ -37,7 +37,7 @@ "AppIntents.ParameterSummary" ], "opaqueTypeSameTypeRequirements": [], - "substitutedMangledTypeName": "10AppIntents0A6IntentPAAE16parameterSummaryQrvpZQOy3Sev017InputOptionsProbeC0V_Qo_", + "substitutedMangledTypeName": "10AppIntents0A6IntentPAAE16parameterSummaryQrvpZQOy17InputOptionsProbe0fghC0V_Qo_", "substitutedTypeName": "some AppIntents.ParameterSummary", "typeAliasName": "SummaryContent" } @@ -52,7 +52,7 @@ "file": "InputOptionsProbe.swift", "kind": "struct", "line": 4, - "mangledTypeName": "3Sev23InputOptionsProbeIntentV", + "mangledTypeName": "17InputOptionsProbe0abC6IntentV", "properties": [ { "file": "InputOptionsProbe.swift", @@ -1082,6 +1082,301 @@ }, "valueKind": "InitCall" }, + { + "file": "InputOptionsProbe.swift", + "isComputed": "false", + "isStatic": "false", + "label": "_words", + "line": 35, + "mangledTypeName": "n/a - deprecated", + "type": "AppIntents.IntentParameter>", + "value": { + "arguments": [ + { + "label": "title", + "type": "Foundation.LocalizedStringResource", + "value": "Words", + "valueKind": "RawLiteral" + }, + { + "label": "description", + "type": "Swift.Optional", + "valueKind": "NilLiteral" + }, + { + "label": "default", + "type": "Swift.Optional>", + "valueKind": "NilLiteral" + }, + { + "label": "inputOptions", + "type": "Swift.Optional", + "value": { + "arguments": [ + { + "label": "keyboardType", + "type": "Swift.String.IntentInputOptions.KeyboardType", + "value": { + "name": "URL" + }, + "valueKind": "Enum" + }, + { + "label": "capitalizationType", + "type": "Swift.String.IntentInputOptions.CapitalizationType", + "valueKind": "Runtime" + }, + { + "label": "multiline", + "type": "Swift.Bool", + "value": "true", + "valueKind": "RawLiteral" + }, + { + "label": "autocorrect", + "type": "Swift.Bool", + "valueKind": "Runtime" + }, + { + "label": "smartQuotes", + "type": "Swift.Bool", + "valueKind": "Runtime" + }, + { + "label": "smartDashes", + "type": "Swift.Bool", + "valueKind": "Runtime" + } + ], + "type": "Swift.String.IntentInputOptions" + }, + "valueKind": "InitCall" + }, + { + "label": "requestValueDialog", + "type": "Swift.Optional", + "valueKind": "NilLiteral" + }, + { + "label": "inputConnectionBehavior", + "type": "AppIntents.InputConnectionBehavior", + "valueKind": "Runtime" + } + ], + "type": "AppIntents.IntentParameter>" + }, + "valueKind": "InitCall" + }, + { + "file": "InputOptionsProbe.swift", + "isComputed": "false", + "isStatic": "false", + "label": "_optionalWords", + "line": 37, + "mangledTypeName": "n/a - deprecated", + "type": "AppIntents.IntentParameter>>", + "value": { + "arguments": [ + { + "label": "title", + "type": "Foundation.LocalizedStringResource", + "value": "Optional words", + "valueKind": "RawLiteral" + }, + { + "label": "description", + "type": "Swift.Optional", + "valueKind": "NilLiteral" + }, + { + "label": "default", + "type": "Swift.Optional>", + "valueKind": "NilLiteral" + }, + { + "label": "inputOptions", + "type": "Swift.Optional", + "value": { + "arguments": [ + { + "label": "keyboardType", + "type": "Swift.String.IntentInputOptions.KeyboardType", + "valueKind": "Runtime" + }, + { + "label": "capitalizationType", + "type": "Swift.String.IntentInputOptions.CapitalizationType", + "valueKind": "Runtime" + }, + { + "label": "multiline", + "type": "Swift.Bool", + "valueKind": "Runtime" + }, + { + "label": "autocorrect", + "type": "Swift.Bool", + "value": "false", + "valueKind": "RawLiteral" + }, + { + "label": "smartQuotes", + "type": "Swift.Bool", + "valueKind": "Runtime" + }, + { + "label": "smartDashes", + "type": "Swift.Bool", + "valueKind": "Runtime" + } + ], + "type": "Swift.String.IntentInputOptions" + }, + "valueKind": "InitCall" + }, + { + "label": "requestValueDialog", + "type": "Swift.Optional", + "valueKind": "NilLiteral" + }, + { + "label": "inputConnectionBehavior", + "type": "AppIntents.InputConnectionBehavior", + "valueKind": "Runtime" + } + ], + "type": "AppIntents.IntentParameter>>" + }, + "valueKind": "InitCall" + }, + { + "file": "InputOptionsProbe.swift", + "isComputed": "false", + "isStatic": "false", + "label": "_distinctWords", + "line": 39, + "mangledTypeName": "n/a - deprecated", + "type": "AppIntents.IntentParameter>", + "value": { + "arguments": [ + { + "label": "title", + "type": "Foundation.LocalizedStringResource", + "value": "Distinct words", + "valueKind": "RawLiteral" + }, + { + "label": "description", + "type": "Swift.Optional", + "valueKind": "NilLiteral" + }, + { + "label": "default", + "type": "Swift.Optional>", + "valueKind": "NilLiteral" + }, + { + "label": "inputOptions", + "type": "Swift.Optional", + "value": { + "arguments": [ + { + "label": "keyboardType", + "type": "Swift.String.IntentInputOptions.KeyboardType", + "valueKind": "Runtime" + }, + { + "label": "capitalizationType", + "type": "Swift.String.IntentInputOptions.CapitalizationType", + "valueKind": "Runtime" + }, + { + "label": "multiline", + "type": "Swift.Bool", + "valueKind": "Runtime" + }, + { + "label": "autocorrect", + "type": "Swift.Bool", + "valueKind": "Runtime" + }, + { + "label": "smartQuotes", + "type": "Swift.Bool", + "value": "true", + "valueKind": "RawLiteral" + }, + { + "label": "smartDashes", + "type": "Swift.Bool", + "valueKind": "Runtime" + } + ], + "type": "Swift.String.IntentInputOptions" + }, + "valueKind": "InitCall" + }, + { + "label": "requestValueDialog", + "type": "Swift.Optional", + "valueKind": "NilLiteral" + }, + { + "label": "inputConnectionBehavior", + "type": "AppIntents.InputConnectionBehavior", + "valueKind": "Runtime" + } + ], + "type": "AppIntents.IntentParameter>" + }, + "valueKind": "InitCall" + }, + { + "file": "InputOptionsProbe.swift", + "isComputed": "false", + "isStatic": "false", + "label": "_parameterSummary", + "line": 41, + "mangledTypeName": "n/a - deprecated", + "type": "AppIntents.IntentParameter>", + "value": { + "arguments": [ + { + "label": "title", + "type": "Foundation.LocalizedStringResource", + "value": "User's summary", + "valueKind": "RawLiteral" + }, + { + "label": "description", + "type": "Swift.Optional", + "valueKind": "NilLiteral" + }, + { + "label": "default", + "type": "Swift.Optional", + "valueKind": "NilLiteral" + }, + { + "label": "inputOptions", + "type": "Swift.Optional", + "valueKind": "NilLiteral" + }, + { + "label": "requestValueDialog", + "type": "Swift.Optional", + "valueKind": "NilLiteral" + }, + { + "label": "inputConnectionBehavior", + "type": "AppIntents.InputConnectionBehavior", + "valueKind": "Runtime" + } + ], + "type": "AppIntents.IntentParameter>" + }, + "valueKind": "InitCall" + }, { "file": "InputOptionsProbe.swift", "isComputed": "false", @@ -1089,27 +1384,505 @@ "label": "title", "line": 5, "mangledTypeName": "n/a - deprecated", - "type": "Foundation.LocalizedStringResource", - "value": "Input options probe", - "valueKind": "RawLiteral" + "type": "Foundation.LocalizedStringResource", + "value": "Input options probe", + "valueKind": "RawLiteral" + }, + { + "file": "InputOptionsProbe.swift", + "isComputed": "false", + "isStatic": "true", + "label": "openAppWhenRun", + "line": 6, + "mangledTypeName": "n/a - deprecated", + "type": "Swift.Bool", + "value": "false", + "valueKind": "RawLiteral" + }, + { + "file": "InputOptionsProbe.swift", + "isComputed": "true", + "isStatic": "false", + "label": "allOff", + "line": 9, + "mangledTypeName": "n/a - deprecated", + "propertyWrappers": [ + { + "arguments": [ + { + "label": "title", + "type": "Foundation.LocalizedStringResource", + "value": "All off", + "valueKind": "RawLiteral" + }, + { + "label": "inputOptions", + "type": "Swift.Optional", + "value": { + "arguments": [ + { + "label": "keyboardType", + "type": "Swift.String.IntentInputOptions.KeyboardType", + "value": { + "name": "default" + }, + "valueKind": "Enum" + }, + { + "label": "capitalizationType", + "type": "Swift.String.IntentInputOptions.CapitalizationType", + "value": { + "name": "none" + }, + "valueKind": "Enum" + }, + { + "label": "multiline", + "type": "Swift.Bool", + "value": "false", + "valueKind": "RawLiteral" + }, + { + "label": "autocorrect", + "type": "Swift.Bool", + "value": "false", + "valueKind": "RawLiteral" + }, + { + "label": "smartQuotes", + "type": "Swift.Bool", + "value": "false", + "valueKind": "RawLiteral" + }, + { + "label": "smartDashes", + "type": "Swift.Bool", + "value": "false", + "valueKind": "RawLiteral" + } + ], + "type": "Swift.String.IntentInputOptions" + }, + "valueKind": "InitCall" + } + ], + "file": "InputOptionsProbe.swift", + "line": 8, + "type": "AppIntents.IntentParameter" + } + ], + "type": "Swift.Optional", + "value": { + "arguments": [ + { + "label": "title", + "type": "Foundation.LocalizedStringResource", + "value": "All off", + "valueKind": "RawLiteral" + }, + { + "label": "description", + "type": "Swift.Optional", + "valueKind": "NilLiteral" + }, + { + "label": "default", + "type": "Swift.Optional", + "valueKind": "NilLiteral" + }, + { + "label": "inputOptions", + "type": "Swift.Optional", + "value": { + "arguments": [ + { + "label": "keyboardType", + "type": "Swift.String.IntentInputOptions.KeyboardType", + "value": { + "name": "default" + }, + "valueKind": "Enum" + }, + { + "label": "capitalizationType", + "type": "Swift.String.IntentInputOptions.CapitalizationType", + "value": { + "name": "none" + }, + "valueKind": "Enum" + }, + { + "label": "multiline", + "type": "Swift.Bool", + "value": "false", + "valueKind": "RawLiteral" + }, + { + "label": "autocorrect", + "type": "Swift.Bool", + "value": "false", + "valueKind": "RawLiteral" + }, + { + "label": "smartQuotes", + "type": "Swift.Bool", + "value": "false", + "valueKind": "RawLiteral" + }, + { + "label": "smartDashes", + "type": "Swift.Bool", + "value": "false", + "valueKind": "RawLiteral" + } + ], + "type": "Swift.String.IntentInputOptions" + }, + "valueKind": "InitCall" + }, + { + "label": "requestValueDialog", + "type": "Swift.Optional", + "valueKind": "NilLiteral" + }, + { + "label": "inputConnectionBehavior", + "type": "AppIntents.InputConnectionBehavior", + "valueKind": "Runtime" + } + ], + "type": "AppIntents.IntentParameter>" + }, + "valueKind": "InitCall" + }, + { + "file": "InputOptionsProbe.swift", + "isComputed": "true", + "isStatic": "false", + "label": "$allOff", + "line": 9, + "mangledTypeName": "n/a - deprecated", + "type": "AppIntents.IntentParameter>", + "valueKind": "Runtime" + }, + { + "file": "InputOptionsProbe.swift", + "isComputed": "true", + "isStatic": "false", + "label": "allOn", + "line": 11, + "mangledTypeName": "n/a - deprecated", + "propertyWrappers": [ + { + "arguments": [ + { + "label": "title", + "type": "Foundation.LocalizedStringResource", + "value": "All on", + "valueKind": "RawLiteral" + }, + { + "label": "inputOptions", + "type": "Swift.Optional", + "value": { + "arguments": [ + { + "label": "keyboardType", + "type": "Swift.String.IntentInputOptions.KeyboardType", + "value": { + "name": "asciiCapable" + }, + "valueKind": "Enum" + }, + { + "label": "capitalizationType", + "type": "Swift.String.IntentInputOptions.CapitalizationType", + "value": { + "name": "allCharacters" + }, + "valueKind": "Enum" + }, + { + "label": "multiline", + "type": "Swift.Bool", + "value": "true", + "valueKind": "RawLiteral" + }, + { + "label": "autocorrect", + "type": "Swift.Bool", + "value": "true", + "valueKind": "RawLiteral" + }, + { + "label": "smartQuotes", + "type": "Swift.Bool", + "value": "true", + "valueKind": "RawLiteral" + }, + { + "label": "smartDashes", + "type": "Swift.Bool", + "value": "true", + "valueKind": "RawLiteral" + } + ], + "type": "Swift.String.IntentInputOptions" + }, + "valueKind": "InitCall" + } + ], + "file": "InputOptionsProbe.swift", + "line": 10, + "type": "AppIntents.IntentParameter" + } + ], + "type": "Swift.Optional", + "value": { + "arguments": [ + { + "label": "title", + "type": "Foundation.LocalizedStringResource", + "value": "All on", + "valueKind": "RawLiteral" + }, + { + "label": "description", + "type": "Swift.Optional", + "valueKind": "NilLiteral" + }, + { + "label": "default", + "type": "Swift.Optional", + "valueKind": "NilLiteral" + }, + { + "label": "inputOptions", + "type": "Swift.Optional", + "value": { + "arguments": [ + { + "label": "keyboardType", + "type": "Swift.String.IntentInputOptions.KeyboardType", + "value": { + "name": "asciiCapable" + }, + "valueKind": "Enum" + }, + { + "label": "capitalizationType", + "type": "Swift.String.IntentInputOptions.CapitalizationType", + "value": { + "name": "allCharacters" + }, + "valueKind": "Enum" + }, + { + "label": "multiline", + "type": "Swift.Bool", + "value": "true", + "valueKind": "RawLiteral" + }, + { + "label": "autocorrect", + "type": "Swift.Bool", + "value": "true", + "valueKind": "RawLiteral" + }, + { + "label": "smartQuotes", + "type": "Swift.Bool", + "value": "true", + "valueKind": "RawLiteral" + }, + { + "label": "smartDashes", + "type": "Swift.Bool", + "value": "true", + "valueKind": "RawLiteral" + } + ], + "type": "Swift.String.IntentInputOptions" + }, + "valueKind": "InitCall" + }, + { + "label": "requestValueDialog", + "type": "Swift.Optional", + "valueKind": "NilLiteral" + }, + { + "label": "inputConnectionBehavior", + "type": "AppIntents.InputConnectionBehavior", + "valueKind": "Runtime" + } + ], + "type": "AppIntents.IntentParameter>" + }, + "valueKind": "InitCall" + }, + { + "file": "InputOptionsProbe.swift", + "isComputed": "true", + "isStatic": "false", + "label": "$allOn", + "line": 11, + "mangledTypeName": "n/a - deprecated", + "type": "AppIntents.IntentParameter>", + "valueKind": "Runtime" }, { "file": "InputOptionsProbe.swift", - "isComputed": "false", - "isStatic": "true", - "label": "openAppWhenRun", - "line": 6, + "isComputed": "true", + "isStatic": "false", + "label": "empty", + "line": 13, "mangledTypeName": "n/a - deprecated", - "type": "Swift.Bool", - "value": "false", - "valueKind": "RawLiteral" + "propertyWrappers": [ + { + "arguments": [ + { + "label": "title", + "type": "Foundation.LocalizedStringResource", + "value": "Empty", + "valueKind": "RawLiteral" + }, + { + "label": "inputOptions", + "type": "Swift.Optional", + "value": { + "arguments": [ + { + "label": "keyboardType", + "type": "Swift.String.IntentInputOptions.KeyboardType", + "valueKind": "Runtime" + }, + { + "label": "capitalizationType", + "type": "Swift.String.IntentInputOptions.CapitalizationType", + "valueKind": "Runtime" + }, + { + "label": "multiline", + "type": "Swift.Bool", + "valueKind": "Runtime" + }, + { + "label": "autocorrect", + "type": "Swift.Bool", + "valueKind": "Runtime" + }, + { + "label": "smartQuotes", + "type": "Swift.Bool", + "valueKind": "Runtime" + }, + { + "label": "smartDashes", + "type": "Swift.Bool", + "valueKind": "Runtime" + } + ], + "type": "Swift.String.IntentInputOptions" + }, + "valueKind": "InitCall" + } + ], + "file": "InputOptionsProbe.swift", + "line": 12, + "type": "AppIntents.IntentParameter" + } + ], + "type": "Swift.Optional", + "value": { + "arguments": [ + { + "label": "title", + "type": "Foundation.LocalizedStringResource", + "value": "Empty", + "valueKind": "RawLiteral" + }, + { + "label": "description", + "type": "Swift.Optional", + "valueKind": "NilLiteral" + }, + { + "label": "default", + "type": "Swift.Optional", + "valueKind": "NilLiteral" + }, + { + "label": "inputOptions", + "type": "Swift.Optional", + "value": { + "arguments": [ + { + "label": "keyboardType", + "type": "Swift.String.IntentInputOptions.KeyboardType", + "valueKind": "Runtime" + }, + { + "label": "capitalizationType", + "type": "Swift.String.IntentInputOptions.CapitalizationType", + "valueKind": "Runtime" + }, + { + "label": "multiline", + "type": "Swift.Bool", + "valueKind": "Runtime" + }, + { + "label": "autocorrect", + "type": "Swift.Bool", + "valueKind": "Runtime" + }, + { + "label": "smartQuotes", + "type": "Swift.Bool", + "valueKind": "Runtime" + }, + { + "label": "smartDashes", + "type": "Swift.Bool", + "valueKind": "Runtime" + } + ], + "type": "Swift.String.IntentInputOptions" + }, + "valueKind": "InitCall" + }, + { + "label": "requestValueDialog", + "type": "Swift.Optional", + "valueKind": "NilLiteral" + }, + { + "label": "inputConnectionBehavior", + "type": "AppIntents.InputConnectionBehavior", + "valueKind": "Runtime" + } + ], + "type": "AppIntents.IntentParameter>" + }, + "valueKind": "InitCall" }, { "file": "InputOptionsProbe.swift", "isComputed": "true", "isStatic": "false", - "label": "allOff", - "line": 9, + "label": "$empty", + "line": 13, + "mangledTypeName": "n/a - deprecated", + "type": "AppIntents.IntentParameter>", + "valueKind": "Runtime" + }, + { + "file": "InputOptionsProbe.swift", + "isComputed": "true", + "isStatic": "false", + "label": "punct", + "line": 15, "mangledTypeName": "n/a - deprecated", "propertyWrappers": [ { @@ -1117,7 +1890,7 @@ { "label": "title", "type": "Foundation.LocalizedStringResource", - "value": "All off", + "value": "Punct", "valueKind": "RawLiteral" }, { @@ -1129,7 +1902,7 @@ "label": "keyboardType", "type": "Swift.String.IntentInputOptions.KeyboardType", "value": { - "name": "default" + "name": "numbersAndPunctuation" }, "valueKind": "Enum" }, @@ -1137,33 +1910,29 @@ "label": "capitalizationType", "type": "Swift.String.IntentInputOptions.CapitalizationType", "value": { - "name": "none" + "name": "words" }, "valueKind": "Enum" }, { "label": "multiline", "type": "Swift.Bool", - "value": "false", - "valueKind": "RawLiteral" + "valueKind": "Runtime" }, { "label": "autocorrect", "type": "Swift.Bool", - "value": "false", - "valueKind": "RawLiteral" + "valueKind": "Runtime" }, { "label": "smartQuotes", "type": "Swift.Bool", - "value": "false", - "valueKind": "RawLiteral" + "valueKind": "Runtime" }, { "label": "smartDashes", "type": "Swift.Bool", - "value": "false", - "valueKind": "RawLiteral" + "valueKind": "Runtime" } ], "type": "Swift.String.IntentInputOptions" @@ -1172,7 +1941,7 @@ } ], "file": "InputOptionsProbe.swift", - "line": 8, + "line": 14, "type": "AppIntents.IntentParameter" } ], @@ -1182,7 +1951,7 @@ { "label": "title", "type": "Foundation.LocalizedStringResource", - "value": "All off", + "value": "Punct", "valueKind": "RawLiteral" }, { @@ -1204,7 +1973,7 @@ "label": "keyboardType", "type": "Swift.String.IntentInputOptions.KeyboardType", "value": { - "name": "default" + "name": "numbersAndPunctuation" }, "valueKind": "Enum" }, @@ -1212,33 +1981,29 @@ "label": "capitalizationType", "type": "Swift.String.IntentInputOptions.CapitalizationType", "value": { - "name": "none" + "name": "words" }, "valueKind": "Enum" }, { "label": "multiline", "type": "Swift.Bool", - "value": "false", - "valueKind": "RawLiteral" + "valueKind": "Runtime" }, { "label": "autocorrect", "type": "Swift.Bool", - "value": "false", - "valueKind": "RawLiteral" + "valueKind": "Runtime" }, { "label": "smartQuotes", "type": "Swift.Bool", - "value": "false", - "valueKind": "RawLiteral" + "valueKind": "Runtime" }, { "label": "smartDashes", "type": "Swift.Bool", - "value": "false", - "valueKind": "RawLiteral" + "valueKind": "Runtime" } ], "type": "Swift.String.IntentInputOptions" @@ -1264,8 +2029,8 @@ "file": "InputOptionsProbe.swift", "isComputed": "true", "isStatic": "false", - "label": "$allOff", - "line": 9, + "label": "$punct", + "line": 15, "mangledTypeName": "n/a - deprecated", "type": "AppIntents.IntentParameter>", "valueKind": "Runtime" @@ -1274,8 +2039,8 @@ "file": "InputOptionsProbe.swift", "isComputed": "true", "isStatic": "false", - "label": "allOn", - "line": 11, + "label": "url", + "line": 17, "mangledTypeName": "n/a - deprecated", "propertyWrappers": [ { @@ -1283,7 +2048,7 @@ { "label": "title", "type": "Foundation.LocalizedStringResource", - "value": "All on", + "value": "URL", "valueKind": "RawLiteral" }, { @@ -1295,7 +2060,7 @@ "label": "keyboardType", "type": "Swift.String.IntentInputOptions.KeyboardType", "value": { - "name": "asciiCapable" + "name": "URL" }, "valueKind": "Enum" }, @@ -1303,33 +2068,29 @@ "label": "capitalizationType", "type": "Swift.String.IntentInputOptions.CapitalizationType", "value": { - "name": "allCharacters" + "name": "sentences" }, "valueKind": "Enum" }, { "label": "multiline", "type": "Swift.Bool", - "value": "true", - "valueKind": "RawLiteral" + "valueKind": "Runtime" }, { "label": "autocorrect", "type": "Swift.Bool", - "value": "true", - "valueKind": "RawLiteral" + "valueKind": "Runtime" }, { "label": "smartQuotes", "type": "Swift.Bool", - "value": "true", - "valueKind": "RawLiteral" + "valueKind": "Runtime" }, { "label": "smartDashes", "type": "Swift.Bool", - "value": "true", - "valueKind": "RawLiteral" + "valueKind": "Runtime" } ], "type": "Swift.String.IntentInputOptions" @@ -1338,7 +2099,7 @@ } ], "file": "InputOptionsProbe.swift", - "line": 10, + "line": 16, "type": "AppIntents.IntentParameter" } ], @@ -1348,7 +2109,7 @@ { "label": "title", "type": "Foundation.LocalizedStringResource", - "value": "All on", + "value": "URL", "valueKind": "RawLiteral" }, { @@ -1370,7 +2131,7 @@ "label": "keyboardType", "type": "Swift.String.IntentInputOptions.KeyboardType", "value": { - "name": "asciiCapable" + "name": "URL" }, "valueKind": "Enum" }, @@ -1378,33 +2139,29 @@ "label": "capitalizationType", "type": "Swift.String.IntentInputOptions.CapitalizationType", "value": { - "name": "allCharacters" + "name": "sentences" }, "valueKind": "Enum" }, { "label": "multiline", "type": "Swift.Bool", - "value": "true", - "valueKind": "RawLiteral" + "valueKind": "Runtime" }, { "label": "autocorrect", "type": "Swift.Bool", - "value": "true", - "valueKind": "RawLiteral" + "valueKind": "Runtime" }, { "label": "smartQuotes", "type": "Swift.Bool", - "value": "true", - "valueKind": "RawLiteral" + "valueKind": "Runtime" }, { "label": "smartDashes", "type": "Swift.Bool", - "value": "true", - "valueKind": "RawLiteral" + "valueKind": "Runtime" } ], "type": "Swift.String.IntentInputOptions" @@ -1430,8 +2187,8 @@ "file": "InputOptionsProbe.swift", "isComputed": "true", "isStatic": "false", - "label": "$allOn", - "line": 11, + "label": "$url", + "line": 17, "mangledTypeName": "n/a - deprecated", "type": "AppIntents.IntentParameter>", "valueKind": "Runtime" @@ -1440,8 +2197,8 @@ "file": "InputOptionsProbe.swift", "isComputed": "true", "isStatic": "false", - "label": "empty", - "line": 13, + "label": "numberPad", + "line": 19, "mangledTypeName": "n/a - deprecated", "propertyWrappers": [ { @@ -1449,7 +2206,7 @@ { "label": "title", "type": "Foundation.LocalizedStringResource", - "value": "Empty", + "value": "Number pad", "valueKind": "RawLiteral" }, { @@ -1460,7 +2217,10 @@ { "label": "keyboardType", "type": "Swift.String.IntentInputOptions.KeyboardType", - "valueKind": "Runtime" + "value": { + "name": "numberPad" + }, + "valueKind": "Enum" }, { "label": "capitalizationType", @@ -1494,7 +2254,7 @@ } ], "file": "InputOptionsProbe.swift", - "line": 12, + "line": 18, "type": "AppIntents.IntentParameter" } ], @@ -1504,7 +2264,7 @@ { "label": "title", "type": "Foundation.LocalizedStringResource", - "value": "Empty", + "value": "Number pad", "valueKind": "RawLiteral" }, { @@ -1525,7 +2285,10 @@ { "label": "keyboardType", "type": "Swift.String.IntentInputOptions.KeyboardType", - "valueKind": "Runtime" + "value": { + "name": "numberPad" + }, + "valueKind": "Enum" }, { "label": "capitalizationType", @@ -1576,8 +2339,8 @@ "file": "InputOptionsProbe.swift", "isComputed": "true", "isStatic": "false", - "label": "$empty", - "line": 13, + "label": "$numberPad", + "line": 19, "mangledTypeName": "n/a - deprecated", "type": "AppIntents.IntentParameter>", "valueKind": "Runtime" @@ -1586,8 +2349,8 @@ "file": "InputOptionsProbe.swift", "isComputed": "true", "isStatic": "false", - "label": "punct", - "line": 15, + "label": "quotes", + "line": 21, "mangledTypeName": "n/a - deprecated", "propertyWrappers": [ { @@ -1595,7 +2358,7 @@ { "label": "title", "type": "Foundation.LocalizedStringResource", - "value": "Punct", + "value": "Smart quotes only", "valueKind": "RawLiteral" }, { @@ -1606,18 +2369,12 @@ { "label": "keyboardType", "type": "Swift.String.IntentInputOptions.KeyboardType", - "value": { - "name": "numbersAndPunctuation" - }, - "valueKind": "Enum" + "valueKind": "Runtime" }, { "label": "capitalizationType", "type": "Swift.String.IntentInputOptions.CapitalizationType", - "value": { - "name": "words" - }, - "valueKind": "Enum" + "valueKind": "Runtime" }, { "label": "multiline", @@ -1632,7 +2389,8 @@ { "label": "smartQuotes", "type": "Swift.Bool", - "valueKind": "Runtime" + "value": "false", + "valueKind": "RawLiteral" }, { "label": "smartDashes", @@ -1646,7 +2404,7 @@ } ], "file": "InputOptionsProbe.swift", - "line": 14, + "line": 20, "type": "AppIntents.IntentParameter" } ], @@ -1656,7 +2414,7 @@ { "label": "title", "type": "Foundation.LocalizedStringResource", - "value": "Punct", + "value": "Smart quotes only", "valueKind": "RawLiteral" }, { @@ -1677,18 +2435,12 @@ { "label": "keyboardType", "type": "Swift.String.IntentInputOptions.KeyboardType", - "value": { - "name": "numbersAndPunctuation" - }, - "valueKind": "Enum" + "valueKind": "Runtime" }, { "label": "capitalizationType", "type": "Swift.String.IntentInputOptions.CapitalizationType", - "value": { - "name": "words" - }, - "valueKind": "Enum" + "valueKind": "Runtime" }, { "label": "multiline", @@ -1703,7 +2455,8 @@ { "label": "smartQuotes", "type": "Swift.Bool", - "valueKind": "Runtime" + "value": "false", + "valueKind": "RawLiteral" }, { "label": "smartDashes", @@ -1734,8 +2487,8 @@ "file": "InputOptionsProbe.swift", "isComputed": "true", "isStatic": "false", - "label": "$punct", - "line": 15, + "label": "$quotes", + "line": 21, "mangledTypeName": "n/a - deprecated", "type": "AppIntents.IntentParameter>", "valueKind": "Runtime" @@ -1744,8 +2497,8 @@ "file": "InputOptionsProbe.swift", "isComputed": "true", "isStatic": "false", - "label": "url", - "line": 17, + "label": "dashes", + "line": 23, "mangledTypeName": "n/a - deprecated", "propertyWrappers": [ { @@ -1753,7 +2506,7 @@ { "label": "title", "type": "Foundation.LocalizedStringResource", - "value": "URL", + "value": "Smart dashes only", "valueKind": "RawLiteral" }, { @@ -1764,18 +2517,12 @@ { "label": "keyboardType", "type": "Swift.String.IntentInputOptions.KeyboardType", - "value": { - "name": "URL" - }, - "valueKind": "Enum" + "valueKind": "Runtime" }, { "label": "capitalizationType", "type": "Swift.String.IntentInputOptions.CapitalizationType", - "value": { - "name": "sentences" - }, - "valueKind": "Enum" + "valueKind": "Runtime" }, { "label": "multiline", @@ -1795,7 +2542,8 @@ { "label": "smartDashes", "type": "Swift.Bool", - "valueKind": "Runtime" + "value": "false", + "valueKind": "RawLiteral" } ], "type": "Swift.String.IntentInputOptions" @@ -1804,7 +2552,7 @@ } ], "file": "InputOptionsProbe.swift", - "line": 16, + "line": 22, "type": "AppIntents.IntentParameter" } ], @@ -1814,7 +2562,7 @@ { "label": "title", "type": "Foundation.LocalizedStringResource", - "value": "URL", + "value": "Smart dashes only", "valueKind": "RawLiteral" }, { @@ -1835,18 +2583,12 @@ { "label": "keyboardType", "type": "Swift.String.IntentInputOptions.KeyboardType", - "value": { - "name": "URL" - }, - "valueKind": "Enum" + "valueKind": "Runtime" }, { "label": "capitalizationType", "type": "Swift.String.IntentInputOptions.CapitalizationType", - "value": { - "name": "sentences" - }, - "valueKind": "Enum" + "valueKind": "Runtime" }, { "label": "multiline", @@ -1866,7 +2608,8 @@ { "label": "smartDashes", "type": "Swift.Bool", - "valueKind": "Runtime" + "value": "false", + "valueKind": "RawLiteral" } ], "type": "Swift.String.IntentInputOptions" @@ -1892,8 +2635,8 @@ "file": "InputOptionsProbe.swift", "isComputed": "true", "isStatic": "false", - "label": "$url", - "line": 17, + "label": "$dashes", + "line": 23, "mangledTypeName": "n/a - deprecated", "type": "AppIntents.IntentParameter>", "valueKind": "Runtime" @@ -1902,8 +2645,8 @@ "file": "InputOptionsProbe.swift", "isComputed": "true", "isStatic": "false", - "label": "numberPad", - "line": 19, + "label": "autocorrect", + "line": 25, "mangledTypeName": "n/a - deprecated", "propertyWrappers": [ { @@ -1911,7 +2654,7 @@ { "label": "title", "type": "Foundation.LocalizedStringResource", - "value": "Number pad", + "value": "Autocorrect only", "valueKind": "RawLiteral" }, { @@ -1922,10 +2665,7 @@ { "label": "keyboardType", "type": "Swift.String.IntentInputOptions.KeyboardType", - "value": { - "name": "numberPad" - }, - "valueKind": "Enum" + "valueKind": "Runtime" }, { "label": "capitalizationType", @@ -1940,7 +2680,8 @@ { "label": "autocorrect", "type": "Swift.Bool", - "valueKind": "Runtime" + "value": "false", + "valueKind": "RawLiteral" }, { "label": "smartQuotes", @@ -1959,7 +2700,7 @@ } ], "file": "InputOptionsProbe.swift", - "line": 18, + "line": 24, "type": "AppIntents.IntentParameter" } ], @@ -1969,7 +2710,7 @@ { "label": "title", "type": "Foundation.LocalizedStringResource", - "value": "Number pad", + "value": "Autocorrect only", "valueKind": "RawLiteral" }, { @@ -1990,10 +2731,7 @@ { "label": "keyboardType", "type": "Swift.String.IntentInputOptions.KeyboardType", - "value": { - "name": "numberPad" - }, - "valueKind": "Enum" + "valueKind": "Runtime" }, { "label": "capitalizationType", @@ -2008,7 +2746,8 @@ { "label": "autocorrect", "type": "Swift.Bool", - "valueKind": "Runtime" + "value": "false", + "valueKind": "RawLiteral" }, { "label": "smartQuotes", @@ -2044,8 +2783,8 @@ "file": "InputOptionsProbe.swift", "isComputed": "true", "isStatic": "false", - "label": "$numberPad", - "line": 19, + "label": "$autocorrect", + "line": 25, "mangledTypeName": "n/a - deprecated", "type": "AppIntents.IntentParameter>", "valueKind": "Runtime" @@ -2054,8 +2793,8 @@ "file": "InputOptionsProbe.swift", "isComputed": "true", "isStatic": "false", - "label": "quotes", - "line": 21, + "label": "withDefault", + "line": 27, "mangledTypeName": "n/a - deprecated", "propertyWrappers": [ { @@ -2063,7 +2802,13 @@ { "label": "title", "type": "Foundation.LocalizedStringResource", - "value": "Smart quotes only", + "value": "With default", + "valueKind": "RawLiteral" + }, + { + "label": "default", + "type": "Swift.Optional", + "value": "hi", "valueKind": "RawLiteral" }, { @@ -2084,7 +2829,8 @@ { "label": "multiline", "type": "Swift.Bool", - "valueKind": "Runtime" + "value": "true", + "valueKind": "RawLiteral" }, { "label": "autocorrect", @@ -2094,8 +2840,7 @@ { "label": "smartQuotes", "type": "Swift.Bool", - "value": "false", - "valueKind": "RawLiteral" + "valueKind": "Runtime" }, { "label": "smartDashes", @@ -2109,17 +2854,17 @@ } ], "file": "InputOptionsProbe.swift", - "line": 20, + "line": 26, "type": "AppIntents.IntentParameter" } ], - "type": "Swift.Optional", + "type": "Swift.String", "value": { "arguments": [ { "label": "title", "type": "Foundation.LocalizedStringResource", - "value": "Smart quotes only", + "value": "With default", "valueKind": "RawLiteral" }, { @@ -2130,7 +2875,8 @@ { "label": "default", "type": "Swift.Optional", - "valueKind": "NilLiteral" + "value": "hi", + "valueKind": "RawLiteral" }, { "label": "inputOptions", @@ -2150,7 +2896,8 @@ { "label": "multiline", "type": "Swift.Bool", - "valueKind": "Runtime" + "value": "true", + "valueKind": "RawLiteral" }, { "label": "autocorrect", @@ -2160,8 +2907,7 @@ { "label": "smartQuotes", "type": "Swift.Bool", - "value": "false", - "valueKind": "RawLiteral" + "valueKind": "Runtime" }, { "label": "smartDashes", @@ -2184,7 +2930,7 @@ "valueKind": "Runtime" } ], - "type": "AppIntents.IntentParameter>" + "type": "AppIntents.IntentParameter" }, "valueKind": "InitCall" }, @@ -2192,18 +2938,18 @@ "file": "InputOptionsProbe.swift", "isComputed": "true", "isStatic": "false", - "label": "$quotes", - "line": 21, + "label": "$withDefault", + "line": 27, "mangledTypeName": "n/a - deprecated", - "type": "AppIntents.IntentParameter>", + "type": "AppIntents.IntentParameter", "valueKind": "Runtime" }, { "file": "InputOptionsProbe.swift", "isComputed": "true", "isStatic": "false", - "label": "dashes", - "line": 23, + "label": "dialog", + "line": 29, "mangledTypeName": "n/a - deprecated", "propertyWrappers": [ { @@ -2211,7 +2957,13 @@ { "label": "title", "type": "Foundation.LocalizedStringResource", - "value": "Smart dashes only", + "value": "Options and dialog", + "valueKind": "RawLiteral" + }, + { + "label": "description", + "type": "Swift.Optional", + "value": "Described", "valueKind": "RawLiteral" }, { @@ -2222,7 +2974,10 @@ { "label": "keyboardType", "type": "Swift.String.IntentInputOptions.KeyboardType", - "valueKind": "Runtime" + "value": { + "name": "numberPad" + }, + "valueKind": "Enum" }, { "label": "capitalizationType", @@ -2237,7 +2992,8 @@ { "label": "autocorrect", "type": "Swift.Bool", - "valueKind": "Runtime" + "value": "false", + "valueKind": "RawLiteral" }, { "label": "smartQuotes", @@ -2247,33 +3003,39 @@ { "label": "smartDashes", "type": "Swift.Bool", - "value": "false", - "valueKind": "RawLiteral" + "valueKind": "Runtime" } ], "type": "Swift.String.IntentInputOptions" }, "valueKind": "InitCall" + }, + { + "label": "requestValueDialog", + "type": "Swift.Optional", + "value": "Which?", + "valueKind": "RawLiteral" } ], "file": "InputOptionsProbe.swift", - "line": 22, + "line": 28, "type": "AppIntents.IntentParameter" } ], - "type": "Swift.Optional", + "type": "Swift.String", "value": { "arguments": [ { "label": "title", "type": "Foundation.LocalizedStringResource", - "value": "Smart dashes only", + "value": "Options and dialog", "valueKind": "RawLiteral" }, { "label": "description", "type": "Swift.Optional", - "valueKind": "NilLiteral" + "value": "Described", + "valueKind": "RawLiteral" }, { "label": "default", @@ -2288,7 +3050,10 @@ { "label": "keyboardType", "type": "Swift.String.IntentInputOptions.KeyboardType", - "valueKind": "Runtime" + "value": { + "name": "numberPad" + }, + "valueKind": "Enum" }, { "label": "capitalizationType", @@ -2303,7 +3068,8 @@ { "label": "autocorrect", "type": "Swift.Bool", - "valueKind": "Runtime" + "value": "false", + "valueKind": "RawLiteral" }, { "label": "smartQuotes", @@ -2313,8 +3079,7 @@ { "label": "smartDashes", "type": "Swift.Bool", - "value": "false", - "valueKind": "RawLiteral" + "valueKind": "Runtime" } ], "type": "Swift.String.IntentInputOptions" @@ -2324,7 +3089,8 @@ { "label": "requestValueDialog", "type": "Swift.Optional", - "valueKind": "NilLiteral" + "value": "Which?", + "valueKind": "RawLiteral" }, { "label": "inputConnectionBehavior", @@ -2332,7 +3098,7 @@ "valueKind": "Runtime" } ], - "type": "AppIntents.IntentParameter>" + "type": "AppIntents.IntentParameter" }, "valueKind": "InitCall" }, @@ -2340,18 +3106,18 @@ "file": "InputOptionsProbe.swift", "isComputed": "true", "isStatic": "false", - "label": "$dashes", - "line": 23, + "label": "$dialog", + "line": 29, "mangledTypeName": "n/a - deprecated", - "type": "AppIntents.IntentParameter>", + "type": "AppIntents.IntentParameter", "valueKind": "Runtime" }, { "file": "InputOptionsProbe.swift", "isComputed": "true", "isStatic": "false", - "label": "autocorrect", - "line": 25, + "label": "explicitDefaults", + "line": 32, "mangledTypeName": "n/a - deprecated", "propertyWrappers": [ { @@ -2359,7 +3125,7 @@ { "label": "title", "type": "Foundation.LocalizedStringResource", - "value": "Autocorrect only", + "value": "Explicit defaults", "valueKind": "RawLiteral" }, { @@ -2370,33 +3136,42 @@ { "label": "keyboardType", "type": "Swift.String.IntentInputOptions.KeyboardType", - "valueKind": "Runtime" + "value": { + "name": "asciiCapable" + }, + "valueKind": "Enum" }, { "label": "capitalizationType", "type": "Swift.String.IntentInputOptions.CapitalizationType", - "valueKind": "Runtime" + "value": { + "name": "sentences" + }, + "valueKind": "Enum" }, { "label": "multiline", "type": "Swift.Bool", - "valueKind": "Runtime" + "value": "false", + "valueKind": "RawLiteral" }, { "label": "autocorrect", "type": "Swift.Bool", - "value": "false", + "value": "true", "valueKind": "RawLiteral" }, { "label": "smartQuotes", "type": "Swift.Bool", - "valueKind": "Runtime" + "value": "true", + "valueKind": "RawLiteral" }, { "label": "smartDashes", "type": "Swift.Bool", - "valueKind": "Runtime" + "value": "true", + "valueKind": "RawLiteral" } ], "type": "Swift.String.IntentInputOptions" @@ -2405,7 +3180,7 @@ } ], "file": "InputOptionsProbe.swift", - "line": 24, + "line": 31, "type": "AppIntents.IntentParameter" } ], @@ -2415,7 +3190,7 @@ { "label": "title", "type": "Foundation.LocalizedStringResource", - "value": "Autocorrect only", + "value": "Explicit defaults", "valueKind": "RawLiteral" }, { @@ -2436,33 +3211,42 @@ { "label": "keyboardType", "type": "Swift.String.IntentInputOptions.KeyboardType", - "valueKind": "Runtime" + "value": { + "name": "asciiCapable" + }, + "valueKind": "Enum" }, { "label": "capitalizationType", "type": "Swift.String.IntentInputOptions.CapitalizationType", - "valueKind": "Runtime" + "value": { + "name": "sentences" + }, + "valueKind": "Enum" }, { "label": "multiline", "type": "Swift.Bool", - "valueKind": "Runtime" + "value": "false", + "valueKind": "RawLiteral" }, { "label": "autocorrect", "type": "Swift.Bool", - "value": "false", + "value": "true", "valueKind": "RawLiteral" }, { "label": "smartQuotes", "type": "Swift.Bool", - "valueKind": "Runtime" + "value": "true", + "valueKind": "RawLiteral" }, { "label": "smartDashes", "type": "Swift.Bool", - "valueKind": "Runtime" + "value": "true", + "valueKind": "RawLiteral" } ], "type": "Swift.String.IntentInputOptions" @@ -2488,8 +3272,8 @@ "file": "InputOptionsProbe.swift", "isComputed": "true", "isStatic": "false", - "label": "$autocorrect", - "line": 25, + "label": "$explicitDefaults", + "line": 32, "mangledTypeName": "n/a - deprecated", "type": "AppIntents.IntentParameter>", "valueKind": "Runtime" @@ -2498,8 +3282,8 @@ "file": "InputOptionsProbe.swift", "isComputed": "true", "isStatic": "false", - "label": "withDefault", - "line": 27, + "label": "words", + "line": 35, "mangledTypeName": "n/a - deprecated", "propertyWrappers": [ { @@ -2507,13 +3291,7 @@ { "label": "title", "type": "Foundation.LocalizedStringResource", - "value": "With default", - "valueKind": "RawLiteral" - }, - { - "label": "default", - "type": "Swift.Optional", - "value": "hi", + "value": "Words", "valueKind": "RawLiteral" }, { @@ -2524,7 +3302,10 @@ { "label": "keyboardType", "type": "Swift.String.IntentInputOptions.KeyboardType", - "valueKind": "Runtime" + "value": { + "name": "URL" + }, + "valueKind": "Enum" }, { "label": "capitalizationType", @@ -2559,17 +3340,17 @@ } ], "file": "InputOptionsProbe.swift", - "line": 26, + "line": 34, "type": "AppIntents.IntentParameter" } ], - "type": "Swift.String", + "type": "Swift.Array", "value": { "arguments": [ { "label": "title", "type": "Foundation.LocalizedStringResource", - "value": "With default", + "value": "Words", "valueKind": "RawLiteral" }, { @@ -2579,9 +3360,8 @@ }, { "label": "default", - "type": "Swift.Optional", - "value": "hi", - "valueKind": "RawLiteral" + "type": "Swift.Optional>", + "valueKind": "NilLiteral" }, { "label": "inputOptions", @@ -2591,7 +3371,10 @@ { "label": "keyboardType", "type": "Swift.String.IntentInputOptions.KeyboardType", - "valueKind": "Runtime" + "value": { + "name": "URL" + }, + "valueKind": "Enum" }, { "label": "capitalizationType", @@ -2635,7 +3418,7 @@ "valueKind": "Runtime" } ], - "type": "AppIntents.IntentParameter" + "type": "AppIntents.IntentParameter>" }, "valueKind": "InitCall" }, @@ -2643,18 +3426,18 @@ "file": "InputOptionsProbe.swift", "isComputed": "true", "isStatic": "false", - "label": "$withDefault", - "line": 27, + "label": "$words", + "line": 35, "mangledTypeName": "n/a - deprecated", - "type": "AppIntents.IntentParameter", + "type": "AppIntents.IntentParameter>", "valueKind": "Runtime" }, { "file": "InputOptionsProbe.swift", "isComputed": "true", "isStatic": "false", - "label": "dialog", - "line": 29, + "label": "optionalWords", + "line": 37, "mangledTypeName": "n/a - deprecated", "propertyWrappers": [ { @@ -2662,13 +3445,7 @@ { "label": "title", "type": "Foundation.LocalizedStringResource", - "value": "Options and dialog", - "valueKind": "RawLiteral" - }, - { - "label": "description", - "type": "Swift.Optional", - "value": "Described", + "value": "Optional words", "valueKind": "RawLiteral" }, { @@ -2679,10 +3456,7 @@ { "label": "keyboardType", "type": "Swift.String.IntentInputOptions.KeyboardType", - "value": { - "name": "numberPad" - }, - "valueKind": "Enum" + "valueKind": "Runtime" }, { "label": "capitalizationType", @@ -2714,37 +3488,30 @@ "type": "Swift.String.IntentInputOptions" }, "valueKind": "InitCall" - }, - { - "label": "requestValueDialog", - "type": "Swift.Optional", - "value": "Which?", - "valueKind": "RawLiteral" } ], "file": "InputOptionsProbe.swift", - "line": 28, + "line": 36, "type": "AppIntents.IntentParameter" } ], - "type": "Swift.String", + "type": "Swift.Optional>", "value": { "arguments": [ { "label": "title", "type": "Foundation.LocalizedStringResource", - "value": "Options and dialog", + "value": "Optional words", "valueKind": "RawLiteral" }, { "label": "description", "type": "Swift.Optional", - "value": "Described", - "valueKind": "RawLiteral" + "valueKind": "NilLiteral" }, { "label": "default", - "type": "Swift.Optional", + "type": "Swift.Optional>", "valueKind": "NilLiteral" }, { @@ -2755,10 +3522,7 @@ { "label": "keyboardType", "type": "Swift.String.IntentInputOptions.KeyboardType", - "value": { - "name": "numberPad" - }, - "valueKind": "Enum" + "valueKind": "Runtime" }, { "label": "capitalizationType", @@ -2794,8 +3558,7 @@ { "label": "requestValueDialog", "type": "Swift.Optional", - "value": "Which?", - "valueKind": "RawLiteral" + "valueKind": "NilLiteral" }, { "label": "inputConnectionBehavior", @@ -2803,7 +3566,7 @@ "valueKind": "Runtime" } ], - "type": "AppIntents.IntentParameter" + "type": "AppIntents.IntentParameter>>" }, "valueKind": "InitCall" }, @@ -2811,18 +3574,18 @@ "file": "InputOptionsProbe.swift", "isComputed": "true", "isStatic": "false", - "label": "$dialog", - "line": 29, + "label": "$optionalWords", + "line": 37, "mangledTypeName": "n/a - deprecated", - "type": "AppIntents.IntentParameter", + "type": "AppIntents.IntentParameter>>", "valueKind": "Runtime" }, { "file": "InputOptionsProbe.swift", "isComputed": "true", "isStatic": "false", - "label": "explicitDefaults", - "line": 32, + "label": "distinctWords", + "line": 39, "mangledTypeName": "n/a - deprecated", "propertyWrappers": [ { @@ -2830,7 +3593,7 @@ { "label": "title", "type": "Foundation.LocalizedStringResource", - "value": "Explicit defaults", + "value": "Distinct words", "valueKind": "RawLiteral" }, { @@ -2841,30 +3604,22 @@ { "label": "keyboardType", "type": "Swift.String.IntentInputOptions.KeyboardType", - "value": { - "name": "asciiCapable" - }, - "valueKind": "Enum" + "valueKind": "Runtime" }, { "label": "capitalizationType", "type": "Swift.String.IntentInputOptions.CapitalizationType", - "value": { - "name": "sentences" - }, - "valueKind": "Enum" + "valueKind": "Runtime" }, { "label": "multiline", "type": "Swift.Bool", - "value": "false", - "valueKind": "RawLiteral" + "valueKind": "Runtime" }, { "label": "autocorrect", "type": "Swift.Bool", - "value": "true", - "valueKind": "RawLiteral" + "valueKind": "Runtime" }, { "label": "smartQuotes", @@ -2875,8 +3630,7 @@ { "label": "smartDashes", "type": "Swift.Bool", - "value": "true", - "valueKind": "RawLiteral" + "valueKind": "Runtime" } ], "type": "Swift.String.IntentInputOptions" @@ -2885,17 +3639,17 @@ } ], "file": "InputOptionsProbe.swift", - "line": 31, + "line": 38, "type": "AppIntents.IntentParameter" } ], - "type": "Swift.Optional", + "type": "Swift.Set", "value": { "arguments": [ { "label": "title", "type": "Foundation.LocalizedStringResource", - "value": "Explicit defaults", + "value": "Distinct words", "valueKind": "RawLiteral" }, { @@ -2905,7 +3659,7 @@ }, { "label": "default", - "type": "Swift.Optional", + "type": "Swift.Optional>", "valueKind": "NilLiteral" }, { @@ -2916,30 +3670,22 @@ { "label": "keyboardType", "type": "Swift.String.IntentInputOptions.KeyboardType", - "value": { - "name": "asciiCapable" - }, - "valueKind": "Enum" + "valueKind": "Runtime" }, { "label": "capitalizationType", "type": "Swift.String.IntentInputOptions.CapitalizationType", - "value": { - "name": "sentences" - }, - "valueKind": "Enum" + "valueKind": "Runtime" }, { "label": "multiline", "type": "Swift.Bool", - "value": "false", - "valueKind": "RawLiteral" + "valueKind": "Runtime" }, { "label": "autocorrect", "type": "Swift.Bool", - "value": "true", - "valueKind": "RawLiteral" + "valueKind": "Runtime" }, { "label": "smartQuotes", @@ -2950,8 +3696,7 @@ { "label": "smartDashes", "type": "Swift.Bool", - "value": "true", - "valueKind": "RawLiteral" + "valueKind": "Runtime" } ], "type": "Swift.String.IntentInputOptions" @@ -2969,6 +3714,82 @@ "valueKind": "Runtime" } ], + "type": "AppIntents.IntentParameter>" + }, + "valueKind": "InitCall" + }, + { + "file": "InputOptionsProbe.swift", + "isComputed": "true", + "isStatic": "false", + "label": "$distinctWords", + "line": 39, + "mangledTypeName": "n/a - deprecated", + "type": "AppIntents.IntentParameter>", + "valueKind": "Runtime" + }, + { + "file": "InputOptionsProbe.swift", + "isComputed": "true", + "isStatic": "false", + "label": "parameterSummary", + "line": 41, + "mangledTypeName": "n/a - deprecated", + "propertyWrappers": [ + { + "arguments": [ + { + "label": "title", + "type": "Foundation.LocalizedStringResource", + "value": "User's summary", + "valueKind": "RawLiteral" + }, + { + "label": "inputOptions", + "type": "Swift.Optional", + "valueKind": "NilLiteral" + } + ], + "file": "InputOptionsProbe.swift", + "line": 40, + "type": "AppIntents.IntentParameter" + } + ], + "type": "Swift.Optional", + "value": { + "arguments": [ + { + "label": "title", + "type": "Foundation.LocalizedStringResource", + "value": "User's summary", + "valueKind": "RawLiteral" + }, + { + "label": "description", + "type": "Swift.Optional", + "valueKind": "NilLiteral" + }, + { + "label": "default", + "type": "Swift.Optional", + "valueKind": "NilLiteral" + }, + { + "label": "inputOptions", + "type": "Swift.Optional", + "valueKind": "NilLiteral" + }, + { + "label": "requestValueDialog", + "type": "Swift.Optional", + "valueKind": "NilLiteral" + }, + { + "label": "inputConnectionBehavior", + "type": "AppIntents.InputConnectionBehavior", + "valueKind": "Runtime" + } + ], "type": "AppIntents.IntentParameter>" }, "valueKind": "InitCall" @@ -2977,13 +3798,13 @@ "file": "InputOptionsProbe.swift", "isComputed": "true", "isStatic": "false", - "label": "$explicitDefaults", - "line": 32, + "label": "$parameterSummary", + "line": 41, "mangledTypeName": "n/a - deprecated", "type": "AppIntents.IntentParameter>", "valueKind": "Runtime" } ], - "typeName": "Sev.InputOptionsProbeIntent" + "typeName": "InputOptionsProbe.InputOptionsProbeIntent" } ] diff --git a/sweetpad-cli/fixtures/appintents/OutputProbe.actions.json b/sweetpad-cli/fixtures/appintents/OutputProbe.actions.json index 601788c6..b309804c 100644 --- a/sweetpad-cli/fixtures/appintents/OutputProbe.actions.json +++ b/sweetpad-cli/fixtures/appintents/OutputProbe.actions.json @@ -9,14 +9,14 @@ } }, "effectiveBundleIdentifiers": [], - "fullyQualifiedTypeName": "Sev.AllOutputsProbeIntent", + "fullyQualifiedTypeName": "OutputProbe.AllOutputsProbeIntent", "identifier": "AllOutputsProbeIntent", "isAuthPolExplicit": false, "isDiscoverable": true, - "mangledTypeName": "3Sev21AllOutputsProbeIntentV", + "mangledTypeName": "11OutputProbe010AllOutputsB6IntentV", "mangledTypeNameByBundleIdentifier": {}, "mangledTypeNameByBundleIdentifierV2": {}, - "mangledTypeNameV2": "3Sev21AllOutputsProbeIntentV", + "mangledTypeNameV2": "11OutputProbe010AllOutputsB6IntentV", "openAppWhenRun": false, "outputFlags": 7, "outputType": { @@ -53,14 +53,14 @@ } }, "effectiveBundleIdentifiers": [], - "fullyQualifiedTypeName": "Sev.DialogOnlyProbeIntent", + "fullyQualifiedTypeName": "OutputProbe.DialogOnlyProbeIntent", "identifier": "DialogOnlyProbeIntent", "isAuthPolExplicit": false, "isDiscoverable": true, - "mangledTypeName": "3Sev21DialogOnlyProbeIntentV", + "mangledTypeName": "11OutputProbe010DialogOnlyB6IntentV", "mangledTypeNameByBundleIdentifier": {}, "mangledTypeNameByBundleIdentifierV2": {}, - "mangledTypeNameV2": "3Sev21DialogOnlyProbeIntentV", + "mangledTypeNameV2": "11OutputProbe010DialogOnlyB6IntentV", "openAppWhenRun": false, "outputFlags": 4, "parameters": [], @@ -80,6 +80,105 @@ "isDiscoverable": true } }, + "EmptySummaryTextProbeIntent": { + "actionConfiguration": { + "actionSummary": { + "wrapper": { + "otherParameterIdentifiers": [], + "summaryString": { + "formatString": "", + "parameterIdentifiers": [] + } + } + } + }, + "assistantDefinedSchemaTraits": [], + "assistantDefinedSchemas": [], + "authenticationPolicy": 0, + "availabilityAnnotations": { + "LNPlatformNameWildcard": { + "introducedVersion": "*" + } + }, + "effectiveBundleIdentifiers": [], + "fullyQualifiedTypeName": "OutputProbe.EmptySummaryTextProbeIntent", + "identifier": "EmptySummaryTextProbeIntent", + "isAuthPolExplicit": false, + "isDiscoverable": true, + "mangledTypeName": "11OutputProbe016EmptySummaryTextB6IntentV", + "mangledTypeNameByBundleIdentifier": {}, + "mangledTypeNameByBundleIdentifierV2": {}, + "mangledTypeNameV2": "11OutputProbe016EmptySummaryTextB6IntentV", + "openAppWhenRun": false, + "outputFlags": 0, + "parameters": [], + "presentationStyle": 0, + "requiredCapabilities": [], + "supportedModes": 1, + "systemProtocolMetadata": [], + "systemProtocolMetadataV2": [], + "systemProtocols": [], + "title": { + "alternatives": [], + "key": "Empty summary text" + }, + "typeSpecificMetadata": [], + "visibilityMetadata": { + "assistantOnly": false, + "isDiscoverable": true + } + }, + "NoSummaryTextProbeIntent": { + "actionConfiguration": { + "actionSummary": { + "wrapper": { + "otherParameterIdentifiers": [] + } + } + }, + "assistantDefinedSchemaTraits": [], + "assistantDefinedSchemas": [], + "authenticationPolicy": 0, + "availabilityAnnotations": { + "LNPlatformNameWildcard": { + "introducedVersion": "*" + } + }, + "effectiveBundleIdentifiers": [], + "fullyQualifiedTypeName": "OutputProbe.NoSummaryTextProbeIntent", + "identifier": "NoSummaryTextProbeIntent", + "isAuthPolExplicit": false, + "isDiscoverable": true, + "mangledTypeName": "11OutputProbe013NoSummaryTextB6IntentV", + "mangledTypeNameByBundleIdentifier": {}, + "mangledTypeNameByBundleIdentifierV2": {}, + "mangledTypeNameV2": "11OutputProbe013NoSummaryTextB6IntentV", + "openAppWhenRun": false, + "outputFlags": 4, + "outputType": { + "primitive": { + "wrapper": { + "typeIdentifier": 0 + } + } + }, + "parameters": [], + "presentationStyle": 0, + "requiredCapabilities": [], + "supportedModes": 1, + "systemProtocolMetadata": [], + "systemProtocolMetadataV2": [], + "systemProtocols": [], + "title": { + "alternatives": [], + "key": "No summary text" + }, + "typeSpecificMetadata": [], + "visibilityMetadata": { + "assistantOnly": false, + "isDiscoverable": true + } + }, "OpensProbeIntent": { "assistantDefinedSchemaTraits": [], "assistantDefinedSchemas": [], @@ -90,14 +189,14 @@ } }, "effectiveBundleIdentifiers": [], - "fullyQualifiedTypeName": "Sev.OpensProbeIntent", + "fullyQualifiedTypeName": "OutputProbe.OpensProbeIntent", "identifier": "OpensProbeIntent", "isAuthPolExplicit": false, "isDiscoverable": true, - "mangledTypeName": "3Sev16OpensProbeIntentV", + "mangledTypeName": "11OutputProbe05OpensB6IntentV", "mangledTypeNameByBundleIdentifier": {}, "mangledTypeNameByBundleIdentifierV2": {}, - "mangledTypeNameV2": "3Sev16OpensProbeIntentV", + "mangledTypeNameV2": "11OutputProbe05OpensB6IntentV", "openAppWhenRun": false, "outputFlags": 1, "parameters": [], @@ -127,14 +226,14 @@ } }, "effectiveBundleIdentifiers": [], - "fullyQualifiedTypeName": "Sev.SnippetOnlyProbeIntent", + "fullyQualifiedTypeName": "OutputProbe.SnippetOnlyProbeIntent", "identifier": "SnippetOnlyProbeIntent", "isAuthPolExplicit": false, "isDiscoverable": true, - "mangledTypeName": "3Sev22SnippetOnlyProbeIntentV", + "mangledTypeName": "11OutputProbe011SnippetOnlyB6IntentV", "mangledTypeNameByBundleIdentifier": {}, "mangledTypeNameByBundleIdentifierV2": {}, - "mangledTypeNameV2": "3Sev22SnippetOnlyProbeIntentV", + "mangledTypeNameV2": "11OutputProbe011SnippetOnlyB6IntentV", "openAppWhenRun": false, "outputFlags": 2, "parameters": [], @@ -178,14 +277,14 @@ } }, "effectiveBundleIdentifiers": [], - "fullyQualifiedTypeName": "Sev.SummaryBuilderProbeIntent", + "fullyQualifiedTypeName": "OutputProbe.SummaryBuilderProbeIntent", "identifier": "SummaryBuilderProbeIntent", "isAuthPolExplicit": false, "isDiscoverable": true, - "mangledTypeName": "3Sev25SummaryBuilderProbeIntentV", + "mangledTypeName": "11OutputProbe014SummaryBuilderB6IntentV", "mangledTypeNameByBundleIdentifier": {}, "mangledTypeNameByBundleIdentifierV2": {}, - "mangledTypeNameV2": "3Sev25SummaryBuilderProbeIntentV", + "mangledTypeNameV2": "11OutputProbe014SummaryBuilderB6IntentV", "openAppWhenRun": false, "outputFlags": 0, "parameters": [ @@ -271,7 +370,7 @@ "valueType": { "primitive": { "wrapper": { - "typeIdentifier": 0 + "typeIdentifier": 2 } } } @@ -281,7 +380,7 @@ "valueType": { "primitive": { "wrapper": { - "typeIdentifier": 2 + "typeIdentifier": 0 } } } @@ -356,18 +455,14 @@ "isDiscoverable": true } }, - "SummaryTwoProbeIntent": { + "SummaryParametersOnlyProbeIntent": { "actionConfiguration": { "actionSummary": { "wrapper": { - "otherParameterIdentifiers": [], - "summaryString": { - "formatString": "Send ${first} to ${second}", - "parameterIdentifiers": [ - "first", - "second" - ] - } + "otherParameterIdentifiers": [ + "second", + "first" + ] } } }, @@ -380,14 +475,14 @@ } }, "effectiveBundleIdentifiers": [], - "fullyQualifiedTypeName": "Sev.SummaryTwoProbeIntent", - "identifier": "SummaryTwoProbeIntent", + "fullyQualifiedTypeName": "OutputProbe.SummaryParametersOnlyProbeIntent", + "identifier": "SummaryParametersOnlyProbeIntent", "isAuthPolExplicit": false, "isDiscoverable": true, - "mangledTypeName": "3Sev21SummaryTwoProbeIntentV", + "mangledTypeName": "11OutputProbe021SummaryParametersOnlyB6IntentV", "mangledTypeNameByBundleIdentifier": {}, "mangledTypeNameByBundleIdentifierV2": {}, - "mangledTypeNameV2": "3Sev21SummaryTwoProbeIntentV", + "mangledTypeNameV2": "11OutputProbe021SummaryParametersOnlyB6IntentV", "openAppWhenRun": false, "outputFlags": 0, "parameters": [ @@ -399,6 +494,75 @@ "isOptional": false, "name": "first", "resolvableInputTypes": [ + { + "kindValue": 0, + "valueType": { + "array": { + "wrapper": { + "capabilities": 3, + "memberValueType": { + "primitive": { + "wrapper": { + "typeIdentifier": 2 + } + } + } + } + } + } + }, + { + "kindValue": 0, + "valueType": { + "primitive": { + "wrapper": { + "typeIdentifier": 0 + } + } + } + }, + { + "kindValue": 0, + "valueType": { + "primitive": { + "wrapper": { + "typeIdentifier": 2 + } + } + } + } + ], + "title": { + "alternatives": [], + "key": "First" + }, + "typeSpecificMetadata": [], + "valueType": { + "primitive": { + "wrapper": { + "typeIdentifier": 0 + } + } + } + }, + { + "capabilities": 0, + "dynamicOptionsSupport": 0, + "inputConnectionBehavior": 0, + "isInput": false, + "isOptional": false, + "name": "second", + "resolvableInputTypes": [ + { + "kindValue": 0, + "valueType": { + "primitive": { + "wrapper": { + "typeIdentifier": 7 + } + } + } + }, { "kindValue": 0, "valueType": { @@ -409,6 +573,93 @@ } } }, + { + "kindValue": 0, + "valueType": { + "primitive": { + "wrapper": { + "typeIdentifier": 0 + } + } + } + } + ], + "title": { + "alternatives": [], + "key": "Second" + }, + "typeSpecificMetadata": [], + "valueType": { + "primitive": { + "wrapper": { + "typeIdentifier": 2 + } + } + } + } + ], + "presentationStyle": 0, + "requiredCapabilities": [], + "supportedModes": 1, + "systemProtocolMetadata": [], + "systemProtocolMetadataV2": [], + "systemProtocols": [], + "title": { + "alternatives": [], + "key": "Summary parameters only" + }, + "typeSpecificMetadata": [], + "visibilityMetadata": { + "assistantOnly": false, + "isDiscoverable": true + } + }, + "SummaryTwoProbeIntent": { + "actionConfiguration": { + "actionSummary": { + "wrapper": { + "otherParameterIdentifiers": [ + "third" + ], + "summaryString": { + "formatString": "Send ${second} to ${first}, then ${second} again", + "parameterIdentifiers": [ + "second", + "first", + "second" + ] + } + } + } + }, + "assistantDefinedSchemaTraits": [], + "assistantDefinedSchemas": [], + "authenticationPolicy": 0, + "availabilityAnnotations": { + "LNPlatformNameWildcard": { + "introducedVersion": "*" + } + }, + "effectiveBundleIdentifiers": [], + "fullyQualifiedTypeName": "OutputProbe.SummaryTwoProbeIntent", + "identifier": "SummaryTwoProbeIntent", + "isAuthPolExplicit": false, + "isDiscoverable": true, + "mangledTypeName": "11OutputProbe010SummaryTwoB6IntentV", + "mangledTypeNameByBundleIdentifier": {}, + "mangledTypeNameByBundleIdentifierV2": {}, + "mangledTypeNameV2": "11OutputProbe010SummaryTwoB6IntentV", + "openAppWhenRun": false, + "outputFlags": 0, + "parameters": [ + { + "capabilities": 0, + "dynamicOptionsSupport": 0, + "inputConnectionBehavior": 0, + "isInput": false, + "isOptional": false, + "name": "first", + "resolvableInputTypes": [ { "kindValue": 0, "valueType": { @@ -435,6 +686,16 @@ } } } + }, + { + "kindValue": 0, + "valueType": { + "primitive": { + "wrapper": { + "typeIdentifier": 2 + } + } + } } ], "title": { @@ -463,7 +724,7 @@ "valueType": { "primitive": { "wrapper": { - "typeIdentifier": 2 + "typeIdentifier": 7 } } } @@ -473,7 +734,7 @@ "valueType": { "primitive": { "wrapper": { - "typeIdentifier": 0 + "typeIdentifier": 2 } } } @@ -483,7 +744,7 @@ "valueType": { "primitive": { "wrapper": { - "typeIdentifier": 7 + "typeIdentifier": 0 } } } @@ -568,14 +829,14 @@ } }, "effectiveBundleIdentifiers": [], - "fullyQualifiedTypeName": "Sev.ValueSnippetProbeIntent", + "fullyQualifiedTypeName": "OutputProbe.ValueSnippetProbeIntent", "identifier": "ValueSnippetProbeIntent", "isAuthPolExplicit": false, "isDiscoverable": true, - "mangledTypeName": "3Sev23ValueSnippetProbeIntentV", + "mangledTypeName": "11OutputProbe012ValueSnippetB6IntentV", "mangledTypeNameByBundleIdentifier": {}, "mangledTypeNameByBundleIdentifierV2": {}, - "mangledTypeNameV2": "3Sev23ValueSnippetProbeIntentV", + "mangledTypeNameV2": "11OutputProbe012ValueSnippetB6IntentV", "openAppWhenRun": false, "outputFlags": 2, "outputType": { diff --git a/sweetpad-cli/fixtures/appintents/OutputProbe.swift b/sweetpad-cli/fixtures/appintents/OutputProbe.swift index 16e368e5..039b9f78 100644 --- a/sweetpad-cli/fixtures/appintents/OutputProbe.swift +++ b/sweetpad-cli/fixtures/appintents/OutputProbe.swift @@ -37,7 +37,9 @@ struct SummaryTwoProbeIntent: AppIntent { @Parameter(title: "First") var first: String @Parameter(title: "Second") var second: Int @Parameter(title: "Third", default: false) var third: Bool - static var parameterSummary: some ParameterSummary { Summary("Send \(\.$first) to \(\.$second)") } + static var parameterSummary: some ParameterSummary { + Summary("Send \(\.$second) to \(\.$first), then \(\.$second) again") { \.$third } + } func perform() async throws -> some IntentResult { .result() } } @@ -54,3 +56,30 @@ struct SummaryBuilderProbeIntent: AppIntent { } func perform() async throws -> some IntentResult { .result() } } + +struct NoSummaryTextProbeIntent: AppIntent { + static let title: LocalizedStringResource = "No summary text" + static var parameterSummary: some ParameterSummary { Summary() } + func perform() async throws -> some IntentResult & ReturnsValue & ProvidesDialog { + .result(value: "ok", dialog: "Done") + } +} + +struct EmptySummaryTextProbeIntent: AppIntent { + static let title: LocalizedStringResource = "Empty summary text" + static var parameterSummary: some ParameterSummary { Summary("") } + func perform() async throws -> some IntentResult { .result() } +} + +struct SummaryParametersOnlyProbeIntent: AppIntent { + static let title: LocalizedStringResource = "Summary parameters only" + @Parameter(title: "First") var first: String + @Parameter(title: "Second") var second: Int + static var parameterSummary: some ParameterSummary { + Summary { + \.$second + \.$first + } + } + func perform() async throws -> some IntentResult { .result() } +} diff --git a/sweetpad-cli/fixtures/appintents/OutputProbe.swiftconstvalues b/sweetpad-cli/fixtures/appintents/OutputProbe.swiftconstvalues index f60949b8..2b75e2fa 100644 --- a/sweetpad-cli/fixtures/appintents/OutputProbe.swiftconstvalues +++ b/sweetpad-cli/fixtures/appintents/OutputProbe.swiftconstvalues @@ -2,27 +2,27 @@ { "allConformances": [ { - "conformanceDefiningModule": "Sev", + "conformanceDefiningModule": "OutputProbe", "protocolName": "AppIntents.AppIntent" }, { - "conformanceDefiningModule": "Sev", + "conformanceDefiningModule": "OutputProbe", "protocolName": "AppIntents.PersistentlyIdentifiable" }, { - "conformanceDefiningModule": "Sev", + "conformanceDefiningModule": "OutputProbe", "protocolName": "AppIntents._SupportsAppDependencies" }, { - "conformanceDefiningModule": "Sev", + "conformanceDefiningModule": "OutputProbe", "protocolName": "Swift.Sendable" }, { - "conformanceDefiningModule": "Sev", + "conformanceDefiningModule": "OutputProbe", "protocolName": "Swift.SendableMetatype" }, { - "conformanceDefiningModule": "Sev", + "conformanceDefiningModule": "OutputProbe", "protocolName": "Swift.BitwiseCopyable" } ], @@ -32,7 +32,7 @@ "AppIntents.ProvidesDialog" ], "opaqueTypeSameTypeRequirements": [], - "substitutedMangledTypeName": "3Sev21DialogOnlyProbeIntentV7performQryYaKFQOy_Qo_", + "substitutedMangledTypeName": "11OutputProbe010DialogOnlyB6IntentV7performQryYaKFQOy_Qo_", "substitutedTypeName": "some AppIntents.ProvidesDialog", "typeAliasName": "PerformResult" }, @@ -41,7 +41,7 @@ "AppIntents.ParameterSummary" ], "opaqueTypeSameTypeRequirements": [], - "substitutedMangledTypeName": "10AppIntents0A6IntentPAAE16parameterSummaryQrvpZQOy3Sev015DialogOnlyProbeC0V_Qo_", + "substitutedMangledTypeName": "10AppIntents0A6IntentPAAE16parameterSummaryQrvpZQOy11OutputProbe010DialogOnlygC0V_Qo_", "substitutedTypeName": "some AppIntents.ParameterSummary", "typeAliasName": "SummaryContent" } @@ -57,7 +57,7 @@ "file": "OutputProbe.swift", "kind": "struct", "line": 5, - "mangledTypeName": "3Sev21DialogOnlyProbeIntentV", + "mangledTypeName": "11OutputProbe010DialogOnlyB6IntentV", "properties": [ { "file": "OutputProbe.swift", @@ -71,32 +71,32 @@ "valueKind": "RawLiteral" } ], - "typeName": "Sev.DialogOnlyProbeIntent" + "typeName": "OutputProbe.DialogOnlyProbeIntent" }, { "allConformances": [ { - "conformanceDefiningModule": "Sev", + "conformanceDefiningModule": "OutputProbe", "protocolName": "AppIntents.AppIntent" }, { - "conformanceDefiningModule": "Sev", + "conformanceDefiningModule": "OutputProbe", "protocolName": "AppIntents.PersistentlyIdentifiable" }, { - "conformanceDefiningModule": "Sev", + "conformanceDefiningModule": "OutputProbe", "protocolName": "AppIntents._SupportsAppDependencies" }, { - "conformanceDefiningModule": "Sev", + "conformanceDefiningModule": "OutputProbe", "protocolName": "Swift.Sendable" }, { - "conformanceDefiningModule": "Sev", + "conformanceDefiningModule": "OutputProbe", "protocolName": "Swift.SendableMetatype" }, { - "conformanceDefiningModule": "Sev", + "conformanceDefiningModule": "OutputProbe", "protocolName": "Swift.BitwiseCopyable" } ], @@ -106,7 +106,7 @@ "AppIntents.ShowsSnippetView" ], "opaqueTypeSameTypeRequirements": [], - "substitutedMangledTypeName": "3Sev22SnippetOnlyProbeIntentV7performQryYaKFQOy_Qo_", + "substitutedMangledTypeName": "11OutputProbe011SnippetOnlyB6IntentV7performQryYaKFQOy_Qo_", "substitutedTypeName": "some AppIntents.ShowsSnippetView", "typeAliasName": "PerformResult" }, @@ -115,7 +115,7 @@ "AppIntents.ParameterSummary" ], "opaqueTypeSameTypeRequirements": [], - "substitutedMangledTypeName": "10AppIntents0A6IntentPAAE16parameterSummaryQrvpZQOy3Sev016SnippetOnlyProbeC0V_Qo_", + "substitutedMangledTypeName": "10AppIntents0A6IntentPAAE16parameterSummaryQrvpZQOy11OutputProbe011SnippetOnlygC0V_Qo_", "substitutedTypeName": "some AppIntents.ParameterSummary", "typeAliasName": "SummaryContent" } @@ -131,7 +131,7 @@ "file": "OutputProbe.swift", "kind": "struct", "line": 10, - "mangledTypeName": "3Sev22SnippetOnlyProbeIntentV", + "mangledTypeName": "11OutputProbe011SnippetOnlyB6IntentV", "properties": [ { "file": "OutputProbe.swift", @@ -145,32 +145,32 @@ "valueKind": "RawLiteral" } ], - "typeName": "Sev.SnippetOnlyProbeIntent" + "typeName": "OutputProbe.SnippetOnlyProbeIntent" }, { "allConformances": [ { - "conformanceDefiningModule": "Sev", + "conformanceDefiningModule": "OutputProbe", "protocolName": "AppIntents.AppIntent" }, { - "conformanceDefiningModule": "Sev", + "conformanceDefiningModule": "OutputProbe", "protocolName": "AppIntents.PersistentlyIdentifiable" }, { - "conformanceDefiningModule": "Sev", + "conformanceDefiningModule": "OutputProbe", "protocolName": "AppIntents._SupportsAppDependencies" }, { - "conformanceDefiningModule": "Sev", + "conformanceDefiningModule": "OutputProbe", "protocolName": "Swift.Sendable" }, { - "conformanceDefiningModule": "Sev", + "conformanceDefiningModule": "OutputProbe", "protocolName": "Swift.SendableMetatype" }, { - "conformanceDefiningModule": "Sev", + "conformanceDefiningModule": "OutputProbe", "protocolName": "Swift.BitwiseCopyable" } ], @@ -187,7 +187,7 @@ "typeAliasName": "AppIntents.IntentResult.Value" } ], - "substitutedMangledTypeName": "3Sev23ValueSnippetProbeIntentV7performQryYaKFQOy_Qo_", + "substitutedMangledTypeName": "11OutputProbe012ValueSnippetB6IntentV7performQryYaKFQOy_Qo_", "substitutedTypeName": "some AppIntents.ReturnsValue & AppIntents.ShowsSnippetView", "typeAliasName": "PerformResult" }, @@ -196,7 +196,7 @@ "AppIntents.ParameterSummary" ], "opaqueTypeSameTypeRequirements": [], - "substitutedMangledTypeName": "10AppIntents0A6IntentPAAE16parameterSummaryQrvpZQOy3Sev017ValueSnippetProbeC0V_Qo_", + "substitutedMangledTypeName": "10AppIntents0A6IntentPAAE16parameterSummaryQrvpZQOy11OutputProbe012ValueSnippetgC0V_Qo_", "substitutedTypeName": "some AppIntents.ParameterSummary", "typeAliasName": "SummaryContent" } @@ -212,7 +212,7 @@ "file": "OutputProbe.swift", "kind": "struct", "line": 16, - "mangledTypeName": "3Sev23ValueSnippetProbeIntentV", + "mangledTypeName": "11OutputProbe012ValueSnippetB6IntentV", "properties": [ { "file": "OutputProbe.swift", @@ -226,32 +226,32 @@ "valueKind": "RawLiteral" } ], - "typeName": "Sev.ValueSnippetProbeIntent" + "typeName": "OutputProbe.ValueSnippetProbeIntent" }, { "allConformances": [ { - "conformanceDefiningModule": "Sev", + "conformanceDefiningModule": "OutputProbe", "protocolName": "AppIntents.AppIntent" }, { - "conformanceDefiningModule": "Sev", + "conformanceDefiningModule": "OutputProbe", "protocolName": "AppIntents.PersistentlyIdentifiable" }, { - "conformanceDefiningModule": "Sev", + "conformanceDefiningModule": "OutputProbe", "protocolName": "AppIntents._SupportsAppDependencies" }, { - "conformanceDefiningModule": "Sev", + "conformanceDefiningModule": "OutputProbe", "protocolName": "Swift.Sendable" }, { - "conformanceDefiningModule": "Sev", + "conformanceDefiningModule": "OutputProbe", "protocolName": "Swift.SendableMetatype" }, { - "conformanceDefiningModule": "Sev", + "conformanceDefiningModule": "OutputProbe", "protocolName": "Swift.BitwiseCopyable" } ], @@ -261,7 +261,7 @@ "AppIntents.OpensIntent" ], "opaqueTypeSameTypeRequirements": [], - "substitutedMangledTypeName": "3Sev16OpensProbeIntentV7performQryYaKFQOy_Qo_", + "substitutedMangledTypeName": "11OutputProbe05OpensB6IntentV7performQryYaKFQOy_Qo_", "substitutedTypeName": "some AppIntents.OpensIntent", "typeAliasName": "PerformResult" }, @@ -270,7 +270,7 @@ "AppIntents.ParameterSummary" ], "opaqueTypeSameTypeRequirements": [], - "substitutedMangledTypeName": "10AppIntents0A6IntentPAAE16parameterSummaryQrvpZQOy3Sev010OpensProbeC0V_Qo_", + "substitutedMangledTypeName": "10AppIntents0A6IntentPAAE16parameterSummaryQrvpZQOy11OutputProbe05OpensgC0V_Qo_", "substitutedTypeName": "some AppIntents.ParameterSummary", "typeAliasName": "SummaryContent" } @@ -286,7 +286,7 @@ "file": "OutputProbe.swift", "kind": "struct", "line": 22, - "mangledTypeName": "3Sev16OpensProbeIntentV", + "mangledTypeName": "11OutputProbe05OpensB6IntentV", "properties": [ { "file": "OutputProbe.swift", @@ -300,32 +300,32 @@ "valueKind": "RawLiteral" } ], - "typeName": "Sev.OpensProbeIntent" + "typeName": "OutputProbe.OpensProbeIntent" }, { "allConformances": [ { - "conformanceDefiningModule": "Sev", + "conformanceDefiningModule": "OutputProbe", "protocolName": "AppIntents.AppIntent" }, { - "conformanceDefiningModule": "Sev", + "conformanceDefiningModule": "OutputProbe", "protocolName": "AppIntents.PersistentlyIdentifiable" }, { - "conformanceDefiningModule": "Sev", + "conformanceDefiningModule": "OutputProbe", "protocolName": "AppIntents._SupportsAppDependencies" }, { - "conformanceDefiningModule": "Sev", + "conformanceDefiningModule": "OutputProbe", "protocolName": "Swift.Sendable" }, { - "conformanceDefiningModule": "Sev", + "conformanceDefiningModule": "OutputProbe", "protocolName": "Swift.SendableMetatype" }, { - "conformanceDefiningModule": "Sev", + "conformanceDefiningModule": "OutputProbe", "protocolName": "Swift.BitwiseCopyable" } ], @@ -344,7 +344,7 @@ "typeAliasName": "AppIntents.IntentResult.Value" } ], - "substitutedMangledTypeName": "3Sev21AllOutputsProbeIntentV7performQryYaKFQOy_Qo_", + "substitutedMangledTypeName": "11OutputProbe010AllOutputsB6IntentV7performQryYaKFQOy_Qo_", "substitutedTypeName": "some AppIntents.OpensIntent & AppIntents.ProvidesDialog & AppIntents.ReturnsValue & AppIntents.ShowsSnippetView", "typeAliasName": "PerformResult" }, @@ -353,7 +353,7 @@ "AppIntents.ParameterSummary" ], "opaqueTypeSameTypeRequirements": [], - "substitutedMangledTypeName": "10AppIntents0A6IntentPAAE16parameterSummaryQrvpZQOy3Sev015AllOutputsProbeC0V_Qo_", + "substitutedMangledTypeName": "10AppIntents0A6IntentPAAE16parameterSummaryQrvpZQOy11OutputProbe010AllOutputsgC0V_Qo_", "substitutedTypeName": "some AppIntents.ParameterSummary", "typeAliasName": "SummaryContent" } @@ -369,7 +369,7 @@ "file": "OutputProbe.swift", "kind": "struct", "line": 27, - "mangledTypeName": "3Sev21AllOutputsProbeIntentV", + "mangledTypeName": "11OutputProbe010AllOutputsB6IntentV", "properties": [ { "file": "OutputProbe.swift", @@ -383,28 +383,28 @@ "valueKind": "RawLiteral" } ], - "typeName": "Sev.AllOutputsProbeIntent" + "typeName": "OutputProbe.AllOutputsProbeIntent" }, { "allConformances": [ { - "conformanceDefiningModule": "Sev", + "conformanceDefiningModule": "OutputProbe", "protocolName": "AppIntents.AppIntent" }, { - "conformanceDefiningModule": "Sev", + "conformanceDefiningModule": "OutputProbe", "protocolName": "AppIntents.PersistentlyIdentifiable" }, { - "conformanceDefiningModule": "Sev", + "conformanceDefiningModule": "OutputProbe", "protocolName": "AppIntents._SupportsAppDependencies" }, { - "conformanceDefiningModule": "Sev", + "conformanceDefiningModule": "OutputProbe", "protocolName": "Swift.Sendable" }, { - "conformanceDefiningModule": "Sev", + "conformanceDefiningModule": "OutputProbe", "protocolName": "Swift.SendableMetatype" } ], @@ -414,7 +414,7 @@ "AppIntents.IntentResult" ], "opaqueTypeSameTypeRequirements": [], - "substitutedMangledTypeName": "3Sev21SummaryTwoProbeIntentV7performQryYaKFQOy_Qo_", + "substitutedMangledTypeName": "11OutputProbe010SummaryTwoB6IntentV7performQryYaKFQOy_Qo_", "substitutedTypeName": "some AppIntents.IntentResult", "typeAliasName": "PerformResult" }, @@ -423,7 +423,7 @@ "AppIntents.ParameterSummary" ], "opaqueTypeSameTypeRequirements": [], - "substitutedMangledTypeName": "3Sev21SummaryTwoProbeIntentV09parameterB0QrvpZQOy_Qo_", + "substitutedMangledTypeName": "11OutputProbe010SummaryTwoB6IntentV09parameterC0QrvpZQOy_Qo_", "substitutedTypeName": "some AppIntents.ParameterSummary", "typeAliasName": "SummaryContent" } @@ -438,7 +438,7 @@ "file": "OutputProbe.swift", "kind": "struct", "line": 35, - "mangledTypeName": "3Sev21SummaryTwoProbeIntentV", + "mangledTypeName": "11OutputProbe010SummaryTwoB6IntentV", "properties": [ { "file": "OutputProbe.swift", @@ -832,13 +832,30 @@ "arguments": [ { "label": "", - "type": "AppIntents.ParameterSummaryString", + "type": "AppIntents.ParameterSummaryString", "value": { "segments": [ { "value": "Send ", "valueKind": "RawLiteral" }, + { + "value": { + "components": [ + { + "label": "$second", + "type": "AppIntents.IntentParameter" + } + ], + "path": "$second", + "rootType": "OutputProbe.SummaryTwoProbeIntent" + }, + "valueKind": "KeyPath" + }, + { + "value": " to ", + "valueKind": "RawLiteral" + }, { "value": { "components": [ @@ -848,12 +865,12 @@ } ], "path": "$first", - "rootType": "Sev.SummaryTwoProbeIntent" + "rootType": "OutputProbe.SummaryTwoProbeIntent" }, "valueKind": "KeyPath" }, { - "value": " to ", + "value": ", then ", "valueKind": "RawLiteral" }, { @@ -865,12 +882,12 @@ } ], "path": "$second", - "rootType": "Sev.SummaryTwoProbeIntent" + "rootType": "OutputProbe.SummaryTwoProbeIntent" }, "valueKind": "KeyPath" }, { - "value": "", + "value": " again", "valueKind": "RawLiteral" } ] @@ -881,35 +898,61 @@ "label": "table", "type": "Swift.Optional", "valueKind": "NilLiteral" + }, + { + "label": "", + "type": "() -> Swift.Array>", + "value": { + "members": [ + { + "element": { + "value": { + "components": [ + { + "label": "$third", + "type": "AppIntents.IntentParameter" + } + ], + "path": "$third", + "rootType": "OutputProbe.SummaryTwoProbeIntent" + }, + "valueKind": "KeyPath" + }, + "kind": "buildExpression" + } + ], + "type": "" + }, + "valueKind": "Builder" } ], - "type": "AppIntents.IntentParameterSummary" + "type": "AppIntents.IntentParameterSummary" }, "valueKind": "InitCall" } ], - "typeName": "Sev.SummaryTwoProbeIntent" + "typeName": "OutputProbe.SummaryTwoProbeIntent" }, { "allConformances": [ { - "conformanceDefiningModule": "Sev", + "conformanceDefiningModule": "OutputProbe", "protocolName": "AppIntents.AppIntent" }, { - "conformanceDefiningModule": "Sev", + "conformanceDefiningModule": "OutputProbe", "protocolName": "AppIntents.PersistentlyIdentifiable" }, { - "conformanceDefiningModule": "Sev", + "conformanceDefiningModule": "OutputProbe", "protocolName": "AppIntents._SupportsAppDependencies" }, { - "conformanceDefiningModule": "Sev", + "conformanceDefiningModule": "OutputProbe", "protocolName": "Swift.Sendable" }, { - "conformanceDefiningModule": "Sev", + "conformanceDefiningModule": "OutputProbe", "protocolName": "Swift.SendableMetatype" } ], @@ -919,7 +962,7 @@ "AppIntents.IntentResult" ], "opaqueTypeSameTypeRequirements": [], - "substitutedMangledTypeName": "3Sev25SummaryBuilderProbeIntentV7performQryYaKFQOy_Qo_", + "substitutedMangledTypeName": "11OutputProbe014SummaryBuilderB6IntentV7performQryYaKFQOy_Qo_", "substitutedTypeName": "some AppIntents.IntentResult", "typeAliasName": "PerformResult" }, @@ -928,7 +971,7 @@ "AppIntents.ParameterSummary" ], "opaqueTypeSameTypeRequirements": [], - "substitutedMangledTypeName": "3Sev25SummaryBuilderProbeIntentV09parameterB0QrvpZQOy_Qo_", + "substitutedMangledTypeName": "11OutputProbe014SummaryBuilderB6IntentV09parameterC0QrvpZQOy_Qo_", "substitutedTypeName": "some AppIntents.ParameterSummary", "typeAliasName": "SummaryContent" } @@ -942,15 +985,15 @@ ], "file": "OutputProbe.swift", "kind": "struct", - "line": 44, - "mangledTypeName": "3Sev25SummaryBuilderProbeIntentV", + "line": 46, + "mangledTypeName": "11OutputProbe014SummaryBuilderB6IntentV", "properties": [ { "file": "OutputProbe.swift", "isComputed": "false", "isStatic": "false", "label": "_first", - "line": 46, + "line": 48, "mangledTypeName": "n/a - deprecated", "type": "AppIntents.IntentParameter", "value": { @@ -996,7 +1039,7 @@ "isComputed": "false", "isStatic": "false", "label": "_second", - "line": 47, + "line": 49, "mangledTypeName": "n/a - deprecated", "type": "AppIntents.IntentParameter", "value": { @@ -1047,7 +1090,7 @@ "isComputed": "false", "isStatic": "false", "label": "_third", - "line": 48, + "line": 50, "mangledTypeName": "n/a - deprecated", "type": "AppIntents.IntentParameter", "value": { @@ -1094,7 +1137,7 @@ "isComputed": "false", "isStatic": "true", "label": "title", - "line": 45, + "line": 47, "mangledTypeName": "n/a - deprecated", "type": "Foundation.LocalizedStringResource", "value": "Summary builder", @@ -1105,7 +1148,7 @@ "isComputed": "true", "isStatic": "false", "label": "first", - "line": 46, + "line": 48, "mangledTypeName": "n/a - deprecated", "propertyWrappers": [ { @@ -1118,7 +1161,7 @@ } ], "file": "OutputProbe.swift", - "line": 46, + "line": 48, "type": "AppIntents.IntentParameter" } ], @@ -1166,7 +1209,7 @@ "isComputed": "true", "isStatic": "false", "label": "$first", - "line": 46, + "line": 48, "mangledTypeName": "n/a - deprecated", "type": "AppIntents.IntentParameter", "valueKind": "Runtime" @@ -1176,7 +1219,7 @@ "isComputed": "true", "isStatic": "false", "label": "second", - "line": 47, + "line": 49, "mangledTypeName": "n/a - deprecated", "propertyWrappers": [ { @@ -1189,7 +1232,7 @@ } ], "file": "OutputProbe.swift", - "line": 47, + "line": 49, "type": "AppIntents.IntentParameter" } ], @@ -1242,7 +1285,7 @@ "isComputed": "true", "isStatic": "false", "label": "$second", - "line": 47, + "line": 49, "mangledTypeName": "n/a - deprecated", "type": "AppIntents.IntentParameter", "valueKind": "Runtime" @@ -1252,7 +1295,7 @@ "isComputed": "true", "isStatic": "false", "label": "third", - "line": 48, + "line": 50, "mangledTypeName": "n/a - deprecated", "propertyWrappers": [ { @@ -1271,7 +1314,7 @@ } ], "file": "OutputProbe.swift", - "line": 48, + "line": 50, "type": "AppIntents.IntentParameter" } ], @@ -1320,7 +1363,7 @@ "isComputed": "true", "isStatic": "false", "label": "$third", - "line": 48, + "line": 50, "mangledTypeName": "n/a - deprecated", "type": "AppIntents.IntentParameter", "valueKind": "Runtime" @@ -1330,14 +1373,14 @@ "isComputed": "true", "isStatic": "true", "label": "parameterSummary", - "line": 49, + "line": 51, "mangledTypeName": "n/a - deprecated", "type": "some AppIntents.ParameterSummary", "value": { "arguments": [ { "label": "", - "type": "AppIntents.ParameterSummaryString", + "type": "AppIntents.ParameterSummaryString", "value": "Just text", "valueKind": "RawLiteral" }, @@ -1348,7 +1391,7 @@ }, { "label": "", - "type": "() -> Swift.Array>", + "type": "() -> Swift.Array>", "value": { "members": [ { @@ -1361,7 +1404,572 @@ } ], "path": "$third", - "rootType": "Sev.SummaryBuilderProbeIntent" + "rootType": "OutputProbe.SummaryBuilderProbeIntent" + }, + "valueKind": "KeyPath" + }, + "kind": "buildExpression" + }, + { + "element": { + "value": { + "components": [ + { + "label": "$first", + "type": "AppIntents.IntentParameter" + } + ], + "path": "$first", + "rootType": "OutputProbe.SummaryBuilderProbeIntent" + }, + "valueKind": "KeyPath" + }, + "kind": "buildExpression" + } + ], + "type": "" + }, + "valueKind": "Builder" + } + ], + "type": "AppIntents.IntentParameterSummary" + }, + "valueKind": "InitCall" + } + ], + "typeName": "OutputProbe.SummaryBuilderProbeIntent" + }, + { + "allConformances": [ + { + "conformanceDefiningModule": "OutputProbe", + "protocolName": "AppIntents.AppIntent" + }, + { + "conformanceDefiningModule": "OutputProbe", + "protocolName": "AppIntents.PersistentlyIdentifiable" + }, + { + "conformanceDefiningModule": "OutputProbe", + "protocolName": "AppIntents._SupportsAppDependencies" + }, + { + "conformanceDefiningModule": "OutputProbe", + "protocolName": "Swift.Sendable" + }, + { + "conformanceDefiningModule": "OutputProbe", + "protocolName": "Swift.SendableMetatype" + }, + { + "conformanceDefiningModule": "OutputProbe", + "protocolName": "Swift.BitwiseCopyable" + } + ], + "associatedTypeAliases": [ + { + "opaqueTypeProtocolRequirements": [ + "AppIntents.ProvidesDialog", + "AppIntents.ReturnsValue" + ], + "opaqueTypeSameTypeRequirements": [ + { + "substitutedMangledTypeName": "SS", + "substitutedTypeName": "Swift.String", + "typeAliasName": "AppIntents.IntentResult.Value" + } + ], + "substitutedMangledTypeName": "11OutputProbe013NoSummaryTextB6IntentV7performQryYaKFQOy_Qo_", + "substitutedTypeName": "some AppIntents.ProvidesDialog & AppIntents.ReturnsValue", + "typeAliasName": "PerformResult" + }, + { + "opaqueTypeProtocolRequirements": [ + "AppIntents.ParameterSummary" + ], + "opaqueTypeSameTypeRequirements": [], + "substitutedMangledTypeName": "11OutputProbe013NoSummaryTextB6IntentV09parameterD0QrvpZQOy_Qo_", + "substitutedTypeName": "some AppIntents.ParameterSummary", + "typeAliasName": "SummaryContent" + } + ], + "conformances": [ + "AppIntents.AppIntent", + "AppIntents.PersistentlyIdentifiable", + "AppIntents._SupportsAppDependencies", + "Swift.Sendable", + "Swift.SendableMetatype", + "Swift.BitwiseCopyable" + ], + "file": "OutputProbe.swift", + "kind": "struct", + "line": 60, + "mangledTypeName": "11OutputProbe013NoSummaryTextB6IntentV", + "properties": [ + { + "file": "OutputProbe.swift", + "isComputed": "false", + "isStatic": "true", + "label": "title", + "line": 61, + "mangledTypeName": "n/a - deprecated", + "type": "Foundation.LocalizedStringResource", + "value": "No summary text", + "valueKind": "RawLiteral" + }, + { + "file": "OutputProbe.swift", + "isComputed": "true", + "isStatic": "true", + "label": "parameterSummary", + "line": 62, + "mangledTypeName": "n/a - deprecated", + "type": "some AppIntents.ParameterSummary", + "value": { + "arguments": [], + "type": "AppIntents.IntentParameterSummary" + }, + "valueKind": "InitCall" + } + ], + "typeName": "OutputProbe.NoSummaryTextProbeIntent" + }, + { + "allConformances": [ + { + "conformanceDefiningModule": "OutputProbe", + "protocolName": "AppIntents.AppIntent" + }, + { + "conformanceDefiningModule": "OutputProbe", + "protocolName": "AppIntents.PersistentlyIdentifiable" + }, + { + "conformanceDefiningModule": "OutputProbe", + "protocolName": "AppIntents._SupportsAppDependencies" + }, + { + "conformanceDefiningModule": "OutputProbe", + "protocolName": "Swift.Sendable" + }, + { + "conformanceDefiningModule": "OutputProbe", + "protocolName": "Swift.SendableMetatype" + }, + { + "conformanceDefiningModule": "OutputProbe", + "protocolName": "Swift.BitwiseCopyable" + } + ], + "associatedTypeAliases": [ + { + "opaqueTypeProtocolRequirements": [ + "AppIntents.IntentResult" + ], + "opaqueTypeSameTypeRequirements": [], + "substitutedMangledTypeName": "11OutputProbe016EmptySummaryTextB6IntentV7performQryYaKFQOy_Qo_", + "substitutedTypeName": "some AppIntents.IntentResult", + "typeAliasName": "PerformResult" + }, + { + "opaqueTypeProtocolRequirements": [ + "AppIntents.ParameterSummary" + ], + "opaqueTypeSameTypeRequirements": [], + "substitutedMangledTypeName": "11OutputProbe016EmptySummaryTextB6IntentV09parameterD0QrvpZQOy_Qo_", + "substitutedTypeName": "some AppIntents.ParameterSummary", + "typeAliasName": "SummaryContent" + } + ], + "conformances": [ + "AppIntents.AppIntent", + "AppIntents.PersistentlyIdentifiable", + "AppIntents._SupportsAppDependencies", + "Swift.Sendable", + "Swift.SendableMetatype", + "Swift.BitwiseCopyable" + ], + "file": "OutputProbe.swift", + "kind": "struct", + "line": 68, + "mangledTypeName": "11OutputProbe016EmptySummaryTextB6IntentV", + "properties": [ + { + "file": "OutputProbe.swift", + "isComputed": "false", + "isStatic": "true", + "label": "title", + "line": 69, + "mangledTypeName": "n/a - deprecated", + "type": "Foundation.LocalizedStringResource", + "value": "Empty summary text", + "valueKind": "RawLiteral" + }, + { + "file": "OutputProbe.swift", + "isComputed": "true", + "isStatic": "true", + "label": "parameterSummary", + "line": 70, + "mangledTypeName": "n/a - deprecated", + "type": "some AppIntents.ParameterSummary", + "value": { + "arguments": [ + { + "label": "", + "type": "AppIntents.ParameterSummaryString", + "value": "", + "valueKind": "RawLiteral" + }, + { + "label": "table", + "type": "Swift.Optional", + "valueKind": "NilLiteral" + } + ], + "type": "AppIntents.IntentParameterSummary" + }, + "valueKind": "InitCall" + } + ], + "typeName": "OutputProbe.EmptySummaryTextProbeIntent" + }, + { + "allConformances": [ + { + "conformanceDefiningModule": "OutputProbe", + "protocolName": "AppIntents.AppIntent" + }, + { + "conformanceDefiningModule": "OutputProbe", + "protocolName": "AppIntents.PersistentlyIdentifiable" + }, + { + "conformanceDefiningModule": "OutputProbe", + "protocolName": "AppIntents._SupportsAppDependencies" + }, + { + "conformanceDefiningModule": "OutputProbe", + "protocolName": "Swift.Sendable" + }, + { + "conformanceDefiningModule": "OutputProbe", + "protocolName": "Swift.SendableMetatype" + } + ], + "associatedTypeAliases": [ + { + "opaqueTypeProtocolRequirements": [ + "AppIntents.IntentResult" + ], + "opaqueTypeSameTypeRequirements": [], + "substitutedMangledTypeName": "11OutputProbe021SummaryParametersOnlyB6IntentV7performQryYaKFQOy_Qo_", + "substitutedTypeName": "some AppIntents.IntentResult", + "typeAliasName": "PerformResult" + }, + { + "opaqueTypeProtocolRequirements": [ + "AppIntents.ParameterSummary" + ], + "opaqueTypeSameTypeRequirements": [], + "substitutedMangledTypeName": "11OutputProbe021SummaryParametersOnlyB6IntentV09parameterC0QrvpZQOy_Qo_", + "substitutedTypeName": "some AppIntents.ParameterSummary", + "typeAliasName": "SummaryContent" + } + ], + "conformances": [ + "AppIntents.AppIntent", + "AppIntents.PersistentlyIdentifiable", + "AppIntents._SupportsAppDependencies", + "Swift.Sendable", + "Swift.SendableMetatype" + ], + "file": "OutputProbe.swift", + "kind": "struct", + "line": 74, + "mangledTypeName": "11OutputProbe021SummaryParametersOnlyB6IntentV", + "properties": [ + { + "file": "OutputProbe.swift", + "isComputed": "false", + "isStatic": "false", + "label": "_first", + "line": 76, + "mangledTypeName": "n/a - deprecated", + "type": "AppIntents.IntentParameter", + "value": { + "arguments": [ + { + "label": "title", + "type": "Foundation.LocalizedStringResource", + "value": "First", + "valueKind": "RawLiteral" + }, + { + "label": "description", + "type": "Swift.Optional", + "valueKind": "NilLiteral" + }, + { + "label": "default", + "type": "Swift.Optional", + "valueKind": "NilLiteral" + }, + { + "label": "inputOptions", + "type": "Swift.Optional", + "valueKind": "NilLiteral" + }, + { + "label": "requestValueDialog", + "type": "Swift.Optional", + "valueKind": "NilLiteral" + }, + { + "label": "inputConnectionBehavior", + "type": "AppIntents.InputConnectionBehavior", + "valueKind": "Runtime" + } + ], + "type": "AppIntents.IntentParameter" + }, + "valueKind": "InitCall" + }, + { + "file": "OutputProbe.swift", + "isComputed": "false", + "isStatic": "false", + "label": "_second", + "line": 77, + "mangledTypeName": "n/a - deprecated", + "type": "AppIntents.IntentParameter", + "value": { + "arguments": [ + { + "label": "title", + "type": "Foundation.LocalizedStringResource", + "value": "Second", + "valueKind": "RawLiteral" + }, + { + "label": "description", + "type": "Swift.Optional", + "valueKind": "NilLiteral" + }, + { + "label": "default", + "type": "Swift.Optional", + "valueKind": "NilLiteral" + }, + { + "label": "controlStyle", + "type": "AppIntents.IntentParameter.IntControlStyle", + "valueKind": "Runtime" + }, + { + "label": "inclusiveRange", + "type": "Swift.Optional<(lowerBound: Swift.Int, upperBound: Swift.Int)>", + "valueKind": "NilLiteral" + }, + { + "label": "requestValueDialog", + "type": "Swift.Optional", + "valueKind": "NilLiteral" + }, + { + "label": "inputConnectionBehavior", + "type": "AppIntents.InputConnectionBehavior", + "valueKind": "Runtime" + } + ], + "type": "AppIntents.IntentParameter" + }, + "valueKind": "InitCall" + }, + { + "file": "OutputProbe.swift", + "isComputed": "false", + "isStatic": "true", + "label": "title", + "line": 75, + "mangledTypeName": "n/a - deprecated", + "type": "Foundation.LocalizedStringResource", + "value": "Summary parameters only", + "valueKind": "RawLiteral" + }, + { + "file": "OutputProbe.swift", + "isComputed": "true", + "isStatic": "false", + "label": "first", + "line": 76, + "mangledTypeName": "n/a - deprecated", + "propertyWrappers": [ + { + "arguments": [ + { + "label": "title", + "type": "Foundation.LocalizedStringResource", + "value": "First", + "valueKind": "RawLiteral" + } + ], + "file": "OutputProbe.swift", + "line": 76, + "type": "AppIntents.IntentParameter" + } + ], + "type": "Swift.String", + "value": { + "arguments": [ + { + "label": "title", + "type": "Foundation.LocalizedStringResource", + "value": "First", + "valueKind": "RawLiteral" + }, + { + "label": "description", + "type": "Swift.Optional", + "valueKind": "NilLiteral" + }, + { + "label": "default", + "type": "Swift.Optional", + "valueKind": "NilLiteral" + }, + { + "label": "inputOptions", + "type": "Swift.Optional", + "valueKind": "NilLiteral" + }, + { + "label": "requestValueDialog", + "type": "Swift.Optional", + "valueKind": "NilLiteral" + }, + { + "label": "inputConnectionBehavior", + "type": "AppIntents.InputConnectionBehavior", + "valueKind": "Runtime" + } + ], + "type": "AppIntents.IntentParameter" + }, + "valueKind": "InitCall" + }, + { + "file": "OutputProbe.swift", + "isComputed": "true", + "isStatic": "false", + "label": "$first", + "line": 76, + "mangledTypeName": "n/a - deprecated", + "type": "AppIntents.IntentParameter", + "valueKind": "Runtime" + }, + { + "file": "OutputProbe.swift", + "isComputed": "true", + "isStatic": "false", + "label": "second", + "line": 77, + "mangledTypeName": "n/a - deprecated", + "propertyWrappers": [ + { + "arguments": [ + { + "label": "title", + "type": "Foundation.LocalizedStringResource", + "value": "Second", + "valueKind": "RawLiteral" + } + ], + "file": "OutputProbe.swift", + "line": 77, + "type": "AppIntents.IntentParameter" + } + ], + "type": "Swift.Int", + "value": { + "arguments": [ + { + "label": "title", + "type": "Foundation.LocalizedStringResource", + "value": "Second", + "valueKind": "RawLiteral" + }, + { + "label": "description", + "type": "Swift.Optional", + "valueKind": "NilLiteral" + }, + { + "label": "default", + "type": "Swift.Optional", + "valueKind": "NilLiteral" + }, + { + "label": "controlStyle", + "type": "AppIntents.IntentParameter.IntControlStyle", + "valueKind": "Runtime" + }, + { + "label": "inclusiveRange", + "type": "Swift.Optional<(lowerBound: Swift.Int, upperBound: Swift.Int)>", + "valueKind": "NilLiteral" + }, + { + "label": "requestValueDialog", + "type": "Swift.Optional", + "valueKind": "NilLiteral" + }, + { + "label": "inputConnectionBehavior", + "type": "AppIntents.InputConnectionBehavior", + "valueKind": "Runtime" + } + ], + "type": "AppIntents.IntentParameter" + }, + "valueKind": "InitCall" + }, + { + "file": "OutputProbe.swift", + "isComputed": "true", + "isStatic": "false", + "label": "$second", + "line": 77, + "mangledTypeName": "n/a - deprecated", + "type": "AppIntents.IntentParameter", + "valueKind": "Runtime" + }, + { + "file": "OutputProbe.swift", + "isComputed": "true", + "isStatic": "true", + "label": "parameterSummary", + "line": 78, + "mangledTypeName": "n/a - deprecated", + "type": "some AppIntents.ParameterSummary", + "value": { + "arguments": [ + { + "label": "", + "type": "() -> Swift.Array>", + "value": { + "members": [ + { + "element": { + "value": { + "components": [ + { + "label": "$second", + "type": "AppIntents.IntentParameter" + } + ], + "path": "$second", + "rootType": "OutputProbe.SummaryParametersOnlyProbeIntent" }, "valueKind": "KeyPath" }, @@ -1377,7 +1985,7 @@ } ], "path": "$first", - "rootType": "Sev.SummaryBuilderProbeIntent" + "rootType": "OutputProbe.SummaryParametersOnlyProbeIntent" }, "valueKind": "KeyPath" }, @@ -1389,11 +1997,11 @@ "valueKind": "Builder" } ], - "type": "AppIntents.IntentParameterSummary" + "type": "AppIntents.IntentParameterSummary" }, "valueKind": "InitCall" } ], - "typeName": "Sev.SummaryBuilderProbeIntent" + "typeName": "OutputProbe.SummaryParametersOnlyProbeIntent" } ] diff --git a/sweetpad-cli/fixtures/appintents/README.md b/sweetpad-cli/fixtures/appintents/README.md index 82e5562a..e9dfb24d 100644 --- a/sweetpad-cli/fixtures/appintents/README.md +++ b/sweetpad-cli/fixtures/appintents/README.md @@ -18,10 +18,12 @@ It ignores native phrase order and generation timestamps. Registration covers basic intents, primitive parameters, enums, entities, queries, widget configuration, authentication policies, App Shortcuts, -`String.IntentInputOptions`, output flags, and plain parameter summaries -(`*.actions.json` hold the probes' actions only). +`String.IntentInputOptions`, output flags, and plain parameter summaries. +The input options probe covers scalar strings, arrays, and sets. The summary +probes cover omitted text, an explicit empty string, interpolation, and a +trailing list of parameters. The `*.actions.json` files hold the probe actions. Assistant schemas, explicit supported modes, other custom parameter options, -conditional parameter summaries, -and dependency metadata currently stop extraction with an error. +conditional summaries, summaries with a localization table, and dependency +metadata currently stop extraction with an error. Localized shortcut phrase models and availability-specific metadata need more coverage. These captures establish format compatibility, not device registration or Siri behavior. diff --git a/sweetpad-cli/fixtures/appintents/regen.py b/sweetpad-cli/fixtures/appintents/regen.py index db49e01d..d972604e 100644 --- a/sweetpad-cli/fixtures/appintents/regen.py +++ b/sweetpad-cli/fixtures/appintents/regen.py @@ -4,9 +4,10 @@ DEVELOPER_DIR=/Applications/Xcode.app/Contents/Developer python3 -I sweetpad-cli/fixtures/appintents/regen.py -Only source paths and JSON formatting are normalized. Rust tests normalize the -generator and the order of the native resolver sets. The SSU test compares its -semantic contents because native training adds a timestamp and reorders phrases. +The captures normalize source paths and JSON formatting. Rust tests also +normalize the generator identity, resolver sets, and metadata key/value order. +The SSU test compares phrases because native training adds a timestamp and +reorders phrases. """ import ctypes diff --git a/sweetpad-cli/src/cli/appintents/metadata.rs b/sweetpad-cli/src/cli/appintents/metadata.rs index d0a818ee..aa964cb9 100644 --- a/sweetpad-cli/src/cli/appintents/metadata.rs +++ b/sweetpad-cli/src/cli/appintents/metadata.rs @@ -247,7 +247,10 @@ fn action(value: &Value, types: &[Value]) -> Result { /// plus the parameters its trailing builder lists. Conditional summaries /// (`When`, `Switch`) and localization tables are not supported yet. fn action_summary(value: &Value, id: &str) -> Result, String> { - let Some(summary) = property(value, "parameterSummary") else { + let Some(summary) = properties(value) + .iter() + .find(|p| p["label"] == "parameterSummary" && p["isStatic"] == "true") + else { return Ok(None); }; let unsupported = |what: &str| format!("unsupported parameterSummary {what} in intent '{id}'"); @@ -259,11 +262,14 @@ fn action_summary(value: &Value, id: &str) -> Result, String> { text(&summary["value"]["type"]) ))); } - let (mut string, mut inline, mut other) = (String::new(), Vec::new(), Vec::new()); + let mut format = None; + let mut inline = Vec::new(); + let mut other = Vec::new(); for argument in array(&summary["value"]["arguments"]) { match (text(&argument["label"]), text(&argument["valueKind"])) { - ("", "RawLiteral") => string.push_str(text(&argument["value"])), + ("", "RawLiteral") => format = Some(text(&argument["value"]).to_owned()), ("", "InterpolatedStringLiteral") => { + let mut string = String::new(); for segment in array(&argument["value"]["segments"]) { if segment["valueKind"] == "RawLiteral" { string.push_str(text(&segment["value"])); @@ -273,6 +279,7 @@ fn action_summary(value: &Value, id: &str) -> Result, String> { inline.push(name); } } + format = Some(string); } ("", "Builder") => { for member in array(&argument["value"]["members"]) { @@ -287,10 +294,11 @@ fn action_summary(value: &Value, id: &str) -> Result, String> { (label, _) => return Err(unsupported(&format!("argument '{label}'"))), } } - Ok(Some(json!({"actionSummary":{"wrapper":{ - "otherParameterIdentifiers":other, - "summaryString":{"formatString":string,"parameterIdentifiers":inline}, - }}}))) + let mut wrapper = json!({"otherParameterIdentifiers":other}); + if let Some(format) = format { + wrapper["summaryString"] = json!({"formatString":format,"parameterIdentifiers":inline}); + } + Ok(Some(json!({"actionSummary":{"wrapper":wrapper}}))) } /// A `\.$name` key path to one of the intent's parameters. @@ -490,12 +498,18 @@ mod tests { .unwrap_err() .contains("unsupported parameterSummary argument 'table'") ); - summary(&mut types)["value"]["type"] = json!("AppIntents.ParameterSummaryWhenCondition"); - assert!( - extract(&types).unwrap_err().contains( - "unsupported parameterSummary 'AppIntents.ParameterSummaryWhenCondition'" - ) - ); + for condition in [ + "ParameterSummaryWhenCondition", + "ParameterSummarySwitchCondition", + ] { + let kind = format!("AppIntents.{condition}"); + summary(&mut types)["value"]["type"] = json!(kind); + assert!( + extract(&types) + .unwrap_err() + .contains(&format!("unsupported parameterSummary '{kind}'")) + ); + } } #[test] fn input_options_reject_what_they_cannot_encode() { @@ -545,5 +559,11 @@ mod tests { .unwrap()["typeSpecificMetadata"] .clone(); assert!(!metadata.to_string().contains("StringMultiline")); + options(&mut types)["value"]["arguments"][2]["label"] = json!("futureOption"); + assert!( + extract(&types) + .unwrap_err() + .contains("unsupported inputOptions argument 'futureOption'") + ); } } diff --git a/sweetpad-cli/src/cli/appintents/metadata/parameters.rs b/sweetpad-cli/src/cli/appintents/metadata/parameters.rs index c2180277..956b06b8 100644 --- a/sweetpad-cli/src/cli/appintents/metadata/parameters.rs +++ b/sweetpad-cli/src/cli/appintents/metadata/parameters.rs @@ -9,19 +9,19 @@ pub(super) fn optional(name: &str) -> (&str, bool) { fn primitive(id: u64) -> Value { json!({"primitive":{"wrapper":{"typeIdentifier":id}}}) } -fn array_type(member: Value) -> Value { - let mut value = json!({"array":{"wrapper":{"capabilities":3}}}); +fn array_type(member: Value, capabilities: u8) -> Value { + let mut value = json!({"array":{"wrapper":{"capabilities":capabilities}}}); value["array"]["wrapper"]["memberValueType"] = member; value } pub(super) fn value_type(name: &str, types: &[Value]) -> Result { let (name, _) = optional(name); - if let Some(member) = name - .strip_prefix("Swift.Array<") - .and_then(|n| n.strip_suffix('>')) - { - return value_type(member, types).map(array_type); + // Both use the array representation, with distinct native capability masks. + for (prefix, capabilities) in [("Swift.Array<", 3), ("Swift.Set<", 0)] { + if let Some(member) = name.strip_prefix(prefix).and_then(|n| n.strip_suffix('>')) { + return Ok(array_type(value_type(member, types)?, capabilities)); + } } let id = match name { "Swift.String" => Some(0), @@ -175,7 +175,11 @@ fn input_options(arguments: &[Value], parameter: &mut Value) -> Result<(), Strin else { return Ok(()); }; - if parameter["valueType"]["primitive"]["wrapper"]["typeIdentifier"] != 0 { + let kind = ¶meter["valueType"]; + let member = kind + .pointer("/array/wrapper/memberValueType") + .unwrap_or(kind); + if member["primitive"]["wrapper"]["typeIdentifier"] != 0 { return Err("inputOptions requires a String parameter".into()); } if options["valueKind"] != "InitCall" @@ -185,9 +189,6 @@ fn input_options(arguments: &[Value], parameter: &mut Value) -> Result<(), Strin } let mut metadata = Vec::new(); for option in array(&options["value"]["arguments"]) { - if option["valueKind"] == "Runtime" { - continue; - } let label = text(&option["label"]); let (key, cases): (&str, &[&str]) = match label { "keyboardType" => ("KeyboardType", &KEYBOARD_TYPES), @@ -198,6 +199,9 @@ fn input_options(arguments: &[Value], parameter: &mut Value) -> Result<(), Strin "smartDashes" => ("SmartDashes", &["false", "true"]), _ => return Err(format!("unsupported inputOptions argument '{label}'")), }; + if option["valueKind"] == "Runtime" { + continue; + } let (expected, name) = if label.ends_with("Type") { ("Enum", text(&option["value"]["name"])) } else { @@ -234,7 +238,7 @@ fn resolvers(kind: &Value) -> Vec { .map(|id| json!({"kindValue":0,"valueType":primitive(*id)})) .collect(); if kind["primitive"]["wrapper"]["typeIdentifier"] == 0 { - types.push(json!({"kindValue":0,"valueType":array_type(primitive(2))})); + types.push(json!({"kindValue":0,"valueType":array_type(primitive(2), 3)})); } types } diff --git a/sweetpad-lib/ci/bundle_comparison.py b/sweetpad-lib/ci/bundle_comparison.py index 2ffa2ba3..450f9994 100644 --- a/sweetpad-lib/ci/bundle_comparison.py +++ b/sweetpad-lib/ci/bundle_comparison.py @@ -49,6 +49,11 @@ def normalize_registration(value): result = {k: normalize_registration(v) for k, v in value.items() if k != "generator"} if "resolvableInputTypes" in result: result["resolvableInputTypes"].sort(key=lambda v: json.dumps(v, sort_keys=True)) + metadata = result.get("typeSpecificMetadata") + if isinstance(metadata, list) and len(metadata) % 2 == 0: + # Xcode serializes its dictionary as alternating keys and values in hash order. + pairs = sorted(zip(metadata[::2], metadata[1::2]), key=lambda pair: json.dumps(pair[0], sort_keys=True)) + result["typeSpecificMetadata"] = [item for pair in pairs for item in pair] return result if isinstance(value, list): return [normalize_registration(v) for v in value] diff --git a/sweetpad-lib/ci/test_linux_project_checks.py b/sweetpad-lib/ci/test_linux_project_checks.py index 4bb327a5..1d54916e 100644 --- a/sweetpad-lib/ci/test_linux_project_checks.py +++ b/sweetpad-lib/ci/test_linux_project_checks.py @@ -62,6 +62,24 @@ def test_failed_export_keeps_previous_product(self): class ComparisonTests(unittest.TestCase): + def test_registration_compares_input_options_by_key(self): + with tempfile.TemporaryDirectory() as tmp: + native, linux = self.bundles(Path(tmp), {"CFBundleIdentifier": "example"}) + off, on = {"int": {"wrapper": 0}}, {"int": {"wrapper": 1}} + quotes, dashes = "LNValueTypeMetadataKeyStringSmartQuotes", "LNValueTypeMetadataKeyStringSmartDashes" + + def write_options(bundle, pairs): + metadata = bundle / "Metadata.appintents" + metadata.mkdir(exist_ok=True) + action = {"parameters": [{"name": "text", "typeSpecificMetadata": pairs}]} + (metadata / "extract.actionsdata").write_text(json.dumps({"actions": {"Input": action}})) + + write_options(native, [quotes, on, dashes, off]) + write_options(linux, [dashes, off, quotes, on]) + self.assertTrue(checks.compare(native, linux)["passed"]) + write_options(linux, [dashes, on, quotes, off]) + self.assertIn("appIntents", {f["kind"] for f in checks.compare(native, linux)["findings"]}) + def shortcut_models(self, native, linux): source = checks.REPO / "sweetpad-cli/fixtures/appintents/DataApp.nlu" data = source.read_bytes() From b598a9762547557e879b78c20bc2c88ec909aa56 Mon Sep 17 00:00:00 2001 From: Yevhenii Hyzyla Date: Sat, 28 Nov 2026 00:22:30 +0100 Subject: [PATCH 4/7] Match Xcode registration for interactive snippet intents and result combinations --- .../appintents/ResultProtocols.actionsdata | 721 +++++++++ .../fixtures/appintents/ResultProtocols.swift | 75 + .../ResultProtocols.swiftconstvalues | 1392 +++++++++++++++++ .../fixtures/appintents/Unsupported.swift | 44 + .../appintents/Unsupported.swiftconstvalues | 1209 ++++++++++++++ sweetpad-cli/fixtures/appintents/regen.py | 52 +- sweetpad-cli/src/cli/appintents/metadata.rs | 184 ++- .../src/cli/appintents/metadata/parameters.rs | 5 +- 8 files changed, 3618 insertions(+), 64 deletions(-) create mode 100644 sweetpad-cli/fixtures/appintents/ResultProtocols.actionsdata create mode 100644 sweetpad-cli/fixtures/appintents/ResultProtocols.swift create mode 100644 sweetpad-cli/fixtures/appintents/ResultProtocols.swiftconstvalues create mode 100644 sweetpad-cli/fixtures/appintents/Unsupported.swift create mode 100644 sweetpad-cli/fixtures/appintents/Unsupported.swiftconstvalues diff --git a/sweetpad-cli/fixtures/appintents/ResultProtocols.actionsdata b/sweetpad-cli/fixtures/appintents/ResultProtocols.actionsdata new file mode 100644 index 00000000..69ff1f5d --- /dev/null +++ b/sweetpad-cli/fixtures/appintents/ResultProtocols.actionsdata @@ -0,0 +1,721 @@ +{ + "actions": { + "ConfirmProbe": { + "assistantDefinedSchemaTraits": [], + "assistantDefinedSchemas": [], + "authenticationPolicy": 0, + "availabilityAnnotations": { + "LNPlatformNameWildcard": { + "introducedVersion": "*" + } + }, + "effectiveBundleIdentifiers": [], + "fullyQualifiedTypeName": "ResultProtocols.ConfirmProbe", + "identifier": "ConfirmProbe", + "isAuthPolExplicit": false, + "isDiscoverable": true, + "mangledTypeName": "15ResultProtocols12ConfirmProbeV", + "mangledTypeNameByBundleIdentifier": {}, + "mangledTypeNameByBundleIdentifierV2": {}, + "mangledTypeNameV2": "15ResultProtocols12ConfirmProbeV", + "openAppWhenRun": false, + "outputFlags": 0, + "parameters": [ + { + "capabilities": 0, + "dynamicOptionsSupport": 0, + "inputConnectionBehavior": 0, + "isInput": false, + "isOptional": true, + "name": "text", + "resolvableInputTypes": [ + { + "kindValue": 0, + "valueType": { + "array": { + "wrapper": { + "capabilities": 3, + "memberValueType": { + "primitive": { + "wrapper": { + "typeIdentifier": 2 + } + } + } + } + } + } + }, + { + "kindValue": 0, + "valueType": { + "primitive": { + "wrapper": { + "typeIdentifier": 0 + } + } + } + }, + { + "kindValue": 0, + "valueType": { + "primitive": { + "wrapper": { + "typeIdentifier": 2 + } + } + } + } + ], + "title": { + "alternatives": [], + "key": "Text" + }, + "typeSpecificMetadata": [], + "valueType": { + "primitive": { + "wrapper": { + "typeIdentifier": 0 + } + } + } + } + ], + "presentationStyle": 0, + "requiredCapabilities": [], + "supportedModes": 1, + "systemProtocolMetadata": [], + "systemProtocolMetadataV2": [], + "systemProtocols": [], + "title": { + "alternatives": [], + "key": "Confirm" + }, + "typeSpecificMetadata": [], + "visibilityMetadata": { + "assistantOnly": false, + "isDiscoverable": true + } + }, + "ConfirmationSnippet": { + "assistantDefinedSchemaTraits": [], + "assistantDefinedSchemas": [], + "authenticationPolicy": 0, + "availabilityAnnotations": { + "LNPlatformNameIOS": { + "introducedVersion": "26.0" + }, + "LNPlatformNameMACOS": { + "introducedVersion": "26.0" + }, + "LNPlatformNameTVOS": { + "introducedVersion": "26.0" + }, + "LNPlatformNameVISIONOS": { + "introducedVersion": "26.0" + }, + "LNPlatformNameWATCHOS": { + "introducedVersion": "26.0" + }, + "LNPlatformNameWildcard": { + "introducedVersion": "*" + } + }, + "effectiveBundleIdentifiers": [], + "fullyQualifiedTypeName": "ResultProtocols.ConfirmationSnippet", + "identifier": "ConfirmationSnippet", + "isAuthPolExplicit": false, + "isDiscoverable": false, + "mangledTypeName": "15ResultProtocols19ConfirmationSnippetV", + "mangledTypeNameByBundleIdentifier": {}, + "mangledTypeNameByBundleIdentifierV2": {}, + "mangledTypeNameV2": "15ResultProtocols19ConfirmationSnippetV", + "openAppWhenRun": false, + "outputFlags": 2, + "parameters": [], + "presentationStyle": 0, + "requiredCapabilities": [], + "supportedModes": 1, + "systemProtocolMetadata": [ + "com.apple.link.systemProtocol.Snippet", + { + "empty": {} + } + ], + "systemProtocolMetadataV2": [ + "com.apple.link.systemProtocol.Snippet", + { + "empty": {} + } + ], + "systemProtocols": [ + "com.apple.link.systemProtocol.Snippet" + ], + "title": { + "alternatives": [], + "key": "Confirmation snippet" + }, + "typeSpecificMetadata": [], + "visibilityMetadata": { + "assistantOnly": false, + "isDiscoverable": false + } + }, + "ConnectionProbe": { + "assistantDefinedSchemaTraits": [], + "assistantDefinedSchemas": [], + "authenticationPolicy": 0, + "availabilityAnnotations": { + "LNPlatformNameWildcard": { + "introducedVersion": "*" + } + }, + "effectiveBundleIdentifiers": [], + "fullyQualifiedTypeName": "ResultProtocols.ConnectionProbe", + "identifier": "ConnectionProbe", + "isAuthPolExplicit": false, + "isDiscoverable": true, + "mangledTypeName": "15ResultProtocols15ConnectionProbeV", + "mangledTypeNameByBundleIdentifier": {}, + "mangledTypeNameByBundleIdentifierV2": {}, + "mangledTypeNameV2": "15ResultProtocols15ConnectionProbeV", + "openAppWhenRun": false, + "outputFlags": 0, + "parameters": [ + { + "capabilities": 0, + "dynamicOptionsSupport": 0, + "inputConnectionBehavior": 0, + "isInput": false, + "isOptional": true, + "name": "automatic", + "resolvableInputTypes": [ + { + "kindValue": 0, + "valueType": { + "array": { + "wrapper": { + "capabilities": 3, + "memberValueType": { + "primitive": { + "wrapper": { + "typeIdentifier": 2 + } + } + } + } + } + } + }, + { + "kindValue": 0, + "valueType": { + "primitive": { + "wrapper": { + "typeIdentifier": 0 + } + } + } + }, + { + "kindValue": 0, + "valueType": { + "primitive": { + "wrapper": { + "typeIdentifier": 2 + } + } + } + } + ], + "title": { + "alternatives": [], + "key": "Default" + }, + "typeSpecificMetadata": [], + "valueType": { + "primitive": { + "wrapper": { + "typeIdentifier": 0 + } + } + } + }, + { + "capabilities": 0, + "dynamicOptionsSupport": 0, + "inputConnectionBehavior": 1, + "isInput": false, + "isOptional": true, + "name": "never", + "resolvableInputTypes": [ + { + "kindValue": 0, + "valueType": { + "array": { + "wrapper": { + "capabilities": 3, + "memberValueType": { + "primitive": { + "wrapper": { + "typeIdentifier": 2 + } + } + } + } + } + } + }, + { + "kindValue": 0, + "valueType": { + "primitive": { + "wrapper": { + "typeIdentifier": 0 + } + } + } + }, + { + "kindValue": 0, + "valueType": { + "primitive": { + "wrapper": { + "typeIdentifier": 2 + } + } + } + } + ], + "title": { + "alternatives": [], + "key": "Never" + }, + "typeSpecificMetadata": [], + "valueType": { + "primitive": { + "wrapper": { + "typeIdentifier": 0 + } + } + } + }, + { + "capabilities": 0, + "dynamicOptionsSupport": 0, + "inputConnectionBehavior": 2, + "isInput": true, + "isOptional": true, + "name": "previous", + "resolvableInputTypes": [ + { + "kindValue": 0, + "valueType": { + "array": { + "wrapper": { + "capabilities": 3, + "memberValueType": { + "primitive": { + "wrapper": { + "typeIdentifier": 2 + } + } + } + } + } + } + }, + { + "kindValue": 0, + "valueType": { + "primitive": { + "wrapper": { + "typeIdentifier": 0 + } + } + } + }, + { + "kindValue": 0, + "valueType": { + "primitive": { + "wrapper": { + "typeIdentifier": 2 + } + } + } + } + ], + "title": { + "alternatives": [], + "key": "Previous" + }, + "typeSpecificMetadata": [], + "valueType": { + "primitive": { + "wrapper": { + "typeIdentifier": 0 + } + } + } + } + ], + "presentationStyle": 0, + "requiredCapabilities": [], + "supportedModes": 1, + "systemProtocolMetadata": [], + "systemProtocolMetadataV2": [], + "systemProtocols": [], + "title": { + "alternatives": [], + "key": "Connection behavior" + }, + "typeSpecificMetadata": [], + "visibilityMetadata": { + "assistantOnly": false, + "isDiscoverable": true + } + }, + "DiscoverableSnippet": { + "assistantDefinedSchemaTraits": [], + "assistantDefinedSchemas": [], + "authenticationPolicy": 0, + "availabilityAnnotations": { + "LNPlatformNameIOS": { + "deprecatedVersion": "27.0", + "introducedVersion": "26.0", + "obsoletedVersion": "30.0" + }, + "LNPlatformNameTVOS": { + "obsoletedVersion": "*" + }, + "LNPlatformNameWildcard": { + "introducedVersion": "*" + } + }, + "effectiveBundleIdentifiers": [], + "fullyQualifiedTypeName": "ResultProtocols.DiscoverableSnippet", + "identifier": "DiscoverableSnippet", + "isAuthPolExplicit": false, + "isDiscoverable": true, + "mangledTypeName": "15ResultProtocols19DiscoverableSnippetV", + "mangledTypeNameByBundleIdentifier": {}, + "mangledTypeNameByBundleIdentifierV2": {}, + "mangledTypeNameV2": "15ResultProtocols19DiscoverableSnippetV", + "openAppWhenRun": false, + "outputFlags": 2, + "parameters": [], + "presentationStyle": 0, + "requiredCapabilities": [], + "supportedModes": 1, + "systemProtocolMetadata": [ + "com.apple.link.systemProtocol.Snippet", + { + "empty": {} + } + ], + "systemProtocolMetadataV2": [ + "com.apple.link.systemProtocol.Snippet", + { + "empty": {} + } + ], + "systemProtocols": [ + "com.apple.link.systemProtocol.Snippet" + ], + "title": { + "alternatives": [], + "key": "Discoverable snippet" + }, + "typeSpecificMetadata": [], + "visibilityMetadata": { + "assistantOnly": false, + "isDiscoverable": true + } + }, + "InteractiveResultProbe": { + "assistantDefinedSchemaTraits": [], + "assistantDefinedSchemas": [], + "authenticationPolicy": 0, + "availabilityAnnotations": { + "LNPlatformNameIOS": { + "introducedVersion": "26.0" + }, + "LNPlatformNameWildcard": { + "introducedVersion": "*" + } + }, + "effectiveBundleIdentifiers": [], + "fullyQualifiedTypeName": "ResultProtocols.InteractiveResultProbe", + "identifier": "InteractiveResultProbe", + "isAuthPolExplicit": false, + "isDiscoverable": true, + "mangledTypeName": "15ResultProtocols011InteractiveA5ProbeV", + "mangledTypeNameByBundleIdentifier": {}, + "mangledTypeNameByBundleIdentifierV2": {}, + "mangledTypeNameV2": "15ResultProtocols011InteractiveA5ProbeV", + "openAppWhenRun": false, + "outputFlags": 32, + "parameters": [], + "presentationStyle": 0, + "requiredCapabilities": [], + "supportedModes": 1, + "systemProtocolMetadata": [], + "systemProtocolMetadataV2": [], + "systemProtocols": [], + "title": { + "alternatives": [], + "key": "Show confirmation" + }, + "typeSpecificMetadata": [], + "visibilityMetadata": { + "assistantOnly": false, + "isDiscoverable": true + } + }, + "OpensWithDialogProbe": { + "assistantDefinedSchemaTraits": [], + "assistantDefinedSchemas": [], + "authenticationPolicy": 0, + "availabilityAnnotations": { + "LNPlatformNameWildcard": { + "introducedVersion": "*" + } + }, + "effectiveBundleIdentifiers": [], + "fullyQualifiedTypeName": "ResultProtocols.OpensWithDialogProbe", + "identifier": "OpensWithDialogProbe", + "isAuthPolExplicit": false, + "isDiscoverable": true, + "mangledTypeName": "15ResultProtocols20OpensWithDialogProbeV", + "mangledTypeNameByBundleIdentifier": {}, + "mangledTypeNameByBundleIdentifierV2": {}, + "mangledTypeNameV2": "15ResultProtocols20OpensWithDialogProbeV", + "openAppWhenRun": false, + "outputFlags": 5, + "parameters": [], + "presentationStyle": 0, + "requiredCapabilities": [], + "supportedModes": 1, + "systemProtocolMetadata": [], + "systemProtocolMetadataV2": [], + "systemProtocols": [], + "title": { + "alternatives": [], + "key": "Open with dialog" + }, + "typeSpecificMetadata": [], + "visibilityMetadata": { + "assistantOnly": false, + "isDiscoverable": true + } + }, + "OpensWithViewProbe": { + "assistantDefinedSchemaTraits": [], + "assistantDefinedSchemas": [], + "authenticationPolicy": 0, + "availabilityAnnotations": { + "LNPlatformNameWildcard": { + "introducedVersion": "*" + } + }, + "effectiveBundleIdentifiers": [], + "fullyQualifiedTypeName": "ResultProtocols.OpensWithViewProbe", + "identifier": "OpensWithViewProbe", + "isAuthPolExplicit": false, + "isDiscoverable": true, + "mangledTypeName": "15ResultProtocols18OpensWithViewProbeV", + "mangledTypeNameByBundleIdentifier": {}, + "mangledTypeNameByBundleIdentifierV2": {}, + "mangledTypeNameV2": "15ResultProtocols18OpensWithViewProbeV", + "openAppWhenRun": false, + "outputFlags": 3, + "parameters": [], + "presentationStyle": 0, + "requiredCapabilities": [], + "supportedModes": 1, + "systemProtocolMetadata": [], + "systemProtocolMetadataV2": [], + "systemProtocols": [], + "title": { + "alternatives": [], + "key": "Open with view" + }, + "typeSpecificMetadata": [], + "visibilityMetadata": { + "assistantOnly": false, + "isDiscoverable": true + } + }, + "PromptProbe": { + "assistantDefinedSchemaTraits": [], + "assistantDefinedSchemas": [], + "authenticationPolicy": 0, + "availabilityAnnotations": { + "LNPlatformNameWildcard": { + "introducedVersion": "*" + } + }, + "effectiveBundleIdentifiers": [], + "fullyQualifiedTypeName": "ResultProtocols.PromptProbe", + "identifier": "PromptProbe", + "isAuthPolExplicit": false, + "isDiscoverable": true, + "mangledTypeName": "15ResultProtocols11PromptProbeV", + "mangledTypeNameByBundleIdentifier": {}, + "mangledTypeNameByBundleIdentifierV2": {}, + "mangledTypeNameV2": "15ResultProtocols11PromptProbeV", + "openAppWhenRun": false, + "outputFlags": 0, + "parameters": [ + { + "capabilities": 0, + "dynamicOptionsSupport": 0, + "inputConnectionBehavior": 0, + "isInput": false, + "isOptional": true, + "name": "text", + "resolvableInputTypes": [ + { + "kindValue": 0, + "valueType": { + "array": { + "wrapper": { + "capabilities": 3, + "memberValueType": { + "primitive": { + "wrapper": { + "typeIdentifier": 2 + } + } + } + } + } + } + }, + { + "kindValue": 0, + "valueType": { + "primitive": { + "wrapper": { + "typeIdentifier": 0 + } + } + } + }, + { + "kindValue": 0, + "valueType": { + "primitive": { + "wrapper": { + "typeIdentifier": 2 + } + } + } + } + ], + "title": { + "alternatives": [], + "key": "Text" + }, + "typeSpecificMetadata": [], + "valueType": { + "primitive": { + "wrapper": { + "typeIdentifier": 0 + } + } + } + } + ], + "presentationStyle": 0, + "requiredCapabilities": [], + "supportedModes": 1, + "systemProtocolMetadata": [], + "systemProtocolMetadataV2": [], + "systemProtocols": [], + "title": { + "alternatives": [], + "key": "Confirm" + }, + "typeSpecificMetadata": [], + "visibilityMetadata": { + "assistantOnly": false, + "isDiscoverable": true + } + }, + "ValueSnippet": { + "assistantDefinedSchemaTraits": [], + "assistantDefinedSchemas": [], + "authenticationPolicy": 0, + "availabilityAnnotations": { + "LNPlatformNameIOS": { + "introducedVersion": "26.0" + }, + "LNPlatformNameWildcard": { + "introducedVersion": "*" + } + }, + "effectiveBundleIdentifiers": [], + "fullyQualifiedTypeName": "ResultProtocols.ValueSnippet", + "identifier": "ValueSnippet", + "isAuthPolExplicit": false, + "isDiscoverable": true, + "mangledTypeName": "15ResultProtocols12ValueSnippetV", + "mangledTypeNameByBundleIdentifier": {}, + "mangledTypeNameByBundleIdentifierV2": {}, + "mangledTypeNameV2": "15ResultProtocols12ValueSnippetV", + "openAppWhenRun": false, + "outputFlags": 2, + "outputType": { + "primitive": { + "wrapper": { + "typeIdentifier": 0 + } + } + }, + "parameters": [], + "presentationStyle": 0, + "requiredCapabilities": [], + "supportedModes": 1, + "systemProtocolMetadata": [ + "com.apple.link.systemProtocol.Snippet", + { + "empty": {} + } + ], + "systemProtocolMetadataV2": [ + "com.apple.link.systemProtocol.Snippet", + { + "empty": {} + } + ], + "systemProtocols": [ + "com.apple.link.systemProtocol.Snippet" + ], + "title": { + "alternatives": [], + "key": "Snippet with a value" + }, + "typeSpecificMetadata": [], + "visibilityMetadata": { + "assistantOnly": false, + "isDiscoverable": true + } + } + }, + "assistantEntities": [], + "assistantIntentNegativePhrases": [], + "assistantIntents": [], + "autoShortcuts": [], + "entities": {}, + "enums": [], + "generator": { + "name": "xcode-tools", + "version": "27B52" + }, + "negativePhrases": [], + "queries": {}, + "shortcutTileColor": 14, + "version": 1 +} diff --git a/sweetpad-cli/fixtures/appintents/ResultProtocols.swift b/sweetpad-cli/fixtures/appintents/ResultProtocols.swift new file mode 100644 index 00000000..69593f2e --- /dev/null +++ b/sweetpad-cli/fixtures/appintents/ResultProtocols.swift @@ -0,0 +1,75 @@ +import AppIntents +import SwiftUI + +struct ConfirmProbe: AppIntent { + static let title: LocalizedStringResource = "Confirm" + @Parameter(title: "Text") var text: String? + func perform() async throws -> some IntentResult { .result() } +} + +struct PromptProbe: AppIntent { + // Keep the two actions identical except for type identity and the prompt. + static let title: LocalizedStringResource = "Confirm" + @Parameter(title: "Text", requestValueDialog: "Which text?") var text: String? + func perform() async throws -> some IntentResult { .result() } +} + +@available(iOS 26.0, macOS 26.0, tvOS 26.0, watchOS 26.0, visionOS 26.0, macCatalyst 26.0, *) +struct ConfirmationSnippet: SnippetIntent { + static let title: LocalizedStringResource = "Confirmation snippet" + @MainActor + func perform() async throws -> some IntentResult & ShowsSnippetView { + .result(view: Button("Confirm", intent: ConfirmProbe())) + } +} + +@available(iOS, introduced: 26.0, deprecated: 27.0, obsoleted: 30.0) +@available(tvOS, unavailable) +struct DiscoverableSnippet: SnippetIntent { + static let title: LocalizedStringResource = "Discoverable snippet" + static let isDiscoverable = true + @MainActor + func perform() async throws -> some IntentResult & ShowsSnippetView { + .result(view: Text("Visible")) + } +} + +@available(iOS 26.0, *) +struct ValueSnippet: SnippetIntent { + static let title: LocalizedStringResource = "Snippet with a value" + @MainActor + func perform() async throws -> some IntentResult & ReturnsValue & ShowsSnippetView { + .result(value: "Confirmed", view: Text("Confirmed")) + } +} + +@available(iOS 26.0, *) +struct InteractiveResultProbe: AppIntent { + static let title: LocalizedStringResource = "Show confirmation" + func perform() async throws -> some IntentResult & ShowsSnippetIntent { + .result(snippetIntent: ConfirmationSnippet()) + } +} + +struct OpensWithViewProbe: AppIntent { + static let title: LocalizedStringResource = "Open with view" + @MainActor + func perform() async throws -> some IntentResult & OpensIntent & ShowsSnippetView { + .result(opensIntent: ConfirmProbe(), view: Text("Opening")) + } +} + +struct OpensWithDialogProbe: AppIntent { + static let title: LocalizedStringResource = "Open with dialog" + func perform() async throws -> some IntentResult & OpensIntent & ProvidesDialog { + .result(opensIntent: ConfirmProbe(), dialog: "Opening") + } +} + +struct ConnectionProbe: AppIntent { + static let title: LocalizedStringResource = "Connection behavior" + @Parameter(title: "Default", inputConnectionBehavior: .default) var automatic: String? + @Parameter(title: "Never", inputConnectionBehavior: .never) var never: String? + @Parameter(title: "Previous", inputConnectionBehavior: .connectToPreviousIntentResult) var previous: String? + func perform() async throws -> some IntentResult { .result() } +} diff --git a/sweetpad-cli/fixtures/appintents/ResultProtocols.swiftconstvalues b/sweetpad-cli/fixtures/appintents/ResultProtocols.swiftconstvalues new file mode 100644 index 00000000..dc9092fb --- /dev/null +++ b/sweetpad-cli/fixtures/appintents/ResultProtocols.swiftconstvalues @@ -0,0 +1,1392 @@ +[ + { + "allConformances": [ + { + "conformanceDefiningModule": "ResultProtocols", + "protocolName": "AppIntents.AppIntent" + }, + { + "conformanceDefiningModule": "ResultProtocols", + "protocolName": "AppIntents.PersistentlyIdentifiable" + }, + { + "conformanceDefiningModule": "ResultProtocols", + "protocolName": "AppIntents._SupportsAppDependencies" + }, + { + "conformanceDefiningModule": "ResultProtocols", + "protocolName": "Swift.Sendable" + }, + { + "conformanceDefiningModule": "ResultProtocols", + "protocolName": "Swift.SendableMetatype" + } + ], + "associatedTypeAliases": [ + { + "opaqueTypeProtocolRequirements": [ + "AppIntents.IntentResult" + ], + "opaqueTypeSameTypeRequirements": [], + "substitutedMangledTypeName": "15ResultProtocols12ConfirmProbeV7performQryYaKFQOy_Qo_", + "substitutedTypeName": "some AppIntents.IntentResult", + "typeAliasName": "PerformResult" + }, + { + "opaqueTypeProtocolRequirements": [ + "AppIntents.ParameterSummary" + ], + "opaqueTypeSameTypeRequirements": [], + "substitutedMangledTypeName": "10AppIntents0A6IntentPAAE16parameterSummaryQrvpZQOy15ResultProtocols12ConfirmProbeV_Qo_", + "substitutedTypeName": "some AppIntents.ParameterSummary", + "typeAliasName": "SummaryContent" + } + ], + "conformances": [ + "AppIntents.AppIntent", + "AppIntents.PersistentlyIdentifiable", + "AppIntents._SupportsAppDependencies", + "Swift.Sendable", + "Swift.SendableMetatype" + ], + "file": "ResultProtocols.swift", + "kind": "struct", + "line": 4, + "mangledTypeName": "15ResultProtocols12ConfirmProbeV", + "properties": [ + { + "file": "ResultProtocols.swift", + "isComputed": "false", + "isStatic": "false", + "label": "_text", + "line": 6, + "mangledTypeName": "n/a - deprecated", + "type": "AppIntents.IntentParameter>", + "value": { + "arguments": [ + { + "label": "title", + "type": "Foundation.LocalizedStringResource", + "value": "Text", + "valueKind": "RawLiteral" + }, + { + "label": "description", + "type": "Swift.Optional", + "valueKind": "NilLiteral" + }, + { + "label": "default", + "type": "Swift.Optional", + "valueKind": "NilLiteral" + }, + { + "label": "inputOptions", + "type": "Swift.Optional", + "valueKind": "NilLiteral" + }, + { + "label": "requestValueDialog", + "type": "Swift.Optional", + "valueKind": "NilLiteral" + }, + { + "label": "inputConnectionBehavior", + "type": "AppIntents.InputConnectionBehavior", + "valueKind": "Runtime" + } + ], + "type": "AppIntents.IntentParameter>" + }, + "valueKind": "InitCall" + }, + { + "file": "ResultProtocols.swift", + "isComputed": "false", + "isStatic": "true", + "label": "title", + "line": 5, + "mangledTypeName": "n/a - deprecated", + "type": "Foundation.LocalizedStringResource", + "value": "Confirm", + "valueKind": "RawLiteral" + }, + { + "file": "ResultProtocols.swift", + "isComputed": "true", + "isStatic": "false", + "label": "text", + "line": 6, + "mangledTypeName": "n/a - deprecated", + "propertyWrappers": [ + { + "arguments": [ + { + "label": "title", + "type": "Foundation.LocalizedStringResource", + "value": "Text", + "valueKind": "RawLiteral" + } + ], + "file": "ResultProtocols.swift", + "line": 6, + "type": "AppIntents.IntentParameter" + } + ], + "type": "Swift.Optional", + "value": { + "arguments": [ + { + "label": "title", + "type": "Foundation.LocalizedStringResource", + "value": "Text", + "valueKind": "RawLiteral" + }, + { + "label": "description", + "type": "Swift.Optional", + "valueKind": "NilLiteral" + }, + { + "label": "default", + "type": "Swift.Optional", + "valueKind": "NilLiteral" + }, + { + "label": "inputOptions", + "type": "Swift.Optional", + "valueKind": "NilLiteral" + }, + { + "label": "requestValueDialog", + "type": "Swift.Optional", + "valueKind": "NilLiteral" + }, + { + "label": "inputConnectionBehavior", + "type": "AppIntents.InputConnectionBehavior", + "valueKind": "Runtime" + } + ], + "type": "AppIntents.IntentParameter>" + }, + "valueKind": "InitCall" + }, + { + "file": "ResultProtocols.swift", + "isComputed": "true", + "isStatic": "false", + "label": "$text", + "line": 6, + "mangledTypeName": "n/a - deprecated", + "type": "AppIntents.IntentParameter>", + "valueKind": "Runtime" + } + ], + "typeName": "ResultProtocols.ConfirmProbe" + }, + { + "allConformances": [ + { + "conformanceDefiningModule": "ResultProtocols", + "protocolName": "AppIntents.AppIntent" + }, + { + "conformanceDefiningModule": "ResultProtocols", + "protocolName": "AppIntents.PersistentlyIdentifiable" + }, + { + "conformanceDefiningModule": "ResultProtocols", + "protocolName": "AppIntents._SupportsAppDependencies" + }, + { + "conformanceDefiningModule": "ResultProtocols", + "protocolName": "Swift.Sendable" + }, + { + "conformanceDefiningModule": "ResultProtocols", + "protocolName": "Swift.SendableMetatype" + } + ], + "associatedTypeAliases": [ + { + "opaqueTypeProtocolRequirements": [ + "AppIntents.IntentResult" + ], + "opaqueTypeSameTypeRequirements": [], + "substitutedMangledTypeName": "15ResultProtocols11PromptProbeV7performQryYaKFQOy_Qo_", + "substitutedTypeName": "some AppIntents.IntentResult", + "typeAliasName": "PerformResult" + }, + { + "opaqueTypeProtocolRequirements": [ + "AppIntents.ParameterSummary" + ], + "opaqueTypeSameTypeRequirements": [], + "substitutedMangledTypeName": "10AppIntents0A6IntentPAAE16parameterSummaryQrvpZQOy15ResultProtocols11PromptProbeV_Qo_", + "substitutedTypeName": "some AppIntents.ParameterSummary", + "typeAliasName": "SummaryContent" + } + ], + "conformances": [ + "AppIntents.AppIntent", + "AppIntents.PersistentlyIdentifiable", + "AppIntents._SupportsAppDependencies", + "Swift.Sendable", + "Swift.SendableMetatype" + ], + "file": "ResultProtocols.swift", + "kind": "struct", + "line": 10, + "mangledTypeName": "15ResultProtocols11PromptProbeV", + "properties": [ + { + "file": "ResultProtocols.swift", + "isComputed": "false", + "isStatic": "false", + "label": "_text", + "line": 13, + "mangledTypeName": "n/a - deprecated", + "type": "AppIntents.IntentParameter>", + "value": { + "arguments": [ + { + "label": "title", + "type": "Foundation.LocalizedStringResource", + "value": "Text", + "valueKind": "RawLiteral" + }, + { + "label": "description", + "type": "Swift.Optional", + "valueKind": "NilLiteral" + }, + { + "label": "default", + "type": "Swift.Optional", + "valueKind": "NilLiteral" + }, + { + "label": "inputOptions", + "type": "Swift.Optional", + "valueKind": "NilLiteral" + }, + { + "label": "requestValueDialog", + "type": "Swift.Optional", + "value": "Which text?", + "valueKind": "RawLiteral" + }, + { + "label": "inputConnectionBehavior", + "type": "AppIntents.InputConnectionBehavior", + "valueKind": "Runtime" + } + ], + "type": "AppIntents.IntentParameter>" + }, + "valueKind": "InitCall" + }, + { + "file": "ResultProtocols.swift", + "isComputed": "false", + "isStatic": "true", + "label": "title", + "line": 12, + "mangledTypeName": "n/a - deprecated", + "type": "Foundation.LocalizedStringResource", + "value": "Confirm", + "valueKind": "RawLiteral" + }, + { + "file": "ResultProtocols.swift", + "isComputed": "true", + "isStatic": "false", + "label": "text", + "line": 13, + "mangledTypeName": "n/a - deprecated", + "propertyWrappers": [ + { + "arguments": [ + { + "label": "title", + "type": "Foundation.LocalizedStringResource", + "value": "Text", + "valueKind": "RawLiteral" + }, + { + "label": "requestValueDialog", + "type": "Swift.Optional", + "value": "Which text?", + "valueKind": "RawLiteral" + } + ], + "file": "ResultProtocols.swift", + "line": 13, + "type": "AppIntents.IntentParameter" + } + ], + "type": "Swift.Optional", + "value": { + "arguments": [ + { + "label": "title", + "type": "Foundation.LocalizedStringResource", + "value": "Text", + "valueKind": "RawLiteral" + }, + { + "label": "description", + "type": "Swift.Optional", + "valueKind": "NilLiteral" + }, + { + "label": "default", + "type": "Swift.Optional", + "valueKind": "NilLiteral" + }, + { + "label": "inputOptions", + "type": "Swift.Optional", + "valueKind": "NilLiteral" + }, + { + "label": "requestValueDialog", + "type": "Swift.Optional", + "value": "Which text?", + "valueKind": "RawLiteral" + }, + { + "label": "inputConnectionBehavior", + "type": "AppIntents.InputConnectionBehavior", + "valueKind": "Runtime" + } + ], + "type": "AppIntents.IntentParameter>" + }, + "valueKind": "InitCall" + }, + { + "file": "ResultProtocols.swift", + "isComputed": "true", + "isStatic": "false", + "label": "$text", + "line": 13, + "mangledTypeName": "n/a - deprecated", + "type": "AppIntents.IntentParameter>", + "valueKind": "Runtime" + } + ], + "typeName": "ResultProtocols.PromptProbe" + }, + { + "allConformances": [ + { + "conformanceDefiningModule": "ResultProtocols", + "protocolName": "AppIntents.SnippetIntent" + }, + { + "conformanceDefiningModule": "ResultProtocols", + "protocolName": "AppIntents.AppIntent" + }, + { + "conformanceDefiningModule": "ResultProtocols", + "protocolName": "AppIntents.PersistentlyIdentifiable" + }, + { + "conformanceDefiningModule": "ResultProtocols", + "protocolName": "AppIntents._SupportsAppDependencies" + }, + { + "conformanceDefiningModule": "ResultProtocols", + "protocolName": "Swift.Sendable" + }, + { + "conformanceDefiningModule": "ResultProtocols", + "protocolName": "Swift.SendableMetatype" + }, + { + "conformanceDefiningModule": "ResultProtocols", + "protocolName": "Swift.BitwiseCopyable" + } + ], + "associatedTypeAliases": [ + { + "opaqueTypeProtocolRequirements": [ + "AppIntents.ShowsSnippetView" + ], + "opaqueTypeSameTypeRequirements": [], + "substitutedMangledTypeName": "15ResultProtocols19ConfirmationSnippetV7performQryYaKFQOy_Qo_", + "substitutedTypeName": "some AppIntents.ShowsSnippetView", + "typeAliasName": "PerformResult" + }, + { + "opaqueTypeProtocolRequirements": [ + "AppIntents.ParameterSummary" + ], + "opaqueTypeSameTypeRequirements": [], + "substitutedMangledTypeName": "10AppIntents0A6IntentPAAE16parameterSummaryQrvpZQOy15ResultProtocols19ConfirmationSnippetV_Qo_", + "substitutedTypeName": "some AppIntents.ParameterSummary", + "typeAliasName": "SummaryContent" + } + ], + "availabilityAttributes": [ + { + "introducedVersion": "26.0", + "isDeprecated": false, + "isUnavailable": false, + "platform": "macCatalyst" + }, + { + "introducedVersion": "26.0", + "isDeprecated": false, + "isUnavailable": false, + "platform": "visionOS" + }, + { + "introducedVersion": "26.0", + "isDeprecated": false, + "isUnavailable": false, + "platform": "watchOS" + }, + { + "introducedVersion": "26.0", + "isDeprecated": false, + "isUnavailable": false, + "platform": "tvOS" + }, + { + "introducedVersion": "26.0", + "isDeprecated": false, + "isUnavailable": false, + "platform": "macOS" + }, + { + "introducedVersion": "26.0", + "isDeprecated": false, + "isUnavailable": false, + "platform": "iOS" + } + ], + "conformances": [ + "AppIntents.SnippetIntent", + "AppIntents.AppIntent", + "AppIntents.PersistentlyIdentifiable", + "AppIntents._SupportsAppDependencies", + "Swift.Sendable", + "Swift.SendableMetatype", + "Swift.BitwiseCopyable" + ], + "file": "ResultProtocols.swift", + "kind": "struct", + "line": 18, + "mangledTypeName": "15ResultProtocols19ConfirmationSnippetV", + "properties": [ + { + "file": "ResultProtocols.swift", + "isComputed": "false", + "isStatic": "true", + "label": "title", + "line": 19, + "mangledTypeName": "n/a - deprecated", + "type": "Foundation.LocalizedStringResource", + "value": "Confirmation snippet", + "valueKind": "RawLiteral" + } + ], + "typeName": "ResultProtocols.ConfirmationSnippet" + }, + { + "allConformances": [ + { + "conformanceDefiningModule": "ResultProtocols", + "protocolName": "AppIntents.SnippetIntent" + }, + { + "conformanceDefiningModule": "ResultProtocols", + "protocolName": "AppIntents.AppIntent" + }, + { + "conformanceDefiningModule": "ResultProtocols", + "protocolName": "AppIntents.PersistentlyIdentifiable" + }, + { + "conformanceDefiningModule": "ResultProtocols", + "protocolName": "AppIntents._SupportsAppDependencies" + }, + { + "conformanceDefiningModule": "ResultProtocols", + "protocolName": "Swift.Sendable" + }, + { + "conformanceDefiningModule": "ResultProtocols", + "protocolName": "Swift.SendableMetatype" + }, + { + "conformanceDefiningModule": "ResultProtocols", + "protocolName": "Swift.BitwiseCopyable" + } + ], + "associatedTypeAliases": [ + { + "opaqueTypeProtocolRequirements": [ + "AppIntents.ShowsSnippetView" + ], + "opaqueTypeSameTypeRequirements": [], + "substitutedMangledTypeName": "15ResultProtocols19DiscoverableSnippetV7performQryYaKFQOy_Qo_", + "substitutedTypeName": "some AppIntents.ShowsSnippetView", + "typeAliasName": "PerformResult" + }, + { + "opaqueTypeProtocolRequirements": [ + "AppIntents.ParameterSummary" + ], + "opaqueTypeSameTypeRequirements": [], + "substitutedMangledTypeName": "10AppIntents0A6IntentPAAE16parameterSummaryQrvpZQOy15ResultProtocols19DiscoverableSnippetV_Qo_", + "substitutedTypeName": "some AppIntents.ParameterSummary", + "typeAliasName": "SummaryContent" + } + ], + "availabilityAttributes": [ + { + "isDeprecated": false, + "isUnavailable": true, + "platform": "tvOS" + }, + { + "deprecatedVersion": "27.0", + "introducedVersion": "26.0", + "isDeprecated": false, + "isUnavailable": false, + "obsoletedVersion": "30.0", + "platform": "iOS" + } + ], + "conformances": [ + "AppIntents.SnippetIntent", + "AppIntents.AppIntent", + "AppIntents.PersistentlyIdentifiable", + "AppIntents._SupportsAppDependencies", + "Swift.Sendable", + "Swift.SendableMetatype", + "Swift.BitwiseCopyable" + ], + "file": "ResultProtocols.swift", + "kind": "struct", + "line": 28, + "mangledTypeName": "15ResultProtocols19DiscoverableSnippetV", + "properties": [ + { + "file": "ResultProtocols.swift", + "isComputed": "false", + "isStatic": "true", + "label": "title", + "line": 29, + "mangledTypeName": "n/a - deprecated", + "type": "Foundation.LocalizedStringResource", + "value": "Discoverable snippet", + "valueKind": "RawLiteral" + }, + { + "file": "ResultProtocols.swift", + "isComputed": "false", + "isStatic": "true", + "label": "isDiscoverable", + "line": 30, + "mangledTypeName": "n/a - deprecated", + "type": "Swift.Bool", + "value": "true", + "valueKind": "RawLiteral" + } + ], + "typeName": "ResultProtocols.DiscoverableSnippet" + }, + { + "allConformances": [ + { + "conformanceDefiningModule": "ResultProtocols", + "protocolName": "AppIntents.SnippetIntent" + }, + { + "conformanceDefiningModule": "ResultProtocols", + "protocolName": "AppIntents.AppIntent" + }, + { + "conformanceDefiningModule": "ResultProtocols", + "protocolName": "AppIntents.PersistentlyIdentifiable" + }, + { + "conformanceDefiningModule": "ResultProtocols", + "protocolName": "AppIntents._SupportsAppDependencies" + }, + { + "conformanceDefiningModule": "ResultProtocols", + "protocolName": "Swift.Sendable" + }, + { + "conformanceDefiningModule": "ResultProtocols", + "protocolName": "Swift.SendableMetatype" + }, + { + "conformanceDefiningModule": "ResultProtocols", + "protocolName": "Swift.BitwiseCopyable" + } + ], + "associatedTypeAliases": [ + { + "opaqueTypeProtocolRequirements": [ + "AppIntents.ReturnsValue", + "AppIntents.ShowsSnippetView" + ], + "opaqueTypeSameTypeRequirements": [ + { + "substitutedMangledTypeName": "SS", + "substitutedTypeName": "Swift.String", + "typeAliasName": "AppIntents.IntentResult.Value" + } + ], + "substitutedMangledTypeName": "15ResultProtocols12ValueSnippetV7performQryYaKFQOy_Qo_", + "substitutedTypeName": "some AppIntents.ReturnsValue & AppIntents.ShowsSnippetView", + "typeAliasName": "PerformResult" + }, + { + "opaqueTypeProtocolRequirements": [ + "AppIntents.ParameterSummary" + ], + "opaqueTypeSameTypeRequirements": [], + "substitutedMangledTypeName": "10AppIntents0A6IntentPAAE16parameterSummaryQrvpZQOy15ResultProtocols12ValueSnippetV_Qo_", + "substitutedTypeName": "some AppIntents.ParameterSummary", + "typeAliasName": "SummaryContent" + } + ], + "availabilityAttributes": [ + { + "introducedVersion": "26.0", + "isDeprecated": false, + "isUnavailable": false, + "platform": "iOS" + } + ], + "conformances": [ + "AppIntents.SnippetIntent", + "AppIntents.AppIntent", + "AppIntents.PersistentlyIdentifiable", + "AppIntents._SupportsAppDependencies", + "Swift.Sendable", + "Swift.SendableMetatype", + "Swift.BitwiseCopyable" + ], + "file": "ResultProtocols.swift", + "kind": "struct", + "line": 38, + "mangledTypeName": "15ResultProtocols12ValueSnippetV", + "properties": [ + { + "file": "ResultProtocols.swift", + "isComputed": "false", + "isStatic": "true", + "label": "title", + "line": 39, + "mangledTypeName": "n/a - deprecated", + "type": "Foundation.LocalizedStringResource", + "value": "Snippet with a value", + "valueKind": "RawLiteral" + } + ], + "typeName": "ResultProtocols.ValueSnippet" + }, + { + "allConformances": [ + { + "conformanceDefiningModule": "ResultProtocols", + "protocolName": "AppIntents.AppIntent" + }, + { + "conformanceDefiningModule": "ResultProtocols", + "protocolName": "AppIntents.PersistentlyIdentifiable" + }, + { + "conformanceDefiningModule": "ResultProtocols", + "protocolName": "AppIntents._SupportsAppDependencies" + }, + { + "conformanceDefiningModule": "ResultProtocols", + "protocolName": "Swift.Sendable" + }, + { + "conformanceDefiningModule": "ResultProtocols", + "protocolName": "Swift.SendableMetatype" + }, + { + "conformanceDefiningModule": "ResultProtocols", + "protocolName": "Swift.BitwiseCopyable" + } + ], + "associatedTypeAliases": [ + { + "opaqueTypeProtocolRequirements": [ + "AppIntents.ShowsSnippetIntent" + ], + "opaqueTypeSameTypeRequirements": [], + "substitutedMangledTypeName": "15ResultProtocols011InteractiveA5ProbeV7performQryYaKFQOy_Qo_", + "substitutedTypeName": "some AppIntents.ShowsSnippetIntent", + "typeAliasName": "PerformResult" + }, + { + "opaqueTypeProtocolRequirements": [ + "AppIntents.ParameterSummary" + ], + "opaqueTypeSameTypeRequirements": [], + "substitutedMangledTypeName": "10AppIntents0A6IntentPAAE16parameterSummaryQrvpZQOy15ResultProtocols011InteractiveF5ProbeV_Qo_", + "substitutedTypeName": "some AppIntents.ParameterSummary", + "typeAliasName": "SummaryContent" + } + ], + "availabilityAttributes": [ + { + "introducedVersion": "26.0", + "isDeprecated": false, + "isUnavailable": false, + "platform": "iOS" + } + ], + "conformances": [ + "AppIntents.AppIntent", + "AppIntents.PersistentlyIdentifiable", + "AppIntents._SupportsAppDependencies", + "Swift.Sendable", + "Swift.SendableMetatype", + "Swift.BitwiseCopyable" + ], + "file": "ResultProtocols.swift", + "kind": "struct", + "line": 47, + "mangledTypeName": "15ResultProtocols011InteractiveA5ProbeV", + "properties": [ + { + "file": "ResultProtocols.swift", + "isComputed": "false", + "isStatic": "true", + "label": "title", + "line": 48, + "mangledTypeName": "n/a - deprecated", + "type": "Foundation.LocalizedStringResource", + "value": "Show confirmation", + "valueKind": "RawLiteral" + } + ], + "typeName": "ResultProtocols.InteractiveResultProbe" + }, + { + "allConformances": [ + { + "conformanceDefiningModule": "ResultProtocols", + "protocolName": "AppIntents.AppIntent" + }, + { + "conformanceDefiningModule": "ResultProtocols", + "protocolName": "AppIntents.PersistentlyIdentifiable" + }, + { + "conformanceDefiningModule": "ResultProtocols", + "protocolName": "AppIntents._SupportsAppDependencies" + }, + { + "conformanceDefiningModule": "ResultProtocols", + "protocolName": "Swift.Sendable" + }, + { + "conformanceDefiningModule": "ResultProtocols", + "protocolName": "Swift.SendableMetatype" + }, + { + "conformanceDefiningModule": "ResultProtocols", + "protocolName": "Swift.BitwiseCopyable" + } + ], + "associatedTypeAliases": [ + { + "opaqueTypeProtocolRequirements": [ + "AppIntents.OpensIntent", + "AppIntents.ShowsSnippetView" + ], + "opaqueTypeSameTypeRequirements": [], + "substitutedMangledTypeName": "15ResultProtocols18OpensWithViewProbeV7performQryYaKFQOy_Qo_", + "substitutedTypeName": "some AppIntents.OpensIntent & AppIntents.ShowsSnippetView", + "typeAliasName": "PerformResult" + }, + { + "opaqueTypeProtocolRequirements": [ + "AppIntents.ParameterSummary" + ], + "opaqueTypeSameTypeRequirements": [], + "substitutedMangledTypeName": "10AppIntents0A6IntentPAAE16parameterSummaryQrvpZQOy15ResultProtocols18OpensWithViewProbeV_Qo_", + "substitutedTypeName": "some AppIntents.ParameterSummary", + "typeAliasName": "SummaryContent" + } + ], + "conformances": [ + "AppIntents.AppIntent", + "AppIntents.PersistentlyIdentifiable", + "AppIntents._SupportsAppDependencies", + "Swift.Sendable", + "Swift.SendableMetatype", + "Swift.BitwiseCopyable" + ], + "file": "ResultProtocols.swift", + "kind": "struct", + "line": 54, + "mangledTypeName": "15ResultProtocols18OpensWithViewProbeV", + "properties": [ + { + "file": "ResultProtocols.swift", + "isComputed": "false", + "isStatic": "true", + "label": "title", + "line": 55, + "mangledTypeName": "n/a - deprecated", + "type": "Foundation.LocalizedStringResource", + "value": "Open with view", + "valueKind": "RawLiteral" + } + ], + "typeName": "ResultProtocols.OpensWithViewProbe" + }, + { + "allConformances": [ + { + "conformanceDefiningModule": "ResultProtocols", + "protocolName": "AppIntents.AppIntent" + }, + { + "conformanceDefiningModule": "ResultProtocols", + "protocolName": "AppIntents.PersistentlyIdentifiable" + }, + { + "conformanceDefiningModule": "ResultProtocols", + "protocolName": "AppIntents._SupportsAppDependencies" + }, + { + "conformanceDefiningModule": "ResultProtocols", + "protocolName": "Swift.Sendable" + }, + { + "conformanceDefiningModule": "ResultProtocols", + "protocolName": "Swift.SendableMetatype" + }, + { + "conformanceDefiningModule": "ResultProtocols", + "protocolName": "Swift.BitwiseCopyable" + } + ], + "associatedTypeAliases": [ + { + "opaqueTypeProtocolRequirements": [ + "AppIntents.OpensIntent", + "AppIntents.ProvidesDialog" + ], + "opaqueTypeSameTypeRequirements": [], + "substitutedMangledTypeName": "15ResultProtocols20OpensWithDialogProbeV7performQryYaKFQOy_Qo_", + "substitutedTypeName": "some AppIntents.OpensIntent & AppIntents.ProvidesDialog", + "typeAliasName": "PerformResult" + }, + { + "opaqueTypeProtocolRequirements": [ + "AppIntents.ParameterSummary" + ], + "opaqueTypeSameTypeRequirements": [], + "substitutedMangledTypeName": "10AppIntents0A6IntentPAAE16parameterSummaryQrvpZQOy15ResultProtocols20OpensWithDialogProbeV_Qo_", + "substitutedTypeName": "some AppIntents.ParameterSummary", + "typeAliasName": "SummaryContent" + } + ], + "conformances": [ + "AppIntents.AppIntent", + "AppIntents.PersistentlyIdentifiable", + "AppIntents._SupportsAppDependencies", + "Swift.Sendable", + "Swift.SendableMetatype", + "Swift.BitwiseCopyable" + ], + "file": "ResultProtocols.swift", + "kind": "struct", + "line": 62, + "mangledTypeName": "15ResultProtocols20OpensWithDialogProbeV", + "properties": [ + { + "file": "ResultProtocols.swift", + "isComputed": "false", + "isStatic": "true", + "label": "title", + "line": 63, + "mangledTypeName": "n/a - deprecated", + "type": "Foundation.LocalizedStringResource", + "value": "Open with dialog", + "valueKind": "RawLiteral" + } + ], + "typeName": "ResultProtocols.OpensWithDialogProbe" + }, + { + "allConformances": [ + { + "conformanceDefiningModule": "ResultProtocols", + "protocolName": "AppIntents.AppIntent" + }, + { + "conformanceDefiningModule": "ResultProtocols", + "protocolName": "AppIntents.PersistentlyIdentifiable" + }, + { + "conformanceDefiningModule": "ResultProtocols", + "protocolName": "AppIntents._SupportsAppDependencies" + }, + { + "conformanceDefiningModule": "ResultProtocols", + "protocolName": "Swift.Sendable" + }, + { + "conformanceDefiningModule": "ResultProtocols", + "protocolName": "Swift.SendableMetatype" + } + ], + "associatedTypeAliases": [ + { + "opaqueTypeProtocolRequirements": [ + "AppIntents.IntentResult" + ], + "opaqueTypeSameTypeRequirements": [], + "substitutedMangledTypeName": "15ResultProtocols15ConnectionProbeV7performQryYaKFQOy_Qo_", + "substitutedTypeName": "some AppIntents.IntentResult", + "typeAliasName": "PerformResult" + }, + { + "opaqueTypeProtocolRequirements": [ + "AppIntents.ParameterSummary" + ], + "opaqueTypeSameTypeRequirements": [], + "substitutedMangledTypeName": "10AppIntents0A6IntentPAAE16parameterSummaryQrvpZQOy15ResultProtocols15ConnectionProbeV_Qo_", + "substitutedTypeName": "some AppIntents.ParameterSummary", + "typeAliasName": "SummaryContent" + } + ], + "conformances": [ + "AppIntents.AppIntent", + "AppIntents.PersistentlyIdentifiable", + "AppIntents._SupportsAppDependencies", + "Swift.Sendable", + "Swift.SendableMetatype" + ], + "file": "ResultProtocols.swift", + "kind": "struct", + "line": 69, + "mangledTypeName": "15ResultProtocols15ConnectionProbeV", + "properties": [ + { + "file": "ResultProtocols.swift", + "isComputed": "false", + "isStatic": "false", + "label": "_automatic", + "line": 71, + "mangledTypeName": "n/a - deprecated", + "type": "AppIntents.IntentParameter>", + "value": { + "arguments": [ + { + "label": "title", + "type": "Foundation.LocalizedStringResource", + "value": "Default", + "valueKind": "RawLiteral" + }, + { + "label": "description", + "type": "Swift.Optional", + "valueKind": "NilLiteral" + }, + { + "label": "default", + "type": "Swift.Optional", + "valueKind": "NilLiteral" + }, + { + "label": "inputOptions", + "type": "Swift.Optional", + "valueKind": "NilLiteral" + }, + { + "label": "requestValueDialog", + "type": "Swift.Optional", + "valueKind": "NilLiteral" + }, + { + "label": "inputConnectionBehavior", + "type": "AppIntents.InputConnectionBehavior", + "value": { + "name": "default" + }, + "valueKind": "Enum" + } + ], + "type": "AppIntents.IntentParameter>" + }, + "valueKind": "InitCall" + }, + { + "file": "ResultProtocols.swift", + "isComputed": "false", + "isStatic": "false", + "label": "_never", + "line": 72, + "mangledTypeName": "n/a - deprecated", + "type": "AppIntents.IntentParameter>", + "value": { + "arguments": [ + { + "label": "title", + "type": "Foundation.LocalizedStringResource", + "value": "Never", + "valueKind": "RawLiteral" + }, + { + "label": "description", + "type": "Swift.Optional", + "valueKind": "NilLiteral" + }, + { + "label": "default", + "type": "Swift.Optional", + "valueKind": "NilLiteral" + }, + { + "label": "inputOptions", + "type": "Swift.Optional", + "valueKind": "NilLiteral" + }, + { + "label": "requestValueDialog", + "type": "Swift.Optional", + "valueKind": "NilLiteral" + }, + { + "label": "inputConnectionBehavior", + "type": "AppIntents.InputConnectionBehavior", + "value": { + "name": "never" + }, + "valueKind": "Enum" + } + ], + "type": "AppIntents.IntentParameter>" + }, + "valueKind": "InitCall" + }, + { + "file": "ResultProtocols.swift", + "isComputed": "false", + "isStatic": "false", + "label": "_previous", + "line": 73, + "mangledTypeName": "n/a - deprecated", + "type": "AppIntents.IntentParameter>", + "value": { + "arguments": [ + { + "label": "title", + "type": "Foundation.LocalizedStringResource", + "value": "Previous", + "valueKind": "RawLiteral" + }, + { + "label": "description", + "type": "Swift.Optional", + "valueKind": "NilLiteral" + }, + { + "label": "default", + "type": "Swift.Optional", + "valueKind": "NilLiteral" + }, + { + "label": "inputOptions", + "type": "Swift.Optional", + "valueKind": "NilLiteral" + }, + { + "label": "requestValueDialog", + "type": "Swift.Optional", + "valueKind": "NilLiteral" + }, + { + "label": "inputConnectionBehavior", + "type": "AppIntents.InputConnectionBehavior", + "value": { + "name": "connectToPreviousIntentResult" + }, + "valueKind": "Enum" + } + ], + "type": "AppIntents.IntentParameter>" + }, + "valueKind": "InitCall" + }, + { + "file": "ResultProtocols.swift", + "isComputed": "false", + "isStatic": "true", + "label": "title", + "line": 70, + "mangledTypeName": "n/a - deprecated", + "type": "Foundation.LocalizedStringResource", + "value": "Connection behavior", + "valueKind": "RawLiteral" + }, + { + "file": "ResultProtocols.swift", + "isComputed": "true", + "isStatic": "false", + "label": "automatic", + "line": 71, + "mangledTypeName": "n/a - deprecated", + "propertyWrappers": [ + { + "arguments": [ + { + "label": "title", + "type": "Foundation.LocalizedStringResource", + "value": "Default", + "valueKind": "RawLiteral" + }, + { + "label": "inputConnectionBehavior", + "type": "AppIntents.InputConnectionBehavior", + "value": { + "name": "default" + }, + "valueKind": "Enum" + } + ], + "file": "ResultProtocols.swift", + "line": 71, + "type": "AppIntents.IntentParameter" + } + ], + "type": "Swift.Optional", + "value": { + "arguments": [ + { + "label": "title", + "type": "Foundation.LocalizedStringResource", + "value": "Default", + "valueKind": "RawLiteral" + }, + { + "label": "description", + "type": "Swift.Optional", + "valueKind": "NilLiteral" + }, + { + "label": "default", + "type": "Swift.Optional", + "valueKind": "NilLiteral" + }, + { + "label": "inputOptions", + "type": "Swift.Optional", + "valueKind": "NilLiteral" + }, + { + "label": "requestValueDialog", + "type": "Swift.Optional", + "valueKind": "NilLiteral" + }, + { + "label": "inputConnectionBehavior", + "type": "AppIntents.InputConnectionBehavior", + "value": { + "name": "default" + }, + "valueKind": "Enum" + } + ], + "type": "AppIntents.IntentParameter>" + }, + "valueKind": "InitCall" + }, + { + "file": "ResultProtocols.swift", + "isComputed": "true", + "isStatic": "false", + "label": "$automatic", + "line": 71, + "mangledTypeName": "n/a - deprecated", + "type": "AppIntents.IntentParameter>", + "valueKind": "Runtime" + }, + { + "file": "ResultProtocols.swift", + "isComputed": "true", + "isStatic": "false", + "label": "never", + "line": 72, + "mangledTypeName": "n/a - deprecated", + "propertyWrappers": [ + { + "arguments": [ + { + "label": "title", + "type": "Foundation.LocalizedStringResource", + "value": "Never", + "valueKind": "RawLiteral" + }, + { + "label": "inputConnectionBehavior", + "type": "AppIntents.InputConnectionBehavior", + "value": { + "name": "never" + }, + "valueKind": "Enum" + } + ], + "file": "ResultProtocols.swift", + "line": 72, + "type": "AppIntents.IntentParameter" + } + ], + "type": "Swift.Optional", + "value": { + "arguments": [ + { + "label": "title", + "type": "Foundation.LocalizedStringResource", + "value": "Never", + "valueKind": "RawLiteral" + }, + { + "label": "description", + "type": "Swift.Optional", + "valueKind": "NilLiteral" + }, + { + "label": "default", + "type": "Swift.Optional", + "valueKind": "NilLiteral" + }, + { + "label": "inputOptions", + "type": "Swift.Optional", + "valueKind": "NilLiteral" + }, + { + "label": "requestValueDialog", + "type": "Swift.Optional", + "valueKind": "NilLiteral" + }, + { + "label": "inputConnectionBehavior", + "type": "AppIntents.InputConnectionBehavior", + "value": { + "name": "never" + }, + "valueKind": "Enum" + } + ], + "type": "AppIntents.IntentParameter>" + }, + "valueKind": "InitCall" + }, + { + "file": "ResultProtocols.swift", + "isComputed": "true", + "isStatic": "false", + "label": "$never", + "line": 72, + "mangledTypeName": "n/a - deprecated", + "type": "AppIntents.IntentParameter>", + "valueKind": "Runtime" + }, + { + "file": "ResultProtocols.swift", + "isComputed": "true", + "isStatic": "false", + "label": "previous", + "line": 73, + "mangledTypeName": "n/a - deprecated", + "propertyWrappers": [ + { + "arguments": [ + { + "label": "title", + "type": "Foundation.LocalizedStringResource", + "value": "Previous", + "valueKind": "RawLiteral" + }, + { + "label": "inputConnectionBehavior", + "type": "AppIntents.InputConnectionBehavior", + "value": { + "name": "connectToPreviousIntentResult" + }, + "valueKind": "Enum" + } + ], + "file": "ResultProtocols.swift", + "line": 73, + "type": "AppIntents.IntentParameter" + } + ], + "type": "Swift.Optional", + "value": { + "arguments": [ + { + "label": "title", + "type": "Foundation.LocalizedStringResource", + "value": "Previous", + "valueKind": "RawLiteral" + }, + { + "label": "description", + "type": "Swift.Optional", + "valueKind": "NilLiteral" + }, + { + "label": "default", + "type": "Swift.Optional", + "valueKind": "NilLiteral" + }, + { + "label": "inputOptions", + "type": "Swift.Optional", + "valueKind": "NilLiteral" + }, + { + "label": "requestValueDialog", + "type": "Swift.Optional", + "valueKind": "NilLiteral" + }, + { + "label": "inputConnectionBehavior", + "type": "AppIntents.InputConnectionBehavior", + "value": { + "name": "connectToPreviousIntentResult" + }, + "valueKind": "Enum" + } + ], + "type": "AppIntents.IntentParameter>" + }, + "valueKind": "InitCall" + }, + { + "file": "ResultProtocols.swift", + "isComputed": "true", + "isStatic": "false", + "label": "$previous", + "line": 73, + "mangledTypeName": "n/a - deprecated", + "type": "AppIntents.IntentParameter>", + "valueKind": "Runtime" + } + ], + "typeName": "ResultProtocols.ConnectionProbe" + } +] diff --git a/sweetpad-cli/fixtures/appintents/Unsupported.swift b/sweetpad-cli/fixtures/appintents/Unsupported.swift new file mode 100644 index 00000000..4b0913a2 --- /dev/null +++ b/sweetpad-cli/fixtures/appintents/Unsupported.swift @@ -0,0 +1,44 @@ +import AppIntents + +struct WhenProbe: AppIntent { + static let title: LocalizedStringResource = "Conditional" + @Parameter(title: "Flag") var flag: Bool + static var parameterSummary: some ParameterSummary { + When(\.$flag, .equalTo, true) { Summary("On") } otherwise: { Summary("Off") } + } + func perform() async throws -> some IntentResult { .result() } +} + +struct SwitchProbe: AppIntent { + static let title: LocalizedStringResource = "Alternatives" + @Parameter(title: "Number") var number: Int + static var parameterSummary: some ParameterSummary { + Switch(\.$number) { + Case(1) { Summary("One") } + DefaultCase { Summary("Other") } + } + } + func perform() async throws -> some IntentResult { .result() } +} + +struct TableProbe: AppIntent { + static let title: LocalizedStringResource = "Localization table" + static var parameterSummary: some ParameterSummary { Summary("From table", table: "Probe") } + func perform() async throws -> some IntentResult { .result() } +} + +struct RangeProbe: AppIntent { + static let title: LocalizedStringResource = "Range" + @Parameter(title: "Count", inclusiveRange: (1, 5)) var count: Int + func perform() async throws -> some IntentResult { .result() } +} + +struct Choices: DynamicOptionsProvider { + func results() async throws -> [String] { ["First", "Second"] } +} + +struct OptionsProviderProbe: AppIntent { + static let title: LocalizedStringResource = "Choices" + @Parameter(title: "Choice", optionsProvider: Choices()) var choice: String + func perform() async throws -> some IntentResult { .result() } +} diff --git a/sweetpad-cli/fixtures/appintents/Unsupported.swiftconstvalues b/sweetpad-cli/fixtures/appintents/Unsupported.swiftconstvalues new file mode 100644 index 00000000..44f10021 --- /dev/null +++ b/sweetpad-cli/fixtures/appintents/Unsupported.swiftconstvalues @@ -0,0 +1,1209 @@ +[ + { + "allConformances": [ + { + "conformanceDefiningModule": "Unsupported", + "protocolName": "AppIntents.AppIntent" + }, + { + "conformanceDefiningModule": "Unsupported", + "protocolName": "AppIntents.PersistentlyIdentifiable" + }, + { + "conformanceDefiningModule": "Unsupported", + "protocolName": "AppIntents._SupportsAppDependencies" + }, + { + "conformanceDefiningModule": "Unsupported", + "protocolName": "Swift.Sendable" + }, + { + "conformanceDefiningModule": "Unsupported", + "protocolName": "Swift.SendableMetatype" + } + ], + "associatedTypeAliases": [ + { + "opaqueTypeProtocolRequirements": [ + "AppIntents.IntentResult" + ], + "opaqueTypeSameTypeRequirements": [], + "substitutedMangledTypeName": "11Unsupported9WhenProbeV7performQryYaKFQOy_Qo_", + "substitutedTypeName": "some AppIntents.IntentResult", + "typeAliasName": "PerformResult" + }, + { + "opaqueTypeProtocolRequirements": [ + "AppIntents.ParameterSummary" + ], + "opaqueTypeSameTypeRequirements": [], + "substitutedMangledTypeName": "11Unsupported9WhenProbeV16parameterSummaryQrvpZQOy_Qo_", + "substitutedTypeName": "some AppIntents.ParameterSummary", + "typeAliasName": "SummaryContent" + } + ], + "conformances": [ + "AppIntents.AppIntent", + "AppIntents.PersistentlyIdentifiable", + "AppIntents._SupportsAppDependencies", + "Swift.Sendable", + "Swift.SendableMetatype" + ], + "file": "Unsupported.swift", + "kind": "struct", + "line": 3, + "mangledTypeName": "11Unsupported9WhenProbeV", + "properties": [ + { + "file": "Unsupported.swift", + "isComputed": "false", + "isStatic": "false", + "label": "_flag", + "line": 5, + "mangledTypeName": "n/a - deprecated", + "type": "AppIntents.IntentParameter", + "value": { + "arguments": [ + { + "label": "title", + "type": "Foundation.LocalizedStringResource", + "value": "Flag", + "valueKind": "RawLiteral" + }, + { + "label": "description", + "type": "Swift.Optional", + "valueKind": "NilLiteral" + }, + { + "label": "default", + "type": "Swift.Optional", + "valueKind": "NilLiteral" + }, + { + "label": "displayName", + "type": "Swift.Optional", + "valueKind": "NilLiteral" + }, + { + "label": "requestValueDialog", + "type": "Swift.Optional", + "valueKind": "NilLiteral" + }, + { + "label": "inputConnectionBehavior", + "type": "AppIntents.InputConnectionBehavior", + "valueKind": "Runtime" + } + ], + "type": "AppIntents.IntentParameter" + }, + "valueKind": "InitCall" + }, + { + "file": "Unsupported.swift", + "isComputed": "false", + "isStatic": "true", + "label": "title", + "line": 4, + "mangledTypeName": "n/a - deprecated", + "type": "Foundation.LocalizedStringResource", + "value": "Conditional", + "valueKind": "RawLiteral" + }, + { + "file": "Unsupported.swift", + "isComputed": "true", + "isStatic": "false", + "label": "flag", + "line": 5, + "mangledTypeName": "n/a - deprecated", + "propertyWrappers": [ + { + "arguments": [ + { + "label": "title", + "type": "Foundation.LocalizedStringResource", + "value": "Flag", + "valueKind": "RawLiteral" + } + ], + "file": "Unsupported.swift", + "line": 5, + "type": "AppIntents.IntentParameter" + } + ], + "type": "Swift.Bool", + "value": { + "arguments": [ + { + "label": "title", + "type": "Foundation.LocalizedStringResource", + "value": "Flag", + "valueKind": "RawLiteral" + }, + { + "label": "description", + "type": "Swift.Optional", + "valueKind": "NilLiteral" + }, + { + "label": "default", + "type": "Swift.Optional", + "valueKind": "NilLiteral" + }, + { + "label": "displayName", + "type": "Swift.Optional", + "valueKind": "NilLiteral" + }, + { + "label": "requestValueDialog", + "type": "Swift.Optional", + "valueKind": "NilLiteral" + }, + { + "label": "inputConnectionBehavior", + "type": "AppIntents.InputConnectionBehavior", + "valueKind": "Runtime" + } + ], + "type": "AppIntents.IntentParameter" + }, + "valueKind": "InitCall" + }, + { + "file": "Unsupported.swift", + "isComputed": "true", + "isStatic": "false", + "label": "$flag", + "line": 5, + "mangledTypeName": "n/a - deprecated", + "type": "AppIntents.IntentParameter", + "valueKind": "Runtime" + }, + { + "file": "Unsupported.swift", + "isComputed": "true", + "isStatic": "true", + "label": "parameterSummary", + "line": 6, + "mangledTypeName": "n/a - deprecated", + "type": "some AppIntents.ParameterSummary", + "value": { + "arguments": [ + { + "label": "", + "type": "Swift.KeyPath>", + "value": { + "components": [ + { + "label": "$flag", + "type": "AppIntents.IntentParameter" + } + ], + "path": "$flag", + "rootType": "Unsupported.WhenProbe" + }, + "valueKind": "KeyPath" + }, + { + "label": "", + "type": "AppIntents.EquatableComparisonOperator", + "value": { + "name": "equalTo" + }, + "valueKind": "Enum" + }, + { + "label": "", + "type": "Swift.Bool", + "value": "true", + "valueKind": "RawLiteral" + }, + { + "label": "", + "type": "() -> AppIntents.IntentParameterSummary", + "value": { + "members": [ + { + "element": { + "value": { + "arguments": [ + { + "label": "", + "type": "AppIntents.ParameterSummaryString", + "value": "On", + "valueKind": "RawLiteral" + }, + { + "label": "table", + "type": "Swift.Optional", + "valueKind": "NilLiteral" + } + ], + "type": "AppIntents.IntentParameterSummary" + }, + "valueKind": "InitCall" + }, + "kind": "buildExpression" + } + ], + "type": "" + }, + "valueKind": "Builder" + }, + { + "label": "otherwise", + "type": "() -> AppIntents.IntentParameterSummary", + "value": { + "members": [ + { + "element": { + "value": { + "arguments": [ + { + "label": "", + "type": "AppIntents.ParameterSummaryString", + "value": "Off", + "valueKind": "RawLiteral" + }, + { + "label": "table", + "type": "Swift.Optional", + "valueKind": "NilLiteral" + } + ], + "type": "AppIntents.IntentParameterSummary" + }, + "valueKind": "InitCall" + }, + "kind": "buildExpression" + } + ], + "type": "" + }, + "valueKind": "Builder" + } + ], + "type": "AppIntents.ParameterSummaryWhenCondition, AppIntents.IntentParameterSummary>" + }, + "valueKind": "InitCall" + } + ], + "typeName": "Unsupported.WhenProbe" + }, + { + "allConformances": [ + { + "conformanceDefiningModule": "Unsupported", + "protocolName": "AppIntents.AppIntent" + }, + { + "conformanceDefiningModule": "Unsupported", + "protocolName": "AppIntents.PersistentlyIdentifiable" + }, + { + "conformanceDefiningModule": "Unsupported", + "protocolName": "AppIntents._SupportsAppDependencies" + }, + { + "conformanceDefiningModule": "Unsupported", + "protocolName": "Swift.Sendable" + }, + { + "conformanceDefiningModule": "Unsupported", + "protocolName": "Swift.SendableMetatype" + } + ], + "associatedTypeAliases": [ + { + "opaqueTypeProtocolRequirements": [ + "AppIntents.IntentResult" + ], + "opaqueTypeSameTypeRequirements": [], + "substitutedMangledTypeName": "11Unsupported11SwitchProbeV7performQryYaKFQOy_Qo_", + "substitutedTypeName": "some AppIntents.IntentResult", + "typeAliasName": "PerformResult" + }, + { + "opaqueTypeProtocolRequirements": [ + "AppIntents.ParameterSummary" + ], + "opaqueTypeSameTypeRequirements": [], + "substitutedMangledTypeName": "11Unsupported11SwitchProbeV16parameterSummaryQrvpZQOy_Qo_", + "substitutedTypeName": "some AppIntents.ParameterSummary", + "typeAliasName": "SummaryContent" + } + ], + "conformances": [ + "AppIntents.AppIntent", + "AppIntents.PersistentlyIdentifiable", + "AppIntents._SupportsAppDependencies", + "Swift.Sendable", + "Swift.SendableMetatype" + ], + "file": "Unsupported.swift", + "kind": "struct", + "line": 12, + "mangledTypeName": "11Unsupported11SwitchProbeV", + "properties": [ + { + "file": "Unsupported.swift", + "isComputed": "false", + "isStatic": "false", + "label": "_number", + "line": 14, + "mangledTypeName": "n/a - deprecated", + "type": "AppIntents.IntentParameter", + "value": { + "arguments": [ + { + "label": "title", + "type": "Foundation.LocalizedStringResource", + "value": "Number", + "valueKind": "RawLiteral" + }, + { + "label": "description", + "type": "Swift.Optional", + "valueKind": "NilLiteral" + }, + { + "label": "default", + "type": "Swift.Optional", + "valueKind": "NilLiteral" + }, + { + "label": "controlStyle", + "type": "AppIntents.IntentParameter.IntControlStyle", + "valueKind": "Runtime" + }, + { + "label": "inclusiveRange", + "type": "Swift.Optional<(lowerBound: Swift.Int, upperBound: Swift.Int)>", + "valueKind": "NilLiteral" + }, + { + "label": "requestValueDialog", + "type": "Swift.Optional", + "valueKind": "NilLiteral" + }, + { + "label": "inputConnectionBehavior", + "type": "AppIntents.InputConnectionBehavior", + "valueKind": "Runtime" + } + ], + "type": "AppIntents.IntentParameter" + }, + "valueKind": "InitCall" + }, + { + "file": "Unsupported.swift", + "isComputed": "false", + "isStatic": "true", + "label": "title", + "line": 13, + "mangledTypeName": "n/a - deprecated", + "type": "Foundation.LocalizedStringResource", + "value": "Alternatives", + "valueKind": "RawLiteral" + }, + { + "file": "Unsupported.swift", + "isComputed": "true", + "isStatic": "false", + "label": "number", + "line": 14, + "mangledTypeName": "n/a - deprecated", + "propertyWrappers": [ + { + "arguments": [ + { + "label": "title", + "type": "Foundation.LocalizedStringResource", + "value": "Number", + "valueKind": "RawLiteral" + } + ], + "file": "Unsupported.swift", + "line": 14, + "type": "AppIntents.IntentParameter" + } + ], + "type": "Swift.Int", + "value": { + "arguments": [ + { + "label": "title", + "type": "Foundation.LocalizedStringResource", + "value": "Number", + "valueKind": "RawLiteral" + }, + { + "label": "description", + "type": "Swift.Optional", + "valueKind": "NilLiteral" + }, + { + "label": "default", + "type": "Swift.Optional", + "valueKind": "NilLiteral" + }, + { + "label": "controlStyle", + "type": "AppIntents.IntentParameter.IntControlStyle", + "valueKind": "Runtime" + }, + { + "label": "inclusiveRange", + "type": "Swift.Optional<(lowerBound: Swift.Int, upperBound: Swift.Int)>", + "valueKind": "NilLiteral" + }, + { + "label": "requestValueDialog", + "type": "Swift.Optional", + "valueKind": "NilLiteral" + }, + { + "label": "inputConnectionBehavior", + "type": "AppIntents.InputConnectionBehavior", + "valueKind": "Runtime" + } + ], + "type": "AppIntents.IntentParameter" + }, + "valueKind": "InitCall" + }, + { + "file": "Unsupported.swift", + "isComputed": "true", + "isStatic": "false", + "label": "$number", + "line": 14, + "mangledTypeName": "n/a - deprecated", + "type": "AppIntents.IntentParameter", + "valueKind": "Runtime" + }, + { + "file": "Unsupported.swift", + "isComputed": "true", + "isStatic": "true", + "label": "parameterSummary", + "line": 15, + "mangledTypeName": "n/a - deprecated", + "type": "some AppIntents.ParameterSummary", + "value": { + "arguments": [ + { + "label": "", + "type": "Swift.KeyPath>", + "value": { + "components": [ + { + "label": "$number", + "type": "AppIntents.IntentParameter" + } + ], + "path": "$number", + "rootType": "Unsupported.SwitchProbe" + }, + "valueKind": "KeyPath" + }, + { + "label": "", + "type": "() -> AppIntents.ParameterSummaryTupleCaseCondition>, AppIntents.ParameterSummaryDefaultCaseCondition>)>", + "value": { + "members": [ + { + "element": { + "value": { + "arguments": [ + { + "label": "", + "type": "Swift.Int", + "value": "1", + "valueKind": "RawLiteral" + }, + { + "label": "", + "type": "() -> AppIntents.IntentParameterSummary", + "value": { + "members": [ + { + "element": { + "value": { + "arguments": [ + { + "label": "", + "type": "AppIntents.ParameterSummaryString", + "value": "One", + "valueKind": "RawLiteral" + }, + { + "label": "table", + "type": "Swift.Optional", + "valueKind": "NilLiteral" + } + ], + "type": "AppIntents.IntentParameterSummary" + }, + "valueKind": "InitCall" + }, + "kind": "buildExpression" + } + ], + "type": "" + }, + "valueKind": "Builder" + } + ], + "type": "AppIntents.ParameterSummaryCaseCondition>" + }, + "valueKind": "InitCall" + }, + "kind": "buildExpression" + }, + { + "element": { + "value": { + "arguments": [ + { + "label": "", + "type": "() -> AppIntents.IntentParameterSummary", + "value": { + "members": [ + { + "element": { + "value": { + "arguments": [ + { + "label": "", + "type": "AppIntents.ParameterSummaryString", + "value": "Other", + "valueKind": "RawLiteral" + }, + { + "label": "table", + "type": "Swift.Optional", + "valueKind": "NilLiteral" + } + ], + "type": "AppIntents.IntentParameterSummary" + }, + "valueKind": "InitCall" + }, + "kind": "buildExpression" + } + ], + "type": "" + }, + "valueKind": "Builder" + } + ], + "type": "AppIntents.ParameterSummaryDefaultCaseCondition>" + }, + "valueKind": "InitCall" + }, + "kind": "buildExpression" + } + ], + "type": "" + }, + "valueKind": "Builder" + } + ], + "type": "AppIntents.ParameterSummarySwitchCondition>, AppIntents.ParameterSummaryDefaultCaseCondition>)>>" + }, + "valueKind": "InitCall" + } + ], + "typeName": "Unsupported.SwitchProbe" + }, + { + "allConformances": [ + { + "conformanceDefiningModule": "Unsupported", + "protocolName": "AppIntents.AppIntent" + }, + { + "conformanceDefiningModule": "Unsupported", + "protocolName": "AppIntents.PersistentlyIdentifiable" + }, + { + "conformanceDefiningModule": "Unsupported", + "protocolName": "AppIntents._SupportsAppDependencies" + }, + { + "conformanceDefiningModule": "Unsupported", + "protocolName": "Swift.Sendable" + }, + { + "conformanceDefiningModule": "Unsupported", + "protocolName": "Swift.SendableMetatype" + }, + { + "conformanceDefiningModule": "Unsupported", + "protocolName": "Swift.BitwiseCopyable" + } + ], + "associatedTypeAliases": [ + { + "opaqueTypeProtocolRequirements": [ + "AppIntents.IntentResult" + ], + "opaqueTypeSameTypeRequirements": [], + "substitutedMangledTypeName": "11Unsupported10TableProbeV7performQryYaKFQOy_Qo_", + "substitutedTypeName": "some AppIntents.IntentResult", + "typeAliasName": "PerformResult" + }, + { + "opaqueTypeProtocolRequirements": [ + "AppIntents.ParameterSummary" + ], + "opaqueTypeSameTypeRequirements": [], + "substitutedMangledTypeName": "11Unsupported10TableProbeV16parameterSummaryQrvpZQOy_Qo_", + "substitutedTypeName": "some AppIntents.ParameterSummary", + "typeAliasName": "SummaryContent" + } + ], + "conformances": [ + "AppIntents.AppIntent", + "AppIntents.PersistentlyIdentifiable", + "AppIntents._SupportsAppDependencies", + "Swift.Sendable", + "Swift.SendableMetatype", + "Swift.BitwiseCopyable" + ], + "file": "Unsupported.swift", + "kind": "struct", + "line": 24, + "mangledTypeName": "11Unsupported10TableProbeV", + "properties": [ + { + "file": "Unsupported.swift", + "isComputed": "false", + "isStatic": "true", + "label": "title", + "line": 25, + "mangledTypeName": "n/a - deprecated", + "type": "Foundation.LocalizedStringResource", + "value": "Localization table", + "valueKind": "RawLiteral" + }, + { + "file": "Unsupported.swift", + "isComputed": "true", + "isStatic": "true", + "label": "parameterSummary", + "line": 26, + "mangledTypeName": "n/a - deprecated", + "type": "some AppIntents.ParameterSummary", + "value": { + "arguments": [ + { + "label": "", + "type": "AppIntents.ParameterSummaryString", + "value": "From table", + "valueKind": "RawLiteral" + }, + { + "label": "table", + "type": "Swift.Optional", + "value": "Probe", + "valueKind": "RawLiteral" + } + ], + "type": "AppIntents.IntentParameterSummary" + }, + "valueKind": "InitCall" + } + ], + "typeName": "Unsupported.TableProbe" + }, + { + "allConformances": [ + { + "conformanceDefiningModule": "Unsupported", + "protocolName": "AppIntents.AppIntent" + }, + { + "conformanceDefiningModule": "Unsupported", + "protocolName": "AppIntents.PersistentlyIdentifiable" + }, + { + "conformanceDefiningModule": "Unsupported", + "protocolName": "AppIntents._SupportsAppDependencies" + }, + { + "conformanceDefiningModule": "Unsupported", + "protocolName": "Swift.Sendable" + }, + { + "conformanceDefiningModule": "Unsupported", + "protocolName": "Swift.SendableMetatype" + } + ], + "associatedTypeAliases": [ + { + "opaqueTypeProtocolRequirements": [ + "AppIntents.IntentResult" + ], + "opaqueTypeSameTypeRequirements": [], + "substitutedMangledTypeName": "11Unsupported10RangeProbeV7performQryYaKFQOy_Qo_", + "substitutedTypeName": "some AppIntents.IntentResult", + "typeAliasName": "PerformResult" + }, + { + "opaqueTypeProtocolRequirements": [ + "AppIntents.ParameterSummary" + ], + "opaqueTypeSameTypeRequirements": [], + "substitutedMangledTypeName": "10AppIntents0A6IntentPAAE16parameterSummaryQrvpZQOy11Unsupported10RangeProbeV_Qo_", + "substitutedTypeName": "some AppIntents.ParameterSummary", + "typeAliasName": "SummaryContent" + } + ], + "conformances": [ + "AppIntents.AppIntent", + "AppIntents.PersistentlyIdentifiable", + "AppIntents._SupportsAppDependencies", + "Swift.Sendable", + "Swift.SendableMetatype" + ], + "file": "Unsupported.swift", + "kind": "struct", + "line": 30, + "mangledTypeName": "11Unsupported10RangeProbeV", + "properties": [ + { + "file": "Unsupported.swift", + "isComputed": "false", + "isStatic": "false", + "label": "_count", + "line": 32, + "mangledTypeName": "n/a - deprecated", + "type": "AppIntents.IntentParameter", + "value": { + "arguments": [ + { + "label": "title", + "type": "Foundation.LocalizedStringResource", + "value": "Count", + "valueKind": "RawLiteral" + }, + { + "label": "description", + "type": "Swift.Optional", + "valueKind": "NilLiteral" + }, + { + "label": "default", + "type": "Swift.Optional", + "valueKind": "NilLiteral" + }, + { + "label": "controlStyle", + "type": "AppIntents.IntentParameter.IntControlStyle", + "valueKind": "Runtime" + }, + { + "label": "inclusiveRange", + "type": "Swift.Optional<(lowerBound: Swift.Int, upperBound: Swift.Int)>", + "value": [ + { + "type": "Swift.Int", + "value": "1", + "valueKind": "RawLiteral" + }, + { + "type": "Swift.Int", + "value": "5", + "valueKind": "RawLiteral" + } + ], + "valueKind": "Tuple" + }, + { + "label": "requestValueDialog", + "type": "Swift.Optional", + "valueKind": "NilLiteral" + }, + { + "label": "inputConnectionBehavior", + "type": "AppIntents.InputConnectionBehavior", + "valueKind": "Runtime" + } + ], + "type": "AppIntents.IntentParameter" + }, + "valueKind": "InitCall" + }, + { + "file": "Unsupported.swift", + "isComputed": "false", + "isStatic": "true", + "label": "title", + "line": 31, + "mangledTypeName": "n/a - deprecated", + "type": "Foundation.LocalizedStringResource", + "value": "Range", + "valueKind": "RawLiteral" + }, + { + "file": "Unsupported.swift", + "isComputed": "true", + "isStatic": "false", + "label": "count", + "line": 32, + "mangledTypeName": "n/a - deprecated", + "propertyWrappers": [ + { + "arguments": [ + { + "label": "title", + "type": "Foundation.LocalizedStringResource", + "value": "Count", + "valueKind": "RawLiteral" + }, + { + "label": "inclusiveRange", + "type": "Swift.Optional<(lowerBound: Swift.Int, upperBound: Swift.Int)>", + "value": [ + { + "type": "Swift.Int", + "value": "1", + "valueKind": "RawLiteral" + }, + { + "type": "Swift.Int", + "value": "5", + "valueKind": "RawLiteral" + } + ], + "valueKind": "Tuple" + } + ], + "file": "Unsupported.swift", + "line": 32, + "type": "AppIntents.IntentParameter" + } + ], + "type": "Swift.Int", + "value": { + "arguments": [ + { + "label": "title", + "type": "Foundation.LocalizedStringResource", + "value": "Count", + "valueKind": "RawLiteral" + }, + { + "label": "description", + "type": "Swift.Optional", + "valueKind": "NilLiteral" + }, + { + "label": "default", + "type": "Swift.Optional", + "valueKind": "NilLiteral" + }, + { + "label": "controlStyle", + "type": "AppIntents.IntentParameter.IntControlStyle", + "valueKind": "Runtime" + }, + { + "label": "inclusiveRange", + "type": "Swift.Optional<(lowerBound: Swift.Int, upperBound: Swift.Int)>", + "value": [ + { + "type": "Swift.Int", + "value": "1", + "valueKind": "RawLiteral" + }, + { + "type": "Swift.Int", + "value": "5", + "valueKind": "RawLiteral" + } + ], + "valueKind": "Tuple" + }, + { + "label": "requestValueDialog", + "type": "Swift.Optional", + "valueKind": "NilLiteral" + }, + { + "label": "inputConnectionBehavior", + "type": "AppIntents.InputConnectionBehavior", + "valueKind": "Runtime" + } + ], + "type": "AppIntents.IntentParameter" + }, + "valueKind": "InitCall" + }, + { + "file": "Unsupported.swift", + "isComputed": "true", + "isStatic": "false", + "label": "$count", + "line": 32, + "mangledTypeName": "n/a - deprecated", + "type": "AppIntents.IntentParameter", + "valueKind": "Runtime" + } + ], + "typeName": "Unsupported.RangeProbe" + }, + { + "allConformances": [ + { + "conformanceDefiningModule": "Unsupported", + "protocolName": "AppIntents.DynamicOptionsProvider" + }, + { + "conformanceDefiningModule": "Unsupported", + "protocolName": "AppIntents._SupportsAppDependencies" + }, + { + "conformanceDefiningModule": "Unsupported", + "protocolName": "Swift.Sendable" + }, + { + "conformanceDefiningModule": "Unsupported", + "protocolName": "Swift.BitwiseCopyable" + } + ], + "associatedTypeAliases": [ + { + "substitutedMangledTypeName": "SaySSG", + "substitutedTypeName": "Swift.Array", + "typeAliasName": "Result" + }, + { + "substitutedMangledTypeName": "SS", + "substitutedTypeName": "Swift.String", + "typeAliasName": "DefaultValue" + } + ], + "conformances": [ + "AppIntents.DynamicOptionsProvider", + "AppIntents._SupportsAppDependencies", + "Swift.Sendable", + "Swift.BitwiseCopyable" + ], + "file": "Unsupported.swift", + "kind": "struct", + "line": 36, + "mangledTypeName": "11Unsupported7ChoicesV", + "properties": [], + "typeName": "Unsupported.Choices" + }, + { + "allConformances": [ + { + "conformanceDefiningModule": "Unsupported", + "protocolName": "AppIntents.AppIntent" + }, + { + "conformanceDefiningModule": "Unsupported", + "protocolName": "AppIntents.PersistentlyIdentifiable" + }, + { + "conformanceDefiningModule": "Unsupported", + "protocolName": "AppIntents._SupportsAppDependencies" + }, + { + "conformanceDefiningModule": "Unsupported", + "protocolName": "Swift.Sendable" + }, + { + "conformanceDefiningModule": "Unsupported", + "protocolName": "Swift.SendableMetatype" + } + ], + "associatedTypeAliases": [ + { + "opaqueTypeProtocolRequirements": [ + "AppIntents.IntentResult" + ], + "opaqueTypeSameTypeRequirements": [], + "substitutedMangledTypeName": "11Unsupported20OptionsProviderProbeV7performQryYaKFQOy_Qo_", + "substitutedTypeName": "some AppIntents.IntentResult", + "typeAliasName": "PerformResult" + }, + { + "opaqueTypeProtocolRequirements": [ + "AppIntents.ParameterSummary" + ], + "opaqueTypeSameTypeRequirements": [], + "substitutedMangledTypeName": "10AppIntents0A6IntentPAAE16parameterSummaryQrvpZQOy11Unsupported20OptionsProviderProbeV_Qo_", + "substitutedTypeName": "some AppIntents.ParameterSummary", + "typeAliasName": "SummaryContent" + } + ], + "conformances": [ + "AppIntents.AppIntent", + "AppIntents.PersistentlyIdentifiable", + "AppIntents._SupportsAppDependencies", + "Swift.Sendable", + "Swift.SendableMetatype" + ], + "file": "Unsupported.swift", + "kind": "struct", + "line": 40, + "mangledTypeName": "11Unsupported20OptionsProviderProbeV", + "properties": [ + { + "file": "Unsupported.swift", + "isComputed": "false", + "isStatic": "false", + "label": "_choice", + "line": 42, + "mangledTypeName": "n/a - deprecated", + "type": "AppIntents.IntentParameter", + "value": { + "arguments": [ + { + "label": "title", + "type": "Foundation.LocalizedStringResource", + "value": "Choice", + "valueKind": "RawLiteral" + }, + { + "label": "description", + "type": "Swift.Optional", + "valueKind": "NilLiteral" + }, + { + "label": "inputOptions", + "type": "Swift.Optional", + "valueKind": "NilLiteral" + }, + { + "label": "requestValueDialog", + "type": "Swift.Optional", + "valueKind": "NilLiteral" + }, + { + "label": "inputConnectionBehavior", + "type": "AppIntents.InputConnectionBehavior", + "valueKind": "Runtime" + }, + { + "label": "optionsProvider", + "type": "Unsupported.Choices", + "value": { + "arguments": [], + "type": "Unsupported.Choices" + }, + "valueKind": "InitCall" + } + ], + "type": "AppIntents.IntentParameter" + }, + "valueKind": "InitCall" + }, + { + "file": "Unsupported.swift", + "isComputed": "false", + "isStatic": "true", + "label": "title", + "line": 41, + "mangledTypeName": "n/a - deprecated", + "type": "Foundation.LocalizedStringResource", + "value": "Choices", + "valueKind": "RawLiteral" + }, + { + "file": "Unsupported.swift", + "isComputed": "true", + "isStatic": "false", + "label": "choice", + "line": 42, + "mangledTypeName": "n/a - deprecated", + "propertyWrappers": [ + { + "arguments": [ + { + "label": "title", + "type": "Foundation.LocalizedStringResource", + "value": "Choice", + "valueKind": "RawLiteral" + }, + { + "label": "optionsProvider", + "type": "Unsupported.Choices", + "value": { + "arguments": [], + "type": "Unsupported.Choices" + }, + "valueKind": "InitCall" + } + ], + "file": "Unsupported.swift", + "line": 42, + "type": "AppIntents.IntentParameter" + } + ], + "type": "Swift.String", + "value": { + "arguments": [ + { + "label": "title", + "type": "Foundation.LocalizedStringResource", + "value": "Choice", + "valueKind": "RawLiteral" + }, + { + "label": "description", + "type": "Swift.Optional", + "valueKind": "NilLiteral" + }, + { + "label": "inputOptions", + "type": "Swift.Optional", + "valueKind": "NilLiteral" + }, + { + "label": "requestValueDialog", + "type": "Swift.Optional", + "valueKind": "NilLiteral" + }, + { + "label": "inputConnectionBehavior", + "type": "AppIntents.InputConnectionBehavior", + "valueKind": "Runtime" + }, + { + "label": "optionsProvider", + "type": "Unsupported.Choices", + "value": { + "arguments": [], + "type": "Unsupported.Choices" + }, + "valueKind": "InitCall" + } + ], + "type": "AppIntents.IntentParameter" + }, + "valueKind": "InitCall" + }, + { + "file": "Unsupported.swift", + "isComputed": "true", + "isStatic": "false", + "label": "$choice", + "line": 42, + "mangledTypeName": "n/a - deprecated", + "type": "AppIntents.IntentParameter", + "valueKind": "Runtime" + } + ], + "typeName": "Unsupported.OptionsProviderProbe" + } +] diff --git a/sweetpad-cli/fixtures/appintents/regen.py b/sweetpad-cli/fixtures/appintents/regen.py index d972604e..db23c1fc 100644 --- a/sweetpad-cli/fixtures/appintents/regen.py +++ b/sweetpad-cli/fixtures/appintents/regen.py @@ -19,6 +19,16 @@ import tempfile HERE = Path(__file__).resolve().parent +PROBES = { + # Swift source name, module name and checked-in registration. + "DataApp": ("DataApp", "extract.actionsdata"), + "Types": ("MetadataProbe", "Types.actionsdata"), + "Files": ("FileProbe", "Files.actionsdata"), + "InputOptionsProbe": ("InputOptionsProbe", "InputOptionsProbe.actions.json"), + "OutputProbe": ("OutputProbe", "OutputProbe.actions.json"), + "ResultProtocols": ("ResultProtocols", "ResultProtocols.actionsdata"), + "Unsupported": ("Unsupported", None), +} def capture(*args): return subprocess.check_output(args, text=True).strip() @@ -56,17 +66,24 @@ def decompress(path): def main(): parser = argparse.ArgumentParser(description=__doc__) - parser.add_argument("--only", choices=["DataApp", "Types", "Files", "InputOptionsProbe", "OutputProbe"]) - selected = parser.parse_args().only + parser.add_argument("--only", choices=PROBES) + parser.add_argument("--export-registration", type=Path, + help="export fresh complete registrations and compiler inputs for Linux replay, without updating fixtures") + args = parser.parse_args() developer = Path(os.environ.get("DEVELOPER_DIR") or capture("xcode-select", "-p")) sweetpad = HERE.parents[2] / "target/debug/sweetpad" + if args.export_registration: + args.export_registration.mkdir(parents=True, exist_ok=True) + save_json(args.export_registration / "sdk.json", { + "version": capture("xcrun", "--sdk", "iphoneos", "--show-sdk-version"), + "xcode": capture("xcodebuild", "-version"), + }) outputs = {} with tempfile.TemporaryDirectory(prefix="sweetpad-appintents-oracle-") as tmp: work = Path(tmp) (work / "Host.swift").write_text('import SwiftUI\n@main struct ProbeApp: App { var body: some Scene { WindowGroup { Text("Metadata") } } }\n') spec = {"name": "AppIntentsOracle", "options": {"deploymentTarget": {"iOS": "18.0"}}, "targets": {}} - for source, module in [("DataApp", "DataApp"), ("Types", "MetadataProbe"), ("Files", "FileProbe"), - ("InputOptionsProbe", "InputOptionsProbe"), ("OutputProbe", "OutputProbe")]: + for source, (module, _) in PROBES.items(): spec["targets"][module] = {"type": "application", "platform": "iOS", "sources": [{"path": str(HERE / f"{source}.swift")}, {"path": "Host.swift"}], "settings": {"base": {"GENERATE_INFOPLIST_FILE": "YES", "SWIFT_VERSION": "6.0", "SWIFT_EMIT_LOC_STRINGS": "YES", @@ -74,31 +91,44 @@ def main(): save_json(work / "project.json", spec) subprocess.run(["xcodegen", "generate", "--spec", str(work / "project.json"), "--project", str(work)], check=True) derived = work / "DerivedData" - for source, module, expected in [("DataApp", "DataApp", "extract.actionsdata"), - ("Types", "MetadataProbe", "Types.actionsdata"), - ("Files", "FileProbe", "Files.actionsdata"), - ("InputOptionsProbe", "InputOptionsProbe", "InputOptionsProbe.actions.json"), - ("OutputProbe", "OutputProbe", "OutputProbe.actions.json")]: - if selected and source != selected: + for source, (module, expected) in PROBES.items(): + if args.only and source != args.only: continue command = [str(sweetpad), "build", "--developer-dir", str(developer), "--project", str(work / "AppIntentsOracle.xcodeproj"), "--scheme", module, "--destination", "generic/platform=iOS Simulator", "--json", "--non-interactive", "--", "-derivedDataPath", str(derived), "ARCHS=arm64", "ONLY_ACTIVE_ARCH=YES", "CODE_SIGNING_ALLOWED=NO"] - result = subprocess.run(command, capture_output=True, text=True, check=True) + result = subprocess.run(command, capture_output=True, text=True) + if result.returncode: + raise RuntimeError(result.stdout + result.stderr) report = json.loads(result.stdout) if not report.get("data", {}).get("built"): raise RuntimeError(result.stdout + result.stderr) objects = derived / f"Build/Intermediates.noindex/AppIntentsOracle.build/Debug-iphonesimulator/{module}.build" constants = objects / f"Objects-normal/arm64/{source}.swiftconstvalues" metadata = Path(report["data"]["productPath"]) / "Metadata.appintents" + if args.export_registration: + dest = args.export_registration / source + dest.mkdir(parents=True, exist_ok=True) + for path in sorted(constants.parent.glob("*.swiftconstvalues")): + values = json.loads(path.read_text()) + normalize_paths(values) + save_json(dest / path.name, values) + for name in ("extract.actionsdata", "version.json"): + save_json(dest / name, json.loads((metadata / name).read_text())) + continue values = json.loads(constants.read_text()) normalize_paths(values) outputs[f"{source}.swiftconstvalues"] = json.dumps(values, indent=2, sort_keys=True).encode() + b"\n" + if expected is None: + continue if expected.endswith(".actions.json"): # The probe's actions only: the metadata under test. actions = json.loads((metadata / "extract.actionsdata").read_text())["actions"] outputs[expected] = json.dumps(actions, indent=2, sort_keys=True).encode() + b"\n" + elif source == "ResultProtocols": + registration = json.loads((metadata / "extract.actionsdata").read_text()) + outputs[expected] = json.dumps(registration, indent=2, sort_keys=True).encode() + b"\n" else: outputs[expected] = (metadata / "extract.actionsdata").read_bytes() if source == "DataApp": diff --git a/sweetpad-cli/src/cli/appintents/metadata.rs b/sweetpad-cli/src/cli/appintents/metadata.rs index aa964cb9..f67f5027 100644 --- a/sweetpad-cli/src/cli/appintents/metadata.rs +++ b/sweetpad-cli/src/cli/appintents/metadata.rs @@ -35,6 +35,32 @@ fn identifier(value: &Value) -> &str { fn availability() -> Value { json!({"LNPlatformNameWildcard":{"introducedVersion":"*"}}) } +fn action_availability(value: &Value) -> Value { + let mut annotations = availability(); + for attribute in array(&value["availabilityAttributes"]) { + let platform = match text(&attribute["platform"]) { + "iOS" => "LNPlatformNameIOS", + "macOS" => "LNPlatformNameMACOS", + "tvOS" => "LNPlatformNameTVOS", + "watchOS" => "LNPlatformNameWATCHOS", + "visionOS" => "LNPlatformNameVISIONOS", + // Xcode has no separate registration entry for macCatalyst. + _ => continue, + }; + for key in ["introducedVersion", "deprecatedVersion", "obsoletedVersion"] { + if let Some(version) = attribute[key].as_str() { + annotations[platform][key] = json!(version); + } + } + if attribute["isDeprecated"] == true { + annotations[platform]["deprecatedVersion"] = json!("*"); + } + if attribute["isUnavailable"] == true { + annotations[platform]["obsoletedVersion"] = json!("*"); + } + } + annotations +} fn visibility() -> Value { json!({"assistantOnly":false,"isDiscoverable":true}) } @@ -156,8 +182,11 @@ pub(super) fn strings_data(types: &[Value], metadata: &Value) -> Option { fn action(value: &Value, types: &[Value]) -> Result { let id = identifier(value); let widget = conforms(value, "WidgetConfigurationIntent"); + let snippet = conforms(value, "SnippetIntent"); let open = boolean(value, "openAppWhenRun", false)?; - let discoverable = boolean(value, "isDiscoverable", true)?; + let (flags, output) = action_result(value, types)?; + // Native registration hides a snippet without an output value unless the author opts in. + let discoverable = boolean(value, "isDiscoverable", !snippet || output.is_some())?; let authentication = if let Some(policy) = property(value, "authenticationPolicy") { match text(&policy["value"]["name"]) { "alwaysAllowed" => 0, @@ -182,25 +211,33 @@ fn action(value: &Value, types: &[Value]) -> Result { )?; let mut action = json!({ "assistantDefinedSchemaTraits":[],"assistantDefinedSchemas":[],"authenticationPolicy":authentication, - "availabilityAnnotations":availability(),"effectiveBundleIdentifiers":[], + "availabilityAnnotations":action_availability(value),"effectiveBundleIdentifiers":[], "fullyQualifiedTypeName":value["typeName"],"identifier":id,"isAuthPolExplicit":property(value,"authenticationPolicy").is_some(), - "isDiscoverable":discoverable&&!widget,"mangledTypeName":value["mangledTypeName"], + "mangledTypeName":value["mangledTypeName"], "mangledTypeNameByBundleIdentifier":{},"mangledTypeNameByBundleIdentifierV2":{}, "mangledTypeNameV2":value["mangledTypeName"],"openAppWhenRun":open, - "outputFlags":if widget {8}else{0},"parameters":[],"presentationStyle":0, + "isDiscoverable":discoverable && !widget,"outputFlags":flags | if widget {8} else {0},"parameters":[],"presentationStyle":0, "requiredCapabilities":[],"supportedModes":if open {2}else{1}, "systemProtocolMetadata":[],"systemProtocolMetadataV2":[],"systemProtocols":[], "title":localized(&title),"typeSpecificMetadata":[],"visibilityMetadata":visibility(), }); - if !discoverable { - action["visibilityMetadata"]["isDiscoverable"] = json!(false); - } - if widget { - let protocol = "com.apple.link.systemProtocol.WidgetConfiguration"; - action["systemProtocolMetadata"] = json!([protocol,{"empty":{}}]); - action["systemProtocolMetadataV2"] = action["systemProtocolMetadata"].clone(); - action["systemProtocols"] = json!([protocol]); + action["visibilityMetadata"]["isDiscoverable"] = json!(discoverable); + for (applies, protocol) in [ + (widget, "com.apple.link.systemProtocol.WidgetConfiguration"), + (snippet, "com.apple.link.systemProtocol.Snippet"), + ] { + if applies { + action["systemProtocolMetadata"] + .as_array_mut() + .unwrap() + .extend([json!(protocol), json!({"empty":{}})]); + action["systemProtocols"] + .as_array_mut() + .unwrap() + .push(json!(protocol)); + } } + action["systemProtocolMetadataV2"] = action["systemProtocolMetadata"].clone(); if let Some(description) = property(value, "description") { action["descriptionMetadata"] = json!({"descriptionText":localized(&literal(description)?),"searchKeywords":[]}); @@ -218,29 +255,46 @@ fn action(value: &Value, types: &[Value]) -> Result { if let Some(summary) = action_summary(value, id)? { action["actionConfiguration"] = summary; } + if let Some(output) = output { + action["outputType"] = output; + } + Ok(action) +} + +fn action_result(value: &Value, types: &[Value]) -> Result<(u8, Option), String> { + let id = identifier(value); + let mut flags = 0; + let mut output = None; for alias in array(&value["associatedTypeAliases"]) .iter() .filter(|a| a["typeAliasName"] == "PerformResult") { - let mut flags = action["outputFlags"].as_u64().unwrap(); for requirement in array(&alias["opaqueTypeProtocolRequirements"]) { match text(requirement) { "AppIntents.OpensIntent" => flags |= 1, "AppIntents.ShowsSnippetView" => flags |= 2, "AppIntents.ProvidesDialog" => flags |= 4, + "AppIntents.ShowsSnippetIntent" => flags |= 32, + "AppIntents.IntentResult" | "AppIntents.ReturnsValue" => {} + name if name.starts_with("AppIntents.") => { + return Err(format!( + "unsupported App Intents result protocol '{name}' in intent '{id}'" + )); + } _ => {} } } - action["outputFlags"] = json!(flags); for requirement in array(&alias["opaqueTypeSameTypeRequirements"]) .iter() .filter(|r| r["typeAliasName"] == "AppIntents.IntentResult.Value") { - action["outputType"] = - parameters::value_type(text(&requirement["substitutedTypeName"]), types)?; + output = Some(parameters::value_type( + text(&requirement["substitutedTypeName"]), + types, + )?); } } - Ok(action) + Ok((flags, output)) } /// `parameterSummary` as a plain `Summary`: constant text with parameter key paths, @@ -418,12 +472,17 @@ mod tests { assert_eq!(actual, expected); } fn normalize(value: &mut Value) { + if let Some(generator) = value.get_mut("generator").and_then(Value::as_object_mut) { + generator.remove("name"); + generator.remove("version"); + } + normalize_collections(value); + } + fn normalize_collections(value: &mut Value) { match value { Value::Object(object) => { for (key, v) in object { - if key == "generator" { - *v = json!({"name":"normalized"}); - } else if key == "resolvableInputTypes" { + if key == "resolvableInputTypes" { v.as_array_mut().unwrap().sort_by_key(Value::to_string); } else if key == "typeSpecificMetadata" { // A flat key/value list that Xcode writes in hash order. @@ -433,11 +492,11 @@ mod tests { pairs.sort_by_key(|pair| pair[0].to_string()); *values = pairs.concat(); } else { - normalize(v); + normalize_collections(v); } } } - Value::Array(values) => values.iter_mut().for_each(normalize), + Value::Array(values) => values.iter_mut().for_each(normalize_collections), _ => {} } } @@ -448,6 +507,10 @@ mod tests { ("DataApp.swiftconstvalues", "extract.actionsdata"), ("Types.swiftconstvalues", "Types.actionsdata"), ("Files.swiftconstvalues", "Files.actionsdata"), + ( + "ResultProtocols.swiftconstvalues", + "ResultProtocols.actionsdata", + ), ] { let types: Vec = serde_json::from_slice(&std::fs::read(dir.join(input)).unwrap()).unwrap(); @@ -476,40 +539,59 @@ mod tests { } } #[test] - fn unsupported_parameter_summaries_stop_extraction() { - fn summary(types: &mut [Value]) -> &mut Value { - types - .iter_mut() - .find(|t| text(&t["typeName"]).ends_with(".SummaryTwoProbeIntent")) - .unwrap()["properties"] - .as_array_mut() - .unwrap() - .iter_mut() - .find(|p| p["label"] == "parameterSummary") - .unwrap() + fn unsupported_swift_declarations_report_the_rejected_option_or_summary() { + let types: Vec = serde_json::from_str(include_str!( + "../../../fixtures/appintents/Unsupported.swiftconstvalues" + )) + .unwrap(); + for (name, diagnostic) in [ + ( + "WhenProbe", + "unsupported parameterSummary 'AppIntents.ParameterSummaryWhenCondition", + ), + ( + "SwitchProbe", + "unsupported parameterSummary 'AppIntents.ParameterSummarySwitchCondition", + ), + ( + "TableProbe", + "unsupported parameterSummary argument 'table'", + ), + ( + "RangeProbe", + "unsupported App Intents parameter option 'inclusiveRange'", + ), + ( + "OptionsProviderProbe", + "unsupported App Intents parameter option 'optionsProvider'", + ), + ] { + let intent = types.iter().find(|t| identifier(t) == name).unwrap(); + let error = extract(std::slice::from_ref(intent)).unwrap_err(); + assert!(error.contains(diagnostic), "{name}: {error}"); } + } + #[test] + fn unknown_sdk_result_protocols_report_the_protocol_and_intent() { let mut types: Vec = serde_json::from_str(include_str!( - "../../../fixtures/appintents/OutputProbe.swiftconstvalues" + "../../../fixtures/appintents/ResultProtocols.swiftconstvalues" )) .unwrap(); - summary(&mut types)["value"]["arguments"][1]["valueKind"] = json!("RawLiteral"); - assert!( - extract(&types) - .unwrap_err() - .contains("unsupported parameterSummary argument 'table'") + let intent = types + .iter_mut() + .find(|t| identifier(t) == "InteractiveResultProbe") + .unwrap(); + let result = intent["associatedTypeAliases"] + .as_array_mut() + .unwrap() + .iter_mut() + .find(|a| a["typeAliasName"] == "PerformResult") + .unwrap(); + result["opaqueTypeProtocolRequirements"] = json!(["AppIntents.FutureResult"]); + assert_eq!( + extract(&types).unwrap_err(), + "unsupported App Intents result protocol 'AppIntents.FutureResult' in intent 'InteractiveResultProbe'" ); - for condition in [ - "ParameterSummaryWhenCondition", - "ParameterSummarySwitchCondition", - ] { - let kind = format!("AppIntents.{condition}"); - summary(&mut types)["value"]["type"] = json!(kind); - assert!( - extract(&types) - .unwrap_err() - .contains(&format!("unsupported parameterSummary '{kind}'")) - ); - } } #[test] fn input_options_reject_what_they_cannot_encode() { diff --git a/sweetpad-cli/src/cli/appintents/metadata/parameters.rs b/sweetpad-cli/src/cli/appintents/metadata/parameters.rs index 956b06b8..3a09e9a4 100644 --- a/sweetpad-cli/src/cli/appintents/metadata/parameters.rs +++ b/sweetpad-cli/src/cli/appintents/metadata/parameters.rs @@ -86,7 +86,8 @@ pub(super) fn parameter(value: &Value, types: &[Value]) -> Result .iter() .find(|a| a["label"] == "inputConnectionBehavior"); let connection = match connection.map(|v| text(&v["value"]["name"])) { - None => 0, + None | Some("default") => 0, + Some("never") => 1, Some("connectToPreviousIntentResult") => 2, Some(name) => return Err(format!("unsupported inputConnectionBehavior '{name}'")), }; @@ -101,7 +102,7 @@ pub(super) fn parameter(value: &Value, types: &[Value]) -> Result let default = argument(value, "default").filter(|v| v["valueKind"] != "NilLiteral"); let mut parameter = json!({ "capabilities":u8::from(default.is_some()),"dynamicOptionsSupport":u8::from(kind.get("entity").is_some()), - "inputConnectionBehavior":connection,"isInput":connection != 0,"isOptional":is_optional, + "inputConnectionBehavior":connection,"isInput":connection == 2,"isOptional":is_optional, "name":value["label"],"resolvableInputTypes":resolvers(&kind), "title":localized(&literal(title)?),"typeSpecificMetadata":[],"valueType":kind, }); From a449bee02a007b5f5e01bed564754e78e4466705 Mon Sep 17 00:00:00 2001 From: Yevhenii Hyzyla Date: Sat, 28 Nov 2026 00:22:30 +0100 Subject: [PATCH 5/7] Audit the App Intents SDK surface and replay fresh Xcode registrations in Linux CI --- .../workflows/appintents-registration.yaml | 71 +++++++ sweetpad-cli/fixtures/appintents/README.md | 33 +++ .../appintents/sdk-27.2-signatures.txt | 195 ++++++++++++++++++ sweetpad-cli/fixtures/appintents/sdk-27.2.md | 97 +++++++++ .../fixtures/appintents/sdk_coverage.py | 140 +++++++++++++ .../fixtures/appintents/test_sdk_coverage.py | 58 ++++++ .../appintents/verify_registration.py | 133 ++++++++++++ sweetpad-lib/ci/bundle_comparison.py | 8 +- 8 files changed, 732 insertions(+), 3 deletions(-) create mode 100644 .github/workflows/appintents-registration.yaml create mode 100644 sweetpad-cli/fixtures/appintents/sdk-27.2-signatures.txt create mode 100644 sweetpad-cli/fixtures/appintents/sdk-27.2.md create mode 100644 sweetpad-cli/fixtures/appintents/sdk_coverage.py create mode 100644 sweetpad-cli/fixtures/appintents/test_sdk_coverage.py create mode 100644 sweetpad-cli/fixtures/appintents/verify_registration.py diff --git a/.github/workflows/appintents-registration.yaml b/.github/workflows/appintents-registration.yaml new file mode 100644 index 00000000..ae45fd4a --- /dev/null +++ b/.github/workflows/appintents-registration.yaml @@ -0,0 +1,71 @@ +name: App Intents SDK and registration + +on: + pull_request: + paths: &paths + - 'sweetpad-cli/src/**' + - 'sweetpad-cli/fixtures/appintents/**' + - 'sweetpad-core/**' + - 'sweetpad-lib/src/**' + - 'sweetpad-lib/ci/bundle_comparison.py' + - 'Cargo.*' + - 'rust-toolchain.toml' + - '.github/workflows/appintents-registration.yaml' + push: + branches: [main] + paths: *paths + schedule: + - cron: '25 6 * * 1' + workflow_dispatch: + +permissions: + contents: read + +concurrency: + group: appintents-registration-${{ github.ref }} + cancel-in-progress: true + +jobs: + sdk: + name: Classify the public iOS SDK + runs-on: macos-26 + steps: + - uses: actions/checkout@v7 + - &select-xcode + name: Select the newest stable installed Xcode + uses: maxim-lobanov/setup-xcode@ed7a3b1fda3918c0306d1b724322adc0b8cc0a90 # v1 + with: + xcode-version: latest-stable + - run: xcodebuild -version + - run: python3 -B -I sweetpad-cli/fixtures/appintents/sdk_coverage.py + + native: + name: Capture registration with Xcode + runs-on: macos-26 + steps: + - uses: actions/checkout@v7 + - *select-xcode + - uses: Swatinem/rust-cache@v2 + - run: cargo build --locked -p sweetpad-cli --bin sweetpad + - run: command -v xcodegen || brew install xcodegen + - run: python3 -B -I sweetpad-cli/fixtures/appintents/regen.py --export-registration "$RUNNER_TEMP/registrations" + - uses: actions/upload-artifact@v7 + with: + name: appintents-registrations + path: ${{ runner.temp }}/registrations + if-no-files-found: error + + linux: + name: Compare complete registrations on Linux + needs: native + runs-on: ubuntu-24.04 + steps: + - uses: actions/checkout@v7 + - uses: Swatinem/rust-cache@v2 + - uses: actions/download-artifact@v8 + with: + name: appintents-registrations + path: ${{ runner.temp }}/registrations + - run: cargo build --locked -p sweetpad-cli --bin sweetpad + - run: python3 -B -I sweetpad-cli/fixtures/appintents/verify_registration.py "$RUNNER_TEMP/registrations" + - run: python3 -B -m unittest discover -s sweetpad-cli/fixtures/appintents -p 'test_*.py' diff --git a/sweetpad-cli/fixtures/appintents/README.md b/sweetpad-cli/fixtures/appintents/README.md index e9dfb24d..c638f239 100644 --- a/sweetpad-cli/fixtures/appintents/README.md +++ b/sweetpad-cli/fixtures/appintents/README.md @@ -27,3 +27,36 @@ conditional summaries, summaries with a localization table, and dependency metadata currently stop extraction with an error. Localized shortcut phrase models and availability-specific metadata need more coverage. These captures establish format compatibility, not device registration or Siri behavior. + +## SDK upgrade checks + +The iOS 27.2 checklist links each parameter option, result protocol, and summary +form to its evidence. It also lists the two result compositions involving +`OpensIntent`. The inventory records the public overloads within each family. +[SDK coverage and remaining gaps](sdk-27.2.md) + +On a Mac with XcodeGen, run the following from the repository root. Use an empty +capture directory for each Xcode version. Set `DEVELOPER_DIR` to select Xcode. + +```sh +cargo build --locked -p sweetpad-cli --bin sweetpad +python3 -B -I sweetpad-cli/fixtures/appintents/sdk_coverage.py +python3 -B -I sweetpad-cli/fixtures/appintents/regen.py --export-registration .build/intent-captures +``` + +Copy the capture directory to Linux, build the CLI with the same Cargo command, +and run the replay. CI transfers the synthetic compiler inputs and registrations +between its macOS and Linux jobs. + +```sh +python3 -B -I sweetpad-cli/fixtures/appintents/verify_registration.py .build/intent-captures +``` + +The replay compares every field in `extract.actionsdata` and `version.json` +for each supported probe. Generator identity and the order of resolver sets +and metadata pairs may differ. It also checks native controls and the named +diagnostics for unsupported declarations. The baseline and newer SDKs get an +additional comparison with the checked-in Xcode registrations. For a new SDK, +version the checklist and its signature snapshot, review changed overloads, add +probe evidence, then run `sdk_coverage.py --update-signatures` and regenerate +the affected fixtures. The workflow performs read-only checks on PRs and weekly. diff --git a/sweetpad-cli/fixtures/appintents/sdk-27.2-signatures.txt b/sweetpad-cli/fixtures/appintents/sdk-27.2-signatures.txt new file mode 100644 index 00000000..614d87b9 --- /dev/null +++ b/sweetpad-cli/fixtures/appintents/sdk-27.2-signatures.txt @@ -0,0 +1,195 @@ +AppIntent.Case 1 b4f76f250e2cf635f7cc +AppIntent.DefaultCase 1 1f6a1d01b9013c97bd20 +AppIntent.Summary 1 978ad4d68943ed67440a +AppIntent.Switch 1 6e1cf32d83d70cf34338 +AppIntent.When 1 9de98ab70f7e758526c6 +InputConnectionBehavior.connectToPreviousIntentResult 1 9d1218efe5d49b7f9764 +InputConnectionBehavior.default 1 179d9f495c48e4265c15 +InputConnectionBehavior.never 1 70c011f5073d927382f5 +IntentParameter.init(description:controlStyle:inclusiveRange:requestValueDialog:inputConnectionBehavior:optionsProvider:) 2 863851b712681629a852 +IntentParameter.init(description:controlStyle:inclusiveRange:requestValueDialog:inputConnectionBehavior:optionsProvider:resolvers:) 2 7d59e317f203e661c32f +IntentParameter.init(description:default:controlStyle:inclusiveRange:requestValueDialog:inputConnectionBehavior:) 2 68edafca1e433737fbd9 +IntentParameter.init(description:default:controlStyle:inclusiveRange:requestValueDialog:inputConnectionBehavior:resolvers:) 2 92e0641a3d4847c8db21 +IntentParameter.init(description:default:currencyCodes:inclusiveRange:requestValueDialog:inputConnectionBehavior:) 1 8f8f9de218a81b2aefab +IntentParameter.init(description:default:currencyCodes:inclusiveRange:requestValueDialog:inputConnectionBehavior:optionsProvider:) 1 8a90ed94794afbb2f55f +IntentParameter.init(description:default:currencyCodes:inclusiveRange:requestValueDialog:inputConnectionBehavior:optionsProvider:resolvers:) 1 f9a3a2b883005d657c7c +IntentParameter.init(description:default:currencyCodes:inclusiveRange:requestValueDialog:inputConnectionBehavior:resolvers:) 1 65cfa4a35c2c6a5839f9 +IntentParameter.init(description:default:defaultUnit:requestValueDialog:inputConnectionBehavior:) 1 2932919e48b8f033faa2 +IntentParameter.init(description:default:defaultUnit:requestValueDialog:inputConnectionBehavior:resolvers:) 1 398f59991951420a8425 +IntentParameter.init(description:default:displayName:requestValueDialog:inputConnectionBehavior:) 1 958575caa4f75ab18d82 +IntentParameter.init(description:default:displayName:requestValueDialog:inputConnectionBehavior:resolvers:) 1 bc473a6fb29294243c8e +IntentParameter.init(description:default:displayStyle:requestValueDialog:inputConnectionBehavior:) 1 5f0aecb4d70334d4a6e6 +IntentParameter.init(description:default:displayStyle:requestValueDialog:inputConnectionBehavior:optionsProvider:) 1 4ef8cf7a6c61d7f8513d +IntentParameter.init(description:default:displayStyle:requestValueDialog:inputConnectionBehavior:optionsProvider:resolvers:) 1 3ebab780e4e386012e3f +IntentParameter.init(description:default:displayStyle:requestValueDialog:inputConnectionBehavior:resolvers:) 1 6969e69eb93458f26792 +IntentParameter.init(description:default:inputOptions:requestValueDialog:inputConnectionBehavior:) 1 dd8a2ad83dc4d7239340 +IntentParameter.init(description:default:inputOptions:requestValueDialog:inputConnectionBehavior:resolvers:) 1 9b2139384fce55509ba3 +IntentParameter.init(description:default:kind:requestValueDialog:inputConnectionBehavior:) 2 cfee9b2d080069af01c9 +IntentParameter.init(description:default:kind:requestValueDialog:inputConnectionBehavior:optionsProvider:) 2 3a26fb994213d0bd875d +IntentParameter.init(description:default:kind:requestValueDialog:inputConnectionBehavior:optionsProvider:resolvers:) 2 1a030c1a40e9b26f5bef +IntentParameter.init(description:default:kind:requestValueDialog:inputConnectionBehavior:resolvers:) 2 fa8ccbbdea4a8604f596 +IntentParameter.init(description:default:mode:requestValueDialog:inputConnectionBehavior:) 1 ab4822c5f2b8686e523f +IntentParameter.init(description:default:mode:requestValueDialog:inputConnectionBehavior:optionsProvider:) 1 71f78d7759f227e42154 +IntentParameter.init(description:default:mode:requestValueDialog:inputConnectionBehavior:optionsProvider:resolvers:) 1 3a0d825388e3f18fb860 +IntentParameter.init(description:default:mode:requestValueDialog:inputConnectionBehavior:resolvers:) 1 c4d72dca4334b97b2c38 +IntentParameter.init(description:default:mode:size:inputConnectionBehavior:) 2 9606b760740212eb86b0 +IntentParameter.init(description:default:requestValueDialog:inputConnectionBehavior:) 7 8d601bd52db3a08ca000 +IntentParameter.init(description:default:requestValueDialog:inputConnectionBehavior:optionsProvider:) 4 e7f29d557bf852f28087 +IntentParameter.init(description:default:requestValueDialog:inputConnectionBehavior:optionsProvider:resolvers:) 4 90ccbe23da5200b33818 +IntentParameter.init(description:default:requestValueDialog:inputConnectionBehavior:resolvers:) 7 3d365e8771ab72290bff +IntentParameter.init(description:default:requestValueDialog:requestDisambiguationDialog:inputConnectionBehavior:) 1 193440b54c029cd65dc5 +IntentParameter.init(description:default:requestValueDialog:requestDisambiguationDialog:inputConnectionBehavior:optionsProvider:) 1 b727d73dfc6ee2250b3b +IntentParameter.init(description:default:requestValueDialog:requestDisambiguationDialog:inputConnectionBehavior:optionsProvider:resolvers:) 1 55a1383ec37b28ceebba +IntentParameter.init(description:default:requestValueDialog:requestDisambiguationDialog:inputConnectionBehavior:query:) 1 a7536eb7796c666c2b2e +IntentParameter.init(description:default:requestValueDialog:requestDisambiguationDialog:inputConnectionBehavior:resolvers:) 1 f37b392070c8e8d88df9 +IntentParameter.init(description:default:requestValueDialog:requestDisambiguationDialog:inputConnectionBehavior:supportedValues:) 2 533512ef3a382606a79a +IntentParameter.init(description:default:requestValueDialog:requestDisambiguationDialog:inputConnectionBehavior:supportedValues:optionsProvider:) 2 d3d84e36e23bde919460 +IntentParameter.init(description:default:requestValueDialog:requestDisambiguationDialog:inputConnectionBehavior:supportedValues:resolvers:) 2 d0699cea7da42846a618 +IntentParameter.init(description:default:size:inputConnectionBehavior:) 6 7291d4e296942acea2f7 +IntentParameter.init(description:default:size:inputConnectionBehavior:query:) 2 0f3ffad24d377e82cd69 +IntentParameter.init(description:default:size:inputConnectionBehavior:resolvers:) 2 3949e343c4aa9dda5e70 +IntentParameter.init(description:default:supportedContentTypes:requestValueDialog:inputConnectionBehavior:) 1 f6ea450a656a7e97975b +IntentParameter.init(description:default:supportedContentTypes:requestValueDialog:inputConnectionBehavior:optionsProvider:) 1 22b8b2a91ce674df157d +IntentParameter.init(description:default:supportedContentTypes:requestValueDialog:inputConnectionBehavior:optionsProvider:resolvers:) 1 fcc9a0949faceaf4938c +IntentParameter.init(description:default:supportedContentTypes:requestValueDialog:inputConnectionBehavior:resolvers:) 1 dc1ab8943d2b7c1fd455 +IntentParameter.init(description:default:supportedContentTypes:requestValueDialog:requestDisambiguationDialog:inputConnectionBehavior:) 1 9a0b9643cefea2ad6e18 +IntentParameter.init(description:default:supportedContentTypes:requestValueDialog:requestDisambiguationDialog:inputConnectionBehavior:optionsProvider:) 1 601bc168a4cf05e7253c +IntentParameter.init(description:default:supportedContentTypes:requestValueDialog:requestDisambiguationDialog:inputConnectionBehavior:optionsProvider:resolvers:) 1 4953237ea74825ebf1cc +IntentParameter.init(description:default:supportedContentTypes:requestValueDialog:requestDisambiguationDialog:inputConnectionBehavior:query:) 1 8ae52faf70bc36b474b5 +IntentParameter.init(description:default:supportedContentTypes:requestValueDialog:requestDisambiguationDialog:inputConnectionBehavior:resolvers:) 1 bf994177358945c46a19 +IntentParameter.init(description:default:supportedContentTypes:size:inputConnectionBehavior:) 2 42a8fc0b8bbaa7ee5b30 +IntentParameter.init(description:default:supportedContentTypes:size:inputConnectionBehavior:query:) 2 4d2e0296a65b9c8581dd +IntentParameter.init(description:default:supportedContentTypes:size:inputConnectionBehavior:resolvers:) 2 647218823826d541caa7 +IntentParameter.init(description:defaultUnit:requestValueDialog:inputConnectionBehavior:optionsProvider:) 1 9166cad4226a1e8a71de +IntentParameter.init(description:defaultUnit:requestValueDialog:inputConnectionBehavior:optionsProvider:resolvers:) 1 810022846394fef49f46 +IntentParameter.init(description:defaultValue:defaultUnit:defaultUnitAdjustForLocale:supportsNegativeNumbers:requestValueDialog:inputConnectionBehavior:) 22 2603f3a5f06203ef82c1 +IntentParameter.init(description:defaultValue:defaultUnit:defaultUnitAdjustForLocale:supportsNegativeNumbers:requestValueDialog:inputConnectionBehavior:resolvers:) 22 4c5d935a6e3321bf7118 +IntentParameter.init(description:defaultValue:unit:unitAdjustForLocale:supportsNegativeNumbers:requestValueDialog:inputConnectionBehavior:) 22 f2e3dba87621847efac5 +IntentParameter.init(description:defaultValue:unit:unitAdjustForLocale:supportsNegativeNumbers:requestValueDialog:inputConnectionBehavior:resolvers:) 22 b5cf573e29e0c3c70b84 +IntentParameter.init(description:inputOptions:requestValueDialog:inputConnectionBehavior:optionsProvider:) 1 669834084d7469ea096c +IntentParameter.init(description:inputOptions:requestValueDialog:inputConnectionBehavior:optionsProvider:resolvers:) 1 3cc25c8337acd0930219 +IntentParameter.init(description:requestValueDialog:inputConnectionBehavior:) 3 30d3df19bf3458548602 +IntentParameter.init(description:requestValueDialog:inputConnectionBehavior:optionsProvider:) 26 e4463b44e69680e93b3d +IntentParameter.init(description:requestValueDialog:inputConnectionBehavior:optionsProvider:resolvers:) 4 d94f12ce4a651a282c4b +IntentParameter.init(description:requestValueDialog:inputConnectionBehavior:resolvers:) 2 704b4c6198318323e797 +IntentParameter.init(description:requestValueDialog:inputConnectionBehavior:resolvers:optionsProvider:) 22 3f1538d8c7fca41392c0 +IntentParameter.init(title:description:controlStyle:inclusiveRange:requestValueDialog:inputConnectionBehavior:optionsProvider:) 2 3cb1617dac91badf5b3d +IntentParameter.init(title:description:controlStyle:inclusiveRange:requestValueDialog:inputConnectionBehavior:optionsProvider:resolvers:) 2 ac1830dfa2cf700ff97f +IntentParameter.init(title:description:currencyCodes:inclusiveRange:requestValueDialog:inputConnectionBehavior:) 1 03c92b82d219f3c225c3 +IntentParameter.init(title:description:currencyCodes:inclusiveRange:requestValueDialog:inputConnectionBehavior:optionsProvider:) 1 53b7a2ed6833003fd1be +IntentParameter.init(title:description:currencyCodes:inclusiveRange:requestValueDialog:inputConnectionBehavior:optionsProvider:resolvers:) 1 83491c58b6112f63ac87 +IntentParameter.init(title:description:currencyCodes:inclusiveRange:requestValueDialog:inputConnectionBehavior:resolvers:) 1 ed70891fb846d63081b0 +IntentParameter.init(title:description:default:controlStyle:inclusiveRange:requestValueDialog:inputConnectionBehavior:) 2 ab2ae59bc60b7fcc884d +IntentParameter.init(title:description:default:controlStyle:inclusiveRange:requestValueDialog:inputConnectionBehavior:resolvers:) 2 47e525d473b3698179df +IntentParameter.init(title:description:default:currencyCodes:inclusiveRange:requestValueDialog:inputConnectionBehavior:) 1 5c76e176db59a75d1a69 +IntentParameter.init(title:description:default:currencyCodes:inclusiveRange:requestValueDialog:inputConnectionBehavior:optionsProvider:) 1 935be12126d17c3a8a1b +IntentParameter.init(title:description:default:currencyCodes:inclusiveRange:requestValueDialog:inputConnectionBehavior:optionsProvider:resolvers:) 1 17a752f903c602e80535 +IntentParameter.init(title:description:default:currencyCodes:inclusiveRange:requestValueDialog:inputConnectionBehavior:resolvers:) 1 cc327ef1686bbecc7660 +IntentParameter.init(title:description:default:defaultUnit:requestValueDialog:inputConnectionBehavior:) 1 14354b526fc265c26d65 +IntentParameter.init(title:description:default:defaultUnit:requestValueDialog:inputConnectionBehavior:resolvers:) 1 1090dd7691942b48ea96 +IntentParameter.init(title:description:default:displayName:requestValueDialog:inputConnectionBehavior:) 1 dd5325f281e5a9603095 +IntentParameter.init(title:description:default:displayName:requestValueDialog:inputConnectionBehavior:resolvers:) 1 18a3e2dc58ef74ba321c +IntentParameter.init(title:description:default:displayStyle:requestValueDialog:inputConnectionBehavior:) 1 af528ab32bcd109814ec +IntentParameter.init(title:description:default:displayStyle:requestValueDialog:inputConnectionBehavior:optionsProvider:) 1 0b68381b49390e50f547 +IntentParameter.init(title:description:default:displayStyle:requestValueDialog:inputConnectionBehavior:optionsProvider:resolvers:) 1 2b9ef5d5a1913214dea4 +IntentParameter.init(title:description:default:displayStyle:requestValueDialog:inputConnectionBehavior:resolvers:) 1 692a18d7f99d830550db +IntentParameter.init(title:description:default:inputOptions:requestValueDialog:inputConnectionBehavior:) 1 f9f8502e012efc129e1d +IntentParameter.init(title:description:default:inputOptions:requestValueDialog:inputConnectionBehavior:resolvers:) 1 f00c19aad8e5f8241761 +IntentParameter.init(title:description:default:kind:requestValueDialog:inputConnectionBehavior:) 2 82a58905986c143893d3 +IntentParameter.init(title:description:default:kind:requestValueDialog:inputConnectionBehavior:optionsProvider:) 2 249b37dab6ca997d63a7 +IntentParameter.init(title:description:default:kind:requestValueDialog:inputConnectionBehavior:optionsProvider:resolvers:) 2 326092382f2132837f44 +IntentParameter.init(title:description:default:kind:requestValueDialog:inputConnectionBehavior:resolvers:) 2 6856d19340cbf67968c9 +IntentParameter.init(title:description:default:mode:requestValueDialog:inputConnectionBehavior:) 1 729021a8dc09d8531dba +IntentParameter.init(title:description:default:mode:requestValueDialog:inputConnectionBehavior:optionsProvider:) 1 0118baaa9f54a28fa0ab +IntentParameter.init(title:description:default:mode:requestValueDialog:inputConnectionBehavior:optionsProvider:resolvers:) 1 1c058917389a77628d4e +IntentParameter.init(title:description:default:mode:requestValueDialog:inputConnectionBehavior:resolvers:) 1 36e35de99c438160176c +IntentParameter.init(title:description:default:mode:size:inputConnectionBehavior:) 2 80c51af4fc5c996c77ba +IntentParameter.init(title:description:default:requestValueDialog:inputConnectionBehavior:) 7 e737e0554889244d6c4d +IntentParameter.init(title:description:default:requestValueDialog:inputConnectionBehavior:optionsProvider:) 4 165b1644f1b2a4ab9329 +IntentParameter.init(title:description:default:requestValueDialog:inputConnectionBehavior:optionsProvider:resolvers:) 4 cbfa4be0c36870cd0a38 +IntentParameter.init(title:description:default:requestValueDialog:inputConnectionBehavior:resolvers:) 7 7d79ef9f4f617f942d70 +IntentParameter.init(title:description:default:requestValueDialog:requestDisambiguationDialog:inputConnectionBehavior:) 3 da25a664c1fd81901fed +IntentParameter.init(title:description:default:requestValueDialog:requestDisambiguationDialog:inputConnectionBehavior:optionsProvider:) 1 a3711784c55be30a000e +IntentParameter.init(title:description:default:requestValueDialog:requestDisambiguationDialog:inputConnectionBehavior:optionsProvider:resolvers:) 1 054130980f1ad9c4395a +IntentParameter.init(title:description:default:requestValueDialog:requestDisambiguationDialog:inputConnectionBehavior:query:) 2 100fcbeb55e8cf0a5d4d +IntentParameter.init(title:description:default:requestValueDialog:requestDisambiguationDialog:inputConnectionBehavior:resolvers:) 2 bc1f037a2a0bc9d93c42 +IntentParameter.init(title:description:default:requestValueDialog:requestDisambiguationDialog:inputConnectionBehavior:supportedValues:) 3 b1d07d2300174667d28e +IntentParameter.init(title:description:default:requestValueDialog:requestDisambiguationDialog:inputConnectionBehavior:supportedValues:optionsProvider:) 3 43313df38df08b9bffda +IntentParameter.init(title:description:default:requestValueDialog:requestDisambiguationDialog:inputConnectionBehavior:supportedValues:resolvers:) 3 665a9fd92238e4d9646a +IntentParameter.init(title:description:default:size:inputConnectionBehavior:) 8 705c748cce61f2fe972d +IntentParameter.init(title:description:default:size:inputConnectionBehavior:query:) 4 6977ed8bbf53e7771917 +IntentParameter.init(title:description:default:size:inputConnectionBehavior:resolvers:) 4 480d85e66d8e8d2d2d1e +IntentParameter.init(title:description:default:supportedContentTypes:requestValueDialog:inputConnectionBehavior:) 1 ef51d0d1669802be8fd3 +IntentParameter.init(title:description:default:supportedContentTypes:requestValueDialog:inputConnectionBehavior:optionsProvider:) 1 18374a13db7551929bcd +IntentParameter.init(title:description:default:supportedContentTypes:requestValueDialog:inputConnectionBehavior:optionsProvider:resolvers:) 1 93a84e673ef4160c85a6 +IntentParameter.init(title:description:default:supportedContentTypes:requestValueDialog:inputConnectionBehavior:resolvers:) 1 ca96eea7fae5d9822df7 +IntentParameter.init(title:description:default:supportedContentTypes:requestValueDialog:requestDisambiguationDialog:inputConnectionBehavior:) 1 22a01dc3fea82832d149 +IntentParameter.init(title:description:default:supportedContentTypes:requestValueDialog:requestDisambiguationDialog:inputConnectionBehavior:optionsProvider:) 1 3ab2dd6d21539e692a82 +IntentParameter.init(title:description:default:supportedContentTypes:requestValueDialog:requestDisambiguationDialog:inputConnectionBehavior:optionsProvider:resolvers:) 1 be0d6708da29cc4fb217 +IntentParameter.init(title:description:default:supportedContentTypes:requestValueDialog:requestDisambiguationDialog:inputConnectionBehavior:query:) 1 9380661696ef10c10ce9 +IntentParameter.init(title:description:default:supportedContentTypes:requestValueDialog:requestDisambiguationDialog:inputConnectionBehavior:resolvers:) 1 df9a59c25cbd87cd72aa +IntentParameter.init(title:description:default:supportedContentTypes:size:inputConnectionBehavior:) 2 bc401bf1baacb10f3486 +IntentParameter.init(title:description:default:supportedContentTypes:size:inputConnectionBehavior:query:) 2 38192772987e1504b632 +IntentParameter.init(title:description:default:supportedContentTypes:size:inputConnectionBehavior:resolvers:) 2 e00340741f68d7280a9d +IntentParameter.init(title:description:default:supportedTypeIdentifiers:requestValueDialog:inputConnectionBehavior:) 1 65bd863cf25e1224c2d0 +IntentParameter.init(title:description:default:supportedTypeIdentifiers:requestValueDialog:inputConnectionBehavior:resolvers:) 1 74ebee58ad7aed762aa9 +IntentParameter.init(title:description:defaultUnit:requestValueDialog:inputConnectionBehavior:optionsProvider:) 1 176e35aaed4447597dbf +IntentParameter.init(title:description:defaultUnit:requestValueDialog:inputConnectionBehavior:optionsProvider:resolvers:) 1 15ded0a64e50e9501bd5 +IntentParameter.init(title:description:defaultValue:defaultUnit:defaultUnitAdjustForLocale:supportsNegativeNumbers:requestValueDialog:inputConnectionBehavior:) 22 47f2e8958734dc98277c +IntentParameter.init(title:description:defaultValue:defaultUnit:defaultUnitAdjustForLocale:supportsNegativeNumbers:requestValueDialog:inputConnectionBehavior:resolvers:) 22 eb40f170ac838f0f957f +IntentParameter.init(title:description:defaultValue:unit:unitAdjustForLocale:supportsNegativeNumbers:requestValueDialog:inputConnectionBehavior:) 22 135990affce753cd6d03 +IntentParameter.init(title:description:defaultValue:unit:unitAdjustForLocale:supportsNegativeNumbers:requestValueDialog:inputConnectionBehavior:resolvers:) 22 27097da7194aec17a3a4 +IntentParameter.init(title:description:displayStyle:requestValueDialog:inputConnectionBehavior:) 1 fe8c5e73d0422708b020 +IntentParameter.init(title:description:displayStyle:requestValueDialog:inputConnectionBehavior:optionsProvider:) 1 cea410c500ef446e830c +IntentParameter.init(title:description:displayStyle:requestValueDialog:inputConnectionBehavior:optionsProvider:resolvers:) 1 120742739551cdb6e080 +IntentParameter.init(title:description:displayStyle:requestValueDialog:inputConnectionBehavior:resolvers:) 1 c974c6b79238373cd2c5 +IntentParameter.init(title:description:inputOptions:requestValueDialog:inputConnectionBehavior:optionsProvider:) 1 0e3e394aac8944aea562 +IntentParameter.init(title:description:inputOptions:requestValueDialog:inputConnectionBehavior:optionsProvider:resolvers:) 1 2f0df3650641a22403b1 +IntentParameter.init(title:description:kind:requestValueDialog:inputConnectionBehavior:) 2 fd4b38381cf91776743d +IntentParameter.init(title:description:kind:requestValueDialog:inputConnectionBehavior:optionsProvider:) 2 4342e800f00bd25e6469 +IntentParameter.init(title:description:kind:requestValueDialog:inputConnectionBehavior:optionsProvider:resolvers:) 2 34a886e703faa36adb7c +IntentParameter.init(title:description:kind:requestValueDialog:inputConnectionBehavior:resolvers:) 2 1db3b441cb09c09d272b +IntentParameter.init(title:description:mode:requestValueDialog:inputConnectionBehavior:) 1 3e4b5c86d9d39b20338d +IntentParameter.init(title:description:mode:requestValueDialog:inputConnectionBehavior:optionsProvider:) 1 5a558347af09669790c7 +IntentParameter.init(title:description:mode:requestValueDialog:inputConnectionBehavior:optionsProvider:resolvers:) 1 f5221e98dc79673261e6 +IntentParameter.init(title:description:mode:requestValueDialog:inputConnectionBehavior:resolvers:) 1 a2b8763e25d51d54c1d6 +IntentParameter.init(title:description:mode:size:inputConnectionBehavior:) 2 0e0f67f6b8290c016775 +IntentParameter.init(title:description:requestValueDialog:inputConnectionBehavior:) 4 92d31e8113a91cdc4471 +IntentParameter.init(title:description:requestValueDialog:inputConnectionBehavior:optionsProvider:) 27 b4798bab17ae98c0009f +IntentParameter.init(title:description:requestValueDialog:inputConnectionBehavior:optionsProvider:resolvers:) 5 88d0fe8af291976ee0a7 +IntentParameter.init(title:description:requestValueDialog:inputConnectionBehavior:resolvers:) 3 4da66c7dc80cc4afb294 +IntentParameter.init(title:description:requestValueDialog:inputConnectionBehavior:resolvers:optionsProvider:) 22 0a0f702892dc7c8e6998 +IntentParameter.init(title:description:requestValueDialog:requestDisambiguationDialog:inputConnectionBehavior:optionsProvider:) 1 25b8c975bb771df6ce32 +IntentParameter.init(title:description:requestValueDialog:requestDisambiguationDialog:inputConnectionBehavior:optionsProvider:resolvers:) 1 b7f931407e83d4ffe14d +IntentParameter.init(title:description:supportedTypeIdentifiers:requestValueDialog:inputConnectionBehavior:optionsProvider:) 1 1aea5d96871ec344615e +IntentParameter.init(title:description:supportedTypeIdentifiers:requestValueDialog:inputConnectionBehavior:optionsProvider:resolvers:) 1 79c2d958ad9748789aad +IntentParameterSummary 1 26611ee68ce4807dee2f +IntentParameterSummary.init() 1 52fcc33203b1ec4b8a93 +IntentParameterSummary.init(_:) 1 0e52ee76abad3bf62b2e +IntentParameterSummary.init(_:table:) 1 6c0952b2d1fb7adb5d4f +IntentParameterSummary.init(_:table:_:) 1 dfafc501e85e71946d86 +IntentResult 1 754b16b376d46158316a +OpensIntent 1 21a18e81872dfc09f689 +ParameterSummaryCaseCondition.init(_:_:) 2 cc65af4ff5789da5f1bb +ParameterSummaryDefaultCaseCondition.init(_:) 1 f8948d6ce1d4a0a31669 +ParameterSummarySwitchCondition 1 e13a88633b86888a73ee +ParameterSummarySwitchCondition.init(_:_:) 3 91f211c6b0b010d27d8b +ParameterSummaryWhenCondition 1 7e8997af13835538cb75 +ParameterSummaryWhenCondition.init(_:_:_:_:otherwise:) 8 7a9168c8fd296a907932 +ParameterSummaryWhenCondition.init(_:_:_:otherwise:) 1 cbfcc38db173f95a4a68 +ParameterSummaryWhenCondition.init(_:identifier:_:_:otherwise:) 8 36e6bc0f4864d65976fc +ParameterSummaryWhenCondition.init(widgetFamily:_:_:otherwise:) 2 5d2fc6d2f31f9a9799af +ProvidesDialog 1 c112caab121e9982aff1 +ReturnsValue 1 fb33a467bf848b431710 +ShowsSnippetIntent 1 68d5cab1f7e455e98191 +ShowsSnippetView 1 e0fd292e808556b64592 +String.IntentInputOptions.CapitalizationType.allCharacters 1 29c73a46d23e4ce7c29b +String.IntentInputOptions.CapitalizationType.none 1 d0bea49bcc70c9f1e1fa +String.IntentInputOptions.CapitalizationType.sentences 1 f037770ae521084e2f44 +String.IntentInputOptions.CapitalizationType.words 1 727de8915b1625117eb4 +String.IntentInputOptions.KeyboardType.URL 1 664a8a3929ab7199cb5d +String.IntentInputOptions.KeyboardType.asciiCapable 1 f7e03210e48fc45c4066 +String.IntentInputOptions.KeyboardType.default 1 3cc116426e36998403cc +String.IntentInputOptions.KeyboardType.numberPad 1 bce8aceec1a52035f92a +String.IntentInputOptions.KeyboardType.numbersAndPunctuation 1 37b54f17cf0f684e220d +String.IntentInputOptions.init(keyboardType:capitalizationType:multiline:autocorrect:smartQuotes:smartDashes:) 1 78f049d3621739c3c532 diff --git a/sweetpad-cli/fixtures/appintents/sdk-27.2.md b/sweetpad-cli/fixtures/appintents/sdk-27.2.md new file mode 100644 index 00000000..ab8163c5 --- /dev/null +++ b/sweetpad-cli/fixtures/appintents/sdk-27.2.md @@ -0,0 +1,97 @@ +# iOS App Intents SDK coverage + +Captured with Xcode 27.2 (27B52) and the arm64 iOS 27.2 SDK. The inventory covers public `IntentParameter` initializer labels across value types, string input settings and connection cases, protocols refining `IntentResult`, and the App Intent summary builders. Each match applies to the Swift types and constant expressions in the linked probe. + +The signature snapshot tracks overloads that reuse the same labels. The SDK check compares the public symbol graph, including overlays. On older SDKs it checks the available surface. On the baseline and newer SDKs it also checks additions, removals and changes to overloads. [Signature snapshot](sdk-27.2-signatures.txt) · [SDK check](sdk_coverage.py) + +## Parameter initializer options + +| Declaration | Classification | Evidence | +| --- | --- | --- | +| `parameter.controlStyle` | Diagnostic | [per-option extractor diagnostic](verify_registration.py#L97) | +| `parameter.currencyCodes` | Diagnostic | [per-option extractor diagnostic](verify_registration.py#L97) | +| `parameter.default` | Match | [TypesIntent](Types.swift#L25) · [Types.actionsdata](Types.actionsdata) | +| `parameter.defaultUnit` | Diagnostic | [per-option extractor diagnostic](verify_registration.py#L97) | +| `parameter.defaultUnitAdjustForLocale` | Diagnostic | [per-option extractor diagnostic](verify_registration.py#L97) | +| `parameter.defaultValue` | Diagnostic | [per-option extractor diagnostic](verify_registration.py#L97) | +| `parameter.description` | Match | [FileInputIntent](Files.swift#L5) · [Files.actionsdata](Files.actionsdata) | +| `parameter.displayName` | Diagnostic | [per-option extractor diagnostic](verify_registration.py#L97) | +| `parameter.displayStyle` | Diagnostic | [per-option extractor diagnostic](verify_registration.py#L97) | +| `parameter.inclusiveRange` | Diagnostic | [per-option extractor diagnostic](verify_registration.py#L97) · [RangeProbe](Unsupported.swift#L30) | +| `parameter.inputConnectionBehavior` | Match | [ConnectionProbe](ResultProtocols.swift#L69) · [Xcode registration](ResultProtocols.actionsdata#L164) | +| `parameter.inputOptions` | Match | [allOff](InputOptionsProbe.swift#L9) · [Xcode parameter](InputOptionsProbe.actions.json#L29) | +| `parameter.kind` | Diagnostic | [per-option extractor diagnostic](verify_registration.py#L97) | +| `parameter.mode` | Diagnostic | [per-option extractor diagnostic](verify_registration.py#L97) | +| `parameter.optionsProvider` | Diagnostic | [per-option extractor diagnostic](verify_registration.py#L97) · [OptionsProviderProbe](Unsupported.swift#L40) | +| `parameter.query` | Diagnostic | [per-option extractor diagnostic](verify_registration.py#L97) | +| `parameter.requestDisambiguationDialog` | Diagnostic | [per-option extractor diagnostic](verify_registration.py#L97) | +| `parameter.requestValueDialog` | No effect | [PromptProbe](ResultProtocols.swift#L10) · [Xcode registration](ResultProtocols.actionsdata#L550) · [native control comparison](verify_registration.py#L60) | +| `parameter.resolvers` | Diagnostic | [per-option extractor diagnostic](verify_registration.py#L97) | +| `parameter.size` | Diagnostic | [per-option extractor diagnostic](verify_registration.py#L97) | +| `parameter.supportedContentTypes` | Match | [FileInputIntent](Files.swift#L5) · [Files.actionsdata](Files.actionsdata) | +| `parameter.supportedTypeIdentifiers` | Diagnostic | [per-option extractor diagnostic](verify_registration.py#L97) | +| `parameter.supportedValues` | Diagnostic | [per-option extractor diagnostic](verify_registration.py#L97) | +| `parameter.supportsNegativeNumbers` | Diagnostic | [per-option extractor diagnostic](verify_registration.py#L97) | +| `parameter.title` | Match | [TypesIntent](Types.swift#L25) · [Types.actionsdata](Types.actionsdata) | +| `parameter.unit` | Diagnostic | [per-option extractor diagnostic](verify_registration.py#L97) | +| `parameter.unitAdjustForLocale` | Diagnostic | [per-option extractor diagnostic](verify_registration.py#L97) | + +## Connection behavior + +| Declaration | Classification | Evidence | +| --- | --- | --- | +| `connection.connectToPreviousIntentResult` | Match | [ConnectionProbe](ResultProtocols.swift#L69) · [Xcode registration](ResultProtocols.actionsdata#L164) | +| `connection.default` | Match | [ConnectionProbe](ResultProtocols.swift#L69) · [Xcode registration](ResultProtocols.actionsdata#L164) | +| `connection.never` | Match | [ConnectionProbe](ResultProtocols.swift#L69) · [Xcode registration](ResultProtocols.actionsdata#L164) | + +## String input options + +| Declaration | Classification | Evidence | +| --- | --- | --- | +| `inputOptions.CapitalizationType.allCharacters` | Match | [allOn](InputOptionsProbe.swift#L11) · [Xcode parameter](InputOptionsProbe.actions.json#L125) | +| `inputOptions.CapitalizationType.none` | Match | [allOff](InputOptionsProbe.swift#L9) · [Xcode parameter](InputOptionsProbe.actions.json#L29) | +| `inputOptions.CapitalizationType.sentences` | Match | [url](InputOptionsProbe.swift#L17) · [Xcode parameter](InputOptionsProbe.actions.json#L352) | +| `inputOptions.CapitalizationType.words` | Match | [punct](InputOptionsProbe.swift#L15) · [Xcode parameter](InputOptionsProbe.actions.json#L280) | +| `inputOptions.KeyboardType.URL` | Match | [url](InputOptionsProbe.swift#L17) · [Xcode parameter](InputOptionsProbe.actions.json#L352) | +| `inputOptions.KeyboardType.asciiCapable` | Match | [allOn](InputOptionsProbe.swift#L11) · [Xcode parameter](InputOptionsProbe.actions.json#L125) | +| `inputOptions.KeyboardType.default` | Match | [allOff](InputOptionsProbe.swift#L9) · [Xcode parameter](InputOptionsProbe.actions.json#L29) | +| `inputOptions.KeyboardType.numberPad` | Match | [numberPad](InputOptionsProbe.swift#L19) · [Xcode parameter](InputOptionsProbe.actions.json#L424) | +| `inputOptions.KeyboardType.numbersAndPunctuation` | Match | [punct](InputOptionsProbe.swift#L15) · [Xcode parameter](InputOptionsProbe.actions.json#L280) | +| `inputOptions.autocorrect` | Match | [autocorrect](InputOptionsProbe.swift#L25) · [Xcode parameter](InputOptionsProbe.actions.json#L622) | +| `inputOptions.capitalizationType` | Match | [allOn](InputOptionsProbe.swift#L11) · [Xcode parameter](InputOptionsProbe.actions.json#L125) | +| `inputOptions.keyboardType` | Match | [allOff](InputOptionsProbe.swift#L9) · [Xcode parameter](InputOptionsProbe.actions.json#L29) | +| `inputOptions.multiline` | Match | [allOn](InputOptionsProbe.swift#L11) · [Xcode parameter](InputOptionsProbe.actions.json#L125) | +| `inputOptions.smartDashes` | Match | [dashes](InputOptionsProbe.swift#L23) · [Xcode parameter](InputOptionsProbe.actions.json#L556) | +| `inputOptions.smartQuotes` | Match | [quotes](InputOptionsProbe.swift#L21) · [Xcode parameter](InputOptionsProbe.actions.json#L490) | + +## Result protocols and compositions + +| Declaration | Classification | Evidence | +| --- | --- | --- | +| `result.IntentResult` | Match | [ConfirmProbe](ResultProtocols.swift#L4) · [Xcode registration](ResultProtocols.actionsdata#L3) | +| `result.OpensIntent` | Match | [OpensProbeIntent](OutputProbe.swift#L22) · [Xcode action](OutputProbe.actions.json#L182) | +| `result.OpensIntent+ProvidesDialog` | Match | [OpensWithDialogProbe](ResultProtocols.swift#L62) · [Xcode registration](ResultProtocols.actionsdata#L476) | +| `result.OpensIntent+ShowsSnippetView` | Match | [OpensWithViewProbe](ResultProtocols.swift#L54) · [Xcode registration](ResultProtocols.actionsdata#L513) | +| `result.ProvidesDialog` | Match | [DialogOnlyProbeIntent](OutputProbe.swift#L5) · [Xcode action](OutputProbe.actions.json#L46) | +| `result.ReturnsValue` | Match | [Greet](DataApp.swift#L3) · [extract.actionsdata](extract.actionsdata) | +| `result.ShowsSnippetIntent` | Match | [InteractiveResultProbe](ResultProtocols.swift#L47) · [Xcode registration](ResultProtocols.actionsdata#L436) · [ConfirmationSnippet](ResultProtocols.swift#L18) | +| `result.ShowsSnippetView` | Match | [SnippetOnlyProbeIntent](OutputProbe.swift#L10) · [Xcode action](OutputProbe.actions.json#L219) | + +## Parameter summaries + +| Declaration | Classification | Evidence | +| --- | --- | --- | +| `summary.Case` | Diagnostic | [SwitchProbe](Unsupported.swift#L12) · [extractor diagnostic](verify_registration.py#L69) | +| `summary.DefaultCase` | Diagnostic | [SwitchProbe](Unsupported.swift#L12) · [extractor diagnostic](verify_registration.py#L69) | +| `summary.Summary` | Match | [SummaryTwoProbeIntent](OutputProbe.swift#L35) · [Xcode action](OutputProbe.actions.json#L617) | +| `summary.Summary()` | Match | [NoSummaryTextProbeIntent](OutputProbe.swift#L60) · [Xcode action](OutputProbe.actions.json#L131) | +| `summary.Summary(_:)` | Match | [SummaryParametersOnlyProbeIntent](OutputProbe.swift#L74) · [Xcode action](OutputProbe.actions.json#L458) | +| `summary.Summary(_:table:)` | Match | [EmptySummaryTextProbeIntent](OutputProbe.swift#L68) · [Xcode action](OutputProbe.actions.json#L83) | +| `summary.Summary(_:table:_:)` | Match | [SummaryTwoProbeIntent](OutputProbe.swift#L35) · [Xcode action](OutputProbe.actions.json#L617) | +| `summary.Switch` | Diagnostic | [SwitchProbe](Unsupported.swift#L12) · [extractor diagnostic](verify_registration.py#L69) | +| `summary.When` | Diagnostic | [WhenProbe](Unsupported.swift#L3) · [extractor diagnostic](verify_registration.py#L69) | +| `summary.table` | Diagnostic | [TableProbe](Unsupported.swift#L24) · [extractor diagnostic](verify_registration.py#L69) | + +An explicit non-nil localization table is covered by `summary.table`. The two plain summary initializers accepting a table match with its default nil value. The conditional probe exercises both branches of `When` and includes `Case` and `DefaultCase` in a single `Switch`; the extractor rejects the enclosing condition. + +For the 20 unsupported parameter labels, the test adds each label to a valid compiler capture and requires a named error at the public extractor entry point. Range and dynamic options also have native Swift probes. Supported type identifiers for file contents and the constant input options are limited to the values in their probes. Siri presentation, runtime prompts and interaction with a rendered snippet are outside this registration comparison. diff --git a/sweetpad-cli/fixtures/appintents/sdk_coverage.py b/sweetpad-cli/fixtures/appintents/sdk_coverage.py new file mode 100644 index 00000000..d2fcbf2c --- /dev/null +++ b/sweetpad-cli/fixtures/appintents/sdk_coverage.py @@ -0,0 +1,140 @@ +#!/usr/bin/env python3 +"""Check the selected iOS SDK against the versioned registration checklist.""" + +import argparse +from collections import defaultdict +import difflib +import hashlib +import json +from pathlib import Path +import re +import subprocess +import tempfile + +HERE = Path(__file__).resolve().parent +BASELINE = "27.2" +CHECKLIST = HERE / f"sdk-{BASELINE}.md" +SIGNATURES = HERE / f"sdk-{BASELINE}-signatures.txt" +EXAMPLES = {"result.OpensIntent+ProvidesDialog", "result.OpensIntent+ShowsSnippetView", "summary.table"} + + +def checklist(): + rows = {} + for line in CHECKLIST.read_text().splitlines(): + if not line.startswith("| `"): + continue + name, status, evidence = [c.strip() for c in line.strip("|").split("|")] + name = name.strip("`") + links = re.findall(r"\[[^\]]+\]\(([^)]+)\)", evidence) + if (name in rows or status not in {"Match", "Diagnostic", "No effect"} or not links + or not all((HERE / link.split("#")[0]).is_file() for link in links)): + raise ValueError(f"Invalid or duplicate checklist entry: {line}") + rows[name] = status + return rows + + +def inventory(graphs): + symbols = {} + edges = [] + for graph in graphs: + for symbol in graph["symbols"]: + symbols[symbol["identifier"]["precise"]] = symbol + edges.extend((r["source"], r["target"]) for r in graph["relationships"] + if r["kind"] in {"conformsTo", "inheritsFrom"}) + roots = {s["pathComponents"][0]: uid for uid, s in symbols.items() + if len(s["pathComponents"]) == 1 and s["kind"]["identifier"] == "swift.protocol"} + + def descendants(name): + found = {roots[name]} + while True: + more = {src for src, dst in edges if dst in found} - found + if not more: + return found + found.update(more) + + result_types = descendants("IntentResult") + summaries = descendants("ParameterSummary") - {roots["ParameterSummary"]} + aliases = {} + keys = set(EXAMPLES) + declarations = defaultdict(set) + + def record(s): + path = ".".join(s["pathComponents"]) + signature = "".join(f["spelling"] for f in s["declarationFragments"]) + declarations[path].add(s["identifier"]["precise"] + " " + signature) + + for s in symbols.values(): + p = s["pathComponents"] + if p[:-1] != ["AppIntent"] or s["kind"]["identifier"] != "swift.typealias": + continue + # The first type after '=' is the alias target, before generic constraints. + target = next((f for f in s["declarationFragments"] if f["kind"] == "typeIdentifier"), None) + if target and (target.get("preciseIdentifier") in summaries or "ParameterSummary" in target["spelling"]): + aliases[target["spelling"]] = p[-1] + keys.add("summary." + p[-1]) + record(s) + + for uid, s in symbols.items(): + kind, p = s["kind"]["identifier"], s["pathComponents"] + owner, name = p[:-1], p[-1] + if kind == "swift.protocol" and uid in result_types: + keys.add("result." + name) + elif kind == "swift.init" and owner in (["IntentParameter"], ["String", "IntentInputOptions"]): + family = "parameter" if owner == ["IntentParameter"] else "inputOptions" + keys.update(f"{family}.{label}" for label in re.findall(r"(\w+):", name)) + elif kind == "swift.enum.case" and owner == ["InputConnectionBehavior"]: + keys.add("connection." + name) + elif kind == "swift.enum.case" and owner[:2] == ["String", "IntentInputOptions"]: + keys.add(".".join(["inputOptions", *p[2:]])) + elif len(owner) == 1 and owner[0] in aliases and kind == "swift.init": + if aliases[owner[0]] == "Summary": + keys.add("summary.Summary" + name.removeprefix("init")) + elif uid in summaries and kind in {"swift.struct", "swift.enum", "swift.class", "swift.protocol"}: + keys.add("summary." + aliases.get(name, name)) + else: + continue + record(s) + return keys, declarations + + +def check(keys, declarations, version, update=False): + rows = checklist() + newer = tuple(map(int, version.split("."))) >= tuple(map(int, BASELINE.split("."))) + # Older SDKs expose a subset of the checklist and may mangle overloads differently. + errors = [f"Unclassified SDK declaration: {k}" for k in sorted(keys - rows.keys())] + if newer: + errors += [f"Checklist declaration missing from SDK: {k}" for k in sorted(rows.keys() - keys)] + if errors: + raise ValueError("\n".join(errors)) + lines = [] + for name, overloads in sorted(declarations.items()): + digest = hashlib.sha256("\n".join(sorted(overloads)).encode()).hexdigest()[:20] + lines.append(f"{name}\t{len(overloads)}\t{digest}\n") + if update: + if version != BASELINE: + raise ValueError(f"Select the {BASELINE} SDK or version the checklist for {version} first") + SIGNATURES.write_text("".join(lines)) + elif newer and SIGNATURES.read_text().splitlines(keepends=True) != lines: + diff = difflib.unified_diff(SIGNATURES.read_text().splitlines(keepends=True), lines, + fromfile=SIGNATURES.name, tofile=f"iOS {version} SDK") + raise ValueError("SDK overloads changed. Review the named declarations and their evidence.\n" + "".join(diff)) + print(f"iOS {version}: {len(keys)} classified entries, {sum(map(len, declarations.values()))} declarations") + + +def main(): + parser = argparse.ArgumentParser(description=__doc__) + parser.add_argument("--update-signatures", action="store_true", help="record reviewed overloads for the baseline SDK") + args = parser.parse_args() + sdk = subprocess.check_output(["xcrun", "--sdk", "iphoneos", "--show-sdk-path"], text=True).strip() + version = subprocess.check_output(["xcrun", "--sdk", "iphoneos", "--show-sdk-version"], text=True).strip() + with tempfile.TemporaryDirectory(prefix="sweetpad-intents-sdk-") as tmp: + path = Path(tmp) + subprocess.run(["xcrun", "--sdk", "iphoneos", "swift-symbolgraph-extract", "-module-name", "AppIntents", + "-target", f"arm64-apple-ios{version}", "-sdk", sdk, "-minimum-access-level", "public", + "-output-dir", str(path)], check=True) + keys, declarations = inventory(json.loads(f.read_text()) for f in sorted(path.glob("*.symbols.json"))) + check(keys, declarations, version, args.update_signatures) + + +if __name__ == "__main__": + main() diff --git a/sweetpad-cli/fixtures/appintents/test_sdk_coverage.py b/sweetpad-cli/fixtures/appintents/test_sdk_coverage.py new file mode 100644 index 00000000..bc8ecbd8 --- /dev/null +++ b/sweetpad-cli/fixtures/appintents/test_sdk_coverage.py @@ -0,0 +1,58 @@ +import json +from pathlib import Path +import tempfile +import unittest +from unittest.mock import patch + +import sdk_coverage as sdk +from verify_registration import equal, normalize_registration + + +def symbol(name, kind, uid=None): + path = name.split(".") + return {"identifier": {"precise": uid or name}, "pathComponents": path, + "kind": {"identifier": "swift." + kind}, + "declarationFragments": [{"kind": "identifier", "spelling": path[-1]}]} + + +class SDKCoverageTests(unittest.TestCase): + def test_new_parameter_result_and_summary_are_unclassified(self): + symbols = [symbol("IntentResult", "protocol"), symbol("ParameterSummary", "protocol"), + symbol("KnownResult", "protocol"), symbol("FutureResult", "protocol"), + symbol("NewSummary", "struct"), symbol("IntentParameter.init(title:future:)", "init")] + edges = [("KnownResult", "IntentResult"), ("FutureResult", "KnownResult"), ("NewSummary", "ParameterSummary")] + keys, declarations = sdk.inventory([{"symbols": symbols, "relationships": [ + {"kind": "conformsTo", "source": src, "target": dst} for src, dst in edges]}]) + unknown = {"parameter.future", "result.FutureResult", "summary.NewSummary"} + self.assertTrue(unknown <= keys) + with patch.object(sdk, "checklist", return_value=dict.fromkeys(keys - unknown, "Match")): + with self.assertRaises(ValueError) as failed: + sdk.check(keys, declarations, sdk.BASELINE) + for name in unknown: + self.assertIn("Unclassified SDK declaration: " + name, str(failed.exception)) + + def test_new_overload_with_previously_classified_labels_fails(self): + name = "IntentParameter.init(title:)" + with tempfile.TemporaryDirectory() as tmp, patch.object(sdk, "SIGNATURES", Path(tmp) / "snapshot"): + with patch.object(sdk, "checklist", return_value={"parameter.title": "Match"}): + keys = {"parameter.title"} + sdk.check(keys, {name: {"one"}}, sdk.BASELINE, update=True) + with self.assertRaisesRegex(ValueError, "SDK overloads changed"): + sdk.check(keys, {name: {"one", "two"}}, sdk.BASELINE) + + def test_complete_registration_detects_flags_and_other_schema_changes(self): + native = json.loads((sdk.HERE / "ResultProtocols.actionsdata").read_text()) + actual = json.loads(json.dumps(native)) + actual["generator"] = {"name": "sweetpad", "version": "test"} + equal("generator identity", normalize_registration(native), normalize_registration(actual)) + actual["actions"]["InteractiveResultProbe"]["outputFlags"] = 0 + actual["actions"]["ConfirmationSnippet"]["generator"] = {"unexpected": True} + actual["newRegistrationField"] = [] + with self.assertRaises(ValueError) as failed: + equal("registration", normalize_registration(native), normalize_registration(actual)) + for path in ["/InteractiveResultProbe/outputFlags", "/ConfirmationSnippet/generator", "/newRegistrationField"]: + self.assertIn(path, str(failed.exception)) + + +if __name__ == "__main__": + unittest.main() diff --git a/sweetpad-cli/fixtures/appintents/verify_registration.py b/sweetpad-cli/fixtures/appintents/verify_registration.py new file mode 100644 index 00000000..fb07cf95 --- /dev/null +++ b/sweetpad-cli/fixtures/appintents/verify_registration.py @@ -0,0 +1,133 @@ +#!/usr/bin/env python3 +"""Replay fresh Xcode probe registrations and verify the SDK checklist's diagnostics.""" + +import argparse +from copy import deepcopy +import json +from pathlib import Path +import subprocess +import sys +import tempfile + +HERE = Path(__file__).resolve().parent +sys.path.insert(0, str(HERE)) +sys.path.insert(0, str(HERE.parents[2] / "sweetpad-lib/ci")) +from bundle_comparison import differences, normalize_registration +from regen import PROBES +from sdk_coverage import BASELINE, checklist + + +def read(path): + return json.loads(path.read_text()) + + +def equal(label, expected, actual): + delta = differences(expected, actual) + if delta: + raise ValueError(f"{label}: {len(delta)} differences\n" + json.dumps(delta[:12], indent=2)) + + +def extract(binary, work, constants, module, version, expected_error=None): + work.mkdir() + listing = work / "inputs" + listing.write_text("".join(str(path.resolve()) + "\n" for path in constants)) + result = subprocess.run(["appintentsmetadataprocessor", "--compile-time-extraction", "--module-name", module, + "--bundle-identifier", "dev.sweetpad." + module, "--xcode-version", version, + "--output", str(work), "--swift-const-vals-list", str(listing)], + executable=binary, capture_output=True, text=True) + metadata = work / "Metadata.appintents" + if expected_error is None: + if result.returncode: + raise ValueError(f"{module}: {result.stderr}") + elif result.returncode != 1 or expected_error not in result.stderr or metadata.exists(): + raise ValueError(f"{work.name}: expected '{expected_error}' and no registration, " + f"got exit {result.returncode}: {result.stderr}") + return metadata + + +def compare_capture(capture, work, binary, module): + version = read(capture / "version.json") + native = read(capture / "extract.actionsdata") + output = extract(binary, work, sorted(capture.glob("*.swiftconstvalues")), module, version["toolsVersion"]) + actual = read(output / "extract.actionsdata") + if native["generator"]["name"] != "xcode-tools" or actual["generator"]["name"] != "sweetpad": + raise ValueError(f"{module}: unexpected registration generators") + equal(module + "/extract.actionsdata", normalize_registration(native), normalize_registration(actual)) + equal(module + "/version.json", version, read(output / "version.json")) + return len(native["actions"]) + + +def verify_no_effect(registration): + actions = registration["actions"] + # Only type identity differs between these two native Swift declarations. + identity = {"identifier", "fullyQualifiedTypeName", "mangledTypeName", "mangledTypeNameV2"} + pair = [{k: v for k, v in actions[name].items() if k not in identity} + for name in ("ConfirmProbe", "PromptProbe")] + equal("native requestValueDialog control", *map(normalize_registration, pair)) + + +def verify_diagnostics(captures, work, binary): + case_errors = { + "WhenProbe": "unsupported parameterSummary 'AppIntents.ParameterSummaryWhenCondition", + "SwitchProbe": "unsupported parameterSummary 'AppIntents.ParameterSummarySwitchCondition", + "TableProbe": "unsupported parameterSummary argument 'table'", + "RangeProbe": "unsupported App Intents parameter option 'inclusiveRange'", + "OptionsProviderProbe": "unsupported App Intents parameter option 'optionsProvider'", + } + native = captures / "Unsupported" + version = read(native / "version.json")["toolsVersion"] + types = read(native / "Unsupported.swiftconstvalues") + equal("native diagnostic probes", sorted(case_errors), sorted(read(native / "extract.actionsdata")["actions"])) + # A failing declaration stops the processor. Isolate them so a prior error cannot mask the next one. + def run_case(tag, declarations, error): + path = work / (tag + ".swiftconstvalues") + path.write_text(json.dumps(declarations)) + extract(binary, work / tag, [path], "Unsupported", version, error) + + for name, message in case_errors.items(): + intent = next(t for t in types if t["typeName"] == "Unsupported." + name) + run_case(name, [intent], message) + + # Exercise the argument-label guard separately from Swift overload resolution. + # Each row classified Diagnostic must still reject that exact option. + options = [k.removeprefix("parameter.") for k, status in checklist().items() + if k.startswith("parameter.") and status == "Diagnostic"] + base = next(t for t in read(captures / "ResultProtocols/ResultProtocols.swiftconstvalues") + if t["typeName"].endswith(".ConfirmProbe")) + for label in options: + intent = deepcopy(base) + param = next(p for p in intent["properties"] if p["label"] == "text") + param["propertyWrappers"][0]["arguments"].append({"label": label, "valueKind": "RawLiteral", "value": "1"}) + run_case(label, [intent], f"unsupported App Intents parameter option '{label}'") + return len(case_errors), len(options) + + +def verify(captures, binary): + sdk = read(captures / "sdk.json")["version"] + compare_baseline = tuple(map(int, sdk.split("."))) >= tuple(map(int, BASELINE.split("."))) + with tempfile.TemporaryDirectory(prefix="sweetpad-intents-replay-") as tmp: + work = Path(tmp) + total = 0 + for source, (module, expected) in PROBES.items(): + if expected is None: + continue + if compare_baseline: + native = read(captures / source / "extract.actionsdata") + baseline = read(HERE / expected) + if expected.endswith(".actions.json"): + native, baseline = {"actions": native["actions"]}, {"actions": baseline} + equal(source + "/Xcode baseline", normalize_registration(baseline), normalize_registration(native)) + count = compare_capture(captures / source, work / source, binary, module) + total += count + print(f"{source}: {count} actions; complete registration and version match") + verify_no_effect(read(captures / "ResultProtocols/extract.actionsdata")) + native, labels = verify_diagnostics(captures, work, binary) + print(f"{total} actions matched; {native} native diagnostic probes and {labels} option diagnostics passed") + + +if __name__ == "__main__": + parser = argparse.ArgumentParser(description=__doc__) + parser.add_argument("captures", type=Path) + parser.add_argument("--sweetpad", type=Path, default=HERE.parents[2] / "target/debug/sweetpad") + args = parser.parse_args() + verify(args.captures, args.sweetpad.resolve()) diff --git a/sweetpad-lib/ci/bundle_comparison.py b/sweetpad-lib/ci/bundle_comparison.py index 450f9994..1c11b88f 100644 --- a/sweetpad-lib/ci/bundle_comparison.py +++ b/sweetpad-lib/ci/bundle_comparison.py @@ -44,9 +44,11 @@ def normalize_plist(value): return value -def normalize_registration(value): +def normalize_registration(value, *, root=True): if isinstance(value, dict): - result = {k: normalize_registration(v) for k, v in value.items() if k != "generator"} + result = {k: normalize_registration(v, root=False) for k, v in value.items()} + if root and isinstance(result.get("generator"), dict): + result["generator"] = {k: v for k, v in result["generator"].items() if k not in {"name", "version"}} if "resolvableInputTypes" in result: result["resolvableInputTypes"].sort(key=lambda v: json.dumps(v, sort_keys=True)) metadata = result.get("typeSpecificMetadata") @@ -56,7 +58,7 @@ def normalize_registration(value): result["typeSpecificMetadata"] = [item for pair in pairs for item in pair] return result if isinstance(value, list): - return [normalize_registration(v) for v in value] + return [normalize_registration(v, root=False) for v in value] return value From 9decbc3c97c33a4d1ab6121dcab22fe9047de2e7 Mon Sep 17 00:00:00 2001 From: Yevhenii Hyzyla Date: Sat, 28 Nov 2026 00:32:23 +0100 Subject: [PATCH 6/7] Match the Xcode 26 registration schema and retain SDK inventories for upgrade review --- .../workflows/appintents-registration.yaml | 8 +- .../appintents/InputOptionsProbe.actions.json | 481 ++++++++++++------ .../appintents/InputOptionsProbe.swift | 10 + .../InputOptionsProbe.swiftconstvalues | 437 ++++++++++++++++ .../fixtures/appintents/sdk_coverage.py | 41 +- .../fixtures/appintents/test_sdk_coverage.py | 6 +- sweetpad-cli/src/cli/appintents/metadata.rs | 72 ++- .../src/cli/appintents/metadata/parameters.rs | 36 +- .../appintents/metadata/representations.rs | 26 +- sweetpad-cli/src/cli/appintents/mod.rs | 2 +- 10 files changed, 906 insertions(+), 213 deletions(-) diff --git a/.github/workflows/appintents-registration.yaml b/.github/workflows/appintents-registration.yaml index ae45fd4a..9b0822e5 100644 --- a/.github/workflows/appintents-registration.yaml +++ b/.github/workflows/appintents-registration.yaml @@ -37,7 +37,13 @@ jobs: with: xcode-version: latest-stable - run: xcodebuild -version - - run: python3 -B -I sweetpad-cli/fixtures/appintents/sdk_coverage.py + - run: python3 -B -I sweetpad-cli/fixtures/appintents/sdk_coverage.py --export-signatures "$RUNNER_TEMP/sdk-inventory" + - uses: actions/upload-artifact@v7 + if: ${{ !cancelled() }} + with: + name: appintents-sdk-inventory + path: ${{ runner.temp }}/sdk-inventory + if-no-files-found: error native: name: Capture registration with Xcode diff --git a/sweetpad-cli/fixtures/appintents/InputOptionsProbe.actions.json b/sweetpad-cli/fixtures/appintents/InputOptionsProbe.actions.json index df8f7359..961d9861 100644 --- a/sweetpad-cli/fixtures/appintents/InputOptionsProbe.actions.json +++ b/sweetpad-cli/fixtures/appintents/InputOptionsProbe.actions.json @@ -28,16 +28,6 @@ "isOptional": true, "name": "allOff", "resolvableInputTypes": [ - { - "kindValue": 0, - "valueType": { - "primitive": { - "wrapper": { - "typeIdentifier": 0 - } - } - } - }, { "kindValue": 0, "valueType": { @@ -64,6 +54,16 @@ } } } + }, + { + "kindValue": 0, + "valueType": { + "primitive": { + "wrapper": { + "typeIdentifier": 0 + } + } + } } ], "title": { @@ -71,37 +71,37 @@ "key": "All off" }, "typeSpecificMetadata": [ - "LNValueTypeMetadataKeyStringMultiline", + "LNValueTypeMetadataKeyStringAutocorrect", { "int": { "wrapper": 0 } }, - "LNValueTypeMetadataKeyStringSmartDashes", + "LNValueTypeMetadataKeyStringCapitalizationType", { "int": { "wrapper": 0 } }, - "LNValueTypeMetadataKeyStringAutocorrect", + "LNValueTypeMetadataKeyStringSmartQuotes", { "int": { "wrapper": 0 } }, - "LNValueTypeMetadataKeyStringSmartQuotes", + "LNValueTypeMetadataKeyStringKeyboardType", { "int": { - "wrapper": 0 + "wrapper": 4 } }, - "LNValueTypeMetadataKeyStringKeyboardType", + "LNValueTypeMetadataKeyStringMultiline", { "int": { - "wrapper": 4 + "wrapper": 0 } }, - "LNValueTypeMetadataKeyStringCapitalizationType", + "LNValueTypeMetadataKeyStringSmartDashes", { "int": { "wrapper": 0 @@ -124,16 +124,6 @@ "isOptional": true, "name": "allOn", "resolvableInputTypes": [ - { - "kindValue": 0, - "valueType": { - "primitive": { - "wrapper": { - "typeIdentifier": 0 - } - } - } - }, { "kindValue": 0, "valueType": { @@ -160,6 +150,16 @@ } } } + }, + { + "kindValue": 0, + "valueType": { + "primitive": { + "wrapper": { + "typeIdentifier": 0 + } + } + } } ], "title": { @@ -167,37 +167,37 @@ "key": "All on" }, "typeSpecificMetadata": [ - "LNValueTypeMetadataKeyStringCapitalizationType", + "LNValueTypeMetadataKeyStringSmartQuotes", { "int": { - "wrapper": 3 + "wrapper": 1 } }, - "LNValueTypeMetadataKeyStringMultiline", + "LNValueTypeMetadataKeyStringAutocorrect", { "int": { "wrapper": 1 } }, - "LNValueTypeMetadataKeyStringKeyboardType", + "LNValueTypeMetadataKeyStringCapitalizationType", { "int": { - "wrapper": 0 + "wrapper": 3 } }, - "LNValueTypeMetadataKeyStringSmartQuotes", + "LNValueTypeMetadataKeyStringKeyboardType", { "int": { - "wrapper": 1 + "wrapper": 0 } }, - "LNValueTypeMetadataKeyStringAutocorrect", + "LNValueTypeMetadataKeyStringSmartDashes", { "int": { "wrapper": 1 } }, - "LNValueTypeMetadataKeyStringSmartDashes", + "LNValueTypeMetadataKeyStringMultiline", { "int": { "wrapper": 1 @@ -220,16 +220,6 @@ "isOptional": true, "name": "empty", "resolvableInputTypes": [ - { - "kindValue": 0, - "valueType": { - "primitive": { - "wrapper": { - "typeIdentifier": 0 - } - } - } - }, { "kindValue": 0, "valueType": { @@ -256,6 +246,16 @@ } } } + }, + { + "kindValue": 0, + "valueType": { + "primitive": { + "wrapper": { + "typeIdentifier": 0 + } + } + } } ], "title": { @@ -279,16 +279,6 @@ "isOptional": true, "name": "punct", "resolvableInputTypes": [ - { - "kindValue": 0, - "valueType": { - "primitive": { - "wrapper": { - "typeIdentifier": 0 - } - } - } - }, { "kindValue": 0, "valueType": { @@ -315,6 +305,16 @@ } } } + }, + { + "kindValue": 0, + "valueType": { + "primitive": { + "wrapper": { + "typeIdentifier": 0 + } + } + } } ], "title": { @@ -351,16 +351,6 @@ "isOptional": true, "name": "url", "resolvableInputTypes": [ - { - "kindValue": 0, - "valueType": { - "primitive": { - "wrapper": { - "typeIdentifier": 0 - } - } - } - }, { "kindValue": 0, "valueType": { @@ -387,6 +377,16 @@ } } } + }, + { + "kindValue": 0, + "valueType": { + "primitive": { + "wrapper": { + "typeIdentifier": 0 + } + } + } } ], "title": { @@ -394,13 +394,13 @@ "key": "URL" }, "typeSpecificMetadata": [ - "LNValueTypeMetadataKeyStringCapitalizationType", + "LNValueTypeMetadataKeyStringKeyboardType", { "int": { "wrapper": 2 } }, - "LNValueTypeMetadataKeyStringKeyboardType", + "LNValueTypeMetadataKeyStringCapitalizationType", { "int": { "wrapper": 2 @@ -423,16 +423,6 @@ "isOptional": true, "name": "numberPad", "resolvableInputTypes": [ - { - "kindValue": 0, - "valueType": { - "primitive": { - "wrapper": { - "typeIdentifier": 0 - } - } - } - }, { "kindValue": 0, "valueType": { @@ -459,6 +449,16 @@ } } } + }, + { + "kindValue": 0, + "valueType": { + "primitive": { + "wrapper": { + "typeIdentifier": 0 + } + } + } } ], "title": { @@ -489,16 +489,6 @@ "isOptional": true, "name": "quotes", "resolvableInputTypes": [ - { - "kindValue": 0, - "valueType": { - "primitive": { - "wrapper": { - "typeIdentifier": 0 - } - } - } - }, { "kindValue": 0, "valueType": { @@ -525,6 +515,16 @@ } } } + }, + { + "kindValue": 0, + "valueType": { + "primitive": { + "wrapper": { + "typeIdentifier": 0 + } + } + } } ], "title": { @@ -555,16 +555,6 @@ "isOptional": true, "name": "dashes", "resolvableInputTypes": [ - { - "kindValue": 0, - "valueType": { - "primitive": { - "wrapper": { - "typeIdentifier": 0 - } - } - } - }, { "kindValue": 0, "valueType": { @@ -591,6 +581,16 @@ } } } + }, + { + "kindValue": 0, + "valueType": { + "primitive": { + "wrapper": { + "typeIdentifier": 0 + } + } + } } ], "title": { @@ -621,16 +621,6 @@ "isOptional": true, "name": "autocorrect", "resolvableInputTypes": [ - { - "kindValue": 0, - "valueType": { - "primitive": { - "wrapper": { - "typeIdentifier": 0 - } - } - } - }, { "kindValue": 0, "valueType": { @@ -657,6 +647,16 @@ } } } + }, + { + "kindValue": 0, + "valueType": { + "primitive": { + "wrapper": { + "typeIdentifier": 0 + } + } + } } ], "title": { @@ -687,16 +687,6 @@ "isOptional": false, "name": "withDefault", "resolvableInputTypes": [ - { - "kindValue": 0, - "valueType": { - "primitive": { - "wrapper": { - "typeIdentifier": 0 - } - } - } - }, { "kindValue": 0, "valueType": { @@ -723,6 +713,16 @@ } } } + }, + { + "kindValue": 0, + "valueType": { + "primitive": { + "wrapper": { + "typeIdentifier": 0 + } + } + } } ], "title": { @@ -763,16 +763,6 @@ "key": "Described" }, "resolvableInputTypes": [ - { - "kindValue": 0, - "valueType": { - "primitive": { - "wrapper": { - "typeIdentifier": 0 - } - } - } - }, { "kindValue": 0, "valueType": { @@ -799,6 +789,16 @@ } } } + }, + { + "kindValue": 0, + "valueType": { + "primitive": { + "wrapper": { + "typeIdentifier": 0 + } + } + } } ], "title": { @@ -806,16 +806,16 @@ "key": "Options and dialog" }, "typeSpecificMetadata": [ - "LNValueTypeMetadataKeyStringKeyboardType", + "LNValueTypeMetadataKeyStringAutocorrect", { "int": { - "wrapper": 3 + "wrapper": 0 } }, - "LNValueTypeMetadataKeyStringAutocorrect", + "LNValueTypeMetadataKeyStringKeyboardType", { "int": { - "wrapper": 0 + "wrapper": 3 } } ], @@ -835,16 +835,6 @@ "isOptional": true, "name": "explicitDefaults", "resolvableInputTypes": [ - { - "kindValue": 0, - "valueType": { - "primitive": { - "wrapper": { - "typeIdentifier": 0 - } - } - } - }, { "kindValue": 0, "valueType": { @@ -871,6 +861,16 @@ } } } + }, + { + "kindValue": 0, + "valueType": { + "primitive": { + "wrapper": { + "typeIdentifier": 0 + } + } + } } ], "title": { @@ -884,22 +884,22 @@ "wrapper": 0 } }, - "LNValueTypeMetadataKeyStringAutocorrect", + "LNValueTypeMetadataKeyStringKeyboardType", { "int": { - "wrapper": 1 + "wrapper": 0 } }, - "LNValueTypeMetadataKeyStringSmartQuotes", + "LNValueTypeMetadataKeyStringCapitalizationType", { "int": { - "wrapper": 1 + "wrapper": 2 } }, - "LNValueTypeMetadataKeyStringCapitalizationType", + "LNValueTypeMetadataKeyStringSmartQuotes", { "int": { - "wrapper": 2 + "wrapper": 1 } }, "LNValueTypeMetadataKeyStringSmartDashes", @@ -908,10 +908,10 @@ "wrapper": 1 } }, - "LNValueTypeMetadataKeyStringKeyboardType", + "LNValueTypeMetadataKeyStringAutocorrect", { "int": { - "wrapper": 0 + "wrapper": 1 } } ], @@ -1047,11 +1047,98 @@ "valueType": { "primitive": { "wrapper": { - "typeIdentifier": 0 + "typeIdentifier": 2 } } } }, + { + "kindValue": 0, + "valueType": { + "array": { + "wrapper": { + "capabilities": 3, + "memberValueType": { + "primitive": { + "wrapper": { + "typeIdentifier": 2 + } + } + } + } + } + } + }, + { + "kindValue": 0, + "valueType": { + "primitive": { + "wrapper": { + "typeIdentifier": 0 + } + } + } + } + ], + "title": { + "alternatives": [], + "key": "User's summary" + }, + "typeSpecificMetadata": [], + "valueType": { + "primitive": { + "wrapper": { + "typeIdentifier": 0 + } + } + } + } + ], + "presentationStyle": 0, + "requiredCapabilities": [], + "supportedModes": 1, + "systemProtocolMetadata": [], + "systemProtocolMetadataV2": [], + "systemProtocols": [], + "title": { + "alternatives": [], + "key": "Input options probe" + }, + "typeSpecificMetadata": [], + "visibilityMetadata": { + "assistantOnly": false, + "isDiscoverable": true + } + }, + "ParameterTitleProbe": { + "assistantDefinedSchemaTraits": [], + "assistantDefinedSchemas": [], + "authenticationPolicy": 0, + "availabilityAnnotations": { + "LNPlatformNameWildcard": { + "introducedVersion": "*" + } + }, + "effectiveBundleIdentifiers": [], + "fullyQualifiedTypeName": "InputOptionsProbe.ParameterTitleProbe", + "identifier": "ParameterTitleProbe", + "isAuthPolExplicit": false, + "isDiscoverable": true, + "mangledTypeName": "17InputOptionsProbe014ParameterTitleC0V", + "mangledTypeNameByBundleIdentifier": {}, + "mangledTypeNameByBundleIdentifierV2": {}, + "mangledTypeNameV2": "17InputOptionsProbe014ParameterTitleC0V", + "openAppWhenRun": false, + "outputFlags": 0, + "parameters": [ + { + "capabilities": 0, + "dynamicOptionsSupport": 0, + "inputConnectionBehavior": 0, + "isInput": false, + "isOptional": true, + "name": "ordinary", + "resolvableInputTypes": [ { "kindValue": 0, "valueType": { @@ -1078,11 +1165,21 @@ } } } + }, + { + "kindValue": 0, + "valueType": { + "primitive": { + "wrapper": { + "typeIdentifier": 0 + } + } + } } ], "title": { "alternatives": [], - "key": "User's summary" + "key": "User's choice" }, "typeSpecificMetadata": [], "valueType": { @@ -1092,6 +1189,82 @@ } } } + }, + { + "capabilities": 1, + "dynamicOptionsSupport": 0, + "inputConnectionBehavior": 0, + "isInput": false, + "isOptional": false, + "name": "parameterSummary", + "parameterDescription": { + "alternatives": [], + "key": "Extra detail" + }, + "resolvableInputTypes": [ + { + "kindValue": 0, + "valueType": { + "primitive": { + "wrapper": { + "typeIdentifier": 2 + } + } + } + }, + { + "kindValue": 0, + "valueType": { + "array": { + "wrapper": { + "capabilities": 3, + "memberValueType": { + "primitive": { + "wrapper": { + "typeIdentifier": 2 + } + } + } + } + } + } + }, + { + "kindValue": 0, + "valueType": { + "primitive": { + "wrapper": { + "typeIdentifier": 0 + } + } + } + } + ], + "title": { + "alternatives": [], + "key": "Custom label" + }, + "typeSpecificMetadata": [ + "LNValueTypeMetadataKeyStringMultiline", + { + "int": { + "wrapper": 1 + } + }, + "LNValueTypeSpecificMetadataKeyDefaultValue", + { + "string": { + "wrapper": "ready" + } + } + ], + "valueType": { + "primitive": { + "wrapper": { + "typeIdentifier": 0 + } + } + } } ], "presentationStyle": 0, @@ -1102,7 +1275,7 @@ "systemProtocols": [], "title": { "alternatives": [], - "key": "Input options probe" + "key": "Parameter titles" }, "typeSpecificMetadata": [], "visibilityMetadata": { diff --git a/sweetpad-cli/fixtures/appintents/InputOptionsProbe.swift b/sweetpad-cli/fixtures/appintents/InputOptionsProbe.swift index ad720c1b..b906a9fb 100644 --- a/sweetpad-cli/fixtures/appintents/InputOptionsProbe.swift +++ b/sweetpad-cli/fixtures/appintents/InputOptionsProbe.swift @@ -43,3 +43,13 @@ struct InputOptionsProbeIntent: AppIntent { @MainActor func perform() async throws -> some IntentResult { .result() } } + +struct ParameterTitleProbe: AppIntent { + static let title: LocalizedStringResource = "Parameter titles" + + @Parameter(title: "User's choice", inputOptions: nil) var ordinary: String? + @Parameter(title: "Custom label", description: "Extra detail", default: "ready", inputOptions: .init(multiline: true)) + var parameterSummary: String + + func perform() async throws -> some IntentResult { .result() } +} diff --git a/sweetpad-cli/fixtures/appintents/InputOptionsProbe.swiftconstvalues b/sweetpad-cli/fixtures/appintents/InputOptionsProbe.swiftconstvalues index b83b1349..d25f773d 100644 --- a/sweetpad-cli/fixtures/appintents/InputOptionsProbe.swiftconstvalues +++ b/sweetpad-cli/fixtures/appintents/InputOptionsProbe.swiftconstvalues @@ -3806,5 +3806,442 @@ } ], "typeName": "InputOptionsProbe.InputOptionsProbeIntent" + }, + { + "allConformances": [ + { + "conformanceDefiningModule": "InputOptionsProbe", + "protocolName": "AppIntents.AppIntent" + }, + { + "conformanceDefiningModule": "InputOptionsProbe", + "protocolName": "AppIntents.PersistentlyIdentifiable" + }, + { + "conformanceDefiningModule": "InputOptionsProbe", + "protocolName": "AppIntents._SupportsAppDependencies" + }, + { + "conformanceDefiningModule": "InputOptionsProbe", + "protocolName": "Swift.Sendable" + }, + { + "conformanceDefiningModule": "InputOptionsProbe", + "protocolName": "Swift.SendableMetatype" + } + ], + "associatedTypeAliases": [ + { + "opaqueTypeProtocolRequirements": [ + "AppIntents.IntentResult" + ], + "opaqueTypeSameTypeRequirements": [], + "substitutedMangledTypeName": "17InputOptionsProbe014ParameterTitleC0V7performQryYaKFQOy_Qo_", + "substitutedTypeName": "some AppIntents.IntentResult", + "typeAliasName": "PerformResult" + }, + { + "opaqueTypeProtocolRequirements": [ + "AppIntents.ParameterSummary" + ], + "opaqueTypeSameTypeRequirements": [], + "substitutedMangledTypeName": "10AppIntents0A6IntentPAAE16parameterSummaryQrvpZQOy17InputOptionsProbe014ParameterTitleH0V_Qo_", + "substitutedTypeName": "some AppIntents.ParameterSummary", + "typeAliasName": "SummaryContent" + } + ], + "conformances": [ + "AppIntents.AppIntent", + "AppIntents.PersistentlyIdentifiable", + "AppIntents._SupportsAppDependencies", + "Swift.Sendable", + "Swift.SendableMetatype" + ], + "file": "InputOptionsProbe.swift", + "kind": "struct", + "line": 47, + "mangledTypeName": "17InputOptionsProbe014ParameterTitleC0V", + "properties": [ + { + "file": "InputOptionsProbe.swift", + "isComputed": "false", + "isStatic": "false", + "label": "_ordinary", + "line": 50, + "mangledTypeName": "n/a - deprecated", + "type": "AppIntents.IntentParameter>", + "value": { + "arguments": [ + { + "label": "title", + "type": "Foundation.LocalizedStringResource", + "value": "User's choice", + "valueKind": "RawLiteral" + }, + { + "label": "description", + "type": "Swift.Optional", + "valueKind": "NilLiteral" + }, + { + "label": "default", + "type": "Swift.Optional", + "valueKind": "NilLiteral" + }, + { + "label": "inputOptions", + "type": "Swift.Optional", + "valueKind": "NilLiteral" + }, + { + "label": "requestValueDialog", + "type": "Swift.Optional", + "valueKind": "NilLiteral" + }, + { + "label": "inputConnectionBehavior", + "type": "AppIntents.InputConnectionBehavior", + "valueKind": "Runtime" + } + ], + "type": "AppIntents.IntentParameter>" + }, + "valueKind": "InitCall" + }, + { + "file": "InputOptionsProbe.swift", + "isComputed": "false", + "isStatic": "false", + "label": "_parameterSummary", + "line": 52, + "mangledTypeName": "n/a - deprecated", + "type": "AppIntents.IntentParameter", + "value": { + "arguments": [ + { + "label": "title", + "type": "Foundation.LocalizedStringResource", + "value": "Custom label", + "valueKind": "RawLiteral" + }, + { + "label": "description", + "type": "Swift.Optional", + "value": "Extra detail", + "valueKind": "RawLiteral" + }, + { + "label": "default", + "type": "Swift.Optional", + "value": "ready", + "valueKind": "RawLiteral" + }, + { + "label": "inputOptions", + "type": "Swift.Optional", + "value": { + "arguments": [ + { + "label": "keyboardType", + "type": "Swift.String.IntentInputOptions.KeyboardType", + "valueKind": "Runtime" + }, + { + "label": "capitalizationType", + "type": "Swift.String.IntentInputOptions.CapitalizationType", + "valueKind": "Runtime" + }, + { + "label": "multiline", + "type": "Swift.Bool", + "value": "true", + "valueKind": "RawLiteral" + }, + { + "label": "autocorrect", + "type": "Swift.Bool", + "valueKind": "Runtime" + }, + { + "label": "smartQuotes", + "type": "Swift.Bool", + "valueKind": "Runtime" + }, + { + "label": "smartDashes", + "type": "Swift.Bool", + "valueKind": "Runtime" + } + ], + "type": "Swift.String.IntentInputOptions" + }, + "valueKind": "InitCall" + }, + { + "label": "requestValueDialog", + "type": "Swift.Optional", + "valueKind": "NilLiteral" + }, + { + "label": "inputConnectionBehavior", + "type": "AppIntents.InputConnectionBehavior", + "valueKind": "Runtime" + } + ], + "type": "AppIntents.IntentParameter" + }, + "valueKind": "InitCall" + }, + { + "file": "InputOptionsProbe.swift", + "isComputed": "false", + "isStatic": "true", + "label": "title", + "line": 48, + "mangledTypeName": "n/a - deprecated", + "type": "Foundation.LocalizedStringResource", + "value": "Parameter titles", + "valueKind": "RawLiteral" + }, + { + "file": "InputOptionsProbe.swift", + "isComputed": "true", + "isStatic": "false", + "label": "ordinary", + "line": 50, + "mangledTypeName": "n/a - deprecated", + "propertyWrappers": [ + { + "arguments": [ + { + "label": "title", + "type": "Foundation.LocalizedStringResource", + "value": "User's choice", + "valueKind": "RawLiteral" + }, + { + "label": "inputOptions", + "type": "Swift.Optional", + "valueKind": "NilLiteral" + } + ], + "file": "InputOptionsProbe.swift", + "line": 50, + "type": "AppIntents.IntentParameter" + } + ], + "type": "Swift.Optional", + "value": { + "arguments": [ + { + "label": "title", + "type": "Foundation.LocalizedStringResource", + "value": "User's choice", + "valueKind": "RawLiteral" + }, + { + "label": "description", + "type": "Swift.Optional", + "valueKind": "NilLiteral" + }, + { + "label": "default", + "type": "Swift.Optional", + "valueKind": "NilLiteral" + }, + { + "label": "inputOptions", + "type": "Swift.Optional", + "valueKind": "NilLiteral" + }, + { + "label": "requestValueDialog", + "type": "Swift.Optional", + "valueKind": "NilLiteral" + }, + { + "label": "inputConnectionBehavior", + "type": "AppIntents.InputConnectionBehavior", + "valueKind": "Runtime" + } + ], + "type": "AppIntents.IntentParameter>" + }, + "valueKind": "InitCall" + }, + { + "file": "InputOptionsProbe.swift", + "isComputed": "true", + "isStatic": "false", + "label": "$ordinary", + "line": 50, + "mangledTypeName": "n/a - deprecated", + "type": "AppIntents.IntentParameter>", + "valueKind": "Runtime" + }, + { + "file": "InputOptionsProbe.swift", + "isComputed": "true", + "isStatic": "false", + "label": "parameterSummary", + "line": 52, + "mangledTypeName": "n/a - deprecated", + "propertyWrappers": [ + { + "arguments": [ + { + "label": "title", + "type": "Foundation.LocalizedStringResource", + "value": "Custom label", + "valueKind": "RawLiteral" + }, + { + "label": "description", + "type": "Swift.Optional", + "value": "Extra detail", + "valueKind": "RawLiteral" + }, + { + "label": "default", + "type": "Swift.Optional", + "value": "ready", + "valueKind": "RawLiteral" + }, + { + "label": "inputOptions", + "type": "Swift.Optional", + "value": { + "arguments": [ + { + "label": "keyboardType", + "type": "Swift.String.IntentInputOptions.KeyboardType", + "valueKind": "Runtime" + }, + { + "label": "capitalizationType", + "type": "Swift.String.IntentInputOptions.CapitalizationType", + "valueKind": "Runtime" + }, + { + "label": "multiline", + "type": "Swift.Bool", + "value": "true", + "valueKind": "RawLiteral" + }, + { + "label": "autocorrect", + "type": "Swift.Bool", + "valueKind": "Runtime" + }, + { + "label": "smartQuotes", + "type": "Swift.Bool", + "valueKind": "Runtime" + }, + { + "label": "smartDashes", + "type": "Swift.Bool", + "valueKind": "Runtime" + } + ], + "type": "Swift.String.IntentInputOptions" + }, + "valueKind": "InitCall" + } + ], + "file": "InputOptionsProbe.swift", + "line": 51, + "type": "AppIntents.IntentParameter" + } + ], + "type": "Swift.String", + "value": { + "arguments": [ + { + "label": "title", + "type": "Foundation.LocalizedStringResource", + "value": "Custom label", + "valueKind": "RawLiteral" + }, + { + "label": "description", + "type": "Swift.Optional", + "value": "Extra detail", + "valueKind": "RawLiteral" + }, + { + "label": "default", + "type": "Swift.Optional", + "value": "ready", + "valueKind": "RawLiteral" + }, + { + "label": "inputOptions", + "type": "Swift.Optional", + "value": { + "arguments": [ + { + "label": "keyboardType", + "type": "Swift.String.IntentInputOptions.KeyboardType", + "valueKind": "Runtime" + }, + { + "label": "capitalizationType", + "type": "Swift.String.IntentInputOptions.CapitalizationType", + "valueKind": "Runtime" + }, + { + "label": "multiline", + "type": "Swift.Bool", + "value": "true", + "valueKind": "RawLiteral" + }, + { + "label": "autocorrect", + "type": "Swift.Bool", + "valueKind": "Runtime" + }, + { + "label": "smartQuotes", + "type": "Swift.Bool", + "valueKind": "Runtime" + }, + { + "label": "smartDashes", + "type": "Swift.Bool", + "valueKind": "Runtime" + } + ], + "type": "Swift.String.IntentInputOptions" + }, + "valueKind": "InitCall" + }, + { + "label": "requestValueDialog", + "type": "Swift.Optional", + "valueKind": "NilLiteral" + }, + { + "label": "inputConnectionBehavior", + "type": "AppIntents.InputConnectionBehavior", + "valueKind": "Runtime" + } + ], + "type": "AppIntents.IntentParameter" + }, + "valueKind": "InitCall" + }, + { + "file": "InputOptionsProbe.swift", + "isComputed": "true", + "isStatic": "false", + "label": "$parameterSummary", + "line": 52, + "mangledTypeName": "n/a - deprecated", + "type": "AppIntents.IntentParameter", + "valueKind": "Runtime" + } + ], + "typeName": "InputOptionsProbe.ParameterTitleProbe" } ] diff --git a/sweetpad-cli/fixtures/appintents/sdk_coverage.py b/sweetpad-cli/fixtures/appintents/sdk_coverage.py index d2fcbf2c..78141df0 100644 --- a/sweetpad-cli/fixtures/appintents/sdk_coverage.py +++ b/sweetpad-cli/fixtures/appintents/sdk_coverage.py @@ -14,7 +14,6 @@ HERE = Path(__file__).resolve().parent BASELINE = "27.2" CHECKLIST = HERE / f"sdk-{BASELINE}.md" -SIGNATURES = HERE / f"sdk-{BASELINE}-signatures.txt" EXAMPLES = {"result.OpensIntent+ProvidesDialog", "result.OpensIntent+ShowsSnippetView", "summary.table"} @@ -97,33 +96,45 @@ def record(s): return keys, declarations -def check(keys, declarations, version, update=False): +def version_number(version): + return tuple(map(int, version.split("."))) + + +def check(keys, declarations, version, update=False, directory=HERE, export=None): rows = checklist() - newer = tuple(map(int, version.split("."))) >= tuple(map(int, BASELINE.split("."))) - # Older SDKs expose a subset of the checklist and may mangle overloads differently. + newer = version_number(version) >= version_number(BASELINE) + # Older SDKs can legitimately expose a subset of the most recent checklist. errors = [f"Unclassified SDK declaration: {k}" for k in sorted(keys - rows.keys())] if newer: errors += [f"Checklist declaration missing from SDK: {k}" for k in sorted(rows.keys() - keys)] - if errors: - raise ValueError("\n".join(errors)) lines = [] for name, overloads in sorted(declarations.items()): digest = hashlib.sha256("\n".join(sorted(overloads)).encode()).hexdigest()[:20] lines.append(f"{name}\t{len(overloads)}\t{digest}\n") + name = f"sdk-{version}-signatures.txt" + if export: + export.mkdir(parents=True, exist_ok=True) + (export / name).write_text("".join(lines)) + if errors: + raise ValueError("\n".join(errors)) if update: - if version != BASELINE: - raise ValueError(f"Select the {BASELINE} SDK or version the checklist for {version} first") - SIGNATURES.write_text("".join(lines)) - elif newer and SIGNATURES.read_text().splitlines(keepends=True) != lines: - diff = difflib.unified_diff(SIGNATURES.read_text().splitlines(keepends=True), lines, - fromfile=SIGNATURES.name, tofile=f"iOS {version} SDK") - raise ValueError("SDK overloads changed. Review the named declarations and their evidence.\n" + "".join(diff)) + (directory / name).write_text("".join(lines)) + else: + versions = {version_number(f.name.split("-")[1]): f for f in directory.glob("sdk-*-signatures.txt")} + candidates = [v for v in versions if v <= version_number(version)] + if candidates: + baseline = versions[max(candidates)] + previous = baseline.read_text().splitlines(keepends=True) + if previous != lines: + diff = difflib.unified_diff(previous, lines, fromfile=baseline.name, tofile=f"iOS {version} SDK") + raise ValueError("SDK overloads changed. Review the named declarations and their evidence.\n" + "".join(diff)) print(f"iOS {version}: {len(keys)} classified entries, {sum(map(len, declarations.values()))} declarations") def main(): parser = argparse.ArgumentParser(description=__doc__) - parser.add_argument("--update-signatures", action="store_true", help="record reviewed overloads for the baseline SDK") + parser.add_argument("--update-signatures", action="store_true", help="record reviewed overloads for the selected SDK") + parser.add_argument("--export-signatures", type=Path, help="export this SDK's declaration inventory for review") args = parser.parse_args() sdk = subprocess.check_output(["xcrun", "--sdk", "iphoneos", "--show-sdk-path"], text=True).strip() version = subprocess.check_output(["xcrun", "--sdk", "iphoneos", "--show-sdk-version"], text=True).strip() @@ -133,7 +144,7 @@ def main(): "-target", f"arm64-apple-ios{version}", "-sdk", sdk, "-minimum-access-level", "public", "-output-dir", str(path)], check=True) keys, declarations = inventory(json.loads(f.read_text()) for f in sorted(path.glob("*.symbols.json"))) - check(keys, declarations, version, args.update_signatures) + check(keys, declarations, version, args.update_signatures, export=args.export_signatures) if __name__ == "__main__": diff --git a/sweetpad-cli/fixtures/appintents/test_sdk_coverage.py b/sweetpad-cli/fixtures/appintents/test_sdk_coverage.py index bc8ecbd8..c03c6525 100644 --- a/sweetpad-cli/fixtures/appintents/test_sdk_coverage.py +++ b/sweetpad-cli/fixtures/appintents/test_sdk_coverage.py @@ -33,12 +33,12 @@ def test_new_parameter_result_and_summary_are_unclassified(self): def test_new_overload_with_previously_classified_labels_fails(self): name = "IntentParameter.init(title:)" - with tempfile.TemporaryDirectory() as tmp, patch.object(sdk, "SIGNATURES", Path(tmp) / "snapshot"): + with tempfile.TemporaryDirectory() as tmp: with patch.object(sdk, "checklist", return_value={"parameter.title": "Match"}): keys = {"parameter.title"} - sdk.check(keys, {name: {"one"}}, sdk.BASELINE, update=True) + sdk.check(keys, {name: {"one"}}, "26.5", update=True, directory=Path(tmp)) with self.assertRaisesRegex(ValueError, "SDK overloads changed"): - sdk.check(keys, {name: {"one", "two"}}, sdk.BASELINE) + sdk.check(keys, {name: {"one", "two"}}, "26.6", directory=Path(tmp)) def test_complete_registration_detects_flags_and_other_schema_changes(self): native = json.loads((sdk.HERE / "ResultProtocols.actionsdata").read_text()) diff --git a/sweetpad-cli/src/cli/appintents/metadata.rs b/sweetpad-cli/src/cli/appintents/metadata.rs index f67f5027..2bb0808e 100644 --- a/sweetpad-cli/src/cli/appintents/metadata.rs +++ b/sweetpad-cli/src/cli/appintents/metadata.rs @@ -110,7 +110,18 @@ fn argument<'a>(value: &'a Value, label: &str) -> Option<&'a Value> { .find(|a| a["label"] == label) } -pub(super) fn extract(types: &[Value]) -> Result { +#[derive(Clone, Copy, PartialEq, Eq)] +enum RegistrationFormat { + Xcode26, + Current, +} + +pub(super) fn extract(types: &[Value], xcode_build: &str) -> Result { + // Swift Build supplies XCODE_PRODUCT_BUILD_VERSION. Xcode 26 uses the 17-series builds. + let format = match xcode_build.as_bytes() { + [b'1', b'7', b'A'..=b'Z', ..] => RegistrationFormat::Xcode26, + _ => RegistrationFormat::Current, + }; if types .iter() .filter(|t| conforms(t, "AppShortcutsProvider")) @@ -140,10 +151,10 @@ pub(super) fn extract(types: &[Value]) -> Result { result["enums"] .as_array_mut() .unwrap() - .push(enumeration(value)?); + .push(enumeration(value, format)?); } if conforms(value, "AppEntity") { - let mut entity = entity(value)?; + let mut entity = entity(value, format)?; entity["properties"] = json!(representations::entity_properties( &entity["properties"], types @@ -154,7 +165,7 @@ pub(super) fn extract(types: &[Value]) -> Result { result["queries"][id] = query(value, types)?; } if conforms(value, "AppIntent") || conforms(value, "WidgetConfigurationIntent") { - result["actions"][id] = action(value, types)?; + result["actions"][id] = action(value, types, format)?; } if conforms(value, "AppShortcutsProvider") { result["autoShortcutProviderMangledName"] = value["mangledTypeName"].clone(); @@ -179,7 +190,7 @@ pub(super) fn strings_data(types: &[Value], metadata: &Value) -> Option { Some(json!({"source":property["file"],"tables":{"AppShortcuts":entries},"version":2})) } -fn action(value: &Value, types: &[Value]) -> Result { +fn action(value: &Value, types: &[Value], format: RegistrationFormat) -> Result { let id = identifier(value); let widget = conforms(value, "WidgetConfigurationIntent"); let snippet = conforms(value, "SnippetIntent"); @@ -250,7 +261,7 @@ fn action(value: &Value, types: &[Value]) -> Result { action["parameters"] .as_array_mut() .unwrap() - .push(parameters::parameter(parameter, types)?); + .push(parameters::parameter(parameter, types, format)?); } if let Some(summary) = action_summary(value, id)? { action["actionConfiguration"] = summary; @@ -453,7 +464,7 @@ mod tests { .unwrap(); policy["value"]["name"] = json!("futureAuthenticationPolicy"); assert!( - extract(&types) + extract(&types, "27B52") .unwrap_err() .contains("unsupported authenticationPolicy") ); @@ -464,7 +475,7 @@ mod tests { "../../../fixtures/appintents/DataApp.swiftconstvalues" )) .unwrap(); - let actual = strings_data(&types, &extract(&types).unwrap()).unwrap(); + let actual = strings_data(&types, &extract(&types, "27B52").unwrap()).unwrap(); let expected: Value = serde_json::from_str(include_str!( "../../../fixtures/appintents/Shortcuts.stringsdata" )) @@ -514,7 +525,7 @@ mod tests { ] { let types: Vec = serde_json::from_slice(&std::fs::read(dir.join(input)).unwrap()).unwrap(); - let mut actual = extract(&types).unwrap(); + let mut actual = extract(&types, "27B52").unwrap(); let mut expected: Value = serde_json::from_slice(&std::fs::read(dir.join(expected)).unwrap()).unwrap(); normalize(&mut actual); @@ -523,6 +534,22 @@ mod tests { } } #[test] + fn xcode_26_registration_uses_the_older_enum_and_entity_schema() { + let types: Vec = serde_json::from_str(include_str!( + "../../../fixtures/appintents/Types.swiftconstvalues" + )) + .unwrap(); + let registration = extract(&types, "17F113").unwrap(); + let entity = ®istration["entities"]["SampleEntity"]; + assert!(entity.get("entitySyncMetadata").is_none()); + assert!(entity.get("typeSpecificMetadata").is_none()); + assert!( + registration["enums"][0] + .get("systemProtocolMetadata") + .is_none() + ); + } + #[test] fn probe_actions_match_xcode() { let dir = Path::new(env!("CARGO_MANIFEST_DIR")).join("fixtures/appintents"); for probe in ["InputOptionsProbe", "OutputProbe"] { @@ -531,7 +558,7 @@ mod tests { }; let types: Vec = serde_json::from_value(read(format!("{probe}.swiftconstvalues"))).unwrap(); - let mut actual = extract(&types).unwrap()["actions"].take(); + let mut actual = extract(&types, "27B52").unwrap()["actions"].take(); let mut expected = read(format!("{probe}.actions.json")); normalize(&mut actual); normalize(&mut expected); @@ -567,7 +594,7 @@ mod tests { ), ] { let intent = types.iter().find(|t| identifier(t) == name).unwrap(); - let error = extract(std::slice::from_ref(intent)).unwrap_err(); + let error = extract(std::slice::from_ref(intent), "27B52").unwrap_err(); assert!(error.contains(diagnostic), "{name}: {error}"); } } @@ -589,7 +616,7 @@ mod tests { .unwrap(); result["opaqueTypeProtocolRequirements"] = json!(["AppIntents.FutureResult"]); assert_eq!( - extract(&types).unwrap_err(), + extract(&types, "27B52").unwrap_err(), "unsupported App Intents result protocol 'AppIntents.FutureResult' in intent 'InteractiveResultProbe'" ); } @@ -620,30 +647,31 @@ mod tests { let mut types = base.clone(); options(&mut types)["value"]["arguments"][0]["value"]["name"] = json!("futureKeyboard"); assert!( - extract(&types) + extract(&types, "27B52") .unwrap_err() .contains("keyboardType 'futureKeyboard'") ); let mut types = base.clone(); *options(&mut types) = json!({"label":"inputOptions","valueKind":"Runtime"}); assert!( - extract(&types) + extract(&types, "27B52") .unwrap_err() .contains("constant String.IntentInputOptions") ); let mut types = base; options(&mut types)["value"]["arguments"][2]["valueKind"] = json!("Runtime"); - let metadata = extract(&types).unwrap()["actions"]["InputOptionsProbeIntent"]["parameters"] - .as_array() - .unwrap() - .iter() - .find(|p| p["name"] == "allOn") - .unwrap()["typeSpecificMetadata"] - .clone(); + let metadata = + extract(&types, "27B52").unwrap()["actions"]["InputOptionsProbeIntent"]["parameters"] + .as_array() + .unwrap() + .iter() + .find(|p| p["name"] == "allOn") + .unwrap()["typeSpecificMetadata"] + .clone(); assert!(!metadata.to_string().contains("StringMultiline")); options(&mut types)["value"]["arguments"][2]["label"] = json!("futureOption"); assert!( - extract(&types) + extract(&types, "27B52") .unwrap_err() .contains("unsupported inputOptions argument 'futureOption'") ); diff --git a/sweetpad-cli/src/cli/appintents/metadata/parameters.rs b/sweetpad-cli/src/cli/appintents/metadata/parameters.rs index 3a09e9a4..692dc676 100644 --- a/sweetpad-cli/src/cli/appintents/metadata/parameters.rs +++ b/sweetpad-cli/src/cli/appintents/metadata/parameters.rs @@ -1,4 +1,7 @@ -use super::{Value, argument, array, conforms, identifier, json, literal, localized, text}; +use super::{ + RegistrationFormat, Value, argument, array, conforms, identifier, json, literal, localized, + text, +}; pub(super) fn optional(name: &str) -> (&str, bool) { name.strip_prefix("Swift.Optional<") @@ -52,7 +55,11 @@ pub(super) fn value_type(name: &str, types: &[Value]) -> Result { Err(format!("unsupported App Intents value type '{name}'")) } -pub(super) fn parameter(value: &Value, types: &[Value]) -> Result { +pub(super) fn parameter( + value: &Value, + types: &[Value], + format: RegistrationFormat, +) -> Result { let wrapper = array(&value["propertyWrappers"]) .iter() .find(|w| text(&w["type"]).ends_with(".IntentParameter")) @@ -75,11 +82,7 @@ pub(super) fn parameter(value: &Value, types: &[Value]) -> Result text(&argument["label"]) )); } - let title = arguments - .iter() - .find(|a| a["label"] == "title") - .or_else(|| argument(value, "title")) - .ok_or("parameter has no constant title")?; + let title = parameter_title(value, arguments, format)?; let (name, is_optional) = optional(text(&value["type"])); let kind = value_type(name, types)?; let connection = arguments @@ -104,7 +107,7 @@ pub(super) fn parameter(value: &Value, types: &[Value]) -> Result "capabilities":u8::from(default.is_some()),"dynamicOptionsSupport":u8::from(kind.get("entity").is_some()), "inputConnectionBehavior":connection,"isInput":connection == 2,"isOptional":is_optional, "name":value["label"],"resolvableInputTypes":resolvers(&kind), - "title":localized(&literal(title)?),"typeSpecificMetadata":[],"valueType":kind, + "title":localized(&title),"typeSpecificMetadata":[],"valueType":kind, }); if let Some(default) = default { parameter["typeSpecificMetadata"] = json!([ @@ -167,6 +170,23 @@ const KEYBOARD_TYPES: [&str; 5] = [ ]; const CAPITALIZATION_TYPES: [&str; 4] = ["none", "words", "sentences", "allCharacters"]; +fn parameter_title( + value: &Value, + arguments: &[Value], + format: RegistrationFormat, +) -> Result { + if format == RegistrationFormat::Xcode26 && value["label"] == "parameterSummary" { + // Xcode 26 infers the title when the instance parameter has this AppIntent requirement's name. + return Ok("Parameter Summary".to_owned()); + } + let title = arguments + .iter() + .find(|a| a["label"] == "title") + .or_else(|| argument(value, "title")) + .ok_or("parameter has no constant title")?; + literal(title) +} + /// Xcode writes one key per `String.IntentInputOptions` argument the source passes. /// Arguments left at their defaults are captured as `Runtime` and omitted. fn input_options(arguments: &[Value], parameter: &mut Value) -> Result<(), String> { diff --git a/sweetpad-cli/src/cli/appintents/metadata/representations.rs b/sweetpad-cli/src/cli/appintents/metadata/representations.rs index 4cfc5169..6cdfd067 100644 --- a/sweetpad-cli/src/cli/appintents/metadata/representations.rs +++ b/sweetpad-cli/src/cli/appintents/metadata/representations.rs @@ -1,6 +1,6 @@ use super::{ - Value, argument, array, availability, conforms, identifier, json, literal, localized, - parameters, properties, property, text, visibility, + RegistrationFormat, Value, argument, array, availability, conforms, identifier, json, literal, + localized, parameters, properties, property, text, visibility, }; fn alias<'a>(value: &'a Value, name: &str) -> Option<&'a str> { @@ -32,7 +32,7 @@ fn display(value: &Value) -> Result { Ok(result) } -pub(super) fn enumeration(value: &Value) -> Result { +pub(super) fn enumeration(value: &Value, format: RegistrationFormat) -> Result { let cases = property(value, "caseDisplayRepresentations") .ok_or("AppEnum has no constant caseDisplayRepresentations")?; if cases["valueKind"] != "Dictionary" { @@ -57,28 +57,36 @@ pub(super) fn enumeration(value: &Value) -> Result { property(value, "typeDisplayRepresentation") .ok_or("AppEnum has no typeDisplayRepresentation")?, )?; - Ok(json!({ + let mut result = json!({ "assistantDefinedSchemas":[],"availabilityAnnotations":availability(),"cases":entries, "displayTypeName":localized(&title),"effectiveBundleIdentifiers":[], "fullyQualifiedTypeName":value["typeName"],"identifier":identifier(value),"isSystem":false, "mangledTypeName":value["mangledTypeName"],"mangledTypeNameByBundleIdentifier":{}, - "systemProtocolMetadata":[],"visibilityMetadata":visibility(), - })) + "visibilityMetadata":visibility(), + }); + if format == RegistrationFormat::Current { + result["systemProtocolMetadata"] = json!([]); + } + Ok(result) } -pub(super) fn entity(value: &Value) -> Result { +pub(super) fn entity(value: &Value, format: RegistrationFormat) -> Result { let title = literal( property(value, "typeDisplayRepresentation") .ok_or("AppEntity has no typeDisplayRepresentation")?, )?; let mut result = json!({ "assistantDefinedSchemas":[],"availabilityAnnotations":availability(),"displayTypeName":localized(&title), - "effectiveBundleIdentifiers":[],"entitySyncMetadata":{"entitySyncType":0}, + "effectiveBundleIdentifiers":[], "fullyQualifiedTypeName":value["typeName"],"mangledTypeName":value["mangledTypeName"], "mangledTypeNameByBundleIdentifier":{},"properties":[],"requiredCapabilities":[], "systemProtocolMetadata":[],"systemProtocolMetadataV2":[],"transient":false, - "typeName":identifier(value),"typeSpecificMetadata":[],"visibilityMetadata":visibility(), + "typeName":identifier(value),"visibilityMetadata":visibility(), }); + if format == RegistrationFormat::Current { + result["entitySyncMetadata"] = json!({"entitySyncType":0}); + result["typeSpecificMetadata"] = json!([]); + } if let Some(query) = alias(value, "DefaultQuery") { result["defaultQueryIdentifier"] = json!(query); } diff --git a/sweetpad-cli/src/cli/appintents/mod.rs b/sweetpad-cli/src/cli/appintents/mod.rs index fdd233f7..cac47d30 100644 --- a/sweetpad-cli/src/cli/appintents/mod.rs +++ b/sweetpad-cli/src/cli/appintents/mod.rs @@ -163,7 +163,7 @@ fn run(args: &Args) -> Result<(), String> { } } let types: Vec = types.into_values().collect(); - let metadata = metadata::extract(&types)?; + let metadata = metadata::extract(&types, &args.version)?; for path in &args.strings { if let Some(value) = metadata::strings_data(&types, &metadata) { write_json(path, &value)?; From 8443b8b9e6b53024a2386e56efd694d9a6886f31 Mon Sep 17 00:00:00 2001 From: Yevhenii Hyzyla Date: Sat, 28 Nov 2026 00:44:53 +0100 Subject: [PATCH 7/7] Match inferred Xcode 26 parameters and pin native registration across SDKs --- sweetpad-cli/fixtures/appintents/README.md | 31 +-- .../appintents/sdk-26.5-registration.json | 9 + .../appintents/sdk-26.5-signatures.txt | 186 ++++++++++++++++++ .../appintents/sdk-27.2-registration.json | 9 + sweetpad-cli/fixtures/appintents/sdk-27.2.md | 61 +++--- .../fixtures/appintents/sdk_coverage.py | 23 ++- .../fixtures/appintents/test_sdk_coverage.py | 27 ++- .../appintents/verify_registration.py | 65 +++++- sweetpad-cli/src/cli/appintents/metadata.rs | 17 ++ .../src/cli/appintents/metadata/parameters.rs | 55 +++--- 10 files changed, 398 insertions(+), 85 deletions(-) create mode 100644 sweetpad-cli/fixtures/appintents/sdk-26.5-registration.json create mode 100644 sweetpad-cli/fixtures/appintents/sdk-26.5-signatures.txt create mode 100644 sweetpad-cli/fixtures/appintents/sdk-27.2-registration.json diff --git a/sweetpad-cli/fixtures/appintents/README.md b/sweetpad-cli/fixtures/appintents/README.md index c638f239..ebdc0ed8 100644 --- a/sweetpad-cli/fixtures/appintents/README.md +++ b/sweetpad-cli/fixtures/appintents/README.md @@ -9,7 +9,7 @@ cargo build -p sweetpad-cli --bin sweetpad DEVELOPER_DIR=/Applications/Xcode.app/Contents/Developer python3 -I sweetpad-cli/fixtures/appintents/regen.py ``` -The current captures use Xcode 27.2 (`27B52`). +The checked-in Swift compiler captures use Xcode 27.2 (`27B52`). The generator normalizes source paths to file names. The tests normalize the generator identity, the order of resolver sets, and the order of `typeSpecificMetadata` pairs, which Xcode writes in hash order. @@ -25,14 +25,18 @@ trailing list of parameters. The `*.actions.json` files hold the probe actions. Assistant schemas, explicit supported modes, other custom parameter options, conditional summaries, summaries with a localization table, and dependency metadata currently stop extraction with an error. -Localized shortcut phrase models and availability-specific metadata need more coverage. -These captures establish format compatibility, not device registration or Siri behavior. +Localized shortcut phrase models and availability beyond the platform annotations +in the snippet probe need more coverage. Device registration and Siri interaction +require separate runtime tests. ## SDK upgrade checks The iOS 27.2 checklist links each parameter option, result protocol, and summary form to its evidence. It also lists the two result compositions involving -`OpensIntent`. The inventory records the public overloads within each family. +`OpensIntent`. The iOS 26.5 and 27.2 inventories record the public overloads +within each family. Xcode 26.6 uses an earlier enum and entity schema and infers +an instance parameter named `parameterSummary` from its name and type. Xcode +27.2 emits the explicit wrapper options for that property. [SDK coverage and remaining gaps](sdk-27.2.md) On a Mac with XcodeGen, run the following from the repository root. Use an empty @@ -53,10 +57,15 @@ python3 -B -I sweetpad-cli/fixtures/appintents/verify_registration.py .build/int ``` The replay compares every field in `extract.actionsdata` and `version.json` -for each supported probe. Generator identity and the order of resolver sets -and metadata pairs may differ. It also checks native controls and the named -diagnostics for unsupported declarations. The baseline and newer SDKs get an -additional comparison with the checked-in Xcode registrations. For a new SDK, -version the checklist and its signature snapshot, review changed overloads, add -probe evidence, then run `sdk_coverage.py --update-signatures` and regenerate -the affected fixtures. The workflow performs read-only checks on PRs and weekly. +for each supported probe. It checks the two generator identities separately +and preserves the pairing of keys and values in unordered metadata. It also +checks native controls and the named diagnostics for unsupported declarations. +The SDK-specific fingerprints cover both documents for all seven native probes, +including the negative cases. The replay checks the Xcode build identifier +literally before computing fingerprints that can be compared across builds. + +On an SDK upgrade, inspect new declarations, overloads and registration changes. +Add evidence to the versioned checklist, regenerate the affected fixtures, then +run `sdk_coverage.py --update-signatures` and replay the fresh captures with +`verify_registration.py CAPTURES --update-registrations` to record the reviewed +baselines. The workflow performs read-only checks on PRs and weekly. diff --git a/sweetpad-cli/fixtures/appintents/sdk-26.5-registration.json b/sweetpad-cli/fixtures/appintents/sdk-26.5-registration.json new file mode 100644 index 00000000..25ff036c --- /dev/null +++ b/sweetpad-cli/fixtures/appintents/sdk-26.5-registration.json @@ -0,0 +1,9 @@ +{ + "DataApp": "7f318f64a21c5d08627b77769f5e9d37175f57134c74bda874c3ad36ec8b31e3", + "Files": "f8d5a59f90f9c0ce959c208496e7f8281a1680506e4648ac03e88b038271a1fd", + "InputOptionsProbe": "39a8f61d84c2c4bec791edcfca08c1c15f18a59ccf46451df78856ec6af2bca2", + "OutputProbe": "0105fce6e104ed8d3cd4d3589da6e78ef8aa058c411af58799d220904129275f", + "ResultProtocols": "9ac97a3d41e44fa5aa42f43254b379a32dab2a4c35c35837446d44985728d1f6", + "Types": "47242b0cb83ce0979585bca443ee9f0217227fe26fdd938808965e5ba0d49217", + "Unsupported": "124982ec537a9f3a653826f9caa6755cce5482224b6b49a11fcc7732602e5bd5" +} diff --git a/sweetpad-cli/fixtures/appintents/sdk-26.5-signatures.txt b/sweetpad-cli/fixtures/appintents/sdk-26.5-signatures.txt new file mode 100644 index 00000000..d129d8b1 --- /dev/null +++ b/sweetpad-cli/fixtures/appintents/sdk-26.5-signatures.txt @@ -0,0 +1,186 @@ +AppIntent.Case 1 b4f76f250e2cf635f7cc +AppIntent.DefaultCase 1 1f6a1d01b9013c97bd20 +AppIntent.Summary 1 978ad4d68943ed67440a +AppIntent.Switch 1 6e1cf32d83d70cf34338 +AppIntent.When 1 9de98ab70f7e758526c6 +InputConnectionBehavior.connectToPreviousIntentResult 1 9d1218efe5d49b7f9764 +InputConnectionBehavior.default 1 179d9f495c48e4265c15 +InputConnectionBehavior.never 1 70c011f5073d927382f5 +IntentParameter.init(description:controlStyle:inclusiveRange:requestValueDialog:inputConnectionBehavior:optionsProvider:) 2 863851b712681629a852 +IntentParameter.init(description:controlStyle:inclusiveRange:requestValueDialog:inputConnectionBehavior:optionsProvider:resolvers:) 2 7d59e317f203e661c32f +IntentParameter.init(description:default:controlStyle:inclusiveRange:requestValueDialog:inputConnectionBehavior:) 2 68edafca1e433737fbd9 +IntentParameter.init(description:default:controlStyle:inclusiveRange:requestValueDialog:inputConnectionBehavior:resolvers:) 2 92e0641a3d4847c8db21 +IntentParameter.init(description:default:currencyCodes:inclusiveRange:requestValueDialog:inputConnectionBehavior:) 1 8f8f9de218a81b2aefab +IntentParameter.init(description:default:currencyCodes:inclusiveRange:requestValueDialog:inputConnectionBehavior:optionsProvider:) 1 8a90ed94794afbb2f55f +IntentParameter.init(description:default:currencyCodes:inclusiveRange:requestValueDialog:inputConnectionBehavior:optionsProvider:resolvers:) 1 f9a3a2b883005d657c7c +IntentParameter.init(description:default:currencyCodes:inclusiveRange:requestValueDialog:inputConnectionBehavior:resolvers:) 1 65cfa4a35c2c6a5839f9 +IntentParameter.init(description:default:displayName:requestValueDialog:inputConnectionBehavior:) 1 958575caa4f75ab18d82 +IntentParameter.init(description:default:displayName:requestValueDialog:inputConnectionBehavior:resolvers:) 1 bc473a6fb29294243c8e +IntentParameter.init(description:default:displayStyle:requestValueDialog:inputConnectionBehavior:) 1 5f0aecb4d70334d4a6e6 +IntentParameter.init(description:default:displayStyle:requestValueDialog:inputConnectionBehavior:optionsProvider:) 1 4ef8cf7a6c61d7f8513d +IntentParameter.init(description:default:displayStyle:requestValueDialog:inputConnectionBehavior:optionsProvider:resolvers:) 1 3ebab780e4e386012e3f +IntentParameter.init(description:default:displayStyle:requestValueDialog:inputConnectionBehavior:resolvers:) 1 6969e69eb93458f26792 +IntentParameter.init(description:default:inputOptions:requestValueDialog:inputConnectionBehavior:) 1 dd8a2ad83dc4d7239340 +IntentParameter.init(description:default:inputOptions:requestValueDialog:inputConnectionBehavior:resolvers:) 1 9b2139384fce55509ba3 +IntentParameter.init(description:default:kind:requestValueDialog:inputConnectionBehavior:) 2 cfee9b2d080069af01c9 +IntentParameter.init(description:default:kind:requestValueDialog:inputConnectionBehavior:optionsProvider:) 2 3a26fb994213d0bd875d +IntentParameter.init(description:default:kind:requestValueDialog:inputConnectionBehavior:optionsProvider:resolvers:) 2 1a030c1a40e9b26f5bef +IntentParameter.init(description:default:kind:requestValueDialog:inputConnectionBehavior:resolvers:) 2 fa8ccbbdea4a8604f596 +IntentParameter.init(description:default:mode:requestValueDialog:inputConnectionBehavior:) 1 ab4822c5f2b8686e523f +IntentParameter.init(description:default:mode:requestValueDialog:inputConnectionBehavior:optionsProvider:) 1 71f78d7759f227e42154 +IntentParameter.init(description:default:mode:requestValueDialog:inputConnectionBehavior:optionsProvider:resolvers:) 1 3a0d825388e3f18fb860 +IntentParameter.init(description:default:mode:requestValueDialog:inputConnectionBehavior:resolvers:) 1 c4d72dca4334b97b2c38 +IntentParameter.init(description:default:mode:size:inputConnectionBehavior:) 2 9606b760740212eb86b0 +IntentParameter.init(description:default:requestValueDialog:inputConnectionBehavior:) 6 b017c1e5fabf1c755939 +IntentParameter.init(description:default:requestValueDialog:inputConnectionBehavior:optionsProvider:) 3 99fe4b4a1224e5c7b751 +IntentParameter.init(description:default:requestValueDialog:inputConnectionBehavior:optionsProvider:resolvers:) 3 2bf57b402c44d030641f +IntentParameter.init(description:default:requestValueDialog:inputConnectionBehavior:resolvers:) 6 5c3fc6203eddfdac4d13 +IntentParameter.init(description:default:requestValueDialog:requestDisambiguationDialog:inputConnectionBehavior:) 1 193440b54c029cd65dc5 +IntentParameter.init(description:default:requestValueDialog:requestDisambiguationDialog:inputConnectionBehavior:optionsProvider:) 1 b727d73dfc6ee2250b3b +IntentParameter.init(description:default:requestValueDialog:requestDisambiguationDialog:inputConnectionBehavior:optionsProvider:resolvers:) 1 55a1383ec37b28ceebba +IntentParameter.init(description:default:requestValueDialog:requestDisambiguationDialog:inputConnectionBehavior:query:) 1 a7536eb7796c666c2b2e +IntentParameter.init(description:default:requestValueDialog:requestDisambiguationDialog:inputConnectionBehavior:resolvers:) 1 f37b392070c8e8d88df9 +IntentParameter.init(description:default:requestValueDialog:requestDisambiguationDialog:inputConnectionBehavior:supportedValues:) 2 533512ef3a382606a79a +IntentParameter.init(description:default:requestValueDialog:requestDisambiguationDialog:inputConnectionBehavior:supportedValues:optionsProvider:) 2 d3d84e36e23bde919460 +IntentParameter.init(description:default:requestValueDialog:requestDisambiguationDialog:inputConnectionBehavior:supportedValues:resolvers:) 2 d0699cea7da42846a618 +IntentParameter.init(description:default:size:inputConnectionBehavior:) 2 feb8b6774228c5732c8c +IntentParameter.init(description:default:size:inputConnectionBehavior:query:) 2 0f3ffad24d377e82cd69 +IntentParameter.init(description:default:size:inputConnectionBehavior:resolvers:) 2 3949e343c4aa9dda5e70 +IntentParameter.init(description:default:supportedContentTypes:requestValueDialog:inputConnectionBehavior:) 1 5f1538fcf6056a9da2de +IntentParameter.init(description:default:supportedContentTypes:requestValueDialog:inputConnectionBehavior:optionsProvider:) 1 0da8da0cdb2595cdb0fc +IntentParameter.init(description:default:supportedContentTypes:requestValueDialog:inputConnectionBehavior:optionsProvider:resolvers:) 1 6afb27fcb0ace5f9921f +IntentParameter.init(description:default:supportedContentTypes:requestValueDialog:inputConnectionBehavior:resolvers:) 1 d5366670df162c736b44 +IntentParameter.init(description:default:supportedContentTypes:requestValueDialog:requestDisambiguationDialog:inputConnectionBehavior:) 1 fd262caf7492b5a0a176 +IntentParameter.init(description:default:supportedContentTypes:requestValueDialog:requestDisambiguationDialog:inputConnectionBehavior:optionsProvider:) 1 2b11b216b54bf888f406 +IntentParameter.init(description:default:supportedContentTypes:requestValueDialog:requestDisambiguationDialog:inputConnectionBehavior:optionsProvider:resolvers:) 1 7216dd15adb70cbab958 +IntentParameter.init(description:default:supportedContentTypes:requestValueDialog:requestDisambiguationDialog:inputConnectionBehavior:query:) 1 61cda66e728c1122c62d +IntentParameter.init(description:default:supportedContentTypes:requestValueDialog:requestDisambiguationDialog:inputConnectionBehavior:resolvers:) 1 b0f1ebdb0575e2deb47a +IntentParameter.init(description:default:supportedContentTypes:size:inputConnectionBehavior:) 2 84b0a5fb10e6f1a8bd95 +IntentParameter.init(description:default:supportedContentTypes:size:inputConnectionBehavior:query:) 2 0ca9198e0343a89c7673 +IntentParameter.init(description:default:supportedContentTypes:size:inputConnectionBehavior:resolvers:) 2 0b278d35d3244f8d0286 +IntentParameter.init(description:defaultValue:defaultUnit:defaultUnitAdjustForLocale:supportsNegativeNumbers:requestValueDialog:inputConnectionBehavior:) 22 2603f3a5f06203ef82c1 +IntentParameter.init(description:defaultValue:defaultUnit:defaultUnitAdjustForLocale:supportsNegativeNumbers:requestValueDialog:inputConnectionBehavior:resolvers:) 22 4c5d935a6e3321bf7118 +IntentParameter.init(description:defaultValue:unit:unitAdjustForLocale:supportsNegativeNumbers:requestValueDialog:inputConnectionBehavior:) 22 f2e3dba87621847efac5 +IntentParameter.init(description:defaultValue:unit:unitAdjustForLocale:supportsNegativeNumbers:requestValueDialog:inputConnectionBehavior:resolvers:) 22 b5cf573e29e0c3c70b84 +IntentParameter.init(description:inputOptions:requestValueDialog:inputConnectionBehavior:optionsProvider:) 1 669834084d7469ea096c +IntentParameter.init(description:inputOptions:requestValueDialog:inputConnectionBehavior:optionsProvider:resolvers:) 1 3cc25c8337acd0930219 +IntentParameter.init(description:requestValueDialog:inputConnectionBehavior:) 1 d8d67effcfca90f9f210 +IntentParameter.init(description:requestValueDialog:inputConnectionBehavior:optionsProvider:) 24 0e3f9dcbc14fc08d6144 +IntentParameter.init(description:requestValueDialog:inputConnectionBehavior:optionsProvider:resolvers:) 2 aa92566c15c06a6ea7fa +IntentParameter.init(description:requestValueDialog:inputConnectionBehavior:resolvers:optionsProvider:) 22 3f1538d8c7fca41392c0 +IntentParameter.init(title:description:controlStyle:inclusiveRange:requestValueDialog:inputConnectionBehavior:optionsProvider:) 2 3cb1617dac91badf5b3d +IntentParameter.init(title:description:controlStyle:inclusiveRange:requestValueDialog:inputConnectionBehavior:optionsProvider:resolvers:) 2 ac1830dfa2cf700ff97f +IntentParameter.init(title:description:currencyCodes:inclusiveRange:requestValueDialog:inputConnectionBehavior:) 1 03c92b82d219f3c225c3 +IntentParameter.init(title:description:currencyCodes:inclusiveRange:requestValueDialog:inputConnectionBehavior:optionsProvider:) 1 53b7a2ed6833003fd1be +IntentParameter.init(title:description:currencyCodes:inclusiveRange:requestValueDialog:inputConnectionBehavior:optionsProvider:resolvers:) 1 83491c58b6112f63ac87 +IntentParameter.init(title:description:currencyCodes:inclusiveRange:requestValueDialog:inputConnectionBehavior:resolvers:) 1 ed70891fb846d63081b0 +IntentParameter.init(title:description:default:controlStyle:inclusiveRange:requestValueDialog:inputConnectionBehavior:) 2 ab2ae59bc60b7fcc884d +IntentParameter.init(title:description:default:controlStyle:inclusiveRange:requestValueDialog:inputConnectionBehavior:resolvers:) 2 47e525d473b3698179df +IntentParameter.init(title:description:default:currencyCodes:inclusiveRange:requestValueDialog:inputConnectionBehavior:) 1 5c76e176db59a75d1a69 +IntentParameter.init(title:description:default:currencyCodes:inclusiveRange:requestValueDialog:inputConnectionBehavior:optionsProvider:) 1 935be12126d17c3a8a1b +IntentParameter.init(title:description:default:currencyCodes:inclusiveRange:requestValueDialog:inputConnectionBehavior:optionsProvider:resolvers:) 1 17a752f903c602e80535 +IntentParameter.init(title:description:default:currencyCodes:inclusiveRange:requestValueDialog:inputConnectionBehavior:resolvers:) 1 cc327ef1686bbecc7660 +IntentParameter.init(title:description:default:displayName:requestValueDialog:inputConnectionBehavior:) 1 dd5325f281e5a9603095 +IntentParameter.init(title:description:default:displayName:requestValueDialog:inputConnectionBehavior:resolvers:) 1 18a3e2dc58ef74ba321c +IntentParameter.init(title:description:default:displayStyle:requestValueDialog:inputConnectionBehavior:) 1 af528ab32bcd109814ec +IntentParameter.init(title:description:default:displayStyle:requestValueDialog:inputConnectionBehavior:optionsProvider:) 1 0b68381b49390e50f547 +IntentParameter.init(title:description:default:displayStyle:requestValueDialog:inputConnectionBehavior:optionsProvider:resolvers:) 1 2b9ef5d5a1913214dea4 +IntentParameter.init(title:description:default:displayStyle:requestValueDialog:inputConnectionBehavior:resolvers:) 1 692a18d7f99d830550db +IntentParameter.init(title:description:default:inputOptions:requestValueDialog:inputConnectionBehavior:) 1 f9f8502e012efc129e1d +IntentParameter.init(title:description:default:inputOptions:requestValueDialog:inputConnectionBehavior:resolvers:) 1 f00c19aad8e5f8241761 +IntentParameter.init(title:description:default:kind:requestValueDialog:inputConnectionBehavior:) 2 82a58905986c143893d3 +IntentParameter.init(title:description:default:kind:requestValueDialog:inputConnectionBehavior:optionsProvider:) 2 249b37dab6ca997d63a7 +IntentParameter.init(title:description:default:kind:requestValueDialog:inputConnectionBehavior:optionsProvider:resolvers:) 2 326092382f2132837f44 +IntentParameter.init(title:description:default:kind:requestValueDialog:inputConnectionBehavior:resolvers:) 2 6856d19340cbf67968c9 +IntentParameter.init(title:description:default:mode:requestValueDialog:inputConnectionBehavior:) 1 729021a8dc09d8531dba +IntentParameter.init(title:description:default:mode:requestValueDialog:inputConnectionBehavior:optionsProvider:) 1 0118baaa9f54a28fa0ab +IntentParameter.init(title:description:default:mode:requestValueDialog:inputConnectionBehavior:optionsProvider:resolvers:) 1 1c058917389a77628d4e +IntentParameter.init(title:description:default:mode:requestValueDialog:inputConnectionBehavior:resolvers:) 1 36e35de99c438160176c +IntentParameter.init(title:description:default:mode:size:inputConnectionBehavior:) 2 80c51af4fc5c996c77ba +IntentParameter.init(title:description:default:requestValueDialog:inputConnectionBehavior:) 6 4d80174c77ae97672ccb +IntentParameter.init(title:description:default:requestValueDialog:inputConnectionBehavior:optionsProvider:) 3 8ae03a83911cd83ae842 +IntentParameter.init(title:description:default:requestValueDialog:inputConnectionBehavior:optionsProvider:resolvers:) 3 2c6da57d42232541b5f4 +IntentParameter.init(title:description:default:requestValueDialog:inputConnectionBehavior:resolvers:) 6 eccf3402a7ccf6743966 +IntentParameter.init(title:description:default:requestValueDialog:requestDisambiguationDialog:inputConnectionBehavior:) 2 cc838ca4d7166bf8f903 +IntentParameter.init(title:description:default:requestValueDialog:requestDisambiguationDialog:inputConnectionBehavior:optionsProvider:) 1 a3711784c55be30a000e +IntentParameter.init(title:description:default:requestValueDialog:requestDisambiguationDialog:inputConnectionBehavior:optionsProvider:resolvers:) 1 054130980f1ad9c4395a +IntentParameter.init(title:description:default:requestValueDialog:requestDisambiguationDialog:inputConnectionBehavior:query:) 2 100fcbeb55e8cf0a5d4d +IntentParameter.init(title:description:default:requestValueDialog:requestDisambiguationDialog:inputConnectionBehavior:resolvers:) 2 bc1f037a2a0bc9d93c42 +IntentParameter.init(title:description:default:requestValueDialog:requestDisambiguationDialog:inputConnectionBehavior:supportedValues:) 3 b1d07d2300174667d28e +IntentParameter.init(title:description:default:requestValueDialog:requestDisambiguationDialog:inputConnectionBehavior:supportedValues:optionsProvider:) 3 43313df38df08b9bffda +IntentParameter.init(title:description:default:requestValueDialog:requestDisambiguationDialog:inputConnectionBehavior:supportedValues:resolvers:) 3 665a9fd92238e4d9646a +IntentParameter.init(title:description:default:size:inputConnectionBehavior:) 4 f56df51cd5b1d871ea76 +IntentParameter.init(title:description:default:size:inputConnectionBehavior:query:) 4 6977ed8bbf53e7771917 +IntentParameter.init(title:description:default:size:inputConnectionBehavior:resolvers:) 4 480d85e66d8e8d2d2d1e +IntentParameter.init(title:description:default:supportedContentTypes:requestValueDialog:inputConnectionBehavior:) 1 bedad8229286c3208977 +IntentParameter.init(title:description:default:supportedContentTypes:requestValueDialog:inputConnectionBehavior:optionsProvider:) 1 316be046a6841a2905bd +IntentParameter.init(title:description:default:supportedContentTypes:requestValueDialog:inputConnectionBehavior:optionsProvider:resolvers:) 1 47f7b033d3ede84aea7a +IntentParameter.init(title:description:default:supportedContentTypes:requestValueDialog:inputConnectionBehavior:resolvers:) 1 2624e75638edf08aad73 +IntentParameter.init(title:description:default:supportedContentTypes:requestValueDialog:requestDisambiguationDialog:inputConnectionBehavior:) 1 12cd57d858463c106896 +IntentParameter.init(title:description:default:supportedContentTypes:requestValueDialog:requestDisambiguationDialog:inputConnectionBehavior:optionsProvider:) 1 6cb749707a0a98081bf9 +IntentParameter.init(title:description:default:supportedContentTypes:requestValueDialog:requestDisambiguationDialog:inputConnectionBehavior:optionsProvider:resolvers:) 1 21f9512620a086410955 +IntentParameter.init(title:description:default:supportedContentTypes:requestValueDialog:requestDisambiguationDialog:inputConnectionBehavior:query:) 1 daffc919925ef20873b4 +IntentParameter.init(title:description:default:supportedContentTypes:requestValueDialog:requestDisambiguationDialog:inputConnectionBehavior:resolvers:) 1 f0dceea1af63c9f87d29 +IntentParameter.init(title:description:default:supportedContentTypes:size:inputConnectionBehavior:) 2 78961f9e6c5ac74cf335 +IntentParameter.init(title:description:default:supportedContentTypes:size:inputConnectionBehavior:query:) 2 3cc5541e0dd27f9389e4 +IntentParameter.init(title:description:default:supportedContentTypes:size:inputConnectionBehavior:resolvers:) 2 04914705161d3f31adfd +IntentParameter.init(title:description:default:supportedTypeIdentifiers:requestValueDialog:inputConnectionBehavior:) 1 65bd863cf25e1224c2d0 +IntentParameter.init(title:description:default:supportedTypeIdentifiers:requestValueDialog:inputConnectionBehavior:resolvers:) 1 74ebee58ad7aed762aa9 +IntentParameter.init(title:description:defaultValue:defaultUnit:defaultUnitAdjustForLocale:supportsNegativeNumbers:requestValueDialog:inputConnectionBehavior:) 22 47f2e8958734dc98277c +IntentParameter.init(title:description:defaultValue:defaultUnit:defaultUnitAdjustForLocale:supportsNegativeNumbers:requestValueDialog:inputConnectionBehavior:resolvers:) 22 eb40f170ac838f0f957f +IntentParameter.init(title:description:defaultValue:unit:unitAdjustForLocale:supportsNegativeNumbers:requestValueDialog:inputConnectionBehavior:) 22 135990affce753cd6d03 +IntentParameter.init(title:description:defaultValue:unit:unitAdjustForLocale:supportsNegativeNumbers:requestValueDialog:inputConnectionBehavior:resolvers:) 22 27097da7194aec17a3a4 +IntentParameter.init(title:description:displayStyle:requestValueDialog:inputConnectionBehavior:) 1 fe8c5e73d0422708b020 +IntentParameter.init(title:description:displayStyle:requestValueDialog:inputConnectionBehavior:optionsProvider:) 1 cea410c500ef446e830c +IntentParameter.init(title:description:displayStyle:requestValueDialog:inputConnectionBehavior:optionsProvider:resolvers:) 1 120742739551cdb6e080 +IntentParameter.init(title:description:displayStyle:requestValueDialog:inputConnectionBehavior:resolvers:) 1 c974c6b79238373cd2c5 +IntentParameter.init(title:description:inputOptions:requestValueDialog:inputConnectionBehavior:optionsProvider:) 1 0e3e394aac8944aea562 +IntentParameter.init(title:description:inputOptions:requestValueDialog:inputConnectionBehavior:optionsProvider:resolvers:) 1 2f0df3650641a22403b1 +IntentParameter.init(title:description:kind:requestValueDialog:inputConnectionBehavior:) 2 fd4b38381cf91776743d +IntentParameter.init(title:description:kind:requestValueDialog:inputConnectionBehavior:optionsProvider:) 2 4342e800f00bd25e6469 +IntentParameter.init(title:description:kind:requestValueDialog:inputConnectionBehavior:optionsProvider:resolvers:) 2 34a886e703faa36adb7c +IntentParameter.init(title:description:kind:requestValueDialog:inputConnectionBehavior:resolvers:) 2 1db3b441cb09c09d272b +IntentParameter.init(title:description:mode:requestValueDialog:inputConnectionBehavior:) 1 3e4b5c86d9d39b20338d +IntentParameter.init(title:description:mode:requestValueDialog:inputConnectionBehavior:optionsProvider:) 1 5a558347af09669790c7 +IntentParameter.init(title:description:mode:requestValueDialog:inputConnectionBehavior:optionsProvider:resolvers:) 1 f5221e98dc79673261e6 +IntentParameter.init(title:description:mode:requestValueDialog:inputConnectionBehavior:resolvers:) 1 a2b8763e25d51d54c1d6 +IntentParameter.init(title:description:mode:size:inputConnectionBehavior:) 2 0e0f67f6b8290c016775 +IntentParameter.init(title:description:requestValueDialog:inputConnectionBehavior:) 2 86516c16e4db4108eb40 +IntentParameter.init(title:description:requestValueDialog:inputConnectionBehavior:optionsProvider:) 25 c365b477759cf6f596f4 +IntentParameter.init(title:description:requestValueDialog:inputConnectionBehavior:optionsProvider:resolvers:) 3 ee20421be0beef821212 +IntentParameter.init(title:description:requestValueDialog:inputConnectionBehavior:resolvers:) 1 dc092b715750fadd9c5b +IntentParameter.init(title:description:requestValueDialog:inputConnectionBehavior:resolvers:optionsProvider:) 22 0a0f702892dc7c8e6998 +IntentParameter.init(title:description:requestValueDialog:requestDisambiguationDialog:inputConnectionBehavior:optionsProvider:) 1 25b8c975bb771df6ce32 +IntentParameter.init(title:description:requestValueDialog:requestDisambiguationDialog:inputConnectionBehavior:optionsProvider:resolvers:) 1 b7f931407e83d4ffe14d +IntentParameter.init(title:description:supportedTypeIdentifiers:requestValueDialog:inputConnectionBehavior:optionsProvider:) 1 1aea5d96871ec344615e +IntentParameter.init(title:description:supportedTypeIdentifiers:requestValueDialog:inputConnectionBehavior:optionsProvider:resolvers:) 1 79c2d958ad9748789aad +IntentParameterSummary 1 26611ee68ce4807dee2f +IntentParameterSummary.init() 1 52fcc33203b1ec4b8a93 +IntentParameterSummary.init(_:) 1 0e52ee76abad3bf62b2e +IntentParameterSummary.init(_:table:) 1 6c0952b2d1fb7adb5d4f +IntentParameterSummary.init(_:table:_:) 1 dfafc501e85e71946d86 +IntentResult 1 754b16b376d46158316a +OpensIntent 1 21a18e81872dfc09f689 +ParameterSummaryCaseCondition.init(_:_:) 2 cc65af4ff5789da5f1bb +ParameterSummaryDefaultCaseCondition.init(_:) 1 f8948d6ce1d4a0a31669 +ParameterSummarySwitchCondition 1 e13a88633b86888a73ee +ParameterSummarySwitchCondition.init(_:_:) 2 a35c9b18075908c8dc92 +ParameterSummaryWhenCondition 1 7e8997af13835538cb75 +ParameterSummaryWhenCondition.init(_:_:_:_:otherwise:) 5 8006158238753aab4680 +ParameterSummaryWhenCondition.init(_:_:_:otherwise:) 1 cbfcc38db173f95a4a68 +ParameterSummaryWhenCondition.init(_:identifier:_:_:otherwise:) 8 36e6bc0f4864d65976fc +ParameterSummaryWhenCondition.init(widgetFamily:_:_:otherwise:) 2 5d2fc6d2f31f9a9799af +ProvidesDialog 1 c112caab121e9982aff1 +ReturnsValue 1 fb33a467bf848b431710 +ShowsSnippetIntent 1 68d5cab1f7e455e98191 +ShowsSnippetView 1 e0fd292e808556b64592 +String.IntentInputOptions.CapitalizationType.allCharacters 1 29c73a46d23e4ce7c29b +String.IntentInputOptions.CapitalizationType.none 1 d0bea49bcc70c9f1e1fa +String.IntentInputOptions.CapitalizationType.sentences 1 f037770ae521084e2f44 +String.IntentInputOptions.CapitalizationType.words 1 727de8915b1625117eb4 +String.IntentInputOptions.KeyboardType.URL 1 664a8a3929ab7199cb5d +String.IntentInputOptions.KeyboardType.asciiCapable 1 f7e03210e48fc45c4066 +String.IntentInputOptions.KeyboardType.default 1 3cc116426e36998403cc +String.IntentInputOptions.KeyboardType.numberPad 1 bce8aceec1a52035f92a +String.IntentInputOptions.KeyboardType.numbersAndPunctuation 1 37b54f17cf0f684e220d +String.IntentInputOptions.init(keyboardType:capitalizationType:multiline:autocorrect:smartQuotes:smartDashes:) 1 78f049d3621739c3c532 diff --git a/sweetpad-cli/fixtures/appintents/sdk-27.2-registration.json b/sweetpad-cli/fixtures/appintents/sdk-27.2-registration.json new file mode 100644 index 00000000..a5776d72 --- /dev/null +++ b/sweetpad-cli/fixtures/appintents/sdk-27.2-registration.json @@ -0,0 +1,9 @@ +{ + "DataApp": "7f318f64a21c5d08627b77769f5e9d37175f57134c74bda874c3ad36ec8b31e3", + "Files": "f8d5a59f90f9c0ce959c208496e7f8281a1680506e4648ac03e88b038271a1fd", + "InputOptionsProbe": "dfc7dcdb9af3d653d825ab3c5e0f3cceae4240557e3f3ca2bdeab36fc865daaa", + "OutputProbe": "0105fce6e104ed8d3cd4d3589da6e78ef8aa058c411af58799d220904129275f", + "ResultProtocols": "9ac97a3d41e44fa5aa42f43254b379a32dab2a4c35c35837446d44985728d1f6", + "Types": "e92867a7c5431b25fc6ff7fc3793ac035a2b799b781aafe47a7f04da97923932", + "Unsupported": "124982ec537a9f3a653826f9caa6755cce5482224b6b49a11fcc7732602e5bd5" +} diff --git a/sweetpad-cli/fixtures/appintents/sdk-27.2.md b/sweetpad-cli/fixtures/appintents/sdk-27.2.md index ab8163c5..213f469f 100644 --- a/sweetpad-cli/fixtures/appintents/sdk-27.2.md +++ b/sweetpad-cli/fixtures/appintents/sdk-27.2.md @@ -1,40 +1,45 @@ # iOS App Intents SDK coverage -Captured with Xcode 27.2 (27B52) and the arm64 iOS 27.2 SDK. The inventory covers public `IntentParameter` initializer labels across value types, string input settings and connection cases, protocols refining `IntentResult`, and the App Intent summary builders. Each match applies to the Swift types and constant expressions in the linked probe. +Xcode 27.2 (27B52) and Xcode 26.6 (17F113) expose the same 63 checklist entries. The inventory covers public `IntentParameter` initializer labels across value types, string input settings and connection cases, protocols refining `IntentResult`, and the App Intent summary builders. Each match applies to the Swift types and constant expressions in the linked probe. -The signature snapshot tracks overloads that reuse the same labels. The SDK check compares the public symbol graph, including overlays. On older SDKs it checks the available surface. On the baseline and newer SDKs it also checks additions, removals and changes to overloads. [Signature snapshot](sdk-27.2-signatures.txt) · [SDK check](sdk_coverage.py) +| Xcode | iOS SDK | Public declarations including overloads | Native registration | +| --- | --- | ---: | --- | +| 26.6 (17F113) | 26.5 | [542 declarations](sdk-26.5-signatures.txt) | [Seven probe fingerprints](sdk-26.5-registration.json) | +| 27.2 (27B52) | 27.2 | [587 declarations](sdk-27.2-signatures.txt) | [Seven probe fingerprints](sdk-27.2-registration.json) | + +CI compares the installed SDK’s public symbol graph, including overlays, with the most recent reviewed snapshot at or below that SDK version. It checks additions, removals and changes to overloads, including declarations that reuse existing labels. The registration check also compares fresh Xcode output to Linux and to the native fingerprints in the table. [SDK check](sdk_coverage.py) · [Registration check](verify_registration.py) ## Parameter initializer options | Declaration | Classification | Evidence | | --- | --- | --- | -| `parameter.controlStyle` | Diagnostic | [per-option extractor diagnostic](verify_registration.py#L97) | -| `parameter.currencyCodes` | Diagnostic | [per-option extractor diagnostic](verify_registration.py#L97) | +| `parameter.controlStyle` | Diagnostic | [per-option extractor diagnostic](verify_registration.py#L98) | +| `parameter.currencyCodes` | Diagnostic | [per-option extractor diagnostic](verify_registration.py#L98) | | `parameter.default` | Match | [TypesIntent](Types.swift#L25) · [Types.actionsdata](Types.actionsdata) | -| `parameter.defaultUnit` | Diagnostic | [per-option extractor diagnostic](verify_registration.py#L97) | -| `parameter.defaultUnitAdjustForLocale` | Diagnostic | [per-option extractor diagnostic](verify_registration.py#L97) | -| `parameter.defaultValue` | Diagnostic | [per-option extractor diagnostic](verify_registration.py#L97) | +| `parameter.defaultUnit` | Diagnostic | [per-option extractor diagnostic](verify_registration.py#L98) | +| `parameter.defaultUnitAdjustForLocale` | Diagnostic | [per-option extractor diagnostic](verify_registration.py#L98) | +| `parameter.defaultValue` | Diagnostic | [per-option extractor diagnostic](verify_registration.py#L98) | | `parameter.description` | Match | [FileInputIntent](Files.swift#L5) · [Files.actionsdata](Files.actionsdata) | -| `parameter.displayName` | Diagnostic | [per-option extractor diagnostic](verify_registration.py#L97) | -| `parameter.displayStyle` | Diagnostic | [per-option extractor diagnostic](verify_registration.py#L97) | -| `parameter.inclusiveRange` | Diagnostic | [per-option extractor diagnostic](verify_registration.py#L97) · [RangeProbe](Unsupported.swift#L30) | +| `parameter.displayName` | Diagnostic | [per-option extractor diagnostic](verify_registration.py#L98) | +| `parameter.displayStyle` | Diagnostic | [per-option extractor diagnostic](verify_registration.py#L98) | +| `parameter.inclusiveRange` | Diagnostic | [per-option extractor diagnostic](verify_registration.py#L98) · [RangeProbe](Unsupported.swift#L30) | | `parameter.inputConnectionBehavior` | Match | [ConnectionProbe](ResultProtocols.swift#L69) · [Xcode registration](ResultProtocols.actionsdata#L164) | | `parameter.inputOptions` | Match | [allOff](InputOptionsProbe.swift#L9) · [Xcode parameter](InputOptionsProbe.actions.json#L29) | -| `parameter.kind` | Diagnostic | [per-option extractor diagnostic](verify_registration.py#L97) | -| `parameter.mode` | Diagnostic | [per-option extractor diagnostic](verify_registration.py#L97) | -| `parameter.optionsProvider` | Diagnostic | [per-option extractor diagnostic](verify_registration.py#L97) · [OptionsProviderProbe](Unsupported.swift#L40) | -| `parameter.query` | Diagnostic | [per-option extractor diagnostic](verify_registration.py#L97) | -| `parameter.requestDisambiguationDialog` | Diagnostic | [per-option extractor diagnostic](verify_registration.py#L97) | -| `parameter.requestValueDialog` | No effect | [PromptProbe](ResultProtocols.swift#L10) · [Xcode registration](ResultProtocols.actionsdata#L550) · [native control comparison](verify_registration.py#L60) | -| `parameter.resolvers` | Diagnostic | [per-option extractor diagnostic](verify_registration.py#L97) | -| `parameter.size` | Diagnostic | [per-option extractor diagnostic](verify_registration.py#L97) | +| `parameter.kind` | Diagnostic | [per-option extractor diagnostic](verify_registration.py#L98) | +| `parameter.mode` | Diagnostic | [per-option extractor diagnostic](verify_registration.py#L98) | +| `parameter.optionsProvider` | Diagnostic | [per-option extractor diagnostic](verify_registration.py#L98) · [OptionsProviderProbe](Unsupported.swift#L40) | +| `parameter.query` | Diagnostic | [per-option extractor diagnostic](verify_registration.py#L98) | +| `parameter.requestDisambiguationDialog` | Diagnostic | [per-option extractor diagnostic](verify_registration.py#L98) | +| `parameter.requestValueDialog` | No effect | [PromptProbe](ResultProtocols.swift#L10) · [Xcode registration](ResultProtocols.actionsdata#L550) · [native control comparison](verify_registration.py#L61) | +| `parameter.resolvers` | Diagnostic | [per-option extractor diagnostic](verify_registration.py#L98) | +| `parameter.size` | Diagnostic | [per-option extractor diagnostic](verify_registration.py#L98) | | `parameter.supportedContentTypes` | Match | [FileInputIntent](Files.swift#L5) · [Files.actionsdata](Files.actionsdata) | -| `parameter.supportedTypeIdentifiers` | Diagnostic | [per-option extractor diagnostic](verify_registration.py#L97) | -| `parameter.supportedValues` | Diagnostic | [per-option extractor diagnostic](verify_registration.py#L97) | -| `parameter.supportsNegativeNumbers` | Diagnostic | [per-option extractor diagnostic](verify_registration.py#L97) | +| `parameter.supportedTypeIdentifiers` | Diagnostic | [per-option extractor diagnostic](verify_registration.py#L98) | +| `parameter.supportedValues` | Diagnostic | [per-option extractor diagnostic](verify_registration.py#L98) | +| `parameter.supportsNegativeNumbers` | Diagnostic | [per-option extractor diagnostic](verify_registration.py#L98) | | `parameter.title` | Match | [TypesIntent](Types.swift#L25) · [Types.actionsdata](Types.actionsdata) | -| `parameter.unit` | Diagnostic | [per-option extractor diagnostic](verify_registration.py#L97) | -| `parameter.unitAdjustForLocale` | Diagnostic | [per-option extractor diagnostic](verify_registration.py#L97) | +| `parameter.unit` | Diagnostic | [per-option extractor diagnostic](verify_registration.py#L98) | +| `parameter.unitAdjustForLocale` | Diagnostic | [per-option extractor diagnostic](verify_registration.py#L98) | ## Connection behavior @@ -81,16 +86,16 @@ The signature snapshot tracks overloads that reuse the same labels. The SDK chec | Declaration | Classification | Evidence | | --- | --- | --- | -| `summary.Case` | Diagnostic | [SwitchProbe](Unsupported.swift#L12) · [extractor diagnostic](verify_registration.py#L69) | -| `summary.DefaultCase` | Diagnostic | [SwitchProbe](Unsupported.swift#L12) · [extractor diagnostic](verify_registration.py#L69) | +| `summary.Case` | Diagnostic | [SwitchProbe](Unsupported.swift#L12) · [extractor diagnostic](verify_registration.py#L70) | +| `summary.DefaultCase` | Diagnostic | [SwitchProbe](Unsupported.swift#L12) · [extractor diagnostic](verify_registration.py#L70) | | `summary.Summary` | Match | [SummaryTwoProbeIntent](OutputProbe.swift#L35) · [Xcode action](OutputProbe.actions.json#L617) | | `summary.Summary()` | Match | [NoSummaryTextProbeIntent](OutputProbe.swift#L60) · [Xcode action](OutputProbe.actions.json#L131) | | `summary.Summary(_:)` | Match | [SummaryParametersOnlyProbeIntent](OutputProbe.swift#L74) · [Xcode action](OutputProbe.actions.json#L458) | | `summary.Summary(_:table:)` | Match | [EmptySummaryTextProbeIntent](OutputProbe.swift#L68) · [Xcode action](OutputProbe.actions.json#L83) | | `summary.Summary(_:table:_:)` | Match | [SummaryTwoProbeIntent](OutputProbe.swift#L35) · [Xcode action](OutputProbe.actions.json#L617) | -| `summary.Switch` | Diagnostic | [SwitchProbe](Unsupported.swift#L12) · [extractor diagnostic](verify_registration.py#L69) | -| `summary.When` | Diagnostic | [WhenProbe](Unsupported.swift#L3) · [extractor diagnostic](verify_registration.py#L69) | -| `summary.table` | Diagnostic | [TableProbe](Unsupported.swift#L24) · [extractor diagnostic](verify_registration.py#L69) | +| `summary.Switch` | Diagnostic | [SwitchProbe](Unsupported.swift#L12) · [extractor diagnostic](verify_registration.py#L70) | +| `summary.When` | Diagnostic | [WhenProbe](Unsupported.swift#L3) · [extractor diagnostic](verify_registration.py#L70) | +| `summary.table` | Diagnostic | [TableProbe](Unsupported.swift#L24) · [extractor diagnostic](verify_registration.py#L70) | An explicit non-nil localization table is covered by `summary.table`. The two plain summary initializers accepting a table match with its default nil value. The conditional probe exercises both branches of `When` and includes `Case` and `DefaultCase` in a single `Switch`; the extractor rejects the enclosing condition. diff --git a/sweetpad-cli/fixtures/appintents/sdk_coverage.py b/sweetpad-cli/fixtures/appintents/sdk_coverage.py index 78141df0..7e72d81c 100644 --- a/sweetpad-cli/fixtures/appintents/sdk_coverage.py +++ b/sweetpad-cli/fixtures/appintents/sdk_coverage.py @@ -100,6 +100,16 @@ def version_number(version): return tuple(map(int, version.split("."))) +def reviewed_baseline(version, suffix, directory): + versions = {version_number(f.name.split("-")[1]): f for f in directory.glob(f"sdk-*-{suffix}")} + current = version_number(version) + candidates = [v for v in versions if v <= current] + primary = version_number(BASELINE) + if not candidates or (current >= primary and primary not in versions): + raise ValueError(f"No reviewed {suffix} baseline for iOS {version}") + return versions[max(candidates)] + + def check(keys, declarations, version, update=False, directory=HERE, export=None): rows = checklist() newer = version_number(version) >= version_number(BASELINE) @@ -120,14 +130,11 @@ def check(keys, declarations, version, update=False, directory=HERE, export=None if update: (directory / name).write_text("".join(lines)) else: - versions = {version_number(f.name.split("-")[1]): f for f in directory.glob("sdk-*-signatures.txt")} - candidates = [v for v in versions if v <= version_number(version)] - if candidates: - baseline = versions[max(candidates)] - previous = baseline.read_text().splitlines(keepends=True) - if previous != lines: - diff = difflib.unified_diff(previous, lines, fromfile=baseline.name, tofile=f"iOS {version} SDK") - raise ValueError("SDK overloads changed. Review the named declarations and their evidence.\n" + "".join(diff)) + baseline = reviewed_baseline(version, "signatures.txt", directory) + previous = baseline.read_text().splitlines(keepends=True) + if previous != lines: + diff = difflib.unified_diff(previous, lines, fromfile=baseline.name, tofile=f"iOS {version} SDK") + raise ValueError("SDK overloads changed. Review the named declarations and their evidence.\n" + "".join(diff)) print(f"iOS {version}: {len(keys)} classified entries, {sum(map(len, declarations.values()))} declarations") diff --git a/sweetpad-cli/fixtures/appintents/test_sdk_coverage.py b/sweetpad-cli/fixtures/appintents/test_sdk_coverage.py index c03c6525..75a8bc60 100644 --- a/sweetpad-cli/fixtures/appintents/test_sdk_coverage.py +++ b/sweetpad-cli/fixtures/appintents/test_sdk_coverage.py @@ -5,7 +5,7 @@ from unittest.mock import patch import sdk_coverage as sdk -from verify_registration import equal, normalize_registration +from verify_registration import equal, normalize_registration, registration_fingerprints def symbol(name, kind, uid=None): @@ -40,6 +40,31 @@ def test_new_overload_with_previously_classified_labels_fails(self): with self.assertRaisesRegex(ValueError, "SDK overloads changed"): sdk.check(keys, {name: {"one", "two"}}, "26.6", directory=Path(tmp)) + def test_unreviewed_sdk_requires_a_baseline(self): + with tempfile.TemporaryDirectory() as tmp: + with self.assertRaisesRegex(ValueError, "No reviewed"): + sdk.reviewed_baseline("26.5", "signatures.txt", Path(tmp)) + (Path(tmp) / "sdk-26.5-signatures.txt").touch() + with self.assertRaisesRegex(ValueError, "No reviewed"): + sdk.reviewed_baseline(sdk.BASELINE, "signatures.txt", Path(tmp)) + + def test_native_registration_change_is_detected_even_if_linux_matches(self): + native = json.loads((sdk.HERE / "ResultProtocols.actionsdata").read_text()) + expected = json.loads((sdk.HERE / "sdk-27.2-registration.json").read_text())["ResultProtocols"] + with tempfile.TemporaryDirectory() as tmp, patch.dict("verify_registration.PROBES", {"ResultProtocols": None}, clear=True): + probe = Path(tmp) / "ResultProtocols" + probe.mkdir() + version = probe / "version.json" + registration = probe / "extract.actionsdata" + version.write_text(json.dumps({"version": "3.0", "toolsVersion": "next-build"})) + registration.write_text(json.dumps(native)) + self.assertEqual(registration_fingerprints(probe.parent, "next-build")["ResultProtocols"], expected) + native["newRegistryField"] = True + registration.write_text(json.dumps(native)) + self.assertNotEqual(registration_fingerprints(probe.parent, "next-build")["ResultProtocols"], expected) + with self.assertRaisesRegex(ValueError, "toolsVersion"): + registration_fingerprints(probe.parent, "wrong-build") + def test_complete_registration_detects_flags_and_other_schema_changes(self): native = json.loads((sdk.HERE / "ResultProtocols.actionsdata").read_text()) actual = json.loads(json.dumps(native)) diff --git a/sweetpad-cli/fixtures/appintents/verify_registration.py b/sweetpad-cli/fixtures/appintents/verify_registration.py index fb07cf95..0474efb6 100644 --- a/sweetpad-cli/fixtures/appintents/verify_registration.py +++ b/sweetpad-cli/fixtures/appintents/verify_registration.py @@ -3,6 +3,7 @@ import argparse from copy import deepcopy +import hashlib import json from pathlib import Path import subprocess @@ -14,7 +15,7 @@ sys.path.insert(0, str(HERE.parents[2] / "sweetpad-lib/ci")) from bundle_comparison import differences, normalize_registration from regen import PROBES -from sdk_coverage import BASELINE, checklist +from sdk_coverage import BASELINE, checklist, reviewed_baseline, version_number def read(path): @@ -102,12 +103,33 @@ def run_case(tag, declarations, error): return len(case_errors), len(options) -def verify(captures, binary): - sdk = read(captures / "sdk.json")["version"] - compare_baseline = tuple(map(int, sdk.split("."))) >= tuple(map(int, BASELINE.split("."))) +def registration_fingerprints(captures, build): + fingerprints = {} + for source in PROBES: + capture = captures / source + version = read(capture / "version.json") + equal(f"{source}/toolsVersion", build, version.get("toolsVersion")) + # Compare the build identifier literally in the replay. Allow its value + # to advance when comparing native captures from different Xcode builds. + version["toolsVersion"] = "" + documents = { + "version.json": version, + "extract.actionsdata": normalize_registration(read(capture / "extract.actionsdata")), + } + content = json.dumps(documents, sort_keys=True, separators=(",", ":")).encode() + fingerprints[source] = hashlib.sha256(content).hexdigest() + return fingerprints + + +def verify(captures, binary, update=False): + toolchain = read(captures / "sdk.json") + sdk = toolchain["version"] + compare_baseline = version_number(sdk) >= version_number(BASELINE) + build = toolchain["xcode"].splitlines()[-1].removeprefix("Build version ") with tempfile.TemporaryDirectory(prefix="sweetpad-intents-replay-") as tmp: work = Path(tmp) total = 0 + failures = [] for source, (module, expected) in PROBES.items(): if expected is None: continue @@ -116,12 +138,36 @@ def verify(captures, binary): baseline = read(HERE / expected) if expected.endswith(".actions.json"): native, baseline = {"actions": native["actions"]}, {"actions": baseline} - equal(source + "/Xcode baseline", normalize_registration(baseline), normalize_registration(native)) - count = compare_capture(captures / source, work / source, binary, module) + try: + equal(source + "/Xcode baseline", normalize_registration(baseline), normalize_registration(native)) + except ValueError as error: + failures.append(str(error)) + try: + count = compare_capture(captures / source, work / source, binary, module) + except (ValueError, OSError) as error: + failures.append(str(error)) + continue total += count print(f"{source}: {count} actions; complete registration and version match") - verify_no_effect(read(captures / "ResultProtocols/extract.actionsdata")) - native, labels = verify_diagnostics(captures, work, binary) + try: + verify_no_effect(read(captures / "ResultProtocols/extract.actionsdata")) + except ValueError as error: + failures.append(str(error)) + try: + native, labels = verify_diagnostics(captures, work, binary) + except ValueError as error: + failures.append(str(error)) + try: + fingerprints = registration_fingerprints(captures, build) + if not update: + baseline = reviewed_baseline(sdk, "registration.json", HERE) + equal(f"Native registration changed since {baseline.name}", read(baseline), fingerprints) + except ValueError as error: + failures.append(str(error)) + if failures: + raise ValueError("\n\n".join(failures)) + if update: + (HERE / f"sdk-{sdk}-registration.json").write_text(json.dumps(fingerprints, indent=2, sort_keys=True) + "\n") print(f"{total} actions matched; {native} native diagnostic probes and {labels} option diagnostics passed") @@ -129,5 +175,6 @@ def verify(captures, binary): parser = argparse.ArgumentParser(description=__doc__) parser.add_argument("captures", type=Path) parser.add_argument("--sweetpad", type=Path, default=HERE.parents[2] / "target/debug/sweetpad") + parser.add_argument("--update-registrations", action="store_true", help="record reviewed native registration fingerprints") args = parser.parse_args() - verify(args.captures, args.sweetpad.resolve()) + verify(args.captures, args.sweetpad.resolve(), args.update_registrations) diff --git a/sweetpad-cli/src/cli/appintents/metadata.rs b/sweetpad-cli/src/cli/appintents/metadata.rs index 2bb0808e..ab240c97 100644 --- a/sweetpad-cli/src/cli/appintents/metadata.rs +++ b/sweetpad-cli/src/cli/appintents/metadata.rs @@ -550,6 +550,23 @@ mod tests { ); } #[test] + fn xcode_26_infers_the_instance_parameter_named_parameter_summary() { + let types: Vec = serde_json::from_str(include_str!( + "../../../fixtures/appintents/InputOptionsProbe.swiftconstvalues" + )) + .unwrap(); + let actions = &extract(&types, "17F113").unwrap()["actions"]; + let parameters = &actions["ParameterTitleProbe"]["parameters"]; + assert_eq!(parameters[0]["title"], localized("User's choice")); + let summary = ¶meters[1]; + assert_eq!(summary["name"], "parameterSummary"); + assert_eq!(summary["title"], localized("Parameter Summary")); + assert_eq!(summary["isOptional"], false); + assert_eq!(summary["capabilities"], 0); + assert!(summary.get("parameterDescription").is_none()); + assert_eq!(summary["typeSpecificMetadata"], json!([])); + } + #[test] fn probe_actions_match_xcode() { let dir = Path::new(env!("CARGO_MANIFEST_DIR")).join("fixtures/appintents"); for probe in ["InputOptionsProbe", "OutputProbe"] { diff --git a/sweetpad-cli/src/cli/appintents/metadata/parameters.rs b/sweetpad-cli/src/cli/appintents/metadata/parameters.rs index 692dc676..4c77d4fd 100644 --- a/sweetpad-cli/src/cli/appintents/metadata/parameters.rs +++ b/sweetpad-cli/src/cli/appintents/metadata/parameters.rs @@ -82,18 +82,23 @@ pub(super) fn parameter( text(&argument["label"]) )); } - let title = parameter_title(value, arguments, format)?; + let (arguments, title, default) = + if format == RegistrationFormat::Xcode26 && value["label"] == "parameterSummary" { + // Xcode 26 infers this instance parameter from its name and type. Its + // wrapper options are lost when the name matches the AppIntent requirement. + (&[][..], "Parameter Summary".to_owned(), None) + } else { + let title = arguments + .iter() + .find(|a| a["label"] == "title") + .or_else(|| argument(value, "title")) + .ok_or("parameter has no constant title")?; + let default = argument(value, "default").filter(|v| v["valueKind"] != "NilLiteral"); + (arguments, literal(title)?, default) + }; let (name, is_optional) = optional(text(&value["type"])); let kind = value_type(name, types)?; - let connection = arguments - .iter() - .find(|a| a["label"] == "inputConnectionBehavior"); - let connection = match connection.map(|v| text(&v["value"]["name"])) { - None | Some("default") => 0, - Some("never") => 1, - Some("connectToPreviousIntentResult") => 2, - Some(name) => return Err(format!("unsupported inputConnectionBehavior '{name}'")), - }; + let connection = input_connection_behavior(arguments)?; if let Some(dialog) = arguments .iter() .find(|a| a["label"] == "requestValueDialog" && a["valueKind"] != "NilLiteral") @@ -102,7 +107,6 @@ pub(super) fn parameter( // Native registration contains no dialog field for this option. literal(dialog)?; } - let default = argument(value, "default").filter(|v| v["valueKind"] != "NilLiteral"); let mut parameter = json!({ "capabilities":u8::from(default.is_some()),"dynamicOptionsSupport":u8::from(kind.get("entity").is_some()), "inputConnectionBehavior":connection,"isInput":connection == 2,"isOptional":is_optional, @@ -160,6 +164,18 @@ pub(super) fn parameter( Ok(parameter) } +fn input_connection_behavior(arguments: &[Value]) -> Result { + let behavior = arguments + .iter() + .find(|a| a["label"] == "inputConnectionBehavior"); + match behavior.map(|v| text(&v["value"]["name"])) { + None | Some("default") => Ok(0), + Some("never") => Ok(1), + Some("connectToPreviousIntentResult") => Ok(2), + Some(name) => Err(format!("unsupported inputConnectionBehavior '{name}'")), + } +} + /// `String.IntentInputOptions`, in the order of each option's metadata value. const KEYBOARD_TYPES: [&str; 5] = [ "asciiCapable", @@ -170,23 +186,6 @@ const KEYBOARD_TYPES: [&str; 5] = [ ]; const CAPITALIZATION_TYPES: [&str; 4] = ["none", "words", "sentences", "allCharacters"]; -fn parameter_title( - value: &Value, - arguments: &[Value], - format: RegistrationFormat, -) -> Result { - if format == RegistrationFormat::Xcode26 && value["label"] == "parameterSummary" { - // Xcode 26 infers the title when the instance parameter has this AppIntent requirement's name. - return Ok("Parameter Summary".to_owned()); - } - let title = arguments - .iter() - .find(|a| a["label"] == "title") - .or_else(|| argument(value, "title")) - .ok_or("parameter has no constant title")?; - literal(title) -} - /// Xcode writes one key per `String.IntentInputOptions` argument the source passes. /// Arguments left at their defaults are captured as `Runtime` and omitted. fn input_options(arguments: &[Value], parameter: &mut Value) -> Result<(), String> {