@toolproof-npm/schema 0.1.79 → 0.1.81

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.
@@ -374,6 +374,46 @@
374
374
  "$anchor": "ForStepIdentity",
375
375
  "pattern": "^FORSTEP-.+$"
376
376
  },
377
+ "GraphEndRunEvent": {
378
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
379
+ "allOf": [
380
+ {
381
+ "$ref": "#/$defs/RunEventBase"
382
+ },
383
+ {
384
+ "type": "object",
385
+ "properties": {
386
+ "kind": {
387
+ "const": "graph_end"
388
+ }
389
+ }
390
+ }
391
+ ],
392
+ "$anchor": "GraphEndRunEvent"
393
+ },
394
+ "GraphStartRunEvent": {
395
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
396
+ "allOf": [
397
+ {
398
+ "$ref": "#/$defs/RunEventBase"
399
+ },
400
+ {
401
+ "type": "object",
402
+ "properties": {
403
+ "kind": {
404
+ "const": "graph_start"
405
+ },
406
+ "strategyRunSeed": {
407
+ "$ref": "#/$defs/StrategyRun"
408
+ }
409
+ },
410
+ "required": [
411
+ "strategyRunSeed"
412
+ ]
413
+ }
414
+ ],
415
+ "$anchor": "GraphStartRunEvent"
416
+ },
377
417
  "IdentityProp": {
378
418
  "$schema": "https://json-schema.org/draft/2020-12/schema",
379
419
  "type": "object",
@@ -585,6 +625,23 @@
585
625
  "additionalProperties": false,
586
626
  "$anchor": "IdentitySchemaRef"
587
627
  },
628
+ "InterruptRunEvent": {
629
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
630
+ "allOf": [
631
+ {
632
+ "$ref": "#/$defs/RunEventBase"
633
+ },
634
+ {
635
+ "type": "object",
636
+ "properties": {
637
+ "kind": {
638
+ "const": "interrupt"
639
+ }
640
+ }
641
+ }
642
+ ],
643
+ "$anchor": "InterruptRunEvent"
644
+ },
588
645
  "Job": {
589
646
  "$schema": "https://json-schema.org/draft/2020-12/schema",
590
647
  "type": "object",
@@ -1279,6 +1336,206 @@
1279
1336
  ],
1280
1337
  "$anchor": "RolesWrapper"
1281
1338
  },
