@toolproof-core/schema 1.0.3 → 1.0.5

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 (57) hide show
  1. package/dist/generated/normalized/Genesis.json +16 -265
  2. package/dist/generated/resources/Genesis.json +18 -305
  3. package/dist/generated/schemas/Genesis.json +14 -152
  4. package/dist/generated/schemas/standalone/Goal.json +0 -33
  5. package/dist/generated/schemas/standalone/Job.json +0 -42
  6. package/dist/generated/schemas/standalone/RawStrategy.json +14 -52
  7. package/dist/generated/schemas/standalone/ResourceType.json +0 -34
  8. package/dist/generated/schemas/standalone/RunnableStrategy.json +14 -57
  9. package/dist/generated/schemas/standalone/StrategyRun.json +14 -71
  10. package/dist/generated/types/standalone/Resource_Genesis.d.ts +1 -1
  11. package/dist/generated/types/standalone/Resource_Job.d.ts +1 -1
  12. package/dist/generated/types/standalone/Resource_RawStrategy.d.ts +1 -1
  13. package/dist/generated/types/standalone/Resource_ResourceType.d.ts +1 -1
  14. package/dist/generated/types/standalone/Resource_RunnableStrategy.d.ts +1 -1
  15. package/dist/generated/types/types.d.ts +119 -1126
  16. package/dist/index.d.ts +1 -4
  17. package/dist/index.js +0 -2
  18. package/dist/scripts/_lib/config.d.ts +6 -6
  19. package/dist/scripts/_lib/config.js +10 -12
  20. package/dist/scripts/extractSchemasFromResourceTypeShells.js +109 -103
  21. package/dist/scripts/generateDependencies.js +15 -14
  22. package/dist/scripts/generateSchemaShims.js +77 -85
  23. package/dist/scripts/generateStandaloneSchema.js +47 -37
  24. package/dist/scripts/generateStandaloneType.js +85 -79
  25. package/dist/scripts/generateTypes.js +350 -470
  26. package/dist/scripts/normalizeAnchorsToPointers.d.ts +1 -1
  27. package/dist/scripts/normalizeAnchorsToPointers.js +61 -33
  28. package/dist/scripts/wrapResourceTypesWithResourceShells.js +14 -16
  29. package/package.json +7 -8
  30. package/src/Genesis.json +1837 -1999
  31. package/src/generated/{dependencyMap.json → dependencies/dependencyMap.json} +9 -19
  32. package/src/generated/normalized/Genesis.json +16 -265
  33. package/src/generated/resources/Genesis.json +18 -305
  34. package/src/generated/schemas/Genesis.json +14 -152
  35. package/src/generated/schemas/standalone/Goal.json +0 -33
  36. package/src/generated/schemas/standalone/Job.json +0 -42
  37. package/src/generated/schemas/standalone/RawStrategy.json +14 -52
  38. package/src/generated/schemas/standalone/ResourceType.json +0 -34
  39. package/src/generated/schemas/standalone/RunnableStrategy.json +14 -57
  40. package/src/generated/schemas/standalone/StrategyRun.json +14 -71
  41. package/src/generated/types/standalone/Resource_Genesis.d.ts +1 -1
  42. package/src/generated/types/standalone/Resource_Job.d.ts +1 -1
  43. package/src/generated/types/standalone/Resource_RawStrategy.d.ts +1 -1
  44. package/src/generated/types/standalone/Resource_ResourceType.d.ts +1 -1
  45. package/src/generated/types/standalone/Resource_RunnableStrategy.d.ts +1 -1
  46. package/src/generated/types/types.d.ts +119 -1126
  47. package/src/index.ts +66 -93
  48. package/src/scripts/_lib/config.ts +203 -205
  49. package/src/scripts/extractSchemasFromResourceTypeShells.ts +261 -218
  50. package/src/scripts/generateDependencies.ts +121 -120
  51. package/src/scripts/generateSchemaShims.ts +127 -135
  52. package/src/scripts/generateStandaloneSchema.ts +185 -175
  53. package/src/scripts/generateStandaloneType.ts +127 -119
  54. package/src/scripts/generateTypes.ts +532 -615
  55. package/src/scripts/normalizeAnchorsToPointers.ts +141 -123
  56. package/src/scripts/wrapResourceTypesWithResourceShells.ts +82 -84
  57. package/dist/generated/dependencyMap.json +0 -292
@@ -1,43 +1,37 @@
1
1
  // Auto-generated from JSON schemas. Do not edit.
2
2
 
3
3
  /**
4
- * This interface was referenced by `GenesisJson`'s JSON-Schema
4
+ * This interface was referenced by `Genesis`'s JSON-Schema
5
5
  * via the `definition` "Name".
6
6
  */
7
7
  export type Name =
8
8
  string;
9
9
  /**
10
- * This interface was referenced by `GenesisJson`'s JSON-Schema
10
+ * This interface was referenced by `Genesis`'s JSON-Schema
11
11
  * via the `definition` "Description".
12
12
  */
13
13
  export type Description =
14
14
  string;
15
15
  /**
16
- * This interface was referenced by `GenesisJson`'s JSON-Schema
16
+ * This interface was referenced by `Genesis`'s JSON-Schema
17
17
  * via the `definition` "DocumentationFacet".
18
18
  */
19
19
  export type DocumentationFacet =
20
20
  NameFacet & DescriptionFacet;
21
21
  /**
22
- * This interface was referenced by `GenesisJson`'s JSON-Schema
23
- * via the `definition` "ResourceTypeImplementationKind".
24
- */
25
- export type ResourceTypeImplementationKind =
26
- "internal-without-identity" | "internal-with-identity" | "external";
27
- /**
28
- * This interface was referenced by `GenesisJson`'s JSON-Schema
22
+ * This interface was referenced by `Genesis`'s JSON-Schema
29
23
  * via the `definition` "Uri".
30
24
  */
31
25
  export type Uri =
32
26
  string;
33
27
  /**
34
- * This interface was referenced by `GenesisJson`'s JSON-Schema
28
+ * This interface was referenced by `Genesis`'s JSON-Schema
35
29
  * via the `definition` "ResourceTypeIdentity".
36
30
  */
37
31
  export type ResourceTypeIdentity =
38
32
  `TYPE-${string}`;
39
33
  /**
40
- * This interface was referenced by `GenesisJson`'s JSON-Schema
34
+ * This interface was referenced by `Genesis`'s JSON-Schema
41
35
  * via the `definition` "ResourceType".
42
36
  */
43
37
  export type ResourceType =
@@ -50,16 +44,15 @@ export type ResourceType =
50
44
  generatorUriMap?: {
51
45
  [k: string]: Uri;
52
46
  };
53
- } & DocumentationFacet &
54
- ResourceTypeImplementationKindFacet;
47
+ } & DocumentationFacet;
55
48
  /**
56
- * This interface was referenced by `GenesisJson`'s JSON-Schema
49
+ * This interface was referenced by `Genesis`'s JSON-Schema
57
50
  * via the `definition` "ResourceRoleIdentity".
58
51
  */
59
52
  export type ResourceRoleIdentity =
60
53
  `ROLE-${string}`;
61
54
  /**
62
- * This interface was referenced by `GenesisJson`'s JSON-Schema
55
+ * This interface was referenced by `Genesis`'s JSON-Schema
63
56
  * via the `definition` "ResourceRoleValue".
64
57
  */
65
58
  export type ResourceRoleValue =
@@ -67,7 +60,7 @@ export type ResourceRoleValue =
67
60
  resourceTypeHandle: ResourceTypeIdentity;
68
61
  } & DocumentationFacet;
69
62
  /**
70
- * This interface was referenced by `GenesisJson`'s JSON-Schema
63
+ * This interface was referenced by `Genesis`'s JSON-Schema
71
64
  * via the `definition` "Error".
72
65
  */
73
66
  export type Error =
@@ -77,19 +70,13 @@ export type Error =
77
70
  };
78
71
  };
79
72
  /**
80
- * This interface was referenced by `GenesisJson`'s JSON-Schema
81
- * via the `definition` "Domain".
82
- */
83
- export type Domain =
84
- "internal" | "numerical" | "biological" | "logical" | "augmental";
85
- /**
86
- * This interface was referenced by `GenesisJson`'s JSON-Schema
73
+ * This interface was referenced by `Genesis`'s JSON-Schema
87
74
  * via the `definition` "JobIdentity".
88
75
  */
89
76
  export type JobIdentity =
90
77
  `JOB-${string}`;
91
78
  /**
92
- * This interface was referenced by `GenesisJson`'s JSON-Schema
79
+ * This interface was referenced by `Genesis`'s JSON-Schema
93
80
  * via the `definition` "Job".
94
81
  */
95
82
  export type Job =
@@ -97,210 +84,209 @@ export type Job =
97
84
  identity: JobIdentity;
98
85
  implementationUri: Uri;
99
86
  } & DocumentationFacet &
100
- DomainFacet &
101
87
  RolesFacet;
102
88
  /**
103
- * This interface was referenced by `GenesisJson`'s JSON-Schema
89
+ * This interface was referenced by `Genesis`'s JSON-Schema
104
90
  * via the `definition` "RoleBindingArray".
105
91
  */
106
92
  export type RoleBindingArray =
107
93
  ResourceRoleIdentity[];
