@lattices/cli 0.4.13 → 0.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (180) hide show
  1. package/README.md +5 -7
  2. package/apps/mac/Info.plist +2 -2
  3. package/apps/mac/Lattices.app/Contents/Info.plist +4 -12
  4. package/apps/mac/Lattices.app/Contents/MacOS/Lattices +0 -0
  5. package/bin/lattices-app.ts +110 -17
  6. package/bin/lattices-build +125 -0
  7. package/bin/lattices-dev +89 -16
  8. package/bin/lattices.ts +977 -16
  9. package/docs/agents.md +81 -4
  10. package/docs/ai-chat-ux-review.md +416 -0
  11. package/docs/api.md +135 -3
  12. package/docs/app.md +30 -8
  13. package/docs/config.md +4 -0
  14. package/docs/mouse-gestures.md +191 -63
  15. package/docs/proposals/LAT-004-interactive-overlay-actors.md +1 -1
  16. package/docs/proposals/LAT-005-action-runtime-product-spine.md +914 -0
  17. package/docs/proposals/LAT-006-mira-in-lattices.md +553 -0
  18. package/docs/reference/dewey.config.ts +2 -2
  19. package/docs/release.md +171 -0
  20. package/docs/repo-structure.md +4 -5
  21. package/docs/voice.md +11 -27
  22. package/package.json +9 -10
  23. package/apps/mac/Package.swift +0 -27
  24. package/apps/mac/Sources/AppShell/App.swift +0 -26
  25. package/apps/mac/Sources/AppShell/AppActivationCoordinator.swift +0 -27
  26. package/apps/mac/Sources/AppShell/AppDelegate.swift +0 -189
  27. package/apps/mac/Sources/AppShell/AppServicesBootstrap.swift +0 -25
  28. package/apps/mac/Sources/AppShell/AppShellView.swift +0 -171
  29. package/apps/mac/Sources/AppShell/AppUpdater.swift +0 -305
  30. package/apps/mac/Sources/AppShell/CliActionLauncher.swift +0 -50
  31. package/apps/mac/Sources/AppShell/HomeDashboardView.swift +0 -133
  32. package/apps/mac/Sources/AppShell/HotkeyBootstrap.swift +0 -87
  33. package/apps/mac/Sources/AppShell/KeyRecorderView.swift +0 -210
  34. package/apps/mac/Sources/AppShell/LatticesRuntime.swift +0 -104
  35. package/apps/mac/Sources/AppShell/MainView.swift +0 -847
  36. package/apps/mac/Sources/AppShell/MainWindow.swift +0 -83
  37. package/apps/mac/Sources/AppShell/MenuBarController.swift +0 -177
  38. package/apps/mac/Sources/AppShell/OnboardingView.swift +0 -483
  39. package/apps/mac/Sources/AppShell/PermissionsAssistantView.swift +0 -366
  40. package/apps/mac/Sources/AppShell/PermissionsAssistantWindow.swift +0 -70
  41. package/apps/mac/Sources/AppShell/Preferences.swift +0 -297
  42. package/apps/mac/Sources/AppShell/SettingsView.swift +0 -3163
  43. package/apps/mac/Sources/AppShell/SettingsWindow.swift +0 -34
  44. package/apps/mac/Sources/AppShell/WorkspaceInspectorPresenter.swift +0 -13
  45. package/apps/mac/Sources/Core/Actions/HotkeyManager.swift +0 -256
  46. package/apps/mac/Sources/Core/Actions/HotkeyStore.swift +0 -399
  47. package/apps/mac/Sources/Core/Actions/IntentEngine.swift +0 -988
  48. package/apps/mac/Sources/Core/Actions/IntentSchema.swift +0 -94
  49. package/apps/mac/Sources/Core/Actions/Intents/CreateLayerIntent.swift +0 -54
  50. package/apps/mac/Sources/Core/Actions/Intents/DistributeIntent.swift +0 -56
  51. package/apps/mac/Sources/Core/Actions/Intents/FocusIntent.swift +0 -69
  52. package/apps/mac/Sources/Core/Actions/Intents/HelpIntent.swift +0 -41
  53. package/apps/mac/Sources/Core/Actions/Intents/KillIntent.swift +0 -47
  54. package/apps/mac/Sources/Core/Actions/Intents/LatticeIntent.swift +0 -53
  55. package/apps/mac/Sources/Core/Actions/Intents/LaunchIntent.swift +0 -67
  56. package/apps/mac/Sources/Core/Actions/Intents/ListSessionsIntent.swift +0 -32
  57. package/apps/mac/Sources/Core/Actions/Intents/ListWindowsIntent.swift +0 -30
  58. package/apps/mac/Sources/Core/Actions/Intents/ScanIntent.swift +0 -52
  59. package/apps/mac/Sources/Core/Actions/Intents/SearchIntent.swift +0 -190
  60. package/apps/mac/Sources/Core/Actions/Intents/SwitchLayerIntent.swift +0 -50
  61. package/apps/mac/Sources/Core/Actions/Intents/TileIntent.swift +0 -61
  62. package/apps/mac/Sources/Core/Actions/PaletteCommand.swift +0 -439
  63. package/apps/mac/Sources/Core/Actions/VoiceIntentResolver.swift +0 -713
  64. package/apps/mac/Sources/Core/Companion/CompanionActivityLog.swift +0 -70
  65. package/apps/mac/Sources/Core/Companion/CompanionKeyboardController.swift +0 -141
  66. package/apps/mac/Sources/Core/Companion/LatticesCompanionBridgeServer.swift +0 -454
  67. package/apps/mac/Sources/Core/Companion/LatticesCompanionCockpit.swift +0 -555
  68. package/apps/mac/Sources/Core/Companion/LatticesCompanionSecurityCoordinator.swift +0 -629
  69. package/apps/mac/Sources/Core/Companion/LatticesCompanionTrackpadController.swift +0 -204
  70. package/apps/mac/Sources/Core/Companion/LatticesDeckHost.swift +0 -1463
  71. package/apps/mac/Sources/Core/Daemon/DaemonProtocol.swift +0 -114
  72. package/apps/mac/Sources/Core/Daemon/DaemonServer.swift +0 -427
  73. package/apps/mac/Sources/Core/Daemon/LatticesApi.swift +0 -2965
  74. package/apps/mac/Sources/Core/Desktop/AccessibilityTextExtractor.swift +0 -111
  75. package/apps/mac/Sources/Core/Desktop/AppTypeClassifier.swift +0 -106
  76. package/apps/mac/Sources/Core/Desktop/DesktopModel.swift +0 -331
  77. package/apps/mac/Sources/Core/Desktop/DesktopModelTypes.swift +0 -73
  78. package/apps/mac/Sources/Core/Desktop/InventoryManager.swift +0 -35
  79. package/apps/mac/Sources/Core/Desktop/InventoryPath.swift +0 -43
  80. package/apps/mac/Sources/Core/Desktop/MouseFinder.swift +0 -527
  81. package/apps/mac/Sources/Core/Desktop/OcrModel.swift +0 -467
  82. package/apps/mac/Sources/Core/Desktop/OcrStore.swift +0 -329
  83. package/apps/mac/Sources/Core/Desktop/PlacementSpec.swift +0 -195
  84. package/apps/mac/Sources/Core/Desktop/SessionWindowLocator.swift +0 -139
  85. package/apps/mac/Sources/Core/Desktop/TilePickerView.swift +0 -209
  86. package/apps/mac/Sources/Core/Desktop/WindowCapture.swift +0 -33
  87. package/apps/mac/Sources/Core/Desktop/WindowDragSnapController.swift +0 -429
  88. package/apps/mac/Sources/Core/Desktop/WindowPreviewCard.swift +0 -100
  89. package/apps/mac/Sources/Core/Desktop/WindowPreviewStore.swift +0 -112
  90. package/apps/mac/Sources/Core/Desktop/WindowSelectionStore.swift +0 -76
  91. package/apps/mac/Sources/Core/Desktop/WindowTiler.swift +0 -2222
  92. package/apps/mac/Sources/Core/Input/EventTapBreaker.swift +0 -124
  93. package/apps/mac/Sources/Core/Input/EventTapThread.swift +0 -54
  94. package/apps/mac/Sources/Core/Input/InputCaptureResetCenter.swift +0 -20
  95. package/apps/mac/Sources/Core/Input/KeyboardRemapConfig.swift +0 -69
  96. package/apps/mac/Sources/Core/Input/KeyboardRemapController.swift +0 -346
  97. package/apps/mac/Sources/Core/Input/KeyboardRemapStore.swift +0 -141
  98. package/apps/mac/Sources/Core/Input/MouseGestureConfig.swift +0 -499
  99. package/apps/mac/Sources/Core/Input/MouseGestureController.swift +0 -2271
  100. package/apps/mac/Sources/Core/Input/MouseInputDeviceStore.swift +0 -98
  101. package/apps/mac/Sources/Core/Input/MouseInputEventViewer.swift +0 -272
  102. package/apps/mac/Sources/Core/Input/MouseShortcutStore.swift +0 -170
  103. package/apps/mac/Sources/Core/Input/SecureEventInputMonitor.swift +0 -39
  104. package/apps/mac/Sources/Core/Input/ShapeRecognizer.swift +0 -624
  105. package/apps/mac/Sources/Core/Input/TapBudgetMeter.swift +0 -56
  106. package/apps/mac/Sources/Core/Overlays/AppWindowShell.swift +0 -63
  107. package/apps/mac/Sources/Core/Overlays/CommandMode/CommandModeState.swift +0 -1566
  108. package/apps/mac/Sources/Core/Overlays/CommandMode/CommandModeView.swift +0 -1927
  109. package/apps/mac/Sources/Core/Overlays/CommandMode/CommandModeWindow.swift +0 -196
  110. package/apps/mac/Sources/Core/Overlays/CommandPalette/CommandPaletteView.swift +0 -307
  111. package/apps/mac/Sources/Core/Overlays/CommandPalette/CommandPaletteWindow.swift +0 -67
  112. package/apps/mac/Sources/Core/Overlays/HUD/CheatSheetHUD.swift +0 -576
  113. package/apps/mac/Sources/Core/Overlays/HUD/HUDBottomBar.swift +0 -279
  114. package/apps/mac/Sources/Core/Overlays/HUD/HUDController.swift +0 -1158
  115. package/apps/mac/Sources/Core/Overlays/HUD/HUDLeftBar.swift +0 -849
  116. package/apps/mac/Sources/Core/Overlays/HUD/HUDMinimap.swift +0 -179
  117. package/apps/mac/Sources/Core/Overlays/HUD/HUDRightBar.swift +0 -596
  118. package/apps/mac/Sources/Core/Overlays/HUD/HUDState.swift +0 -367
  119. package/apps/mac/Sources/Core/Overlays/HUD/HUDTopBar.swift +0 -243
  120. package/apps/mac/Sources/Core/Overlays/HUD/LauncherHUD.swift +0 -334
  121. package/apps/mac/Sources/Core/Overlays/HUD/LayerBezel.swift +0 -203
  122. package/apps/mac/Sources/Core/Overlays/OmniSearch/OmniSearchState.swift +0 -280
  123. package/apps/mac/Sources/Core/Overlays/OmniSearch/OmniSearchView.swift +0 -422
  124. package/apps/mac/Sources/Core/Overlays/OmniSearch/OmniSearchWindow.swift +0 -94
  125. package/apps/mac/Sources/Core/Overlays/OverlayPanelShell.swift +0 -241
  126. package/apps/mac/Sources/Core/Overlays/ScreenMap/ScreenMapState.swift +0 -3135
  127. package/apps/mac/Sources/Core/Overlays/ScreenMap/ScreenMapView.swift +0 -3977
  128. package/apps/mac/Sources/Core/Overlays/ScreenMap/ScreenMapWindowController.swift +0 -119
  129. package/apps/mac/Sources/Core/Overlays/ScreenOverlayCanvasController.swift +0 -1217
  130. package/apps/mac/Sources/Core/Overlays/Voice/VoiceCommandWindow.swift +0 -1575
  131. package/apps/mac/Sources/Core/Pi/PiAuthNextStepCard.swift +0 -148
  132. package/apps/mac/Sources/Core/Pi/PiAuthPromptCard.swift +0 -90
  133. package/apps/mac/Sources/Core/Pi/PiChatDock.swift +0 -564
  134. package/apps/mac/Sources/Core/Pi/PiChatSession.swift +0 -1948
  135. package/apps/mac/Sources/Core/Pi/PiInstallCallout.swift +0 -86
  136. package/apps/mac/Sources/Core/Pi/PiProviderSetupCallout.swift +0 -99
  137. package/apps/mac/Sources/Core/Pi/PiWorkspaceView.swift +0 -510
  138. package/apps/mac/Sources/Core/System/Capability.swift +0 -79
  139. package/apps/mac/Sources/Core/System/DiagnosticLog.swift +0 -373
  140. package/apps/mac/Sources/Core/System/EventBus.swift +0 -31
  141. package/apps/mac/Sources/Core/System/PermissionChecker.swift +0 -224
  142. package/apps/mac/Sources/Core/System/ProcessModel.swift +0 -199
  143. package/apps/mac/Sources/Core/System/ProcessQuery.swift +0 -151
  144. package/apps/mac/Sources/Core/System/SystemTelemetryMonitor.swift +0 -273
  145. package/apps/mac/Sources/Core/Voice/AdvisorLearningStore.swift +0 -90
  146. package/apps/mac/Sources/Core/Voice/AgentSession.swift +0 -377
  147. package/apps/mac/Sources/Core/Voice/AudioProvider.swift +0 -555
  148. package/apps/mac/Sources/Core/Voice/HandsOffSession.swift +0 -839
  149. package/apps/mac/Sources/Core/Voice/VoiceChatView.swift +0 -192
  150. package/apps/mac/Sources/Core/Voice/VoxClient.swift +0 -454
  151. package/apps/mac/Sources/Core/Workspace/Project.swift +0 -28
  152. package/apps/mac/Sources/Core/Workspace/ProjectScanner.swift +0 -141
  153. package/apps/mac/Sources/Core/Workspace/SessionLayerStore.swift +0 -285
  154. package/apps/mac/Sources/Core/Workspace/SessionManager.swift +0 -75
  155. package/apps/mac/Sources/Core/Workspace/Terminal/Terminal.swift +0 -259
  156. package/apps/mac/Sources/Core/Workspace/Terminal/TerminalQuery.swift +0 -156
  157. package/apps/mac/Sources/Core/Workspace/Terminal/TerminalSynthesizer.swift +0 -200
  158. package/apps/mac/Sources/Core/Workspace/Tmux/TmuxModel.swift +0 -60
  159. package/apps/mac/Sources/Core/Workspace/Tmux/TmuxQuery.swift +0 -105
  160. package/apps/mac/Sources/Core/Workspace/WorkspaceManager.swift +0 -1027
  161. package/apps/mac/Sources/UI/ActionRow.swift +0 -78
  162. package/apps/mac/Sources/UI/OrphanRow.swift +0 -129
  163. package/apps/mac/Sources/UI/ProjectRow.swift +0 -368
  164. package/apps/mac/Sources/UI/TabGroupRow.swift +0 -178
  165. package/apps/mac/Sources/UI/Theme.swift +0 -164
  166. package/apps/mac/Tests/StageDragTests.swift +0 -333
  167. package/apps/mac/Tests/StageJoinTests.swift +0 -313
  168. package/apps/mac/Tests/StageManagerTests.swift +0 -280
  169. package/apps/mac/Tests/StageTileTests.swift +0 -353
  170. package/swift/Package.swift +0 -20
  171. package/swift/Sources/DeckKit/DeckAction.swift +0 -51
  172. package/swift/Sources/DeckKit/DeckBridgeSecurity.swift +0 -152
  173. package/swift/Sources/DeckKit/DeckCockpit.swift +0 -82
  174. package/swift/Sources/DeckKit/DeckHost.swift +0 -7
  175. package/swift/Sources/DeckKit/DeckManifest.swift +0 -145
  176. package/swift/Sources/DeckKit/DeckRuntimeSnapshot.swift +0 -533
  177. package/swift/Sources/DeckKit/DeckTrackpad.swift +0 -63
  178. package/swift/Sources/DeckKit/DeckValue.swift +0 -93
  179. package/swift/Sources/DeckKit/DeckVoiceError.swift +0 -88
  180. package/swift/Tests/DeckKitTests/DeckKitTests.swift +0 -286
