SwiftclassWorkflowEditor

class WorkflowEditor.GenerativeExperienceCoordinator

Members 129

  1. funcstatic chicletMetric(min: CoreGraphics.CGFloat, max: CoreGraphics.CGFloat, forAvailableHeight: CoreGraphics.CGFloat) -> CoreGraphics.CGFloat
  2. funcstatic didCreateEmptyStateShortcut() -> ()
  3. funcstatic isAvailable(in: WorkflowEditor.GenerativeExperienceCoordinator.EditorContext) -> Bool
  4. funcstatic isCompactLandscapePhone(in: UITraitCollection) -> Bool
  5. funcstatic reapplySmartPromptStates(_: [WFSmartPromptState], toInsertedActions: [WFAction], database: WFDatabase, reference: WFWorkflowReference) async -> ()
  6. funcstatic shouldBeginInGenerative(in: WorkflowEditor.GenerativeExperienceCoordinator.EditorContext) -> Bool
  7. funcstatic shouldCreateEmptyStateShortcut() -> Bool
  8. funcstatic updatePreferredEditorMode(isInGenerativeExperience: Bool) -> ()
  9. varstatic var defaultSuggestions: [String] { get }
  10. varstatic var isReadyForUse: Bool { get }
  11. varstatic var isTripleColumnEnabled: Bool { get }
  12. varstatic var sampleCellActions: [WorkflowEditor.SampleCellAction] { get }
  13. deinitdeinit
  14. fieldvar _canDescribeUndo: Combine.Published<Bool>
  15. fieldvar _isGenerating: Combine.Published<Bool>
  16. fieldvar agentSession: ShortcutsAgent.AgentSession<ShortcutsAgent.DescribeAShortcutAgent>?+0x28
  17. fieldlazy var agentVersionID: String?
  18. fieldvar allReceivedUpdates: [ShortcutsAgent.AgentStep<ShortcutsAgent.DescribeAShortcutAgent>.Update]
  19. fieldlet backgroundNotificationIdentifier: String
  20. fieldvar backgroundNotificationObservers: [NSObject]
  21. fieldvar callIndex: Int
  22. fieldvar currentStep: ShortcutsAgent.AgentStep<ShortcutsAgent.DescribeAShortcutAgent>?
  23. fieldvar currentStepEventObservationTask: Task<(), Never>?
  24. fieldvar currentTurnCallSucceeded: Bool
  25. fieldvar currentTurnErrorChars: Set<ShortcutsAgent.DaSErrorCode>
  26. fieldvar currentTurnInputCharacterLength: Int
  27. fieldvar currentTurnOutputCharacterLength: Int
  28. fieldvar currentTurnResponseType: WorkflowEditor.DescribeModelCallResponseType
  29. fieldweak var delegate: WorkflowEditor.GenerativeExperienceCoordinatorDelegate?+0x10
  30. fieldvar describeUndoStack: [WorkflowEditor.GenerativeExperienceCoordinator.DescribeUndoEntry]
  31. fieldvar didEnterStillPhase: Bool
  32. fieldvar didFireAppOpened: Bool
  33. fieldvar disambiguationAnsweredWithText: Bool
  34. fieldvar disambiguationCallback: ((ShortcutsAgent.PickUserChoice) -> ())?
  35. fieldvar disambiguationStateStore: WorkflowEditor.ParameterStateStore?
  36. fieldvar hadCreationError: Bool
  37. fieldvar hasEditorChangesSinceLastGeneration: Bool
  38. fieldvar hasSavedContent: Bool
  39. fieldvar iconCancellable: Combine.AnyCancellable?
  40. fieldvar isRestoringFromDescribeUndo: Bool
  41. fieldvar isSuppressingThinking: Bool
  42. fieldvar isTerminated: Bool
  43. fieldvar lastLatencyChangeDate: Foundation.Date?
  44. fieldvar lastSentMessage: String?
  45. fieldvar lastSummarySyncHash: Int
  46. fieldvar latencyGroupID: String?
  47. fieldvar latencyMinHoldTimer: NSTimer?
  48. fieldvar latencyOpeningTimer: NSTimer?
  49. fieldvar latencyStillTimer: NSTimer?
  50. fieldvar nameCancellable: Combine.AnyCancellable?
  51. fieldvar numberOfEditorSwitches: Int
  52. fieldvar pendingLatencyStage: WorkflowEditor.GenerativeExperienceCoordinator.LatencyStage?
  53. fieldvar permissionsPromptCallback: (() -> ())?
  54. fieldvar preTurnSnapshot: WorkflowEditor.WorkflowSnapshot?
  55. fieldlet presentationContext: WorkflowEditor.EditorPresentationContext
  56. fieldlet runner: WorkflowEditor.EditorShortcutRunner
  57. fieldvar sessionErrorChars: Set<ShortcutsAgent.DaSErrorCode>
  58. fieldlet sessionID: String
  59. fieldvar sessionLatencyMaxMs: Int
  60. fieldvar sessionLatencySumMs: Int
  61. fieldvar sessionLatencyTurnCount: Int
  62. fieldvar shownLatencyStages: Set<WorkflowEditor.GenerativeExperienceCoordinator.LatencyStage>
  63. fieldvar systemQuestionCount: Int
  64. fieldvar systemTurnCount: Int
  65. fieldlet telemetrySubFeature: String
  66. fieldvar testRunCount: Int
  67. fieldvar testRunErrorChars: Set<Character>
  68. fieldvar toolEmbeddingIndexingObservationToken: Int32
  69. fieldvar turnFindEntitiesPairCounts: [WorkflowEditor.ActionParameterIdentifier : Int]
  70. fieldlet uiSession: WorkflowEditor.GenerativeConversationSession+0x20
  71. fieldlet workflow: WFWorkflow
  72. fieldlet workflowEditStatus: WorkflowEditor.GenerativeExperienceCoordinator.WorkflowEditStatus
  73. fieldvar workflowRunnerLifecycleCancellable: Combine.AnyCancellable?
  74. fieldvar workflowRunnerStateCancellable: Combine.AnyCancellable?
  75. funcabandonmentTypeForTesting() -> Int
  76. funcappend(WorkflowEditor.GenerativeConversationSessionItem) -> ()
  77. funcappendDisambiguationAlarmTime() -> ()
  78. funcappendDisambiguationEntityOptions() -> ()
  79. funcappendDisambiguationFilter() -> ()
  80. funcappendDisambiguationMultiSelect() -> ()
  81. funcappendDisambiguationSlider() -> ()
  82. funcappendDisambiguationSystemPicker() -> ()
  83. funcappendDisambiguationTextOptions() -> ()
  84. funcappendInitialState(title: String?, suggestions: [String]?) -> ()
  85. funcappendShortcutSummary(icon: WFWorkflowIcon?, text: String?, steps: [String]?, messageForUser: String?, suggestedQuery: String?) -> ()
  86. funcappendShortcutSummary(for: WFWorkflow, icon: WFIcon?, tintColor: WFColor?, messageForUser: String?, suggestedQuery: String?, isUpdatingPreviousSummary: Bool) -> ()
  87. funcappendTextResponse(text: String?, showsOpenEditorButton: Bool, requiresThirdPartyAction: Bool, suggestedQuery: String?) -> ()
  88. funcappendThinkingState(title: String?) -> String
  89. funcappendUserRequest(text: String?) -> ()
  90. funccreationMetricsSnapshot() -> WorkflowEditor.GenerativeExperienceCoordinator.CreationMetricsSnapshot
  91. funccurrentCallType() -> Int
  92. funcdiagnosticSnapshot() -> WorkflowEditor.GenerativeExperienceCoordinator.DiagnosticSnapshot
  93. funceditorDidEnterGenerativeExperience() -> ()
  94. funcemitShortcutCreation(isEditingNewWorkflow: Bool, defaultEntryPoint: WorkflowEditor.ShortcutCreationEntryPoint, userEntryPoint: WorkflowEditor.ShortcutCreationEntryPoint) -> ()
  95. funcfileRadar(title: String) throws -> ()
  96. funcfinishDisambiguation(with: ShortcutsAgent.PickUserChoice) -> ()
  97. funcfinishPermissionsPrompt() -> ()
  98. funchandleAgentEventForErrorClassification(ShortcutsAgent.AgentSession<ShortcutsAgent.DescribeAShortcutAgent>.Event) -> ()
  99. funcperformDescribeUndo() -> ()
  100. funcrecordEditorSwitch() -> ()
  101. funcrecordSessionErrorChars<A where A: Sequence, A.Element == ShortcutsAgent.DaSErrorCode>(A) -> ()
  102. funcrecordTurnLatency(Int) -> ()
  103. funcresetDescribeModelCallTurnStateForTesting() -> ()
  104. funcresetWorkflowEditStatus() -> ()
  105. funcsend(message: String) async throws -> ()
  106. funcsetCallIndexForTesting(Int) -> ()
  107. funcsetDisambiguationPendingForTesting(Bool) -> ()
  108. funcsetIsGeneratingForTesting(Bool) -> ()
  109. funcsetShortcutCreationStateForTesting(sessionErrorChars: Set<ShortcutsAgent.DaSErrorCode>?, hadCreationError: Bool?, testRunCount: Int?, testRunErrorChars: Set<Character>?, numberOfEditorSwitches: Int?, hasSavedContent: Bool?) -> ()
  110. funcshowInitialState() -> ()
  111. funcstreamSampleItems() -> ()
  112. functerminate() -> ()
  113. functrigger(_: WorkflowKit.WFNewTrigger, parameterStateDidChangeForKey: String) -> ()
  114. functrigger(_: WorkflowKit.WFNewTrigger, supplementalParameterValueDidChangeForKey: String) -> ()
  115. funcupdate(streamID: String, token: String) -> ()
  116. funcworkflowActionsDidChange(WFWorkflow) -> ()
  117. funcworkflowConnectorStateDidChange(WFWorkflow) -> ()
  118. funcworkflowInputActionDidChange(WFWorkflow) -> ()
  119. funcworkflowUnifiedAutomationTriggersDidChange(WFWorkflow) -> ()
  120. initWorkflowEditor.GenerativeExperienceCoordinator.__allocating_init(workflow: WFWorkflow, runner: WorkflowEditor.EditorShortcutRunner, presentationContext: WorkflowEditor.EditorPresentationContext, subFeature: WorkflowEditor.DescribeSubFeature) -> WorkflowEditor.GenerativeExperienceCoordinator
  121. varvar $canDescribeUndo: Combine.Published<Bool>.Publisher { get }
  122. varvar $isGenerating: Combine.Published<Bool>.Publisher { get }
  123. varvar canDescribeUndo: Bool { get }
  124. varvar currentBaseModel: String? { get }
  125. varfinal var currentTurnErrorCharsForTesting: Set<ShortcutsAgent.DaSErrorCode> { get }
  126. varvar isGenerating: Bool { get }
  127. varfinal var isShowingInitialState: Bool { get }
  128. varvar isSummarizing: Bool { get set }
  129. varvar sessionAverageLatencyMs: Int { get }
