@toolproof-core/genesis 1.0.56 → 1.0.58

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.
Files changed (27) hide show
  1. package/dist/generated-src/declarations/resourceTypes.json +12 -3
  2. package/dist/generated-src/lookups/constants.d.ts +10 -24
  3. package/dist/generated-src/lookups/constants.js +10 -24
  4. package/dist/generated-src/schemas/schemas.json +57 -181
  5. package/dist/generated-src/schemas/standalone/Resource.json +2 -17
  6. package/dist/generated-src/schemas/standalone/Strategy.json +101 -215
  7. package/dist/generated-src/schemas/standalone/StrategyTrace.json +56 -97
  8. package/dist/generated-src/schemas/standalone/Suite.json +1 -2
  9. package/dist/generated-src/schemas/standalone/Tool.json +1 -2
  10. package/dist/generated-src/schemas/zod/Resource.js +1 -3
  11. package/dist/generated-src/schemas/zod/Strategy.d.ts +0 -6
  12. package/dist/generated-src/schemas/zod/Strategy.js +7 -27
  13. package/dist/generated-src/schemas/zod/StrategyTrace.d.ts +0 -6
  14. package/dist/generated-src/schemas/zod/StrategyTrace.js +16 -28
  15. package/dist/generated-src/timestampedResources/booleans.json +2 -2
  16. package/dist/generated-src/timestampedResources/naturals.json +11 -11
  17. package/dist/generated-src/timestampedResources/resourceTypes.json +22 -13
  18. package/dist/generated-src/timestampedResources/tools.json +15 -15
  19. package/dist/generated-src/types/types.d.ts +36 -119
  20. package/dist/src/index.d.ts +1 -1
  21. package/dist/src/utils/standaloneZodSchemas.js +6 -6
  22. package/dist/src/utils/timestampedResources.d.ts +1 -1
  23. package/dist/src/utils/timestampedResources.js +1 -1
  24. package/dist/src/utils/typeGenerationPostProcess.js +7 -37
  25. package/dist/src/utils/zodCodegen.d.ts +1 -1
  26. package/dist/src/utils/zodCodegen.js +7 -7
  27. package/package.json +1 -1
@@ -77,7 +77,7 @@
77
77
  },
78
78
  "AtomicTypeRef": {
79
79
  "$schema": "https://json-schema.org/draft/2020-12/schema",
80
- "$comment": "An atomic type reference is either resource-backed (resourceTypeHandle, strategy-legal) or schema-backed (roleSchema, internal/Core-only). The roleSchema branch holds an object whose $ref names the type parameter (e.g. '#OperandType'), matching an entry in the template's GenericAssignmentByRoleName.mapKeys. Exactly one atomic branch must be present.",
80
+ "$comment": "An atomic type reference is either ResourceType-backed (resourceTypeHandle, strategy-legal) or schema-backed (roleSchema, internal/Core-only). The roleSchema branch holds an object whose $ref names an internal schema-level type reference. In template Tools' instantiationRoleSpec, this may name a type parameter (for example '#OperandType') matching an entry in the template's GenericAssignmentByRoleName.mapKeys. In other contexts it may name a concrete internal schema definition (for example '#ToolStep'). Exactly one atomic branch must be present.",
81
81
  "oneOf": [
82
82
  {
83
83
  "type": "object",
@@ -102,7 +102,6 @@
102
102
  "required": [
103
103
  "$ref"
104
104
  ],
105
- "$comment": "A reference to a named type parameter. The $ref value must be '#' followed by a RoleName, matching a key in the template's GenericAssignmentByRoleName.mapKeys.",
106
105
  "properties": {
107
106
  "$ref": {
108
107
  "type": "string",
@@ -730,8 +729,7 @@
730
729
  "items": {
731
730
  "$ref": "#/$defs/Case"
732
731
  },
733
- "minItems": 1,
734
- "uniqueItems": true
732
+ "minItems": 1
735
733
  }
736
734
  },
737
735
  "allOf": [
@@ -1043,8 +1041,7 @@
1043
1041
  "type": "array",
1044
1042
  "items": {
1045
1043
  "$ref": "#/$defs/Step"
1046
- },
1047
- "uniqueItems": true
1044
+ }
1048
1045
  },
1049
1046
  "StepArrayArray": {
1050
1047
  "$schema": "https://json-schema.org/draft/2020-12/schema",
@@ -1070,10 +1067,10 @@
1070
1067
  "type": "string",
1071
1068
  "enum": [
1072
1069
  "self",
1073
- "case.when",
1074
- "case.what",
1075
- "cases.when",
1076
- "cases.what"
1070
+ "case/when",
1071
+ "case/what",
1072
+ "cases/when",
1073
+ "cases/what"
1077
1074
  ]
1078
1075
  },
1079
1076
  "ToolStepPathSlotFacet": {
@@ -1088,14 +1085,18 @@
1088
1085
  }
1089
1086
  }
1090
1087
  },
