ltcai 9.2.0 → 9.3.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 (46) hide show
  1. package/README.md +28 -22
  2. package/docs/CHANGELOG.md +26 -0
  3. package/docs/COMMUNITY_AND_PLUGINS.md +3 -3
  4. package/docs/DEVELOPMENT.md +8 -8
  5. package/docs/LEGACY_COMPATIBILITY.md +1 -1
  6. package/docs/ONBOARDING.md +2 -2
  7. package/docs/OPERATIONS.md +1 -1
  8. package/docs/TRUST_MODEL.md +1 -1
  9. package/docs/WHY_LATTICE.md +1 -1
  10. package/docs/kg-schema.md +1 -1
  11. package/docs/mcp-tools.md +1 -1
  12. package/lattice_brain/__init__.py +1 -1
  13. package/lattice_brain/runtime/multi_agent.py +1 -1
  14. package/latticeai/__init__.py +1 -1
  15. package/latticeai/api/brain_intelligence.py +68 -0
  16. package/latticeai/app_factory.py +4 -0
  17. package/latticeai/core/legacy_compatibility.py +1 -1
  18. package/latticeai/core/marketplace.py +1 -1
  19. package/latticeai/core/workspace_os.py +1 -1
  20. package/latticeai/runtime/chat_wiring.py +2 -0
  21. package/latticeai/runtime/persistence_runtime.py +7 -0
  22. package/latticeai/runtime/router_registration.py +16 -0
  23. package/latticeai/services/architecture_readiness.py +1 -1
  24. package/latticeai/services/brain_intelligence.py +439 -0
  25. package/latticeai/services/memory_service.py +65 -5
  26. package/latticeai/services/product_readiness.py +1 -1
  27. package/latticeai/services/router_context.py +1 -0
  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-C3dBrWE-.js → Act-ls57ctKH.js} +1 -1
  35. package/static/app/assets/{Brain-DBYgdcjt.js → Brain-Jd3V4Obm.js} +1 -1
  36. package/static/app/assets/{Capture-Cf3hqRtN.js → Capture-DLj9Uzed.js} +1 -1
  37. package/static/app/assets/{Library-CFfkNn3s.js → Library-dPbez7Tc.js} +1 -1
  38. package/static/app/assets/{System-BOurbT-v.js → System-CkROWBuq.js} +1 -1
  39. package/static/app/assets/index-BRUqy2zk.css +2 -0
  40. package/static/app/assets/index-CAlo2Lm-.js +17 -0
  41. package/static/app/assets/{primitives-DcUUmhdC.js → primitives-DrwaJ7dy.js} +1 -1
  42. package/static/app/assets/{textarea-BklR6zN4.js → textarea-DNvCwmmK.js} +1 -1
  43. package/static/app/index.html +2 -2
  44. package/static/sw.js +1 -1
  45. package/static/app/assets/index-A3M9sElj.js +0 -17
  46. package/static/app/assets/index-Bmx9rzTc.css +0 -2
package/README.md CHANGED
@@ -1,10 +1,15 @@
1
1
  # Lattice AI
2
2
 
3
- **Lattice AI 9.2.0 is the local-first Digital Brain platform. Model-Agnostic File Generation makes "create a file" work reliably with any loaded LLM: file requests run through a strict extension-aware prompt, robust extraction, per-type validation, one corrective retry, and a deterministic repair fallback, so even small local models (gemma/qwen class) always produce a structurally valid HTML, JSON, or code file.**
3
+ **Lattice AI 9.3.0 is the local-first Digital Brain platform. Proactive Brain Intelligence turns the Brain from a passive store into an active steward of its own knowledge: it scores its health across freshness, connectivity, search readiness, and consistency, surfaces contradictions and stale knowledge, proposes consent-first duplicate consolidation, and upgrades recall to hybrid lexical+semantic evidence.**
4
4
 
5
5
  **Lattice AI는 모델이 바뀌어도 내 지식과 맥락을 보존하는 로컬 우선 AI 브레인입니다.**
6
6
 
