ltcai 9.7.0 → 9.8.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 (51) hide show
  1. package/README.md +98 -316
  2. package/docs/CHANGELOG.md +37 -0
  3. package/docs/COMMUNITY_AND_PLUGINS.md +1 -1
  4. package/docs/DEVELOPMENT.md +1 -1
  5. package/docs/ONBOARDING.md +1 -1
  6. package/docs/TRUST_MODEL.md +1 -1
  7. package/docs/WHY_LATTICE.md +1 -1
  8. package/docs/kg-schema.md +1 -1
  9. package/lattice_brain/__init__.py +1 -1
  10. package/lattice_brain/graph/retrieval.py +93 -4
  11. package/lattice_brain/graph/retrieval_vector.py +43 -0
  12. package/lattice_brain/ingestion.py +399 -14
  13. package/lattice_brain/runtime/multi_agent.py +1 -1
  14. package/latticeai/__init__.py +1 -1
  15. package/latticeai/api/brain_intelligence.py +12 -0
  16. package/latticeai/api/chat.py +17 -0
  17. package/latticeai/api/chat_helpers.py +48 -0
  18. package/latticeai/api/chat_stream.py +9 -1
  19. package/latticeai/api/local_files.py +120 -2
  20. package/latticeai/core/agent_eval.py +123 -0
  21. package/latticeai/core/legacy_compatibility.py +1 -1
  22. package/latticeai/core/marketplace.py +1 -1
  23. package/latticeai/core/workspace_os.py +1 -1
  24. package/latticeai/services/architecture_readiness.py +1 -1
  25. package/latticeai/services/automation_intelligence.py +151 -14
  26. package/latticeai/services/brain_intelligence.py +72 -0
  27. package/latticeai/services/product_readiness.py +1 -1
  28. package/package.json +1 -1
  29. package/scripts/check_current_release_docs.mjs +1 -1
  30. package/src-tauri/Cargo.lock +1 -1
  31. package/src-tauri/Cargo.toml +1 -1
  32. package/src-tauri/tauri.conf.json +1 -1
  33. package/static/app/asset-manifest.json +11 -11
  34. package/static/app/assets/{Act-B6c39ays.js → Act-Dd3z8AzF.js} +2 -2
  35. package/static/app/assets/Brain-BMkgdWnI.js +321 -0
  36. package/static/app/assets/Capture-D2Aw9gkv.js +1 -0
  37. package/static/app/assets/Library-Yreq-KW5.js +1 -0
  38. package/static/app/assets/System-CXNmmtEo.js +1 -0
  39. package/static/app/assets/{index-85wQvEie.css → index-7gY9t9Sd.css} +1 -1
  40. package/static/app/assets/index-CndfILiF.js +18 -0
  41. package/static/app/assets/primitives-DxsIXb6G.js +1 -0
  42. package/static/app/assets/textarea-DH7ne8VI.js +1 -0
  43. package/static/app/index.html +2 -2
  44. package/static/sw.js +1 -1
  45. package/static/app/assets/Brain-D7Qg4k6M.js +0 -321
  46. package/static/app/assets/Capture-VF_di68r.js +0 -1
  47. package/static/app/assets/Library-D_Gis2PA.js +0 -1
  48. package/static/app/assets/System-C5s5H2ov.js +0 -1
  49. package/static/app/assets/index-DJC_2oub.js +0 -18
  50. package/static/app/assets/primitives-DL4Nip8C.js +0 -1
  51. package/static/app/assets/textarea-woZfCXHy.js +0 -1
@@ -257,6 +257,78 @@ class BrainIntelligenceService:
257
257
  "generated_at": _now(),
258
258
  }
259
259
 
260
+ # ── vector freshness (v9.8.0) ────────────────────────────────────────
261
+
262
+ def vector_freshness(
263
+ self, *, user_email: Optional[str] = None, workspace_id: Optional[str] = None
264
+ ) -> Dict[str, Any]:
265
+ """Fixed-contract vector index freshness for ``/api/brain/vector-freshness``.
266
+
267
+ Always returns ``{"status": "ready"|"pending"|"unavailable",
268
+ "pending_items": int, "total_items": int, "detail": str}`` and never
269
+ raises. The vector index is store-global (not workspace-partitioned);
270
+ scope arguments are accepted for router symmetry but do not narrow
271
+ the report.
272
+ """
273
+
274
+ def _unavailable(detail: str) -> Dict[str, Any]:
275
+ return {
276
+ "status": "unavailable",
277
+ "pending_items": 0,
278
+ "total_items": 0,
279
+ "detail": detail,
280
+ }
281
+
282
+ if not self._enable_graph or self._kg is None:
283
+ return _unavailable("knowledge graph is disabled; no vector index is configured")
284
+
285
+ freshness_fn = getattr(self._kg, "vector_freshness", None)
286
+ if callable(freshness_fn):
287
+ try:
288
+ raw = freshness_fn() or {}
289
+ except Exception as exc:
290
+ LOGGER.exception("vector freshness read failed")
291
+ return _unavailable(f"vector freshness read failed: {exc}")
292
+ status = str(raw.get("status") or "unavailable")
293
+ if status == "needs_reindex":
294
+ status = "pending"
295
+ if status not in {"ready", "pending", "unavailable"}:
296
+ status = "unavailable"
297
+ return {
298
+ "status": status,
299
+ "pending_items": int(raw.get("pending_items") or 0),
300
+ "total_items": int(raw.get("total_items") or 0),
301
+ "detail": str(raw.get("detail") or ""),
302
+ }
303
+
304
+ # Older/lighter stores: summarize index_status directly.
305
+ status_fn = getattr(self._kg, "index_status", None)
306
+ if callable(status_fn):
307
+ try:
308
+ raw = status_fn() or {}
309
+ except Exception as exc:
310
+ LOGGER.exception("vector index status read failed")
311
+ return _unavailable(f"vector index status unavailable: {exc}")
312
+ pending = int(raw.get("pending_items") or 0)
313
+ total = int(raw.get("source_items") or 0)
314
+ if pending > 0:
315
+ return {
316
+ "status": "pending",
317
+ "pending_items": pending,
318
+ "total_items": total,
319
+ "detail": (
320
+ f"{pending} of {total} items are missing or stale in the vector index"
321
+ ),
322
+ }
323
+ return {
324
+ "status": "ready",
325
+ "pending_items": 0,
326
+ "total_items": total,
327
+ "detail": "vector index is up to date",
328
+ }
329
+
330
+ return _unavailable("this knowledge store does not expose a vector index")
331
+
260
332
  # ── insights digest ──────────────────────────────────────────────────
