ltcai 11.4.0 → 11.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 +48 -44
- package/docs/CHANGELOG.md +26 -0
- package/docs/COMMUNITY_AND_PLUGINS.md +1 -1
- package/docs/DEVELOPMENT.md +1 -1
- package/docs/ONBOARDING.md +1 -1
- package/docs/OPERATIONS.md +1 -1
- package/docs/TRUST_MODEL.md +1 -1
- package/docs/WHY_LATTICE.md +1 -1
- package/docs/kg-schema.md +1 -1
- package/docs/v11.4.0_RUST_FOUNDATION_PLAN.md +11 -6
- package/docs/v11.5.0_RUST_COMPLETE_PLAN.md +145 -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/index_jobs.py +145 -0
- package/latticeai/core/legacy_compatibility.py +1 -1
- package/latticeai/core/marketplace.py +1 -1
- package/latticeai/core/messages.py +5 -0
- package/latticeai/core/workspace_os_constants.py +1 -1
- package/latticeai/runtime/build_phases/features.py +14 -0
- package/latticeai/services/architecture_readiness.py +1 -1
- package/latticeai/services/product_readiness.py +1 -1
- package/package.json +1 -1
- package/scripts/check_current_release_docs.mjs +1 -1
- package/scripts/check_server_i18n.mjs +1 -0
- package/scripts/chunking_parity_corpus.py +449 -0
- package/scripts/generate_agent_parity_fixtures.py +752 -0
- package/scripts/generate_chunking_parity_fixtures.py +259 -0
- package/scripts/generate_rust_parity_fixtures.py +525 -90
- package/scripts/release_screen_claims.json +11 -0
- package/src-tauri/Cargo.lock +47 -4
- package/src-tauri/Cargo.toml +11 -4
- package/src-tauri/src/backend.rs +251 -140
- package/src-tauri/src/main.rs +16 -4
- package/src-tauri/src/topology.rs +356 -0
- package/src-tauri/tauri.conf.json +1 -1
- package/static/app/asset-manifest.json +40 -40
- package/static/app/assets/{Act-yYpYnn0v.js → Act-CWnxSCgN.js} +1 -1
- package/static/app/assets/{AdminConsole-DL3Cr5pL.js → AdminConsole-BEQYU6kF.js} +1 -1
- package/static/app/assets/{Brain-C1HBN0Wf.js → Brain-DWu1BhFg.js} +1 -1
- package/static/app/assets/{BrainHome-DoXRhUUC.js → BrainHome-95Hilr9R.js} +1 -1
- package/static/app/assets/{BrainSignals-6yR6ir5t.js → BrainSignals-QdeqCpAF.js} +1 -1
- package/static/app/assets/{Capture-CFIRsFNE.js → Capture-BHpCxnzb.js} +1 -1
- package/static/app/assets/{Chronicle-BZbEgiwN.js → Chronicle-B4xYKoed.js} +1 -1
- package/static/app/assets/{CommandPalette-D2pMxC2I.js → CommandPalette-BVXnttSz.js} +1 -1
- package/static/app/assets/{Library-DwO3yZST.js → Library-DgYcHome.js} +1 -1
- package/static/app/assets/{LivingBrain-Jn1GK0-S.js → LivingBrain-CrJLDbf7.js} +1 -1
- package/static/app/assets/{ProductFlow-B-w1R4Oo.js → ProductFlow-DFlScKoJ.js} +1 -1
- package/static/app/assets/{ReviewCard-6B27X8Vg.js → ReviewCard-Cy5f48Pj.js} +1 -1
- package/static/app/assets/{System-DW8F-2xL.js → System-NF8IfhTa.js} +1 -1
- package/static/app/assets/arrow-left-DwkSYrjR.js +1 -0
- package/static/app/assets/{bot-IM_E_Y12.js → bot-CucuhLhm.js} +1 -1
- package/static/app/assets/{brain-Ci1CkWjM.js → brain-BBnSryW_.js} +1 -1
- package/static/app/assets/{button-COwyqfHM.js → button-C2GUj2Ai.js} +1 -1
- package/static/app/assets/circle-check-CxOVPwYq.js +1 -0
- package/static/app/assets/{circle-pause-DEM4A1Y5.js → circle-pause-CbkWzBmG.js} +1 -1
- package/static/app/assets/{circle-play-C9djDuLd.js → circle-play-7lEaqHdJ.js} +1 -1
- package/static/app/assets/{cpu-DFdo1gw-.js → cpu-DAlCXlIy.js} +1 -1
- package/static/app/assets/{download-SnJL6oqk.js → download-RNhuuJwh.js} +1 -1
- package/static/app/assets/{folder-open-CqZeDkjE.js → folder-open-CLW4odzM.js} +1 -1
- package/static/app/assets/{hard-drive-j1jJXYYf.js → hard-drive-NKEiDIAJ.js} +1 -1
- package/static/app/assets/{index-_u5iUHDr.js → index-DMurvUuR.js} +3 -3
- package/static/app/assets/{input-B0lPdRQZ.js → input-D2UhPC1X.js} +1 -1
- package/static/app/assets/{link-2-CoFbooHS.js → link-2-6amKbP_P.js} +1 -1
- package/static/app/assets/{permissionCopy-BsyLxtao.js → permissionCopy-Cu9TZtdR.js} +1 -1
- package/static/app/assets/{primitives-DEbN-d6p.js → primitives-gPsccucr.js} +1 -1
- package/static/app/assets/search-Cj_TKk_2.js +1 -0
- package/static/app/assets/{share-2-CVtZ_ewX.js → share-2-Bau7KkPq.js} +1 -1
- package/static/app/assets/{shield-alert-CBi2GNWM.js → shield-alert-BufNYypi.js} +1 -1
- package/static/app/assets/{textarea-DNMpB5ih.js → textarea-BQnVWhYs.js} +1 -1
- package/static/app/assets/{useFocusTrap-C83t3GXF.js → useFocusTrap-B3_w60si.js} +1 -1
- package/static/app/assets/{useMutation-DtbJDoyz.js → useMutation-BHhCflT6.js} +1 -1
- package/static/app/assets/{useQuery-Dcp1OChy.js → useQuery-rBWfI-5t.js} +1 -1
- package/static/app/assets/{utils-BlZr7Pd4.js → utils-V_5-wxr5.js} +1 -1
- package/static/app/assets/{workspace-jJY4RuAV.js → workspace-K1zjYUHj.js} +1 -1
- package/static/app/index.html +3 -3
- package/static/sw.js +1 -1
- package/static/app/assets/arrow-left-DXvKg9U6.js +0 -1
- package/static/app/assets/circle-check-DfInj-qD.js +0 -1
- package/static/app/assets/search-BybIWPNd.js +0 -1
package/README.md
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
[](https://github.com/TaeSooPark-PTS/LatticeAI/actions/workflows/ci.yml)
|
|
12
12
|
[](LICENSE)
|
|
13
13
|
|
|
14
|
-

|
|
15
15
|
|
|
16
16
|
Chat, files, folders, notes, and web pages all flow into one durable knowledge
|
|
17
17
|
graph on your computer. Any model — local MLX or cloud — can speak with that
|
|
@@ -24,10 +24,10 @@ memory. Nothing leaves your machine without explicit consent.
|
|
|
24
24
|
|
|
25
25
|
| | |
|
|
26
26
|
| --- | --- |
|
|
27
|
-
| **See your Brain's story in time** — a growth curve, an activity heatmap, and each day's story, rewindable to any past moment  | **Chat with a Brain that remembers** — every conversation grows durable, source-linked memory  |
|
|
28
|
+
| **See how knowledge connects** — a real relationship graph, not a file list  | **Capture anything** — files, whole folders, notes, screenshots, web pages  |
|
|
29
|
+
| **Automate with review** — agent changes become proposals you approve first  | **Pick a model in one click** — recommended local models for your hardware  |
|
|
30
|
+
| **Watch a file become memory** — three named steps, not a pipeline diagram  | **Say how much it may do alone** — one dial in plain words; dangerous actions stay blocked either way  |
|
|
31
31
|
|
|
32
32
|
## Why Lattice AI
|
|
33
33
|
|
|
@@ -58,54 +58,57 @@ First-run flow — wake the Brain, pick the owner, load a recommended model:
|
|
|
58
58
|
|
|
59
59
|
| | | |
|
|
60
60
|
| --- | --- | --- |
|
|
61
|
-
|  |  |  |
|
|
62
62
|
|
|
63
63
|
Screenshot index and capture notes:
|
|
64
|
-
[output/release/v11.
|
|
64
|
+
[output/release/v11.5.0/SCREENSHOT_INDEX.md](output/release/v11.5.0/SCREENSHOT_INDEX.md)
|
|
65
65
|
|
|
66
66
|
## Current Release
|
|
67
67
|
|
|
68
|
-
The current release is **11.
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
pieces**,
|
|
72
|
-
|
|
73
|
-
- **
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
68
|
+
The current release is **11.5.0 — Rust Complete**:
|
|
69
|
+
|
|
70
|
+
Phases 2–4 of the Rust roadmap land in one release — as **working, proven
|
|
71
|
+
pieces**, with Python converging to its target role: the AI Worker.
|
|
72
|
+
|
|
73
|
+
- **The desktop's front door is now the Rust gateway.** The Tauri shell
|
|
74
|
+
boots the supervisor + gateway topology by default and the webview
|
|
75
|
+
lives at the gateway origin. The one real blocker — a CSRF policy
|
|
76
|
+
bound to the worker's own port — is dissolved by environment
|
|
77
|
+
injection, proven live against the real Python worker (trusted
|
|
78
|
+
origins 200, foreign origins 403). Three escape hatches preserve the
|
|
79
|
+
previous topologies.
|
|
80
|
+
- **The native surface grew fourfold.** `lattice-retrieval` now serves
|
|
81
|
+
the three-channel service search, graph reads (search /
|
|
82
|
+
relationships / traverse), the full history read family, and the
|
|
83
|
+
chat context assembler — **191/191 exact-parity goldens, zero
|
|
84
|
+
epsilon**. `lattice-ingest` carries the typed chunker (332 golden
|
|
85
|
+
chunks, and a 26/26 mutation-test pass proving every constant
|
|
86
|
+
load-bearing) plus the polling folder watcher; writes stay delegated
|
|
87
|
+
to the worker, the single writer. `lattice-agent` carries the
|
|
88
|
+
permission kernel — **2,452 exact decision-table verdicts** — and
|
|
89
|
+
natively executes only validated read-only commands in a replaced
|
|
90
|
+
environment. `lattice-jobs` closes a documented gap: the durable
|
|
91
|
+
embed queue now has a scheduler (60s ticks, honest backoff,
|
|
92
|
+
`/host/jobs` status) driving a new fully-covered drain endpoint.
|
|
93
|
+
- **The honest boundary, stated.** The Python worker keeps the document
|
|
94
|
+
parser matrix, embedding production, LLM inference, mutating tool
|
|
95
|
+
execution, and all graph writes. The agent loop orchestration port
|
|
96
|
+
remains for a future release, for reasons written down in the plan.
|
|
97
|
+
|
|
98
|
+
All of it lands with the floor intact: **6,861 Python + 1,761 frontend
|
|
99
|
+
tests at 100.00% statement and branch coverage, 534 Rust workspace
|
|
100
|
+
tests**, four bidirectional golden families, mypy/ruff/clippy clean,
|
|
101
|
+
verified on macOS 3.14 and a fresh-resolve python 3.11 environment.
|
|
99
102
|
|
|
100
103
|
Release notes: [RELEASE.md](RELEASE.md) · Full history: [docs/CHANGELOG.md](docs/CHANGELOG.md)
|
|
101
104
|
|
|
102
|
-
Expected artifacts for 11.
|
|
105
|
+
Expected artifacts for 11.5.0 release must use exact filenames:
|
|
103
106
|
|
|
104
|
-
- `dist/ltcai-11.
|
|
105
|
-
- `dist/ltcai-11.
|
|
106
|
-
- `ltcai-11.
|
|
107
|
-
- `dist/ltcai-11.
|
|
108
|
-
- `src-tauri/target/release/bundle/dmg/Lattice AI_11.
|
|
107
|
+
- `dist/ltcai-11.5.0-py3-none-any.whl`
|
|
108
|
+
- `dist/ltcai-11.5.0.tar.gz`
|
|
109
|
+
- `ltcai-11.5.0.tgz`
|
|
110
|
+
- `dist/ltcai-11.5.0.vsix`
|
|
111
|
+
- `src-tauri/target/release/bundle/dmg/Lattice AI_11.5.0_aarch64.dmg`
|
|
109
112
|
|
|
110
113
|
Do not use wildcard artifact uploads. Package registry publishing remains owner-run.
|
|
111
114
|
|
|
@@ -140,6 +143,7 @@ See [ARCHITECTURE.md](ARCHITECTURE.md) for details and
|
|
|
140
143
|
|
|
141
144
|
| Version | Theme |
|
|
142
145
|
| --- | --- |
|
|
146
|
+
| 11.5.0 | Rust Complete |
|
|
143
147
|
| 11.4.0 | Rust Foundation |
|
|
144
148
|
| 11.3.0 | Time Remembers |
|
|
145
149
|
| 11.2.0 | All Systems On |
|
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
|
+
## [11.5.0] - 2026-08-11 — Rust Complete
|
|
8
|
+
|
|
9
|
+
### Added
|
|
10
|
+
- **Phase 2–4 완결** (docs/v11.5.0_RUST_COMPLETE_PLAN.md): 신규 크레이트
|
|
11
|
+
`lattice-ingest`(typed chunking 4전략 1:1 포트 — 골든 332청크 완전
|
|
12
|
+
일치·뮤테이션 26/26, mtime 폴링 워처, 워커 위임 단일 작성자),
|
|
13
|
+
`lattice-jobs`(60s 드레인 스케줄러·백오프·`/host/jobs`·옵트인
|
|
14
|
+
autoresume), `lattice-agent`(권한 커널 — 모드 판정 2,358 + 명령 검증
|
|
15
|
+
59 + shlex 35 완전 일치, 읽기 전용 명령 네이티브 실행, `/rust/agent/*`).
|
|
16
|
+
- `lattice-retrieval` 확장: 3채널 service-hybrid·graph_search·
|
|
17
|
+
relationship_search·traverse·히스토리 전 읽기·Context Assembler —
|
|
18
|
+
신규 패리티 116(총 191/191, 엡실론 0), 계약 pytest 199.
|
|
19
|
+
- Python additive: `POST /api/index/drain` + `GET /api/index/queue`
|
|
20
|
+
(문·분기 100%, ko/en 로컬라이즈 21번째 라우터) — "배경 임베드 큐를
|
|
21
|
+
아무도 몰지 않는다" 한계 해소.
|
|
22
|
+
- 게이트웨이 마운트 맵: `/rust/{search,graph,history,context,ingest,agent}`
|
|
23
|
+
+ `/host/jobs*`; `/host`·`/rust` 네임스페이스는 프록시로 새지 않음.
|
|
24
|
+
|
|
25
|
+
### Changed
|
|
26
|
+
- **데스크톱 front-door 기본화**: Tauri가 게이트웨이 토폴로지로 기동
|
|
27
|
+
(웹뷰=게이트웨이 origin), CSRF는 `LATTICEAI_CSRF_TRUSTED_ORIGINS`
|
|
28
|
+
주입으로 해소(실워커 라이브 검증), 안전 밸브
|
|
29
|
+
`LATTICEAI_DESKTOP_DIRECT=1`/`BACKEND_ORIGIN`/`NO_BACKEND` 유지,
|
|
30
|
+
`backend_status`에 topology/worker_origin/gateway_origin/jobs_running
|
|
31
|
+
추가(기존 6필드 보존). SSE 프록시 `X-Accel-Buffering: no` 보강.
|
|
32
|
+
|
|
7
33
|
## [11.4.0] - 2026-08-11 — Rust Foundation
|
|
8
34
|
|
|
9
35
|
### Added
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Community And Plugins
|
|
2
2
|
|
|
3
|
-
Current release: **11.
|
|
3
|
+
Current release: **11.5.0 — Rust Complete**.
|
|
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
|
package/docs/DEVELOPMENT.md
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
> **Status: canonical** — current contributor guidance, kept in sync with the
|
|
4
4
|
> current release.
|
|
5
5
|
|
|
6
|
-
Current release: **11.
|
|
6
|
+
Current release: **11.5.0 — Rust Complete**.
|
|
7
7
|
|
|
8
8
|
This document is for contributors working on the local-first Digital Brain
|
|
9
9
|
codebase. Product positioning and quick start stay in `README.md`; release
|
package/docs/ONBOARDING.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Lattice AI Onboarding
|
|
2
2
|
|
|
3
|
-
Current release: **11.
|
|
3
|
+
Current release: **11.5.0 — Rust Complete**.
|
|
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
|
package/docs/OPERATIONS.md
CHANGED
package/docs/TRUST_MODEL.md
CHANGED
package/docs/WHY_LATTICE.md
CHANGED
package/docs/kg-schema.md
CHANGED
|
@@ -156,12 +156,17 @@ Tauri 명령 5종(`backend_origin`/`backend_status`/`restart_backend`/
|
|
|
156
156
|
|
|
157
157
|
## 로드맵 (다이어그램 → 릴리스 매핑)
|
|
158
158
|
|
|
159
|
-
| Phase | 릴리스 | 내용 |
|
|
160
|
-
|
|
161
|
-
| 1 | **11.4.0** | workspace + core 읽기층 + retrieval 패리티 + host 수퍼바이저/게이트웨이(옵트인) + Tauri 통합 |
|
|
162
|
-
| 2 | 11.5.
|
|
163
|
-
| 3 | 11.
|
|
164
|
-
| 4 |
|
|
159
|
+
| Phase | 릴리스 | 내용 | 상태 |
|
|
160
|
+
|---|---|---|---|
|
|
161
|
+
| 1 | **11.4.0** | workspace + core 읽기층 + retrieval 패리티 + host 수퍼바이저/게이트웨이(옵트인) + Tauri 통합 | **출하됨** |
|
|
162
|
+
| 2 | **11.5.0** | 게이트웨이 front-door 기본화(데스크톱), KG 읽기·3채널 검색·history 네이티브, Ingestion Watch/Chunk/Dedup | **출하됨** |
|
|
163
|
+
| 3 | **11.5.0** | Jobs/Events/Scheduler, Context Builder 네이티브 | **출하됨** |
|
|
164
|
+
| 4 | **11.5.0** | Agent Runtime(Tools·Sandbox·Permission) Rust화 — 단, 루프 오케스트레이션 이식은 명시적 비-목표로 남음(v11.5.0 계획 §4c) | **출하됨(커널)** |
|
|
165
|
+
|
|
166
|
+
Phase 2~4는 원래 11.5.x~12.0으로 나뉘어 있었으나 한 릴리스로 합쳐 출하했다
|
|
167
|
+
([`v11.5.0_RUST_COMPLETE_PLAN.md`](v11.5.0_RUST_COMPLETE_PLAN.md)). 아래 §
|
|
168
|
+
"명시적 비-목표"의 네 항목 중 마지막(HNSW/quantized·CE rerank·이미지 late
|
|
169
|
+
fusion 패리티)만 여전히 미이식이며, 나머지는 11.5.0에서 닫혔다.
|
|
165
170
|
|
|
166
171
|
## 릴리스 체크리스트 (11.4.0)
|
|
167
172
|
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
# v11.5.0 — Rust Complete (설계 문서)
|
|
2
|
+
|
|
3
|
+
> 상태: 계획 → 구현 → **출하됨(v11.5.0)**. v11.4.0 Rust Foundation 계획의
|
|
4
|
+
> Phase 2·3·4를 한 릴리스로 완결한다. 원칙 불변: **작동하고 증명된
|
|
5
|
+
> 조각만 출하하고, Python 서버는 목표 다이어그램의 AI Worker로
|
|
6
|
+
> 수렴하되 제거되지 않는다.** 모든 네이티브 경로는 패리티 골든 또는
|
|
7
|
+
> 결정표 골든으로 잠근다.
|
|
8
|
+
>
|
|
9
|
+
> 통합 상태: **완료**. 네 크레이트의 라우터 팩토리는 게이트웨이의
|
|
10
|
+
> 리버스 프록시 폴스루보다 앞에 마운트되어 있고(`rust/lattice-host/src/gateway/mounts.rs`),
|
|
11
|
+
> 데스크톱은 기본으로 게이트웨이 토폴로지로 뜬다(`src-tauri/src/topology.rs`,
|
|
12
|
+
> 안전 밸브 3종 유지). §2a의 CSRF origin 주입과 SSE `X-Accel-Buffering`
|
|
13
|
+
> 보강도 배선 완료. §4c(에이전트 루프 오케스트레이션 이식)만 의도적으로
|
|
14
|
+
> 남아 있으며, 그 이유는 아래 본문 그대로다.
|
|
15
|
+
|
|
16
|
+
## Phase 2 — Front Door + 읽기/검색/히스토리 네이티브 + Ingestion 프리미티브
|
|
17
|
+
|
|
18
|
+
### 2a. 게이트웨이 front-door 기본화 (데스크톱)
|
|
19
|
+
- 정찰 확정 사실: 쿠키(host-only)·CSP(`connect-src 'self' http://127.0.0.1:*`)
|
|
20
|
+
·리다이렉트(전부 상대)는 origin 전환에 안전. **유일한 차단기는 CSRF
|
|
21
|
+
origin 정책이 워커 자신의 포트로 빌드되는 것**(web_runtime.py:42-67,
|
|
22
|
+
csrf.py:154-164 — Host는 프록시가 hop-by-hop으로 제거).
|
|
23
|
+
- 해소(Rust만으로): `worker_env`가
|
|
24
|
+
`LATTICEAI_CSRF_TRUSTED_ORIGINS=http://127.0.0.1:{gw},http://localhost:{gw}`
|
|
25
|
+
를 워커에 주입(config.py:170이 이미 파싱). 게이트웨이 SSE 프록시는
|
|
26
|
+
`X-Accel-Buffering: no`를 이벤트 스트림 응답에 보강.
|
|
27
|
+
- Tauri는 기본적으로 **게이트웨이 origin으로 항해**(`backend_origin` =
|
|
28
|
+
게이트웨이). `LATTICEAI_DESKTOP_BACKEND_ORIGIN`/`LATTICEAI_DESKTOP_DIRECT=1`
|
|
29
|
+
이면 종전 직결 유지(안전 밸브). e2e: 게이트웨이 경유 스모크 추가.
|
|
30
|
+
- 알려진 잔여(문서화): invite-link 절대 URL(Host 재작성), SSO redirect
|
|
31
|
+
기본값, permission UI 기본 URL — 데스크톱 front-door에서 워커 포트를
|
|
32
|
+
가리킴. 영향 좁음(관리자/SSO 경로), FEATURE_STATUS에 명시.
|
|
33
|
+
|
|
34
|
+
### 2b. 3채널 검색·KG 읽기·히스토리 네이티브 (lattice-retrieval 확장)
|
|
35
|
+
패리티 대상(정찰 §6·§7의 명세 그대로):
|
|
36
|
+
- `graph_search`: direct 1/rank + relationship 0.75/rank + traverse
|
|
37
|
+
이웃 0.45/rank, score=max 병합, **안정 정렬(동점 삽입순, id 타이브레이크
|
|
38
|
+
없음 — Python 그대로)**, graph_context 축적.
|
|
39
|
+
- `relationship_search`: 6-way LIKE, `ORDER BY weight DESC, created_at
|
|
40
|
+
DESC, id ASC`, 양 끝점 스코프 통과 시만 생존, 점수 없음.
|
|
41
|
+
- `traverse`: 무방향 BFS, 라운드당 `limit*3` 엣지 캡(라운드 종속성
|
|
42
|
+
포함 재현), visited<limit 게이트, 노드 수화 `updated_at DESC, id ASC`.
|
|
43
|
+
- 서비스층 `hybrid_search`(3채널): `weights` 명시=재작성/감쇠 없음,
|
|
44
|
+
None=policy 적용; 기여도 `w * max(score, 1/rank)` 합산; 채널 payload
|
|
45
|
+
에코; POST/GET 비대칭 재현.
|
|
46
|
+
- 히스토리 읽기: `_scope_sql`(빈 allowed+no-legacy ⇒ 1=0), 그룹핑
|
|
47
|
+
(`legacy-previous-history` 버킷, updated_at DESC), get_conversation
|
|
48
|
+
(전체 로드 후 필터 — 동일 재현), search(부분일치, "마지막 30그룹"
|
|
49
|
+
슬라이스 그대로).
|
|
50
|
+
- 골든: 기존 픽스처 스토어 확장(대화 행 추가) + 새 질의 세트,
|
|
51
|
+
Python 계약 테스트 확장. 게이트웨이 라우트:
|
|
52
|
+
`/rust/search/service-hybrid`, `/rust/graph/{search,relationships,traverse}`,
|
|
53
|
+
`/rust/history`, `/rust/history/{conversations,search}` (라우터 팩토리로
|
|
54
|
+
노출, X5가 마운트).
|
|
55
|
+
|
|
56
|
+
### 2c. lattice-ingest — Watch · Parse · Chunk · Dedup (단일 작성자 원칙)
|
|
57
|
+
- **typed chunking 1:1 포트**(_kg_common/text.py 명세 전부: plain 1200/160,
|
|
58
|
+
markdown 섹션 스택+200자 전방 병합, code 세그먼트 팩킹+1.5x 하드리밋,
|
|
59
|
+
prose 경계 백업 `max(start+1, end-overlap)`, overlap 클램프) +
|
|
60
|
+
chunk id `chunk:{sha256(f"{node}:{i}:{text}")[:24]}` (utf-8 replace).
|
|
61
|
+
- 해시 규약: `_clean_text`+sha256(text_hash), content_hash 이원 규약
|
|
62
|
+
(파일=바이트 sha256, 텍스트=`type|uri|text`) 그대로.
|
|
63
|
+
- 파일 워치: mtime 폴링 스냅샷(현행 folder_watch 의미론 — OS 워처
|
|
64
|
+
아님)을 Rust 타이머로; 변경 감지 시 **워커의 기존 인제스트 API로
|
|
65
|
+
위임**(`POST /knowledge-graph/ingest` type=note 또는 folder 재스캔
|
|
66
|
+
트리거) — 그래프 쓰기는 계속 Python 단일 작성자. Rust는 감지·파싱
|
|
67
|
+
(txt/md)·청킹·중복 판정까지 수행하고 결과를 검증 가능하게 반환.
|
|
68
|
+
- 패리티: 청킹 골든(Python 생성기 — 4전략 × 경계 케이스 · 한/영 ·
|
|
69
|
+
PDF 페이지 오프셋 산술) 완전 일치.
|
|
70
|
+
|
|
71
|
+
## Phase 3 — Jobs · Events · Scheduler + Context Builder
|
|
72
|
+
|
|
73
|
+
### 3a. lattice-jobs — 스케줄러 (문서화된 갭의 해소)
|
|
74
|
+
- FEATURE_STATUS:179-185 "아무것도 배경 임베드 큐를 몰지 않는다"를
|
|
75
|
+
닫는다: Rust 타이머(기본 60s, env 조절)가 워커의 **신규 additive
|
|
76
|
+
엔드포인트** `POST /api/index/drain`(이번 릴리스에 Python에 추가,
|
|
77
|
+
`IngestionPipeline.drain_vector_queue` 호출, require_user+게이트,
|
|
78
|
+
100% 커버)을 호출. 미완 ingestion job resume도 동일 타이머가
|
|
79
|
+
`GET /api/ingestion/jobs` → 조건부 `/resume`으로 재개(기본 꺼짐,
|
|
80
|
+
`LATTICEAI_JOBS_AUTORESUME=1` 옵트인).
|
|
81
|
+
- `/host/jobs` 상태 라우트: 마지막 틱 결과·다음 예정·큐 카운트
|
|
82
|
+
(`vector_jobs` 읽기 전용 카운트는 lattice-core로 직접).
|
|
83
|
+
- 이벤트: 틱 결과를 호스트 로그 + `/host/jobs`에 노출(간결·정직).
|
|
84
|
+
|
|
85
|
+
### 3b. Context Builder 네이티브 (lattice-retrieval 내 모듈)
|
|
86
|
+
- `lattice_brain/context.py`의 `ContextAssembler` 포트: approx_tokens
|
|
87
|
+
`(len+3)//4`, 고정 섹션 순서(memories→artifacts→knowledge→notes→recent),
|
|
88
|
+
greedy 예산 절단(`content[:remaining*4]`, 절단 후 재계측 동작 포함)
|
|
89
|
+
— 시임은 네이티브 검색/히스토리 리더로 주입. 골든: 동일 픽스처에서
|
|
90
|
+
Python 어셈블러 출력과 완전 일치. 게이트웨이 `/rust/context/assemble`.
|
|
91
|
+
- 문서 생성용 context_builder(B)는 Phase 4 이후로 명시 이월(
|
|
92
|
+
search_for_document_generation 의존).
|
|
93
|
+
|
|
94
|
+
## Phase 4 — Agent Runtime: Tools · Sandbox · Permission (안전 커널)
|
|
95
|
+
|
|
96
|
+
**다이어그램의 라벨(Tools/Process/Sandbox/Permission)을 Rust가 소유**하고,
|
|
97
|
+
LLM 추론·변이 도구 실행은 워커에 위임(그것이 AI Worker의 정의다).
|
|
98
|
+
|
|
99
|
+
### 4a. 권한 커널 — 결정표 패리티
|
|
100
|
+
- `normalize_mode`(별칭 표 포함), `effective_auto_approve`(모드×도구
|
|
101
|
+
집합×risk×change_class 전 분기), `is_circuit_breaker`(파괴 risk·루트/홈
|
|
102
|
+
경로·rm -rf 변형), `should_stage_proposal`, `plan_requires_approval`,
|
|
103
|
+
`block_reason_for_tool`(우선순위 체인), `classify_tool_call`
|
|
104
|
+
(MUTATING_TOOL_INVENTORY 27종) 전부 포트.
|
|
105
|
+
- **결정표 골든**: Python 생성기가 (mode × tool × policy × args)
|
|
106
|
+
그리드 수백 케이스의 판정을 JSON으로 떠서 커밋; Rust와 Python 양쪽
|
|
107
|
+
계약 테스트가 같은 골든을 상시 단언(11.4.0 방식).
|
|
108
|
+
|
|
109
|
+
### 4b. 도구 샌드박스 — 검증 패리티 + 네이티브 실행(읽기 전용)
|
|
110
|
+
- `run_command` 검증기 포트: shlex 분해, 실행경로/allowlist/셸 연산자/
|
|
111
|
+
find·rg 플래그/절대경로·`..`·심링크 이스케이프 규칙, env 치환
|
|
112
|
+
(HOME=AGENT_ROOT, 고정 PATH). **검증 판정 골든**(명령 문자열 그리드)
|
|
113
|
+
완전 일치. 통과한 읽기 전용 명령(pwd/ls/find/cat/head/tail/wc/rg)은
|
|
114
|
+
Rust가 직접 실행(타임아웃 30s·출력 12,000자 캡 동일).
|
|
115
|
+
- 파일 도구: `_resolve_path` 의미론(AGENT_ROOT 격리) + read/list 네이티브.
|
|
116
|
+
- 게이트웨이 `/rust/agent/preflight`(계획/도구콜 배열 + mode → 판정
|
|
117
|
+
목록)와 `/rust/agent/exec`(커널 통과 읽기 전용 명령만 실행; 그 외
|
|
118
|
+
는 판정과 함께 거부) — 변이는 절대 실행하지 않는다.
|
|
119
|
+
|
|
120
|
+
### 4c. 루프 위임 — `/rust/agent/run`
|
|
121
|
+
- 워커 `/agent`(SSE)로 턴을 위임하되 호스트가 `permission_mode`를
|
|
122
|
+
스탬프하고, 반환 계획에 커널 preflight를 병기해 표면에 제공.
|
|
123
|
+
Python 루프 자체의 재작성은 **명시적 비-목표**(결정 커널이 잠긴
|
|
124
|
+
지금, 루프 이식은 후속 릴리스의 기계적 작업으로 남긴다 — 이유:
|
|
125
|
+
AgentDeps 12개 시임의 실배선 검증 없이 이식하면 증명 없는 재작성).
|
|
126
|
+
|
|
127
|
+
## 게이트/검증/릴리스
|
|
128
|
+
|
|
129
|
+
- 신규 크레이트 3종(lattice-ingest/jobs/agent) 워크스페이스 편입,
|
|
130
|
+
전 파일 ≤1,000줄(목표 ≤500), fmt/clippy/test CI rust 잡 그대로.
|
|
131
|
+
- Python 추가분(drain 엔드포인트 등)은 문·분기 100% 유지.
|
|
132
|
+
- 골든 4계열(검색·히스토리/청킹/컨텍스트/권한·명령 판정) 모두
|
|
133
|
+
양방향(계약 pytest + cargo 테스트).
|
|
134
|
+
- 릴리스 절차는 11.4.0과 동일: bump 11.5.0 → 문서·테마("Rust
|
|
135
|
+
Complete") → evidence 재촬영(13종+GIF) → artifacts(DMG) →
|
|
136
|
+
main 커밋·푸시 → CI 그린.
|
|
137
|
+
|
|
138
|
+
## 정직한 경계 (FEATURE_STATUS에 그대로 기재)
|
|
139
|
+
|
|
140
|
+
- Python 서버는 계속 모든 제품 표면을 서빙한다 — front-door는
|
|
141
|
+
데스크톱 기본 + 옵트인 바이너리이며, 네이티브 라우트는 검증된
|
|
142
|
+
대체 경로다.
|
|
143
|
+
- 문서 파서 매트릭스(pdf/docx/xlsx/pptx)·임베딩 생산·LLM 추론·변이
|
|
144
|
+
도구 실행·그래프 쓰기는 워커 소유(설계상 단일 작성자/AI Worker).
|
|
145
|
+
- 에이전트 루프 오케스트레이션의 Rust 이식은 남는다(4c의 이유).
|
|
@@ -49,7 +49,7 @@ from typing import Any, Callable, Dict, List, Optional
|
|
|
49
49
|
from ..utils import now_iso as _now
|
|
50
50
|
from .contracts import multi_agent_contract
|
|
51
51
|
|
|
52
|
-
MULTI_AGENT_VERSION = "11.
|
|
52
|
+
MULTI_AGENT_VERSION = "11.5.0"
|
|
53
53
|
|
|
54
54
|
AGENT_ROLES = ("researcher", "planner", "executor", "reviewer", "release")
|
|
55
55
|
CORE_PIPELINE = ("planner", "executor", "reviewer")
|
package/latticeai/__init__.py
CHANGED
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
"""Index jobs API (v11.5.0, plan §3a) — the trigger the embed queue never had.
|
|
2
|
+
|
|
3
|
+
``vector_jobs`` has been a durable backlog since v11.1.0: an ingest whose
|
|
4
|
+
inline embedding fails lands anyway, the node is queued, and
|
|
5
|
+
``VectorEmbedQueue.tick`` will embed it *when someone runs a tick*. Nobody did.
|
|
6
|
+
The only drain in the product was
|
|
7
|
+
:meth:`~lattice_brain.ingestion.IngestionPipeline.drain_vector_queue`, callable
|
|
8
|
+
from a test or a REPL and from nothing that runs on its own — which is what
|
|
9
|
+
FEATURE_STATUS.md:179-185 says out loud.
|
|
10
|
+
|
|
11
|
+
This router is the missing half: an HTTP surface a scheduler can call.
|
|
12
|
+
|
|
13
|
+
* ``POST /api/index/drain`` — run one tick now, answer with what it did and
|
|
14
|
+
what is left.
|
|
15
|
+
* ``GET /api/index/queue`` — the backlog counts, read-only.
|
|
16
|
+
|
|
17
|
+
Their two siblings under the same prefix live in ``search.py``
|
|
18
|
+
(``/api/index/status``, ``/api/index/rebuild``): those answer *is the index
|
|
19
|
+
complete* and *rebuild it from scratch*, which is the operator's hammer. This
|
|
20
|
+
pair is the small, repeatable step a timer can take every minute.
|
|
21
|
+
|
|
22
|
+
Two honest boundaries, stated here so the payloads are not read as more than
|
|
23
|
+
they are:
|
|
24
|
+
|
|
25
|
+
* **The backlog is machine-wide.** One SQLite queue serves every workspace, so
|
|
26
|
+
a drain embeds whatever is owed regardless of who asked, and the counts are
|
|
27
|
+
totals for this Brain. The workspace gate still runs on both paths — it is
|
|
28
|
+
the authorization check, not a filter — and the drain payload says
|
|
29
|
+
``scope: "machine"`` rather than implying a scoped number.
|
|
30
|
+
* **Draining is not indexing.** The tick delegates to the store's own indexer;
|
|
31
|
+
a node that fails goes back to ``pending`` until its retry budget runs out.
|
|
32
|
+
The response reports ``claimed``/``indexed``/``retried``/``failed`` verbatim
|
|
33
|
+
from the queue instead of summarising them into a success flag.
|
|
34
|
+
"""
|
|
35
|
+
|
|
36
|
+
from __future__ import annotations
|
|
37
|
+
|
|
38
|
+
import asyncio
|
|
39
|
+
from typing import Any, Callable, Dict, Optional
|
|
40
|
+
|
|
41
|
+
from fastapi import APIRouter, Request
|
|
42
|
+
from pydantic import BaseModel
|
|
43
|
+
|
|
44
|
+
from lattice_brain.graph.vector_index import DEFAULT_TICK_LIMIT, VECTOR_JOB_STATUSES
|
|
45
|
+
from latticeai.core.messages import http_error, resolve_language
|
|
46
|
+
|
|
47
|
+
#: Bounds on one drain. The floor keeps a caller from asking for a no-op tick
|
|
48
|
+
#: that still claims the queue's lock; the ceiling keeps one HTTP request from
|
|
49
|
+
#: turning into an unbounded embedding run behind a client that will time out.
|
|
50
|
+
MIN_DRAIN_LIMIT = 1
|
|
51
|
+
MAX_DRAIN_LIMIT = 100
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
class DrainRequest(BaseModel):
|
|
55
|
+
"""How many queued nodes one drain may claim.
|
|
56
|
+
|
|
57
|
+
Omitted (or a body-less POST) means the queue's own tick size, so a caller
|
|
58
|
+
with no opinion inherits the number the queue was designed around.
|
|
59
|
+
"""
|
|
60
|
+
|
|
61
|
+
limit: Optional[int] = None
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
def create_index_jobs_router(
|
|
65
|
+
*,
|
|
66
|
+
pipeline: Any,
|
|
67
|
+
knowledge_graph: Any,
|
|
68
|
+
require_user: Callable[[Request], Any],
|
|
69
|
+
gate_read: Callable[[Request], Optional[str]],
|
|
70
|
+
gate_write: Callable[[Request], Optional[str]],
|
|
71
|
+
) -> APIRouter:
|
|
72
|
+
router = APIRouter()
|
|
73
|
+
|
|
74
|
+
def _require_pipeline(request: Request) -> Any:
|
|
75
|
+
"""The pipeline, or 503 — a drain without ingestion is not a 500."""
|
|
76
|
+
if pipeline is None or not pipeline.available():
|
|
77
|
+
raise http_error(503, "capture.ingestion_disabled", resolve_language(request))
|
|
78
|
+
return pipeline
|
|
79
|
+
|
|
80
|
+
def _queue_state() -> Dict[str, Any]:
|
|
81
|
+
"""Backlog counts, or an explicit "not tracked" — never a fake zero.
|
|
82
|
+
|
|
83
|
+
A store without a durable queue reports ``available: false`` alongside
|
|
84
|
+
its zeros, because "0 pending" and "nothing is counting" are different
|
|
85
|
+
answers and a scheduler polling this would otherwise read the second as
|
|
86
|
+
the first.
|
|
87
|
+
"""
|
|
88
|
+
queue = getattr(knowledge_graph, "vector_queue", None)
|
|
89
|
+
if queue is None or not queue.available:
|
|
90
|
+
return {
|
|
91
|
+
"available": False,
|
|
92
|
+
"counts": dict.fromkeys(VECTOR_JOB_STATUSES, 0),
|
|
93
|
+
"pending": 0,
|
|
94
|
+
}
|
|
95
|
+
return {
|
|
96
|
+
"available": True,
|
|
97
|
+
"counts": dict(queue.snapshot()),
|
|
98
|
+
"pending": int(queue.pending_count()),
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
@router.post("/api/index/drain")
|
|
102
|
+
async def drain_index_queue(request: Request, req: Optional[DrainRequest] = None):
|
|
103
|
+
"""Run one background-embedding tick and report what it did.
|
|
104
|
+
|
|
105
|
+
Off the event loop: the tick opens SQLite and calls the embedder, and
|
|
106
|
+
this server has one loop for every user (10.9.0).
|
|
107
|
+
"""
|
|
108
|
+
require_user(request)
|
|
109
|
+
gate_write(request)
|
|
110
|
+
active = _require_pipeline(request)
|
|
111
|
+
requested = req.limit if req is not None else None
|
|
112
|
+
limit = DEFAULT_TICK_LIMIT if requested is None else requested
|
|
113
|
+
if limit < MIN_DRAIN_LIMIT or limit > MAX_DRAIN_LIMIT:
|
|
114
|
+
raise http_error(
|
|
115
|
+
422,
|
|
116
|
+
"index.limit_out_of_range",
|
|
117
|
+
resolve_language(request),
|
|
118
|
+
min=MIN_DRAIN_LIMIT,
|
|
119
|
+
max=MAX_DRAIN_LIMIT,
|
|
120
|
+
)
|
|
121
|
+
tick = await asyncio.to_thread(active.drain_vector_queue, limit)
|
|
122
|
+
return {
|
|
123
|
+
**dict(tick),
|
|
124
|
+
"limit": limit,
|
|
125
|
+
"scope": "machine",
|
|
126
|
+
"queue": _queue_state(),
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
@router.get("/api/index/queue")
|
|
130
|
+
async def index_queue(request: Request):
|
|
131
|
+
"""The embed backlog, counted. Reads nothing else and writes nothing."""
|
|
132
|
+
require_user(request)
|
|
133
|
+
gate_read(request)
|
|
134
|
+
_require_pipeline(request)
|
|
135
|
+
return _queue_state()
|
|
136
|
+
|
|
137
|
+
return router
|
|
138
|
+
|
|
139
|
+
|
|
140
|
+
__all__ = [
|
|
141
|
+
"MAX_DRAIN_LIMIT",
|
|
142
|
+
"MIN_DRAIN_LIMIT",
|
|
143
|
+
"DrainRequest",
|
|
144
|
+
"create_index_jobs_router",
|
|
145
|
+
]
|
|
@@ -10,7 +10,7 @@ from __future__ import annotations
|
|
|
10
10
|
from copy import deepcopy
|
|
11
11
|
from typing import Any, Dict, List, Optional
|
|
12
12
|
|
|
13
|
-
MARKETPLACE_VERSION = "11.
|
|
13
|
+
MARKETPLACE_VERSION = "11.5.0"
|
|
14
14
|
TEMPLATE_KINDS = ("plugin", "workflow", "agent", "ingestion_bridge")
|
|
15
15
|
|
|
16
16
|
|
|
@@ -531,6 +531,11 @@ MESSAGES: Dict[str, Dict[str, str]] = {
|
|
|
531
531
|
"ko": "시점을 읽을 수 없습니다. 2026-08-11T09:00:00 처럼 적어 주세요.",
|
|
532
532
|
"en": "That moment could not be read. Write it like 2026-08-11T09:00:00.",
|
|
533
533
|
},
|
|
534
|
+
# ── index jobs ──────────────────────────────────────────────────────
|
|
535
|
+
"index.limit_out_of_range": {
|
|
536
|
+
"ko": "한 번에 처리할 개수는 {min}에서 {max} 사이여야 합니다.",
|
|
537
|
+
"en": "Ask for between {min} and {max} items in one pass.",
|
|
538
|
+
},
|
|
534
539
|
# ── MCP / setup ─────────────────────────────────────────────────────
|
|
535
540
|
"mcp.connector_not_found": {
|
|
536
541
|
"ko": "커넥터를 찾을 수 없습니다.",
|
|
@@ -10,7 +10,7 @@ from __future__ import annotations
|
|
|
10
10
|
|
|
11
11
|
from typing import Dict
|
|
12
12
|
|
|
13
|
-
WORKSPACE_OS_VERSION = "11.
|
|
13
|
+
WORKSPACE_OS_VERSION = "11.5.0"
|
|
14
14
|
|
|
15
15
|
# Workspace types separate single-user Personal workspaces from shared
|
|
16
16
|
# Organization workspaces. Both keep the same local-first JSON store; the type
|