ltcai 6.2.0 → 6.3.1
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 +29 -17
- package/docs/CHANGELOG.md +66 -0
- package/frontend/src/components/onboarding/AnalysisScreen.tsx +127 -0
- package/frontend/src/components/onboarding/DownloadConsentPanel.tsx +29 -0
- package/frontend/src/components/onboarding/InstallScreen.tsx +208 -0
- package/frontend/src/components/onboarding/LanguageChooser.tsx +23 -0
- package/frontend/src/components/onboarding/LoginScreen.tsx +131 -0
- package/frontend/src/components/onboarding/ProductFlowScreens.tsx +13 -688
- package/frontend/src/components/onboarding/RecommendationScreen.tsx +59 -0
- package/frontend/src/components/onboarding/recommendationModel.ts +132 -0
- package/frontend/src/features/admin/AdminConsole.tsx +1 -1
- package/frontend/src/features/brain/BrainCarePanel.tsx +254 -0
- package/frontend/src/features/brain/BrainComposer.tsx +66 -0
- package/frontend/src/features/brain/BrainConversation.tsx +131 -0
- package/frontend/src/features/brain/BrainGraphLayer.tsx +132 -0
- package/frontend/src/features/brain/BrainHome.tsx +28 -795
- package/frontend/src/features/brain/BrainMemoryLayer.tsx +38 -0
- package/frontend/src/features/brain/BrainOverviewPanel.tsx +74 -0
- package/frontend/src/features/brain/BrainRelationshipLayer.tsx +43 -0
- package/frontend/src/features/brain/DepthEmergence.tsx +53 -0
- package/frontend/src/features/brain/types.ts +6 -6
- package/frontend/src/features/review/ReviewCard.tsx +14 -10
- package/frontend/src/features/review/ReviewInbox.tsx +24 -9
- package/frontend/src/i18n.ts +208 -0
- package/frontend/src/pages/Brain.tsx +63 -5
- package/frontend/src/pages/Capture.tsx +139 -43
- package/frontend/src/pages/Library.tsx +72 -6
- package/lattice_brain/__init__.py +1 -1
- package/lattice_brain/runtime/multi_agent.py +1 -1
- package/latticeai/__init__.py +1 -1
- package/latticeai/app_factory.py +48 -106
- package/latticeai/core/marketplace.py +1 -1
- package/latticeai/core/workspace_os.py +1 -1
- package/latticeai/runtime/access_runtime.py +97 -0
- package/latticeai/runtime/chat_wiring.py +119 -0
- package/latticeai/runtime/model_wiring.py +40 -0
- package/latticeai/runtime/platform_runtime_wiring.py +2 -3
- package/latticeai/runtime/review_wiring.py +37 -0
- package/latticeai/runtime/tail_wiring.py +21 -0
- package/package.json +2 -2
- package/scripts/check_i18n_literals.mjs +52 -0
- 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 +5 -5
- package/static/app/assets/index-Div5vMlq.css +2 -0
- package/static/app/assets/{index-D91Rz5--.js → index-t1jx1BR9.js} +2 -2
- package/static/app/assets/index-t1jx1BR9.js.map +1 -0
- package/static/app/index.html +2 -2
- package/static/app/assets/index-B2-1Gm0q.css +0 -2
- package/static/app/assets/index-D91Rz5--.js.map +0 -1
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { Search } from "lucide-react";
|
|
3
|
+
import { t } from "@/i18n";
|
|
4
|
+
import { useAppStore } from "@/store/appStore";
|
|
5
|
+
import type { KnowledgeConcept, KnowledgeGraphModel } from "./types";
|
|
6
|
+
import { clamp, layerStyle, layoutGraphNodes, polarPoint } from "./graphLayout";
|
|
7
|
+
|
|
8
|
+
export function BrainKnowledgeLayer({ concepts, depth }: { concepts: KnowledgeConcept[]; depth: number }) {
|
|
9
|
+
const language = useAppStore((state) => state.language);
|
|
10
|
+
const visible = concepts.slice(0, depth >= 4 ? 10 : 7);
|
|
11
|
+
if (!visible.length) return <div className="concept-signal is-empty">{t(language, "brain.knowledge.empty")}</div>;
|
|
12
|
+
|
|
13
|
+
return (
|
|
14
|
+
<>
|
|
15
|
+
{visible.map((concept, index) => {
|
|
16
|
+
const point = polarPoint(index, visible.length, 24, 15, -70);
|
|
17
|
+
return (
|
|
18
|
+
<button
|
|
19
|
+
key={concept.id}
|
|
20
|
+
type="button"
|
|
21
|
+
className="concept-signal"
|
|
22
|
+
style={layerStyle({ "--x": `${point.x}%`, "--y": `${point.y}%`, "--delay": `${index * 45}ms` })}
|
|
23
|
+
title={concept.summary || concept.type}
|
|
24
|
+
>
|
|
25
|
+
<span>{concept.type}</span>
|
|
26
|
+
{concept.label}
|
|
27
|
+
</button>
|
|
28
|
+
);
|
|
29
|
+
})}
|
|
30
|
+
</>
|
|
31
|
+
);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export function BrainGraphLayer({
|
|
35
|
+
model,
|
|
36
|
+
search,
|
|
37
|
+
selectedId,
|
|
38
|
+
onSearch,
|
|
39
|
+
onSelect,
|
|
40
|
+
}: {
|
|
41
|
+
model: KnowledgeGraphModel;
|
|
42
|
+
search: string;
|
|
43
|
+
selectedId: string | null;
|
|
44
|
+
onSearch: (value: string) => void;
|
|
45
|
+
onSelect: (id: string | null) => void;
|
|
46
|
+
}) {
|
|
47
|
+
const language = useAppStore((state) => state.language);
|
|
48
|
+
const query = search.trim().toLowerCase();
|
|
49
|
+
const visibleNodes = React.useMemo(() => {
|
|
50
|
+
const filtered = model.nodes.filter((node) => {
|
|
51
|
+
if (!query) return true;
|
|
52
|
+
return `${node.label} ${node.type} ${node.summary}`.toLowerCase().includes(query);
|
|
53
|
+
});
|
|
54
|
+
return filtered.slice(0, 18);
|
|
55
|
+
}, [model.nodes, query]);
|
|
56
|
+
const layout = React.useMemo(() => layoutGraphNodes(visibleNodes, 38, 24), [visibleNodes]);
|
|
57
|
+
const positionById = React.useMemo(() => new Map(layout.map((item) => [item.node.id, item])), [layout]);
|
|
58
|
+
const visibleEdges = React.useMemo(
|
|
59
|
+
() => model.edges.filter((edge) => positionById.has(edge.source) && positionById.has(edge.target)).slice(0, 36),
|
|
60
|
+
[model.edges, positionById],
|
|
61
|
+
);
|
|
62
|
+
const selected = visibleNodes.find((node) => node.id === selectedId) || visibleNodes[0] || null;
|
|
63
|
+
|
|
64
|
+
return (
|
|
65
|
+
<section className="mind-core-graph" data-testid="emergent-knowledge-graph" aria-label={t(language, "brain.aria.graph")}>
|
|
66
|
+
<div className="brain-graph-head">
|
|
67
|
+
<div>
|
|
68
|
+
<span>{t(language, "brain.level")} 5</span>
|
|
69
|
+
<strong>{t(language, "brain.depth.5")}</strong>
|
|
70
|
+
</div>
|
|
71
|
+
<label className="brain-graph-search">
|
|
72
|
+
<Search className="h-3.5 w-3.5" />
|
|
73
|
+
<input
|
|
74
|
+
value={search}
|
|
75
|
+
onChange={(event) => onSearch(event.target.value)}
|
|
76
|
+
placeholder={t(language, "brain.graph.search")}
|
|
77
|
+
aria-label={t(language, "brain.graph.searchAria")}
|
|
78
|
+
/>
|
|
79
|
+
</label>
|
|
80
|
+
</div>
|
|
81
|
+
|
|
82
|
+
{visibleNodes.length ? (
|
|
83
|
+
<div className="brain-graph-canvas">
|
|
84
|
+
<svg className="brain-graph-edges" viewBox="0 0 100 100" aria-hidden>
|
|
85
|
+
{visibleEdges.map((edge, index) => {
|
|
86
|
+
const source = positionById.get(edge.source);
|
|
87
|
+
const target = positionById.get(edge.target);
|
|
88
|
+
if (!source || !target) return null;
|
|
89
|
+
return (
|
|
90
|
+
<line
|
|
91
|
+
key={`${edge.id}-${index}`}
|
|
92
|
+
x1={source.x}
|
|
93
|
+
y1={source.y}
|
|
94
|
+
x2={target.x}
|
|
95
|
+
y2={target.y}
|
|
96
|
+
style={{ "--weight": String(clamp(edge.weight, 0.4, 2.8)) } as React.CSSProperties}
|
|
97
|
+
/>
|
|
98
|
+
);
|
|
99
|
+
})}
|
|
100
|
+
</svg>
|
|
101
|
+
{layout.map(({ node, x, y }, index) => (
|
|
102
|
+
<button
|
|
103
|
+
key={node.id}
|
|
104
|
+
type="button"
|
|
105
|
+
className={`graph-node ${selected?.id === node.id ? "is-selected" : ""}`}
|
|
106
|
+
style={layerStyle({ "--x": `${x}%`, "--y": `${y}%`, "--delay": `${index * 35}ms` })}
|
|
107
|
+
onClick={() => onSelect(node.id)}
|
|
108
|
+
>
|
|
109
|
+
<span>{node.type}</span>
|
|
110
|
+
{node.label}
|
|
111
|
+
</button>
|
|
112
|
+
))}
|
|
113
|
+
</div>
|
|
114
|
+
) : (
|
|
115
|
+
<div className="brain-graph-empty">{t(language, "brain.graph.empty")}</div>
|
|
116
|
+
)}
|
|
117
|
+
|
|
118
|
+
<div className="brain-graph-focus">
|
|
119
|
+
{selected ? (
|
|
120
|
+
<>
|
|
121
|
+
<span>{selected.type}</span>
|
|
122
|
+
<strong>{selected.label}</strong>
|
|
123
|
+
<p>{selected.summary || t(language, "brain.graph.summaryFallback")}</p>
|
|
124
|
+
<p>{t(language, "brain.graph.focused")}</p>
|
|
125
|
+
</>
|
|
126
|
+
) : (
|
|
127
|
+
<p>{t(language, "brain.graph.emptyFocus")}</p>
|
|
128
|
+
)}
|
|
129
|
+
</div>
|
|
130
|
+
</section>
|
|
131
|
+
);
|
|
132
|
+
}
|