@toolproof-core/schema 1.0.0

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