ltcai 8.9.0 → 9.1.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 +81 -58
- package/auto_setup.py +7 -904
- package/desktop/electron/README.md +9 -0
- package/desktop/electron/main.cjs +5 -3
- package/docs/CHANGELOG.md +221 -238
- package/docs/COMMUNITY_AND_PLUGINS.md +3 -2
- package/docs/DEVELOPMENT.md +53 -14
- package/docs/LEGACY_COMPATIBILITY.md +4 -4
- package/docs/ONBOARDING.md +10 -2
- package/docs/OPERATIONS.md +8 -4
- package/docs/PRODUCT_DIRECTION_REVIEW.md +4 -0
- package/docs/ROADMAP_RECOMMENDATIONS.md +61 -36
- package/docs/TRUST_MODEL.md +5 -2
- package/docs/WHY_LATTICE.md +15 -10
- package/docs/WORKFLOW_DESIGNER.md +22 -0
- package/docs/kg-schema.md +13 -2
- package/docs/mcp-tools.md +17 -6
- package/docs/privacy.md +19 -3
- package/docs/public-deploy.md +32 -3
- package/docs/security-model.md +46 -11
- package/lattice_brain/__init__.py +1 -1
- package/lattice_brain/archive.py +4 -14
- package/lattice_brain/context.py +66 -9
- package/lattice_brain/embeddings.py +38 -2
- package/lattice_brain/graph/_kg_common.py +27 -462
- package/lattice_brain/graph/_kg_constants.py +243 -0
- package/lattice_brain/graph/_kg_fsutil.py +293 -0
- package/lattice_brain/graph/discovery.py +0 -948
- package/lattice_brain/graph/discovery_index.py +1126 -0
- package/lattice_brain/graph/documents.py +44 -9
- package/lattice_brain/graph/ingest.py +47 -20
- package/lattice_brain/graph/provenance.py +13 -6
- package/lattice_brain/graph/retrieval.py +141 -610
- package/lattice_brain/graph/retrieval_docgen.py +243 -0
- package/lattice_brain/graph/retrieval_vector.py +460 -0
- package/lattice_brain/graph/store.py +6 -0
- package/lattice_brain/ingestion.py +69 -4
- package/lattice_brain/portability.py +29 -23
- package/lattice_brain/quality.py +98 -4
- package/lattice_brain/runtime/agent_runtime.py +169 -7
- package/lattice_brain/runtime/hooks.py +30 -13
- package/lattice_brain/runtime/multi_agent.py +27 -8
- package/lattice_brain/runtime/statuses.py +10 -0
- package/lattice_brain/utils.py +46 -0
- package/lattice_brain/workflow.py +1 -5
- package/latticeai/__init__.py +1 -1
- package/latticeai/api/admin.py +1 -1
- package/latticeai/api/agent_registry.py +10 -8
- package/latticeai/api/agents.py +22 -3
- package/latticeai/api/auth.py +78 -16
- package/latticeai/api/browser.py +303 -34
- package/latticeai/api/chat.py +355 -952
- package/latticeai/api/chat_agent_http.py +356 -0
- package/latticeai/api/chat_contracts.py +54 -0
- package/latticeai/api/chat_documents.py +256 -0
- package/latticeai/api/chat_helpers.py +250 -0
- package/latticeai/api/chat_history.py +99 -0
- package/latticeai/api/chat_intents.py +302 -0
- package/latticeai/api/chat_stream.py +115 -0
- package/latticeai/api/computer_use.py +211 -40
- package/latticeai/api/health.py +9 -3
- package/latticeai/api/hooks.py +17 -6
- package/latticeai/api/knowledge_graph.py +78 -14
- package/latticeai/api/local_files.py +7 -2
- package/latticeai/api/marketplace.py +11 -0
- package/latticeai/api/mcp.py +102 -23
- package/latticeai/api/models.py +72 -33
- package/latticeai/api/network.py +5 -5
- package/latticeai/api/permissions.py +70 -29
- package/latticeai/api/plugins.py +21 -7
- package/latticeai/api/portability.py +5 -5
- package/latticeai/api/realtime.py +33 -5
- package/latticeai/api/setup.py +2 -2
- package/latticeai/api/static_routes.py +123 -24
- package/latticeai/api/tools.py +97 -14
- package/latticeai/api/workflow_designer.py +37 -0
- package/latticeai/api/workspace.py +2 -1
- package/latticeai/app_factory.py +185 -405
- package/latticeai/core/agent.py +19 -9
- package/latticeai/core/agent_registry.py +1 -5
- package/latticeai/core/config.py +23 -3
- package/latticeai/core/context_builder.py +21 -3
- package/latticeai/core/invitations.py +1 -4
- package/latticeai/core/io_utils.py +45 -0
- package/latticeai/core/legacy_compatibility.py +24 -3
- package/latticeai/core/local_embeddings.py +2 -4
- package/latticeai/core/marketplace.py +33 -2
- package/latticeai/core/mcp_catalog.py +450 -0
- package/latticeai/core/mcp_registry.py +2 -441
- package/latticeai/core/plugins.py +15 -0
- package/latticeai/core/policy.py +1 -1
- package/latticeai/core/realtime.py +38 -15
- package/latticeai/core/sessions.py +7 -2
- package/latticeai/core/timeutil.py +10 -0
- package/latticeai/core/tool_registry.py +90 -18
- package/latticeai/core/users.py +5 -14
- package/latticeai/core/workspace_graph_trace.py +31 -5
- package/latticeai/core/workspace_memory.py +3 -1
- package/latticeai/core/workspace_os.py +18 -7
- package/latticeai/core/workspace_os_utils.py +2 -21
- package/latticeai/core/workspace_permissions.py +2 -1
- package/latticeai/core/workspace_plugins.py +1 -1
- package/latticeai/core/workspace_runs.py +14 -5
- package/latticeai/core/workspace_skills.py +1 -1
- package/latticeai/core/workspace_snapshots.py +2 -1
- package/latticeai/core/workspace_timeline.py +2 -1
- package/latticeai/integrations/telegram_bot.py +96 -40
- package/latticeai/models/model_providers.py +111 -0
- package/latticeai/models/router.py +189 -173
- package/latticeai/runtime/access_runtime.py +62 -4
- package/latticeai/runtime/audit_runtime.py +27 -16
- package/latticeai/runtime/automation_runtime.py +22 -7
- package/latticeai/runtime/brain_runtime.py +19 -7
- package/latticeai/runtime/chat_wiring.py +2 -0
- package/latticeai/runtime/config_runtime.py +58 -26
- package/latticeai/runtime/context_runtime.py +16 -4
- package/latticeai/runtime/history_runtime.py +163 -0
- package/latticeai/runtime/hooks_runtime.py +1 -1
- package/latticeai/runtime/model_wiring.py +33 -5
- package/latticeai/runtime/namespace_runtime.py +163 -0
- package/latticeai/runtime/network_config_runtime.py +56 -0
- package/latticeai/runtime/platform_runtime_wiring.py +4 -3
- package/latticeai/runtime/review_wiring.py +1 -1
- package/latticeai/runtime/router_registration.py +34 -1
- package/latticeai/runtime/security_runtime.py +110 -13
- package/latticeai/runtime/sso_config_runtime.py +128 -0
- package/latticeai/runtime/stages.py +27 -0
- package/latticeai/runtime/user_key_runtime.py +106 -0
- package/latticeai/server_app.py +5 -1
- package/latticeai/services/architecture_readiness.py +74 -5
- package/latticeai/services/brain_automation.py +3 -26
- package/latticeai/services/chat_service.py +205 -15
- package/latticeai/services/local_knowledge.py +423 -0
- package/latticeai/services/memory_service.py +268 -21
- package/latticeai/services/model_engines.py +48 -33
- package/latticeai/services/model_errors.py +17 -0
- package/latticeai/services/model_loading.py +28 -25
- package/latticeai/services/model_runtime.py +228 -162
- package/latticeai/services/p_reinforce.py +22 -3
- package/latticeai/services/platform_runtime.py +92 -24
- package/latticeai/services/product_readiness.py +19 -17
- package/latticeai/services/review_queue.py +76 -11
- package/latticeai/services/router_context.py +1 -0
- package/latticeai/services/run_executor.py +25 -9
- package/latticeai/services/search_service.py +203 -28
- package/latticeai/services/setup_detection.py +80 -0
- package/latticeai/services/tool_dispatch.py +28 -5
- package/latticeai/services/triggers.py +53 -4
- package/latticeai/services/upload_service.py +13 -2
- package/latticeai/setup/__init__.py +25 -0
- package/latticeai/setup/auto_setup.py +857 -0
- package/latticeai/setup/wizard.py +1264 -0
- package/latticeai/tools/__init__.py +278 -0
- package/{tools → latticeai/tools}/commands.py +67 -7
- package/{tools → latticeai/tools}/computer.py +1 -1
- package/{tools → latticeai/tools}/documents.py +1 -1
- package/{tools → latticeai/tools}/filesystem.py +3 -3
- package/latticeai/tools/knowledge.py +178 -0
- package/{tools → latticeai/tools}/local_files.py +7 -1
- package/{tools → latticeai/tools}/network.py +0 -1
- package/local_knowledge_api.py +4 -342
- package/package.json +22 -2
- package/scripts/brain_quality_eval.py +3 -1
- package/scripts/bump_version.py +3 -0
- package/scripts/capture_release_evidence.mjs +180 -0
- package/scripts/check_current_release_docs.mjs +142 -0
- package/scripts/check_i18n_literals.mjs +107 -31
- package/scripts/check_openapi_drift.mjs +56 -0
- package/scripts/export_openapi.py +67 -7
- package/scripts/i18n_literal_allowlist.json +22 -24
- package/scripts/run_integration_tests.mjs +72 -10
- package/scripts/validate_release_artifacts.py +49 -7
- package/scripts/wheel_smoke.py +5 -0
- package/setup_wizard.py +3 -1304
- 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-Bzz0bUyW.js +1 -0
- package/static/app/assets/Brain-Dj2J20YA.js +321 -0
- package/static/app/assets/Capture-CqlEl1Ga.js +1 -0
- package/static/app/assets/Library-B03FP1Yx.js +1 -0
- package/static/app/assets/System-80lHW0Ux.js +1 -0
- package/static/app/assets/index-BiMofBTM.js +17 -0
- package/static/app/assets/index-Bmx9rzTc.css +2 -0
- package/static/app/assets/primitives-Q1A96_7v.js +1 -0
- package/static/app/assets/textarea-D13RtnTo.js +1 -0
- package/static/app/index.html +2 -2
- package/static/css/tokens.css +4 -2
- package/static/sw.js +1 -1
- package/tools/__init__.py +21 -269
- package/docs/CODE_REVIEW_2026-07-06.md +0 -764
- package/latticeai/runtime/app_context_runtime.py +0 -13
- package/latticeai/runtime/sso_runtime.py +0 -52
- package/latticeai/runtime/tail_wiring.py +0 -21
- package/scripts/com.pts.claudecode.discord.plist +0 -31
- package/scripts/pts-claudecode-discord-bridge.mjs +0 -207
- package/scripts/start-pts-claudecode-discord.sh +0 -51
- package/static/app/assets/Act-fZokUnC0.js +0 -1
- package/static/app/assets/Brain-DtyuWubr.js +0 -321
- package/static/app/assets/Capture-D5KV3Cu7.js +0 -1
- package/static/app/assets/Library-C9kyFkSt.js +0 -1
- package/static/app/assets/System-VbChmX7r.js +0 -1
- package/static/app/assets/index-DCh5AoXt.css +0 -2
- package/static/app/assets/index-DPdcPoF0.js +0 -17
- package/static/app/assets/primitives-DFeanEV6.js +0 -1
- package/static/app/assets/textarea-CD8UNKIy.js +0 -1
- package/tools/knowledge.py +0 -95
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Legacy Compatibility Map
|
|
2
2
|
|
|
3
|
-
Current target: **
|
|
3
|
+
Current target: **9.1.0 — Code Review Completion & Fail-Closed Runtime**.
|
|
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`.
|
|
@@ -56,14 +56,14 @@ standalone package:
|
|
|
56
56
|
| `knowledge_graph.py` | `lattice_brain.graph` / `lattice_brain.knowledge` | Compatibility for older graph imports and historical tooling |
|
|
57
57
|
| `knowledge_graph_api.py` | `latticeai.api.memory`, `latticeai.api.search`, graph-related API routers | Compatibility for older API import paths |
|
|
58
58
|
| `kg_schema.py` | `lattice_brain` storage/schema modules | Compatibility for graph schema references |
|
|
59
|
-
| `auto_setup.py` | setup
|
|
59
|
+
| `auto_setup.py` | `latticeai.setup.auto_setup` | Thin compatibility shim for zero-config setup probes and historical commands |
|
|
60
60
|
| `llm_router.py` | `latticeai.models.router` | Compatibility for older local model routing imports |
|
|
61
61
|
| `ltcai_cli.py` | package console entrypoint (`ltcai`) | Compatibility for the installed CLI contract |
|
|
62
62
|
| `mcp_registry.py` | `latticeai.core.mcp_registry` and service-backed registries | Compatibility for MCP/skills lookup entrypoints |
|
|
63
|
-
| `local_knowledge_api.py` | `
|
|
63
|
+
| `local_knowledge_api.py` | `latticeai.services.local_knowledge` | Thin compatibility shim for local folder/file watcher flows |
|
|
64
64
|
| `p_reinforce.py` | gardener/maintenance service direction | Compatibility for existing Brain gardening runtime hooks |
|
|
65
65
|
| `telegram_bot.py` | opt-in integration package or disabled-by-default connector | Compatibility only; Telegram must remain opt-in |
|
|
66
|
-
| `setup_wizard.py` | setup
|
|
66
|
+
| `setup_wizard.py` | `latticeai.setup.wizard` | Thin compatibility shim for first-run recommendation calls |
|
|
67
67
|
| `server.py` | lazy proxy to `latticeai.server_app` / `latticeai.app_factory` | Preserves historical `server.app` imports without import-time construction |
|
|
68
68
|
|
|
69
69
|
## Inner Shim Layers (removed in 8.8.0)
|
package/docs/ONBOARDING.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Lattice AI Onboarding
|
|
2
2
|
|
|
3
|
-
Current release: **
|
|
3
|
+
Current release: **9.1.0 — Code Review Completion & Fail-Closed Runtime**.
|
|
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
|
|
@@ -21,8 +21,16 @@ read the docs first.
|
|
|
21
21
|
## Product Promises
|
|
22
22
|
|
|
23
23
|
- The user starts in the Brain, not in an admin dashboard.
|
|
24
|
+
- The first screen asks what the user wants to do, then prioritizes one composer,
|
|
25
|
+
a few starters, and recent conversations over scores or system status.
|
|
26
|
+
- Chat, Sources, Memory, and Work stay one visible navigation action away on
|
|
27
|
+
desktop and mobile; models and administration do not compete with them.
|
|
28
|
+
- Memory starts with search. The connection map appears only when the user asks
|
|
29
|
+
to inspect relationships.
|
|
24
30
|
- Empty states suggest one concrete next action without claiming proof that does
|
|
25
31
|
not exist yet.
|
|
32
|
+
- Core-service failures show an unavailable/error state and recovery guidance;
|
|
33
|
+
they are never presented as an empty or healthy Brain.
|
|
26
34
|
- Upload, note, browser, and message ingestion all converge through the unified
|
|
27
35
|
ingestion pipeline when it is available.
|
|
28
36
|
- Workspace-scoped content must not leak or overwrite another workspace's graph
|
|
@@ -32,7 +40,7 @@ read the docs first.
|
|
|
32
40
|
|
|
33
41
|
## Release Gate
|
|
34
42
|
|
|
35
|
-
|
|
43
|
+
9.1.0 treats onboarding as a release gate, not marketing copy. The current
|
|
36
44
|
machine-checkable product readiness report requires this five-minute contract,
|
|
37
45
|
the Brain Home surface, setup helpers, graph ingestion tests, and exact release
|
|
38
46
|
artifact documentation before the release can be called complete.
|
package/docs/OPERATIONS.md
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
# Lattice AI — Operations Guide
|
|
1
|
+
# Lattice AI — Operations Guide (v9.1.0)
|
|
2
2
|
|
|
3
3
|
## 1. 데이터 파일 위치
|
|
4
4
|
|
|
5
5
|
| 파일 | 용도 |
|
|
6
6
|
|------|------|
|
|
7
|
-
| `~/.ltcai/users.json` | 사용자 계정 (
|
|
7
|
+
| `~/.ltcai/users.json` | 사용자 계정 (scrypt 해시 저장) |
|
|
8
8
|
| `~/.ltcai/history.json` | 대화 히스토리 |
|
|
9
9
|
| `~/.ltcai/audit.json` | 감사 로그 (agent 실행, 사용자 변경 등) |
|
|
10
10
|
| `~/.ltcai/brain/` | Knowledge Graph 노드 (Markdown) |
|
|
@@ -95,7 +95,7 @@ Cookie: session_id=<admin-session>
|
|
|
95
95
|
|
|
96
96
|
### 5.3 비밀번호 정책
|
|
97
97
|
- 최소 8자
|
|
98
|
-
-
|
|
98
|
+
- scrypt 해시로 저장
|
|
99
99
|
- 평문은 저장되지 않음
|
|
100
100
|
|
|
101
101
|
## 6. 업그레이드 마이그레이션
|
|
@@ -120,11 +120,15 @@ pip install --upgrade ltcai
|
|
|
120
120
|
공개 인터넷에 노출할 경우 반드시 확인:
|
|
121
121
|
|
|
122
122
|
- [ ] `LATTICEAI_SECRET_KEY` 환경변수 설정 (32자 이상 랜덤 문자열)
|
|
123
|
+
- [ ] `LATTICEAI_MODE=public` 및 HTTPS에서 Secure cookie 동작 확인
|
|
124
|
+
- [ ] 초대 게이트 사용 시 랜덤 invite code 또는 생성된 설치별 secret 영구 보관
|
|
123
125
|
- [ ] `LATTICEAI_ENABLE_GRAPH=false` (불필요 시 Graph 비활성화)
|
|
124
126
|
- [ ] `HTTPS` 종단 프록시 설정 (nginx / Caddy)
|
|
125
127
|
- [ ] `CSRF_TRUSTED_ORIGINS` 화이트리스트 설정
|
|
126
128
|
- [ ] `ALLOWED_COMMANDS` 검토 — python3/node 등 불필요한 실행 도구 제거
|
|
127
|
-
- [ ] 방화벽으로
|
|
129
|
+
- [ ] 방화벽으로 4825 포트를 프록시만 접근 허용
|
|
130
|
+
- [ ] Telegram 활성화 시 `LATTICEAI_TELEGRAM_ALLOWED_CHAT_IDS`와
|
|
131
|
+
`LATTICEAI_SERVER_SESSION_TOKEN` 설정
|
|
128
132
|
|
|
129
133
|
## 8. 사용자 데이터 격리
|
|
130
134
|
|
|
@@ -21,6 +21,10 @@ Already aligned:
|
|
|
21
21
|
- First launch follows Login -> Environment Analysis -> Recommended Models ->
|
|
22
22
|
Install & Load -> Brain.
|
|
23
23
|
- The post-setup home is the living Brain plus conversation.
|
|
24
|
+
- The empty home presents the Brain, incoming sources, real relationship graph,
|
|
25
|
+
composer, and next grounded action in one viewport. Its life signal and motion
|
|
26
|
+
are driven by listening, recall, synthesis, and action state rather than being
|
|
27
|
+
a decorative loop; history and technical proof remain progressively disclosed.
|
|
24
28
|
- The graph appears only after progressive depth: Brain -> Memories ->
|
|
25
29
|
Knowledge -> Relationships -> Graph.
|
|
26
30
|
- Brain Core, SQLite live local storage, optional PostgreSQL/pgvector
|
|
@@ -5,43 +5,12 @@ small release-sized work. The operating principle stays unchanged:
|
|
|
5
5
|
|
|
6
6
|
> Models are temporary. Knowledge is durable. The Brain is the product.
|
|
7
7
|
|
|
8
|
-
##
|
|
8
|
+
## Applied Release History
|
|
9
9
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
-
|
|
13
|
-
|
|
14
|
-
- Hybrid search optimization: the Brain quality gate now includes deterministic
|
|
15
|
-
recall and ranking regression thresholds.
|
|
16
|
-
- Security and trust: run contracts distinguish runtime type and execution mode
|
|
17
|
-
so simulated output is not presented as real execution.
|
|
18
|
-
|
|
19
|
-
## 7.4.0 Applied Slice
|
|
20
|
-
|
|
21
|
-
7.4.0 completes the next roadmap slice without deferring it:
|
|
22
|
-
|
|
23
|
-
- Runtime convergence: agent runs, workflow runs, audit events, and realtime
|
|
24
|
-
events all expose the `agent-run-contract/v1` family envelope while keeping
|
|
25
|
-
legacy top-level fields for compatibility.
|
|
26
|
-
- Trust and operations: persisted run rows refresh their contract through
|
|
27
|
-
queued, running, terminal, cancelled, and interrupted states; audit events are
|
|
28
|
-
contracted only after secret redaction.
|
|
29
|
-
- Retrieval quality and scale: the CI quality gate now seeds a real local
|
|
30
|
-
Knowledge Graph corpus and scores SearchService hybrid retrieval with judged
|
|
31
|
-
queries, recall, precision, NDCG, and must-include hit-rate thresholds.
|
|
32
|
-
|
|
33
|
-
## 7.5.0 Applied Slice
|
|
34
|
-
|
|
35
|
-
7.5.0 burns down the remaining 7.4.0 risk instead of deferring it:
|
|
36
|
-
|
|
37
|
-
- Contract consumption: AgentRuntime and realtime feed APIs now emit compact
|
|
38
|
-
`contracts` views so UI, replay, admin, and export consumers can depend on the
|
|
39
|
-
shared family envelope directly.
|
|
40
|
-
- Retrieval scale: the corpus fixture now runs against 250+ local records while
|
|
41
|
-
keeping judged queries, graded relevance, and must-include expectations.
|
|
42
|
-
- Release trust: stale artifact mixing is handled through clean exact-version
|
|
43
|
-
artifact generation, npm audit findings are cleared, and the Tauri 2 stack is
|
|
44
|
-
updated past the old `block v0.1.6` future-incompatibility warning.
|
|
10
|
+
Release-specific applied-slice history is now kept only for 8.0.0 and newer in
|
|
11
|
+
[docs/CHANGELOG.md](CHANGELOG.md) and [RELEASE.md](../RELEASE.md). Pre-8.0.0
|
|
12
|
+
release-history notes were removed from the tracked documentation surface during
|
|
13
|
+
the 9.0.0 documentation cleanup.
|
|
45
14
|
|
|
46
15
|
## Near-Term Tracks
|
|
47
16
|
|
|
@@ -79,3 +48,59 @@ small release-sized work. The operating principle stays unchanged:
|
|
|
79
48
|
- Interoperability with Obsidian, Notion, Email, Calendar, Git, Slack, and Teams.
|
|
80
49
|
- Encrypted Brain Network sharing.
|
|
81
50
|
- Plugin marketplace and public benchmarks.
|
|
51
|
+
|
|
52
|
+
## Large-Scale Work Feasibility Assessment (2026-07-07)
|
|
53
|
+
|
|
54
|
+
2026-07-07 코드베이스 검사 + 테스트 실행 결과 기반. (app_factory 1214줄, workspace_os 1391줄, 최근 AgentRuntime facade + KG mixin 분해 완료, 833 unit tests passed)
|
|
55
|
+
|
|
56
|
+
### 1. Knowledge Graph / Retrieval at Large Corpus Scale (가장 추천, 기반 탄탄)
|
|
57
|
+
- Incremental/background ingestion + advanced dedup(콘텐츠해시 이상), conflict resolution, merge.
|
|
58
|
+
- Larger corpus benchmarks (현재 250+ → 수천~수만 아이템), latency budget, channel별 진단.
|
|
59
|
+
- pgvector 풀 프로덕션 경로 + 마이그레이션.
|
|
60
|
+
- **실행 가능성**: IngestionPipeline + provenance + vector mixin + benchmark fixtures 이미 존재. discovery/retrieval 분해 완료. hooks lifecycle 통합됨. 대형 작업으로 적합. 테스트: test_ingestion_pipeline.py 14/14 green.
|
|
61
|
+
|
|
62
|
+
### 2. Multi-Modal Brain (스키마 준비됨, 구현 공백 큼)
|
|
63
|
+
- 이미지: vision LLM describe + 임베딩, IMAGE/IMAGE_TEXT 노드 + CONTAINS_IMAGE 엣지 완성, UI 증거 표시.
|
|
64
|
+
- 오디오(전사), 비디오(키프레임).
|
|
65
|
+
- **실행 가능성**: schema.py에 IMAGE/IMAGE_TEXT/CONTAINS_IMAGE 정의됨. discovery_index.py에 PIL + pytesseract OCR (include_ocr) 부분 구현. embeddings.py / LLMRouter에 vision 지원 부재. retrieval도 이미지 노드 미처리. ingestion 라우팅 확장 필요. 대형 + 차별화 포인트.
|
|
66
|
+
|
|
67
|
+
### 3. Server / Runtime Composition 완전화 (구조 부채 해소)
|
|
68
|
+
- app_factory.py 잔여 로직 추가 추출 (더 많은 wiring → runtime/* 전용 모듈).
|
|
69
|
+
- dict(locals()) 레거시 제거, 강력한 RuntimeContext / DI.
|
|
70
|
+
- Config 중앙화 감사 및 강제 (core/config.py 이미 중앙).
|
|
71
|
+
- **실행 가능성**: 최근 review0707 + decomp (1214줄로 감소, runtime/ 디렉토리 풍부) 후에도 여전히 1.2k 라인. AGENTS.md 우선순위 #3,4 정확히 매치. AgentRuntime은 lattice_brain/runtime/agent_runtime.py 로 facade 추출 완료. ToolRegistry도 core/ + services 분리 진행.
|
|
72
|
+
|
|
73
|
+
### 4. Proactive Synthesis + Temporal / Contradiction (최근 작업 연장)
|
|
74
|
+
- 백그라운드 합성 잡, 그래프 이력 기반 모순 검출, temporal 쿼리.
|
|
75
|
+
- 최근 커밋(Brain synthesis memories, follow-up) 을 스케줄 + 자동화로 확장.
|
|
76
|
+
- **실행 가능성**: MultiAgentOrchestrator + workflow_engine + IngestionPipeline + Brain Brief 이미 wired. hooks/audit 있음. agent synthesis UI 표면 최근 추가. 대형 기능으로 자연스러운 확장.
|
|
77
|
+
|
|
78
|
+
### 5. Ecosystem / Interop + Plugin Marketplace (외부 연동 대형)
|
|
79
|
+
- Obsidian/Notion/Email/Calendar import bridge (MCP 또는 전용 ingestion).
|
|
80
|
+
- 서명된 플러그인, 원격 카탈로그, marketplace UI.
|
|
81
|
+
- Brain Network (암호화 공유).
|
|
82
|
+
- **실행 가능성**: plugins/ (hello-world, git-insights), mcp_registry, marketplace.py, core/plugins.py 존재. ingestion이 단일 관문. 하지만 실제 외부 브릿지/마켓플레이스 UI/보안 스캔은 대형.
|
|
83
|
+
|
|
84
|
+
기타: Tauri auto-update + native scale, Workflow Designer 프론트엔드 완성, VSCode 확장 심화 통합 등.
|
|
85
|
+
|
|
86
|
+
**검증 결과 (2026-07-07)**:
|
|
87
|
+
- Core imports (Config, IngestionPipeline, AgentRuntime, ToolRegistry): OK
|
|
88
|
+
- Unit tests: 833 passed (tests/unit/)
|
|
89
|
+
- Ingestion specific: 14 passed
|
|
90
|
+
- Agent runtime tests: 29 passed
|
|
91
|
+
- Frontend lint: typecheck + privacy + OpenAPI 335 paths + lint all pass
|
|
92
|
+
- Git: clean (inspection 시점)
|
|
93
|
+
|
|
94
|
+
**2026-07-07 pts_grok 대형 후보 1~5 슬라이스 실행 결과 (자율 진행)**:
|
|
95
|
+
- 1. KG/Retrieval: background ingestion queue seam, schedule_background, vector index scale diagnostics, backlog reasons/samples, coverage ratio, and rebuild latency budget.
|
|
96
|
+
- 2. Multimodal: offline VisionStub describe/embed path and discovery_index vision_caption fallback so image files have searchable evidence without remote calls.
|
|
97
|
+
- 3. Server decomp: explicit _RUNTIME_BUNDLE in app_factory as the migration contract toward DI while dict(locals()) compatibility remains.
|
|
98
|
+
- 3a. Server decomp follow-up: filtered app_factory runtime namespace so internal scratch imports/runtime dicts no longer leak through lazy server_app compatibility; namespace reduced from 300 to 253 keys while legacy helpers remain, with typed RuntimeBundle added behind legacy _RUNTIME_BUNDLE.
|
|
99
|
+
- 4. Proactive/Temporal: stronger MemoryQualityManager conflict detection, including pairwise opposite-preference and temporal-negation flags.
|
|
100
|
+
- 4a. Proactive UX follow-up: Brain Brief now emits proactive_actions, and BrainHome renders one-click ask/delegate/review/graph action cards.
|
|
101
|
+
- 4b. Proactive UX completion: BrainHome now keeps a local activity trail for suggested actions, showing whether Brain ask, Agent delegation, Review draft, or graph navigation actions are running, completed, or failed.
|
|
102
|
+
- 5. Interop/Marketplace: ingestion_bridge marketplace templates and /marketplace/interop/bridges exposure for future Obsidian/Calendar-style connector imports through unified-ingestion.
|
|
103
|
+
- 총 affected tests: 45 passed in the first targeted gate. Broader lint/static/doc checks are run before commit.
|
|
104
|
+
- 남은: 각 슬라이스는 기반 확장. full background workers, real local VLM/image embeddings, full locals() removal, graph-level temporal queries, and production connector installs remain follow-up work.
|
|
105
|
+
|
|
106
|
+
이 항목들은 "대형사이즈" 에도 할 만하며, mission (local-first, KG, AgentRuntime, security) 과 AGENTS 우선 리팩토링 순서에 부합. 작은 슬라이스로 시작 추천.
|
package/docs/TRUST_MODEL.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Lattice AI Trust Model
|
|
2
2
|
|
|
3
|
-
Current release: **
|
|
3
|
+
Current release: **9.1.0 — Code Review Completion & Fail-Closed Runtime**.
|
|
4
4
|
|
|
5
5
|
Lattice AI is local-first, explicit about external communication, and honest
|
|
6
6
|
when a capability is unavailable.
|
|
@@ -26,7 +26,8 @@ External communication requires configuration plus a user/admin action:
|
|
|
26
26
|
|
|
27
27
|
- cloud model calls after keys are configured and a cloud model is selected;
|
|
28
28
|
- model downloads from registries after install consent;
|
|
29
|
-
- Telegram bridge after the integration is enabled
|
|
29
|
+
- Telegram bridge after the integration is enabled, the chat is allowlisted,
|
|
30
|
+
and a dedicated server session bearer is configured;
|
|
30
31
|
- Brain Network peer actions after pairing;
|
|
31
32
|
- Docker/Postgres setup after opt-in scale configuration;
|
|
32
33
|
- update checks only when enabled;
|
|
@@ -49,6 +50,8 @@ Lattice AI should fail closed or show an unavailable state for:
|
|
|
49
50
|
- dry-run versus real execution;
|
|
50
51
|
- no graph/context evidence available;
|
|
51
52
|
- unavailable external integration;
|
|
53
|
+
- unknown or unreadable Knowledge Graph workspace scope;
|
|
54
|
+
- missing Telegram chat allowlist or dedicated server session token;
|
|
52
55
|
- wrong archive passphrase;
|
|
53
56
|
- archive tampering, unsupported archive versions, or path traversal.
|
|
54
57
|
|
package/docs/WHY_LATTICE.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Why Lattice AI Exists
|
|
2
2
|
|
|
3
|
-
Current release: **
|
|
3
|
+
Current release: **9.1.0 — Code Review Completion & Fail-Closed Runtime**.
|
|
4
4
|
|
|
5
5
|
**Lattice AI is a local-first Digital Brain that keeps your knowledge durable
|
|
6
6
|
across any AI model.**
|
|
@@ -28,15 +28,20 @@ Lattice AI keeps conversations, documents, memories, decisions, relationships,
|
|
|
28
28
|
and source provenance in a private local Brain. Models can be local, cloud,
|
|
29
29
|
current, or future. The Brain remains.
|
|
30
30
|
|
|
31
|
-
The graph matters, but
|
|
32
|
-
local-first Digital Brain:
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
31
|
+
The graph matters as visible proof, but a graph editor is not the product
|
|
32
|
+
identity. The product identity is a local-first Digital Brain: the user talks or
|
|
33
|
+
adds a source, watches it enter memory, sees the real relationships that emerge,
|
|
34
|
+
and uses those memories to drive reviewed automation.
|
|
35
|
+
|
|
36
|
+
The current main-branch experience is intentionally not a dashboard. The first
|
|
37
|
+
screen leads with a living knowledge journey around the conversation composer:
|
|
38
|
+
chat, file, folder, note, and web inputs flow into the Brain; a bounded real
|
|
39
|
+
graph makes new connections visible; and grounded next actions explain which
|
|
40
|
+
memory and evidence they use. Evidence-backed Brain Brief, deeper memory rings,
|
|
41
|
+
and runtime detail remain available without turning the first screen into an
|
|
42
|
+
operator console. Primary navigation follows human tasks — Chat, Sources,
|
|
43
|
+
Memory, and Work — while models, workspace controls, and administration stay
|
|
44
|
+
secondary.
|
|
40
45
|
|
|
41
46
|
## Practical Reasons To Use It
|
|
42
47
|
|
|
@@ -20,6 +20,28 @@ The engine version is exported as:
|
|
|
20
20
|
WORKFLOW_ENGINE_VERSION = "2.2.0"
|
|
21
21
|
```
|
|
22
22
|
|
|
23
|
+
## Memory-grounded Brain automation
|
|
24
|
+
|
|
25
|
+
Brain Home turns recalled knowledge into suggested actions and automation
|
|
26
|
+
recipes without silently enabling work. A recipe is first installed as a
|
|
27
|
+
disabled, reviewable workflow draft. The user can inspect its memory focus,
|
|
28
|
+
source, evidence, and agent roles, then explicitly enable the same workflow in
|
|
29
|
+
place; activation does not create a duplicate recipe or replace the user's
|
|
30
|
+
reviewed name, prompt, roles, or node edits.
|
|
31
|
+
|
|
32
|
+
When an enabled recipe receives a successful workspace-scoped Brain ingestion
|
|
33
|
+
event, the workflow runs a researcher-first agent chain:
|
|
34
|
+
|
|
35
|
+
```text
|
|
36
|
+
Brain event -> researcher recall -> planner -> executor -> reviewer -> review queue
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
The researcher receives scoped `MemoryService.recall` context. Trigger identity,
|
|
40
|
+
workspace, source provenance, and run ID remain attached through execution and
|
|
41
|
+
review. Chat, upload, local-folder, note, web, and compatible legacy ingestion
|
|
42
|
+
events are normalized; failed ingestion never triggers a recipe. Generated work
|
|
43
|
+
is staged for review rather than performing an unreviewed external action.
|
|
44
|
+
|
|
23
45
|
## v2.2 hardening
|
|
24
46
|
|
|
25
47
|
- Agent node output is captured in workflow context and can flow into a later
|
package/docs/kg-schema.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Knowledge Graph Schema
|
|
2
2
|
|
|
3
|
-
Current release: **
|
|
3
|
+
Current release: **9.1.0 — Code Review Completion & Fail-Closed Runtime**.
|
|
4
4
|
|
|
5
5
|
명세 출처: `lattice_ai_full_spec.pptx` 슬라이드 20·21·22
|
|
6
6
|
구현: `kg_schema.py`
|
|
@@ -137,6 +137,10 @@ provenance(source_type, source_uri, content_hash, captured_at, modified_at,
|
|
|
137
137
|
- 모든 콘텐츠 노드는 `SOURCE` 노드로 `INDEXED_FROM` 엣지를 가져 **출처를 항상 설명 가능**하다.
|
|
138
138
|
- provenance 는 노드 `metadata.provenance` 에 임베드되며, 동시에 감사 가능한
|
|
139
139
|
`ingestion_provenance` 테이블에 기록된다 (`KnowledgeGraphStore.get_provenance(node_id)`).
|
|
140
|
+
- 로컬 폴더 수집은 Computer/Drive/Folder/File/Chunk/Concept/semantic 노드 전체에
|
|
141
|
+
동일한 `workspace_id`를 투영하고 신규 ID도 워크스페이스별로 분리한다. 기존
|
|
142
|
+
범위 없는 로컬 폴더는 개인 Brain으로 재투영하되 기존 노드 ID는 보존하며,
|
|
143
|
+
같은 폴더를 다른 워크스페이스로 조용히 재할당하지 않는다.
|
|
140
144
|
|
|
141
145
|
구현: `lattice_brain/ingestion.py` (`IngestionPipeline`) 가 단일 진입점이며,
|
|
142
146
|
파일/로컬폴더/URL/브라우저 탭/텍스트를 모두 이 형태로 정규화한다.
|
|
@@ -257,9 +261,16 @@ print(KGStoreV2(store.db_path).stats())
|
|
|
257
261
|
|
|
258
262
|
### v4 컬럼 (T3b/T3c)
|
|
259
263
|
|
|
260
|
-
- `nodes_v2.workspace_id` — `NULL` = legacy-global (스코프 도입 이전 데이터)
|
|
264
|
+
- `nodes_v2.workspace_id` — `NULL` = legacy-global (스코프 도입 이전 데이터).
|
|
265
|
+
9.1.0부터 일반 workspace 읽기에는 자동 포함하지 않으며
|
|
266
|
+
`include_legacy_global=True`를 명시한 호환 읽기에서만 포함
|
|
261
267
|
- `nodes_v2.visibility` — 신규 스코프 쓰기는 `workspace`/`private`,
|
|
262
268
|
스코프 없는 쓰기는 `legacy` (기존 공유 데이터를 몰래 private 으로
|
|
263
269
|
만들지 않는다)
|
|
264
270
|
- `nodes_v2.superseded_by` — 개정 체인 (`mark_superseded`)
|
|
265
271
|
- `edge_occurrences` — 관계의 모든 관측 기록 (observed_at/weight/source)
|
|
272
|
+
|
|
273
|
+
workspace projection 조회가 실패하거나 node의 scope를 확인할 수 없으면 해당
|
|
274
|
+
node는 비공개로 취급해 빈 결과를 반환하거나 오류를 전파합니다. projection 장애를
|
|
275
|
+
legacy-global로 해석해 다른 workspace에 노출하는 fail-open 경로는 허용하지
|
|
276
|
+
않습니다.
|
package/docs/mcp-tools.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# MCP 도구 카탈로그
|
|
1
|
+
# MCP 도구 카탈로그 (v9.1.0)
|
|
2
2
|
|
|
3
3
|
Lattice AI는 MCP(Model Context Protocol) 서버로 동작하여 Claude Desktop, Cursor 등에서 직접 도구를 사용할 수 있습니다.
|
|
4
4
|
|
|
@@ -31,7 +31,7 @@ Lattice AI는 MCP(Model Context Protocol) 서버로 동작하여 Claude Desktop,
|
|
|
31
31
|
|
|
32
32
|
| 도구 | 설명 | 위험도 |
|
|
33
33
|
|------|------|--------|
|
|
34
|
-
| `run_command` |
|
|
34
|
+
| `run_command` | shell 없이 고정 read-only 명령 allowlist 실행 | 높음 |
|
|
35
35
|
| `run_terminal_command` | 터미널 명령 (별칭) | 높음 |
|
|
36
36
|
|
|
37
37
|
### 작업 관리
|
|
@@ -45,10 +45,11 @@ Lattice AI는 MCP(Model Context Protocol) 서버로 동작하여 Claude Desktop,
|
|
|
45
45
|
|
|
46
46
|
| 도구 | 설명 | 위험도 |
|
|
47
47
|
|------|------|--------|
|
|
48
|
-
| `computer_screenshot` | 화면 캡처 |
|
|
48
|
+
| `computer_screenshot` | 화면 캡처 (desktop-control capability 및 정책 승인 필요) | 높음 |
|
|
49
|
+
| `computer_status` | 데스크톱 제어 상태 조회 (동일 capability/policy 적용) | 중간 |
|
|
49
50
|
| `computer_open_app` | 앱 실행 | 중간 |
|
|
50
51
|
| `computer_open_url` | URL 열기 | 낮음 |
|
|
51
|
-
| `network_status` | IP, Wi-Fi 정보 |
|
|
52
|
+
| `network_status` | IP, Wi-Fi 정보 (인증 및 ToolRegistry 정책 적용) | 중간 |
|
|
52
53
|
|
|
53
54
|
### 문서
|
|
54
55
|
|
|
@@ -91,13 +92,18 @@ curl -b "session=<token>" \
|
|
|
91
92
|
curl -b "session=<token>" -X POST \
|
|
92
93
|
http://localhost:4825/tools/run_command \
|
|
93
94
|
-H "Content-Type: application/json" \
|
|
94
|
-
-d '{"command": "
|
|
95
|
+
-d '{"command": "rg TODO ."}'
|
|
95
96
|
```
|
|
96
97
|
|
|
98
|
+
`run_command`는 `pwd`, `ls`, `find`, `cat`, `head`, `tail`, `wc`, `rg`만 허용합니다.
|
|
99
|
+
Python/Node/npm/npx/sed, shell operator, 실행 파일 경로, 절대 경로, `..` traversal,
|
|
100
|
+
workspace 밖 symlink, `rg --pre`, `find -exec/-delete`는 거부됩니다. 빌드와 테스트는
|
|
101
|
+
별도의 허용된 project-script 도구를 사용합니다.
|
|
102
|
+
|
|
97
103
|
## 도구 카탈로그 조회
|
|
98
104
|
|
|
99
105
|
```bash
|
|
100
|
-
curl http://localhost:4825/mcp/tools
|
|
106
|
+
curl -b "session=<token>" http://localhost:4825/mcp/tools
|
|
101
107
|
```
|
|
102
108
|
|
|
103
109
|
응답:
|
|
@@ -114,3 +120,8 @@ curl http://localhost:4825/mcp/tools
|
|
|
114
120
|
]
|
|
115
121
|
}
|
|
116
122
|
```
|
|
123
|
+
|
|
124
|
+
도구 카탈로그는 인증이 필요하며 서버의 절대 `AGENT_ROOT`를 반환하지 않습니다.
|
|
125
|
+
MCP/plugin dispatch도 각 도구의 사용자·workspace·capability·승인 정책을 우회할
|
|
126
|
+
수 없습니다. knowledge/Obsidian 계열 읽기는 명시적 사용자 동의와 scope를
|
|
127
|
+
사용합니다.
|
package/docs/privacy.md
CHANGED
|
@@ -2,7 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
## 요약
|
|
4
4
|
|
|
5
|
-
**Lattice AI는
|
|
5
|
+
**Lattice AI는 기본 상태에서 텔레메트리를 수집하거나 사용자 데이터를 외부로
|
|
6
|
+
전송하지 않습니다.** 사용자가 명시적으로 선택한 클라우드 모델, 모델 다운로드,
|
|
7
|
+
웹 페이지 읽기, Telegram/Brain Network 같은 외부 기능은 해당 대상과 통신합니다.
|
|
6
8
|
|
|
7
9
|
모든 데이터는 사용자의 로컬 머신에만 저장됩니다.
|
|
8
10
|
|
|
@@ -11,7 +13,7 @@
|
|
|
11
13
|
| 데이터 | 저장 위치 | 설명 |
|
|
12
14
|
|--------|-----------|------|
|
|
13
15
|
| 사용자 계정 | `~/.ltcai/users.json` | 이름, scrypt 해시 비밀번호, 역할 |
|
|
14
|
-
| 세션 토큰 | `~/.ltcai/sessions.json` |
|
|
16
|
+
| 세션 토큰 | `~/.ltcai/sessions.json` | SHA-256 토큰 해시, 만료/갱신 시각(평문 bearer 미저장) |
|
|
15
17
|
| 채팅 히스토리 | `~/.ltcai/chat_history.json` | 사용자-AI 대화 내용 |
|
|
16
18
|
| 지식 그래프 | `~/.ltcai/knowledge_graph.sqlite` | 채팅/문서/웹/탭 노드·엣지, 프로비넌스 |
|
|
17
19
|
| 업로드/수집 파일 | `~/.ltcai/knowledge_graph_blobs/` | 원본 PDF/DOCX/웹 텍스트 등 |
|
|
@@ -38,11 +40,25 @@
|
|
|
38
40
|
|
|
39
41
|
Apple Silicon MLX 로컬 모델 사용 시에는 프롬프트가 외부로 전송되지 않습니다.
|
|
40
42
|
|
|
43
|
+
## Telegram 및 권한 알림
|
|
44
|
+
|
|
45
|
+
Telegram bridge는 사용자가 명시적으로 활성화하고 chat ID를
|
|
46
|
+
`LATTICEAI_TELEGRAM_ALLOWED_CHAT_IDS`에 등록한 경우에만 해당 chat의 메시지와
|
|
47
|
+
callback query를 처리합니다. 로컬 Lattice API 호출에는 전용
|
|
48
|
+
`LATTICEAI_SERVER_SESSION_TOKEN`을 사용하며 세션 저장 파일에서 bearer를 찾지
|
|
49
|
+
않습니다.
|
|
50
|
+
|
|
51
|
+
Discord 등의 권한 요청 알림에는 전체 승인 토큰이 아닌 짧은 hint만 포함됩니다.
|
|
52
|
+
운영자가 `LATTICEAI_PERMISSION_UI_URL`을 설정하면 검토 페이지 링크를 제공할 수
|
|
53
|
+
있지만, 승인 토큰 자체는 메시지나 URL에 넣지 않습니다.
|
|
54
|
+
|
|
41
55
|
## 웹/브라우저 수집 (v3.6.0)
|
|
42
56
|
|
|
43
57
|
- **URL 읽기**(`/api/browser/read-url`): 사용자가 명시적으로 요청한 URL을 **로컬
|
|
44
58
|
런타임이 직접** 가져와 텍스트만 추출해 그래프에 색인합니다. Lattice AI가 임의로
|
|
45
|
-
크롤링하지 않으며, 가져온 페이지는 외부로 다시 전송되지 않습니다.
|
|
59
|
+
크롤링하지 않으며, 가져온 페이지는 외부로 다시 전송되지 않습니다. private/local
|
|
60
|
+
주소와 DNS rebinding을 차단하고 redirect마다 다시 검증하며 최대 4MB의 textual
|
|
61
|
+
응답만 스트리밍합니다.
|
|
46
62
|
- **브라우저 탭 수집**(`/api/browser/ingest-current-tab`) 및 Manifest V3 확장:
|
|
47
63
|
확장 프로그램은 **오직 `127.0.0.1`(로컬)** 로만 전송합니다. 클라우드 엔드포인트가
|
|
48
64
|
존재하지 않습니다(`browser-extension/` 소스에서 단일 `fetch` 대상 확인 가능).
|
package/docs/public-deploy.md
CHANGED
|
@@ -7,7 +7,8 @@ Render, Fly.io, Railway, VPS 등 외부 서버에 Lattice AI를 배포할 때
|
|
|
7
7
|
```bash
|
|
8
8
|
# 필수
|
|
9
9
|
LATTICEAI_MODE=public
|
|
10
|
-
|
|
10
|
+
LATTICEAI_INVITE_GATE_ENABLED=true # 초대 온보딩을 사용할 때만 활성화
|
|
11
|
+
LATTICEAI_INVITE_CODE=my-random-invite-code # 권장: 운영자가 생성한 랜덤 초대 코드
|
|
11
12
|
|
|
12
13
|
# 클라우드 모델 (최소 하나 이상)
|
|
13
14
|
OPENAI_API_KEY=sk-...
|
|
@@ -24,8 +25,33 @@ LATTICEAI_ENABLE_TELEGRAM=false # Telegram 봇 비활성화
|
|
|
24
25
|
LATTICEAI_ENABLE_GRAPH=false # Data Graph 비활성화
|
|
25
26
|
LATTICEAI_DATA_DIR=/data # 데이터 디렉토리
|
|
26
27
|
LATTICEAI_ADMIN_EMAILS=you@example.com # 어드민 이메일 고정
|
|
28
|
+
LATTICEAI_PERMISSION_UI_URL=https://example.com/admin/permissions # 선택
|
|
27
29
|
```
|
|
28
30
|
|
|
31
|
+
public/non-loopback 모드는 인증을 강제하고 공개 회원가입을 닫습니다. 초대
|
|
32
|
+
온보딩이 필요할 때만 `LATTICEAI_INVITE_GATE_ENABLED=true`로 게이트를 켭니다.
|
|
33
|
+
초대 게이트에는 공용 기본 코드가 없습니다. `LATTICEAI_INVITE_CODE`를 생략하면
|
|
34
|
+
게이트 활성화 시 CSPRNG로 설치별 코드와 쿠키 서명 키를 만들고 데이터 디렉터리의
|
|
35
|
+
권한 제한 파일에 보관합니다. 운영 환경에서는 직접 랜덤 값을 설정하거나 이 파일이
|
|
36
|
+
영구 볼륨에 남도록 해야 합니다. `authorized=true` 같은 정적 쿠키는 인증되지 않습니다.
|
|
37
|
+
서명된 초대 claim은 해당 회원가입 요청만 허용하며, claim 없는 `/register` 직접
|
|
38
|
+
호출은 공개 회원가입이 닫힌 상태를 우회할 수 없습니다.
|
|
39
|
+
|
|
40
|
+
Telegram을 의도적으로 활성화할 때만 아래 세 값을 모두 설정합니다.
|
|
41
|
+
|
|
42
|
+
```bash
|
|
43
|
+
LATTICEAI_ENABLE_TELEGRAM=true
|
|
44
|
+
LATTICEAI_TELEGRAM_BOT_TOKEN=...
|
|
45
|
+
LATTICEAI_TELEGRAM_ALLOWED_CHAT_IDS=123456789,987654321
|
|
46
|
+
LATTICEAI_SERVER_SESSION_TOKEN=...
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
허용목록은 메시지와 callback query 모두에 등록보다 먼저 적용됩니다. 비어 있으면
|
|
50
|
+
모든 chat을 거부합니다. `LATTICEAI_SERVER_SESSION_TOKEN`은 봇 전용 인증 세션의
|
|
51
|
+
bearer이며 `sessions.json`에 저장된 해시를 복사해서는 안 됩니다.
|
|
52
|
+
`LATTICEAI_PERMISSION_UI_URL`은 선택적인 승인 검토 페이지 링크일 뿐이며, 알림에는
|
|
53
|
+
전체 승인 토큰이 포함되지 않습니다.
|
|
54
|
+
|
|
29
55
|
## Docker
|
|
30
56
|
|
|
31
57
|
```dockerfile
|
|
@@ -38,6 +64,7 @@ docker run --rm \
|
|
|
38
64
|
-p 4825:4825 \
|
|
39
65
|
-e LATTICEAI_MODE=public \
|
|
40
66
|
-e OPENAI_API_KEY="$OPENAI_API_KEY" \
|
|
67
|
+
-e LATTICEAI_INVITE_GATE_ENABLED=true \
|
|
41
68
|
-e LATTICEAI_INVITE_CODE="my-secret-code" \
|
|
42
69
|
-v "$PWD/.data:/data" \
|
|
43
70
|
lattice-ai
|
|
@@ -56,7 +83,7 @@ docker run --rm \
|
|
|
56
83
|
|
|
57
84
|
```bash
|
|
58
85
|
fly launch
|
|
59
|
-
fly secrets set LATTICEAI_MODE=public OPENAI_API_KEY=sk-... LATTICEAI_INVITE_CODE=secret
|
|
86
|
+
fly secrets set LATTICEAI_MODE=public OPENAI_API_KEY=sk-... LATTICEAI_INVITE_GATE_ENABLED=true LATTICEAI_INVITE_CODE=secret
|
|
60
87
|
fly volumes create ltcai_data --size 1
|
|
61
88
|
fly deploy
|
|
62
89
|
```
|
|
@@ -117,13 +144,15 @@ yourdomain.com {
|
|
|
117
144
|
## 퍼블릭 배포 체크리스트
|
|
118
145
|
|
|
119
146
|
- [ ] `LATTICEAI_MODE=public` 설정
|
|
120
|
-
- [ ]
|
|
147
|
+
- [ ] 초대 온보딩이 필요하면 `LATTICEAI_INVITE_GATE_ENABLED=true`와 비공개
|
|
148
|
+
랜덤 `LATTICEAI_INVITE_CODE` 설정(또는 생성된 설치별 secret 영구 보관)
|
|
121
149
|
- [ ] HTTPS 리버스 프록시 구성 (nginx / Caddy)
|
|
122
150
|
- [ ] 영구 볼륨 마운트 (`/data` 또는 `LATTICEAI_DATA_DIR`)
|
|
123
151
|
- [ ] 방화벽에서 4825 포트 직접 노출 차단
|
|
124
152
|
- [ ] `LATTICEAI_ALLOW_LOCAL_MODELS=false`
|
|
125
153
|
- [ ] 최소 하나의 클라우드 API 키 설정
|
|
126
154
|
- [ ] 첫 가입 후 어드민 계정 확인 (`http://yourdomain.com/admin`)
|
|
155
|
+
- [ ] Telegram 활성화 시 chat ID 허용목록과 전용 서버 세션 토큰을 모두 설정
|
|
127
156
|
|
|
128
157
|
## 지원 클라우드 모델 프리픽스
|
|
129
158
|
|