@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
@@ -1,101 +1,27 @@
1
1
  {
2
2
  "$schema": "https://json-schema.org/draft/2020-12/schema",
3
- "oneOf": [
3
+ "type": "object",
4
+ "required": [
5
+ "handle"
6
+ ],
7
+ "properties": {
8
+ "handle": {
9
+ "$ref": "#/$defs/StrategyHandle"
10
+ }
11
+ },
12
+ "allOf": [
4
13
  {
5
- "$ref": "#/$defs/UnthreadedStrategy"
14
+ "$ref": "#/$defs/StepsByThreadIndexFacet"
6
15
  },
7
16
  {
8
- "$ref": "#/$defs/ThreadedStrategy"
17
+ "$ref": "#/$defs/StrategyStateFacet"
9
18
  }
10
19
  ],
11
20
  "$defs": {
12
- "UnthreadedStrategy": {
13
- "$schema": "https://json-schema.org/draft/2020-12/schema",
14
- "type": "object",
15
- "allOf": [
16
- {
17
- "$ref": "#/$defs/BaseStrategy"
18
- },
19
- {
20
- "type": "object",
21
- "properties": {
22
- "strategyKind": {
23
- "const": "unthreaded"
24
- }
25
- }
26
- },
27
- {
28
- "$ref": "#/$defs/StepsFacet"
29
- },
30
- {
31
- "$ref": "#/$defs/UnthreadedStrategyStateFacet"
32
- }
33
- ],
34
- "unevaluatedProperties": false
35
- },
36
- "ThreadedStrategy": {
37
- "$schema": "https://json-schema.org/draft/2020-12/schema",
38
- "type": "object",
39
- "allOf": [
40
- {
41
- "$ref": "#/$defs/BaseStrategy"
42
- },
43
- {
44
- "type": "object",
45
- "properties": {
46
- "strategyKind": {
47
- "const": "threaded"
48
- }
49
- }
50
- },
51
- {
52
- "$ref": "#/$defs/StepsByThreadIndexFacet"
53
- },
54
- {
55
- "$ref": "#/$defs/ThreadedStrategyStateFacet"
56
- }
57
- ],
58
- "unevaluatedProperties": false
59
- },
60
- "BaseStrategy": {
61
- "$schema": "https://json-schema.org/draft/2020-12/schema",
62
- "type": "object",
63
- "required": [
64
- "handle",
65
- "strategyKind"
66
- ],
67
- "properties": {
68
- "handle": {
69
- "$ref": "#/$defs/StrategyHandle"
70
- },
71
- "strategyKind": {
72
- "$ref": "#/$defs/StrategyKind"
73
- }
74
- }
75
- },
76
- "StepsFacet": {
77
- "$schema": "https://json-schema.org/draft/2020-12/schema",
78
- "type": "object",
79
- "required": [
80
- "steps"
81
- ],
82
- "properties": {
83
- "steps": {
84
- "$ref": "#/$defs/StepArray"
85
- }
86
- }
87
- },
88
- "UnthreadedStrategyStateFacet": {
21
+ "StrategyHandle": {
89
22
  "$schema": "https://json-schema.org/draft/2020-12/schema",
90
- "type": "object",
91
- "required": [
92
- "strategyState"
93
- ],
94
- "properties": {
95
- "strategyState": {
96
- "$ref": "#/$defs/UnthreadedStrategyState"
97
- }
98
- }
23
+ "type": "string",
24
+ "pattern": "^STRATEGY-.+$"
99
25
  },
100
26
  "StepsByThreadIndexFacet": {
101
27
  "$schema": "https://json-schema.org/draft/2020-12/schema",
@@ -109,7 +35,7 @@
109
35
  }
110
36
  }
111
37
  },
112
- "ThreadedStrategyStateFacet": {
38
+ "StrategyStateFacet": {
113
39
  "$schema": "https://json-schema.org/draft/2020-12/schema",
114
40
  "type": "object",
115
41
  "required": [
@@ -117,56 +43,46 @@
117
43
  ],
118
44
  "properties": {
119
45
  "strategyState": {
120
- "$ref": "#/$defs/ThreadedStrategyState"
46
+ "$ref": "#/$defs/StrategyState"
121
47
  }
122
48
  }
123
49
  },
124
- "StrategyHandle": {
125
- "$schema": "https://json-schema.org/draft/2020-12/schema",
126
- "type": "string",
127
- "pattern": "^STRATEGY-.+$"
128
- },
129
- "StrategyKind": {
130
- "$schema": "https://json-schema.org/draft/2020-12/schema",
131
- "type": "string",
132
- "enum": [
133
- "unthreaded",
134
- "threaded"
135
- ]
136
- },
137
- "StepArray": {
50
+ "StepArrayArray": {
138
51
  "$schema": "https://json-schema.org/draft/2020-12/schema",
139
52
  "type": "array",
140
53
  "items": {
141
- "$ref": "#/$defs/Step"
142
- },
143
- "uniqueItems": true
54
+ "$ref": "#/$defs/StepArray"
55
+ }
144
56
  },
145
- "UnthreadedStrategyState": {
57
+ "StrategyState": {
146
58
  "$schema": "https://json-schema.org/draft/2020-12/schema",
147
59
  "type": "object",
148
60
  "propertyNames": {
149
- "$ref": "#/$defs/UnthreadedToolStepPath"
61
+ "$ref": "#/$defs/ToolStepPath"
150
62
  },
151
63
  "additionalProperties": {
152
64
  "$ref": "#/$defs/StrategyStateInputEntryByRoleName"
153
65
  }
154
66
  },
155
- "StepArrayArray": {
67
+ "StepArray": {
156
68
  "$schema": "https://json-schema.org/draft/2020-12/schema",
157
69
  "type": "array",
158
70
  "items": {
159
- "$ref": "#/$defs/StepArray"
71
+ "$ref": "#/$defs/Step"
160
72
  }
161
73
  },
162
- "ThreadedStrategyState": {
74
+ "ToolStepPath": {
75
+ "type": "string",
76
+ "pattern": "^/threads/[0-9]+/steps/[0-9]+/(self|case/when|case/what|cases/[0-9]+/when|cases/[0-9]+/what)$"
77
+ },
78
+ "StrategyStateInputEntryByRoleName": {
163
79
  "$schema": "https://json-schema.org/draft/2020-12/schema",
164
80
  "type": "object",
165
81
  "propertyNames": {
166
- "$ref": "#/$defs/ThreadedToolStepPath"
82
+ "$ref": "#/$defs/RoleName"
167
83
  },
168
84
  "additionalProperties": {
169
- "$ref": "#/$defs/StrategyStateInputEntryByRoleName"
85
+ "$ref": "#/$defs/StrategyStateInputEntry"
170
86
  }
171
87
  },
172
88
  "Step": {
@@ -188,23 +104,20 @@
188
104
  ],
189
105
  "unevaluatedProperties": false
190
106
  },
191
- "UnthreadedToolStepPath": {
192
- "type": "string",
193
- "pattern": "^/steps/[0-9]+/(self|case/when|case/what|cases/[0-9]+/when|cases/[0-9]+/what)$"
194
- },
195
- "StrategyStateInputEntryByRoleName": {
107
+ "RoleName": {
196
108
  "$schema": "https://json-schema.org/draft/2020-12/schema",
197
- "type": "object",
198
- "propertyNames": {
199
- "$ref": "#/$defs/RoleName"
200
- },
201
- "additionalProperties": {
202
- "$ref": "#/$defs/StrategyStateInputEntry"
203
- }
109
+ "$ref": "#/$defs/Name"
204
110
  },
205
- "ThreadedToolStepPath": {
206
- "type": "string",
207
- "pattern": "^/threads/[0-9]+/steps/[0-9]+/(self|case/when|case/what|cases/[0-9]+/when|cases/[0-9]+/what)$"
111
+ "StrategyStateInputEntry": {
112
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
113
+ "oneOf": [
114
+ {
115
+ "$ref": "#/$defs/InputPotential"
116
+ },
117
+ {
118
+ "$ref": "#/$defs/InputResource"
119
+ }
120
+ ]
208
121
  },
209
122
  "ToolStep": {
210
123
  "$schema": "https://json-schema.org/draft/2020-12/schema",
@@ -247,8 +160,7 @@
247
160
  "items": {
248
161
  "$ref": "#/$defs/Case"
249
162
  },
250
- "minItems": 1,
251
- "uniqueItems": true
163
+ "minItems": 1
252
164
  }
253
165
  },
254
166
  "allOf": [
@@ -299,21 +211,43 @@
299
211
  }
300
212
  ]
301
213
  },
302
- "RoleName": {
214
+ "Name": {
303
215
  "$schema": "https://json-schema.org/draft/2020-12/schema",
304
- "$ref": "#/$defs/Name"
216
+ "type": "string",
217
+ "minLength": 1,
218
+ "pattern": "^[A-Z][a-zA-Z0-9]*$",
219
+ "$comment": "Validation is intercepted by an AI Agent that verifies the name against Toolproof's naming conventions.",
220
+ "semanticValidation": "Ajv custom keyword to verify name."
305
221
  },
306
- "StrategyStateInputEntry": {
222
+ "InputPotential": {
307
223
  "$schema": "https://json-schema.org/draft/2020-12/schema",
308
224
  "oneOf": [
309
225
  {
310
- "$ref": "#/$defs/InputPotential"
226
+ "$ref": "#/$defs/ExternalInputPotential"
311
227
  },
312
228
  {
313
- "$ref": "#/$defs/InputResource"
229
+ "$ref": "#/$defs/InternalInputPotential"
314
230
  }
315
231
  ]
316
232
  },
233
+ "InputResource": {
234
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
235
+ "type": "object",
236
+ "required": [
237
+ "strategyStateInputKind"
238
+ ],
239
+ "properties": {
240
+ "strategyStateInputKind": {
241
+ "const": "inputResource"
242
+ }
243
+ },
244
+ "allOf": [
245
+ {
246
+ "$ref": "#/$defs/BaseResource"
247
+ }
248
+ ],
249
+ "unevaluatedProperties": false
250
+ },
317
251
  "ToolHandle": {
318
252
  "$schema": "https://json-schema.org/draft/2020-12/schema",
319
253
  "type": "string",
@@ -360,70 +294,6 @@
360
294
  },
361
295
  "unevaluatedProperties": false
362
296
  },
363
- "Name": {
364
- "$schema": "https://json-schema.org/draft/2020-12/schema",
365
- "type": "string",
366
- "minLength": 1,
367
- "pattern": "^[A-Z][a-zA-Z0-9]*$",
368
- "$comment": "Validation is intercepted by an AI Agent that verifies the name against Toolproof's naming conventions.",
369
- "semanticValidation": "Ajv custom keyword to verify name."
370
- },
371
- "InputPotential": {
372
- "$schema": "https://json-schema.org/draft/2020-12/schema",
373
- "oneOf": [
374
- {
375
- "$ref": "#/$defs/ExternalInputPotential"
376
- },
377
- {
378
- "$ref": "#/$defs/InternalInputPotential"
379
- }
380
- ]
381
- },
382
- "InputResource": {
383
- "$schema": "https://json-schema.org/draft/2020-12/schema",
384
- "type": "object",
385
- "required": [
386
- "strategyStateInputKind"
387
- ],
388
- "properties": {
389
- "strategyStateInputKind": {
390
- "const": "inputResource"
391
- }
392
- },
393
- "allOf": [
394
- {
395
- "$ref": "#/$defs/BaseResource"
396
- }
397
- ],
398
- "unevaluatedProperties": false
399
- },
400
- "StepKind": {
401
- "$schema": "https://json-schema.org/draft/2020-12/schema",
402
- "type": "string",
403
- "enum": [
404
- "tool",
405
- "branch",
406
- "while",
407
- "for"
408
- ]
409
- },
410
- "RoleBindingSpec": {
411
- "$schema": "https://json-schema.org/draft/2020-12/schema",
412
- "type": "object",
413
- "required": [
414
- "inputBindings",
415
- "outputBindings"
416
- ],
417
- "properties": {
418
- "inputBindings": {
419
- "$ref": "#/$defs/RoleNameArray"
420
- },
421
- "outputBindings": {
422
- "$ref": "#/$defs/RoleNameArray"
423
- }
424
- },
425
- "unevaluatedProperties": false
426
- },
427
297
  "ExternalInputPotential": {
428
298
  "$schema": "https://json-schema.org/draft/2020-12/schema",
429
299
  "type": "object",
@@ -470,12 +340,32 @@
470
340
  }
471
341
  ]
472
342
  },
473
- "RoleNameArray": {
343
+ "StepKind": {
474
344
  "$schema": "https://json-schema.org/draft/2020-12/schema",
475
- "type": "array",
476
- "items": {
477
- "$ref": "#/$defs/RoleName"
478
- }
345
+ "type": "string",
346
+ "enum": [
347
+ "tool",
348
+ "branch",
349
+ "while",
350
+ "for"
351
+ ]
352
+ },
353
+ "RoleBindingSpec": {
354
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
355
+ "type": "object",
356
+ "required": [
357
+ "inputBindings",
358
+ "outputBindings"
359
+ ],
360
+ "properties": {
361
+ "inputBindings": {
362
+ "$ref": "#/$defs/RoleNameArray"
363
+ },
364
+ "outputBindings": {
365
+ "$ref": "#/$defs/RoleNameArray"
366
+ }
367
+ },
368
+ "unevaluatedProperties": false
479
369
  },
480
370
  "ToolStepRoleAddress": {
481
371
  "$schema": "https://json-schema.org/draft/2020-12/schema",
@@ -516,16 +406,12 @@
516
406
  ],
517
407
  "unevaluatedProperties": false
518
408
  },
519
- "ToolStepPath": {
409
+ "RoleNameArray": {
520
410
  "$schema": "https://json-schema.org/draft/2020-12/schema",
521
- "oneOf": [
522
- {
523
- "$ref": "#/$defs/UnthreadedToolStepPath"
524
- },
525
- {
526
- "$ref": "#/$defs/ThreadedToolStepPath"
527
- }
528
- ]
411
+ "type": "array",
412
+ "items": {
413
+ "$ref": "#/$defs/RoleName"
414
+ }
529
415
  },
530
416
  "ResourceId": {
531
417
  "$schema": "https://json-schema.org/draft/2020-12/schema",