1339
+ "RunEvent": {
1340
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1341
+ "oneOf": [
1342
+ {
1343
+ "$ref": "#/$defs/GraphStartRunEvent"
1344
+ },
1345
+ {
1346
+ "$ref": "#/$defs/TickRunEvent"
1347
+ },
1348
+ {
1349
+ "$ref": "#/$defs/InterruptRunEvent"
1350
+ },
1351
+ {
1352
+ "$ref": "#/$defs/GraphEndRunEvent"
1353
+ }
1354
+ ],
1355
+ "$anchor": "RunEvent"
1356
+ },
1357
+ "RunEventBase": {
1358
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1359
+ "type": "object",
1360
+ "properties": {
1361
+ "counters": {
1362
+ "$ref": "#/$defs/RunEventCounters"
1363
+ },
1364
+ "createdAt": {
1365
+ "$ref": "#/$defs/Timestamp"
1366
+ },
1367
+ "eventSeq": {
1368
+ "type": "integer"
1369
+ },
1370
+ "kind": {
1371
+ "$ref": "#/$defs/RunEventKind"
1372
+ },
1373
+ "nodeName": {
1374
+ "type": "string"
1375
+ },
1376
+ "stepMetaData": {
1377
+ "$ref": "#/$defs/RunEventStepMetaData"
1378
+ },
1379
+ "strategyRunRef": {
1380
+ "$ref": "#/$defs/StrategyRunIdentity"
1381
+ },
1382
+ "strategyThreadRef": {
1383
+ "$ref": "#/$defs/StrategyThreadIdentity"
1384
+ },
1385
+ "updates": {
1386
+ "$ref": "#/$defs/RunEventUpdates"
1387
+ }
1388
+ },
1389
+ "required": [
1390
+ "kind",
1391
+ "strategyRunRef",
1392
+ "strategyThreadRef",
1393
+ "createdAt",
1394
+ "nodeName",
1395
+ "eventSeq"
1396
+ ],
1397
+ "$anchor": "RunEventBase"
1398
+ },
1399
+ "RunEventCounters": {
1400
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1401
+ "type": "object",
1402
+ "properties": {
1403
+ "iterationCounterAfter": {
1404
+ "type": "integer"
1405
+ },
1406
+ "stepCounterAfter": {
1407
+ "type": "integer"
1408
+ }
1409
+ },
1410
+ "$anchor": "RunEventCounters"
1411
+ },
1412
+ "RunEventKind": {
1413
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1414
+ "type": "string",
1415
+ "$anchor": "RunEventKind",
1416
+ "enum": [
1417
+ "graph_start",
1418
+ "tick",
1419
+ "interrupt",
1420
+ "graph_end"
1421
+ ]
1422
+ },
1423
+ "RunEventStepKind": {
1424
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1425
+ "type": "string",
1426
+ "$anchor": "RunEventStepKind",
1427
+ "enum": [
1428
+ "work",
1429
+ "branch",
1430
+ "while",
1431
+ "for"
1432
+ ]
1433
+ },
1434
+ "RunEventStepMetaData": {
1435
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1436
+ "type": "object",
1437
+ "properties": {
1438
+ "executionRef": {
1439
+ "$ref": "#/$defs/ExecutionIdentity"
1440
+ },
1441
+ "jobRef": {
1442
+ "$ref": "#/$defs/JobIdentity"
1443
+ },
1444
+ "stepKind": {
1445
+ "$ref": "#/$defs/RunEventStepKind"
1446
+ },
1447
+ "stepRef": {
1448
+ "oneOf": [
1449
+ {
1450
+ "$ref": "#/$defs/WorkStepIdentity"
1451
+ },
1452
+ {
1453
+ "$ref": "#/$defs/BranchStepIdentity"
1454
+ },
1455
+ {
1456
+ "$ref": "#/$defs/WhileStepIdentity"
1457
+ },
1458
+ {
1459
+ "$ref": "#/$defs/ForStepIdentity"
1460
+ }
1461
+ ]
1462
+ },
1463
+ "threadStepIndex": {
1464
+ "type": "integer"
1465
+ }
1466
+ },
1467
+ "required": [
1468
+ "stepRef",
1469
+ "stepKind",
1470
+ "threadStepIndex"
1471
+ ],
1472
+ "$anchor": "RunEventStepMetaData"
1473
+ },
1474
+ "RunEventUpdates": {
1475
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1476
+ "type": "object",
1477
+ "allOf": [
1478
+ {
1479
+ "$ref": "#/$defs/StrategyStateDelta"
1480
+ }
1481
+ ],
1482
+ "properties": {
1483
+ "interruptData": {
1484
+ "type": [
1485
+ "object",
1486
+ "null"
1487
+ ],
1488
+ "$comment": "Kept permissive; the engine may evolve interrupt payloads."
1489
+ },
1490
+ "stepsMutation": {
1491
+ "type": "object",
1492
+ "properties": {
1493
+ "insertAt": {
1494
+ "type": "integer"
1495
+ },
1496
+ "inserted": {
1497
+ "type": "array",
1498
+ "items": {
1499
+ "$ref": "#/$defs/Step"
1500
+ }
1501
+ }
1502
+ },
1503
+ "required": [
1504
+ "insertAt",
1505
+ "inserted"
1506
+ ]
1507
+ }
1508
+ },
1509
+ "$anchor": "RunEventUpdates"
1510
+ },
1511
+ "RunRecording": {
1512
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1513
+ "type": "object",
1514
+ "properties": {
1515
+ "recordedAt": {
1516
+ "$comment": "Optional recording timestamp.",
1517
+ "$ref": "#/$defs/Timestamp"
1518
+ },
1519
+ "runEvents": {
1520
+ "type": "array",
1521
+ "items": {
1522
+ "$ref": "#/$defs/RunEvent"
1523
+ }
1524
+ },
1525
+ "strategyRunRef": {
1526
+ "$comment": "Optional; derived from the first event but useful for indexing.",
1527
+ "$ref": "#/$defs/StrategyRunIdentity"
1528
+ },
1529
+ "strategyThreadRef": {
1530
+ "$comment": "Optional; derived from the first event but useful for indexing.",
1531
+ "$ref": "#/$defs/StrategyThreadIdentity"
1532
+ }
1533
+ },
1534
+ "required": [
1535
+ "runEvents"
1536
+ ],
1537
+ "$anchor": "RunRecording"
1538
+ },
1282
1539
  "StatefulStrategy": {
1283
1540
  "$schema": "https://json-schema.org/draft/2020-12/schema",
1284
1541
  "type": "object",
@@ -1461,6 +1718,11 @@
1461
1718
  "StrategyRunUpdate": {
1462
1719
  "$schema": "https://json-schema.org/draft/2020-12/schema",
1463
1720
  "type": "object",
1721
+ "allOf": [
1722
+ {
1723
+ "$ref": "#/$defs/StrategyStateDelta"
1724
+ }
1725
+ ],
1464
1726
  "properties": {
1465
1727
  "strategyRun": {
1466
1728
  "$comment": "Optional embedded snapshot; strategyRunRef remains the canonical pointer.",
@@ -1468,7 +1730,30 @@
1468
1730
  },
1469
1731
  "strategyRunRef": {
1470
1732
  "$ref": "#/$defs/StrategyRunIdentity"
1471
- },
1733
+ }
1734
+ },
1735
+ "required": [
1736
+ "strategyRunRef",
1737
+ "strategyStateUpdate"
1738
+ ],
1739
+ "unevaluatedProperties": false,
1740
+ "$anchor": "StrategyRunUpdate"
1741
+ },
1742
+ "StrategyState": {
1743
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1744
+ "type": "object",
1745
+ "additionalProperties": {
1746
+ "$ref": "#/$defs/ExecutionSocket"
1747
+ },
1748
+ "$anchor": "StrategyState",
1749
+ "propertyNames": {
1750
+ "$ref": "#/$defs/ExecutionIdentity"
1751
+ }
1752
+ },
1753
+ "StrategyStateDelta": {
1754
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1755
+ "type": "object",
1756
+ "properties": {
1472
1757
  "strategyStateUpdate": {
1473
1758
  "type": "object",
1474
1759
  "additionalProperties": {
@@ -1490,23 +1775,8 @@
1490
1775
  }
1491
1776
  }
1492
1777
  },
1493
- "required": [
1494
- "strategyRunRef",
1495
- "strategyStateUpdate"
1496
- ],
1497
- "unevaluatedProperties": false,
1498
- "$anchor": "StrategyRunUpdate"
1499
- },
1500
- "StrategyState": {
1501
- "$schema": "https://json-schema.org/draft/2020-12/schema",
1502
- "type": "object",
1503
- "additionalProperties": {
1504
- "$ref": "#/$defs/ExecutionSocket"
1505
- },
1506
- "$anchor": "StrategyState",
1507
- "propertyNames": {
1508
- "$ref": "#/$defs/ExecutionIdentity"
1509
- }
1778
+ "$anchor": "StrategyStateDelta",
1779
+ "$comment": "Shared delta payload for strategy state updates; used both as standalone updates and embedded within run events."
1510
1780
  },