class GenerativeExperienceCoordinator: __C.WFWorkflowEditingObserver, __C.WFTriggerEventObserver {
    struct DiagnosticSnapshot {
        let uiSession: WorkflowEditor.GenerativeConversationSession
        let workflow: __C.WFWorkflow
        let agentUpdates: [ShortcutsAgent.AgentStep<ShortcutsAgent.DescribeAShortcutAgent>.Update]
        let startingWorkflow: __C.WFWorkflow?
        let isEditMode: Swift.Bool
    }
    enum DismissalConfirmationAlert {
        static var continueButtonTitle: Swift.String {
            get
        }
        static var message: Swift.String {
            get
        }
        static var stopButtonTitle: Swift.String {
            get
        }
        static var title: Swift.String {
            get
        }

        static func makeAlert(completion: @escaping (_: Swift.Bool) -> ()) -> __C.WFAlert
    }
    struct CreationMetricsSnapshot {
        let sessionID: Swift.String
        let numberOfUserTurns: Swift.Int
        let numberOfSystemTurns: Swift.Int
        let numberOfSystemQuestions: Swift.Int
        let numberOfTestRuns: Swift.Int
        let numberOfEditorSwitches: Swift.Int
        let dasActionCount: Swift.Int
        let editorActionCount: Swift.Int
        let creationErrorCode: Swift.String?
        let hadCreationError: Swift.Bool
        let testRunErrorCode: Swift.String?
        let baseModel: Swift.String
        let sessionAverageLatencyMs: Swift.Int
        let sessionMaxLatencyMs: Swift.Int
        let abandonmentType: Swift.Int
    }
    enum EditorContext {
        case shortcutsApp
        case homeApp