261
333
 
262
334
  def insights(
@@ -18,7 +18,7 @@ from typing import Any, Dict, List
18
18
 
19
19
  from latticeai.services.architecture_readiness import architecture_readiness
20
20
 
21
- PRODUCT_VERSION_TARGET = "9.7.0"
21
+ PRODUCT_VERSION_TARGET = "9.8.0"
22
22
 
23
23
 
24
24
  @dataclass(frozen=True)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ltcai",
3
- "version": "9.7.0",
3
+ "version": "9.8.0",
4
4
  "description": "Lattice AI — local-first Digital Brain that keeps your knowledge durable across any AI model.",
5
5
  "homepage": "https://github.com/TaeSooPark-PTS/LatticeAI#readme",
6
6
  "repository": {
@@ -6,7 +6,7 @@ const root = process.cwd();
6
6
  const pkg = JSON.parse(readFileSync(path.join(root, "package.json"), "utf8"));
7
7
  const version = pkg.version;
8
8
  const releaseDir = `output/release/v${version}`;
9
- const releaseTheme = "Proactive Hybrid Brain";
9
+ const releaseTheme = "Honest Knowledge Pipeline";
10
10
  const title = `${version} — ${releaseTheme}`;
11
11
  const escapedVersion = version.replaceAll(".", "\\.");
12
12
 
@@ -1584,7 +1584,7 @@ dependencies = [
1584
1584
 
1585
1585
  [[package]]
1586
1586
  name = "lattice-ai-desktop"
1587
- version = "9.7.0"
1587
+ version = "9.8.0"
1588
1588
  dependencies = [
1589
1589
  "plist",
1590
1590
  "serde",
@@ -1,6 +1,6 @@
1
1
  [package]
2
2
  name = "lattice-ai-desktop"
3
- version = "9.7.0"
3
+ version = "9.8.0"
4
4
  description = "Lattice AI Digital Brain desktop shell"
5
5
  authors = ["TaeSoo Park"]
6
6
  edition = "2021"
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://schema.tauri.app/config/2",
3
3
  "productName": "Lattice AI",
4
- "version": "9.7.0",
4
+ "version": "9.8.0",
5
5
  "identifier": "ai.lattice.desktop",
6
6
  "build": {
7
7
  "beforeDevCommand": "npm run frontend:dev",
@@ -1,19 +1,19 @@
1
1
  {
2
- "version": "9.7.0",
2
+ "version": "9.8.0",
3
3
  "generated_at": "vite",
4
4
  "entrypoints": {
5
- "app": "/static/app/assets/index-DJC_2oub.js"
5
+ "app": "/static/app/assets/index-CndfILiF.js"
6
6
  },
7
7
  "assets": {
8
8
  "../node_modules/@tauri-apps/api/core.js": "/static/app/assets/core-CwxXejkd.js",
9
- "_primitives-DL4Nip8C.js": "/static/app/assets/primitives-DL4Nip8C.js",
10
- "_textarea-woZfCXHy.js": "/static/app/assets/textarea-woZfCXHy.js",
11
- "index.html": "/static/app/assets/index-DJC_2oub.js",
12
- "assets/index-85wQvEie.css": "/static/app/assets/index-85wQvEie.css",
13
- "src/pages/Act.tsx": "/static/app/assets/Act-B6c39ays.js",
14
- "src/pages/Brain.tsx": "/static/app/assets/Brain-D7Qg4k6M.js",
15
- "src/pages/Capture.tsx": "/static/app/assets/Capture-VF_di68r.js",
16
- "src/pages/Library.tsx": "/static/app/assets/Library-D_Gis2PA.js",
17
- "src/pages/System.tsx": "/static/app/assets/System-C5s5H2ov.js"
9
+ "_primitives-DxsIXb6G.js": "/static/app/assets/primitives-DxsIXb6G.js",
10
+ "_textarea-DH7ne8VI.js": "/static/app/assets/textarea-DH7ne8VI.js",
11
+ "index.html": "/static/app/assets/index-CndfILiF.js",
12
+ "assets/index-7gY9t9Sd.css": "/static/app/assets/index-7gY9t9Sd.css",
13
+ "src/pages/Act.tsx": "/static/app/assets/Act-Dd3z8AzF.js",
14
+ "src/pages/Brain.tsx": "/static/app/assets/Brain-BMkgdWnI.js",
15
+ "src/pages/Capture.tsx": "/static/app/assets/Capture-D2Aw9gkv.js",
16
+ "src/pages/Library.tsx": "/static/app/assets/Library-Yreq-KW5.js",
17
+ "src/pages/System.tsx": "/static/app/assets/System-CXNmmtEo.js"
18
18
  }
19
19
  }