7
- > The 9.2.0 release hardens file creation end to end: chat file requests are
7
+ > The 9.3.0 release wires the previously dormant Brain quality layer into
8
+ > the product: /api/brain health diagnosis with recommended care actions, a
9
+ > proactive insights digest, contradiction surfacing across memories and the
10
+ > graph, dry-run-first duplicate consolidation, and hybrid recall that blends
11
+ > vector similarity with lexical evidence behind an honest quality gate.
12
+ > The 9.2.0 release hardened file creation end to end: chat file requests are
8
13
  > routed to a deterministic direct-write path (including type-only requests
9
14
  > like "html 파일 만들어줘"), model replies are treated as untrusted content
10
15
  > and cleaned of fences, reasoning blocks, and chat framing, and the agent
@@ -92,10 +97,10 @@ You need Lattice AI when:
92
97
  The screenshots below are the latest checked-in visual evidence captures. They
93
98
  keep the first-run Brain flow, memory graph, source capture, model library,
94
99
  system view, admin console, and review center visible as release gates while
95
- 9.2.0 makes file generation model-agnostic: chat file requests always end in
96
- a structurally valid file regardless of which LLM is loaded, backed by
97
- extraction, validation, corrective retry, and deterministic repair. The
98
- captures below are the checked-in 9.2.0 visual release evidence for that
100
+ 9.3.0 makes the Brain proactively intelligent: it diagnoses its own health,
101
+ surfaces contradictions and stale knowledge, proposes consent-first
102
+ consolidation, and recalls with hybrid lexical+semantic evidence. The
103
+ captures below are the checked-in 9.3.0 visual release evidence for that
99
104
  product flow.
100
105
 
101
106
  ### 1. Wake Brain
@@ -108,21 +113,21 @@ confirm owner, check the computer, choose the Brain voice.
108
113
  Choose the owner of the Brain. The profile is not a SaaS account by default; it
109
114
  is the local identity for the knowledge you keep.
110
115
 
111
- ![Login](output/release/v9.2.0/screenshots/01-login.png)
116
+ ![Login](output/release/v9.3.0/screenshots/01-login.png)
112
117
 
113
118
  ### 3. Recommended Models
114
119
 
115
120
  Start with a short list: safest recommendation, faster model, stronger model.
116
121
  Advanced details stay available without overwhelming first-time users.
117
122
 
118
- ![Recommended Models](output/release/v9.2.0/screenshots/02-recommended-models.png)
123
+ ![Recommended Models](output/release/v9.3.0/screenshots/02-recommended-models.png)
119
124
 
120
125
  ### 4. Install And Load
121
126
 
122
127
  Download and load only after consent. Lattice explains model size, local
123
128
  execution, and network use before work starts.
124
129
 
125
- ![Install and Load](output/release/v9.2.0/screenshots/03-install-load-progress.png)
130
+ ![Install and Load](output/release/v9.3.0/screenshots/03-install-load-progress.png)
126
131
 
127
132
  ### 5. Brain Chat
128
133
 
@@ -134,14 +139,14 @@ and its visible life signal follow real listening, recall, synthesis, and action
134
139
  state. Detailed memory rings, provenance, conversation history, and
135
140
  model/runtime proof open as overlays only when requested.
136
141
 
137
- ![One-viewport Living Brain Home](output/release/v9.2.0/screenshots/04-brain-chat-home.png)
142
+ ![One-viewport Living Brain Home](output/release/v9.3.0/screenshots/04-brain-chat-home.png)
138
143
 
139
144
  ### 6. Review Center
140
145
 
141
146
  Automation results are staged for review before they become durable decisions.
142
147
  Snooze, unsnooze, run now, approve, and dismiss actions stay explicit.
143
148
 
144
- ![Review Center](output/release/v9.2.0/screenshots/12-review-center.png)
149
+ ![Review Center](output/release/v9.3.0/screenshots/12-review-center.png)
145
150
 
146
151
  ## Brain Depths
147
152
 
@@ -157,10 +162,10 @@ The user travels inward from everyday memory to deeper structure:
157
162
 
