@casys/mcp-sysml-toolkit 0.0.0-stage → 0.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/LICENSE +21 -0
- package/README.md +74 -2
- package/mcp-sysml-toolkit.mjs +58570 -0
- package/package.json +10 -4
- package/ui-dist/architecture-tree/index.html +541 -0
- package/ui-dist/impact-graph/index.html +541 -0
- package/ui-dist/sysml-verdict/index.html +541 -0
- package/ui-dist/z3-constraints/index.html +541 -0
|
@@ -0,0 +1,541 @@
|
|
|
1
|
+
<!doctype html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="utf-8" />
|
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
6
|
+
<title>SysML SysML verdict</title>
|
|
7
|
+
<style>
|
|
8
|
+
:root {
|
|
9
|
+
--bg: #ffffff;
|
|
10
|
+
--surface: #f8fafc;
|
|
11
|
+
--surface-2: #f1f5f9;
|
|
12
|
+
--border: #dbe3ea;
|
|
13
|
+
--grid: #e8eef3;
|
|
14
|
+
--text: #0f172a;
|
|
15
|
+
--muted: #64748b;
|
|
16
|
+
--accent: #0d7c8a;
|
|
17
|
+
--accent-soft: rgba(13, 124, 138, 0.12);
|
|
18
|
+
--ok: #059669;
|
|
19
|
+
--ok-bg: rgba(5, 150, 105, 0.13);
|
|
20
|
+
--fail: #dc2626;
|
|
21
|
+
--fail-bg: rgba(220, 38, 38, 0.13);
|
|
22
|
+
--warn: #d97706;
|
|
23
|
+
--warn-bg: rgba(217, 119, 6, 0.14);
|
|
24
|
+
--info: #2563eb;
|
|
25
|
+
--info-bg: rgba(37, 99, 235, 0.12);
|
|
26
|
+
--domain: #7c3aed;
|
|
27
|
+
--domain-bg: rgba(124, 58, 237, 0.12);
|
|
28
|
+
--block-bg: #ffffff;
|
|
29
|
+
--block-hdr: #eef6f7;
|
|
30
|
+
--block-border: #94b2bc;
|
|
31
|
+
--font-sans: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
|
|
32
|
+
--font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
:root[data-theme="dark"] {
|
|
36
|
+
--bg: #0f172a;
|
|
37
|
+
--surface: #172033;
|
|
38
|
+
--surface-2: #0b1220;
|
|
39
|
+
--border: #2a3950;
|
|
40
|
+
--grid: #1c2940;
|
|
41
|
+
--text: #f1f5f9;
|
|
42
|
+
--muted: #94a3b8;
|
|
43
|
+
--accent: #38bdf8;
|
|
44
|
+
--accent-soft: rgba(56, 189, 248, 0.16);
|
|
45
|
+
--ok: #34d399;
|
|
46
|
+
--ok-bg: rgba(52, 211, 153, 0.16);
|
|
47
|
+
--fail: #f87171;
|
|
48
|
+
--fail-bg: rgba(248, 113, 113, 0.17);
|
|
49
|
+
--warn: #fbbf24;
|
|
50
|
+
--warn-bg: rgba(251, 191, 36, 0.17);
|
|
51
|
+
--info: #60a5fa;
|
|
52
|
+
--info-bg: rgba(96, 165, 250, 0.16);
|
|
53
|
+
--domain: #c084fc;
|
|
54
|
+
--domain-bg: rgba(192, 132, 252, 0.16);
|
|
55
|
+
--block-bg: #141e30;
|
|
56
|
+
--block-hdr: #1a2d42;
|
|
57
|
+
--block-border: #3d5673;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
* {
|
|
61
|
+
box-sizing: border-box;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
html,
|
|
65
|
+
body {
|
|
66
|
+
margin: 0;
|
|
67
|
+
padding: 0;
|
|
68
|
+
background: var(--bg);
|
|
69
|
+
color: var(--text);
|
|
70
|
+
font-family: var(--font-sans);
|
|
71
|
+
font-size: 13px;
|
|
72
|
+
line-height: 1.4;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
.sysml-shell {
|
|
76
|
+
padding: 12px;
|
|
77
|
+
display: flex;
|
|
78
|
+
flex-direction: column;
|
|
79
|
+
gap: 10px;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
.sysml-header {
|
|
83
|
+
display: flex;
|
|
84
|
+
align-items: flex-start;
|
|
85
|
+
justify-content: space-between;
|
|
86
|
+
gap: 8px;
|
|
87
|
+
flex-wrap: wrap;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
.sysml-title {
|
|
91
|
+
font-weight: 650;
|
|
92
|
+
font-size: 14px;
|
|
93
|
+
margin: 0;
|
|
94
|
+
display: flex;
|
|
95
|
+
align-items: center;
|
|
96
|
+
gap: 6px;
|
|
97
|
+
flex-wrap: wrap;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
.sysml-sub {
|
|
101
|
+
font-size: 11px;
|
|
102
|
+
color: var(--muted);
|
|
103
|
+
font-family: var(--font-mono);
|
|
104
|
+
margin-top: 2px;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
.pills {
|
|
108
|
+
display: flex;
|
|
109
|
+
gap: 5px;
|
|
110
|
+
flex-wrap: wrap;
|
|
111
|
+
align-items: center;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
.pill {
|
|
115
|
+
display: inline-flex;
|
|
116
|
+
align-items: center;
|
|
117
|
+
gap: 4px;
|
|
118
|
+
padding: 2px 7px;
|
|
119
|
+
border-radius: 999px;
|
|
120
|
+
font-size: 11px;
|
|
121
|
+
font-weight: 600;
|
|
122
|
+
background: var(--accent-soft);
|
|
123
|
+
color: var(--accent);
|
|
124
|
+
white-space: nowrap;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
.pill--ok {
|
|
128
|
+
background: var(--ok-bg);
|
|
129
|
+
color: var(--ok);
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
.pill--fail {
|
|
133
|
+
background: var(--fail-bg);
|
|
134
|
+
color: var(--fail);
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
.pill--warn {
|
|
138
|
+
background: var(--warn-bg);
|
|
139
|
+
color: var(--warn);
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
.pill--info {
|
|
143
|
+
background: var(--info-bg);
|
|
144
|
+
color: var(--info);
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
.pill--domain {
|
|
148
|
+
background: var(--domain-bg);
|
|
149
|
+
color: var(--domain);
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
.pill--muted {
|
|
153
|
+
background: var(--surface-2);
|
|
154
|
+
color: var(--muted);
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
.pill--mono {
|
|
158
|
+
font-family: var(--font-mono);
|
|
159
|
+
font-weight: 500;
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
.kind-tag {
|
|
163
|
+
display: inline-flex;
|
|
164
|
+
align-items: center;
|
|
165
|
+
padding: 1px 5px;
|
|
166
|
+
border-radius: 4px;
|
|
167
|
+
font-size: 10px;
|
|
168
|
+
font-weight: 700;
|
|
169
|
+
letter-spacing: 0.03em;
|
|
170
|
+
font-family: var(--font-mono);
|
|
171
|
+
border: 1px solid var(--border);
|
|
172
|
+
background: var(--surface);
|
|
173
|
+
color: var(--muted);
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
.kind-tag--part {
|
|
177
|
+
border-color: var(--accent);
|
|
178
|
+
color: var(--accent);
|
|
179
|
+
background: var(--accent-soft);
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
.kind-tag--req {
|
|
183
|
+
border-color: var(--domain);
|
|
184
|
+
color: var(--domain);
|
|
185
|
+
background: var(--domain-bg);
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
.verdict-banner {
|
|
189
|
+
display: flex;
|
|
190
|
+
align-items: center;
|
|
191
|
+
justify-content: space-between;
|
|
192
|
+
gap: 10px;
|
|
193
|
+
flex-wrap: wrap;
|
|
194
|
+
padding: 10px 12px;
|
|
195
|
+
border-radius: 8px;
|
|
196
|
+
border: 1px solid var(--border);
|
|
197
|
+
background: var(--surface);
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
.verdict-banner--valid {
|
|
201
|
+
border-color: var(--ok);
|
|
202
|
+
background: var(--ok-bg);
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
.verdict-banner--invalid {
|
|
206
|
+
border-color: var(--fail);
|
|
207
|
+
background: var(--fail-bg);
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
.verdict-banner--unavailable {
|
|
211
|
+
border-color: var(--warn);
|
|
212
|
+
background: var(--warn-bg);
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
.verdict-status {
|
|
216
|
+
font-size: 15px;
|
|
217
|
+
font-weight: 750;
|
|
218
|
+
letter-spacing: 0.04em;
|
|
219
|
+
font-family: var(--font-mono);
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
.kpi-grid {
|
|
223
|
+
display: grid;
|
|
224
|
+
grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
|
|
225
|
+
gap: 8px;
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
.kpi-card {
|
|
229
|
+
background: var(--surface);
|
|
230
|
+
border: 1px solid var(--border);
|
|
231
|
+
border-radius: 8px;
|
|
232
|
+
padding: 8px 10px;
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
.kpi-label {
|
|
236
|
+
font-size: 11px;
|
|
237
|
+
color: var(--muted);
|
|
238
|
+
margin-bottom: 2px;
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
.kpi-val {
|
|
242
|
+
font-size: 18px;
|
|
243
|
+
font-weight: 700;
|
|
244
|
+
font-family: var(--font-mono);
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
.kpi-val--ok {
|
|
248
|
+
color: var(--ok);
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
.kpi-val--fail {
|
|
252
|
+
color: var(--fail);
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
.kpi-val--warn {
|
|
256
|
+
color: var(--warn);
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
.bar-track {
|
|
260
|
+
height: 8px;
|
|
261
|
+
border-radius: 999px;
|
|
262
|
+
background: var(--surface-2);
|
|
263
|
+
overflow: hidden;
|
|
264
|
+
display: flex;
|
|
265
|
+
border: 1px solid var(--border);
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
.bar-seg--ok {
|
|
269
|
+
background: var(--ok);
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
.bar-seg--fail {
|
|
273
|
+
background: var(--fail);
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
.bar-seg--warn {
|
|
277
|
+
background: var(--warn);
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
.toolbar {
|
|
281
|
+
display: flex;
|
|
282
|
+
align-items: center;
|
|
283
|
+
justify-content: space-between;
|
|
284
|
+
gap: 8px;
|
|
285
|
+
flex-wrap: wrap;
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
.toolbar-group {
|
|
289
|
+
display: flex;
|
|
290
|
+
align-items: center;
|
|
291
|
+
gap: 5px;
|
|
292
|
+
flex-wrap: wrap;
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
.btn {
|
|
296
|
+
appearance: none;
|
|
297
|
+
background: var(--surface);
|
|
298
|
+
color: var(--text);
|
|
299
|
+
border: 1px solid var(--border);
|
|
300
|
+
border-radius: 6px;
|
|
301
|
+
padding: 4px 8px;
|
|
302
|
+
font-size: 11px;
|
|
303
|
+
font-weight: 600;
|
|
304
|
+
font-family: var(--font-sans);
|
|
305
|
+
cursor: pointer;
|
|
306
|
+
}
|
|
307
|
+
|
|
308
|
+
.btn:hover {
|
|
309
|
+
border-color: var(--accent);
|
|
310
|
+
color: var(--accent);
|
|
311
|
+
}
|
|
312
|
+
|
|
313
|
+
.btn--active {
|
|
314
|
+
background: var(--accent-soft);
|
|
315
|
+
border-color: var(--accent);
|
|
316
|
+
color: var(--accent);
|
|
317
|
+
}
|
|
318
|
+
|
|
319
|
+
.search-input {
|
|
320
|
+
background: var(--surface);
|
|
321
|
+
color: var(--text);
|
|
322
|
+
border: 1px solid var(--border);
|
|
323
|
+
border-radius: 6px;
|
|
324
|
+
padding: 4px 8px;
|
|
325
|
+
font-size: 12px;
|
|
326
|
+
min-width: 150px;
|
|
327
|
+
outline: none;
|
|
328
|
+
}
|
|
329
|
+
|
|
330
|
+
.search-input:focus {
|
|
331
|
+
border-color: var(--accent);
|
|
332
|
+
}
|
|
333
|
+
|
|
334
|
+
.diagram-wrap {
|
|
335
|
+
background-color: var(--surface);
|
|
336
|
+
background-image:
|
|
337
|
+
linear-gradient(var(--grid) 1px, transparent 1px),
|
|
338
|
+
linear-gradient(90deg, var(--grid) 1px, transparent 1px);
|
|
339
|
+
background-size: 20px 20px;
|
|
340
|
+
border: 1px solid var(--border);
|
|
341
|
+
border-radius: 8px;
|
|
342
|
+
overflow: auto;
|
|
343
|
+
padding: 8px;
|
|
344
|
+
}
|
|
345
|
+
|
|
346
|
+
svg.sysml-svg {
|
|
347
|
+
display: block;
|
|
348
|
+
max-width: none;
|
|
349
|
+
}
|
|
350
|
+
|
|
351
|
+
.detail-card {
|
|
352
|
+
background: var(--surface);
|
|
353
|
+
border: 1px solid var(--border);
|
|
354
|
+
border-radius: 8px;
|
|
355
|
+
padding: 10px 12px;
|
|
356
|
+
display: flex;
|
|
357
|
+
flex-direction: column;
|
|
358
|
+
gap: 8px;
|
|
359
|
+
}
|
|
360
|
+
|
|
361
|
+
.detail-title {
|
|
362
|
+
font-weight: 650;
|
|
363
|
+
font-size: 13px;
|
|
364
|
+
display: flex;
|
|
365
|
+
align-items: center;
|
|
366
|
+
justify-content: space-between;
|
|
367
|
+
gap: 8px;
|
|
368
|
+
flex-wrap: wrap;
|
|
369
|
+
}
|
|
370
|
+
|
|
371
|
+
.detail-grid {
|
|
372
|
+
display: grid;
|
|
373
|
+
grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
|
|
374
|
+
gap: 6px;
|
|
375
|
+
}
|
|
376
|
+
|
|
377
|
+
.kv {
|
|
378
|
+
background: var(--surface-2);
|
|
379
|
+
border: 1px solid var(--border);
|
|
380
|
+
border-radius: 6px;
|
|
381
|
+
padding: 5px 7px;
|
|
382
|
+
display: flex;
|
|
383
|
+
flex-direction: column;
|
|
384
|
+
gap: 2px;
|
|
385
|
+
}
|
|
386
|
+
|
|
387
|
+
.kv-k {
|
|
388
|
+
font-size: 10px;
|
|
389
|
+
color: var(--muted);
|
|
390
|
+
font-family: var(--font-mono);
|
|
391
|
+
}
|
|
392
|
+
|
|
393
|
+
.kv-v {
|
|
394
|
+
font-size: 12px;
|
|
395
|
+
font-weight: 650;
|
|
396
|
+
font-family: var(--font-mono);
|
|
397
|
+
}
|
|
398
|
+
|
|
399
|
+
.table-wrap {
|
|
400
|
+
overflow-x: auto;
|
|
401
|
+
border: 1px solid var(--border);
|
|
402
|
+
border-radius: 8px;
|
|
403
|
+
background: var(--bg);
|
|
404
|
+
}
|
|
405
|
+
|
|
406
|
+
table.sysml-table {
|
|
407
|
+
width: 100%;
|
|
408
|
+
border-collapse: collapse;
|
|
409
|
+
font-size: 12px;
|
|
410
|
+
}
|
|
411
|
+
|
|
412
|
+
table.sysml-table th,
|
|
413
|
+
table.sysml-table td {
|
|
414
|
+
padding: 6px 8px;
|
|
415
|
+
border-bottom: 1px solid var(--border);
|
|
416
|
+
text-align: left;
|
|
417
|
+
vertical-align: middle;
|
|
418
|
+
}
|
|
419
|
+
|
|
420
|
+
table.sysml-table th {
|
|
421
|
+
background: var(--surface);
|
|
422
|
+
color: var(--muted);
|
|
423
|
+
font-weight: 600;
|
|
424
|
+
font-size: 11px;
|
|
425
|
+
white-space: nowrap;
|
|
426
|
+
}
|
|
427
|
+
|
|
428
|
+
table.sysml-table tbody tr {
|
|
429
|
+
cursor: pointer;
|
|
430
|
+
}
|
|
431
|
+
|
|
432
|
+
table.sysml-table tbody tr:hover td {
|
|
433
|
+
background: var(--surface);
|
|
434
|
+
}
|
|
435
|
+
|
|
436
|
+
table.sysml-table tbody tr.is-selected td {
|
|
437
|
+
background: var(--accent-soft);
|
|
438
|
+
}
|
|
439
|
+
|
|
440
|
+
table.sysml-table tbody tr.is-violated td:first-child {
|
|
441
|
+
box-shadow: inset 3px 0 0 var(--fail);
|
|
442
|
+
}
|
|
443
|
+
|
|
444
|
+
.mono {
|
|
445
|
+
font-family: var(--font-mono);
|
|
446
|
+
}
|
|
447
|
+
|
|
448
|
+
.expr-code {
|
|
449
|
+
font-family: var(--font-mono);
|
|
450
|
+
font-size: 11px;
|
|
451
|
+
background: var(--surface-2);
|
|
452
|
+
padding: 2px 5px;
|
|
453
|
+
border-radius: 4px;
|
|
454
|
+
word-break: break-word;
|
|
455
|
+
}
|
|
456
|
+
|
|
457
|
+
.diag-list {
|
|
458
|
+
display: flex;
|
|
459
|
+
flex-direction: column;
|
|
460
|
+
gap: 5px;
|
|
461
|
+
}
|
|
462
|
+
|
|
463
|
+
.diag-item {
|
|
464
|
+
font-family: var(--font-mono);
|
|
465
|
+
font-size: 11px;
|
|
466
|
+
padding: 6px 8px;
|
|
467
|
+
border-radius: 6px;
|
|
468
|
+
border: 1px solid var(--border);
|
|
469
|
+
background: var(--surface);
|
|
470
|
+
}
|
|
471
|
+
|
|
472
|
+
.diag-item--error {
|
|
473
|
+
border-color: var(--fail);
|
|
474
|
+
background: var(--fail-bg);
|
|
475
|
+
color: var(--fail);
|
|
476
|
+
}
|
|
477
|
+
|
|
478
|
+
.diag-item--warning {
|
|
479
|
+
border-color: var(--warn);
|
|
480
|
+
background: var(--warn-bg);
|
|
481
|
+
color: var(--warn);
|
|
482
|
+
}
|
|
483
|
+
|
|
484
|
+
.chip-row {
|
|
485
|
+
display: flex;
|
|
486
|
+
flex-wrap: wrap;
|
|
487
|
+
gap: 5px;
|
|
488
|
+
}
|
|
489
|
+
|
|
490
|
+
.attr-chip {
|
|
491
|
+
appearance: none;
|
|
492
|
+
border: 1px solid var(--border);
|
|
493
|
+
background: var(--surface);
|
|
494
|
+
color: var(--text);
|
|
495
|
+
border-radius: 6px;
|
|
496
|
+
padding: 3px 7px;
|
|
497
|
+
font-size: 11px;
|
|
498
|
+
font-family: var(--font-mono);
|
|
499
|
+
cursor: pointer;
|
|
500
|
+
}
|
|
501
|
+
|
|
502
|
+
.attr-chip:hover {
|
|
503
|
+
border-color: var(--accent);
|
|
504
|
+
}
|
|
505
|
+
|
|
506
|
+
.attr-chip--active {
|
|
507
|
+
background: var(--warn-bg);
|
|
508
|
+
border-color: var(--warn);
|
|
509
|
+
color: var(--warn);
|
|
510
|
+
font-weight: 650;
|
|
511
|
+
}
|
|
512
|
+
|
|
513
|
+
.notice {
|
|
514
|
+
padding: 12px;
|
|
515
|
+
border-radius: 8px;
|
|
516
|
+
background: var(--surface);
|
|
517
|
+
border: 1px solid var(--border);
|
|
518
|
+
color: var(--muted);
|
|
519
|
+
font-size: 12px;
|
|
520
|
+
}
|
|
521
|
+
|
|
522
|
+
.footer-meta {
|
|
523
|
+
font-size: 10px;
|
|
524
|
+
color: var(--muted);
|
|
525
|
+
font-family: var(--font-mono);
|
|
526
|
+
display: flex;
|
|
527
|
+
justify-content: space-between;
|
|
528
|
+
flex-wrap: wrap;
|
|
529
|
+
gap: 6px;
|
|
530
|
+
}
|
|
531
|
+
|
|
532
|
+
</style>
|
|
533
|
+
</head>
|
|
534
|
+
<body>
|
|
535
|
+
<div id="root" aria-busy="true"></div>
|
|
536
|
+
<script type="module">
|
|
537
|
+
function c(i){return i!==null&&typeof i=="object"&&!Array.isArray(i)}function x(){return{packages:[],parts:[],compositionLinks:[],requirements:[],constraints:[],attributes:[],elementCount:0}}function E(){return{mode:"baseline-graph",changedAttributes:[],impactedAttributes:[],impactedConstraints:[],impactedParts:[],downstreamDomains:[],paths:[],edges:[]}}function D(i){if(i.kind==="sysml-verification"&&c(i.architecture)&&Array.isArray(i.verdicts))return i;if(i.kind==="sysml-params"&&c(i.architecture)){let e=i;return{kind:"sysml-verification",modelName:e.modelName,status:e.status,provenance:e.provenance,engine:e.engine,solverUsed:"none",z3Available:!1,stdlibLoaded:!1,sourceSha256:e.sourceSha256,snapshotSha256:e.snapshotSha256,durationMs:e.durationMs,diagnostics:e.diagnostics??[],counts:{total:0,satisfied:0,violated:0,undecided:0,error:0},verdicts:[],architecture:e.architecture??x(),impact:E()}}if(i.kind==="sysml-eval"&&c(i.architecture)){let e=i;return{kind:"sysml-verification",modelName:e.modelName,status:e.status,provenance:e.provenance,engine:e.engine,solverUsed:"none",z3Available:!1,stdlibLoaded:!1,sourceSha256:e.sourceSha256,snapshotSha256:e.snapshotSha256,durationMs:e.durationMs,diagnostics:e.diagnostics??[],counts:{total:0,satisfied:0,violated:0,undecided:0,error:0},verdicts:[],architecture:e.architecture??x(),impact:E(),evaluatedFeatures:e.features}}return null}function I(i){if(!c(i)||i.isError===!0)return null;let e=[];if(c(i.structuredContent)&&(e.push(i.structuredContent),c(i.structuredContent.value)&&e.push(i.structuredContent.value)),e.push(i),Array.isArray(i.content)){for(let l of i.content)if(c(l)&&l.type==="text"&&typeof l.text=="string")try{let r=JSON.parse(l.text);c(r)&&(e.push(r),c(r.value)&&e.push(r.value))}catch{}}for(let l of e){if(!c(l))continue;let r=D(l);if(r)return r}return null}function t(i,e,l){let r=document.createElement(i);return e&&(r.className=e),l!==void 0&&(r.textContent=l),r}function A(i,e=10){return i?i.slice(0,e):"\u2014"}function T(i,e,l){let r=document.getElementById("root");if(!r)return;let b=null,$=1,f={theme:globalThis.matchMedia?.("(prefers-color-scheme: dark)").matches?"dark":"light",width:globalThis.innerWidth||540,emitComposeEvent(u,n){globalThis.parent?.postMessage({jsonrpc:"2.0",id:`sysml-ev-${$++}`,method:"ui/compose/event",params:{event:u,data:n}},"*")}};function h(u){f.theme=u,document.documentElement.dataset.theme=u}function v(){let u=Math.ceil(r.scrollHeight||document.body.scrollHeight||220);globalThis.parent?.postMessage({jsonrpc:"2.0",method:"ui/notifications/size-changed",params:{height:Math.max(120,u)}},"*")}function y(){if(!b){let u=t("div","sysml-shell");u.append(t("div","notice",`Waiting for SysML v2 verification data (${i})\u2026`)),r.replaceChildren(u),r.setAttribute("aria-busy","false"),v();return}e(r,b,f),r.setAttribute("aria-busy","false"),requestAnimationFrame(v)}h(f.theme),y(),typeof ResizeObserver<"u"&&new ResizeObserver(()=>v()).observe(r),globalThis.addEventListener("message",u=>{let n=u.data;if(!(!c(n)||n.jsonrpc!=="2.0")){if(n.id==="sysml-init"&&c(n.result)){let p=c(n.result.hostContext)?n.result.hostContext:void 0;(p?.theme==="dark"||p?.theme==="light")&&h(p.theme),c(p?.containerDimensions)&&typeof p.containerDimensions.width=="number"&&(f.width=p.containerDimensions.width),globalThis.parent?.postMessage({jsonrpc:"2.0",method:"ui/notifications/initialized",params:{}},"*");return}if(n.method==="ui/notifications/host-context-changed"&&c(n.params)){(n.params.theme==="dark"||n.params.theme==="light")&&h(n.params.theme),c(n.params.containerDimensions)&&typeof n.params.containerDimensions.width=="number"&&(f.width=n.params.containerDimensions.width),y();return}if(n.method==="ui/compose/event"&&c(n.params)){let p=typeof n.params.action=="string"?n.params.action:typeof n.params.event=="string"?n.params.event:"",g=c(n.params.data)?n.params.data:{};p&&l&&l(p,g,y);return}if(n.method==="ui/notifications/tool-result"){let p=I(n.params);if(p)b=p,y();else if(c(n.params)&&n.params.isError===!0){let g=t("div","sysml-shell");g.append(t("div","notice","SysML v2 engine returned an error.")),r.replaceChildren(g),v()}}}}),globalThis.parent?.postMessage({jsonrpc:"2.0",id:"sysml-init",method:"ui/initialize",params:{protocolVersion:"2026-01-26",appInfo:{name:`mcp-sysml-toolkit/${i}`,version:"0.1.0"},appCapabilities:{}}},"*")}function M(i){return i.status==="unavailable"?{label:"UNAVAILABLE",cls:"pill pill--warn"}:i.solverUsed==="z3"&&i.provenance==="verified-solver"?{label:"Z3 SMT SOLVER",cls:"pill pill--ok"}:i.solverUsed==="ranges"?{label:"INTERVAL RANGES",cls:"pill pill--info"}:{label:"ANALYSIS ONLY",cls:"pill pill--muted"}}function V(i,e,l){let r=t("div","sysml-shell"),b=t("div","sysml-header"),$=t("div"),f=t("h3","sysml-title");f.append(t("span","kind-tag kind-tag--part","SYSML v2"),document.createTextNode(e.modelName)),$.append(f,t("div","sysml-sub",`${e.cliVersion??e.engine} \xB7 sha256:${A(e.sourceSha256,12)} \xB7 ${e.durationMs} ms`));let h=t("div","pills"),v=M(e);h.append(t("span",v.cls,v.label),t("span","pill pill--mono",e.provenance)),e.stdlibLoaded&&h.append(t("span","pill pill--muted","OMG stdlib")),b.append($,h),r.append(b);let y=e.status==="valid"&&e.counts.violated===0?"verdict-banner verdict-banner--valid":e.status==="unavailable"?"verdict-banner verdict-banner--unavailable":"verdict-banner verdict-banner--invalid",u=t("div",y),n=t("div"),p=e.status==="valid"?e.counts.violated>0?"VALID SYNTAX \xB7 CONSTRAINTS VIOLATED":e.counts.undecided>0?"VALID SYNTAX \xB7 UNDECIDED CONSTRAINTS":"VALID \xB7 ALL VERIFIED":e.status.toUpperCase();n.append(t("div","verdict-status",p),t("div","sysml-sub",`compile=${e.status} \xB7 solver=${e.solverUsed} \xB7 z3=${e.z3Available?"ready":"absent"}`));let g=t("div","pills");g.append(t("span","pill pill--mono",`src ${A(e.sourceSha256,8)}`),t("span","pill pill--mono",`snap ${A(e.snapshotSha256,8)}`)),u.append(n,g),r.append(u);let w=e.architecture.parts.filter(s=>s.kind==="PartDefinition").length,C=e.architecture.parts.filter(s=>s.kind==="PartUsage").length,N=t("div","kpi-grid"),S=(s,d,a)=>{let o=t("div","kpi-card");return o.append(t("div","kpi-label",s),t("div",a?`kpi-val kpi-val--${a}`:"kpi-val",d)),o};if(N.append(S("Satisfied",String(e.counts.satisfied),e.counts.satisfied>0?"ok":void 0),S("Violated",String(e.counts.violated),e.counts.violated>0?"fail":void 0),S("Undecided",String(e.counts.undecided+e.counts.error),e.counts.undecided+e.counts.error>0?"warn":void 0),S("Parts",C>0?`${w} def \xB7 ${C} use`:String(w)),S("Attributes",String(e.architecture.attributes.length)),S("Constraints",String(e.counts.total||e.architecture.constraints.length))),r.append(N),e.counts.total>0){let s=t("div","bar-track"),d=e.counts.satisfied/e.counts.total*100,a=e.counts.violated/e.counts.total*100,o=(e.counts.undecided+e.counts.error)/e.counts.total*100;if(d>0){let m=t("div","bar-seg--ok");m.style.width=`${d}%`,s.append(m)}if(a>0){let m=t("div","bar-seg--fail");m.style.width=`${a}%`,s.append(m)}if(o>0){let m=t("div","bar-seg--warn");m.style.width=`${o}%`,s.append(m)}r.append(s)}let k=e.verdicts.filter(s=>s.status==="violated"||s.status==="error");if(k.length>0){let s=t("div","detail-card");s.append(t("div","detail-title",`Violated constraints (${k.length})`));let d=t("div","diag-list");for(let a of k){let o=t("div","diag-item diag-item--error");o.style.cursor="pointer",o.textContent=`${a.ownerPart}::${a.name} \u2014 ${a.expression??a.detail} (${a.detail})`,o.addEventListener("click",()=>{l.emitComposeEvent("requirement.selected",{requirementName:a.name,qualifiedName:a.qualifiedName,ownerPart:a.ownerPart,status:a.status,kind:a.kind})}),d.append(o)}s.append(d),r.append(s)}if(e.impact.changedAttributes.length>0){let s=t("div","detail-card"),d=t("div","detail-title");d.append(t("span",void 0,"Revision Diff & Change Impact"),t("span","pill pill--warn",`${e.impact.changedAttributes.length} changed \xB7 ${e.impact.impactedConstraints.length} constraints impacted`)),s.append(d);let a=t("div","chip-row");for(let o of e.impact.changedAttributes){let m=o.delta!==void 0?` (${o.delta>=0?"+":""}${o.delta}${o.unit?` ${o.unit}`:""})`:"";a.append(t("span","pill pill--warn pill--mono",`${o.ownerPart}.${o.name}${m}`))}s.append(a),r.append(s)}if(e.diagnostics.length>0){let s=t("div","diag-list");for(let d of e.diagnostics){let a=d.line!==void 0?`L${d.line}${d.column!==void 0?`:${d.column}`:""} `:"",o=d.severity==="error"?"diag-item diag-item--error":d.severity==="warning"?"diag-item diag-item--warning":"diag-item";s.append(t("div",o,`[${d.severity.toUpperCase()}] ${a}${d.message}`))}r.append(s)}let L=t("div","footer-meta");L.append(t("span",void 0,`source_sha256: ${e.sourceSha256}`),t("span",void 0,`elements: ${e.architecture.elementCount}`)),r.append(L),i.replaceChildren(r)}T("sysml-verdict",V);
|
|
538
|
+
|
|
539
|
+
</script>
|
|
540
|
+
</body>
|
|
541
|
+
</html>
|