ltcai 4.0.0 → 4.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (195) hide show
  1. package/README.md +42 -33
  2. package/desktop/electron/main.cjs +44 -0
  3. package/docs/CHANGELOG.md +106 -0
  4. package/docs/REALTIME_COLLABORATION.md +3 -3
  5. package/docs/V3_FRONTEND.md +9 -8
  6. package/docs/V4_1_FRONTEND_ARCHITECTURE_REVIEW.md +65 -0
  7. package/docs/V4_1_FRONTEND_MIGRATION_REPORT.md +70 -0
  8. package/docs/V4_1_VALIDATION_REPORT.md +47 -0
  9. package/docs/V4_DIGITAL_BRAIN_RECOVERY.md +95 -45
  10. package/docs/kg-schema.md +6 -2
  11. package/docs/spec-vs-impl.md +10 -10
  12. package/frontend/index.html +24 -0
  13. package/frontend/openapi.json +14190 -0
  14. package/frontend/src/App.tsx +184 -0
  15. package/frontend/src/api/client.ts +317 -0
  16. package/frontend/src/api/openapi.ts +16637 -0
  17. package/frontend/src/components/primitives.tsx +204 -0
  18. package/frontend/src/components/ui/badge.tsx +27 -0
  19. package/frontend/src/components/ui/button.tsx +37 -0
  20. package/frontend/src/components/ui/card.tsx +22 -0
  21. package/frontend/src/components/ui/input.tsx +16 -0
  22. package/frontend/src/components/ui/textarea.tsx +16 -0
  23. package/frontend/src/lib/utils.ts +33 -0
  24. package/frontend/src/main.tsx +23 -0
  25. package/frontend/src/pages/Act.tsx +245 -0
  26. package/frontend/src/pages/Ask.tsx +200 -0
  27. package/frontend/src/pages/Brain.tsx +267 -0
  28. package/frontend/src/pages/Capture.tsx +158 -0
  29. package/frontend/src/pages/Library.tsx +187 -0
  30. package/frontend/src/pages/System.tsx +344 -0
  31. package/frontend/src/routes.ts +85 -0
  32. package/frontend/src/store/appStore.ts +54 -0
  33. package/frontend/src/styles.css +107 -0
  34. package/kg_schema.py +2 -603
  35. package/knowledge_graph.py +37 -4958
  36. package/latticeai/__init__.py +1 -1
  37. package/latticeai/api/admin.py +15 -16
  38. package/latticeai/api/agents.py +13 -6
  39. package/latticeai/api/auth.py +19 -11
  40. package/latticeai/api/invitations.py +100 -0
  41. package/latticeai/api/knowledge_graph.py +4 -11
  42. package/latticeai/api/plugins.py +3 -6
  43. package/latticeai/api/realtime.py +4 -7
  44. package/latticeai/api/setup.py +5 -4
  45. package/latticeai/api/static_routes.py +13 -16
  46. package/latticeai/api/ui_redirects.py +26 -0
  47. package/latticeai/api/workflow_designer.py +39 -6
  48. package/latticeai/api/workspace.py +24 -10
  49. package/latticeai/app_factory.py +88 -17
  50. package/latticeai/brain/_kg_common.py +1123 -0
  51. package/latticeai/brain/discovery.py +1455 -0
  52. package/latticeai/brain/documents.py +218 -0
  53. package/latticeai/brain/ingest.py +644 -0
  54. package/latticeai/brain/projection.py +561 -0
  55. package/latticeai/brain/provenance.py +401 -0
  56. package/latticeai/brain/retrieval.py +1316 -0
  57. package/latticeai/brain/schema.py +640 -0
  58. package/latticeai/brain/store.py +216 -0
  59. package/latticeai/brain/write_master.py +225 -0
  60. package/latticeai/core/invitations.py +131 -0
  61. package/latticeai/core/marketplace.py +1 -1
  62. package/latticeai/core/multi_agent.py +1 -1
  63. package/latticeai/core/policy.py +54 -0
  64. package/latticeai/core/realtime.py +65 -44
  65. package/latticeai/core/sessions.py +31 -5
  66. package/latticeai/core/users.py +147 -0
  67. package/latticeai/core/workspace_os.py +420 -20
  68. package/latticeai/services/agent_runtime.py +242 -4
  69. package/latticeai/services/run_executor.py +328 -0
  70. package/latticeai/services/workspace_service.py +27 -19
  71. package/package.json +54 -27
  72. package/scripts/build_frontend_assets.mjs +38 -0
  73. package/scripts/bump_version.py +1 -1
  74. package/scripts/export_openapi.py +31 -0
  75. package/scripts/lint_frontend.mjs +86 -0
  76. package/scripts/run_python.mjs +47 -0
  77. package/src-tauri/Cargo.lock +4833 -0
  78. package/src-tauri/Cargo.toml +19 -0
  79. package/src-tauri/build.rs +3 -0
  80. package/src-tauri/capabilities/default.json +7 -0
  81. package/src-tauri/src/main.rs +78 -0
  82. package/src-tauri/tauri.conf.json +36 -0
  83. package/static/app/asset-manifest.json +32 -0
  84. package/static/app/assets/core-CwxXejkd.js +2 -0
  85. package/static/app/assets/core-CwxXejkd.js.map +1 -0
  86. package/static/app/assets/index-CJRAzNnf.js +333 -0
  87. package/static/app/assets/index-CJRAzNnf.js.map +1 -0
  88. package/static/app/assets/index-CSwBBgf4.css +2 -0
  89. package/static/app/index.html +25 -0
  90. package/static/manifest.json +2 -2
  91. package/static/sw.js +4 -4
  92. package/scripts/build_v3_assets.mjs +0 -170
  93. package/scripts/lint_v3.mjs +0 -97
  94. package/static/account.html +0 -113
  95. package/static/activity.html +0 -73
  96. package/static/admin.html +0 -486
  97. package/static/agents.html +0 -139
  98. package/static/chat.html +0 -841
  99. package/static/css/reference/account.css +0 -439
  100. package/static/css/reference/admin.css +0 -610
  101. package/static/css/reference/base.css +0 -1661
  102. package/static/css/reference/chat.css +0 -4623
  103. package/static/css/reference/graph.css +0 -1016
  104. package/static/css/responsive.css +0 -861
  105. package/static/graph.html +0 -122
  106. package/static/platform.css +0 -104
  107. package/static/plugins.html +0 -136
  108. package/static/scripts/account.js +0 -238
  109. package/static/scripts/admin.js +0 -1614
  110. package/static/scripts/chat.js +0 -5081
  111. package/static/scripts/graph.js +0 -1804
  112. package/static/scripts/platform.js +0 -64
  113. package/static/scripts/ux.js +0 -167
  114. package/static/scripts/workspace.js +0 -948
  115. package/static/v3/asset-manifest.json +0 -56
  116. package/static/v3/css/lattice.base.49deefb5.css +0 -128
  117. package/static/v3/css/lattice.base.css +0 -128
  118. package/static/v3/css/lattice.components.cde18231.css +0 -472
  119. package/static/v3/css/lattice.components.css +0 -472
  120. package/static/v3/css/lattice.shell.29d36d85.css +0 -452
  121. package/static/v3/css/lattice.shell.css +0 -452
  122. package/static/v3/css/lattice.tokens.304cbc40.css +0 -135
  123. package/static/v3/css/lattice.tokens.css +0 -135
  124. package/static/v3/css/lattice.views.0a18b6c5.css +0 -360
  125. package/static/v3/css/lattice.views.css +0 -360
  126. package/static/v3/index.html +0 -68
  127. package/static/v3/js/app.356e6452.js +0 -26
  128. package/static/v3/js/app.js +0 -26
  129. package/static/v3/js/core/api.7a308b89.js +0 -568
  130. package/static/v3/js/core/api.js +0 -568
  131. package/static/v3/js/core/components.f25b3b93.js +0 -230
  132. package/static/v3/js/core/components.js +0 -230
  133. package/static/v3/js/core/dom.a2773eb0.js +0 -148
  134. package/static/v3/js/core/dom.js +0 -148
  135. package/static/v3/js/core/router.584570f2.js +0 -37
  136. package/static/v3/js/core/router.js +0 -37
  137. package/static/v3/js/core/routes.7222343d.js +0 -93
  138. package/static/v3/js/core/routes.js +0 -93
  139. package/static/v3/js/core/shell.a1657f20.js +0 -391
  140. package/static/v3/js/core/shell.js +0 -391
  141. package/static/v3/js/core/store.204a08b2.js +0 -113
  142. package/static/v3/js/core/store.js +0 -113
  143. package/static/v3/js/views/admin-audit.660a1fb1.js +0 -185
  144. package/static/v3/js/views/admin-audit.js +0 -185
  145. package/static/v3/js/views/admin-permissions.a7ae5f09.js +0 -177
  146. package/static/v3/js/views/admin-permissions.js +0 -177
  147. package/static/v3/js/views/admin-policies.3658fd86.js +0 -102
  148. package/static/v3/js/views/admin-policies.js +0 -102
  149. package/static/v3/js/views/admin-private-vpc.7d342d36.js +0 -135
  150. package/static/v3/js/views/admin-private-vpc.js +0 -135
  151. package/static/v3/js/views/admin-security.07c66b72.js +0 -180
  152. package/static/v3/js/views/admin-security.js +0 -180
  153. package/static/v3/js/views/admin-users.03bac88c.js +0 -168
  154. package/static/v3/js/views/admin-users.js +0 -168
  155. package/static/v3/js/views/agents.014d0b74.js +0 -541
  156. package/static/v3/js/views/agents.js +0 -541
  157. package/static/v3/js/views/chat.e6dd7dd0.js +0 -601
  158. package/static/v3/js/views/chat.js +0 -601
  159. package/static/v3/js/views/files.adad14c1.js +0 -365
  160. package/static/v3/js/views/files.js +0 -365
  161. package/static/v3/js/views/graph-canvas.17c15d65.js +0 -509
  162. package/static/v3/js/views/graph-canvas.js +0 -509
  163. package/static/v3/js/views/home.24f8b8ae.js +0 -200
  164. package/static/v3/js/views/home.js +0 -200
  165. package/static/v3/js/views/hooks.37895880.js +0 -220
  166. package/static/v3/js/views/hooks.js +0 -220
  167. package/static/v3/js/views/hybrid-search.2fb63ed9.js +0 -194
  168. package/static/v3/js/views/hybrid-search.js +0 -194
  169. package/static/v3/js/views/knowledge-graph.5e40cbeb.js +0 -509
  170. package/static/v3/js/views/knowledge-graph.js +0 -509
  171. package/static/v3/js/views/marketplace.ab0583d4.js +0 -141
  172. package/static/v3/js/views/marketplace.js +0 -141
  173. package/static/v3/js/views/mcp.99b5c6a7.js +0 -114
  174. package/static/v3/js/views/mcp.js +0 -114
  175. package/static/v3/js/views/memory.4ebdf474.js +0 -147
  176. package/static/v3/js/views/memory.js +0 -147
  177. package/static/v3/js/views/models.a1ffa147.js +0 -256
  178. package/static/v3/js/views/models.js +0 -256
  179. package/static/v3/js/views/my-computer.d9d9ae1c.js +0 -463
  180. package/static/v3/js/views/my-computer.js +0 -463
  181. package/static/v3/js/views/pipeline.c522f1ce.js +0 -157
  182. package/static/v3/js/views/pipeline.js +0 -157
  183. package/static/v3/js/views/planning.9ac3e313.js +0 -153
  184. package/static/v3/js/views/planning.js +0 -153
  185. package/static/v3/js/views/settings.8631fa5e.js +0 -318
  186. package/static/v3/js/views/settings.js +0 -318
  187. package/static/v3/js/views/skills.c6c2f965.js +0 -109
  188. package/static/v3/js/views/skills.js +0 -109
  189. package/static/v3/js/views/tools.e4f11276.js +0 -108
  190. package/static/v3/js/views/tools.js +0 -108
  191. package/static/v3/js/views/workflows.26c57290.js +0 -128
  192. package/static/v3/js/views/workflows.js +0 -128
  193. package/static/workflows.html +0 -146
  194. package/static/workspace.css +0 -1121
  195. package/static/workspace.html +0 -357
