@toolproof-core/genesis 1.0.56 → 1.0.58

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (27) hide show
  1. package/dist/generated-src/declarations/resourceTypes.json +12 -3
  2. package/dist/generated-src/lookups/constants.d.ts +10 -24
  3. package/dist/generated-src/lookups/constants.js +10 -24
  4. package/dist/generated-src/schemas/schemas.json +57 -181
  5. package/dist/generated-src/schemas/standalone/Resource.json +2 -17
  6. package/dist/generated-src/schemas/standalone/Strategy.json +101 -215
  7. package/dist/generated-src/schemas/standalone/StrategyTrace.json +56 -97
  8. package/dist/generated-src/schemas/standalone/Suite.json +1 -2
  9. package/dist/generated-src/schemas/standalone/Tool.json +1 -2
  10. package/dist/generated-src/schemas/zod/Resource.js +1 -3
  11. package/dist/generated-src/schemas/zod/Strategy.d.ts +0 -6
  12. package/dist/generated-src/schemas/zod/Strategy.js +7 -27
  13. package/dist/generated-src/schemas/zod/StrategyTrace.d.ts +0 -6
  14. package/dist/generated-src/schemas/zod/StrategyTrace.js +16 -28
  15. package/dist/generated-src/timestampedResources/booleans.json +2 -2
  16. package/dist/generated-src/timestampedResources/naturals.json +11 -11
  17. package/dist/generated-src/timestampedResources/resourceTypes.json +22 -13
  18. package/dist/generated-src/timestampedResources/tools.json +15 -15
  19. package/dist/generated-src/types/types.d.ts +36 -119
  20. package/dist/src/index.d.ts +1 -1
  21. package/dist/src/utils/standaloneZodSchemas.js +6 -6
  22. package/dist/src/utils/timestampedResources.d.ts +1 -1
  23. package/dist/src/utils/timestampedResources.js +1 -1
  24. package/dist/src/utils/typeGenerationPostProcess.js +7 -37
  25. package/dist/src/utils/zodCodegen.d.ts +1 -1
  26. package/dist/src/utils/zodCodegen.js +7 -7
  27. package/package.json +1 -1
@@ -38,20 +38,20 @@
38
38
  "type": "object",
39
39
  "oneOf": [
40
40
  {
41
- "$ref": "#/$defs/GraphStartTracePoint"
41
+ "$ref": "#/$defs/StrategyStartTracePoint"
42
42
  },
43
43
  {
44
44
  "$ref": "#/$defs/TickTracePoint"
45
45
  },
46
46
  {
47
- "$ref": "#/$defs/InterruptTracePoint"
47
+ "$ref": "#/$defs/SuspendedTracePoint"
48
48
  },
49
49
  {
50
- "$ref": "#/$defs/GraphEndTracePoint"
50
+ "$ref": "#/$defs/StrategyEndTracePoint"
51
51
  }
52
52
  ]
53
53
  },
54
- "GraphStartTracePoint": {
54
+ "StrategyStartTracePoint": {
55
55
  "$schema": "https://json-schema.org/draft/2020-12/schema",
56
56
  "allOf": [
57
57
  {
@@ -61,12 +61,12 @@
61
61
  "type": "object",
62
62
  "properties": {
63
63
  "tracePointKind": {
64
- "const": "graph_start"
64
+ "const": "strategy_start"
65
65
  }
66
66
  }
67
67
  },
68
68
  {
69
- "$ref": "#/$defs/ThreadedStrategyFacet"
69
+ "$ref": "#/$defs/StrategyFacet"
70
70
  }
71
71
  ]
72
72
  },
@@ -80,6 +80,7 @@
80
80
  "type": "object",
81
81
  "required": [
82
82
  "counterSnapshot",
83
+ "threadIndex",
83
84
  "toolStepPath",
84
85
  "delta"
85
86
  ],
@@ -90,8 +91,11 @@
90
91
  "counterSnapshot": {
91
92
  "$ref": "#/$defs/TracePointCounterSnapshot"
92
93
  },
94
+ "threadIndex": {
95
+ "$ref": "#/$defs/Natural"
96
+ },
93
97
  "toolStepPath": {
94
- "$ref": "#/$defs/ThreadedToolStepPath"
98
+ "$ref": "#/$defs/ToolStepPath"
95
99
  },
96
100
  "delta": {
97
101
  "$ref": "#/$defs/TracePointDelta"
@@ -100,7 +104,7 @@
100
104
  }
101
105
  ]
102
106
  },
