@lattices/cli 0.4.14 → 0.6.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 (181) hide show
  1. package/README.md +5 -7
  2. package/apps/mac/Info.plist +4 -4
  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 +60 -1
  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/proposals/LAT-007-unified-app-shell.md +128 -0
  19. package/docs/reference/dewey.config.ts +2 -2
  20. package/docs/release.md +171 -0
  21. package/docs/repo-structure.md +5 -5
  22. package/docs/voice.md +11 -27
  23. package/package.json +11 -10
  24. package/apps/mac/Package.swift +0 -27
  25. package/apps/mac/Sources/AppShell/App.swift +0 -26
  26. package/apps/mac/Sources/AppShell/AppActivationCoordinator.swift +0 -27
  27. package/apps/mac/Sources/AppShell/AppDelegate.swift +0 -189
  28. package/apps/mac/Sources/AppShell/AppServicesBootstrap.swift +0 -25
  29. package/apps/mac/Sources/AppShell/AppShellView.swift +0 -171
  30. package/apps/mac/Sources/AppShell/AppUpdater.swift +0 -305
  31. package/apps/mac/Sources/AppShell/CliActionLauncher.swift +0 -50
  32. package/apps/mac/Sources/AppShell/HomeDashboardView.swift +0 -133
  33. package/apps/mac/Sources/AppShell/HotkeyBootstrap.swift +0 -87
  34. package/apps/mac/Sources/AppShell/KeyRecorderView.swift +0 -210
  35. package/apps/mac/Sources/AppShell/LatticesRuntime.swift +0 -104
  36. package/apps/mac/Sources/AppShell/MainView.swift +0 -847
  37. package/apps/mac/Sources/AppShell/MainWindow.swift +0 -83
  38. package/apps/mac/Sources/AppShell/MenuBarController.swift +0 -177
  39. package/apps/mac/Sources/AppShell/OnboardingView.swift +0 -483
  40. package/apps/mac/Sources/AppShell/PermissionsAssistantView.swift +0 -366
  41. package/apps/mac/Sources/AppShell/PermissionsAssistantWindow.swift +0 -70
  42. package/apps/mac/Sources/AppShell/Preferences.swift +0 -297
  43. package/apps/mac/Sources/AppShell/SettingsView.swift +0 -3163
  44. package/apps/mac/Sources/AppShell/SettingsWindow.swift +0 -34
  45. package/apps/mac/Sources/AppShell/WorkspaceInspectorPresenter.swift +0 -13
  46. package/apps/mac/Sources/Core/Actions/HotkeyManager.swift +0 -256
  47. package/apps/mac/Sources/Core/Actions/HotkeyStore.swift +0 -399
  48. package/apps/mac/Sources/Core/Actions/IntentEngine.swift +0 -988
  49. package/apps/mac/Sources/Core/Actions/IntentSchema.swift +0 -94
  50. package/apps/mac/Sources/Core/Actions/Intents/CreateLayerIntent.swift +0 -54
  51. package/apps/mac/Sources/Core/Actions/Intents/DistributeIntent.swift +0 -56
  52. package/apps/mac/Sources/Core/Actions/Intents/FocusIntent.swift +0 -69
  53. package/apps/mac/Sources/Core/Actions/Intents/HelpIntent.swift +0 -41
  54. package/apps/mac/Sources/Core/Actions/Intents/KillIntent.swift +0 -47
  55. package/apps/mac/Sources/Core/Actions/Intents/LatticeIntent.swift +0 -53
  56. package/apps/mac/Sources/Core/Actions/Intents/LaunchIntent.swift +0 -67
  57. package/apps/mac/Sources/Core/Actions/Intents/ListSessionsIntent.swift +0 -32
  58. package/apps/mac/Sources/Core/Actions/Intents/ListWindowsIntent.swift +0 -30
  59. package/apps/mac/Sources/Core/Actions/Intents/ScanIntent.swift +0 -52
  60. package/apps/mac/Sources/Core/Actions/Intents/SearchIntent.swift +0 -190
  61. package/apps/mac/Sources/Core/Actions/Intents/SwitchLayerIntent.swift +0 -50
  62. package/apps/mac/Sources/Core/Actions/Intents/TileIntent.swift +0 -61
  63. package/apps/mac/Sources/Core/Actions/PaletteCommand.swift +0 -439
  64. package/apps/mac/Sources/Core/Actions/VoiceIntentResolver.swift +0 -713
  65. package/apps/mac/Sources/Core/Companion/CompanionActivityLog.swift +0 -70
  66. package/apps/mac/Sources/Core/Companion/CompanionKeyboardController.swift +0 -141
  67. package/apps/mac/Sources/Core/Companion/LatticesCompanionBridgeServer.swift +0 -454
  68. package/apps/mac/Sources/Core/Companion/LatticesCompanionCockpit.swift +0 -555
  69. package/apps/mac/Sources/Core/Companion/LatticesCompanionSecurityCoordinator.swift +0 -629
  70. package/apps/mac/Sources/Core/Companion/LatticesCompanionTrackpadController.swift +0 -204
  71. package/apps/mac/Sources/Core/Companion/LatticesDeckHost.swift +0 -1463
  72. package/apps/mac/Sources/Core/Daemon/DaemonProtocol.swift +0 -114
  73. package/apps/mac/Sources/Core/Daemon/DaemonServer.swift +0 -427
  74. package/apps/mac/Sources/Core/Daemon/LatticesApi.swift +0 -2965
  75. package/apps/mac/Sources/Core/Desktop/AccessibilityTextExtractor.swift +0 -111
  76. package/apps/mac/Sources/Core/Desktop/AppTypeClassifier.swift +0 -106
  77. package/apps/mac/Sources/Core/Desktop/DesktopModel.swift +0 -331
  78. package/apps/mac/Sources/Core/Desktop/DesktopModelTypes.swift +0 -73
  79. package/apps/mac/Sources/Core/Desktop/InventoryManager.swift +0 -35
  80. package/apps/mac/Sources/Core/Desktop/InventoryPath.swift +0 -43
  81. package/apps/mac/Sources/Core/Desktop/MouseFinder.swift +0 -527
  82. package/apps/mac/Sources/Core/Desktop/OcrModel.swift +0 -467
  83. package/apps/mac/Sources/Core/Desktop/OcrStore.swift +0 -329
  84. package/apps/mac/Sources/Core/Desktop/PlacementSpec.swift +0 -195
  85. package/apps/mac/Sources/Core/Desktop/SessionWindowLocator.swift +0 -139
  86. package/apps/mac/Sources/Core/Desktop/TilePickerView.swift +0 -209
  87. package/apps/mac/Sources/Core/Desktop/WindowCapture.swift +0 -33
  88. package/apps/mac/Sources/Core/Desktop/WindowDragSnapController.swift +0 -429
  89. package/apps/mac/Sources/Core/Desktop/WindowPreviewCard.swift +0 -100
  90. package/apps/mac/Sources/Core/Desktop/WindowPreviewStore.swift +0 -112
  91. package/apps/mac/Sources/Core/Desktop/WindowSelectionStore.swift +0 -76
  92. package/apps/mac/Sources/Core/Desktop/WindowTiler.swift +0 -2222
  93. package/apps/mac/Sources/Core/Input/EventTapBreaker.swift +0 -124
  94. package/apps/mac/Sources/Core/Input/EventTapThread.swift +0 -54
  95. package/apps/mac/Sources/Core/Input/InputCaptureResetCenter.swift +0 -20
  96. package/apps/mac/Sources/Core/Input/KeyboardRemapConfig.swift +0 -69
  97. package/apps/mac/Sources/Core/Input/KeyboardRemapController.swift +0 -346
  98. package/apps/mac/Sources/Core/Input/KeyboardRemapStore.swift +0 -141
  99. package/apps/mac/Sources/Core/Input/MouseGestureConfig.swift +0 -499
  100. package/apps/mac/Sources/Core/Input/MouseGestureController.swift +0 -2583
  101. package/apps/mac/Sources/Core/Input/MouseInputDeviceStore.swift +0 -98
  102. package/apps/mac/Sources/Core/Input/MouseInputEventViewer.swift +0 -272
  103. package/apps/mac/Sources/Core/Input/MouseShortcutStore.swift +0 -170
  104. package/apps/mac/Sources/Core/Input/SecureEventInputMonitor.swift +0 -39
  105. package/apps/mac/Sources/Core/Input/ShapeRecognizer.swift +0 -624
  106. package/apps/mac/Sources/Core/Input/TapBudgetMeter.swift +0 -56
  107. package/apps/mac/Sources/Core/Overlays/AppWindowShell.swift +0 -63
  108. package/apps/mac/Sources/Core/Overlays/CommandMode/CommandModeState.swift +0 -1566
  109. package/apps/mac/Sources/Core/Overlays/CommandMode/CommandModeView.swift +0 -1927
  110. package/apps/mac/Sources/Core/Overlays/CommandMode/CommandModeWindow.swift +0 -196
  111. package/apps/mac/Sources/Core/Overlays/CommandPalette/CommandPaletteView.swift +0 -307
  112. package/apps/mac/Sources/Core/Overlays/CommandPalette/CommandPaletteWindow.swift +0 -67
  113. package/apps/mac/Sources/Core/Overlays/HUD/CheatSheetHUD.swift +0 -576
  114. package/apps/mac/Sources/Core/Overlays/HUD/HUDBottomBar.swift +0 -279
  115. package/apps/mac/Sources/Core/Overlays/HUD/HUDController.swift +0 -1158
  116. package/apps/mac/Sources/Core/Overlays/HUD/HUDLeftBar.swift +0 -849
  117. package/apps/mac/Sources/Core/Overlays/HUD/HUDMinimap.swift +0 -179
  118. package/apps/mac/Sources/Core/Overlays/HUD/HUDRightBar.swift +0 -596
  119. package/apps/mac/Sources/Core/Overlays/HUD/HUDState.swift +0 -367
  120. package/apps/mac/Sources/Core/Overlays/HUD/HUDTopBar.swift +0 -243
  121. package/apps/mac/Sources/Core/Overlays/HUD/LauncherHUD.swift +0 -334
  122. package/apps/mac/Sources/Core/Overlays/HUD/LayerBezel.swift +0 -203
  123. package/apps/mac/Sources/Core/Overlays/OmniSearch/OmniSearchState.swift +0 -280
  124. package/apps/mac/Sources/Core/Overlays/OmniSearch/OmniSearchView.swift +0 -422
  125. package/apps/mac/Sources/Core/Overlays/OmniSearch/OmniSearchWindow.swift +0 -94
  126. package/apps/mac/Sources/Core/Overlays/OverlayPanelShell.swift +0 -241
  127. package/apps/mac/Sources/Core/Overlays/ScreenMap/ScreenMapState.swift +0 -3135
  128. package/apps/mac/Sources/Core/Overlays/ScreenMap/ScreenMapView.swift +0 -3977
  129. package/apps/mac/Sources/Core/Overlays/ScreenMap/ScreenMapWindowController.swift +0 -119
  130. package/apps/mac/Sources/Core/Overlays/ScreenOverlayCanvasController.swift +0 -1217
  131. package/apps/mac/Sources/Core/Overlays/Voice/VoiceCommandWindow.swift +0 -1575
  132. package/apps/mac/Sources/Core/Pi/PiAuthNextStepCard.swift +0 -148
  133. package/apps/mac/Sources/Core/Pi/PiAuthPromptCard.swift +0 -90
  134. package/apps/mac/Sources/Core/Pi/PiChatDock.swift +0 -564
  135. package/apps/mac/Sources/Core/Pi/PiChatSession.swift +0 -1948
  136. package/apps/mac/Sources/Core/Pi/PiInstallCallout.swift +0 -86
  137. package/apps/mac/Sources/Core/Pi/PiProviderSetupCallout.swift +0 -99
  138. package/apps/mac/Sources/Core/Pi/PiWorkspaceView.swift +0 -510
  139. package/apps/mac/Sources/Core/System/Capability.swift +0 -79
  140. package/apps/mac/Sources/Core/System/DiagnosticLog.swift +0 -373
  141. package/apps/mac/Sources/Core/System/EventBus.swift +0 -31
  142. package/apps/mac/Sources/Core/System/PermissionChecker.swift +0 -224
  143. package/apps/mac/Sources/Core/System/ProcessModel.swift +0 -199
  144. package/apps/mac/Sources/Core/System/ProcessQuery.swift +0 -151
  145. package/apps/mac/Sources/Core/System/SystemTelemetryMonitor.swift +0 -273
  146. package/apps/mac/Sources/Core/Voice/AdvisorLearningStore.swift +0 -90
  147. package/apps/mac/Sources/Core/Voice/AgentSession.swift +0 -377
  148. package/apps/mac/Sources/Core/Voice/AudioProvider.swift +0 -555
  149. package/apps/mac/Sources/Core/Voice/HandsOffSession.swift +0 -839
  150. package/apps/mac/Sources/Core/Voice/VoiceChatView.swift +0 -192
  151. package/apps/mac/Sources/Core/Voice/VoxClient.swift +0 -454
  152. package/apps/mac/Sources/Core/Workspace/Project.swift +0 -28
  153. package/apps/mac/Sources/Core/Workspace/ProjectScanner.swift +0 -141
  154. package/apps/mac/Sources/Core/Workspace/SessionLayerStore.swift +0 -285
  155. package/apps/mac/Sources/Core/Workspace/SessionManager.swift +0 -75
  156. package/apps/mac/Sources/Core/Workspace/Terminal/Terminal.swift +0 -259
  157. package/apps/mac/Sources/Core/Workspace/Terminal/TerminalQuery.swift +0 -156
  158. package/apps/mac/Sources/Core/Workspace/Terminal/TerminalSynthesizer.swift +0 -200
  159. package/apps/mac/Sources/Core/Workspace/Tmux/TmuxModel.swift +0 -60
  160. package/apps/mac/Sources/Core/Workspace/Tmux/TmuxQuery.swift +0 -105
  161. package/apps/mac/Sources/Core/Workspace/WorkspaceManager.swift +0 -1027
  162. package/apps/mac/Sources/UI/ActionRow.swift +0 -78
  163. package/apps/mac/Sources/UI/OrphanRow.swift +0 -129
  164. package/apps/mac/Sources/UI/ProjectRow.swift +0 -368
  165. package/apps/mac/Sources/UI/TabGroupRow.swift +0 -178
  166. package/apps/mac/Sources/UI/Theme.swift +0 -164
  167. package/apps/mac/Tests/StageDragTests.swift +0 -333
  168. package/apps/mac/Tests/StageJoinTests.swift +0 -313
  169. package/apps/mac/Tests/StageManagerTests.swift +0 -280
  170. package/apps/mac/Tests/StageTileTests.swift +0 -353
  171. package/swift/Package.swift +0 -20
  172. package/swift/Sources/DeckKit/DeckAction.swift +0 -51
  173. package/swift/Sources/DeckKit/DeckBridgeSecurity.swift +0 -152
  174. package/swift/Sources/DeckKit/DeckCockpit.swift +0 -82
  175. package/swift/Sources/DeckKit/DeckHost.swift +0 -7
  176. package/swift/Sources/DeckKit/DeckManifest.swift +0 -145
  177. package/swift/Sources/DeckKit/DeckRuntimeSnapshot.swift +0 -533
  178. package/swift/Sources/DeckKit/DeckTrackpad.swift +0 -63
  179. package/swift/Sources/DeckKit/DeckValue.swift +0 -93
  180. package/swift/Sources/DeckKit/DeckVoiceError.swift +0 -88
  181. package/swift/Tests/DeckKitTests/DeckKitTests.swift +0 -286
