ltcai 4.5.1 → 4.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.
- package/README.md +50 -34
- package/docs/CHANGELOG.md +43 -0
- package/docs/V4_6_0_LIVING_BRAIN_EXPERIENCE_REPORT.md +58 -0
- package/docs/V4_DIGITAL_BRAIN_RECOVERY.md +16 -15
- package/frontend/index.html +2 -2
- package/frontend/src/App.tsx +18 -57
- package/frontend/src/api/client.ts +1 -0
- package/frontend/src/components/BrainConversation.tsx +301 -0
- package/frontend/src/components/FirstRunGuide.tsx +4 -4
- package/frontend/src/components/LivingBrain.tsx +121 -0
- package/frontend/src/components/ProductFlow.tsx +596 -0
- package/frontend/src/pages/Ask.tsx +2 -229
- package/frontend/src/pages/Brain.tsx +68 -49
- package/frontend/src/routes.ts +15 -26
- package/frontend/src/styles.css +1065 -68
- package/lattice_brain/__init__.py +1 -1
- package/lattice_brain/runtime/multi_agent.py +1 -1
- package/latticeai/__init__.py +1 -1
- package/latticeai/core/marketplace.py +1 -1
- package/latticeai/core/workspace_os.py +1 -1
- package/package.json +2 -2
- package/src-tauri/Cargo.lock +1 -1
- package/src-tauri/Cargo.toml +1 -1
- package/src-tauri/tauri.conf.json +1 -1
- package/static/app/asset-manifest.json +5 -5
- package/static/app/assets/index-By-G-Kay.css +2 -0
- package/static/app/assets/index-CJx6WuQH.js +336 -0
- package/static/app/assets/index-CJx6WuQH.js.map +1 -0
- package/static/app/index.html +4 -4
- package/static/manifest.json +1 -1
- package/static/app/assets/index-3G8qcrIS.js +0 -336
- package/static/app/assets/index-3G8qcrIS.js.map +0 -1
- package/static/app/assets/index-C0wYZp7k.css +0 -2
package/README.md
CHANGED
|
@@ -7,14 +7,18 @@
|
|
|
7
7
|
[](https://github.com/TaeSooPark-PTS/LatticeAI/actions/workflows/ci.yml)
|
|
8
8
|
[](LICENSE)
|
|
9
9
|
|
|
10
|
-
**Lattice AI v4.
|
|
10
|
+
**Lattice AI v4.6.0 is a local-first Living Brain desktop workspace.** It runs
|
|
11
11
|
as a Tauri desktop app with a localhost FastAPI sidecar, stores the user's brain
|
|
12
|
-
locally by default, and
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
12
|
+
locally by default, and makes the Brain plus conversation the primary product
|
|
13
|
+
experience.
|
|
14
|
+
|
|
15
|
+
This README describes the v4.6.0 release-preparation tree, which preserves the
|
|
16
|
+
v4.4.0 physical `lattice_brain` extraction, v4.5.0 capability recovery, and
|
|
17
|
+
v4.5.1 product shell while repositioning the graph as a deep exploration layer.
|
|
18
|
+
First launch now follows a Brain-first product flow: Login, friendly environment
|
|
19
|
+
analysis, recommended models, guided install/download/validate/load, then the
|
|
20
|
+
living Brain conversation. Memories, knowledge, relationships, and the advanced
|
|
21
|
+
graph are progressively disclosed beneath the Brain.
|
|
18
22
|
External package registries are owner-published; the badges above link to
|
|
19
23
|
package pages and may show the most recently published owner-controlled registry
|
|
20
24
|
version, which can lag behind the GitHub Release.
|
|
@@ -23,19 +27,23 @@ version, which can lag behind the GitHub Release.
|
|
|
23
27
|
|
|
24
28
|
- Desktop app starts and serves the React/Vite product shell from the FastAPI
|
|
25
29
|
sidecar.
|
|
26
|
-
-
|
|
27
|
-
|
|
28
|
-
-
|
|
29
|
-
|
|
30
|
+
- First launch opens to Login only, then guides environment analysis,
|
|
31
|
+
recommendations, install/download/validate/load, and finally the Brain.
|
|
32
|
+
- After model loading, the home route opens to a living Brain presence plus
|
|
33
|
+
durable conversation, with the Brain always visible during the primary chat
|
|
34
|
+
flow.
|
|
35
|
+
- The Brain presence reacts to conversation, recall, model readiness, and
|
|
36
|
+
agent/workflow activity with neural movement, memory pulses, and status
|
|
37
|
+
changes.
|
|
38
|
+
- Memories, Knowledge, Relationships, and Graph are ordered as progressive
|
|
39
|
+
disclosure layers; the graph is no longer the product's first impression.
|
|
30
40
|
- Capture uploads a document through `/upload/document` and shows indexed
|
|
31
41
|
documents from the backend.
|
|
32
42
|
- Act exposes workflow create/run surfaces and agent runtime status without
|
|
33
43
|
presenting simulation as real success. When no LLM-backed model is loaded,
|
|
34
44
|
deterministic model-free agent simulation is reported honestly and does not call a model.
|
|
35
|
-
-
|
|
36
|
-
|
|
37
|
-
Pick a brain -> Install locally -> Try a question -> Set the pace -> Explore
|
|
38
|
-
memory.
|
|
45
|
+
- Model setup recommends a short ranked list for the current computer instead
|
|
46
|
+
of exposing a catalog or runtime internals.
|
|
39
47
|
- Gemma 4 MLX models are checked against their local `config.json` before load:
|
|
40
48
|
Gemma 4 12B `gemma4_unified` now shows **Runtime update needed** when the
|
|
41
49
|
installed MLX-VLM lacks `mlx_vlm.models.gemma4_unified`, while Gemma 4 26B
|
|
@@ -49,7 +57,7 @@ version, which can lag behind the GitHub Release.
|
|
|
49
57
|
|
|
50
58
|
### Desktop Startup
|
|
51
59
|
|
|
52
|
-
The v4.
|
|
60
|
+
The v4.6.0 DMG build launches a visible Tauri app, starts the FastAPI sidecar on
|
|
53
61
|
localhost, and shuts that sidecar down on normal macOS quit.
|
|
54
62
|
|
|
55
63
|

|
|
@@ -59,23 +67,28 @@ Evidence:
|
|
|
59
67
|
- Health log: `output/audits/v4.3.2-rc/logs/desktop-sidecar-health-after-shutdown-fix.json`
|
|
60
68
|
- Shutdown log: `output/audits/v4.3.2-rc/logs/desktop-shutdown-after-fix.txt`
|
|
61
69
|
|
|
62
|
-
### Brain
|
|
70
|
+
### Living Brain
|
|
71
|
+
|
|
72
|
+
Brain opens on a living presence and conversation. The visual Brain is not a
|
|
73
|
+
logo or static decoration: it changes state while the user types, when memories
|
|
74
|
+
are recalled, while a response streams, and when agent/workflow activity is
|
|
75
|
+
reported.
|
|
63
76
|
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
77
|
+
The advanced graph still exists, but it is intentionally opened from the Graph
|
|
78
|
+
layer after the user moves through Brain, Memories, Knowledge, and
|
|
79
|
+
Relationships.
|
|
67
80
|
|
|
68
81
|

|
|
69
82
|
|
|
70
83
|

|
|
71
84
|
|
|
72
|
-
###
|
|
85
|
+
### Conversation
|
|
73
86
|
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
87
|
+
Conversation uses backend conversation, model, and memory APIs. If no model is
|
|
88
|
+
loaded, the UI shows a ready/unavailable state instead of fabricating an answer
|
|
89
|
+
while still keeping nearby memory and source signals visible.
|
|
77
90
|
|
|
78
|
-

|
|
79
92
|
|
|
80
93
|
### Capture
|
|
81
94
|
|
|
@@ -159,19 +172,19 @@ Archive evidence:
|
|
|
159
172
|
- **Privacy**: local-first by default; cloud models, Telegram, Brain Network,
|
|
160
173
|
Docker, model downloads, and update checks require explicit opt-in paths.
|
|
161
174
|
|
|
162
|
-
See [ARCHITECTURE.md](ARCHITECTURE.md) for the detailed v4 architecture. v4.
|
|
175
|
+
See [ARCHITECTURE.md](ARCHITECTURE.md) for the detailed v4 architecture. v4.6.0
|
|
163
176
|
does not redesign the v4.4.0 Brain Core extraction, StorageEngine, FastAPI,
|
|
164
177
|
Tauri, backup/restore, or portability architecture.
|
|
165
178
|
|
|
166
179
|
## Installation And Release Artifacts
|
|
167
180
|
|
|
168
|
-
Validated v4.
|
|
181
|
+
Validated v4.6.0 artifacts are produced from the Living Brain tree:
|
|
169
182
|
|
|
170
|
-
- `dist/ltcai-4.
|
|
171
|
-
- `dist/ltcai-4.
|
|
172
|
-
- `ltcai-4.
|
|
173
|
-
- `dist/ltcai-4.
|
|
174
|
-
- `src-tauri/target/release/bundle/dmg/Lattice AI_4.
|
|
183
|
+
- `dist/ltcai-4.6.0-py3-none-any.whl`
|
|
184
|
+
- `dist/ltcai-4.6.0.tar.gz`
|
|
185
|
+
- `ltcai-4.6.0.tgz`
|
|
186
|
+
- `dist/ltcai-4.6.0.vsix`
|
|
187
|
+
- `src-tauri/target/release/bundle/dmg/Lattice AI_4.6.0_aarch64.dmg`
|
|
175
188
|
|
|
176
189
|
For a public release, attach only those exact artifacts to the GitHub Release.
|
|
177
190
|
Package-registry publishing is reserved for the owner.
|
|
@@ -219,14 +232,15 @@ npm pack --dry-run
|
|
|
219
232
|
local use.
|
|
220
233
|
- Docker is never auto-started by default.
|
|
221
234
|
- Model downloads and cloud model calls require explicit user action/consent.
|
|
222
|
-
-
|
|
235
|
+
- Conversation does not fabricate answers when no model is loaded.
|
|
223
236
|
- Historical artifacts may remain in `dist/`; release uploads must use exact
|
|
224
|
-
v4.
|
|
237
|
+
v4.6.0 filenames for this release.
|
|
225
238
|
|
|
226
239
|
## Release History
|
|
227
240
|
|
|
228
241
|
| Version | Theme |
|
|
229
242
|
| --- | --- |
|
|
243
|
+
| 4.6.0 | Living Brain Experience: made Brain plus conversation the home product, added an animated living Brain presence, and moved graph exploration to the deepest intentional layer |
|
|
230
244
|
| 4.5.1 | Product Reimagining RC: replaced the desktop shell, navigation model, onboarding journey, first-viewport hierarchy, and visual system while preserving capabilities and local-first architecture |
|
|
231
245
|
| 4.5.0 | Product Experience Recovery RC: restored first-run setup, workspace/model onboarding, explicit model install/download/validate/load flow, Gemma 4 runtime compatibility gating, Basic-mode polish, and graph discoverability |
|
|
232
246
|
| 4.4.0 | Brain Engine Extraction: Brain Core physically moved into `lattice_brain` (graph/memory/context/conversation/ingestion/runtime/workflow/portability), latticeai paths reduced to compatibility shims, isolation tests guaranteeing no `latticeai` imports |
|
|
@@ -246,6 +260,7 @@ npm pack --dry-run
|
|
|
246
260
|
- [FEATURE_STATUS.md](FEATURE_STATUS.md) - current feature status and historical
|
|
247
261
|
status ledger.
|
|
248
262
|
- [RELEASE_NOTES.md](RELEASE_NOTES.md) - current release notes index.
|
|
263
|
+
- [RELEASE_NOTES_v4.6.0.md](RELEASE_NOTES_v4.6.0.md) - v4.6.0 Living Brain release notes.
|
|
249
264
|
- [RELEASE_NOTES_v4.5.1.md](RELEASE_NOTES_v4.5.1.md) - v4.5.1 RC release notes.
|
|
250
265
|
- [RELEASE_NOTES_v4.5.0.md](RELEASE_NOTES_v4.5.0.md) - v4.5.0 RC release notes.
|
|
251
266
|
- [RELEASE_NOTES_v4.4.0.md](RELEASE_NOTES_v4.4.0.md) - v4.4.0 release notes.
|
|
@@ -266,6 +281,7 @@ npm pack --dry-run
|
|
|
266
281
|
- [docs/V4_5_1_GRAPH_EXPERIENCE_REPORT.md](docs/V4_5_1_GRAPH_EXPERIENCE_REPORT.md) - v4.5.1 graph experience report.
|
|
267
282
|
- [docs/V4_5_1_VALIDATION_REPORT.md](docs/V4_5_1_VALIDATION_REPORT.md) - v4.5.1 validation report.
|
|
268
283
|
- [docs/V4_5_1_RC_ARTIFACTS.md](docs/V4_5_1_RC_ARTIFACTS.md) - v4.5.1 screenshot, GIF, and RC artifact manifest.
|
|
284
|
+
- [docs/V4_6_0_LIVING_BRAIN_EXPERIENCE_REPORT.md](docs/V4_6_0_LIVING_BRAIN_EXPERIENCE_REPORT.md) - v4.6.0 Living Brain design and validation notes.
|
|
269
285
|
- [docs/V4_3_2_GRAPH_UX_REPORT.md](docs/V4_3_2_GRAPH_UX_REPORT.md) - graph UX report.
|
|
270
286
|
- [docs/V4_3_2_PRODUCT_POLISH_REPORT.md](docs/V4_3_2_PRODUCT_POLISH_REPORT.md) - product polish report.
|
|
271
287
|
- [docs/V4_3_2_SELF_AUDIT_REPORT.md](docs/V4_3_2_SELF_AUDIT_REPORT.md) - self-audit evidence.
|
package/docs/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,49 @@
|
|
|
3
3
|
The top entry is the current release-preparation target. Older entries are
|
|
4
4
|
historical and may describe behavior as it existed at that release.
|
|
5
5
|
|
|
6
|
+
## [4.6.0] - 2026-06-13
|
|
7
|
+
|
|
8
|
+
> Living Brain Experience release after the v4.5.1 product shell reset.
|
|
9
|
+
|
|
10
|
+
### Changed
|
|
11
|
+
|
|
12
|
+
- Added the required first-launch product flow: Login -> Environment Analysis
|
|
13
|
+
-> Recommended Models -> Install & Load -> Brain.
|
|
14
|
+
- Made Brain plus conversation the post-model-load `/app` and `/app#/brain`
|
|
15
|
+
experience.
|
|
16
|
+
- Added an animated living Brain presence that reacts to listening, memory
|
|
17
|
+
recall, streaming/thinking, and agent/workflow activity.
|
|
18
|
+
- Centralized chat streaming, model status, image attachment, conversation
|
|
19
|
+
history, and memory previews in a reusable Brain conversation component.
|
|
20
|
+
- Reduced visible primary navigation to Brain, Memory, Files, Automations,
|
|
21
|
+
Models, and Settings;
|
|
22
|
+
`/ask` and `/chat` remain route-compatible aliases into Brain.
|
|
23
|
+
- Reordered Brain layers as Brain -> Memories -> Knowledge -> Relationships ->
|
|
24
|
+
Graph, moving graph exploration to the deepest intentional layer.
|
|
25
|
+
- Updated visual palette and copy so the product reads as a living digital
|
|
26
|
+
Brain rather than a graph tool or dashboard.
|
|
27
|
+
- Removed the first-run dashboard/setup-card panel from the app shell; setup is
|
|
28
|
+
now a full-screen product sequence before the Brain opens.
|
|
29
|
+
|
|
30
|
+
### Preserved
|
|
31
|
+
|
|
32
|
+
- Brain Core, FastAPI APIs, Tauri shell, StorageEngine, backup/restore,
|
|
33
|
+
portability, model runtimes, graph/search/chat/capture/automation/system
|
|
34
|
+
workflows, and route aliases remain capability-compatible.
|
|
35
|
+
|
|
36
|
+
### Validation
|
|
37
|
+
|
|
38
|
+
- v4.6.0 validation scope is tracked in
|
|
39
|
+
`docs/V4_6_0_LIVING_BRAIN_EXPERIENCE_REPORT.md`.
|
|
40
|
+
|
|
41
|
+
### Artifacts
|
|
42
|
+
|
|
43
|
+
- `dist/ltcai-4.6.0-py3-none-any.whl`
|
|
44
|
+
- `dist/ltcai-4.6.0.tar.gz`
|
|
45
|
+
- `dist/ltcai-4.6.0.vsix`
|
|
46
|
+
- `ltcai-4.6.0.tgz`
|
|
47
|
+
- `src-tauri/target/release/bundle/dmg/Lattice AI_4.6.0_aarch64.dmg`
|
|
48
|
+
|
|
6
49
|
## [4.5.1] - 2026-06-13
|
|
7
50
|
|
|
8
51
|
> Product Reimagining release candidate after the v4.5.0 capability recovery.
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
# v4.6.0 Living Brain Experience Report
|
|
2
|
+
|
|
3
|
+
## Goal
|
|
4
|
+
|
|
5
|
+
v4.6.0 stops presenting Lattice AI as a graph product or dashboard. The
|
|
6
|
+
first-run product flow is Login -> Environment Analysis -> Recommended Models
|
|
7
|
+
-> Install & Load -> Brain. After setup, the Brain is the center of the desktop
|
|
8
|
+
experience, and the graph is repositioned as an advanced layer for intentional
|
|
9
|
+
relationship exploration.
|
|
10
|
+
|
|
11
|
+
## Product Changes
|
|
12
|
+
|
|
13
|
+
- First launch opens to a premium minimal Login screen only.
|
|
14
|
+
- Setup runs as a full-screen guided sequence: friendly environment analysis,
|
|
15
|
+
short ranked model recommendations, and install/download/validate/load.
|
|
16
|
+
- After model load, `/app` and `/app#/brain` open into Brain plus conversation.
|
|
17
|
+
- The living Brain remains visible during primary conversation and reacts to
|
|
18
|
+
listening, recall, thinking, and active agent/workflow signals.
|
|
19
|
+
- `/app#/ask` and `/app#/chat` remain compatible but route to the Brain
|
|
20
|
+
conversation.
|
|
21
|
+
- Primary navigation is reduced to Brain, Memory, Files, Automations, Models,
|
|
22
|
+
and Settings.
|
|
23
|
+
- Brain tabs now follow the product ladder: Brain, Memories, Knowledge,
|
|
24
|
+
Relationships, Graph, Care.
|
|
25
|
+
- First-run setup no longer appears as dashboard cards above any app page; it
|
|
26
|
+
gates the app before the Brain opens.
|
|
27
|
+
|
|
28
|
+
## Architecture
|
|
29
|
+
|
|
30
|
+
- Added `frontend/src/components/LivingBrain.tsx` as the animated Brain
|
|
31
|
+
presence component.
|
|
32
|
+
- Added `frontend/src/components/BrainConversation.tsx` to centralize chat
|
|
33
|
+
streaming, history, image attachment, model status, memory previews, and
|
|
34
|
+
Brain activity state.
|
|
35
|
+
- Added `frontend/src/components/ProductFlow.tsx` to own Login, environment
|
|
36
|
+
analysis, recommendation, install/download/validate/load, and Brain entry.
|
|
37
|
+
- Kept graph parsing, Cytoscape rendering, search, provenance, portability, and
|
|
38
|
+
archive APIs intact.
|
|
39
|
+
- Kept FastAPI, Tauri, StorageEngine, Brain Core, backup/restore, and
|
|
40
|
+
portability unchanged.
|
|
41
|
+
|
|
42
|
+
## Compatibility
|
|
43
|
+
|
|
44
|
+
- Existing backend routes are unchanged.
|
|
45
|
+
- Legacy hash routes continue to resolve through the SPA route alias table.
|
|
46
|
+
- The advanced graph remains available at `/app#/knowledge-graph`.
|
|
47
|
+
- The old Ask page imports the shared Brain conversation component to avoid
|
|
48
|
+
duplicate chat behavior.
|
|
49
|
+
|
|
50
|
+
## Validation Scope
|
|
51
|
+
|
|
52
|
+
The v4.6.0 work should be validated with:
|
|
53
|
+
|
|
54
|
+
- frontend lint/typecheck/build
|
|
55
|
+
- Python syntax validation
|
|
56
|
+
- affected visual tests
|
|
57
|
+
- unit tests covering version consistency and route compatibility
|
|
58
|
+
- Tauri cargo check when the desktop toolchain is available
|
|
@@ -5,21 +5,21 @@
|
|
|
5
5
|
> completed analysis. **Update this file before ending any phase and before any
|
|
6
6
|
> likely session/context/usage limit.**
|
|
7
7
|
>
|
|
8
|
-
> Last updated: 2026-06-13 — v4.
|
|
8
|
+
> Last updated: 2026-06-13 — v4.6.0 Living Brain Experience; Remaining Gaps remain empty
|
|
9
9
|
|
|
10
10
|
---
|
|
11
11
|
|
|
12
|
-
## 0. RELEASE STATUS (v4.
|
|
12
|
+
## 0. RELEASE STATUS (v4.6.0)
|
|
13
13
|
|
|
14
|
-
**v4.
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
The v4.
|
|
14
|
+
**v4.6.0 makes the Brain the product after the v4.5.1 product-shell reset
|
|
15
|
+
without changing Brain Core, storage, API, model runtime, backup, portability,
|
|
16
|
+
or agent/workflow behavior.** Current implementation milestone: Brain plus
|
|
17
|
+
conversation is the home screen, the living Brain is always visible during the
|
|
18
|
+
primary conversation experience, and graph exploration is preserved as the
|
|
19
|
+
deepest intentional layer behind Memories, Knowledge, and Relationships.
|
|
20
|
+
The v4.6.0 process builds locally validated artifacts only. Tagging, GitHub
|
|
21
21
|
Release creation, PyPI, npm Registry, VS Code Marketplace, Open VSX, and
|
|
22
|
-
production deployments remain out of scope
|
|
22
|
+
production deployments remain out of scope unless explicitly requested.
|
|
23
23
|
Remaining implementation gaps: **none**.
|
|
24
24
|
Owner-only blockers: pptx history rewrite (requires force-push/owner decision)
|
|
25
25
|
and consent-gated production embedder provisioning (silent default download is
|
|
@@ -27,11 +27,12 @@ not permitted).
|
|
|
27
27
|
|
|
28
28
|
## Remaining Gaps
|
|
29
29
|
|
|
30
|
-
None. v4.
|
|
31
|
-
promotes the
|
|
32
|
-
API-backed, readable product state remains in
|
|
33
|
-
flows remain exposed through existing APIs,
|
|
34
|
-
validated, and exact v4.
|
|
30
|
+
None. v4.6.0 preserves the already-empty v4.3.2/v4.3.3/v4.5.0/v4.5.1 gap list
|
|
31
|
+
and promotes the Living Brain tree: Brain conversation is primary, graph
|
|
32
|
+
exploration remains real and API-backed, readable product state remains in
|
|
33
|
+
place, archive import/restore flows remain exposed through existing APIs,
|
|
34
|
+
desktop sidecar behavior remains validated, and exact v4.6.0 artifacts are the
|
|
35
|
+
validation target.
|
|
35
36
|
Owner-only blockers above are intentionally not implementation gaps.
|
|
36
37
|
|
|
37
38
|
## 1. Program Charter (from the user's v4.0.0 directive)
|
package/frontend/index.html
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
<meta charset="UTF-8" />
|
|
5
5
|
<meta name="viewport" content="width=device-width, initial-scale=1.0, viewport-fit=cover" />
|
|
6
6
|
<meta name="color-scheme" content="dark light" />
|
|
7
|
-
<title>Lattice AI ·
|
|
7
|
+
<title>Lattice AI · Living Brain</title>
|
|
8
8
|
<link rel="manifest" href="/manifest.json" />
|
|
9
9
|
<link rel="icon" type="image/png" sizes="32x32" href="/icons/favicon-32.png" />
|
|
10
10
|
<script>
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
</head>
|
|
19
19
|
<body>
|
|
20
20
|
<div id="root"></div>
|
|
21
|
-
<noscript>Lattice AI requires JavaScript for the local
|
|
21
|
+
<noscript>Lattice AI requires JavaScript for the local Living Brain desktop shell.</noscript>
|
|
22
22
|
<script type="module" src="/src/main.tsx"></script>
|
|
23
23
|
</body>
|
|
24
24
|
</html>
|
package/frontend/src/App.tsx
CHANGED
|
@@ -1,26 +1,19 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import { useQuery } from "@tanstack/react-query";
|
|
3
|
-
import { BrainCircuit,
|
|
3
|
+
import { BrainCircuit, Command, Menu, Moon, Search, Sun, X } from "lucide-react";
|
|
4
4
|
import { latticeApi } from "@/api/client";
|
|
5
5
|
import { Button } from "@/components/ui/button";
|
|
6
6
|
import { Input } from "@/components/ui/input";
|
|
7
|
-
import {
|
|
8
|
-
import { useAppStore
|
|
7
|
+
import { ProductFlow, readProductFlowComplete } from "@/components/ProductFlow";
|
|
8
|
+
import { useAppStore } from "@/store/appStore";
|
|
9
9
|
import { commandRoutes, go, parseHash, primaryRoutes, PrimaryRoute } from "@/routes";
|
|
10
10
|
import { BrainPage } from "@/pages/Brain";
|
|
11
|
-
import { AskPage } from "@/pages/Ask";
|
|
12
11
|
import { CapturePage } from "@/pages/Capture";
|
|
13
12
|
import { ActPage } from "@/pages/Act";
|
|
14
13
|
import { LibraryPage } from "@/pages/Library";
|
|
15
14
|
import { SystemPage } from "@/pages/System";
|
|
16
15
|
import { cn } from "@/lib/utils";
|
|
17
16
|
|
|
18
|
-
const modes: Array<{ id: WorkspaceMode; label: string }> = [
|
|
19
|
-
{ id: "basic", label: "Calm" },
|
|
20
|
-
{ id: "advanced", label: "Deep" },
|
|
21
|
-
{ id: "admin", label: "Admin" },
|
|
22
|
-
];
|
|
23
|
-
|
|
24
17
|
function useRoute() {
|
|
25
18
|
const [route, setRoute] = React.useState(parseHash);
|
|
26
19
|
React.useEffect(() => {
|
|
@@ -32,7 +25,7 @@ function useRoute() {
|
|
|
32
25
|
}
|
|
33
26
|
|
|
34
27
|
function Page({ primary, tab }: { primary: PrimaryRoute; tab?: string }) {
|
|
35
|
-
if (primary === "
|
|
28
|
+
if (primary === "memory") return <BrainPage initialTab="memory" />;
|
|
36
29
|
if (primary === "capture") return <CapturePage initialTab={tab} />;
|
|
37
30
|
if (primary === "act") return <ActPage initialTab={tab} />;
|
|
38
31
|
if (primary === "library") return <LibraryPage initialTab={tab} />;
|
|
@@ -129,36 +122,19 @@ function PrimaryDock({ active, onNavigate }: { active: PrimaryRoute; onNavigate?
|
|
|
129
122
|
);
|
|
130
123
|
}
|
|
131
124
|
|
|
132
|
-
function ModeSwitch({ mode, setMode }: { mode: WorkspaceMode; setMode: (mode: WorkspaceMode) => void }) {
|
|
133
|
-
return (
|
|
134
|
-
<div className="mode-switch" aria-label="Experience mode">
|
|
135
|
-
{modes.map((item) => (
|
|
136
|
-
<button
|
|
137
|
-
key={item.id}
|
|
138
|
-
className={cn(mode === item.id && "is-active")}
|
|
139
|
-
onClick={() => setMode(item.id)}
|
|
140
|
-
aria-pressed={mode === item.id}
|
|
141
|
-
>
|
|
142
|
-
{item.label}
|
|
143
|
-
</button>
|
|
144
|
-
))}
|
|
145
|
-
</div>
|
|
146
|
-
);
|
|
147
|
-
}
|
|
148
|
-
|
|
149
125
|
export default function App() {
|
|
150
126
|
const route = useRoute();
|
|
151
|
-
const { theme, setTheme
|
|
127
|
+
const { theme, setTheme } = useAppStore();
|
|
152
128
|
const [drawer, setDrawer] = React.useState(false);
|
|
153
129
|
const [palette, setPalette] = React.useState(false);
|
|
154
|
-
const
|
|
130
|
+
const [flowComplete, setFlowComplete] = React.useState(readProductFlowComplete);
|
|
131
|
+
const health = useQuery({ queryKey: ["health"], queryFn: latticeApi.health, enabled: flowComplete });
|
|
155
132
|
const desktop = useQuery({
|
|
156
133
|
queryKey: ["desktopBackendStatus"],
|
|
157
134
|
queryFn: latticeApi.desktopBackendStatus,
|
|
158
|
-
enabled: Boolean(window.__TAURI_INTERNALS__),
|
|
135
|
+
enabled: flowComplete && Boolean(window.__TAURI_INTERNALS__),
|
|
159
136
|
refetchInterval: 5000,
|
|
160
137
|
});
|
|
161
|
-
const workspace = useQuery({ queryKey: ["workspaceOs"], queryFn: latticeApi.workspaceOs });
|
|
162
138
|
|
|
163
139
|
React.useEffect(() => {
|
|
164
140
|
document.documentElement.dataset.theme = theme;
|
|
@@ -175,12 +151,15 @@ export default function App() {
|
|
|
175
151
|
return () => window.removeEventListener("keydown", onKey);
|
|
176
152
|
}, []);
|
|
177
153
|
|
|
154
|
+
if (!flowComplete) {
|
|
155
|
+
return <ProductFlow onComplete={() => {
|
|
156
|
+
setFlowComplete(true);
|
|
157
|
+
go("brain");
|
|
158
|
+
}} />;
|
|
159
|
+
}
|
|
160
|
+
|
|
178
161
|
const healthData = (health.data?.data || {}) as Record<string, unknown>;
|
|
179
|
-
const workspaceData = (workspace.data?.data || {}) as Record<string, unknown>;
|
|
180
162
|
const desktopData = (desktop.data?.data || {}) as Record<string, unknown>;
|
|
181
|
-
const appVersion = typeof healthData.version === "string" ? healthData.version : null;
|
|
182
|
-
const activeRoute = primaryRoutes.find((item) => item.id === route.primary);
|
|
183
|
-
const workspaceName = String(workspaceData.active_workspace || "Personal space");
|
|
184
163
|
const backendReady = Boolean(health.data?.ok);
|
|
185
164
|
const desktopReady = !window.__TAURI_INTERNALS__ || Boolean(desktopData.running);
|
|
186
165
|
|
|
@@ -192,12 +171,12 @@ export default function App() {
|
|
|
192
171
|
<header className="app-chrome">
|
|
193
172
|
<div className="brand-lockup">
|
|
194
173
|
<button className="mobile-menu" onClick={() => setDrawer(true)} aria-label="Open navigation"><Menu className="h-5 w-5" /></button>
|
|
195
|
-
<button className="brand-mark" onClick={() => go("brain")} aria-label="Open Lattice
|
|
174
|
+
<button className="brand-mark" onClick={() => go("brain")} aria-label="Open Lattice Brain">
|
|
196
175
|
<BrainCircuit className="h-5 w-5" />
|
|
197
176
|
</button>
|
|
198
177
|
<div className="brand-copy">
|
|
199
178
|
<div className="brand-name">Lattice</div>
|
|
200
|
-
<div className="brand-subtitle">
|
|
179
|
+
<div className="brand-subtitle">Living Brain</div>
|
|
201
180
|
</div>
|
|
202
181
|
</div>
|
|
203
182
|
|
|
@@ -224,7 +203,7 @@ export default function App() {
|
|
|
224
203
|
<div className="drawer-header">
|
|
225
204
|
<div>
|
|
226
205
|
<div className="font-semibold">Lattice</div>
|
|
227
|
-
<div className="text-xs text-muted-foreground">Choose a
|
|
206
|
+
<div className="text-xs text-muted-foreground">Choose a layer</div>
|
|
228
207
|
</div>
|
|
229
208
|
<Button variant="ghost" size="icon" onClick={() => setDrawer(false)} aria-label="Close navigation"><X className="h-4 w-4" /></Button>
|
|
230
209
|
</div>
|
|
@@ -234,24 +213,6 @@ export default function App() {
|
|
|
234
213
|
) : null}
|
|
235
214
|
|
|
236
215
|
<main className="page-shell">
|
|
237
|
-
<section className="workspace-ribbon" aria-label="Current workspace">
|
|
238
|
-
<div className="min-w-0">
|
|
239
|
-
<div className="ribbon-kicker"><Sparkles className="h-4 w-4" /> {activeRoute?.label || "Home"}</div>
|
|
240
|
-
<h1>{activeRoute?.description || "A calm place to think with your knowledge."}</h1>
|
|
241
|
-
</div>
|
|
242
|
-
<div className="ribbon-meta">
|
|
243
|
-
<div className="meta-card">
|
|
244
|
-
<CheckCircle2 className="h-4 w-4 text-primary" />
|
|
245
|
-
<span>{workspaceName}</span>
|
|
246
|
-
</div>
|
|
247
|
-
<div className="meta-card">
|
|
248
|
-
<span>{appVersion ? `v${appVersion}` : "Version checking"}</span>
|
|
249
|
-
</div>
|
|
250
|
-
<ModeSwitch mode={mode} setMode={setMode} />
|
|
251
|
-
</div>
|
|
252
|
-
</section>
|
|
253
|
-
|
|
254
|
-
<FirstRunGuide />
|
|
255
216
|
<Page primary={route.primary} tab={route.tab} />
|
|
256
217
|
</main>
|
|
257
218
|
</div>
|
|
@@ -341,6 +341,7 @@ export const latticeApi = {
|
|
|
341
341
|
connectFolder: (path: string) => post("/knowledge-graph/local/index", { path, approved: true, watch_enabled: true, consent: { approved: true, source: "desktop-spa" } }, {}),
|
|
342
342
|
localWatchStop: (source_id: string) => post("/knowledge-graph/local/watch/stop", { source_id }, {}),
|
|
343
343
|
models: () => get("/models", { catalog: [], loaded: [], recommended: [] }),
|
|
344
|
+
setupScan: () => get("/setup/scan", { environment: {}, recommendations: {}, zero_config: {} }),
|
|
344
345
|
modelRecommendations: (engine = "local_mlx") => get("/models/recommendations", { profile: {}, recommendations: { models: [], families: [], counts: {} } }, { engine }),
|
|
345
346
|
installEngine: (engine: string) => post("/engines/install", { engine }, {}),
|
|
346
347
|
prepareModel: (model: string, engine?: string, allow_download = false) => post("/engines/prepare-model", { model, engine: engine || null, allow_download }, {}),
|