ltcai 1.3.0 → 1.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (44) hide show
  1. package/README.md +105 -79
  2. package/docs/CHANGELOG.md +109 -0
  3. package/docs/images/architecture.png +0 -0
  4. package/docs/images/graph.png +0 -0
  5. package/docs/images/hero.gif +0 -0
  6. package/docs/images/model-recommendation.png +0 -0
  7. package/docs/images/onboarding.png +0 -0
  8. package/docs/images/organization.png +0 -0
  9. package/docs/images/skills.png +0 -0
  10. package/docs/images/tmp_frames/frame_00.png +0 -0
  11. package/docs/images/tmp_frames/frame_01.png +0 -0
  12. package/docs/images/tmp_frames/frame_02.png +0 -0
  13. package/docs/images/tmp_frames/frame_03.png +0 -0
  14. package/docs/images/workspace.png +0 -0
  15. package/latticeai/__init__.py +1 -1
  16. package/latticeai/api/admin.py +17 -0
  17. package/latticeai/api/chat.py +786 -0
  18. package/latticeai/api/computer_use.py +294 -0
  19. package/latticeai/api/deps.py +15 -0
  20. package/latticeai/api/garden.py +34 -0
  21. package/latticeai/api/local_files.py +125 -0
  22. package/latticeai/api/models.py +16 -0
  23. package/latticeai/api/permissions.py +331 -0
  24. package/latticeai/api/setup.py +158 -0
  25. package/latticeai/api/static_routes.py +166 -0
  26. package/latticeai/api/tools.py +579 -0
  27. package/latticeai/api/workspace.py +11 -0
  28. package/latticeai/core/enterprise_admin.py +158 -0
  29. package/latticeai/core/workspace_os.py +1 -1
  30. package/latticeai/server_app.py +223 -4301
  31. package/latticeai/services/app_context.py +27 -0
  32. package/latticeai/services/model_catalog.py +289 -0
  33. package/latticeai/services/model_recommendation.py +183 -0
  34. package/latticeai/services/model_runtime.py +1721 -0
  35. package/latticeai/services/tool_dispatch.py +135 -0
  36. package/latticeai/services/upload_service.py +99 -0
  37. package/package.json +3 -3
  38. package/skills/SKILL_TEMPLATE.md +1 -1
  39. package/skills/code_review/SKILL.md +1 -1
  40. package/skills/data_analysis/SKILL.md +1 -1
  41. package/skills/file_edit/SKILL.md +1 -1
  42. package/skills/summarize_document/SKILL.md +1 -1
  43. package/skills/web_search/SKILL.md +1 -1
  44. package/static/scripts/chat.js +45 -0
package/README.md CHANGED
@@ -15,7 +15,7 @@
15
15
 
16
16
  <br/>
17
17
 
18
- <img src="https://raw.githubusercontent.com/TaeSooPark-PTS/LatticeAI/main/docs/images/lattice-ai-demo.gif" alt="Lattice AI demo showing chat, knowledge graph, and admin dashboard" width="100%"/>
18
+ <img src="docs/images/hero.gif" alt="Lattice AI AI Workspace OS for local-first graph, memory, and agents" width="100%"/>
19
19
  </div>
20
20
 
21
21
  ---
@@ -36,74 +36,28 @@ Automatic knowledge graph
36
36
  Graph-aware chat, snapshots, memory, agents, workflows, skills, and timeline