@@ -0,0 +1,171 @@
1
+ ---
2
+ title: Release
3
+ description: Maintainer workflow for macOS DMG and npm releases
4
+ order: 99
5
+ ---
6
+
7
+ ## macOS DMG releases
8
+
9
+ The public macOS app release is a signed, notarized DMG attached to the
10
+ GitHub release `v<version>`.
11
+
12
+ There are two valid DMG paths:
13
+
14
+ 1. CI release: push an `app-macos-v<version>` tag or run the
15
+ **Release App macOS** workflow with `publish=true`.
16
+ 2. Local maintainer release: build and ship from a Mac that has the
17
+ Developer ID certificate and notary profile installed.
18
+
19
+ Unsigned DMGs are smoke-test artifacts only. They should not create or update
20
+ a public GitHub release.
21
+
22
+ ### CI release
23
+
24
+ The workflow reads credentials from the GitHub `release` environment.
25
+
26
+ Required environment secrets:
27
+
28
+ ```text
29
+ DEVELOPER_ID_APPLICATION_CERT_BASE64
30
+ DEVELOPER_ID_APPLICATION_CERT_PASSWORD
31
+ KEYCHAIN_PASSWORD
32
+ APP_STORE_CONNECT_API_KEY_P8
33
+ ```
34
+
35
+ Required environment variable or secret:
36
+
37
+ ```text
38
+ APP_STORE_CONNECT_KEY_ID
39
+ ```
40
+
41
+ Optional environment variable or secret:
42
+
43
+ ```text
44
+ APP_STORE_CONNECT_ISSUER_ID
45
+ ```
46
+
47
+ Set `APP_STORE_CONNECT_ISSUER_ID` for Team API keys. Leave it unset for
48
+ Individual API keys.
49
+
50
+ Setup shape:
51
+
52
+ ```sh
53
+ # Export the Developer ID Application certificate as a .p12, then:
54
+ base64 < DeveloperIDApplication.p12 | tr -d '\n' \
55
+ | gh secret set DEVELOPER_ID_APPLICATION_CERT_BASE64 --repo arach/lattices --env release
56
+
57
+ gh secret set DEVELOPER_ID_APPLICATION_CERT_PASSWORD --repo arach/lattices --env release
58
+ gh secret set KEYCHAIN_PASSWORD --repo arach/lattices --env release
59
+ gh secret set APP_STORE_CONNECT_API_KEY_P8 --repo arach/lattices --env release < AuthKey_KEYID.p8
60
+
61
+ gh variable set APP_STORE_CONNECT_KEY_ID --repo arach/lattices --env release --body KEYID
62
+ gh variable set APP_STORE_CONNECT_ISSUER_ID --repo arach/lattices --env release --body ISSUER_UUID
63
+ ```
64
+
65
+ Release:
66
+
67
+ ```sh
68
+ git tag -a app-macos-v0.5.0 -m "Lattices macOS 0.5.0"
69
+ git push origin app-macos-v0.5.0
70
+ ```
71
+
72
+ The workflow builds `dist/Lattices.dmg`, signs, notarizes, staples, verifies,
73
+ then creates or updates GitHub release `v0.5.0` with both:
74
+
75
+ ```text
76
+ Lattices.dmg
77
+ Lattices-0.5.0.dmg
78
+ ```
79
+
80
+ If publish is requested and signing/notary configuration is missing, the
81
+ workflow must fail. A successful unsigned workflow run is only an artifact
82
+ build, not a release.
83
+
84
+ ### Local maintainer release
85
+
86
+ Use this when GitHub Actions is not provisioned with Apple credentials yet,
87
+ or when intentionally shipping from a local release machine.
88
+
89
+ Preflight:
90
+
91
+ ```sh
92
+ gh auth status
93
+ security find-identity -v -p codesigning
94
+ xcrun notarytool history --keychain-profile notarytool-art | head
95
+ ```
96
+
97
+ Build a signed, notarized DMG:
98
+
99
+ ```sh
100
+ ./tools/release/build-dmg.sh
101
+ ```
102
+
103
+ Build and upload to GitHub Releases:
104
+
105
+ ```sh
106
+ LATTICES_VERSION=0.5.0 ./tools/release/ship.sh dmg
107
+ ```
108
+
109
+ The local ship script now mirrors CI: it creates or updates release `v0.5.0`,
110
+ sets the title to `Lattices 0.5.0`, and uploads both the unversioned and
111
+ versioned DMG assets.
112
+
113
+ ### Unsigned checks
114
+
115
+ For a local smoke DMG:
116
+
117
+ ```sh
118
+ LATTICES_SKIP_SIGN=1 LATTICES_SKIP_NOTARIZE=1 ./tools/release/build-dmg.sh
119
+ ```
120
+
121
+ For CI smoke checks, run **Release App macOS** manually with `publish=false`.
122
+ That path uploads an unsigned workflow artifact and intentionally skips the
123
+ GitHub release step.
124
+
125
+ ## npm releases
126
+
127
+ The CLI package is published as `@lattices/cli`.
128
+
129
+ There are two valid npm paths:
130
+
131
+ 1. CI release: push an `npm-v<version>` tag or run the
132
+ **Release Package npm** workflow with `publish=true`.
133
+ 2. Smoke check: run **Release Package npm** manually with `publish=false`.
134
+
135
+ The npm workflow reads credentials from the GitHub `release` environment.
136
+
137
+ Required environment secret:
138
+
139
+ ```text
140
+ NPM_TOKEN
141
+ ```
142
+
143
+ `NPM_TOKEN` must be an npm automation or granular access token that can
144
+ publish `@lattices/cli`. It currently should authenticate as the npm user
145
+ `arach`; if a different maintainer publishes, set environment variable
146
+ `NPM_EXPECTED_USER` to that npm username.
147
+
148
+ Setup shape:
149
+
150
+ ```sh
151
+ gh secret set NPM_TOKEN --repo arach/lattices --env release
152
+ gh variable set NPM_EXPECTED_USER --repo arach/lattices --env release --body arach
153
+ ```
154
+
155
+ Release:
156
+
157
+ ```sh
158
+ git tag -a npm-v0.5.0 -m "@lattices/cli 0.5.0"
159
+ git push origin npm-v0.5.0
160
+ ```
161
+
162
+ To publish the current `main` without moving a stale tag, run:
163
+
164
+ ```sh
165
+ gh workflow run release-package-npm.yml --repo arach/lattices --ref main -f publish=true
166
+ ```
167
+
168
+ Before publishing, CI now runs `npm whoami` and fails immediately if the token
169
+ is missing, revoked, or belongs to the wrong npm user. This catches the common
170
+ bad-token case before the macOS app prepack build and before npm's less useful
171
+ package-scoped `E404` publish failure.
@@ -14,11 +14,12 @@ for keeping file structure as architecture.
14
14
  | `bin/` | Published TypeScript CLI and app helper entry points. |
