ltcai 9.3.0 → 9.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 +28 -22
- package/docs/CHANGELOG.md +23 -0
- package/docs/COMMUNITY_AND_PLUGINS.md +4 -3
- package/docs/DEVELOPMENT.md +8 -8
- package/docs/LEGACY_COMPATIBILITY.md +1 -1
- package/docs/ONBOARDING.md +2 -2
- 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/mcp-tools.md +1 -1
- 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/automation_intelligence.py +129 -0
- package/latticeai/app_factory.py +13 -0
- package/latticeai/core/legacy_compatibility.py +1 -1
- package/latticeai/core/marketplace.py +1 -1
- package/latticeai/core/workspace_os.py +1 -1
- package/latticeai/runtime/persistence_runtime.py +8 -0
- package/latticeai/services/architecture_readiness.py +1 -1
- package/latticeai/services/automation_intelligence.py +450 -0
- package/latticeai/services/product_readiness.py +1 -1
- package/package.json +1 -1
- package/scripts/check_current_release_docs.mjs +1 -1
- package/src-tauri/Cargo.lock +1 -1
- package/src-tauri/Cargo.toml +1 -1
- package/src-tauri/tauri.conf.json +1 -1
- package/static/app/asset-manifest.json +11 -11
- package/static/app/assets/Act-t9oveJO7.js +1 -0
- package/static/app/assets/{Brain-Jd3V4Obm.js → Brain-DP-gpcEJ.js} +1 -1
- package/static/app/assets/{Capture-DLj9Uzed.js → Capture-DYknDKy8.js} +1 -1
- package/static/app/assets/{Library-dPbez7Tc.js → Library-DLyc_g8c.js} +1 -1
- package/static/app/assets/{System-CkROWBuq.js → System-BZgJ7tGu.js} +1 -1
- package/static/app/assets/{index-CAlo2Lm-.js → index-BeQ77vPs.js} +3 -3
- package/static/app/assets/index-Cl4S_9Id.css +2 -0
- package/static/app/assets/{primitives-DrwaJ7dy.js → primitives-DawfkPR4.js} +1 -1
- package/static/app/assets/{textarea-DNvCwmmK.js → textarea-a4Ir3SZS.js} +1 -1
- package/static/app/index.html +2 -2
- package/static/sw.js +1 -1
- package/static/app/assets/Act-ls57ctKH.js +0 -1
- package/static/app/assets/index-BRUqy2zk.css +0 -2
package/README.md
CHANGED
|
@@ -1,10 +1,15 @@
|
|
|
1
1
|
# Lattice AI
|
|
2
2
|
|
|
3
|
-
**Lattice AI 9.
|
|
3
|
+
**Lattice AI 9.4.0 is the local-first Digital Brain platform. Question-Driven Everyday Automation makes automating daily life effortless: the Brain mines your own recurring questions and connected knowledge folders, proposes concrete automations with your literal questions as evidence, and installs them in one click as consent-first drafts — scheduled answers for questions you keep asking, digests for folders that keep growing.**
|
|
4
4
|
|
|
5
5
|
**Lattice AI는 모델이 바뀌어도 내 지식과 맥락을 보존하는 로컬 우선 AI 브레인입니다.**
|
|
6
6
|
|
|
7
|
-
> The 9.
|
|
7
|
+
> The 9.4.0 release adds question-driven automation: a deterministic local
|
|
8
|
+
> pattern miner clusters your recurring questions (the evidence shown is your
|
|
9
|
+
> own words, no model call), an /api/automation surface turns patterns and
|
|
10
|
+
> connected folders into one-click suggestions, and every accepted suggestion
|
|
11
|
+
> becomes a disabled, review-gated draft workflow you enable deliberately.
|
|
12
|
+
> The 9.3.0 release wired the previously dormant Brain quality layer into
|
|
8
13
|
> the product: /api/brain health diagnosis with recommended care actions, a
|
|
9
14
|
> proactive insights digest, contradiction surfacing across memories and the
|
|
10
15
|
> graph, dry-run-first duplicate consolidation, and hybrid recall that blends
|
|
@@ -97,10 +102,10 @@ You need Lattice AI when:
|
|
|
97
102
|
The screenshots below are the latest checked-in visual evidence captures. They
|
|
98
103
|
keep the first-run Brain flow, memory graph, source capture, model library,
|
|
99
104
|
system view, admin console, and review center visible as release gates while
|
|
100
|
-
9.
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
captures below are the checked-in 9.
|
|
105
|
+
9.4.0 makes everyday automation effortless: the Brain proposes automations
|
|
106
|
+
from your own recurring questions and connected knowledge folders, and every
|
|
107
|
+
accepted suggestion becomes a consent-first draft you review and enable. The
|
|
108
|
+
captures below are the checked-in 9.4.0 visual release evidence for that
|
|
104
109
|
product flow.
|
|
105
110
|
|
|
106
111
|
### 1. Wake Brain
|
|
@@ -113,21 +118,21 @@ confirm owner, check the computer, choose the Brain voice.
|
|
|
113
118
|
Choose the owner of the Brain. The profile is not a SaaS account by default; it
|
|
114
119
|
is the local identity for the knowledge you keep.
|
|
115
120
|
|
|
116
|
-