        init(home: Swift.AnyObject?)
    }
    enum LatencyStage {
        case findingEntity(Swift.String)
        case opening
        case findingActions
        case findingAutomations
        case assembling
        case stillAssembling
        case stillPuttingTogether
        case stillFinalizing
    }
    struct DescribeUndoEntry {
        let preGenerationWorkflow: __C.WFWorkflow
        let postGenerationWorkflow: __C.WFWorkflow
        let hadEditsBeforeGeneration: Swift.Bool
    }
    struct ConfigurationAttachment {
        enum CodingKeys {
            case agentConfiguration
            case toolRetrievalRootModelIdentifier
            case databaseVersion
            case toolkitDatabaseVersion
        }
        let agentConfiguration: ShortcutsAgent.AgentConfiguration
        let toolRetrievalRootModelIdentifier: Swift.String?
        let databaseVersion: Swift.String?
        let toolkitDatabaseVersion: Swift.String?
    }
    actor WorkflowEditStatus {
        var hasUserEdits: Swift.Bool
        var isGenerating: Swift.Bool

        var unownedExecutor: Swift.UnownedSerialExecutor {
            get
        }

        deinit
    }
    weak var delegate: (any WorkflowEditor.GenerativeExperienceCoordinatorDelegate)?
    let uiSession: WorkflowEditor.GenerativeConversationSession
    var agentSession: ShortcutsAgent.AgentSession<ShortcutsAgent.DescribeAShortcutAgent>?
    var currentStep: ShortcutsAgent.AgentStep<ShortcutsAgent.DescribeAShortcutAgent>?
    let workflow: __C.WFWorkflow
    var lastSentMessage: Swift.String?
    var allReceivedUpdates: [ShortcutsAgent.AgentStep<ShortcutsAgent.DescribeAShortcutAgent>.Update]
    var disambiguationCallback: ((_: ShortcutsAgent.PickUserChoice) -> ())?
    var permissionsPromptCallback: (() -> ())?
    var disambiguationStateStore: WorkflowEditor.ParameterStateStore?
    var disambiguationAnsweredWithText: Swift.Bool
    let workflowEditStatus: WorkflowEditor.GenerativeExperienceCoordinator.WorkflowEditStatus
    let backgroundNotificationIdentifier: Swift.String
    var describeUndoStack: [WorkflowEditor.GenerativeExperienceCoordinator.DescribeUndoEntry]
    var hasEditorChangesSinceLastGeneration: Swift.Bool
    var isRestoringFromDescribeUndo: Swift.Bool
    var lastSummarySyncHash: Swift.Int
    let runner: WorkflowEditor.EditorShortcutRunner
    var workflowRunnerStateCancellable: Combine.AnyCancellable?
    var workflowRunnerLifecycleCancellable: Combine.AnyCancellable?
    var iconCancellable: Combine.AnyCancellable?
    var nameCancellable: Combine.AnyCancellable?
    var latencyOpeningTimer: __C.NSTimer?
    var latencyStillTimer: __C.NSTimer?
    var latencyMinHoldTimer: __C.NSTimer?
    var latencyGroupID: Swift.String?
    var shownLatencyStages: Swift.Set<WorkflowEditor.GenerativeExperienceCoordinator.LatencyStage>
    var lastLatencyChangeDate: Foundation.Date?
    var pendingLatencyStage: WorkflowEditor.GenerativeExperienceCoordinator.LatencyStage?
    var didEnterStillPhase: Swift.Bool
    var isSuppressingThinking: Swift.Bool
    let telemetrySubFeature: Swift.String
    var didFireAppOpened: Swift.Bool
    var hasSavedContent: Swift.Bool
    let sessionID: Swift.String
    var callIndex: Swift.Int
    var sessionLatencySumMs: Swift.Int
    var sessionLatencyMaxMs: Swift.Int
    var sessionLatencyTurnCount: Swift.Int
    var systemTurnCount: Swift.Int
    var systemQuestionCount: Swift.Int
    var sessionErrorChars: Swift.Set<ShortcutsAgent.DaSErrorCode>
    var currentTurnErrorChars: Swift.Set<ShortcutsAgent.DaSErrorCode>
    var preTurnSnapshot: WorkflowEditor.WorkflowSnapshot?
    var currentTurnInputCharacterLength: Swift.Int
    var currentTurnOutputCharacterLength: Swift.Int
    var currentTurnResponseType: WorkflowEditor.DescribeModelCallResponseType
    var currentTurnCallSucceeded: Swift.Bool
    var turnFindEntitiesPairCounts: [WorkflowEditor.ActionParameterIdentifier : Swift.Int]
    var currentStepEventObservationTask: Swift.Task<(), Swift.Never>?
    var hadCreationError: Swift.Bool
    var testRunCount: Swift.Int
    var testRunErrorChars: Swift.Set<Swift.Character>
    var numberOfEditorSwitches: Swift.Int
    var isTerminated: Swift.Bool
    let presentationContext: WorkflowEditor.EditorPresentationContext
    lazy var agentVersionID: Swift.String?
    var toolEmbeddingIndexingObservationToken: Swift.Int32
    var backgroundNotificationObservers: [any __C.NSObject]

