@toolproof-npm/schema 0.1.60 → 0.1.62

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.
@@ -856,10 +856,15 @@
856
856
  "properties": {
857
857
  "identity": {
858
858
  "$ref": "#/$defs/ResourceFormatIdentity"
859
+ },
860
+ "recognizerUri": {
861
+ "type": "string",
862
+ "format": "uri"
859
863
  }
860
864
  },
861
865
  "required": [
862
- "identity"
866
+ "identity",
867
+ "recognizerUri"
863
868
  ],
864
869
  "$anchor": "ResourceFormat"
865
870
  },
@@ -1186,6 +1191,9 @@
1186
1191
  "$schema": "https://json-schema.org/draft/2020-12/schema",
1187
1192
  "type": "object",
1188
1193
  "allOf": [
1194
+ {
1195
+ "$ref": "#/$defs/StatelessStrategyWrapper"
1196
+ },
1189
1197
  {
1190
1198
  "$ref": "#/$defs/StrategyStateWrapper"
1191
1199
  }
@@ -1193,14 +1201,10 @@
1193
1201
  "properties": {
1194
1202
  "identity": {
1195
1203
  "$ref": "#/$defs/StatefulStrategyIdentity"
1196
- },
1197
- "statelessStrategy": {
1198
- "$ref": "#/$defs/StatelessStrategy"
1199
1204
  }
1200
1205
  },
1201
1206
  "required": [
1202
- "identity",
1203
- "statelessStrategy"
1207
+ "identity"
1204
1208
  ],
1205
1209
  "$anchor": "StatefulStrategy"
1206
1210
  },
@@ -1210,6 +1214,19 @@
1210
1214
  "$anchor": "StatefulStrategyIdentity",
1211
1215
  "pattern": "^STATEFUL_STRATEGY-.+$"
1212
1216
  },
1217
+ "StatefulStrategyWrapper": {
1218
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1219
+ "type": "object",
1220
+ "properties": {
1221
+ "statefulStrategy": {
1222
+ "$ref": "#/$defs/StatefulStrategy"
1223
+ }
1224
+ },
1225
+ "required": [
1226
+ "statefulStrategy"
1227
+ ],
1228
+ "$anchor": "StatefulStrategyWrapper"
1229
+ },
1213
1230
  "StatelessStrategy": {
1214
1231
  "$schema": "https://json-schema.org/draft/2020-12/schema",
1215
1232
  "type": "object",
@@ -1238,6 +1255,19 @@
1238
1255
  "$anchor": "StatelessStrategyIdentity",
1239
1256
  "pattern": "^STATELESS_STRATEGY-.+$"
1240
1257
  },
1258
+ "StatelessStrategyWrapper": {
1259
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1260
+ "type": "object",
1261
+ "properties": {
1262
+ "statelessStrategy": {
1263
+ "$ref": "#/$defs/StatelessStrategy"
1264
+ }
1265
+ },
1266
+ "required": [
1267
+ "statelessStrategy"
1268
+ ],
1269
+ "$anchor": "StatelessStrategyWrapper"
1270
+ },
1241
1271
  "Step": {
1242
1272
  "$schema": "https://json-schema.org/draft/2020-12/schema",
1243
1273
  "type": "object",
@@ -1277,6 +1307,76 @@
1277
1307
  ],
1278
1308
  "$anchor": "StepKind"
1279
1309
  },
