ltcai 8.6.0 → 8.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.
- package/README.md +40 -33
- package/docs/CHANGELOG.md +49 -1
- package/docs/COMMUNITY_AND_PLUGINS.md +7 -4
- package/docs/DEVELOPMENT.md +11 -9
- package/docs/LEGACY_COMPATIBILITY.md +33 -14
- package/docs/ONBOARDING.md +2 -2
- package/docs/TRUST_MODEL.md +1 -1
- package/docs/WHY_LATTICE.md +2 -2
- package/docs/kg-schema.md +1 -1
- package/kg_schema.py +1 -1
- package/knowledge_graph.py +2 -2
- package/lattice_brain/__init__.py +1 -1
- package/lattice_brain/core.py +1 -1
- package/lattice_brain/ingestion.py +35 -20
- package/lattice_brain/runtime/agent_runtime.py +37 -3
- package/lattice_brain/runtime/multi_agent.py +1 -1
- package/latticeai/__init__.py +1 -1
- package/latticeai/app_factory.py +3 -3
- package/latticeai/core/config.py +14 -2
- package/latticeai/core/legacy_compatibility.py +36 -25
- package/latticeai/core/marketplace.py +1 -1
- package/latticeai/core/workspace_os.py +1 -1
- package/latticeai/models/router.py +3 -2
- package/latticeai/runtime/persistence_runtime.py +1 -1
- package/latticeai/runtime/platform_services_runtime.py +1 -1
- package/latticeai/runtime/router_registration.py +11 -5
- package/latticeai/services/architecture_readiness.py +2 -2
- package/latticeai/services/memory_service.py +38 -7
- package/latticeai/services/model_runtime.py +52 -28
- package/latticeai/services/product_readiness.py +11 -11
- package/package.json +3 -2
- package/scripts/bump_version.py +2 -0
- package/scripts/check_python.py +25 -12
- 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 +11 -11
- package/static/app/assets/{Act-IrojDEWY.js → Act-C7K9wsO9.js} +1 -1
- package/static/app/assets/{Brain--VODO4HM.js → Brain-I1OSzxJu.js} +2 -2
- package/static/app/assets/Capture-B3V4_5Xp.js +1 -0
- package/static/app/assets/{Library-DrVto3cO.js → Library-Cgj-EF50.js} +1 -1
- package/static/app/assets/{System-DNrVbcMX.js → System-D1Lkei3I.js} +1 -1
- package/static/app/assets/index--P0ksosz.js +17 -0
- package/static/app/assets/index-DCh5AoXt.css +2 -0
- package/static/app/assets/{primitives-lz45ZfWY.js → primitives-BLqaKk5g.js} +1 -1
- package/static/app/assets/{textarea-C7uwJsxy.js → textarea-CVQkN2Tk.js} +1 -1
- package/static/app/index.html +2 -2
- package/static/sw.js +1 -1
- package/lattice_brain/_kg_common.py +0 -11
- package/lattice_brain/discovery.py +0 -11
- package/lattice_brain/documents.py +0 -11
- package/lattice_brain/identity.py +0 -11
- package/lattice_brain/ingest.py +0 -11
- package/lattice_brain/network.py +0 -11
- package/lattice_brain/projection.py +0 -11
- package/lattice_brain/provenance.py +0 -11
- package/lattice_brain/retrieval.py +0 -11
- package/lattice_brain/schema.py +0 -11
- package/lattice_brain/store.py +0 -11
- package/lattice_brain/write_master.py +0 -11
- package/latticeai/brain/__init__.py +0 -36
- package/latticeai/brain/_kg_common.py +0 -17
- package/latticeai/brain/context.py +0 -17
- package/latticeai/brain/conversations.py +0 -17
- package/latticeai/brain/discovery.py +0 -17
- package/latticeai/brain/documents.py +0 -17
- package/latticeai/brain/identity.py +0 -17
- package/latticeai/brain/ingest.py +0 -17
- package/latticeai/brain/memory.py +0 -17
- package/latticeai/brain/network.py +0 -17
- package/latticeai/brain/projection.py +0 -17
- package/latticeai/brain/provenance.py +0 -17
- package/latticeai/brain/retrieval.py +0 -17
- package/latticeai/brain/schema.py +0 -17
- package/latticeai/brain/store.py +0 -17
- package/latticeai/brain/write_master.py +0 -17
- package/latticeai/services/agent_runtime.py +0 -11
- package/static/app/assets/Capture-BUP_wJ7s.js +0 -1
- package/static/app/assets/index-BaaPtsLp.js +0 -16
- package/static/app/assets/index-_M5aCv21.css +0 -2
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Lattice AI
|
|
2
2
|
|
|
3
|
-
**Lattice AI 8.
|
|
3
|
+
**Lattice AI 8.8.0 is the local-first Digital Brain platform. This release removes internal-only Brain compatibility layers, strengthens recall proof quality, and keeps package, desktop, extension, static app, and documentation metadata synchronized to the 8.8.0 line.**
|
|
4
4
|
|
|
5
5
|
**Lattice AI는 모델이 바뀌어도 내 지식과 맥락을 보존하는 로컬 우선 AI 브레인입니다.**
|
|
6
6
|
|
|
@@ -64,10 +64,10 @@ You need Lattice AI when:
|
|
|
64
64
|
|
|
65
65
|
## Living Brain Flow
|
|
66
66
|
|
|
67
|
-
The screenshots below are the latest checked-in visual evidence captures
|
|
68
|
-
the
|
|
69
|
-
|
|
70
|
-
|
|
67
|
+
The screenshots below are the latest checked-in visual evidence captures. They
|
|
68
|
+
keep the first-run Brain flow, memory graph, source capture, model library,
|
|
69
|
+
system view, admin console, and review center visible as release gates while
|
|
70
|
+
8.8.0 focuses on Brain Core extraction readiness and recall proof hardening.
|
|
71
71
|
|
|
72
72
|
### 1. Wake Brain
|
|
73
73
|
|
|
@@ -79,21 +79,21 @@ confirm owner, check the computer, choose the Brain voice.
|
|
|
79
79
|
Choose the owner of the Brain. The profile is not a SaaS account by default; it
|
|
80
80
|
is the local identity for the knowledge you keep.
|
|
81
81
|
|
|
82
|
-