103
- "InterruptTracePoint": {
107
+ "SuspendedTracePoint": {
104
108
  "$schema": "https://json-schema.org/draft/2020-12/schema",
105
109
  "allOf": [
106
110
  {
@@ -110,18 +114,22 @@
110
114
  "type": "object",
111
115
  "required": [
112
116
  "counterSnapshot",
117
+ "threadIndex",
113
118
  "toolStepPath",
114
119
  "delta"
115
120
  ],
116
121
  "properties": {
117
122
  "tracePointKind": {
118
- "const": "interrupt"
123
+ "const": "suspended"
119
124
  },
120
125
  "counterSnapshot": {
121
126
  "$ref": "#/$defs/TracePointCounterSnapshot"
122
127
  },
128
+ "threadIndex": {
129
+ "$ref": "#/$defs/Natural"
130
+ },
123
131
  "toolStepPath": {
124
- "$ref": "#/$defs/ThreadedToolStepPath"
132
+ "$ref": "#/$defs/ToolStepPath"
125
133
  },
126
134
  "delta": {
127
135
  "allOf": [
@@ -131,11 +139,11 @@
131
139
  {
132
140
  "type": "object",
133
141
  "required": [
134
- "interruptData"
142
+ "suspendedData"
135
143
  ],
136
144
  "properties": {
137
- "interruptData": {
138
- "$comment": "Interrupt events must include a non-null interrupt payload.",
145
+ "suspendedData": {
146
+ "$comment": "Suspended events must include a non-null suspended payload.",
139
147
  "type": "object"
140
148
  }
141
149
  }
@@ -146,7 +154,7 @@
146
154
  }
147
155
  ]
148
156
  },
149
- "GraphEndTracePoint": {
157
+ "StrategyEndTracePoint": {
150
158
  "$schema": "https://json-schema.org/draft/2020-12/schema",
151
159
  "allOf": [
152
160
  {
@@ -156,7 +164,7 @@
156
164
  "type": "object",
157
165
  "properties": {
158
166
  "tracePointKind": {
159
- "const": "graph_end"
167
+ "const": "strategy_end"
160
168
  }
161
169
  }
162
170
  }
@@ -168,7 +176,6 @@
168
176
  "required": [
169
177
  "tracePointKind",
170
178
  "strategyHandle",
171
- "threadIndex",
172
179
  "tracePointIndex"
173
180
  ],
174
181
  "properties": {
@@ -178,23 +185,20 @@
178
185
  "strategyHandle": {
179
186
  "$ref": "#/$defs/StrategyHandle"
180
187
  },
181
- "threadIndex": {
182
- "$ref": "#/$defs/Natural"
183
- },
184
188
  "tracePointIndex": {
185
189
  "$ref": "#/$defs/Natural"
186
190
  }
187
191
  }
188
192
  },
189
- "ThreadedStrategyFacet": {
193
+ "StrategyFacet": {
190
194
  "$schema": "https://json-schema.org/draft/2020-12/schema",
191
195
  "type": "object",
192
196
  "required": [
193
- "threadedStrategy"
197
+ "strategy"
194
198
  ],
195
199
  "properties": {
196
- "threadedStrategy": {
197
- "$ref": "#/$defs/ThreadedStrategy"
200
+ "strategy": {
201
+ "$ref": "#/$defs/Strategy"
198
202
  }
199
203
  }
200
204
  },
@@ -210,7 +214,12 @@
210
214
  }
211
215
  }
212
216
  },
213
- "ThreadedToolStepPath": {
217
+ "Natural": {
218
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
219
+ "type": "integer",
220
+ "minimum": 0
221
+ },
222
+ "ToolStepPath": {
214
223
  "type": "string",
215
224
  "pattern": "^/threads/[0-9]+/steps/[0-9]+/(self|case/when|case/what|cases/[0-9]+/when|cases/[0-9]+/what)$"
216
225
  },
@@ -234,10 +243,10 @@
234
243
  }
235
244
  },
236
245
  "strategyStateDelta": {
237
- "$ref": "#/$defs/ThreadedStrategyState"
246
+ "$ref": "#/$defs/StrategyState"
238
247
  },
239
- "interruptData": {
240
- "$comment": "Kept permissive; the engine may evolve interrupt payloads.",
248
+ "suspendedData": {
249
+ "$comment": "Kept permissive; the engine may evolve suspended payloads.",
241
250
  "type": [
242
251
  "object",
243
252
  "null"
@@ -249,75 +258,49 @@
249
258
  "$schema": "https://json-schema.org/draft/2020-12/schema",
250
259
  "type": "string",
251
260
  "enum": [
252
- "graph_start",
261
+ "strategy_start",
253
262
  "tick",
254
- "interrupt",
255
- "graph_end"
263
+ "suspended",
264
+ "strategy_end"
256
265
  ]
257
266
  },
258
- "Natural": {
259
- "$schema": "https://json-schema.org/draft/2020-12/schema",
260
- "type": "integer",
261
- "minimum": 0
262
- },
263
- "ThreadedStrategy": {
267
+ "Strategy": {
264
268
  "$schema": "https://json-schema.org/draft/2020-12/schema",
265
269
  "type": "object",
270
+ "required": [
271
+ "handle"
272
+ ],
273
+ "properties": {
274
+ "handle": {
275
+ "$ref": "#/$defs/StrategyHandle"
276
+ }
277
+ },
266
278
  "allOf": [
267
- {
268
- "$ref": "#/$defs/BaseStrategy"
269
- },
270
- {
271
- "type": "object",
272
- "properties": {
273
- "strategyKind": {
274
- "const": "threaded"
275
- }
276
- }
277
- },
278
279
  {
279
280
  "$ref": "#/$defs/StepsByThreadIndexFacet"
280
281
  },
281
282
  {
282
- "$ref": "#/$defs/ThreadedStrategyStateFacet"
283
+ "$ref": "#/$defs/StrategyStateFacet"
283
284
  }
284
- ],
285
- "unevaluatedProperties": false
285
+ ]
286
286
  },
287
287
  "StepArray": {
288
288
  "$schema": "https://json-schema.org/draft/2020-12/schema",
289
289
  "type": "array",
290
290
  "items": {
291
291
  "$ref": "#/$defs/Step"
292
- },
293
- "uniqueItems": true
292
+ }
294
293
  },
295
- "ThreadedStrategyState": {
294
+ "StrategyState": {
296
295
  "$schema": "https://json-schema.org/draft/2020-12/schema",
297
296
  "type": "object",
298
297
  "propertyNames": {
299
- "$ref": "#/$defs/ThreadedToolStepPath"
298
+ "$ref": "#/$defs/ToolStepPath"
300
299
  },
301
300
  "additionalProperties": {
302
301
  "$ref": "#/$defs/StrategyStateInputEntryByRoleName"
303
302
  }
304
303
  },
305
- "BaseStrategy": {
306
- "$schema": "https://json-schema.org/draft/2020-12/schema",
307
- "type": "object",
308
- "required": [
309
- "handle",
310
- "strategyKind"
311
- ],
312
- "properties": {
313
- "handle": {
314
- "$ref": "#/$defs/StrategyHandle"
315
- },
316
- "strategyKind": {
317
- "$ref": "#/$defs/StrategyKind"
318
- }
319
- }
320
- },
321
304
  "StepsByThreadIndexFacet": {
322
305
  "$schema": "https://json-schema.org/draft/2020-12/schema",
323
306
  "type": "object",
@@ -330,7 +313,7 @@
330
313
  }
331
314
  }
332
315
  },
333
- "ThreadedStrategyStateFacet": {
316
+ "StrategyStateFacet": {
334
317
  "$schema": "https://json-schema.org/draft/2020-12/schema",
335
318
  "type": "object",
336
319
  "required": [
@@ -338,7 +321,7 @@
338
321
  ],
339
322
  "properties": {
340
323
  "strategyState": {
341
- "$ref": "#/$defs/ThreadedStrategyState"
324
+ "$ref": "#/$defs/StrategyState"
342
325
  }
343
326
  }
344
327
  },
@@ -371,14 +354,6 @@
371
354
  "$ref": "#/$defs/StrategyStateInputEntry"
372
355
  }
373
356
  },
374
- "StrategyKind": {
375
- "$schema": "https://json-schema.org/draft/2020-12/schema",
376
- "type": "string",
377
- "enum": [
378
- "unthreaded",
379
- "threaded"
380
- ]
381
- },
382
357
  "StepArrayArray": {
383
358
  "$schema": "https://json-schema.org/draft/2020-12/schema",
384
359
  "type": "array",
@@ -427,8 +402,7 @@
427
402
  "items": {
428
403
  "$ref": "#/$defs/Case"
429
404
  },
430
- "minItems": 1,
431
- "uniqueItems": true
405
+ "minItems": 1
432
406
  }
433
407
  },
434
408
  "allOf": [
@@ -696,17 +670,6 @@
696
670
  ],
697
671
  "unevaluatedProperties": false
698
672
  },
699
- "ToolStepPath": {
700
- "$schema": "https://json-schema.org/draft/2020-12/schema",
701
- "oneOf": [
702
- {
703
- "$ref": "#/$defs/UnthreadedToolStepPath"
704
- },
705
- {
706
- "$ref": "#/$defs/ThreadedToolStepPath"
707
- }
708
- ]
709
- },
710
673
  "ResourceId": {
711
674
  "$schema": "https://json-schema.org/draft/2020-12/schema",
712
675
  "type": "string",
@@ -729,10 +692,6 @@
729
692
  }
730
693
  }
731
694
  },
732
- "UnthreadedToolStepPath": {
733
- "type": "string",
734
- "pattern": "^/steps/[0-9]+/(self|case/when|case/what|cases/[0-9]+/when|cases/[0-9]+/what)$"
735
- },
736
695
  "Provenance": {
737
696
  "$schema": "https://json-schema.org/draft/2020-12/schema",
738
697
  "oneOf": [
@@ -603,7 +603,7 @@
603
603
  },
604
604
  "AtomicTypeRef": {
605
605
  "$schema": "https://json-schema.org/draft/2020-12/schema",
606
- "$comment": "An atomic type reference is either resource-backed (resourceTypeHandle, strategy-legal) or schema-backed (roleSchema, internal/Core-only). The roleSchema branch holds an object whose $ref names the type parameter (e.g. '#OperandType'), matching an entry in the template's GenericAssignmentByRoleName.mapKeys. Exactly one atomic branch must be present.",
606
+ "$comment": "An atomic type reference is either ResourceType-backed (resourceTypeHandle, strategy-legal) or schema-backed (roleSchema, internal/Core-only). The roleSchema branch holds an object whose $ref names an internal schema-level type reference. In template Tools' instantiationRoleSpec, this may name a type parameter (for example '#OperandType') matching an entry in the template's GenericAssignmentByRoleName.mapKeys. In other contexts it may name a concrete internal schema definition (for example '#ToolStep'). Exactly one atomic branch must be present.",
607
607
  "oneOf": [
608
608
  {
609
609
  "type": "object",
@@ -628,7 +628,6 @@
628
628
  "required": [
629
629
  "$ref"
630
630
  ],
631
- "$comment": "A reference to a named type parameter. The $ref value must be '#' followed by a RoleName, matching a key in the template's GenericAssignmentByRoleName.mapKeys.",
632
631
  "properties": {
633
632
  "$ref": {
634
633
  "type": "string",
@@ -485,7 +485,7 @@
485
485
  },
486
486
  "AtomicTypeRef": {
487
487
  "$schema": "https://json-schema.org/draft/2020-12/schema",
488
- "$comment": "An atomic type reference is either resource-backed (resourceTypeHandle, strategy-legal) or schema-backed (roleSchema, internal/Core-only). The roleSchema branch holds an object whose $ref names the type parameter (e.g. '#OperandType'), matching an entry in the template's GenericAssignmentByRoleName.mapKeys. Exactly one atomic branch must be present.",
488
+ "$comment": "An atomic type reference is either ResourceType-backed (resourceTypeHandle, strategy-legal) or schema-backed (roleSchema, internal/Core-only). The roleSchema branch holds an object whose $ref names an internal schema-level type reference. In template Tools' instantiationRoleSpec, this may name a type parameter (for example '#OperandType') matching an entry in the template's GenericAssignmentByRoleName.mapKeys. In other contexts it may name a concrete internal schema definition (for example '#ToolStep'). Exactly one atomic branch must be present.",
489
489
  "oneOf": [
490
490
  {
491
491
  "type": "object",
@@ -510,7 +510,6 @@
510
510
  "required": [
511
511
  "$ref"
512
512
  ],
513
- "$comment": "A reference to a named type parameter. The $ref value must be '#' followed by a RoleName, matching a key in the template's GenericAssignmentByRoleName.mapKeys.",
514
513
  "properties": {
515
514
  "$ref": {
516
515
  "type": "string",
@@ -12,8 +12,6 @@ const RoleNameSchema = z.lazy(() => NameSchema);
12
12
  const RuntimeProvenanceSchema = z.lazy(() => z.object({ "provenanceKind": z.literal("runtime") }).strict());
13
13
  const StrategyProvenanceSchema = z.lazy(() => z.object({ "provenanceKind": z.literal("strategy"), "strategyTraceHandle": StrategyTraceHandleSchema, "toolStepRoleAddress": ToolStepRoleAddressSchema }).strict());
14
14
  const StrategyTraceHandleSchema = z.lazy(() => z.string().regex(new RegExp("^STRATEGY_TRACE-.+$")));
15
- const ThreadedToolStepPathSchema = z.lazy(() => z.string().regex(new RegExp("^/threads/[0-9]+/steps/[0-9]+/(self|case/when|case/what|cases/[0-9]+/when|cases/[0-9]+/what)$")));
16
- const ToolStepPathSchema = z.lazy(() => z.union([UnthreadedToolStepPathSchema, ThreadedToolStepPathSchema]));
15
+ const ToolStepPathSchema = z.lazy(() => z.string().regex(new RegExp("^/threads/[0-9]+/steps/[0-9]+/(self|case/when|case/what|cases/[0-9]+/when|cases/[0-9]+/what)$")));
17
16
  const ToolStepRoleAddressSchema = z.lazy(() => z.object({ "roleName": RoleNameSchema, "toolStepPath": ToolStepPathSchema }).strict());
18
- const UnthreadedToolStepPathSchema = z.lazy(() => z.string().regex(new RegExp("^/steps/[0-9]+/(self|case/when|case/what|cases/[0-9]+/when|cases/[0-9]+/what)$")));
19
17
  export const ResourceSchema = z.lazy(() => BaseResourceSchema);
@@ -1,12 +1,6 @@
1
1
  import { z } from 'zod/v4';
2
2
  export declare const StrategyZodGenerationWarnings: readonly [{
3
- readonly path: "$defs.StepArray.uniqueItems";
4
- readonly message: "uniqueItems not enforced by generated Zod.";
5
- }, {
6
3
  readonly path: "$defs.StrategyStateInputEntryByRoleName.propertyNames";
7
4
  readonly message: "Unsupported propertyNames $ref target; keys will not be validated.";
8
- }, {
9
- readonly path: "$defs.BranchStep.allOfMerged.properties.cases.uniqueItems";
10
- readonly message: "uniqueItems not enforced by generated Zod.";
11
5
  }];
12
6
  export declare const StrategySchema: z.ZodTypeAny;
@@ -1,21 +1,12 @@
1
1
  // Auto-generated from standalone schema 'Strategy'. Do not edit.
2
2
  import { z } from 'zod/v4';
3
3
  export const StrategyZodGenerationWarnings = [
4
- {
5
- "path": "$defs.StepArray.uniqueItems",
6
- "message": "uniqueItems not enforced by generated Zod."
7
- },
8
4
  {
9
5
  "path": "$defs.StrategyStateInputEntryByRoleName.propertyNames",
10
6
  "message": "Unsupported propertyNames $ref target; keys will not be validated."
11
- },
12
- {
13
- "path": "$defs.BranchStep.allOfMerged.properties.cases.uniqueItems",
14
- "message": "uniqueItems not enforced by generated Zod."
15
7
  }
16
8
  ];
17
9
  const BaseResourceSchema = z.lazy(() => z.object({ "projection": z.any(), "id": ResourceIdSchema, "resourceTypeHandle": ResourceTypeHandleSchema, "provenance": ProvenanceSchema }).strict());
18
- const BaseStrategySchema = z.lazy(() => z.object({ "handle": StrategyHandleSchema, "strategyKind": StrategyKindSchema }));
19
10
  const BranchStepSchema = z.lazy(() => z.object({ "stepKind": z.intersection(z.literal("branch"), StepKindSchema), "cases": z.array(CaseSchema).min(1) }));
20
11
  const CaseSchema = z.lazy(() => z.object({ "when": ToolStepSchema, "what": ToolStepSchema }).strict());
21
12
  const ExternalInputPotentialSchema = z.lazy(() => z.object({ "strategyStateInputKind": z.literal("externalInputPotential") }).strict());
@@ -41,30 +32,19 @@ const StepArrayArraySchema = z.lazy(() => z.array(StepArraySchema));
41
32
  const StepKindSchema = z.lazy(() => z.union([z.literal("tool"), z.literal("branch"), z.literal("while"), z.literal("for")]));
42
33
  const StepKindFacetSchema = z.lazy(() => z.object({ "stepKind": StepKindSchema }));
43
34
  const StepsByThreadIndexFacetSchema = z.lazy(() => z.object({ "stepsByThreadIndex": StepArrayArraySchema }));
44
- const StepsFacetSchema = z.lazy(() => z.object({ "steps": StepArraySchema }));
45
35
  const StrategyHandleSchema = z.lazy(() => z.string().regex(new RegExp("^STRATEGY-.+$")));
46
- const StrategyKindSchema = z.lazy(() => z.union([z.literal("unthreaded"), z.literal("threaded")]));
47
36
  const StrategyProvenanceSchema = z.lazy(() => z.object({ "provenanceKind": z.literal("strategy"), "strategyTraceHandle": StrategyTraceHandleSchema, "toolStepRoleAddress": ToolStepRoleAddressSchema }).strict());
48
- const StrategyStateInputEntrySchema = z.lazy(() => z.union([InputPotentialSchema, InputResourceSchema]));
49
- const StrategyStateInputEntryByRoleNameSchema = z.lazy(() => z.record(z.string(), StrategyStateInputEntrySchema));
50
- const StrategyTraceHandleSchema = z.lazy(() => z.string().regex(new RegExp("^STRATEGY_TRACE-.+$")));
51
- const ThreadedStrategySchema = z.lazy(() => z.object({ "handle": StrategyHandleSchema, "strategyKind": z.intersection(StrategyKindSchema, z.literal("threaded")), "stepsByThreadIndex": StepArrayArraySchema, "strategyState": ThreadedStrategyStateSchema }).strict());
52
- const ThreadedStrategyStateSchema = z.lazy(() => z.record(z.string(), StrategyStateInputEntryByRoleNameSchema).superRefine((obj, ctx) => { for (const k of Object.keys(obj)) {
37
+ const StrategyStateSchema = z.lazy(() => z.record(z.string(), StrategyStateInputEntryByRoleNameSchema).superRefine((obj, ctx) => { for (const k of Object.keys(obj)) {
53
38
  if (!new RegExp("^/threads/[0-9]+/steps/[0-9]+/(self|case/when|case/what|cases/[0-9]+/when|cases/[0-9]+/what)$").test(k))
54
39
  ctx.addIssue({ code: 'custom', message: 'Invalid key: ' + k });
55
40
  } }));
56
- const ThreadedStrategyStateFacetSchema = z.lazy(() => z.object({ "strategyState": ThreadedStrategyStateSchema }));
57
- const ThreadedToolStepPathSchema = z.lazy(() => z.string().regex(new RegExp("^/threads/[0-9]+/steps/[0-9]+/(self|case/when|case/what|cases/[0-9]+/when|cases/[0-9]+/what)$")));
41
+ const StrategyStateFacetSchema = z.lazy(() => z.object({ "strategyState": StrategyStateSchema }));
42
+ const StrategyStateInputEntrySchema = z.lazy(() => z.union([InputPotentialSchema, InputResourceSchema]));
43
+ const StrategyStateInputEntryByRoleNameSchema = z.lazy(() => z.record(z.string(), StrategyStateInputEntrySchema));
44
+ const StrategyTraceHandleSchema = z.lazy(() => z.string().regex(new RegExp("^STRATEGY_TRACE-.+$")));
58
45
  const ToolHandleSchema = z.lazy(() => z.string().regex(new RegExp("^TOOL-.+$")));
59
46
  const ToolStepSchema = z.lazy(() => z.object({ "stepKind": z.intersection(z.literal("tool"), StepKindSchema), "toolHandle": ToolHandleSchema, "roleBindingSpec": RoleBindingSpecSchema }));
60
- const ToolStepPathSchema = z.lazy(() => z.union([UnthreadedToolStepPathSchema, ThreadedToolStepPathSchema]));
47
+ const ToolStepPathSchema = z.lazy(() => z.string().regex(new RegExp("^/threads/[0-9]+/steps/[0-9]+/(self|case/when|case/what|cases/[0-9]+/when|cases/[0-9]+/what)$")));
61
48
  const ToolStepRoleAddressSchema = z.lazy(() => z.object({ "roleName": RoleNameSchema, "toolStepPath": ToolStepPathSchema }).strict());
62
- const UnthreadedStrategySchema = z.lazy(() => z.object({ "handle": StrategyHandleSchema, "strategyKind": z.intersection(StrategyKindSchema, z.literal("unthreaded")), "steps": StepArraySchema, "strategyState": UnthreadedStrategyStateSchema }).strict());
63
- const UnthreadedStrategyStateSchema = z.lazy(() => z.record(z.string(), StrategyStateInputEntryByRoleNameSchema).superRefine((obj, ctx) => { for (const k of Object.keys(obj)) {
64
- if (!new RegExp("^/steps/[0-9]+/(self|case/when|case/what|cases/[0-9]+/when|cases/[0-9]+/what)$").test(k))
65
- ctx.addIssue({ code: 'custom', message: 'Invalid key: ' + k });
66
- } }));
67
- const UnthreadedStrategyStateFacetSchema = z.lazy(() => z.object({ "strategyState": UnthreadedStrategyStateSchema }));
68
- const UnthreadedToolStepPathSchema = z.lazy(() => z.string().regex(new RegExp("^/steps/[0-9]+/(self|case/when|case/what|cases/[0-9]+/when|cases/[0-9]+/what)$")));
69
49
  const WhileStepSchema = z.lazy(() => z.object({ "stepKind": z.intersection(z.literal("while"), StepKindSchema), "case": CaseSchema }));
70
- export const StrategySchema = z.lazy(() => z.union([UnthreadedStrategySchema, ThreadedStrategySchema]));
50
+ export const StrategySchema = z.lazy(() => z.object({ "handle": StrategyHandleSchema, "stepsByThreadIndex": StepArrayArraySchema, "strategyState": StrategyStateSchema }));
@@ -1,12 +1,6 @@
1
1
  import { z } from 'zod/v4';
2
2
  export declare const StrategyTraceZodGenerationWarnings: readonly [{
3
- readonly path: "$defs.StepArray.uniqueItems";
4
- readonly message: "uniqueItems not enforced by generated Zod.";
5
- }, {
6
3
  readonly path: "$defs.StrategyStateInputEntryByRoleName.propertyNames";
7
4
  readonly message: "Unsupported propertyNames $ref target; keys will not be validated.";
8
- }, {
9
- readonly path: "$defs.BranchStep.allOfMerged.properties.cases.uniqueItems";
10
- readonly message: "uniqueItems not enforced by generated Zod.";
11
5
  }];
12
6
  export declare const StrategyTraceSchema: z.ZodTypeAny;
@@ -1,33 +1,21 @@
1
1
  // Auto-generated from standalone schema 'StrategyTrace'. Do not edit.
2
2
  import { z } from 'zod/v4';
3
3
  export const StrategyTraceZodGenerationWarnings = [
4
- {
5
- "path": "$defs.StepArray.uniqueItems",
6
- "message": "uniqueItems not enforced by generated Zod."
7
- },
8
4
  {
9
5
  "path": "$defs.StrategyStateInputEntryByRoleName.propertyNames",
10
6
  "message": "Unsupported propertyNames $ref target; keys will not be validated."
11
- },
12
- {
13
- "path": "$defs.BranchStep.allOfMerged.properties.cases.uniqueItems",
14
- "message": "uniqueItems not enforced by generated Zod."
15
7
  }
16
8
  ];
17
9
  const BaseResourceSchema = z.lazy(() => z.object({ "projection": z.any(), "id": ResourceIdSchema, "resourceTypeHandle": ResourceTypeHandleSchema, "provenance": ProvenanceSchema }).strict());
18
- const BaseStrategySchema = z.lazy(() => z.object({ "handle": StrategyHandleSchema, "strategyKind": StrategyKindSchema }));
19
- const BaseTracePointSchema = z.lazy(() => z.object({ "tracePointKind": TracePointKindSchema, "strategyHandle": StrategyHandleSchema, "threadIndex": NaturalSchema, "tracePointIndex": NaturalSchema }));
10
+ const BaseTracePointSchema = z.lazy(() => z.object({ "tracePointKind": TracePointKindSchema, "strategyHandle": StrategyHandleSchema, "tracePointIndex": NaturalSchema }));
20
11
  const BranchStepSchema = z.lazy(() => z.object({ "stepKind": z.intersection(z.literal("branch"), StepKindSchema), "cases": z.array(CaseSchema).min(1) }));
21
12
  const CaseSchema = z.lazy(() => z.object({ "when": ToolStepSchema, "what": ToolStepSchema }).strict());
22
13
  const ExternalInputPotentialSchema = z.lazy(() => z.object({ "strategyStateInputKind": z.literal("externalInputPotential") }).strict());
23
14
  const ForStepSchema = z.lazy(() => z.object({ "stepKind": z.intersection(z.literal("for"), StepKindSchema), "case": CaseSchema }));
24
15
  const GenesisProvenanceSchema = z.lazy(() => z.object({ "provenanceKind": z.literal("genesis") }).strict());
25
- const GraphEndTracePointSchema = z.lazy(() => z.object({ "tracePointKind": z.intersection(TracePointKindSchema, z.literal("graph_end")), "strategyHandle": StrategyHandleSchema, "threadIndex": NaturalSchema, "tracePointIndex": NaturalSchema }));
26
- const GraphStartTracePointSchema = z.lazy(() => z.object({ "tracePointKind": z.intersection(TracePointKindSchema, z.literal("graph_start")), "strategyHandle": StrategyHandleSchema, "threadIndex": NaturalSchema, "tracePointIndex": NaturalSchema, "threadedStrategy": ThreadedStrategySchema }));
27
16
  const InputPotentialSchema = z.lazy(() => z.union([ExternalInputPotentialSchema, InternalInputPotentialSchema]));
28
17
  const InputResourceSchema = z.lazy(() => z.object({ "strategyStateInputKind": z.literal("inputResource"), "projection": z.any(), "id": ResourceIdSchema, "resourceTypeHandle": ResourceTypeHandleSchema, "provenance": ProvenanceSchema }).strict());
29
18
  const InternalInputPotentialSchema = z.lazy(() => z.object({ "strategyStateInputKind": z.literal("internalInputPotential"), "toolStepRoleAddress": ToolStepRoleAddressSchema }).strict());
30
- const InterruptTracePointSchema = z.lazy(() => z.object({ "tracePointKind": z.intersection(TracePointKindSchema, z.literal("interrupt")), "strategyHandle": StrategyHandleSchema, "threadIndex": NaturalSchema, "tracePointIndex": NaturalSchema, "counterSnapshot": TracePointCounterSnapshotSchema, "toolStepPath": ThreadedToolStepPathSchema, "delta": z.object({ "stepsMutation": z.object({ "insertAt": NaturalSchema, "insertedSteps": StepArraySchema }).optional(), "strategyStateDelta": ThreadedStrategyStateSchema.optional(), "interruptData": z.intersection(z.union([z.object({}), z.null()]), z.object({})) }) }));
31
19
  const NameSchema = z.lazy(() => z.string().min(1).regex(new RegExp("^[A-Z][a-zA-Z0-9]*$")));
32
20
  const NaturalSchema = z.lazy(() => z.number().int().min(0));
33
21
  const ProvenanceSchema = z.lazy(() => z.union([GenesisProvenanceSchema, RuntimeProvenanceSchema, StrategyProvenanceSchema]));
@@ -46,29 +34,29 @@ const StepArrayArraySchema = z.lazy(() => z.array(StepArraySchema));
46
34
  const StepKindSchema = z.lazy(() => z.union([z.literal("tool"), z.literal("branch"), z.literal("while"), z.literal("for")]));
47
35
  const StepKindFacetSchema = z.lazy(() => z.object({ "stepKind": StepKindSchema }));
48
36
  const StepsByThreadIndexFacetSchema = z.lazy(() => z.object({ "stepsByThreadIndex": StepArrayArraySchema }));
37
+ const StrategySchema = z.lazy(() => z.object({ "handle": StrategyHandleSchema, "stepsByThreadIndex": StepArrayArraySchema, "strategyState": StrategyStateSchema }));
38
+ const StrategyEndTracePointSchema = z.lazy(() => z.object({ "tracePointKind": z.intersection(TracePointKindSchema, z.literal("strategy_end")), "strategyHandle": StrategyHandleSchema, "tracePointIndex": NaturalSchema }));
39
+ const StrategyFacetSchema = z.lazy(() => z.object({ "strategy": StrategySchema }));
49
40
  const StrategyHandleSchema = z.lazy(() => z.string().regex(new RegExp("^STRATEGY-.+$")));
50
- const StrategyKindSchema = z.lazy(() => z.union([z.literal("unthreaded"), z.literal("threaded")]));
51
41
  const StrategyProvenanceSchema = z.lazy(() => z.object({ "provenanceKind": z.literal("strategy"), "strategyTraceHandle": StrategyTraceHandleSchema, "toolStepRoleAddress": ToolStepRoleAddressSchema }).strict());
52
- const StrategyStateInputEntrySchema = z.lazy(() => z.union([InputPotentialSchema, InputResourceSchema]));
53
- const StrategyStateInputEntryByRoleNameSchema = z.lazy(() => z.record(z.string(), StrategyStateInputEntrySchema));
54
- const StrategyTraceHandleSchema = z.lazy(() => z.string().regex(new RegExp("^STRATEGY_TRACE-.+$")));
55
- const ThreadedStrategySchema = z.lazy(() => z.object({ "handle": StrategyHandleSchema, "strategyKind": z.intersection(StrategyKindSchema, z.literal("threaded")), "stepsByThreadIndex": StepArrayArraySchema, "strategyState": ThreadedStrategyStateSchema }).strict());
56
- const ThreadedStrategyFacetSchema = z.lazy(() => z.object({ "threadedStrategy": ThreadedStrategySchema }));
57
- const ThreadedStrategyStateSchema = z.lazy(() => z.record(z.string(), StrategyStateInputEntryByRoleNameSchema).superRefine((obj, ctx) => { for (const k of Object.keys(obj)) {
42
+ const StrategyStartTracePointSchema = z.lazy(() => z.object({ "tracePointKind": z.intersection(TracePointKindSchema, z.literal("strategy_start")), "strategyHandle": StrategyHandleSchema, "tracePointIndex": NaturalSchema, "strategy": StrategySchema }));
43
+ const StrategyStateSchema = z.lazy(() => z.record(z.string(), StrategyStateInputEntryByRoleNameSchema).superRefine((obj, ctx) => { for (const k of Object.keys(obj)) {
58
44
  if (!new RegExp("^/threads/[0-9]+/steps/[0-9]+/(self|case/when|case/what|cases/[0-9]+/when|cases/[0-9]+/what)$").test(k))
59
45
  ctx.addIssue({ code: 'custom', message: 'Invalid key: ' + k });
60
46
  } }));
61
- const ThreadedStrategyStateFacetSchema = z.lazy(() => z.object({ "strategyState": ThreadedStrategyStateSchema }));
62
- const ThreadedToolStepPathSchema = z.lazy(() => z.string().regex(new RegExp("^/threads/[0-9]+/steps/[0-9]+/(self|case/when|case/what|cases/[0-9]+/when|cases/[0-9]+/what)$")));
63
- const TickTracePointSchema = z.lazy(() => z.object({ "tracePointKind": z.intersection(TracePointKindSchema, z.literal("tick")), "strategyHandle": StrategyHandleSchema, "threadIndex": NaturalSchema, "tracePointIndex": NaturalSchema, "counterSnapshot": TracePointCounterSnapshotSchema, "toolStepPath": ThreadedToolStepPathSchema, "delta": TracePointDeltaSchema }));
47
+ const StrategyStateFacetSchema = z.lazy(() => z.object({ "strategyState": StrategyStateSchema }));
48
+ const StrategyStateInputEntrySchema = z.lazy(() => z.union([InputPotentialSchema, InputResourceSchema]));
49
+ const StrategyStateInputEntryByRoleNameSchema = z.lazy(() => z.record(z.string(), StrategyStateInputEntrySchema));
50
+ const StrategyTraceHandleSchema = z.lazy(() => z.string().regex(new RegExp("^STRATEGY_TRACE-.+$")));
51
+ const SuspendedTracePointSchema = z.lazy(() => z.object({ "tracePointKind": z.intersection(TracePointKindSchema, z.literal("suspended")), "strategyHandle": StrategyHandleSchema, "tracePointIndex": NaturalSchema, "counterSnapshot": TracePointCounterSnapshotSchema, "threadIndex": NaturalSchema, "toolStepPath": ToolStepPathSchema, "delta": z.object({ "stepsMutation": z.object({ "insertAt": NaturalSchema, "insertedSteps": StepArraySchema }).optional(), "strategyStateDelta": StrategyStateSchema.optional(), "suspendedData": z.intersection(z.union([z.object({}), z.null()]), z.object({})) }) }));
52
+ const TickTracePointSchema = z.lazy(() => z.object({ "tracePointKind": z.intersection(TracePointKindSchema, z.literal("tick")), "strategyHandle": StrategyHandleSchema, "tracePointIndex": NaturalSchema, "counterSnapshot": TracePointCounterSnapshotSchema, "threadIndex": NaturalSchema, "toolStepPath": ToolStepPathSchema, "delta": TracePointDeltaSchema }));
64
53
  const ToolHandleSchema = z.lazy(() => z.string().regex(new RegExp("^TOOL-.+$")));
65
54
  const ToolStepSchema = z.lazy(() => z.object({ "stepKind": z.intersection(z.literal("tool"), StepKindSchema), "toolHandle": ToolHandleSchema, "roleBindingSpec": RoleBindingSpecSchema }));
66
- const ToolStepPathSchema = z.lazy(() => z.union([UnthreadedToolStepPathSchema, ThreadedToolStepPathSchema]));
55
+ const ToolStepPathSchema = z.lazy(() => z.string().regex(new RegExp("^/threads/[0-9]+/steps/[0-9]+/(self|case/when|case/what|cases/[0-9]+/when|cases/[0-9]+/what)$")));
67
56
  const ToolStepRoleAddressSchema = z.lazy(() => z.object({ "roleName": RoleNameSchema, "toolStepPath": ToolStepPathSchema }).strict());
68
- const TracePointSchema = z.lazy(() => z.union([GraphStartTracePointSchema, TickTracePointSchema, InterruptTracePointSchema, GraphEndTracePointSchema]));
57
+ const TracePointSchema = z.lazy(() => z.union([StrategyStartTracePointSchema, TickTracePointSchema, SuspendedTracePointSchema, StrategyEndTracePointSchema]));
69
58
  const TracePointCounterSnapshotSchema = z.lazy(() => z.object({ "stepCounterAfter": NaturalSchema.optional(), "iterationCounterAfter": NaturalSchema.optional() }));
70
- const TracePointDeltaSchema = z.lazy(() => z.object({ "stepsMutation": z.object({ "insertAt": NaturalSchema, "insertedSteps": StepArraySchema }).optional(), "strategyStateDelta": ThreadedStrategyStateSchema.optional(), "interruptData": z.union([z.object({}), z.null()]).optional() }));
71
- const TracePointKindSchema = z.lazy(() => z.union([z.literal("graph_start"), z.literal("tick"), z.literal("interrupt"), z.literal("graph_end")]));
72
- const UnthreadedToolStepPathSchema = z.lazy(() => z.string().regex(new RegExp("^/steps/[0-9]+/(self|case/when|case/what|cases/[0-9]+/when|cases/[0-9]+/what)$")));
59
+ const TracePointDeltaSchema = z.lazy(() => z.object({ "stepsMutation": z.object({ "insertAt": NaturalSchema, "insertedSteps": StepArraySchema }).optional(), "strategyStateDelta": StrategyStateSchema.optional(), "suspendedData": z.union([z.object({}), z.null()]).optional() }));
60
+ const TracePointKindSchema = z.lazy(() => z.union([z.literal("strategy_start"), z.literal("tick"), z.literal("suspended"), z.literal("strategy_end")]));
73
61
  const WhileStepSchema = z.lazy(() => z.object({ "stepKind": z.intersection(z.literal("while"), StepKindSchema), "case": CaseSchema }));
74
62
  export const StrategyTraceSchema = z.lazy(() => z.object({ "handle": StrategyTraceHandleSchema, "strategyHandle": StrategyHandleSchema, "tracePoints": z.array(TracePointSchema) }).strict());
@@ -3,7 +3,7 @@
3
3
  "id": "RESOURCE-BOOLEAN:False",
4
4
  "resourceTypeHandle": "TYPE-Boolean",
5
5
  "provenance": {
6
- "resourceProvenanceKind": "genesis"
6
+ "provenanceKind": "genesis"
7
7
  },
8
8
  "timestamp": "2025-11-30T00:00:00.000Z",
9
9
  "projection": false
@@ -12,7 +12,7 @@
12
12
  "id": "RESOURCE-BOOLEAN:True",
13
13
  "resourceTypeHandle": "TYPE-Boolean",
14
14
  "provenance": {
15
- "resourceProvenanceKind": "genesis"
15
+ "provenanceKind": "genesis"
16
16
  },
17
17
  "timestamp": "2025-11-30T00:00:00.000Z",
18
18
  "projection": true