1310
+ "StrategyRun": {
1311
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1312
+ "type": "object",
1313
+ "allOf": [
1314
+ {
1315
+ "$comment": "The Engine will convert the statelessStrategy.steps array of the referenced StatefulStrategy into this map before the run. This is to allow jobs that do not depend on previous-step inputs to run in parallel.The Engine will also inject internal steps to prompt for runtime-provided inputs and handle other orchestration tasks such as repeted steps when encountering a loop.",
1316
+ "$ref": "#/$defs/StrategyThreadMap"
1317
+ },
1318
+ {
1319
+ "$comment": "Reusing StrategyStateWrapper to include the strategy state in the StrategyRun. The Engine will update it with materialized Resources (i.e. runtime-provided inputs and job-created outputs) during the run.",
1320
+ "$ref": "#/$defs/StrategyStateWrapper"
1321
+ }
1322
+ ],
1323
+ "properties": {
1324
+ "identity": {
1325
+ "$ref": "#/$defs/StrategyRunIdentity"
1326
+ },
1327
+ "statefulStrategyRef": {
1328
+ "$ref": "#/$defs/StatefulStrategyIdentity"
1329
+ },
1330
+ "strategyRunContext": {
1331
+ "$ref": "#/$defs/StrategyRunContext"
1332
+ }
1333
+ },
1334
+ "required": [
1335
+ "identity",
1336
+ "statefulStrategyRef",
1337
+ "strategyRunContext"
1338
+ ],
1339
+ "unevaluatedProperties": false,
1340
+ "$anchor": "StrategyRun"
1341
+ },
1342
+ "StrategyRunContext": {
1343
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1344
+ "type": "object",
1345
+ "properties": {
1346
+ "completedAt": {
1347
+ "$ref": "#/$defs/Timestamp"
1348
+ },
1349
+ "startedAt": {
1350
+ "$ref": "#/$defs/Timestamp"
1351
+ },
1352
+ "status": {
1353
+ "$ref": "#/$defs/StrategyRunStatus"
1354
+ }
1355
+ },
1356
+ "required": [
1357
+ "status"
1358
+ ],
1359
+ "unevaluatedProperties": false,
1360
+ "$anchor": "StrategyRunContext"
1361
+ },
1362
+ "StrategyRunIdentity": {
1363
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1364
+ "type": "string",
1365
+ "$anchor": "StrategyRunIdentity",
1366
+ "pattern": "^STRATEGY_RUN-.+$"
1367
+ },
1368
+ "StrategyRunStatus": {
1369
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1370
+ "type": "string",
1371
+ "$anchor": "StrategyRunStatus",
1372
+ "enum": [
1373
+ "pending",
1374
+ "running",
1375
+ "completed",
1376
+ "failed",
1377
+ "cancelled"
1378
+ ]
1379
+ },
1280
1380
  "StrategyState": {
1281
1381
  "$schema": "https://json-schema.org/draft/2020-12/schema",
1282
1382
  "type": "object",
@@ -1320,6 +1420,26 @@
1320
1420
  ],
1321
1421
  "$anchor": "StrategyStateWrapper"
1322
1422
  },
1423
+ "StrategyThreadIdentity": {
1424
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1425
+ "type": "string",
1426
+ "$anchor": "StrategyThreadIdentity",
1427
+ "pattern": "^STRATEGY_THREAD-.+$"
1428
+ },
1429
+ "StrategyThreadMap": {
1430
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1431
+ "type": "object",
1432
+ "additionalProperties": {
1433
+ "items": {
1434
+ "$ref": "#/$defs/Step"
1435
+ }
1436
+ },
1437
+ "$anchor": "StrategyThreadMap",
1438
+ "$comment": "Each thread contains an array of steps, allowing for sequential execution within a thread while supporting parallel execution across multiple threads.",
1439
+ "propertyNames": {
1440
+ "$ref": "#/$defs/StrategyThreadIdentity"
1441
+ }
1442
+ },
1323
1443
  "Timestamp": {
1324
1444
  "$schema": "https://json-schema.org/draft/2020-12/schema",
1325
1445
  "type": "object",
@@ -9,10 +9,15 @@
9
9
  "properties": {
10
10
  "identity": {
11
11
  "$ref": "#/$defs/ResourceFormatIdentity"
12
+ },
13
+ "recognizerUri": {
14
+ "type": "string",
15
+ "format": "uri"
12
16
  }
13
17
  },
14
18
  "required": [
15
- "identity"
19
+ "identity",
20
+ "recognizerUri"
16
21
  ],
17
22
  "$anchor": "ResourceFormat",
18
23
  "$defs": {
@@ -2,6 +2,9 @@
2
2
  "$schema": "https://json-schema.org/draft/2020-12/schema",
3
3
  "type": "object",
4
4
  "allOf": [
5
+ {
6
+ "$ref": "#/$defs/StatelessStrategyWrapper"
7
+ },
5
8
  {
6
9
  "$ref": "#/$defs/StrategyStateWrapper"
7
10
  }
@@ -9,17 +12,26 @@
9
12
  "properties": {
10
13
  "identity": {
11
14
  "$ref": "#/$defs/StatefulStrategyIdentity"
12
- },
13
- "statelessStrategy": {
14
- "$ref": "#/$defs/StatelessStrategy"
15
15
  }
16
16
  },
17
17
  "required": [
18
- "identity",
19
- "statelessStrategy"
18
+ "identity"
20
19
  ],
21
20
  "$anchor": "StatefulStrategy",
22
21
  "$defs": {
22
+ "StatelessStrategyWrapper": {
23
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
24
+ "type": "object",
25
+ "properties": {
26
+ "statelessStrategy": {
27
+ "$ref": "#/$defs/StatelessStrategy"
28
+ }
29
+ },
30
+ "required": [
31
+ "statelessStrategy"
32
+ ],
33
+ "$anchor": "StatelessStrategyWrapper"
34
+ },
23
35
  "StrategyStateWrapper": {
24
36
  "$schema": "https://json-schema.org/draft/2020-12/schema",
25
37
  "type": "object",
@@ -0,0 +1,2 @@
1
+ import schema from './StrategyRun.json';
2
+ export default schema;
@@ -0,0 +1,2 @@
1
+ import schema from './StrategyRun.json' with { type: 'json' };
2
+ export default schema;