158
163
  Walkthrough:
159
164
 
160
- ![v9.2.0 Living Brain walkthrough](output/release/v9.2.0/gifs/v9.2.0-living-brain-walkthrough.gif)
165
+ ![v9.3.0 Living Brain walkthrough](output/release/v9.3.0/gifs/v9.3.0-living-brain-walkthrough.gif)
161
166
 
162
167
  Screenshot index and capture notes:
163
- [output/release/v9.2.0/SCREENSHOT_INDEX.md](output/release/v9.2.0/SCREENSHOT_INDEX.md)
168
+ [output/release/v9.3.0/SCREENSHOT_INDEX.md](output/release/v9.3.0/SCREENSHOT_INDEX.md)
164
169
 
165
170
  ## Install
166
171
 
@@ -245,7 +250,7 @@ See [docs/DEVELOPMENT.md](docs/DEVELOPMENT.md) for developer workflow details.
245
250
 
246
251
  ## Current Release
247
252
 
248
- The current release is **9.2.0 — Model-Agnostic File Generation**:
253
+ The current release is **9.3.0 — Proactive Brain Intelligence**:
249
254
 
250
255
  - A new `latticeai.core.file_generation` pipeline treats every model reply as
251
256
  untrusted content: extension-aware strict prompting, extraction of the real
@@ -264,24 +269,24 @@ The current release is **9.2.0 — Model-Agnostic File Generation**:
264
269
  - File writes report whether content was generated cleanly, retried, or
265
270
  auto-repaired in the response payload (`generation` metadata).
266
271
 
267
- Expected artifacts for 9.2.0 release must use exact filenames:
272
+ Expected artifacts for 9.3.0 release must use exact filenames:
268
273
 
269
- - `dist/ltcai-9.2.0-py3-none-any.whl`
270
- - `dist/ltcai-9.2.0.tar.gz`
271
- - `ltcai-9.2.0.tgz`
272
- - `dist/ltcai-9.2.0.vsix`
273
- - `src-tauri/target/release/bundle/dmg/Lattice AI_9.2.0_aarch64.dmg`
274
+ - `dist/ltcai-9.3.0-py3-none-any.whl`
275
+ - `dist/ltcai-9.3.0.tar.gz`
276
+ - `ltcai-9.3.0.tgz`
277
+ - `dist/ltcai-9.3.0.vsix`
278
+ - `src-tauri/target/release/bundle/dmg/Lattice AI_9.3.0_aarch64.dmg`
274
279
 
275
280
  Do not use wildcard artifact uploads. Package registry publishing remains owner-run.
276
281
 
277
282
  See [docs/ROADMAP_RECOMMENDATIONS.md](docs/ROADMAP_RECOMMENDATIONS.md) for the
278
- strategic roadmap slices applied through 9.2.0 and the follow-up tracks.
283
+ strategic roadmap slices applied through 9.3.0 and the follow-up tracks.
279
284
 
280
285
  ## Known Limitations
281
286
 
282
287
  - External package registries are owner-published and can lag behind GitHub.
283
288
  - PostgreSQL/pgvector is optional scale/migration tooling. SQLite remains the
284
- live local Brain store in 9.2.0.
289
+ live local Brain store in 9.3.0.
285
290
  - Docker, model downloads, cloud model calls, Telegram, Brain Network, and update
286
291
  checks require explicit user action.
287
292
  - Conversation does not fabricate answers when no model is loaded.
@@ -293,6 +298,7 @@ strategic roadmap slices applied through 9.2.0 and the follow-up tracks.
293
298
 
294
299
  | Version | Theme |
295
300
  | --- | --- |
301
+ | 9.3.0 | Proactive Brain Intelligence: the Brain diagnoses its own health, surfaces contradictions and stale knowledge, proposes consent-first duplicate consolidation, and recalls with hybrid lexical+semantic evidence behind an honest quality gate |
296
302
  | 9.2.0 | Model-Agnostic File Generation: chat file requests always produce structurally valid files with any LLM via extraction, per-type validation, corrective retry, deterministic repair, inferred file targets, and a fault-tolerant agent JSON loop |