package/README.md CHANGED
@@ -56,10 +56,10 @@ workspace around the work itself:
56
56
  LM Studio; nothing leaves your machine unless you opt in.
57
57
  - **Use cloud models only when you choose** — bring an API key for cloud LLMs
58
58
  when you want them, not by default.
59
- - **Inspect every agent run** — the built-in runner persists plans, reviews,
60
- retries, and results as replayable run records. Today that runner is
61
- deterministic and does not call a model; LLM-driven execution is the v4
62
- runtime, in progress.
59
+ - **Inspect every agent run** — runs persist queued/running/final state, plans,
60
+ reviews, retries, cancellation, and replayable logs. With a loaded model the
61
+ v4 runner uses it; without one, deterministic simulation mode is explicitly
62
+ labeled and does not call a model.
63
63
 
64
64
  Lattice AI is not a clone of ChatGPT, Claude, Cursor, Obsidian, or Notion. It
65
65
  sits in a different place: a **workspace** that ties local/self-hosted AI, your
@@ -75,8 +75,8 @@ and workflows together — and runs on your own hardware.
75
75
  Knowledge Graph.
76
76
  - Run local models through MLX, Ollama, or LM Studio, and use cloud LLMs only when
77
77
  you want to.
78
- - Define agent workflows and replay their run records step by step (execution
79
- is deterministic scaffolding today it does not yet call a model).
78
+ - Define agent workflows and replay their run records step by step, including
79
+ live tool execution, approval pauses, and cooperative cancellation.
80
80
  - Separate personal work from organization work.