108
94
  /**
109
- * This interface was referenced by `GenesisJson`'s JSON-Schema
95
+ * This interface was referenced by `Genesis`'s JSON-Schema
110
96
  * via the `definition` "StepKind".
111
97
  */
112
98
  export type StepKind =
113
99
  "job" | "branch" | "while" | "for";
114
100
  /**
115
- * This interface was referenced by `GenesisJson`'s JSON-Schema
101
+ * This interface was referenced by `Genesis`'s JSON-Schema
116
102
  * via the `definition` "JobStepIdentity".
117
103
  */
118
104
  export type JobStepIdentity =
119
105
  `JOB_STEP-${string}`;
120
106
  /**
121
- * This interface was referenced by `GenesisJson`'s JSON-Schema
107
+ * This interface was referenced by `Genesis`'s JSON-Schema
122
108
  * via the `definition` "JobStep".
123
109
  */
124
110
  export type JobStep =
125
111
  {
126
112
  identity: JobStepIdentity;
127
- stepKind?: "job";
113
+ stepKind: "job";
128
114
  jobHandle: JobIdentity;
129
115
  } & StepKindFacet &
130
116
  RoleBindingsFacet1;
131
117
  /**
132
- * This interface was referenced by `GenesisJson`'s JSON-Schema
118
+ * This interface was referenced by `Genesis`'s JSON-Schema
133
119
  * via the `definition` "BranchStepIdentity".
134
120
  */
135
121
  export type BranchStepIdentity =
136
122
  `BRANCH_STEP-${string}`;
137
123
  /**
138
- * This interface was referenced by `GenesisJson`'s JSON-Schema
124
+ * This interface was referenced by `Genesis`'s JSON-Schema
139
125
  * via the `definition` "BranchStep".
140
126
  */
141
127
  export type BranchStep =
142
128
  {
143
129
  identity: BranchStepIdentity;
144
- stepKind?: "branch";
130
+ stepKind: "branch";
145
131
  /**
146
132
  * @minItems 1
147
133
  */
148
134
  cases: [Conditional, ...Conditional[]];
149
135
  } & StepKindFacet;
150
136
  /**
151
- * This interface was referenced by `GenesisJson`'s JSON-Schema
137
+ * This interface was referenced by `Genesis`'s JSON-Schema
152
138
  * via the `definition` "WhileStepIdentity".
153
139
  */
154
140
  export type WhileStepIdentity =
155
141
  `WHILE_STEP-${string}`;
156
142
  /**
157
- * This interface was referenced by `GenesisJson`'s JSON-Schema
143
+ * This interface was referenced by `Genesis`'s JSON-Schema
158
144
  * via the `definition` "WhileStep".
159
145
  */
160
146
  export type WhileStep =
161
147
  {
162
148
  identity: WhileStepIdentity;
163
- stepKind?: "while";
149
+ stepKind: "while";
164
150
  case: Conditional;
165
151
  } & StepKindFacet;
166
152
  /**
167
- * This interface was referenced by `GenesisJson`'s JSON-Schema
153
+ * This interface was referenced by `Genesis`'s JSON-Schema
168
154
  * via the `definition` "ForStepIdentity".
169
155
  */
170
156
  export type ForStepIdentity =
171
157
  `FOR_STEP-${string}`;
172
158
  /**
173
- * This interface was referenced by `GenesisJson`'s JSON-Schema
159
+ * This interface was referenced by `Genesis`'s JSON-Schema
174
160
  * via the `definition` "ForStep".
175
161
  */
176
162
  export type ForStep =
177
163
  {
178
164
  identity: ForStepIdentity;
179
- stepKind?: "for";
165
+ stepKind: "for";
180
166
  case: Conditional;
181
167
  } & StepKindFacet;
182
168
  /**
183
- * This interface was referenced by `GenesisJson`'s JSON-Schema
169
+ * This interface was referenced by `Genesis`'s JSON-Schema
184
170
  * via the `definition` "StepIdentity".
185
171
  */
186
172
  export type StepIdentity =
187
173
  JobStepIdentity | BranchStepIdentity | WhileStepIdentity | ForStepIdentity;
188
174
  /**
189
- * This interface was referenced by `GenesisJson`'s JSON-Schema
175
+ * This interface was referenced by `Genesis`'s JSON-Schema
190
176
  * via the `definition` "Step".
191
177
  */
192
178
  export type Step =
193
179
  JobStep | BranchStep | WhileStep | ForStep;
194
180
  /**
195
- * This interface was referenced by `GenesisJson`'s JSON-Schema
181
+ * This interface was referenced by `Genesis`'s JSON-Schema
196
182
  * via the `definition` "ResourceIdentity".
197
183
  */
198
184
  export type ResourceIdentity =
199
185
  `RESOURCE-${string}`;
200
186
  /**
201
- * This interface was referenced by `GenesisJson`'s JSON-Schema
187
+ * This interface was referenced by `Genesis`'s JSON-Schema
202
188
  * via the `definition` "ResourceKind".
203
189
  */
204
190
  export type ResourceKind =
205
191
  "missing" | "input-potential" | "output-potential" | "materialized";
206
192
  /**
207
- * This interface was referenced by `GenesisJson`'s JSON-Schema
193
+ * This interface was referenced by `Genesis`'s JSON-Schema
208
194
  * via the `definition` "ShellMissing".
209
195
  */
210
196
  export type ShellMissing =
211
197
  {
212
198
  resourceKind?: "missing";
213
- } & ResourceBase &
199
+ } & ResourceShellBase &
214
200
  ResourceKindFacet;
215
201
  /**
216
- * This interface was referenced by `GenesisJson`'s JSON-Schema
202
+ * This interface was referenced by `Genesis`'s JSON-Schema
217
203
  * via the `definition` "ShellInputPotential".
218
204
  */
219
205
  export type ShellInputPotential =
220
206
  {
221
207
  resourceKind?: "input-potential";
222
- } & ResourceBase &
208
+ } & ResourceShellBase &
223
209
  CreationContextFacet &
224
210
  ResourceKindFacet;
225
211
  /**
226
- * This interface was referenced by `GenesisJson`'s JSON-Schema
212
+ * This interface was referenced by `Genesis`'s JSON-Schema
227
213
  * via the `definition` "ShellOutputPotential".
228
214
  */
229
215
  export type ShellOutputPotential =
230
216
  {
231
217
  resourceKind?: "output-potential";
232
- } & ResourceBase &
218
+ } & ResourceShellBase &
233
219
  CreationContextFacet &
234
220
  ResourceKindFacet;
235
221
  /**
236
- * This interface was referenced by `GenesisJson`'s JSON-Schema
222
+ * This interface was referenced by `Genesis`'s JSON-Schema
237
223
  * via the `definition` "Timestamp".
238
224
  */
239
225
  export type Timestamp =
240
226
  string;
241
227
  /**
242
- * This interface was referenced by `GenesisJson`'s JSON-Schema
228
+ * This interface was referenced by `Genesis`'s JSON-Schema
243
229
  * via the `definition` "Path".
244
230
  */
245
231
  export type Path =
246
232
  string;
247
233
  /**
248
- * This interface was referenced by `GenesisJson`'s JSON-Schema
234
+ * This interface was referenced by `Genesis`'s JSON-Schema
249
235
  * via the `definition` "ShellMaterializedBase".
250
236
  */
251
237
  export type ShellMaterializedBase =
252
238
  {
253
239
  version: 1;
254
240
  resourceKind?: "materialized";
255
- } & ResourceBase &
241
+ } & ResourceShellBase &
256
242
  CreationContextFacet &
257
243
  ResourceKindFacet &
258
244
  TimestampFacet &
259
245
  PathFacet;
260
246
  /**
261
- * This interface was referenced by `GenesisJson`'s JSON-Schema
247
+ * This interface was referenced by `Genesis`'s JSON-Schema
262
248
  * via the `definition` "ShellMaterialized".
263
249
  */
264
250
  export type ShellMaterializedBase1 =
265
251
  {
266
252
  version: 1;
267
253
  resourceKind?: "materialized";
268
- } & ResourceBase &
254
+ } & ResourceShellBase &
269
255
  CreationContextFacet &
270
256
  ResourceKindFacet &
271
257
  TimestampFacet &
272
258
  PathFacet;
273
259
  /**
274
- * This interface was referenced by `GenesisJson`'s JSON-Schema
260
+ * This interface was referenced by `Genesis`'s JSON-Schema
275
261
  * via the `definition` "ResourceMissing".
276
262
  */
277
263
  export type ResourceMissing =
278
264
  {
279
265
  resourceKind?: "missing";
280
- } & ResourceBase &
266
+ } & ResourceShellBase &
281
267
  ResourceKindFacet;
282
268
  /**
283
- * This interface was referenced by `GenesisJson`'s JSON-Schema
269
+ * This interface was referenced by `Genesis`'s JSON-Schema
284
270
  * via the `definition` "ResourceInputPotential".
285
271
  */
286
272
  export type ResourceInputPotential =
287
273
  {
288
274
  resourceKind?: "input-potential";
289
- } & ResourceBase &
275
+ } & ResourceShellBase &
290
276
  CreationContextFacet &
291
277
  ResourceKindFacet;
292
278
  /**
293
- * This interface was referenced by `GenesisJson`'s JSON-Schema
279
+ * This interface was referenced by `Genesis`'s JSON-Schema
294
280
  * via the `definition` "ResourceOutputPotential".
295
281
  */