297
303
  | 9.1.0 | Code Review Completion & Fail-Closed Runtime: all July 11 review findings closed across fail-closed security, typed runtime/model/chat boundaries, honest frontend failures and tests, and repository hygiene |
298
304
  | 9.0.0 | Code Review Closure & Runtime Cleanup: July 8 code-review follow-ups fixed, chat/runtime reliability improved, duplicated utility surfaces consolidated, runtime audit append paths moved to JSONL, and release metadata/artifacts synchronized |
package/docs/CHANGELOG.md CHANGED
@@ -4,6 +4,32 @@ The top entry is either the current unreleased main-branch work or the current
4
4
  release line. Older entries are historical and may describe behavior as it
5
5
  existed at that release.
6
6
 
7
+ ## [9.3.0] - 2026-07-20
8
+
9
+ ### Added
10
+ - Added `latticeai/services/brain_intelligence.py` and the `/api/brain/*`
11
+ router: health diagnosis (freshness/connectivity/search-readiness/
12
+ consistency scores with recommended care actions), proactive insights
13
+ digest, contradiction surfacing (memory pairs, temporal, CONTRADICTS
14
+ edges), and consent-first duplicate consolidation (dry-run default,
15
+ audited memory prune on apply, graph never mutated).
16
+ - Wired the previously dormant `lattice_brain.quality` layer
17
+ (MemoryQualityManager, GraphEdgeQualityManager) into the product.
18
+ - Added the "Brain intelligence check" panel to the Brain surface with full
19
+ ko/en localization, plus `latticeApi` client methods for the new endpoints.
20
+ - Added `tests/unit/test_brain_intelligence.py` (14 tests).
21
+
22
+ ### Changed
23
+ - `/api/memory/recall` is now hybrid: vector similarity blends with lexical
24
+ term evidence behind a `hybrid-evidence/v2` quality gate; results carry
25
+ `vector_score` and `evidence_kinds`; vector matches are workspace-scoped
26
+ via `filter_scoped_nodes` before they can influence rankings.
27
+
28
+ ### Fixed
29
+ - Recall no longer misses knowledge phrased differently from the query when
30
+ the vector index is available; vector-tier failures degrade recall to
31
+ lexical with the error surfaced instead of breaking the endpoint.
32
+
7
33
  ## [9.2.0] - 2026-07-20
8
34
 
9
35
  ### Added
@@ -1,13 +1,13 @@
1
1
  # Community And Plugins
2
2
 
3
- Current release: **9.2.0 — Model-Agnostic File Generation**.
3
+ Current release: **9.3.0 — Proactive Brain Intelligence**.
4
4
 
5
5
  LatticeAI defines the path from a strong local-first framework (8.4.0
6
6
  action-aware baseline, 8.5.0 registry+DI hardening, 8.6.0 capture/navigation
7
7
  reliability, 8.7.0 runtime-state hygiene, 8.8.0 Brain Core extraction
8
8
  readiness, 8.9.0 scoped Tool API hardening, 9.0.0 cleanup closure, 9.1.0
9
- fail-closed review completion, and 9.2.0 model-agnostic file generation) to a
10
- product ecosystem. The
9
+ fail-closed review completion, 9.2.0 model-agnostic file generation, and
10
+ 9.3.0 proactive Brain intelligence) to a product ecosystem. The
11
11
  immediate goal is small and practical: make it clear how
12
12
  contributors can extend the Brain without weakening local-first trust,
13
13
  workspace scoping, or release quality.
@@ -1,10 +1,10 @@
1
1
  # Lattice AI Development
2
2
 
3
- Current release: **9.2.0 — Model-Agnostic File Generation**.
3
+ Current release: **9.3.0 — Proactive Brain Intelligence**.
4
4
 
5
5
  This document is for contributors working on the local-first Digital Brain
6
6
  codebase. Product positioning and quick start stay in `README.md`; release