1091
- "BaseToolStepPathSpec": {
1088
+ "ToolStepPathSpec": {
1092
1089
  "$schema": "https://json-schema.org/draft/2020-12/schema",
1093
1090
  "type": "object",
1094
1091
  "required": [
1092
+ "threadIndex",
1095
1093
  "stepIndex",
1096
1094
  "toolStepPathSlot"
1097
1095
  ],
1098
1096
  "properties": {
1097
+ "threadIndex": {
1098
+ "$ref": "#/$defs/Natural"
1099
+ },
1099
1100
  "stepIndex": {
1100
1101
  "$ref": "#/$defs/Natural"
1101
1102
  },
@@ -1112,8 +1113,8 @@
1112
1113
  "properties": {
1113
1114
  "toolStepPathSlot": {
1114
1115
  "enum": [
1115
- "cases.when",
1116
- "cases.what"
1116
+ "cases/when",
1117
+ "cases/what"
1117
1118
  ]
1118
1119
  }
1119
1120
  }
@@ -1130,8 +1131,8 @@
1130
1131
  "toolStepPathSlot": {
1131
1132
  "enum": [
1132
1133
  "self",
1133
- "case.when",
1134
- "case.what"
1134
+ "case/when",
1135
+ "case/what"
1135
1136
  ]
1136
1137
  }
1137
1138
  }
@@ -1146,75 +1147,21 @@
1146
1147
  }
1147
1148
  ]
1148
1149
  },
1149
- "UnthreadedToolStepPathSpec": {
1150
- "$schema": "https://json-schema.org/draft/2020-12/schema",
1151
- "allOf": [
1152
- {
1153
- "$ref": "#/$defs/BaseToolStepPathSpec"
1154
- }
1155
- ],
1156
- "unevaluatedProperties": false
1157
- },
1158
- "ThreadedToolStepPathSpec": {
1159
- "$schema": "https://json-schema.org/draft/2020-12/schema",
1160
- "allOf": [
1161
- {
1162
- "$ref": "#/$defs/BaseToolStepPathSpec"
1163
- },
1164
- {
1165
- "type": "object",
1166
- "required": [
1167
- "threadIndex"
1168
- ],
1169
- "properties": {
1170
- "threadIndex": {
1171
- "$ref": "#/$defs/Natural"
1172
- }
1173
- }
1174
- }
1175
- ],
1176
- "unevaluatedProperties": false
1177
- },
1178
1150
  "ToolStepPath": {
1179
- "$schema": "https://json-schema.org/draft/2020-12/schema",
1180
- "oneOf": [
1181
- {
1182
- "$ref": "#/$defs/UnthreadedToolStepPath"
1183
- },
1184
- {
1185
- "$ref": "#/$defs/ThreadedToolStepPath"
1186
- }
1187
- ]
1188
- },
1189
- "UnthreadedToolStepPath": {
1190
- "type": "string",
1191
- "pattern": "^/steps/[0-9]+/(self|case/when|case/what|cases/[0-9]+/when|cases/[0-9]+/what)$"
1192
- },
1193
- "ThreadedToolStepPath": {
1194
1151
  "type": "string",
1195
1152
  "pattern": "^/threads/[0-9]+/steps/[0-9]+/(self|case/when|case/what|cases/[0-9]+/when|cases/[0-9]+/what)$"
1196
1153
  },