|
|
83
83
|
|
|
84
84
|
### 3. Recommended Models
|
|
85
85
|
|
|
86
86
|
Start with a short list: safest recommendation, faster model, stronger model.
|
|
87
87
|
Advanced details stay available without overwhelming first-time users.
|
|
88
88
|
|
|
89
|
-

|
|
90
90
|
|
|
91
91
|
### 4. Install And Load
|
|
92
92
|
|
|
93
93
|
Download and load only after consent. Lattice explains model size, local
|
|
94
94
|
execution, and network use before work starts.
|
|
95
95
|
|
|
96
|
-

|
|
97
97
|
|
|
98
98
|
### 5. Brain Chat
|
|
99
99
|
|
|
@@ -101,14 +101,14 @@ Talk normally. Useful decisions and context become memory, then appear later as
|
|
|
101
101
|
topics, relationships, graph structure, and the concentric memory rings around
|
|
102
102
|
the Brain.
|
|
103
103
|
|
|
104
|
-

|
|
105
105
|
|
|
106
106
|
### 6. Review Center
|
|
107
107
|
|
|
108
108
|
Automation results are staged for review before they become durable decisions.
|
|
109
109
|
Snooze, unsnooze, run now, approve, and dismiss actions stay explicit.
|
|
110
110
|
|
|
111
|
-

|
|
112
112
|
|
|
113
113
|
## Brain Depths
|
|
114
114
|
|
|
@@ -124,10 +124,10 @@ The user travels inward from everyday memory to deeper structure:
|
|
|
124
124
|
|
|
125
125
|
Walkthrough:
|
|
126
126
|
|
|
127
|
-

