ltcai 4.3.1 → 4.4.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 +191 -278
- package/docs/CHANGELOG.md +128 -0
- package/docs/V4_3_2_DEADCODE_AUDIT_REPORT.md +174 -0
- package/docs/V4_3_2_DOCUMENTATION_CLEANUP_REPORT.md +81 -0
- package/docs/V4_3_2_GITHUB_VERCEL_CHECK_REPORT.md +75 -0
- package/docs/V4_3_2_GRAPH_UX_REPORT.md +48 -0
- package/docs/V4_3_2_INDEPENDENT_AUDIT_PACKAGE.md +209 -0
- package/docs/V4_3_2_PRODUCT_POLISH_REPORT.md +57 -0
- package/docs/V4_3_2_SELF_AUDIT_REPORT.md +63 -0
- package/docs/V4_3_2_VALIDATION_REPORT.md +97 -0
- package/docs/V4_3_3_VALIDATION_REPORT.md +46 -0
- package/docs/V4_4_0_EXTRACTION_REPORT.md +239 -0
- package/docs/V4_DIGITAL_BRAIN_RECOVERY.md +18 -19
- package/frontend/openapi.json +1 -1
- package/frontend/src/components/primitives.tsx +92 -10
- package/frontend/src/pages/Act.tsx +11 -9
- package/frontend/src/pages/Ask.tsx +2 -2
- package/frontend/src/pages/Brain.tsx +607 -65
- package/frontend/src/pages/Capture.tsx +11 -7
- package/frontend/src/pages/Library.tsx +3 -3
- package/frontend/src/pages/System.tsx +186 -23
- package/lattice_brain/__init__.py +38 -23
- package/lattice_brain/_kg_common.py +11 -1
- package/lattice_brain/context.py +212 -2
- package/lattice_brain/conversations.py +234 -1
- package/lattice_brain/discovery.py +11 -1
- package/lattice_brain/documents.py +11 -1
- package/lattice_brain/graph/__init__.py +28 -0
- package/lattice_brain/graph/_kg_common.py +1123 -0
- package/lattice_brain/graph/curator.py +473 -0
- package/lattice_brain/graph/discovery.py +1455 -0
- package/lattice_brain/graph/documents.py +218 -0
- package/lattice_brain/graph/identity.py +175 -0
- package/lattice_brain/graph/ingest.py +644 -0
- package/lattice_brain/graph/network.py +205 -0
- package/lattice_brain/graph/projection.py +571 -0
- package/lattice_brain/graph/provenance.py +401 -0
- package/lattice_brain/graph/retrieval.py +1341 -0
- package/lattice_brain/graph/schema.py +640 -0
- package/lattice_brain/graph/store.py +237 -0
- package/lattice_brain/graph/write_master.py +225 -0
- package/lattice_brain/identity.py +11 -13
- package/lattice_brain/ingest.py +11 -1
- package/lattice_brain/ingestion.py +318 -0
- package/lattice_brain/memory.py +100 -1
- package/lattice_brain/network.py +11 -1
- package/lattice_brain/portability.py +431 -0
- package/lattice_brain/projection.py +11 -1
- package/lattice_brain/provenance.py +11 -1
- package/lattice_brain/retrieval.py +11 -1
- package/lattice_brain/runtime/__init__.py +32 -0
- package/lattice_brain/runtime/agent_runtime.py +569 -0
- package/lattice_brain/runtime/hooks.py +754 -0
- package/lattice_brain/runtime/multi_agent.py +795 -0
- package/lattice_brain/schema.py +11 -1
- package/lattice_brain/store.py +10 -2
- package/lattice_brain/workflow.py +461 -0
- package/lattice_brain/write_master.py +11 -1
- package/latticeai/__init__.py +1 -1
- package/latticeai/api/agents.py +2 -2
- package/latticeai/api/browser.py +1 -1
- package/latticeai/api/chat.py +1 -1
- package/latticeai/api/computer_use.py +1 -1
- package/latticeai/api/hooks.py +2 -2
- package/latticeai/api/mcp.py +1 -1
- package/latticeai/api/tools.py +1 -1
- package/latticeai/api/workflow_designer.py +2 -2
- package/latticeai/app_factory.py +4 -4
- package/latticeai/brain/__init__.py +24 -6
- package/latticeai/brain/_kg_common.py +11 -1117
- package/latticeai/brain/context.py +12 -208
- package/latticeai/brain/conversations.py +12 -231
- package/latticeai/brain/discovery.py +13 -1451
- package/latticeai/brain/documents.py +13 -214
- package/latticeai/brain/identity.py +11 -169
- package/latticeai/brain/ingest.py +13 -640
- package/latticeai/brain/memory.py +12 -97
- package/latticeai/brain/network.py +12 -200
- package/latticeai/brain/projection.py +13 -567
- package/latticeai/brain/provenance.py +13 -397
- package/latticeai/brain/retrieval.py +13 -1337
- package/latticeai/brain/schema.py +12 -635
- package/latticeai/brain/store.py +13 -233
- package/latticeai/brain/write_master.py +13 -221
- package/latticeai/core/agent.py +1 -1
- package/latticeai/core/agent_registry.py +2 -2
- package/latticeai/core/builtin_hooks.py +2 -2
- package/latticeai/core/graph_curator.py +6 -468
- package/latticeai/core/hooks.py +6 -749
- package/latticeai/core/marketplace.py +1 -1
- package/latticeai/core/multi_agent.py +6 -790
- package/latticeai/core/workflow_engine.py +6 -456
- package/latticeai/core/workspace_os.py +1 -1
- package/latticeai/services/agent_runtime.py +6 -564
- package/latticeai/services/ingestion.py +6 -313
- package/latticeai/services/kg_portability.py +6 -426
- package/latticeai/services/platform_runtime.py +3 -3
- package/latticeai/services/run_executor.py +1 -1
- package/latticeai/services/upload_service.py +1 -1
- package/p_reinforce.py +1 -1
- package/package.json +3 -6
- package/scripts/build_vercel_static.mjs +77 -0
- package/scripts/bump_version.py +1 -1
- package/scripts/check_markdown_links.mjs +75 -0
- package/scripts/wheel_smoke.py +7 -0
- package/src-tauri/Cargo.lock +1 -1
- package/src-tauri/Cargo.toml +1 -1
- package/src-tauri/src/main.rs +12 -2
- package/src-tauri/tauri.conf.json +1 -1
- package/static/app/asset-manifest.json +5 -5
- package/static/app/assets/index-CHHal8Zl.css +2 -0
- package/static/app/assets/index-pdzil9ac.js +333 -0
- package/static/app/assets/index-pdzil9ac.js.map +1 -0
- package/static/app/index.html +2 -2
- package/latticeai/api/deps.py +0 -15
- package/scripts/capture/README.md +0 -28
- package/scripts/capture/capture_enterprise.js +0 -8
- package/scripts/capture/capture_graph.js +0 -8
- package/scripts/capture/capture_onboarding.js +0 -8
- package/scripts/capture/capture_page.js +0 -43
- package/scripts/capture/capture_release_media.js +0 -125
- package/scripts/capture/capture_skills.js +0 -8
- package/scripts/capture/capture_v340.js +0 -88
- package/scripts/capture/capture_workspace.js +0 -8
- package/scripts/generate_diagrams.py +0 -512
- package/scripts/release-0.3.1.sh +0 -105
- package/scripts/take_screenshots.js +0 -69
- package/static/app/assets/index-BhPuj8rT.js +0 -333
- package/static/app/assets/index-BhPuj8rT.js.map +0 -1
- package/static/app/assets/index-yZswHE3d.css +0 -2
- package/static/css/tokens.3ba22e37.css +0 -260
|
@@ -0,0 +1,239 @@
|
|
|
1
|
+
# v4.4.0 Physical Extraction Report — `lattice_brain` Brain Engine
|
|
2
|
+
|
|
3
|
+
Date: 2026-06-13
|
|
4
|
+
Scope: complete physical extraction of the Brain Core implementation into the
|
|
5
|
+
standalone `lattice_brain` package. The release flow attaches only validated
|
|
6
|
+
v4.4.0 artifacts to GitHub; no external package registry publishing is part of
|
|
7
|
+
this release step.
|
|
8
|
+
|
|
9
|
+
## 1. Problem Before v4.4.0
|
|
10
|
+
|
|
11
|
+
`lattice_brain` provided an import-path contract only. The graph, memory,
|
|
12
|
+
context, conversation, and ingestion implementations physically lived under
|
|
13
|
+
`latticeai/brain/` (and `latticeai/core/`, `latticeai/services/`) and were
|
|
14
|
+
re-exported through `lattice_brain.*`. Importing `lattice_brain.store`
|
|
15
|
+
actually executed `latticeai.brain.store`, so the Brain Core could not be
|
|
16
|
+
used, tested, or distributed independently of the FastAPI product package.
|
|
17
|
+
|
|
18
|
+
## 2. Dependency Graph
|
|
19
|
+
|
|
20
|
+
### Before (v4.3.3)
|
|
21
|
+
|
|
22
|
+
```
|
|
23
|
+
lattice_brain.store/schema/retrieval/... (1-line re-exports)
|
|
24
|
+
│ imports
|
|
25
|
+
▼
|
|
26
|
+
latticeai.brain.* (physical implementation)
|
|
27
|
+
│ imports
|
|
28
|
+
├─ latticeai.services.ingestion (memory → IngestionItem)
|
|
29
|
+
│ └─ latticeai.core.hooks (dispatch_tool)
|
|
30
|
+
├─ latticeai.core.graph_curator (projection, lazy)
|
|
31
|
+
└─ kg_schema (root shim → lattice_brain.schema → latticeai.brain.schema)
|
|
32
|
+
latticeai.services.agent_runtime → latticeai.core.multi_agent
|
|
33
|
+
latticeai.services.kg_portability → lattice_brain.archive/storage (already clean)
|
|
34
|
+
latticeai.core.workflow_engine (stdlib only, hosted in latticeai)
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
Net effect: `import lattice_brain.store` pulled in `latticeai`.
|
|
38
|
+
|
|
39
|
+
### After (v4.4.0)
|
|
40
|
+
|
|
41
|
+
```
|
|
42
|
+
latticeai (FastAPI app, routers, services, product backend)
|
|
43
|
+
│ imports (one direction only)
|
|
44
|
+
▼
|
|
45
|
+
lattice_brain (physical Brain Engine)
|
|
46
|
+
├─ core, archive, embeddings, storage/ (already physical in v4.2+)
|
|
47
|
+
├─ graph/ _kg_common, schema, store, write_master, retrieval, discovery,
|
|
48
|
+
│ documents, ingest, projection, provenance, identity, network,
|
|
49
|
+
│ curator
|
|
50
|
+
├─ memory, context, conversations
|
|
51
|
+
├─ ingestion (uses .runtime.hooks)
|
|
52
|
+
├─ runtime/ hooks, multi_agent, agent_runtime
|
|
53
|
+
├─ workflow
|
|
54
|
+
└─ portability (uses .archive/.storage/.graph.identity)
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
`lattice_brain` has zero `latticeai` imports — enforced by an import-hook test.
|
|
58
|
+
External (third-party/optional) deps of the package: `cryptography`, `keyring`,
|
|
59
|
+
`httpx`, `psycopg` (opt-in), `sqlite-vec` (opt-in), document parsers
|
|
60
|
+
(`pdfplumber`, `python-docx`, `openpyxl`, `python-pptx`, `PIL`) — all already
|
|
61
|
+
declared in `pyproject.toml`.
|
|
62
|
+
|
|
63
|
+
## 3. Files Moved (physical, via `git mv`, history preserved)
|
|
64
|
+
|
|
65
|
+
Knowledge graph → `lattice_brain/graph/`:
|
|
66
|
+
|
|
67
|
+
| From | To |
|
|
68
|
+
| --- | --- |
|
|
69
|
+
| `latticeai/brain/_kg_common.py` | `lattice_brain/graph/_kg_common.py` |
|
|
70
|
+
| `latticeai/brain/schema.py` | `lattice_brain/graph/schema.py` |
|
|
71
|
+
| `latticeai/brain/store.py` | `lattice_brain/graph/store.py` |
|
|
72
|
+
| `latticeai/brain/write_master.py` | `lattice_brain/graph/write_master.py` |
|
|
73
|
+
| `latticeai/brain/retrieval.py` | `lattice_brain/graph/retrieval.py` |
|
|
74
|
+
| `latticeai/brain/discovery.py` | `lattice_brain/graph/discovery.py` |
|
|
75
|
+
| `latticeai/brain/documents.py` | `lattice_brain/graph/documents.py` |
|
|
76
|
+
| `latticeai/brain/ingest.py` | `lattice_brain/graph/ingest.py` |
|
|
77
|
+
| `latticeai/brain/projection.py` | `lattice_brain/graph/projection.py` |
|
|
78
|
+
| `latticeai/brain/provenance.py` | `lattice_brain/graph/provenance.py` |
|
|
79
|
+
| `latticeai/brain/identity.py` | `lattice_brain/graph/identity.py` |
|
|
80
|
+
| `latticeai/brain/network.py` | `lattice_brain/graph/network.py` |
|
|
81
|
+
| `latticeai/core/graph_curator.py` | `lattice_brain/graph/curator.py` |
|
|
82
|
+
|
|
83
|
+
Memory / context / conversation:
|
|
84
|
+
|
|
85
|
+
| From | To |
|
|
86
|
+
| --- | --- |
|
|
87
|
+
| `latticeai/brain/memory.py` | `lattice_brain/memory.py` |
|
|
88
|
+
| `latticeai/brain/context.py` | `lattice_brain/context.py` |
|
|
89
|
+
| `latticeai/brain/conversations.py` | `lattice_brain/conversations.py` |
|
|
90
|
+
|
|
91
|
+
Ingestion / runtime / workflow / portability:
|
|
92
|
+
|
|
93
|
+
| From | To |
|
|
94
|
+
| --- | --- |
|
|
95
|
+
| `latticeai/services/ingestion.py` | `lattice_brain/ingestion.py` |
|
|
96
|
+
| `latticeai/core/hooks.py` | `lattice_brain/runtime/hooks.py` |
|
|
97
|
+
| `latticeai/core/multi_agent.py` | `lattice_brain/runtime/multi_agent.py` |
|
|
98
|
+
| `latticeai/services/agent_runtime.py` | `lattice_brain/runtime/agent_runtime.py` |
|
|
99
|
+
| `latticeai/core/workflow_engine.py` | `lattice_brain/workflow.py` |
|
|
100
|
+
| `latticeai/services/kg_portability.py` | `lattice_brain/portability.py` |
|
|
101
|
+
|
|
102
|
+
19 files moved with history; 2 new subpackage `__init__.py` files
|
|
103
|
+
(`lattice_brain/graph/`, `lattice_brain/runtime/`).
|
|
104
|
+
|
|
105
|
+
Import edges rewritten inside moved code (the only source changes to the
|
|
106
|
+
implementations):
|
|
107
|
+
|
|
108
|
+
- `graph/_kg_common.py`: `latticeai.brain.schema` → `.schema`;
|
|
109
|
+
`lattice_brain.embeddings` → `..embeddings`
|
|
110
|
+
- `graph/projection.py`: lazy `latticeai.core.graph_curator` → `.curator`
|
|
111
|
+
- `graph/provenance.py`: lazy `kg_schema` → `.schema`
|
|
112
|
+
- `graph/network.py`: `lattice_brain.identity` → `.identity`
|
|
113
|
+
- `graph/store.py`: lazy `lattice_brain.storage` → `..storage`
|
|
114
|
+
- `memory.py`: `latticeai.services.ingestion` → `.ingestion`
|
|
115
|
+
- `ingestion.py`: `latticeai.core.hooks` → `.runtime.hooks`
|
|
116
|
+
- `runtime/agent_runtime.py`: `latticeai.core.multi_agent` → `.multi_agent`
|
|
117
|
+
- `portability.py`: absolute `lattice_brain.*` → relative; lazy identity →
|
|
118
|
+
`.graph.identity`
|
|
119
|
+
- `runtime/hooks.py`: three `binding` metadata strings updated to the new
|
|
120
|
+
physical paths
|
|
121
|
+
|
|
122
|
+
## 4. Re-Export Modules Deleted / Replaced
|
|
123
|
+
|
|
124
|
+
Deleted (the old `lattice_brain → latticeai.brain` re-exports — the "fake
|
|
125
|
+
extraction" layer):
|
|
126
|
+
`lattice_brain/{_kg_common,schema,store,write_master,retrieval,discovery,documents,ingest,projection,provenance,network,identity}.py`
|
|
127
|
+
|
|
128
|
+
Each path was recreated as an **internal alias shim** (`sys.modules[__name__] =
|
|
129
|
+
lattice_brain.graph.<name>`), so old flat imports keep working with module
|
|
130
|
+
identity preserved (the shim and the physical module are the same object —
|
|
131
|
+
singletons, `isinstance`, and monkeypatching are unaffected). These alias the
|
|
132
|
+
package to itself; nothing re-exports `latticeai` anymore.
|
|
133
|
+
|
|
134
|
+
## 5. Compatibility Shims Kept (latticeai side)
|
|
135
|
+
|
|
136
|
+
Deprecation shims (emit `DeprecationWarning`, alias the physical module):
|
|
137
|
+
|
|
138
|
+
- `latticeai/brain/__init__.py` (re-exports the public surface from
|
|
139
|
+
`lattice_brain`)
|
|
140
|
+
- `latticeai/brain/{store,schema,retrieval,discovery,documents,ingest,projection,provenance,write_master,network,identity,_kg_common,memory,context,conversations}.py`
|
|
141
|
+
|
|
142
|
+
Silent alias shims (still-supported old paths):
|
|
143
|
+
|
|
144
|
+
- `latticeai/core/hooks.py` → `lattice_brain.runtime.hooks`
|
|
145
|
+
- `latticeai/core/multi_agent.py` → `lattice_brain.runtime.multi_agent`
|
|
146
|
+
- `latticeai/core/workflow_engine.py` → `lattice_brain.workflow`
|
|
147
|
+
- `latticeai/core/graph_curator.py` → `lattice_brain.graph.curator`
|
|
148
|
+
- `latticeai/services/ingestion.py` → `lattice_brain.ingestion`
|
|
149
|
+
- `latticeai/services/agent_runtime.py` → `lattice_brain.runtime.agent_runtime`
|
|
150
|
+
- `latticeai/services/kg_portability.py` → `lattice_brain.portability`
|
|
151
|
+
|
|
152
|
+
Root-level shims (`kg_schema.py`, `knowledge_graph.py`, …) continue to work
|
|
153
|
+
unchanged through the flat `lattice_brain.*` paths.
|
|
154
|
+
|
|
155
|
+
## 6. Consumers Updated to Import `lattice_brain` Directly
|
|
156
|
+
|
|
157
|
+
`latticeai/app_factory.py`, `latticeai/core/{agent,agent_registry,builtin_hooks}.py`,
|
|
158
|
+
`latticeai/api/{hooks,tools,computer_use,agents,browser,workflow_designer,chat,mcp}.py`,
|
|
159
|
+
`latticeai/services/{platform_runtime,run_executor,upload_service}.py`,
|
|
160
|
+
`p_reinforce.py`, `scripts/bump_version.py`, `scripts/wheel_smoke.py`, and all
|
|
161
|
+
test modules now use the physical `lattice_brain` paths. Zero non-shim
|
|
162
|
+
references to the old module locations remain.
|
|
163
|
+
|
|
164
|
+
## 7. New Tests
|
|
165
|
+
|
|
166
|
+
`tests/unit/test_lattice_brain_isolation.py`:
|
|
167
|
+
|
|
168
|
+
1. **`test_lattice_brain_never_imports_latticeai`** — subprocess installs a
|
|
169
|
+
`sys.meta_path` finder that raises on any `latticeai` import, imports every
|
|
170
|
+
`lattice_brain` module via `pkgutil.walk_packages`, resolves every lazy
|
|
171
|
+
facade export, and asserts `latticeai` never entered `sys.modules`. This
|
|
172
|
+
test fails if `lattice_brain` ever imports `latticeai`.
|
|
173
|
+
2. **`test_lattice_brain_usable_in_isolation`** — with the same import block
|
|
174
|
+
active and FastAPI never started: `BrainCore` construction, ingestion
|
|
175
|
+
pipeline → graph write, graph search, conversation store append/count,
|
|
176
|
+
context assembly, workflow engine run, agent runtime/hooks availability,
|
|
177
|
+
and an encrypted `.latticebrain` archive create → inspect → verify
|
|
178
|
+
round-trip.
|
|
179
|
+
|
|
180
|
+
## 8. Packaging / Version Changes
|
|
181
|
+
|
|
182
|
+
- `pyproject.toml`: packages now include `lattice_brain.graph` and
|
|
183
|
+
`lattice_brain.runtime`; version `4.4.0`.
|
|
184
|
+
- `scripts/wheel_smoke.py`: import matrix extended with the new subpackages
|
|
185
|
+
and modules.
|
|
186
|
+
- `scripts/bump_version.py`: `MULTI_AGENT_VERSION` target re-pointed to
|
|
187
|
+
`lattice_brain/runtime/multi_agent.py`.
|
|
188
|
+
- All 13 synchronized version copies bumped to `4.4.0` via
|
|
189
|
+
`scripts/bump_version.py` (Python, npm, lockfiles, VSIX, Tauri, asset
|
|
190
|
+
manifest, runtime constants).
|
|
191
|
+
- Docs updated: `ARCHITECTURE.md` (packaging note now describes the physical
|
|
192
|
+
layout and the isolation guarantee), `README.md` (Brain Core claim, history,
|
|
193
|
+
artifact names), `FEATURE_STATUS.md`, `SECURITY.md` (supported versions),
|
|
194
|
+
`RELEASE_NOTES.md`, `RELEASE_NOTES_v4.4.0.md`, `docs/CHANGELOG.md`,
|
|
195
|
+
`CHANGELOG.md` pointer.
|
|
196
|
+
|
|
197
|
+
## 9. User Data and Behavior
|
|
198
|
+
|
|
199
|
+
No storage schema, migration, archive format, or API change. The SQLite
|
|
200
|
+
default engine, Postgres opt-in path, `.latticebrain` archive format, and
|
|
201
|
+
backup/restore flows are byte-identical code, relocated. Old pickles are not
|
|
202
|
+
used; module identity through shims keeps any dynamic lookups working.
|
|
203
|
+
|
|
204
|
+
## 10. Validation Results
|
|
205
|
+
|
|
206
|
+
Environment note: final release validation ran locally on macOS with Python
|
|
207
|
+
3.12.13 (`LTCAI_PYTHON=/tmp/ltcai-v440-py312/bin/python`), Node 26.0.0,
|
|
208
|
+
npm 11.12.1, Rust 1.96.0, Cargo 1.96.0, and Tauri CLI 2.0.0.
|
|
209
|
+
|
|
210
|
+
| Check | Result |
|
|
211
|
+
| --- | --- |
|
|
212
|
+
| Python compile (`compileall` over `lattice_brain`, `latticeai`, `tests`, `tools`, `scripts`, root modules) | PASS |
|
|
213
|
+
| `ruff check .` | PASS (no findings) |
|
|
214
|
+
| Unit tests (`pytest tests/unit`) | **604 passed** (includes the 2 new isolation tests) |
|
|
215
|
+
| Integration tests (`pytest tests/integration` against live uvicorn on localhost) | 9 passed, 1 skipped (live-Postgres test, opt-in by design) |
|
|
216
|
+
| `lattice_brain` isolation tests | PASS (both) |
|
|
217
|
+
| No `lattice_brain → latticeai` import test | PASS |
|
|
218
|
+
| Graph/search/ingestion tests (`test_kg_*`, `test_ingestion_pipeline`, `test_browser_ingestion`, …) | PASS (within unit suite) |
|
|
219
|
+
| Backup/restore + `.latticebrain` archive tests (`test_kg_portability`, archive round-trip in isolation test) | PASS |
|
|
220
|
+
| Frontend lint (`npm run lint`) | PASS |
|
|
221
|
+
| Frontend typecheck (`tsc --noEmit` + VS Code extension `tsc`) | PASS |
|
|
222
|
+
| Playwright visual tests (`npx playwright test`) | **12 passed** |
|
|
223
|
+
| Tauri check (`cargo check`) | PASS (existing transitive `block v0.1.6` future-incompat warning) |
|
|
224
|
+
| Tauri DMG build (`npm run release:artifacts`) | PASS (`Lattice AI_4.4.0_aarch64.dmg`) |
|
|
225
|
+
| Release artifact validation (`scripts/validate_release_artifacts.py 4.4.0 --require-vsix --require-tgz --require-dmg`) | PASS (warns about historical versions in `dist/`, as designed) |
|
|
226
|
+
| Wheel smoke | PASS (29 wheel modules import from the wheel; `/health` returns `4.4.0`) |
|
|
227
|
+
| `npm pack --dry-run` | PASS (315 files) |
|
|
228
|
+
|
|
229
|
+
## 11. v4.4.0 Artifacts Built
|
|
230
|
+
|
|
231
|
+
- `dist/ltcai-4.4.0-py3-none-any.whl` (contains `lattice_brain/graph/*`,
|
|
232
|
+
`lattice_brain/runtime/*`; verified by wheel content check + smoke)
|
|
233
|
+
- `dist/ltcai-4.4.0.tar.gz`
|
|
234
|
+
- `ltcai-4.4.0.tgz` (npm pack)
|
|
235
|
+
- `dist/ltcai-4.4.0.vsix` (built via `scripts/build_vsix.mjs`)
|
|
236
|
+
- `src-tauri/target/release/bundle/dmg/Lattice AI_4.4.0_aarch64.dmg`
|
|
237
|
+
|
|
238
|
+
Per instructions: GitHub Release attachment uses only these exact validated
|
|
239
|
+
v4.4.0 artifacts. External package registries are not published.
|
|
@@ -5,22 +5,21 @@
|
|
|
5
5
|
> completed analysis. **Update this file before ending any phase and before any
|
|
6
6
|
> likely session/context/usage limit.**
|
|
7
7
|
>
|
|
8
|
-
> Last updated: 2026-06-
|
|
8
|
+
> Last updated: 2026-06-13 — v4.3.3 Dead-Code Cleanup Release; Remaining Gaps remain empty
|
|
9
9
|
|
|
10
10
|
---
|
|
11
11
|
|
|
12
|
-
## 0. RELEASE STATUS (v4.3.
|
|
13
|
-
|
|
14
|
-
**v4.3.
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
deploy to production targets.
|
|
12
|
+
## 0. RELEASE STATUS (v4.3.3)
|
|
13
|
+
|
|
14
|
+
**v4.3.3 promotes the post-cleanup main tree after the independent dead-code,
|
|
15
|
+
architecture, and runtime audit without redesigning the Digital Brain frontend,
|
|
16
|
+
Brain Core, storage, or agent/workflow architecture.** Latest implementation
|
|
17
|
+
milestone: v4.3.2 product polish plus post-audit cleanup, architecture
|
|
18
|
+
documentation correction, Vercel/static-docs readiness, README badge
|
|
19
|
+
restoration, and exact-current-main release artifacts.
|
|
20
|
+
The v4.3.3 process creates a GitHub Release from locally validated artifacts.
|
|
21
|
+
PyPI, npm Registry, VS Code Marketplace, Open VSX, and production deployments
|
|
22
|
+
remain owner-only external publishing steps.
|
|
24
23
|
Remaining implementation gaps: **none**.
|
|
25
24
|
Owner-only blockers: pptx history rewrite (requires force-push/owner decision)
|
|
26
25
|
and consent-gated production embedder provisioning (silent default download is
|
|
@@ -28,12 +27,12 @@ not permitted).
|
|
|
28
27
|
|
|
29
28
|
## Remaining Gaps
|
|
30
29
|
|
|
31
|
-
None. v4.3.
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
intentionally not implementation gaps.
|
|
30
|
+
None. v4.3.3 preserves the already-empty v4.3.2 gap list and promotes the
|
|
31
|
+
post-cleanup tree: Brain graph exploration remains real and API-backed, raw
|
|
32
|
+
product JSON dumps remain replaced with readable state, archive import/restore
|
|
33
|
+
flows remain exposed through existing APIs, desktop sidecar behavior remains
|
|
34
|
+
validated, and exact v4.3.3 release artifacts are the release target.
|
|
35
|
+
Owner-only blockers above are intentionally not implementation gaps.
|
|
37
36
|
|
|
38
37
|
## 1. Program Charter (from the user's v4.0.0 directive)
|
|
39
38
|
|
package/frontend/openapi.json
CHANGED
|
@@ -5,7 +5,7 @@ import { ApiResult } from "@/api/client";
|
|
|
5
5
|
import { Badge } from "@/components/ui/badge";
|
|
6
6
|
import { Button } from "@/components/ui/button";
|
|
7
7
|
import { Card, CardContent, CardDescription, CardHeader, CardTitle } from "@/components/ui/card";
|
|
8
|
-
import { cn, asArray, fmtNumber, titleize } from "@/lib/utils";
|
|
8
|
+
import { cn, asArray, fmtNumber, shortId, titleize } from "@/lib/utils";
|
|
9
9
|
|
|
10
10
|
export function SourceBadge({ result }: { result?: Pick<ApiResult, "source" | "ok" | "status"> }) {
|
|
11
11
|
if (!result) return <Badge variant="muted">not loaded</Badge>;
|
|
@@ -81,12 +81,41 @@ export function StatGrid({ stats }: { stats: Array<{ label: string; value: unkno
|
|
|
81
81
|
);
|
|
82
82
|
}
|
|
83
83
|
|
|
84
|
-
|
|
85
|
-
return (
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
);
|
|
84
|
+
function isRecord(value: unknown): value is Record<string, unknown> {
|
|
85
|
+
return Boolean(value && typeof value === "object" && !Array.isArray(value));
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
function scalarText(value: unknown) {
|
|
89
|
+
if (value === null || value === undefined || value === "") return "-";
|
|
90
|
+
if (typeof value === "number") return Number.isFinite(value) ? fmtNumber(value) : "-";
|
|
91
|
+
if (typeof value === "boolean") return value ? "Enabled" : "Disabled";
|
|
92
|
+
return String(value);
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
export function ValuePreview({ value }: { value: unknown }) {
|
|
96
|
+
if (typeof value === "boolean") {
|
|
97
|
+
return <Badge variant={value ? "success" : "muted"}>{value ? "enabled" : "disabled"}</Badge>;
|
|
98
|
+
}
|
|
99
|
+
if (Array.isArray(value)) {
|
|
100
|
+
if (!value.length) return <span className="text-muted-foreground">None</span>;
|
|
101
|
+
const primitive = value.every((item) => item === null || ["string", "number", "boolean"].includes(typeof item));
|
|
102
|
+
if (primitive) {
|
|
103
|
+
return (
|
|
104
|
+
<span className="flex flex-wrap gap-1">
|
|
105
|
+
{value.slice(0, 5).map((item, index) => <Badge key={`${String(item)}-${index}`} variant="muted">{scalarText(item)}</Badge>)}
|
|
106
|
+
{value.length > 5 ? <Badge variant="muted">+{value.length - 5}</Badge> : null}
|
|
107
|
+
</span>
|
|
108
|
+
);
|
|
109
|
+
}
|
|
110
|
+
return <span className="text-muted-foreground">{fmtNumber(value.length)} records</span>;
|
|
111
|
+
}
|
|
112
|
+
if (isRecord(value)) {
|
|
113
|
+
const keys = Object.keys(value);
|
|
114
|
+
if (!keys.length) return <span className="text-muted-foreground">No fields</span>;
|
|
115
|
+
return <span className="text-muted-foreground">{keys.slice(0, 4).map(titleize).join(", ")}{keys.length > 4 ? ` +${keys.length - 4}` : ""}</span>;
|
|
116
|
+
}
|
|
117
|
+
const text = scalarText(value);
|
|
118
|
+
return <span className="break-words">{text.length > 96 ? shortId(text, 96) : text}</span>;
|
|
90
119
|
}
|
|
91
120
|
|
|
92
121
|
export function KeyValueList({ data, limit = 8 }: { data: Record<string, unknown>; limit?: number }) {
|
|
@@ -97,13 +126,63 @@ export function KeyValueList({ data, limit = 8 }: { data: Record<string, unknown
|
|
|
97
126
|
{rows.map(([key, value]) => (
|
|
98
127
|
<div key={key} className="grid grid-cols-[minmax(9rem,0.5fr)_1fr] gap-3 p-3 text-sm">
|
|
99
128
|
<span className="font-medium text-muted-foreground">{titleize(key)}</span>
|
|
100
|
-
<span className="break-words"
|
|
129
|
+
<span className="min-w-0 break-words"><ValuePreview value={value} /></span>
|
|
101
130
|
</div>
|
|
102
131
|
))}
|
|
103
132
|
</div>
|
|
104
133
|
);
|
|
105
134
|
}
|
|
106
135
|
|
|
136
|
+
export function StructuredView({
|
|
137
|
+
value,
|
|
138
|
+
titleKey = "title",
|
|
139
|
+
metaKey = "status",
|
|
140
|
+
limit = 8,
|
|
141
|
+
}: {
|
|
142
|
+
value: unknown;
|
|
143
|
+
titleKey?: string;
|
|
144
|
+
metaKey?: string;
|
|
145
|
+
limit?: number;
|
|
146
|
+
}) {
|
|
147
|
+
if (Array.isArray(value)) {
|
|
148
|
+
if (!value.length) return <EmptyState title="No records" detail="The API returned an empty collection." />;
|
|
149
|
+
if (value.every((item) => isRecord(item))) {
|
|
150
|
+
return <EntityList items={value} titleKey={titleKey} metaKey={metaKey} limit={limit} />;
|
|
151
|
+
}
|
|
152
|
+
return (
|
|
153
|
+
<div className="flex flex-wrap gap-1 rounded-md border border-border bg-background p-3">
|
|
154
|
+
{value.slice(0, limit).map((item, index) => <Badge key={`${String(item)}-${index}`} variant="muted">{scalarText(item)}</Badge>)}
|
|
155
|
+
{value.length > limit ? <Badge variant="muted">+{value.length - limit}</Badge> : null}
|
|
156
|
+
</div>
|
|
157
|
+
);
|
|
158
|
+
}
|
|
159
|
+
if (isRecord(value)) return <KeyValueList data={value} limit={limit} />;
|
|
160
|
+
return (
|
|
161
|
+
<div className="rounded-md border border-border bg-background p-3 text-sm">
|
|
162
|
+
<ValuePreview value={value} />
|
|
163
|
+
</div>
|
|
164
|
+
);
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
export function OperationResult({
|
|
168
|
+
result,
|
|
169
|
+
successLabel = "Request completed",
|
|
170
|
+
}: {
|
|
171
|
+
result?: ApiResult<unknown> | null;
|
|
172
|
+
successLabel?: string;
|
|
173
|
+
}) {
|
|
174
|
+
if (!result) return null;
|
|
175
|
+
if (!result.ok) {
|
|
176
|
+
return <EmptyState title="Request unavailable" detail={result.error || <ValuePreview value={result.data} />} />;
|
|
177
|
+
}
|
|
178
|
+
return (
|
|
179
|
+
<div className="space-y-2 rounded-md border border-border bg-background p-3">
|
|
180
|
+
<Badge variant="success">{successLabel}</Badge>
|
|
181
|
+
<StructuredView value={result.data} />
|
|
182
|
+
</div>
|
|
183
|
+
);
|
|
184
|
+
}
|
|
185
|
+
|
|
107
186
|
export function EntityList({
|
|
108
187
|
items,
|
|
109
188
|
titleKey = "title",
|
|
@@ -125,8 +204,11 @@ export function EntityList({
|
|
|
125
204
|
<div className="font-medium">{String(item[titleKey] || item.name || item.id || `Record ${index + 1}`)}</div>
|
|
126
205
|
<Badge variant="muted">{String(item[metaKey] || item.status || item.state || "record")}</Badge>
|
|
127
206
|
</div>
|
|
128
|
-
{item.summary || item.description || item.path ? (
|
|
129
|
-
<p className="mt-1 text-sm text-muted-foreground">{String(item.summary || item.description || item.path)}</p>
|
|
207
|
+
{item.summary || item.description || item.path || (item.id && item[titleKey] !== item.id) ? (
|
|
208
|
+
<p className="mt-1 text-sm text-muted-foreground">{String(item.summary || item.description || item.path || item.id)}</p>
|
|
209
|
+
) : null}
|
|
210
|
+
{item.id && item[titleKey] !== item.id ? (
|
|
211
|
+
<div className="mt-1 text-xs text-muted-foreground">{shortId(item.id, 48)}</div>
|
|
130
212
|
) : null}
|
|
131
213
|
</div>
|
|
132
214
|
))}
|
|
@@ -3,7 +3,7 @@ import { useMutation, useQuery, useQueryClient } from "@tanstack/react-query";
|
|
|
3
3
|
import ReactFlow, { Background, Controls, Edge, Node } from "reactflow";
|
|
4
4
|
import { Bot, GitBranch, PauseCircle, Play, Workflow } from "lucide-react";
|
|
5
5
|
import { latticeApi } from "@/api/client";
|
|
6
|
-
import { ActionButton, DataPanel, EntityList,
|
|
6
|
+
import { ActionButton, DataPanel, EntityList, KeyValueList, OperationResult, StructuredView, Tabs } from "@/components/primitives";
|
|
7
7
|
import { Badge } from "@/components/ui/badge";
|
|
8
8
|
import { Button } from "@/components/ui/button";
|
|
9
9
|
import { Card, CardContent, CardDescription, CardHeader, CardTitle } from "@/components/ui/card";
|
|
@@ -81,11 +81,11 @@ function AgentsPanel() {
|
|
|
81
81
|
>
|
|
82
82
|
<Play className="h-4 w-4" /> {runtimeReady ? "Run pipeline" : "Agent execution unavailable"}
|
|
83
83
|
</Button>
|
|
84
|
-
{run.data ? <
|
|
84
|
+
{run.data ? <OperationResult result={run.data} successLabel="Agent run request completed" /> : null}
|
|
85
85
|
</CardContent>
|
|
86
86
|
</Card>
|
|
87
87
|
<DataPanel title="Runtime status" result={runtime.data}>
|
|
88
|
-
{(data) => <
|
|
88
|
+
{(data) => <StructuredView value={data} />}
|
|
89
89
|
</DataPanel>
|
|
90
90
|
<DataPanel title="Agent registry" result={registry.data}>
|
|
91
91
|
{(data) => (
|
|
@@ -99,7 +99,7 @@ function AgentsPanel() {
|
|
|
99
99
|
)}
|
|
100
100
|
</DataPanel>
|
|
101
101
|
<DataPanel title="Agent capabilities" result={caps.data}>
|
|
102
|
-
{(data) => <
|
|
102
|
+
{(data) => <StructuredView value={data} />}
|
|
103
103
|
</DataPanel>
|
|
104
104
|
</div>
|
|
105
105
|
);
|
|
@@ -129,7 +129,9 @@ function RunsPanel() {
|
|
|
129
129
|
<div key={token} className="flex flex-wrap items-center justify-between gap-3 rounded-md border border-border p-3">
|
|
130
130
|
<div>
|
|
131
131
|
<div className="font-medium">{shortId(token, 16)}</div>
|
|
132
|
-
<div className="
|
|
132
|
+
<div className="mt-2">
|
|
133
|
+
<KeyValueList data={(value || {}) as Record<string, unknown>} limit={5} />
|
|
134
|
+
</div>
|
|
133
135
|
</div>
|
|
134
136
|
<div className="flex gap-2">
|
|
135
137
|
<ActionButton label="Approve" action={() => latticeApi.approvePermission(token)} invalidate={["permissions"]} />
|
|
@@ -228,8 +230,8 @@ function WorkflowsPanel() {
|
|
|
228
230
|
</div>
|
|
229
231
|
<Textarea value={importText} onChange={(event) => setImportText(event.target.value)} placeholder="Paste exported workflow JSON" />
|
|
230
232
|
<Button variant="outline" disabled={!importText.trim() || importWorkflow.isPending} onClick={() => importWorkflow.mutate()}>Import</Button>
|
|
231
|
-
{create.data ? <
|
|
232
|
-
{importWorkflow.data ? <
|
|
233
|
+
{create.data ? <OperationResult result={create.data} successLabel="Workflow created" /> : null}
|
|
234
|
+
{importWorkflow.data ? <OperationResult result={importWorkflow.data} successLabel="Workflow imported" /> : null}
|
|
233
235
|
</div>
|
|
234
236
|
{workflows.length ? workflows.map((workflow) => {
|
|
235
237
|
const id = String(workflow.id || workflow.workflow_id);
|
|
@@ -247,7 +249,7 @@ function WorkflowsPanel() {
|
|
|
247
249
|
)}
|
|
248
250
|
</DataPanel>
|
|
249
251
|
<DataPanel title="Trigger configuration" result={triggers.data} className="xl:col-span-2">
|
|
250
|
-
{(data) => <
|
|
252
|
+
{(data) => <StructuredView value={data} />}
|
|
251
253
|
</DataPanel>
|
|
252
254
|
</div>
|
|
253
255
|
);
|
|
@@ -300,7 +302,7 @@ function ToolsPanel() {
|
|
|
300
302
|
const tools = useQuery({ queryKey: ["toolPermissions"], queryFn: latticeApi.toolPermissions });
|
|
301
303
|
return (
|
|
302
304
|
<DataPanel title="Tool governance" result={tools.data}>
|
|
303
|
-
{(data) => <
|
|
305
|
+
{(data) => <EntityList items={(data as Record<string, unknown>).permissions || data} titleKey="tool" metaKey="risk" />}
|
|
304
306
|
</DataPanel>
|
|
305
307
|
);
|
|
306
308
|
}
|
|
@@ -2,7 +2,7 @@ import * as React from "react";
|
|
|
2
2
|
import { useMutation, useQuery, useQueryClient } from "@tanstack/react-query";
|
|
3
3
|
import { ImagePlus, MessageSquare, Send, Trash2 } from "lucide-react";
|
|
4
4
|
import { latticeApi } from "@/api/client";
|
|
5
|
-
import { DataPanel, EmptyState, EntityList,
|
|
5
|
+
import { DataPanel, EmptyState, EntityList, SourceBadge, StructuredView } from "@/components/primitives";
|
|
6
6
|
import { Badge } from "@/components/ui/badge";
|
|
7
7
|
import { Button } from "@/components/ui/button";
|
|
8
8
|
import { Card, CardContent, CardDescription, CardHeader, CardTitle } from "@/components/ui/card";
|
|
@@ -193,7 +193,7 @@ function ContextPreview({ question, trace }: { question: string; trace: unknown
|
|
|
193
193
|
<CardTitle>Why this context</CardTitle>
|
|
194
194
|
<CardDescription>Trace emitted by `/chat` when the backend includes it.</CardDescription>
|
|
195
195
|
</CardHeader>
|
|
196
|
-
<CardContent>{trace ? <
|
|
196
|
+
<CardContent>{trace ? <StructuredView value={trace} /> : <EmptyState title="No trace yet" />}</CardContent>
|
|
197
197
|
</Card>
|
|
198
198
|
</>
|
|
199
199
|
);
|