@toolproof-npm/schema 0.1.80 → 0.1.82

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.
@@ -134,6 +134,9 @@
134
134
  "RolesWrapper",
135
135
  "JobIdentity"
136
136
  ],
137
+ "RunEventCounters": [],
138
+ "RunEventKind": [],
139
+ "RunEventStepKind": [],
137
140
  "StatefulStrategyIdentity": [],
138
141
  "StatelessStrategyIdentity": [],
139
142
  "StepKind": [],
@@ -147,12 +150,26 @@
147
150
  "ExecutionSocket",
148
151
  "ExecutionIdentity"
149
152
  ],
153
+ "StrategyStateDelta": [
154
+ "ExecutionSocketMaterialized",
155
+ "ExecutionIdentity",
156
+ "ExecutionSocket"
157
+ ],
150
158
  "StrategyStateWrapper": [
151
159
  "StrategyState"
152
160
  ],
153
161
  "StrategyThreadIdentity": [],
154
162
  "WhileStepIdentity": [],
155
163
  "WorkStepIdentity": [],
164
+ "RunEventStepMetaData": [
165
+ "ExecutionIdentity",
166
+ "JobIdentity",
167
+ "RunEventStepKind",
168
+ "WorkStepIdentity",
169
+ "BranchStepIdentity",
170
+ "WhileStepIdentity",
171
+ "ForStepIdentity"
172
+ ],
156
173
  "WorkStep": [
157
174
  "StepKind",
158
175
  "Execution",
@@ -182,6 +199,25 @@
182
199
  "WhileStep",
183
200
  "ForStep"
184
201
  ],
202
+ "RunEventUpdates": [
203
+ "StrategyStateDelta",
204
+ "Step"
205
+ ],
206
+ "RunEventBase": [
207
+ "RunEventCounters",
208
+ "Timestamp",
209
+ "RunEventKind",
210
+ "RunEventStepMetaData",
211
+ "StrategyRunIdentity",
212
+ "StrategyThreadIdentity",
213
+ "RunEventUpdates"
214
+ ],
215
+ "GraphEndRunEvent": [
216
+ "RunEventBase"
217
+ ],
218
+ "InterruptRunEvent": [
219
+ "RunEventBase"
220
+ ],
185
221
  "StatelessStrategy": [
186
222
  "StatelessStrategyIdentity",
187
223
  "Step"
@@ -208,11 +244,28 @@
208
244
  "StatefulStrategyIdentity",
209
245
  "StrategyRunContext"
210
246
  ],
247
+ "GraphStartRunEvent": [
248
+ "RunEventBase",
249
+ "StrategyRun"
250
+ ],
211
251
  "StrategyRunUpdate": [
252
+ "StrategyStateDelta",
212
253
  "StrategyRun",
254
+ "StrategyRunIdentity"
255
+ ],
256
+ "TickRunEvent": [
257
+ "RunEventBase"
258
+ ],
259
+ "RunEvent": [
260
+ "GraphStartRunEvent",
261
+ "TickRunEvent",
262
+ "InterruptRunEvent",
263
+ "GraphEndRunEvent"
264
+ ],
265
+ "RunRecording": [
266
+ "Timestamp",
267
+ "RunEvent",
213
268
  "StrategyRunIdentity",
214
- "ExecutionSocketMaterialized",
215
- "ExecutionIdentity",
216
- "ExecutionSocket"
269
+ "StrategyThreadIdentity"
217
270
  ]
218
271
  }
@@ -1740,8 +1740,7 @@
1740
1740
  "statelessStrategy": {
1741
1741
  "$ref": "#/$defs/StatelessStrategy"
1742
1742
  }
1743
- },
1744
- "unevaluatedProperties": false
1743
+ }
1745
1744
  }
1746
1745
  },