296
282
  export type ResourceOutputPotential =
297
283
  {
298
284
  resourceKind?: "output-potential";
299
- } & ResourceBase &
285
+ } & ResourceShellBase &
300
286
  CreationContextFacet &
301
287
  ResourceKindFacet;
302
288
  /**
303
- * This interface was referenced by `GenesisJson`'s JSON-Schema
289
+ * This interface was referenced by `Genesis`'s JSON-Schema
304
290
  * via the `definition` "JsonData".
305
291
  */
306
292
  export type JsonData =
@@ -308,12 +294,12 @@ export type JsonData =
308
294
  | boolean
309
295
  | number
310
296
  | string
311
- | JsonData
297
+ | JsonData[]
312
298
  | {
313
299
  [k: string]: JsonData;
314
300
  };
315
301
  /**
316
- * This interface was referenced by `GenesisJson`'s JSON-Schema
302
+ * This interface was referenced by `Genesis`'s JSON-Schema
317
303
  * via the `definition` "ResourceMaterialized".
318
304
  */
319
305
  export type ResourceMaterialized =
@@ -321,19 +307,19 @@ export type ResourceMaterialized =
321
307
  } & ShellMaterializedBase &
322
308
  NucleusFacet1;
323
309
  /**
324
- * This interface was referenced by `GenesisJson`'s JSON-Schema
310
+ * This interface was referenced by `Genesis`'s JSON-Schema
325
311
  * via the `definition` "Resource".
326
312
  */
327
313
  export type Resource =
328
314
  ResourceMissing | ResourceInputPotential | ResourceOutputPotential | ResourceMaterialized;
329
315
  /**
330
- * This interface was referenced by `GenesisJson`'s JSON-Schema
316
+ * This interface was referenced by `Genesis`'s JSON-Schema
331
317
  * via the `definition` "StepArray".
332
318
  */
333
319
  export type StepArray =
334
320
  Step[];
335
321
  /**
336
- * This interface was referenced by `GenesisJson`'s JSON-Schema
322
+ * This interface was referenced by `Genesis`'s JSON-Schema
337
323
  * via the `definition` "RawStrategy".
338
324
  */
339
325
  export type RawStrategy =
@@ -341,25 +327,25 @@ export type RawStrategy =
341
327
  } & StepsFacet &
342
328
  StrategyStateFacet;
343
329
  /**
344
- * This interface was referenced by `GenesisJson`'s JSON-Schema
330
+ * This interface was referenced by `Genesis`'s JSON-Schema
345
331
  * via the `definition` "RunnableStrategyIdentity".
346
332
  */
347
333
  export type RunnableStrategyIdentity =
348
334
  `RUNNABLE_STRATEGY-${string}`;
349
335
  /**
350
- * This interface was referenced by `GenesisJson`'s JSON-Schema
336
+ * This interface was referenced by `Genesis`'s JSON-Schema
351
337
  * via the `definition` "RunnableStrategyStatus".
352
338
  */
353
339
  export type RunnableStrategyStatus =
354
340
  "pending" | "running" | "completed" | "failed" | "cancelled";
355
341
  /**
356
- * This interface was referenced by `GenesisJson`'s JSON-Schema
342
+ * This interface was referenced by `Genesis`'s JSON-Schema
357
343
  * via the `definition` "StrategyThreadIdentity".
358
344
  */
359
345
  export type StrategyThreadIdentity =
360
346
  `STRATEGY_THREAD-${string}`;
361
347
  /**
362
- * This interface was referenced by `GenesisJson`'s JSON-Schema
348
+ * This interface was referenced by `Genesis`'s JSON-Schema
363
349
  * via the `definition` "RunnableStrategy".
364
350
  */
365
351
  export type RunnableStrategy =
@@ -369,7 +355,7 @@ export type RunnableStrategy =
369
355
  } & StrategyThreadMapFacet1 &
370
356
  StrategyStateFacet1;
371
357
  /**
372
- * This interface was referenced by `GenesisJson`'s JSON-Schema
358
+ * This interface was referenced by `Genesis`'s JSON-Schema
373
359
  * via the `definition` "RunnableStrategyUpdate".
374
360
  */
375
361
  export type RunnableStrategyUpdate =
@@ -384,7 +370,7 @@ export type RunnableStrategy1 =
384
370
  } & StrategyThreadMapFacet1 &
385
371
  StrategyStateFacet1;
386
372
  /**
387
- * This interface was referenced by `GenesisJson`'s JSON-Schema
373
+ * This interface was referenced by `Genesis`'s JSON-Schema
388
374
  * via the `definition` "RunEventUpdates".
389
375
  */
390
376
  export type RunEventUpdates =
@@ -397,13 +383,13 @@ export type RunEventUpdates =
397
383
  } | null;
398
384
  } & StrategyStateDelta;
399
385
  /**
400
- * This interface was referenced by `GenesisJson`'s JSON-Schema
386
+ * This interface was referenced by `Genesis`'s JSON-Schema
401
387
  * via the `definition` "RunEventKind".
402
388
  */
403
389
  export type RunEventKind =
404
390
  "graph_start" | "tick" | "interrupt" | "graph_end";
405
391
  /**
406
- * This interface was referenced by `GenesisJson`'s JSON-Schema
392
+ * This interface was referenced by `Genesis`'s JSON-Schema
407
393
  * via the `definition` "GraphStartRunEvent".
408
394
  */
409
395
  export type GraphStartRunEvent =
@@ -412,7 +398,7 @@ export type GraphStartRunEvent =
412
398
  runnableStrategySeed: RunnableStrategy;
413
399
  };
414
400
  /**
415
- * This interface was referenced by `GenesisJson`'s JSON-Schema
401
+ * This interface was referenced by `Genesis`'s JSON-Schema
416
402
  * via the `definition` "TickRunEvent".
417
403
  */
418
404
  export type TickRunEvent =
@@ -420,7 +406,7 @@ export type TickRunEvent =
420
406
  runEventKind?: "tick";
421
407
  };
422
408
  /**
423
- * This interface was referenced by `GenesisJson`'s JSON-Schema
409
+ * This interface was referenced by `Genesis`'s JSON-Schema
424
410
  * via the `definition` "InterruptRunEvent".
425
411
  */
426
412
  export type InterruptRunEvent =
@@ -428,7 +414,7 @@ export type InterruptRunEvent =
428
414
  runEventKind?: "interrupt";
429
415
  };
430
416
  /**
431
- * This interface was referenced by `GenesisJson`'s JSON-Schema
417
+ * This interface was referenced by `Genesis`'s JSON-Schema
432
418
  * via the `definition` "GraphEndRunEvent".
433
419
  */
434
420
  export type GraphEndRunEvent =
@@ -436,79 +422,57 @@ export type GraphEndRunEvent =
436
422
  runEventKind?: "graph_end";
437
423
  };
438
424
  /**
439
- * This interface was referenced by `GenesisJson`'s JSON-Schema
425
+ * This interface was referenced by `Genesis`'s JSON-Schema
440
426
  * via the `definition` "RunEvent".
441
427
  */
442
428
  export type RunEvent =
443
429
  GraphStartRunEvent | TickRunEvent | InterruptRunEvent | GraphEndRunEvent;
444
430
  /**
445
- * This interface was referenced by `GenesisJson`'s JSON-Schema
431
+ * This interface was referenced by `Genesis`'s JSON-Schema
446
432
  * via the `definition` "StrategyRunIdentity".
447
433
  */
448
434
  export type StrategyRunIdentity =
449
435
  `STRATEGY_RUN-${string}`;
450
436
  /**
451
- * This interface was referenced by `GenesisJson`'s JSON-Schema
437
+ * This interface was referenced by `Genesis`'s JSON-Schema
452
438
  * via the `definition` "GoalIdentity".
453
439
  */
454
440
  export type GoalIdentity =
455
441
  `GOAL-${string}`;
456
442
  /**
457
- * This interface was referenced by `GenesisJson`'s JSON-Schema
458
- * via the `definition` "Goal".
459
- */
460
- export type Goal =
461
- {
462
- identity: GoalIdentity;
463
- target: number;
464
- disallowedJobs?: JobIdentity[];
465
- disallowedSequences?: JobIdentity[][];
466
- minSteps?: number;
467
- maxSteps?: number;
468
- } & DomainFacet;
469
- /**
470
- * This interface was referenced by `GenesisJson`'s JSON-Schema
443
+ * This interface was referenced by `Genesis`'s JSON-Schema
471
444
  * via the `definition` "NaturalIdentity".
472
445
  */
473
446
  export type NaturalIdentity =
474
447
  number;
475
448
  /**
476
- * This interface was referenced by `GenesisJson`'s JSON-Schema
449
+ * This interface was referenced by `Genesis`'s JSON-Schema
477
450
  * via the `definition` "BooleanIdentity".
478
451
  */
479
452
  export type BooleanIdentity =
480
453
  boolean;
481
454
 
482
- export interface GenesisJson {
483
- }
484
455
  /**
485
- * This interface was referenced by `GenesisJson`'s JSON-Schema
456
+ * This interface was referenced by `Genesis`'s JSON-Schema
486
457
  * via the `definition` "NameFacet".
487
458
  */
488
459
  export interface NameFacet {
489
460
  name: Name;
490
461
  }