7
- history is intentionally limited to 8.0.0-9.2.0 in `docs/CHANGELOG.md` and
7
+ history is intentionally limited to 8.0.0-9.3.0 in `docs/CHANGELOG.md` and
8
8
  `RELEASE.md`.
9
9
 
10
10
  ## Product Contract
@@ -153,10 +153,10 @@ For user-facing, API, runtime, release, or packaging changes, check:
153
153
  Release/publish examples must use exact target-version filenames. Do not
154
154
  document wildcard artifact upload commands.
155
155
 
156
- For 9.2.0 release work, exact artifacts are:
156
+ For 9.3.0 release work, exact artifacts are:
157
157
 
158
- - `dist/ltcai-9.2.0-py3-none-any.whl`
159
- - `dist/ltcai-9.2.0.tar.gz`
160
- - `ltcai-9.2.0.tgz`
161
- - `dist/ltcai-9.2.0.vsix`
162
- - `src-tauri/target/release/bundle/dmg/Lattice AI_9.2.0_aarch64.dmg`
158
+ - `dist/ltcai-9.3.0-py3-none-any.whl`
159
+ - `dist/ltcai-9.3.0.tar.gz`
160
+ - `ltcai-9.3.0.tgz`
161
+ - `dist/ltcai-9.3.0.vsix`
162
+ - `src-tauri/target/release/bundle/dmg/Lattice AI_9.3.0_aarch64.dmg`
@@ -1,6 +1,6 @@
1
1
  # Legacy Compatibility Map
2
2
 
3
- Current target: **9.2.0 — Model-Agnostic File Generation**.
3
+ Current target: **9.3.0 — Proactive Brain Intelligence**.
4
4
 
5
5
  Lattice AI is moving toward a smaller, modular architecture centered on
6
6
  `lattice_brain`, `latticeai.services`, `latticeai.api`, and `latticeai.runtime`.
@@ -1,6 +1,6 @@
1
1
  # Lattice AI Onboarding
2
2
 
3
- Current release: **9.2.0 — Model-Agnostic File Generation**.
3
+ Current release: **9.3.0 — Proactive Brain Intelligence**.
4
4
 
5
5
  The first-run goal is a five-minute path from "I opened the app" to "my Brain
6
6
  has a source, a question, and proof." This page is the product contract behind
@@ -40,7 +40,7 @@ read the docs first.
40
40
 
41
41
  ## Release Gate
42
42
 
43
- 9.2.0 treats onboarding as a release gate, not marketing copy. The current
43
+ 9.3.0 treats onboarding as a release gate, not marketing copy. The current
44
44
  machine-checkable product readiness report requires this five-minute contract,
45
45
  the Brain Home surface, setup helpers, graph ingestion tests, and exact release
46
46
  artifact documentation before the release can be called complete.
@@ -1,4 +1,4 @@
1
- # Lattice AI — Operations Guide (v9.2.0)
1
+ # Lattice AI — Operations Guide (v9.3.0)
2
2
 
3
3
  ## 1. 데이터 파일 위치
4
4
 
@@ -1,6 +1,6 @@
1
1
  # Lattice AI Trust Model
2
2
 
3
- Current release: **9.2.0 — Model-Agnostic File Generation**.
3
+ Current release: **9.3.0 — Proactive Brain Intelligence**.
4
4
 
5
5
  Lattice AI is local-first, explicit about external communication, and honest
6
6
  when a capability is unavailable.
@@ -1,6 +1,6 @@
1
1
  # Why Lattice AI Exists
2
2
 
3
- Current release: **9.2.0 — Model-Agnostic File Generation**.
3
+ Current release: **9.3.0 — Proactive Brain Intelligence**.
4
4
 
5
5
  **Lattice AI is a local-first Digital Brain that keeps your knowledge durable
6
6
  across any AI model.**
package/docs/kg-schema.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Knowledge Graph Schema
2
2
 
3
- Current release: **9.2.0 — Model-Agnostic File Generation**.
3
+ Current release: **9.3.0 — Proactive Brain Intelligence**.
4
4
 
