@wildshard/shard-format 0.66.1 → 0.68.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 (43) hide show
  1. package/package.json +7 -19
  2. package/src/cli/corpus-deprecations.ts +41 -0
  3. package/src/cli/corpus.ts +300 -0
  4. package/src/cli/main.ts +32 -0
  5. package/src/format/cook-preparation.ts +22 -6
  6. package/src/format/deprecations.ts +132 -0
  7. package/src/format/empty-shardfile.json +56 -0
  8. package/src/format/empty-shardfile.ts +43 -0
  9. package/src/format/format-migrate-inventory.ts +142 -0
  10. package/src/format/format-migrate-rebuild.ts +269 -0
  11. package/src/format/format-migrate.ts +290 -0
  12. package/src/format/format-migration-journal.ts +129 -0
  13. package/src/format/format-migration-ops.ts +230 -0
  14. package/src/format/format-migration-prune.ts +106 -0
  15. package/src/format/format-migrations.ts +124 -0
  16. package/src/format/issue-codes.ts +3 -1
  17. package/src/format/items.ts +21 -3
  18. package/src/format/journal-glyphs.json +12 -0
  19. package/src/format/lootEconomy.ts +9 -1
  20. package/src/format/memory-armed.json +1 -39
  21. package/src/format/memory-armed.ts +41 -8
  22. package/src/format/memory-epoch.ts +2 -2
  23. package/src/format/memory-line.ts +4 -3
  24. package/src/format/memoryAdmission.ts +1 -1
  25. package/src/format/policy-verdict.ts +95 -0
  26. package/src/format/runtime-tier.ts +3 -3
  27. package/src/format/shardSections.ts +11 -1
  28. package/src/format/shardfile-assets.ts +12 -8
  29. package/src/format/shardfile-stream-admit.ts +41 -16
  30. package/src/format/shardfile-stream-rows.ts +3 -1
  31. package/src/format/shardfile-stream.ts +12 -9
  32. package/src/format/shardfileValidation.ts +30 -18
  33. package/src/format/stateLineage.ts +1 -1
  34. package/src/format/version.ts +11 -13
  35. package/src/format/baked-terrain.golden.json +0 -2760
  36. package/src/format/colliders.golden.json +0 -1619
  37. package/src/format/forest-placement.golden.json +0 -4588
  38. package/src/format/geometry-layout.golden.json +0 -180
  39. package/src/format/interact-table.golden.json +0 -340
  40. package/src/format/item-catalogue.golden.json +0 -2310
  41. package/src/format/memory-ratchet.ts +0 -107
  42. package/src/format/small-laws.golden.json +0 -57
  43. package/src/format/terrain-field.golden.json +0 -3998