81
81
  - Switch between Basic, Advanced, and Admin modes depending on your role.
82
82
 
@@ -115,9 +115,9 @@ connect — context that stays useful even when you switch models.
115
115
  ![Lattice AI agent run with roles, logs, review, and retry](docs/assets/v3.4.0/agent-run.png)
116
116
 
117
117
  The agent runner turns a goal into an inspectable, replayable run record — roles,
118
- logs, review, and retry — that you can read back step by step. The runner shown
119
- here is deterministic and LLM-free; real model-driven execution is the v4
120
- runtime, currently in progress.
118
+ logs, review, retry, and cancellation state — that you can read back step by
119
+ step. Runs execute asynchronously and use the loaded model when one is available;
120
+ otherwise they are labeled as simulation.
121
121
 
122
122
  ### Extend with hooks and the local runtime
123
123
 
@@ -203,34 +203,34 @@ npm run dev
203
203
 
204
204
  ## Latest Release
205
205
 
206
- ### v3.6.0 — Knowledge Graph First
207
-
208
- - **Unified ingestion pipeline** — one entrypoint normalizes every source
209
- (file, folder, web URL, browser tab, text/markdown/code) into the graph,
210
- idempotent by content hash and bracketed by the `pre_tool`/`post_tool` hook
211
- lifecycle.
212
- - **Formalized entity/relationship model** first-class `Source`, `Repository`,
213
- `Meeting`, `Organization`, `Workflow`, `Agent` entities and `indexed_from`,
214
- `modified_by`, `belongs_to_project`, `part_of`, `discussed_in`, `decided_by`,
215
- `generated_by`, `used_by_agent` relationships.
216
- - **Browser & web ingestion** — `POST /api/browser/read-url` and
217
- `/ingest-current-tab`, plus a local Manifest V3 extension that posts only to
218
- `127.0.0.1`.
219
- - **Portability** — local Knowledge Graph export/import (versioned JSON) and
220
- binary backup/restore (DB + blobs, integrity-checked). No cloud required.
221
- - **Provenance** every node records where it came from; a queryable audit trail
222
- makes the graph explainable.
223
- - **Knowledge Graph as the primary surface** — the view becomes your digital brain
224
- with Status, Sources, Capture, and Backup tabs.
225
-
226
- See [RELEASE_NOTES_v3.6.0.md](RELEASE_NOTES_v3.6.0.md),
206
+ ### v4.1.0 RC Frontend & Desktop Rebuild
207
+
208
+ - **React desktop SPA** — `/app` is now a React + TypeScript + Vite application
209
+ with TanStack Query, Zustand, React Flow, Cytoscape.js, Tailwind CSS, and
210
+ local shadcn-style primitives.
211
+ - **Generated API client** — frontend JSON calls consume the existing FastAPI
212
+ contract through a generated OpenAPI TypeScript client; streaming chat and
213
+ multipart upload remain honest fetch special cases.
214
+ - **Tauri-first desktop shell** — Tauri 2.0 is the primary desktop target,
215
+ launching the local backend by default; Electron is retained as a fallback
216
+ shell only.
217
+ - **Graph-first navigation** the primary surfaces are Brain, Ask, Capture,
218
+ Act, Library, and System, with old `/app#...` routes mapped into the new
219
+ capability groups.
220
+ - **No CDN / offline-capable** shipped app assets are built into
221
+ `static/app`, service-worker precached, and verified to avoid CDN
222
+ dependencies.
223
+ - **v4.0.1 capability preservation** — Brain Core, storage, agent/workflow
224
+ runtime, privacy model, local-first operation, and backend API contracts are
225
+ preserved.
226
+
227
+ See [RELEASE_NOTES_v4.1.0.md](RELEASE_NOTES_v4.1.0.md),
227
228
  [docs/kg-schema.md](docs/kg-schema.md),