|
|
117
122
|
|
|
118
123
|
### 3. Recommended Models
|
|
119
124
|
|
|
120
125
|
Start with a short list: safest recommendation, faster model, stronger model.
|
|
121
126
|
Advanced details stay available without overwhelming first-time users.
|
|
122
127
|
|
|
123
|
-

|
|
124
129
|
|
|
125
130
|
### 4. Install And Load
|
|
126
131
|
|
|
127
132
|
Download and load only after consent. Lattice explains model size, local
|
|
128
133
|
execution, and network use before work starts.
|
|
129
134
|
|
|
130
|
-

|
|
131
136
|
|
|
132
137
|
### 5. Brain Chat
|
|
133
138
|
|
|
@@ -139,14 +144,14 @@ and its visible life signal follow real listening, recall, synthesis, and action
|
|
|
139
144
|
state. Detailed memory rings, provenance, conversation history, and
|
|
140
145
|
model/runtime proof open as overlays only when requested.
|
|
141
146
|
|
|
142
|
-

|
|
143
148
|
|
|
144
149
|
### 6. Review Center
|
|
145
150
|
|
|
146
151
|
Automation results are staged for review before they become durable decisions.
|
|
147
152
|
Snooze, unsnooze, run now, approve, and dismiss actions stay explicit.
|
|
148
153
|
|
|
149
|
-

|
|
150
155
|
|
|
151
156
|
## Brain Depths
|
|
152
157
|
|
|
@@ -162,10 +167,10 @@ The user travels inward from everyday memory to deeper structure:
|
|
|
162
167
|
|
|
163
168
|
Walkthrough:
|
|
164
169
|
|
|
165
|
-