@@ -1,145 +0,0 @@
1
- import Foundation
2
-
3
- public struct DeckManifest: Codable, Equatable, Sendable {
4
- public var product: DeckProductIdentity
5
- public var security: DeckSecurityConfiguration
6
- public var capabilities: [DeckCapability]
7
- public var pages: [DeckPage]
8
-
9
- public init(
10
- product: DeckProductIdentity,
11
- security: DeckSecurityConfiguration,
12
- capabilities: [DeckCapability],
13
- pages: [DeckPage]
14
- ) {
15
- self.product = product
16
- self.security = security
17
- self.capabilities = capabilities
18
- self.pages = pages
19
- }
20
- }
21
-
22
- public struct DeckProductIdentity: Codable, Equatable, Sendable {
23
- public var id: String
24
- public var displayName: String
25
- public var owner: String
26
-
27
- public init(id: String, displayName: String, owner: String) {
28
- self.id = id
29
- self.displayName = displayName
30
- self.owner = owner
31
- }
32
- }
33
-
34
- public enum DeckCapability: String, Codable, CaseIterable, Sendable {
35
- case voiceAgent
36
- case layoutControl
37
- case appSwitching
38
- case taskSwitching
39
- case screenPreview
40
- case trackpadProxy
41
- case historyFeed
42
- case questionCards
43
- case systemTelemetry
44
- case spaces
45
- case keyboardForwarding
46
- case activityLog
47
- case cockpitModes
48
- case transcriptStream
49
- case embeddedSecurityDelegation
50
- }
51
-
52
- public struct DeckPage: Codable, Equatable, Identifiable, Sendable {
53
- public var id: String
54
- public var title: String
55
- public var iconSystemName: String
56
- public var kind: DeckPageKind
57
- public var accentToken: String?
58
- public var deckID: String?
59
-
60
- public init(
61
- id: String,
62
- title: String,
63
- iconSystemName: String,
64
- kind: DeckPageKind,
65
- accentToken: String? = nil,
66
- deckID: String? = nil
67
- ) {
68
- self.id = id
69
- self.title = title
70
- self.iconSystemName = iconSystemName
71
- self.kind = kind
72
- self.accentToken = accentToken
73
- self.deckID = deckID
74
- }
75
- }
76
-
77
- public enum DeckPageKind: String, Codable, CaseIterable, Sendable {
78
- case cockpit
79
- case voice
80
- case mac
81
- case layout
82
- case `switch`
83
- case history
84
- case custom
85
- }
86
-
87
- public struct DeckSecurityConfiguration: Codable, Equatable, Sendable {
88
- public var mode: DeckSecurityMode
89
- public var pairingStrategy: DeckPairingStrategy
90
- public var requestSigningRequired: Bool
91
- public var payloadEncryptionRequired: Bool
92
- public var delegatedOwner: String?
93
-
94
- public init(
95
- mode: DeckSecurityMode,
96
- pairingStrategy: DeckPairingStrategy,
97
- requestSigningRequired: Bool,
98
- payloadEncryptionRequired: Bool = false,
99
- delegatedOwner: String? = nil
100
- ) {
101
- self.mode = mode
102
- self.pairingStrategy = pairingStrategy
103
- self.requestSigningRequired = requestSigningRequired
104
- self.payloadEncryptionRequired = payloadEncryptionRequired
105
- self.delegatedOwner = delegatedOwner
106
- }
107
- }
108
-
109
- public extension DeckSecurityConfiguration {
110
- static func standaloneBonjour(
111
- requestSigningRequired: Bool = true,
112
- payloadEncryptionRequired: Bool = true
113
- ) -> Self {
114
- DeckSecurityConfiguration(
115
- mode: .standalone,
116
- pairingStrategy: .bonjour,
117
- requestSigningRequired: requestSigningRequired,
118
- payloadEncryptionRequired: payloadEncryptionRequired
119
- )
120
- }
121
-
122
- static func embeddedDelegated(
123
- owner: String,
124
- requestSigningRequired: Bool = true,
125
- payloadEncryptionRequired: Bool = true
126
- ) -> Self {
127
- DeckSecurityConfiguration(
128
- mode: .embedded,
129
- pairingStrategy: .delegated,
130
- requestSigningRequired: requestSigningRequired,
131
- payloadEncryptionRequired: payloadEncryptionRequired,
132
- delegatedOwner: owner
133
- )
134
- }
135
- }
136
-
137
- public enum DeckSecurityMode: String, Codable, CaseIterable, Sendable {
138
- case standalone
139
- case embedded
140
- }
141
-
142
- public enum DeckPairingStrategy: String, Codable, CaseIterable, Sendable {
143
- case bonjour
144
- case delegated
145
- }
@@ -1,533 +0,0 @@
1
- import Foundation
2
-
3
- public struct DeckRuntimeSnapshot: Codable, Equatable, Sendable {
4
- public var updatedAt: Date
5
- public var cockpit: DeckCockpitState?
6
- public var trackpad: DeckTrackpadState?
7
- public var voice: DeckVoiceState?
8
- public var desktop: DeckDesktopSummary?
9
- public var layout: DeckLayoutState?
10
- public var switcher: DeckSwitcherState?
11
- public var telemetry: DeckSystemTelemetry?
12
- public var spaces: DeckSpacesState?
13
- public var cockpitMode: DeckCockpitModeState?
14
- public var activityLog: [DeckActivityLogEntry]?
15
- public var history: [DeckHistoryEntry]
16
- public var questions: [DeckQuestionCard]
17
-
18
- public init(
19
- updatedAt: Date = .now,
20
- cockpit: DeckCockpitState? = nil,
21
- trackpad: DeckTrackpadState? = nil,
22
- voice: DeckVoiceState? = nil,
23
- desktop: DeckDesktopSummary? = nil,
24
- layout: DeckLayoutState? = nil,
25
- switcher: DeckSwitcherState? = nil,
26
- telemetry: DeckSystemTelemetry? = nil,
27
- spaces: DeckSpacesState? = nil,
28
- cockpitMode: DeckCockpitModeState? = nil,
29
- activityLog: [DeckActivityLogEntry]? = nil,
30
- history: [DeckHistoryEntry] = [],
31
- questions: [DeckQuestionCard] = []
32
- ) {
33
- self.updatedAt = updatedAt
34
- self.cockpit = cockpit
35
- self.trackpad = trackpad
36
- self.voice = voice
37
- self.desktop = desktop
38
- self.layout = layout
39
- self.switcher = switcher
40
- self.telemetry = telemetry
41
- self.spaces = spaces
42
- self.cockpitMode = cockpitMode
43
- self.activityLog = activityLog
44
- self.history = history
45
- self.questions = questions
46
- }
47
- }
48
-
49
- public struct DeckVoiceState: Codable, Equatable, Sendable {
50
- public var phase: DeckVoicePhase
51
- public var transcript: String?
52
- public var transcriptLines: [DeckTranscriptLine]?
53
- public var responseSummary: String?
54
- public var provider: String?
55
- public var error: DeckVoiceError? // currently-active error (cleared on recovery)
56
- public var lastError: DeckVoiceError? // sticky most-recent error for the activity tape
57
-
58
- public init(
59
- phase: DeckVoicePhase,
60
- transcript: String? = nil,
61
- transcriptLines: [DeckTranscriptLine]? = nil,
62
- responseSummary: String? = nil,
63
- provider: String? = nil,
64
- error: DeckVoiceError? = nil,
65
- lastError: DeckVoiceError? = nil
66
- ) {
67
- self.phase = phase
68
- self.transcript = transcript
69
- self.transcriptLines = transcriptLines
70
- self.responseSummary = responseSummary
71
- self.provider = provider
72
- self.error = error
73
- self.lastError = lastError
74
- }
75
- }
76
-
77
- public struct DeckTranscriptLine: Codable, Equatable, Identifiable, Sendable {
78
- public var id: String
79
- public var createdAt: Date
80
- public var text: String
81
- public var isFinal: Bool
82
- public var confidence: Double?
83
- public var source: String?
84
-
85
- public init(
86
- id: String,
87
- createdAt: Date = .now,
88
- text: String,
89
- isFinal: Bool,
90
- confidence: Double? = nil,
91
- source: String? = nil
92
- ) {
93
- self.id = id
94
- self.createdAt = createdAt
95
- self.text = text
96
- self.isFinal = isFinal
97
- self.confidence = confidence
98
- self.source = source
99
- }
100
- }
101
-
102
- public enum DeckVoicePhase: String, Codable, CaseIterable, Sendable {
103
- case idle
104
- case listening
105
- case transcribing
106
- case reasoning
107
- case speaking
108
- }
109
-
110
- public struct DeckDesktopSummary: Codable, Equatable, Sendable {
111
- public var activeLayerName: String?
112
- public var activeAppName: String?
113
- public var screenCount: Int
114
- public var visibleWindowCount: Int
115
- public var sessionCount: Int
116
- public var currentSpaceIndex: Int?
117
- public var currentSpaceName: String?
118
-
119
- public init(
120
- activeLayerName: String? = nil,
121
- activeAppName: String? = nil,
122
- screenCount: Int,
123
- visibleWindowCount: Int,
124
- sessionCount: Int,
125
- currentSpaceIndex: Int? = nil,
126
- currentSpaceName: String? = nil
127
- ) {
128
- self.activeLayerName = activeLayerName
129
- self.activeAppName = activeAppName
130
- self.screenCount = screenCount
131
- self.visibleWindowCount = visibleWindowCount
132
- self.sessionCount = sessionCount
133
- self.currentSpaceIndex = currentSpaceIndex
134
- self.currentSpaceName = currentSpaceName
135
- }
136
- }
137
-
138
- public struct DeckLayoutState: Codable, Equatable, Sendable {
139
- public var screenName: String?
140
- public var frontmostWindow: DeckLayoutFocusWindow?
141
- public var preview: DeckLayoutPreview?
142
-
143
- public init(
144
- screenName: String? = nil,
145
- frontmostWindow: DeckLayoutFocusWindow? = nil,
146
- preview: DeckLayoutPreview? = nil
147
- ) {
148
- self.screenName = screenName
149
- self.frontmostWindow = frontmostWindow
150
- self.preview = preview
151
- }
152
- }
153
-
154
- public struct DeckLayoutFocusWindow: Codable, Equatable, Identifiable, Sendable {
155
- public var id: String
156
- public var itemID: String
157
- public var appName: String
158
- public var title: String?
159
- public var frame: DeckRect
160
- public var normalizedFrame: DeckRect?
161
- public var placement: String?
162
-
163
- public init(
164
- id: String,
165
- itemID: String,
166
- appName: String,
167
- title: String? = nil,
168
- frame: DeckRect,
169
- normalizedFrame: DeckRect? = nil,
170
- placement: String? = nil
171
- ) {
172
- self.id = id
173
- self.itemID = itemID
174
- self.appName = appName
175
- self.title = title
176
- self.frame = frame
177
- self.normalizedFrame = normalizedFrame
178
- self.placement = placement
179
- }
180
- }
181
-
182
- public struct DeckLayoutPreview: Codable, Equatable, Sendable {
183
- public var aspectRatio: Double
184
- public var windows: [DeckLayoutPreviewWindow]
185
- public var displayCount: Int?
186
-
187
- public init(
188
- aspectRatio: Double,
189
- windows: [DeckLayoutPreviewWindow],
190
- displayCount: Int? = nil
191
- ) {
192
- self.aspectRatio = aspectRatio
193
- self.windows = windows
194
- self.displayCount = displayCount
195
- }
196
- }
197
-
198
- public struct DeckLayoutPreviewWindow: Codable, Equatable, Identifiable, Sendable {
199
- public var id: String
200
- public var itemID: String
201
- public var title: String
202
- public var subtitle: String?
203
- public var normalizedFrame: DeckRect
204
- public var appCategory: String?
205
- public var appCategoryTint: String?
206
- public var isFrontmost: Bool
207
- public var displayIndex: Int?
208
-
209
- public init(
210
- id: String,
211
- itemID: String,
212
- title: String,
213
- subtitle: String? = nil,
214
- normalizedFrame: DeckRect,
215
- appCategory: String? = nil,
216
- appCategoryTint: String? = nil,
217
- isFrontmost: Bool = false,
218
- displayIndex: Int? = nil
219
- ) {
220
- self.id = id
221
- self.itemID = itemID
222
- self.title = title
223
- self.subtitle = subtitle
224
- self.normalizedFrame = normalizedFrame
225
- self.appCategory = appCategory
226
- self.appCategoryTint = appCategoryTint
227
- self.isFrontmost = isFrontmost
228
- self.displayIndex = displayIndex
229
- }
230
- }
231
-
232
- public struct DeckRect: Codable, Equatable, Sendable {
233
- public var x: Double
234
- public var y: Double
235
- public var w: Double
236
- public var h: Double
237
-
238
- public init(x: Double, y: Double, w: Double, h: Double) {
239
- self.x = x
240
- self.y = y
241
- self.w = w
242
- self.h = h
243
- }
244
- }
245
-
246
- public struct DeckSwitcherState: Codable, Equatable, Sendable {
247
- public var items: [DeckSwitcherItem]
248
-
249
- public init(items: [DeckSwitcherItem]) {
250
- self.items = items
251
- }
252
- }
253
-
254
- public struct DeckSwitcherItem: Codable, Equatable, Identifiable, Sendable {
255
- public var id: String
256
- public var title: String
257
- public var subtitle: String?
258
- public var iconToken: String?
259
- public var kind: DeckSwitcherItemKind
260
- public var isFrontmost: Bool
261
-
262
- public init(
263
- id: String,
264
- title: String,
265
- subtitle: String? = nil,
266
- iconToken: String? = nil,
267
- kind: DeckSwitcherItemKind,
268
- isFrontmost: Bool = false
269
- ) {
270
- self.id = id
271
- self.title = title
272
- self.subtitle = subtitle
273
- self.iconToken = iconToken
274
- self.kind = kind
275
- self.isFrontmost = isFrontmost
276
- }
277
- }
278
-
279
- public enum DeckSwitcherItemKind: String, Codable, CaseIterable, Sendable {
280
- case application
281
- case window
282
- case tab
283
- case task
284
- case session
285
- }
286
-
287
- public struct DeckHistoryEntry: Codable, Equatable, Identifiable, Sendable {
288
- public var id: String
289
- public var createdAt: Date
290
- public var title: String
291
- public var detail: String?
292
- public var kind: DeckHistoryKind
293
- public var undoActionID: String?
294
-
295
- public init(
296
- id: String,
297
- createdAt: Date = .now,
298
- title: String,
299
- detail: String? = nil,
300
- kind: DeckHistoryKind,
301
- undoActionID: String? = nil
302
- ) {
303
- self.id = id
304
- self.createdAt = createdAt
305
- self.title = title
306
- self.detail = detail
307
- self.kind = kind
308
- self.undoActionID = undoActionID
309
- }
310
- }
311
-
312
- public enum DeckHistoryKind: String, Codable, CaseIterable, Sendable {
313
- case voice
314
- case layout
315
- case switcher
316
- case automation
317
- }
318
-
319
- public struct DeckSystemTelemetry: Codable, Equatable, Sendable {
320
- public var sampledAt: Date
321
- public var cpuLoadPercent: Double?
322
- public var memoryUsedPercent: Double?
323
- public var gpuLoadPercent: Double?
324
- public var thermalPressurePercent: Double?
325
- public var thermalState: DeckThermalState?
326
- public var temperatureCelsius: Double?
327
- public var batteryPercent: Double?
328
- public var isCharging: Bool?
329
- public var powerSource: String?
330
- public var windowCount: Int
331
- public var sessionCount: Int
332
-
333
- public init(
334
- sampledAt: Date = .now,
335
- cpuLoadPercent: Double? = nil,
336
- memoryUsedPercent: Double? = nil,
337
- gpuLoadPercent: Double? = nil,
338
- thermalPressurePercent: Double? = nil,
339
- thermalState: DeckThermalState? = nil,
340
- temperatureCelsius: Double? = nil,
341
- batteryPercent: Double? = nil,
342
- isCharging: Bool? = nil,
343
- powerSource: String? = nil,
344
- windowCount: Int,
345
- sessionCount: Int
346
- ) {
347
- self.sampledAt = sampledAt
348
- self.cpuLoadPercent = cpuLoadPercent
349
- self.memoryUsedPercent = memoryUsedPercent
350
- self.gpuLoadPercent = gpuLoadPercent
351
- self.thermalPressurePercent = thermalPressurePercent
352
- self.thermalState = thermalState
353
- self.temperatureCelsius = temperatureCelsius
354
- self.batteryPercent = batteryPercent
355
- self.isCharging = isCharging
356
- self.powerSource = powerSource
357
- self.windowCount = windowCount
358
- self.sessionCount = sessionCount
359
- }
360
- }
361
-
362
- public enum DeckThermalState: String, Codable, CaseIterable, Sendable {
363
- case nominal
364
- case fair
365
- case serious
366
- case critical
367
- }
368
-
369
- public struct DeckSpacesState: Codable, Equatable, Sendable {
370
- public var currentSpaceIndex: Int?
371
- public var currentSpaceName: String?
372
- public var displays: [DeckSpaceDisplay]
373
-
374
- public init(
375
- currentSpaceIndex: Int? = nil,
376
- currentSpaceName: String? = nil,
377
- displays: [DeckSpaceDisplay]
378
- ) {
379
- self.currentSpaceIndex = currentSpaceIndex
380
- self.currentSpaceName = currentSpaceName
381
- self.displays = displays
382
- }
383
- }
384
-
385
- public struct DeckSpaceDisplay: Codable, Equatable, Identifiable, Sendable {
386
- public var id: String
387
- public var displayIndex: Int
388
- public var currentSpaceID: Int?
389
- public var currentSpaceIndex: Int?
390
- public var currentSpaceName: String?
391
- public var spaces: [DeckSpace]
392
-
393
- public init(
394
- id: String,
395
- displayIndex: Int,
396
- currentSpaceID: Int? = nil,
397
- currentSpaceIndex: Int? = nil,
398
- currentSpaceName: String? = nil,
399
- spaces: [DeckSpace]
400
- ) {
401
- self.id = id
402
- self.displayIndex = displayIndex
403
- self.currentSpaceID = currentSpaceID
404
- self.currentSpaceIndex = currentSpaceIndex
405
- self.currentSpaceName = currentSpaceName
406
- self.spaces = spaces
407
- }
408
- }
409
-
410
- public struct DeckSpace: Codable, Equatable, Identifiable, Sendable {
411
- public var id: Int
412
- public var index: Int
413
- public var name: String?
414
- public var isCurrent: Bool
415
-
416
- public init(id: Int, index: Int, name: String? = nil, isCurrent: Bool) {
417
- self.id = id
418
- self.index = index
419
- self.name = name
420
- self.isCurrent = isCurrent
421
- }
422
- }
423
-
424
- public struct DeckCockpitModeState: Codable, Equatable, Sendable {
425
- public var mode: DeckCockpitMode
426
- public var startedAt: Date?
427
- public var elapsedSeconds: Double?
428
- public var replayMessage: String?
429
- public var replayUndoExpiresAt: Date?
430
- public var replayUndoActionID: String?
431
- public var agentProgress: Double?
432
- public var agentRows: [DeckAgentPlanRow]
433
-
434
- public init(
435
- mode: DeckCockpitMode,
436
- startedAt: Date? = nil,
437
- elapsedSeconds: Double? = nil,
438
- replayMessage: String? = nil,
439
- replayUndoExpiresAt: Date? = nil,
440
- replayUndoActionID: String? = nil,
441
- agentProgress: Double? = nil,
442
- agentRows: [DeckAgentPlanRow] = []
443
- ) {
444
- self.mode = mode
445
- self.startedAt = startedAt
446
- self.elapsedSeconds = elapsedSeconds
447
- self.replayMessage = replayMessage
448
- self.replayUndoExpiresAt = replayUndoExpiresAt
449
- self.replayUndoActionID = replayUndoActionID
450
- self.agentProgress = agentProgress
451
- self.agentRows = agentRows
452
- }
453
- }
454
-
455
- public enum DeckCockpitMode: String, Codable, CaseIterable, Sendable {
456
- case idle
457
- case rec
458
- case replay
459
- case agent
460
- }
461
-
462
- public struct DeckAgentPlanRow: Codable, Equatable, Identifiable, Sendable {
463
- public var id: String
464
- public var state: DeckAgentPlanRowState
465
- public var text: String
466
-
467
- public init(id: String, state: DeckAgentPlanRowState, text: String) {
468
- self.id = id
469
- self.state = state
470
- self.text = text
471
- }
472
- }
473
-
474
- public enum DeckAgentPlanRowState: String, Codable, CaseIterable, Sendable {
475
- case done
476
- case live
477
- case next
478
- }
479
-
480
- public struct DeckActivityLogEntry: Codable, Equatable, Identifiable, Sendable {
481
- public var id: String
482
- public var createdAt: Date
483
- public var tag: String
484
- public var tint: String?
485
- public var text: String
486
-
487
- public init(
488
- id: String,
489
- createdAt: Date = .now,
490
- tag: String,
491
- tint: String? = nil,
492
- text: String
493
- ) {
494
- self.id = id
495
- self.createdAt = createdAt
496
- self.tag = tag
497
- self.tint = tint
498
- self.text = text
499
- }
500
- }
501
-
502
- public struct DeckQuestionCard: Codable, Equatable, Identifiable, Sendable {
503
- public var id: String
504
- public var prompt: String
505
- public var detail: String?
506
- public var options: [DeckQuestionOption]
507
-
508
- public init(
509
- id: String,
510
- prompt: String,
511
- detail: String? = nil,
512
- options: [DeckQuestionOption]
513
- ) {
514
- self.id = id
515
- self.prompt = prompt
516
- self.detail = detail
517
- self.options = options
518
- }
519
- }
520
-
521
- public struct DeckQuestionOption: Codable, Equatable, Identifiable, Sendable {
522
- public var id: String
523
- public var title: String
524
- public var detail: String?
525
- public var actionID: String
526
-
527
- public init(id: String, title: String, detail: String? = nil, actionID: String) {
528
- self.id = id
529
- self.title = title
530
- self.detail = detail
531
- self.actionID = actionID
532
- }
533
- }