37
37
  ```
38
38
 
39
- ### New in 1.3.0: Server App Decomposition
40
-
41
- - **server_app.py decomposition** — model/engine and MCP/skills/plugins
42
- endpoints extracted into `latticeai/api/models.py` and `latticeai/api/mcp.py`
43
- (~5,948 ~5,382 lines)
44
- - **Safety validation suite** — a route-compatibility snapshot (209 paths) plus
45
- import/startup, streaming-contract, and model/MCP/KG checks, built before the
46
- move so no endpoint can silently change
47
- - **Compatibility preserved** — all API paths, request/response schemas, the
48
- `server:app` import path, CLI, UI, KG/Admin/Security routers, and VS Code
49
- integration are unchanged
50
-
51
- ### New in 1.2.0: Server App Modularization
52
-
53
- - **server_app.py modularized** Workspace/Organization and health/engine
54
- endpoints extracted into dedicated routers (`latticeai/api/*`) backed by a
55
- service layer (`latticeai/services/*`); `server_app` is now app assembly +
56
- router include (~6,585 ~5,948 lines)
57
- - **Routers / services split** — `create_workspace_router`,
58
- `create_health_router`, `WorkspaceService`, `ModelService`, `ChatService`
59
- - **Workspace API service layer** scope resolution and role/permission checks
60
- centralized in `WorkspaceService`
61
- - **Workspace / org guardrails** — non-members can't read/write org data,
62
- viewers can't write, owners/admins manage members; no-auth local owner
63
- fallback preserved
64
- - **Health / model / chat modularization** — `/health`, `/mode`,
65
- `/runtime_features`, `/engines` via the health router; chat trace recording
66
- via the chat service (streaming behavior unchanged)
67
- - **Compatibility preserved** — `server:app` import path, all API routes, CLI,
68
- Knowledge Graph / Admin / Security routers, and VS Code integration unchanged
69
-
70
- ### New in 1.1.0: Organization Workspace Foundation
71
-
72
- - **Organization Workspace** alongside Personal Workspace — create shared org
73
- workspaces, list/switch between them, and archive (non-destructively)
74
- - **Workspace roles & permissions** — `owner`, `admin`, `member`, `viewer`
75
- mapped to read / write / manage-members / manage-workspace
76
- - **Workspace-scoped data** — snapshots, memory, agent runs, workflows, traces,
77
- and timeline carry a `workspace_id`; reads scope via the `X-Workspace-Id` header
78
- - **CI / release hardening** — Node.js 24 ready workflow, version-scoped
79
- artifact upload (never `dist/*`), and a release artifact validator
80
- - **Enterprise extension foundation (open-core)** — a stable seam for a future
81
- Enterprise plugin; Community ships everything it has today, unrestricted
82
- (see [docs/ENTERPRISE.md](docs/ENTERPRISE.md) and
83
- [docs/EDITION_STRATEGY.md](docs/EDITION_STRATEGY.md))
84
-
85
- ### New in 1.0.0: AI Workspace OS
86
-
87
- - Workspace OS command center at `/workspace`
88
- - First-run onboarding state API and UI
89
- - Graph RAG answer traces with sources, nodes, edges, confidence, and jump links
90
- - Local indexing dashboard with watcher state, success/failure counts, pause/resume/remove
91
- - Workspace snapshots, Time Machine views, export, and Knowledge Diff
92
- - Personal memory CRUD/search linked back to the graph
93
- - Multi-agent graph entities and agent run history
94
- - Relationship Explorer for inbound, outbound, related entities, and shortest path
95
- - Local Computer Memory remains OFF by default and requires explicit approval
96
- - Skill Marketplace registry with install, uninstall, update, enable, disable, and version state
97
- - Workflow Graph for upload -> summarize -> generate -> export style work histories
98
- - VS Code commands for Explain Selection, Refactor Selection, Generate Tests, Send To Lattice, and Ask About Current File
99
-
100
- ### Built for people who want
101
-
102
- - a private AI workspace that runs from their own machine
103
- - local model setup without hunting through many tools
104
- - folder indexing that becomes useful AI memory
105
- - a visual knowledge graph instead of disconnected files and chats
106
- - optional team/admin controls for audit, permissions, and sensitive-data monitoring
39
+ ## Why Lattice AI?
40
+
41
+ - **Local-first by default** — models, data, and your knowledge graph stay on your machine (`~/.ltcai/`); cloud is strictly opt-in.
42
+ - **Memory that compounds** — every chat, file, and folder you approve becomes durable, searchable context instead of being forgotten.
43
+ - **A graph, not a pile of files** — people, projects, documents, decisions, and tasks are linked automatically and explored visually.
44
+ - **One workspace, everywhere** — the same local knowledge powers the web UI, VS Code / Cursor, Telegram, and MCP clients.
45
+ - **Built-in governance** — Personal and Organization workspaces, roles, an audit timeline, and sensitive-data monitoring for teams.
46
+
47
+ ## Core Capabilities
48
+
49
+ | Capability | What it does |
50
+ |---|---|
51
+ | 🧠 Automatic knowledge graph | Turns chats, files, and folders into linked nodes and edges, curated automatically |
52
+ | 💬 Graph-aware chat & agents | Answers and multi-step agents grounded in your indexed local memory |
53
+ | 🖥️ Local model recommendation | Scans your hardware and rates each model **Recommended / Compatible / Not Recommended** |
54
+ | 🗂️ Workspaces & roles | Personal and Organization workspaces with owner / admin / member / viewer permissions |
55
+ | 🧩 Skills & MCP | Install skills and connect MCP tools from the in-product marketplace |
56
+ | 🔒 Admin & security | Audit timeline, permission approvals, sensitive-data detection, exportable reports |
57
+
58
+ <div align="center">
59
+ <img src="docs/images/onboarding.png" alt="Onboarding flow: install, system scan, model recommendation, workspace, indexing, knowledge graph, first chat" width="100%"/>
60
+ </div>
107
61
 
108
62
  ---
109
63
 
@@ -165,6 +119,20 @@ LTCAI
165
119
 
166
120
  ---
167
121
 
122
+ ## Architecture
123
+
124
+ `server:app` stays a thin compatibility entrypoint; the FastAPI app is assembled in
125
+ `latticeai/server_app.py`, and the work lives in focused API routers, a service
126
+ layer, and core modules — so the app shell never grows monolithic again.
127
+
128
+ <div align="center">
129
+ <img src="docs/images/architecture.png" alt="Lattice AI architecture — entrypoint, API routers, services, core, local engines and knowledge graph" width="100%"/>
130
+ </div>
131
+
132
+ See [docs/architecture.md](docs/architecture.md) for request and data-flow detail.
133
+
134
+ ---
135
+
168
136
  ## Product Preview
169
137
 
170
138
  <table>
@@ -187,6 +155,44 @@ LTCAI
187
155
  </tr>
188
156
  </table>
189
157
 
158
+ > Screenshots above are the live web UI. The diagrams below map the product
159
+ > experience to the current v1.5.0 structure.
160
+
161
+ ---
162
+
163
+ ## Product Experience
164
+
165
+ ### Local model recommendation
166
+
167
+ Lattice AI detects your OS, CPU, GPU, RAM, and disk, then rates every local model
168
+ **Recommended**, **Compatible**, or **Not Recommended** for your machine — grouped
169
+ by family (Gemma, Qwen, Llama, Phi, DeepSeek, and more).
170
+
171
+ <div align="center">
172
+ <img src="docs/images/model-recommendation.png" alt="Tri-state local model recommendation grouped by family" width="100%"/>
173
+ </div>
174
+
175
+ ### Workspaces & organization
176
+
177
+ Switch instantly between a **Personal** workspace and shared **Organization**
178
+ workspaces. Org data is scoped by `workspace_id`, and `owner / admin / member /
179
+ viewer` roles map to a transparent permission matrix.
180
+
181
+ <div align="center">
182
+ <img src="docs/images/workspace.png" alt="Personal and Organization workspace model" width="49%"/>
183
+ <img src="docs/images/organization.png" alt="Organization roles and permission matrix" width="49%"/>
184
+ </div>
185
+
186
+ ### Knowledge graph & skills
187
+
188
+ Your work becomes a typed knowledge graph (built automatically), and skills extend
189
+ the workspace through an in-product marketplace.
190
+
191
+ <div align="center">
192
+ <img src="docs/images/graph.png" alt="Knowledge graph node and edge taxonomy" width="49%"/>
193
+ <img src="docs/images/skills.png" alt="Skill marketplace: recommended, popular, installed, updates" width="49%"/>
194
+ </div>
195
+
190
196
  ---
191
197
 
192
198
  ## Why it is different
@@ -327,18 +333,24 @@ Supported routes include OpenAI-compatible APIs, OpenRouter, Groq, Together, xAI
327
333
 
328
334
  ## Current release
329
335
 
330
- **0.6.0** completes the runtime / registry / config extraction sprint:
331
-
332
- - `server.py` is now a thin compatibility entrypoint; FastAPI app assembly lives
333
- in `latticeai.server_app`
334
- - tool dispatch, governance, permission views, MCP descriptions, and prompt
335
- catalog metadata are centralized in `ToolRegistry`
336
- - agent role prompts are split into `latticeai.core.agent_prompts`, while
337
- `AgentRuntime` remains the injected state-machine core
336
+ **1.5.0 Unified Product Release.** Onboarding, model recommendation, and CI
337
+ stabilization in one release:
338
+
339
+ - **CI / VSIX recovery** — the stale `@azure/core-tracing` lockfile pin that
340
+ broke `npm ci` (ETARGET) is regenerated, so the VSIX build is green again
341
+ - **Local model recommendation** a hardware-aware engine
342
+ (`latticeai/services/model_recommendation.py`) classifies the model catalog as
343
+ Recommended / Compatible / Not Recommended, exposed at `/models/recommendations`
344
+ - **Catalog extraction** — the static model catalog moved to
345
+ `latticeai/services/model_catalog.py`, simplifying `model_runtime.py`
346
+ - **Enterprise PoC seam** — admin policy / audit-export / SIEM-stub / org-settings
347
+ surfaces consult the capability registry (Community keeps everything ungated)
348
+ - **Documentation & visuals** — README rewritten as a product page with an
349
+ up-to-date architecture diagram and structural visuals
338
350
  - Python package, npm package, VS Code extension, FastAPI app, and `/health`
339
- version metadata are aligned at `0.6.0`
351
+ version metadata are aligned at `1.5.0`
340
352
 
341
- See the full [changelog](docs/CHANGELOG.md).
353
+ See the full [changelog](docs/CHANGELOG.md) and [RELEASE.md](RELEASE.md).
342
354
 
343
355
  ---
344
356
 
@@ -527,6 +539,20 @@ Full reference: [docs/mcp-tools.md](docs/mcp-tools.md)
527
539
 
528
540
  ---
529
541
 
542
+ ## Documentation
543
+
544
+ | Doc | What's inside |
545
+ |---|---|
546
+ | [docs/architecture.md](docs/architecture.md) | App structure, request and data flow |
547
+ | [docs/CHANGELOG.md](docs/CHANGELOG.md) | Full version history |
548
+ | [RELEASE.md](RELEASE.md) | Release notes and the build/publish checklist |
549
+ | [SECURITY.md](SECURITY.md) | Security model and vulnerability reporting |
550
+ | [docs/ENTERPRISE.md](docs/ENTERPRISE.md) · [docs/EDITION_STRATEGY.md](docs/EDITION_STRATEGY.md) | Open-core boundary and edition strategy |
551
+ | [docs/kg-schema.md](docs/kg-schema.md) · [docs/mcp-tools.md](docs/mcp-tools.md) | Knowledge graph schema and MCP tool catalog |
552
+ | [docs/privacy.md](docs/privacy.md) · [docs/public-deploy.md](docs/public-deploy.md) · [docs/OPERATIONS.md](docs/OPERATIONS.md) | Privacy, public deployment, operations |
553
+
554
+ ---
555
+
530
556
  ## Contributing
531
557
 
532
558
  See [CONTRIBUTING.md](CONTRIBUTING.md). Issues and pull requests are welcome.
package/docs/CHANGELOG.md CHANGED
@@ -1,5 +1,114 @@
1
1
  # Changelog
2
2
 
3
+ ## [1.5.0] - 2026-06-01
4
+
5
+ > Unified Product Release — CI/VSIX recovery, hardware-aware local model
6
+ > recommendation, model-catalog extraction, an Enterprise PoC seam, and a
7
+ > product-page README with an up-to-date architecture diagram. The public route
8
+ > contract, schemas, `server:app`, CLI, UI, and VS Code integration are
9
+ > unchanged.
10
+
11
+ ### Fixed
12
+
13
+ - **VSIX / `npm ci` (ETARGET)** — `vscode-extension/package-lock.json` pinned a
14
+ non-existent `@azure/core-tracing@^1.4.0` (the registry's latest is `1.3.1`),
15
+ breaking `npm ci` and the GitHub Actions VSIX build. The lockfile is
16
+ regenerated so the published `^1.3.0` ranges resolve; `npm ci` → `npm run
17
+ compile` → `vsce package` is green again.
18
+
19
+ ### Added
20
+
21
+ - **Local model recommendation** — `latticeai/services/model_recommendation.py`
22
+ classifies the model catalog into **recommended / compatible / not_recommended**
23
+ from a detected system profile (OS/RAM/CPU/GPU/disk), grouped by family
24
+ (Gemma, Qwen, Llama, Phi, DeepSeek, …). Exposed at `GET /models/recommendations`
25
+ and folded into `/workspace/onboarding/model-recommendations` as a `catalog`
26
+ field. Covered by `tests/unit/test_model_recommendation.py`.
27
+ - **Enterprise PoC surfaces** — `latticeai/core/enterprise_admin.py` plus
28
+ `GET /admin/enterprise` and `GET /admin/enterprise/siem-export` provide admin
29
+ policy, audit-export, SIEM-export-stub, and organization-settings views built
30
+ on the existing capability seam. Community reports every Enterprise capability
31
+ as disabled and never gates a Community feature
32
+ (`tests/unit/test_enterprise_admin.py`).
33
+ - **DeepSeek family** — added to the Ollama and llama.cpp catalogs with
34
+ identifiers chosen so the version-dedup filter is unaffected.
35
+
36
+ ### Changed
37
+
38
+ - **Model catalog extraction** — the static catalog (`ENGINE_MODEL_CATALOG`,
39
+ `ENGINE_INSTALLERS`, `MODEL_ENGINE_ALIASES`) and the pure version-dedup helpers
40
+ moved to `latticeai/services/model_catalog.py`, re-exported by `model_runtime`
41
+ for backward compatibility. `model_runtime.py` shrank from 1,973 to 1,721 lines
42
+ (`tests/unit/test_model_catalog.py` pins the re-export identity).
43
+ - **README rewritten as a product page** — Why / Core Capabilities / Quick Start
44
+ / Architecture / Current Release / Documentation, with structural diagrams
45
+ (`docs/images/*`) and a current architecture diagram. Historical "New in 1.x"
46
+ marketing blocks were removed from the README top (this changelog remains the
47
+ version history).
48
+ - Python package, npm package, VS Code extension, FastAPI app, and `/health`
49
+ version metadata aligned at `1.5.0`.
50
+
51
+ ### Validation
52
+
53
+ - 266 unit tests pass; route-compatibility, import/startup, streaming, model
54
+ endpoint, MCP/KG contract tests preserved; `npm run check:python` green; VSIX
55
+ build verified. Test/build/packaging artifacts only — no package-store publish.
56
+
57
+ ## [1.4.0] - 2026-05-31
58
+
59
+ > Server App Final Decomposition — chat, model runtime, tools/local/CU,
60
+ > permissions/upload, garden/setup/static, MCP, and KG glue extracted while
61
+ > preserving the public route contract.
62
+
63
+ ### Added
64
+
65
+ - **Final decomposition guard** —
66
+ `tests/unit/test_server_app_v14_decomposition.py` asserts
67
+ `latticeai/server_app.py` stays under the 1,500-line target, new routers and
68
+ services import independently, and version metadata is aligned.
69
+ - **New routers** — `latticeai/api/chat.py`, `latticeai/api/tools.py`,
70
+ `latticeai/api/computer_use.py`, `latticeai/api/local_files.py`,
71
+ `latticeai/api/permissions.py`, `latticeai/api/garden.py`,
72
+ `latticeai/api/setup.py`, `latticeai/api/static_routes.py`, plus
73
+ `latticeai/api/deps.py`.
74
+ - **New service seams** — `latticeai/services/model_runtime.py`,
75
+ `latticeai/services/tool_dispatch.py`, `latticeai/services/upload_service.py`,
76
+ and
77
+ `latticeai/services/app_context.py`.
78
+
79
+ ### Changed
80
+
81
+ - **server_app.py final decomposition** — reduced from 5,381 lines to 1,303
82
+ lines. The file now owns FastAPI construction, lifespan, middleware, static
83
+ mount, router wiring, and compatibility globals only.
84
+ - **Chat/history/agent extracted** — `/chat`, `/history*`, `/agent*`, streaming
85
+ generator, document-generation session handling, Graph RAG trace recording,
86
+ and AgentRuntime wiring moved to `latticeai/api/chat.py` with behavior and
87
+ SSE chunk format preserved.
88
+ - **Model runtime/provider extracted** — provider catalogs, engine aliases,
89
+ install/download/pull/load/unload helpers, prepare-model streaming,
90
+ compatibility smoke tests, runtime feature payloads, and cloud verification
91
+ moved to `latticeai/services/model_runtime.py`.
92
+ - **Tools/local/CU/permissions/upload extracted** — `/tools/*` moved to
93
+ `latticeai/api/tools.py`, `/local/*` and KG/local-knowledge router glue moved
94
+ to `latticeai/api/local_files.py`, `/cu/*` moved to
95
+ `latticeai/api/computer_use.py`, `/permissions/*` moved to
96
+ `latticeai/api/permissions.py`, and `/upload/document` now delegates to
97
+ `latticeai/services/upload_service.py`.
98
+ - **Garden/setup/static routes extracted** — `/garden*`, `/setup*`,
99
+ `/permissions/open/*`, `/`, `/account`, `/chat`, `/admin`, `/status`,
100
+ `/manifest.json`, `/sw.js`, and `/local/sysinfo` moved to dedicated routers.
101
+ - **Docs and release metadata aligned** — README current release conflict fixed,
102
+ SECURITY supported versions updated, package metadata bumped to `1.4.0`, and
103
+ publish docs avoid unsafe `dist/*` upload commands.
104
+
105
+ ### Validation
106
+
107
+ - Route compatibility snapshot, import/startup checks, chat streaming contract,
108
+ model endpoint presence, MCP/KG presence, v1.4 line-count/import/version
109
+ guard, unit/integration suites, Python build, VSIX package, npm pack, twine
110
+ check, and release artifact validation all pass for `1.4.0`.
111
+
3
112
  ## [1.3.0] - 2026-05-31
4
113
 
5
114
  > Server app decomposition (phase 3) — safety-net suite first, then model & MCP router extraction.
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
@@ -1,3 +1,3 @@
1
1
  """Lattice AI - modular server package."""
2
2
 
3
- __version__ = "1.3.0"
3
+ __version__ = "1.5.0"
@@ -184,4 +184,21 @@ def create_admin_router(
184
184
  )
185
185
  return public_sso_config(saved)
186
186
 
187
+ @router.get("/admin/enterprise")
188
+ async def admin_enterprise_overview(request: Request):
189
+ """Enterprise PoC surface: edition matrix, admin policies, audit export,
190
+ SIEM stub, and org-governance capabilities. Community reports every
191
+ Enterprise capability as disabled and never gates Community features."""
192
+ require_admin(request)
193
+ from latticeai.core.enterprise_admin import poc_overview
194
+ return poc_overview()
195
+
196
+ @router.get("/admin/enterprise/siem-export")
197
+ async def admin_enterprise_siem_export(request: Request):
198
+ """Preview the SIEM export envelope. In Community this is a stub
199
+ (``streamed=false``) — no events are pushed to an external SIEM."""
200
+ require_admin(request)
201
+ from latticeai.core.enterprise_admin import siem_export_stub
202
+ return siem_export_stub()
203
+
187
204
  return router