15
15
  | `swift/` | Shared Swift package code used by the app. |
16
16
  | `apps/ios/` | iOS companion app experiments and local build state. |
17
- | `apps/site/` | Public marketing site and blog content. |
18
- | `apps/docs-site/` | Astro documentation site. |
17
+ | `apps/site/` | Vite website, documentation, and blog content. |
18
+ | `apps/site/scripts/agent-docs.mjs` | Agent-facing docs collector and static artifact writer. |
19
19
  | `docs/` | Markdown docs and engineering proposals. |
20
20
  | `tools/agents/skills/` | Agent skill pack for driving Lattices. |
21
21
  | `assets/` | Shared release/app assets. |
22
+ | `scripts/` | User/dev entry-point scripts: `install.sh`, `uninstall.sh`, `build.sh`, `run.sh` (root `install.sh` is a shim forwarding here). |
22
23
  | `tools/release/` | Maintainer scripts for building and shipping. |
23
24
  | `tests/` | CLI, daemon, and evaluation tests. |
24
25
 
@@ -27,7 +28,7 @@ for keeping file structure as architecture.
27
28
  The root currently mixes categories:
28
29
 
29
30
  - shipped product surfaces: `apps/mac/`, `bin/`, `swift/`
30
- - websites: `apps/site/`, `apps/docs-site/`
31
+ - website/docs: `apps/site/`
31
32
  - companion experiments: `apps/ios/`
