From aceca8b5dfc8edd378ee9ff891bccb0f94c69f31 Mon Sep 17 00:00:00 2001 From: gigagamerchaddhruv-spec Date: Wed, 14 Oct 2026 20:18:20 +0530 Subject: feat: launch Bubomb - native macOS menu bar utility ('Configure the boom') --- Sources/BubombCore/Models/SequenceStep.swift | 43 ++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 Sources/BubombCore/Models/SequenceStep.swift (limited to 'Sources/BubombCore/Models/SequenceStep.swift') diff --git a/Sources/BubombCore/Models/SequenceStep.swift b/Sources/BubombCore/Models/SequenceStep.swift new file mode 100644 index 0000000..f1d075d --- /dev/null +++ b/Sources/BubombCore/Models/SequenceStep.swift @@ -0,0 +1,43 @@ +import Foundation + +/// Individual step within a Multi-step Sequence payload. +public struct SequenceStep: Identifiable, Codable, Equatable, Hashable, Sendable { + public var id: UUID + public var name: String + public var action: StepAction + + public init(id: UUID = UUID(), name: String, action: StepAction) { + self.id = id + self.name = name + self.action = action + } + + public enum StepAction: Codable, Equatable, Hashable, Sendable { + case openApplication(applicationPath: String) + case openURL(urlString: String) + case runCommand(command: String, workingDirectory: String?, timeoutSeconds: TimeInterval?) + case runScript(scriptPath: String, arguments: [String], workingDirectory: String?, timeoutSeconds: TimeInterval?) + } + + public var actionTypeTitle: String { + switch action { + case .openApplication: return "Open App" + case .openURL: return "Open URL" + case .runCommand: return "Shell Command" + case .runScript: return "Run Script" + } + } + + public var summary: String { + switch action { + case .openApplication(let path): + return (path as NSString).lastPathComponent + case .openURL(let url): + return url + case .runCommand(let cmd, _, _): + return cmd + case .runScript(let path, _, _, _): + return (path as NSString).lastPathComponent + } + } +} -- cgit v1.2.3