    func diagnosticSnapshot() -> WorkflowEditor.GenerativeExperienceCoordinator.DiagnosticSnapshot
    @Combine.Published var isGenerating: Swift.Bool {
        get
    }
    @Combine.Published var canDescribeUndo: Swift.Bool {
        get
    }
    var isSummarizing: Swift.Bool {
        get
        set
    }
    var currentBaseModel: Swift.String? {
        get
    }
    var sessionAverageLatencyMs: Swift.Int {
        get
    }
    func recordTurnLatency(_: Swift.Int)
    func recordSessionErrorChars<A>(_: A) where A: Swift.Sequence, A.Element == ShortcutsAgent.DaSErrorCode
    func recordEditorSwitch()
    func creationMetricsSnapshot() -> WorkflowEditor.GenerativeExperienceCoordinator.CreationMetricsSnapshot
    init(workflow: __C.WFWorkflow, runner: WorkflowEditor.EditorShortcutRunner, presentationContext: WorkflowEditor.EditorPresentationContext, subFeature: WorkflowEditor.DescribeSubFeature)
    func terminate()
    func send(message: Swift.String) async throws
    func showInitialState()
    func finishDisambiguation(with: ShortcutsAgent.PickUserChoice)
    func finishPermissionsPrompt()
    func fileRadar(title: Swift.String) throws
    func update(streamID: Swift.String, token: Swift.String)
    func append(_: WorkflowEditor.GenerativeConversationSessionItem)
    func appendShortcutSummary(for: __C.WFWorkflow, icon: __C.WFIcon?, tintColor: __C.WFColor?, messageForUser: Swift.String?, suggestedQuery: Swift.String?, isUpdatingPreviousSummary: Swift.Bool)

