@lattices/cli 0.3.0 → 0.4.1
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 +85 -9
- package/app/Info.plist +30 -0
- package/app/Lattices.app/Contents/Info.plist +8 -2
- package/app/Lattices.app/Contents/MacOS/Lattices +0 -0
- package/app/Lattices.app/Contents/Resources/AppIcon.icns +0 -0
- package/app/Lattices.app/Contents/Resources/tap.wav +0 -0
- package/app/Lattices.app/Contents/_CodeSignature/CodeResources +139 -0
- package/app/Lattices.entitlements +15 -0
- package/app/Package.swift +8 -1
- package/app/Resources/tap.wav +0 -0
- package/app/Sources/AdvisorLearningStore.swift +90 -0
- package/app/Sources/AgentSession.swift +377 -0
- package/app/Sources/AppDelegate.swift +45 -12
- package/app/Sources/AppShellView.swift +81 -8
- package/app/Sources/AudioProvider.swift +386 -0
- package/app/Sources/CheatSheetHUD.swift +261 -19
- package/app/Sources/DaemonProtocol.swift +13 -0
- package/app/Sources/DaemonServer.swift +8 -0
- package/app/Sources/DesktopModel.swift +189 -6
- package/app/Sources/DesktopModelTypes.swift +2 -0
- package/app/Sources/DiagnosticLog.swift +104 -2
- package/app/Sources/EventBus.swift +1 -0
- package/app/Sources/HUDBottomBar.swift +279 -0
- package/app/Sources/HUDController.swift +1158 -0
- package/app/Sources/HUDLeftBar.swift +849 -0
- package/app/Sources/HUDMinimap.swift +179 -0
- package/app/Sources/HUDRightBar.swift +774 -0
- package/app/Sources/HUDState.swift +367 -0
- package/app/Sources/HUDTopBar.swift +243 -0
- package/app/Sources/HandsOffSession.swift +802 -0
- package/app/Sources/HomeDashboardView.swift +125 -0
- package/app/Sources/HotkeyManager.swift +2 -0
- package/app/Sources/HotkeyStore.swift +49 -9
- package/app/Sources/IntentEngine.swift +962 -0
- package/app/Sources/Intents/CreateLayerIntent.swift +54 -0
- package/app/Sources/Intents/DistributeIntent.swift +56 -0
- package/app/Sources/Intents/FocusIntent.swift +69 -0
- package/app/Sources/Intents/HelpIntent.swift +41 -0
- package/app/Sources/Intents/KillIntent.swift +47 -0
- package/app/Sources/Intents/LatticeIntent.swift +78 -0
- package/app/Sources/Intents/LaunchIntent.swift +67 -0
- package/app/Sources/Intents/ListSessionsIntent.swift +32 -0
- package/app/Sources/Intents/ListWindowsIntent.swift +30 -0
- package/app/Sources/Intents/ScanIntent.swift +52 -0
- package/app/Sources/Intents/SearchIntent.swift +190 -0
- package/app/Sources/Intents/SwitchLayerIntent.swift +50 -0
- package/app/Sources/Intents/TileIntent.swift +61 -0
- package/app/Sources/LatticesApi.swift +1275 -30
- package/app/Sources/LauncherHUD.swift +348 -0
- package/app/Sources/MainView.swift +147 -44
- package/app/Sources/MouseFinder.swift +222 -0
- package/app/Sources/OcrModel.swift +34 -1
- package/app/Sources/OmniSearchState.swift +99 -102
- package/app/Sources/OnboardingView.swift +457 -0
- package/app/Sources/PermissionChecker.swift +2 -12
- package/app/Sources/PiChatDock.swift +454 -0
- package/app/Sources/PiChatSession.swift +815 -0
- package/app/Sources/PiWorkspaceView.swift +364 -0
- package/app/Sources/PlacementSpec.swift +195 -0
- package/app/Sources/Preferences.swift +59 -0
- package/app/Sources/ProjectScanner.swift +58 -45
- package/app/Sources/ScreenMapState.swift +701 -55
- package/app/Sources/ScreenMapView.swift +843 -103
- package/app/Sources/ScreenMapWindowController.swift +22 -0
- package/app/Sources/SessionLayerStore.swift +285 -0
- package/app/Sources/SessionManager.swift +4 -1
- package/app/Sources/SettingsView.swift +186 -3
- package/app/Sources/Theme.swift +9 -8
- package/app/Sources/TmuxModel.swift +7 -0
- package/app/Sources/TmuxQuery.swift +27 -3
- package/app/Sources/VoiceChatView.swift +192 -0
- package/app/Sources/VoiceCommandWindow.swift +1594 -0
- package/app/Sources/VoiceIntentResolver.swift +671 -0
- package/app/Sources/VoxClient.swift +454 -0
- package/app/Sources/WindowTiler.swift +348 -87
- package/app/Sources/WorkspaceManager.swift +127 -18
- package/app/Tests/StageDragTests.swift +333 -0
- package/app/Tests/StageJoinTests.swift +313 -0
- package/app/Tests/StageManagerTests.swift +280 -0
- package/app/Tests/StageTileTests.swift +353 -0
- package/assets/AppIcon.icns +0 -0
- package/bin/client.ts +16 -0
- package/bin/{daemon-client.js → daemon-client.ts} +49 -30
- package/bin/handsoff-infer.ts +280 -0
- package/bin/handsoff-worker.ts +740 -0
- package/bin/lattices-app.ts +338 -0
- package/bin/lattices-dev +208 -0
- package/bin/{lattices.js → lattices.ts} +777 -140
- package/bin/project-twin.ts +645 -0
- package/docs/agent-execution-plan.md +562 -0
- package/docs/agent-layer-guide.md +207 -0
- package/docs/agents.md +142 -0
- package/docs/api.md +153 -34
- package/docs/app.md +29 -1
- package/docs/config.md +5 -1
- package/docs/handsoff-test-scenarios.md +84 -0
- package/docs/layers.md +20 -20
- package/docs/ocr.md +14 -5
- package/docs/overview.md +5 -1
- package/docs/presentation-execution-review.md +491 -0
- package/docs/prompts/hands-off-system.md +374 -0
- package/docs/prompts/hands-off-turn.md +30 -0
- package/docs/prompts/voice-advisor.md +31 -0
- package/docs/prompts/voice-fallback.md +23 -0
- package/docs/tiling-reference.md +167 -0
- package/docs/twins.md +138 -0
- package/docs/voice-command-protocol.md +278 -0
- package/docs/voice.md +219 -0
- package/package.json +29 -11
- package/bin/client.js +0 -4
- package/bin/lattices-app.js +0 -221
package/docs/config.md
CHANGED
|
@@ -141,9 +141,13 @@ Run `lattices init` in your project directory to generate a starter
|
|
|
141
141
|
| `lattices windows [--json]` | List all visible windows |
|
|
142
142
|
| `lattices window assign <wid> <layer>` | Tag a window to a layer |
|
|
143
143
|
| `lattices window map [--json]` | Show all window→layer assignments |
|
|
144
|
+
| `lattices search <query>` | Search windows by title, app, session, OCR |
|
|
145
|
+
| `lattices search <q> --deep` | Deep search: index + live terminal inspection |
|
|
146
|
+
| `lattices search <q> --wid` | Print matching window IDs only (pipeable) |
|
|
147
|
+
| `lattices place <query> [pos]` | Deep search + focus + tile (default: bottom-right)|
|
|
148
|
+
| `lattices focus <session>` | Focus a session's window and switch Spaces |
|
|
144
149
|
| `lattices scan search <query>` | Search indexed screen text |
|
|
145
150
|
| `lattices diag [limit]` | Show recent diagnostic entries |
|
|
146
|
-
| `lattices focus <session>` | Focus a session's window and switch Spaces |
|
|
147
151
|
| `lattices app` | Launch the menu bar companion app |
|
|
148
152
|
| `lattices app build` | Rebuild the menu bar app from source |
|
|
149
153
|
| `lattices app restart` | Rebuild and relaunch the menu bar app |
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
# Hands-Off Mode — Test Scenarios
|
|
2
|
+
|
|
3
|
+
Press Ctrl+Cmd+M, say the phrase, press Ctrl+Cmd+M again. Check the result.
|
|
4
|
+
|
|
5
|
+
## 1. Basic awareness
|
|
6
|
+
|
|
7
|
+
| # | Say | Expected | Check |
|
|
8
|
+
|---|-----|----------|-------|
|
|
9
|
+
| 1.1 | "What's the frontmost window?" | Names the app + project/title, no wid | Correct window? No numbers? |
|
|
10
|
+
| 1.2 | "How many monitors do I have?" | Correct count + sizes | Matches reality? |
|
|
11
|
+
| 1.3 | "What terminals do I have open?" | Lists terminals with projects/cwds | Does it know the projects? |
|
|
12
|
+
| 1.4 | "Which ones are running Claude Code?" | Lists only Claude terminals + their projects | Correct? Uses hasClaude? |
|
|
13
|
+
| 1.5 | "What's on my second monitor?" | Describes windows on the non-main display | Correct display? |
|
|
14
|
+
|
|
15
|
+
## 2. Simple tiling
|
|
16
|
+
|
|
17
|
+
| # | Say | Expected | Check |
|
|
18
|
+
|---|-----|----------|-------|
|
|
19
|
+
| 2.1 | "Tile Chrome left" | Chrome moves to left half | Did it move? Spoken confirmation? |
|
|
20
|
+
| 2.2 | "Put iTerm on the right" | iTerm moves to right half | Correct window? |
|
|
21
|
+
| 2.3 | "Maximize this window" | Frontmost window maximizes | Right window? |
|
|
22
|
+
| 2.4 | "Center the Finder window" | Finder centers | Correct? |
|
|
23
|
+
|
|
24
|
+
## 3. Multi-window layouts
|
|
25
|
+
|
|
26
|
+
| # | Say | Expected | Check |
|
|
27
|
+
|---|-----|----------|-------|
|
|
28
|
+
| 3.1 | "Split Chrome and iTerm" | Chrome left, iTerm right | Both move? Spoken narration? |
|
|
29
|
+
| 3.2 | "Put everything in a grid" | distribute intent fires | Windows arrange? |
|
|
30
|
+
| 3.3 | "Thirds with Chrome, iTerm, and Finder" | Three apps in left/center/right thirds | Correct apps + positions? |
|
|
31
|
+
| 3.4 | "Quadrants" | Four windows in corners | Reasonable choices? |
|
|
32
|
+
|
|
33
|
+
## 4. Focus + switching
|
|
34
|
+
|
|
35
|
+
| # | Say | Expected | Check |
|
|
36
|
+
|---|-----|----------|-------|
|
|
37
|
+
| 4.1 | "Focus on Slack" | Slack comes to front | Did it switch? |
|
|
38
|
+
| 4.2 | "Switch to Chrome" | Chrome comes to front | Correct? |
|
|
39
|
+
| 4.3 | "Go to the lattices terminal" | Focuses the iTerm in ~/dev/lattices | Right terminal? |
|
|
40
|
+
| 4.4 | "Show me the Hudson Claude Code" | Focuses iTerm with hasClaude + cwd hudson | Correct? |
|
|
41
|
+
|
|
42
|
+
## 5. Conversational context
|
|
43
|
+
|
|
44
|
+
| # | Say | Expected | Check |
|
|
45
|
+
|---|-----|----------|-------|
|
|
46
|
+
| 5.1 | "Tile Chrome left" then "Now put iTerm on the right" | Two separate turns, both work | Context from turn 1 used? |
|
|
47
|
+
| 5.2 | "Tile Chrome left" then "Swap them" | Chrome right, iTerm left | Understood "them"? |
|
|
48
|
+
| 5.3 | "What terminals do I have?" then "Organize those" | Lists, then distributes the terminals | Connected the turns? |
|
|
49
|
+
| 5.4 | "Put it back" (after any tiling) | Reverses last action | Worked? (may not be supported yet) |
|
|
50
|
+
|
|
51
|
+
## 6. Intelligence
|
|
52
|
+
|
|
53
|
+
| # | Say | Expected | Check |
|
|
54
|
+
|---|-----|----------|-------|
|
|
55
|
+
| 6.1 | "Set up for coding" | Intelligent layout based on visible apps | Reasonable? Explained reasoning? |
|
|
56
|
+
| 6.2 | "I'm going to do a code review" | Suggests/applies review layout | Smart choice? |
|
|
57
|
+
| 6.3 | "Clean up my desktop" | Distributes or suggests organization | Actionable? |
|
|
58
|
+
| 6.4 | "Too many windows, simplify" | Suggests hiding some, focuses key ones | Reasonable? |
|
|
59
|
+
|
|
60
|
+
## 7. Error handling
|
|
61
|
+
|
|
62
|
+
| # | Say | Expected | Check |
|
|
63
|
+
|---|-----|----------|-------|
|
|
64
|
+
| 7.1 | "Focus on Firefox" | "I don't see Firefox. You have Chrome and Safari." | Honest? Names real apps? |
|
|
65
|
+
| 7.2 | "Tile the Photoshop window" | "Photoshop isn't open right now." | No hallucination? |
|
|
66
|
+
| 7.3 | (mumble something unclear) | "I didn't catch that. Can you say it again?" | Graceful? |
|
|
67
|
+
|
|
68
|
+
## 8. Actions actually execute
|
|
69
|
+
|
|
70
|
+
| # | Say | Expected | Check |
|
|
71
|
+
|---|-----|----------|-------|
|
|
72
|
+
| 8.1 | "Distribute my windows" | spoken + distribute action | Actions array not empty? |
|
|
73
|
+
| 8.2 | "Organize my terminals" | spoken + distribute or tile actions | Actions actually fire? |
|
|
74
|
+
| 8.3 | Any action command | Hear narration BEFORE windows move | Sequence correct? |
|
|
75
|
+
|
|
76
|
+
## Scoring
|
|
77
|
+
|
|
78
|
+
For each test:
|
|
79
|
+
- ✅ Works correctly
|
|
80
|
+
- ⚠️ Partially works (note what's wrong)
|
|
81
|
+
- ❌ Broken (note error)
|
|
82
|
+
- 🔇 No audio feedback
|
|
83
|
+
|
|
84
|
+
Track in a copy of this file or in the terminal.
|
package/docs/layers.md
CHANGED
|
@@ -28,13 +28,13 @@ Add `groups` to `~/.lattices/workspace.json`:
|
|
|
28
28
|
"name": "my-setup",
|
|
29
29
|
"groups": [
|
|
30
30
|
{
|
|
31
|
-
"id": "
|
|
32
|
-
"label": "
|
|
31
|
+
"id": "vox",
|
|
32
|
+
"label": "Vox",
|
|
33
33
|
"tabs": [
|
|
34
|
-
{ "path": "/Users/you/dev/
|
|
35
|
-
{ "path": "/Users/you/dev/
|
|
36
|
-
{ "path": "/Users/you/dev/
|
|
37
|
-
{ "path": "/Users/you/dev/
|
|
34
|
+
{ "path": "/Users/you/dev/vox-ios", "label": "iOS" },
|
|
35
|
+
{ "path": "/Users/you/dev/vox-macos", "label": "macOS" },
|
|
36
|
+
{ "path": "/Users/you/dev/vox-web", "label": "Website" },
|
|
37
|
+
{ "path": "/Users/you/dev/vox-api", "label": "API" }
|
|
38
38
|
]
|
|
39
39
|
}
|
|
40
40
|
]
|
|
@@ -46,10 +46,10 @@ to per-project configs.
|
|
|
46
46
|
|
|
47
47
|
### How it works
|
|
48
48
|
|
|
49
|
-
- Session name follows the pattern `lattices-group-<id>` (e.g. `lattices-group-
|
|
49
|
+
- Session name follows the pattern `lattices-group-<id>` (e.g. `lattices-group-vox`)
|
|
50
50
|
- 1 group = 1 tmux session. Each tab is a tmux window, and each window
|
|
51
51
|
gets its own panes from that project's `.lattices.json`
|
|
52
|
-
- You can still launch projects independently: `cd
|
|
52
|
+
- You can still launch projects independently: `cd vox-ios && lattices`
|
|
53
53
|
creates its own standalone session as before
|
|
54
54
|
|
|
55
55
|
### Tab group fields
|
|
@@ -73,9 +73,9 @@ lattices tab <group> [tab] # Switch tab by label or index
|
|
|
73
73
|
Examples:
|
|
74
74
|
|
|
75
75
|
```bash
|
|
76
|
-
lattices group
|
|
77
|
-
lattices tab
|
|
78
|
-
lattices tab
|
|
76
|
+
lattices group vox # Launch all Vox tabs
|
|
77
|
+
lattices tab vox iOS # Switch to the iOS tab
|
|
78
|
+
lattices tab vox 0 # Switch to first tab (by index)
|
|
79
79
|
```
|
|
80
80
|
|
|
81
81
|
### Menu bar app
|
|
@@ -151,7 +151,7 @@ fields instead of `path`:
|
|
|
151
151
|
"label": "Main",
|
|
152
152
|
"projects": [
|
|
153
153
|
{ "app": "Google Chrome", "title": "GitHub", "tile": "left" },
|
|
154
|
-
{ "app": "
|
|
154
|
+
{ "app": "Vox", "tile": "top-right", "launch": "open -a Vox" },
|
|
155
155
|
{ "path": "/Users/you/dev/frontend", "tile": "bottom-right" }
|
|
156
156
|
]
|
|
157
157
|
},
|
|
@@ -182,11 +182,11 @@ This lets you tile a whole group into a screen position:
|
|
|
182
182
|
"name": "my-setup",
|
|
183
183
|
"groups": [
|
|
184
184
|
{
|
|
185
|
-
"id": "
|
|
186
|
-
"label": "
|
|
185
|
+
"id": "vox",
|
|
186
|
+
"label": "Vox",
|
|
187
187
|
"tabs": [
|
|
188
|
-
{ "path": "/Users/you/dev/
|
|
189
|
-
{ "path": "/Users/you/dev/
|
|
188
|
+
{ "path": "/Users/you/dev/vox-ios", "label": "iOS" },
|
|
189
|
+
{ "path": "/Users/you/dev/vox-web", "label": "Website" }
|
|
190
190
|
]
|
|
191
191
|
}
|
|
192
192
|
],
|
|
@@ -195,7 +195,7 @@ This lets you tile a whole group into a screen position:
|
|
|
195
195
|
"id": "main",
|
|
196
196
|
"label": "Main",
|
|
197
197
|
"projects": [
|
|
198
|
-
{ "group": "
|
|
198
|
+
{ "group": "vox", "tile": "top-left" },
|
|
199
199
|
{ "path": "/Users/you/dev/design-system", "tile": "right" }
|
|
200
200
|
]
|
|
201
201
|
}
|
|
@@ -204,7 +204,7 @@ This lets you tile a whole group into a screen position:
|
|
|
204
204
|
```
|
|
205
205
|
|
|
206
206
|
When switching to this layer, lattices launches (or focuses) the
|
|
207
|
-
"
|
|
207
|
+
"vox" group session and tiles it to the top-left quarter, alongside
|
|
208
208
|
the design-system project on the right.
|
|
209
209
|
|
|
210
210
|
### Layer fields
|
|
@@ -340,7 +340,7 @@ header and search field in the menu bar panel:
|
|
|
340
340
|
```json
|
|
341
341
|
{
|
|
342
342
|
"projects": [
|
|
343
|
-
{ "path": "/Users/you/dev/
|
|
343
|
+
{ "path": "/Users/you/dev/vox" }
|
|
344
344
|
]
|
|
345
345
|
}
|
|
346
346
|
```
|
|
@@ -374,7 +374,7 @@ No `tile` — just focuses the window wherever it is.
|
|
|
374
374
|
```json
|
|
375
375
|
{
|
|
376
376
|
"projects": [
|
|
377
|
-
{ "group": "
|
|
377
|
+
{ "group": "vox", "tile": "left" },
|
|
378
378
|
{ "path": "/Users/you/dev/api", "tile": "right" }
|
|
379
379
|
]
|
|
380
380
|
}
|
package/docs/ocr.md
CHANGED
|
@@ -59,17 +59,26 @@ contextual snippets.
|
|
|
59
59
|
### From the CLI
|
|
60
60
|
|
|
61
61
|
```bash
|
|
62
|
+
# Search windows by title, app, session, and OCR content
|
|
63
|
+
lattices search "error"
|
|
64
|
+
|
|
65
|
+
# Deep search — also inspects terminal tabs and processes
|
|
66
|
+
lattices search "myproject" --deep
|
|
67
|
+
|
|
68
|
+
# Search + focus + tile the top result
|
|
69
|
+
lattices place "myproject" left
|
|
70
|
+
|
|
62
71
|
# View current OCR snapshot
|
|
63
|
-
lattices
|
|
72
|
+
lattices scan
|
|
64
73
|
|
|
65
|
-
# Search OCR history
|
|
66
|
-
lattices
|
|
74
|
+
# Search OCR history directly (FTS5 syntax)
|
|
75
|
+
lattices scan search "error OR failed"
|
|
67
76
|
|
|
68
77
|
# Trigger an immediate deep scan
|
|
69
|
-
lattices
|
|
78
|
+
lattices scan deep
|
|
70
79
|
|
|
71
80
|
# View OCR history for a specific window ID
|
|
72
|
-
lattices
|
|
81
|
+
lattices scan history 12345
|
|
73
82
|
```
|
|
74
83
|
|
|
75
84
|
### From the agent API
|
package/docs/overview.md
CHANGED
|
@@ -65,7 +65,10 @@ Agents get the same control programmatically:
|
|
|
65
65
|
```js
|
|
66
66
|
import { daemonCall } from '@lattices/cli'
|
|
67
67
|
await daemonCall('session.launch', { path: '/Users/you/dev/frontend' })
|
|
68
|
-
await daemonCall('window.
|
|
68
|
+
await daemonCall('window.place', {
|
|
69
|
+
session: 'frontend-a1b2c3',
|
|
70
|
+
placement: { kind: 'tile', value: 'left' }
|
|
71
|
+
})
|
|
69
72
|
```
|
|
70
73
|
|
|
71
74
|
## Who it's for
|
|
@@ -91,4 +94,5 @@ await daemonCall('window.tile', { session: 'frontend-a1b2c3', position: 'left' }
|
|
|
91
94
|
- [Configuration](/docs/config): `.lattices.json` format and CLI commands
|
|
92
95
|
- [Screen scanning](/docs/ocr): AX text extraction, Vision OCR, and full-text search
|
|
93
96
|
- [Concepts](/docs/concepts): architecture, glossary, and how it all works
|
|
97
|
+
- [Agent Guide](/docs/agents): canonical action contracts for voice, CLI, and daemon clients
|
|
94
98
|
- [Agent API](/docs/api): RPC method reference for agents and scripts
|