5
5
  명세 출처: `lattice_ai_full_spec.pptx` 슬라이드 20·21·22
6
6
  구현: `kg_schema.py`
package/docs/mcp-tools.md CHANGED
@@ -1,4 +1,4 @@
1
- # MCP 도구 카탈로그 (v9.2.0)
1
+ # MCP 도구 카탈로그 (v9.3.0)
2
2
 
3
3
  Lattice AI는 MCP(Model Context Protocol) 서버로 동작하여 Claude Desktop, Cursor 등에서 직접 도구를 사용할 수 있습니다.
4
4
 
@@ -26,7 +26,7 @@ from .storage import (
26
26
  storage_from_env,
27
27
  )
28
28
 
29
- __version__ = "9.2.0"
29
+ __version__ = "9.3.0"
30
30
 
31
31
  __all__ = [
32
32
  "AgentRuntime",
@@ -21,7 +21,7 @@ from .contracts import multi_agent_contract
21
21
  from ..utils import now_iso as _now
22
22
 
23
23
 
24
- MULTI_AGENT_VERSION = "9.2.0"
24
+ MULTI_AGENT_VERSION = "9.3.0"
25
25
 
26
26
  AGENT_ROLES = ("researcher", "planner", "executor", "reviewer", "release")
27
27
  CORE_PIPELINE = ("planner", "executor", "reviewer")
@@ -1,3 +1,3 @@
1
1
  """Lattice AI - modular server package."""
2
2
 
3
- __version__ = "9.2.0"
3
+ __version__ = "9.3.0"
@@ -0,0 +1,68 @@
1
+ """Proactive Brain Intelligence API router (v9.3.0).
2
+
3
+ Exposes :class:`~latticeai.services.brain_intelligence.BrainIntelligenceService`:
4
+ health diagnosis, proactive insights, contradiction surfacing, and consent-first
5
+ consolidation. Read endpoints use the workspace read gate; consolidation with
6
+ ``apply=true`` is a write and is audited.
7
+ """
8
+
9
+ from __future__ import annotations
10
+
11
+ from typing import Callable, Optional
12
+
13
+ from fastapi import APIRouter, Request
14
+ from pydantic import BaseModel
15
+
16
+ from latticeai.services.brain_intelligence import BrainIntelligenceService
17
+
18
+
19
+ class ConsolidateRequest(BaseModel):
20
+ apply: bool = False
21
+
22
+
23
+ def create_brain_intelligence_router(
24
+ *,
25
+ service: BrainIntelligenceService,
26
+ require_user: Callable[[Request], str],
27
+ gate_read: Callable[[Request], Optional[str]],
28
+ gate_write: Callable[[Request], Optional[str]],
29
+ append_audit_event: Callable[..., None],
30
+ ) -> APIRouter:
31
+ router = APIRouter()
32
+
33
+ @router.get("/api/brain/health")
34
+ async def brain_health(request: Request):
35
+ user = require_user(request)
36
+ scope = gate_read(request)
37
+ return service.health_report(user_email=user, workspace_id=scope)
38
+
39
+ @router.get("/api/brain/insights")
40
+ async def brain_insights(request: Request):
41
+ user = require_user(request)
42
+ scope = gate_read(request)
43
+ return service.insights(user_email=user, workspace_id=scope)
44
+
45
+ @router.get("/api/brain/contradictions")
46
+ async def brain_contradictions(request: Request):
47
+ user = require_user(request)
48
+ scope = gate_read(request)
49
+ return service.contradictions(user_email=user, workspace_id=scope)
50
+
51
+ @router.post("/api/brain/consolidate")
52
+ async def brain_consolidate(req: ConsolidateRequest, request: Request):
53
+ user = require_user(request)
54
+ scope = gate_write(request) if req.apply else gate_read(request)
55
+ result = service.consolidate(apply=req.apply, user_email=user, workspace_id=scope)
56
+ append_audit_event(
57
+ "brain_consolidate",
58
+ user_email=user,
59
+ mode=result.get("mode"),
60
+ duplicate_memories=result.get("duplicate_memory_count", 0),
61
+ pruned=result.get("pruned", 0),
62
+ )
63
+ return result
64
+
65
+ return router
66
+
67
+
68
+ __all__ = ["create_brain_intelligence_router"]
@@ -165,6 +165,7 @@ def _build(config: "Optional[Config]" = None) -> Dict[str, Any]:
165
165
  from latticeai.api.hooks import create_hooks_router
166
166
  from latticeai.core.product_hardening import build_product_hardening_status
167
167
  from latticeai.api.agent_registry import create_agent_registry_router
168
+ from latticeai.api.brain_intelligence import create_brain_intelligence_router
168
169
  from latticeai.api.memory import create_memory_router
169
170
  from latticeai.api.browser import create_browser_router
170
171
  from latticeai.api.portability import create_portability_router
@@ -383,6 +384,7 @@ def _build(config: "Optional[Config]" = None) -> Dict[str, Any]:
383
384
  TEMPLATE_CATALOG = _persistence_runtime["TEMPLATE_CATALOG"]
384
385
  AGENT_REGISTRY = _persistence_runtime["AGENT_REGISTRY"]
385
386
  MEMORY_SERVICE = _persistence_runtime["MEMORY_SERVICE"]
387
+ BRAIN_INTELLIGENCE = _persistence_runtime["BRAIN_INTELLIGENCE"]
386
388
  INGESTION_PIPELINE = _persistence_runtime["INGESTION_PIPELINE"]
387
389
  DEVICE_IDENTITY = _persistence_runtime["DEVICE_IDENTITY"]
388
390
  KG_PORTABILITY = _persistence_runtime["KG_PORTABILITY"]
@@ -1114,6 +1116,7 @@ def _build(config: "Optional[Config]" = None) -> Dict[str, Any]:
1114
1116
  memory_service=MEMORY_SERVICE,
1115
1117
  platform=PLATFORM,
1116
1118
  active_model_getter=lambda: router.current_model_id or "",
1119
+ brain_intelligence=BRAIN_INTELLIGENCE,
1117
1120
  )