    final var currentTurnErrorCharsForTesting: Swift.Set<ShortcutsAgent.DaSErrorCode> {
        get
    }
    final var isShowingInitialState: Swift.Bool {
        get
    }

    final func editorDidEnterGenerativeExperience()
    final func resetWorkflowEditStatus()
    final func currentCallType() -> Swift.Int
    final func appendUserRequest(text: Swift.String?)
    final func streamSampleItems()
    final func appendInitialState(title: Swift.String?, suggestions: [Swift.String]?)
    final func appendTextResponse(text: Swift.String?, showsOpenEditorButton: Swift.Bool, requiresThirdPartyAction: Swift.Bool, suggestedQuery: Swift.String?)
    final func appendThinkingState(title: Swift.String?) -> Swift.String
    final func performDescribeUndo()
    final func emitShortcutCreation(isEditingNewWorkflow: Swift.Bool, defaultEntryPoint: WorkflowEditor.ShortcutCreationEntryPoint, userEntryPoint: WorkflowEditor.ShortcutCreationEntryPoint)
    func appendShortcutSummary(icon: __C.WFWorkflowIcon?, text: Swift.String?, steps: [Swift.String]?, messageForUser: Swift.String?, suggestedQuery: Swift.String?)
    final func setCallIndexForTesting(_: Swift.Int)
    @objc func workflowActionsDidChange(_: __C.WFWorkflow)
    final func abandonmentTypeForTesting() -> Swift.Int
    final func setIsGeneratingForTesting(_: Swift.Bool)
    final func appendDisambiguationFilter()
    final func appendDisambiguationSlider()
    @objc func workflowInputActionDidChange(_: __C.WFWorkflow)
    final func appendDisambiguationAlarmTime()
    final func appendDisambiguationMultiSelect()
    final func appendDisambiguationTextOptions()
    @objc func workflowConnectorStateDidChange(_: __C.WFWorkflow)
    final func appendDisambiguationSystemPicker()
    final func appendDisambiguationEntityOptions()
    final func setDisambiguationPendingForTesting(_: Swift.Bool)
    final func setShortcutCreationStateForTesting(sessionErrorChars: Swift.Set<ShortcutsAgent.DaSErrorCode>?, hadCreationError: Swift.Bool?, testRunCount: Swift.Int?, testRunErrorChars: Swift.Set<Swift.Character>?, numberOfEditorSwitches: Swift.Int?, hasSavedContent: Swift.Bool?)
    final func handleAgentEventForErrorClassification(_: ShortcutsAgent.AgentSession<ShortcutsAgent.DescribeAShortcutAgent>.Event)
    final func resetDescribeModelCallTurnStateForTesting()
    @objc func workflowUnifiedAutomationTriggersDidChange(_: __C.WFWorkflow)
    @objc func trigger(_: WorkflowKit.WFNewTrigger, parameterStateDidChangeForKey: Swift.String)
    @objc func trigger(_: WorkflowKit.WFNewTrigger, supplementalParameterValueDidChangeForKey: Swift.String)

