@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 Z3 constraints</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 d(t){return t!==null&&typeof t=="object"&&!Array.isArray(t)}function j(){return{packages:[],parts:[],compositionLinks:[],requirements:[],constraints:[],attributes:[],elementCount:0}}function O(){return{mode:"baseline-graph",changedAttributes:[],impactedAttributes:[],impactedConstraints:[],impactedParts:[],downstreamDomains:[],paths:[],edges:[]}}function H(t){if(t.kind==="sysml-verification"&&d(t.architecture)&&Array.isArray(t.verdicts))return t;if(t.kind==="sysml-params"&&d(t.architecture)){let e=t;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??j(),impact:O()}}if(t.kind==="sysml-eval"&&d(t.architecture)){let e=t;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??j(),impact:O(),evaluatedFeatures:e.features}}return null}function G(t){if(!d(t)||t.isError===!0)return null;let e=[];if(d(t.structuredContent)&&(e.push(t.structuredContent),d(t.structuredContent.value)&&e.push(t.structuredContent.value)),e.push(t),Array.isArray(t.content)){for(let s of t.content)if(d(s)&&s.type==="text"&&typeof s.text=="string")try{let r=JSON.parse(s.text);d(r)&&(e.push(r),d(r.value)&&e.push(r.value))}catch{}}for(let s of e){if(!d(s))continue;let r=H(s);if(r)return r}return null}function i(t,e,s){let r=document.createElement(t);return e&&(r.className=e),s!==void 0&&(r.textContent=s),r}function U(t,e){if(t==null)return"\u2014";let s;return typeof t=="number"?s=Number.isInteger(t)?String(t):Number(t.toPrecision(6)).toString():s=String(t),e?`${s} [${e}]`:s}function V(t,e=10){return t?t.slice(0,e):"\u2014"}function W(t,e,s){let r=document.getElementById("root");if(!r)return;let c=null,q=1,h={theme:globalThis.matchMedia?.("(prefers-color-scheme: dark)").matches?"dark":"light",width:globalThis.innerWidth||540,emitComposeEvent(l,a){globalThis.parent?.postMessage({jsonrpc:"2.0",id:`sysml-ev-${q++}`,method:"ui/compose/event",params:{event:l,data:a}},"*")}};function k(l){h.theme=l,document.documentElement.dataset.theme=l}function b(){let l=Math.ceil(r.scrollHeight||document.body.scrollHeight||220);globalThis.parent?.postMessage({jsonrpc:"2.0",method:"ui/notifications/size-changed",params:{height:Math.max(120,l)}},"*")}function y(){if(!c){let l=i("div","sysml-shell");l.append(i("div","notice",`Waiting for SysML v2 verification data (${t})\u2026`)),r.replaceChildren(l),r.setAttribute("aria-busy","false"),b();return}e(r,c,h),r.setAttribute("aria-busy","false"),requestAnimationFrame(b)}k(h.theme),y(),typeof ResizeObserver<"u"&&new ResizeObserver(()=>b()).observe(r),globalThis.addEventListener("message",l=>{let a=l.data;if(!(!d(a)||a.jsonrpc!=="2.0")){if(a.id==="sysml-init"&&d(a.result)){let o=d(a.result.hostContext)?a.result.hostContext:void 0;(o?.theme==="dark"||o?.theme==="light")&&k(o.theme),d(o?.containerDimensions)&&typeof o.containerDimensions.width=="number"&&(h.width=o.containerDimensions.width),globalThis.parent?.postMessage({jsonrpc:"2.0",method:"ui/notifications/initialized",params:{}},"*");return}if(a.method==="ui/notifications/host-context-changed"&&d(a.params)){(a.params.theme==="dark"||a.params.theme==="light")&&k(a.params.theme),d(a.params.containerDimensions)&&typeof a.params.containerDimensions.width=="number"&&(h.width=a.params.containerDimensions.width),y();return}if(a.method==="ui/compose/event"&&d(a.params)){let o=typeof a.params.action=="string"?a.params.action:typeof a.params.event=="string"?a.params.event:"",w=d(a.params.data)?a.params.data:{};o&&s&&s(o,w,y);return}if(a.method==="ui/notifications/tool-result"){let o=G(a.params);if(o)c=o,y();else if(d(a.params)&&a.params.isError===!0){let w=i("div","sysml-shell");w.append(i("div","notice","SysML v2 engine returned an error.")),r.replaceChildren(w),b()}}}}),globalThis.parent?.postMessage({jsonrpc:"2.0",id:"sysml-init",method:"ui/initialize",params:{protocolVersion:"2026-01-26",appInfo:{name:`mcp-sysml-toolkit/${t}`,version:"0.1.0"},appCapabilities:{}}},"*")}var N="all",f=null,P="",g=null;function F(t){return t==="satisfied"?"pill pill--ok pill--mono":t==="violated"||t==="error"?"pill pill--fail pill--mono":"pill pill--warn pill--mono"}function J(t){return t==="requirement"?"REQ":t==="invariant"?"INV":"CSTR"}function C(t,e,s){let r=i("div","sysml-shell"),c=e.verdicts.length>0?[...e.verdicts]:e.architecture.constraints.map(n=>({id:n.id,name:n.name,qualifiedName:n.qualifiedName,ownerPart:n.ownerPart,ownerQualifiedName:n.ownerQualifiedName,kind:n.kind,status:"undecided",detail:"not verified",expression:n.expression,referencedAttributes:n.referencedAttributes})),q=i("div","sysml-header"),h=i("div"),k=i("h3","sysml-title");k.append(i("span","kind-tag kind-tag--req","Z3"),document.createTextNode(`${e.modelName} \u2014 Constraints & Requirements`)),h.append(k,i("div","sysml-sub",`solver: ${e.solverUsed} \xB7 ${e.provenance} \xB7 sha256:${V(e.sourceSha256,8)}`));let b=i("div","pills");b.append(i("span","pill pill--ok",`${e.counts.satisfied} SATISFIED`),i("span",e.counts.violated>0?"pill pill--fail":"pill pill--muted",`${e.counts.violated} VIOLATED`),i("span",e.counts.undecided>0?"pill pill--warn":"pill pill--muted",`${e.counts.undecided} UNDECIDED`)),q.append(h,b),r.append(q);let y=i("div","toolbar"),l=i("div","toolbar-group"),a=[{id:"all",label:`All (${c.length})`},{id:"satisfied",label:`Satisfied (${e.counts.satisfied})`},{id:"violated",label:`Violated (${e.counts.violated})`},{id:"undecided",label:`Undecided (${e.counts.undecided+e.counts.error})`}];for(let n of a){let p=i("button",N===n.id?"btn btn--active":"btn",n.label);p.type="button",p.addEventListener("click",()=>{N=n.id,C(t,e,s)}),l.append(p)}if(f){let n=i("button","btn btn--active",`Part: ${f} \xD7`);n.type="button",n.addEventListener("click",()=>{f=null,C(t,e,s)}),l.append(n)}let o=document.createElement("input");o.type="search",o.className="search-input",o.placeholder="Search constraint, part, expr\u2026",o.value=P,o.addEventListener("input",()=>{P=o.value,C(t,e,s)}),y.append(l,o),r.append(y);let w=P.trim().toLowerCase(),L=c.filter(n=>!(N==="satisfied"&&n.status!=="satisfied"||N==="violated"&&n.status!=="violated"&&n.status!=="error"||N==="undecided"&&n.status!=="undecided"||f&&n.ownerPart.toLowerCase()!==f.toLowerCase()||w&&!`${n.name} ${n.ownerPart} ${n.expression??""} ${n.detail}`.toLowerCase().includes(w)));if(L.length===0){r.append(i("div","notice","No constraints or requirements match the current filter.")),t.replaceChildren(r);return}let M=i("div","table-wrap"),E=i("table","sysml-table"),D=i("thead"),T=i("tr");for(let n of["Status","Constraint / Req","Part Owner","Expression","Solver Detail"])T.append(i("th",void 0,n));D.append(T),E.append(D);let I=i("tbody");for(let n of L){let p=g!==null&&(n.qualifiedName===g||n.name===g),S=i("tr",[p?"is-selected":"",n.status==="violated"||n.status==="error"?"is-violated":""].filter(Boolean).join(" ")),v=i("td");v.append(i("span",F(n.status),n.status.toUpperCase()));let x=i("td"),m=i("div","pills");m.append(i("span","kind-tag kind-tag--req",J(n.kind)),i("span","mono",n.name)),x.append(m);let $=i("td"),A=i("span","pill pill--muted pill--mono",n.ownerPart);A.title="Click to filter by part & emit part.selected",A.addEventListener("click",B=>{B.stopPropagation(),f=f===n.ownerPart?null:n.ownerPart,s.emitComposeEvent("part.selected",{partName:n.ownerPart,qualifiedName:n.ownerQualifiedName??n.ownerPart}),C(t,e,s)}),$.append(A);let z=i("td");z.append(i("code","expr-code",n.expression??"\u2014"));let Q=i("td","mono",n.detail);S.append(v,x,$,z,Q),S.addEventListener("click",()=>{g=n.qualifiedName,s.emitComposeEvent("requirement.selected",{requirementName:n.name,qualifiedName:n.qualifiedName,ownerPart:n.ownerPart,status:n.status,kind:n.kind,expression:n.expression}),C(t,e,s)}),I.append(S)}E.append(I),M.append(E),r.append(M);let u=g?c.find(n=>n.qualifiedName===g||n.name===g):void 0;if(u){let n=new Map(e.architecture.attributes.map(v=>[v.qualifiedName,v])),p=i("div","detail-card"),S=i("div","detail-title");if(S.append(i("span","mono",`${u.ownerPart}::${u.name}`),i("span",F(u.status),u.status.toUpperCase())),p.append(S),u.expression&&p.append(i("code","expr-code",u.expression)),u.referencedAttributes.length>0){let v=i("div","detail-grid");for(let x of u.referencedAttributes){let m=n.get(x),$=i("div","kv");$.append(i("span","kv-k",m?`${m.ownerPart}.${m.name}`:x),i("span","kv-v",m?U(m.value,m.unit):"referenced")),v.append($)}p.append(v)}r.append(p)}t.replaceChildren(r)}W("z3-constraints",C,(t,e,s)=>{if(t==="requirement.focus"){let r=[e.qualifiedName,e.requirementName,e.name,e.constraint].find(c=>typeof c=="string"&&c.trim().length>0);r&&(g=r,N="all",f=null,s())}else if(t==="part.focus"){let r=[e.partName,e.name,e.part].find(c=>typeof c=="string"&&c.trim().length>0);r&&(f=r,s())}});
|
|
538
|
+
|
|
539
|
+
</script>
|
|
540
|
+
</body>
|
|
541
|
+
</html>
|