1118
1121
  register_interaction_routers(
1119
1122
  app,
@@ -1124,6 +1127,7 @@ def _build(config: "Optional[Config]" = None) -> Dict[str, Any]:
1124
1127
  create_hooks_router=create_hooks_router,
1125
1128
  create_agent_registry_router=create_agent_registry_router,
1126
1129
  create_memory_router=create_memory_router,
1130
+ create_brain_intelligence_router=create_brain_intelligence_router,
1127
1131
  )
1128
1132
 
1129
1133
  from latticeai.api.review_queue import create_review_queue_router
@@ -14,7 +14,7 @@ from pathlib import Path
14
14
  from typing import Any, Dict, List
15
15
 
16
16
 
17
- LEGACY_COMPATIBILITY_VERSION = "9.2.0"
17
+ LEGACY_COMPATIBILITY_VERSION = "9.3.0"
18
18
 
19
19
 
20
20
  @dataclass(frozen=True)
@@ -11,7 +11,7 @@ from copy import deepcopy
11
11
  from typing import Any, Dict, List, Optional
12
12
 
13
13
 
14
- MARKETPLACE_VERSION = "9.2.0"
14
+ MARKETPLACE_VERSION = "9.3.0"
15
15
  TEMPLATE_KINDS = ("plugin", "workflow", "agent", "ingestion_bridge")
16
16
 
17
17
 
@@ -49,7 +49,7 @@ __all__ = [
49
49
  "remove_skill_directory",
50
50
  ]
51
51
 
52
- WORKSPACE_OS_VERSION = "9.2.0"
52
+ WORKSPACE_OS_VERSION = "9.3.0"
53
53
 
54
54
  # Workspace types separate single-user Personal workspaces from shared
55
55
  # Organization workspaces. Both keep the same local-first JSON store; the type
@@ -65,6 +65,7 @@ def build_interaction_contexts(
65
65
  memory_service: Any,
66
66
  platform: Any,
67
67
  active_model_getter: Any = None,
68
+ brain_intelligence: Any = None,
68
69
  ) -> tuple[ToolRouterContext, InteractionRouterContext]:
