ltcai 1.4.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.
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,80 +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.4.0: Server App Final Decomposition
40
-
41
- - **server_app.py final decomposition** — the app shell is now FastAPI assembly,
42
- lifespan, middleware, static mounting, and router wiring only
43
- (~5,381 1,303 lines)
44
- - **Chat / model / tools extraction** chat/history/agent, model runtime and
45
- provider helpers, tools, local files, computer-use, permissions, upload,
46
- garden/setup/static UI, MCP, and KG glue now live in API routers and services
47
- - **AppContext and dependency cleanup** — routers receive explicit dependencies
48
- and do not import the FastAPI app; service modules own runtime and dispatch
49
- business logic
50
- - **Safety validation suite** — route compatibility, import/startup, streaming,
51
- model endpoint, tools/local/CU, release-artifact, and documentation stale
52
- checks guard the split
53
- - **Compatibility preserved** all public API paths, request/response schemas,
54
- `server:app`, CLI, UI, Knowledge Graph, Admin/Security, Workspace OS, and
55
- VS Code expectations remain unchanged
56
-
57
- ### New in 1.2.0: Server App Modularization
58
-
59
- - **server_app.py modularized** Workspace/Organization and health/engine
60
- endpoints extracted into dedicated routers (`latticeai/api/*`) backed by a
61
- service layer (`latticeai/services/*`); `server_app` is now app assembly +
62
- router include (~6,585 → ~5,948 lines)
63
- - **Routers / services split** — `create_workspace_router`,
64
- `create_health_router`, `WorkspaceService`, `ModelService`, `ChatService`
65
- - **Workspace API service layer** — scope resolution and role/permission checks
66
- centralized in `WorkspaceService`
67
- - **Workspace / org guardrails** — non-members can't read/write org data,
68
- viewers can't write, owners/admins manage members; no-auth local owner
69
- fallback preserved
70
- - **Health / model / chat modularization** — `/health`, `/mode`,
71
- `/runtime_features`, `/engines` via the health router; chat trace recording
72
- via the chat service (streaming behavior unchanged)
73
- - **Compatibility preserved** — `server:app` import path, all API routes, CLI,
74
- Knowledge Graph / Admin / Security routers, and VS Code integration unchanged
75
-
76
- ### New in 1.1.0: Organization Workspace Foundation
77
-
78
- - **Organization Workspace** alongside Personal Workspace — create shared org
79
- workspaces, list/switch between them, and archive (non-destructively)
80
- - **Workspace roles & permissions** — `owner`, `admin`, `member`, `viewer`
81
- mapped to read / write / manage-members / manage-workspace
82
- - **Workspace-scoped data** — snapshots, memory, agent runs, workflows, traces,
83
- and timeline carry a `workspace_id`; reads scope via the `X-Workspace-Id` header
84
- - **CI / release hardening** — Node.js 24 ready workflow, version-scoped
85
- artifact upload (never `dist/*`), and a release artifact validator
86
- - **Enterprise extension foundation (open-core)** — a stable seam for a future
87
- Enterprise plugin; Community ships everything it has today, unrestricted
88
- (see [docs/ENTERPRISE.md](docs/ENTERPRISE.md) and
89
- [docs/EDITION_STRATEGY.md](docs/EDITION_STRATEGY.md))
90
-
91
- ### New in 1.0.0: AI Workspace OS
92
-
93
- - Workspace OS command center at `/workspace`
94
- - First-run onboarding state API and UI
95
- - Graph RAG answer traces with sources, nodes, edges, confidence, and jump links
96
- - Local indexing dashboard with watcher state, success/failure counts, pause/resume/remove
97
- - Workspace snapshots, Time Machine views, export, and Knowledge Diff
98
- - Personal memory CRUD/search linked back to the graph
99
- - Multi-agent graph entities and agent run history
100
- - Relationship Explorer for inbound, outbound, related entities, and shortest path
101
- - Local Computer Memory remains OFF by default and requires explicit approval
102
- - Skill Marketplace registry with install, uninstall, update, enable, disable, and version state
103
- - Workflow Graph for upload -> summarize -> generate -> export style work histories
104
- - VS Code commands for Explain Selection, Refactor Selection, Generate Tests, Send To Lattice, and Ask About Current File
105
-
106
- ### Built for people who want
107
-
108
- - a private AI workspace that runs from their own machine
109
- - local model setup without hunting through many tools
110
- - folder indexing that becomes useful AI memory
111
- - a visual knowledge graph instead of disconnected files and chats
112
- - 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>
113
61
 