32
33
  - generated or release output: `dist/`
33
34
  - maintainer and agent affordances: `docs/`, `tools/`, `tests/`
@@ -43,8 +44,7 @@ Do not reorganize everything at once. The target is:
43
44
  apps/
44
45
  mac/ # macOS menu bar app
45
46
  ios/ # iOS companion app
46
- site/ # marketing site and blog content
47
- docs-site/ # documentation site
47
+ site/ # website, documentation, and blog content
48
48
 
49
49
  packages/
50
50
  cli/ # current bin/ plus TypeScript package surface
package/docs/voice.md CHANGED
@@ -12,7 +12,7 @@ matches it to an intent, and executes it.
12
12
  ## Quick start
13
13
 
14
14
  1. Install Vox (provides mic + transcription)
15
- 2. Install [Claude Code](https://claude.ai/code) CLI (provides AI advisor)
15
+ 2. Connect an Assistant provider in **Settings > AI**
16
16
  3. Press **Hyper+3** to open the voice command window
17
17
  4. Hold **Option** and speak a command
18
18
  5. Release **Option** — Lattices transcribes and executes
@@ -106,9 +106,9 @@ Trigger an OCR scan of visible windows.
106
106
 
107
107
  ## AI advisor
108
108
 
109
- Every voice command fires a Claude Haiku advisor in parallel. The
110
- advisor provides commentary and follow-up suggestions in the **AI
111
- corner** (bottom-right of the voice command window).
109
+ Every voice command can ask the selected Assistant provider for
110
+ commentary and follow-up suggestions in the **AI corner** (bottom-right
111
+ of the voice command window).
112
112
 
113
113
  When local matching handles the command well, the AI corner shows
114
114
  "no AI needed" with an optional "ask AI" button. When the advisor
@@ -119,21 +119,13 @@ suggestion button.
119
119
 
120
120
  1. You speak a command
121
121
  2. Local intent matching runs immediately (fast, free)
122
- 3. Haiku advisor runs in parallel (takes ~2-5 seconds)
122
+ 3. The selected Assistant provider runs in parallel when connected
123
123
  4. If the advisor suggests something, a button appears in the AI corner
124
124
  5. Click the suggestion to execute it
125
125
  6. If you engage with a suggestion that the local matcher missed,
126
126
  it's recorded in `~/.lattices/advisor-learning.jsonl` for future
127
127
  improvement
128
128
 
129
- ### Session persistence
130
-
131
- The advisor maintains a conversation session across voice commands.
132
- It remembers what you've asked and what worked. When the context
133
- reaches 75% of the model's limit, the session auto-resets.
134
-
135
- Context usage and session cost are shown in the AI corner header.
136
-
137
129
  ## Hands-off inference
138
130
 
139
131
  Hands-off voice uses the shared inference wrapper in `bin/infer.ts`.
@@ -158,17 +150,9 @@ Open **Settings > AI** to configure:
158
150
 
159
151
  | Setting | Default | Description |
160
152
  |---------|---------|-------------|
161
- | Claude CLI path | Auto-detected | Path to the `claude` binary. Checks `~/.local/bin/claude`, `/usr/local/bin/claude`, `/opt/homebrew/bin/claude`, then `which claude`. |
162
- | Advisor model | Haiku | `haiku` (fast, cheap) or `sonnet` (smarter, slower) |
163
- | Budget per session | $0.50 | Maximum spend per Claude CLI invocation |
164
-
165
- ### Installing Claude Code
166
-
167
- ```bash
168
- npm install -g @anthropic-ai/claude-code
169
- ```
170
-
171
- Or see [claude.ai/code](https://claude.ai/code) for other install methods.
153
+ | Assistant provider | OpenAI Codex | Provider used by the in-app chat and provider-backed voice advisor. Supports OAuth providers such as GitHub Copilot and OpenAI Codex plus API-key providers. |
154
+ | Pi runtime | Auto-detected | Installs or refreshes the provider runtime used by the in-app assistant. |
155
+ | Provider credentials | Not authenticated | Sign in with OAuth or save an API key locally for the selected provider. |
172
156
 
173
157
  ## Layout
174
158
 
@@ -179,7 +163,7 @@ The voice command window has four sections:
179
163
  | **History** | Left column | Past commands with expandable details |
180
164
  | **Voice Command** | Center column | Current transcript, matched intent, results |
181
165
  | **Log** | Top-right | Rolling diagnostic log (last 12 entries) |
182
- | **AI Corner** | Bottom-right | Advisor commentary, suggestions, session stats |
166
+ | **AI Corner** | Bottom-right | Advisor commentary, suggestions, provider readiness |
183
167
 
184
168
  ## Search architecture
185
169
 
@@ -231,7 +215,7 @@ mappings and phrase pattern improvements.
231
215
 
232
216
  - **Vox** — provides microphone access and
233
217
  speech-to-text transcription
234
- - **[Claude Code](https://claude.ai/code)** CLI provides the AI advisor
235
- (optional, voice commands work without it but no AI suggestions)
218
+ - **Assistant provider** — enables provider-backed AI suggestions from
219
+ **Settings > AI** (optional, voice commands still work without it)
236
220
  - **Accessibility** permission — for window tiling and focus
237
221
  - **Screen Recording** permission — for window discovery
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lattices/cli",
3
- "version": "0.4.14",
3
+ "version": "0.6.0",
4
4
  "description": "The agentic workspace manager for macOS — turn your desktop into a coherent API",
5
5
  "packageManager": "bun@1.3.11",
6
6
  "engines": {
@@ -31,15 +31,22 @@
31
31
  "./project-twin": "./bin/project-twin.ts"
32
32
  },
33
33
  "scripts": {
34
- "dev": "bun --cwd apps/docs-site dev",
34
+ "dev": "bun --cwd apps/site dev",
35
+ "site:build": "bun --cwd apps/site build",
36
+ "studio:dev": "bun --cwd apps/studio dev",
37
+ "studio:build": "bun --cwd apps/studio build",
38
+ "docs:agent": "bun --cwd apps/site agent-docs",
35
39
  "check": "bun run check:types && bun run check:app",
36
40
  "check:types": "tsc --noEmit",
37
41
  "check:app": "env CLANG_MODULE_CACHE_PATH=/tmp/lattices-clang-cache SWIFTPM_TESTS_MODULECACHE=/tmp/lattices-swiftpm-cache swift build --package-path apps/mac",
38
42
  "test:e2e": "node --experimental-strip-types --test tests/e2e-daemon.test.mjs",
39
43
  "test:e2e:voice": "node --experimental-strip-types tests/eval-voice.js",
40
44
  "typecheck": "bun run check:types",
41
- "build:app-bundle": "bash ./bin/lattices-dev build",
42
- "prepack": "bash ./bin/lattices-dev build"
45
+ "build:app-bundle": "bash ./bin/lattices-build package",
46
+ "build:dev-app": "bash ./bin/lattices-build dev",
47
+ "build:dist": "bash ./bin/lattices-build dist",
48
+ "build:dist:local": "bash ./bin/lattices-build dist:local",
49
+ "prepack": "bash ./bin/lattices-build package"
43
50
  },
44
51
  "type": "module",
45
52
  "os": ["darwin"],
@@ -48,13 +55,7 @@
48
55
  "apps/mac/Info.plist",
49
56
  "apps/mac/Lattices.app",
50
57
  "apps/mac/Lattices.entitlements",
51
- "apps/mac/Package.swift",
52
58
  "apps/mac/Resources",
53
- "apps/mac/Sources",
54
- "apps/mac/Tests",
55
- "swift/Package.swift",
56
- "swift/Sources",
57
- "swift/Tests",
58
59
  "assets/AppIcon.icns",
59
60
  "docs"
60
61
  ],
@@ -1,27 +0,0 @@
1
- // swift-tools-version: 5.9
2
- import PackageDescription
3
-
4
- let package = Package(
5
- name: "Lattices",
6
- platforms: [.macOS(.v13)],
7
- dependencies: [
8
- .package(path: "../../swift")
9
- ],
10
- targets: [
11
- .executableTarget(
12
- name: "Lattices",
13
- dependencies: [
14
- .product(name: "DeckKit", package: "swift")
15
- ],
16
- path: "Sources",
17
- resources: [
18
- .copy("../Resources/tap.wav"),
19
- .copy("../Resources/Pets"),
20
- ]
21
- ),
22
- .testTarget(
23
- name: "LatticesTests",
24
- path: "Tests"
25
- )
26
- ]
27
- )
@@ -1,26 +0,0 @@
1
- import SwiftUI
2
-
3
- @main
4
- struct LatticesApp: App {
5
- @NSApplicationDelegateAdaptor(AppDelegate.self) var delegate
6
-
7
- var body: some Scene {
8
- Settings {
9
- SettingsContentView(
10
- prefs: Preferences.shared,
11
- scanner: ProjectScanner.shared
12
- )
13
- .frame(width: 900, height: 640)
14
- }
15
- .commands {
16
- CommandGroup(after: .appInfo) {
17
- Button("Update Lattices…") {
18
- AppUpdater.shared.promptForUpdate()
19
- }
20
- .disabled(!AppUpdater.shared.canUpdate)
21
-
22
- Divider()
23
- }
24
- }
25
- }
26
- }
@@ -1,27 +0,0 @@
1
- import AppKit
2
-
3
- final class AppActivationCoordinator {
4
- static let shared = AppActivationCoordinator()
5
-
6
- private var surfaceVisibilityProviders: [(id: String, isVisible: () -> Bool)] = []
7
-
8
- private init() {}
9
-
10
- func registerSurface(id: String, isVisible: @escaping () -> Bool) {
11
- guard !surfaceVisibilityProviders.contains(where: { $0.id == id }) else { return }
12
- surfaceVisibilityProviders.append((id: id, isVisible: isVisible))
13
- }
14
-
15
- func refresh() {
16
- let hasVisibleWindow = surfaceVisibilityProviders.contains { provider in
17
- provider.isVisible()
18
- }
19
- let desired: NSApplication.ActivationPolicy = hasVisibleWindow ? .regular : .accessory
20
- if NSApp.activationPolicy() != desired {
21
- NSApp.setActivationPolicy(desired)
22
- if desired == .regular {
23
- NSApp.activate(ignoringOtherApps: true)
24
- }
25
- }
26
- }
27
- }
@@ -1,189 +0,0 @@
1
- import AppKit
2
- import Carbon
3
-
4
- extension Notification.Name {
5
- static let latticesPopoverWillShow = Notification.Name("latticesPopoverWillShow")
6
- static let latticesShowGeneralSettings = Notification.Name("latticesShowGeneralSettings")
7
- static let latticesShowAssistantSettings = Notification.Name("latticesShowAssistantSettings")
8
- }
9
-
10
- class AppDelegate: NSObject, NSApplicationDelegate {
11
- private var notificationObservers: [NSObjectProtocol] = []
12
-
13
- static func updateActivationPolicy() {
14
- AppActivationCoordinator.shared.refresh()
15
- }
16
-
17
- func applicationDidFinishLaunching(_ notification: Notification) {
18
- NSApp.setActivationPolicy(.accessory)
19
- NSApp.appearance = NSAppearance(named: .darkAqua)
20
- registerDeepLinkHandler()
21
- installSystemInputBoundaryObservers()
22
-
23
- MenuBarController.shared.start()
24
- registerVisibleSurfaces()
25
- HotkeyBootstrap.registerHotkeys()
26
-
27
- DispatchQueue.main.async { HUDController.shared.warmUp() }
28
- DispatchQueue.main.async { MenuBarController.shared.warmUpPopover() }
29
- DispatchQueue.main.async { ScreenOverlayCanvasController.shared.warmUp() }
30
-
31
- WindowDragSnapController.shared.start()
32
- MouseGestureController.shared.start()
33
- KeyboardRemapController.shared.start()
34
- SecureEventInputMonitor.shared.start()
35
-
36
- if !OnboardingWindowController.shared.showIfNeeded() {
37
- PermissionChecker.shared.check()
38
- }
39
-
40
- AppServicesBootstrap.start()
41
-
42
- Task {
43
- await AppUpdater.shared.checkIfNeeded()
44
- }
45
-
46
- // --diagnostics flag: auto-open diagnostics panel on launch
47
- if CommandLine.arguments.contains("--diagnostics") {
48
- DispatchQueue.main.asyncAfter(deadline: .now() + 0.5) {
49
- DiagnosticWindow.shared.show()
50
- }
51
- }
52
-
53
- // --screen-map flag: auto-open layout on launch
54
- if CommandLine.arguments.contains("--screen-map") {
55
- DispatchQueue.main.asyncAfter(deadline: .now() + 0.5) {
56
- ScreenMapWindowController.shared.showPage(.screenMap)
57
- }
58
- }
59
-
60
- // Explicit preview entry point for development/demo flows. This still
61
- // requires a launch argument; the assistant never opens automatically.
62
- if CommandLine.arguments.contains("--permissions-assistant") {
63
- DispatchQueue.main.asyncAfter(deadline: .now() + 0.5) {
64
- PermissionsAssistantWindowController.shared.show()
65
- }
66
- }
67
- }
68
-
69
- func applicationWillTerminate(_ notification: Notification) {
70
- removeSystemInputBoundaryObservers()
71
- SecureEventInputMonitor.shared.stop()
72
- KeyboardRemapController.shared.stop()
73
- AppServicesBootstrap.stop()
74
- }
75
-
76
- func applicationDidBecomeActive(_ notification: Notification) {
77
- resetInputCapture(reason: "app became active")
78
- }
79
-
80
- func applicationWillResignActive(_ notification: Notification) {
81
- resetInputCapture(reason: "app resigned active")
82
- }
83
-
84
- private func registerVisibleSurfaces() {
85
- let coordinator = AppActivationCoordinator.shared
86
- coordinator.registerSurface(id: "menuBarPopover") { MenuBarController.shared.isPopoverShown }
87
- coordinator.registerSurface(id: "commandMode") { CommandModeWindow.shared.isVisible }
88
- coordinator.registerSurface(id: "commandPalette") { CommandPaletteWindow.shared.isVisible }
89
- coordinator.registerSurface(id: "mainWindow") { MainWindow.shared.isVisible }
90
- coordinator.registerSurface(id: "screenMap") { ScreenMapWindowController.shared.isVisible }
91
- coordinator.registerSurface(id: "omniSearch") { OmniSearchWindow.shared.isVisible }
92
- }
93
-
94
- private func installSystemInputBoundaryObservers() {
95
- let center = NSWorkspace.shared.notificationCenter
96
- notificationObservers.append(center.addObserver(
97
- forName: NSWorkspace.willSleepNotification,
98
- object: nil,
99
- queue: .main
100
- ) { [weak self] _ in
101
- self?.resetInputCapture(reason: "system will sleep")
102
- })
103
- notificationObservers.append(center.addObserver(
104
- forName: NSWorkspace.didWakeNotification,
105
- object: nil,
106
- queue: .main
107
- ) { [weak self] _ in
108
- self?.resetInputCapture(reason: "system did wake")
109
- })
110
- notificationObservers.append(center.addObserver(
111
- forName: NSWorkspace.screensDidWakeNotification,
112
- object: nil,
113
- queue: .main
114
- ) { [weak self] _ in
115
- self?.resetInputCapture(reason: "screens did wake")
116
- })
117
- notificationObservers.append(center.addObserver(
118
- forName: NSWorkspace.screensDidSleepNotification,
119
- object: nil,
120
- queue: .main
121
- ) { [weak self] _ in
122
- self?.resetInputCapture(reason: "screens did sleep")
123
- })
124
- }
125
-
126
- private func removeSystemInputBoundaryObservers() {
127
- let center = NSWorkspace.shared.notificationCenter
128
- for observer in notificationObservers {
129
- center.removeObserver(observer)
130
- }
131
- notificationObservers.removeAll()
132
- }
133
-
134
- private func resetInputCapture(reason: String) {
135
- InputCaptureResetCenter.reset(reason: reason)
136
- }
137
-
138
- // MARK: - Deep Links
139
-
140
- private func registerDeepLinkHandler() {
141
- NSAppleEventManager.shared().setEventHandler(
142
- self,
143
- andSelector: #selector(handleGetURLEvent(_:withReplyEvent:)),
144
- forEventClass: AEEventClass(kInternetEventClass),
145
- andEventID: AEEventID(kAEGetURL)
146
- )
147
- }
148
-
149
- @objc private func handleGetURLEvent(
150
- _ event: NSAppleEventDescriptor,
151
- withReplyEvent replyEvent: NSAppleEventDescriptor
152
- ) {
153
- guard
154
- let value = event.paramDescriptor(forKeyword: keyDirectObject)?.stringValue,
155
- let url = URL(string: value)
156
- else {
157
- return
158
- }
159
- handleDeepLink(url)
160
- }
161
-
162
- private func handleDeepLink(_ url: URL) {
163
- guard url.scheme?.localizedCaseInsensitiveCompare("lattices") == .orderedSame else {
164
- return
165
- }
166
-
167
- let host = url.host?.lowercased()
168
- let action = url.pathComponents
169
- .first { $0 != "/" }?
170
- .lowercased()
171
-
172
- guard host == "companion" else {
173
- SettingsWindowController.shared.show()
174
- return
175
- }
176
-
177
- switch action {
178
- case "enable", "start":
179
- Preferences.shared.companionBridgeEnabled = true
180
- SettingsWindowController.shared.showCompanion()
181
- case "disable", "stop":
182
- Preferences.shared.companionBridgeEnabled = false
183
- SettingsWindowController.shared.showCompanion()
184
- default:
185
- SettingsWindowController.shared.showCompanion()
186
- }
187
- }
188
-
189
- }
@@ -1,25 +0,0 @@
1
- enum AppServicesBootstrap {
2
- static func start() {
3
- let diagnosticLog = DiagnosticLog.shared
4
- let timedBoot = diagnosticLog.startTimed("Daemon services boot")
5
- OcrStore.shared.open()
6
- DesktopModel.shared.start()
7
- OcrModel.shared.start()
8
- TmuxModel.shared.start()
9
- ProcessModel.shared.start()
10
- LatticesApi.setup()
11
- DaemonServer.shared.start()
12
- if Preferences.shared.companionBridgeEnabled {
13
- LatticesCompanionBridgeServer.shared.start()
14
- } else {
15
- diagnosticLog.info("CompanionBridge: disabled by preference")
16
- }
17
- AgentPool.shared.start()
18
- diagnosticLog.finish(timedBoot)
19
- }
20
-
21
- static func stop() {
22
- LatticesCompanionBridgeServer.shared.stop()
23
- DaemonServer.shared.stop()
24
- }
25
- }