69
70
  tool_router_context = ToolRouterContext(
70
71
  config=config,
@@ -105,6 +106,7 @@ def build_interaction_contexts(
105
106
  memory_service=memory_service,
106
107
  platform=platform,
107
108
  active_model_getter=active_model_getter,
109
+ brain_intelligence=brain_intelligence,
108
110
  )
109
111
  return tool_router_context, interaction_router_context
110
112
 
@@ -36,6 +36,7 @@ def build_persistence_runtime(
36
36
  from latticeai.core.plugins import PluginRegistry
37
37
  from latticeai.core.realtime import RealtimeBus
38
38
  from latticeai.core.workspace_os import WorkspaceOSStore
39
+ from latticeai.services.brain_intelligence import BrainIntelligenceService
39
40
  from latticeai.services.memory_service import MemoryService
40
41
  from latticeai.services.workspace_service import WorkspaceService
41
42
 
@@ -57,6 +58,11 @@ def build_persistence_runtime(
57
58
  history_file=history_file,
58
59
  conversation_store=conversations,
59
60
  )
61
+ brain_intelligence = BrainIntelligenceService(
62
+ knowledge_graph=knowledge_graph,
63
+ memory_service=memory_service,
64
+ enable_graph=enable_graph,
65
+ )
60
66
  ingestion_pipeline = IngestionPipeline(
61
67
  knowledge_graph,
62
68
  hooks=hooks_registry,
@@ -81,6 +87,7 @@ def build_persistence_runtime(
81
87
  "TEMPLATE_CATALOG": template_catalog,
82
88
  "AGENT_REGISTRY": agent_registry,
83
89
  "MEMORY_SERVICE": memory_service,
90
+ "BRAIN_INTELLIGENCE": brain_intelligence,
84
91
  "INGESTION_PIPELINE": ingestion_pipeline,
85
92
  "DEVICE_IDENTITY": device_identity,
86
93
  "KG_PORTABILITY": kg_portability,
@@ -485,6 +485,8 @@ def register_interaction_routers(
485
485
  memory_service: Any = None,
486
486
  platform: Any = None,
487
487
  active_model_getter: Any = None,
488
+ create_brain_intelligence_router: Any = None,
489
+ brain_intelligence: Any = None,
488
490
  ) -> tuple[Any, ...]:
489
491
  """Register chat/search/tools/hooks/registry/memory routes in order."""
490
492
 
@@ -504,6 +506,7 @@ def register_interaction_routers(
504
506
  memory_service = interaction_context.memory_service
505
507
  platform = interaction_context.platform
506
508
  active_model_getter = interaction_context.active_model_getter
509
+ brain_intelligence = interaction_context.brain_intelligence
507
510
 
508
511
  return register_routers(
509
512
  app,
@@ -561,6 +564,19 @@ def register_interaction_routers(
561
564
  append_audit_event=append_audit_event,
562
565
  active_model_getter=active_model_getter,
563
566
  ),
567
+ *(
568
+ (
569
+ create_brain_intelligence_router(
570
+ service=brain_intelligence,
571
+ require_user=require_user,
572
+ gate_read=platform.gate_read,
573
+ gate_write=platform.gate_write,
574
+ append_audit_event=append_audit_event,
575
+ ),
576
+ )
577
+ if create_brain_intelligence_router is not None and brain_intelligence is not None
578
+ else ()
579
+ ),
564
580
  )
565
581
 
566
582
 
@@ -17,7 +17,7 @@ from typing import Any, Dict, List
17
17
  from latticeai.core.legacy_compatibility import legacy_shim_report
18
18
 
19
19
 
20
- ARCHITECTURE_VERSION_TARGET = "9.2.0"
20
+ ARCHITECTURE_VERSION_TARGET = "9.3.0"
21
21
 
22
22
  PREFERRED_REFACTORING_ORDER = [
23
23
  "agent-runtime",