1197
- "UnthreadedStrategyState": {
1198
- "$schema": "https://json-schema.org/draft/2020-12/schema",
1199
- "type": "object",
1200
- "propertyNames": {
1201
- "$ref": "#/$defs/UnthreadedToolStepPath"
1202
- },
1203
- "additionalProperties": {
1204
- "$ref": "#/$defs/StrategyStateInputEntryByRoleName"
1205
- }
1206
- },
1207
- "ThreadedStrategyState": {
1154
+ "StrategyState": {
1208
1155
  "$schema": "https://json-schema.org/draft/2020-12/schema",
1209
1156
  "type": "object",
1210
1157
  "propertyNames": {
1211
- "$ref": "#/$defs/ThreadedToolStepPath"
1158
+ "$ref": "#/$defs/ToolStepPath"
1212
1159
  },
1213
1160
  "additionalProperties": {
1214
1161
  "$ref": "#/$defs/StrategyStateInputEntryByRoleName"
1215
1162
  }
1216
1163
  },
1217
- "UnthreadedStrategyStateFacet": {
1164
+ "StrategyStateFacet": {
1218
1165
  "$schema": "https://json-schema.org/draft/2020-12/schema",
1219
1166
  "type": "object",
1220
1167
  "required": [
@@ -1222,107 +1169,32 @@
1222
1169
  ],
1223
1170
  "properties": {
1224
1171
  "strategyState": {
1225
- "$ref": "#/$defs/UnthreadedStrategyState"
1172
+ "$ref": "#/$defs/StrategyState"
1226
1173
  }
1227
1174
  }
1228
1175
  },
1229
- "ThreadedStrategyStateFacet": {
1230
- "$schema": "https://json-schema.org/draft/2020-12/schema",
1231
- "type": "object",
1232
- "required": [
1233
- "strategyState"
1234
- ],
1235
- "properties": {
1236
- "strategyState": {
1237
- "$ref": "#/$defs/ThreadedStrategyState"
1238
- }
1239
- }
1240
- },
1241
- "StrategyKind": {
1242
- "$schema": "https://json-schema.org/draft/2020-12/schema",
1243
- "type": "string",
1244
- "enum": [
1245
- "unthreaded",
1246
- "threaded"
1247
- ]
1248
- },
1249
1176
  "StrategyHandle": {
1250
1177
  "$schema": "https://json-schema.org/draft/2020-12/schema",
1251
1178
  "type": "string",
1252
1179
  "pattern": "^STRATEGY-.+$"
1253
1180
  },
1254
- "BaseStrategy": {
1181
+ "Strategy": {
1255
1182
  "$schema": "https://json-schema.org/draft/2020-12/schema",
1256
1183
  "type": "object",
1257
1184
  "required": [
1258
- "handle",
1259
- "strategyKind"
1185
+ "handle"
1260
1186
  ],
1261
1187
  "properties": {
1262
1188
  "handle": {
1263
1189
  "$ref": "#/$defs/StrategyHandle"
1264
- },
1265
- "strategyKind": {
1266
- "$ref": "#/$defs/StrategyKind"
1267
- }
1268
- }
1269
- },
1270
- "UnthreadedStrategy": {
1271
- "$schema": "https://json-schema.org/draft/2020-12/schema",
1272
- "type": "object",
1273
- "allOf": [
1274
- {
1275
- "$ref": "#/$defs/BaseStrategy"
1276
- },
1277
- {
1278
- "type": "object",
1279
- "properties": {
1280
- "strategyKind": {
1281
- "const": "unthreaded"
1282
- }
1283
- }
1284
- },
1285
- {
1286
- "$ref": "#/$defs/StepsFacet"
1287
- },
1288
- {
1289
- "$ref": "#/$defs/UnthreadedStrategyStateFacet"
1290
1190
  }
1291
- ],
1292
- "unevaluatedProperties": false
1293
- },
1294
- "ThreadedStrategy": {
1295
- "$schema": "https://json-schema.org/draft/2020-12/schema",
1296
- "type": "object",
1191
+ },
1297
1192
  "allOf": [
1298
- {
1299
- "$ref": "#/$defs/BaseStrategy"
1300
- },
1301
- {
1302
- "type": "object",
1303
- "properties": {
1304
- "strategyKind": {
1305
- "const": "threaded"
1306
- }
1307
- }
1308
- },
1309
1193
  {
1310
1194
  "$ref": "#/$defs/StepsByThreadIndexFacet"
1311
1195
  },
1312
1196
  {
1313
- "$ref": "#/$defs/ThreadedStrategyStateFacet"
1314
- }
1315
- ],
1316
- "unevaluatedProperties": false
1317
- },
1318
- "Strategy": {
1319
- "$schema": "https://json-schema.org/draft/2020-12/schema",
1320
- "oneOf": [
1321
- {
1322
- "$ref": "#/$defs/UnthreadedStrategy"
1323
- },
1324
- {
1325
- "$ref": "#/$defs/ThreadedStrategy"
1197
+ "$ref": "#/$defs/StrategyStateFacet"
1326
1198
  }
1327
1199
  ]
1328
1200
  },
@@ -1370,10 +1242,10 @@
1370
1242
  }
1371
1243
  },
