@toolproof-core/schema 1.0.9 → 1.0.11
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/dist/generated/artifacts/constants.d.ts +121 -0
- package/dist/generated/artifacts/constants.js +121 -0
- package/dist/generated/artifacts/mappings.d.ts +23 -0
- package/dist/generated/artifacts/mappings.js +23 -0
- package/dist/generated/normalized/Genesis.json +117 -78
- package/dist/generated/resources/Genesis.json +489 -264
- package/dist/generated/schemas/Genesis.json +94 -61
- package/dist/generated/schemas/standalone/Job.json +9 -8
- package/dist/generated/schemas/standalone/RawStrategy.json +86 -110
- package/dist/generated/schemas/standalone/ResourceType.json +4 -4
- package/dist/generated/schemas/standalone/RunnableStrategy.json +115 -139
- package/dist/generated/schemas/standalone/StrategyRun.json +93 -117
- package/dist/generated/types/standalone/Resource_Genesis.d.ts +1 -1
- package/dist/generated/types/standalone/Resource_Job.d.ts +1 -1
- package/dist/generated/types/standalone/Resource_RawStrategy.d.ts +1 -1
- package/dist/generated/types/standalone/Resource_ResourceType.d.ts +1 -1
- package/dist/generated/types/standalone/Resource_RunnableStrategy.d.ts +1 -1
- package/dist/generated/types/types.d.ts +247 -239
- package/dist/index.d.ts +6 -3
- package/dist/index.js +5 -2
- package/dist/scripts/_lib/config.d.ts +3 -5
- package/dist/scripts/_lib/config.js +8 -14
- package/dist/scripts/generateConstantsAndMappings.d.ts +31 -0
- package/dist/scripts/generateConstantsAndMappings.js +243 -0
- package/dist/scripts/generateDependencies.js +1 -1
- package/dist/scripts/generateStandaloneType.js +2 -1
- package/dist/scripts/generateTerminals.js +2 -2
- package/dist/scripts/generateTypes.js +183 -5
- package/dist/scripts/wrapResourceTypesWithResourceShells.js +7 -3
- package/package.json +9 -10
- package/src/Genesis.json +1873 -1833
- package/src/generated/artifacts/constants.ts +122 -0
- package/src/generated/{dependencies → artifacts}/dependencyMap.json +282 -280
- package/src/generated/artifacts/mappings.ts +24 -0
- package/src/generated/{dependencies → artifacts}/terminals.json +13 -11
- package/src/generated/normalized/Genesis.json +1785 -1746
- package/src/generated/resources/Genesis.json +2833 -2608
- package/src/generated/schemas/Genesis.json +1348 -1315
- package/src/generated/schemas/standalone/Job.json +195 -194
- package/src/generated/schemas/standalone/RawStrategy.json +86 -110
- package/src/generated/schemas/standalone/ResourceType.json +106 -106
- package/src/generated/schemas/standalone/RunnableStrategy.json +645 -669
- package/src/generated/schemas/standalone/StrategyRun.json +913 -937
- package/src/generated/types/standalone/Resource_Genesis.d.ts +3 -3
- package/src/generated/types/standalone/Resource_Job.d.ts +3 -3
- package/src/generated/types/standalone/Resource_RawStrategy.d.ts +3 -3
- package/src/generated/types/standalone/Resource_ResourceType.d.ts +3 -3
- package/src/generated/types/standalone/Resource_RunnableStrategy.d.ts +3 -3
- package/src/generated/types/types.d.ts +717 -709
- package/src/index.ts +77 -70
- package/src/scripts/_lib/config.ts +207 -215
- package/src/scripts/extractSchemasFromResourceTypeShells.ts +261 -261
- package/src/scripts/generateConstantsAndMappings.ts +309 -0
- package/src/scripts/generateDependencies.ts +121 -121
- package/src/scripts/generateSchemaShims.ts +127 -127
- package/src/scripts/generateStandaloneSchema.ts +185 -185
- package/src/scripts/generateStandaloneType.ts +129 -127
- package/src/scripts/generateTerminals.ts +73 -73
- package/src/scripts/generateTypes.ts +733 -531
- package/src/scripts/normalizeAnchorsToPointers.ts +141 -141
- package/src/scripts/wrapResourceTypesWithResourceShells.ts +86 -82
- package/dist/generated/constants/constants.d.ts +0 -60
- package/dist/generated/constants/constants.js +0 -60
- package/dist/scripts/generateConstants.d.ts +0 -12
- package/dist/scripts/generateConstants.js +0 -179
- package/src/generated/constants/constants.ts +0 -61
- package/src/scripts/generateConstants.ts +0 -217
|
@@ -84,7 +84,14 @@
|
|
|
84
84
|
"$ref": "#/$defs/ResourceRoleIdentity"
|
|
85
85
|
},
|
|
86
86
|
"additionalProperties": {
|
|
87
|
-
"
|
|
87
|
+
"oneOf": [
|
|
88
|
+
{
|
|
89
|
+
"$ref": "#/$defs/ResourcePotential"
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
"$ref": "#/$defs/Resource"
|
|
93
|
+
}
|
|
94
|
+
]
|
|
88
95
|
}
|
|
89
96
|
},
|
|
90
97
|
"JobStep": {
|
|
@@ -201,7 +208,7 @@
|
|
|
201
208
|
"type": "string",
|
|
202
209
|
"pattern": "^ROLE-.+$"
|
|
203
210
|
},
|
|
204
|
-
"
|
|
211
|
+
"ResourcePotential": {
|
|
205
212
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
206
213
|
"type": "object",
|
|
207
214
|
"oneOf": [
|
|
@@ -213,9 +220,20 @@
|
|
|
213
220
|
},
|
|
214
221
|
{
|
|
215
222
|
"$ref": "#/$defs/ResourceOutputPotential"
|
|
223
|
+
}
|
|
224
|
+
],
|
|
225
|
+
"unevaluatedProperties": false
|
|
226
|
+
},
|
|
227
|
+
"Resource": {
|
|
228
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
229
|
+
"type": "object",
|
|
230
|
+
"allOf": [
|
|
231
|
+
{
|
|
232
|
+
"$ref": "#/$defs/ShellMaterializedBase"
|
|
216
233
|
},
|
|
217
234
|
{
|
|
218
|
-
"$
|
|
235
|
+
"$comment": "This will be overlayed dynamically to match the data structure of the underlying ResourceType's nucleusSchema.",
|
|
236
|
+
"$ref": "#/$defs/NucleusFacet"
|
|
219
237
|
}
|
|
220
238
|
],
|
|
221
239
|
"unevaluatedProperties": false
|
|
@@ -299,19 +317,48 @@
|
|
|
299
317
|
"$ref": "#/$defs/ShellOutputPotential",
|
|
300
318
|
"unevaluatedProperties": false
|
|
301
319
|
},
|
|
302
|
-
"
|
|
320
|
+
"ShellMaterializedBase": {
|
|
303
321
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
304
322
|
"type": "object",
|
|
323
|
+
"required": [
|
|
324
|
+
"version",
|
|
325
|
+
"resourceShellKind"
|
|
326
|
+
],
|
|
327
|
+
"properties": {
|
|
328
|
+
"version": {
|
|
329
|
+
"const": 1
|
|
330
|
+
},
|
|
331
|
+
"resourceShellKind": {
|
|
332
|
+
"const": "materialized"
|
|
333
|
+
}
|
|
334
|
+
},
|
|
305
335
|
"allOf": [
|
|
306
336
|
{
|
|
307
|
-
"$ref": "#/$defs/
|
|
337
|
+
"$ref": "#/$defs/ResourceShellBase"
|
|
308
338
|
},
|
|
309
339
|
{
|
|
310
|
-
"$
|
|
311
|
-
|
|
340
|
+
"$ref": "#/$defs/CreationContextFacet"
|
|
341
|
+
},
|
|
342
|
+
{
|
|
343
|
+
"$ref": "#/$defs/ResourceShellKindFacet"
|
|
344
|
+
},
|
|
345
|
+
{
|
|
346
|
+
"$ref": "#/$defs/TimestampFacet"
|
|
347
|
+
},
|
|
348
|
+
{
|
|
349
|
+
"$ref": "#/$defs/PathFacet"
|
|
312
350
|
}
|
|
351
|
+
]
|
|
352
|
+
},
|
|
353
|
+
"NucleusFacet": {
|
|
354
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
355
|
+
"type": "object",
|
|
356
|
+
"required": [
|
|
357
|
+
"nucleus"
|
|
313
358
|
],
|
|
314
|
-
"
|
|
359
|
+
"properties": {
|
|
360
|
+
"nucleus": true
|
|
361
|
+
}
|
|
315
362
|
},
|
|
316
363
|
"StepKind": {
|
|
317
364
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
@@ -342,8 +389,11 @@
|
|
|
342
389
|
"ShellMissing": {
|
|
343
390
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
344
391
|
"type": "object",
|
|
392
|
+
"required": [
|
|
393
|
+
"resourceShellKind"
|
|
394
|
+
],
|
|
345
395
|
"properties": {
|
|
346
|
-
"
|
|
396
|
+
"resourceShellKind": {
|
|
347
397
|
"const": "missing"
|
|
348
398
|
}
|
|
349
399
|
},
|
|
@@ -352,7 +402,7 @@
|
|
|
352
402
|
"$ref": "#/$defs/ResourceShellBase"
|
|
353
403
|
},
|
|
354
404
|
{
|
|
355
|
-
"$ref": "#/$defs/
|
|
405
|
+
"$ref": "#/$defs/ResourceShellKindFacet"
|
|
356
406
|
}
|
|
357
407
|
],
|
|
358
408
|
"unevaluatedProperties": false
|
|
@@ -360,8 +410,11 @@
|
|
|
360
410
|
"ShellInputPotential": {
|
|
361
411
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
362
412
|
"type": "object",
|
|
413
|
+
"required": [
|
|
414
|
+
"resourceShellKind"
|
|
415
|
+
],
|
|
363
416
|
"properties": {
|
|
364
|
-
"
|
|
417
|
+
"resourceShellKind": {
|
|
365
418
|
"const": "inputPotential"
|
|
366
419
|
}
|
|
367
420
|
},
|
|
@@ -373,44 +426,20 @@
|
|
|
373
426
|
"$ref": "#/$defs/CreationContextFacet"
|
|
374
427
|
},
|
|
375
428
|
{
|
|
376
|
-
"$ref": "#/$defs/
|
|
429
|
+
"$ref": "#/$defs/ResourceShellKindFacet"
|
|
377
430
|
}
|
|
378
431
|
],
|
|
379
432
|
"unevaluatedProperties": false
|
|
380
433
|
},
|
|
381
434
|
"ShellOutputPotential": {
|
|
382
|
-
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
383
|
-
"type": "object",
|
|
384
|
-
"properties": {
|
|
385
|
-
"resourceKind": {
|
|
386
|
-
"const": "outputPotential"
|
|
387
|
-
}
|
|
388
|
-
},
|
|
389
|
-
"allOf": [
|
|
390
|
-
{
|
|
391
|
-
"$ref": "#/$defs/ResourceShellBase"
|
|
392
|
-
},
|
|
393
|
-
{
|
|
394
|
-
"$ref": "#/$defs/CreationContextFacet"
|
|
395
|
-
},
|
|
396
|
-
{
|
|
397
|
-
"$ref": "#/$defs/ResourceKindFacet"
|
|
398
|
-
}
|
|
399
|
-
],
|
|
400
|
-
"unevaluatedProperties": false
|
|
401
|
-
},
|
|
402
|
-
"ShellMaterializedBase": {
|
|
403
435
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
404
436
|
"type": "object",
|
|
405
437
|
"required": [
|
|
406
|
-
"
|
|
438
|
+
"resourceShellKind"
|
|
407
439
|
],
|
|
408
440
|
"properties": {
|
|
409
|
-
"
|
|
410
|
-
"const":
|
|
411
|
-
},
|
|
412
|
-
"resourceKind": {
|
|
413
|
-
"const": "materialized"
|
|
441
|
+
"resourceShellKind": {
|
|
442
|
+
"const": "outputPotential"
|
|
414
443
|
}
|
|
415
444
|
},
|
|
416
445
|
"allOf": [
|
|
@@ -421,34 +450,10 @@
|
|
|
421
450
|
"$ref": "#/$defs/CreationContextFacet"
|
|
422
451
|
},
|
|
423
452
|
{
|
|
424
|
-
"$ref": "#/$defs/
|
|
425
|
-
},
|
|
426
|
-
{
|
|
427
|
-
"$ref": "#/$defs/TimestampFacet"
|
|
428
|
-
},
|
|
429
|
-
{
|
|
430
|
-
"$ref": "#/$defs/PathFacet"
|
|
453
|
+
"$ref": "#/$defs/ResourceShellKindFacet"
|
|
431
454
|
}
|
|
432
|
-
]
|
|
433
|
-
},
|
|
434
|
-
"NucleusFacet": {
|
|
435
|
-
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
436
|
-
"type": "object",
|
|
437
|
-
"required": [
|
|
438
|
-
"nucleus"
|
|
439
455
|
],
|
|
440
|
-
"
|
|
441
|
-
"nucleus": {
|
|
442
|
-
"$ref": "#/$defs/Nucleus"
|
|
443
|
-
}
|
|
444
|
-
}
|
|
445
|
-
},
|
|
446
|
-
"RoleBindingArray": {
|
|
447
|
-
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
448
|
-
"type": "array",
|
|
449
|
-
"items": {
|
|
450
|
-
"$ref": "#/$defs/ResourceRoleIdentity"
|
|
451
|
-
}
|
|
456
|
+
"unevaluatedProperties": false
|
|
452
457
|
},
|
|
453
458
|
"ResourceShellBase": {
|
|
454
459
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
@@ -456,7 +461,7 @@
|
|
|
456
461
|
"required": [
|
|
457
462
|
"identity",
|
|
458
463
|
"resourceTypeHandle",
|
|
459
|
-
"
|
|
464
|
+
"resourceShellKind"
|
|
460
465
|
],
|
|
461
466
|
"properties": {
|
|
462
467
|
"identity": {
|
|
@@ -465,32 +470,32 @@
|
|
|
465
470
|
"resourceTypeHandle": {
|
|
466
471
|
"$ref": "#/$defs/ResourceTypeIdentity"
|
|
467
472
|
},
|
|
468
|
-
"
|
|
469
|
-
"$ref": "#/$defs/
|
|
473
|
+
"resourceShellKind": {
|
|
474
|
+
"$ref": "#/$defs/ResourceShellKind"
|
|
470
475
|
}
|
|
471
476
|
}
|
|
472
477
|
},
|
|
473
|
-
"
|
|
478
|
+
"CreationContextFacet": {
|
|
474
479
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
475
480
|
"type": "object",
|
|
476
481
|
"required": [
|
|
477
|
-
"
|
|
482
|
+
"creationContext"
|
|
478
483
|
],
|
|
479
484
|
"properties": {
|
|
480
|
-
"
|
|
481
|
-
"$ref": "#/$defs/
|
|
485
|
+
"creationContext": {
|
|
486
|
+
"$ref": "#/$defs/CreationContext"
|
|
482
487
|
}
|
|
483
488
|
}
|
|
484
489
|
},
|
|
485
|
-
"
|
|
490
|
+
"ResourceShellKindFacet": {
|
|
486
491
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
487
492
|
"type": "object",
|
|
488
493
|
"required": [
|
|
489
|
-
"
|
|
494
|
+
"resourceShellKind"
|
|
490
495
|
],
|
|
491
496
|
"properties": {
|
|
492
|
-
"
|
|
493
|
-
"$ref": "#/$defs/
|
|
497
|
+
"resourceShellKind": {
|
|
498
|
+
"$ref": "#/$defs/ResourceShellKind"
|
|
494
499
|
}
|
|
495
500
|
}
|
|
496
501
|
},
|
|
@@ -518,11 +523,11 @@
|
|
|
518
523
|
}
|
|
519
524
|
}
|
|
520
525
|
},
|
|
521
|
-
"
|
|
526
|
+
"RoleBindingArray": {
|
|
522
527
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
523
|
-
"type": "
|
|
524
|
-
"
|
|
525
|
-
"$ref": "#/$defs/
|
|
528
|
+
"type": "array",
|
|
529
|
+
"items": {
|
|
530
|
+
"$ref": "#/$defs/ResourceRoleIdentity"
|
|
526
531
|
}
|
|
527
532
|
},
|
|
528
533
|
"ResourceIdentity": {
|
|
@@ -535,7 +540,7 @@
|
|
|
535
540
|
"type": "string",
|
|
536
541
|
"pattern": "^TYPE-.+$"
|
|
537
542
|
},
|
|
538
|
-
"
|
|
543
|
+
"ResourceShellKind": {
|
|
539
544
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
540
545
|
"type": "string",
|
|
541
546
|
"enum": [
|
|
@@ -570,35 +575,6 @@
|
|
|
570
575
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
571
576
|
"type": "string",
|
|
572
577
|
"format": "uri-reference"
|
|
573
|
-
},
|
|
574
|
-
"JsonData": {
|
|
575
|
-
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
576
|
-
"oneOf": [
|
|
577
|
-
{
|
|
578
|
-
"type": "null"
|
|
579
|
-
},
|
|
580
|
-
{
|
|
581
|
-
"type": "boolean"
|
|
582
|
-
},
|
|
583
|
-
{
|
|
584
|
-
"type": "number"
|
|
585
|
-
},
|
|
586
|
-
{
|
|
587
|
-
"type": "string"
|
|
588
|
-
},
|
|
589
|
-
{
|
|
590
|
-
"type": "array",
|
|
591
|
-
"items": {
|
|
592
|
-
"$ref": "#/$defs/JsonData"
|
|
593
|
-
}
|
|
594
|
-
},
|
|
595
|
-
{
|
|
596
|
-
"type": "object",
|
|
597
|
-
"additionalProperties": {
|
|
598
|
-
"$ref": "#/$defs/JsonData"
|
|
599
|
-
}
|
|
600
|
-
}
|
|
601
|
-
]
|
|
602
578
|
}
|
|
603
579
|
}
|
|
604
580
|
}
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
"$ref": "#/$defs/ResourceTypeIdentity"
|
|
11
11
|
},
|
|
12
12
|
"nucleusSchema": true,
|
|
13
|
-
"
|
|
13
|
+
"embeddingUriDict": {
|
|
14
14
|
"type": "object",
|
|
15
15
|
"propertyNames": {
|
|
16
16
|
"type": "string",
|
|
@@ -20,9 +20,9 @@
|
|
|
20
20
|
"$ref": "#/$defs/Uri"
|
|
21
21
|
},
|
|
22
22
|
"minProperties": 1,
|
|
23
|
-
"$comment": "A ResourceType may specify a set of embedding models that convert the raw data (or one of its alternative representations) into vector embeddings. The build process enforces that the keys of this
|
|
23
|
+
"$comment": "A ResourceType may specify a set of embedding models that convert the raw data (or one of its alternative representations) into vector embeddings. The build process enforces that the keys of this dict are members of a set of predefined embedding models."
|
|
24
24
|
},
|
|
25
|
-
"
|
|
25
|
+
"generatorUriDict": {
|
|
26
26
|
"type": "object",
|
|
27
27
|
"propertyNames": {
|
|
28
28
|
"type": "string",
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
"$ref": "#/$defs/Uri"
|
|
33
33
|
},
|
|
34
34
|
"minProperties": 1,
|
|
35
|
-
"$comment": "A ResourceType may specify a set of generators that generate different representations of its instances from the raw file. A ToolProof Resource is always backed by a raw file. This is also true for the Resources (of type ResourceType) defined in this file! The build process enforces that the keys of this
|
|
35
|
+
"$comment": "A ResourceType may specify a set of generators that generate different representations of its instances from the raw file. A ToolProof Resource is always backed by a raw file. This is also true for the Resources (of type ResourceType) defined in this file! The build process enforces that the keys of this dict are members of a set of predefined generators. GENERATOR-Json is an identifier for a generator that generates JSON data from the raw file. If the raw file is a JSON file, GENERATOR-Json is an implicit identity operation (i.e. an operation that does nothing) and must not be present in the dict. A ResourceType may also specify other generators, such as GENERATOR-LeanTerm, which generates an instance (or 'term' in Lean jargon) of a corresponding Lean type from the raw file. ResourceTypes that specify GENERATOR-LeanTerm must also specify a corresponding GENERATOR-LeanType. While the term-version runs when data instances enter the ecosystem, the type-version runs when the ResourceType itself enters the ecosystem."
|
|
36
36
|
}
|
|
37
37
|
},
|
|
38
38
|
"allOf": [
|