@lattices/cli 0.5.0 → 0.6.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 +14 -5
- package/apps/mac/Info.plist +4 -2
- package/apps/mac/Lattices.app/Contents/Info.plist +4 -2
- package/apps/mac/Lattices.app/Contents/MacOS/Lattices +0 -0
- package/apps/mac/Lattices.app/Contents/Resources/docs/assistant-knowledge.md +130 -0
- package/apps/mac/Lattices.app/Contents/_CodeSignature/CodeResources +11 -0
- package/apps/mac/Lattices.entitlements +6 -0
- package/bin/assistant-intelligence.ts +41 -3
- package/bin/cli/capture.ts +252 -0
- package/bin/cli/daemon.ts +22 -0
- package/bin/cli/helpers.ts +105 -0
- package/bin/cli/layer.ts +178 -0
- package/bin/cli/runs.ts +43 -0
- package/bin/cli/search.ts +141 -0
- package/bin/cli/session.ts +32 -0
- package/bin/client.ts +2 -1
- package/bin/cua.ts +26 -0
- package/bin/infer.ts +22 -4
- package/bin/keychain.ts +75 -0
- package/bin/lattices-app.ts +111 -12
- package/bin/lattices-build-env.ts +77 -0
- package/bin/lattices-dev +29 -2
- package/bin/lattices.ts +729 -769
- package/docs/api.md +496 -3
- package/docs/app.md +5 -4
- package/docs/assistant-knowledge.md +130 -0
- package/docs/config.md +5 -0
- package/docs/hyperspace-grid-snappiness.md +210 -0
- package/docs/layers.md +53 -0
- package/docs/mouse-gestures.md +40 -3
- package/docs/ocr.md +3 -0
- package/docs/prompts/hands-off-system.md +9 -1
- package/docs/proposals/LAT-006-followup-gaps.md +103 -0
- package/docs/proposals/{LAT-006-mira-in-lattices.md → LAT-006-runs-and-capture-in-lattices.md} +83 -70
- package/docs/proposals/LAT-007-unified-app-shell.md +128 -0
- package/docs/quickstart.md +3 -1
- package/docs/reference/dewey.config.ts +1 -1
- package/docs/release.md +4 -3
- package/docs/repo-structure.md +1 -0
- package/docs/terminal-kit.md +87 -0
- package/docs/tiling-reference.md +5 -3
- package/docs/voice.md +3 -3
- package/package.json +29 -5
- package/packages/npm/sdk/cua.d.mts +1 -0
- package/packages/npm/sdk/cua.d.ts +188 -0
- package/packages/npm/sdk/cua.mjs +376 -0
package/docs/proposals/{LAT-006-mira-in-lattices.md → LAT-006-runs-and-capture-in-lattices.md}
RENAMED
|
@@ -1,23 +1,36 @@
|
|
|
1
|
-
# LAT-006:
|
|
1
|
+
# LAT-006: Runs and Capture in Lattices
|
|
2
2
|
|
|
3
3
|
## Status
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
Accepted direction; initial screenshot slice in progress.
|
|
6
6
|
|
|
7
7
|
## Summary
|
|
8
8
|
|
|
9
|
-
Mira should stop being a separate product the user has to
|
|
9
|
+
The Action/Mira experiment should stop being a separate product the user has to
|
|
10
|
+
remember. The useful runtime loop should become plain Lattices functionality:
|
|
10
11
|
|
|
11
|
-
|
|
12
|
+
```text
|
|
13
|
+
observe -> act -> capture -> trace -> artifact -> review
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
The user-facing concepts should be:
|
|
12
17
|
|
|
13
18
|
```text
|
|
14
19
|
Lattices = workspace control plane
|
|
15
|
-
|
|
20
|
+
Actions = executable workspace operations
|
|
21
|
+
Runs = executions with trace and artifacts
|
|
22
|
+
Capture = screenshots and recordings
|
|
23
|
+
Review = inspect output
|
|
24
|
+
Actors = optional on-screen presences
|
|
16
25
|
```
|
|
17
26
|
|
|
18
|
-
This
|
|
19
|
-
|
|
20
|
-
|
|
27
|
+
This retires Mira as a feature name or product brand. Actors, pets, and
|
|
28
|
+
on-screen presences remain useful Lattices primitives, but no specific actor
|
|
29
|
+
should become the identity of the capture/review system.
|
|
30
|
+
|
|
31
|
+
The desired user experience is one macOS app, one daemon surface, one
|
|
32
|
+
permission assistant, one command palette, and one place to find runs and
|
|
33
|
+
artifacts.
|
|
21
34
|
|
|
22
35
|
Internally, Lattices can still keep specialized helper processes. The important
|
|
23
36
|
distinction is that helpers are implementation details. The product the user
|
|
@@ -25,12 +38,12 @@ grants permissions to, launches, trusts, and remembers should be Lattices.
|
|
|
25
38
|
|
|
26
39
|
## Why This Belongs Here
|
|
27
40
|
|
|
28
|
-
Lattices and
|
|
41
|
+
Lattices and Action converged on the same operating model from opposite
|
|
29
42
|
directions:
|
|
30
43
|
|
|
31
44
|
- Lattices already knows about workspaces, projects, windows, Spaces, layers,
|
|
32
45
|
overlays, command surfaces, and local daemon control.
|
|
33
|
-
-
|
|
46
|
+
- Action already knows about observing surfaces, resolving targets, running
|
|
34
47
|
deterministic actions, recording what happened, and saving reviewable
|
|
35
48
|
artifacts.
|
|
36
49
|
|
|
@@ -40,7 +53,7 @@ LAT-005 proposes the shared action loop:
|
|
|
40
53
|
input -> canonical action -> plan -> execute -> verify -> receipt -> history
|
|
41
54
|
```
|
|
42
55
|
|
|
43
|
-
|
|
56
|
+
Action supplies the missing proof loop:
|
|
44
57
|
|
|
45
58
|
```text
|
|
46
59
|
run -> observe -> act -> capture -> trace -> artifact -> review
|
|
@@ -51,7 +64,7 @@ control the desktop and prove what happened.
|
|
|
51
64
|
|
|
52
65
|
## Problem
|
|
53
66
|
|
|
54
|
-
Keeping Mira as a separate
|
|
67
|
+
Keeping Action/Mira as a separate product creates exactly the kind of operational
|
|
55
68
|
friction Lattices is supposed to remove:
|
|
56
69
|
|
|
57
70
|
- another repo to remember
|
|
@@ -71,24 +84,23 @@ sound.
|
|
|
71
84
|
|
|
72
85
|
## Product Decision
|
|
73
86
|
|
|
74
|
-
|
|
87
|
+
Runs and capture should become a Lattices feature area, not a second app.
|
|
75
88
|
|
|
76
89
|
Recommended naming:
|
|
77
90
|
|
|
78
91
|
| Concept | Product Name |
|
|
79
92
|
| --- | --- |
|
|
80
|
-
| Capture/review mode | Mira |
|
|
81
93
|
| Individual execution | Run |
|
|
82
94
|
| Saved output | Artifact |
|
|
83
95
|
| Machine-readable event log | Trace |
|
|
84
96
|
| Human-facing result | Review |
|
|
85
|
-
| Visual desktop presence |
|
|
97
|
+
| Visual desktop presence | Actor |
|
|
86
98
|
|
|
87
99
|
Examples of user-facing commands:
|
|
88
100
|
|
|
89
101
|
- `Record Current Window`
|
|
90
102
|
- `Capture Frontmost App`
|
|
91
|
-
- `Start
|
|
103
|
+
- `Start Run`
|
|
92
104
|
- `Review Last Run`
|
|
93
105
|
- `Show Run Artifacts`
|
|
94
106
|
- `Rerun Scenario`
|
|
@@ -99,17 +111,17 @@ Those details belong in diagnostics and receipts.
|
|
|
99
111
|
|
|
100
112
|
## Goals
|
|
101
113
|
|
|
102
|
-
1. Make Lattices the single user-facing app for workspace control and
|
|
114
|
+
1. Make Lattices the single user-facing app for workspace control and
|
|
103
115
|
capture/review flows.
|
|
104
116
|
2. Consolidate permission guidance into the existing Lattices Permissions
|
|
105
117
|
Assistant.
|
|
106
|
-
3. Preserve
|
|
118
|
+
3. Preserve Action's important native runtime lesson: AppKit-dependent work must
|
|
107
119
|
run inside a real app lifecycle.
|
|
108
120
|
4. Add a first-class run/artifact model that extends LAT-005 receipts and
|
|
109
121
|
history.
|
|
110
|
-
5. Route
|
|
122
|
+
5. Route run/capture activity through the Lattices daemon instead of requiring users
|
|
111
123
|
or agents to remember a second public control plane.
|
|
112
|
-
6.
|
|
124
|
+
6. Keep actors as optional generic Lattices presences, not a required product identity.
|
|
113
125
|
7. Migrate the useful protocol/runtime ideas without importing every demo,
|
|
114
126
|
composer, or release workflow at once.
|
|
115
127
|
|
|
@@ -118,9 +130,9 @@ Those details belong in diagnostics and receipts.
|
|
|
118
130
|
- Do not ship two visible apps as the normal experience.
|
|
119
131
|
- Do not push ScreenCaptureKit recording into a headless-only lifecycle.
|
|
120
132
|
- Do not make Lattices a general cross-platform automation product.
|
|
121
|
-
- Do not absorb
|
|
133
|
+
- Do not absorb Action's composer/export stack before the run/capture/review loop
|
|
122
134
|
is integrated.
|
|
123
|
-
- Do not remove the existing
|
|
135
|
+
- Do not remove the existing Action repo until Lattices can own the
|
|
124
136
|
important runtime paths.
|
|
125
137
|
- Do not ask users to manage Action.app permissions as part of normal Lattices
|
|
126
138
|
usage.
|
|
@@ -132,8 +144,8 @@ The desired experience is:
|
|
|
132
144
|
1. User launches Lattices.
|
|
133
145
|
2. Lattices shows one permission checklist.
|
|
134
146
|
3. User opens the palette and chooses `Record Current Window`.
|
|
135
|
-
4. Lattices starts a
|
|
136
|
-
5.
|
|
147
|
+
4. Lattices starts a run.
|
|
148
|
+
5. Optional actors or overlays indicate recording or inspection state.
|
|
137
149
|
6. The run writes media, screenshots, trace events, and receipts into the
|
|
138
150
|
Lattices run store.
|
|
139
151
|
7. User opens `Review Last Run` from the same app.
|
|
@@ -141,7 +153,7 @@ The desired experience is:
|
|
|
141
153
|
|
|
142
154
|
The user should not need to open a second project, remember the `action-dev`
|
|
143
155
|
CLI, or reason about `Action.app` unless they are intentionally working on the
|
|
144
|
-
old
|
|
156
|
+
old Action codebase.
|
|
145
157
|
|
|
146
158
|
## Permission Model
|
|
147
159
|
|
|
@@ -154,8 +166,9 @@ Lattices already has a real permission assistant for:
|
|
|
154
166
|
- Automation
|
|
155
167
|
- Input Monitoring
|
|
156
168
|
|
|
157
|
-
|
|
158
|
-
instead of introducing a second prompt
|
|
169
|
+
The Permissions Assistant should extend its existing capability model with
|
|
170
|
+
capture/review-specific explanations instead of introducing a second prompt
|
|
171
|
+
path.
|
|
159
172
|
|
|
160
173
|
### TCC Identity
|
|
161
174
|
|
|
@@ -172,7 +185,7 @@ the integration strategy important:
|
|
|
172
185
|
|
|
173
186
|
### AppKit Lifecycle Boundary
|
|
174
187
|
|
|
175
|
-
|
|
188
|
+
Action's recording work found an important constraint: ScreenCaptureKit recording
|
|
176
189
|
is more reliable when the actual recording path runs inside a real AppKit app
|
|
177
190
|
lifecycle.
|
|
178
191
|
|
|
@@ -183,7 +196,7 @@ Recommended shape:
|
|
|
183
196
|
```text
|
|
184
197
|
Lattices.app
|
|
185
198
|
normal mode
|
|
186
|
-
--
|
|
199
|
+
--recording-probe mode
|
|
187
200
|
|
|
188
201
|
Lattices daemon
|
|
189
202
|
accepts run/capture requests
|
|
@@ -204,7 +217,7 @@ Lattices.app
|
|
|
204
217
|
permissions assistant
|
|
205
218
|
window/session/layer/overlay control
|
|
206
219
|
|
|
207
|
-
Action.app
|
|
220
|
+
Action.app
|
|
208
221
|
agent: ws://127.0.0.1:4319
|
|
209
222
|
capture, recording probe, review loop
|
|
210
223
|
runtime/session/protocol packages
|
|
@@ -217,8 +230,8 @@ Lattices.app
|
|
|
217
230
|
daemon: ws://127.0.0.1:9399
|
|
218
231
|
action runtime
|
|
219
232
|
permission assistant
|
|
220
|
-
|
|
221
|
-
|
|
233
|
+
run/capture/review UI
|
|
234
|
+
recording probe mode
|
|
222
235
|
overlay actor renderer
|
|
223
236
|
|
|
224
237
|
Optional internal helpers
|
|
@@ -289,7 +302,7 @@ Add a run model that complements LAT-005 receipts.
|
|
|
289
302
|
"summary": "Started recording current window",
|
|
290
303
|
"data": {
|
|
291
304
|
"wid": 12345,
|
|
292
|
-
"probe": "Lattices.app --
|
|
305
|
+
"probe": "Lattices.app --recording-probe"
|
|
293
306
|
}
|
|
294
307
|
}
|
|
295
308
|
```
|
|
@@ -321,8 +334,8 @@ Development-only bridge methods may exist while migrating:
|
|
|
321
334
|
|
|
322
335
|
| Method | Purpose |
|
|
323
336
|
| --- | --- |
|
|
324
|
-
| `
|
|
325
|
-
| `
|
|
337
|
+
| `action.bridge.status` | Check whether the old Action agent is running |
|
|
338
|
+
| `action.bridge.call` | Proxy a small allowlist of old agent methods |
|
|
326
339
|
|
|
327
340
|
Those bridge methods should be treated as scaffolding, not the destination.
|
|
328
341
|
|
|
@@ -330,7 +343,7 @@ Those bridge methods should be treated as scaffolding, not the destination.
|
|
|
330
343
|
|
|
331
344
|
### Home
|
|
332
345
|
|
|
333
|
-
Add a compact
|
|
346
|
+
Add a compact run status area only when relevant:
|
|
334
347
|
|
|
335
348
|
- last run
|
|
336
349
|
- active recording
|
|
@@ -346,13 +359,12 @@ Add commands over the same run API:
|
|
|
346
359
|
- `Record Current Window`
|
|
347
360
|
- `Screenshot Current Window`
|
|
348
361
|
- `Review Last Run`
|
|
349
|
-
- `Stop
|
|
350
|
-
- `
|
|
351
|
-
- `Hide Mira`
|
|
362
|
+
- `Stop Run`
|
|
363
|
+
- `Open Run Artifacts`
|
|
352
364
|
|
|
353
365
|
### Permissions Assistant
|
|
354
366
|
|
|
355
|
-
Add a
|
|
367
|
+
Add a capture capability section that explains why capture/review uses:
|
|
356
368
|
|
|
357
369
|
- Screen Recording for screenshots and recordings
|
|
358
370
|
- Accessibility for target resolution and window interaction
|
|
@@ -361,13 +373,14 @@ Add a Mira capability section that explains why capture/review uses:
|
|
|
361
373
|
|
|
362
374
|
The assistant should report which exact component is missing permission.
|
|
363
375
|
|
|
364
|
-
###
|
|
376
|
+
### Actors
|
|
365
377
|
|
|
366
|
-
|
|
378
|
+
Keep actors available as normal Lattices overlay actors.
|
|
367
379
|
|
|
368
|
-
|
|
380
|
+
Run/capture states can map onto LAT-004 actor states when a visible presence is
|
|
381
|
+
useful:
|
|
369
382
|
|
|
370
|
-
|
|
|
383
|
+
| Run State | Overlay State |
|
|
371
384
|
| --- | --- |
|
|
372
385
|
| idle | `idle` |
|
|
373
386
|
| observing | `active` |
|
|
@@ -387,7 +400,7 @@ Move concepts before moving everything.
|
|
|
387
400
|
|
|
388
401
|
### Bring Into Lattices Early
|
|
389
402
|
|
|
390
|
-
-
|
|
403
|
+
- generic actor metadata and assets
|
|
391
404
|
- run/session lifecycle concepts
|
|
392
405
|
- artifact and trace event types
|
|
393
406
|
- capture request/response contracts
|
|
@@ -406,7 +419,7 @@ Move concepts before moving everything.
|
|
|
406
419
|
|
|
407
420
|
### Rework Instead Of Copying Directly
|
|
408
421
|
|
|
409
|
-
- `Action.app` shell becomes Lattices
|
|
422
|
+
- `Action.app` shell becomes Lattices run/capture mode
|
|
410
423
|
- old Action agent protocol becomes internal migration scaffolding
|
|
411
424
|
- old CLI commands become Lattices palette, CLI, or daemon commands
|
|
412
425
|
- old docs become migration references, not another documentation tree
|
|
@@ -416,21 +429,21 @@ Move concepts before moving everything.
|
|
|
416
429
|
Suggested Lattices locations:
|
|
417
430
|
|
|
418
431
|
```text
|
|
419
|
-
apps/mac/Sources/Core/
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
apps/mac/Sources/Core/Overlays/Actors/
|
|
432
|
+
apps/mac/Sources/Core/Runs/
|
|
433
|
+
RunStore.swift
|
|
434
|
+
RunModels.swift
|
|
435
|
+
|
|
436
|
+
apps/mac/Sources/Core/Capture/
|
|
437
|
+
CaptureController.swift
|
|
438
|
+
RecordingProbe.swift
|
|
439
|
+
|
|
440
|
+
apps/mac/Sources/Core/Overlays/Actors/
|
|
428
441
|
actor metadata and bundled assets
|
|
429
442
|
|
|
430
443
|
docs/proposals/
|
|
431
|
-
LAT-006-
|
|
444
|
+
LAT-006-runs-and-capture-in-lattices.md
|
|
432
445
|
|
|
433
|
-
docs/
|
|
446
|
+
docs/runs.md
|
|
434
447
|
user-facing capture/review docs once implemented
|
|
435
448
|
```
|
|
436
449
|
|
|
@@ -444,24 +457,24 @@ package namespace rather than keeping `action` as the product name.
|
|
|
444
457
|
- Add this proposal.
|
|
445
458
|
- Cross-link LAT-005 and LAT-006.
|
|
446
459
|
- Define `RunSession`, `RunArtifact`, and `TraceEvent`.
|
|
447
|
-
- Add a dev-only bridge to the old
|
|
460
|
+
- Add a dev-only bridge to the old Action agent if useful for experiments.
|
|
448
461
|
- Do not present the bridge as the final user experience.
|
|
449
462
|
|
|
450
463
|
### Phase 2: One-Permission Screenshot Slice
|
|
451
464
|
|
|
452
|
-
Implement the first real
|
|
465
|
+
Implement the first real capture feature entirely inside Lattices:
|
|
453
466
|
|
|
454
467
|
```text
|
|
455
468
|
Screenshot Current Window -> RunSession -> Artifact -> Review
|
|
456
469
|
```
|
|
457
470
|
|
|
458
471
|
This proves the most important integration point: the user grants Lattices
|
|
459
|
-
permission and receives a
|
|
472
|
+
permission and receives a run artifact without opening Action.app.
|
|
460
473
|
|
|
461
474
|
### Phase 3: Recording Probe In Lattices
|
|
462
475
|
|
|
463
476
|
- Port the recording probe pattern.
|
|
464
|
-
- Launch `Lattices.app --
|
|
477
|
+
- Launch `Lattices.app --recording-probe` for actual recording work.
|
|
465
478
|
- Preserve stop-file, finished-file, and debug-log behavior.
|
|
466
479
|
- Store outputs in the Lattices run directory.
|
|
467
480
|
|
|
@@ -487,7 +500,7 @@ permission and receives a Mira artifact without opening Action.app.
|
|
|
487
500
|
The smallest meaningful integration is:
|
|
488
501
|
|
|
489
502
|
```text
|
|
490
|
-
Record a screenshot of the current window as a
|
|
503
|
+
Record a screenshot of the current window as a run inside Lattices.
|
|
491
504
|
```
|
|
492
505
|
|
|
493
506
|
Required pieces:
|
|
@@ -498,18 +511,18 @@ Required pieces:
|
|
|
498
511
|
- palette command
|
|
499
512
|
- permission receipt
|
|
500
513
|
- recent-run review surface
|
|
501
|
-
- optional
|
|
514
|
+
- optional actor state change
|
|
502
515
|
|
|
503
516
|
This avoids the two-app permission problem from the start and gives the product
|
|
504
|
-
a concrete user-facing
|
|
517
|
+
a concrete user-facing capture feature before the heavier recording probe is
|
|
505
518
|
ported.
|
|
506
519
|
|
|
507
520
|
## Open Questions
|
|
508
521
|
|
|
509
|
-
### Should
|
|
522
|
+
### Should Actors Stay?
|
|
510
523
|
|
|
511
|
-
Recommendation: yes.
|
|
512
|
-
|
|
524
|
+
Recommendation: yes, as generic presences. Retire Mira as the product name, but
|
|
525
|
+
keep actors/pets available for agent, run, app, and task presence.
|
|
513
526
|
|
|
514
527
|
### Should The Old Action Agent Port Stay?
|
|
515
528
|
|
|
@@ -541,13 +554,13 @@ recording once the run store and review loop exist.
|
|
|
541
554
|
|
|
542
555
|
This proposal is successful when:
|
|
543
556
|
|
|
544
|
-
- the user sees
|
|
557
|
+
- the user sees runs and capture as part of Lattices, not as another app to remember
|
|
545
558
|
- the normal capture path asks for Lattices permissions, not Action.app
|
|
546
559
|
- a palette command can create a run artifact from the current window
|
|
547
560
|
- run artifacts are reviewable inside Lattices
|
|
548
561
|
- action receipts and run traces can reference each other
|
|
549
|
-
-
|
|
562
|
+
- actors can reflect run state without owning the run contract
|
|
550
563
|
- recording uses a real AppKit lifecycle without requiring a separate visible
|
|
551
564
|
product
|
|
552
|
-
- the old
|
|
565
|
+
- the old Action repo can eventually become a migration source, not an active
|
|
553
566
|
parallel product
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
# LAT-007: Unified App Shell
|
|
2
|
+
|
|
3
|
+
## Summary
|
|
4
|
+
|
|
5
|
+
Lattices should feel like one structured app, not a collection of useful
|
|
6
|
+
windows added one feature at a time. The native app already has a strong
|
|
7
|
+
starting point in the unified shell managed by `ScreenMapWindowController`.
|
|
8
|
+
Future feature work should treat that shell as the durable product surface.
|
|
9
|
+
|
|
10
|
+
Transient surfaces such as the command palette, voice command window, HUD,
|
|
11
|
+
and menu bar popover should become launchers, inspectors, or fast overlays
|
|
12
|
+
that route back into the shell for persistent workflows.
|
|
13
|
+
|
|
14
|
+
## Product Shape
|
|
15
|
+
|
|
16
|
+
The main Lattices window should own the primary information architecture:
|
|
17
|
+
|
|
18
|
+
| Area | Purpose |
|
|
19
|
+
|------|---------|
|
|
20
|
+
| Home | Workspace status, desktop control, agent/search entry points, and discoverable project launch |
|
|
21
|
+
| Assistant | Chat and agent-oriented workspace help |
|
|
22
|
+
| Layout | Visual desktop map and window arrangement |
|
|
23
|
+
| Desktop Inventory | Window/search/OCR inventory |
|
|
24
|
+
| Activity | Logs, diagnostics, event history, and operational feedback |
|
|
25
|
+
| Settings | Preferences, permissions, shortcuts, mouse, AI, OCR, companion |
|
|
26
|
+
| Docs | Reference and onboarding material |
|
|
27
|
+
|
|
28
|
+
The menu bar popover should stay lightweight: quick project launch plus
|
|
29
|
+
buttons into the main shell. The command palette should stay global and
|
|
30
|
+
action-oriented. The HUD and voice UI should stay transient and contextual.
|
|
31
|
+
|
|
32
|
+
## First User Experience
|
|
33
|
+
|
|
34
|
+
The friendliest starting point is Home, not Settings and not a floating
|
|
35
|
+
utility panel.
|
|
36
|
+
|
|
37
|
+
On first launch:
|
|
38
|
+
|
|
39
|
+
1. The onboarding window introduces the product briefly.
|
|
40
|
+
2. Onboarding presents optional capabilities only; it does not require project
|
|
41
|
+
setup or terminal-session setup.
|
|
42
|
+
3. Completing onboarding opens the unified Home page.
|
|
43
|
+
4. Home starts with desktop control, search/context, and assistant entry points;
|
|
44
|
+
project launch remains discoverable inside the app.
|
|
45
|
+
5. Missing setup is explained in place. Settings remains available, but the app
|
|
46
|
+
should not throw the user into Settings just because a scan root is missing.
|
|
47
|
+
|
|
48
|
+
This keeps the first mental model simple:
|
|
49
|
+
|
|
50
|
+
> Lattices sees your workspace, helps arrange it, and gives agents local context.
|
|
51
|
+
> Project and terminal workflows are useful depth, not the first required step.
|
|
52
|
+
|
|
53
|
+
## Surface Rules
|
|
54
|
+
|
|
55
|
+
1. Durable state belongs in the unified app shell.
|
|
56
|
+
2. Popovers and overlays should not become alternate versions of the app.
|
|
57
|
+
3. Feature entry points should navigate to an app page when the user needs
|
|
58
|
+
to read, configure, inspect, or continue a workflow.
|
|
59
|
+
4. Floating panels are appropriate for short-lived interactions: search,
|
|
60
|
+
command execution, voice capture, HUD previews, and permission helpers.
|
|
61
|
+
5. Settings, diagnostics, docs, assistant setup, and inventory views should
|
|
62
|
+
avoid standalone windows unless there is an explicit debugging reason.
|
|
63
|
+
6. Page changes inside the shell should preserve the user's window size and
|
|
64
|
+
position. Pick a good initial size, then let the window feel stable.
|
|
65
|
+
|
|
66
|
+
## Migration Plan
|
|
67
|
+
|
|
68
|
+
### Phase 1: Route Existing Entry Points
|
|
69
|
+
|
|
70
|
+
- Add missing primary pages to the unified shell.
|
|
71
|
+
- Redirect menu, palette, hotkey, and footer links into shell pages.
|
|
72
|
+
- Keep legacy utility windows available internally where useful, but stop
|
|
73
|
+
presenting them from normal app navigation.
|
|
74
|
+
|
|
75
|
+
### Phase 2: Normalize Page Responsibilities
|
|
76
|
+
|
|
77
|
+
- Make Home the status and launch surface.
|
|
78
|
+
- Make Layout the only visual arrangement surface.
|
|
79
|
+
- Make Desktop Inventory the only persistent search/inventory surface.
|
|
80
|
+
- Make Activity the only persistent diagnostics surface.
|
|
81
|
+
- Keep Settings and Docs under the shell instead of separate windows.
|
|
82
|
+
|
|
83
|
+
### Phase 3: Reduce Duplicate UI
|
|
84
|
+
|
|
85
|
+
- Convert repeated panel headers, footers, and shell chrome into reusable
|
|
86
|
+
components.
|
|
87
|
+
- Move preview rendering and diagnostic log rendering into shared views.
|
|
88
|
+
- Keep command palette rows and menu items as bindings to canonical actions.
|
|
89
|
+
|
|
90
|
+
### Phase 4: Product-Level Navigation
|
|
91
|
+
|
|
92
|
+
- Add a route helper for app pages so callers express intent like
|
|
93
|
+
`showActivity()` or `showSettings(.shortcuts)` instead of manually choosing
|
|
94
|
+
windows.
|
|
95
|
+
- Add page-specific deep links for companion, docs, and diagnostics.
|
|
96
|
+
- Record navigation in diagnostics so support sessions can reconstruct how a
|
|
97
|
+
user reached a feature.
|
|
98
|
+
|
|
99
|
+
## First Slice
|
|
100
|
+
|
|
101
|
+
The first implemented slice is Activity consolidation:
|
|
102
|
+
|
|
103
|
+
- `Activity` is now a primary app-shell page.
|
|
104
|
+
- Home links to Activity.
|
|
105
|
+
- menu bar, command palette, hotkey, settings/docs footers, launch flag, voice,
|
|
106
|
+
and Layout log links route to the Activity page.
|
|
107
|
+
- The legacy floating `DiagnosticWindow` remains for internal/debug use.
|
|
108
|
+
|
|
109
|
+
The second implemented slice is first-run Home consolidation:
|
|
110
|
+
|
|
111
|
+
- Completing onboarding opens Home.
|
|
112
|
+
- Missing scan-root setup is handled inside Home instead of auto-opening
|
|
113
|
+
Settings.
|
|
114
|
+
- Onboarding no longer introduces project-root or tmux setup.
|
|
115
|
+
- Home shows a desktop-first getting-started path when no projects are
|
|
116
|
+
discovered: layout, search/context, and assistant.
|
|
117
|
+
- Project scanning is skipped when the scan root is empty.
|
|
118
|
+
- App-shell tab navigation preserves the current window frame instead of
|
|
119
|
+
resizing per page.
|
|
120
|
+
|
|
121
|
+
## Open Questions
|
|
122
|
+
|
|
123
|
+
- Should the menu bar click open Home in the unified shell by default, leaving
|
|
124
|
+
the project popover as an explicit quick-launch mode?
|
|
125
|
+
- Should Command Mode become the embedded Desktop Inventory page only, with the
|
|
126
|
+
standalone panel reserved for a hotkey overlay?
|
|
127
|
+
- Should Settings expose direct subroutes such as `settings.shortcuts` and
|
|
128
|
+
`settings.permissions`?
|
package/docs/quickstart.md
CHANGED
|
@@ -55,7 +55,9 @@ your pane layout:
|
|
|
55
55
|
|
|
56
56
|
```bash
|
|
57
57
|
brew install tmux
|
|
58
|
-
cd ~/your-project
|
|
58
|
+
cd ~/your-project
|
|
59
|
+
lattices # home screen: status only, does not attach
|
|
60
|
+
lattices start # create or reattach the session
|
|
59
61
|
```
|
|
60
62
|
|
|
61
63
|
This creates a tmux session with your configured panes side by side.
|
package/docs/release.md
CHANGED
|
@@ -124,7 +124,8 @@ GitHub release step.
|
|
|
124
124
|
|
|
125
125
|
## npm releases
|
|
126
126
|
|
|
127
|
-
The CLI package is published as `@lattices
|
|
127
|
+
The CLI package is published as `@arach/lattices` (npm page) and also as
|
|
128
|
+
`@lattices/cli` for back-compat — same tarball, dual publish in CI.
|
|
128
129
|
|
|
129
130
|
There are two valid npm paths:
|
|
130
131
|
|
|
@@ -141,7 +142,7 @@ NPM_TOKEN
|
|
|
141
142
|
```
|
|
142
143
|
|
|
143
144
|
`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
|
+
publish `@arach/lattices` and `@lattices/cli`. It currently should authenticate as the npm user
|
|
145
146
|
`arach`; if a different maintainer publishes, set environment variable
|
|
146
147
|
`NPM_EXPECTED_USER` to that npm username.
|
|
147
148
|
|
|
@@ -155,7 +156,7 @@ gh variable set NPM_EXPECTED_USER --repo arach/lattices --env release --body ara
|
|
|
155
156
|
Release:
|
|
156
157
|
|
|
157
158
|
```sh
|
|
158
|
-
git tag -a npm-v0.
|
|
159
|
+
git tag -a npm-v0.6.1 -m "@arach/lattices 0.6.1"
|
|
159
160
|
git push origin npm-v0.5.0
|
|
160
161
|
```
|
|
161
162
|
|
package/docs/repo-structure.md
CHANGED
|
@@ -19,6 +19,7 @@ for keeping file structure as architecture.
|
|
|
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
|
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
# LatticesTerminalKit
|
|
2
|
+
|
|
3
|
+
`LatticesTerminalKit` is the reusable Swift terminal-inventory slice of
|
|
4
|
+
lattices. It is designed for native hosts such as Scout that should embed the
|
|
5
|
+
same macOS probes directly instead of talking to the lattices daemon or CLI.
|
|
6
|
+
|
|
7
|
+
## V1 Scope
|
|
8
|
+
|
|
9
|
+
The first slice inventories:
|
|
10
|
+
|
|
11
|
+
- Apple Terminal
|
|
12
|
+
- iTerm2
|
|
13
|
+
- Ghostty
|
|
14
|
+
|
|
15
|
+
It intentionally stays read-oriented. Focus and placement actions can build on
|
|
16
|
+
the returned handles later, but the v1 contract is an observed terminal
|
|
17
|
+
projection, not a canonical session or message store.
|
|
18
|
+
|
|
19
|
+
## Import
|
|
20
|
+
|
|
21
|
+
The product lives in the repo's reusable Swift package:
|
|
22
|
+
|
|
23
|
+
```swift
|
|
24
|
+
import LatticesTerminalKit
|
|
25
|
+
|
|
26
|
+
let snapshot = TerminalInventory.snapshot()
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
For bounded tmux pane context:
|
|
30
|
+
|
|
31
|
+
```swift
|
|
32
|
+
let snapshot = TerminalInventory.snapshot(options: .init(
|
|
33
|
+
includePaneContent: true,
|
|
34
|
+
paneContentLineLimit: 120
|
|
35
|
+
))
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
## Snapshot Shape
|
|
39
|
+
|
|
40
|
+
`TerminalInventorySnapshot` contains:
|
|
41
|
+
|
|
42
|
+
- `snapshotId`
|
|
43
|
+
- `observedAt`
|
|
44
|
+
- `terminals`
|
|
45
|
+
- `tmuxSessions`
|
|
46
|
+
- `terminalTabs`
|
|
47
|
+
- `terminalWindows`
|
|
48
|
+
|
|
49
|
+
Each `TerminalInstance` includes:
|
|
50
|
+
|
|
51
|
+
- identity: `stableKey`, `tty`, app name, bundle id, app pid
|
|
52
|
+
- terminal UI: window id/title, tab index/title, terminal session id
|
|
53
|
+
- process context: interesting process rows, shell pid, cwd, cwd source
|
|
54
|
+
- tmux context: session and pane id
|
|
55
|
+
- harness detection: `detectedHarnesses` for Claude and Codex signals
|
|
56
|
+
- action preparation: `focusHandle`, `placementHandle`, `capabilities`
|
|
57
|
+
- trust metadata: `provenance` with confidence for tty/cwd/window/tmux/harness
|
|
58
|
+
- optional inspection: bounded `paneCapture`
|
|
59
|
+
|
|
60
|
+
## Join Strategy
|
|
61
|
+
|
|
62
|
+
The kit joins by TTY first.
|
|
63
|
+
|
|
64
|
+
Inputs:
|
|
65
|
+
|
|
66
|
+
- process table from `ps`
|
|
67
|
+
- cwd lookup from batched `lsof`
|
|
68
|
+
- tmux sessions and panes
|
|
69
|
+
- AppleScript tab probes for Terminal and iTerm2
|
|
70
|
+
- CG window inventory for Terminal, iTerm2, and Ghostty
|
|
71
|
+
|
|
72
|
+
Window resolution order:
|
|
73
|
+
|
|
74
|
+
1. lattices title tag: `[lattices:<session>]`
|
|
75
|
+
2. app window index from Terminal/iTerm2 tab probes
|
|
76
|
+
3. CG owner process tree TTY, used especially for Ghostty
|
|
77
|
+
|
|
78
|
+
Ghostty is expected to be window-level in v1. The kit does not synthesize stable
|
|
79
|
+
tab ids from titles or z-order.
|
|
80
|
+
|
|
81
|
+
## Notes For Scout
|
|
82
|
+
|
|
83
|
+
CG window IDs are useful but volatile. Consumers should pair them with
|
|
84
|
+
`stableKey`, app pid, bundle id, tty, and tmux pane identity where available.
|
|
85
|
+
|
|
86
|
+
Pane capture is opt-in and ephemeral. It should be treated as drill-down context,
|
|
87
|
+
not as durable chat or terminal history.
|