@@ -1,180 +0,0 @@
1
- {
2
- "about": "SDK-SPLIT SP4e: engine models/nativeGeometry.ts NativeAttributesSchema and game/shardfile/wholeGeometryPieces.ts readWholePartition over geometry-layout.golden-specs.ts",
3
- "channels": [
4
- {
5
- "ok": {
6
- "position": {
7
- "semantic": "POSITION",
8
- "storage": "Float32Array",
9
- "normalized": false,
10
- "itemSize": 3
11
- }
12
- }
13
- },
14
- {
15
- "ok": {
16
- "position": {
17
- "semantic": "POSITION",
18
- "storage": "Int16Array",
19
- "normalized": false,
20
- "itemSize": 3
21
- },
22
- "normal": {
23
- "semantic": "NORMAL",
24
- "storage": "Int8Array",
25
- "normalized": true,
26
- "itemSize": 4
27
- },
28
- "aFace": {
29
- "semantic": "_AFACE",
30
- "storage": "Float16Array",
31
- "normalized": false,
32
- "itemSize": 1
33
- }
34
- }
35
- },
36
- {
37
- "ok": {
38
- "uv": {
39
- "semantic": "TEXCOORD_0",
40
- "storage": "Uint16Array",
41
- "normalized": true,
42
- "itemSize": 2
43
- },
44
- "color": {
45
- "semantic": "COLOR_0",
46
- "storage": "Uint8Array",
47
- "normalized": true,
48
- "itemSize": 4
49
- },
50
- "ids": {
51
- "semantic": "_ID",
52
- "storage": "Uint32Array",
53
- "normalized": false,
54
- "itemSize": 1
55
- }
56
- }
57
- },
58
- { "ok": {} },
59
- {
60
- "error": "Invalid type: Expected (\"Float32Array\" | \"Float16Array\" | \"Uint16Array\" | \"Uint32Array\" | \"Int16Array\" | \"Int8Array\" | \"Uint8Array\") but received \"Float64Array\""
61
- },
62
- { "error": "Invalid value: Expected <=4 but received 5" },
63
- { "error": "Invalid integer: Received 1.5" },
64
- { "error": "Invalid key: Expected never but received \"extra\"" },
65
- { "error": "Invalid key: Expected \"normalized\" but received undefined" },
66
- {
67
- "ok": {
68
- "0": {
69
- "semantic": "POSITION",
70
- "storage": "Float32Array",
71
- "normalized": false,
72
- "itemSize": 3
73
- }
74
- }
75
- },
76
- { "error": "Invalid type: Expected Object but received null" }
77
- ],
78
- "partitions": [
79
- {
80
- "id": "roof",
81
- "vertices": [0, 1, 2, 3],
82
- "triangles": [0, 1],
83
- "vertexCount": 12,
84
- "indexCount": 18,
85
- "index": "u16",
86
- "grid": null,
87
- "vertexLength": 4,
88
- "triangleLength": 2,
89
- "denseVertices": false,
90
- "denseTriangles": false
91
- },
92
- {
93
- "id": "roof",
94
- "vertices": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11],
95
- "triangles": [0, 1, 2, 3, 4, 5],
96
- "vertexCount": 12,
97
- "indexCount": 18,
98
- "index": "u16",
99
- "grid": null,
100
- "vertexLength": 12,
101
- "triangleLength": 6,
102
- "denseVertices": true,
103
- "denseTriangles": true
104
- },
105
- {
106
- "id": "roof",
107
- "vertices": [2, 3, 4, 9, 10],
108
- "triangles": [1, 4, 5],
109
- "vertexCount": 12,
110
- "indexCount": 18,
111
- "index": "u32",
112
- "grid": null,
113
- "vertexLength": 5,
114
- "triangleLength": 3,
115
- "denseVertices": false,
116
- "denseTriangles": false
117
- },
118
- {
119
- "id": "roof",
120
- "vertices": [3, 4, 5, 6, 7, 8],
121
- "triangles": [1, 2],
122
- "vertexCount": 12,
123
- "indexCount": 0,
124
- "index": "none",
125
- "grid": { "origin": [1.5, -2, 0.25], "step": 0.00390625 },
126
- "vertexLength": 6,
127
- "triangleLength": 2,
128
- "denseVertices": false,
129
- "denseTriangles": false
130
- },
131
- {
132
- "id": "roof",
133
- "vertices": [],
134
- "triangles": [],
135
- "vertexCount": 12,
136
- "indexCount": 18,
137
- "index": "u16",
138
- "grid": null,
139
- "vertexLength": 0,
140
- "triangleLength": 0,
141
- "denseVertices": false,
142
- "denseTriangles": false
143
- },
144
- {
145
- "error": "Invalid type: Expected (unknown | Object) but received Object"
146
- },
147
- {
148
- "error": "Invalid type: Expected (unknown | Object) but received Object"
149
- },
150
- {
151
- "error": "Invalid type: Expected (unknown | Object) but received Object"
152
- },
153
- {
154
- "id": "roof",
155
- "vertices": "16777216 from 0",
156
- "triangles": [0],
157
- "vertexCount": 12,
158
- "indexCount": 18,
159
- "index": "u16",
160
- "grid": null,
161
- "vertexLength": 16777216,
162
- "triangleLength": 1,
163
- "denseVertices": true,
164
- "denseTriangles": false
165
- },
166
- { "error": "Invalid type: Expected (unknown | Object) but received Array" },
167
- { "error": "Invalid type: Expected (unknown | Object) but received Array" },
168
- { "error": "Invalid value: Expected >=1 but received 0" },
169
- {
170
- "error": "Invalid type: Expected (\"none\" | \"u16\" | \"u32\") but received \"u8\""
171
- },
172
- { "error": "Invalid value: Expected <=1 but received 2" },
173
- {
174
- "error": "Invalid value: Expected >=0.000244140625 but received 0.0001220703125"
175
- },
176
- { "error": "Invalid key: Expected never but received \"extra\"" },
177
- { "error": "Invalid key: Expected \"id\" but received undefined" },
178
- { "error": "Invalid type: Expected (unknown | Object) but received Object" }
179
- ]
180
- }
@@ -1,340 +0,0 @@
1
- {
2
- "about": "SDK-SPLIT SP4f2: engine world/interact/types.ts and game/plugin/quests.ts compileQuestTable over interact-table.golden-specs.ts",
3
- "flags": [
4
- [
5
- "open:sea-chest",
6
- ["open:sea-chest", "chest:any", "key:cellar", "found:map"],
7
- ["talked:castaway", "key:hold"]
8
- ],
9
- ["taken:hold-key", ["taken:hold-key", "key:hold"], ["dead:sailor"]],
10
- ["open:sluice", ["open:sluice"], ["plate:p1", "lever:jam", "key:cellar"]],
11
- ["lever:jam", ["lever:jam", "jammed"], []],
12
- ["lever:loose", ["lever:loose"], []],
13
- ["plate:p1", ["plate:p1"], []],
14
- [null, [], []],
15
- ["taken:flint", ["taken:flint", "has:flint"], ["jammed"]],
16
- ["lit:b-lit", ["lit:b-lit"], []],
17
- ["used:seat", ["used:seat"], ["lit:b-lit"]],
18
- ["used:altar", ["used:altar"], ["shard:1", "shard:2"]]
19
- ],
20
- "transient": ["plate:"],
21
- "compiled": [
22
- {
23
- "ok": {
24
- "marks": [],
25
- "rows": [
26
- {
27
- "id": "flint",
28
- "act": 1,
29
- "at": "flint",
30
- "needs": [{ "none": ["jammed"] }, { "none": ["taken:flint"] }],
31
- "sets": ["taken:flint", "has:flint"]
32
- },
33
- {
34
- "id": "seat",
35
- "act": 2,
36
- "at": "seat",
37
- "needs": [{ "all": ["lit:b-lit"] }],
38
- "sets": ["used:seat"]
39
- },
40
- {
41
- "id": "jam",
42
- "act": 3,
43
- "at": "jam",
44
- "needs": [{ "none": ["lever:jam"] }],
45
- "sets": ["lever:jam"]
46
- }
47
- ]
48
- }
49
- },
50
- { "error": "Unsupported quest table action loose" },
51
- { "error": "Unsupported quest table action nobody" },
52
- { "error": "Unsupported quest table action sea-chest" }
53
- ],
54
- "placements": [
55
- [
56
- {
57
- "ok": [
58
- {
59
- "id": "sea-chest",
60
- "kind": "chest",
61
- "x": 0,
62
- "y": 1,
63
- "z": -0.5,
64
- "yaw": 0
65
- },
66
- {
67
- "id": "hold-key",
68
- "kind": "key",
69
- "x": 2.5,
70
- "y": 2,
71
- "z": -1.5,
72
- "yaw": 0.1
73
- },
74
- {
75
- "id": "sluice",
76
- "kind": "door",
77
- "x": 5,
78
- "y": 3,
79
- "z": -2.5,
80
- "yaw": 0.2
81
- },
82
- {
83
- "id": "jam",
84
- "kind": "lever",
85
- "x": 7.5,
86
- "y": 4,
87
- "z": -3.5,
88
- "yaw": 0.30000000000000004
89
- },
90
- {
91
- "id": "loose",
92
- "kind": "lever",
93
- "x": 10,
94
- "y": 5,
95
- "z": -4.5,
96
- "yaw": 0.4
97
- },
98
- {
99
- "id": "p1",
100
- "kind": "plate",
101
- "x": 12.5,
102
- "y": 6,
103
- "z": -5.5,
104
- "yaw": 0.5
105
- },
106
- {
107
- "id": "b1",
108
- "kind": "barrel",
109
- "x": 15,
110
- "y": 7,
111
- "z": -6.5,
112
- "yaw": 0.6000000000000001
113
- },
114
- {
115
- "id": "flint",
116
- "kind": "pickup",
117
- "x": 17.5,
118
- "y": 8,
119
- "z": -7.5,
120
- "yaw": 0.7000000000000001
121
- },
122
- {
123
- "id": "b-lit",
124
- "kind": "beacon",
125
- "x": 20,
126
- "y": 9,
127
- "z": -8.5,
128
- "yaw": 0.8
129
- },
130
- {
131
- "id": "seat",
132
- "kind": "bench",
133
- "x": 22.5,
134
- "y": 10,
135
- "z": -9.5,
136
- "yaw": 0.9
137
- },
138
- {
139
- "id": "altar",
140
- "kind": "altar",
141
- "x": 25,
142
- "y": 11,
143
- "z": -10.5,
144
- "yaw": 1
145
- }
146
- ]
147
- },
148
- {
149
- "ok": {
150
- "external": ["dead:sailor", "talked:castaway"],
151
- "rows": [
152
- {
153
- "kind": "chest",
154
- "id": "sea-chest",
155
- "at": { "poi": "world", "x": 0, "y": 1, "z": -0.5, "yaw": 0 },
156
- "lock": "hold",
157
- "contents": [
158
- { "item": "coin", "n": 3 },
159
- { "key": "cellar", "label": "Cellar key" },
160
- { "flag": "found:map", "label": "A map" }
161
- ],
162
- "requires": { "all": ["talked:castaway"] },
163
- "sets": ["chest:any"]
164
- },
165
- {
166
- "kind": "key",
167
- "id": "hold-key",
168
- "at": { "poi": "world", "x": 2.5, "y": 2, "z": -1.5, "yaw": 0.1 },
169
- "key": "hold",
170
- "label": "Hold key",
171
- "showWhen": { "any": ["dead:sailor"] }
172
- },
173
- {
174
- "kind": "door",
175
- "id": "sluice",
176
- "at": { "poi": "world", "x": 5, "y": 3, "z": -2.5, "yaw": 0.2 },
177
- "w": 2,
178
- "h": 3,
179
- "look": "sluice",
180
- "opensWhen": { "all": ["plate:p1"], "none": ["lever:jam"] },
181
- "latch": true,
182
- "lock": "cellar"
183
- },
184
- {
185
- "kind": "lever",
186
- "id": "jam",
187
- "at": {
188
- "poi": "world",
189
- "x": 7.5,
190
- "y": 4,
191
- "z": -3.5,
192
- "yaw": 0.30000000000000004
193
- },
194
- "label": "Jam",
195
- "latch": true,
196
- "sets": ["jammed"]
197
- },
198
- {
199
- "kind": "lever",
200
- "id": "loose",
201
- "at": { "poi": "world", "x": 10, "y": 5, "z": -4.5, "yaw": 0.4 },
202
- "label": "Loose"
203
- },
204
- {
205
- "kind": "plate",
206
- "id": "p1",
207
- "at": {
208
- "poi": "world",
209
- "x": 12.5,
210
- "y": 6,
211
- "z": -5.5,
212
- "yaw": 0.5
213
- },
214
- "size": 1.5,
215
- "by": "barrel"
216
- },
217
- {
218
- "kind": "barrel",
219
- "id": "b1",
220
- "at": {
221
- "poi": "world",
222
- "x": 15,
223
- "y": 7,
224
- "z": -6.5,
225
- "yaw": 0.6000000000000001
226
- },
227
- "leash": 12
228
- },
229
- {
230
- "kind": "pickup",
231
- "id": "flint",
232
- "at": {
233
- "poi": "world",
234
- "x": 17.5,
235
- "y": 8,
236
- "z": -7.5,
237
- "yaw": 0.7000000000000001
238
- },
239
- "look": "flint",
240
- "item": "flint",
241
- "label": "Flint",
242
- "sets": ["has:flint"],
243
- "requires": { "none": ["jammed"] }
244
- },
245
- {
246
- "kind": "beacon",
247
- "id": "b-lit",
248
- "at": { "poi": "world", "x": 20, "y": 9, "z": -8.5, "yaw": 0.8 },
249
- "label": "Beacon"
250
- },
251
- {
252
- "kind": "bench",
253
- "id": "seat",
254
- "at": {
255
- "poi": "world",
256
- "x": 22.5,
257
- "y": 10,
258
- "z": -9.5,
259
- "yaw": 0.9
260
- },
261
- "label": "Sit",
262
- "showWhen": { "all": ["lit:b-lit"] }
263
- },
264
- {
265
- "kind": "altar",
266
- "id": "altar",
267
- "at": { "poi": "world", "x": 25, "y": 11, "z": -10.5, "yaw": 1 },
268
- "label": "Altar",
269
- "fills": ["shard:1", "shard:2"],
270
- "socketLook": "token"
271
- }
272
- ]
273
- }
274
- }
275
- ],
276
- [
277
- {
278
- "ok": [
279
- { "id": "hold-key", "kind": "key", "x": 0, "y": 0, "z": 0, "yaw": 0 },
280
- { "id": "sluice", "kind": "door", "x": 0, "y": 0, "z": 0, "yaw": 0 },
281
- { "id": "jam", "kind": "lever", "x": 0, "y": 0, "z": 0, "yaw": 0 },
282
- { "id": "loose", "kind": "lever", "x": 0, "y": 0, "z": 0, "yaw": 0 },
283
- { "id": "p1", "kind": "plate", "x": 0, "y": 0, "z": 0, "yaw": 0 },
284
- { "id": "b1", "kind": "barrel", "x": 0, "y": 0, "z": 0, "yaw": 0 },
285
- { "id": "flint", "kind": "pickup", "x": 0, "y": 0, "z": 0, "yaw": 0 },
286
- { "id": "b-lit", "kind": "beacon", "x": 0, "y": 0, "z": 0, "yaw": 0 },
287
- { "id": "seat", "kind": "bench", "x": 0, "y": 0, "z": 0, "yaw": 0 },
288
- { "id": "altar", "kind": "altar", "x": 0, "y": 0, "z": 0, "yaw": 0 }
289
- ]
290
- },
291
- { "error": "Incomplete interactable placements" }
292
- ],
293
- [
294
- { "error": "Invalid or duplicate interactable placement" },
295
- { "error": "Invalid or duplicate interactable placement" }
296
- ],
297
- [
298
- { "error": "Invalid or duplicate interactable placement" },
299
- { "error": "Invalid or duplicate interactable placement" }
300
- ],
301
- [
302
- { "error": "Invalid interactable placement rows" },
303
- { "error": "Invalid interactable placement rows" }
304
- ]
305
- ],
306
- "places": [
307
- { "ok": { "x": 3, "z": 4, "y": 2, "yaw": 0 } },
308
- { "ok": { "x": 25, "z": 0, "y": 1.7, "yaw": 0 } },
309
- {
310
- "ok": {
311
- "x": 12.215313703214393,
312
- "z": -4.303949331880392,
313
- "y": -0.15098243002841472,
314
- "yaw": 1
315
- }
316
- },
317
- {
318
- "ok": {
319
- "x": 12.215313703214393,
320
- "z": -4.303949331880392,
321
- "y": 7,
322
- "yaw": 0.6
323
- }
324
- },
325
- { "ok": { "x": -28, "z": 15, "y": 0.6980690824569424, "yaw": 1.1 } },
326
- { "ok": { "x": -31, "z": 10, "y": 3.5, "yaw": 0 } },
327
- {
328
- "ok": {
329
- "x": -31.36805547124873,
330
- "z": 12.358363262049016,
331
- "y": 0.7004632940187168,
332
- "yaw": -2.1
333
- }
334
- },
335
- { "ok": { "x": 4, "z": 5, "y": -0.3332291921975812, "yaw": 0.2 } },
336
- { "error": "Missing quest frame cave" },
337
- { "error": "Invalid quest placement coordinate" }
338
- ],
339
- "floors": [2, 1.4, -0.2799225651577502]
340
- }