114
62
  ---
115
63
 
@@ -171,6 +119,20 @@ LTCAI
171
119
 
172
120
  ---
173
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
+
174
136
  ## Product Preview
175
137
 
176
138
  <table>
@@ -193,6 +155,44 @@ LTCAI
193
155
  </tr>
194
156
  </table>
195
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
+
196
196
  ---
197
197
 
198
198
  ## Why it is different
@@ -333,20 +333,24 @@ Supported routes include OpenAI-compatible APIs, OpenRouter, Groq, Together, xAI
333
333
 
334
334
  ## Current release
335
335
 
336
- **1.4.0** completes the Server App Final Decomposition release:
337
-
338
- - `server.py` remains the thin compatibility entrypoint and
339
- `latticeai/server_app.py` is now a compact app assembly shell
340
- - chat/history/agent, model runtime/provider helpers, tools/local/CU/
341
- permissions/upload, garden/setup/static pages, MCP, and KG router wiring are
342
- extracted into `latticeai/api/*` and `latticeai/services/*`
343
- - route compatibility, streaming, model endpoint, tools/local/CU,
344
- import/startup, build, packaging, and documentation stale-reference checks
345
- are part of the release validation
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
346
350
  - Python package, npm package, VS Code extension, FastAPI app, and `/health`
347
- version metadata are aligned at `1.4.0`
351
+ version metadata are aligned at `1.5.0`
348
352
 
349
- See the full [changelog](docs/CHANGELOG.md).
353
+ See the full [changelog](docs/CHANGELOG.md) and [RELEASE.md](RELEASE.md).
350
354
 
351
355
  ---
352
356
 
@@ -535,6 +539,20 @@ Full reference: [docs/mcp-tools.md](docs/mcp-tools.md)
535
539
 
536
540
  ---
537
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
+
538
556
  ## Contributing
539
557
 
540
558
  See [CONTRIBUTING.md](CONTRIBUTING.md). Issues and pull requests are welcome.
package/docs/CHANGELOG.md CHANGED
@@ -1,5 +1,59 @@
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
+
3
57
  ## [1.4.0] - 2026-05-31
4
58
 