1511
1781
  "StrategyStateWrapper": {
1512
1782
  "$schema": "https://json-schema.org/draft/2020-12/schema",
@@ -1557,6 +1827,23 @@
1557
1827
  "unevaluatedProperties": false,
1558
1828
  "$anchor": "StrategyThreadMapWrapper"
1559
1829
  },
1830
+ "TickRunEvent": {
1831
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1832
+ "allOf": [
1833
+ {
1834
+ "$ref": "#/$defs/RunEventBase"
1835
+ },
1836
+ {
1837
+ "type": "object",
1838
+ "properties": {
1839
+ "kind": {
1840
+ "const": "tick"
1841
+ }
1842
+ }
1843
+ }
1844
+ ],
1845
+ "$anchor": "TickRunEvent"
1846
+ },
1560
1847
  "Timestamp": {
1561
1848
  "$schema": "https://json-schema.org/draft/2020-12/schema",
1562
1849
  "type": "object",
@@ -18,9 +18,12 @@ export type ResourceTypeGenesis = {
18
18
  "ExtractionSchemaWrapper": ResourceType;
19
19
  "ForStep": ResourceType;
20
20
  "ForStepIdentity": ResourceType;
21
+ "GraphEndRunEvent": ResourceType;
22
+ "GraphStartRunEvent": ResourceType;
21
23
  "IdentityProp": ResourceType;
22
24
  "IdentitySchema": ResourceType;
23
25
  "IdentitySchemaRef": ResourceType;
26
+ "InterruptRunEvent": ResourceType;
24
27
  "Job": ResourceType;
25
28
  "JobIdentity": ResourceType;
26
29
  "JsonData": ResourceType;
@@ -50,6 +53,14 @@ export type ResourceTypeGenesis = {
50
53
  "RoleMap": ResourceType;
51
54
  "Roles": ResourceType;
52
55
  "RolesWrapper": ResourceType;
56
+ "RunEvent": ResourceType;
57
+ "RunEventBase": ResourceType;
58
+ "RunEventCounters": ResourceType;
59
+ "RunEventKind": ResourceType;
60
+ "RunEventStepKind": ResourceType;
61
+ "RunEventStepMetaData": ResourceType;
62
+ "RunEventUpdates": ResourceType;
63
+ "RunRecording": ResourceType;
53
64
  "StatefulStrategy": ResourceType;
54
65
  "StatefulStrategyIdentity": ResourceType;
55
66
  "StatelessStrategy": ResourceType;
@@ -63,10 +74,12 @@ export type ResourceTypeGenesis = {
63
74
  "StrategyRunStatus": ResourceType;
64
75
  "StrategyRunUpdate": ResourceType;
65
76
  "StrategyState": ResourceType;
77
+ "StrategyStateDelta": ResourceType;
66
78
  "StrategyStateWrapper": ResourceType;
67
79
  "StrategyThreadIdentity": ResourceType;
68
80
  "StrategyThreadMap": ResourceType;
69
81
  "StrategyThreadMapWrapper": ResourceType;
82
+ "TickRunEvent": ResourceType;
70
83
  "Timestamp": ResourceType;
71
84
  "WhileStep": ResourceType;
72
85
  "WhileStepIdentity": ResourceType;