|
|
128
128
|
|
|
129
129
|
Screenshot index and capture notes:
|
|
130
|
-
[output/release/v8.
|
|
130
|
+
[output/release/v8.7.0/SCREENSHOT_INDEX.md](output/release/v8.7.0/SCREENSHOT_INDEX.md)
|
|
131
131
|
|
|
132
132
|
## Install
|
|
133
133
|
|
|
@@ -190,7 +190,6 @@ Main validation set:
|
|
|
190
190
|
|
|
191
191
|
```bash
|
|
192
192
|
npm run check:python
|
|
193
|
-
node scripts/run_python.mjs -m ruff check .
|
|
194
193
|
npm run lint
|
|
195
194
|
npm run typecheck
|
|
196
195
|
npm run test:unit
|
|
@@ -200,34 +199,40 @@ npm run desktop:tauri:check
|
|
|
200
199
|
npm run docs:check-links
|
|
201
200
|
```
|
|
202
201
|
|
|
202
|
+
`npm run lint` includes the Python Ruff baseline, frontend TypeScript lint
|
|
203
|
+
gate, visual smoke syntax checks, and i18n literal checks.
|
|
204
|
+
|
|
203
205
|
See [docs/DEVELOPMENT.md](docs/DEVELOPMENT.md) for developer workflow details.
|
|
204
206
|
|
|
205
207
|
## Current Release
|
|
206
208
|
|
|
207
|
-
The current release is **8.
|
|
208
|
-
|
|
209
|
-
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
- `dist/ltcai-8.
|
|
225
|
-
- `
|
|
209
|
+
The current release is **8.8.0 — Brain Core Extraction & Recall Proof Hardening**:
|
|
210
|
+
|
|
211
|
+
- Internal-only Brain shim layers are removed: pre-graph flat modules,
|
|
212
|
+
the deprecated `latticeai.brain` namespace, and the service-layer
|
|
213
|
+
AgentRuntime alias are tracked as intentional 8.8.0 removals.
|
|
214
|
+
- Root compatibility shims remain managed for external entrypoints while Brain
|
|
215
|
+
Core now has one physical import surface guarded by isolation tests.
|
|
216
|
+
- AgentRuntime rejects unknown roles at the boundary, exposes contract envelopes
|
|
217
|
+
for legacy run rows, and persists clamped retry budgets.
|
|
218
|
+
- Brain Chat adds resumable conversation history, stop/regenerate/copy actions,
|
|
219
|
+
richer ingestion panels, and answer proof explainability with matched terms
|
|
220
|
+
and confidence labels.
|
|
221
|
+
- Memory recall drops zero-evidence noise when lexical evidence exists, so
|
|
222
|
+
citations explain why each source was selected.
|
|
223
|
+
|
|
224
|
+
Expected artifacts for 8.8.0 release must use exact filenames:
|
|
225
|
+
|
|
226
|
+
- `dist/ltcai-8.8.0-py3-none-any.whl`
|
|
227
|
+
- `dist/ltcai-8.8.0.tar.gz`
|
|
228
|
+
- `ltcai-8.8.0.tgz`
|
|
229
|
+
- `dist/ltcai-8.8.0.vsix`
|
|
230
|
+
- `src-tauri/target/release/bundle/dmg/Lattice AI_8.8.0_aarch64.dmg`
|
|
226
231
|
|
|
227
232
|
Do not use wildcard artifact uploads. Package registry publishing remains owner-run.
|
|
228
233
|
|
|
229
234
|
See [docs/ROADMAP_RECOMMENDATIONS.md](docs/ROADMAP_RECOMMENDATIONS.md) for the
|
|
230
|
-
strategic roadmap slices applied through 8.
|
|
235
|
+
strategic roadmap slices applied through 8.8.0 and the follow-up tracks.
|
|
231
236
|
|
|
232
237
|
## Known Limitations
|
|
233
238
|
|
|
@@ -244,6 +249,8 @@ strategic roadmap slices applied through 8.6.0 and the follow-up tracks.
|
|
|
244
249
|
|
|
245
250
|
| Version | Theme |
|
|
246
251
|
| --- | --- |
|
|
252
|
+
| 8.8.0 | Brain Core Extraction & Recall Proof Hardening: internal-only Brain shim layers are removed, AgentRuntime run contracts/retry budgets are tighter, Brain Chat gains conversation controls, and citation recall exposes matched evidence |
|
|
253
|
+
| 8.7.0 | Runtime State Hygiene & Release Evidence Refresh: model-runtime internals prefer typed state over legacy globals, compatibility sync is deprecated, 8.7.0 visual evidence is refreshed, and all release metadata/docs are synchronized |
|
|
247
254
|
| 8.6.0 | Desktop Capture & Navigation Reliability: native folder selection works from the Tauri localhost app, picker failures surface in Capture, web saving remains one-action, and the Brain shell sidebar/admin flow is CI-covered |
|
|
248
255
|
| 8.5.0 | Tool Registry Readiness & Config DI: ToolRegistry drift removed, `tz_name` flows through central Config into automation runtimes, and current-release documentation is synchronized |
|
|
249
256
|
| 8.4.0 | Action-Aware Brain Chat: explicit file create/write/save/edit requests from Brain Chat route into the governed workspace file tool so files are actually created instead of returned as code-only answers |
|
package/docs/CHANGELOG.md
CHANGED
|
@@ -6,7 +6,55 @@ existed at that release.
|
|
|
6
6
|
|
|
7
7
|
## [Unreleased]
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
## [8.8.0] - 2026-07-06
|
|
10
|
+
|
|
11
|
+
### Added
|
|
12
|
+
- Added Brain Core isolation coverage that keeps `lattice_brain` independent of
|
|
13
|
+
product-package imports.
|
|
14
|
+
- Added recall proof quality gates for matched terms, confidence labels, and
|
|
15
|
+
lexical evidence filtering.
|
|
16
|
+
- Added Brain Chat conversation controls for new/resume/delete, stop,
|
|
17
|
+
regenerate, copy, and richer ingestion progress.
|
|
18
|
+
|
|
19
|
+
### Changed
|
|
20
|
+
- Removed internal-only Brain shim layers: flat pre-graph modules,
|
|
21
|
+
`latticeai.brain`, and `latticeai.services.agent_runtime`.
|
|
22
|
+
- Updated legacy compatibility reporting so removed shim layers are tracked
|
|
23
|
+
separately from remaining external root shims.
|
|
24
|
+
- Hardened AgentRuntime boundary handling for unknown roles, legacy run
|
|
25
|
+
contracts, and persisted retry budgets.
|
|
26
|
+
- Version bumped to 8.8.0 across Python, npm, VS Code extension, Tauri, static
|
|
27
|
+
metadata, readiness gates, release notes, and current-release documentation.
|
|
28
|
+
|
|
29
|
+
### Fixed
|
|
30
|
+
- File ingestion now rejects directory paths before dispatching to document
|
|
31
|
+
ingestion.
|
|
32
|
+
- Memory recall filters low-evidence noise when stronger lexical matches are
|
|
33
|
+
present and surfaces explainable citation confidence.
|
|
34
|
+
|
|
35
|
+
## [8.7.0] - 2026-07-05
|
|
36
|
+
|
|
37
|
+
### Added
|
|
38
|
+
- Added unit test coverage for model-runtime `STATE` source-of-truth behavior
|
|
39
|
+
and deprecation warnings on legacy global synchronization.
|
|
40
|
+
- Added refreshed 8.7.0 screenshots, walkthrough GIF/WebM, and capture notes
|
|
41
|
+
under `output/release/v8.7.0/`.
|
|
42
|
+
|
|
43
|
+
### Changed
|
|
44
|
+
- Reduced internal reliance on bare module globals in
|
|
45
|
+
`latticeai/services/model_runtime.py`; implementation logic now consistently
|
|
46
|
+
reads from the `ModelRuntimeState` instance while globals remain as a legacy
|
|
47
|
+
compatibility surface.
|
|
48
|
+
- Added `DeprecationWarning` to `sync_to_module_globals()` while preserving the
|
|
49
|
+
external shim behavior.
|
|
50
|
+
- Removed a loose `as any` cast from `frontend/src/pages/Act.tsx`.
|
|
51
|
+
- Version bumped to 8.7.0 across Python, npm, VS Code extension, Tauri, static
|
|
52
|
+
metadata, README evidence links, release notes, and current-release
|
|
53
|
+
documentation.
|
|
54
|
+
|
|
55
|
+
### Fixed
|
|
56
|
+
- Internal model-runtime functions now prefer the typed state object per the
|
|
57
|
+
project preference for composition over global mutable state.
|
|
10
58
|
|
|
11
59
|
## [8.6.0] - 2026-07-05
|
|
12
60
|
|
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
# Community And Plugins
|
|
2
2
|
|
|
3
|
-
Current release: **8.
|
|
3
|
+
Current release: **8.8.0 — Brain Core Extraction & Recall Proof Hardening**.
|
|
4
4
|
|
|
5
|
-
LatticeAI defines the path from a strong local-first framework (8.4.0
|
|
6
|
-
|
|
5
|
+
LatticeAI defines the path from a strong local-first framework (8.4.0
|
|
6
|
+
action-aware baseline, 8.5.0 registry+DI hardening, 8.6.0 capture/navigation
|
|
7
|
+
reliability, 8.7.0 runtime-state hygiene, and 8.8.0 Brain Core extraction
|
|
8
|
+
readiness) to a product ecosystem. The
|
|
9
|
+
immediate goal is small and practical: make it clear how
|
|
7
10
|
contributors can extend the Brain without weakening local-first trust,
|
|
8
11
|
workspace scoping, or release quality.
|
|
9
12
|
|
|
@@ -34,7 +37,7 @@ Plugins should add one bounded capability at a time:
|
|
|
34
37
|
- Compatibility requirements belong in `lattice_version`, and examples should
|
|
35
38
|
use current host-compatible values.
|
|
36
39
|
|
|
37
|
-
##
|
|
40
|
+
## Current Ecosystem Tasks
|
|
38
41
|
|
|
39
42
|
- Keep the hello-world plugin valid and boring.
|
|
40
43
|
- Expand examples only when they exercise real extension seams.
|
package/docs/DEVELOPMENT.md
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
# Lattice AI Development
|
|
2
2
|
|
|
3
|
-
Current release: **8.
|
|
3
|
+
Current release: **8.8.0 — Brain Core Extraction & Recall Proof Hardening**.
|
|
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 7.0.0-8.
|
|
7
|
+
history is intentionally limited to 7.0.0-8.8.0 in `docs/CHANGELOG.md` and
|
|
8
8
|
`RELEASE.md`.
|
|
9
9
|
|
|
10
10
|
## Product Contract
|
|
@@ -49,13 +49,15 @@ API, UI, or release work, run:
|
|
|
49
49
|
|
|
50
50
|
```bash
|
|
51
51
|
npm run check:python
|
|
52
|
-
node scripts/run_python.mjs -m ruff check .
|
|
53
52
|
npm run lint
|
|
54
53
|
npm run typecheck
|
|
55
54
|
npm run test:unit
|
|
56
55
|
npm run docs:check-links
|
|
57
56
|
```
|
|
58
57
|
|
|
58
|
+
`npm run lint` runs the Python Ruff baseline, frontend TypeScript lint gate,
|
|
59
|
+
visual smoke syntax checks, and i18n literal checks.
|
|
60
|
+
|
|
59
61
|
Use these when the change touches the relevant surface:
|
|
60
62
|
|
|
61
63
|
```bash
|
|
@@ -112,10 +114,10 @@ For user-facing, API, runtime, release, or packaging changes, check:
|
|
|
112
114
|
Release/publish examples must use exact target-version filenames. Do not
|
|
113
115
|
document wildcard artifact upload commands.
|
|
114
116
|
|
|
115
|
-
For 8.
|
|
117
|
+
For 8.8.0 release work, exact artifacts are:
|
|
116
118
|
|
|
117
|
-
- `dist/ltcai-8.
|
|
118
|
-
- `dist/ltcai-8.
|
|
119
|
-
- `ltcai-8.
|
|
120
|
-
- `dist/ltcai-8.
|
|
121
|
-
- `src-tauri/target/release/bundle/dmg/Lattice AI_8.
|
|
119
|
+
- `dist/ltcai-8.8.0-py3-none-any.whl`
|
|
120
|
+
- `dist/ltcai-8.8.0.tar.gz`
|
|
121
|
+
- `ltcai-8.8.0.tgz`
|
|
122
|
+
- `dist/ltcai-8.8.0.vsix`
|
|
123
|
+
- `src-tauri/target/release/bundle/dmg/Lattice AI_8.8.0_aarch64.dmg`
|
|
@@ -1,21 +1,40 @@
|
|
|
1
1
|
# Legacy Compatibility Map
|
|
2
2
|
|
|
3
|
-
Current
|
|
3
|
+
Current target: **8.8.0 — Internal shim removal & Brain Core extraction prep**.
|
|
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`.
|
|
7
7
|
Some root-level modules remain packaged for compatibility with older imports,
|
|
8
8
|
CLI entrypoints, or extension workflows. Their presence does not define the
|
|
9
|
-
current
|
|
9
|
+
current architecture.
|
|
10
10
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
and groups shims by layer:
|
|
11
|
+
The managed inventory lives in `latticeai.core.legacy_compatibility` and
|
|
12
|
+
groups shims by layer:
|
|
14
13
|
|
|
15
|
-
- `root`: historical repo-root imports such as `knowledge_graph.py
|
|
16
|
-
|
|
17
|
-
- `
|
|
18
|
-
|
|
14
|
+
- `root`: historical repo-root imports such as `knowledge_graph.py` — **kept**
|
|
15
|
+
(external entrypoints: `uvicorn server:app`, installed CLI, old scripts).
|
|
16
|
+
- `brain-flat`: pre-graph-package imports such as `lattice_brain.store` —
|
|
17
|
+
**removed in 8.8.0** (internal-only).
|
|
18
|
+
- `deprecated-namespace`: older `latticeai.brain.*` package imports —
|
|
19
|
+
**removed in 8.8.0** (internal-only).
|
|
20
|
+
- `service-alias`: `latticeai.services.agent_runtime` —
|
|
21
|
+
**removed in 8.8.0** (internal-only).
|
|
22
|
+
|
|
23
|
+
Removed layers stay listed in `legacy_compatibility.REMOVED_SHIMS` and in the
|
|
24
|
+
`legacy_shim_report()` payload (`removed`, `lingering`), so tooling can tell
|
|
25
|
+
"removed on purpose" apart from "missing by accident".
|
|
26
|
+
|
|
27
|
+
## Brain Core extraction readiness
|
|
28
|
+
|
|
29
|
+
Removing the internal layers gives `lattice_brain` exactly one import surface
|
|
30
|
+
(its physical module paths). Two structural guards keep it extractable as a
|
|
31
|
+
standalone package:
|
|
32
|
+
|
|
33
|
+
- `tests/unit/test_brain_core_isolation.py` — AST guard that fails if any
|
|
34
|
+
`lattice_brain` module imports `latticeai` (the product imports the Brain,
|
|
35
|
+
never the reverse).
|
|
36
|
+
- `tests/unit/test_legacy_root_shims.py::test_internal_shim_layers_are_gone`
|
|
37
|
+
— fails if a removed shim path becomes importable again.
|
|
19
38
|
|
|
20
39
|
## Current Policy
|
|
21
40
|
|
|
@@ -47,13 +66,13 @@ and groups shims by layer:
|
|
|
47
66
|
| `setup_wizard.py` | setup and model recommendation services | Compatibility for first-run recommendation calls |
|
|
48
67
|
| `server.py` | lazy proxy to `latticeai.server_app` / `latticeai.app_factory` | Preserves historical `server.app` imports without import-time construction |
|
|
49
68
|
|
|
50
|
-
## Inner Shim Layers
|
|
69
|
+
## Inner Shim Layers (removed in 8.8.0)
|
|
51
70
|
|
|
52
|
-
| Legacy layer | Example module |
|
|
71
|
+
| Legacy layer | Example module | Replacement import | Status |
|
|
53
72
|
| --- | --- | --- | --- |
|
|
54
|
-
| `brain-flat` | `lattice_brain.store`, `lattice_brain.ingest`, `lattice_brain.retrieval` | `lattice_brain.graph.*` |
|
|
55
|
-
| `deprecated-namespace` | `latticeai.brain
|
|
56
|
-
| `service-alias` | `latticeai.services.agent_runtime` | `lattice_brain.runtime.agent_runtime` |
|
|
73
|
+
| `brain-flat` | `lattice_brain.store`, `lattice_brain.ingest`, `lattice_brain.retrieval` | `lattice_brain.graph.*` | Removed — internal-only, no supported entrypoint depended on it |
|
|
74
|
+
| `deprecated-namespace` | `latticeai.brain.*` | `lattice_brain.*` | Removed — namespace also dropped from `pyproject.toml` packages |
|
|
75
|
+
| `service-alias` | `latticeai.services.agent_runtime` | `lattice_brain.runtime.agent_runtime` | Removed — runtime ownership sits in Brain Core |
|
|
57
76
|
|
|
58
77
|
## Packaging Notes
|
|
59
78
|
|
package/docs/ONBOARDING.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Lattice AI Onboarding
|
|
2
2
|
|
|
3
|
-
Current release: **8.
|
|
3
|
+
Current release: **8.8.0 — Brain Core Extraction & Recall Proof Hardening**.
|
|
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
|
|
@@ -32,7 +32,7 @@ read the docs first.
|
|
|
32
32
|
|
|
33
33
|
## Release Gate
|
|
34
34
|
|
|
35
|
-
8.
|
|
35
|
+
8.8.0 treats onboarding as a release gate, not marketing copy. The current
|
|
36
36
|
machine-checkable product readiness report requires this five-minute contract,
|
|
37
37
|
the Brain Home surface, setup helpers, graph ingestion tests, and exact release
|
|
38
38
|
artifact documentation before the release can be called complete.
|
package/docs/TRUST_MODEL.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Lattice AI Trust Model
|
|
2
2
|
|
|
3
|
-
Current release: **8.
|
|
3
|
+
Current release: **8.8.0 — Brain Core Extraction & Recall Proof Hardening**.
|
|
4
4
|
|
|
5
5
|
Lattice AI is local-first, explicit about external communication, and honest
|
|
6
6
|
when a capability is unavailable.
|
package/docs/WHY_LATTICE.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Why Lattice AI Exists
|
|
2
2
|
|
|
3
|
-
Current release: **8.
|
|
3
|
+
Current release: **8.8.0 — Brain Core Extraction & Recall Proof Hardening**.
|
|
4
4
|
|
|
5
5
|
**Lattice AI is a local-first Digital Brain that keeps your knowledge durable
|
|
6
6
|
across any AI model.**
|
|
@@ -32,7 +32,7 @@ The graph matters, but it is not the product identity. The product identity is a
|
|
|
32
32
|
local-first Digital Brain: a place where the user can talk, add sources, watch
|
|
33
33
|
memory grow, and inspect the Knowledge Graph when they need proof.
|
|
34
34
|
|
|
35
|
-
In 8.
|
|
35
|
+
In 8.8.0 the first screen is intentionally not a dashboard. The living Brain,
|
|
36
36
|
conversation composer, evidence-backed Brain Brief, and five-minute onboarding
|
|
37
37
|
path appear together so the user immediately knows what matters, what to add,
|
|
38
38
|
and why the answer is grounded in local memory.
|
package/docs/kg-schema.md
CHANGED
package/kg_schema.py
CHANGED
package/knowledge_graph.py
CHANGED
|
@@ -4,7 +4,7 @@ The implementation now lives under :mod:`lattice_brain`. Root imports are
|
|
|
4
4
|
kept for older integrations and tests.
|
|
5
5
|
"""
|
|
6
6
|
|
|
7
|
-
from lattice_brain._kg_common import ( # noqa: F401
|
|
7
|
+
from lattice_brain.graph._kg_common import ( # noqa: F401
|
|
8
8
|
EDGE_VERB,
|
|
9
9
|
GRAPH_SCHEMA_VERSION,
|
|
10
10
|
LOCAL_CODE_EXTENSIONS,
|
|
@@ -24,7 +24,7 @@ from lattice_brain._kg_common import ( # noqa: F401
|
|
|
24
24
|
_slug,
|
|
25
25
|
set_llm_router,
|
|
26
26
|
)
|
|
27
|
-
from lattice_brain.store import KnowledgeGraphStore
|
|
27
|
+
from lattice_brain.graph.store import KnowledgeGraphStore
|
|
28
28
|
|
|
29
29
|
__all__ = [
|
|
30
30
|
"KnowledgeGraphStore",
|
package/lattice_brain/core.py
CHANGED
|
@@ -132,7 +132,7 @@ class IngestionPipeline:
|
|
|
132
132
|
# ── public API ───────────────────────────────────────────────────────────
|
|
133
133
|
def ingest(self, item: IngestionItem, *, user_email: Optional[str] = None) -> IngestionResult:
|
|
134
134
|
"""Normalize, hash, route through dispatch_tool, and record provenance."""
|
|
135
|
-
source_type = str(item.source_type or "text").strip()
|
|
135
|
+
source_type = str(item.source_type or "text").strip().lower()
|
|
136
136
|
if not self.available():
|
|
137
137
|
return IngestionResult(
|
|
138
138
|
status="unavailable", source_type=source_type,
|
|
@@ -187,25 +187,33 @@ class IngestionPipeline:
|
|
|
187
187
|
embedded = bool(self._kg.node_is_embedded(node_id)) if node_id else False
|
|
188
188
|
title = raw.get("title") or item.title
|
|
189
189
|
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
190
|
+
# Provenance capture must never turn an already-persisted ingest into a
|
|
191
|
+
# caller-visible failure: the graph write above succeeded, so a broken
|
|
192
|
+
# provenance table degrades the result instead of raising.
|
|
193
|
+
provenance_detail: Optional[str] = None
|
|
194
|
+
try:
|
|
195
|
+
prov = self._kg.record_provenance(
|
|
196
|
+
node_id=node_id,
|
|
197
|
+
source_type=source_type,
|
|
198
|
+
pipeline=self._pipeline_name,
|
|
199
|
+
source_uri=item.source_uri,
|
|
200
|
+
content_hash=content_hash,
|
|
201
|
+
title=title,
|
|
202
|
+
owner=owner,
|
|
203
|
+
workspace_id=item.workspace_id,
|
|
204
|
+
captured_at=captured_at,
|
|
205
|
+
modified_at=item.modified_at,
|
|
206
|
+
embedded=embedded,
|
|
207
|
+
linked=bool(raw.get("source_node_id")),
|
|
208
|
+
duplicate=bool(raw.get("duplicate")),
|
|
209
|
+
agent_used=item.agent_used,
|
|
210
|
+
chunk_count=len(chunk_ids),
|
|
211
|
+
permissions=item.permissions,
|
|
212
|
+
metadata=item.metadata,
|
|
213
|
+
)
|
|
214
|
+
except Exception as exc: # noqa: BLE001 — the ingest itself already landed
|
|
215
|
+
prov = {}
|
|
216
|
+
provenance_detail = f"provenance capture failed: {exc}"
|
|
209
217
|
if self._audit is not None:
|
|
210
218
|
try:
|
|
211
219
|
self._audit(
|
|
@@ -232,11 +240,16 @@ class IngestionPipeline:
|
|
|
232
240
|
embedded=embedded,
|
|
233
241
|
indexing_status="indexed",
|
|
234
242
|
provenance_id=prov.get("id"),
|
|
243
|
+
detail=provenance_detail,
|
|
235
244
|
)
|
|
236
245
|
|
|
237
246
|
# ── routing helpers ──────────────────────────────────────────────────────
|
|
238
247
|
def _ingest_text(self, item, *, source_type, owner, captured_at) -> Dict[str, Any]:
|
|
239
248
|
text = item.text or ""
|
|
249
|
+
if not text.strip():
|
|
250
|
+
raise ValueError(
|
|
251
|
+
f"Empty content: {source_type} ingestion requires non-empty text."
|
|
252
|
+
)
|
|
240
253
|
if len(text.encode("utf-8", "ignore")) > self._max_text_bytes:
|
|
241
254
|
raise ValueError(
|
|
242
255
|
f"Text payload exceeds the {self._max_text_bytes // (1024 * 1024)}MB ingestion limit."
|
|
@@ -297,6 +310,8 @@ class IngestionPipeline:
|
|
|
297
310
|
path = Path(item.path)
|
|
298
311
|
if not path.exists():
|
|
299
312
|
raise FileNotFoundError(f"File not found: {path}")
|
|
313
|
+
if path.is_dir():
|
|
314
|
+
raise ValueError(f"File ingestion requires a file, got a directory: {path}")
|
|
300
315
|
return self._kg.ingest_document(
|
|
301
316
|
path,
|
|
302
317
|
original_filename=item.title or path.name,
|
|
@@ -42,6 +42,7 @@ from .contracts import (
|
|
|
42
42
|
contract_views,
|
|
43
43
|
extract_contract,
|
|
44
44
|
multi_agent_contract,
|
|
45
|
+
run_record_contract,
|
|
45
46
|
runtime_boundary_contract,
|
|
46
47
|
)
|
|
47
48
|
|
|
@@ -308,7 +309,7 @@ class AgentRuntime:
|
|
|
308
309
|
def get_run(self, run_id: str, *, scope: Optional[str] = None) -> Dict[str, Any]:
|
|
309
310
|
run = self._store.get_agent_run(run_id, workspace_id=scope)
|
|
310
311
|
payload = {"run": run}
|
|
311
|
-
contract =
|
|
312
|
+
contract = self._ensure_contract(run)
|
|
312
313
|
if contract is not None:
|
|
313
314
|
payload["contract"] = contract_view(contract)
|
|
314
315
|
return payload
|
|
@@ -324,7 +325,7 @@ class AgentRuntime:
|
|
|
324
325
|
def events(self, run_id: str, *, scope: Optional[str] = None) -> Dict[str, Any]:
|
|
325
326
|
run = self._store.get_agent_run(run_id, workspace_id=scope)
|
|
326
327
|
status = str(run.get("status") or "")
|
|
327
|
-
contract =
|
|
328
|
+
contract = self._ensure_contract(run)
|
|
328
329
|
return {
|
|
329
330
|
"run_id": run_id,
|
|
330
331
|
"status": status,
|
|
@@ -364,6 +365,35 @@ class AgentRuntime:
|
|
|
364
365
|
def _clamp_retries(self, max_retries: int) -> int:
|
|
365
366
|
return max(0, min(int(max_retries or 0), self._max_retries_cap))
|
|
366
367
|
|
|
368
|
+
def _validate_roles(self, roles: Optional[List[str]]) -> Optional[List[str]]:
|
|
369
|
+
"""Reject unknown roles at the boundary instead of deep in orchestration.
|
|
370
|
+
|
|
371
|
+
``preview`` reports unknown roles as a blocking reason; execution paths
|
|
372
|
+
must enforce the same contract so a run can never be recorded with a
|
|
373
|
+
role the runtime does not own.
|
|
374
|
+
"""
|
|
375
|
+
if not roles:
|
|
376
|
+
return None
|
|
377
|
+
unknown = [role for role in roles if role not in AGENT_ROLES]
|
|
378
|
+
if unknown:
|
|
379
|
+
raise ValueError(f"unknown roles: {', '.join(unknown)}")
|
|
380
|
+
return list(roles)
|
|
381
|
+
|
|
382
|
+
@staticmethod
|
|
383
|
+
def _ensure_contract(record: Any) -> Optional[Dict[str, Any]]:
|
|
384
|
+
"""Return the record's family contract, synthesizing one for legacy rows.
|
|
385
|
+
|
|
386
|
+
Every read surface (get_run/events/replay) must expose the
|
|
387
|
+
``agent-run-contract/v1`` envelope even for runs persisted before the
|
|
388
|
+
contract family existed, so consumers never need a legacy branch.
|
|
389
|
+
"""
|
|
390
|
+
contract = extract_contract(record)
|
|
391
|
+
if contract is not None:
|
|
392
|
+
return contract
|
|
393
|
+
if isinstance(record, dict) and record.get("id"):
|
|
394
|
+
return run_record_contract(record)
|
|
395
|
+
return None
|
|
396
|
+
|
|
367
397
|
@staticmethod
|
|
368
398
|
def _result_patch(result: Any, goal: str) -> Dict[str, Any]:
|
|
369
399
|
return {
|
|
@@ -420,6 +450,7 @@ class AgentRuntime:
|
|
|
420
450
|
"""Create the durable queued row used by the async executor."""
|
|
421
451
|
if not str(goal or "").strip():
|
|
422
452
|
raise ValueError("goal is required")
|
|
453
|
+
roles = self._validate_roles(roles)
|
|
423
454
|
pre_dispatch = self._fire_pre_run(
|
|
424
455
|
goal=goal,
|
|
425
456
|
roles=roles,
|
|
@@ -454,7 +485,9 @@ class AgentRuntime:
|
|
|
454
485
|
execution_mode="async",
|
|
455
486
|
requested_roles=roles or None,
|
|
456
487
|
inputs=inputs or {},
|
|
457
|
-
|
|
488
|
+
# Persist the clamped budget so the durable row reflects what the
|
|
489
|
+
# executor will actually honor, not the raw client request.
|
|
490
|
+
max_retries=self._clamp_retries(max_retries),
|
|
458
491
|
)
|
|
459
492
|
payload: Dict[str, Any] = {"run": run}
|
|
460
493
|
if pre_dispatch is not None:
|
|
@@ -574,6 +607,7 @@ class AgentRuntime:
|
|
|
574
607
|
) -> Dict[str, Any]:
|
|
575
608
|
if not str(goal or "").strip():
|
|
576
609
|
raise ValueError("goal is required")
|
|
610
|
+
roles = self._validate_roles(roles)
|
|
577
611
|
|
|
578
612
|
pre_dispatch = self._fire_pre_run(
|
|
579
613
|
goal=goal,
|
|
@@ -21,7 +21,7 @@ from typing import Any, Callable, Dict, List, Optional
|
|
|
21
21
|
from .contracts import multi_agent_contract
|
|
22
22
|
|
|
23
23
|
|
|
24
|
-
MULTI_AGENT_VERSION = "8.
|
|
24
|
+
MULTI_AGENT_VERSION = "8.8.0"
|
|
25
25
|
|
|
26
26
|
AGENT_ROLES = ("researcher", "planner", "executor", "reviewer", "release")
|
|
27
27
|
CORE_PIPELINE = ("planner", "executor", "reviewer")
|
package/latticeai/__init__.py
CHANGED