|
|
166
171
|
|
|
167
172
|
Screenshot index and capture notes:
|
|
168
|
-
[output/release/v9.
|
|
173
|
+
[output/release/v9.4.0/SCREENSHOT_INDEX.md](output/release/v9.4.0/SCREENSHOT_INDEX.md)
|
|
169
174
|
|
|
170
175
|
## Install
|
|
171
176
|
|
|
@@ -250,7 +255,7 @@ See [docs/DEVELOPMENT.md](docs/DEVELOPMENT.md) for developer workflow details.
|
|
|
250
255
|
|
|
251
256
|
## Current Release
|
|
252
257
|
|
|
253
|
-
The current release is **9.
|
|
258
|
+
The current release is **9.4.0 — Question-Driven Everyday Automation**:
|
|
254
259
|
|
|
255
260
|
- A new `latticeai.core.file_generation` pipeline treats every model reply as
|
|
256
261
|
untrusted content: extension-aware strict prompting, extraction of the real
|
|
@@ -269,24 +274,24 @@ The current release is **9.3.0 — Proactive Brain Intelligence**:
|
|
|
269
274
|
- File writes report whether content was generated cleanly, retried, or
|
|
270
275
|
auto-repaired in the response payload (`generation` metadata).
|
|
271
276
|
|
|
272
|
-
Expected artifacts for 9.
|
|
277
|
+
Expected artifacts for 9.4.0 release must use exact filenames:
|
|
273
278
|
|
|
274
|
-
- `dist/ltcai-9.
|
|
275
|
-
- `dist/ltcai-9.
|
|
276
|
-
- `ltcai-9.
|
|
277
|
-
- `dist/ltcai-9.
|
|
278
|
-
- `src-tauri/target/release/bundle/dmg/Lattice AI_9.
|
|
279
|
+
- `dist/ltcai-9.4.0-py3-none-any.whl`
|
|
280
|
+
- `dist/ltcai-9.4.0.tar.gz`
|
|
281
|
+
- `ltcai-9.4.0.tgz`
|
|
282
|
+
- `dist/ltcai-9.4.0.vsix`
|
|
283
|
+
- `src-tauri/target/release/bundle/dmg/Lattice AI_9.4.0_aarch64.dmg`
|
|
279
284
|
|
|
280
285
|
Do not use wildcard artifact uploads. Package registry publishing remains owner-run.
|
|
281
286
|
|
|
282
287
|
See [docs/ROADMAP_RECOMMENDATIONS.md](docs/ROADMAP_RECOMMENDATIONS.md) for the
|
|
283
|
-
strategic roadmap slices applied through 9.
|
|
288
|
+
strategic roadmap slices applied through 9.4.0 and the follow-up tracks.
|
|
284
289
|
|
|
285
290
|
## Known Limitations
|
|
286
291
|
|
|
287
292
|
- External package registries are owner-published and can lag behind GitHub.
|
|
288
293
|
- PostgreSQL/pgvector is optional scale/migration tooling. SQLite remains the
|
|
289
|
-
live local Brain store in 9.
|
|
294
|
+
live local Brain store in 9.4.0.
|
|
290
295
|
- Docker, model downloads, cloud model calls, Telegram, Brain Network, and update
|
|
291
296
|
checks require explicit user action.
|
|
292
297
|
- Conversation does not fabricate answers when no model is loaded.
|
|
@@ -298,6 +303,7 @@ strategic roadmap slices applied through 9.3.0 and the follow-up tracks.
|
|
|
298
303
|
|
|
299
304
|
| Version | Theme |
|
|
300
305
|
| --- | --- |
|
|
306
|
+
| 9.4.0 | Question-Driven Everyday Automation: the Brain mines recurring user questions and connected knowledge folders into one-click, consent-first automation suggestions installed as review-gated drafts |
|
|
301
307
|
| 9.3.0 | Proactive Brain Intelligence: the Brain diagnoses its own health, surfaces contradictions and stale knowledge, proposes consent-first duplicate consolidation, and recalls with hybrid lexical+semantic evidence behind an honest quality gate |
|
|
302
308
|
| 9.2.0 | Model-Agnostic File Generation: chat file requests always produce structurally valid files with any LLM via extraction, per-type validation, corrective retry, deterministic repair, inferred file targets, and a fault-tolerant agent JSON loop |
|
|
303
309
|
| 9.1.0 | Code Review Completion & Fail-Closed Runtime: all July 11 review findings closed across fail-closed security, typed runtime/model/chat boundaries, honest frontend failures and tests, and repository hygiene |
|
package/docs/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,29 @@ 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
|
+
## [9.4.0] - 2026-07-20
|
|
8
|
+
|
|
9
|
+
### Added
|
|
10
|
+
- Added `latticeai/services/automation_intelligence.py` and the
|
|
11
|
+
`/api/automation/*` router: recurring-question pattern mining
|
|
12
|
+
(deterministic local token-signature clustering with literal-question
|
|
13
|
+
evidence), automation suggestions from question patterns and connected
|
|
14
|
+
knowledge folders, idempotent consent-first install (disabled draft,
|
|
15
|
+
review-queue gated, local-only), and a combined overview payload.
|
|
16
|
+
- Added the "Automation suggestions for you" panel to the Act page with
|
|
17
|
+
evidence chips and one-click creation, fully ko/en localized.
|
|
18
|
+
- Added `tests/unit/test_automation_intelligence.py` (10 tests).
|
|
19
|
+
|
|
20
|
+
### Changed
|
|
21
|
+
- Recurring question intents that match a starter recipe (daily digest,
|
|
22
|
+
weekly project review, follow-up radar) suggest that recipe; other
|
|
23
|
+
repeated questions become parameterized "scheduled answer" workflows.
|
|
24
|
+
|
|
25
|
+
### Security
|
|
26
|
+
- History mining respects user/workspace scoping and excludes legacy-global
|
|
27
|
+
rows for scoped reads; suggestion installs carry provenance metadata and
|
|
28
|
+
never enable themselves.
|
|
29
|
+
|
|
7
30
|
## [9.3.0] - 2026-07-20
|
|
8
31
|
|
|
9
32
|
### Added
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
# Community And Plugins
|
|
2
2
|
|
|
3
|
-
Current release: **9.
|
|
3
|
+
Current release: **9.4.0 — Question-Driven Everyday Automation**.
|
|
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
|
|
7
7
|
reliability, 8.7.0 runtime-state hygiene, 8.8.0 Brain Core extraction
|
|
8
8
|
readiness, 8.9.0 scoped Tool API hardening, 9.0.0 cleanup closure, 9.1.0
|
|
9
|
-
fail-closed review completion, 9.2.0 model-agnostic file generation,
|
|
10
|
-
|
|
9
|
+
fail-closed review completion, 9.2.0 model-agnostic file generation, 9.3.0
|
|
10
|
+
proactive Brain intelligence, and 9.4.0 question-driven everyday automation)
|
|
11
|
+
to a product ecosystem. The
|
|
11
12
|
immediate goal is small and practical: make it clear how
|
|
12
13
|
contributors can extend the Brain without weakening local-first trust,
|
|
13
14
|
workspace scoping, or release quality.
|
package/docs/DEVELOPMENT.md
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
# Lattice AI Development
|
|
2
2
|
|
|
3
|
-
Current release: **9.
|
|
3
|
+
Current release: **9.4.0 — Question-Driven Everyday Automation**.
|
|
4
4
|
|
|
5
5
|
This document is for contributors working on the local-first Digital Brain
|
|
6
6
|
codebase. Product positioning and quick start stay in `README.md`; release
|
|
7
|
-
history is intentionally limited to 8.0.0-9.
|
|
7
|
+
history is intentionally limited to 8.0.0-9.4.0 in `docs/CHANGELOG.md` and
|
|
8
8
|
`RELEASE.md`.
|
|
9
9
|
|
|
10
10
|
## Product Contract
|
|
@@ -153,10 +153,10 @@ For user-facing, API, runtime, release, or packaging changes, check:
|
|
|
153
153
|
Release/publish examples must use exact target-version filenames. Do not
|
|
154
154
|
document wildcard artifact upload commands.
|
|
155
155
|
|
|
156
|
-
For 9.
|
|
156
|
+
For 9.4.0 release work, exact artifacts are:
|
|
157
157
|
|
|
158
|
-
- `dist/ltcai-9.
|
|
159
|
-
- `dist/ltcai-9.
|
|
160
|
-
- `ltcai-9.
|
|
161
|
-
- `dist/ltcai-9.
|
|
162
|
-
- `src-tauri/target/release/bundle/dmg/Lattice AI_9.
|
|
158
|
+
- `dist/ltcai-9.4.0-py3-none-any.whl`
|
|
159
|
+
- `dist/ltcai-9.4.0.tar.gz`
|
|
160
|
+
- `ltcai-9.4.0.tgz`
|
|
161
|
+
- `dist/ltcai-9.4.0.vsix`
|
|
162
|
+
- `src-tauri/target/release/bundle/dmg/Lattice AI_9.4.0_aarch64.dmg`
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Legacy Compatibility Map
|
|
2
2
|
|
|
3
|
-
Current target: **9.
|
|
3
|
+
Current target: **9.4.0 — Question-Driven Everyday Automation**.
|
|
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`.
|
package/docs/ONBOARDING.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Lattice AI Onboarding
|
|
2
2
|
|
|
3
|
-
Current release: **9.
|
|
3
|
+
Current release: **9.4.0 — Question-Driven Everyday Automation**.
|
|
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
|
|
@@ -40,7 +40,7 @@ read the docs first.
|
|
|
40
40
|
|
|
41
41
|
## Release Gate
|
|
42
42
|
|
|
43
|
-
9.
|
|
43
|
+
9.4.0 treats onboarding as a release gate, not marketing copy. The current
|
|
44
44
|
machine-checkable product readiness report requires this five-minute contract,
|
|
45
45
|
the Brain Home surface, setup helpers, graph ingestion tests, and exact release
|
|
46
46
|
artifact documentation before the release can be called complete.
|
package/docs/OPERATIONS.md
CHANGED
package/docs/TRUST_MODEL.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Lattice AI Trust Model
|
|
2
2
|
|
|
3
|
-
Current release: **9.
|
|
3
|
+
Current release: **9.4.0 — Question-Driven Everyday Automation**.
|
|
4
4
|
|
|
5
5
|
Lattice AI is local-first, explicit about external communication, and honest
|
|
6
6
|
when a capability is unavailable.
|
package/docs/WHY_LATTICE.md
CHANGED
package/docs/kg-schema.md
CHANGED
package/docs/mcp-tools.md
CHANGED
|
@@ -21,7 +21,7 @@ from .contracts import multi_agent_contract
|
|
|
21
21
|
from ..utils import now_iso as _now
|
|
22
22
|
|
|
23
23
|
|
|
24
|
-
MULTI_AGENT_VERSION = "9.
|
|
24
|
+
MULTI_AGENT_VERSION = "9.4.0"
|
|
25
25
|
|
|
26
26
|
AGENT_ROLES = ("researcher", "planner", "executor", "reviewer", "release")
|
|
27
27
|
CORE_PIPELINE = ("planner", "executor", "reviewer")
|
package/latticeai/__init__.py
CHANGED
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
"""Question-driven everyday automation API router (v9.4.0).
|
|
2
|
+
|
|
3
|
+
Exposes :class:`~latticeai.services.automation_intelligence.AutomationIntelligenceService`:
|
|
4
|
+
recurring-question patterns with evidence, automation suggestions (from the
|
|
5
|
+
user's own questions and connected knowledge folders), one-click consent-first
|
|
6
|
+
install, and a combined overview for the automation surface.
|
|
7
|
+
|
|
8
|
+
Installs follow the same consent contract as the starter recipes: the
|
|
9
|
+
workflow is created as a disabled draft (unless the user explicitly asks to
|
|
10
|
+
enable), review-queue gated, local-only, and idempotent per suggestion.
|
|
11
|
+
"""
|
|
12
|
+
|
|
13
|
+
from __future__ import annotations
|
|
14
|
+
|
|
15
|
+
from typing import Any, Callable, Optional
|
|
16
|
+
|
|
17
|
+
from fastapi import APIRouter, HTTPException, Request
|
|
18
|
+
from pydantic import BaseModel
|
|
19
|
+
|
|
20
|
+
from latticeai.services.automation_intelligence import AutomationIntelligenceService
|
|
21
|
+
from latticeai.services.brain_automation import find_installed_recipe_workflow
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
class SuggestionInstallRequest(BaseModel):
|
|
25
|
+
suggestion_id: str
|
|
26
|
+
enabled: bool = False
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
def create_automation_intelligence_router(
|
|
30
|
+
*,
|
|
31
|
+
service: AutomationIntelligenceService,
|
|
32
|
+
store: Any,
|
|
33
|
+
require_user: Callable[[Request], str],
|
|
34
|
+
gate_read: Callable[[Request], Optional[str]],
|
|
35
|
+
gate_write: Callable[[Request], Optional[str]],
|
|
36
|
+
append_audit_event: Callable[..., None],
|
|
37
|
+
workspace_graph: Callable[[], Any],
|
|
38
|
+
) -> APIRouter:
|
|
39
|
+
from lattice_brain.workflow import legacy_steps_from_nodes, validate_definition
|
|
40
|
+
|
|
41
|
+
router = APIRouter()
|
|
42
|
+
|
|
43
|
+
@router.get("/api/automation/patterns")
|
|
44
|
+
async def automation_patterns(request: Request):
|
|
45
|
+
user = require_user(request)
|
|
46
|
+
scope = gate_read(request)
|
|
47
|
+
return service.question_patterns(user_email=user, workspace_id=scope)
|
|
48
|
+
|
|
49
|
+
@router.get("/api/automation/suggestions")
|
|
50
|
+
async def automation_suggestions(request: Request):
|
|
51
|
+
user = require_user(request)
|
|
52
|
+
scope = gate_read(request)
|
|
53
|
+
return service.suggestions(user_email=user, workspace_id=scope)
|
|
54
|
+
|
|
55
|
+
@router.get("/api/automation/overview")
|
|
56
|
+
async def automation_overview(request: Request):
|
|
57
|
+
user = require_user(request)
|
|
58
|
+
scope = gate_read(request)
|
|
59
|
+
return service.overview(user_email=user, workspace_id=scope)
|
|
60
|
+
|
|
61
|
+
@router.post("/api/automation/install")
|
|
62
|
+
async def automation_install(req: SuggestionInstallRequest, request: Request):
|
|
63
|
+
user = require_user(request)
|
|
64
|
+
scope = gate_write(request)
|
|
65
|
+
suggestion = service.find_suggestion(
|
|
66
|
+
req.suggestion_id, user_email=user, workspace_id=scope
|
|
67
|
+
)
|
|
68
|
+
if suggestion is None:
|
|
69
|
+
raise HTTPException(
|
|
70
|
+
status_code=404,
|
|
71
|
+
detail=f"Automation suggestion not found: {req.suggestion_id}",
|
|
72
|
+
)
|
|
73
|
+
definition = service.build_suggestion_workflow(suggestion, enabled=req.enabled)
|
|
74
|
+
|
|
75
|
+
# Idempotent per suggestion: reuse the workflow provenance match used
|
|
76
|
+
# for recipes, keyed on suggestion_id instead of recipe_id.
|
|
77
|
+
existing = None
|
|
78
|
+
for workflow in store.list_workflows(workspace_id=scope).get("workflows") or []:
|
|
79
|
+
metadata = (workflow or {}).get("metadata") or {}
|
|
80
|
+
if (
|
|
81
|
+
metadata.get("created_from") == "automation_suggestion"
|
|
82
|
+
and metadata.get("suggestion_id") == req.suggestion_id
|
|
83
|
+
):
|
|
84
|
+
existing = workflow
|
|
85
|
+
break
|
|
86
|
+
if existing is None and suggestion.get("recipe_id"):
|
|
87
|
+
existing = find_installed_recipe_workflow(
|
|
88
|
+
store.list_workflows(workspace_id=scope).get("workflows"),
|
|
89
|
+
suggestion["recipe_id"],
|
|
90
|
+
)
|
|
91
|
+
if existing is not None:
|
|
92
|
+
return {
|
|
93
|
+
"workflow": existing,
|
|
94
|
+
"suggestion": suggestion,
|
|
95
|
+
"enabled": bool((existing.get("metadata") or {}).get("automation_state") == "enabled"),
|
|
96
|
+
"already_installed": True,
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
errors = validate_definition({"name": definition["name"], "nodes": definition["nodes"]})
|
|
100
|
+
if errors:
|
|
101
|
+
raise HTTPException(status_code=400, detail={"validation_errors": errors})
|
|
102
|
+
workflow = store.create_workflow(
|
|
103
|
+
name=definition["name"],
|
|
104
|
+
steps=legacy_steps_from_nodes(definition["nodes"]),
|
|
105
|
+
nodes=definition["nodes"],
|
|
106
|
+
metadata=definition["metadata"],
|
|
107
|
+
user_email=user or None,
|
|
108
|
+
graph=workspace_graph(),
|
|
109
|
+
workspace_id=scope,
|
|
110
|
+
)
|
|
111
|
+
append_audit_event(
|
|
112
|
+
"automation_suggestion_installed",
|
|
113
|
+
user_email=user,
|
|
114
|
+
workflow_id=workflow.get("id"),
|
|
115
|
+
suggestion_id=req.suggestion_id,
|
|
116
|
+
suggestion_kind=suggestion.get("kind"),
|
|
117
|
+
enabled=bool(req.enabled),
|
|
118
|
+
)
|
|
119
|
+
return {
|
|
120
|
+
"workflow": workflow,
|
|
121
|
+
"suggestion": suggestion,
|
|
122
|
+
"enabled": bool(req.enabled),
|
|
123
|
+
"already_installed": False,
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
return router
|
|
127
|
+
|
|
128
|
+
|
|
129
|
+
__all__ = ["create_automation_intelligence_router"]
|
package/latticeai/app_factory.py
CHANGED
|
@@ -165,6 +165,7 @@ def _build(config: "Optional[Config]" = None) -> Dict[str, Any]:
|
|
|
165
165
|
from latticeai.api.hooks import create_hooks_router
|
|
166
166
|
from latticeai.core.product_hardening import build_product_hardening_status
|
|
167
167
|
from latticeai.api.agent_registry import create_agent_registry_router
|
|
168
|
+
from latticeai.api.automation_intelligence import create_automation_intelligence_router
|
|
168
169
|
from latticeai.api.brain_intelligence import create_brain_intelligence_router
|
|
169
170
|
from latticeai.api.memory import create_memory_router
|
|
170
171
|
from latticeai.api.browser import create_browser_router
|
|
@@ -385,6 +386,7 @@ def _build(config: "Optional[Config]" = None) -> Dict[str, Any]:
|
|
|
385
386
|
AGENT_REGISTRY = _persistence_runtime["AGENT_REGISTRY"]
|
|
386
387
|
MEMORY_SERVICE = _persistence_runtime["MEMORY_SERVICE"]
|
|
387
388
|
BRAIN_INTELLIGENCE = _persistence_runtime["BRAIN_INTELLIGENCE"]
|
|
389
|
+
AUTOMATION_INTELLIGENCE = _persistence_runtime["AUTOMATION_INTELLIGENCE"]
|
|
388
390
|
INGESTION_PIPELINE = _persistence_runtime["INGESTION_PIPELINE"]
|
|
389
391
|
DEVICE_IDENTITY = _persistence_runtime["DEVICE_IDENTITY"]
|
|
390
392
|
KG_PORTABILITY = _persistence_runtime["KG_PORTABILITY"]
|
|
@@ -1019,6 +1021,17 @@ def _build(config: "Optional[Config]" = None) -> Dict[str, Any]:
|
|
|
1019
1021
|
create_realtime_router=create_realtime_router,
|
|
1020
1022
|
realtime_bus=REALTIME_BUS,
|
|
1021
1023
|
)
|
|
1024
|
+
app.include_router(
|
|
1025
|
+
create_automation_intelligence_router(
|
|
1026
|
+
service=AUTOMATION_INTELLIGENCE,
|
|
1027
|
+
store=WORKSPACE_OS,
|
|
1028
|
+
require_user=require_user,
|
|
1029
|
+
gate_read=PLATFORM.gate_read,
|
|
1030
|
+
gate_write=PLATFORM.gate_write,
|
|
1031
|
+
append_audit_event=append_audit_event,
|
|
1032
|
+
workspace_graph=_workspace_graph,
|
|
1033
|
+
)
|
|
1034
|
+
)
|
|
1022
1035
|
|
|
1023
1036
|
|
|
1024
1037
|
# ── Health & Info ──────────────────────────────────────────────────────────────
|
|
@@ -49,7 +49,7 @@ __all__ = [
|
|
|
49
49
|
"remove_skill_directory",
|
|
50
50
|
]
|
|
51
51
|
|
|
52
|
-
WORKSPACE_OS_VERSION = "9.
|
|
52
|
+
WORKSPACE_OS_VERSION = "9.4.0"
|
|
53
53
|
|
|
54
54
|
# Workspace types separate single-user Personal workspaces from shared
|
|
55
55
|
# Organization workspaces. Both keep the same local-first JSON store; the type
|
|
@@ -36,6 +36,7 @@ def build_persistence_runtime(
|
|
|
36
36
|
from latticeai.core.plugins import PluginRegistry
|
|
37
37
|
from latticeai.core.realtime import RealtimeBus
|
|
38
38
|
from latticeai.core.workspace_os import WorkspaceOSStore
|
|
39
|
+
from latticeai.services.automation_intelligence import AutomationIntelligenceService
|
|
39
40
|
from latticeai.services.brain_intelligence import BrainIntelligenceService
|
|
40
41
|
from latticeai.services.memory_service import MemoryService
|
|
41
42
|
from latticeai.services.workspace_service import WorkspaceService
|
|
@@ -63,6 +64,12 @@ def build_persistence_runtime(
|
|
|
63
64
|
memory_service=memory_service,
|
|
64
65
|
enable_graph=enable_graph,
|
|
65
66
|
)
|
|
67
|
+
automation_intelligence = AutomationIntelligenceService(
|
|
68
|
+
conversation_store=conversations,
|
|
69
|
+
knowledge_graph=knowledge_graph,
|
|
70
|
+
store=workspace_os,
|
|
71
|
+
enable_graph=enable_graph,
|
|
72
|
+
)
|
|
66
73
|
ingestion_pipeline = IngestionPipeline(
|
|
67
74
|
knowledge_graph,
|
|
68
75
|
hooks=hooks_registry,
|
|
@@ -88,6 +95,7 @@ def build_persistence_runtime(
|
|
|
88
95
|
"AGENT_REGISTRY": agent_registry,
|
|
89
96
|
"MEMORY_SERVICE": memory_service,
|
|
90
97
|
"BRAIN_INTELLIGENCE": brain_intelligence,
|
|
98
|
+
"AUTOMATION_INTELLIGENCE": automation_intelligence,
|
|
91
99
|
"INGESTION_PIPELINE": ingestion_pipeline,
|
|
92
100
|
"DEVICE_IDENTITY": device_identity,
|
|
93
101
|
"KG_PORTABILITY": kg_portability,
|