228
- [docs/RUNTIME_HOOK_COVERAGE_v3.6.0.md](docs/RUNTIME_HOOK_COVERAGE_v3.6.0.md), and
229
229
  [FEATURE_STATUS.md](FEATURE_STATUS.md).
230
230
 
231
231
  ## How it works — every source converges into the graph
232
232
 
233
- As of v3.6.0, all data sources flow through **one unified ingestion pipeline** into
233
+ As of v4.1.0, data sources flow through the brain ingestion pipeline into
234
234
  the Knowledge Graph — no source bypasses it, none becomes an isolated silo:
235
235
 
236
236
  ```text
@@ -264,6 +264,9 @@ For the deeper design, see [ARCHITECTURE.md](ARCHITECTURE.md) and
264
264
 
265
265
  - [ARCHITECTURE.md](ARCHITECTURE.md) — workspace, graph, pipeline, and model overview
266
266
  - [docs/architecture.md](docs/architecture.md) — full architecture reference
267
+ - [docs/V4_1_FRONTEND_ARCHITECTURE_REVIEW.md](docs/V4_1_FRONTEND_ARCHITECTURE_REVIEW.md) — v4.1.0 frontend and desktop architecture review
268
+ - [docs/V4_1_FRONTEND_MIGRATION_REPORT.md](docs/V4_1_FRONTEND_MIGRATION_REPORT.md) — v4.1.0 capability migration report
269
+ - [docs/V4_1_VALIDATION_REPORT.md](docs/V4_1_VALIDATION_REPORT.md) — v4.1.0 validation report
267
270
  - [docs/V3_BACKEND_ARCHITECTURE.md](docs/V3_BACKEND_ARCHITECTURE.md) — backend storage, search, and retrieval
268
271
 
269
272
  ### Knowledge and retrieval
@@ -282,6 +285,9 @@ For the deeper design, see [ARCHITECTURE.md](ARCHITECTURE.md) and
282
285
  ### Releases
283
286
 
284
287
  - [RELEASE_NOTES.md](RELEASE_NOTES.md) — current release notes
288
+ - [RELEASE_NOTES_v4.1.0.md](RELEASE_NOTES_v4.1.0.md)
289
+ - [RELEASE_NOTES_v4.0.1.md](RELEASE_NOTES_v4.0.1.md)
290
+ - [RELEASE_NOTES_v4.0.0.md](RELEASE_NOTES_v4.0.0.md)
285
291
  - [RELEASE_NOTES_v3.6.0.md](RELEASE_NOTES_v3.6.0.md)
286
292
  - [RELEASE_NOTES_v3.5.0.md](RELEASE_NOTES_v3.5.0.md)
287
293
  - [RELEASE_NOTES_v3.4.1.md](RELEASE_NOTES_v3.4.1.md)
@@ -292,7 +298,10 @@ For the deeper design, see [ARCHITECTURE.md](ARCHITECTURE.md) and
292
298
 
293
299
  | Version | Theme |
294
300
  | --- | --- |
295
- | **3.6.0** | Knowledge Graph Firstunified ingestion pipeline, formalized entity/relationship model, browser/web ingestion, local export/import/backup, provenance, KG as the primary surface |
301
+ | **4.1.0** | Frontend & Desktop Rebuild RC React/Vite/OpenAPI desktop SPA, Tauri 2.0 primary shell, graph-first navigation, and legacy static frontend removal |
302
+ | **4.0.1** | Digital Brain Platform maintenance — closes post-tag v4 gaps with durable async runs, stable identity/workspace state, full `/app` parity, and legacy UI retirement |
303
+ | **4.0.0** | Digital Brain Platform — decomposed brain store, v2 write-mastered Knowledge Graph, durable memory/context, real workflow/agent foundations, signed brain exchange |
304
+ | 3.6.0 | Knowledge Graph First — unified ingestion pipeline, formalized entity/relationship model, browser/web ingestion, local export/import/backup, provenance, KG as the primary surface |
296
305
  | 3.5.0 | Foundation stabilization & verification — OIDC verifier, trusted-proxy gating, runtime hook coverage, `tools/` package, reproducible artifacts |
297
306
  | 3.4.1 | Runtime completion — full hooks lifecycle, real Local Agent probes, Connect Folder and Folder Watch verified end-to-end |
298
307
  | 3.4.0 | Platform completion — hooks execution, uploads in Files, vision image input, agent run trigger, on-device Local Agent / Connect Folder / Folder Watch |
@@ -0,0 +1,44 @@
1
+ const { app, BrowserWindow } = require("electron");
2
+ const { spawn } = require("node:child_process");
3
+ const path = require("node:path");
4
+
5
+ const origin = process.env.LATTICEAI_DESKTOP_BACKEND_ORIGIN || "http://127.0.0.1:8765";
6
+ let backend = null;
7
+
8
+ function startBackend() {
9
+ if (process.env.LATTICEAI_DESKTOP_NO_BACKEND) return;
10
+ const command = process.env.LATTICEAI_DESKTOP_BACKEND_CMD || "python3 ltcai_cli.py --host 127.0.0.1 --port 8765";
11
+ const [bin, ...args] = command.split(/\s+/).filter(Boolean);
12
+ if (!bin) return;
13
+ backend = spawn(bin, args, {
14
+ cwd: process.env.LATTICEAI_DESKTOP_BACKEND_CWD || path.resolve(__dirname, "../.."),
15
+ env: { ...process.env, LATTICEAI_HOST: "127.0.0.1", LATTICEAI_PORT: "8765", LATTICEAI_TUNNEL: "false" },
16
+ stdio: "ignore",
17
+ });
18
+ }
19
+
20
+ function createWindow() {
21
+ const win = new BrowserWindow({
22
+ width: 1440,
23
+ height: 920,
24
+ minWidth: 1024,
25
+ minHeight: 720,
26
+ title: "Lattice AI",
27
+ webPreferences: {
28
+ contextIsolation: true,
29
+ nodeIntegration: false,
30
+ sandbox: true,
31
+ },
32
+ });
33
+ win.loadURL(`${origin}/app`);
34
+ }
35
+
36
+ app.whenReady().then(() => {
37
+ startBackend();
38
+ createWindow();
39
+ });
40
+
41
+ app.on("window-all-closed", () => {
42
+ if (backend) backend.kill();
43
+ if (process.platform !== "darwin") app.quit();
44
+ });
package/docs/CHANGELOG.md CHANGED
@@ -1,5 +1,111 @@
1
1
  # Changelog
2
2
 
3
+ ## [4.1.0] - 2026-06-12
4
+
5
+ > Frontend & Desktop Rebuild release candidate. The existing FastAPI backend,
6
+ > Brain Core, storage architecture, and agent/workflow runtime remain the
7
+ > source of truth; the frontend and desktop shell are replaced by a React/Vite
8
+ > desktop architecture.
9
+
10
+ ### Added
11
+
12
+ - React + TypeScript + Vite SPA under `frontend/`, using TanStack Query,
13
+ Zustand, React Flow, Cytoscape.js, Tailwind CSS, local shadcn-style
14
+ primitives, and a generated OpenAPI TypeScript client.
15
+ - Tauri 2.0 desktop shell under `src-tauri/` that launches the local backend
16
+ and exposes the backend origin to the SPA; Electron fallback shell retained
17
+ under `desktop/electron/`.
18
+ - Primary graph-first navigation: Brain, Ask, Capture, Act, Library, System.
19
+ - OpenAPI export/generation script and frontend lint guard for generated-client
20
+ usage, no-CDN static assets, and stale frontend references.
21
+
22
+ ### Changed
23
+
24
+ - `/app` now serves the built React/Vite bundle from `static/app`.
25
+ - Legacy static v3 frontend assets and v3 build/lint scripts are removed after
26
+ capability parity was migrated into the new React surfaces.
27
+ - Release/build scripts now build Vite app assets and preserve Python, npm, and
28
+ VSIX packaging flows at version `4.1.0`.
29
+ - npm Python-backed scripts use `scripts/run_python.mjs` to prefer
30
+ `LTCAI_PYTHON` or the repo virtualenv before falling back to system Python.
31
+
32
+ ### Validation Scope
33
+
34
+ - Python compile check, ruff, unit tests, live integration tests, frontend lint,
35
+ TypeScript build, Playwright visual tests, desktop shell checks, no-CDN
36
+ verification, release artifact validation, wheel smoke, and npm pack dry-run.
37
+
38
+ ### Expected Artifacts
39
+
40
+ - `dist/ltcai-4.1.0-py3-none-any.whl`
41
+ - `dist/ltcai-4.1.0.tar.gz`
42
+ - `dist/ltcai-4.1.0.vsix`
43
+ - `ltcai-4.1.0.tgz`
44
+
45
+ ## [4.0.1] - 2026-06-12
46
+
47
+ > Digital Brain Platform maintenance release for commits on `main` after tag
48
+ > `v4.0.0`. This release does not publish to PyPI, npm, the VS Code
49
+ > Marketplace, or Open VSX; artifacts are built and attached to GitHub Release
50
+ > `v4.0.1` only.
51
+
52
+ ### Added
53
+
54
+ - Durable async run executor for agent/workflow runs, including persisted
55
+ queued/running/final states, realtime SSE progress, cooperative cancellation,
56
+ and startup reconciliation of orphaned active runs.
57
+ - Stable user UUID migration, centralized policy enforcement, local invitation
58
+ tokens, and SQLite-backed Workspace OS state with JSON compatibility
59
+ mirroring.
60
+ - Complete `/app` SPA parity surfaces for account/profile/password, workspace
61
+ and organization administration, invitations, snapshots/time-machine with
62
+ merge-restore, activity/presence, run approvals/cancellation, workflow
63
+ triggers, Brain Network pairing/push, chat context trace, and Knowledge Graph
64
+ provenance coverage.
65
+
66
+ ### Changed
67
+
68
+ - Retired legacy static HTML/CSS/JS UI pages and legacy visual specs. Legacy GET
69
+ routes now redirect into the matching `/app` surface.
70
+ - Added en/ko i18n runtime coverage for the shell, routes, and new parity views,
71
+ guarded by `scripts/lint_v3.mjs`.
72
+ - Bumped synchronized package/runtime versions to `4.0.1`.
73
+
74
+ ### Expected Artifacts
75
+
76
+ - `dist/ltcai-4.0.1-py3-none-any.whl`
77
+ - `dist/ltcai-4.0.1.tar.gz`
78
+ - `dist/ltcai-4.0.1.vsix`
79
+ - `ltcai-4.0.1.tgz`
80
+
81
+ ## [4.0.0] - 2026-06-12
82
+
83
+ > Digital Brain Platform. The Knowledge Graph is now the durable brain store
84
+ > spine: focused `latticeai/brain/` modules own graph storage, schema, ingestion,
85
+ > provenance, retrieval, and document structure, while root modules remain
86
+ > compatibility shims.
87
+
88
+ ### Changed
89
+
90
+ - Decomposed the monolithic Knowledge Graph implementation into focused
91
+ `latticeai/brain/` modules, with every new module kept below 1,500 lines.
92
+ - Flipped graph writes to `nodes_v2` / `edges_v2` as the authoritative write
93
+ path; legacy tables are maintained as a compatibility projection.
94
+ - Added one-time pre-flip SQLite backup, `PRAGMA user_version=4`, schema-version
95
+ reporting, and fail-closed protection for newer DB formats.
96
+ - Added the durable async run executor for agent/workflow runs: persisted
97
+ queued/running/final states, realtime SSE progress, cooperative cancellation,
98
+ and startup reconciliation of orphaned active runs.
99
+ - Added stable user UUID migration, centralized RBAC policy enforcement, local
100
+ invitation tokens, and SQLite-backed Workspace OS state with JSON compatibility
101
+ mirroring and no durable-history truncation.
102
+ - Retired the legacy static UI pages in favor of the v4 `/app` SPA. Legacy GET
103
+ routes redirect into `/app`; new parity views cover token-native account,
104
+ workspace/org management, invitations, snapshots/time-machine with
105
+ merge-restore, activity/presence, run approvals/cancellation, workflow
106
+ triggers, Brain Network peer pairing/push, chat context trace, and Knowledge
107
+ Graph provenance coverage, with en/ko i18n gated by frontend lint.
108
+
3
109
  ## [3.6.0] - 2026-06-10
4
110
 
5
111
  > Knowledge Graph First. The Knowledge Graph becomes the primary architecture:
@@ -41,7 +41,7 @@ The bus is **in-process** (one server, local-first) and fans events out to
41
41
  in-memory subscriber queues.
42
42
 
43
43
  > **Compatibility.** This subsystem is purely additive. It introduces new
44
- > `/realtime/*` endpoints and an `/activity` page, and it attaches to the
44
+ > `/realtime/*` endpoints and an `/app#/activity` page, and it attaches to the
45
45
  > existing `WorkspaceOSStore` through an optional `event_sink` hook. No v1.x
46
46
  > data shape, API, or behavior changes. With zero subscribers the bus is a
47
47
  > no-op, so single-user local mode behaves exactly as before.
@@ -274,8 +274,8 @@ router is mounted in `server_app.py` with the live bus, the auth helpers, and
274
274
 
275
275
  ### `GET /activity`
276
276
 
277
- Serves the Activity UI page (`static/activity.html`). Returns `404` if the UI
278
- file or static directory is not available.
277
+ Compatibility redirect to `/app#/activity`. The Activity UI is part of the v4
278
+ SPA and reads `/realtime/feed`, `/realtime/presence`, and `/workspace/time-machine`.
279
279
 
280
280
  ### `GET /realtime/stream`
281
281
 
@@ -6,9 +6,9 @@
6
6
 
7
7
  Entry point: **`/app`** (served by `latticeai/api/static_routes.py` →
8
8
  `static/v3/index.html`). Login, auto-login after registration, SSO callback, and
9
- the PWA manifest land on `/app`. The legacy multi-page screens (`/workspace`,
10
- `/chat`, `/graph`, `/admin`, …) remain reachable only as compatibility/debug
11
- routes; normal user workflows stay in `/app`.
9
+ the PWA manifest land on `/app`. Legacy multi-page static screens have been
10
+ deleted; compatibility routes (`/workspace`, `/chat`, `/graph`, `/admin`, …)
11
+ redirect into their `/app#/...` views.
12
12
 
13
13
  ---
14
14
 
@@ -31,11 +31,12 @@ One declarative table (`static/v3/js/core/routes.js`) drives the nav rail, the
31
31
  command palette, the router, breadcrumbs, and lazy view loading.
32
32
 
33
33
  ```
34
- Workspace Home · Chat
35
- Retrieval Knowledge Graph · Hybrid Search
36
- Data Files · Pipeline*
37
- Compute Agents* · Models · My Computer*
38
- System Settings
34
+ Brain Knowledge Graph · Hybrid Search · Memory
35
+ Ask Chat
36
+ Capture Files · Pipeline*
37
+ Act Agents* · Runs* · Workflows* · Planning* · Hooks*
38
+ Library Models · Skills* · MCP* · Marketplace*
39
+ System Overview · Account · Workspaces · Snapshots · Activity · Network* · Settings · My Computer*
39
40
  Administration Users · Permissions · Audit Logs · Security · Policies · Private VPC (admin mode)
40
41
  ```
41
42
 
@@ -0,0 +1,65 @@
1
+ # v4.1.0 Frontend Architecture Review
2
+
3
+ ## Scope
4
+
5
+ This review covers the v4.1.0 replacement of the `/app` frontend and desktop
6
+ shell. It does not redesign Brain Core, storage, backend API contracts, or the
7
+ agent/workflow runtime.
8
+
9
+ ## Baseline
10
+
11
+ v4.0.1 served a static frontend assembled under `static/v3` with bespoke build
12
+ and lint scripts. Capability parity existed, but the implementation duplicated
13
+ view systems, carried legacy static route assumptions, and could not cleanly
14
+ share typed API contracts with the FastAPI backend.
15
+
16
+ ## Target Architecture
17
+
18
+ - Desktop shell: Tauri 2.0 primary, Electron fallback only.
19
+ - Frontend: React, TypeScript, Vite, TanStack Query, Zustand, React Flow,
20
+ Cytoscape.js, Tailwind CSS, local shadcn-style primitives.
21
+ - API: generated OpenAPI TypeScript client from the existing FastAPI app.
22
+ - Runtime: single client-side SPA, no SSR, no CDN.
23
+ - Backend: existing FastAPI app remains the source of truth.
24
+
25
+ ## Implemented Architecture
26
+
27
+ - `frontend/` owns the React/Vite source.
28
+ - `frontend/src/api/openapi.ts` is generated from `frontend/openapi.json`.
29
+ - `frontend/src/api/client.ts` wraps generated-client JSON calls and keeps
30
+ streaming chat plus multipart upload as explicit fetch special cases.
31
+ - `frontend/src/routes.ts` defines Brain, Ask, Capture, Act, Library, System and
32
+ maps legacy hash routes into those groups.
33
+ - `static/app` is the shipped build output and is served by `/app`.
34
+ - `src-tauri/` contains the Tauri 2.0 shell and backend-origin bridge.
35
+ - `desktop/electron/` contains the fallback shell.
36
+ - `static/sw.js` precaches the React app manifest/assets for offline-capable
37
+ local startup.
38
+
39
+ ## Boundary Decisions
40
+
41
+ - The backend contract was preserved; only the frontend consumer changed.
42
+ - Brain Core and storage modules were not modified for UI convenience.
43
+ - No CDN fallback was introduced; all visual/runtime dependencies are bundled.
44
+ - No demo-only controls were added. Unavailable capabilities render explicit
45
+ unavailable/error states based on API responses.
46
+ - npm runtime installs are kept lean: React/Vite/Tauri/Electron toolchains are
47
+ development dependencies because the distributable app ships built assets.
48
+
49
+ ## Capability Mapping
50
+
51
+ | v4.0.1 capability | v4.1.0 surface |
52
+ | --- | --- |
53
+ | Knowledge Graph, hybrid search, memory, provenance, portability | Brain |
54
+ | Chat, conversations, context trace, attachments | Ask |
55
+ | Uploads, connected folders, local runtime, URL capture, index pipeline | Capture |
56
+ | Agents, runs, approvals, workflows, triggers, hooks, tools | Act |
57
+ | Models, embeddings, skills, MCP, templates/plugins | Library |
58
+ | Account, auth, workspaces, snapshots, activity, network, settings, admin/security | System |
59
+
60
+ ## Residual Risk
61
+
62
+ - The first Vite bundle is larger than 500 kB after minification because graph,
63
+ workflow, and app shell libraries are included in the initial desktop SPA
64
+ bundle. This is a performance optimization target, not a capability blocker,
65
+ and the build remains fully local/offline.
@@ -0,0 +1,70 @@
1
+ # v4.1.0 Frontend Migration Report
2
+
3
+ ## Objective
4
+
5
+ Replace the v4.0.1 static frontend implementation with the Digital Brain
6
+ desktop architecture while preserving capabilities, user data, backend API
7
+ contracts, and local-first/offline operation.
8
+
9
+ ## Migration Summary
10
+
11
+ - Added React + TypeScript + Vite source under `frontend/`.
12
+ - Added generated OpenAPI schema/client files under `frontend/openapi.json` and
13
+ `frontend/src/api/openapi.ts`.
14
+ - Added React capability pages for Brain, Ask, Capture, Act, Library, System.
15
+ - Added Tauri 2.0 desktop shell under `src-tauri/`.
16
+ - Added Electron fallback shell under `desktop/electron/`.
17
+ - Replaced `/app` static serving with `static/app/index.html`.
18
+ - Replaced v3 asset build/lint scripts with Vite build and frontend lint guards.
19
+ - Removed `static/v3` and retired `scripts/build_v3_assets.mjs` /
20
+ `scripts/lint_v3.mjs`.
21
+ - Updated package metadata so Python wheel/sdist, npm tgz, and VSIX builds ship
22
+ the new `static/app` assets.
23
+
24
+ ## Compatibility
25
+
26
+ - Existing FastAPI routes are preserved.
27
+ - The generated OpenAPI client is produced from the live app schema.
28
+ - Legacy app hash routes are mapped into the new primary navigation groups.
29
+ - Service worker caching now targets the Vite app manifest instead of v3 assets.
30
+ - User data formats, Brain database files, Workspace OS state, snapshots,
31
+ conversations, memories, and graph data are not migrated or destructively
32
+ changed by the frontend rebuild.
33
+
34
+ ## Capability Parity
35
+
36
+ | Capability | Migration result |
37
+ | --- | --- |
38
+ | Brain graph exploration | Cytoscape.js graph view in Brain |
39
+ | Hybrid search | Brain search tab backed by `/api/search/hybrid` |
40
+ | Memory recall | Brain memory tab backed by memory APIs |
41
+ | Provenance and portability | Brain provenance/portability actions |
42
+ | Chat and context trace | Ask surface with streaming chat and context panel |
43
+ | Conversation management | Ask history backed by conversation APIs |
44
+ | Document upload | Capture upload using multipart backend endpoint |
45
+ | Connected folders/local runtime | Capture desktop/local runtime APIs |
46
+ | Index pipeline and URL capture | Capture pipeline/browser ingestion APIs |
47
+ | Agents and run records | Act agents/runs/approvals backed by runtime APIs |
48
+ | Workflow graph | Act React Flow visualization and workflow APIs |
49
+ | Triggers, hooks, tools | Act surfaces backed by trigger/hook/tool APIs |
50
+ | Models and embeddings | Library model/embedding APIs |
51
+ | Skills, MCP, templates/plugins | Library registry APIs |
52
+ | Account/auth/profile/password | System account APIs |
53
+ | Workspaces/invitations | System workspace APIs |
54
+ | Snapshots/time-machine | System snapshot APIs |
55
+ | Activity/presence/network | System activity and network APIs |
56
+ | Admin/security/settings | System admin and settings APIs |
57
+
58
+ ## Removed Frontend Debt
59
+
60
+ - Duplicate static v3 view modules.
61
+ - Legacy frontend build pipeline.
62
+ - Legacy v3 frontend lint script.
63
+ - Static v3 asset tree in release packages.
64
+ - Direct current-release references to v4.0.1 in latest docs.
65
+
66
+ ## Data Preservation
67
+
68
+ No user data migration is required for v4.1.0. All persisted state remains owned
69
+ by the existing backend stores. The frontend rebuild only changes the client and
70
+ desktop shell used to access those stores.
@@ -0,0 +1,47 @@
1
+ # v4.1.0 Validation Report
2
+
3
+ ## Summary
4
+
5
+ v4.1.0 RC validation passed for the React/Vite frontend, Tauri desktop shell,
6
+ FastAPI backend compatibility, release artifacts, and installed-wheel smoke.
7
+
8
+ ## Commands Run
9
+
10
+ | Area | Command | Result |
11
+ | --- | --- | --- |
12
+ | OpenAPI generation | `npm run frontend:openapi` | Pass; generated 308 paths |
13
+ | Static app build | `npm run build:assets` | Pass; wrote `static/app/asset-manifest.json` |
14
+ | Frontend lint / no CDN / API compatibility | `npm run lint` | Pass; scanned 28 frontend/static files; OpenAPI exposes 308 paths |
15
+ | TypeScript build | `npm run typecheck` | Pass; frontend TS + VS Code extension build |
16
+ | Python compile | `npm run check:python` | Pass; compiled 206 modules |
17
+ | Ruff | `node scripts/run_python.mjs -m ruff check .` | Pass |
18
+ | Unit tests | `npm run test:unit -- --tb=short` | Pass; 585 passed, 2 warnings |
19
+ | Live integration tests | `LTCAI_TEST_BASE_URL=http://127.0.0.1:8899 npm run test:integration -- --tb=short` | Pass; 9 passed |
20
+ | Playwright visual/offline tests | `npx playwright test tests/visual/v3.spec.js` | Pass; 12 passed |
21
+ | Tauri cargo check | `npm run desktop:tauri:check` | Pass |
22
+ | Tauri desktop build | `LATTICEAI_DESKTOP_NO_BACKEND=1 npm run desktop:tauri:build` | Pass; built `.app` and DMG |
23
+ | Electron fallback syntax/version | `node --check desktop/electron/main.cjs && npx electron --version` | Pass; Electron v42.4.0 |
24
+ | Release artifacts | `npm run release:artifacts` plus resumed `npm pack && npm run package:vsix` | Pass |
25
+ | Artifact validation | `npm run release:validate` | Pass; exact v4.1.0 wheel/sdist/VSIX/tgz found |
26
+ | Wheel smoke | `node scripts/run_python.mjs scripts/wheel_smoke.py --wheel dist/ltcai-4.1.0-py3-none-any.whl` | Pass; imports 19 modules and `/health` reports 4.1.0 |
27
+ | npm pack dry-run | `npm pack --dry-run` | Pass; `ltcai-4.1.0.tgz`, 259 files, 2.9 MB |
28
+
29
+ ## Generated Artifacts
30
+
31
+ - `dist/ltcai-4.1.0-py3-none-any.whl`
32
+ - `dist/ltcai-4.1.0.tar.gz`
33
+ - `dist/ltcai-4.1.0.vsix`
34
+ - `ltcai-4.1.0.tgz`
35
+ - `src-tauri/target/release/bundle/macos/Lattice AI.app`
36
+ - `src-tauri/target/release/bundle/dmg/Lattice AI_4.1.0_aarch64.dmg`
37
+
38
+ ## Notes
39
+
40
+ - Vite reports one large initial bundle warning after minification. The app
41
+ remains fully local/offline and passes visual/offline startup validation.
42
+ - `cargo check` reports a future-incompatibility warning in transitive
43
+ `block v0.1.6`; the current Tauri 2.0 build passes on Rust 1.96.
44
+ - Release artifact validation warns that historical artifacts remain in
45
+ `dist/`; this is expected and reinforces the rule to upload only exact
46
+ v4.1.0 filenames, never `dist/*`.
47
+ - No external registry publish was performed.