5
59
  > Server App Final Decomposition — chat, model runtime, tools/local/CU,
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.4.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
@@ -304,4 +304,20 @@ def create_models_router(
304
304
  _router.unload_all()
305
305
  return {"status": "ok", "unloaded": unloaded}
306
306
 
307
+ @router.get("/models/recommendations")
308
+ async def model_recommendations(request: Request, engine: str = "local_mlx"):
309
+ """Hardware-aware tri-state model recommendation for this machine.
310
+
311
+ Detects the system profile (OS/RAM/CPU/GPU/disk) and classifies the
312
+ ``engine`` catalog into recommended / compatible / not_recommended,
313
+ grouped by family. Used by the onboarding and model-picker UIs.
314
+ """
315
+ require_user(request)
316
+ from auto_setup import probe as auto_setup_probe
317
+ from latticeai.services.model_recommendation import recommend_catalog
318
+
319
+ profile = await asyncio.to_thread(lambda: auto_setup_probe().to_json())
320
+ catalog = recommend_catalog(profile, engine=engine)
321
+ return {"profile": profile, "recommendations": catalog}
322
+
307
323
  return router
@@ -262,9 +262,20 @@ def create_workspace_router(
262
262
  require_user(request)
263
263
  env = await asyncio.to_thread(scan_environment)
264
264
  recommendations = get_recommendations(env)
265
+ # Tri-state, family-grouped catalog (recommended / compatible /
266
+ # not_recommended) for this machine, used by the onboarding model step.
267
+ catalog = None
268
+ try:
269
+ from auto_setup import probe as auto_setup_probe
270
+ from latticeai.services.model_recommendation import recommend_catalog
271
+ profile = await asyncio.to_thread(lambda: auto_setup_probe().to_json())
272
+ catalog = recommend_catalog(profile, engine="local_mlx")
273
+ except Exception as exc: # pragma: no cover - recommendation is best-effort
274
+ logging.warning("model recommendation catalog failed: %s", exc)
265
275
  payload = {
266
276
  "environment": env,
267
277
  "recommendations": recommendations,
278
+ "catalog": catalog,
268
279
  "default_local_model": LOCAL_MODEL,
269
280
  "default_public_model": PUBLIC_MODEL,
270
281
  }
@@ -0,0 +1,158 @@
1
+ """Enterprise PoC surfaces (admin policies, audit export, SIEM stub, org settings).
2
+
3
+ This module is **structure only** — it prepares concrete, discoverable shapes for
4
+ Enterprise governance features while keeping the open-source Community edition
5
+ fully functional and ungated. Every capability here is consulted through
6
+ :data:`latticeai.core.enterprise.capability_registry`; in the Community build
7
+ each is reported ``enabled=False`` and the Community behaviour (local audit
8
+ export, the four base roles, single-tenant local storage) is always available.
9
+
10
+ Nothing in this module restricts a Community feature. It answers "what *would*
11
+ an Enterprise provider light up, and is it active?" so the admin UI can show an
12
+ honest edition/capability matrix and a SIEM export *preview envelope* without
13
+ shipping any Enterprise implementation.
14
+ """
15
+
16
+ from __future__ import annotations
17
+
18
+ from typing import Any, Dict, List, Optional
19
+
20
+ from latticeai.core.enterprise import (
21
+ EnterpriseCapability,
22
+ capability_registry,
23
+ )
24
+
25
+ COMMUNITY_NOTICE = (
26
+ "Community edition: this is an Enterprise extension point and is not "
27
+ "enforced. Local-first behaviour is always available. See "
28
+ "docs/ENTERPRISE.md and docs/EDITION_STRATEGY.md."
29
+ )
30
+
31
+
32
+ def _cap(capability: EnterpriseCapability) -> bool:
33
+ return capability_registry.is_capability_enabled(capability)
34
+
35
+
36
+ def admin_policies() -> Dict[str, Any]:
37
+ """Admin policy-pack status + the effective (open) Community policy."""
38
+ enabled = _cap(EnterpriseCapability.ADMIN_POLICY_PACKS)
39
+ return {
40
+ "capability": EnterpriseCapability.ADMIN_POLICY_PACKS.value,
41
+ "enabled": enabled,
42
+ "enforced": enabled,
43
+ "effective_policy": {
44
+ # Community defaults — descriptive, not enforced by a policy engine.
45
+ "base_roles": ["owner", "admin", "member", "viewer"],
46
+ "local_file_access": "approval-token gated (per path/user/action)",
47
+ "package_install": "admin-only with audit trail",
48
+ "network_binding": "127.0.0.1 by default",
49
+ "managed_policy_packs": [] if not enabled else "provided-by-enterprise",
50
+ },
51
+ "note": COMMUNITY_NOTICE,
52
+ }
53
+
54
+
55
+ def audit_export_descriptor() -> Dict[str, Any]:
56
+ """What audit export is available locally vs. via Enterprise SIEM streaming."""
57
+ siem_enabled = _cap(EnterpriseCapability.SIEM_EXPORT)
58
+ retention_enabled = _cap(EnterpriseCapability.COMPLIANCE_RETENTION)
59
+ return {
60
+ "local_export": {
61
+ "available": True,
62
+ "endpoint": "/admin/security/export",
63
+ "formats": ["json", "csv", "xlsx", "txt", "pdf"],
64
+ "note": "Community local audit export is always available to admins.",
65
+ },
66
+ "siem_streaming": {
67
+ "capability": EnterpriseCapability.SIEM_EXPORT.value,
68
+ "enabled": siem_enabled,
69
+ "note": COMMUNITY_NOTICE,
70
+ },
71
+ "compliance_retention": {
72
+ "capability": EnterpriseCapability.COMPLIANCE_RETENTION.value,
73
+ "enabled": retention_enabled,
74
+ "note": COMMUNITY_NOTICE,
75
+ },
76
+ }
77
+
78
+
79
+ def siem_export_stub(events: Optional[List[Dict[str, Any]]] = None) -> Dict[str, Any]:
80
+ """A preview of the envelope an Enterprise SIEM exporter would emit.
81
+
82
+ In the Community build this is a *stub*: it returns the envelope *shape*
83
+ (so integrators can see the contract) but ``streamed=False`` and no events
84
+ are actually pushed to an external SIEM.
85
+ """
86
+ enabled = _cap(EnterpriseCapability.SIEM_EXPORT)
87
+ sample = events or [
88
+ {
89
+ "id": "evt_sample",
90
+ "type": "audit_event",
91
+ "timestamp": "1970-01-01T00:00:00Z",
92
+ "actor": "admin@example.com",
93
+ "action": "model_load",
94
+ "severity": "informational",
95
+ }
96
+ ]
97
+ envelope = {
98
+ "format": "ltcai.siem.v1",
99
+ "encoding": "ndjson",
100
+ "vendor": "LatticeAI",
101
+ "product": "Workspace OS",
102
+ "records": [
103
+ {
104
+ "ts": e.get("timestamp"),
105
+ "actor": e.get("actor"),
106
+ "act": e.get("action"),
107
+ "sev": e.get("severity", "informational"),
108
+ "kind": e.get("type"),
109
+ "id": e.get("id"),
110
+ }
111
+ for e in sample
112
+ ],
113
+ }
114
+ return {
115
+ "capability": EnterpriseCapability.SIEM_EXPORT.value,
116
+ "enabled": enabled,
117
+ "streamed": False if not enabled else True,
118
+ "destination": None if not enabled else "configured-by-enterprise",
119
+ "preview_envelope": envelope,
120
+ "note": COMMUNITY_NOTICE,
121
+ }
122
+
123
+
124
+ def organization_settings() -> Dict[str, Any]:
125
+ """Org-scale governance capabilities and their (Community=off) state."""
126
+ governance_caps = [
127
+ EnterpriseCapability.TENANT_ISOLATION,
128
+ EnterpriseCapability.RBAC_ABAC_ADVANCED,
129
+ EnterpriseCapability.SCIM,
130
+ EnterpriseCapability.IDP_PROVISIONING,
131
+ EnterpriseCapability.SSO_ADVANCED,
132
+ EnterpriseCapability.DLP_POLICY,
133
+ EnterpriseCapability.EDISCOVERY,
134
+ EnterpriseCapability.PRIVATE_VPC,
135
+ EnterpriseCapability.AIR_GAPPED_DEPLOYMENT,
136
+ ]
137
+ return {
138
+ "community_baseline": {
139
+ "workspaces": ["personal", "organization"],
140
+ "roles": ["owner", "admin", "member", "viewer"],
141
+ "data_isolation": "single-tenant local storage (~/.ltcai)",
142
+ },
143
+ "governance_capabilities": {
144
+ cap.value: _cap(cap) for cap in governance_caps
145
+ },
146
+ "note": COMMUNITY_NOTICE,
147
+ }
148
+
149
+
150
+ def poc_overview() -> Dict[str, Any]:
151
+ """Combined Enterprise PoC surface for the admin dashboard."""
152
+ return {
153
+ "edition": capability_registry.describe(),
154
+ "admin_policies": admin_policies(),
155
+ "audit_export": audit_export_descriptor(),
156
+ "siem_export": siem_export_stub(),
157
+ "organization_settings": organization_settings(),
158
+ }
@@ -18,7 +18,7 @@ from pathlib import Path
18
18
  from typing import Any, Callable, Dict, Iterable, List, Optional
19
19
 
20
20
 
21
- WORKSPACE_OS_VERSION = "1.4.0"
21
+ WORKSPACE_OS_VERSION = "1.5.0"
22
22
 
23
23
  # Workspace types separate single-user Personal workspaces from shared
24
24
  # Organization workspaces. Both keep the same local-first JSON store; the type