@wildshard/engine 0.1.18 → 0.1.20
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/CHANGELOG.md +16 -0
- package/budgets/shard-size-baseline.json +10 -4
- package/index.html +6 -4
- package/lint/engine-sides.json +18 -0
- package/lint/ratchet.json +0 -68
- package/lint/ratchet.mjs +1 -4
- package/package.json +19 -15
- package/scripts/agent-sync.mjs +27 -8
- package/scripts/app-build/appCook.ts +8 -2
- package/scripts/app-build/catalogue.ts +10 -7
- package/scripts/app-build/gen.ts +33 -2
- package/scripts/app-build/isolation.d.mts +10 -0
- package/scripts/app-build/isolation.mjs +47 -0
- package/scripts/app-build/outputProducts.mjs +4 -0
- package/scripts/app-build/previousDeploy.d.mts +2 -0
- package/scripts/app-build/previousDeploy.mjs +10 -1
- package/scripts/app-build/serviceWorker.ts +10 -3
- package/scripts/app-build/splitOutput.mjs +4 -2
- package/scripts/app-build/standaloneOutput.d.mts +1 -1
- package/scripts/app-build/standaloneOutput.mjs +5 -3
- package/scripts/app-build/titlePreloads.d.mts +8 -0
- package/scripts/app-build/titlePreloads.mjs +69 -0
- package/scripts/app-build/worldMapAtlas.ts +10 -6
- package/scripts/app-build-pipeline.mjs +31 -3
- package/scripts/built-product.mjs +1 -1
- package/scripts/cell-mem-bench.mjs +83 -23
- package/scripts/check-custom-sections-zero.mjs +1 -1
- package/scripts/check-devserver.mjs +2 -0
- package/scripts/check-models.mjs +2 -0
- package/scripts/check-paths.allow.json +0 -115
- package/scripts/check-paths.mjs +2 -2
- package/scripts/check-platform-ratchets.mjs +2 -3
- package/scripts/chromium-keychain.d.mts +1 -1
- package/scripts/ci-static.sh +1 -1
- package/scripts/committed-fast-checks.mjs +0 -2
- package/scripts/content-sw-proof.mjs +2 -1
- package/scripts/cook-worker.mjs +9 -3
- package/scripts/cook.mjs +18 -5
- package/scripts/docs-inputs-proof.mjs +6 -6
- package/scripts/e7-voice-staging-proof.mjs +1 -1
- package/scripts/gate-related-tests.mjs +1 -1
- package/scripts/git-source-view.mjs +1 -1
- package/scripts/goldens/capture.mjs +17 -5
- package/scripts/grid-crossing-nightly.mjs +59 -0
- package/scripts/grid-crossing-qa.mjs +44 -0
- package/scripts/grid-crossing-ratchet.d.mts +6 -0
- package/scripts/grid-crossing-ratchet.mjs +52 -0
- package/scripts/grid-crossing-report.mjs +122 -0
- package/scripts/grid-crossing-stages.mjs +47 -0
- package/scripts/grid-crossing-tour.mjs +284 -0
- package/scripts/grid-crossing-walk-proof.mjs +126 -17
- package/scripts/host-ruler/roots.mjs +2 -2
- package/scripts/host-ruler.d.mts +91 -0
- package/scripts/host-ruler.mjs +565 -0
- package/scripts/land.mjs +2 -1
- package/scripts/live-prepush.py +3 -5
- package/scripts/loading-flow/benchmax.mjs +37 -12
- package/scripts/loading-flow/deskbench.mjs +276 -0
- package/scripts/loading-flow/stalls.d.mts +17 -3
- package/scripts/loading-flow/stalls.mjs +82 -3
- package/scripts/look-loop/test_look_loop.py +1 -38
- package/scripts/memory-proof.mjs +61 -6
- package/scripts/mmo-bots.mjs +8 -2
- package/scripts/net-lag-proof.mjs +219 -0
- package/scripts/night-market-kit-budget.mjs +2 -2
- package/scripts/nightly-model.ts +9 -6
- package/scripts/offline-proof-rules.d.mts +2 -2
- package/scripts/offline-proof-rules.mjs +15 -4
- package/scripts/offline-proof.mjs +80 -13
- package/scripts/{shard-platform-output.mjs → output-reader.mjs} +1 -1
- package/scripts/page-release/content.d.mts +9 -1
- package/scripts/page-release/content.mjs +131 -17
- package/scripts/page-release/flow.mjs +36 -10
- package/scripts/page-release/stamp-content.mjs +24 -0
- package/scripts/page-release.mjs +28 -6
- package/scripts/page-size.mjs +2 -1
- package/scripts/parity/boot-smoke.mjs +13 -2
- package/scripts/pin-format.ts +5 -2
- package/scripts/pin-packs.ts +1 -1
- package/scripts/pins-reuse.d.mts +1 -0
- package/scripts/pins-reuse.mjs +22 -0
- package/scripts/pins.ts +4 -4
- package/scripts/precommit-checks.mjs +1 -7
- package/scripts/precommit-jobs.mjs +0 -1
- package/scripts/precommit-source.py +1 -9
- package/scripts/program-discovery.mjs +1 -1
- package/scripts/ring-cook.mjs +2 -1
- package/scripts/ring-step.ts +1 -1
- package/scripts/scratch-dir.mjs +95 -0
- package/scripts/scratch-sweep.mjs +182 -0
- package/scripts/script-scenario-metrics.mjs +1 -1
- package/scripts/shard-output-content.d.mts +1 -1
- package/scripts/shard-output-content.mjs +2 -2
- package/scripts/shard-outputs.mjs +1 -1
- package/scripts/shard-public.mjs +1 -1
- package/scripts/shard-wire-meter.mjs +24 -9
- package/scripts/side-parity.mjs +4 -2
- package/scripts/standalone-smoke.mjs +8 -3
- package/scripts/tier-textures.mjs +22 -4
- package/scripts/tile-bake-report.mjs +1 -1
- package/scripts/tile-bakes.mjs +1 -1
- package/scripts/title-assets.generated.json +2 -0
- package/scripts/tsconfig.json +2 -14
- package/scripts/vendor/basisu/LICENSE +201 -0
- package/scripts/vendor/basisu/basis_encoder.cjs +2 -0
- package/scripts/vendor/basisu/basis_encoder.wasm +0 -0
- package/scripts/vitest-push-guards.config.ts +1 -1
- package/scripts/vps/harden-apply.sh +4 -1
- package/scripts/vps/harden-prometheus.sh +179 -0
- package/scripts/vps/harden.sh +16 -0
- package/scripts/vps/rebuild.sh +18 -0
- package/scripts/vps/wildshard-config +6 -2
- package/scripts/worker-client-play.mjs +6 -2
- package/scripts/worktree-reap.mjs +59 -13
- package/scripts/worktree.mjs +19 -5
- package/src/.oxlintrc.json +3 -182
- package/src/client/app/entry.ts +10 -2
- package/src/client/engine/anim/rigParser.ts +2 -2
- package/src/client/engine/boot/bootCache.ts +2 -2
- package/src/client/engine/boot/bootTrace.ts +12 -4
- package/src/client/engine/boot/browserChunkRecovery.ts +4 -0
- package/src/client/engine/boot/clearDownloads.ts +5 -2
- package/src/client/engine/boot/contentRead.ts +11 -0
- package/src/client/engine/boot/gpuFiles.ts +4 -2
- package/src/client/engine/boot/lastEnd.ts +99 -12
- package/src/client/engine/boot/texturePack.ts +2 -2
- package/src/client/engine/core/Game.ts +63 -19
- package/src/client/engine/core/gpuOnly.ts +10 -0
- package/src/client/engine/core/renderBudget.ts +134 -0
- package/src/client/engine/net/netPlayer.ts +19 -2
- package/src/client/engine/net/otherPlayers.ts +55 -8
- package/src/client/engine/net/predictor.ts +33 -9
- package/src/client/engine/net/redial.ts +68 -10
- package/src/client/engine/pwa/cacheNames.ts +58 -1
- package/src/client/engine/pwa/sw.js +41 -11
- package/src/client/engine/render/dataLook.ts +219 -44
- package/src/client/engine/render/families/detail.ts +89 -0
- package/src/client/engine/render/families/pbr.ts +9 -1
- package/src/client/engine/render/families/registry.ts +11 -2
- package/src/client/engine/render/families/sceneSurface.ts +116 -0
- package/src/client/engine/render/look.ts +12 -0
- package/src/client/engine/render/lookLight.ts +103 -11
- package/src/client/engine/render/lookRender.ts +105 -0
- package/src/client/engine/render/precompile.ts +4 -2
- package/src/client/engine/render/tiers.ts +4 -1
- package/src/client/engine/saves/indexed.ts +2 -2
- package/src/client/engine/telemetry/browserErrors.ts +24 -3
- package/src/client/engine/telemetry/staleBuildReport.ts +22 -1
- package/src/client/engine/ui/debugOptions.ts +1 -1
- package/src/client/engine/ui/lookLightOption.ts +10 -6
- package/src/client/engine/ui/namePrompt.ts +7 -0
- package/src/client/engine/world/declaredProps.ts +5 -1
- package/src/client/engine/world/skyRig.ts +4 -1
- package/src/client/engine/world/terrainTileView.ts +64 -23
- package/src/client/game/boot/audio.generated.ts +114 -114
- package/src/client/game/boot/bytes.generated.ts +118 -220
- package/src/client/game/boot/placedSpawn.ts +35 -0
- package/src/client/game/boot/spawnDownload.ts +25 -6
- package/src/client/game/boot/versions.generated.ts +7 -5
- package/src/client/game/devScene/hook.ts +428 -0
- package/src/client/game/devScene/liveLook.ts +21 -0
- package/src/client/game/grid/cellLoading.ts +12 -2
- package/src/client/game/grid/live.ts +152 -19
- package/src/client/game/grid/liveSession.ts +53 -3
- package/src/client/game/grid/mapAtlas.ts +18 -4
- package/src/client/game/grid/minimapBlend.ts +15 -5
- package/src/client/game/grid/oneWayIn.ts +5 -1
- package/src/client/game/grid/pageEntry.ts +12 -1
- package/src/client/game/grid/placedCells.ts +114 -12
- package/src/client/game/grid/placedContent.ts +85 -0
- package/src/client/game/grid/prefetch.ts +9 -1
- package/src/client/game/grid/productInputs.ts +23 -10
- package/src/client/game/grid/productLeases.ts +4 -1
- package/src/client/game/grid/products.ts +8 -4
- package/src/client/game/grid/roadLook.ts +24 -15
- package/src/client/game/grid/roadLookPlatform.ts +4 -2
- package/src/client/game/grid/roadResources.ts +24 -0
- package/src/client/game/grid/roadSign.worker.ts +4 -3
- package/src/client/game/grid/roadSignPaint.ts +16 -5
- package/src/client/game/grid/roadSignPreparation.ts +4 -3
- package/src/client/game/grid/roadSignScale.ts +8 -0
- package/src/client/game/grid/roadTileCapture.worker.ts +3 -1
- package/src/client/game/grid/roadTileCaptureWorker.ts +2 -1
- package/src/client/game/grid/roadTileWrite.worker.ts +4 -2
- package/src/client/game/grid/roadTileWriter.ts +2 -1
- package/src/client/game/grid/screenReports.ts +39 -0
- package/src/client/game/grid/session.ts +32 -7
- package/src/client/game/grid/softWallLook.ts +25 -8
- package/src/client/game/mainMenu.ts +6 -2
- package/src/client/game/plugin/context.ts +2 -1
- package/src/client/game/plugin/followedMovers.ts +7 -1
- package/src/client/game/quest/figures.ts +2 -0
- package/src/client/game/session/finish.ts +9 -0
- package/src/client/game/shardfile/assetCache.ts +4 -4
- package/src/client/game/shardfile/client.ts +28 -8
- package/src/client/game/shardfile/clientAssets.ts +9 -5
- package/src/client/game/shardfile/clientLibrary.ts +1 -1
- package/src/client/game/shardfile/clientPropMaterials.ts +4 -1
- package/src/client/game/shardfile/clientViews.ts +36 -8
- package/src/client/game/shardfile/clientWater.ts +51 -9
- package/src/client/game/shardfile/clientWorker.ts +19 -7
- package/src/client/game/shardfile/constructionCheckpoint.ts +2 -2
- package/src/client/game/shardfile/groundMerge.ts +57 -5
- package/src/client/game/shardfile/hybrid.ts +2 -0
- package/src/client/game/shardfile/look.ts +8 -3
- package/src/client/game/shardfile/product.ts +34 -7
- package/src/client/game/shardfile/productChecks.ts +2 -2
- package/src/client/game/shardfile/productCost.ts +2 -2
- package/src/client/game/shardfile/readAsset.ts +2 -2
- package/src/client/game/shardfile/reflectingWater.ts +73 -0
- package/src/client/game/shardfile/seatGrace.ts +9 -0
- package/src/client/game/shardfile/skinPlayback.ts +1 -1
- package/src/client/game/shardfile/slabLibrary.ts +115 -49
- package/src/client/game/shardfile/tileContent.ts +1 -1
- package/src/client/game/shardfile/tileDriver.ts +38 -11
- package/src/client/game/shardfile/wirePage.ts +7 -3
- package/src/client/game/shardfile/worldScenes.ts +17 -10
- package/src/client/game/systems/npc/figureRows.ts +9 -0
- package/src/client/host/online/doctor.ts +22 -7
- package/src/client/host/online/doctorView.ts +2 -0
- package/src/client/host/online/linkScreens.ts +109 -5
- package/src/client/host/online/shell.ts +13 -4
- package/src/client/host/standalone/shell.ts +40 -0
- package/src/cook/game/astc6Encode.ts +55 -0
- package/src/cook/game/astc6Wasm.ts +176 -0
- package/src/cook/game/cookJob.ts +30 -6
- package/src/cook/game/cookWorker.ts +38 -11
- package/src/cook/game/entryTotals.ts +51 -24
- package/src/cook/game/shardCook.ts +35 -7
- package/src/cook/game/spawnParts.ts +33 -8
- package/src/cook/game/tierTextures.ts +87 -14
- package/src/server/engine/ai/bossContenders.ts +27 -3
- package/src/server/engine/ai/phases.ts +1 -1
- package/src/server/engine/entities/creatureRefill.ts +9 -2
- package/src/server/engine/net/ledgerBook.ts +2 -0
- package/src/server/engine/net/room.ts +15 -0
- package/src/server/engine/sim/respawn.ts +8 -0
- package/src/server/game/boss/arenaRoomEntry.ts +5 -1
- package/src/server/game/boss/arenaRoomNative.ts +2 -0
- package/src/server/game/boss/native.ts +2 -1
- package/src/server/game/boss/nativeWake.ts +9 -5
- package/src/server/game/boss/openArenaNative.ts +2 -2
- package/src/server/game/boss/openArenaRoom.ts +3 -1
- package/src/server/game/grid/room.ts +44 -3
- package/src/server/game/grid/simulation.ts +23 -0
- package/src/server/game/population/mixedRoster.ts +11 -3
- package/src/server/game/population/nativeBake.ts +8 -3
- package/src/server/game/population/nativeReturns.ts +6 -3
- package/src/server/game/population/roster.ts +5 -3
- package/src/server/game/quest/eliteDrops.ts +18 -3
- package/src/server/game/quest/nativeChapter.ts +1 -1
- package/src/server/game/quest/nativeComposition.ts +5 -1
- package/src/server/game/riding/nativeTaming.ts +22 -7
- package/src/server/game/riding/wildRefill.ts +3 -2
- package/src/server/game/shardfile/bossRow.ts +4 -2
- package/src/server/game/shardfile/homeKeeper.ts +4 -2
- package/src/server/host/bake/headlessWorker.ts +1 -1
- package/src/server/host/dedicated/cellHost.ts +112 -18
- package/src/server/host/dedicated/cellProtocol.ts +18 -1
- package/src/server/host/dedicated/cellWorker.ts +8 -5
- package/src/server/host/dedicated/dedicatedRoom.ts +38 -11
- package/src/server/host/dedicated/gridCells.ts +15 -6
- package/src/server/host/dedicated/loopLag.ts +21 -0
- package/src/server/host/dedicated/main.ts +13 -5
- package/src/server/host/dedicated/packReader.ts +3 -3
- package/src/server/host/dedicated/placementFile.ts +3 -2
- package/src/server/host/dedicated/roadRoom.ts +34 -4
- package/src/server/host/dedicated/serverMetrics.ts +135 -0
- package/src/server/host/dedicated/socketPump.ts +21 -4
- package/src/server/host/dedicated/workerTable.ts +32 -14
- package/src/server/host/dedicated/world.ts +65 -7
- package/src/server/host/headless.ts +1 -1
- package/src/server/host/headlessRuntime.ts +1 -1
- package/src/server/host/standalone/roadWorld.ts +15 -3
- package/src/server/host/standalone/serverHost.ts +57 -8
- package/src/server/host/standalone/serverProduct.ts +48 -16
- package/src/server/host/standalone/serverRuntime.ts +1 -1
- package/src/shared/engine/ai/BossBrain.ts +8 -0
- package/src/shared/engine/core/framePacing.ts +12 -1
- package/src/shared/engine/physics/terrainTiles.ts +20 -4
- package/src/shared/game/boss/wake.ts +6 -0
- package/src/shared/game/devColliders.ts +107 -0
- package/src/shared/game/devGameplay.ts +41 -0
- package/src/shared/game/eliteSystem.ts +8 -0
- package/src/shared/game/grid/allocator.ts +3 -0
- package/src/shared/game/grid/placementRows.ts +5 -2
- package/src/shared/game/plugin/bossRecord.ts +3 -2
- package/src/shared/game/shardfile/ktx2Targets.ts +23 -3
- package/src/shared/game/shardfile/outputDescriptor.ts +9 -5
- package/src/shared/game/shardfile/packReads.ts +28 -3
- package/src/shared/game/shardfile/serverPack.ts +9 -0
- package/src/shared/game/systems/looks/trampleField.ts +2 -0
- package/src/shared/host/formatJsonSchema.ts +2 -2
- package/src/tsconfig.json +1 -27
- package/lint/host-reviews.json +0 -14
- package/lint/listed-view-code.json +0 -13
- package/lint/platform-pending-users.json +0 -2520
- package/lint/platform-pending-users.md +0 -18
- package/scripts/cell-mem/metrics-preload.mjs +0 -65
- package/scripts/check-closed-components.d.mts +0 -7
- package/scripts/check-closed-components.mjs +0 -87
- package/scripts/g571-hosts.d.mts +0 -3
- package/scripts/g571-hosts.mjs +0 -54
- package/scripts/host-ruler/register-migrate.mjs +0 -242
- package/scripts/listed-view-code.d.mts +0 -7
- package/scripts/listed-view-code.mjs +0 -93
- package/scripts/look-loop/fit-lut.py +0 -142
- package/scripts/look-loop/palette-delta.py +0 -183
- package/scripts/look-loop/regions/driftwood-isle.json +0 -25
- package/scripts/look-loop/regions/far-reach.json +0 -225
- package/scripts/look-loop/regions/open-plot-night-market.json +0 -855
- package/scripts/look-loop/regions/pine-hollow.json +0 -22
- package/scripts/look-loop/regions/sunscar-dunes.json +0 -281
- package/scripts/platform-chargebacks.d.mts +0 -9
- package/scripts/platform-chargebacks.mjs +0 -135
- package/scripts/shard-component-spans.d.mts +0 -15
- package/scripts/shard-component-spans.mjs +0 -18
- package/scripts/shard-components.d.mts +0 -16
- package/scripts/shard-components.mjs +0 -363
- package/scripts/shard-platform-hosts.d.mts +0 -2
- package/scripts/shard-platform-hosts.mjs +0 -93
- package/scripts/shard-platform-sections.d.mts +0 -2
- package/scripts/shard-platform-sections.mjs +0 -9
- package/scripts/shard-platform.d.mts +0 -76
- package/scripts/shard-platform.mjs +0 -1072
- package/src/.oxfmtrc.json +0 -48
- package/src/scripts/ask-new.sh +0 -29
- package/src/scripts/asks.mjs +0 -142
- package/src/scripts/herdr-prompt.sh +0 -34
- package/src/scripts/herdr-question-open.sh +0 -67
- package/src/scripts/md-wrap.mjs +0 -229
- /package/scripts/{shard-platform-format.d.mts → node-format.d.mts} +0 -0
- /package/scripts/{shard-platform-format.mjs → node-format.mjs} +0 -0
- /package/scripts/{shard-platform-output.d.mts → output-reader.d.mts} +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -9,6 +9,22 @@ run `../repo-kit/release.sh vX.Y.Z --prepare` and `--finish` as before (the help
|
|
|
9
9
|
`scripts/changelog.mjs` checks the format; the pre-push hook and CI refuse a push whose `package.json` version has no
|
|
10
10
|
valid section, and a `vX.Y.Z` tag whose commit has none.
|
|
11
11
|
|
|
12
|
+
## v0.1.20 (2026-11-14)
|
|
13
|
+
|
|
14
|
+
- Big desktop screens stay smoother: the game drops its render sharpness a step when frames run slow and raises it again when there is room.
|
|
15
|
+
- Walking into the next shard is faster: the shard ahead loads first, and you no longer freeze at the edge of a shard while it builds.
|
|
16
|
+
- Glowing parts of a shard, like lamps and lit windows, glow again in the new looks.
|
|
17
|
+
- A small chip tells you when your connection is slow or unstable, and coming back after a long time away shows a welcome back card.
|
|
18
|
+
- Behind the scenes: the server spreads busy shards across its workers by how much work each one costs, and its monitoring works again.
|
|
19
|
+
|
|
20
|
+
## v0.1.19 (2026-11-13)
|
|
21
|
+
|
|
22
|
+
- Mossgate Hollow and Brasscap Mesa have new looks: sunset sky, warm lamps, mossy stone, and a beach edge on Mossgate's pond.
|
|
23
|
+
- Walking from one shard into the next no longer stops at a loading wall: the shard ahead warms up while you are on the road.
|
|
24
|
+
- The game keeps playing through a dropped connection, loads from cache offline, and reconnects once you are back online.
|
|
25
|
+
- Far Reach is on its third version with docks at its exits, and the map tab no longer breaks on a missing tile.
|
|
26
|
+
- Behind the scenes: shards can ask for mirror water, lamp halos, glowing motes and exposure; the server reports to monitoring.
|
|
27
|
+
|
|
12
28
|
## v0.1.18 (2026-11-13)
|
|
13
29
|
|
|
14
30
|
- Share a shard with a link: play.wildshard.io/slug/driftwood-isle opens that shard and shows its name and picture in chat previews.
|
|
@@ -70,6 +70,12 @@
|
|
|
70
70
|
"toBytes": 34683878,
|
|
71
71
|
"decision": "J299",
|
|
72
72
|
"why": "AUDIO AU1 (J299, Jake 2026-11-12: audio downloads at DOWNLOAD and is cached): the boot audio set moved into the phone download, +2.29 MB over the 32.40 MB latch, inside J303's 10 MB audio budget. Raised by opus-rel14 for v0.1.14."
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
"shard": "far-reach",
|
|
76
|
+
"toBytes": 26340742,
|
|
77
|
+
"decision": "J338",
|
|
78
|
+
"why": "GC30b (J338, Jake 2026-11-13: \"let's have it look GREAT FIRST ; then optimize megabytes later\", up to 50 MB a shard, 100 MB the hard ceiling): Sky Reach rev 3 (cdbb400c) gives Far Reach its entry docks and ships its phone tier as copies of the desktop GLBs, +0.36 MB over the 25.98 MB latch. The look stays; megabytes are optimised later. Raised by opus-farreach."
|
|
73
79
|
}
|
|
74
80
|
],
|
|
75
81
|
"shards": {
|
|
@@ -157,7 +163,7 @@
|
|
|
157
163
|
"driftwood-isle": {
|
|
158
164
|
"baselinePhoneBytes": 23757802,
|
|
159
165
|
"recordedPhoneBytes": 26278506,
|
|
160
|
-
"ceilingPhoneBytes":
|
|
166
|
+
"ceilingPhoneBytes": 21082585,
|
|
161
167
|
"shrinkOnly": true,
|
|
162
168
|
"baseline": {
|
|
163
169
|
"phone": {
|
|
@@ -233,12 +239,12 @@
|
|
|
233
239
|
"bytes": 94310912,
|
|
234
240
|
"mountsAssetsBytes": 12076637
|
|
235
241
|
},
|
|
236
|
-
"latchedPhoneBytes":
|
|
242
|
+
"latchedPhoneBytes": 21082585
|
|
237
243
|
},
|
|
238
244
|
"far-reach": {
|
|
239
245
|
"baselinePhoneBytes": 49888072,
|
|
240
246
|
"recordedPhoneBytes": 53585115,
|
|
241
|
-
"ceilingPhoneBytes":
|
|
247
|
+
"ceilingPhoneBytes": 26340742,
|
|
242
248
|
"shrinkOnly": true,
|
|
243
249
|
"baseline": {
|
|
244
250
|
"phone": {
|
|
@@ -310,7 +316,7 @@
|
|
|
310
316
|
"bytes": 66691072,
|
|
311
317
|
"mountsAssetsBytes": 29602062
|
|
312
318
|
},
|
|
313
|
-
"latchedPhoneBytes":
|
|
319
|
+
"latchedPhoneBytes": 25980736
|
|
314
320
|
},
|
|
315
321
|
"sunscar-dunes": {
|
|
316
322
|
"baselinePhoneBytes": 12421514,
|
package/index.html
CHANGED
|
@@ -215,7 +215,7 @@
|
|
|
215
215
|
<script>
|
|
216
216
|
// Plain launch: the shard selector is the first screen, with no world or loading panel underneath it.
|
|
217
217
|
// BEGIN TITLE URLS
|
|
218
|
-
const titleAssetURLs = {"/assets/title/driftwood-isle-portrait.jpg":"/assets/title/driftwood-isle-portrait-e9d5c9aedd5c5920.jpg","/assets/title/launch-1206x2622-6afc7dd7eee8.png":"/assets/title/launch-1206x2622-6afc7dd7eee8.png","/assets/title/main-crossroads-landscape.jpg":"/assets/title/main-crossroads-landscape-9437ac10c599548a.jpg","/assets/title/main-crossroads-square.jpg":"/assets/title/main-crossroads-square-24abf23d2606ae3f.jpg","/assets/title/nalati-grasslands-portrait.jpg":"/assets/title/nalati-grasslands-portrait-5ac0c2e430a5a22b.jpg","/assets/title/nine-dragon-stack-portrait.jpg":"/assets/title/nine-dragon-stack-portrait-d92d65e333c1ccba.jpg","/assets/title/pine-hollow-portrait.jpg":"/assets/title/pine-hollow-portrait-30a60f74489265a0.jpg"};
|
|
218
|
+
const titleAssetURLs = {"/assets/title/driftwood-isle-portrait.jpg":"/assets/title/driftwood-isle-portrait-e9d5c9aedd5c5920.jpg","/assets/title/launch-1206x2622-6afc7dd7eee8.png":"/assets/title/launch-1206x2622-6afc7dd7eee8.png","/assets/title/main-crossroads-landscape-first.jpg":"/assets/title/main-crossroads-landscape-first-f3f196486b3476a0.jpg","/assets/title/main-crossroads-landscape.jpg":"/assets/title/main-crossroads-landscape-9437ac10c599548a.jpg","/assets/title/main-crossroads-square-first.jpg":"/assets/title/main-crossroads-square-first-98ef65b2b3433656.jpg","/assets/title/main-crossroads-square.jpg":"/assets/title/main-crossroads-square-24abf23d2606ae3f.jpg","/assets/title/nalati-grasslands-portrait.jpg":"/assets/title/nalati-grasslands-portrait-5ac0c2e430a5a22b.jpg","/assets/title/nine-dragon-stack-portrait.jpg":"/assets/title/nine-dragon-stack-portrait-d92d65e333c1ccba.jpg","/assets/title/pine-hollow-portrait.jpg":"/assets/title/pine-hollow-portrait-30a60f74489265a0.jpg"};
|
|
219
219
|
// END TITLE URLS
|
|
220
220
|
const homeParams = new URLSearchParams(location.search);
|
|
221
221
|
// The environment flags select no level (src/client/app/bootRoute.ts keeps the same list): a launch with only them is the title.
|
|
@@ -224,7 +224,9 @@
|
|
|
224
224
|
if (document.documentElement.classList.contains('title-first')) {
|
|
225
225
|
const hero = document.createElement('link');
|
|
226
226
|
hero.rel = 'preload'; hero.as = 'image'; hero.fetchPriority = 'high';
|
|
227
|
-
|
|
227
|
+
// PZ19: the shell's hero is the ~30 kB first cut, so it no longer outruns the entry's code on a slow line; the title's
|
|
228
|
+
// own hero (mainMenu.ts) brings the full image in over it once the title is up
|
|
229
|
+
hero.href = titleAssetURLs['/assets/title/main-crossroads-' + (matchMedia('(orientation: portrait)').matches ? 'square' : 'landscape') + '-first.jpg'];
|
|
228
230
|
document.head.appendChild(hero);
|
|
229
231
|
}
|
|
230
232
|
</script>
|
|
@@ -483,9 +485,9 @@ html[data-ws-keyboard] #game, html[data-ws-keyboard] #hud { top: var(--ws-kb-top
|
|
|
483
485
|
html.standalone #ws-top-edge { display: block; position: fixed; top: 0; left: 0; right: 0; height: 12px; z-index: 2147483647; background: rgba(5, 8, 16, 0.004); pointer-events: none; }
|
|
484
486
|
.ws-launch { display: none; }
|
|
485
487
|
html.title-first .ws-launch { position: fixed; inset: 0; z-index: 90; display: flex; flex-direction: column; justify-content: space-between; overflow: hidden; background: #0b1622; color: #eaf8ff; font-family: Rajdhani, system-ui, sans-serif; }
|
|
486
|
-
.ws-launch-hero { position: absolute; inset: 0; background: url('/assets/title/main-crossroads-landscape-
|
|
488
|
+
.ws-launch-hero { position: absolute; inset: 0; background: url('/assets/title/main-crossroads-landscape-first-f3f196486b3476a0.jpg') center / cover no-repeat; }
|
|
487
489
|
.ws-launch-brand { position: relative; margin: calc(24px + env(safe-area-inset-top, 0px)) 24px 0; font-size: 44px; font-weight: 700; line-height: 1; letter-spacing: .16em; text-shadow: 0 0 18px #8fe3ff73; }
|
|
488
|
-
@media (orientation: portrait) { .ws-launch-hero { top: 50%; bottom: auto; width: 100%; aspect-ratio: 1; transform: translateY(-50%); background-image: url('/assets/title/main-crossroads-square-
|
|
490
|
+
@media (orientation: portrait) { .ws-launch-hero { top: 50%; bottom: auto; width: 100%; aspect-ratio: 1; transform: translateY(-50%); background-image: url('/assets/title/main-crossroads-square-first-98ef65b2b3433656.jpg'); } }
|
|
489
491
|
/* QA 11-13 (Jake: "is it broken? Is it doing something?"): before any bundle the static title wears the build pill
|
|
490
492
|
(update.css's .ws-update, copied, 5 px higher so it clears the wordmark: no module may be needed to see or tap it) and a bar that moves until StartTitle removes it */
|
|
491
493
|
.ws-launch-pill { position: absolute; right: 16px; top: calc(14px + env(safe-area-inset-top, 0px)); transform: translateY(-50%); z-index: 1; display: flex; align-items: center; gap: 6px; box-sizing: border-box; height: 19px; max-width: calc(100vw - 32px); margin: 0; padding: 0 8px; background: var(--ws-glass-deep); border: 1px solid var(--ws-cyan-line); color: var(--ws-text-dim); font: 8px/1 var(--ws-mono); letter-spacing: .14em; text-transform: uppercase; cursor: pointer; -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
|
package/lint/engine-sides.json
CHANGED
|
@@ -161,6 +161,7 @@
|
|
|
161
161
|
"src/client/engine/core/scopedWorkerPool.ts": "client",
|
|
162
162
|
"src/client/engine/core/shadowLayer.ts": "client",
|
|
163
163
|
"src/client/engine/core/slowGpuPacing.ts": "client",
|
|
164
|
+
"src/client/engine/core/renderBudget.ts": "client",
|
|
164
165
|
"src/client/engine/core/sustainedFrames.ts": "client",
|
|
165
166
|
"src/client/engine/core/tier.ts": "client",
|
|
166
167
|
"src/client/engine/core/Tour.ts": "client",
|
|
@@ -348,6 +349,7 @@
|
|
|
348
349
|
"src/client/engine/render/families/painterly.ts": "client",
|
|
349
350
|
"src/client/engine/render/families/pbr.ts": "client",
|
|
350
351
|
"src/client/engine/render/families/registry.ts": "client",
|
|
352
|
+
"src/client/engine/render/families/sceneSurface.ts": "client",
|
|
351
353
|
"src/client/engine/render/families/toon.ts": "client",
|
|
352
354
|
"src/client/engine/render/fogPatches.ts": "client",
|
|
353
355
|
"src/client/engine/render/frameCounter.ts": "client",
|
|
@@ -391,6 +393,8 @@
|
|
|
391
393
|
"src/client/engine/render/regionLook.ts": "client",
|
|
392
394
|
"src/client/engine/render/releasedArrays.ts": "client",
|
|
393
395
|
"src/client/engine/render/drawCheck.ts": "client",
|
|
396
|
+
"src/client/engine/render/families/detail.ts": "client",
|
|
397
|
+
"src/client/engine/render/lookRender.ts": "client",
|
|
394
398
|
"src/client/engine/render/renderer.ts": "client",
|
|
395
399
|
"src/client/engine/render/scatterInstances.ts": "client",
|
|
396
400
|
"src/client/engine/render/scenePreparation.ts": "client",
|
|
@@ -577,6 +581,7 @@
|
|
|
577
581
|
"src/client/game/boot/bytes.generated.ts": "client",
|
|
578
582
|
"src/client/game/boot/loadingPaths.ts": "client",
|
|
579
583
|
"src/client/game/boot/packs.generated.ts": "client",
|
|
584
|
+
"src/client/game/boot/placedSpawn.ts": "client",
|
|
580
585
|
"src/client/game/boot/spawnDownload.ts": "client",
|
|
581
586
|
"src/client/game/boot/versions.generated.ts": "client",
|
|
582
587
|
"src/client/game/Boss.ts": "client",
|
|
@@ -653,6 +658,8 @@
|
|
|
653
658
|
"src/client/game/grid/memoryRows.ts": "client",
|
|
654
659
|
"src/client/game/grid/memoryWarning.ts": "client",
|
|
655
660
|
"src/client/game/grid/menu.ts": "client",
|
|
661
|
+
"src/client/game/devScene/hook.ts": "client",
|
|
662
|
+
"src/client/game/devScene/liveLook.ts": "client",
|
|
656
663
|
"src/client/game/grid/minimapBlend.ts": "client",
|
|
657
664
|
"src/client/game/grid/nearGrain.ts": "client",
|
|
658
665
|
"src/client/game/grid/nearPlaceholderPlan.ts": "client",
|
|
@@ -662,6 +669,7 @@
|
|
|
662
669
|
"src/client/game/grid/neighbourRows.ts": "client",
|
|
663
670
|
"src/client/game/grid/oneWayIn.ts": "client",
|
|
664
671
|
"src/client/game/grid/placedCells.ts": "client",
|
|
672
|
+
"src/client/game/grid/placedContent.ts": "client",
|
|
665
673
|
"src/client/game/grid/placedCards.ts": "client",
|
|
666
674
|
"src/client/game/grid/pageEntry.ts": "client",
|
|
667
675
|
"src/client/game/grid/pageResidency.ts": "client",
|
|
@@ -697,6 +705,7 @@
|
|
|
697
705
|
"src/client/game/grid/roadSignPaint.ts": "client",
|
|
698
706
|
"src/client/game/grid/roadSignPixels.ts": "client",
|
|
699
707
|
"src/client/game/grid/roadSignPreparation.ts": "client",
|
|
708
|
+
"src/client/game/grid/roadSignScale.ts": "client",
|
|
700
709
|
"src/client/game/grid/roadSky.ts": "client",
|
|
701
710
|
"src/client/game/grid/roadSolid.ts": "client",
|
|
702
711
|
"src/client/game/grid/roadTileArchive.ts": "client",
|
|
@@ -711,6 +720,7 @@
|
|
|
711
720
|
"src/client/game/grid/roadTileWrite.worker.ts": "client",
|
|
712
721
|
"src/client/game/grid/roadTileWriter.ts": "client",
|
|
713
722
|
"src/client/game/grid/runtimeCost.ts": "client",
|
|
723
|
+
"src/client/game/grid/screenReports.ts": "client",
|
|
714
724
|
"src/client/game/grid/seamLook.ts": "client",
|
|
715
725
|
"src/client/game/grid/session.ts": "client",
|
|
716
726
|
"src/client/game/grid/shardfileFar.ts": "client",
|
|
@@ -942,6 +952,7 @@
|
|
|
942
952
|
"src/client/game/shardfile/clientWater.ts": "client",
|
|
943
953
|
"src/client/game/shardfile/clientWaterSurfaces.ts": "client",
|
|
944
954
|
"src/client/game/shardfile/clientWorker.ts": "client",
|
|
955
|
+
"src/client/game/shardfile/seatGrace.ts": "client",
|
|
945
956
|
"src/client/game/shardfile/clientWorldAssembly.ts": "client",
|
|
946
957
|
"src/client/game/shardfile/constructionCheckpoint.ts": "client",
|
|
947
958
|
"src/client/game/shardfile/controlFiles.ts": "client",
|
|
@@ -983,6 +994,7 @@
|
|
|
983
994
|
"src/client/game/shardfile/productPreflight.ts": "client",
|
|
984
995
|
"src/client/game/shardfile/questWorld.ts": "client",
|
|
985
996
|
"src/client/game/shardfile/readAsset.ts": "client",
|
|
997
|
+
"src/client/game/shardfile/reflectingWater.ts": "client",
|
|
986
998
|
"src/client/game/shardfile/reusableWholeLibrary.ts": "client",
|
|
987
999
|
"src/client/game/shardfile/runtimeProduct.ts": "client",
|
|
988
1000
|
"src/client/game/shardfile/sceneBakeFiles.ts": "client",
|
|
@@ -1093,6 +1105,8 @@
|
|
|
1093
1105
|
"src/client/host/online/voice.ts": "client",
|
|
1094
1106
|
"src/client/host/online/voiceUi.ts": "client",
|
|
1095
1107
|
"src/client/host/standalone/shell.ts": "client",
|
|
1108
|
+
"src/cook/game/astc6Encode.ts": "cook",
|
|
1109
|
+
"src/cook/game/astc6Wasm.ts": "cook",
|
|
1096
1110
|
"src/cook/game/audioReport.ts": "cook",
|
|
1097
1111
|
"src/cook/game/brotliSizeCache.d.mts": "cook",
|
|
1098
1112
|
"src/cook/game/brotliSizeCache.mjs": "cook",
|
|
@@ -1294,6 +1308,7 @@
|
|
|
1294
1308
|
"src/client/game/shardfile/serverRoute.ts": "client",
|
|
1295
1309
|
"src/server/host/dedicated/cellHost.ts": "server",
|
|
1296
1310
|
"src/server/host/dedicated/crossing.ts": "server",
|
|
1311
|
+
"src/server/host/dedicated/loopLag.ts": "server",
|
|
1297
1312
|
"src/server/host/dedicated/roadRoom.ts": "server",
|
|
1298
1313
|
"src/server/host/dedicated/cellProtocol.ts": "server",
|
|
1299
1314
|
"src/server/host/dedicated/cellWorker.ts": "server",
|
|
@@ -1316,6 +1331,7 @@
|
|
|
1316
1331
|
"src/server/host/dedicated/saves/saveStore.ts": "server",
|
|
1317
1332
|
"src/server/host/dedicated/saves/writeQueue.ts": "server",
|
|
1318
1333
|
"src/server/host/dedicated/seats.ts": "server",
|
|
1334
|
+
"src/server/host/dedicated/serverMetrics.ts": "server",
|
|
1319
1335
|
"src/server/host/dedicated/serverReports.ts": "server",
|
|
1320
1336
|
"src/server/host/dedicated/serverSentry.ts": "server",
|
|
1321
1337
|
"src/server/host/dedicated/shopGate.ts": "server",
|
|
@@ -1590,6 +1606,8 @@
|
|
|
1590
1606
|
"src/shared/engine/world/windStrength.ts": "shared",
|
|
1591
1607
|
"src/shared/engine/world/yawFrame.ts": "shared",
|
|
1592
1608
|
"src/shared/game/achievements.ts": "shared",
|
|
1609
|
+
"src/shared/game/devColliders.ts": "shared",
|
|
1610
|
+
"src/shared/game/devGameplay.ts": "shared",
|
|
1593
1611
|
"src/shared/game/ambient/flock.ts": "shared",
|
|
1594
1612
|
"src/shared/game/animation/limbBlend.ts": "shared",
|
|
1595
1613
|
"src/shared/game/animation/limbRig.ts": "shared",
|
package/lint/ratchet.json
CHANGED
|
@@ -158,73 +158,5 @@
|
|
|
158
158
|
},
|
|
159
159
|
"wildshard/shard-sandbox": {
|
|
160
160
|
"src/shards/pine-hollow/generators/coatProducer.ts": 1
|
|
161
|
-
},
|
|
162
|
-
"closedComponents": {
|
|
163
|
-
"far-reach": [
|
|
164
|
-
"C1",
|
|
165
|
-
"C2",
|
|
166
|
-
"C3",
|
|
167
|
-
"C4",
|
|
168
|
-
"C5",
|
|
169
|
-
"C6",
|
|
170
|
-
"C7",
|
|
171
|
-
"C8",
|
|
172
|
-
"C9"
|
|
173
|
-
],
|
|
174
|
-
"sunscar-dunes": [
|
|
175
|
-
"C1",
|
|
176
|
-
"C2",
|
|
177
|
-
"C3",
|
|
178
|
-
"C4",
|
|
179
|
-
"C5",
|
|
180
|
-
"C6",
|
|
181
|
-
"C7",
|
|
182
|
-
"C8",
|
|
183
|
-
"C9"
|
|
184
|
-
],
|
|
185
|
-
"pine-hollow": [
|
|
186
|
-
"C1",
|
|
187
|
-
"C2",
|
|
188
|
-
"C3",
|
|
189
|
-
"C4",
|
|
190
|
-
"C5",
|
|
191
|
-
"C6",
|
|
192
|
-
"C7",
|
|
193
|
-
"C8",
|
|
194
|
-
"C9"
|
|
195
|
-
],
|
|
196
|
-
"driftwood-isle": [
|
|
197
|
-
"C1",
|
|
198
|
-
"C2",
|
|
199
|
-
"C3",
|
|
200
|
-
"C4",
|
|
201
|
-
"C5",
|
|
202
|
-
"C6",
|
|
203
|
-
"C7",
|
|
204
|
-
"C8",
|
|
205
|
-
"C9"
|
|
206
|
-
],
|
|
207
|
-
"nalati-grasslands": [
|
|
208
|
-
"C1",
|
|
209
|
-
"C2",
|
|
210
|
-
"C3",
|
|
211
|
-
"C4",
|
|
212
|
-
"C5",
|
|
213
|
-
"C6",
|
|
214
|
-
"C7",
|
|
215
|
-
"C8",
|
|
216
|
-
"C9"
|
|
217
|
-
],
|
|
218
|
-
"nine-dragon-stack": [
|
|
219
|
-
"C1",
|
|
220
|
-
"C2",
|
|
221
|
-
"C3",
|
|
222
|
-
"C4",
|
|
223
|
-
"C5",
|
|
224
|
-
"C6",
|
|
225
|
-
"C7",
|
|
226
|
-
"C8",
|
|
227
|
-
"C9"
|
|
228
|
-
]
|
|
229
161
|
}
|
|
230
162
|
}
|
package/lint/ratchet.mjs
CHANGED
|
@@ -8,14 +8,13 @@ import { relative, resolve } from 'node:path';
|
|
|
8
8
|
import { fileURLToPath } from 'node:url';
|
|
9
9
|
import { TIME_ALLOW } from './wildshard-plugin.js';
|
|
10
10
|
import { compareCounts, hardRules, requiredGuardRules } from '../scripts/guard-counts.mjs';
|
|
11
|
-
import { closedComponents } from '../scripts/check-closed-components.mjs';
|
|
12
11
|
import { parseSync } from 'vite';
|
|
13
12
|
import { pruneSchemaTypeAllowances } from './schema-types.mjs';
|
|
14
13
|
import { SCHEMA_TYPE_RULE } from '../scripts/ratchet-approval.mjs';
|
|
15
14
|
import { fullRatchetFiles } from './ratchet-files.mjs';
|
|
16
15
|
|
|
17
16
|
const REPO = fileURLToPath(new URL('../', import.meta.url));
|
|
18
|
-
const NON_FILE = new Set(['allow', 'budgets', 'debugRows'
|
|
17
|
+
const NON_FILE = new Set(['allow', 'budgets', 'debugRows']);
|
|
19
18
|
const configFile = resolve(REPO, '.oxlintrc.ratchet.json');
|
|
20
19
|
const ruleNames = new Set(Object.keys(JSON.parse(readFileSync(configFile, 'utf8')).rules));
|
|
21
20
|
const object = (value) => value !== null && typeof value === 'object' && !Array.isArray(value);
|
|
@@ -37,8 +36,6 @@ function validate(baseline, root) {
|
|
|
37
36
|
if (identity.startsWith('src/')) requireFile(rule, identity.split('#')[0]);
|
|
38
37
|
} else if (key === 'budgets') {
|
|
39
38
|
if (!object(value) || Object.values(value).some((n) => !number(n))) throw new Error('Invalid budgets section');
|
|
40
|
-
} else if (key === 'closedComponents') {
|
|
41
|
-
closedComponents(value);
|
|
42
39
|
} else if (key === 'debugRows') {
|
|
43
40
|
if (!object(value) || !number(value.max) || !Number.isInteger(value.max) || !Array.isArray(value.raisedBy)) throw new Error('Invalid debugRows section');
|
|
44
41
|
} else if (!ruleNames.has(key) || !object(value) || Object.values(value).some((n) => !number(n) || !Number.isInteger(n))) throw new Error(`Invalid or unconfigured rule section: ${key}`);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wildshard/engine",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.20",
|
|
4
4
|
"description": "The Wildshard engine: one repo with shared, client, server and cook code and three build targets (client, dedicated server, standalone listen server), shaped like Unreal or Source.",
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
6
|
"repository": {
|
|
@@ -24,14 +24,14 @@
|
|
|
24
24
|
"build": "node src/tools/build-web.ts",
|
|
25
25
|
"typecheck": "pnpm typecheck:kit && pnpm gen:inputs && npr tsc -b tsconfig.layers.json --builders 8",
|
|
26
26
|
"lint": "pnpm lint:kit && pnpm lint:game",
|
|
27
|
-
"lint:fix": "node scripts/lint-cli.mjs -c src/.oxlintrc.json --type-aware --fix --ignore-pattern '.githooks/**' --ignore-pattern '.agents/**' --ignore-pattern 'tmp/**' --ignore-pattern 'src/client/engine/**' --ignore-pattern 'src/shared/engine/**' --ignore-pattern 'src/server/engine/**' --ignore-pattern 'src/client/game/**' --ignore-pattern 'src/shared/game/**' --ignore-pattern 'src/server/game/**' --ignore-pattern 'src/cook/game/**' --ignore-pattern 'src/client/host/**' --ignore-pattern 'src/shared/host/**' --ignore-pattern 'src/server/host/**' --ignore-pattern 'src/client/app/**' --ignore-pattern 'src/test/engine/**' --ignore-pattern 'src/test/game/**' --ignore-pattern 'scripts/**' --ignore-pattern 'test/**' --ignore-pattern 'lint/**' --ignore-pattern 'vite/**' --ignore-pattern 'types/**' --ignore-pattern 'calibration/**' --ignore-pattern 'budgets/**' --ignore-pattern 'public/**' --ignore-pattern 'vite.config.ts' --ignore-pattern 'vitest.config.ts'",
|
|
28
|
-
"format": "npr oxfmt -c
|
|
29
|
-
"format:check": "npr oxfmt -c
|
|
27
|
+
"lint:fix": "node scripts/lint-cli.mjs -c kit/.oxlintrc.json --type-aware --fix --ignore-pattern '.githooks/**' --ignore-pattern '.agents/**' --ignore-pattern 'tmp/**' --ignore-pattern 'src/client/engine/**' --ignore-pattern 'src/shared/engine/**' --ignore-pattern 'src/server/engine/**' --ignore-pattern 'src/client/game/**' --ignore-pattern 'src/shared/game/**' --ignore-pattern 'src/server/game/**' --ignore-pattern 'src/cook/game/**' --ignore-pattern 'src/client/host/**' --ignore-pattern 'src/shared/host/**' --ignore-pattern 'src/server/host/**' --ignore-pattern 'src/client/app/**' --ignore-pattern 'src/test/engine/**' --ignore-pattern 'src/test/game/**' --ignore-pattern 'scripts/**' --ignore-pattern 'test/**' --ignore-pattern 'lint/**' --ignore-pattern 'vite/**' --ignore-pattern 'types/**' --ignore-pattern 'calibration/**' --ignore-pattern 'budgets/**' --ignore-pattern 'public/**' --ignore-pattern 'vite.config.ts' --ignore-pattern 'vitest.config.ts' --ignore-pattern 'src/**' --no-error-on-unmatched-pattern && node scripts/lint-cli.mjs -c src/.oxlintrc.json --type-aware --fix --ignore-pattern '.githooks/**' --ignore-pattern '.agents/**' --ignore-pattern 'tmp/**' --ignore-pattern 'src/client/engine/**' --ignore-pattern 'src/shared/engine/**' --ignore-pattern 'src/server/engine/**' --ignore-pattern 'src/client/game/**' --ignore-pattern 'src/shared/game/**' --ignore-pattern 'src/server/game/**' --ignore-pattern 'src/cook/game/**' --ignore-pattern 'src/client/host/**' --ignore-pattern 'src/shared/host/**' --ignore-pattern 'src/server/host/**' --ignore-pattern 'src/client/app/**' --ignore-pattern 'src/test/engine/**' --ignore-pattern 'src/test/game/**' --ignore-pattern 'scripts/**' --ignore-pattern 'test/**' --ignore-pattern 'lint/**' --ignore-pattern 'vite/**' --ignore-pattern 'types/**' --ignore-pattern 'calibration/**' --ignore-pattern 'budgets/**' --ignore-pattern 'public/**' --ignore-pattern 'vite.config.ts' --ignore-pattern 'vitest.config.ts' --no-error-on-unmatched-pattern src",
|
|
28
|
+
"format": "npr oxfmt -c kit/.oxfmtrc.json kit src/cli src/tools src/e2e src/scripts",
|
|
29
|
+
"format:check": "npr oxfmt -c kit/.oxfmtrc.json --check kit src/cli src/tools src/e2e src/scripts",
|
|
30
30
|
"test": "pnpm test:kit && pnpm test:fast",
|
|
31
31
|
"test:e2e": "playwright test --config src/e2e/playwright.config.ts",
|
|
32
32
|
"test:e2e:faults": "node scripts/e2e-faults.mjs",
|
|
33
33
|
"check:sides": "node src/scripts/check-sides.mjs && node scripts/check-engine-sides.mjs",
|
|
34
|
-
"check:asks": "node
|
|
34
|
+
"check:asks": "node kit/scripts/asks.mjs check",
|
|
35
35
|
"check:agents": "node .githooks/agents-md.mjs lint",
|
|
36
36
|
"check:parity": "node scripts/agent-parity.mjs --strict",
|
|
37
37
|
"check:agent-sync": "node scripts/agent-sync.mjs --check",
|
|
@@ -40,12 +40,12 @@
|
|
|
40
40
|
"check:page-events": "node scripts/check-page-events.mjs",
|
|
41
41
|
"check:wire": "node node_modules/@wildshard/wire/bin.mjs check",
|
|
42
42
|
"check:saves": "env -u WS_PUSH_GATE_PROFILE -u WS_CPU_ADMISSION vitest run test/saves-lock.test.ts",
|
|
43
|
-
"md:wrap": "node
|
|
43
|
+
"md:wrap": "node kit/scripts/md-wrap.mjs",
|
|
44
44
|
"inbox:pull": "node scripts/inbox-pull.mjs",
|
|
45
45
|
"test:hooks": "node --test '.githooks/*.test.mjs'",
|
|
46
46
|
"check": "pnpm typecheck && pnpm lint && pnpm format:check && pnpm test && pnpm check:sides && pnpm check:asks && pnpm check:agents && pnpm check:agent-sync && pnpm test:agent-hooks && pnpm check:parity && pnpm check:page-events && pnpm check:wire && pnpm check:saves",
|
|
47
47
|
"typecheck:kit": "npr tsc -p src/tsconfig.json && npr tsc -p src/client/tsconfig.json",
|
|
48
|
-
"lint:kit": "node scripts/lint-cli.mjs -c src/.oxlintrc.json --type-aware --deny-warnings --ignore-pattern '.githooks/**' --ignore-pattern '.agents/**' --ignore-pattern 'tmp/**' --ignore-pattern 'src/client/engine/**' --ignore-pattern 'src/shared/engine/**' --ignore-pattern 'src/server/engine/**' --ignore-pattern 'src/client/game/**' --ignore-pattern 'src/shared/game/**' --ignore-pattern 'src/server/game/**' --ignore-pattern 'src/cook/game/**' --ignore-pattern 'src/client/host/**' --ignore-pattern 'src/shared/host/**' --ignore-pattern 'src/server/host/**' --ignore-pattern 'src/client/app/**' --ignore-pattern 'src/test/engine/**' --ignore-pattern 'src/test/game/**' --ignore-pattern 'scripts/**' --ignore-pattern 'test/**' --ignore-pattern 'lint/**' --ignore-pattern 'vite/**' --ignore-pattern 'types/**' --ignore-pattern 'calibration/**' --ignore-pattern 'budgets/**' --ignore-pattern 'public/**' --ignore-pattern 'vite.config.ts' --ignore-pattern 'vitest.config.ts'",
|
|
48
|
+
"lint:kit": "node scripts/lint-cli.mjs -c kit/.oxlintrc.json --type-aware --deny-warnings --ignore-pattern '.githooks/**' --ignore-pattern '.agents/**' --ignore-pattern 'tmp/**' --ignore-pattern 'src/client/engine/**' --ignore-pattern 'src/shared/engine/**' --ignore-pattern 'src/server/engine/**' --ignore-pattern 'src/client/game/**' --ignore-pattern 'src/shared/game/**' --ignore-pattern 'src/server/game/**' --ignore-pattern 'src/cook/game/**' --ignore-pattern 'src/client/host/**' --ignore-pattern 'src/shared/host/**' --ignore-pattern 'src/server/host/**' --ignore-pattern 'src/client/app/**' --ignore-pattern 'src/test/engine/**' --ignore-pattern 'src/test/game/**' --ignore-pattern 'scripts/**' --ignore-pattern 'test/**' --ignore-pattern 'lint/**' --ignore-pattern 'vite/**' --ignore-pattern 'types/**' --ignore-pattern 'calibration/**' --ignore-pattern 'budgets/**' --ignore-pattern 'public/**' --ignore-pattern 'vite.config.ts' --ignore-pattern 'vitest.config.ts' --ignore-pattern 'src/**' --no-error-on-unmatched-pattern && node scripts/lint-cli.mjs -c src/.oxlintrc.json --type-aware --deny-warnings --ignore-pattern '.githooks/**' --ignore-pattern '.agents/**' --ignore-pattern 'tmp/**' --ignore-pattern 'src/client/engine/**' --ignore-pattern 'src/shared/engine/**' --ignore-pattern 'src/server/engine/**' --ignore-pattern 'src/client/game/**' --ignore-pattern 'src/shared/game/**' --ignore-pattern 'src/server/game/**' --ignore-pattern 'src/cook/game/**' --ignore-pattern 'src/client/host/**' --ignore-pattern 'src/shared/host/**' --ignore-pattern 'src/server/host/**' --ignore-pattern 'src/client/app/**' --ignore-pattern 'src/test/engine/**' --ignore-pattern 'src/test/game/**' --ignore-pattern 'scripts/**' --ignore-pattern 'test/**' --ignore-pattern 'lint/**' --ignore-pattern 'vite/**' --ignore-pattern 'types/**' --ignore-pattern 'calibration/**' --ignore-pattern 'budgets/**' --ignore-pattern 'public/**' --ignore-pattern 'vite.config.ts' --ignore-pattern 'vitest.config.ts' --no-error-on-unmatched-pattern src",
|
|
49
49
|
"lint:game": "node scripts/lint-game.mjs",
|
|
50
50
|
"test:kit": "node --test 'src/cli/*.test.ts' 'src/server/*.test.ts' 'src/test/helpers/*.test.ts'",
|
|
51
51
|
"test:fast": "python3 scripts/heavy-lane.py full-test -- node scripts/vitest-tmp.ts run",
|
|
@@ -63,10 +63,11 @@
|
|
|
63
63
|
"dependencies": {
|
|
64
64
|
"@dimforge/rapier3d-simd": "0.21.0",
|
|
65
65
|
"@hono/node-server": "2.1.5",
|
|
66
|
+
"@prometheus-io/client": "0.16.1",
|
|
66
67
|
"@sentry/browser": "11.0.0",
|
|
67
68
|
"@sentry/core": "11.0.0",
|
|
68
69
|
"@valibot/to-json-schema": "1.8.0",
|
|
69
|
-
"@wildshard/format": "npm:@wildshard/shard-format@^0.
|
|
70
|
+
"@wildshard/format": "npm:@wildshard/shard-format@^0.5.7",
|
|
70
71
|
"@wildshard/wire": "^0.1.0",
|
|
71
72
|
"ajv": "6.15.0",
|
|
72
73
|
"fflate": "0.8.3",
|
|
@@ -530,6 +531,7 @@
|
|
|
530
531
|
"./world/csmLightBlock": "./src/client/engine/world/csmLightBlock.ts",
|
|
531
532
|
"./world/shadowFilter": "./src/client/engine/world/shadowFilter.ts",
|
|
532
533
|
"./render/families/registry": "./src/client/engine/render/families/registry.ts",
|
|
534
|
+
"./render/families/sceneSurface": "./src/client/engine/render/families/sceneSurface.ts",
|
|
533
535
|
"./render/families/toon": "./src/client/engine/render/families/toon.ts",
|
|
534
536
|
"./render/hoverboardGeometry": "./src/client/engine/render/hoverboardGeometry.ts",
|
|
535
537
|
"./render/graph/colourFunction": "./src/client/engine/render/graph/colourFunction.ts",
|
|
@@ -891,6 +893,8 @@
|
|
|
891
893
|
"./game/grid/gridCollision": "./src/shared/game/grid/gridCollision.ts",
|
|
892
894
|
"./game/grid/voidFloor": "./src/shared/game/grid/voidFloor.ts",
|
|
893
895
|
"./game/grid/assembly": "./src/shared/game/grid/assembly.ts",
|
|
896
|
+
"./game/devColliders": "./src/shared/game/devColliders.ts",
|
|
897
|
+
"./game/devGameplay": "./src/shared/game/devGameplay.ts",
|
|
894
898
|
"./game/grid/catalogueSlot": "./src/shared/game/grid/catalogueSlot.ts",
|
|
895
899
|
"./game/grid/placedCells": "./src/client/game/grid/placedCells.ts",
|
|
896
900
|
"./game/grid/placedCards": "./src/client/game/grid/placedCards.ts",
|
|
@@ -1187,7 +1191,10 @@
|
|
|
1187
1191
|
"./game/grid/runtimeCost": "./src/client/game/grid/runtimeCost.ts",
|
|
1188
1192
|
"./game/generators/pickups": "./src/client/game/generators/pickups.ts",
|
|
1189
1193
|
"./game/draftTitles": "./src/client/game/draftTitles.ts",
|
|
1194
|
+
"./game/boot/audio.generated": "./src/client/game/boot/audio.generated.ts",
|
|
1195
|
+
"./game/boot/bytes.generated": "./src/client/game/boot/bytes.generated.ts",
|
|
1190
1196
|
"./game/boot/packs.generated": "./src/client/game/boot/packs.generated.ts",
|
|
1197
|
+
"./game/boot/versions.generated": "./src/client/game/boot/versions.generated.ts",
|
|
1191
1198
|
"./host/headlessProduct": "./src/server/host/headlessProduct.ts",
|
|
1192
1199
|
"./host/shardfile": "./src/shared/host/shardfile.ts",
|
|
1193
1200
|
"./host/headless": "./src/server/host/headless.ts",
|
|
@@ -1217,7 +1224,6 @@
|
|
|
1217
1224
|
"./scripts/boot-publication.mjs": "./scripts/boot-publication.mjs",
|
|
1218
1225
|
"./scripts/build-cache-report.mjs": "./scripts/build-cache-report.mjs",
|
|
1219
1226
|
"./scripts/built-product.mjs": "./scripts/built-product.mjs",
|
|
1220
|
-
"./scripts/check-closed-components.mjs": "./scripts/check-closed-components.mjs",
|
|
1221
1227
|
"./scripts/debug-settings.mjs": "./scripts/debug-settings.mjs",
|
|
1222
1228
|
"./scripts/decision-legacy-lines.mjs": "./scripts/decision-legacy-lines.mjs",
|
|
1223
1229
|
"./scripts/format-package.mjs": "./scripts/format-package.mjs",
|
|
@@ -1243,15 +1249,13 @@
|
|
|
1243
1249
|
"./scripts/program-discovery.mjs": "./scripts/program-discovery.mjs",
|
|
1244
1250
|
"./scripts/quiet-cli.mjs": "./scripts/quiet-cli.mjs",
|
|
1245
1251
|
"./scripts/script-scenario-metrics.mjs": "./scripts/script-scenario-metrics.mjs",
|
|
1246
|
-
"./scripts/shard-component-spans.mjs": "./scripts/shard-component-spans.mjs",
|
|
1247
|
-
"./scripts/shard-components.mjs": "./scripts/shard-components.mjs",
|
|
1248
1252
|
"./scripts/shard-net-lines.mjs": "./scripts/shard-net-lines.mjs",
|
|
1249
1253
|
"./scripts/shard-output-content.mjs": "./scripts/shard-output-content.mjs",
|
|
1250
1254
|
"./scripts/shard-outputs.mjs": "./scripts/shard-outputs.mjs",
|
|
1251
|
-
"./scripts/
|
|
1252
|
-
"./scripts/
|
|
1253
|
-
"./scripts/shard-platform-
|
|
1254
|
-
"./scripts/shard-platform.mjs": "./scripts/
|
|
1255
|
+
"./scripts/node-format.mjs": "./scripts/node-format.mjs",
|
|
1256
|
+
"./scripts/output-reader.mjs": "./scripts/output-reader.mjs",
|
|
1257
|
+
"./scripts/shard-platform-format.mjs": "./scripts/node-format.mjs",
|
|
1258
|
+
"./scripts/shard-platform-output.mjs": "./scripts/output-reader.mjs",
|
|
1255
1259
|
"./scripts/shard-public.mjs": "./scripts/shard-public.mjs",
|
|
1256
1260
|
"./scripts/shard-runtime-closure.mjs": "./scripts/shard-runtime-closure.mjs",
|
|
1257
1261
|
"./scripts/shardfile-cache.mjs": "./scripts/shardfile-cache.mjs",
|
package/scripts/agent-sync.mjs
CHANGED
|
@@ -35,6 +35,7 @@
|
|
|
35
35
|
// every replaced byte, and nothing outside these paths is touched.
|
|
36
36
|
// Exit 0 ok, 1 stale, invalid or refused, 2 usage.
|
|
37
37
|
import { spawnSync } from 'node:child_process';
|
|
38
|
+
import { createHash } from 'node:crypto';
|
|
38
39
|
import { chmodSync, existsSync, lstatSync, mkdirSync, readFileSync, readdirSync, readlinkSync, realpathSync, renameSync, rmSync, rmdirSync, statSync, symlinkSync, unlinkSync, writeFileSync } from 'node:fs';
|
|
39
40
|
import { dirname, isAbsolute, join, relative, resolve } from 'node:path';
|
|
40
41
|
import { pathToFileURL } from 'node:url';
|
|
@@ -283,6 +284,18 @@ export function kitFiles(kit) {
|
|
|
283
284
|
export const kitSkills = (kit) => (isRealDir(join(kit, SKILLS)) ? readdirSync(join(kit, SKILLS)).filter((name) => isRealDir(join(kit, SKILLS, name))).sort() : []);
|
|
284
285
|
|
|
285
286
|
const gitOut = (root, args) => spawnSync('git', ['-C', root, ...args], { encoding: 'utf8' });
|
|
287
|
+
/** A file's git blob id, as `git hash-object` gives it. */
|
|
288
|
+
const blobId = (bytes) => createHash('sha1').update(`blob ${bytes.length}\0`).update(bytes).digest('hex');
|
|
289
|
+
/**
|
|
290
|
+
* MA10 (e): every blob the kit's history held at any of `paths` (its current path and, for a moved file, the
|
|
291
|
+
* repo's old path), so a copy the stamp replaces reads as an older kit copy, not a local edit. Empty when the
|
|
292
|
+
* kit is not a git checkout.
|
|
293
|
+
*/
|
|
294
|
+
function kitBlobs(kit, paths) {
|
|
295
|
+
const log = gitOut(kit, ['--literal-pathspecs', 'log', '--format=', '--raw', '--no-abbrev', '--no-renames', 'HEAD', '--', ...paths]);
|
|
296
|
+
if (log.status !== 0) return new Set();
|
|
297
|
+
return new Set(log.stdout.split('\n').flatMap((line) => line.startsWith(':') ? line.split(' ').slice(2, 4) : []).filter((id) => !/^0+$/u.test(id)));
|
|
298
|
+
}
|
|
286
299
|
|
|
287
300
|
/** The first symlink at or above `rel` inside root, component by component, or null. */
|
|
288
301
|
function linkOnPath(root, rel) {
|
|
@@ -362,7 +375,7 @@ const realOr = (path) => {
|
|
|
362
375
|
* Stamp the kit's agent layout into a repo. Everything is checked before anything is written: the kit,
|
|
363
376
|
* the repo's specs and manifests, every registration the new manifests would drop, symlinks on every
|
|
364
377
|
* path it writes or removes, and uncommitted, untracked or ignored files under those paths.
|
|
365
|
-
* @returns {{ changed: string[], replaced: string[], problems: string[] }}
|
|
378
|
+
* @returns {{ changed: string[], replaced: string[], older?: string[], problems: string[] }}
|
|
366
379
|
*/
|
|
367
380
|
export function stamp(kitDir, rootDir) {
|
|
368
381
|
const kit = resolve(kitDir);
|
|
@@ -428,11 +441,16 @@ export function stamp(kitDir, rootDir) {
|
|
|
428
441
|
if (problems.length) return refuse(problems);
|
|
429
442
|
|
|
430
443
|
const changed = new Set();
|
|
431
|
-
// Copies the stamp replaces whose bytes differ from the kit's: git keeps the old bytes
|
|
444
|
+
// Copies the stamp replaces whose bytes differ from the kit's: git keeps the old bytes. One the kit's history
|
|
445
|
+
// held is an older kit copy (`older`); any other is a local edit the caller reviews (`replaced`).
|
|
432
446
|
const replaced = [];
|
|
447
|
+
const older = [];
|
|
448
|
+
const differs = (path, kitPath) => {
|
|
449
|
+
(kitBlobs(kit, [...new Set([kitPath, path])]).has(blobId(readFileSync(join(root, path)))) ? older : replaced).push(path);
|
|
450
|
+
};
|
|
433
451
|
for (const path of legacy) {
|
|
434
452
|
const want = join(kit, '.agents/hooks', path.slice('.claude/hooks/'.length));
|
|
435
|
-
if (!existsSync(want) || !readFileSync(join(root, path)).equals(readFileSync(want)))
|
|
453
|
+
if (!existsSync(want) || !readFileSync(join(root, path)).equals(readFileSync(want))) differs(path, `.agents/hooks/${path.slice('.claude/hooks/'.length)}`);
|
|
436
454
|
rmSync(join(root, path));
|
|
437
455
|
changed.add(path);
|
|
438
456
|
}
|
|
@@ -440,7 +458,7 @@ export function stamp(kitDir, rootDir) {
|
|
|
440
458
|
for (const name of oldKitSkills) {
|
|
441
459
|
const path = `${CLAUDE_SKILLS}/${name}`;
|
|
442
460
|
for (const file of entriesUnder(root, path)) {
|
|
443
|
-
if (!readFileSync(join(root, file)).equals(readFileSync(join(kit, SKILLS, name, relative(path, file)))))
|
|
461
|
+
if (!readFileSync(join(root, file)).equals(readFileSync(join(kit, SKILLS, name, relative(path, file))))) differs(file, `${SKILLS}/${name}/${relative(path, file)}`);
|
|
444
462
|
changed.add(file);
|
|
445
463
|
}
|
|
446
464
|
rmSync(join(root, path), { recursive: true });
|
|
@@ -460,7 +478,7 @@ export function stamp(kitDir, rootDir) {
|
|
|
460
478
|
const mode = statSync(from).mode & 0o777;
|
|
461
479
|
const same = existsSync(to) && readFileSync(to).equals(bytes);
|
|
462
480
|
if (!same || (statSync(to).mode & 0o777) !== mode) {
|
|
463
|
-
if (existsSync(to) && !same)
|
|
481
|
+
if (existsSync(to) && !same) differs(path, path);
|
|
464
482
|
mkdirSync(dirname(to), { recursive: true });
|
|
465
483
|
writeFileSync(to, bytes);
|
|
466
484
|
chmodSync(to, mode);
|
|
@@ -468,10 +486,10 @@ export function stamp(kitDir, rootDir) {
|
|
|
468
486
|
}
|
|
469
487
|
}
|
|
470
488
|
const next = plan(root);
|
|
471
|
-
if (next.problems.length) return { changed: [...changed].sort(), replaced, problems: next.problems };
|
|
489
|
+
if (next.problems.length) return { changed: [...changed].sort(), replaced, older, problems: next.problems };
|
|
472
490
|
apply(root, next.actions);
|
|
473
491
|
for (const action of next.actions) changed.add(action.path);
|
|
474
|
-
return { changed: [...changed].sort(), replaced: [...new Set(replaced)].sort(), problems: [] };
|
|
492
|
+
return { changed: [...changed].sort(), replaced: [...new Set(replaced)].sort(), older: [...new Set(older)].sort(), problems: [] };
|
|
475
493
|
}
|
|
476
494
|
|
|
477
495
|
// ---------------------------------------------------------------- main
|
|
@@ -497,8 +515,9 @@ function main(argv) {
|
|
|
497
515
|
}
|
|
498
516
|
root = resolve(root);
|
|
499
517
|
if (from) {
|
|
500
|
-
const { changed, replaced, problems } = stamp(resolve(from), root);
|
|
518
|
+
const { changed, replaced, older = [], problems } = stamp(resolve(from), root);
|
|
501
519
|
for (const path of changed) process.stdout.write(`stamped ${path}\n`);
|
|
520
|
+
for (const path of older) process.stdout.write(`updated ${path}: it was an older kit copy (its blob is in the kit's history)\n`);
|
|
502
521
|
for (const path of replaced) process.stdout.write(`replaced ${path}: its bytes differed from the kit's; check git diff for a local edit\n`);
|
|
503
522
|
for (const problem of problems) process.stderr.write(`agent-sync: ${problem}\n`);
|
|
504
523
|
return problems.length ? 1 : 0;
|
|
@@ -5,11 +5,17 @@ import {writeSpawnManifests as cookManifests, type BuildHalf} from '../../src/co
|
|
|
5
5
|
import {assetTableAddresses, readAssetTables} from './assetTables.mjs';
|
|
6
6
|
import {readGridSeams} from './gridSeams.mjs';
|
|
7
7
|
import {rendererRevision} from '../renderer-revision.mjs';
|
|
8
|
+
import {defaultCookTiers} from '../../src/cook/game/shardCook';
|
|
9
|
+
import {homedir} from 'node:os';
|
|
10
|
+
import {resolve} from 'node:path';
|
|
8
11
|
|
|
9
12
|
/** C1: the page's half of the cook's input, which the app build owns: its tables, seams and names. */
|
|
10
|
-
const {WILDSHARD_PREPARATION_ONLY} = process.env;
|
|
13
|
+
const {WILDSHARD_PREPARATION_ONLY, WILDSHARD_ASTC6_CACHE} = process.env;
|
|
14
|
+
/** S12d: the phone tier's 6×6 encodes, kept by input between builds. Beside the spawn parts' bodies, so CI's cache of
|
|
15
|
+
* `~/.cache/wildshard/gen/spawn-parts-br` keeps them too (a cold Pine is minutes of encode). */
|
|
16
|
+
const astc6Cache = WILDSHARD_ASTC6_CACHE ?? resolve(homedir(), '.cache/wildshard/gen/spawn-parts-br/astc6-1');
|
|
11
17
|
const build: BuildHalf = {cacheName: ASSET_CACHE_NAME, gpuFiles: GPU_FILES, tables: readAssetTables,
|
|
12
|
-
preparationOnly: WILDSHARD_PREPARATION_ONLY === '1', rendererRevision: rendererRevision(),
|
|
18
|
+
preparationOnly: WILDSHARD_PREPARATION_ONLY === '1', rendererRevision: rendererRevision(), tiers: () => defaultCookTiers(astc6Cache),
|
|
13
19
|
tableAddresses: root => assetTableAddresses(readAssetTables(root)), seams: root => readGridSeams(root).address};
|
|
14
20
|
|
|
15
21
|
export const writeSpawnManifests = (outDir: string, input: unknown, strips: Parameters<typeof cookManifests>[2], root: string, report?: Parameters<typeof cookManifests>[5]): ReturnType<typeof cookManifests> =>
|
|
@@ -4,8 +4,8 @@ import {tmpdir} from 'node:os';
|
|
|
4
4
|
import {dirname, join} from 'node:path';
|
|
5
5
|
import * as v from 'valibot';
|
|
6
6
|
import {packsBookPath, readSpawnManifest} from '../../src/shared/game/shardfile/spawnManifest';
|
|
7
|
-
import {prepareAssetDecoders} from '@wildshard/format/
|
|
8
|
-
import {
|
|
7
|
+
import {prepareAssetDecoders} from '@wildshard/format/shardfileAssets';
|
|
8
|
+
import {validateShardfileFolder} from '@wildshard/format/shardfileValidation';
|
|
9
9
|
import {assertKtx2TableTargets} from '../../src/shared/game/shardfile/ktx2Targets';
|
|
10
10
|
import {StandaloneCatalogueSchema, type StandaloneCatalogue} from '@wildshard/format/standaloneCatalogue';
|
|
11
11
|
import {readTar} from '@wildshard/format/tar';
|
|
@@ -15,6 +15,7 @@ import {bareSlug} from '../../src/shared/game/grid/catalogueSlot';
|
|
|
15
15
|
import {serverPackBookPath} from '../../src/shared/game/shardfile/serverPack';
|
|
16
16
|
import {productTarball} from '../../src/cook/game/productTarball';
|
|
17
17
|
import {titleMetadata, type TitleManifest} from '../../src/client/game/shard/titleList';
|
|
18
|
+
import {servedDiscoveryPath} from '../../src/cook/game/entryTotals';
|
|
18
19
|
|
|
19
20
|
/** C3 (J61, D7): every build bakes `catalogue.json`, so a build needs no server, and inlines it in `index.html`, so the
|
|
20
21
|
* first paint waits on no new fetch. `WILDSHARD_CATALOGUE` names a file a deploy took from `api-server`'s
|
|
@@ -45,10 +46,12 @@ export function titleRowOf(bytes: Uint8Array, home = ''): TitleManifest {
|
|
|
45
46
|
return {...titleMetadata(data), card: {thumb: at(thumb), portrait: at(portrait), landscape: at(landscape)}, discovery: `${home}/shardfiles/${data.slug}/discovery.json?v=${hash8(bytes)}`};
|
|
46
47
|
}
|
|
47
48
|
/** Every built product's title row, in title order. */
|
|
48
|
-
export function productTitleRows(products: string): readonly TitleManifest[] {
|
|
49
|
+
export function productTitleRows(products: string, outDir?: string): readonly TitleManifest[] {
|
|
49
50
|
const rows = readdirSync(products, {withFileTypes: true}).flatMap(entry => {
|
|
50
|
-
|
|
51
|
-
|
|
51
|
+
// S12d: the document as this build serves it (`servedDiscoveryPath`, the phone tier's table), so the title's `?v=` is its hash.
|
|
52
|
+
const own = join(products, entry.name, 'mounts/shardfiles', entry.name, 'discovery.json'), served = outDir === undefined ? undefined : servedDiscoveryPath(outDir, entry.name);
|
|
53
|
+
const file = served !== undefined && existsSync(served) ? served : own;
|
|
54
|
+
return entry.isDirectory() && existsSync(own) ? [titleRowOf(readFileSync(file))] : [];
|
|
52
55
|
});
|
|
53
56
|
return rows.sort((a, b) => (a.order ?? 0) - (b.order ?? 0));
|
|
54
57
|
}
|
|
@@ -84,7 +87,7 @@ export function inTreeCatalogue(root: string, products: string, listed: readonly
|
|
|
84
87
|
/** The build's step: the file a deploy names, else the tree's. */
|
|
85
88
|
export function bakeCatalogue(outDir: string, root: string): void {
|
|
86
89
|
const {WILDSHARD_CATALOGUE: source} = process.env;
|
|
87
|
-
const rows = productTitleRows(join(root, 'out'));
|
|
90
|
+
const rows = productTitleRows(join(root, 'out'), outDir);
|
|
88
91
|
const document = source === undefined ? inTreeCatalogue(root, join(root, 'out'), rows) : v.parse(StandaloneCatalogueSchema, JSON.parse(readFileSync(source, 'utf8')));
|
|
89
92
|
writeCatalogueDocument(outDir, document);
|
|
90
93
|
writeTitleRows(outDir, rows);
|
|
@@ -151,7 +154,7 @@ export function addCookedShards(outDir: string, shards: readonly CookedShard[],
|
|
|
151
154
|
export async function productVerdict(tarball: Uint8Array, out: string): Promise<{readonly verdict: unknown; readonly discovery?: Uint8Array}> {
|
|
152
155
|
await prepareAssetDecoders();
|
|
153
156
|
const files = readTar(tarball);
|
|
154
|
-
|
|
157
|
+
validateShardfileFolder({read: (path, maximum) => { const bytes = files.get(path); if (bytes === undefined || bytes.length > maximum) throw new Error(`No ${path}`); return bytes; }, paths: () => files.keys()},
|
|
155
158
|
{hash: bytes => createHash('sha256').update(bytes).digest('hex')});
|
|
156
159
|
// S11: a deploy's added shard serves its KTX2 targets itself, or the build already holds them.
|
|
157
160
|
assertKtx2TableTargets({paths: () => files.keys(), read: path => { const bytes = files.get(path); if (bytes === undefined) throw new Error(`No ${path}`); return bytes; }},
|