ltcai 0.2.2 → 0.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 +24 -0
- package/docs/CHANGELOG.md +125 -0
- package/kg_schema.py +64 -15
- package/knowledge_graph.py +299 -2
- package/knowledge_graph_api.py +10 -2
- package/latticeai/api/security_dashboard.py +580 -0
- package/latticeai/core/__init__.py +1 -1
- package/latticeai/core/context_builder.py +191 -0
- package/latticeai/core/document_generator.py +103 -0
- package/latticeai/core/graph_curator.py +417 -0
- package/latticeai/core/model_compat.py +407 -0
- package/latticeai/core/model_resolution.py +227 -0
- package/llm_router.py +147 -0
- package/package.json +1 -1
- package/server.py +324 -22
- package/static/account.html +2 -2
- package/static/admin.html +75 -1
- package/static/chat.html +2 -2
- package/static/css/tokens.css +26 -0
- package/static/graph.html +2 -2
- package/static/lattice-reference.css +372 -414
- package/static/scripts/account.js +10 -2
- package/static/scripts/admin.js +296 -0
- package/static/scripts/chat.js +82 -9
- package/static/scripts/graph.js +6 -2
- package/static/sw.js +1 -1
package/static/admin.html
CHANGED
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
|
15
15
|
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap">
|
|
16
16
|
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@tabler/icons-webfont@latest/tabler-icons.min.css">
|
|
17
|
-
<link rel="stylesheet" href="/static/lattice-reference.css">
|
|
17
|
+
<link rel="stylesheet" href="/static/lattice-reference.css?v=0.3.3">
|
|
18
18
|
<script src="https://cdn.jsdelivr.net/npm/chart.js@4.4.0/dist/chart.umd.min.js"></script>
|
|
19
19
|
</head>
|
|
20
20
|
|
|
@@ -256,6 +256,80 @@
|
|
|
256
256
|
</section>
|
|
257
257
|
|
|
258
258
|
<section class="admin-view" id="admin-view-security" data-admin-view="security">
|
|
259
|
+
<!-- Security & Audit Command Center (피드백 #5) -->
|
|
260
|
+
<section class="panel" id="security-overview-panel">
|
|
261
|
+
<div class="panel-header">
|
|
262
|
+
<div>
|
|
263
|
+
<h3>AI 보안 감사 콘솔</h3>
|
|
264
|
+
<p>사용자별 위험/준수 채팅 및 파일, 민감정보 유형 분포, 원문 조회 현황을 한눈에 확인합니다.</p>
|
|
265
|
+
</div>
|
|
266
|
+
<div class="panel-tools">
|
|
267
|
+
<div class="export-control">
|
|
268
|
+
<button class="btn" id="security-cc-export-toggle" type="button">
|
|
269
|
+
<i class="ti ti-download"></i>
|
|
270
|
+
<span>보안 리포트 추출</span>
|
|
271
|
+
</button>
|
|
272
|
+
<div class="export-options" id="security-cc-export-options">
|
|
273
|
+
<button class="table-btn" type="button" data-cc-scope="overview" data-cc-format="json">Overview JSON</button>
|
|
274
|
+
<button class="table-btn" type="button" data-cc-scope="users" data-cc-format="csv">User Risk CSV</button>
|
|
275
|
+
<button class="table-btn" type="button" data-cc-scope="users" data-cc-format="xlsx">User Risk Excel</button>
|
|
276
|
+
<button class="table-btn" type="button" data-cc-scope="events" data-cc-format="csv">Events CSV</button>
|
|
277
|
+
<button class="table-btn" type="button" data-cc-scope="events" data-cc-format="json">Events JSON</button>
|
|
278
|
+
<button class="table-btn" type="button" data-cc-scope="overview" data-cc-format="pdf">Security PDF</button>
|
|
279
|
+
</div>
|
|
280
|
+
</div>
|
|
281
|
+
</div>
|
|
282
|
+
</div>
|
|
283
|
+
<div class="panel-body">
|
|
284
|
+
<div class="audit-grid" id="security-cc-cards"></div>
|
|
285
|
+
<div class="two-col" style="margin-top:18px">
|
|
286
|
+
<div class="subpanel">
|
|
287
|
+
<h4><i class="ti ti-users"></i> 사용자별 위험/준수 (채팅 + 파일)</h4>
|
|
288
|
+
<div class="table-wrap" id="security-cc-users">
|
|
289
|
+
<div class="preview" style="padding:14px">불러오는 중...</div>
|
|
290
|
+
</div>
|
|
291
|
+
<canvas id="security-cc-user-chart" height="180" style="margin-top:12px"></canvas>
|
|
292
|
+
</div>
|
|
293
|
+
<div class="subpanel">
|
|
294
|
+
<h4><i class="ti ti-chart-donut"></i> 민감정보 유형 분포</h4>
|
|
295
|
+
<canvas id="security-cc-field-chart" height="200"></canvas>
|
|
296
|
+
<div id="security-cc-field-legend" style="margin-top:10px;font-size:12px;color:var(--muted-text)"></div>
|
|
297
|
+
</div>
|
|
298
|
+
</div>
|
|
299
|
+
<div class="two-col" style="margin-top:18px">
|
|
300
|
+
<div class="subpanel">
|
|
301
|
+
<h4><i class="ti ti-message-2"></i> 민감 채팅 모니터</h4>
|
|
302
|
+
<div class="table-wrap" id="security-cc-chats">
|
|
303
|
+
<div class="preview" style="padding:14px">불러오는 중...</div>
|
|
304
|
+
</div>
|
|
305
|
+
</div>
|
|
306
|
+
<div class="subpanel">
|
|
307
|
+
<h4><i class="ti ti-file-shield"></i> 위험 파일 모니터</h4>
|
|
308
|
+
<div class="table-wrap" id="security-cc-files">
|
|
309
|
+
<div class="preview" style="padding:14px">불러오는 중...</div>
|
|
310
|
+
</div>
|
|
311
|
+
</div>
|
|
312
|
+
</div>
|
|
313
|
+
<div class="two-col" style="margin-top:18px">
|
|
314
|
+
<div class="subpanel">
|
|
315
|
+
<h4><i class="ti ti-timeline"></i> 감사 타임라인</h4>
|
|
316
|
+
<div class="table-wrap" id="security-cc-timeline">
|
|
317
|
+
<div class="preview" style="padding:14px">불러오는 중...</div>
|
|
318
|
+
</div>
|
|
319
|
+
</div>
|
|
320
|
+
<div class="subpanel">
|
|
321
|
+
<h4><i class="ti ti-code"></i> Raw Data Explorer</h4>
|
|
322
|
+
<div style="display:flex;gap:8px;margin-bottom:8px;flex-wrap:wrap">
|
|
323
|
+
<button class="table-btn" type="button" data-cc-raw="audit">감사 로그</button>
|
|
324
|
+
<button class="table-btn" type="button" data-cc-raw="history">대화 원문</button>
|
|
325
|
+
<button class="table-btn" type="button" data-cc-raw="files">파일 인덱스</button>
|
|
326
|
+
</div>
|
|
327
|
+
<pre id="security-cc-raw" style="max-height:280px;overflow:auto;background:rgba(0,0,0,.04);padding:12px;border-radius:8px;font-size:12px;white-space:pre-wrap;">선택한 scope의 raw JSON이 여기에 표시됩니다. (관리자 원문 조회는 별도로 감사로그에 기록됩니다.)</pre>
|
|
328
|
+
</div>
|
|
329
|
+
</div>
|
|
330
|
+
</div>
|
|
331
|
+
</section>
|
|
332
|
+
|
|
259
333
|
<section class="panel">
|
|
260
334
|
<div class="panel-header">
|
|
261
335
|
<div>
|
package/static/chat.html
CHANGED
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
<script src="https://cdn.jsdelivr.net/npm/marked/marked.min.js"></script>
|
|
24
24
|
|
|
25
25
|
<!-- ── Setup Wizard Styles ──────────────────────────────────────────── -->
|
|
26
|
-
<link rel="stylesheet" href="/static/lattice-reference.css">
|
|
26
|
+
<link rel="stylesheet" href="/static/lattice-reference.css?v=0.3.3">
|
|
27
27
|
</head>
|
|
28
28
|
|
|
29
29
|
<body class="lattice-ref-chat">
|
|
@@ -831,7 +831,7 @@
|
|
|
831
831
|
</div>
|
|
832
832
|
|
|
833
833
|
|
|
834
|
-
<script src="/static/scripts/chat.js"></script>
|
|
834
|
+
<script src="/static/scripts/chat.js?v=0.3.4"></script>
|
|
835
835
|
</body>
|
|
836
836
|
|
|
837
837
|
</html>
|
package/static/css/tokens.css
CHANGED
|
@@ -159,6 +159,32 @@
|
|
|
159
159
|
--radius-sm: var(--lt-radius-sm);
|
|
160
160
|
}
|
|
161
161
|
|
|
162
|
+
/* ── Global polish ─────────────────────────────────────────── */
|
|
163
|
+
::selection {
|
|
164
|
+
background: rgba(110, 74, 230, 0.18);
|
|
165
|
+
color: var(--lt-color-ink-900);
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
:focus-visible {
|
|
169
|
+
outline: 2px solid rgba(110, 74, 230, 0.40);
|
|
170
|
+
outline-offset: 2px;
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
::-webkit-scrollbar {
|
|
174
|
+
width: 6px;
|
|
175
|
+
height: 6px;
|
|
176
|
+
}
|
|
177
|
+
::-webkit-scrollbar-track {
|
|
178
|
+
background: transparent;
|
|
179
|
+
}
|
|
180
|
+
::-webkit-scrollbar-thumb {
|
|
181
|
+
background: rgba(110, 74, 230, 0.16);
|
|
182
|
+
border-radius: 99px;
|
|
183
|
+
}
|
|
184
|
+
::-webkit-scrollbar-thumb:hover {
|
|
185
|
+
background: rgba(110, 74, 230, 0.28);
|
|
186
|
+
}
|
|
187
|
+
|
|
162
188
|
/* ── Reduced motion (a11y) ─────────────────────────────────── */
|
|
163
189
|
@media (prefers-reduced-motion: reduce) {
|
|
164
190
|
:root {
|
package/static/graph.html
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
|
9
9
|
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap">
|
|
10
10
|
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@tabler/icons-webfont@latest/tabler-icons.min.css">
|
|
11
|
-
<link rel="stylesheet" href="/static/lattice-reference.css">
|
|
11
|
+
<link rel="stylesheet" href="/static/lattice-reference.css?v=0.3.3">
|
|
12
12
|
</head>
|
|
13
13
|
<body class="lattice-ref-graph">
|
|
14
14
|
<aside class="reference-rail graph-rail">
|
|
@@ -97,6 +97,6 @@
|
|
|
97
97
|
|
|
98
98
|
<div id="tooltip"></div>
|
|
99
99
|
|
|
100
|
-
<script src="/static/scripts/graph.js"></script>
|
|
100
|
+
<script src="/static/scripts/graph.js?v=0.3.3"></script>
|
|
101
101
|
</body>
|
|
102
102
|
</html>
|