ltcai 6.4.0 → 6.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 +29 -28
- package/docs/CHANGELOG.md +28 -0
- package/frontend/src/api/client.ts +1 -0
- package/frontend/src/features/brain/BrainConversation.tsx +12 -3
- package/frontend/src/features/brain/BrainHome.tsx +21 -1
- package/frontend/src/features/brain/BrainMemoryLayer.tsx +8 -1
- package/frontend/src/features/brain/BrainOverviewPanel.tsx +15 -1
- package/frontend/src/features/brain/brainData.ts +72 -1
- package/frontend/src/features/brain/types.ts +15 -0
- package/frontend/src/i18n.ts +22 -0
- package/frontend/src/styles.css +128 -0
- package/lattice_brain/__init__.py +1 -1
- package/lattice_brain/runtime/multi_agent.py +1 -1
- package/latticeai/__init__.py +1 -1
- package/latticeai/api/memory.py +6 -0
- package/latticeai/core/marketplace.py +1 -1
- package/latticeai/core/workspace_os.py +1 -1
- package/latticeai/services/memory_service.py +66 -0
- package/package.json +1 -1
- package/src-tauri/Cargo.lock +1 -1
- package/src-tauri/Cargo.toml +1 -1
- package/src-tauri/tauri.conf.json +1 -1
- package/static/app/asset-manifest.json +5 -5
- package/static/app/assets/index-C1J_1441.js +16 -0
- package/static/app/assets/index-C1J_1441.js.map +1 -0
- package/static/app/assets/{index-Div5vMlq.css → index-CdCVz_i4.css} +1 -1
- package/static/app/index.html +2 -2
- package/static/app/assets/index-t1jx1BR9.js +0 -16
- package/static/app/assets/index-t1jx1BR9.js.map +0 -1
|
@@ -19,7 +19,7 @@ from datetime import datetime
|
|
|
19
19
|
from typing import Any, Callable, Dict, List, Optional
|
|
20
20
|
|
|
21
21
|
|
|
22
|
-
MULTI_AGENT_VERSION = "6.
|
|
22
|
+
MULTI_AGENT_VERSION = "6.5.0"
|
|
23
23
|
|
|
24
24
|
AGENT_ROLES = ("researcher", "planner", "executor", "reviewer", "release")
|
|
25
25
|
CORE_PIPELINE = ("planner", "executor", "reviewer")
|
package/latticeai/__init__.py
CHANGED
package/latticeai/api/memory.py
CHANGED
|
@@ -51,6 +51,12 @@ def create_memory_router(
|
|
|
51
51
|
scope = gate_read(request)
|
|
52
52
|
return service.manager(user_email=user, workspace_id=scope)
|
|
53
53
|
|
|
54
|
+
@router.get("/api/memory/brain-quality")
|
|
55
|
+
async def brain_quality_summary(request: Request):
|
|
56
|
+
user = require_user(request)
|
|
57
|
+
scope = gate_read(request)
|
|
58
|
+
return service.brain_quality_summary(user_email=user, workspace_id=scope)
|
|
59
|
+
|
|
54
60
|
@router.get("/api/memory/tiers")
|
|
55
61
|
async def memory_tiers(request: Request):
|
|
56
62
|
require_user(request)
|
|
@@ -19,7 +19,7 @@ from pathlib import Path
|
|
|
19
19
|
from typing import Any, Callable, Dict, Iterable, List, Optional
|
|
20
20
|
|
|
21
21
|
|
|
22
|
-
WORKSPACE_OS_VERSION = "6.
|
|
22
|
+
WORKSPACE_OS_VERSION = "6.5.0"
|
|
23
23
|
|
|
24
24
|
# Workspace types separate single-user Personal workspaces from shared
|
|
25
25
|
# Organization workspaces. Both keep the same local-first JSON store; the type
|
|
@@ -132,6 +132,60 @@ class MemoryService:
|
|
|
132
132
|
return None
|
|
133
133
|
|
|
134
134
|
# ── Memory Manager: sources / usage / health ──────────────────────────
|
|
135
|
+
def _brain_readiness(
|
|
136
|
+
self,
|
|
137
|
+
*,
|
|
138
|
+
memory_count: int,
|
|
139
|
+
concept_count: Optional[int],
|
|
140
|
+
relationship_count: Optional[int],
|
|
141
|
+
healthy_sources: int,
|
|
142
|
+
) -> Dict[str, Any]:
|
|
143
|
+
"""Summarize how ready the user's Brain is for the product UI.
|
|
144
|
+
|
|
145
|
+
The frontend should render this signal instead of re-deriving it from
|
|
146
|
+
UI fragments. Keeping it here makes the score auditable and keeps the
|
|
147
|
+
Memory Manager as the single owner of cross-tier Brain growth signals.
|
|
148
|
+
"""
|
|
149
|
+
concepts = max(0, int(concept_count or 0))
|
|
150
|
+
relationships = max(0, int(relationship_count or 0))
|
|
151
|
+
memories = max(0, int(memory_count or 0))
|
|
152
|
+
healthy = max(0, int(healthy_sources or 0))
|
|
153
|
+
score = min(100, round(memories * 12 + concepts * 8 + relationships * 4 + healthy * 3))
|
|
154
|
+
|
|
155
|
+
if memories < 1 and concepts < 1:
|
|
156
|
+
state = "quiet"
|
|
157
|
+
depth = 2
|
|
158
|
+
title_key = "brain.readiness.quiet"
|
|
159
|
+
action_key = "brain.readiness.start"
|
|
160
|
+
score = max(12, score)
|
|
161
|
+
elif concepts < 3 or relationships < 2:
|
|
162
|
+
state = "forming"
|
|
163
|
+
depth = 3 if concepts < 3 else 4
|
|
164
|
+
title_key = "brain.readiness.forming"
|
|
165
|
+
action_key = "brain.readiness.grow"
|
|
166
|
+
score = max(38, score)
|
|
167
|
+
else:
|
|
168
|
+
state = "alive"
|
|
169
|
+
depth = 5
|
|
170
|
+
title_key = "brain.readiness.alive"
|
|
171
|
+
action_key = "brain.readiness.map"
|
|
172
|
+
score = max(72, score)
|
|
173
|
+
|
|
174
|
+
return {
|
|
175
|
+
"score": score,
|
|
176
|
+
"state": state,
|
|
177
|
+
"depth": depth,
|
|
178
|
+
"title_key": title_key,
|
|
179
|
+
"action_key": action_key,
|
|
180
|
+
"signals": {
|
|
181
|
+
"memory_count": memories,
|
|
182
|
+
"concept_count": concepts,
|
|
183
|
+
"relationship_count": relationships,
|
|
184
|
+
"healthy_sources": healthy,
|
|
185
|
+
},
|
|
186
|
+
"source": "memory_service",
|
|
187
|
+
}
|
|
188
|
+
|
|
135
189
|
def manager(self, *, user_email: Optional[str] = None, workspace_id: Optional[str] = None) -> Dict[str, Any]:
|
|
136
190
|
ws_mem = self._workspace_memories(user_email=user_email, workspace_id=workspace_id or "personal")
|
|
137
191
|
if workspace_id is None:
|
|
@@ -198,15 +252,27 @@ class MemoryService:
|
|
|
198
252
|
total_bytes = ws_bytes + kg_bytes + conv_bytes
|
|
199
253
|
healthy = sum(1 for s in sources if s["health"] == "ok")
|
|
200
254
|
overall = "ok" if healthy >= 4 else "degraded" if healthy >= 1 else "unavailable"
|
|
255
|
+
memory_ids = {m.get("id") for m in [*ws_mem, *project_mem] if m.get("id")}
|
|
256
|
+
memory_count = len(memory_ids) + len(snaps) + len(convs)
|
|
201
257
|
return {
|
|
202
258
|
"sources": sources,
|
|
203
259
|
"tiers": list(TIERS),
|
|
204
260
|
"usage": {"total_items": total_items, "total_bytes": total_bytes, "sources": len(sources)},
|
|
261
|
+
"brain_readiness": self._brain_readiness(
|
|
262
|
+
memory_count=memory_count,
|
|
263
|
+
concept_count=node_total,
|
|
264
|
+
relationship_count=edge_total,
|
|
265
|
+
healthy_sources=healthy,
|
|
266
|
+
),
|
|
205
267
|
"health": overall,
|
|
206
268
|
"graph_enabled": self._enable_graph,
|
|
207
269
|
"generated_at": _now(),
|
|
208
270
|
}
|
|
209
271
|
|
|
272
|
+
def brain_quality_summary(self, *, user_email: Optional[str] = None, workspace_id: Optional[str] = None) -> Dict[str, Any]:
|
|
273
|
+
"""Return the backend-owned Brain readiness signal for API consumers."""
|
|
274
|
+
return self.manager(user_email=user_email, workspace_id=workspace_id)["brain_readiness"]
|
|
275
|
+
|
|
210
276
|
def tiers(self) -> Dict[str, Any]:
|
|
211
277
|
return {"tiers": list(TIERS), "workspace_kinds": list(WORKSPACE_KINDS)}
|
|
212
278
|
|
package/package.json
CHANGED
package/src-tauri/Cargo.lock
CHANGED
package/src-tauri/Cargo.toml
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "6.
|
|
2
|
+
"version": "6.5.0",
|
|
3
3
|
"generated_at": "vite",
|
|
4
4
|
"entrypoints": {
|
|
5
5
|
"app": "/static/app/index.html"
|
|
6
6
|
},
|
|
7
7
|
"assets": {
|
|
8
8
|
"../node_modules/@tauri-apps/api/core.js": "/static/app/assets/core-CwxXejkd.js",
|
|
9
|
-
"index.html": "/static/app/assets/index-
|
|
10
|
-
"assets/index-
|
|
9
|
+
"index.html": "/static/app/assets/index-C1J_1441.js",
|
|
10
|
+
"assets/index-CdCVz_i4.css": "/static/app/assets/index-CdCVz_i4.css"
|
|
11
11
|
},
|
|
12
12
|
"vite": {
|
|
13
13
|
"../node_modules/@tauri-apps/api/core.js": {
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
"isDynamicEntry": true
|
|
18
18
|
},
|
|
19
19
|
"index.html": {
|
|
20
|
-
"file": "assets/index-
|
|
20
|
+
"file": "assets/index-C1J_1441.js",
|
|
21
21
|
"name": "index",
|
|
22
22
|
"src": "index.html",
|
|
23
23
|
"isEntry": true,
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
"../node_modules/@tauri-apps/api/core.js"
|
|
26
26
|
],
|
|
27
27
|
"css": [
|
|
28
|
-
"assets/index-
|
|
28
|
+
"assets/index-CdCVz_i4.css"
|
|
29
29
|
]
|
|
30
30
|
}
|
|
31
31
|
}
|