@wildshard/sdk 0.0.1 → 0.2.4
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/GUIDE.md +895 -0
- package/README.md +13 -5
- package/bin/wildshard.mjs +38 -0
- package/lint/declaration-config.d.mts +2 -0
- package/lint/declaration-config.mjs +19 -0
- package/lint/engine-plugin.d.mts +2 -0
- package/lint/engine-plugin.mjs +40 -0
- package/lint/host-callbacks.d.mts +6 -0
- package/lint/host-callbacks.mjs +123 -0
- package/lint/host-files.d.mts +1 -0
- package/lint/host-files.mjs +7 -0
- package/lint/layer-exports.d.mts +2 -0
- package/lint/layer-exports.mjs +21 -0
- package/lint/legacy-line-basis.json +995 -0
- package/lint/nine-tiling-baseline.json +35 -0
- package/lint/ratchet.json +11 -0
- package/lint/runtime-files.d.mts +12 -0
- package/lint/runtime-files.json +16 -0
- package/lint/runtime-files.mjs +69 -0
- package/lint/runtime-performance.d.mts +6 -0
- package/lint/runtime-performance.mjs +184 -0
- package/lint/sdk-plugin.d.mts +4 -0
- package/lint/sdk-plugin.mjs +134 -0
- package/lint/shardfile-boundaries.d.mts +10 -0
- package/lint/shardfile-boundaries.mjs +122 -0
- package/lint/tile-bake-debt.json +556 -0
- package/package.json +365 -3
- package/scripts/agent-parity.mjs +1524 -0
- package/scripts/agent-sync.mjs +518 -0
- package/scripts/apfs-clone.mjs +67 -0
- package/scripts/assert-store-layout.mjs +23 -0
- package/scripts/astc6-phone-cap.d.mts +3 -0
- package/scripts/astc6-phone-cap.mjs +137 -0
- package/scripts/audit-assets.d.mts +10 -0
- package/scripts/audit-assets.mjs +151 -0
- package/scripts/bake/coatFiles.d.mts +6 -0
- package/scripts/bake/coatFiles.mjs +37 -0
- package/scripts/bake/environment.d.mts +2 -0
- package/scripts/bake/environment.mjs +58 -0
- package/scripts/bake/far-proxies.mjs +45 -0
- package/scripts/bake/keyed-sky.d.mts +4 -0
- package/scripts/bake/keyed-sky.mjs +34 -0
- package/scripts/bake/movers.mjs +56 -0
- package/scripts/bake/nativeWorld.d.mts +6 -0
- package/scripts/bake/nativeWorld.mjs +43 -0
- package/scripts/bake/navmeshGround.ts +22 -0
- package/scripts/bake/near-placeholder.mjs +331 -0
- package/scripts/bake/placeholderShards.mjs +41 -0
- package/scripts/bake/skins.mjs +15 -0
- package/scripts/bake/template-skins.mjs +33 -0
- package/scripts/bake/viewmodelBytes.ts +26 -0
- package/scripts/bake/viewmodelPage.ts +11 -0
- package/scripts/bake/worldHost.d.mts +35 -0
- package/scripts/bake/worldHost.mjs +110 -0
- package/scripts/bake-astc6.cache.json +80 -0
- package/scripts/bake-astc6.far-reach.cache.json +23 -0
- package/scripts/bake-astc6.list.json +111 -0
- package/scripts/bake-astc6.mjs +279 -0
- package/scripts/bake-astc6.nalati-grasslands.cache.json +42 -0
- package/scripts/bake-catalogue.mjs +44 -0
- package/scripts/bake-check.mjs +54 -0
- package/scripts/bake-chunk.mjs +124 -0
- package/scripts/bake-cloud-field.mjs +24 -0
- package/scripts/bake-coats.mjs +110 -0
- package/scripts/bake-data-maps.d.mts +24 -0
- package/scripts/bake-data-maps.mjs +72 -0
- package/scripts/bake-entry-programs.mjs +117 -0
- package/scripts/bake-geometry.mjs +106 -0
- package/scripts/bake-hybrid-tiles.mjs +28 -0
- package/scripts/bake-ktx2.cache.json +276 -0
- package/scripts/bake-ktx2.list.json +365 -0
- package/scripts/bake-ktx2.mjs +477 -0
- package/scripts/bake-map-glb.mjs +127 -0
- package/scripts/bake-map-rest.d.mts +7 -0
- package/scripts/bake-map-rest.mjs +50 -0
- package/scripts/bake-maps.mjs +200 -0
- package/scripts/bake-navmesh.mjs +259 -0
- package/scripts/bake-packs.mjs +129 -0
- package/scripts/bake-pickups.mjs +102 -0
- package/scripts/bake-query-terrain.mjs +64 -0
- package/scripts/bake-recurve-pool.mjs +16 -0
- package/scripts/bake-section-schemas.d.mts +3 -0
- package/scripts/bake-template-shardfile.mjs +32 -0
- package/scripts/bake-textures.mjs +80 -0
- package/scripts/bake-viewmodel-sets.json +45 -0
- package/scripts/bake-viewmodel-sets.mjs +137 -0
- package/scripts/bake-voxel-ao.mjs +119 -0
- package/scripts/bake-water-ripples.mjs +25 -0
- package/scripts/blender/README.md +129 -0
- package/scripts/blender/build.sh +166 -0
- package/scripts/blender/lib/export-scene.mjs +129 -0
- package/scripts/blender/lib/glb-digest.mjs +188 -0
- package/scripts/blender/lib/glb.py +68 -0
- package/scripts/blender/lib/save_blend.py +17 -0
- package/scripts/blender/lib/world_fixture.py +55 -0
- package/scripts/blender/targets.json +591 -0
- package/scripts/build-sdk.mjs +95 -0
- package/scripts/build-shardfiles.d.mts +7 -0
- package/scripts/build-shardfiles.mjs +206 -0
- package/scripts/capture-hero.mjs +137 -0
- package/scripts/check-lift-review.mjs +23 -0
- package/scripts/chromium-keychain-check.mjs +139 -0
- package/scripts/chromium-keychain.d.mts +1 -0
- package/scripts/chromium-keychain.mjs +5 -0
- package/scripts/compile-script.d.mts +3 -0
- package/scripts/compile-script.mjs +8 -0
- package/scripts/creature-color.mjs +255 -0
- package/scripts/decide/calibrate.py +127 -0
- package/scripts/decide/calibration/2026-10-03/labels-s1.tsv +281 -0
- package/scripts/decide/calibration/2026-10-03/labels-s2.tsv +97 -0
- package/scripts/decide/calibration/2026-10-03/labels-s3.tsv +48 -0
- package/scripts/decide/calibration/2026-10-03/labels-s3b.tsv +26 -0
- package/scripts/decide/calibration/2026-10-03/res-capture-status-v1.jsonl +376 -0
- package/scripts/decide/calibration/2026-10-03/res-text-garbled-strings.jsonl +48 -0
- package/scripts/decide/calibration/2026-10-03/res-text-garbled-v1.jsonl +73 -0
- package/scripts/decide/decide.py +262 -0
- package/scripts/decide/decide.sh +50 -0
- package/scripts/decide/layer-purity-pilot.mjs +41 -0
- package/scripts/decide/sets/capture-status.json +46 -0
- package/scripts/decide/sets/layer-purity.json +28 -0
- package/scripts/decide/sets/text-garbled.json +17 -0
- package/scripts/decide/test_decide.py +37 -0
- package/scripts/docs.mjs +15 -0
- package/scripts/entry-reads/crawl.ts +152 -0
- package/scripts/entry-reads/tsconfig.json +25 -0
- package/scripts/gen-format-schema.d.mts +2 -0
- package/scripts/gen-format-schema.mjs +21 -0
- package/scripts/gen-host-catalogue.d.mts +14 -0
- package/scripts/gen-host-catalogue.mjs +108 -0
- package/scripts/gen-shard-layout-doc.d.mts +4 -0
- package/scripts/gen-shard-layout-doc.mjs +55 -0
- package/scripts/gen-shards.d.mts +17 -0
- package/scripts/gen-shards.mjs +311 -0
- package/scripts/goldens/capture-inputs.d.mts +4 -0
- package/scripts/goldens/capture-inputs.mjs +34 -0
- package/scripts/goldens/colour_shift.py +27 -0
- package/scripts/goldens/native-residency.d.mts +10 -0
- package/scripts/goldens/native-residency.mjs +104 -0
- package/scripts/goldens/plot-inputs.d.mts +12 -0
- package/scripts/goldens/plot-inputs.mjs +46 -0
- package/scripts/gpu-texmem.mjs +98 -0
- package/scripts/horizon-matte/config.py +24 -0
- package/scripts/horizon-matte/encode.py +91 -0
- package/scripts/horizon-matte/key.py +141 -0
- package/scripts/horizon-matte/mkjobs.py +33 -0
- package/scripts/horizon-matte/mkjobs_day2.py +11 -0
- package/scripts/horizon-matte/overlap.py +80 -0
- package/scripts/horizon-matte/run_codex.py +57 -0
- package/scripts/horizon-matte/stitch.py +133 -0
- package/scripts/img2mesh/CC0.md +105 -0
- package/scripts/img2mesh/README.md +209 -0
- package/scripts/img2mesh/ab_board.py +102 -0
- package/scripts/img2mesh/birds/birds.json +255 -0
- package/scripts/img2mesh/birds/birds_atlas.py +150 -0
- package/scripts/img2mesh/birds/birds_fix_preview.mjs +103 -0
- package/scripts/img2mesh/birds/birds_fix_render.py +75 -0
- package/scripts/img2mesh/birds/birds_pack.py +110 -0
- package/scripts/img2mesh/birds/birds_phone_b.py +112 -0
- package/scripts/img2mesh/birds/birds_post.py +550 -0
- package/scripts/img2mesh/birds/birds_render.py +125 -0
- package/scripts/img2mesh/birds/birds_sheet.py +33 -0
- package/scripts/img2mesh/birds/birds_view.py +60 -0
- package/scripts/img2mesh/board.py +100 -0
- package/scripts/img2mesh/build_cc0.sh +52 -0
- package/scripts/img2mesh/build_driftwood.sh +12 -0
- package/scripts/img2mesh/build_faces.sh +53 -0
- package/scripts/img2mesh/build_props.py +81 -0
- package/scripts/img2mesh/cc0_export.py +186 -0
- package/scripts/img2mesh/driftwood_post.py +571 -0
- package/scripts/img2mesh/e304_faces.sh +67 -0
- package/scripts/img2mesh/face_remaster.py +911 -0
- package/scripts/img2mesh/face_views.py +95 -0
- package/scripts/img2mesh/faces-e304.json +9 -0
- package/scripts/img2mesh/faces.json +30 -0
- package/scripts/img2mesh/head_cut.py +100 -0
- package/scripts/img2mesh/hi3d_paint.py +94 -0
- package/scripts/img2mesh/hi3d_refine.py +161 -0
- package/scripts/img2mesh/hunyuan_cpu_rasterizer.sh +42 -0
- package/scripts/img2mesh/pine_hollow_phone.sh +13 -0
- package/scripts/img2mesh/props/coral-arch.json +32 -0
- package/scripts/img2mesh/props/ember-furnace.json +30 -0
- package/scripts/img2mesh/props/night-market-gate.json +10 -0
- package/scripts/img2mesh/render_still.py +86 -0
- package/scripts/img2mesh/rig_strip.mjs +46 -0
- package/scripts/img2mesh/rig_transfer.mjs +104 -0
- package/scripts/img2mesh/split_sheet.py +48 -0
- package/scripts/img2mesh/trellis_batch.py +110 -0
- package/scripts/img2mesh/versus_board.py +114 -0
- package/scripts/import-bundle.d.mts +2 -0
- package/scripts/import-bundle.mjs +20 -0
- package/scripts/ktx2-ab-board.py +133 -0
- package/scripts/ktx2-ab.mjs +111 -0
- package/scripts/ktx2-settings.mjs +18 -0
- package/scripts/land.d.mts +14 -0
- package/scripts/land.mjs +809 -0
- package/scripts/lint-dispatch.mjs +14 -0
- package/scripts/map-bake-frames.d.mts +4 -0
- package/scripts/map-bake-frames.mjs +23 -0
- package/scripts/map-geometry.d.mts +9 -0
- package/scripts/map-geometry.mjs +29 -0
- package/scripts/map-world.mjs +162 -0
- package/scripts/mockup-local.sh +46 -0
- package/scripts/music/export-midi.mjs +68 -0
- package/scripts/music/gen/analyze.py +308 -0
- package/scripts/music/gen/audio_jobs.py +46 -0
- package/scripts/music/gen/briefs.json +51 -0
- package/scripts/music/gen/build_page.py +334 -0
- package/scripts/music/gen/folk.json +3187 -0
- package/scripts/music/gen/gen_ace_step.py +156 -0
- package/scripts/music/gen/gen_heartmula.py +187 -0
- package/scripts/music/gen/gen_minimax.py +143 -0
- package/scripts/music/gen/gen_sao.py +122 -0
- package/scripts/music/gen/gen_sao_small.py +104 -0
- package/scripts/music/gen/gen_sfx.py +98 -0
- package/scripts/music/gen/gen_sfx_ezaudio.py +112 -0
- package/scripts/music/gen/gen_sfx_moss.py +112 -0
- package/scripts/music/gen/models.json +61 -0
- package/scripts/music/gen/nalati-jobs.json +104 -0
- package/scripts/music/gen/nalati-score-build.json +119 -0
- package/scripts/music/gen/nalati-score.json +3448 -0
- package/scripts/music/gen/ob7-fit-decisions.json +38 -0
- package/scripts/music/gen/ob7-score-jobs.json +152 -0
- package/scripts/music/gen/ob7-sfx-jobs.json +897 -0
- package/scripts/music/gen/ob7_build.py +469 -0
- package/scripts/music/gen/ob7_generate.py +67 -0
- package/scripts/music/gen/ob7_run.sh +42 -0
- package/scripts/music/gen/orchestral.json +3187 -0
- package/scripts/music/gen/own_score.py +486 -0
- package/scripts/music/gen/ph-jobs.json +27 -0
- package/scripts/music/gen/ph_page.py +222 -0
- package/scripts/music/gen/piano.json +3175 -0
- package/scripts/music/gen/rank_v3.py +248 -0
- package/scripts/music/gen/sfx-best.json +2486 -0
- package/scripts/music/gen/sfx-ezaudio.json +4082 -0
- package/scripts/music/gen/sfx-jobs.json +57 -0
- package/scripts/music/gen/sfx-minimax-jobs.json +16 -0
- package/scripts/music/gen/sfx-minimax.json +289 -0
- package/scripts/music/gen/sfx-moss.json +4082 -0
- package/scripts/music/gen/sfx-nalati-b3-jobs.json +17 -0
- package/scripts/music/gen/sfx-nalati-jobs.json +338 -0
- package/scripts/music/gen/sfx-nalati.json +11202 -0
- package/scripts/music/gen/sfx-nd-jobs.json +57 -0
- package/scripts/music/gen/sfx-nd-moss.json +2097 -0
- package/scripts/music/gen/sfx-nd-sa3-medium.json +2097 -0
- package/scripts/music/gen/sfx-nd-summary.json +38 -0
- package/scripts/music/gen/sfx-peaks.json +7 -0
- package/scripts/music/gen/sfx-ph-jobs.json +169 -0
- package/scripts/music/gen/sfx-ph-moss.json +6564 -0
- package/scripts/music/gen/sfx-ph-sa3-medium.json +7239 -0
- package/scripts/music/gen/sfx-ph-summary.json +63 -0
- package/scripts/music/gen/sfx-sa3-medium.json +4082 -0
- package/scripts/music/gen/sfx-sa3.json +4082 -0
- package/scripts/music/gen/sfx-summary.json +107 -0
- package/scripts/music/gen/sfx_build.py +332 -0
- package/scripts/music/gen/sfx_merge.py +255 -0
- package/scripts/music/gen/sfx_minimax.py +61 -0
- package/scripts/music/gen/sfx_nalati.py +331 -0
- package/scripts/music/gen/sfx_sprite.py +424 -0
- package/scripts/music/gen/stems.py +539 -0
- package/scripts/music/gen/test_loop_meter.py +29 -0
- package/scripts/music/gen/test_ob7_provenance.py +77 -0
- package/scripts/music/gen/v3-folk-build.json +148 -0
- package/scripts/music/gen/v3-folk.json +1818 -0
- package/scripts/music/gen/v3-jobs.json +145 -0
- package/scripts/music/gen/v3-orchestral-build.json +148 -0
- package/scripts/music/gen/v3-orchestral.json +1813 -0
- package/scripts/music/gen/v3-ph-folk-build.json +94 -0
- package/scripts/music/gen/v3-ph-folk.json +1806 -0
- package/scripts/music/gen/v3-ph-orchestral-build.json +94 -0
- package/scripts/music/gen/v3-ph-orchestral.json +1824 -0
- package/scripts/music/gen/v3-ph-piano-build.json +94 -0
- package/scripts/music/gen/v3-ph-piano.json +1818 -0
- package/scripts/music/gen/v3-piano-build.json +148 -0
- package/scripts/music/gen/v3-piano.json +1813 -0
- package/scripts/music/wildshard-theme.mid +0 -0
- package/scripts/music/wildshard-trailer30.mid +0 -0
- package/scripts/named-blob-output.d.mts +8 -0
- package/scripts/named-blob-output.mjs +48 -0
- package/scripts/pack-all.mjs +15 -0
- package/scripts/pid-lock.d.mts +1 -0
- package/scripts/pid-lock.mjs +63 -0
- package/scripts/practice/bake_dummy.py +53 -0
- package/scripts/practice/build_dummies.sh +43 -0
- package/scripts/practice/dummy_parts.py +568 -0
- package/scripts/practice/dummy_rig_gate.py +139 -0
- package/scripts/practice/gate_sheet.py +36 -0
- package/scripts/practice/generate_dummy_unimate.py +132 -0
- package/scripts/practice/pack_dummy.mjs +59 -0
- package/scripts/practice/repair_dummy_weights.mjs +68 -0
- package/scripts/practice/rig_dummy.py +828 -0
- package/scripts/practice/verify_unimate_skin.mjs +356 -0
- package/scripts/preparation-seed.mjs +15 -0
- package/scripts/prepare-basis-tool.mjs +6 -0
- package/scripts/prepare-product.d.mts +14 -0
- package/scripts/prepare-product.mjs +101 -0
- package/scripts/product-build-tools.d.mts +3 -0
- package/scripts/product-build-tools.json +3 -0
- package/scripts/product-build-tools.mjs +31 -0
- package/scripts/publish-public.mjs +7 -0
- package/scripts/push-tables.d.mts +1 -0
- package/scripts/push-tables.mjs +28 -0
- package/scripts/record-shard-mounts.mjs +133 -0
- package/scripts/sdk-externals.d.mts +2 -0
- package/scripts/sdk-externals.mjs +2 -0
- package/scripts/section-inventory.ts +209 -0
- package/scripts/select-candidate.mjs +15 -0
- package/scripts/shard-build-pool.d.mts +4 -0
- package/scripts/shard-build-pool.mjs +53 -0
- package/scripts/shard-line-baseline.json +17 -0
- package/scripts/shard-milestones.d.mts +15 -0
- package/scripts/shard-milestones.mjs +105 -0
- package/scripts/shard-output-report.d.mts +9 -0
- package/scripts/shard-output-report.mjs +85 -0
- package/scripts/shard-platform-cli.mjs +93 -0
- package/scripts/shard-progress.mjs +212 -0
- package/scripts/shard-timelapse.py +102 -0
- package/scripts/shardfile-cold-boot.mjs +79 -0
- package/scripts/shardfile-vite.d.mts +4 -0
- package/scripts/shardfile-vite.mjs +20 -0
- package/scripts/simplify-models.mjs +24 -0
- package/scripts/site-facts.mjs +88 -0
- package/scripts/test-template-gate.mjs +44 -0
- package/scripts/test_golden_compare.py +68 -0
- package/scripts/tex-tiers.cache.json +181 -0
- package/scripts/tex-tiers.mjs +240 -0
- package/scripts/texmem-probe.mjs +184 -0
- package/scripts/unused-assets.mjs +173 -0
- package/scripts/vite-tmp.d.mts +23 -0
- package/scripts/vite-tmp.mjs +157 -0
- package/scripts/wave-line-baselines.json +32 -0
- package/scripts/wildshard.d.mts +4 -0
- package/scripts/wildshard.mjs +105 -0
- package/scripts/witness-checkpoints.d.mts +10 -0
- package/scripts/witness-checkpoints.mjs +84 -0
- package/scripts/witness-generation.d.mts +10 -0
- package/scripts/witness-generation.mjs +45 -0
- package/scripts/witness-manifests.d.mts +8 -0
- package/scripts/witness-manifests.mjs +157 -0
- package/scripts/worktree-ignore.d.mts +4 -0
- package/scripts/worktree-ignore.mjs +36 -0
- package/scripts/worktree-reap.mjs +214 -0
- package/scripts/worktree.mjs +396 -0
- package/scripts/worldclaw/capture-front.sh +28 -0
- package/scripts/worldclaw/design-template.md +62 -0
- package/scripts/worldclaw/spec-map.py +92 -0
- package/scripts/worldclaw/spec.ts +96 -0
- package/skills/wildshard/SKILL.md +50 -0
- package/skills/wildshard-goldens/SKILL.md +54 -0
- package/skills/wildshard-mockup-to-model/SKILL.md +56 -0
- package/skills/wildshard-upgrade/SKILL.md +47 -0
- package/src/.oxfmtrc.json +50 -0
- package/src/.oxlintrc.json +173 -0
- package/src/cli/account/account.ts +199 -0
- package/src/cli/account/command.ts +193 -0
- package/src/cli/account/key.ts +154 -0
- package/src/cli/args.ts +97 -0
- package/src/cli/audio/audio.ts +39 -0
- package/src/cli/bin.mjs +8 -0
- package/src/cli/delete/delete.ts +258 -0
- package/src/cli/help.ts +204 -0
- package/src/cli/hero/adopt.ts +103 -0
- package/src/cli/hero/hero.ts +112 -0
- package/src/cli/hero/stamp.ts +298 -0
- package/src/cli/main.ts +291 -0
- package/src/cli/report.ts +20 -0
- package/src/cli/shardfile/command.ts +49 -0
- package/src/cli/shardfile/shardfile.ts +192 -0
- package/src/cli/upload/api.ts +246 -0
- package/src/cli/upload/compress.ts +55 -0
- package/src/cli/upload/hero.ts +62 -0
- package/src/cli/upload/placement.ts +115 -0
- package/src/cli/upload/provenance.ts +192 -0
- package/src/cli/upload/signature.ts +30 -0
- package/src/cli/upload/upload.ts +269 -0
- package/src/cli/upload/validate.ts +74 -0
- package/src/cli/upload/wire.ts +147 -0
- package/src/cli/version.ts +63 -0
- package/src/commons/bake/portableMath.ts +187 -0
- package/src/commons/catalogue.ts +10 -0
- package/src/commons/courseProgram.ts +32 -0
- package/src/commons/practiceCourse.ts +16 -0
- package/src/commons/scripts/abi.as +14 -0
- package/src/commons/scripts/bridge.as +14 -0
- package/src/commons/scripts/course.as +63 -0
- package/src/scripts/ask-new.sh +29 -0
- package/src/scripts/asks.mjs +141 -0
- package/src/scripts/herdr-prompt.sh +34 -0
- package/src/scripts/herdr-question-open.sh +67 -0
- package/src/scripts/md-wrap.mjs +229 -0
- package/src/server/app.ts +19 -0
- package/src/server/serve.ts +49 -0
- package/src/sharddev/admission.ts +7 -0
- package/src/sharddev/agentFiles.ts +127 -0
- package/src/sharddev/arenaView.ts +15 -0
- package/src/sharddev/as/groupBankV2.ts +36 -0
- package/src/sharddev/as/groupStepV2.ts +13 -0
- package/src/sharddev/as/ws.ts +30 -0
- package/src/sharddev/as/wsV2.ts +180 -0
- package/src/sharddev/assemblyscriptCompiler.d.mts +5 -0
- package/src/sharddev/assemblyscriptCompiler.mjs +14 -0
- package/src/sharddev/assetHandle.ts +84 -0
- package/src/sharddev/assetOwner.ts +70 -0
- package/src/sharddev/assetScope.ts +30 -0
- package/src/sharddev/assets.ts +21 -0
- package/src/sharddev/audio.ts +9 -0
- package/src/sharddev/audioEncode.ts +211 -0
- package/src/sharddev/author.ts +3 -0
- package/src/sharddev/authorError.ts +28 -0
- package/src/sharddev/authorManifest.ts +39 -0
- package/src/sharddev/bake/annulus.ts +19 -0
- package/src/sharddev/bake/assemblyscriptMemo.ts +76 -0
- package/src/sharddev/bake/assemblyscriptMemoPort.ts +4 -0
- package/src/sharddev/bake/authoredWorld.ts +201 -0
- package/src/sharddev/bake/basisEncoder.ts +95 -0
- package/src/sharddev/bake/basisGlb.ts +85 -0
- package/src/sharddev/bake/basisTool.ts +74 -0
- package/src/sharddev/bake/basisToolInputs.ts +476 -0
- package/src/sharddev/bake/byteCodec.ts +33 -0
- package/src/sharddev/bake/canvasAtlas.ts +406 -0
- package/src/sharddev/bake/coarseCopy.ts +59 -0
- package/src/sharddev/bake/colliders.ts +87 -0
- package/src/sharddev/bake/compactGlb.ts +224 -0
- package/src/sharddev/bake/compileScript.ts +119 -0
- package/src/sharddev/bake/compileScriptV2.ts +75 -0
- package/src/sharddev/bake/contactRows.ts +84 -0
- package/src/sharddev/bake/creaturePlacement.ts +117 -0
- package/src/sharddev/bake/export.ts +67 -0
- package/src/sharddev/bake/facetedGeometry.ts +379 -0
- package/src/sharddev/bake/farImpostor.ts +120 -0
- package/src/sharddev/bake/forest.ts +100 -0
- package/src/sharddev/bake/format-hook.mjs +2 -0
- package/src/sharddev/bake/generatorGlb.ts +23 -0
- package/src/sharddev/bake/geometryBounds.ts +77 -0
- package/src/sharddev/bake/geometryError.ts +48 -0
- package/src/sharddev/bake/glb.ts +355 -0
- package/src/sharddev/bake/glbCompression.ts +143 -0
- package/src/sharddev/bake/gltfSource.ts +59 -0
- package/src/sharddev/bake/groundMap.ts +142 -0
- package/src/sharddev/bake/image.ts +20 -0
- package/src/sharddev/bake/isleMap.ts +64 -0
- package/src/sharddev/bake/json.mjs +84 -0
- package/src/sharddev/bake/keyedSky.ts +47 -0
- package/src/sharddev/bake/keyedSkyMemo.ts +39 -0
- package/src/sharddev/bake/kinds.ts +137 -0
- package/src/sharddev/bake/lightSources.ts +31 -0
- package/src/sharddev/bake/mapAssembly.ts +84 -0
- package/src/sharddev/bake/mapRaster.ts +173 -0
- package/src/sharddev/bake/mapRest.ts +57 -0
- package/src/sharddev/bake/mapScenes.ts +234 -0
- package/src/sharddev/bake/materialGraph.ts +32 -0
- package/src/sharddev/bake/meadow.ts +27 -0
- package/src/sharddev/bake/meshoptChoiceMemo.ts +34 -0
- package/src/sharddev/bake/nativeInteractionFacts.ts +5 -0
- package/src/sharddev/bake/nativeLattice.ts +178 -0
- package/src/sharddev/bake/nativeRaster.ts +106 -0
- package/src/sharddev/bake/nativeTerrainField.ts +11 -0
- package/src/sharddev/bake/navigation-json.mjs +38 -0
- package/src/sharddev/bake/navigation.ts +113 -0
- package/src/sharddev/bake/navigationAsset.ts +18 -0
- package/src/sharddev/bake/nearPlaceholder.ts +206 -0
- package/src/sharddev/bake/normalizeRig.ts +80 -0
- package/src/sharddev/bake/phoneAstc.ts +93 -0
- package/src/sharddev/bake/placeholders.ts +581 -0
- package/src/sharddev/bake/placement.ts +80 -0
- package/src/sharddev/bake/portableBytes.ts +18 -0
- package/src/sharddev/bake/portableBytesMemo.ts +50 -0
- package/src/sharddev/bake/practiceCourse.ts +49 -0
- package/src/sharddev/bake/primitives.ts +96 -0
- package/src/sharddev/bake/props.ts +443 -0
- package/src/sharddev/bake/questPlacement.ts +98 -0
- package/src/sharddev/bake/rawTexture.ts +26 -0
- package/src/sharddev/bake/riderArms.ts +97 -0
- package/src/sharddev/bake/rig.ts +95 -0
- package/src/sharddev/bake/riggedHullRecipes.ts +40 -0
- package/src/sharddev/bake/signPlacements.ts +25 -0
- package/src/sharddev/bake/simplifier.ts +52 -0
- package/src/sharddev/bake/skinned.ts +312 -0
- package/src/sharddev/bake/slabChunks.ts +149 -0
- package/src/sharddev/bake/slabs.ts +263 -0
- package/src/sharddev/bake/source-loader.mjs +55 -0
- package/src/sharddev/bake/sourceMetadata.ts +54 -0
- package/src/sharddev/bake/species.ts +368 -0
- package/src/sharddev/bake/specimenCatalogue.ts +47 -0
- package/src/sharddev/bake/splatGround.ts +141 -0
- package/src/sharddev/bake/staticMaterials.ts +171 -0
- package/src/sharddev/bake/terrain.ts +195 -0
- package/src/sharddev/bake/texture.ts +33 -0
- package/src/sharddev/bake/textureWasm.ts +81 -0
- package/src/sharddev/bake/tileEncoder.ts +11 -0
- package/src/sharddev/bake/tileGrid.ts +62 -0
- package/src/sharddev/bake/v2Finite.ts +160 -0
- package/src/sharddev/bake/v2Fuel.ts +71 -0
- package/src/sharddev/bake/wholePartition.ts +74 -0
- package/src/sharddev/bake/wholePieceJoin.ts +147 -0
- package/src/sharddev/bake/world.ts +173 -0
- package/src/sharddev/bake/worldCollision.ts +128 -0
- package/src/sharddev/bake/worldGeometry.ts +237 -0
- package/src/sharddev/bake/worldGlb.ts +123 -0
- package/src/sharddev/bake/worldImage.ts +12 -0
- package/src/sharddev/bake/worldLod.ts +128 -0
- package/src/sharddev/bake/worldRows.ts +102 -0
- package/src/sharddev/bake/worldTextureMemo.ts +63 -0
- package/src/sharddev/bake/zstdBytesMemo.ts +52 -0
- package/src/sharddev/bake.ts +193 -0
- package/src/sharddev/bakePublication.ts +31 -0
- package/src/sharddev/behaviourSource.ts +94 -0
- package/src/sharddev/bin/wildshard.mjs +7 -0
- package/src/sharddev/blobBytes.ts +65 -0
- package/src/sharddev/blobs.ts +138 -0
- package/src/sharddev/bootInventory.ts +129 -0
- package/src/sharddev/bossProfiles.ts +18 -0
- package/src/sharddev/buildBehaviour.ts +77 -0
- package/src/sharddev/buildCacheMetrics.ts +17 -0
- package/src/sharddev/buildDecisionScripts.ts +122 -0
- package/src/sharddev/check.ts +118 -0
- package/src/sharddev/checkProject.ts +127 -0
- package/src/sharddev/cli.ts +200 -0
- package/src/sharddev/clientChannels.ts +169 -0
- package/src/sharddev/clientScripts.ts +10 -0
- package/src/sharddev/commons.ts +77 -0
- package/src/sharddev/commonsCosts.ts +11 -0
- package/src/sharddev/compileMovers.ts +11 -0
- package/src/sharddev/configBoundary.ts +6 -0
- package/src/sharddev/cookInput.ts +40 -0
- package/src/sharddev/crowds.ts +6 -0
- package/src/sharddev/decisionBindingMap.ts +11 -0
- package/src/sharddev/decisionScriptBindings.ts +117 -0
- package/src/sharddev/decisionScripts.ts +28 -0
- package/src/sharddev/decisionSource.ts +51 -0
- package/src/sharddev/dev.ts +113 -0
- package/src/sharddev/director.ts +26 -0
- package/src/sharddev/directorAbi.ts +77 -0
- package/src/sharddev/discoveryDocument.ts +97 -0
- package/src/sharddev/draft.ts +11 -0
- package/src/sharddev/eliteEntryRows.ts +29 -0
- package/src/sharddev/entries.ts +76 -0
- package/src/sharddev/entryReads.ts +73 -0
- package/src/sharddev/executeBundle.ts +55 -0
- package/src/sharddev/finds.ts +5 -0
- package/src/sharddev/formatJsonSchema.ts +3 -0
- package/src/sharddev/generationCache.ts +257 -0
- package/src/sharddev/generationRecipe.ts +94 -0
- package/src/sharddev/handwritten.ts +110 -0
- package/src/sharddev/immutable.ts +14 -0
- package/src/sharddev/interactions.ts +38 -0
- package/src/sharddev/kit/bakedGeometry.ts +16 -0
- package/src/sharddev/kit/geometryPack.ts +110 -0
- package/src/sharddev/ledger.ts +13 -0
- package/src/sharddev/looks/tileField.ts +67 -0
- package/src/sharddev/materialGraphFiles.ts +57 -0
- package/src/sharddev/materials.ts +574 -0
- package/src/sharddev/measure.ts +18 -0
- package/src/sharddev/modes.ts +115 -0
- package/src/sharddev/moverPrograms.ts +213 -0
- package/src/sharddev/movers.ts +75 -0
- package/src/sharddev/nativePopulationRows.ts +46 -0
- package/src/sharddev/newProject.ts +226 -0
- package/src/sharddev/noise.ts +54 -0
- package/src/sharddev/outputProduct.ts +188 -0
- package/src/sharddev/outputRuntime.ts +66 -0
- package/src/sharddev/performancePolicy.ts +29 -0
- package/src/sharddev/phasedBoss.ts +34 -0
- package/src/sharddev/physics.ts +194 -0
- package/src/sharddev/platformSections.ts +42 -0
- package/src/sharddev/plumbing.ts +8 -0
- package/src/sharddev/productOutput.ts +128 -0
- package/src/sharddev/project.ts +337 -0
- package/src/sharddev/projectCompilerIdentity.ts +94 -0
- package/src/sharddev/projectDecisions.ts +66 -0
- package/src/sharddev/projectEntryProof.ts +32 -0
- package/src/sharddev/projectGeneration.ts +219 -0
- package/src/sharddev/projectInputFiles.ts +47 -0
- package/src/sharddev/projectManifest.ts +108 -0
- package/src/sharddev/projectMap.ts +35 -0
- package/src/sharddev/projectOutput.ts +242 -0
- package/src/sharddev/projectPolicy.ts +17 -0
- package/src/sharddev/projectSections.ts +27 -0
- package/src/sharddev/questGraph.ts +25 -0
- package/src/sharddev/quests.ts +65 -0
- package/src/sharddev/random.ts +61 -0
- package/src/sharddev/refusals.ts +304 -0
- package/src/sharddev/reportCard.ts +13 -0
- package/src/sharddev/returnProjectionV2.ts +81 -0
- package/src/sharddev/rows.ts +192 -0
- package/src/sharddev/runtimeImports.ts +38 -0
- package/src/sharddev/runtimeMirrors.ts +39 -0
- package/src/sharddev/runtimePerformance.ts +38 -0
- package/src/sharddev/scene.ts +321 -0
- package/src/sharddev/sceneAnimation.ts +54 -0
- package/src/sharddev/sceneAudio.ts +64 -0
- package/src/sharddev/sceneDeclarations.ts +100 -0
- package/src/sharddev/sceneGraph.ts +139 -0
- package/src/sharddev/sceneTransform.ts +12 -0
- package/src/sharddev/schemaValidation.ts +61 -0
- package/src/sharddev/sections.ts +47 -0
- package/src/sharddev/shardSource.ts +59 -0
- package/src/sharddev/sourceReader.ts +26 -0
- package/src/sharddev/spawns.ts +38 -0
- package/src/sharddev/species/clips.ts +24 -0
- package/src/sharddev/species.ts +29 -0
- package/src/sharddev/speciesBrains.ts +19 -0
- package/src/sharddev/synth.ts +66 -0
- package/src/sharddev/test/compileDualScriptV2.ts +71 -0
- package/src/sharddev/test/compileSimV2.ts +21 -0
- package/src/sharddev/test/diskScriptScenario.ts +86 -0
- package/src/sharddev/test/scriptScenario.ts +249 -0
- package/src/sharddev/test/scriptSource.ts +12 -0
- package/src/sharddev/version.ts +4 -0
- package/src/sharddev/weapons/bowProfile.ts +20 -0
- package/src/sharddev/weapons/firearmRows.ts +11 -0
- package/src/sharddev/weapons/meleeProfile.ts +71 -0
- package/src/sharddev/weapons/thrownProfile.ts +10 -0
- package/src/sharddev/worldScenes.ts +308 -0
- package/src/sharddev/worldSource.ts +82 -0
- package/src/shards/_template/README.md +78 -0
- package/src/shards/_template/assets/2bf489fdb15f1734ddb4c4f32d500ec6da85c765ec7a4eb28dc6781160e7ec8c +0 -0
- package/src/shards/_template/assets/97ec4d8f75f5fa6239ee919444d6dc19fd35896bb305930c1f050ac6e0e0e6a6 +1 -0
- package/src/shards/_template/assets/a6a587a31327f936b1b04c05ade818c73fc8964260918662db43539465e27586 +0 -0
- package/src/shards/_template/assets/b4fbde0422e125b498c3dc8b9a5cc2516c8598f09e9d0e5f6b639b32f98179e6 +0 -0
- package/src/shards/_template/assets/bfa4dfc9c18979f904557ee8deab0058b8a399be10266f5fb1578b403f482fd4 +1 -0
- package/src/shards/_template/assets/ef3b7ff4fd22715771cb7d68a3977a903c5e7c3dc293542687d04b3ef3ace2cb +0 -0
- package/src/shards/_template/assets/f2db05998615ce1cb79ea96be32c168842eb6a2b34ec01feb86d36404603ee54 +0 -0
- package/src/shards/_template/assets/fef98ebb7fce6f66b26e78ac699e5c90f9bdcfaf8cabeb2b58125347eea8b4ab +0 -0
- package/src/shards/_template/behaviour/boss.as +39 -0
- package/src/shards/_template/behaviour/door.as +32 -0
- package/src/shards/_template/behaviour/hooks.json +129 -0
- package/src/shards/_template/behaviour/idle.as +75 -0
- package/src/shards/_template/behaviour/items.as +22 -0
- package/src/shards/_template/card/landscape.jpg +0 -0
- package/src/shards/_template/card/portrait.jpg +0 -0
- package/src/shards/_template/card/thumb.jpg +0 -0
- package/src/shards/_template/data/audio.json +45 -0
- package/src/shards/_template/data/bossDecision.json +83 -0
- package/src/shards/_template/data/budgets.json +70 -0
- package/src/shards/_template/data/card.json +281 -0
- package/src/shards/_template/data/clientScripts.json +987 -0
- package/src/shards/_template/data/creatures.json +65 -0
- package/src/shards/_template/data/director.json +39 -0
- package/src/shards/_template/data/encounters.json +96 -0
- package/src/shards/_template/data/items.json +172 -0
- package/src/shards/_template/data/layout.json +66 -0
- package/src/shards/_template/data/ledger.json +32 -0
- package/src/shards/_template/data/look.json +521 -0
- package/src/shards/_template/data/map.json +64 -0
- package/src/shards/_template/data/moves.json +16 -0
- package/src/shards/_template/data/placeholder.json +8 -0
- package/src/shards/_template/data/plumbing.json +32 -0
- package/src/shards/_template/data/quests.json +223 -0
- package/src/shards/_template/data/rows.json +423 -0
- package/src/shards/_template/data/skins.json +66 -0
- package/src/shards/_template/data/spawn.json +6 -0
- package/src/shards/_template/data/targets.json +150 -0
- package/src/shards/_template/data/text.json +12 -0
- package/src/shards/_template/data/ui.json +33 -0
- package/src/shards/_template/data/water.json +13 -0
- package/src/shards/_template/generators/behaviour.ts +34 -0
- package/src/shards/_template/generators/boss.ts +29 -0
- package/src/shards/_template/generators/buildOptions.ts +2 -0
- package/src/shards/_template/generators/cell.ts +224 -0
- package/src/shards/_template/generators/districts.ts +215 -0
- package/src/shards/_template/generators/farLook.ts +15 -0
- package/src/shards/_template/generators/generate.ts +27 -0
- package/src/shards/_template/generators/ground.ts +15 -0
- package/src/shards/_template/generators/kit.ts +69 -0
- package/src/shards/_template/generators/landscape.ts +59 -0
- package/src/shards/_template/generators/landscapeNoise.ts +62 -0
- package/src/shards/_template/generators/mapInputs.ts +10 -0
- package/src/shards/_template/generators/product.ts +100 -0
- package/src/shards/_template/generators/productOutput.ts +18 -0
- package/src/shards/_template/generators/props.ts +9 -0
- package/src/shards/_template/generators/templatePropsSource.ts +58 -0
- package/src/shards/_template/generators/terrain.ts +17 -0
- package/src/shards/_template/generators/world.ts +630 -0
- package/src/shards/_template/hero.json +10 -0
- package/src/shards/_template/look/entry-reads.json +20 -0
- package/src/shards/_template/manifest.json +281 -0
- package/src/shards/_template/shard.config.ts +10 -0
- package/src/shared/health.ts +10 -0
- package/src/tools/build-web.ts +59 -0
- package/src/tsconfig.json +30 -0
- package/src/web/app.tsx +53 -0
- package/src/web/index.html +12 -0
- package/src/web/main.tsx +10 -0
- package/src/web/tsconfig.json +13 -0
- package/tsconfig.author.json +23 -0
- package/tsconfig.commons.json +21 -0
- package/tsconfig.json +47 -0
- package/tsconfig.sharddev.json +20 -0
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
// T1's formats (WORLDCLAW-SHARD T1, R15, D87): a shard's machine twin `src/shards/<slug>/design/spec.json` and the machine
|
|
2
|
+
// block of its human twin `design.md`. `spec.json` owns the numbers (coordinates, terrain, budgets); the machine block owns
|
|
3
|
+
// the ids and the intent (roles, beats, the quest, the slice). spec-check and twin-check (T1's checks, after the formats:
|
|
4
|
+
// D87) read both through these schemas.
|
|
5
|
+
//
|
|
6
|
+
// Coordinates: metres, x east, z south, the origin at the shard's centre, y up (the shard contract).
|
|
7
|
+
import * as v from 'valibot';
|
|
8
|
+
|
|
9
|
+
const Id = v.pipe(v.string(), v.regex(/^[a-z0-9][a-z0-9-]*$/, 'ids are lower-case kebab'));
|
|
10
|
+
const XZ = v.strictTuple([v.number(), v.number()]);
|
|
11
|
+
/** a route point with its height: a lift or a stair climbs at (nearly) the same x, z (MC33, reopened by D91) */
|
|
12
|
+
const XYZ = v.strictTuple([v.number(), v.number(), v.number()]);
|
|
13
|
+
|
|
14
|
+
/** Place roles (06 §10.2's required roles are a subset: spawn, hub, landmark, boss). */
|
|
15
|
+
export const ROLES = ['spawn', 'hub', 'landmark', 'objective', 'arena', 'boss', 'secret', 'vista', 'camp', 'traversal', 'discovery'] as const;
|
|
16
|
+
/** Route leg modes: how the player moves on the leg (the eye paths of R11). */
|
|
17
|
+
export const LEG_MODES = ['walk', 'climb', 'ride', 'glide', 'swim', 'grapple', 'zipline', 'rope', 'sled', 'hover', 'stair', 'lift'] as const;
|
|
18
|
+
/** the leg modes whose points must carry their height ([x, y, z]); any other leg may */
|
|
19
|
+
export const VERTICAL_LEGS: readonly string[] = ['stair', 'lift'];
|
|
20
|
+
|
|
21
|
+
const Leg = v.pipe(
|
|
22
|
+
v.strictObject({ mode: v.picklist(LEG_MODES), pts: v.pipe(v.array(v.union([XZ, XYZ])), v.minLength(2)) }),
|
|
23
|
+
v.check((l) => !VERTICAL_LEGS.includes(l.mode) || l.pts.every((p) => p.length === 3), 'a stair or lift leg gives every point as [x, y, z]'),
|
|
24
|
+
);
|
|
25
|
+
|
|
26
|
+
export const SpecSchema = v.strictObject({
|
|
27
|
+
version: v.literal(1),
|
|
28
|
+
slug: Id,
|
|
29
|
+
/** the map's side in metres */
|
|
30
|
+
size: v.pipe(v.number(), v.minValue(1)),
|
|
31
|
+
/** E1's cube: how far the world reaches below and above y = 0 */
|
|
32
|
+
extent: v.optional(v.strictObject({ below: v.number(), above: v.number() })),
|
|
33
|
+
/** the terrain's height range (from the extent) */
|
|
34
|
+
heightRange: v.tuple([v.number(), v.number()]),
|
|
35
|
+
catalogMode: v.picklist(['kit', 'generated', 'mixed']),
|
|
36
|
+
regions: v.array(v.strictObject({
|
|
37
|
+
id: Id, color: v.pipe(v.string(), v.hexColor()), walkable: v.boolean(), base: v.optional(v.number()), desc: v.string(),
|
|
38
|
+
})),
|
|
39
|
+
places: v.array(v.strictObject({
|
|
40
|
+
id: Id, role: v.picklist(ROLES), x: v.number(), z: v.number(), y: v.optional(v.number()),
|
|
41
|
+
/** the place's radius in metres */
|
|
42
|
+
r: v.pipe(v.number(), v.minValue(0)),
|
|
43
|
+
region: v.optional(Id),
|
|
44
|
+
})),
|
|
45
|
+
routes: v.array(v.strictObject({
|
|
46
|
+
id: Id,
|
|
47
|
+
legs: v.pipe(v.array(Leg), v.minLength(1)),
|
|
48
|
+
})),
|
|
49
|
+
/** the entry roads to the neighbouring shards, one per edge (D67) */
|
|
50
|
+
gates: v.array(v.strictObject({ edge: v.picklist(['N', 'E', 'S', 'W']), x: v.number(), z: v.number(), to: v.optional(v.string()) })),
|
|
51
|
+
happenings: v.array(v.strictObject({ id: Id, x: v.number(), z: v.number(), signal: v.string(), seenFrom: v.array(Id) })),
|
|
52
|
+
/** traversal slots (a rope, a sled lane, a grapple point) and the views a player approaches them from */
|
|
53
|
+
slots: v.array(v.strictObject({ id: Id, kind: v.string(), x: v.number(), z: v.number(), approachViews: v.array(Id) })),
|
|
54
|
+
/** the summed estimates the budget gate checks (R28); filled by the catalog (P11) */
|
|
55
|
+
budgets: v.optional(v.strictObject({ tris: v.number(), gpuMB: v.number() })),
|
|
56
|
+
});
|
|
57
|
+
export type Spec = v.InferOutput<typeof SpecSchema>;
|
|
58
|
+
|
|
59
|
+
/** The machine block of design.md: one fenced ```json worldclaw block (R15, as amended by L1: JSON, not YAML, so the checks
|
|
60
|
+
* need no parser beyond JSON). It carries every id twin-check compares and the intent spec.json does not hold. */
|
|
61
|
+
export const MachineSchema = v.pipe(v.strictObject({
|
|
62
|
+
slug: Id,
|
|
63
|
+
/** `full`: a WorldClaw run's shard, the only kind the dispatches resume (MC47). `slice`: a director's single stage on
|
|
64
|
+
* any shard (D91; spec-check --scope slice, 06 §10.2); it has no `run` and is never resumed. */
|
|
65
|
+
scope: v.picklist(['full', 'slice']),
|
|
66
|
+
places: v.array(v.strictObject({ id: Id, role: v.picklist(ROLES), name: v.string(), beat: v.string() })),
|
|
67
|
+
happenings: v.array(v.strictObject({ id: Id, name: v.string(), seenFrom: v.array(Id) })),
|
|
68
|
+
npcs: v.array(v.strictObject({ id: Id, name: v.string(), place: Id })),
|
|
69
|
+
enemyZones: v.array(v.strictObject({ id: Id, species: v.string(), place: Id })),
|
|
70
|
+
elites: v.array(v.strictObject({ id: Id, species: v.string(), place: Id })),
|
|
71
|
+
boss: v.nullable(v.strictObject({ id: Id, name: v.string(), place: Id, summon: v.string() })),
|
|
72
|
+
/** a step at a place names it; a step between places (a crossing, a lane) has `place: null` and says where in words */
|
|
73
|
+
quest: v.array(v.strictObject({ n: v.number(), id: Id, title: v.string(), place: v.nullable(Id), where: v.optional(v.string()), gets: v.string(), mechanics: v.array(Id) })),
|
|
74
|
+
routes: v.array(v.strictObject({ id: Id, legs: v.array(v.picklist(LEG_MODES)) })),
|
|
75
|
+
gates: v.array(v.picklist(['N', 'E', 'S', 'W'])),
|
|
76
|
+
/** the session slice: place ids in play order */
|
|
77
|
+
slice: v.array(Id),
|
|
78
|
+
/** the run's state (§run's `step` is `stage`, one value); a full scope only */
|
|
79
|
+
run: v.optional(v.strictObject({ mode: v.picklist(['guided', 'zero-shot']), stage: v.string(), until: v.optional(v.string()) })),
|
|
80
|
+
}), v.check((m) => (m.scope === 'full') === (m.run !== undefined), 'a full scope has a run; a slice has none'));
|
|
81
|
+
export type Machine = v.InferOutput<typeof MachineSchema>;
|
|
82
|
+
|
|
83
|
+
/** The machine block's JSON, read from a design.md. */
|
|
84
|
+
export function machineBlock(designMd: string): unknown {
|
|
85
|
+
const m = /```json worldclaw\n([\s\S]*?)\n```/.exec(designMd);
|
|
86
|
+
if (!m?.[1]) throw new Error('design.md has no ```json worldclaw block');
|
|
87
|
+
return JSON.parse(m[1]);
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
export function parseSpec(json: unknown): Spec {
|
|
91
|
+
return v.parse(SpecSchema, json);
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
export function parseMachine(json: unknown): Machine {
|
|
95
|
+
return v.parse(MachineSchema, json);
|
|
96
|
+
}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: wildshard
|
|
3
|
+
description: The loop's order for a Wildshard shard repo (a repo with src/shard.config.ts and GUIDE.md, made by `wildshard new`), one GUIDE.md pointer per step. Use before any `wildshard` command or edit to its shard source - changing data, generators, behaviour scripts, assets or card; walking or checking it; fixing a refusal; capturing the hero; uploading to staging or production; sharing it.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# wildshard
|
|
7
|
+
|
|
8
|
+
This repo is a **shard source**. `wildshard check` builds it into one **shard file**, and `wildshard upload` sends
|
|
9
|
+
that file to a channel. `GUIDE.md` at the repo root is the author's manual: it holds each fact or names the command
|
|
10
|
+
that prints it. This skill holds only the order of the steps. A pointer `GUIDE.md#<anchor>` is the guide heading with
|
|
11
|
+
that anchor. Before your first command or edit, read the guide's opening "Words" paragraph and sections 1 and 2.
|
|
12
|
+
|
|
13
|
+
## When to reach it
|
|
14
|
+
|
|
15
|
+
Any work in this repo: load it before you run a `wildshard` command or edit the shard source.
|
|
16
|
+
|
|
17
|
+
## The loop, in order
|
|
18
|
+
|
|
19
|
+
Run each step from the project folder. Read the step's section first: it says what works today, and what to do
|
|
20
|
+
instead where a step is not built yet.
|
|
21
|
+
|
|
22
|
+
1. **new**: `wildshard new <dir>` started this repo. `GUIDE.md#1-the-loop`; every flag in `GUIDE.md#every-verb`.
|
|
23
|
+
2. **dev**: walk the shard on your machine. Not built yet (SA15): `GUIDE.md#walking-your-shard` says how to walk it
|
|
24
|
+
today, and `GUIDE.md#4-what-reloads-under-dev` how `dev` will behave. Done when you have walked it, or know which
|
|
25
|
+
way in needs the Wildshard team.
|
|
26
|
+
3. **check**: `wildshard check .` after every change. `GUIDE.md#1-the-loop`; what it measures in
|
|
27
|
+
`GUIDE.md#3-budgets`. Done when the last line reads `check pass`.
|
|
28
|
+
4. **hero**: capture a new hero after your last change to the world. `GUIDE.md#the-hero`, then step 1 of
|
|
29
|
+
`GUIDE.md#uploading`. Done at that step's "Done when".
|
|
30
|
+
5. **prepare**: commit, check again after the hero, prepare the built folder, then build its shard file.
|
|
31
|
+
`GUIDE.md#uploading` steps 2 to 4, in order. Done when each of those steps meets its "Done when".
|
|
32
|
+
6. **upload --channel staging**: `GUIDE.md#uploading` steps 5 and 6, in order; what each channel moves in
|
|
33
|
+
`GUIDE.md#5-channels-and-the-grid`. Done when upload prints the version and what moved.
|
|
34
|
+
7. **upload --channel prod**: the next version, after staging. `GUIDE.md#5-channels-and-the-grid`. Done as step 6.
|
|
35
|
+
8. **share**: the per-shard link is not built yet (SA36, SA37). `GUIDE.md#5-channels-and-the-grid` says how to share
|
|
36
|
+
today. Done when you have shared what it names.
|
|
37
|
+
|
|
38
|
+
## When a command refuses
|
|
39
|
+
|
|
40
|
+
A refusal ends with `[<rule>] fix: ... (GUIDE.md#<anchor>)`. Read that heading, under
|
|
41
|
+
`GUIDE.md#6-refusals-and-their-fixes`, make the fix it names, then run the command that refused again until it
|
|
42
|
+
passes.
|
|
43
|
+
|
|
44
|
+
## Rules
|
|
45
|
+
|
|
46
|
+
- Take every number, flag and URL from the guide, `wildshard <verb> --help` or `wildshard check . --json`, the live
|
|
47
|
+
sources; this skill carries none.
|
|
48
|
+
- Run `wildshard check .` as the loop's check: it runs build, validate and prove for you. Run `wildshard build
|
|
49
|
+
<folder>` only after prepare (`GUIDE.md#1-the-loop`).
|
|
50
|
+
- After the sdk moves to a newer version, follow `GUIDE.md#7-wildshard-update`.
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: wildshard-goldens
|
|
3
|
+
description: Refresh a Wildshard shard repo's known-good shots and proofs - the hero (the shard's three card images, stamped in hero.json) and the proof tape (proof.json, played by `wildshard check`). Use after any change to the world, before an upload, when check or upload refuses with hero-stale, hero-unchanged, proof-failed or proof-tape-invalid, or when asked to refresh the goldens, the hero or the proof.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# wildshard-goldens
|
|
7
|
+
|
|
8
|
+
A shard repo holds two known-good records of its world, both in the shard source: the **hero** (three card images,
|
|
9
|
+
stamped in `hero.json` with a hash of the shard source) and, if it has one, the **proof tape** (`proof.json`, which
|
|
10
|
+
`wildshard check .` plays headlessly). Refresh each when the world it records changed on purpose; never to quiet a
|
|
11
|
+
refusal you have not understood. `GUIDE.md` at the repo root holds the facts; a pointer `GUIDE.md#<anchor>` is the
|
|
12
|
+
guide heading with that anchor.
|
|
13
|
+
|
|
14
|
+
## When to refresh
|
|
15
|
+
|
|
16
|
+
| Record | Refresh it when | The refusal that tells you |
|
|
17
|
+
|---|---|---|
|
|
18
|
+
| Hero | After your last change to the world, before every upload: a new version needs a new hero | `GUIDE.md#hero-stale` (build), `GUIDE.md#hero-unchanged` (upload) |
|
|
19
|
+
| Proof tape | A quest, creature, item or rule the tape walks changed on purpose | `GUIDE.md#proof-failed`, `GUIDE.md#proof-tape-invalid` |
|
|
20
|
+
|
|
21
|
+
## The hero, in order
|
|
22
|
+
|
|
23
|
+
These steps need `src/manifest.json`, which `wildshard new` writes for the default template only; without it, write
|
|
24
|
+
down that the hero needs the Wildshard team.
|
|
25
|
+
|
|
26
|
+
1. **Real image files.** `manifest.json` and `data/card.json` must name the same image files inside the shard source,
|
|
27
|
+
not the `data:` card `new` wrote; change both together (`GUIDE.md#2-the-shard-source`). Done when both point at
|
|
28
|
+
files such as `card/thumb.jpg`.
|
|
29
|
+
2. **A served build carrying this exact shard source.** Today that needs an engine checkout
|
|
30
|
+
(`GUIDE.md#walking-your-shard`). Done when you have its URL, or have written down that it needs the Wildshard team.
|
|
31
|
+
3. **Capture.** `wildshard hero . --base <url>` (`GUIDE.md#the-hero`). Done when `hero.json` and the three images are
|
|
32
|
+
rewritten.
|
|
33
|
+
4. **Look at all three images** with your own eyes or the Read tool: the shard, not a loading screen, a black frame or
|
|
34
|
+
another shard. Done when each shows the current world.
|
|
35
|
+
5. **Commit** the images and `hero.json` together (`GUIDE.md#uploading` step 2), then `wildshard check .`. Done at
|
|
36
|
+
`check pass`.
|
|
37
|
+
|
|
38
|
+
`wildshard hero . --stamp-existing` stamps the images already there as current, and clears `hero-stale` after a change
|
|
39
|
+
no camera can see, once step 4 shows they match the world. Upload still refuses that hero for a new version
|
|
40
|
+
(`GUIDE.md#hero-unchanged`): capture before uploading (`GUIDE.md#every-verb`).
|
|
41
|
+
|
|
42
|
+
## The proof tape, in order
|
|
43
|
+
|
|
44
|
+
1. Run `wildshard check .` and read the refusal. `proof-tape-invalid`: fix `proof.json` where the message says, then
|
|
45
|
+
go to step 3. `proof-failed`: the message names the step that did not happen. Done when you know the rule and the
|
|
46
|
+
step.
|
|
47
|
+
2. Decide which one is wrong. If you did not mean to change what that step tests, fix the shard source, not the tape.
|
|
48
|
+
If you did, change that one step of `proof.json` to the new behaviour. Done when one of the two is edited.
|
|
49
|
+
3. Run `wildshard prove . src/proof.json` alone while you work (`GUIDE.md#every-verb`), then `wildshard check .`.
|
|
50
|
+
Done at `check pass`.
|
|
51
|
+
|
|
52
|
+
## Rules
|
|
53
|
+
|
|
54
|
+
- Stamp or edit a record only after the look in hero step 4 or the decision in proof step 2.
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: wildshard-mockup-to-model
|
|
3
|
+
description: Model one thing (a prop, building, rock, plant or creature) for a Wildshard shard repo from a reference image or mockup, in code or in Blender, into the shard source. Use when asked to model, add or replace a prop, building or creature, or to turn a picture into a model.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# wildshard-mockup-to-model
|
|
7
|
+
|
|
8
|
+
One model, from a picture to a model the shard source uses and `wildshard check .` passes. `GUIDE.md` at the repo root
|
|
9
|
+
holds the facts; this skill holds the order. A pointer `GUIDE.md#<anchor>` is the guide heading with that anchor.
|
|
10
|
+
Read `GUIDE.md#2-the-shard-source` before your first edit: it says what ships in the shard file and what never does.
|
|
11
|
+
|
|
12
|
+
## The steps, in order
|
|
13
|
+
|
|
14
|
+
1. **The reference.** One object alone on a plain background, three-quarter view, whole and unoccluded; add a front
|
|
15
|
+
and a side view when proportions matter. Keep the image and any mockup outside the shard source, in a folder of
|
|
16
|
+
your own such as `blender/` or `art/`: they never ship (`GUIDE.md#2-the-shard-source`). Done when the reference is
|
|
17
|
+
saved there.
|
|
18
|
+
2. **The detail list and the numbers.** Beside the reference, write a short README: the details that make the thing
|
|
19
|
+
recognisable (silhouette, bands, marks, colour zones), numbered; its height and footprint in metres; how many copies
|
|
20
|
+
the world places; what it collides with. Give the model its own space: metres, +Y up, pivot at the centre of its
|
|
21
|
+
foot on y = 0, front toward +Z. Done when every detail has a number and the README has the sizes.
|
|
22
|
+
3. **Pick one way to build it.**
|
|
23
|
+
- **Code:** a generator in `generators/` that builds the mesh at build time. Pick it when the shape follows numbers
|
|
24
|
+
or data (stairs, fences, a row of posts), or changes often. Generators run only at build time and must not import
|
|
25
|
+
runtime code (`GUIDE.md#lint-no-runtime-in-build`). A `--template blender` repo has no generators: use Blender.
|
|
26
|
+
- **Blender:** model it by hand or with a Blender script, keep the `.blend` or script in `blender/`, and export a
|
|
27
|
+
GLB. Pick it for an organic shape, a UV unwrap, a baked texture or a bevel.
|
|
28
|
+
- **An image-to-3D tool or a CC0 model** you are licensed to use: treat its GLB as the Blender path's export.
|
|
29
|
+
Done when you have named the way in the README.
|
|
30
|
+
4. **Build it** to the README's numbers, then look at it beside the reference, detail by detail. Place each detail on
|
|
31
|
+
a real part of the mesh, or drop it. Done when every numbered detail is placed or dropped.
|
|
32
|
+
5. **Into the shard source.**
|
|
33
|
+
- **Code:** import the generator from `generators/generate.ts` (the reference world's props come in through
|
|
34
|
+
`generators/props.ts`) or from `shard.config.ts`; a file nothing imports never runs.
|
|
35
|
+
- **A GLB:** copy it into `assets/` named by its SHA-256 (`shasum -a 256 model.glb`), with no extension. Find every
|
|
36
|
+
file that names the old hash (`grep -rl <old-hash> src`) and change each to the new one; delete the old file when
|
|
37
|
+
nothing names it. A creature's GLB is named in `data/skins.json` and its skin file together with measured sizes:
|
|
38
|
+
replacing one needs the Wildshard team today. If nothing names a model of its kind yet, ask the Wildshard team
|
|
39
|
+
how it is loaded; the guide does not say yet.
|
|
40
|
+
- **The `--template blender` repo:** the GLB goes in `blobs/glb/` as `<sha256>.glb`, and every `sections/` row that
|
|
41
|
+
names it changes to match; `wildshard check .` settles the sizes (`GUIDE.md#2-the-shard-source`).
|
|
42
|
+
Done when `git status` shows the new file and the changed rows or imports.
|
|
43
|
+
6. **Check.** `wildshard check .` (`GUIDE.md#1-the-loop`). The report card measures draws, triangles, memory and
|
|
44
|
+
download against their limits (`GUIDE.md#3-budgets`); a refusal names its fix, for example
|
|
45
|
+
`GUIDE.md#budget-triangles` or `GUIDE.md#budget-download`. Done when the last line reads `check pass`.
|
|
46
|
+
7. **See it in the world.** Walk the shard where the model stands (`GUIDE.md#walking-your-shard`). Done when you have
|
|
47
|
+
seen it there, or written down that walking needs the Wildshard team today.
|
|
48
|
+
8. **The hero.** The world changed, so before the next upload follow the `wildshard-goldens` skill
|
|
49
|
+
(`GUIDE.md#the-hero`). Done when that skill's hero steps are done, or you have written down that this repo has no
|
|
50
|
+
`manifest.json` card to capture.
|
|
51
|
+
|
|
52
|
+
## Rules
|
|
53
|
+
|
|
54
|
+
- A model is one thing. A place (a camp, a field) is several models placed by the shard's data: split it first.
|
|
55
|
+
- Seed every random choice in a generator, so the same shard source builds the same shard file twice.
|
|
56
|
+
- Take every limit and number from the guide or `wildshard check . --json`; this skill carries none.
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: wildshard-upgrade
|
|
3
|
+
description: Move a Wildshard shard repo to a newer @wildshard/sdk - its pins in package.json, GUIDE.md and the wildshard skills - then build and fix the refusals. Use when asked to upgrade the sdk or its pins, or when `wildshard --version` is older than the release you need.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# wildshard-upgrade
|
|
7
|
+
|
|
8
|
+
`package.json` pins `@wildshard/sdk`, `@wildshard/format`, `@wildshard/engine` and `three` exactly; a `--template
|
|
9
|
+
blender` repo pins only the first two, as dev dependencies (`GUIDE.md#2-the-shard-source`). Moving to a newer sdk
|
|
10
|
+
moves every pin together, then the shard source must build again on them. `GUIDE.md` at the repo root holds the
|
|
11
|
+
facts; a pointer `GUIDE.md#<anchor>` is the guide heading with that anchor.
|
|
12
|
+
|
|
13
|
+
**`wildshard update --pins` is not built yet (SA18).** It will move the pins, install, apply the release's code
|
|
14
|
+
changes, rewrite the guide and skills, and run the build (`GUIDE.md#7-wildshard-update`). Until it is built, do the
|
|
15
|
+
steps below by hand.
|
|
16
|
+
|
|
17
|
+
## The steps, in order
|
|
18
|
+
|
|
19
|
+
1. **Start clean.** Commit your own changes, then `wildshard check .` on the old pins; if it fails, fix that first.
|
|
20
|
+
Done when `git status` is clean and check passes, so any later refusal is the upgrade's.
|
|
21
|
+
2. **Read the new pins** from the newer sdk's own `package.json`: its `version` is the `@wildshard/sdk` pin, and its
|
|
22
|
+
`dependencies` hold the `@wildshard/engine`, `@wildshard/format` and `three` specs (engine and format are
|
|
23
|
+
`github:` specs, not numbers). Today the sdk runs from a sharddev checkout, not npm (the guide's opening "Running
|
|
24
|
+
`wildshard` today", `GUIDE.md#the-shard-authors-guide`). Done when you have each spec, copied verbatim.
|
|
25
|
+
3. **Edit the pins** in this repo's `package.json` to those exact specs: no `^`, no `~`. Done when every pin matches.
|
|
26
|
+
4. **Install:** `pnpm install`. A dependency's install script runs only if `pnpm-workspace.yaml` lists it
|
|
27
|
+
(`GUIDE.md#2-the-shard-source`). Done when install exits 0 and `pnpm-lock.yaml` changed.
|
|
28
|
+
5. **Refresh the guide and skills** with the new sdk's CLI (point the `wildshard` alias at the newer checkout, or
|
|
29
|
+
`pnpm exec wildshard` after step 4): `wildshard update`. It rewrites `GUIDE.md` and the four skills in
|
|
30
|
+
`.claude/skills/`, adds any agent file the repo lacks, and keeps an `AGENTS.md` you changed
|
|
31
|
+
(`GUIDE.md#7-wildshard-update`). Then reread this skill: the new copy may differ. Done when update's first line
|
|
32
|
+
names the new sdk version and `git status` shows only those files and the step 3 and 4 files.
|
|
33
|
+
6. **Build:** `wildshard check .` (`GUIDE.md#1-the-loop`). Done when `wildshard --version` prints the new sdk
|
|
34
|
+
version and the last line reads `check pass`.
|
|
35
|
+
7. **Read each refusal.** It ends `[<rule>] fix: ... (GUIDE.md#<anchor>)`: read that heading under
|
|
36
|
+
`GUIDE.md#6-refusals-and-their-fixes`, in the guide update wrote in step 5, make the fix, and run check again. A
|
|
37
|
+
budget can tighten between releases (`GUIDE.md#3-budgets`); a lint rule can be new. Done at `check pass`.
|
|
38
|
+
8. **Commit** the pins, the lock file, the guide, the skills, any agent file update added and your fixes together.
|
|
39
|
+
Done when `git status` is clean.
|
|
40
|
+
A new sdk can change what the shard looks like, so before the next upload follow the `wildshard-goldens` skill.
|
|
41
|
+
|
|
42
|
+
## Rules
|
|
43
|
+
|
|
44
|
+
- Move the pins together, never one alone: the sdk is built and tested against the others it names.
|
|
45
|
+
- Fix the shard source to the new rules; do not pin an older piece to dodge a refusal.
|
|
46
|
+
- If check fails on a shard source you did not change and the refusal's fix does not apply, go back to the old pins
|
|
47
|
+
and report the message.
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "./node_modules/oxfmt/configuration_schema.json",
|
|
3
|
+
"printWidth": 80,
|
|
4
|
+
"tabWidth": 2,
|
|
5
|
+
"useTabs": false,
|
|
6
|
+
"semi": false,
|
|
7
|
+
"singleQuote": true,
|
|
8
|
+
"jsxSingleQuote": true,
|
|
9
|
+
"trailingComma": "all",
|
|
10
|
+
"arrowParens": "avoid",
|
|
11
|
+
"endOfLine": "lf",
|
|
12
|
+
"insertFinalNewline": true,
|
|
13
|
+
"bracketSpacing": true,
|
|
14
|
+
"sortPackageJson": false,
|
|
15
|
+
"sortImports": {
|
|
16
|
+
"groups": [
|
|
17
|
+
"builtin",
|
|
18
|
+
"external",
|
|
19
|
+
"internal",
|
|
20
|
+
["parent", "sibling", "index"],
|
|
21
|
+
[
|
|
22
|
+
"type-external",
|
|
23
|
+
"type-internal",
|
|
24
|
+
"type-parent",
|
|
25
|
+
"type-sibling",
|
|
26
|
+
"type-index"
|
|
27
|
+
]
|
|
28
|
+
],
|
|
29
|
+
"newlinesBetween": true
|
|
30
|
+
},
|
|
31
|
+
"ignorePatterns": [
|
|
32
|
+
// Plain-JS repo scripts, outside the TS project; covered by
|
|
33
|
+
// `pnpm test:hooks` instead. (.githooks/ sits outside src/.)
|
|
34
|
+
"scripts/**",
|
|
35
|
+
"dist/**",
|
|
36
|
+
"node_modules/**",
|
|
37
|
+
"test-results/**",
|
|
38
|
+
"playwright-report/**",
|
|
39
|
+
"pnpm-lock.yaml",
|
|
40
|
+
// A real built product: its JSON is canonical, byte for byte.
|
|
41
|
+
"test/fixtures/**",
|
|
42
|
+
"**/*.md"
|
|
43
|
+
],
|
|
44
|
+
"overrides": [
|
|
45
|
+
{
|
|
46
|
+
"files": ["*.json", "*.jsonc"],
|
|
47
|
+
"options": { "trailingComma": "none" }
|
|
48
|
+
}
|
|
49
|
+
]
|
|
50
|
+
}
|
|
@@ -0,0 +1,173 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "./node_modules/oxlint/configuration_schema.json",
|
|
3
|
+
"plugins": [
|
|
4
|
+
"typescript",
|
|
5
|
+
"unicorn",
|
|
6
|
+
"oxc",
|
|
7
|
+
"import",
|
|
8
|
+
"promise",
|
|
9
|
+
"node",
|
|
10
|
+
"react",
|
|
11
|
+
"react-perf",
|
|
12
|
+
"jsx-a11y"
|
|
13
|
+
],
|
|
14
|
+
// Strictest of greenroom (every category denied) and wildshard-singleplayer
|
|
15
|
+
// (these options, and import/no-nodejs-modules outside Node-side folders).
|
|
16
|
+
"options": {
|
|
17
|
+
"typeAware": true,
|
|
18
|
+
"denyWarnings": true,
|
|
19
|
+
"reportUnusedDisableDirectives": "error"
|
|
20
|
+
},
|
|
21
|
+
"categories": {
|
|
22
|
+
"correctness": "deny",
|
|
23
|
+
"suspicious": "deny",
|
|
24
|
+
"pedantic": "deny",
|
|
25
|
+
"perf": "deny",
|
|
26
|
+
"style": "deny",
|
|
27
|
+
"restriction": "deny",
|
|
28
|
+
"nursery": "deny"
|
|
29
|
+
},
|
|
30
|
+
"ignorePatterns": [
|
|
31
|
+
// Plain-JS repo scripts, outside the TS project; covered by
|
|
32
|
+
// `pnpm test:hooks` instead. (.githooks/ sits outside src/.)
|
|
33
|
+
"scripts/**",
|
|
34
|
+
"dist/**",
|
|
35
|
+
"node_modules/**",
|
|
36
|
+
"test-results/**",
|
|
37
|
+
"playwright-report/**",
|
|
38
|
+
"test/fixtures/**"
|
|
39
|
+
],
|
|
40
|
+
"rules": {
|
|
41
|
+
"typescript/explicit-function-return-type": [
|
|
42
|
+
"deny",
|
|
43
|
+
{
|
|
44
|
+
"allowExpressions": false,
|
|
45
|
+
"allowTypedFunctionExpressions": false,
|
|
46
|
+
"allowHigherOrderFunctions": false,
|
|
47
|
+
"allowDirectConstAssertionInArrowFunctions": false,
|
|
48
|
+
"allowConciseArrowFunctionExpressionsStartingWithVoid": false,
|
|
49
|
+
"allowFunctionsWithoutTypeParameters": false,
|
|
50
|
+
"allowIIFEs": false
|
|
51
|
+
}
|
|
52
|
+
],
|
|
53
|
+
"typescript/explicit-module-boundary-types": [
|
|
54
|
+
"deny",
|
|
55
|
+
{
|
|
56
|
+
"allowArgumentsExplicitlyTypedAsAny": false,
|
|
57
|
+
"allowDirectConstAssertionInArrowFunctions": false,
|
|
58
|
+
"allowHigherOrderFunctions": false,
|
|
59
|
+
"allowTypedFunctionExpressions": false
|
|
60
|
+
}
|
|
61
|
+
],
|
|
62
|
+
"typescript/no-floating-promises": [
|
|
63
|
+
"deny",
|
|
64
|
+
{
|
|
65
|
+
"allowForKnownSafeCalls": [
|
|
66
|
+
{
|
|
67
|
+
"from": "package",
|
|
68
|
+
"package": "node:test",
|
|
69
|
+
"name": ["describe", "it", "suite", "test"]
|
|
70
|
+
}
|
|
71
|
+
]
|
|
72
|
+
}
|
|
73
|
+
],
|
|
74
|
+
"typescript/prefer-readonly-parameter-types": [
|
|
75
|
+
"deny",
|
|
76
|
+
{
|
|
77
|
+
"treatMethodsAsReadonly": true,
|
|
78
|
+
// Framework objects that are mutable by design and only ever passed in.
|
|
79
|
+
"allow": [
|
|
80
|
+
{ "from": "package", "package": "hono", "name": "Context" },
|
|
81
|
+
{ "from": "package", "package": "node:test", "name": "TestContext" },
|
|
82
|
+
{
|
|
83
|
+
"from": "package",
|
|
84
|
+
"package": "http",
|
|
85
|
+
"name": ["IncomingMessage", "ServerResponse"]
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
"from": "package",
|
|
89
|
+
"package": "playwright",
|
|
90
|
+
"name": [
|
|
91
|
+
"PlaywrightTestArgs",
|
|
92
|
+
"PlaywrightTestOptions",
|
|
93
|
+
"PlaywrightWorkerArgs",
|
|
94
|
+
"PlaywrightWorkerOptions"
|
|
95
|
+
]
|
|
96
|
+
}
|
|
97
|
+
]
|
|
98
|
+
}
|
|
99
|
+
],
|
|
100
|
+
"eslint/func-style": [
|
|
101
|
+
"deny",
|
|
102
|
+
"declaration",
|
|
103
|
+
{ "allowArrowFunctions": true }
|
|
104
|
+
],
|
|
105
|
+
"eslint/no-duplicate-imports": [
|
|
106
|
+
"deny",
|
|
107
|
+
{ "allowSeparateTypeImports": true }
|
|
108
|
+
],
|
|
109
|
+
// `return await` everywhere keeps stack traces and squares require-await with promise-function-async.
|
|
110
|
+
"typescript/return-await": ["deny", "always"],
|
|
111
|
+
// `void promise` is the marker no-floating-promises asks for.
|
|
112
|
+
"eslint/no-void": ["deny", { "allowAsStatement": true }],
|
|
113
|
+
// Continuation lines of a multi-line comment start mid-sentence.
|
|
114
|
+
"eslint/capitalized-comments": [
|
|
115
|
+
"deny",
|
|
116
|
+
"always",
|
|
117
|
+
{ "ignoreConsecutiveComments": true }
|
|
118
|
+
],
|
|
119
|
+
"react/jsx-filename-extension": ["deny", { "extensions": [".tsx"] }],
|
|
120
|
+
|
|
121
|
+
// Disabled: each contradicts another rule or fights the stack.
|
|
122
|
+
"eslint/sort-imports": "off", // oxfmt's sortImports owns import order; two sorters fight
|
|
123
|
+
"eslint/sort-keys": "off", // key order carries meaning (schemas, options); not autofixable
|
|
124
|
+
"eslint/one-var": "off", // one binding per declaration is how oxfmt lays code out
|
|
125
|
+
"eslint/no-undef": "off", // tsc reports undefined names; this misreads type-only globals
|
|
126
|
+
"eslint/no-undefined": "off", // contradicts unicorn/no-null; undefined is the absent value
|
|
127
|
+
"eslint/no-ternary": "off", // JSX conditional rendering needs it; no-nested-ternary stays on
|
|
128
|
+
"import/no-named-export": "off", // contradicts import/no-default-export; named exports win
|
|
129
|
+
"import/prefer-default-export": "off", // contradicts import/no-default-export
|
|
130
|
+
"import/no-relative-parent-imports": "off", // #subpath imports break the tsc build's extension rewrite
|
|
131
|
+
"node/no-top-level-await": "off", // contradicts unicorn/prefer-top-level-await; ESM-only, never require()d
|
|
132
|
+
"oxc/no-async-await": "off", // contradicts typescript/promise-function-async and require-await
|
|
133
|
+
"oxc/no-optional-chaining": "off", // contradicts typescript/prefer-optional-chain
|
|
134
|
+
"oxc/no-rest-spread-properties": "off", // ES5-compat ban; target is es2024
|
|
135
|
+
"react/react-in-jsx-scope": "off", // contradicts the react-jsx automatic runtime
|
|
136
|
+
"react/jsx-no-literals": "off" // i18n-only rule; no translations yet
|
|
137
|
+
},
|
|
138
|
+
"overrides": [
|
|
139
|
+
{
|
|
140
|
+
// Node programs may import node: modules; everything else (shared, client,
|
|
141
|
+
// web code) may not, as in wildshard-singleplayer.
|
|
142
|
+
"files": [
|
|
143
|
+
"cli/**",
|
|
144
|
+
"server/**",
|
|
145
|
+
"tools/**",
|
|
146
|
+
"test/**",
|
|
147
|
+
"e2e/**",
|
|
148
|
+
"cook/**",
|
|
149
|
+
"**/*.test.ts",
|
|
150
|
+
"*.config.ts",
|
|
151
|
+
"**/*.config.ts"
|
|
152
|
+
],
|
|
153
|
+
"rules": {
|
|
154
|
+
"import/no-nodejs-modules": "off"
|
|
155
|
+
}
|
|
156
|
+
},
|
|
157
|
+
{
|
|
158
|
+
"files": ["*.config.ts", "**/*.config.ts"],
|
|
159
|
+
"rules": {
|
|
160
|
+
"import/no-default-export": "off", // playwright loads the default export
|
|
161
|
+
"node/no-process-env": "off" // config reads CI from the environment
|
|
162
|
+
}
|
|
163
|
+
},
|
|
164
|
+
{
|
|
165
|
+
"files": ["**/*.test.ts", "test/**", "e2e/**"],
|
|
166
|
+
"rules": {
|
|
167
|
+
"eslint/no-magic-numbers": "off", // assertions compare against literal expected values
|
|
168
|
+
"node/no-sync": "off", // test fixtures set up git repos synchronously
|
|
169
|
+
"node/no-process-env": "off" // the git helper isolates git from the developer's env
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
]
|
|
173
|
+
}
|