    static var defaultSuggestions: [Swift.String] {
        get
    }
    static var isReadyForUse: Swift.Bool {
        get
    }
    static var isTripleColumnEnabled: Swift.Bool {
        get
    }
    static var sampleCellActions: [WorkflowEditor.SampleCellAction] {
        get
    }

    static func shouldBeginInGenerative(in: WorkflowEditor.GenerativeExperienceCoordinator.EditorContext) -> Swift.Bool
    static func updatePreferredEditorMode(isInGenerativeExperience: Swift.Bool)
    static func isAvailable(in: WorkflowEditor.GenerativeExperienceCoordinator.EditorContext) -> Swift.Bool
    static func chicletMetric(min: CoreGraphics.CGFloat, max: CoreGraphics.CGFloat, forAvailableHeight: CoreGraphics.CGFloat) -> CoreGraphics.CGFloat
    static func isCompactLandscapePhone(in: __C.UITraitCollection) -> Swift.Bool
    static func reapplySmartPromptStates(_: [__C.WFSmartPromptState], toInsertedActions: [__C.WFAction], database: __C.WFDatabase, reference: __C.WFWorkflowReference) async
    static func didCreateEmptyStateShortcut()
    static func shouldCreateEmptyStateShortcut() -> Swift.Bool

    deinit
}