491
462
  /**
492
- * This interface was referenced by `GenesisJson`'s JSON-Schema
463
+ * This interface was referenced by `Genesis`'s JSON-Schema
493
464
  * via the `definition` "DescriptionFacet".
494
465
  */
495
466
  export interface DescriptionFacet {
496
467
  description: Description;
497
468
  }
498
469
  /**
499
- * This interface was referenced by `GenesisJson`'s JSON-Schema
500
- * via the `definition` "ResourceTypeImplementationKindFacet".
501
- */
502
- export interface ResourceTypeImplementationKindFacet {
503
- resourceTypeImplementationKind: ResourceTypeImplementationKind;
504
- }
505
- /**
506
- * This interface was referenced by `GenesisJson`'s JSON-Schema
470
+ * This interface was referenced by `Genesis`'s JSON-Schema
507
471
  * via the `definition` "RoleMap".
508
472
  */
509
473
  export type RoleMap = Record<ResourceRoleIdentity, ResourceRoleValue>;
510
474
  /**
511
- * This interface was referenced by `GenesisJson`'s JSON-Schema
475
+ * This interface was referenced by `Genesis`'s JSON-Schema
512
476
  * via the `definition` "Roles".
513
477
  */
514
478
  export interface Roles {
@@ -522,21 +486,14 @@ export interface Roles {
522
486
  };
523
487
  }
524
488
  /**
525
- * This interface was referenced by `GenesisJson`'s JSON-Schema
489
+ * This interface was referenced by `Genesis`'s JSON-Schema
526
490
  * via the `definition` "RolesFacet".
527
491
  */
528
492
  export interface RolesFacet {
529
493
  roles: Roles;
530
494
  }
531
495
  /**
532
- * This interface was referenced by `GenesisJson`'s JSON-Schema
533
- * via the `definition` "DomainFacet".
534
- */
535
- export interface DomainFacet {
536
- domain: Domain;
537
- }
538
- /**
539
- * This interface was referenced by `GenesisJson`'s JSON-Schema
496
+ * This interface was referenced by `Genesis`'s JSON-Schema
540
497
  * via the `definition` "RoleBindings".
541
498
  */
