@skenion/contracts 0.35.0 → 0.37.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.
@@ -654,6 +654,123 @@ export const graphV02Schema = {
654
654
  }
655
655
  }
656
656
  };
657
+ export const graphFragmentV02Schema = {
658
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
659
+ "$id": "https://skenion.dev/schemas/graph/v0.2/fragment.schema.json",
660
+ "title": "Skenion Graph Fragment v0.2",
661
+ "type": "object",
662
+ "required": [
663
+ "schema",
664
+ "schemaVersion",
665
+ "nodes",
666
+ "edges"
667
+ ],
668
+ "properties": {
669
+ "schema": {
670
+ "const": "skenion.graph.fragment"
671
+ },
672
+ "schemaVersion": {
673
+ "const": "0.2.0"
674
+ },
675
+ "id": {
676
+ "type": "string",
677
+ "minLength": 1
678
+ },
679
+ "nodes": {
680
+ "type": "array",
681
+ "items": {
682
+ "$ref": "https://skenion.dev/schemas/graph/v0.2/graph.schema.json#/$defs/node"
683
+ }
684
+ },
685
+ "edges": {
686
+ "type": "array",
687
+ "items": {
688
+ "$ref": "https://skenion.dev/schemas/graph/v0.2/graph.schema.json#/$defs/edge"
689
+ }
690
+ },
691
+ "view": {
692
+ "$ref": "#/$defs/fragmentView"
693
+ },
694
+ "omittedEdges": {
695
+ "type": "array",
696
+ "items": {
697
+ "$ref": "#/$defs/omittedEdge"
698
+ }
699
+ },
700
+ "metadata": {
701
+ "type": "object",
702
+ "additionalProperties": true
703
+ }
704
+ },
705
+ "additionalProperties": false,
706
+ "$defs": {
707
+ "fragmentView": {
708
+ "type": "object",
709
+ "properties": {
710
+ "nodes": {
711
+ "type": "object",
712
+ "additionalProperties": {
713
+ "$ref": "#/$defs/nodeView"
714
+ }
715
+ }
716
+ },
717
+ "additionalProperties": false
718
+ },
719
+ "nodeView": {
720
+ "type": "object",
721
+ "required": [
722
+ "x",
723
+ "y"
724
+ ],
725
+ "properties": {
726
+ "x": {
727
+ "type": "number"
728
+ },
729
+ "y": {
730
+ "type": "number"
731
+ },
732
+ "width": {
733
+ "type": "number"
734
+ },
735
+ "height": {
736
+ "type": "number"
737
+ },
738
+ "collapsed": {
739
+ "type": "boolean"
740
+ }
741
+ },
742
+ "additionalProperties": false
743
+ },
744
+ "omittedEdge": {
745
+ "type": "object",
746
+ "required": [
747
+ "id",
748
+ "source",
749
+ "target",
750
+ "reason"
751
+ ],
752
+ "properties": {
753
+ "id": {
754
+ "type": "string",
755
+ "minLength": 1
756
+ },
757
+ "source": {
758
+ "$ref": "https://skenion.dev/schemas/graph/v0.2/graph.schema.json#/$defs/portEndpoint"
759
+ },
760
+ "target": {
761
+ "$ref": "https://skenion.dev/schemas/graph/v0.2/graph.schema.json#/$defs/portEndpoint"
762
+ },
763
+ "reason": {
764
+ "enum": [
765
+ "outside-fragment",
766
+ "policy-omit"
767
+ ]
768
+ }
769
+ },
770
+ "additionalProperties": false
771
+ }
772
+ }
773
+ };
657
774
  export const viewStateV01Schema = {
658
775
  "$schema": "https://json-schema.org/draft/2020-12/schema",
659
776
  "$id": "https://skenion.dev/schemas/view/v0.1/view-state.schema.json",
@@ -908,6 +1025,1250 @@ export const projectV02Schema = {
908
1025
  }
909
1026
  }
910
1027
  };
