@bendyline/molen-tooling 0.0.1
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.
- package/LICENSE +21 -0
- package/NOTICE.md +15 -0
- package/README.md +91 -0
- package/dist/capture/THIRD-PARTY-NOTICES.md +223 -0
- package/dist/capture/basis/LICENSE.txt +55 -0
- package/dist/capture/basis/basis_transcoder.js +19 -0
- package/dist/capture/basis/basis_transcoder.wasm +0 -0
- package/dist/capture/capture.html +15 -0
- package/dist/capture/harness.js +4671 -0
- package/dist/capture/worldgen-preview.html +15 -0
- package/dist/capture/worldgen-preview.js +4617 -0
- package/dist/cli.d.mts +1 -0
- package/dist/cli.mjs +1276 -0
- package/dist/docs-src/guide/3d-art-guidelines.md +157 -0
- package/dist/docs-src/guide/3d-model-assets.md +286 -0
- package/dist/docs-src/guide/adaptive-performance.md +89 -0
- package/dist/docs-src/guide/agent-loop.md +156 -0
- package/dist/docs-src/guide/aircraft.md +225 -0
- package/dist/docs-src/guide/browser-mount.md +185 -0
- package/dist/docs-src/guide/building-interiors.md +175 -0
- package/dist/docs-src/guide/capability-authoring.md +69 -0
- package/dist/docs-src/guide/determinism.md +285 -0
- package/dist/docs-src/guide/entities.md +47 -0
- package/dist/docs-src/guide/examples.md +58 -0
- package/dist/docs-src/guide/experience-playback.md +57 -0
- package/dist/docs-src/guide/figures.md +164 -0
- package/dist/docs-src/guide/game-samples.md +100 -0
- package/dist/docs-src/guide/graphics-performance.md +167 -0
- package/dist/docs-src/guide/input.md +205 -0
- package/dist/docs-src/guide/materials.md +125 -0
- package/dist/docs-src/guide/project.md +157 -0
- package/dist/docs-src/guide/quickstart.md +63 -0
- package/dist/docs-src/guide/recognizable-places.md +158 -0
- package/dist/docs-src/guide/rendering-backends.md +231 -0
- package/dist/docs-src/guide/scripting.md +330 -0
- package/dist/docs-src/guide/sky.md +192 -0
- package/dist/docs-src/guide/source-bundles.md +42 -0
- package/dist/docs-src/guide/structure-library.md +114 -0
- package/dist/docs-src/guide/surface-rendering.md +203 -0
- package/dist/docs-src/guide/terrain.md +389 -0
- package/dist/docs-src/guide/three-surface.md +70 -0
- package/dist/docs-src/guide/vehicle-interiors.md +126 -0
- package/dist/docs-src/guide/vehicles.md +110 -0
- package/dist/docs-src/guide/weather.md +123 -0
- package/dist/docs-src/guide/worldgen.md +434 -0
- package/dist/docs-src/llms.txt +129 -0
- package/dist/docs-src/schemas/README.md +36 -0
- package/dist/docs-src/schemas/archstyle.md +2340 -0
- package/dist/docs-src/schemas/assert.md +169 -0
- package/dist/docs-src/schemas/asset.md +543 -0
- package/dist/docs-src/schemas/business-catalog.md +162 -0
- package/dist/docs-src/schemas/cameratrack.md +132 -0
- package/dist/docs-src/schemas/command.md +112 -0
- package/dist/docs-src/schemas/components.md +5826 -0
- package/dist/docs-src/schemas/delta.md +204 -0
- package/dist/docs-src/schemas/experience-play.md +452 -0
- package/dist/docs-src/schemas/figure.md +290 -0
- package/dist/docs-src/schemas/interior-catalog.md +230 -0
- package/dist/docs-src/schemas/keyframe.md +314 -0
- package/dist/docs-src/schemas/landmark-catalog.md +56 -0
- package/dist/docs-src/schemas/landmark.md +293 -0
- package/dist/docs-src/schemas/matgraph.md +1163 -0
- package/dist/docs-src/schemas/pack-index.md +82 -0
- package/dist/docs-src/schemas/pack-source.md +139 -0
- package/dist/docs-src/schemas/pack.md +225 -0
- package/dist/docs-src/schemas/pixelgrid.md +108 -0
- package/dist/docs-src/schemas/prefab.md +106 -0
- package/dist/docs-src/schemas/project.md +271 -0
- package/dist/docs-src/schemas/region-atlas.md +612 -0
- package/dist/docs-src/schemas/replay.md +807 -0
- package/dist/docs-src/schemas/scatter.md +541 -0
- package/dist/docs-src/schemas/scene.md +1152 -0
- package/dist/docs-src/schemas/source-bundle.md +266 -0
- package/dist/docs-src/schemas/stylepack.md +420 -0
- package/dist/docs-src/schemas/terrain-package.md +731 -0
- package/dist/docs-src/schemas/terrain.md +313 -0
- package/dist/docs-src/schemas/types.md +218 -0
- package/dist/docs-src/schemas/uvpaint.md +149 -0
- package/dist/docs-src/schemas/worldgen-batch.md +743 -0
- package/dist/index.d.mts +1271 -0
- package/dist/index.mjs +78 -0
- package/dist/mcp-BFnCWrg0.mjs +796 -0
- package/dist/ops-BGxhSP6w.mjs +7246 -0
- package/package.json +96 -0
|
@@ -0,0 +1,807 @@
|
|
|
1
|
+
# Replay fixture (`molen/replay@1`)
|
|
2
|
+
|
|
3
|
+
Initial state plus command log; determinism regenerates everything else. Used by test:replay.
|
|
4
|
+
|
|
5
|
+
## Example
|
|
6
|
+
|
|
7
|
+
```json
|
|
8
|
+
{
|
|
9
|
+
"format": "molen/replay@1",
|
|
10
|
+
"engine": "0.0.1",
|
|
11
|
+
"scene": "scenes/demo.scene.json",
|
|
12
|
+
"seed": "demo-1",
|
|
13
|
+
"ticks": 300,
|
|
14
|
+
"commands": [
|
|
15
|
+
{
|
|
16
|
+
"kind": "command",
|
|
17
|
+
"seq": 1,
|
|
18
|
+
"source": "local",
|
|
19
|
+
"tick": 45,
|
|
20
|
+
"tickExecuted": 46,
|
|
21
|
+
"type": "spawn_cube",
|
|
22
|
+
"payload": {}
|
|
23
|
+
}
|
|
24
|
+
],
|
|
25
|
+
"expected": {
|
|
26
|
+
"stateHash": "sha256:0000",
|
|
27
|
+
"eventCount": 0
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
## JSON Schema
|
|
33
|
+
|
|
34
|
+
```json
|
|
35
|
+
{
|
|
36
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
37
|
+
"anyOf": [
|
|
38
|
+
{
|
|
39
|
+
"type": "object",
|
|
40
|
+
"properties": {
|
|
41
|
+
"format": {
|
|
42
|
+
"type": "string",
|
|
43
|
+
"const": "molen/replay@1",
|
|
44
|
+
"description": "Format envelope; always 'molen/replay@1'."
|
|
45
|
+
},
|
|
46
|
+
"content": {
|
|
47
|
+
"type": "object",
|
|
48
|
+
"propertyNames": {
|
|
49
|
+
"type": "string",
|
|
50
|
+
"minLength": 1
|
|
51
|
+
},
|
|
52
|
+
"additionalProperties": {
|
|
53
|
+
"type": "object",
|
|
54
|
+
"properties": {
|
|
55
|
+
"hash": {
|
|
56
|
+
"type": "string",
|
|
57
|
+
"minLength": 1,
|
|
58
|
+
"description": "Hash of the domain's content."
|
|
59
|
+
},
|
|
60
|
+
"packs": {
|
|
61
|
+
"type": "array",
|
|
62
|
+
"items": {
|
|
63
|
+
"type": "string",
|
|
64
|
+
"minLength": 1
|
|
65
|
+
},
|
|
66
|
+
"description": "Packs the content came from, as \"id@version\"."
|
|
67
|
+
}
|
|
68
|
+
},
|
|
69
|
+
"required": [
|
|
70
|
+
"hash"
|
|
71
|
+
],
|
|
72
|
+
"additionalProperties": false
|
|
73
|
+
},
|
|
74
|
+
"description": "Content the replay was recorded with; replaying against different content fails before the first tick."
|
|
75
|
+
},
|
|
76
|
+
"engine": {
|
|
77
|
+
"type": "string",
|
|
78
|
+
"minLength": 1,
|
|
79
|
+
"description": "Engine version the fixture was recorded with."
|
|
80
|
+
},
|
|
81
|
+
"seed": {
|
|
82
|
+
"description": "Seed override (string or number; defaults to the scene seed).",
|
|
83
|
+
"type": [
|
|
84
|
+
"string",
|
|
85
|
+
"number"
|
|
86
|
+
]
|
|
87
|
+
},
|
|
88
|
+
"ticks": {
|
|
89
|
+
"type": "integer",
|
|
90
|
+
"exclusiveMinimum": 0,
|
|
91
|
+
"maximum": 9007199254740991,
|
|
92
|
+
"description": "Number of ticks to simulate."
|
|
93
|
+
},
|
|
94
|
+
"commands": {
|
|
95
|
+
"default": [],
|
|
96
|
+
"type": "array",
|
|
97
|
+
"items": {
|
|
98
|
+
"type": "object",
|
|
99
|
+
"properties": {
|
|
100
|
+
"kind": {
|
|
101
|
+
"type": "string",
|
|
102
|
+
"const": "command",
|
|
103
|
+
"description": "Envelope discriminator; always 'command'."
|
|
104
|
+
},
|
|
105
|
+
"seq": {
|
|
106
|
+
"type": "integer",
|
|
107
|
+
"minimum": 0,
|
|
108
|
+
"maximum": 9007199254740991,
|
|
109
|
+
"description": "Monotonic sequence number assigned by the source; orders commands within a tick."
|
|
110
|
+
},
|
|
111
|
+
"source": {
|
|
112
|
+
"type": "string",
|
|
113
|
+
"minLength": 1,
|
|
114
|
+
"description": "Origin of the command, e.g. 'local' or 'agent:<name>'."
|
|
115
|
+
},
|
|
116
|
+
"tick": {
|
|
117
|
+
"type": "integer",
|
|
118
|
+
"minimum": 0,
|
|
119
|
+
"maximum": 9007199254740991,
|
|
120
|
+
"description": "Tick the command was submitted for."
|
|
121
|
+
},
|
|
122
|
+
"tickExecuted": {
|
|
123
|
+
"type": "integer",
|
|
124
|
+
"minimum": 0,
|
|
125
|
+
"maximum": 9007199254740991,
|
|
126
|
+
"description": "Tick the kernel actually executed the command at (set when a late command was rewritten to a later tick)."
|
|
127
|
+
},
|
|
128
|
+
"type": {
|
|
129
|
+
"type": "string",
|
|
130
|
+
"minLength": 1,
|
|
131
|
+
"description": "Command type; must match a registered handler and, for molen/scene@3, an entry under the scene `commands`."
|
|
132
|
+
},
|
|
133
|
+
"payload": {
|
|
134
|
+
"description": "Command payload (any JSON); validated against the declared payload schema when the scene declares one.",
|
|
135
|
+
"$ref": "#/$defs/__schema0"
|
|
136
|
+
}
|
|
137
|
+
},
|
|
138
|
+
"required": [
|
|
139
|
+
"kind",
|
|
140
|
+
"seq",
|
|
141
|
+
"source",
|
|
142
|
+
"tick",
|
|
143
|
+
"type",
|
|
144
|
+
"payload"
|
|
145
|
+
],
|
|
146
|
+
"additionalProperties": false
|
|
147
|
+
},
|
|
148
|
+
"description": "Command log to feed in, ordered by tick then seq."
|
|
149
|
+
},
|
|
150
|
+
"expected": {
|
|
151
|
+
"type": "object",
|
|
152
|
+
"properties": {
|
|
153
|
+
"stateHash": {
|
|
154
|
+
"type": "string",
|
|
155
|
+
"minLength": 1,
|
|
156
|
+
"description": "Expected world-state hash after the final tick."
|
|
157
|
+
},
|
|
158
|
+
"eventCount": {
|
|
159
|
+
"type": "integer",
|
|
160
|
+
"minimum": 0,
|
|
161
|
+
"maximum": 9007199254740991,
|
|
162
|
+
"description": "Expected total number of events emitted over the run."
|
|
163
|
+
},
|
|
164
|
+
"tickHashes": {
|
|
165
|
+
"type": "array",
|
|
166
|
+
"items": {
|
|
167
|
+
"type": "string",
|
|
168
|
+
"minLength": 1
|
|
169
|
+
},
|
|
170
|
+
"description": "Per-tick reference hashes (entry i = hash after tick i) used to localize divergence."
|
|
171
|
+
}
|
|
172
|
+
},
|
|
173
|
+
"required": [
|
|
174
|
+
"stateHash"
|
|
175
|
+
],
|
|
176
|
+
"additionalProperties": false,
|
|
177
|
+
"description": "Expected outcome; a mismatch is a determinism failure."
|
|
178
|
+
},
|
|
179
|
+
"scene": {
|
|
180
|
+
"type": "string",
|
|
181
|
+
"minLength": 1,
|
|
182
|
+
"pattern": "^(?![A-Za-z]:|[/\\\\])(?!.*\\\\)(?!.*(?:^|\\/)\\.\\.(?:\\/|$)).+$",
|
|
183
|
+
"description": "Fixture-relative path to the scene file to boot from."
|
|
184
|
+
},
|
|
185
|
+
"initialKeyframe": {
|
|
186
|
+
"type": "object",
|
|
187
|
+
"properties": {
|
|
188
|
+
"kind": {
|
|
189
|
+
"type": "string",
|
|
190
|
+
"const": "keyframe",
|
|
191
|
+
"description": "Envelope discriminator; always 'keyframe'."
|
|
192
|
+
},
|
|
193
|
+
"v": {
|
|
194
|
+
"type": "number",
|
|
195
|
+
"const": 1,
|
|
196
|
+
"description": "Keyframe format version; always 1."
|
|
197
|
+
},
|
|
198
|
+
"engine": {
|
|
199
|
+
"type": "string",
|
|
200
|
+
"minLength": 1,
|
|
201
|
+
"description": "Engine version that produced the snapshot."
|
|
202
|
+
},
|
|
203
|
+
"tick": {
|
|
204
|
+
"type": "integer",
|
|
205
|
+
"minimum": 0,
|
|
206
|
+
"maximum": 9007199254740991,
|
|
207
|
+
"description": "Tick the snapshot was taken at (state after this tick)."
|
|
208
|
+
},
|
|
209
|
+
"tickRate": {
|
|
210
|
+
"type": "integer",
|
|
211
|
+
"minimum": 1,
|
|
212
|
+
"maximum": 240,
|
|
213
|
+
"description": "Simulation ticks per second of the world; dt = 1/tickRate seconds."
|
|
214
|
+
},
|
|
215
|
+
"seed": {
|
|
216
|
+
"description": "World RNG seed (string or number).",
|
|
217
|
+
"type": [
|
|
218
|
+
"string",
|
|
219
|
+
"number"
|
|
220
|
+
]
|
|
221
|
+
},
|
|
222
|
+
"nextEntitySeq": {
|
|
223
|
+
"type": "integer",
|
|
224
|
+
"minimum": 0,
|
|
225
|
+
"maximum": 9007199254740991,
|
|
226
|
+
"description": "Next runtime entity sequence number (runtime ids are 'e<seq>')."
|
|
227
|
+
},
|
|
228
|
+
"entityOrder": {
|
|
229
|
+
"type": "array",
|
|
230
|
+
"items": {
|
|
231
|
+
"type": "string",
|
|
232
|
+
"minLength": 1
|
|
233
|
+
},
|
|
234
|
+
"description": "Entity creation order; older snapshots fall back to object key order."
|
|
235
|
+
},
|
|
236
|
+
"commands": {
|
|
237
|
+
"type": "object",
|
|
238
|
+
"properties": {
|
|
239
|
+
"pending": {
|
|
240
|
+
"type": "array",
|
|
241
|
+
"items": {
|
|
242
|
+
"type": "object",
|
|
243
|
+
"properties": {
|
|
244
|
+
"kind": {
|
|
245
|
+
"type": "string",
|
|
246
|
+
"const": "command",
|
|
247
|
+
"description": "Envelope discriminator; always 'command'."
|
|
248
|
+
},
|
|
249
|
+
"seq": {
|
|
250
|
+
"type": "integer",
|
|
251
|
+
"minimum": 0,
|
|
252
|
+
"maximum": 9007199254740991,
|
|
253
|
+
"description": "Monotonic sequence number assigned by the source; orders commands within a tick."
|
|
254
|
+
},
|
|
255
|
+
"source": {
|
|
256
|
+
"type": "string",
|
|
257
|
+
"minLength": 1,
|
|
258
|
+
"description": "Origin of the command, e.g. 'local' or 'agent:<name>'."
|
|
259
|
+
},
|
|
260
|
+
"tick": {
|
|
261
|
+
"type": "integer",
|
|
262
|
+
"minimum": 0,
|
|
263
|
+
"maximum": 9007199254740991,
|
|
264
|
+
"description": "Tick the command was submitted for."
|
|
265
|
+
},
|
|
266
|
+
"tickExecuted": {
|
|
267
|
+
"type": "integer",
|
|
268
|
+
"minimum": 0,
|
|
269
|
+
"maximum": 9007199254740991,
|
|
270
|
+
"description": "Tick the kernel actually executed the command at (set when a late command was rewritten to a later tick)."
|
|
271
|
+
},
|
|
272
|
+
"type": {
|
|
273
|
+
"type": "string",
|
|
274
|
+
"minLength": 1,
|
|
275
|
+
"description": "Command type; must match a registered handler and, for molen/scene@3, an entry under the scene `commands`."
|
|
276
|
+
},
|
|
277
|
+
"payload": {
|
|
278
|
+
"description": "Command payload (any JSON); validated against the declared payload schema when the scene declares one.",
|
|
279
|
+
"$ref": "#/$defs/__schema0"
|
|
280
|
+
}
|
|
281
|
+
},
|
|
282
|
+
"required": [
|
|
283
|
+
"kind",
|
|
284
|
+
"seq",
|
|
285
|
+
"source",
|
|
286
|
+
"tick",
|
|
287
|
+
"type",
|
|
288
|
+
"payload"
|
|
289
|
+
],
|
|
290
|
+
"additionalProperties": false
|
|
291
|
+
}
|
|
292
|
+
},
|
|
293
|
+
"highestSeq": {
|
|
294
|
+
"type": "object",
|
|
295
|
+
"propertyNames": {
|
|
296
|
+
"type": "string"
|
|
297
|
+
},
|
|
298
|
+
"additionalProperties": {
|
|
299
|
+
"type": "integer",
|
|
300
|
+
"minimum": 0,
|
|
301
|
+
"maximum": 9007199254740991
|
|
302
|
+
}
|
|
303
|
+
},
|
|
304
|
+
"latePolicy": {
|
|
305
|
+
"type": "string",
|
|
306
|
+
"enum": [
|
|
307
|
+
"rewrite",
|
|
308
|
+
"reject"
|
|
309
|
+
]
|
|
310
|
+
}
|
|
311
|
+
},
|
|
312
|
+
"required": [
|
|
313
|
+
"pending",
|
|
314
|
+
"highestSeq",
|
|
315
|
+
"latePolicy"
|
|
316
|
+
],
|
|
317
|
+
"additionalProperties": false,
|
|
318
|
+
"description": "Accepted future commands and deduplication cursors."
|
|
319
|
+
},
|
|
320
|
+
"rng": {
|
|
321
|
+
"type": "object",
|
|
322
|
+
"properties": {
|
|
323
|
+
"algo": {
|
|
324
|
+
"type": "string",
|
|
325
|
+
"const": "sfc32",
|
|
326
|
+
"description": "RNG algorithm; always 'sfc32'."
|
|
327
|
+
},
|
|
328
|
+
"state": {
|
|
329
|
+
"minItems": 4,
|
|
330
|
+
"maxItems": 4,
|
|
331
|
+
"type": "array",
|
|
332
|
+
"items": {
|
|
333
|
+
"type": "integer",
|
|
334
|
+
"minimum": 0,
|
|
335
|
+
"maximum": 9007199254740991
|
|
336
|
+
},
|
|
337
|
+
"description": "The four 32-bit unsigned words of sfc32 state."
|
|
338
|
+
}
|
|
339
|
+
},
|
|
340
|
+
"required": [
|
|
341
|
+
"algo",
|
|
342
|
+
"state"
|
|
343
|
+
],
|
|
344
|
+
"additionalProperties": false,
|
|
345
|
+
"description": "Exact RNG state so the run resumes deterministically."
|
|
346
|
+
},
|
|
347
|
+
"entities": {
|
|
348
|
+
"type": "object",
|
|
349
|
+
"propertyNames": {
|
|
350
|
+
"type": "string",
|
|
351
|
+
"minLength": 1
|
|
352
|
+
},
|
|
353
|
+
"additionalProperties": {
|
|
354
|
+
"type": "object",
|
|
355
|
+
"propertyNames": {
|
|
356
|
+
"type": "string"
|
|
357
|
+
},
|
|
358
|
+
"additionalProperties": {
|
|
359
|
+
"type": "object",
|
|
360
|
+
"propertyNames": {
|
|
361
|
+
"type": "string"
|
|
362
|
+
},
|
|
363
|
+
"additionalProperties": {
|
|
364
|
+
"$ref": "#/$defs/__schema0"
|
|
365
|
+
}
|
|
366
|
+
}
|
|
367
|
+
},
|
|
368
|
+
"description": "Entity id to component map: the complete world state."
|
|
369
|
+
},
|
|
370
|
+
"plugins": {
|
|
371
|
+
"default": {},
|
|
372
|
+
"type": "object",
|
|
373
|
+
"propertyNames": {
|
|
374
|
+
"type": "string"
|
|
375
|
+
},
|
|
376
|
+
"additionalProperties": {
|
|
377
|
+
"$ref": "#/$defs/__schema0"
|
|
378
|
+
},
|
|
379
|
+
"description": "Opaque per-plugin snapshot blobs keyed by plugin name."
|
|
380
|
+
}
|
|
381
|
+
},
|
|
382
|
+
"required": [
|
|
383
|
+
"kind",
|
|
384
|
+
"v",
|
|
385
|
+
"engine",
|
|
386
|
+
"tick",
|
|
387
|
+
"tickRate",
|
|
388
|
+
"seed",
|
|
389
|
+
"nextEntitySeq",
|
|
390
|
+
"rng",
|
|
391
|
+
"entities"
|
|
392
|
+
],
|
|
393
|
+
"additionalProperties": false,
|
|
394
|
+
"description": "Keyframe to start from instead of (or in addition to) booting the scene."
|
|
395
|
+
}
|
|
396
|
+
},
|
|
397
|
+
"required": [
|
|
398
|
+
"format",
|
|
399
|
+
"engine",
|
|
400
|
+
"ticks",
|
|
401
|
+
"scene"
|
|
402
|
+
],
|
|
403
|
+
"additionalProperties": false
|
|
404
|
+
},
|
|
405
|
+
{
|
|
406
|
+
"type": "object",
|
|
407
|
+
"properties": {
|
|
408
|
+
"format": {
|
|
409
|
+
"type": "string",
|
|
410
|
+
"const": "molen/replay@1",
|
|
411
|
+
"description": "Format envelope; always 'molen/replay@1'."
|
|
412
|
+
},
|
|
413
|
+
"content": {
|
|
414
|
+
"type": "object",
|
|
415
|
+
"propertyNames": {
|
|
416
|
+
"type": "string",
|
|
417
|
+
"minLength": 1
|
|
418
|
+
},
|
|
419
|
+
"additionalProperties": {
|
|
420
|
+
"type": "object",
|
|
421
|
+
"properties": {
|
|
422
|
+
"hash": {
|
|
423
|
+
"type": "string",
|
|
424
|
+
"minLength": 1,
|
|
425
|
+
"description": "Hash of the domain's content."
|
|
426
|
+
},
|
|
427
|
+
"packs": {
|
|
428
|
+
"type": "array",
|
|
429
|
+
"items": {
|
|
430
|
+
"type": "string",
|
|
431
|
+
"minLength": 1
|
|
432
|
+
},
|
|
433
|
+
"description": "Packs the content came from, as \"id@version\"."
|
|
434
|
+
}
|
|
435
|
+
},
|
|
436
|
+
"required": [
|
|
437
|
+
"hash"
|
|
438
|
+
],
|
|
439
|
+
"additionalProperties": false
|
|
440
|
+
},
|
|
441
|
+
"description": "Content the replay was recorded with; replaying against different content fails before the first tick."
|
|
442
|
+
},
|
|
443
|
+
"engine": {
|
|
444
|
+
"type": "string",
|
|
445
|
+
"minLength": 1,
|
|
446
|
+
"description": "Engine version the fixture was recorded with."
|
|
447
|
+
},
|
|
448
|
+
"seed": {
|
|
449
|
+
"description": "Seed override (string or number; defaults to the scene seed).",
|
|
450
|
+
"type": [
|
|
451
|
+
"string",
|
|
452
|
+
"number"
|
|
453
|
+
]
|
|
454
|
+
},
|
|
455
|
+
"ticks": {
|
|
456
|
+
"type": "integer",
|
|
457
|
+
"exclusiveMinimum": 0,
|
|
458
|
+
"maximum": 9007199254740991,
|
|
459
|
+
"description": "Number of ticks to simulate."
|
|
460
|
+
},
|
|
461
|
+
"commands": {
|
|
462
|
+
"default": [],
|
|
463
|
+
"type": "array",
|
|
464
|
+
"items": {
|
|
465
|
+
"type": "object",
|
|
466
|
+
"properties": {
|
|
467
|
+
"kind": {
|
|
468
|
+
"type": "string",
|
|
469
|
+
"const": "command",
|
|
470
|
+
"description": "Envelope discriminator; always 'command'."
|
|
471
|
+
},
|
|
472
|
+
"seq": {
|
|
473
|
+
"type": "integer",
|
|
474
|
+
"minimum": 0,
|
|
475
|
+
"maximum": 9007199254740991,
|
|
476
|
+
"description": "Monotonic sequence number assigned by the source; orders commands within a tick."
|
|
477
|
+
},
|
|
478
|
+
"source": {
|
|
479
|
+
"type": "string",
|
|
480
|
+
"minLength": 1,
|
|
481
|
+
"description": "Origin of the command, e.g. 'local' or 'agent:<name>'."
|
|
482
|
+
},
|
|
483
|
+
"tick": {
|
|
484
|
+
"type": "integer",
|
|
485
|
+
"minimum": 0,
|
|
486
|
+
"maximum": 9007199254740991,
|
|
487
|
+
"description": "Tick the command was submitted for."
|
|
488
|
+
},
|
|
489
|
+
"tickExecuted": {
|
|
490
|
+
"type": "integer",
|
|
491
|
+
"minimum": 0,
|
|
492
|
+
"maximum": 9007199254740991,
|
|
493
|
+
"description": "Tick the kernel actually executed the command at (set when a late command was rewritten to a later tick)."
|
|
494
|
+
},
|
|
495
|
+
"type": {
|
|
496
|
+
"type": "string",
|
|
497
|
+
"minLength": 1,
|
|
498
|
+
"description": "Command type; must match a registered handler and, for molen/scene@3, an entry under the scene `commands`."
|
|
499
|
+
},
|
|
500
|
+
"payload": {
|
|
501
|
+
"description": "Command payload (any JSON); validated against the declared payload schema when the scene declares one.",
|
|
502
|
+
"$ref": "#/$defs/__schema0"
|
|
503
|
+
}
|
|
504
|
+
},
|
|
505
|
+
"required": [
|
|
506
|
+
"kind",
|
|
507
|
+
"seq",
|
|
508
|
+
"source",
|
|
509
|
+
"tick",
|
|
510
|
+
"type",
|
|
511
|
+
"payload"
|
|
512
|
+
],
|
|
513
|
+
"additionalProperties": false
|
|
514
|
+
},
|
|
515
|
+
"description": "Command log to feed in, ordered by tick then seq."
|
|
516
|
+
},
|
|
517
|
+
"expected": {
|
|
518
|
+
"type": "object",
|
|
519
|
+
"properties": {
|
|
520
|
+
"stateHash": {
|
|
521
|
+
"type": "string",
|
|
522
|
+
"minLength": 1,
|
|
523
|
+
"description": "Expected world-state hash after the final tick."
|
|
524
|
+
},
|
|
525
|
+
"eventCount": {
|
|
526
|
+
"type": "integer",
|
|
527
|
+
"minimum": 0,
|
|
528
|
+
"maximum": 9007199254740991,
|
|
529
|
+
"description": "Expected total number of events emitted over the run."
|
|
530
|
+
},
|
|
531
|
+
"tickHashes": {
|
|
532
|
+
"type": "array",
|
|
533
|
+
"items": {
|
|
534
|
+
"type": "string",
|
|
535
|
+
"minLength": 1
|
|
536
|
+
},
|
|
537
|
+
"description": "Per-tick reference hashes (entry i = hash after tick i) used to localize divergence."
|
|
538
|
+
}
|
|
539
|
+
},
|
|
540
|
+
"required": [
|
|
541
|
+
"stateHash"
|
|
542
|
+
],
|
|
543
|
+
"additionalProperties": false,
|
|
544
|
+
"description": "Expected outcome; a mismatch is a determinism failure."
|
|
545
|
+
},
|
|
546
|
+
"scene": {
|
|
547
|
+
"type": "string",
|
|
548
|
+
"minLength": 1,
|
|
549
|
+
"pattern": "^(?![A-Za-z]:|[/\\\\])(?!.*\\\\)(?!.*(?:^|\\/)\\.\\.(?:\\/|$)).+$",
|
|
550
|
+
"description": "Fixture-relative path to the scene file to boot from."
|
|
551
|
+
},
|
|
552
|
+
"initialKeyframe": {
|
|
553
|
+
"type": "object",
|
|
554
|
+
"properties": {
|
|
555
|
+
"kind": {
|
|
556
|
+
"type": "string",
|
|
557
|
+
"const": "keyframe",
|
|
558
|
+
"description": "Envelope discriminator; always 'keyframe'."
|
|
559
|
+
},
|
|
560
|
+
"v": {
|
|
561
|
+
"type": "number",
|
|
562
|
+
"const": 1,
|
|
563
|
+
"description": "Keyframe format version; always 1."
|
|
564
|
+
},
|
|
565
|
+
"engine": {
|
|
566
|
+
"type": "string",
|
|
567
|
+
"minLength": 1,
|
|
568
|
+
"description": "Engine version that produced the snapshot."
|
|
569
|
+
},
|
|
570
|
+
"tick": {
|
|
571
|
+
"type": "integer",
|
|
572
|
+
"minimum": 0,
|
|
573
|
+
"maximum": 9007199254740991,
|
|
574
|
+
"description": "Tick the snapshot was taken at (state after this tick)."
|
|
575
|
+
},
|
|
576
|
+
"tickRate": {
|
|
577
|
+
"type": "integer",
|
|
578
|
+
"minimum": 1,
|
|
579
|
+
"maximum": 240,
|
|
580
|
+
"description": "Simulation ticks per second of the world; dt = 1/tickRate seconds."
|
|
581
|
+
},
|
|
582
|
+
"seed": {
|
|
583
|
+
"description": "World RNG seed (string or number).",
|
|
584
|
+
"type": [
|
|
585
|
+
"string",
|
|
586
|
+
"number"
|
|
587
|
+
]
|
|
588
|
+
},
|
|
589
|
+
"nextEntitySeq": {
|
|
590
|
+
"type": "integer",
|
|
591
|
+
"minimum": 0,
|
|
592
|
+
"maximum": 9007199254740991,
|
|
593
|
+
"description": "Next runtime entity sequence number (runtime ids are 'e<seq>')."
|
|
594
|
+
},
|
|
595
|
+
"entityOrder": {
|
|
596
|
+
"type": "array",
|
|
597
|
+
"items": {
|
|
598
|
+
"type": "string",
|
|
599
|
+
"minLength": 1
|
|
600
|
+
},
|
|
601
|
+
"description": "Entity creation order; older snapshots fall back to object key order."
|
|
602
|
+
},
|
|
603
|
+
"commands": {
|
|
604
|
+
"type": "object",
|
|
605
|
+
"properties": {
|
|
606
|
+
"pending": {
|
|
607
|
+
"type": "array",
|
|
608
|
+
"items": {
|
|
609
|
+
"type": "object",
|
|
610
|
+
"properties": {
|
|
611
|
+
"kind": {
|
|
612
|
+
"type": "string",
|
|
613
|
+
"const": "command",
|
|
614
|
+
"description": "Envelope discriminator; always 'command'."
|
|
615
|
+
},
|
|
616
|
+
"seq": {
|
|
617
|
+
"type": "integer",
|
|
618
|
+
"minimum": 0,
|
|
619
|
+
"maximum": 9007199254740991,
|
|
620
|
+
"description": "Monotonic sequence number assigned by the source; orders commands within a tick."
|
|
621
|
+
},
|
|
622
|
+
"source": {
|
|
623
|
+
"type": "string",
|
|
624
|
+
"minLength": 1,
|
|
625
|
+
"description": "Origin of the command, e.g. 'local' or 'agent:<name>'."
|
|
626
|
+
},
|
|
627
|
+
"tick": {
|
|
628
|
+
"type": "integer",
|
|
629
|
+
"minimum": 0,
|
|
630
|
+
"maximum": 9007199254740991,
|
|
631
|
+
"description": "Tick the command was submitted for."
|
|
632
|
+
},
|
|
633
|
+
"tickExecuted": {
|
|
634
|
+
"type": "integer",
|
|
635
|
+
"minimum": 0,
|
|
636
|
+
"maximum": 9007199254740991,
|
|
637
|
+
"description": "Tick the kernel actually executed the command at (set when a late command was rewritten to a later tick)."
|
|
638
|
+
},
|
|
639
|
+
"type": {
|
|
640
|
+
"type": "string",
|
|
641
|
+
"minLength": 1,
|
|
642
|
+
"description": "Command type; must match a registered handler and, for molen/scene@3, an entry under the scene `commands`."
|
|
643
|
+
},
|
|
644
|
+
"payload": {
|
|
645
|
+
"description": "Command payload (any JSON); validated against the declared payload schema when the scene declares one.",
|
|
646
|
+
"$ref": "#/$defs/__schema0"
|
|
647
|
+
}
|
|
648
|
+
},
|
|
649
|
+
"required": [
|
|
650
|
+
"kind",
|
|
651
|
+
"seq",
|
|
652
|
+
"source",
|
|
653
|
+
"tick",
|
|
654
|
+
"type",
|
|
655
|
+
"payload"
|
|
656
|
+
],
|
|
657
|
+
"additionalProperties": false
|
|
658
|
+
}
|
|
659
|
+
},
|
|
660
|
+
"highestSeq": {
|
|
661
|
+
"type": "object",
|
|
662
|
+
"propertyNames": {
|
|
663
|
+
"type": "string"
|
|
664
|
+
},
|
|
665
|
+
"additionalProperties": {
|
|
666
|
+
"type": "integer",
|
|
667
|
+
"minimum": 0,
|
|
668
|
+
"maximum": 9007199254740991
|
|
669
|
+
}
|
|
670
|
+
},
|
|
671
|
+
"latePolicy": {
|
|
672
|
+
"type": "string",
|
|
673
|
+
"enum": [
|
|
674
|
+
"rewrite",
|
|
675
|
+
"reject"
|
|
676
|
+
]
|
|
677
|
+
}
|
|
678
|
+
},
|
|
679
|
+
"required": [
|
|
680
|
+
"pending",
|
|
681
|
+
"highestSeq",
|
|
682
|
+
"latePolicy"
|
|
683
|
+
],
|
|
684
|
+
"additionalProperties": false,
|
|
685
|
+
"description": "Accepted future commands and deduplication cursors."
|
|
686
|
+
},
|
|
687
|
+
"rng": {
|
|
688
|
+
"type": "object",
|
|
689
|
+
"properties": {
|
|
690
|
+
"algo": {
|
|
691
|
+
"type": "string",
|
|
692
|
+
"const": "sfc32",
|
|
693
|
+
"description": "RNG algorithm; always 'sfc32'."
|
|
694
|
+
},
|
|
695
|
+
"state": {
|
|
696
|
+
"minItems": 4,
|
|
697
|
+
"maxItems": 4,
|
|
698
|
+
"type": "array",
|
|
699
|
+
"items": {
|
|
700
|
+
"type": "integer",
|
|
701
|
+
"minimum": 0,
|
|
702
|
+
"maximum": 9007199254740991
|
|
703
|
+
},
|
|
704
|
+
"description": "The four 32-bit unsigned words of sfc32 state."
|
|
705
|
+
}
|
|
706
|
+
},
|
|
707
|
+
"required": [
|
|
708
|
+
"algo",
|
|
709
|
+
"state"
|
|
710
|
+
],
|
|
711
|
+
"additionalProperties": false,
|
|
712
|
+
"description": "Exact RNG state so the run resumes deterministically."
|
|
713
|
+
},
|
|
714
|
+
"entities": {
|
|
715
|
+
"type": "object",
|
|
716
|
+
"propertyNames": {
|
|
717
|
+
"type": "string",
|
|
718
|
+
"minLength": 1
|
|
719
|
+
},
|
|
720
|
+
"additionalProperties": {
|
|
721
|
+
"type": "object",
|
|
722
|
+
"propertyNames": {
|
|
723
|
+
"type": "string"
|
|
724
|
+
},
|
|
725
|
+
"additionalProperties": {
|
|
726
|
+
"type": "object",
|
|
727
|
+
"propertyNames": {
|
|
728
|
+
"type": "string"
|
|
729
|
+
},
|
|
730
|
+
"additionalProperties": {
|
|
731
|
+
"$ref": "#/$defs/__schema0"
|
|
732
|
+
}
|
|
733
|
+
}
|
|
734
|
+
},
|
|
735
|
+
"description": "Entity id to component map: the complete world state."
|
|
736
|
+
},
|
|
737
|
+
"plugins": {
|
|
738
|
+
"default": {},
|
|
739
|
+
"type": "object",
|
|
740
|
+
"propertyNames": {
|
|
741
|
+
"type": "string"
|
|
742
|
+
},
|
|
743
|
+
"additionalProperties": {
|
|
744
|
+
"$ref": "#/$defs/__schema0"
|
|
745
|
+
},
|
|
746
|
+
"description": "Opaque per-plugin snapshot blobs keyed by plugin name."
|
|
747
|
+
}
|
|
748
|
+
},
|
|
749
|
+
"required": [
|
|
750
|
+
"kind",
|
|
751
|
+
"v",
|
|
752
|
+
"engine",
|
|
753
|
+
"tick",
|
|
754
|
+
"tickRate",
|
|
755
|
+
"seed",
|
|
756
|
+
"nextEntitySeq",
|
|
757
|
+
"rng",
|
|
758
|
+
"entities"
|
|
759
|
+
],
|
|
760
|
+
"additionalProperties": false,
|
|
761
|
+
"description": "Keyframe to start from instead of (or in addition to) booting the scene."
|
|
762
|
+
}
|
|
763
|
+
},
|
|
764
|
+
"required": [
|
|
765
|
+
"format",
|
|
766
|
+
"engine",
|
|
767
|
+
"ticks",
|
|
768
|
+
"initialKeyframe"
|
|
769
|
+
],
|
|
770
|
+
"additionalProperties": false
|
|
771
|
+
}
|
|
772
|
+
],
|
|
773
|
+
"$defs": {
|
|
774
|
+
"__schema0": {
|
|
775
|
+
"anyOf": [
|
|
776
|
+
{
|
|
777
|
+
"type": "string"
|
|
778
|
+
},
|
|
779
|
+
{
|
|
780
|
+
"type": "number"
|
|
781
|
+
},
|
|
782
|
+
{
|
|
783
|
+
"type": "boolean"
|
|
784
|
+
},
|
|
785
|
+
{
|
|
786
|
+
"type": "null"
|
|
787
|
+
},
|
|
788
|
+
{
|
|
789
|
+
"type": "array",
|
|
790
|
+
"items": {
|
|
791
|
+
"$ref": "#/$defs/__schema0"
|
|
792
|
+
}
|
|
793
|
+
},
|
|
794
|
+
{
|
|
795
|
+
"type": "object",
|
|
796
|
+
"propertyNames": {
|
|
797
|
+
"type": "string"
|
|
798
|
+
},
|
|
799
|
+
"additionalProperties": {
|
|
800
|
+
"$ref": "#/$defs/__schema0"
|
|
801
|
+
}
|
|
802
|
+
}
|
|
803
|
+
]
|
|
804
|
+
}
|
|
805
|
+
}
|
|
806
|
+
}
|
|
807
|
+
```
|