542
499
  export interface RoleBindings {
@@ -544,14 +501,14 @@ export interface RoleBindings {
544
501
  outputBindings: RoleBindingArray;
545
502
  }
546
503
  /**
547
- * This interface was referenced by `GenesisJson`'s JSON-Schema
504
+ * This interface was referenced by `Genesis`'s JSON-Schema
548
505
  * via the `definition` "RoleBindingsFacet".
549
506
  */
550
507
  export interface RoleBindingsFacet {
551
508
  roleBindings: RoleBindings;
552
509
  }
553
510
  /**
554
- * This interface was referenced by `GenesisJson`'s JSON-Schema
511
+ * This interface was referenced by `Genesis`'s JSON-Schema
555
512
  * via the `definition` "StepKindFacet".
556
513
  */
557
514
  export interface StepKindFacet {
@@ -561,7 +518,7 @@ export interface RoleBindingsFacet1 {
561
518
  roleBindings: RoleBindings;
562
519
  }
563
520
  /**
564
- * This interface was referenced by `GenesisJson`'s JSON-Schema
521
+ * This interface was referenced by `Genesis`'s JSON-Schema
565
522
  * via the `definition` "Conditional".
566
523
  */
567
524
  export interface Conditional {
@@ -569,7 +526,7 @@ export interface Conditional {
569
526
  what: JobStep;
570
527
  }
571
528
  /**
572
- * This interface was referenced by `GenesisJson`'s JSON-Schema
529
+ * This interface was referenced by `Genesis`'s JSON-Schema
573
530
  * via the `definition` "CreationContext".
574
531
  */
575
532
  export interface CreationContext {
@@ -577,50 +534,51 @@ export interface CreationContext {
577
534
  jobStepHandle: JobStepIdentity;
578
535
  }
579
536
  /**
580
- * This interface was referenced by `GenesisJson`'s JSON-Schema
537
+ * This interface was referenced by `Genesis`'s JSON-Schema
581
538
  * via the `definition` "CreationContextFacet".
582
539
  */
583
540
  export interface CreationContextFacet {
584
541
  creationContext: CreationContext;
585
542
  }
586
543
  /**
587
- * This interface was referenced by `GenesisJson`'s JSON-Schema
588
- * via the `definition` "ResourceBase".
544
+ * This interface was referenced by `Genesis`'s JSON-Schema
545
+ * via the `definition` "ResourceShellBase".
589
546
  */
590
- export interface ResourceBase {
547
+ export interface ResourceShellBase {
591
548
  identity: ResourceIdentity;
592
549
  resourceTypeHandle: ResourceTypeIdentity;
550
+ resourceKind: ResourceKind;
593
551
  }
594
552
  /**
595
- * This interface was referenced by `GenesisJson`'s JSON-Schema
553
+ * This interface was referenced by `Genesis`'s JSON-Schema
596
554
  * via the `definition` "ResourceKindFacet".
597
555
  */
598
556
  export interface ResourceKindFacet {
599
557
  resourceKind: ResourceKind;
600
558
  }
601
559
  /**
602
- * This interface was referenced by `GenesisJson`'s JSON-Schema
560
+ * This interface was referenced by `Genesis`'s JSON-Schema
603
561
  * via the `definition` "TimestampFacet".
604
562
  */
605
563
  export interface TimestampFacet {
606
564
  timestamp: Timestamp;
607
565
  }
608
566
  /**
609
- * This interface was referenced by `GenesisJson`'s JSON-Schema
567
+ * This interface was referenced by `Genesis`'s JSON-Schema
610
568
  * via the `definition` "PathFacet".
611
569
  */
612
570
  export interface PathFacet {
613
571
  path: Path;
614
572
  }
615
573
  /**
616
- * This interface was referenced by `GenesisJson`'s JSON-Schema
574
+ * This interface was referenced by `Genesis`'s JSON-Schema
617
575
  * via the `definition` "Nucleus".
618
576
  */
619
577
  export interface Nucleus {
620
578
  [k: string]: JsonData;
621
579
  }
622
580
  /**
623
- * This interface was referenced by `GenesisJson`'s JSON-Schema
581
+ * This interface was referenced by `Genesis`'s JSON-Schema
624
582
  * via the `definition` "NucleusFacet".
625
583
  */
626
584
  export interface NucleusFacet {
@@ -630,35 +588,31 @@ export interface NucleusFacet1 {
630
588
  nucleus: Nucleus;
631
589
  }
632
590
  /**
633
- * This interface was referenced by `GenesisJson`'s JSON-Schema
591
+ * This interface was referenced by `Genesis`'s JSON-Schema
634
592
  * via the `definition` "JobStepSocket".
635
593
  */
636
- export interface JobStepSocket {
637
- [k: string]: Resource;
638
- }
594
+ export type JobStepSocket = Record<ResourceRoleIdentity, Resource>;
639
595
  /**
640
- * This interface was referenced by `GenesisJson`'s JSON-Schema
596
+ * This interface was referenced by `Genesis`'s JSON-Schema
641
597
  * via the `definition` "StrategyState".
642
598
  */
643
- export interface StrategyState {
644
- [k: string]: JobStepSocket;
645
- }
599
+ export type StrategyState = Record<JobStepIdentity, JobStepSocket>;
646
600
  /**
647
- * This interface was referenced by `GenesisJson`'s JSON-Schema
601
+ * This interface was referenced by `Genesis`'s JSON-Schema
648
602
  * via the `definition` "StrategyStateFacet".
649
603
  */
650
604
  export interface StrategyStateFacet {
651
605
  strategyState: StrategyState;
652
606
  }
653
607
  /**
654
- * This interface was referenced by `GenesisJson`'s JSON-Schema
608
+ * This interface was referenced by `Genesis`'s JSON-Schema
655
609
  * via the `definition` "StepsFacet".
656
610
  */
657
611
  export interface StepsFacet {
658
612
  steps: StepArray;
659
613
  }
660
614
  /**
661
- * This interface was referenced by `GenesisJson`'s JSON-Schema
615
+ * This interface was referenced by `Genesis`'s JSON-Schema
662
616
  * via the `definition` "RunnableStrategyContext".
663
617
  */
664
618
  export interface RunnableStrategyContext {
@@ -667,14 +621,12 @@ export interface RunnableStrategyContext {
667
621
  completedAt?: Timestamp;
668
622
  }
669
623
  /**
670
- * This interface was referenced by `GenesisJson`'s JSON-Schema
624
+ * This interface was referenced by `Genesis`'s JSON-Schema
671
625
  * via the `definition` "StrategyThreadMap".
672
626
  */
673
- export interface StrategyThreadMap {
674
- [k: string]: StepArray;
675
- }
627
+ export type StrategyThreadMap = Record<StrategyThreadIdentity, StepArray>;
676
628
  /**
677
- * This interface was referenced by `GenesisJson`'s JSON-Schema
629
+ * This interface was referenced by `Genesis`'s JSON-Schema
678
630
  * via the `definition` "StrategyThreadMapFacet".
679
631
  */
680
632
  export interface StrategyThreadMapFacet {
@@ -687,14 +639,14 @@ export interface StrategyStateFacet1 {
687
639
  strategyState: StrategyState;
688
640
  }
689
641
  /**
690
- * This interface was referenced by `GenesisJson`'s JSON-Schema
642
+ * This interface was referenced by `Genesis`'s JSON-Schema
691
643
  * via the `definition` "StrategyStateDelta".
692
644
  */
693
645
  export interface StrategyStateDelta {
694
646
  strategyStateUpdate: StrategyState;
695
647
  }
696
648
  /**
697
- * This interface was referenced by `GenesisJson`'s JSON-Schema
649
+ * This interface was referenced by `Genesis`'s JSON-Schema
698
650
  * via the `definition` "RunEventCounters".
699
651
  */
700
652
  export interface RunEventCounters {
@@ -702,7 +654,7 @@ export interface RunEventCounters {
702
654
  iterationCounterAfter?: number;
703
655
  }
704
656
  /**
705
- * This interface was referenced by `GenesisJson`'s JSON-Schema
657
+ * This interface was referenced by `Genesis`'s JSON-Schema
706
658
  * via the `definition` "RunEventStepMetadata".
707
659
  */
708
660
  export interface RunEventStepMetadata {
@@ -711,7 +663,7 @@ export interface RunEventStepMetadata {
711
663
  threadStepIndex: number;
712
664
  }
713
665
  /**
714
- * This interface was referenced by `GenesisJson`'s JSON-Schema
666
+ * This interface was referenced by `Genesis`'s JSON-Schema
715
667
  * via the `definition` "RunEventBase".
716
668
  */
717
669
  export interface RunEventBase {
@@ -726,7 +678,7 @@ export interface RunEventBase {
726
678
  updates?: RunEventUpdates;
727
679
  }
728
680
  /**
729
- * This interface was referenced by `GenesisJson`'s JSON-Schema
681
+ * This interface was referenced by `Genesis`'s JSON-Schema
730
682
  * via the `definition` "StrategyRun".
731
683
  */
732
684
  export interface StrategyRun {
@@ -736,988 +688,29 @@ export interface StrategyRun {
736
688
  runEvents: RunEvent[];
737
689
  }
738
690
  /**
739
- * This interface was referenced by `GenesisJson`'s JSON-Schema
691
+ * This interface was referenced by `Genesis`'s JSON-Schema
692
+ * via the `definition` "Goal".
693
+ */
694
+ export interface Goal {
695
+ identity: GoalIdentity;
696
+ target: number;
697
+ disallowedJobs?: JobIdentity[];
698
+ disallowedSequences?: JobIdentity[][];
699
+ minSteps?: number;
700
+ maxSteps?: number;
701
+ }
702
+ /**
703
+ * This interface was referenced by `Genesis`'s JSON-Schema
740
704
  * via the `definition` "Natural".
741
705
  */
742
706
  export interface Natural {
743
707
  identity: NaturalIdentity;
744
708
  }
745
709
  /**
746
- * This interface was referenced by `GenesisJson`'s JSON-Schema
710
+ * This interface was referenced by `Genesis`'s JSON-Schema
747
711
  * via the `definition` "Boolean".
748
712
  */
749
713
  export interface Boolean {
750
714
  identity: BooleanIdentity;
751
715
  }
752
716
 
753
- export type Normalized =
754
- {
755
- identity: GoalIdentity;
756
- target: number;
757
- disallowedJobs?: JobIdentity[];
758
- disallowedSequences?: JobIdentity[][];
759
- minSteps?: number;
760
- maxSteps?: number;
761
- } & DomainFacet;
762
- export type GoalIdentity =
763
- `GOAL-${string}`;
764
- export type JobIdentity =
765
- `JOB-${string}`;
766
- export type Domain =
767
- "internal" | "numerical" | "biological" | "logical" | "augmental";
768
-
769
- export interface DomainFacet {
770
- domain: Domain;
771
- }
772
-
773
- export type Normalized =
774
- {
775
- identity: JobIdentity;
776
- implementationUri: Uri;
777
- } & DocumentationFacet &
778
- DomainFacet &
779
- RolesFacet;
780
- export type JobIdentity =
781
- `JOB-${string}`;
782
- export type Uri =
783
- string;
784
- export type DocumentationFacet =
785
- NameFacet & DescriptionFacet;
786
- export type Name =
787
- string;
788
- export type Description =
789
- string;
790
- export type Domain =
791
- "internal" | "numerical" | "biological" | "logical" | "augmental";
792
- export type ResourceRoleValue =
793
- {
794
- resourceTypeHandle: ResourceTypeIdentity;
795
- } & DocumentationFacet;
796
- export type ResourceTypeIdentity =
797
- `TYPE-${string}`;
798
-
799
- export interface NameFacet {
800
- name: Name;
801
- }
802
- export interface DescriptionFacet {
803
- description: Description;
804
- }
805
- export interface DomainFacet {
806
- domain: Domain;
807
- }
808
- export interface RolesFacet {
809
- roles: Roles;
810
- }
811
- export interface Roles {
812
- inputMap: RoleMap;
813
- outputMap: RoleMap & {
814
- "ROLE-ErrorOutput": ResourceRoleValue & {
815
- resourceTypeHandle: "TYPE-Error";
816
- name: "ErrorOutput";
817
- description: "Represents error outputs from job runs.";
818
- };
819
- };
820
- }
821
- export type RoleMap = Record<ResourceRoleIdentity, ResourceRoleValue>;
822
-
823
- export type Normalized =
824
- {
825
- } & StepsFacet &
826
- StrategyStateFacet;
827
- export type Step =
828
- JobStep | BranchStep | WhileStep | ForStep;
829
- export type JobStep =
830
- {
831
- identity: JobStepIdentity;
832
- stepKind?: "job";
833
- jobHandle: JobIdentity;
834
- } & StepKindFacet &
835
- RoleBindingsFacet;
836
- export type JobStepIdentity =
837
- `JOB_STEP-${string}`;
838
- export type JobIdentity =
839
- `JOB-${string}`;
840
- export type StepKind =
841
- "job" | "branch" | "while" | "for";
842
- export type ResourceRoleIdentity =
843
- `ROLE-${string}`;
844
- export type RoleBindingArray =
845
- ResourceRoleIdentity[];
846
- export type BranchStep =
847
- {
848
- identity: BranchStepIdentity;
849
- stepKind?: "branch";
850
- /**
851
- * @minItems 1
852
- */
853
- cases: [Conditional, ...Conditional[]];
854
- } & StepKindFacet;
855
- export type BranchStepIdentity =
856
- `BRANCH_STEP-${string}`;
857
- export type WhileStep =
858
- {
859
- identity: WhileStepIdentity;
860
- stepKind?: "while";
861
- case: Conditional;
862
- } & StepKindFacet;
863
- export type WhileStepIdentity =
864
- `WHILE_STEP-${string}`;
865
- export type ForStep =
866
- {
867
- identity: ForStepIdentity;
868
- stepKind?: "for";
869
- case: Conditional;
870
- } & StepKindFacet;
871
- export type ForStepIdentity =
872
- `FOR_STEP-${string}`;
873
- export type StepArray =
874
- Step[];
875
- export type Resource =
876
- ResourceMissing | ResourceInputPotential | ResourceOutputPotential | ResourceMaterialized;
877
- export type ResourceMissing =
878
- {
879
- resourceKind?: "missing";
880
- } & ResourceBase &
881
- ResourceKindFacet;
882
- export type ResourceIdentity =
883
- `RESOURCE-${string}`;
884
- export type ResourceTypeIdentity =
885
- `TYPE-${string}`;
886
- export type ResourceKind =
887
- "missing" | "input-potential" | "output-potential" | "materialized";
888
- export type ResourceInputPotential =
889
- {
890
- resourceKind?: "input-potential";
891
- } & ResourceBase &
892
- CreationContextFacet &
893
- ResourceKindFacet;
894
- export type ResourceOutputPotential =
895
- {
896
- resourceKind?: "output-potential";
897
- } & ResourceBase &
898
- CreationContextFacet &
899
- ResourceKindFacet;
900
- export type ResourceMaterialized =
901
- {
902
- } & ShellMaterializedBase &
903
- NucleusFacet;
904
- export type ShellMaterializedBase =
905
- {
906
- version: 1;
907
- resourceKind?: "materialized";
908
- } & ResourceBase &
909
- CreationContextFacet &
910
- ResourceKindFacet &
911
- TimestampFacet &
912
- PathFacet;
913
- export type Timestamp =
914
- string;
915
- export type Path =
916
- string;
917
- export type JsonData =
918
- | null
919
- | boolean
920
- | number
921
- | string
922
- | JsonData
923
- | {
924
- [k: string]: JsonData;
925
- };
926
-
927
- export interface StepsFacet {
928
- steps: StepArray;
929
- }
930
- export interface StepKindFacet {
931
- stepKind: StepKind;
932
- }
933
- export interface RoleBindingsFacet {
934
- roleBindings: RoleBindings;
935
- }
936
- export interface RoleBindings {
937
- inputBindings: RoleBindingArray;
938
- outputBindings: RoleBindingArray;
939
- }
940
- export interface Conditional {
941
- when: JobStep;
942
- what: JobStep;
943
- }
944
- export interface StrategyStateFacet {
945
- strategyState: StrategyState;
946
- }
947
- export interface StrategyState {
948
- [k: string]: JobStepSocket;
949
- }
950
- export interface JobStepSocket {
951
- [k: string]: Resource;
952
- }
953
- export interface ResourceBase {
954
- identity: ResourceIdentity;
955
- resourceTypeHandle: ResourceTypeIdentity;
956
- }
957
- export interface ResourceKindFacet {
958
- resourceKind: ResourceKind;
959
- }
960
- export interface CreationContextFacet {
961
- creationContext: CreationContext;
962
- }
963
- export interface CreationContext {
964
- resourceRoleHandle: ResourceRoleIdentity;
965
- jobStepHandle: JobStepIdentity;
966
- }
967
- export interface TimestampFacet {
968
- timestamp: Timestamp;
969
- }
970
- export interface PathFacet {
971
- path: Path;
972
- }
973
- export interface NucleusFacet {
974
- nucleus: Nucleus;
975
- }
976
- export interface Nucleus {
977
- [k: string]: JsonData;
978
- }
979
-
980
- export type Normalized =
981
- {
982
- identity: ResourceTypeIdentity;
983
- nucleusSchema: unknown;
984
- embeddingUriMap?: {
985
- [k: string]: Uri;
986
- };
987
- generatorUriMap?: {
988
- [k: string]: Uri;
989
- };
990
- } & DocumentationFacet &
991
- ResourceTypeImplementationKindFacet;
992
- export type ResourceTypeIdentity =
993
- `TYPE-${string}`;
994
- export type Uri =
995
- string;
996
- export type DocumentationFacet =
997
- NameFacet & DescriptionFacet;
998
- export type Name =
999
- string;
1000
- export type Description =
1001
- string;
1002
- export type ResourceTypeImplementationKind =
1003
- "internal-without-identity" | "internal-with-identity" | "external";
1004
-
1005
- export interface NameFacet {
1006
- name: Name;
1007
- }
1008
- export interface DescriptionFacet {
1009
- description: Description;
1010
- }
1011
- export interface ResourceTypeImplementationKindFacet {
1012
- resourceTypeImplementationKind: ResourceTypeImplementationKind;
1013
- }
1014
-
1015
- export type Normalized =
1016
- {
1017
- identity: RunnableStrategyIdentity;
1018
- runnableStrategyContext: RunnableStrategyContext;
1019
- } & StrategyThreadMapFacet &
1020
- StrategyStateFacet;
1021
- export type RunnableStrategyIdentity =
1022
- `RUNNABLE_STRATEGY-${string}`;
1023
- export type RunnableStrategyStatus =
1024
- "pending" | "running" | "completed" | "failed" | "cancelled";
1025
- export type Timestamp =
1026
- string;
1027
- export type Step =
1028
- JobStep | BranchStep | WhileStep | ForStep;
1029
- export type JobStep =
1030
- {
1031
- identity: JobStepIdentity;
1032
- stepKind?: "job";
1033
- jobHandle: JobIdentity;
1034
- } & StepKindFacet &
1035
- RoleBindingsFacet;
1036
- export type JobStepIdentity =
1037
- `JOB_STEP-${string}`;
1038
- export type JobIdentity =
1039
- `JOB-${string}`;
1040
- export type StepKind =
1041
- "job" | "branch" | "while" | "for";
1042
- export type ResourceRoleIdentity =
1043
- `ROLE-${string}`;
1044
- export type RoleBindingArray =
1045
- ResourceRoleIdentity[];
1046
- export type BranchStep =
1047
- {
1048
- identity: BranchStepIdentity;
1049
- stepKind?: "branch";
1050
- /**
1051
- * @minItems 1
1052
- */
1053
- cases: [Conditional, ...Conditional[]];
1054
- } & StepKindFacet;
1055
- export type BranchStepIdentity =
1056
- `BRANCH_STEP-${string}`;
1057
- export type WhileStep =
1058
- {
1059
- identity: WhileStepIdentity;
1060
- stepKind?: "while";
1061
- case: Conditional;
1062
- } & StepKindFacet;
1063
- export type WhileStepIdentity =
1064
- `WHILE_STEP-${string}`;
1065
- export type ForStep =
1066
- {
1067
- identity: ForStepIdentity;
1068
- stepKind?: "for";
1069
- case: Conditional;
1070
- } & StepKindFacet;
1071
- export type ForStepIdentity =
1072
- `FOR_STEP-${string}`;
1073
- export type StepArray =
1074
- Step[];
1075
- export type Resource =
1076
- ResourceMissing | ResourceInputPotential | ResourceOutputPotential | ResourceMaterialized;
1077
- export type ResourceMissing =
1078
- {
1079
- resourceKind?: "missing";
1080
- } & ResourceBase &
1081
- ResourceKindFacet;
1082
- export type ResourceIdentity =
1083
- `RESOURCE-${string}`;
1084
- export type ResourceTypeIdentity =
1085
- `TYPE-${string}`;
1086
- export type ResourceKind =
1087
- "missing" | "input-potential" | "output-potential" | "materialized";
1088
- export type ResourceInputPotential =
1089
- {
1090
- resourceKind?: "input-potential";
1091
- } & ResourceBase &
1092
- CreationContextFacet &
1093
- ResourceKindFacet;
1094
- export type ResourceOutputPotential =
1095
- {
1096
- resourceKind?: "output-potential";
1097
- } & ResourceBase &
1098
- CreationContextFacet &
1099
- ResourceKindFacet;
1100
- export type ResourceMaterialized =
1101
- {
1102
- } & ShellMaterializedBase &
1103
- NucleusFacet;
1104
- export type ShellMaterializedBase =
1105
- {
1106
- version: 1;
1107
- resourceKind?: "materialized";
1108
- } & ResourceBase &
1109
- CreationContextFacet &
1110
- ResourceKindFacet &
1111
- TimestampFacet &
1112
- PathFacet;
1113
- export type Path =
1114
- string;
1115
- export type JsonData =
1116
- | null
1117
- | boolean
1118
- | number
1119
- | string
1120
- | JsonData
1121
- | {
1122
- [k: string]: JsonData;
1123
- };
1124
-
1125
- export interface RunnableStrategyContext {
1126
- status: RunnableStrategyStatus;
1127
- startedAt?: Timestamp;
1128
- completedAt?: Timestamp;
1129
- }
1130
- export interface StrategyThreadMapFacet {
1131
- strategyThreadMap: StrategyThreadMap;
1132
- }
1133
- export interface StrategyThreadMap {
1134
- [k: string]: StepArray;
1135
- }
1136
- export interface StepKindFacet {
1137
- stepKind: StepKind;
1138
- }
1139
- export interface RoleBindingsFacet {
1140
- roleBindings: RoleBindings;
1141
- }
1142
- export interface RoleBindings {
1143
- inputBindings: RoleBindingArray;
1144
- outputBindings: RoleBindingArray;
1145
- }
1146
- export interface Conditional {
1147
- when: JobStep;
1148
- what: JobStep;
1149
- }
1150
- export interface StrategyStateFacet {
1151
- strategyState: StrategyState;
1152
- }
1153
- export interface StrategyState {
1154
- [k: string]: JobStepSocket;
1155
- }
1156
- export interface JobStepSocket {
1157
- [k: string]: Resource;
1158
- }
1159
- export interface ResourceBase {
1160
- identity: ResourceIdentity;
1161
- resourceTypeHandle: ResourceTypeIdentity;
1162
- }
1163
- export interface ResourceKindFacet {
1164
- resourceKind: ResourceKind;
1165
- }
1166
- export interface CreationContextFacet {
1167
- creationContext: CreationContext;
1168
- }
1169
- export interface CreationContext {
1170
- resourceRoleHandle: ResourceRoleIdentity;
1171
- jobStepHandle: JobStepIdentity;
1172
- }
1173
- export interface TimestampFacet {
1174
- timestamp: Timestamp;
1175
- }
1176
- export interface PathFacet {
1177
- path: Path;
1178
- }
1179
- export interface NucleusFacet {
1180
- nucleus: Nucleus;
1181
- }
1182
- export interface Nucleus {
1183
- [k: string]: JsonData;
1184
- }
1185
-
1186
- /**
1187
- * This interface was referenced by `Normalized`'s JSON-Schema
1188
- * via the `definition` "StrategyRunIdentity".
1189
- */
1190
- export type StrategyRunIdentity =
1191
- `STRATEGY_RUN-${string}`;
1192
- /**
1193
- * This interface was referenced by `Normalized`'s JSON-Schema
1194
- * via the `definition` "Timestamp".
1195
- */
1196
- export type Timestamp =
1197
- string;
1198
- /**
1199
- * This interface was referenced by `Normalized`'s JSON-Schema
1200
- * via the `definition` "RunEvent".
1201
- */
1202
- export type RunEvent =
1203
- GraphStartRunEvent | TickRunEvent | InterruptRunEvent | GraphEndRunEvent;
1204
- /**
1205
- * This interface was referenced by `Normalized`'s JSON-Schema
1206
- * via the `definition` "GraphStartRunEvent".
1207
- */
1208
- export type GraphStartRunEvent =
1209
- RunEventBase & {
1210
- runEventKind?: "graph_start";
1211
- runnableStrategySeed: RunnableStrategy;
1212
- };
1213
- /**
1214
- * This interface was referenced by `Normalized`'s JSON-Schema
1215
- * via the `definition` "RunEventKind".
1216
- */
1217
- export type RunEventKind =
1218
- "graph_start" | "tick" | "interrupt" | "graph_end";
1219
- /**
1220
- * This interface was referenced by `Normalized`'s JSON-Schema
1221
- * via the `definition` "RunnableStrategyIdentity".
1222
- */
1223
- export type RunnableStrategyIdentity =
1224
- `RUNNABLE_STRATEGY-${string}`;
1225
- /**
1226
- * This interface was referenced by `Normalized`'s JSON-Schema
1227
- * via the `definition` "StrategyThreadIdentity".
1228
- */
1229
- export type StrategyThreadIdentity =
1230
- `STRATEGY_THREAD-${string}`;
1231
- /**
1232
- * This interface was referenced by `Normalized`'s JSON-Schema
1233
- * via the `definition` "StepIdentity".
1234
- */
1235
- export type StepIdentity =
1236
- JobStepIdentity | BranchStepIdentity | WhileStepIdentity | ForStepIdentity;
1237
- /**
1238
- * This interface was referenced by `Normalized`'s JSON-Schema
1239
- * via the `definition` "JobStepIdentity".
1240
- */
1241
- export type JobStepIdentity =
1242
- `JOB_STEP-${string}`;
1243
- /**
1244
- * This interface was referenced by `Normalized`'s JSON-Schema
1245
- * via the `definition` "BranchStepIdentity".
1246
- */
1247
- export type BranchStepIdentity =
1248
- `BRANCH_STEP-${string}`;
1249
- /**
1250
- * This interface was referenced by `Normalized`'s JSON-Schema
1251
- * via the `definition` "WhileStepIdentity".
1252
- */
1253
- export type WhileStepIdentity =
1254
- `WHILE_STEP-${string}`;
1255
- /**
1256
- * This interface was referenced by `Normalized`'s JSON-Schema
1257
- * via the `definition` "ForStepIdentity".
1258
- */
1259
- export type ForStepIdentity =
1260
- `FOR_STEP-${string}`;
1261
- /**
1262
- * This interface was referenced by `Normalized`'s JSON-Schema
1263
- * via the `definition` "StepKind".
1264
- */
1265
- export type StepKind =
1266
- "job" | "branch" | "while" | "for";
1267
- /**
1268
- * This interface was referenced by `Normalized`'s JSON-Schema
1269
- * via the `definition` "RunEventUpdates".
1270
- */
1271
- export type RunEventUpdates =
1272
- {
1273
- stepsMutation?: {
1274
- insertAt: number;
1275
- inserted: StepArray;
1276
- };
1277
- interruptData?: {
1278
- } | null;
1279
- } & StrategyStateDelta;
1280
- /**
1281
- * This interface was referenced by `Normalized`'s JSON-Schema
1282
- * via the `definition` "Step".
1283
- */
1284
- export type Step =
1285
- JobStep | BranchStep | WhileStep | ForStep;
1286
- /**
1287
- * This interface was referenced by `Normalized`'s JSON-Schema
1288
- * via the `definition` "JobStep".
1289
- */
1290
- export type JobStep =
1291
- {
1292
- identity: JobStepIdentity;
1293
- stepKind?: "job";
1294
- jobHandle: JobIdentity;
1295
- } & StepKindFacet &
1296
- RoleBindingsFacet;
1297
- /**
1298
- * This interface was referenced by `Normalized`'s JSON-Schema
1299
- * via the `definition` "JobIdentity".
1300
- */
1301
- export type JobIdentity =
1302
- `JOB-${string}`;
1303
- /**
1304
- * This interface was referenced by `Normalized`'s JSON-Schema
1305
- * via the `definition` "ResourceRoleIdentity".
1306
- */
1307
- export type ResourceRoleIdentity =
1308
- `ROLE-${string}`;
1309
- /**
1310
- * This interface was referenced by `Normalized`'s JSON-Schema
1311
- * via the `definition` "RoleBindingArray".
1312
- */
1313
- export type RoleBindingArray =
1314
- ResourceRoleIdentity[];
1315
- /**
1316
- * This interface was referenced by `Normalized`'s JSON-Schema
1317
- * via the `definition` "BranchStep".
1318
- */
1319
- export type BranchStep =
1320
- {
1321
- identity: BranchStepIdentity;
1322
- stepKind?: "branch";
1323
- /**
1324
- * @minItems 1
1325
- */
1326
- cases: [Conditional, ...Conditional[]];
1327
- } & StepKindFacet;
1328
- /**
1329
- * This interface was referenced by `Normalized`'s JSON-Schema
1330
- * via the `definition` "WhileStep".
1331
- */
1332
- export type WhileStep =
1333
- {
1334
- identity: WhileStepIdentity;
1335
- stepKind?: "while";
1336
- case: Conditional;
1337
- } & StepKindFacet;
1338
- /**
1339
- * This interface was referenced by `Normalized`'s JSON-Schema
1340
- * via the `definition` "ForStep".
1341
- */
1342
- export type ForStep =
1343
- {
1344
- identity: ForStepIdentity;
1345
- stepKind?: "for";
1346
- case: Conditional;
1347
- } & StepKindFacet;
1348
- /**
1349
- * This interface was referenced by `Normalized`'s JSON-Schema
1350
- * via the `definition` "StepArray".
1351
- */
1352
- export type StepArray =
1353
- Step[];
1354
- /**
1355
- * This interface was referenced by `Normalized`'s JSON-Schema
1356
- * via the `definition` "Resource".
1357
- */
1358
- export type Resource =
1359
- ResourceMissing | ResourceInputPotential | ResourceOutputPotential | ResourceMaterialized;
1360
- export type ResourceMissing =
1361
- {
1362
- resourceKind?: "missing";
1363
- } & ResourceBase &
1364
- ResourceKindFacet;
1365
- /**
1366
- * This interface was referenced by `Normalized`'s JSON-Schema
1367
- * via the `definition` "ResourceIdentity".
1368
- */
1369
- export type ResourceIdentity =
1370
- `RESOURCE-${string}`;
1371
- /**
1372
- * This interface was referenced by `Normalized`'s JSON-Schema
1373
- * via the `definition` "ResourceTypeIdentity".
1374
- */
1375
- export type ResourceTypeIdentity =
1376
- `TYPE-${string}`;
1377
- /**
1378
- * This interface was referenced by `Normalized`'s JSON-Schema
1379
- * via the `definition` "ResourceKind".
1380
- */
1381
- export type ResourceKind =
1382
- "missing" | "input-potential" | "output-potential" | "materialized";
1383
- export type ResourceInputPotential =
1384
- {
1385
- resourceKind?: "input-potential";
1386
- } & ResourceBase &
1387
- CreationContextFacet &
1388
- ResourceKindFacet;
1389
- export type ResourceOutputPotential =
1390
- {
1391
- resourceKind?: "output-potential";
1392
- } & ResourceBase &
1393
- CreationContextFacet &
1394
- ResourceKindFacet;
1395
- /**
1396
- * This interface was referenced by `Normalized`'s JSON-Schema
1397
- * via the `definition` "ResourceMaterialized".
1398
- */
1399
- export type ResourceMaterialized =
1400
- {
1401
- } & ShellMaterializedBase &
1402
- NucleusFacet;
1403
- /**
1404
- * This interface was referenced by `Normalized`'s JSON-Schema
1405
- * via the `definition` "ShellMaterializedBase".
1406
- */
1407
- export type ShellMaterializedBase =
1408
- {
1409
- version: 1;
1410
- resourceKind?: "materialized";
1411
- } & ResourceBase &
1412
- CreationContextFacet &
1413
- ResourceKindFacet &
1414
- TimestampFacet &
1415
- PathFacet;
1416
- /**
1417
- * This interface was referenced by `Normalized`'s JSON-Schema
1418
- * via the `definition` "Path".
1419
- */
1420
- export type Path =
1421
- string;
1422
- /**
1423
- * This interface was referenced by `Normalized`'s JSON-Schema
1424
- * via the `definition` "JsonData".
1425
- */
1426
- export type JsonData =
1427
- | null
1428
- | boolean
1429
- | number
1430
- | string
1431
- | JsonData
1432
- | {
1433
- [k: string]: JsonData;
1434
- };
1435
- /**
1436
- * This interface was referenced by `Normalized`'s JSON-Schema
1437
- * via the `definition` "RunnableStrategy".
1438
- */
1439
- export type RunnableStrategy =
1440
- {
1441
- identity: RunnableStrategyIdentity;
1442
- runnableStrategyContext: RunnableStrategyContext;
1443
- } & StrategyThreadMapFacet &
1444
- StrategyStateFacet;
1445
- /**
1446
- * This interface was referenced by `Normalized`'s JSON-Schema
1447
- * via the `definition` "RunnableStrategyStatus".
1448
- */
1449
- export type RunnableStrategyStatus =
1450
- "pending" | "running" | "completed" | "failed" | "cancelled";
1451
- /**
1452
- * This interface was referenced by `Normalized`'s JSON-Schema
1453
- * via the `definition` "TickRunEvent".
1454
- */
1455
- export type TickRunEvent =
1456
- RunEventBase & {
1457
- runEventKind?: "tick";
1458
- };
1459
- /**
1460
- * This interface was referenced by `Normalized`'s JSON-Schema
1461
- * via the `definition` "InterruptRunEvent".
1462
- */
1463
- export type InterruptRunEvent =
1464
- RunEventBase & {
1465
- runEventKind?: "interrupt";
1466
- };
1467
- /**
1468
- * This interface was referenced by `Normalized`'s JSON-Schema
1469
- * via the `definition` "GraphEndRunEvent".
1470
- */
1471
- export type GraphEndRunEvent =
1472
- RunEventBase & {
1473
- runEventKind?: "graph_end";
1474
- };
1475
- /**
1476
- * This interface was referenced by `Normalized`'s JSON-Schema
1477
- * via the `definition` "ResourceMissing".
1478
- */
1479
- export type ShellMissing =
1480
- {
1481
- resourceKind?: "missing";
1482
- } & ResourceBase &
1483
- ResourceKindFacet;
1484
- /**
1485
- * This interface was referenced by `Normalized`'s JSON-Schema
1486
- * via the `definition` "ResourceInputPotential".
1487
- */
1488
- export type ShellInputPotential =
1489
- {
1490
- resourceKind?: "input-potential";
1491
- } & ResourceBase &
1492
- CreationContextFacet &
1493
- ResourceKindFacet;
1494
- /**
1495
- * This interface was referenced by `Normalized`'s JSON-Schema
1496
- * via the `definition` "ResourceOutputPotential".
1497
- */
1498
- export type ShellOutputPotential =
1499
- {
1500
- resourceKind?: "output-potential";
1501
- } & ResourceBase &
1502
- CreationContextFacet &
1503
- ResourceKindFacet;
1504
- /**
1505
- * This interface was referenced by `Normalized`'s JSON-Schema
1506
- * via the `definition` "ShellMissing".
1507
- */
1508
- export type ShellMissing1 =
1509
- {
1510
- resourceKind?: "missing";
1511
- } & ResourceBase &
1512
- ResourceKindFacet;
1513
- /**
1514
- * This interface was referenced by `Normalized`'s JSON-Schema
1515
- * via the `definition` "ShellInputPotential".
1516
- */
1517
- export type ShellInputPotential1 =
1518
- {
1519
- resourceKind?: "input-potential";
1520
- } & ResourceBase &
1521
- CreationContextFacet &
1522
- ResourceKindFacet;
1523
- /**
1524
- * This interface was referenced by `Normalized`'s JSON-Schema
1525
- * via the `definition` "ShellOutputPotential".
1526
- */
1527
- export type ShellOutputPotential1 =
1528
- {
1529
- resourceKind?: "output-potential";
1530
- } & ResourceBase &
1531
- CreationContextFacet &
1532
- ResourceKindFacet;
1533
-
1534
- export interface Normalized {
1535
- identity: StrategyRunIdentity;
1536
- runnableStrategyHandle: string;
1537
- recordedAt: Timestamp;
1538
- runEvents: RunEvent[];
1539
- }
1540
- /**
1541
- * This interface was referenced by `Normalized`'s JSON-Schema
1542
- * via the `definition` "RunEventBase".
1543
- */
1544
- export interface RunEventBase {
1545
- runEventKind: RunEventKind;
1546
- runnableStrategyHandle: RunnableStrategyIdentity;
1547
- strategyThreadHandle: StrategyThreadIdentity;
1548
- createdAt: Timestamp;
1549
- nodeName: string;
1550
- eventSeq: number;
1551
- counters?: RunEventCounters;
1552
- stepMetadata?: RunEventStepMetadata;
1553
- updates?: RunEventUpdates;
1554
- }
1555
- /**
1556
- * This interface was referenced by `Normalized`'s JSON-Schema
1557
- * via the `definition` "RunEventCounters".
1558
- */
1559
- export interface RunEventCounters {
1560
- stepCounterAfter?: number;
1561
- iterationCounterAfter?: number;
1562
- }
1563
- /**
1564
- * This interface was referenced by `Normalized`'s JSON-Schema
1565
- * via the `definition` "RunEventStepMetadata".
1566
- */
1567
- export interface RunEventStepMetadata {
1568
- stepHandle: StepIdentity;
1569
- stepKind: StepKind;
1570
- threadStepIndex: number;
1571
- }
1572
- /**
1573
- * This interface was referenced by `Normalized`'s JSON-Schema
1574
- * via the `definition` "StepKindFacet".
1575
- */
1576
- export interface StepKindFacet {
1577
- stepKind: StepKind;
1578
- }
1579
- export interface RoleBindingsFacet {
1580
- roleBindings: RoleBindings;
1581
- }
1582
- /**
1583
- * This interface was referenced by `Normalized`'s JSON-Schema
1584
- * via the `definition` "RoleBindings".
1585
- */
1586
- export interface RoleBindings {
1587
- inputBindings: RoleBindingArray;
1588
- outputBindings: RoleBindingArray;
1589
- }
1590
- /**
1591
- * This interface was referenced by `Normalized`'s JSON-Schema
1592
- * via the `definition` "Conditional".
1593
- */
1594
- export interface Conditional {
1595
- when: JobStep;
1596
- what: JobStep;
1597
- }
1598
- /**
1599
- * This interface was referenced by `Normalized`'s JSON-Schema
1600
- * via the `definition` "StrategyStateDelta".
1601
- */
1602
- export interface StrategyStateDelta {
1603
- strategyStateUpdate: StrategyState;
1604
- }
1605
- /**
1606
- * This interface was referenced by `Normalized`'s JSON-Schema
1607
- * via the `definition` "StrategyState".
1608
- */
1609
- export interface StrategyState {
1610
- [k: string]: JobStepSocket;
1611
- }
1612
- /**
1613
- * This interface was referenced by `Normalized`'s JSON-Schema
1614
- * via the `definition` "JobStepSocket".
1615
- */
1616
- export interface JobStepSocket {
1617
- [k: string]: Resource;
1618
- }
1619
- /**
1620
- * This interface was referenced by `Normalized`'s JSON-Schema
1621
- * via the `definition` "ResourceBase".
1622
- */
1623
- export interface ResourceBase {
1624
- identity: ResourceIdentity;
1625
- resourceTypeHandle: ResourceTypeIdentity;
1626
- }
1627
- /**
1628
- * This interface was referenced by `Normalized`'s JSON-Schema
1629
- * via the `definition` "ResourceKindFacet".
1630
- */
1631
- export interface ResourceKindFacet {
1632
- resourceKind: ResourceKind;
1633
- }
1634
- /**
1635
- * This interface was referenced by `Normalized`'s JSON-Schema
1636
- * via the `definition` "CreationContextFacet".
1637
- */
1638
- export interface CreationContextFacet {
1639
- creationContext: CreationContext;
1640
- }
1641
- /**
1642
- * This interface was referenced by `Normalized`'s JSON-Schema
1643
- * via the `definition` "CreationContext".
1644
- */
1645
- export interface CreationContext {
1646
- resourceRoleHandle: ResourceRoleIdentity;
1647
- jobStepHandle: JobStepIdentity;
1648
- }
1649
- /**
1650
- * This interface was referenced by `Normalized`'s JSON-Schema
1651
- * via the `definition` "TimestampFacet".
1652
- */
1653
- export interface TimestampFacet {
1654
- timestamp: Timestamp;
1655
- }
1656
- /**
1657
- * This interface was referenced by `Normalized`'s JSON-Schema
1658
- * via the `definition` "PathFacet".
1659
- */
1660
- export interface PathFacet {
1661
- path: Path;
1662
- }
1663
- export interface NucleusFacet {
1664
- nucleus: Nucleus;
1665
- }
1666
- /**
1667
- * This interface was referenced by `Normalized`'s JSON-Schema
1668
- * via the `definition` "Nucleus".
1669
- */
1670
- export interface Nucleus {
1671
- [k: string]: JsonData;
1672
- }
1673
- /**
1674
- * This interface was referenced by `Normalized`'s JSON-Schema
1675
- * via the `definition` "RunnableStrategyContext".
1676
- */
1677
- export interface RunnableStrategyContext {
1678
- status: RunnableStrategyStatus;
1679
- startedAt?: Timestamp;
1680
- completedAt?: Timestamp;
1681
- }
1682
- export interface StrategyThreadMapFacet {
1683
- strategyThreadMap: StrategyThreadMap;
1684
- }
1685
- /**
1686
- * This interface was referenced by `Normalized`'s JSON-Schema
1687
- * via the `definition` "StrategyThreadMap".
1688
- */
1689
- export interface StrategyThreadMap {
1690
- [k: string]: StepArray;
1691
- }
1692
- export interface StrategyStateFacet {
1693
- strategyState: StrategyState;
1694
- }
1695
- /**
1696
- * This interface was referenced by `Normalized`'s JSON-Schema
1697
- * via the `definition` "StrategyThreadMapFacet".
1698
- */
1699
- export interface StrategyThreadMapFacet1 {
1700
- strategyThreadMap: StrategyThreadMap;
1701
- }
1702
- /**
1703
- * This interface was referenced by `Normalized`'s JSON-Schema
1704
- * via the `definition` "StrategyStateFacet".
1705
- */
1706
- export interface StrategyStateFacet1 {
1707
- strategyState: StrategyState;
1708
- }
1709
- /**
1710
- * This interface was referenced by `Normalized`'s JSON-Schema
1711
- * via the `definition` "RoleBindingsFacet".
1712
- */
1713
- export interface RoleBindingsFacet1 {
1714
- roleBindings: RoleBindings;
1715
- }
1716
- /**
1717
- * This interface was referenced by `Normalized`'s JSON-Schema
1718
- * via the `definition` "NucleusFacet".
1719
- */
1720
- export interface NucleusFacet1 {
1721
- nucleus: Nucleus;
1722
- }
1723
-