1028
+ export const runtimeOperationV0Schema = {
1029
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1030
+ "$id": "https://skenion.dev/schemas/runtime/v0/operation.schema.json",
1031
+ "title": "Skenion Runtime Operation Envelope v0",
1032
+ "type": "object",
1033
+ "required": [
1034
+ "schema",
1035
+ "schemaVersion",
1036
+ "id",
1037
+ "kind",
1038
+ "request"
1039
+ ],
1040
+ "properties": {
1041
+ "schema": {
1042
+ "const": "skenion.runtime.operation"
1043
+ },
1044
+ "schemaVersion": {
1045
+ "const": "0.1.0"
1046
+ },
1047
+ "id": {
1048
+ "type": "string",
1049
+ "minLength": 1
1050
+ },
1051
+ "kind": {
1052
+ "const": "pasteGraphFragment"
1053
+ },
1054
+ "request": {
1055
+ "$ref": "#/$defs/pasteGraphFragmentRequest"
1056
+ },
1057
+ "attribution": {
1058
+ "$ref": "#/$defs/runtimeOperationAttribution"
1059
+ },
1060
+ "correlationId": {
1061
+ "type": "string",
1062
+ "minLength": 1
1063
+ },
1064
+ "createdAt": {
1065
+ "type": "string"
1066
+ }
1067
+ },
1068
+ "additionalProperties": false,
1069
+ "$defs": {
1070
+ "patchPath": {
1071
+ "oneOf": [
1072
+ {
1073
+ "type": "object",
1074
+ "required": [
1075
+ "kind"
1076
+ ],
1077
+ "properties": {
1078
+ "kind": {
1079
+ "const": "root"
1080
+ }
1081
+ },
1082
+ "additionalProperties": false
1083
+ },
1084
+ {
1085
+ "type": "object",
1086
+ "required": [
1087
+ "kind",
1088
+ "patchId"
1089
+ ],
1090
+ "properties": {
1091
+ "kind": {
1092
+ "const": "project-patch-definition"
1093
+ },
1094
+ "patchId": {
1095
+ "type": "string",
1096
+ "minLength": 1
1097
+ }
1098
+ },
1099
+ "additionalProperties": false
1100
+ },
1101
+ {
1102
+ "type": "object",
1103
+ "required": [
1104
+ "kind",
1105
+ "packageId",
1106
+ "patchId"
1107
+ ],
1108
+ "properties": {
1109
+ "kind": {
1110
+ "const": "package-patch-definition"
1111
+ },
1112
+ "packageId": {
1113
+ "type": "string",
1114
+ "minLength": 1
1115
+ },
1116
+ "patchId": {
1117
+ "type": "string",
1118
+ "minLength": 1
1119
+ },
1120
+ "version": {
1121
+ "type": "string",
1122
+ "minLength": 1
1123
+ }
1124
+ },
1125
+ "additionalProperties": false
1126
+ },
1127
+ {
1128
+ "type": "object",
1129
+ "required": [
1130
+ "kind",
1131
+ "ownerPath",
1132
+ "nodeId"
1133
+ ],
1134
+ "properties": {
1135
+ "kind": {
1136
+ "const": "embedded-patch-instance"
1137
+ },
1138
+ "ownerPath": {
1139
+ "type": "array",
1140
+ "items": {
1141
+ "type": "string",
1142
+ "minLength": 1
1143
+ }
1144
+ },
1145
+ "nodeId": {
1146
+ "type": "string",
1147
+ "minLength": 1
1148
+ }
1149
+ },
1150
+ "additionalProperties": false
1151
+ },
1152
+ {
1153
+ "type": "object",
1154
+ "required": [
1155
+ "kind",
1156
+ "workingCopyId"
1157
+ ],
1158
+ "properties": {
1159
+ "kind": {
1160
+ "const": "help-working-copy"
1161
+ },
1162
+ "workingCopyId": {
1163
+ "type": "string",
1164
+ "minLength": 1
1165
+ },
1166
+ "sourcePackageId": {
1167
+ "type": "string",
1168
+ "minLength": 1
1169
+ },
1170
+ "sourcePatchId": {
1171
+ "type": "string",
1172
+ "minLength": 1
1173
+ }
1174
+ },
1175
+ "additionalProperties": false
1176
+ }
1177
+ ]
1178
+ },
1179
+ "graphTargetRef": {
1180
+ "type": "object",
1181
+ "required": [
1182
+ "path",
1183
+ "baseRevision"
1184
+ ],
1185
+ "properties": {
1186
+ "path": {
1187
+ "$ref": "#/$defs/patchPath"
1188
+ },
1189
+ "baseRevision": {
1190
+ "type": "string",
1191
+ "minLength": 1
1192
+ },
1193
+ "targetRevision": {
1194
+ "type": "string",
1195
+ "minLength": 1
1196
+ }
1197
+ },
1198
+ "additionalProperties": false
1199
+ },
1200
+ "pastePlacement": {
1201
+ "oneOf": [
1202
+ {
1203
+ "type": "object",
1204
+ "required": [
1205
+ "kind",
1206
+ "x",
1207
+ "y"
1208
+ ],
1209
+ "properties": {
1210
+ "kind": {
1211
+ "const": "position"
1212
+ },
1213
+ "x": {
1214
+ "type": "number"
1215
+ },
1216
+ "y": {
1217
+ "type": "number"
1218
+ }
1219
+ },
1220
+ "additionalProperties": false
1221
+ },
1222
+ {
1223
+ "type": "object",
1224
+ "required": [
1225
+ "kind",
1226
+ "nodeId"
1227
+ ],
1228
+ "properties": {
1229
+ "kind": {
1230
+ "const": "anchor"
1231
+ },
1232
+ "nodeId": {
1233
+ "type": "string",
1234
+ "minLength": 1
1235
+ },
1236
+ "offsetX": {
1237
+ "type": "number"
1238
+ },
1239
+ "offsetY": {
1240
+ "type": "number"
1241
+ }
1242
+ },
1243
+ "additionalProperties": false
1244
+ }
1245
+ ]
1246
+ },
1247
+ "pasteGraphFragmentOptions": {
1248
+ "type": "object",
1249
+ "properties": {
1250
+ "outsideEndpointPolicy": {
1251
+ "enum": [
1252
+ "reject",
1253
+ "omit"
1254
+ ],
1255
+ "default": "reject"
1256
+ },
1257
+ "idConflictPolicy": {
1258
+ "enum": [
1259
+ "remap",
1260
+ "reject"
1261
+ ],
1262
+ "default": "remap"
1263
+ },
1264
+ "preserveRelativePositions": {
1265
+ "type": "boolean",
1266
+ "default": true
1267
+ }
1268
+ },
1269
+ "additionalProperties": false
1270
+ },
1271
+ "pasteGraphFragmentRequest": {
1272
+ "type": "object",
1273
+ "required": [
1274
+ "target",
1275
+ "fragment"
1276
+ ],
1277
+ "properties": {
1278
+ "target": {
1279
+ "$ref": "#/$defs/graphTargetRef"
1280
+ },
1281
+ "fragment": {
1282
+ "$ref": "https://skenion.dev/schemas/graph/v0.2/fragment.schema.json"
1283
+ },
1284
+ "placement": {
1285
+ "$ref": "#/$defs/pastePlacement"
1286
+ },
1287
+ "options": {
1288
+ "$ref": "#/$defs/pasteGraphFragmentOptions"
1289
+ }
1290
+ },
1291
+ "additionalProperties": false
1292
+ },
1293
+ "runtimeOperationAttribution": {
1294
+ "type": "object",
1295
+ "properties": {
1296
+ "actorId": {
1297
+ "type": "string",
1298
+ "minLength": 1
1299
+ },
1300
+ "clientId": {
1301
+ "type": "string",
1302
+ "minLength": 1
1303
+ },
1304
+ "label": {
1305
+ "type": "string"
1306
+ }
1307
+ },
1308
+ "additionalProperties": false
1309
+ },
1310
+ "idRemapResult": {
1311
+ "type": "object",
1312
+ "required": [
1313
+ "nodeIdMap",
1314
+ "edgeIdMap",
1315
+ "omittedEdgeIds"
1316
+ ],
1317
+ "properties": {
1318
+ "nodeIdMap": {
1319
+ "type": "object",
1320
+ "additionalProperties": {
1321
+ "type": "string",
1322
+ "minLength": 1
1323
+ }
1324
+ },
1325
+ "edgeIdMap": {
1326
+ "type": "object",
1327
+ "additionalProperties": {
1328
+ "type": "string",
1329
+ "minLength": 1
1330
+ }
1331
+ },
1332
+ "omittedEdgeIds": {
1333
+ "type": "array",
1334
+ "items": {
1335
+ "type": "string",
1336
+ "minLength": 1
1337
+ }
1338
+ }
1339
+ },
1340
+ "additionalProperties": false
1341
+ },
1342
+ "runtimeOperationDiagnosticSeverity": {
1343
+ "enum": [
1344
+ "error",
1345
+ "warning",
1346
+ "info"
1347
+ ]
1348
+ },
1349
+ "runtimeOperationDiagnostic": {
1350
+ "type": "object",
1351
+ "required": [
1352
+ "severity",
1353
+ "code",
1354
+ "message"
1355
+ ],
1356
+ "properties": {
1357
+ "severity": {
1358
+ "$ref": "#/$defs/runtimeOperationDiagnosticSeverity"
1359
+ },
1360
+ "code": {
1361
+ "enum": [
1362
+ "base-revision-mismatch",
1363
+ "duplicate-edge-id",
1364
+ "duplicate-node-id",
1365
+ "duplicate-target-path",
1366
+ "fragment-edge-outside-selection",
1367
+ "id-conflict",
1368
+ "invalid-target-path",
1369
+ "operation-rebased",
1370
+ "target-not-found",
1371
+ "unsupported-operation"
1372
+ ]
1373
+ },
1374
+ "message": {
1375
+ "type": "string"
1376
+ },
1377
+ "path": {
1378
+ "type": "string",
1379
+ "minLength": 1
1380
+ },
1381
+ "target": {
1382
+ "$ref": "#/$defs/graphTargetRef"
1383
+ },
1384
+ "expectedRevision": {
1385
+ "type": "string",
1386
+ "minLength": 1
1387
+ },
1388
+ "actualRevision": {
1389
+ "type": "string",
1390
+ "minLength": 1
1391
+ },
1392
+ "duplicates": {
1393
+ "type": "array",
1394
+ "items": {
1395
+ "type": "string",
1396
+ "minLength": 1
1397
+ }
1398
+ },
1399
+ "nodes": {
1400
+ "type": "array",
1401
+ "items": {
1402
+ "type": "string",
1403
+ "minLength": 1
1404
+ }
1405
+ },
1406
+ "edges": {
1407
+ "type": "array",
1408
+ "items": {
1409
+ "type": "string",
1410
+ "minLength": 1
1411
+ }
1412
+ }
1413
+ },
1414
+ "additionalProperties": false
1415
+ },
1416
+ "pasteGraphFragmentResponse": {
1417
+ "type": "object",
1418
+ "required": [
1419
+ "schema",
1420
+ "schemaVersion",
1421
+ "ok",
1422
+ "applied",
1423
+ "conflict",
1424
+ "target",
1425
+ "revisionBefore",
1426
+ "revisionAfter",
1427
+ "historyEntryId",
1428
+ "idRemap",
1429
+ "diagnostics"
1430
+ ],
1431
+ "properties": {
1432
+ "schema": {
1433
+ "const": "skenion.runtime.paste-graph-fragment.response"
1434
+ },
1435
+ "schemaVersion": {
1436
+ "const": "0.1.0"
1437
+ },
1438
+ "ok": {
1439
+ "type": "boolean"
1440
+ },
1441
+ "applied": {
1442
+ "type": "boolean"
1443
+ },
1444
+ "conflict": {
1445
+ "type": "boolean"
1446
+ },
1447
+ "target": {
1448
+ "$ref": "#/$defs/graphTargetRef"
1449
+ },
1450
+ "revisionBefore": {
1451
+ "type": "string",
1452
+ "minLength": 1
1453
+ },
1454
+ "revisionAfter": {
1455
+ "anyOf": [
1456
+ {
1457
+ "type": "string",
1458
+ "minLength": 1
1459
+ },
1460
+ {
1461
+ "type": "null"
1462
+ }
1463
+ ]
1464
+ },
1465
+ "historyEntryId": {
1466
+ "anyOf": [
1467
+ {
1468
+ "type": "string",
1469
+ "minLength": 1
1470
+ },
1471
+ {
1472
+ "type": "null"
1473
+ }
1474
+ ]
1475
+ },
1476
+ "idRemap": {
1477
+ "$ref": "#/$defs/idRemapResult"
1478
+ },
1479
+ "diagnostics": {
1480
+ "type": "array",
1481
+ "items": {
1482
+ "$ref": "#/$defs/runtimeOperationDiagnostic"
1483
+ }
1484
+ }
1485
+ },
1486
+ "additionalProperties": false
1487
+ }
1488
+ }
1489
+ };
1490
+ export const runtimeSessionV0Schema = {
1491
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1492
+ "$id": "https://skenion.dev/schemas/runtime/v0/session.schema.json",
1493
+ "title": "Skenion Runtime Session Profile v0",
1494
+ "type": "object",
1495
+ "required": [
1496
+ "schema",
1497
+ "schemaVersion",
1498
+ "ok",
1499
+ "sessionId",
1500
+ "lifecycle",
1501
+ "snapshot",
1502
+ "profile",
1503
+ "capabilities",
1504
+ "eventReplay",
1505
+ "diagnostics"
1506
+ ],
1507
+ "properties": {
1508
+ "schema": {
1509
+ "const": "skenion.runtime.session.info"
1510
+ },
1511
+ "schemaVersion": {
1512
+ "const": "0.1.0"
1513
+ },
1514
+ "ok": {
1515
+ "type": "boolean"
1516
+ },
1517
+ "sessionId": {
1518
+ "type": "string",
1519
+ "minLength": 1
1520
+ },
1521
+ "lifecycle": {
1522
+ "$ref": "#/$defs/runtimeSessionLifecycleState"
1523
+ },
1524
+ "snapshot": {
1525
+ "$ref": "#/$defs/runtimeSessionSnapshot"
1526
+ },
1527
+ "profile": {
1528
+ "$ref": "#/$defs/runtimeConnectionProfile"
1529
+ },
1530
+ "capabilities": {
1531
+ "$ref": "#/$defs/runtimeSessionCapabilitySet"
1532
+ },
1533
+ "eventReplay": {
1534
+ "$ref": "#/$defs/runtimeEventReplayWindow"
1535
+ },
1536
+ "diagnostics": {
1537
+ "type": "array",
1538
+ "items": {
1539
+ "$ref": "#/$defs/runtimeDiagnostic"
1540
+ }
1541
+ }
1542
+ },
1543
+ "additionalProperties": false,
1544
+ "$defs": {
1545
+ "runtimeDiagnostic": {
1546
+ "type": "object",
1547
+ "required": [
1548
+ "severity",
1549
+ "message"
1550
+ ],
1551
+ "properties": {
1552
+ "severity": {
1553
+ "enum": [
1554
+ "error",
1555
+ "warning",
1556
+ "info"
1557
+ ]
1558
+ },
1559
+ "message": {
1560
+ "type": "string"
1561
+ }
1562
+ },
1563
+ "additionalProperties": false
1564
+ },
1565
+ "runtimeSessionLifecycleState": {
1566
+ "enum": [
1567
+ "initializing",
1568
+ "ready",
1569
+ "closing",
1570
+ "closed",
1571
+ "error"
1572
+ ]
1573
+ },
1574
+ "runtimeConnectionProfileMode": {
1575
+ "enum": [
1576
+ "local-managed",
1577
+ "local-shared",
1578
+ "remote"
1579
+ ]
1580
+ },
1581
+ "runtimeOwnershipMode": {
1582
+ "enum": [
1583
+ "owned-child",
1584
+ "external",
1585
+ "remote"
1586
+ ]
1587
+ },
1588
+ "runtimeEndpointMetadata": {
1589
+ "type": "object",
1590
+ "required": [
1591
+ "url",
1592
+ "protocol"
1593
+ ],
1594
+ "properties": {
1595
+ "url": {
1596
+ "type": "string",
1597
+ "minLength": 1
1598
+ },
1599
+ "canonicalUrl": {
1600
+ "type": "string",
1601
+ "minLength": 1
1602
+ },
1603
+ "protocol": {
1604
+ "enum": [
1605
+ "http",
1606
+ "https"
1607
+ ]
1608
+ },
1609
+ "host": {
1610
+ "type": "string",
1611
+ "minLength": 1
1612
+ },
1613
+ "port": {
1614
+ "type": "integer",
1615
+ "minimum": 0,
1616
+ "maximum": 65535
1617
+ },
1618
+ "tls": {
1619
+ "type": "boolean"
1620
+ }
1621
+ },
1622
+ "additionalProperties": false
1623
+ },
1624
+ "runtimeProcessMetadata": {
1625
+ "type": "object",
1626
+ "required": [
1627
+ "ownedByHost"
1628
+ ],
1629
+ "properties": {
1630
+ "ownedByHost": {
1631
+ "type": "boolean"
1632
+ },
1633
+ "pid": {
1634
+ "type": "integer",
1635
+ "minimum": 1
1636
+ },
1637
+ "executablePath": {
1638
+ "type": "string",
1639
+ "minLength": 1
1640
+ },
1641
+ "workingDirectory": {
1642
+ "type": "string",
1643
+ "minLength": 1
1644
+ },
1645
+ "startedAt": {
1646
+ "type": "string"
1647
+ },
1648
+ "ownerWindowId": {
1649
+ "type": "string",
1650
+ "minLength": 1
1651
+ },
1652
+ "platform": {
1653
+ "type": "string",
1654
+ "minLength": 1
1655
+ },
1656
+ "arch": {
1657
+ "type": "string",
1658
+ "minLength": 1
1659
+ }
1660
+ },
1661
+ "additionalProperties": false
1662
+ },
1663
+ "runtimeConnectionProfile": {
1664
+ "oneOf": [
1665
+ {
1666
+ "$ref": "#/$defs/runtimeLocalManagedConnectionProfile"
1667
+ },
1668
+ {
1669
+ "$ref": "#/$defs/runtimeLocalSharedConnectionProfile"
1670
+ },
1671
+ {
1672
+ "$ref": "#/$defs/runtimeRemoteConnectionProfile"
1673
+ }
1674
+ ]
1675
+ },
1676
+ "runtimeConnectionProfileBase": {
1677
+ "type": "object",
1678
+ "required": [
1679
+ "mode",
1680
+ "ownership",
1681
+ "endpoint"
1682
+ ],
1683
+ "properties": {
1684
+ "mode": {
1685
+ "$ref": "#/$defs/runtimeConnectionProfileMode"
1686
+ },
1687
+ "ownership": {
1688
+ "$ref": "#/$defs/runtimeOwnershipMode"
1689
+ },
1690
+ "displayName": {
1691
+ "type": "string"
1692
+ },
1693
+ "endpoint": {
1694
+ "$ref": "#/$defs/runtimeEndpointMetadata"
1695
+ },
1696
+ "process": {
1697
+ "oneOf": [
1698
+ {
1699
+ "$ref": "#/$defs/runtimeProcessMetadata"
1700
+ },
1701
+ {
1702
+ "type": "null"
1703
+ }
1704
+ ]
1705
+ }
1706
+ },
1707
+ "additionalProperties": false
1708
+ },
1709
+ "runtimeLocalManagedConnectionProfile": {
1710
+ "allOf": [
1711
+ {
1712
+ "$ref": "#/$defs/runtimeConnectionProfileBase"
1713
+ },
1714
+ {
1715
+ "type": "object",
1716
+ "properties": {
1717
+ "mode": {
1718
+ "const": "local-managed"
1719
+ },
1720
+ "ownership": {
1721
+ "const": "owned-child"
1722
+ }
1723
+ }
1724
+ }
1725
+ ]
1726
+ },
1727
+ "runtimeLocalSharedConnectionProfile": {
1728
+ "allOf": [
1729
+ {
1730
+ "$ref": "#/$defs/runtimeConnectionProfileBase"
1731
+ },
1732
+ {
1733
+ "type": "object",
1734
+ "properties": {
1735
+ "mode": {
1736
+ "const": "local-shared"
1737
+ },
1738
+ "ownership": {
1739
+ "const": "external"
1740
+ }
1741
+ }
1742
+ }
1743
+ ]
1744
+ },
1745
+ "runtimeRemoteConnectionProfile": {
1746
+ "allOf": [
1747
+ {
1748
+ "$ref": "#/$defs/runtimeConnectionProfileBase"
1749
+ },
1750
+ {
1751
+ "type": "object",
1752
+ "properties": {
1753
+ "mode": {
1754
+ "const": "remote"
1755
+ },
1756
+ "ownership": {
1757
+ "const": "remote"
1758
+ }
1759
+ }
1760
+ }
1761
+ ]
1762
+ },
1763
+ "runtimeProjectSnapshot": {
1764
+ "type": "object",
1765
+ "required": [
1766
+ "graph",
1767
+ "viewState",
1768
+ "nodes"
1769
+ ],
1770
+ "properties": {
1771
+ "graph": {
1772
+ "$ref": "https://skenion.dev/schemas/graph/v0.1/graph.schema.json"
1773
+ },
1774
+ "viewState": {
1775
+ "$ref": "https://skenion.dev/schemas/view/v0.1/view-state.schema.json"
1776
+ },
1777
+ "nodes": {
1778
+ "type": "array",
1779
+ "items": {
1780
+ "$ref": "https://skenion.dev/schemas/node/v0.1/node-definition.schema.json"
1781
+ }
1782
+ }
1783
+ },
1784
+ "additionalProperties": false
1785
+ },
1786
+ "runtimeSessionSnapshot": {
1787
+ "type": "object",
1788
+ "required": [
1789
+ "sessionRevision",
1790
+ "viewRevision",
1791
+ "controlRevision",
1792
+ "project",
1793
+ "diagnostics",
1794
+ "plan"
1795
+ ],
1796
+ "properties": {
1797
+ "sessionRevision": {
1798
+ "type": "integer",
1799
+ "minimum": 0
1800
+ },
1801
+ "viewRevision": {
1802
+ "type": "integer",
1803
+ "minimum": 0
1804
+ },
1805
+ "controlRevision": {
1806
+ "type": "integer",
1807
+ "minimum": 0
1808
+ },
1809
+ "project": {
1810
+ "oneOf": [
1811
+ {
1812
+ "$ref": "#/$defs/runtimeProjectSnapshot"
1813
+ },
1814
+ {
1815
+ "type": "null"
1816
+ }
1817
+ ]
1818
+ },
1819
+ "diagnostics": {
1820
+ "type": "array",
1821
+ "items": {
1822
+ "$ref": "#/$defs/runtimeDiagnostic"
1823
+ }
1824
+ },
1825
+ "plan": {
1826
+ "oneOf": [
1827
+ {
1828
+ "type": "object"
1829
+ },
1830
+ {
1831
+ "type": "null"
1832
+ }
1833
+ ]
1834
+ }
1835
+ },
1836
+ "additionalProperties": false
1837
+ },
1838
+ "runtimeMutationRequest": {
1839
+ "type": "object",
1840
+ "properties": {
1841
+ "graphPatch": {
1842
+ "$ref": "https://skenion.dev/schemas/graph/v0.1/patch.schema.json"
1843
+ },
1844
+ "viewPatch": {
1845
+ "$ref": "#/$defs/runtimeViewPatch"
1846
+ },
1847
+ "clientId": {
1848
+ "type": "string",
1849
+ "minLength": 1
1850
+ },
1851
+ "description": {
1852
+ "type": "string"
1853
+ }
1854
+ },
1855
+ "additionalProperties": false
1856
+ },
1857
+ "runtimeViewPatch": {
1858
+ "type": "object",
1859
+ "required": [
1860
+ "baseViewRevision",
1861
+ "ops"
1862
+ ],
1863
+ "properties": {
1864
+ "baseViewRevision": {
1865
+ "type": "integer",
1866
+ "minimum": 0
1867
+ },
1868
+ "ops": {
1869
+ "type": "array",
1870
+ "items": {
1871
+ "oneOf": [
1872
+ {
1873
+ "$ref": "#/$defs/runtimeSetNodeViewOperation"
1874
+ },
1875
+ {
1876
+ "$ref": "#/$defs/runtimeMoveNodeViewOperation"
1877
+ }
1878
+ ]
1879
+ }
1880
+ }
1881
+ },
1882
+ "additionalProperties": false
1883
+ },
1884
+ "runtimeSetNodeViewOperation": {
1885
+ "type": "object",
1886
+ "required": [
1887
+ "op",
1888
+ "nodeId",
1889
+ "view"
1890
+ ],
1891
+ "properties": {
1892
+ "op": {
1893
+ "const": "setNodeView"
1894
+ },
1895
+ "nodeId": {
1896
+ "type": "string",
1897
+ "minLength": 1
1898
+ },
1899
+ "view": {
1900
+ "$ref": "#/$defs/runtimeCanvasNodeView"
1901
+ }
1902
+ },
1903
+ "additionalProperties": false
1904
+ },
1905
+ "runtimeMoveNodeViewOperation": {
1906
+ "type": "object",
1907
+ "required": [
1908
+ "op",
1909
+ "nodeId",
1910
+ "to"
1911
+ ],
1912
+ "properties": {
1913
+ "op": {
1914
+ "const": "moveNodeView"
1915
+ },
1916
+ "nodeId": {
1917
+ "type": "string",
1918
+ "minLength": 1
1919
+ },
1920
+ "from": {
1921
+ "$ref": "#/$defs/runtimeCanvasNodeView"
1922
+ },
1923
+ "to": {
1924
+ "$ref": "#/$defs/runtimeCanvasNodeView"
1925
+ }
1926
+ },
1927
+ "additionalProperties": false
1928
+ },
1929
+ "runtimeCanvasNodeView": {
1930
+ "type": "object",
1931
+ "required": [
1932
+ "x",
1933
+ "y"
1934
+ ],
1935
+ "properties": {
1936
+ "x": {
1937
+ "type": "number"
1938
+ },
1939
+ "y": {
1940
+ "type": "number"
1941
+ },
1942
+ "width": {
1943
+ "type": "number"
1944
+ },
1945
+ "height": {
1946
+ "type": "number"
1947
+ },
1948
+ "collapsed": {
1949
+ "type": "boolean"
1950
+ }
1951
+ },
1952
+ "additionalProperties": false
1953
+ },
1954
+ "runtimeHistoryEntry": {
1955
+ "type": "object",
1956
+ "required": [
1957
+ "id",
1958
+ "sequence",
1959
+ "kind",
1960
+ "mutation",
1961
+ "inverseMutation",
1962
+ "createdAt"
1963
+ ],
1964
+ "properties": {
1965
+ "id": {
1966
+ "type": "string",
1967
+ "minLength": 1
1968
+ },
1969
+ "sequence": {
1970
+ "type": "integer",
1971
+ "minimum": 1
1972
+ },
1973
+ "kind": {
1974
+ "enum": [
1975
+ "apply",
1976
+ "undo",
1977
+ "redo"
1978
+ ]
1979
+ },
1980
+ "mutation": {
1981
+ "$ref": "#/$defs/runtimeMutationRequest"
1982
+ },
1983
+ "inverseMutation": {
1984
+ "$ref": "#/$defs/runtimeMutationRequest"
1985
+ },
1986
+ "subjectEventId": {
1987
+ "type": "string",
1988
+ "minLength": 1
1989
+ },
1990
+ "clientId": {
1991
+ "type": "string",
1992
+ "minLength": 1
1993
+ },
1994
+ "description": {
1995
+ "type": "string"
1996
+ },
1997
+ "createdAt": {
1998
+ "type": "string",
1999
+ "minLength": 1
2000
+ }
2001
+ },
2002
+ "additionalProperties": false
2003
+ },
2004
+ "runtimeHistory": {
2005
+ "type": "object",
2006
+ "required": [
2007
+ "schema",
2008
+ "schemaVersion",
2009
+ "entries",
2010
+ "canUndo",
2011
+ "canRedo",
2012
+ "undoDepth",
2013
+ "redoDepth"
2014
+ ],
2015
+ "properties": {
2016
+ "schema": {
2017
+ "const": "skenion.runtime.history"
2018
+ },
2019
+ "schemaVersion": {
2020
+ "const": "0.1.0"
2021
+ },
2022
+ "entries": {
2023
+ "type": "array",
2024
+ "items": {
2025
+ "$ref": "#/$defs/runtimeHistoryEntry"
2026
+ }
2027
+ },
2028
+ "canUndo": {
2029
+ "type": "boolean"
2030
+ },
2031
+ "canRedo": {
2032
+ "type": "boolean"
2033
+ },
2034
+ "undoDepth": {
2035
+ "type": "integer",
2036
+ "minimum": 0
2037
+ },
2038
+ "redoDepth": {
2039
+ "type": "integer",
2040
+ "minimum": 0
2041
+ }
2042
+ },
2043
+ "additionalProperties": false
2044
+ },
2045
+ "runtimeEventReplayWindow": {
2046
+ "type": "object",
2047
+ "required": [
2048
+ "cursorKind",
2049
+ "currentCursor",
2050
+ "earliestSequence",
2051
+ "latestSequence",
2052
+ "replayLimit"
2053
+ ],
2054
+ "properties": {
2055
+ "cursorKind": {
2056
+ "const": "sequence"
2057
+ },
2058
+ "currentCursor": {
2059
+ "type": "string",
2060
+ "minLength": 1
2061
+ },
2062
+ "earliestSequence": {
2063
+ "type": "integer",
2064
+ "minimum": 1
2065
+ },
2066
+ "latestSequence": {
2067
+ "type": "integer",
2068
+ "minimum": 0
2069
+ },
2070
+ "replayLimit": {
2071
+ "oneOf": [
2072
+ {
2073
+ "type": "integer",
2074
+ "minimum": 0
2075
+ },
2076
+ {
2077
+ "type": "null"
2078
+ }
2079
+ ]
2080
+ },
2081
+ "overflow": {
2082
+ "type": "boolean"
2083
+ }
2084
+ },
2085
+ "additionalProperties": false
2086
+ },
2087
+ "runtimeSessionCapabilitySet": {
2088
+ "type": "object",
2089
+ "required": [
2090
+ "sessionAddressing",
2091
+ "defaultSessionAlias",
2092
+ "eventReplay",
2093
+ "multiWindow",
2094
+ "profiles",
2095
+ "authPolicy"
2096
+ ],
2097
+ "properties": {
2098
+ "sessionAddressing": {
2099
+ "type": "boolean"
2100
+ },
2101
+ "defaultSessionAlias": {
2102
+ "type": "boolean"
2103
+ },
2104
+ "eventReplay": {
2105
+ "type": "boolean"
2106
+ },
2107
+ "multiWindow": {
2108
+ "type": "boolean"
2109
+ },
2110
+ "profiles": {
2111
+ "type": "array",
2112
+ "items": {
2113
+ "$ref": "#/$defs/runtimeConnectionProfileMode"
2114
+ }
2115
+ },
2116
+ "authPolicy": {
2117
+ "const": "deferred"
2118
+ }
2119
+ },
2120
+ "additionalProperties": false
2121
+ },
2122
+ "runtimeEventReplayGap": {
2123
+ "type": "object",
2124
+ "description": "Gap metadata reports a missed retained range. expectedSequence must be less than actualSequence.",
2125
+ "required": [
2126
+ "expectedSequence",
2127
+ "actualSequence",
2128
+ "reason"
2129
+ ],
2130
+ "properties": {
2131
+ "expectedSequence": {
2132
+ "type": "integer",
2133
+ "minimum": 1
2134
+ },
2135
+ "actualSequence": {
2136
+ "type": "integer",
2137
+ "minimum": 1
2138
+ },
2139
+ "reason": {
2140
+ "enum": [
2141
+ "retention-overflow",
2142
+ "stream-reset",
2143
+ "unknown"
2144
+ ]
2145
+ }
2146
+ },
2147
+ "additionalProperties": false
2148
+ },
2149
+ "runtimeEventReplayMetadata": {
2150
+ "type": "object",
2151
+ "required": [
2152
+ "cursor",
2153
+ "previousCursor",
2154
+ "replayed",
2155
+ "gap",
2156
+ "overflow"
2157
+ ],
2158
+ "properties": {
2159
+ "cursor": {
2160
+ "type": "string",
2161
+ "minLength": 1
2162
+ },
2163
+ "previousCursor": {
2164
+ "oneOf": [
2165
+ {
2166
+ "type": "string",
2167
+ "minLength": 1
2168
+ },
2169
+ {
2170
+ "type": "null"
2171
+ }
2172
+ ]
2173
+ },
2174
+ "replayed": {
2175
+ "type": "boolean"
2176
+ },
2177
+ "gap": {
2178
+ "oneOf": [
2179
+ {
2180
+ "$ref": "#/$defs/runtimeEventReplayGap"
2181
+ },
2182
+ {
2183
+ "type": "null"
2184
+ }
2185
+ ]
2186
+ },
2187
+ "overflow": {
2188
+ "type": "boolean"
2189
+ }
2190
+ },
2191
+ "additionalProperties": false
2192
+ },
2193
+ "runtimeSessionEventKind": {
2194
+ "enum": [
2195
+ "snapshot",
2196
+ "load",
2197
+ "clear",
2198
+ "mutate",
2199
+ "undo",
2200
+ "redo"
2201
+ ]
2202
+ },
2203
+ "runtimeSessionEvent": {
2204
+ "type": "object",
2205
+ "required": [
2206
+ "schema",
2207
+ "schemaVersion",
2208
+ "id",
2209
+ "sessionId",
2210
+ "sequence",
2211
+ "sessionRevision",
2212
+ "kind",
2213
+ "snapshot",
2214
+ "history",
2215
+ "replay",
2216
+ "diagnostics",
2217
+ "createdAt"
2218
+ ],
2219
+ "properties": {
2220
+ "schema": {
2221
+ "const": "skenion.runtime.session.event"
2222
+ },
2223
+ "schemaVersion": {
2224
+ "const": "0.1.0"
2225
+ },
2226
+ "id": {
2227
+ "type": "string",
2228
+ "minLength": 1
2229
+ },
2230
+ "sessionId": {
2231
+ "type": "string",
2232
+ "minLength": 1
2233
+ },
2234
+ "sequence": {
2235
+ "type": "integer",
2236
+ "minimum": 1
2237
+ },
2238
+ "sessionRevision": {
2239
+ "type": "integer",
2240
+ "minimum": 0
2241
+ },
2242
+ "kind": {
2243
+ "$ref": "#/$defs/runtimeSessionEventKind"
2244
+ },
2245
+ "snapshot": {
2246
+ "$ref": "#/$defs/runtimeSessionSnapshot"
2247
+ },
2248
+ "history": {
2249
+ "$ref": "#/$defs/runtimeHistory"
2250
+ },
2251
+ "mutation": {
2252
+ "$ref": "#/$defs/runtimeHistoryEntry"
2253
+ },
2254
+ "replay": {
2255
+ "$ref": "#/$defs/runtimeEventReplayMetadata"
2256
+ },
2257
+ "diagnostics": {
2258
+ "type": "array",
2259
+ "items": {
2260
+ "$ref": "#/$defs/runtimeDiagnostic"
2261
+ }
2262
+ },
2263
+ "createdAt": {
2264
+ "type": "string",
2265
+ "minLength": 1
2266
+ }
2267
+ },
2268
+ "additionalProperties": false
2269
+ }
2270
+ }
2271
+ };
911
2272
  export const graphPatchV01Schema = {
912
2273
  "$schema": "https://json-schema.org/draft/2020-12/schema",
913
2274
  "$id": "https://skenion.dev/schemas/graph/v0.1/patch.schema.json",