@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.
- package/README.md +5 -7
- package/apps/mac/Info.plist +2 -2
- package/apps/mac/Lattices.app/Contents/Info.plist +4 -12
- package/apps/mac/Lattices.app/Contents/MacOS/Lattices +0 -0
- package/bin/lattices-app.ts +110 -17
- package/bin/lattices-build +125 -0
- package/bin/lattices-dev +89 -16
- package/bin/lattices.ts +977 -16
- package/docs/agents.md +81 -4
- package/docs/ai-chat-ux-review.md +416 -0
- package/docs/api.md +135 -3
- package/docs/app.md +30 -8
- package/docs/config.md +4 -0
- package/docs/mouse-gestures.md +191 -63
- package/docs/proposals/LAT-004-interactive-overlay-actors.md +1 -1
- package/docs/proposals/LAT-005-action-runtime-product-spine.md +914 -0
- package/docs/proposals/LAT-006-mira-in-lattices.md +553 -0
- package/docs/reference/dewey.config.ts +2 -2
- package/docs/release.md +171 -0
- package/docs/repo-structure.md +4 -5
- package/docs/voice.md +11 -27
- package/package.json +9 -10
- package/apps/mac/Package.swift +0 -27
- package/apps/mac/Sources/AppShell/App.swift +0 -26
- package/apps/mac/Sources/AppShell/AppActivationCoordinator.swift +0 -27
- package/apps/mac/Sources/AppShell/AppDelegate.swift +0 -189
- package/apps/mac/Sources/AppShell/AppServicesBootstrap.swift +0 -25
- package/apps/mac/Sources/AppShell/AppShellView.swift +0 -171
- package/apps/mac/Sources/AppShell/AppUpdater.swift +0 -305
- package/apps/mac/Sources/AppShell/CliActionLauncher.swift +0 -50
- package/apps/mac/Sources/AppShell/HomeDashboardView.swift +0 -133
- package/apps/mac/Sources/AppShell/HotkeyBootstrap.swift +0 -87
- package/apps/mac/Sources/AppShell/KeyRecorderView.swift +0 -210
- package/apps/mac/Sources/AppShell/LatticesRuntime.swift +0 -104
- package/apps/mac/Sources/AppShell/MainView.swift +0 -847
- package/apps/mac/Sources/AppShell/MainWindow.swift +0 -83
- package/apps/mac/Sources/AppShell/MenuBarController.swift +0 -177
- package/apps/mac/Sources/AppShell/OnboardingView.swift +0 -483
- package/apps/mac/Sources/AppShell/PermissionsAssistantView.swift +0 -366
- package/apps/mac/Sources/AppShell/PermissionsAssistantWindow.swift +0 -70
- package/apps/mac/Sources/AppShell/Preferences.swift +0 -297
- package/apps/mac/Sources/AppShell/SettingsView.swift +0 -3163
- package/apps/mac/Sources/AppShell/SettingsWindow.swift +0 -34
- package/apps/mac/Sources/AppShell/WorkspaceInspectorPresenter.swift +0 -13
- package/apps/mac/Sources/Core/Actions/HotkeyManager.swift +0 -256
- package/apps/mac/Sources/Core/Actions/HotkeyStore.swift +0 -399
- package/apps/mac/Sources/Core/Actions/IntentEngine.swift +0 -988
- package/apps/mac/Sources/Core/Actions/IntentSchema.swift +0 -94
- package/apps/mac/Sources/Core/Actions/Intents/CreateLayerIntent.swift +0 -54
- package/apps/mac/Sources/Core/Actions/Intents/DistributeIntent.swift +0 -56
- package/apps/mac/Sources/Core/Actions/Intents/FocusIntent.swift +0 -69
- package/apps/mac/Sources/Core/Actions/Intents/HelpIntent.swift +0 -41
- package/apps/mac/Sources/Core/Actions/Intents/KillIntent.swift +0 -47
- package/apps/mac/Sources/Core/Actions/Intents/LatticeIntent.swift +0 -53
- package/apps/mac/Sources/Core/Actions/Intents/LaunchIntent.swift +0 -67
- package/apps/mac/Sources/Core/Actions/Intents/ListSessionsIntent.swift +0 -32
- package/apps/mac/Sources/Core/Actions/Intents/ListWindowsIntent.swift +0 -30
- package/apps/mac/Sources/Core/Actions/Intents/ScanIntent.swift +0 -52
- package/apps/mac/Sources/Core/Actions/Intents/SearchIntent.swift +0 -190
- package/apps/mac/Sources/Core/Actions/Intents/SwitchLayerIntent.swift +0 -50
- package/apps/mac/Sources/Core/Actions/Intents/TileIntent.swift +0 -61
- package/apps/mac/Sources/Core/Actions/PaletteCommand.swift +0 -439
- package/apps/mac/Sources/Core/Actions/VoiceIntentResolver.swift +0 -713
- package/apps/mac/Sources/Core/Companion/CompanionActivityLog.swift +0 -70
- package/apps/mac/Sources/Core/Companion/CompanionKeyboardController.swift +0 -141
- package/apps/mac/Sources/Core/Companion/LatticesCompanionBridgeServer.swift +0 -454
- package/apps/mac/Sources/Core/Companion/LatticesCompanionCockpit.swift +0 -555
- package/apps/mac/Sources/Core/Companion/LatticesCompanionSecurityCoordinator.swift +0 -629
- package/apps/mac/Sources/Core/Companion/LatticesCompanionTrackpadController.swift +0 -204
- package/apps/mac/Sources/Core/Companion/LatticesDeckHost.swift +0 -1463
- package/apps/mac/Sources/Core/Daemon/DaemonProtocol.swift +0 -114
- package/apps/mac/Sources/Core/Daemon/DaemonServer.swift +0 -427
- package/apps/mac/Sources/Core/Daemon/LatticesApi.swift +0 -2965
- package/apps/mac/Sources/Core/Desktop/AccessibilityTextExtractor.swift +0 -111
- package/apps/mac/Sources/Core/Desktop/AppTypeClassifier.swift +0 -106
- package/apps/mac/Sources/Core/Desktop/DesktopModel.swift +0 -331
- package/apps/mac/Sources/Core/Desktop/DesktopModelTypes.swift +0 -73
- package/apps/mac/Sources/Core/Desktop/InventoryManager.swift +0 -35
- package/apps/mac/Sources/Core/Desktop/InventoryPath.swift +0 -43
- package/apps/mac/Sources/Core/Desktop/MouseFinder.swift +0 -527
- package/apps/mac/Sources/Core/Desktop/OcrModel.swift +0 -467
- package/apps/mac/Sources/Core/Desktop/OcrStore.swift +0 -329
- package/apps/mac/Sources/Core/Desktop/PlacementSpec.swift +0 -195
- package/apps/mac/Sources/Core/Desktop/SessionWindowLocator.swift +0 -139
- package/apps/mac/Sources/Core/Desktop/TilePickerView.swift +0 -209
- package/apps/mac/Sources/Core/Desktop/WindowCapture.swift +0 -33
- package/apps/mac/Sources/Core/Desktop/WindowDragSnapController.swift +0 -429
- package/apps/mac/Sources/Core/Desktop/WindowPreviewCard.swift +0 -100
- package/apps/mac/Sources/Core/Desktop/WindowPreviewStore.swift +0 -112
- package/apps/mac/Sources/Core/Desktop/WindowSelectionStore.swift +0 -76
- package/apps/mac/Sources/Core/Desktop/WindowTiler.swift +0 -2222
- package/apps/mac/Sources/Core/Input/EventTapBreaker.swift +0 -124
- package/apps/mac/Sources/Core/Input/EventTapThread.swift +0 -54
- package/apps/mac/Sources/Core/Input/InputCaptureResetCenter.swift +0 -20
- package/apps/mac/Sources/Core/Input/KeyboardRemapConfig.swift +0 -69
- package/apps/mac/Sources/Core/Input/KeyboardRemapController.swift +0 -346
- package/apps/mac/Sources/Core/Input/KeyboardRemapStore.swift +0 -141
- package/apps/mac/Sources/Core/Input/MouseGestureConfig.swift +0 -499
- package/apps/mac/Sources/Core/Input/MouseGestureController.swift +0 -2271
- package/apps/mac/Sources/Core/Input/MouseInputDeviceStore.swift +0 -98
- package/apps/mac/Sources/Core/Input/MouseInputEventViewer.swift +0 -272
- package/apps/mac/Sources/Core/Input/MouseShortcutStore.swift +0 -170
- package/apps/mac/Sources/Core/Input/SecureEventInputMonitor.swift +0 -39
- package/apps/mac/Sources/Core/Input/ShapeRecognizer.swift +0 -624
- package/apps/mac/Sources/Core/Input/TapBudgetMeter.swift +0 -56
- package/apps/mac/Sources/Core/Overlays/AppWindowShell.swift +0 -63
- package/apps/mac/Sources/Core/Overlays/CommandMode/CommandModeState.swift +0 -1566
- package/apps/mac/Sources/Core/Overlays/CommandMode/CommandModeView.swift +0 -1927
- package/apps/mac/Sources/Core/Overlays/CommandMode/CommandModeWindow.swift +0 -196
- package/apps/mac/Sources/Core/Overlays/CommandPalette/CommandPaletteView.swift +0 -307
- package/apps/mac/Sources/Core/Overlays/CommandPalette/CommandPaletteWindow.swift +0 -67
- package/apps/mac/Sources/Core/Overlays/HUD/CheatSheetHUD.swift +0 -576
- package/apps/mac/Sources/Core/Overlays/HUD/HUDBottomBar.swift +0 -279
- package/apps/mac/Sources/Core/Overlays/HUD/HUDController.swift +0 -1158
- package/apps/mac/Sources/Core/Overlays/HUD/HUDLeftBar.swift +0 -849
- package/apps/mac/Sources/Core/Overlays/HUD/HUDMinimap.swift +0 -179
- package/apps/mac/Sources/Core/Overlays/HUD/HUDRightBar.swift +0 -596
- package/apps/mac/Sources/Core/Overlays/HUD/HUDState.swift +0 -367
- package/apps/mac/Sources/Core/Overlays/HUD/HUDTopBar.swift +0 -243
- package/apps/mac/Sources/Core/Overlays/HUD/LauncherHUD.swift +0 -334
- package/apps/mac/Sources/Core/Overlays/HUD/LayerBezel.swift +0 -203
- package/apps/mac/Sources/Core/Overlays/OmniSearch/OmniSearchState.swift +0 -280
- package/apps/mac/Sources/Core/Overlays/OmniSearch/OmniSearchView.swift +0 -422
- package/apps/mac/Sources/Core/Overlays/OmniSearch/OmniSearchWindow.swift +0 -94
- package/apps/mac/Sources/Core/Overlays/OverlayPanelShell.swift +0 -241
- package/apps/mac/Sources/Core/Overlays/ScreenMap/ScreenMapState.swift +0 -3135
- package/apps/mac/Sources/Core/Overlays/ScreenMap/ScreenMapView.swift +0 -3977
- package/apps/mac/Sources/Core/Overlays/ScreenMap/ScreenMapWindowController.swift +0 -119
- package/apps/mac/Sources/Core/Overlays/ScreenOverlayCanvasController.swift +0 -1217
- package/apps/mac/Sources/Core/Overlays/Voice/VoiceCommandWindow.swift +0 -1575
- package/apps/mac/Sources/Core/Pi/PiAuthNextStepCard.swift +0 -148
- package/apps/mac/Sources/Core/Pi/PiAuthPromptCard.swift +0 -90
- package/apps/mac/Sources/Core/Pi/PiChatDock.swift +0 -564
- package/apps/mac/Sources/Core/Pi/PiChatSession.swift +0 -1948
- package/apps/mac/Sources/Core/Pi/PiInstallCallout.swift +0 -86
- package/apps/mac/Sources/Core/Pi/PiProviderSetupCallout.swift +0 -99
- package/apps/mac/Sources/Core/Pi/PiWorkspaceView.swift +0 -510
- package/apps/mac/Sources/Core/System/Capability.swift +0 -79
- package/apps/mac/Sources/Core/System/DiagnosticLog.swift +0 -373
- package/apps/mac/Sources/Core/System/EventBus.swift +0 -31
- package/apps/mac/Sources/Core/System/PermissionChecker.swift +0 -224
- package/apps/mac/Sources/Core/System/ProcessModel.swift +0 -199
- package/apps/mac/Sources/Core/System/ProcessQuery.swift +0 -151
- package/apps/mac/Sources/Core/System/SystemTelemetryMonitor.swift +0 -273
- package/apps/mac/Sources/Core/Voice/AdvisorLearningStore.swift +0 -90
- package/apps/mac/Sources/Core/Voice/AgentSession.swift +0 -377
- package/apps/mac/Sources/Core/Voice/AudioProvider.swift +0 -555
- package/apps/mac/Sources/Core/Voice/HandsOffSession.swift +0 -839
- package/apps/mac/Sources/Core/Voice/VoiceChatView.swift +0 -192
- package/apps/mac/Sources/Core/Voice/VoxClient.swift +0 -454
- package/apps/mac/Sources/Core/Workspace/Project.swift +0 -28
- package/apps/mac/Sources/Core/Workspace/ProjectScanner.swift +0 -141
- package/apps/mac/Sources/Core/Workspace/SessionLayerStore.swift +0 -285
- package/apps/mac/Sources/Core/Workspace/SessionManager.swift +0 -75
- package/apps/mac/Sources/Core/Workspace/Terminal/Terminal.swift +0 -259
- package/apps/mac/Sources/Core/Workspace/Terminal/TerminalQuery.swift +0 -156
- package/apps/mac/Sources/Core/Workspace/Terminal/TerminalSynthesizer.swift +0 -200
- package/apps/mac/Sources/Core/Workspace/Tmux/TmuxModel.swift +0 -60
- package/apps/mac/Sources/Core/Workspace/Tmux/TmuxQuery.swift +0 -105
- package/apps/mac/Sources/Core/Workspace/WorkspaceManager.swift +0 -1027
- package/apps/mac/Sources/UI/ActionRow.swift +0 -78
- package/apps/mac/Sources/UI/OrphanRow.swift +0 -129
- package/apps/mac/Sources/UI/ProjectRow.swift +0 -368
- package/apps/mac/Sources/UI/TabGroupRow.swift +0 -178
- package/apps/mac/Sources/UI/Theme.swift +0 -164
- package/apps/mac/Tests/StageDragTests.swift +0 -333
- package/apps/mac/Tests/StageJoinTests.swift +0 -313
- package/apps/mac/Tests/StageManagerTests.swift +0 -280
- package/apps/mac/Tests/StageTileTests.swift +0 -353
- package/swift/Package.swift +0 -20
- package/swift/Sources/DeckKit/DeckAction.swift +0 -51
- package/swift/Sources/DeckKit/DeckBridgeSecurity.swift +0 -152
- package/swift/Sources/DeckKit/DeckCockpit.swift +0 -82
- package/swift/Sources/DeckKit/DeckHost.swift +0 -7
- package/swift/Sources/DeckKit/DeckManifest.swift +0 -145
- package/swift/Sources/DeckKit/DeckRuntimeSnapshot.swift +0 -533
- package/swift/Sources/DeckKit/DeckTrackpad.swift +0 -63
- package/swift/Sources/DeckKit/DeckValue.swift +0 -93
- package/swift/Sources/DeckKit/DeckVoiceError.swift +0 -88
- package/swift/Tests/DeckKitTests/DeckKitTests.swift +0 -286
package/docs/api.md
CHANGED
|
@@ -167,9 +167,10 @@ agent-visible UI. Use `overlay.publish` for transient passive visuals,
|
|
|
167
167
|
and `overlay.actor.*` for persistent, movable actor surfaces.
|
|
168
168
|
|
|
169
169
|
Persistent actors are useful for representing agents or processes on the
|
|
170
|
-
desktop. Each actor has a stable `id`, can be moved independently
|
|
171
|
-
dragged by the user,
|
|
172
|
-
|
|
170
|
+
desktop. Each actor has a stable `id`, can be moved independently through the
|
|
171
|
+
API, dragged by the user, hidden/restored with **Hyper+B**, and closed with
|
|
172
|
+
right-click. Click event callbacks and action surfaces are planned follow-on
|
|
173
|
+
capabilities.
|
|
173
174
|
|
|
174
175
|
| Method | Type | Description |
|
|
175
176
|
|--------|------|-------------|
|
|
@@ -177,6 +178,8 @@ an actor to close that specific actor.
|
|
|
177
178
|
| `overlay.clear` | write | Clear one overlay layer by id, or clear an owner namespace |
|
|
178
179
|
| `overlay.actor.publish` | write | Create or update a persistent generative overlay actor |
|
|
179
180
|
| `overlay.actor.moveTo` | write | Move an actor with app-owned easing |
|
|
181
|
+
| `overlay.actor.hud` | write | Attach, update, or clear a hover web HUD for an actor |
|
|
182
|
+
| `overlay.actor.visibility` | write | Show, hide, toggle, or inspect the sticky actor layer |
|
|
180
183
|
|
|
181
184
|
#### `overlay.publish`
|
|
182
185
|
|
|
@@ -229,11 +232,29 @@ omit `ttlMs` or pass `0`, and `dismissible` defaults to `false`.
|
|
|
229
232
|
| `state` | string | no | Actor state or animation name |
|
|
230
233
|
| `name` | string | no | Actor display name |
|
|
231
234
|
| `message` | string | no | Attached message text |
|
|
235
|
+
| `targetApp` | string | no | App name to activate when the actor is clicked |
|
|
236
|
+
| `targetBundleId` | string | no | Bundle identifier to activate when the actor is clicked |
|
|
237
|
+
| `targetAppPath` | string | no | `.app` bundle path to open when the actor is clicked |
|
|
238
|
+
| `scale` | double | no | Actor scale multiplier |
|
|
239
|
+
| `labelHidden` | bool | no | Hide the actor label/message |
|
|
240
|
+
| `closeOnActivate` | bool | no | Remove the actor after activating its target app |
|
|
241
|
+
| `hudUrl` | string | no | URL to render in a transparent hover HUD web view |
|
|
242
|
+
| `hudHTML` | string | no | Inline HTML to render in a transparent hover HUD web view |
|
|
243
|
+
| `hudWidth` | double | no | Hover HUD width |
|
|
244
|
+
| `hudHeight` | double | no | Hover HUD height |
|
|
245
|
+
| `hudReadAccess` | string | no | Local folder a file-backed HUD may read |
|
|
232
246
|
| `placement` | string | no | `top`, `bottom`, `center`, `cursor`, or `point` |
|
|
233
247
|
| `x`, `y` | double | no | Screen-local point for `point` placement |
|
|
234
248
|
| `ttlMs` | int | no | Time to live; `0` means persistent |
|
|
235
249
|
| `dismissible` | bool | no | Whether click-away dismissal removes the actor |
|
|
236
250
|
|
|
251
|
+
Bundled sprite assets:
|
|
252
|
+
|
|
253
|
+
| Asset | Notes |
|
|
254
|
+
|-------|-------|
|
|
255
|
+
| `assistant-spark` | Animated states include `idle`, `run_right`, `run_left`, `waving`, `jumping`, `failed`, `waiting`, `running`, and `review` |
|
|
256
|
+
| `scout-ranger` | Bundled sprite asset with default frame fallback |
|
|
257
|
+
|
|
237
258
|
Example:
|
|
238
259
|
|
|
239
260
|
```js
|
|
@@ -277,6 +298,117 @@ await daemonCall('overlay.actor.moveTo', {
|
|
|
277
298
|
})
|
|
278
299
|
```
|
|
279
300
|
|
|
301
|
+
#### `overlay.actor.hud`
|
|
302
|
+
|
|
303
|
+
Attach a transparent, blurred hover HUD to an actor. The HUD is backed by a
|
|
304
|
+
native `WKWebView`, so apps can point it at a local static HTML dashboard or,
|
|
305
|
+
in development, a local URL.
|
|
306
|
+
|
|
307
|
+
**Params**:
|
|
308
|
+
|
|
309
|
+
| Field | Type | Required | Description |
|
|
310
|
+
|-------|------|----------|-------------|
|
|
311
|
+
| `id` | string | yes | Actor id |
|
|
312
|
+
| `hudUrl` | string | no | URL or file path to render |
|
|
313
|
+
| `hudHTML` | string | no | Inline HTML to render instead of a URL |
|
|
314
|
+
| `hudTitle` | string | no | HUD title metadata |
|
|
315
|
+
| `hudWidth` | double | no | HUD width |
|
|
316
|
+
| `hudHeight` | double | no | HUD height |
|
|
317
|
+
| `hudReadAccess` | string | no | Local folder a file-backed HUD may read |
|
|
318
|
+
| `clear` | bool | no | Remove the actor HUD |
|
|
319
|
+
|
|
320
|
+
Example:
|
|
321
|
+
|
|
322
|
+
```js
|
|
323
|
+
await daemonCall('overlay.actor.hud', {
|
|
324
|
+
id: 'switch-talkie',
|
|
325
|
+
hudUrl: '/Users/you/dev/talkie/.lattices/hud/index.html',
|
|
326
|
+
hudReadAccess: '/Users/you/Library/Application Support/Talkie/HUD',
|
|
327
|
+
hudWidth: 380,
|
|
328
|
+
hudHeight: 260
|
|
329
|
+
})
|
|
330
|
+
```
|
|
331
|
+
|
|
332
|
+
#### `overlay.actor.visibility`
|
|
333
|
+
|
|
334
|
+
Show, hide, toggle, or inspect the persistent actor layer without destroying
|
|
335
|
+
the actors. This is the daemon equivalent of the app's **Hyper+B** shortcut.
|
|
336
|
+
|
|
337
|
+
**Params**:
|
|
338
|
+
|
|
339
|
+
| Field | Type | Required | Description |
|
|
340
|
+
|-------|------|----------|-------------|
|
|
341
|
+
| `action` | string | no | `show`, `hide`, `toggle`, or `status` |
|
|
342
|
+
| `visible` | bool | no | Set layer visibility directly |
|
|
343
|
+
| `hidden` | bool | no | Set layer hidden state directly |
|
|
344
|
+
| `feedback` | bool | no | Show a short desktop feedback toast |
|
|
345
|
+
|
|
346
|
+
Example:
|
|
347
|
+
|
|
348
|
+
```js
|
|
349
|
+
await daemonCall('overlay.actor.visibility', { action: 'toggle' })
|
|
350
|
+
```
|
|
351
|
+
|
|
352
|
+
### Static HUD Manifests
|
|
353
|
+
|
|
354
|
+
Apps and projects can expose a local hover dashboard without running a web
|
|
355
|
+
server by publishing a static bundle at:
|
|
356
|
+
|
|
357
|
+
```txt
|
|
358
|
+
.lattices/hud/
|
|
359
|
+
manifest.json
|
|
360
|
+
index.html
|
|
361
|
+
assets/
|
|
362
|
+
```
|
|
363
|
+
|
|
364
|
+
Minimal manifest:
|
|
365
|
+
|
|
366
|
+
```json
|
|
367
|
+
{
|
|
368
|
+
"version": 1,
|
|
369
|
+
"id": "talkie",
|
|
370
|
+
"name": "Talkie",
|
|
371
|
+
"bundleId": "com.usabletalkie.Talkie",
|
|
372
|
+
"icon": "./assets/icon.png",
|
|
373
|
+
"entry": "./index.html",
|
|
374
|
+
"readAccess": "~/Library/Application Support/Talkie/HUD",
|
|
375
|
+
"surface": { "width": 380, "height": 260 },
|
|
376
|
+
"actor": {
|
|
377
|
+
"labelHidden": true,
|
|
378
|
+
"click": "activateApp"
|
|
379
|
+
},
|
|
380
|
+
"sources": [
|
|
381
|
+
{
|
|
382
|
+
"path": "~/Library/Application Support/Talkie/HUD/activity.jsonl",
|
|
383
|
+
"format": "jsonl",
|
|
384
|
+
"schema": "talkie.activity.v1",
|
|
385
|
+
"presentation": "timeline"
|
|
386
|
+
}
|
|
387
|
+
]
|
|
388
|
+
}
|
|
389
|
+
```
|
|
390
|
+
|
|
391
|
+
The CLI resolves this manifest into `overlay.actor.publish` with a file-backed
|
|
392
|
+
HUD URL. The macOS app loads `entry` through `WKWebView.loadFileURL`, allowing
|
|
393
|
+
read access to the HUD folder by default, or to the manifest's `readAccess`
|
|
394
|
+
folder when one is declared.
|
|
395
|
+
|
|
396
|
+
`sources` is descriptive metadata for app-owned state, logs, or event streams.
|
|
397
|
+
Lattices does not append to those logs. The app writes them in its normal
|
|
398
|
+
runtime location, and the custom HUD renderer decides how to present them.
|
|
399
|
+
|
|
400
|
+
Useful commands:
|
|
401
|
+
|
|
402
|
+
```bash
|
|
403
|
+
lattices hud register .lattices/hud/manifest.json --publish
|
|
404
|
+
lattices hud publish talkie
|
|
405
|
+
lattices hud sync
|
|
406
|
+
lattices hud discover ~/dev --register
|
|
407
|
+
```
|
|
408
|
+
|
|
409
|
+
For packaged apps, keep the renderer files in the app bundle and point mutable
|
|
410
|
+
sources at an app-owned folder such as `~/Library/Application Support/...`.
|
|
411
|
+
|
|
280
412
|
---
|
|
281
413
|
|
|
282
414
|
## System
|
package/docs/app.md
CHANGED
|
@@ -79,6 +79,27 @@ Available when `layers` are configured in `~/.lattices/workspace.json`
|
|
|
79
79
|
| Refresh Projects | Re-scan for .lattices.json configs |
|
|
80
80
|
| Quit Lattices | Exit the menu bar app |
|
|
81
81
|
|
|
82
|
+
## Overlay actors and HUDs
|
|
83
|
+
|
|
84
|
+
Persistent overlay actors can be hidden or restored with **Hyper+B**. Apps can
|
|
85
|
+
publish a static hover dashboard by exposing:
|
|
86
|
+
|
|
87
|
+
```txt
|
|
88
|
+
.lattices/hud/manifest.json
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
Register and publish one:
|
|
92
|
+
|
|
93
|
+
```bash
|
|
94
|
+
lattices hud register .lattices/hud/manifest.json --publish
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
The manifest points to a local `index.html`, optional icon, app activation
|
|
98
|
+
target, HUD dimensions, and optional app-owned `sources` metadata for logs or
|
|
99
|
+
state files. Lattices hosts the actor and loads the dashboard through a
|
|
100
|
+
transparent `WKWebView`; the app owns the renderer and writes its own logs in
|
|
101
|
+
the places it already uses.
|
|
102
|
+
|
|
82
103
|
## Project discovery
|
|
83
104
|
|
|
84
105
|
The app scans a configurable root directory (up to 3 levels deep)
|
|
@@ -153,8 +174,9 @@ Press **Hyper+3** to open the voice command window. Hold **Option** to
|
|
|
153
174
|
speak, release to stop. Lattices transcribes via Vox, matches to an
|
|
154
175
|
intent, and executes. Built-in commands: find, show, open, tile, kill, scan.
|
|
155
176
|
|
|
156
|
-
|
|
157
|
-
in the AI corner. Configure the
|
|
177
|
+
The provider-backed assistant can run in parallel, offering follow-up
|
|
178
|
+
suggestions in the AI corner. Configure the provider and credentials in
|
|
179
|
+
Settings > AI.
|
|
158
180
|
|
|
159
181
|
## Settings
|
|
160
182
|
|
|
@@ -208,12 +230,12 @@ The trackpad proxy toggle lives here. Paired devices still need the
|
|
|
208
230
|
|
|
209
231
|
| Setting | Default | Description |
|
|
210
232
|
|----------------------|----------------|------------------------------------------|
|
|
211
|
-
|
|
|
212
|
-
|
|
|
213
|
-
|
|
|
233
|
+
| Assistant provider | OpenAI Codex | Provider used by in-app chat and provider-backed voice advice |
|
|
234
|
+
| Pi runtime | Auto-detected | Runtime install/refresh controls for provider chat |
|
|
235
|
+
| Provider credentials | Not set | OAuth sign-in or local API-key storage for the selected provider |
|
|
214
236
|
|
|
215
|
-
Shows
|
|
216
|
-
|
|
237
|
+
Shows assistant readiness, runtime availability, and selected-provider
|
|
238
|
+
authentication state.
|
|
217
239
|
|
|
218
240
|
### Shortcuts
|
|
219
241
|
|
|
@@ -228,7 +250,7 @@ Shows keyboard shortcut reference:
|
|
|
228
250
|
| Hyper+4 | Desktop inventory |
|
|
229
251
|
| Hyper+5 | Omni search |
|
|
230
252
|
| Hyper+6 | Cheat sheet |
|
|
231
|
-
| Hyper+
|
|
253
|
+
| Hyper+B | Hide/show persistent overlay actors |
|
|
232
254
|
| Cmd+Option+1/2/3 | Switch workspace layer |
|
|
233
255
|
| Ctrl+B D | Detach from session |
|
|
234
256
|
| Ctrl+B X | Kill current pane |
|
package/docs/config.md
CHANGED
|
@@ -146,6 +146,10 @@ Run `lattices init` in your project directory to generate a starter
|
|
|
146
146
|
| `lattices windows [--json]` | List all visible windows |
|
|
147
147
|
| `lattices window assign <wid> <layer>` | Tag a window to a layer |
|
|
148
148
|
| `lattices window map [--json]` | Show all window→layer assignments |
|
|
149
|
+
| `lattices actor toggle` | Hide/show persistent overlay actors |
|
|
150
|
+
| `lattices hud register [manifest]` | Register a `.lattices/hud/manifest.json` |
|
|
151
|
+
| `lattices hud publish [id\|manifest]` | Publish a static HUD actor to the desktop |
|
|
152
|
+
| `lattices hud sync` | Publish all registered HUD actors |
|
|
149
153
|
| `lattices search <query>` | Search windows by title, app, session, OCR |
|
|
150
154
|
| `lattices search <q> --deep` | Deep search: index + live terminal inspection |
|
|
151
155
|
| `lattices search <q> --wid` | Print matching window IDs only (pipeable) |
|
package/docs/mouse-gestures.md
CHANGED
|
@@ -1,79 +1,207 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Mouse Gestures
|
|
3
|
+
description: Hold a mouse button, draw a shape or direction, release — runs matched actions like a window manager power-user shortcut system.
|
|
4
|
+
order: 4.2
|
|
5
|
+
---
|
|
6
|
+
|
|
1
7
|
# Mouse Gestures
|
|
2
8
|
|
|
3
9
|
## Concept
|
|
4
10
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
## Button Mapping
|
|
9
|
-
|
|
10
|
-
Defaults — remap by editing `~/.lattices/mouse-shortcuts.json`:
|
|
11
|
-
|
|
12
|
-
- **Button 3 (Back)** — grid layouts (Maximize / 2×2 / 3×3 / 4×4)
|
|
11
|
+
Mouse gestures are a user-level shortcut system for the macOS app. Hold a
|
|
12
|
+
configured mouse button, draw a direction or shape, then release to run the
|
|
13
|
+
matched action.
|
|
13
14
|
|
|
14
|
-
|
|
15
|
+
The app code owns the recognizer, action dispatcher, and JSON schema. Your
|
|
16
|
+
actual gesture mappings live in:
|
|
15
17
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
18
|
+
```bash
|
|
19
|
+
~/.lattices/mouse-shortcuts.json
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
That file is machine-local preference data. It is not project config, and it
|
|
23
|
+
should not be committed to this repository unless you are intentionally adding
|
|
24
|
+
an example fixture or changing the schema.
|
|
25
|
+
|
|
26
|
+
## Config Ownership
|
|
27
|
+
|
|
28
|
+
There are two layers:
|
|
29
|
+
|
|
30
|
+
- **Code defaults** in `MouseGestureConfig.swift` provide a minimal starter
|
|
31
|
+
config when no user file exists.
|
|
32
|
+
- **User rules** in `~/.lattices/mouse-shortcuts.json` are the source of truth
|
|
33
|
+
after the file has been created.
|
|
34
|
+
|
|
35
|
+
Do not add personal shortcuts by changing `MouseGestureConfig.swift`. Add them
|
|
36
|
+
to the user JSON file instead. The Settings UI can open that file from
|
|
37
|
+
**Settings -> Shortcuts -> Mouse Gestures -> Configure...**.
|
|
38
|
+
|
|
39
|
+
## Lightweight History
|
|
40
|
+
|
|
41
|
+
Lattices keeps local snapshots of your mouse shortcut config before risky
|
|
42
|
+
changes:
|
|
43
|
+
|
|
44
|
+
```bash
|
|
45
|
+
~/.lattices/mouse-shortcuts.history/
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
Snapshots are written before external edits are reloaded and before Settings
|
|
49
|
+
restores defaults or restores a previous snapshot. The newest 40 snapshots are
|
|
50
|
+
kept. Use **History** in Settings to open the folder, or **Undo Last** to
|
|
51
|
+
restore the latest snapshot.
|
|
52
|
+
|
|
53
|
+
## Button Names
|
|
54
|
+
|
|
55
|
+
The config accepts these common button names:
|
|
56
|
+
|
|
57
|
+
| Config value | Meaning |
|
|
58
|
+
|---|---|
|
|
59
|
+
| `middle` | Middle button / wheel click |
|
|
60
|
+
| `back` | Back side button, often mouse button 4 |
|
|
61
|
+
| `forward` | Forward side button, often mouse button 5 |
|
|
62
|
+
| `right` | Right mouse button |
|
|
63
|
+
| `buttonN` | Explicit numbered button fallback |
|
|
64
|
+
|
|
65
|
+
Normal clicks pass through when a configured button is only being watched for
|
|
66
|
+
drag or shape gestures. Once movement crosses the gesture threshold and matches
|
|
67
|
+
a real gesture, Lattices claims the interaction.
|
|
68
|
+
|
|
69
|
+
Browser frontmost apps are bypassed so native middle-click, Back, and Forward
|
|
70
|
+
button behavior stays intact. This avoids half-claimed side-button gestures
|
|
71
|
+
accidentally navigating while you are drawing a shape.
|
|
72
|
+
|
|
73
|
+
## Trigger Kinds
|
|
74
|
+
|
|
75
|
+
Rules match one of three trigger kinds:
|
|
76
|
+
|
|
77
|
+
| Kind | Required fields | Example |
|
|
78
|
+
|---|---|---|
|
|
79
|
+
| `click` | `button` | Middle click sends paste |
|
|
80
|
+
| `drag` | `button`, `direction` | Middle drag left switches Space |
|
|
81
|
+
| `shape` | `button`, `shape` | Back-button L shape activates iTerm |
|
|
82
|
+
|
|
83
|
+
Directions are `up`, `down`, `left`, and `right`.
|
|
84
|
+
|
|
85
|
+
Useful shapes include:
|
|
86
|
+
|
|
87
|
+
| Shape | Motion |
|
|
88
|
+
|---|---|
|
|
89
|
+
| `l-shape-down-right` | Down, then right |
|
|
90
|
+
| `l-shape-down-left` | Down, then left |
|
|
91
|
+
| `l-shape-up-right` | Up, then right |
|
|
92
|
+
| `l-shape-up-left` | Up, then left |
|
|
93
|
+
| `reverse-l-right-down` | Right, then down |
|
|
94
|
+
| `reverse-l-left-down` | Left, then down |
|
|
95
|
+
| `v-shape` | Down, then up |
|
|
96
|
+
| `reverse-v` | Up, then down |
|
|
97
|
+
| `circle` | A loose closed loop |
|
|
98
|
+
|
|
99
|
+
The circle recognizer is intentionally generous: it looks for broad circular
|
|
100
|
+
motion, a reasonably closed path, and enough turn coverage rather than a
|
|
101
|
+
geometrically perfect circle.
|
|
102
|
+
|
|
103
|
+
## Default: Screenshot Area Gesture
|
|
104
|
+
|
|
105
|
+
New default configs include a back-button circle gesture for the macOS
|
|
106
|
+
screenshot area picker (`Command` + `Shift` + `4`):
|
|
107
|
+
|
|
108
|
+
```json
|
|
109
|
+
{
|
|
110
|
+
"id": "back-circle-screenshot-area",
|
|
111
|
+
"enabled": true,
|
|
112
|
+
"device": "any",
|
|
113
|
+
"trigger": {
|
|
114
|
+
"button": "back",
|
|
115
|
+
"kind": "shape",
|
|
116
|
+
"shape": "circle"
|
|
117
|
+
},
|
|
118
|
+
"action": {
|
|
119
|
+
"type": "shortcut.send",
|
|
120
|
+
"shortcut": {
|
|
121
|
+
"key": "4",
|
|
122
|
+
"keyCode": 21,
|
|
123
|
+
"modifiers": ["command", "shift"]
|
|
124
|
+
}
|
|
125
|
+
},
|
|
126
|
+
"visual": {
|
|
127
|
+
"renderer": "matrix",
|
|
128
|
+
"theme": "lattices"
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
```
|
|
22
132
|
|
|
23
133
|
## Actions
|
|
24
134
|
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
|
28
|
-
|
|
29
|
-
|
|
|
30
|
-
|
|
|
31
|
-
|
|
|
32
|
-
|
|
|
135
|
+
Supported action types include:
|
|
136
|
+
|
|
137
|
+
| Type | Purpose |
|
|
138
|
+
|---|---|
|
|
139
|
+
| `space.previous` | Switch to the previous macOS Space |
|
|
140
|
+
| `space.next` | Switch to the next macOS Space |
|
|
141
|
+
| `screenmap.toggle` | Open the Screen Map overview |
|
|
142
|
+
| `dictation.start` | Start dictation |
|
|
143
|
+
| `shortcut.send` | Send a keyboard shortcut |
|
|
144
|
+
| `app.activate` | Activate an app by name |
|
|
145
|
+
|
|
146
|
+
## Example: Enter Gesture
|
|
147
|
+
|
|
148
|
+
This is a user-level rule, not a code default. Add it to
|
|
149
|
+
`~/.lattices/mouse-shortcuts.json` if you want the back button plus a quick
|
|
150
|
+
down-then-left shape to press Enter:
|
|
151
|
+
|
|
152
|
+
```json
|
|
153
|
+
{
|
|
154
|
+
"id": "back-down-left-enter",
|
|
155
|
+
"enabled": true,
|
|
156
|
+
"device": "any",
|
|
157
|
+
"trigger": {
|
|
158
|
+
"button": "back",
|
|
159
|
+
"kind": "shape",
|
|
160
|
+
"shape": "l-shape-down-left"
|
|
161
|
+
},
|
|
162
|
+
"action": {
|
|
163
|
+
"type": "shortcut.send",
|
|
164
|
+
"shortcut": {
|
|
165
|
+
"key": "enter",
|
|
166
|
+
"keyCode": 36,
|
|
167
|
+
"modifiers": []
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
```
|
|
172
|
+
|
|
173
|
+
## Visuals
|
|
174
|
+
|
|
175
|
+
Rules may include an optional `visual` block for feedback. Visuals are
|
|
176
|
+
decorative: they must never decide whether a gesture matches or whether an
|
|
177
|
+
action runs. If a visual asset is missing or slow, the gesture should still
|
|
178
|
+
execute through the native action path.
|
|
179
|
+
|
|
180
|
+
Shape gestures can opt into native matrix completion feedback with
|
|
181
|
+
`"visual": { "renderer": "matrix" }`. When enabled, Lattices smooths the
|
|
182
|
+
captured path, replays it briefly inside a small 3x3 rounded-cell matrix, then
|
|
183
|
+
snaps into a compact confirmation glyph and action label. This is feedback
|
|
184
|
+
only; the matched rule has already dispatched.
|
|
33
185
|
|
|
34
|
-
|
|
35
|
-
the screen the cursor is on.
|
|
36
|
-
|
|
37
|
-
## HUD Feedback
|
|
186
|
+
## Implementation
|
|
38
187
|
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
-
|
|
188
|
+
- `apps/mac/Sources/Core/Input/MouseGestureController.swift` owns the CGEvent
|
|
189
|
+
tap, gesture session state, passthrough behavior, and action dispatch.
|
|
190
|
+
- `apps/mac/Sources/Core/Input/MouseGestureConfig.swift` defines the Codable
|
|
191
|
+
schema and initial fallback defaults.
|
|
192
|
+
- `apps/mac/Sources/Core/Input/MouseShortcutStore.swift` loads the user-level
|
|
193
|
+
JSON file and provides thread-safe snapshots to the event tap.
|
|
194
|
+
- `apps/mac/Sources/Core/Input/ShapeRecognizer.swift` converts raw gesture
|
|
195
|
+
paths into direction and shape labels.
|
|
42
196
|
|
|
43
|
-
## Safety
|
|
197
|
+
## Safety
|
|
44
198
|
|
|
45
199
|
The controller installs a session-wide CGEvent tap. To avoid blocking the
|
|
46
200
|
system input pipeline:
|
|
47
201
|
|
|
48
|
-
- The tap callback
|
|
49
|
-
- A circuit breaker
|
|
50
|
-
|
|
51
|
-
-
|
|
52
|
-
|
|
53
|
-
-
|
|
54
|
-
on trip and "Mouse gestures resumed" on auto-recover. All trips log to
|
|
55
|
-
`~/.lattices/lattices.log`.
|
|
56
|
-
|
|
57
|
-
## Implementation
|
|
58
|
-
|
|
59
|
-
- `apps/mac/Sources/MouseGestureController.swift` — CGEvent tap, gesture
|
|
60
|
-
state machine, breaker.
|
|
61
|
-
- Tile actions go through `WindowTiler.tileFrontmostViaAX(...)`.
|
|
62
|
-
- Grid actions enumerate visible windows via `DesktopModel.shared.allWindows()`
|
|
63
|
-
and batch-move them with `WindowTiler.batchMoveAndRaiseWindows(...)`.
|
|
64
|
-
|
|
65
|
-
## Settings UI
|
|
66
|
-
|
|
67
|
-
**Settings → Shortcuts → Mouse Gestures**:
|
|
68
|
-
|
|
69
|
-
- Button 3 grid card showing the active mapping
|
|
70
|
-
- Hint to edit `~/.lattices/mouse-shortcuts.json` for remapping
|
|
71
|
-
|
|
72
|
-
## Edge Cases
|
|
73
|
-
|
|
74
|
-
- Multiple monitors: gesture executes on the screen the cursor starts on
|
|
75
|
-
- Button held + cursor leaves the screen: still tracks; action applies
|
|
76
|
-
to the starting screen
|
|
77
|
-
- Short press (< 30px movement): ignored, treated as a normal click
|
|
78
|
-
- Slow action / OS tap timeout: breaker trips, gestures pause briefly,
|
|
79
|
-
then auto-recover
|
|
202
|
+
- The tap callback does only cheap work and dispatches heavier work async.
|
|
203
|
+
- A circuit breaker handles OS tap timeout events and pauses gestures when
|
|
204
|
+
needed.
|
|
205
|
+
- Short, unmatched clicks are replayed or passed through so native app behavior
|
|
206
|
+
remains intact.
|
|
207
|
+
- The emergency reset chord clears stuck input capture state.
|
|
@@ -192,7 +192,7 @@ Expected interactions:
|
|
|
192
192
|
|
|
193
193
|
Dismissal should normally dismiss the current message/surface, not delete the actor.
|
|
194
194
|
Persistent actors can be parked globally with the overlay actor hotkey
|
|
195
|
-
without clearing their ids or state. The initial shortcut is **Hyper+
|
|
195
|
+
without clearing their ids or state. The initial shortcut is **Hyper+B**.
|
|
196
196
|
|
|
197
197
|
## Motion
|
|
198
198
|
|