1372
1244
  "strategyStateDelta": {
1373
- "$ref": "#/$defs/ThreadedStrategyState"
1245
+ "$ref": "#/$defs/StrategyState"
1374
1246
  },
1375
- "interruptData": {
1376
- "$comment": "Kept permissive; the engine may evolve interrupt payloads.",
1247
+ "suspendedData": {
1248
+ "$comment": "Kept permissive; the engine may evolve suspended payloads.",
1377
1249
  "type": [
1378
1250
  "object",
1379
1251
  "null"
@@ -1385,10 +1257,10 @@
1385
1257
  "$schema": "https://json-schema.org/draft/2020-12/schema",
1386
1258
  "type": "string",
1387
1259
  "enum": [
1388
- "graph_start",
1260
+ "strategy_start",
1389
1261
  "tick",
1390
- "interrupt",
1391
- "graph_end"
1262
+ "suspended",
1263
+ "strategy_end"
1392
1264
  ]
1393
1265
  },
1394
1266
  "BaseTracePoint": {
@@ -1397,7 +1269,6 @@
1397
1269
  "required": [
1398
1270
  "tracePointKind",
1399
1271
  "strategyHandle",
1400
- "threadIndex",
1401
1272
  "tracePointIndex"
1402
1273
  ],
1403
1274
  "properties": {
@@ -1407,27 +1278,24 @@
1407
1278
  "strategyHandle": {
1408
1279
  "$ref": "#/$defs/StrategyHandle"
1409
1280
  },
1410
- "threadIndex": {
1411
- "$ref": "#/$defs/Natural"
1412
- },
1413
1281
  "tracePointIndex": {
1414
1282
  "$ref": "#/$defs/Natural"
1415
1283
  }
1416
1284
  }
1417
1285
  },
1418
- "ThreadedStrategyFacet": {
1286
+ "StrategyFacet": {
1419
1287
  "$schema": "https://json-schema.org/draft/2020-12/schema",
1420
1288
  "type": "object",
1421
1289
  "required": [
1422
- "threadedStrategy"
1290
+ "strategy"
1423
1291
  ],
1424
1292
  "properties": {
1425
- "threadedStrategy": {
1426
- "$ref": "#/$defs/ThreadedStrategy"
1293
+ "strategy": {
1294
+ "$ref": "#/$defs/Strategy"
1427
1295
  }
1428
1296
  }
1429
1297
  },
1430
- "GraphStartTracePoint": {
1298
+ "StrategyStartTracePoint": {
1431
1299
  "$schema": "https://json-schema.org/draft/2020-12/schema",
1432
1300
  "allOf": [
1433
1301
  {
@@ -1437,12 +1305,12 @@
1437
1305
  "type": "object",
1438
1306
  "properties": {
1439
1307
  "tracePointKind": {
1440
- "const": "graph_start"
1308
+ "const": "strategy_start"
1441
1309
  }
1442
1310
  }
1443
1311
  },
1444
1312
  {
1445
- "$ref": "#/$defs/ThreadedStrategyFacet"
1313
+ "$ref": "#/$defs/StrategyFacet"
1446
1314
  }
1447
1315
  ]
1448
1316
  },
@@ -1456,6 +1324,7 @@
1456
1324
  "type": "object",
1457
1325
  "required": [
1458
1326
  "counterSnapshot",
1327
+ "threadIndex",
1459
1328
  "toolStepPath",
1460
1329
  "delta"
1461
1330
  ],
@@ -1466,8 +1335,11 @@
1466
1335
  "counterSnapshot": {
1467
1336
  "$ref": "#/$defs/TracePointCounterSnapshot"
1468
1337
  },
1338
+ "threadIndex": {
1339
+ "$ref": "#/$defs/Natural"
1340
+ },
1469
1341
  "toolStepPath": {
1470
- "$ref": "#/$defs/ThreadedToolStepPath"
1342
+ "$ref": "#/$defs/ToolStepPath"
1471
1343
  },
1472
1344
  "delta": {
1473
1345
  "$ref": "#/$defs/TracePointDelta"
@@ -1476,7 +1348,7 @@
1476
1348
  }
1477
1349
  ]
1478
1350
  },
1479
- "InterruptTracePoint": {
1351
+ "SuspendedTracePoint": {
1480
1352
  "$schema": "https://json-schema.org/draft/2020-12/schema",
1481
1353
  "allOf": [
1482
1354
  {
@@ -1486,18 +1358,22 @@
1486
1358
  "type": "object",
1487
1359
  "required": [
1488
1360
  "counterSnapshot",
1361
+ "threadIndex",
1489
1362
  "toolStepPath",
1490
1363
  "delta"
1491
1364
  ],
1492
1365
  "properties": {
1493
1366
  "tracePointKind": {
1494
- "const": "interrupt"
1367
+ "const": "suspended"
1495
1368
  },
1496
1369
  "counterSnapshot": {
1497
1370
  "$ref": "#/$defs/TracePointCounterSnapshot"
1498
1371
  },
1372
+ "threadIndex": {
1373
+ "$ref": "#/$defs/Natural"
1374
+ },
1499
1375
  "toolStepPath": {
1500
- "$ref": "#/$defs/ThreadedToolStepPath"
1376
+ "$ref": "#/$defs/ToolStepPath"
1501
1377
  },
1502
1378
  "delta": {
1503
1379
  "allOf": [
@@ -1507,11 +1383,11 @@
1507
1383
  {
1508
1384
  "type": "object",
1509
1385
  "required": [
1510
- "interruptData"
1386
+ "suspendedData"
1511
1387
  ],
1512
1388
  "properties": {
1513
- "interruptData": {
1514
- "$comment": "Interrupt events must include a non-null interrupt payload.",
1389
+ "suspendedData": {
1390
+ "$comment": "Suspended events must include a non-null suspended payload.",
1515
1391
  "type": "object"
1516
1392
  }
1517
1393
  }
@@ -1522,7 +1398,7 @@
1522
1398
  }
1523
1399
  ]
1524
1400
  },
1525
- "GraphEndTracePoint": {
1401
+ "StrategyEndTracePoint": {
1526
1402
  "$schema": "https://json-schema.org/draft/2020-12/schema",
1527
1403
  "allOf": [
1528
1404
  {
@@ -1532,7 +1408,7 @@
1532
1408
  "type": "object",
1533
1409
  "properties": {
1534
1410
  "tracePointKind": {
1535
- "const": "graph_end"
1411
+ "const": "strategy_end"
1536
1412
  }
1537
1413
  }
1538
1414
  }
@@ -1543,16 +1419,16 @@
1543
1419
  "type": "object",
1544
1420
  "oneOf": [
1545
1421
  {
1546
- "$ref": "#/$defs/GraphStartTracePoint"
1422
+ "$ref": "#/$defs/StrategyStartTracePoint"
1547
1423
  },
1548
1424
  {
1549
1425
  "$ref": "#/$defs/TickTracePoint"
1550
1426
  },
1551
1427
  {
1552
- "$ref": "#/$defs/InterruptTracePoint"
1428
+ "$ref": "#/$defs/SuspendedTracePoint"
1553
1429
  },
1554
1430
  {
1555
- "$ref": "#/$defs/GraphEndTracePoint"
1431
+ "$ref": "#/$defs/StrategyEndTracePoint"
1556
1432
  }
1557
1433
  ]
1558
1434
  },
@@ -152,15 +152,8 @@
152
152
  "$ref": "#/$defs/Name"
153
153
  },
154
154
  "ToolStepPath": {
155
- "$schema": "https://json-schema.org/draft/2020-12/schema",
156
- "oneOf": [
157
- {
158
- "$ref": "#/$defs/UnthreadedToolStepPath"
159
- },
160
- {
161
- "$ref": "#/$defs/ThreadedToolStepPath"
162
- }
163
- ]
155
+ "type": "string",
156
+ "pattern": "^/threads/[0-9]+/steps/[0-9]+/(self|case/when|case/what|cases/[0-9]+/when|cases/[0-9]+/what)$"
164
157
  },
165
158
  "Name": {
166
159
  "$schema": "https://json-schema.org/draft/2020-12/schema",
@@ -169,14 +162,6 @@
169
162
  "pattern": "^[A-Z][a-zA-Z0-9]*$",
170
163
  "$comment": "Validation is intercepted by an AI Agent that verifies the name against Toolproof's naming conventions.",
171
164
  "semanticValidation": "Ajv custom keyword to verify name."
172
- },
173
- "UnthreadedToolStepPath": {
174
- "type": "string",
175
- "pattern": "^/steps/[0-9]+/(self|case/when|case/what|cases/[0-9]+/when|cases/[0-9]+/what)$"
176
- },
177
- "ThreadedToolStepPath": {
178
- "type": "string",
179
- "pattern": "^/threads/[0-9]+/steps/[0-9]+/(self|case/when|case/what|cases/[0-9]+/when|cases/[0-9]+/what)$"
180
165
  }
181
166
  }
182
167
  }