@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 Impact graph</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
|
+
var Z="http://www.w3.org/2000/svg";function f(a){return a!==null&&typeof a=="object"&&!Array.isArray(a)}function G(){return{packages:[],parts:[],compositionLinks:[],requirements:[],constraints:[],attributes:[],elementCount:0}}function F(){return{mode:"baseline-graph",changedAttributes:[],impactedAttributes:[],impactedConstraints:[],impactedParts:[],downstreamDomains:[],paths:[],edges:[]}}function R(a){if(a.kind==="sysml-verification"&&f(a.architecture)&&Array.isArray(a.verdicts))return a;if(a.kind==="sysml-params"&&f(a.architecture)){let n=a;return{kind:"sysml-verification",modelName:n.modelName,status:n.status,provenance:n.provenance,engine:n.engine,solverUsed:"none",z3Available:!1,stdlibLoaded:!1,sourceSha256:n.sourceSha256,snapshotSha256:n.snapshotSha256,durationMs:n.durationMs,diagnostics:n.diagnostics??[],counts:{total:0,satisfied:0,violated:0,undecided:0,error:0},verdicts:[],architecture:n.architecture??G(),impact:F()}}if(a.kind==="sysml-eval"&&f(a.architecture)){let n=a;return{kind:"sysml-verification",modelName:n.modelName,status:n.status,provenance:n.provenance,engine:n.engine,solverUsed:"none",z3Available:!1,stdlibLoaded:!1,sourceSha256:n.sourceSha256,snapshotSha256:n.snapshotSha256,durationMs:n.durationMs,diagnostics:n.diagnostics??[],counts:{total:0,satisfied:0,violated:0,undecided:0,error:0},verdicts:[],architecture:n.architecture??G(),impact:F(),evaluatedFeatures:n.features}}return null}function tt(a){if(!f(a)||a.isError===!0)return null;let n=[];if(f(a.structuredContent)&&(n.push(a.structuredContent),f(a.structuredContent.value)&&n.push(a.structuredContent.value)),n.push(a),Array.isArray(a.content)){for(let c of a.content)if(f(c)&&c.type==="text"&&typeof c.text=="string")try{let o=JSON.parse(c.text);f(o)&&(n.push(o),f(o.value)&&n.push(o.value))}catch{}}for(let c of n){if(!f(c))continue;let o=R(c);if(o)return o}return null}function s(a,n,c){let o=document.createElement(a);return n&&(o.className=n),c!==void 0&&(o.textContent=c),o}function k(a,n,c){let o=document.createElementNS(Z,a);for(let[u,p]of Object.entries(n))o.setAttribute(u,String(p));return c!==void 0&&(o.textContent=c),o}function z(a,n){if(a==null)return"\u2014";let c;return typeof a=="number"?c=Number.isInteger(a)?String(a):Number(a.toPrecision(6)).toString():c=String(a),n?`${c} [${n}]`:c}function X(a,n=10){return a?a.slice(0,n):"\u2014"}function Y(a,n,c){let o=document.getElementById("root");if(!o)return;let u=null,p=1,v={theme:globalThis.matchMedia?.("(prefers-color-scheme: dark)").matches?"dark":"light",width:globalThis.innerWidth||540,emitComposeEvent(l,e){globalThis.parent?.postMessage({jsonrpc:"2.0",id:`sysml-ev-${p++}`,method:"ui/compose/event",params:{event:l,data:e}},"*")}};function w(l){v.theme=l,document.documentElement.dataset.theme=l}function $(){let l=Math.ceil(o.scrollHeight||document.body.scrollHeight||220);globalThis.parent?.postMessage({jsonrpc:"2.0",method:"ui/notifications/size-changed",params:{height:Math.max(120,l)}},"*")}function g(){if(!u){let l=s("div","sysml-shell");l.append(s("div","notice",`Waiting for SysML v2 verification data (${a})\u2026`)),o.replaceChildren(l),o.setAttribute("aria-busy","false"),$();return}n(o,u,v),o.setAttribute("aria-busy","false"),requestAnimationFrame($)}w(v.theme),g(),typeof ResizeObserver<"u"&&new ResizeObserver(()=>$()).observe(o),globalThis.addEventListener("message",l=>{let e=l.data;if(!(!f(e)||e.jsonrpc!=="2.0")){if(e.id==="sysml-init"&&f(e.result)){let i=f(e.result.hostContext)?e.result.hostContext:void 0;(i?.theme==="dark"||i?.theme==="light")&&w(i.theme),f(i?.containerDimensions)&&typeof i.containerDimensions.width=="number"&&(v.width=i.containerDimensions.width),globalThis.parent?.postMessage({jsonrpc:"2.0",method:"ui/notifications/initialized",params:{}},"*");return}if(e.method==="ui/notifications/host-context-changed"&&f(e.params)){(e.params.theme==="dark"||e.params.theme==="light")&&w(e.params.theme),f(e.params.containerDimensions)&&typeof e.params.containerDimensions.width=="number"&&(v.width=e.params.containerDimensions.width),g();return}if(e.method==="ui/compose/event"&&f(e.params)){let i=typeof e.params.action=="string"?e.params.action:typeof e.params.event=="string"?e.params.event:"",y=f(e.params.data)?e.params.data:{};i&&c&&c(i,y,g);return}if(e.method==="ui/notifications/tool-result"){let i=tt(e.params);if(i)u=i,g();else if(f(e.params)&&e.params.isError===!0){let y=s("div","sysml-shell");y.append(s("div","notice","SysML v2 engine returned an error.")),o.replaceChildren(y),$()}}}}),globalThis.parent?.postMessage({jsonrpc:"2.0",id:"sysml-init",method:"ui/initialize",params:{protocolVersion:"2026-01-26",appInfo:{name:`mcp-sysml-toolkit/${a}`,version:"0.1.0"},appCapabilities:{}}},"*")}var P=new Set,W=null;function et(a,n){let c=new Map(a.architecture.attributes.map(e=>[e.qualifiedName,e])),o=new Map(a.verdicts.map(e=>[e.qualifiedName,e])),u=new Map;for(let e of a.impact.edges)if(e.relation==="expr-ref"){let i=u.get(e.from)??new Set;i.add(e.to),u.set(e.from,i)}let p=new Map;for(let e of a.architecture.compositionLinks){let i=p.get(e.toPart)??new Set;i.add(e.fromPart),p.set(e.toPart,i)}let v=new Set(n),w=Array.from(n);for(;w.length>0;){let e=w.shift();for(let i of u.get(e)??[])v.has(i)||(v.add(i),w.push(i))}let $=[];for(let e of a.architecture.constraints){let i=e.referencedAttributes.filter(A=>v.has(A));if(i.length===0)continue;let y=o.get(e.qualifiedName);$.push({name:e.name,qualifiedName:e.qualifiedName,ownerPart:e.ownerPart,kind:e.kind,...y?{status:y.status}:{},...e.expression?{expression:e.expression}:{},triggerAttributes:i,path:[i[0],e.qualifiedName]})}let g=new Set,l=[];for(let e of v){let i=c.get(e)?.ownerPart;i&&!g.has(i)&&(g.add(i),l.push(i))}for(;l.length>0;){let e=l.shift();for(let i of p.get(e)??[])g.has(i)||(g.add(i),l.push(i))}return{changedAttributes:Array.from(n).map(e=>{let i=c.get(e);return{name:i?.name??e.split("::").pop()??e,qualifiedName:e,ownerPart:i?.ownerPart??"Model",currentValue:i?.value,unit:i?.unit,changeKind:"declared"}}),impactedConstraints:$,impactedParts:Array.from(g),downstreamDomains:a.impact.downstreamDomains}}function J(a,n,c){let o=s("div","sysml-shell"),u=n.impact.changedAttributes.length>0;if(!u&&P.size===0&&n.architecture.constraints.length>0){let t=n.architecture.constraints.find(r=>r.referencedAttributes.length>0)?.referencedAttributes[0];t&&P.add(t)}let p=u?n.impact:et(n,P),v=s("div","sysml-header"),w=s("div"),$=s("h3","sysml-title");$.append(s("span","kind-tag","IMPACT"),document.createTextNode(`${n.modelName} \u2014 Dependency & Change Impact`)),w.append($,s("div","sysml-sub",u?`change-impact mode \xB7 sha256:${X(n.sourceSha256,8)}`:"interactive baseline explorer \xB7 click attributes below to trace causal impact"));let g=s("div","pills");if(g.append(s("span","pill pill--warn",`${p.changedAttributes.length} modified`),s("span","pill pill--info",`${p.impactedParts.length} parts`),s("span","pill pill--ok",`${p.impactedConstraints.length} constraints`)),p.downstreamDomains.length>0&&g.append(s("span","pill pill--domain",`${p.downstreamDomains.length} domains`)),v.append(w,g),o.append(v),!u&&n.architecture.attributes.length>0){let t=s("div","detail-card");t.append(s("div","kpi-label","Select attributes to simulate change-impact propagation:"));let r=s("div","chip-row");for(let d of n.architecture.attributes.slice(0,24)){let b=P.has(d.qualifiedName),m=s("button",b?"attr-chip attr-chip--active":"attr-chip",d.name);m.type="button",m.title=`${d.qualifiedName} = ${z(d.value,d.unit)}`,m.addEventListener("click",()=>{P.has(d.qualifiedName)?P.delete(d.qualifiedName):P.add(d.qualifiedName),J(a,n,c)}),r.append(m)}t.append(r),o.append(t)}let l=[],e=[],i=new Set;function y(t){i.has(t.id)||(i.add(t.id),l.push(t))}for(let t of p.changedAttributes){let r="delta"in t&&typeof t.delta=="number"?`${t.delta>=0?"+":""}${t.delta}${t.unit?` ${t.unit}`:""}`:z(t.currentValue,t.unit);y({id:`attr:${t.qualifiedName}`,label:t.name,sub:`${t.ownerPart} \xB7 ${r}`,col:0,kind:"changed",tone:"warn"}),t.ownerPart&&t.ownerPart!=="unknown"&&e.push({from:`attr:${t.qualifiedName}`,to:`part:${t.ownerPart}`,tone:"warn"})}for(let t of p.impactedParts)y({id:`part:${t}`,label:t,sub:"PartDefinition",col:1,kind:"part",tone:"info",payload:{partName:t}});for(let t of p.impactedConstraints){let r=t.status==="violated"||t.status==="error"?"fail":t.status==="satisfied"?"ok":"warn";y({id:`cstr:${t.qualifiedName}`,label:t.name,sub:`${t.status?t.status.toUpperCase():"IMPACTED"} \xB7 ${t.ownerPart}`,col:2,kind:"constraint",tone:r,payload:{requirementName:t.name,qualifiedName:t.qualifiedName,ownerPart:t.ownerPart,status:t.status}}),i.has(`part:${t.ownerPart}`)?e.push({from:`part:${t.ownerPart}`,to:`cstr:${t.qualifiedName}`,tone:r==="fail"?"fail":"info"}):t.triggerAttributes[0]&&e.push({from:`attr:${t.triggerAttributes[0]}`,to:`cstr:${t.qualifiedName}`,tone:r==="fail"?"fail":"warn"})}for(let t of p.downstreamDomains){y({id:`dom:${t.domain}`,label:t.domain,sub:t.source,col:3,kind:"domain",tone:"domain"});let r=!1;for(let d of p.impactedConstraints)t.affectedParts.includes(d.ownerPart)&&(e.push({from:`cstr:${d.qualifiedName}`,to:`dom:${t.domain}`,tone:"domain"}),r=!0);if(!r)for(let d of t.affectedParts)i.has(`part:${d}`)&&e.push({from:`part:${d}`,to:`dom:${t.domain}`,tone:"domain"})}if(l.length===0){o.append(s("div","notice","No modified attributes or dependency edges available to plot.")),a.replaceChildren(o);return}let A=[[],[],[],[]];for(let t of l)A[t.col].push(t);let S=A.map((t,r)=>({idx:r,items:t})).filter(t=>t.items.length>0),q=154,N=44,V=42,I=12,j=16,L=30,_=Math.max(1,...S.map(t=>t.items.length)),H=Math.max(460,j*2+S.length*q+(S.length-1)*V),T=Math.max(160,L+_*N+(_-1)*I+18),M=new Map,K=["Modified Attributes","Affected Parts","Impacted Constraints","Downstream Domains"],O=s("div","diagram-wrap"),E=k("svg",{class:"sysml-svg",width:H,height:T,viewBox:`0 0 ${H} ${T}`,role:"img","aria-label":`${n.modelName} Change Impact Graph`});S.forEach((t,r)=>{let d=j+r*(q+V);E.append(k("text",{x:d,y:16,fill:"var(--muted)","font-size":10,"font-weight":700,"font-family":"var(--font-mono)"},K[t.idx].toUpperCase()));let b=t.items.length*N+(t.items.length-1)*I,m=L+Math.max(0,Math.floor((T-L-18-b)/2));t.items.forEach((h,x)=>{M.set(h.id,{x:d,y:m+x*(N+I)})})});let U=t=>t==="fail"?"var(--fail)":t==="warn"?"var(--warn)":t==="domain"?"var(--domain)":"var(--info)";for(let t of e){let r=M.get(t.from),d=M.get(t.to);if(!r||!d)continue;let b=r.x+q,m=r.y+N/2,h=d.x,x=d.y+N/2,C=(b+h)/2;E.append(k("path",{d:`M ${b} ${m} C ${C} ${m}, ${C} ${x}, ${h} ${x}`,fill:"none",stroke:U(t.tone),"stroke-width":1.6,"stroke-opacity":.72}))}for(let t of l){let r=M.get(t.id);if(!r)continue;let d=t.tone==="ok"?"var(--ok)":U(t.tone),b=W!==null&&t.label.toLowerCase()===W.toLowerCase(),m=k("g",{style:t.kind==="part"||t.kind==="constraint"?"cursor: pointer;":""});m.append(k("rect",{x:r.x,y:r.y,width:q,height:N,rx:7,fill:"var(--block-bg)",stroke:b?"var(--accent)":d,"stroke-width":b?2.5:1.5})),m.append(k("rect",{x:r.x,y:r.y,width:4,height:N,rx:2,fill:d})),m.append(k("text",{x:r.x+11,y:r.y+18,fill:"var(--text)","font-size":11,"font-weight":700,"font-family":"var(--font-mono)"},t.label.length>18?`${t.label.slice(0,17)}\u2026`:t.label)),t.sub&&m.append(k("text",{x:r.x+11,y:r.y+34,fill:"var(--muted)","font-size":9.5,"font-family":"var(--font-mono)"},t.sub.length>21?`${t.sub.slice(0,20)}\u2026`:t.sub)),t.kind==="part"&&t.payload?m.addEventListener("click",()=>{c.emitComposeEvent("part.selected",t.payload)}):t.kind==="constraint"&&t.payload&&m.addEventListener("click",()=>{c.emitComposeEvent("requirement.selected",t.payload)}),E.append(m)}if(O.append(E),o.append(O),p.impactedConstraints.length>0){let t=s("div","table-wrap"),r=s("table","sysml-table"),d=s("thead"),b=s("tr");for(let h of["Impacted Constraint","Owner Part","Verdict","Trigger Path"])b.append(s("th",void 0,h));d.append(b),r.append(d);let m=s("tbody");for(let h of p.impactedConstraints){let x=s("tr");x.append(s("td","mono",h.name),s("td","mono",h.ownerPart));let C=s("td"),D=h.status??"undecided",Q=D==="satisfied"?"pill pill--ok pill--mono":D==="violated"||D==="error"?"pill pill--fail pill--mono":"pill pill--warn pill--mono";C.append(s("span",Q,D.toUpperCase())),x.append(C),x.append(s("td","mono",h.path.map(B=>B.split("::").pop()??B).join(" \u2192 "))),x.addEventListener("click",()=>{c.emitComposeEvent("requirement.selected",{requirementName:h.name,qualifiedName:h.qualifiedName,ownerPart:h.ownerPart,status:h.status})}),m.append(x)}r.append(m),t.append(r),o.append(t)}a.replaceChildren(o)}Y("impact-graph",J,(a,n,c)=>{if(a==="part.focus"||a==="requirement.focus"){let o=[n.partName,n.requirementName,n.name,n.qualifiedName].find(u=>typeof u=="string"&&u.trim().length>0);o&&(W=o.split("::").pop()??o,c())}});
|
|
538
|
+
|
|
539
|
+
</script>
|
|
540
|
+
</body>
|
|
541
|
+
</html>
|