1747
1746
  "ExecutionSocket": {
@@ -1826,8 +1825,7 @@
1826
1825
  "strategyState": {
1827
1826
  "$ref": "#/$defs/StrategyState"
1828
1827
  }
1829
- },
1830
- "unevaluatedProperties": false
1828
+ }
1831
1829
  }
1832
1830
  },
1833
1831
  "StatefulStrategyIdentity": {
@@ -1975,8 +1973,7 @@
1975
1973
  "strategyThreadMap": {
1976
1974
  "$ref": "#/$defs/StrategyThreadMap"
1977
1975
  }
1978
- },
1979
- "unevaluatedProperties": false
1976
+ }
1980
1977
  }
1981
1978
  },
1982
1979
  "StrategyRun": {
@@ -2017,27 +2014,17 @@
2017
2014
  "unevaluatedProperties": false
2018
2015
  }
2019
2016
  },
2020
- "StrategyRunUpdate": {
2021
- "identity": "TYPE-StrategyRunUpdate",
2022
- "name": "StrategyRunUpdate",
2017
+ "StrategyStateDelta": {
2018
+ "identity": "TYPE-StrategyStateDelta",
2019
+ "name": "StrategyStateDelta",
2023
2020
  "description": "dummy-description",
2024
2021
  "resourceFormatRef": "FORMAT-ApplicationJson",
2025
2022
  "extractionSchema": {
2026
- "$anchor": "StrategyRunUpdate",
2023
+ "$anchor": "StrategyStateDelta",
2027
2024
  "$schema": "https://json-schema.org/draft/2020-12/schema",
2028
2025
  "type": "object",
2029
- "required": [
2030
- "strategyRunRef",
2031
- "strategyStateUpdate"
2032
- ],
2026
+ "$comment": "Shared delta payload for strategy state updates; used both as standalone updates and embedded within run events.",
2033
2027
  "properties": {
2034
- "strategyRunRef": {
2035
- "$ref": "#/$defs/StrategyRunIdentity"
2036
- },
2037
- "strategyRun": {
2038
- "$comment": "Optional embedded snapshot; strategyRunRef remains the canonical pointer.",
2039
- "$ref": "#/$defs/StrategyRun"
2040
- },
2041
2028
  "strategyStateUpdate": {
2042
2029
  "type": "object",
2043
2030
  "propertyNames": {
@@ -2058,6 +2045,382 @@
2058
2045
  },
2059
2046
  "unevaluatedProperties": false
2060
2047
  }
2048
+ }
2049
+ }
2050
+ },
2051
+ "StrategyRunUpdate": {
2052
+ "identity": "TYPE-StrategyRunUpdate",
2053
+ "name": "StrategyRunUpdate",
2054
+ "description": "dummy-description",
2055
+ "resourceFormatRef": "FORMAT-ApplicationJson",
2056
+ "extractionSchema": {
2057
+ "$anchor": "StrategyRunUpdate",
2058
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
2059
+ "type": "object",
2060
+ "required": [
2061
+ "strategyRunRef",
2062
+ "strategyStateUpdate"
2063
+ ],
2064
+ "properties": {
2065
+ "strategyRunRef": {
2066
+ "$ref": "#/$defs/StrategyRunIdentity"
2067
+ },
2068
+ "strategyRun": {
2069
+ "$comment": "Optional embedded snapshot; strategyRunRef remains the canonical pointer.",
2070
+ "$ref": "#/$defs/StrategyRun"
2071
+ }
2072
+ },
2073
+ "allOf": [
2074
+ {
2075
+ "$ref": "#/$defs/StrategyStateDelta"
2076
+ }
2077
+ ],
2078
+ "unevaluatedProperties": false
2079
+ }
2080
+ },
2081
+ "RunEventKind": {
2082
+ "identity": "TYPE-RunEventKind",
2083
+ "name": "RunEventKind",
2084
+ "description": "dummy-description",
2085
+ "resourceFormatRef": "FORMAT-ApplicationJson",
2086
+ "extractionSchema": {
2087
+ "$anchor": "RunEventKind",
2088
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
2089
+ "type": "string",
2090
+ "enum": [
2091
+ "graph_start",
2092
+ "tick",
2093
+ "interrupt",
2094
+ "graph_end"
2095
+ ]
2096
+ }
2097
+ },
2098
+ "RunEventCounters": {
2099
+ "identity": "TYPE-RunEventCounters",
2100
+ "name": "RunEventCounters",
2101
+ "description": "dummy-description",
2102
+ "resourceFormatRef": "FORMAT-ApplicationJson",
2103
+ "extractionSchema": {
2104
+ "$anchor": "RunEventCounters",
2105
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
2106
+ "type": "object",
2107
+ "properties": {
2108
+ "stepCounterAfter": {
2109
+ "type": "integer"
2110
+ },
2111
+ "iterationCounterAfter": {
2112
+ "type": "integer"
2113
+ }
2114
+ }
2115
+ }
2116
+ },
2117
+ "RunEventStepKind": {
2118
+ "identity": "TYPE-RunEventStepKind",
2119
+ "name": "RunEventStepKind",
2120
+ "description": "dummy-description",
2121
+ "resourceFormatRef": "FORMAT-ApplicationJson",
2122
+ "extractionSchema": {
2123
+ "$anchor": "RunEventStepKind",
2124
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
2125
+ "type": "string",
2126
+ "enum": [
2127
+ "work",
2128
+ "branch",
2129
+ "while",
2130
+ "for"
2131
+ ]
2132
+ }
2133
+ },
2134
+ "RunEventStepMetaData": {
2135
+ "identity": "TYPE-RunEventStepMetaData",
2136
+ "name": "RunEventStepMetaData",
2137
+ "description": "dummy-description",
2138
+ "resourceFormatRef": "FORMAT-ApplicationJson",
2139
+ "extractionSchema": {
2140
+ "$anchor": "RunEventStepMetaData",
2141
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
2142
+ "type": "object",
2143
+ "required": [
2144
+ "stepRef",
2145
+ "stepKind",
2146
+ "threadStepIndex"
2147
+ ],
2148
+ "properties": {
2149
+ "stepRef": {
2150
+ "oneOf": [
2151
+ {
2152
+ "$ref": "#/$defs/WorkStepIdentity"
2153
+ },
2154
+ {
2155
+ "$ref": "#/$defs/BranchStepIdentity"
2156
+ },
2157
+ {
2158
+ "$ref": "#/$defs/WhileStepIdentity"
2159
+ },
2160
+ {
2161
+ "$ref": "#/$defs/ForStepIdentity"
2162
+ }
2163
+ ]
2164
+ },
2165
+ "stepKind": {
2166
+ "$ref": "#/$defs/RunEventStepKind"
2167
+ },
2168
+ "threadStepIndex": {
2169
+ "type": "integer"
2170
+ },
2171
+ "executionRef": {
2172
+ "$ref": "#/$defs/ExecutionIdentity"
2173
+ },
2174
+ "jobRef": {
2175
+ "$ref": "#/$defs/JobIdentity"
2176
+ }
2177
+ }
2178
+ }
2179
+ },
2180
+ "RunEventUpdates": {
2181
+ "identity": "TYPE-RunEventUpdates",
2182
+ "name": "RunEventUpdates",
2183
+ "description": "dummy-description",
2184
+ "resourceFormatRef": "FORMAT-ApplicationJson",
2185
+ "extractionSchema": {
2186
+ "$anchor": "RunEventUpdates",
2187
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
2188
+ "type": "object",
2189
+ "allOf": [
2190
+ {
2191
+ "$ref": "#/$defs/StrategyStateDelta"
2192
+ }
2193
+ ],
2194
+ "properties": {
2195
+ "stepsMutation": {
2196
+ "type": "object",
2197
+ "required": [
2198
+ "insertAt",
2199
+ "inserted"
2200
+ ],
2201
+ "properties": {
2202
+ "insertAt": {
2203
+ "type": "integer"
2204
+ },
2205
+ "inserted": {
2206
+ "type": "array",
2207
+ "items": {
2208
+ "$ref": "#/$defs/Step"
2209
+ }
2210
+ }
2211
+ }
2212
+ },
2213
+ "interruptData": {
2214
+ "$comment": "Kept permissive; the engine may evolve interrupt payloads.",
2215
+ "type": [
2216
+ "object",
2217
+ "null"
2218
+ ]
2219
+ }
2220
+ }
2221
+ }
2222
+ },
2223
+ "RunEventBase": {
2224
+ "identity": "TYPE-RunEventBase",
2225
+ "name": "RunEventBase",
2226
+ "description": "dummy-description",
2227
+ "resourceFormatRef": "FORMAT-ApplicationJson",
2228
+ "extractionSchema": {
2229
+ "$anchor": "RunEventBase",
2230
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
2231
+ "type": "object",
2232
+ "required": [
2233
+ "kind",
2234
+ "strategyRunRef",
2235
+ "strategyThreadRef",
2236
+ "createdAt",
2237
+ "nodeName",
2238
+ "eventSeq"
2239
+ ],
2240
+ "properties": {
2241
+ "kind": {
2242
+ "$ref": "#/$defs/RunEventKind"
2243
+ },
2244
+ "strategyRunRef": {
2245
+ "$ref": "#/$defs/StrategyRunIdentity"
2246
+ },
2247
+ "strategyThreadRef": {
2248
+ "$ref": "#/$defs/StrategyThreadIdentity"
2249
+ },
2250
+ "createdAt": {
2251
+ "$ref": "#/$defs/Timestamp"
2252
+ },
2253
+ "nodeName": {
2254
+ "type": "string"
2255
+ },
2256
+ "eventSeq": {
2257
+ "type": "integer"
2258
+ },
2259
+ "counters": {
2260
+ "$ref": "#/$defs/RunEventCounters"
2261
+ },
2262
+ "stepMetaData": {
2263
+ "$ref": "#/$defs/RunEventStepMetaData"
2264
+ },
2265
+ "updates": {
2266
+ "$ref": "#/$defs/RunEventUpdates"
2267
+ }
2268
+ }
2269
+ }
2270
+ },
2271
+ "GraphStartRunEvent": {
2272
+ "identity": "TYPE-GraphStartRunEvent",
2273
+ "name": "GraphStartRunEvent",
2274
+ "description": "dummy-description",
2275
+ "resourceFormatRef": "FORMAT-ApplicationJson",
2276
+ "extractionSchema": {
2277
+ "$anchor": "GraphStartRunEvent",
2278
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
2279
+ "allOf": [
2280
+ {
2281
+ "$ref": "#/$defs/RunEventBase"
2282
+ },
2283
+ {
2284
+ "type": "object",
2285
+ "required": [
2286
+ "strategyRunSeed"
2287
+ ],
2288
+ "properties": {
2289
+ "kind": {
2290
+ "const": "graph_start"
2291
+ },
2292
+ "strategyRunSeed": {
2293
+ "$ref": "#/$defs/StrategyRun"
2294
+ }
2295
+ }
2296
+ }
2297
+ ]
2298
+ }
2299
+ },
2300
+ "TickRunEvent": {
2301
+ "identity": "TYPE-TickRunEvent",
2302
+ "name": "TickRunEvent",
2303
+ "description": "dummy-description",
2304
+ "resourceFormatRef": "FORMAT-ApplicationJson",
2305
+ "extractionSchema": {
2306
+ "$anchor": "TickRunEvent",
2307
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
2308
+ "allOf": [
2309
+ {
2310
+ "$ref": "#/$defs/RunEventBase"
2311
+ },
2312
+ {
2313
+ "type": "object",
2314
+ "properties": {
2315
+ "kind": {
2316
+ "const": "tick"
2317
+ }
2318
+ }
2319
+ }
2320
+ ]
2321
+ }
2322
+ },
2323
+ "InterruptRunEvent": {
2324
+ "identity": "TYPE-InterruptRunEvent",
2325
+ "name": "InterruptRunEvent",
2326
+ "description": "dummy-description",
2327
+ "resourceFormatRef": "FORMAT-ApplicationJson",
2328
+ "extractionSchema": {
2329
+ "$anchor": "InterruptRunEvent",
2330
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
2331
+ "allOf": [
2332
+ {
2333
+ "$ref": "#/$defs/RunEventBase"
2334
+ },
2335
+ {
2336
+ "type": "object",
2337
+ "properties": {
2338
+ "kind": {
2339
+ "const": "interrupt"
2340
+ }
2341
+ }
2342
+ }
2343
+ ]
2344
+ }
2345
+ },
2346
+ "GraphEndRunEvent": {
2347
+ "identity": "TYPE-GraphEndRunEvent",
2348
+ "name": "GraphEndRunEvent",
2349
+ "description": "dummy-description",
2350
+ "resourceFormatRef": "FORMAT-ApplicationJson",
2351
+ "extractionSchema": {
2352
+ "$anchor": "GraphEndRunEvent",
2353
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
2354
+ "allOf": [
2355
+ {
2356
+ "$ref": "#/$defs/RunEventBase"
2357
+ },
2358
+ {
2359
+ "type": "object",
2360
+ "properties": {
2361
+ "kind": {
2362
+ "const": "graph_end"
2363
+ }
2364
+ }
2365
+ }
2366
+ ]
2367
+ }
2368
+ },
2369
+ "RunEvent": {
2370
+ "identity": "TYPE-RunEvent",
2371
+ "name": "RunEvent",
2372
+ "description": "dummy-description",
2373
+ "resourceFormatRef": "FORMAT-ApplicationJson",
2374
+ "extractionSchema": {
2375
+ "$anchor": "RunEvent",
2376
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
2377
+ "oneOf": [
2378
+ {
2379
+ "$ref": "#/$defs/GraphStartRunEvent"
2380
+ },
2381
+ {
2382
+ "$ref": "#/$defs/TickRunEvent"
2383
+ },
2384
+ {
2385
+ "$ref": "#/$defs/InterruptRunEvent"
2386
+ },
2387
+ {
2388
+ "$ref": "#/$defs/GraphEndRunEvent"
2389
+ }
2390
+ ]
2391
+ }
2392
+ },
2393
+ "RunRecording": {
2394
+ "identity": "TYPE-RunRecording",
2395
+ "name": "RunRecording",
2396
+ "description": "dummy-description",
2397
+ "resourceFormatRef": "FORMAT-ApplicationJson",
2398
+ "extractionSchema": {
2399
+ "$anchor": "RunRecording",
2400
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
2401
+ "type": "object",
2402
+ "required": [
2403
+ "runEvents"
2404
+ ],
2405
+ "properties": {
2406
+ "strategyRunRef": {
2407
+ "$comment": "Optional; derived from the first event but useful for indexing.",
2408
+ "$ref": "#/$defs/StrategyRunIdentity"
2409
+ },
2410
+ "strategyThreadRef": {
2411
+ "$comment": "Optional; derived from the first event but useful for indexing.",
2412
+ "$ref": "#/$defs/StrategyThreadIdentity"
2413
+ },
2414
+ "recordedAt": {
2415
+ "$comment": "Optional recording timestamp.",
2416
+ "$ref": "#/$defs/Timestamp"
2417
+ },
2418
+ "runEvents": {
2419
+ "type": "array",
2420
+ "items": {
2421
+ "$ref": "#/$defs/RunEvent"
2422
+ }
2423
+ }
2061
2424
  },
2062
2425
  "unevaluatedProperties": false
2063
2426
  }