@craft_eco/craft-mcp 0.1.22 → 0.1.26

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (614) hide show
  1. package/README.md +28 -7
  2. package/bin/craft-mcp.mjs +10 -2
  3. package/dist-server/game-workflow/bundle-files.mjs +43 -0
  4. package/dist-server/game-workflow/engines.mjs +13 -6
  5. package/dist-server/game-workflow/project-bundles.mjs +90 -0
  6. package/dist-server/game-workflow/project-context.mjs +91 -0
  7. package/dist-server/game-workflow/projects.mjs +16 -4
  8. package/dist-server/integrations/config.mjs +71 -0
  9. package/dist-server/integrations/files.mjs +54 -0
  10. package/dist-server/integrations/hosts.mjs +30 -0
  11. package/dist-server/integrations/install.mjs +86 -0
  12. package/dist-server/integrations/runtime.mjs +71 -0
  13. package/dist-server/mcp/server.mjs +13 -9
  14. package/dist-server/preview/preview-launcher.mjs +9 -2
  15. package/dist-server/preview/preview-start.mjs +2 -2
  16. package/package.json +10 -1
  17. package/resources/craft-create/SKILL.md +14 -0
  18. package/resources/craft-game-maker/SKILL.md +77 -71
  19. package/resources/craft-game-maker/js.md +10 -10
  20. package/resources/craft-game-maker/js3d.md +13 -13
  21. package/resources/game_visual_qa.mjs +1149 -1149
  22. package/resources/js/bundle.json +93 -0
  23. package/resources/js/context/AGENTS.md +15 -102
  24. package/resources/js/context/knowledge/AigcWiring.md +5 -196
  25. package/resources/js/context/knowledge/AssetUrl.md +5 -20
  26. package/resources/js/context/knowledge/Layout.md +7 -0
  27. package/resources/js/context/knowledge/Lifecycle.md +6 -27
  28. package/resources/js/context/skills/aigc-generate/SKILL.md +6 -141
  29. package/resources/js/context/skills/asset-search/SKILL.md +5 -62
  30. package/resources/js/context/skills/asset-search/references/resource-config.md +9 -0
  31. package/resources/js/context/skills/export-config/SKILL.md +7 -19
  32. package/resources/js/context/skills/export-config/scripts/export-config.mjs +3 -45
  33. package/resources/js/context/skills/index.json +30 -0
  34. package/resources/js/context/skills/visual-qa/SKILL.md +6 -28
  35. package/resources/js/project/README.md +4 -96
  36. package/resources/js/project/package.json +1 -2
  37. package/resources/js/project/scripts/config-export/panel-resource-path.mjs +106 -0
  38. package/resources/js/{context/skills/export-config/scripts → project/scripts/config-export}/sync-asset-controls.mjs +1 -37
  39. package/resources/js/project/scripts/config-export.mjs +10 -34
  40. package/resources/js3d/bundle.json +104 -0
  41. package/resources/js3d/context/AGENTS.md +16 -85
  42. package/resources/js3d/context/knowledge/AigcWiring.md +9 -0
  43. package/resources/js3d/context/knowledge/AssetUrl.md +9 -0
  44. package/resources/js3d/context/knowledge/CodingGuide/Pitfalls.md +9 -67
  45. package/resources/js3d/context/knowledge/Layout.md +7 -0
  46. package/resources/js3d/context/knowledge/Runtime.md +5 -30
  47. package/resources/js3d/context/skills/aigc-integration/SKILL.md +6 -164
  48. package/resources/js3d/context/skills/asset-search/SKILL.md +5 -171
  49. package/resources/js3d/context/skills/asset-search/references/resource-config.md +6 -94
  50. package/resources/js3d/context/skills/asset-usage-audit/SKILL.md +6 -82
  51. package/resources/js3d/context/skills/export-config/SKILL.md +7 -11
  52. package/resources/js3d/context/skills/export-config/scripts/export-config.mjs +3 -55
  53. package/resources/js3d/context/skills/index.json +42 -0
  54. package/resources/js3d/context/skills/performance-audit/SKILL.md +8 -153
  55. package/resources/js3d/context/skills/visual-qa/SKILL.md +14 -0
  56. package/resources/js3d/project/README.md +4 -103
  57. package/resources/js3d/project/package.json +1 -2
  58. package/resources/js3d/project/scripts/config-export/panel-resource-path.mjs +106 -0
  59. package/resources/js3d/{context/skills/export-config/scripts → project/scripts/config-export}/sync-scene-assets.mjs +3 -28
  60. package/resources/js3d/project/scripts/config-export.mjs +12 -34
  61. package/vendor/agent-cli/dist/src/artifacts/build-failure.d.ts +8 -0
  62. package/vendor/agent-cli/dist/src/artifacts/build-failure.d.ts.map +1 -0
  63. package/vendor/agent-cli/dist/src/artifacts/build-failure.js +39 -0
  64. package/vendor/agent-cli/dist/src/artifacts/build-failure.js.map +1 -0
  65. package/vendor/agent-cli/dist/src/artifacts/dependency-toolchain.d.ts +5 -0
  66. package/vendor/agent-cli/dist/src/artifacts/dependency-toolchain.d.ts.map +1 -0
  67. package/vendor/agent-cli/dist/src/artifacts/dependency-toolchain.js +45 -0
  68. package/vendor/agent-cli/dist/src/artifacts/dependency-toolchain.js.map +1 -0
  69. package/vendor/agent-cli/dist/src/artifacts/preinstalled-dependencies.d.ts.map +1 -1
  70. package/vendor/agent-cli/dist/src/artifacts/preinstalled-dependencies.js +71 -6
  71. package/vendor/agent-cli/dist/src/artifacts/preinstalled-dependencies.js.map +1 -1
  72. package/vendor/agent-cli/dist/src/artifacts/prepare.d.ts +2 -0
  73. package/vendor/agent-cli/dist/src/artifacts/prepare.d.ts.map +1 -1
  74. package/vendor/agent-cli/dist/src/artifacts/prepare.js +7 -2
  75. package/vendor/agent-cli/dist/src/artifacts/prepare.js.map +1 -1
  76. package/vendor/agent-cli/dist/src/artifacts/process-artifacts.d.ts +2 -0
  77. package/vendor/agent-cli/dist/src/artifacts/process-artifacts.d.ts.map +1 -1
  78. package/vendor/agent-cli/dist/src/artifacts/process-artifacts.js +27 -16
  79. package/vendor/agent-cli/dist/src/artifacts/process-artifacts.js.map +1 -1
  80. package/vendor/agent-cli/dist/src/artifacts/scene-asset-references.d.ts +14 -0
  81. package/vendor/agent-cli/dist/src/artifacts/scene-asset-references.d.ts.map +1 -0
  82. package/vendor/agent-cli/dist/src/artifacts/scene-asset-references.js +119 -0
  83. package/vendor/agent-cli/dist/src/artifacts/scene-asset-references.js.map +1 -0
  84. package/vendor/agent-cli/dist/src/artifacts/static.d.ts.map +1 -1
  85. package/vendor/agent-cli/dist/src/artifacts/static.js +20 -6
  86. package/vendor/agent-cli/dist/src/artifacts/static.js.map +1 -1
  87. package/vendor/agent-cli/dist/src/cli/process-protocol.d.ts.map +1 -1
  88. package/vendor/agent-cli/dist/src/cli/process-protocol.js +24 -2
  89. package/vendor/agent-cli/dist/src/cli/process-protocol.js.map +1 -1
  90. package/vendor/agent-cli/dist/src/cli/process-steering.d.ts +21 -0
  91. package/vendor/agent-cli/dist/src/cli/process-steering.d.ts.map +1 -0
  92. package/vendor/agent-cli/dist/src/cli/process-steering.js +66 -0
  93. package/vendor/agent-cli/dist/src/cli/process-steering.js.map +1 -0
  94. package/vendor/agent-cli/dist/src/context/user-skill-bundle.js +1 -1
  95. package/vendor/agent-cli/dist/src/context/user-skill-bundle.js.map +1 -1
  96. package/vendor/agent-cli/dist/src/index.d.ts +4 -1
  97. package/vendor/agent-cli/dist/src/index.d.ts.map +1 -1
  98. package/vendor/agent-cli/dist/src/index.js +3 -0
  99. package/vendor/agent-cli/dist/src/index.js.map +1 -1
  100. package/vendor/agent-cli/dist/src/protocol/messages/messages.gen.d.ts +31 -1
  101. package/vendor/agent-cli/dist/src/protocol/messages/messages.gen.d.ts.map +1 -1
  102. package/vendor/agent-cli/dist/src/protocol/messages/messages.gen.js +19 -1
  103. package/vendor/agent-cli/dist/src/protocol/messages/messages.gen.js.map +1 -1
  104. package/vendor/agent-cli/dist/src/session/client.d.ts +10 -0
  105. package/vendor/agent-cli/dist/src/session/client.d.ts.map +1 -1
  106. package/vendor/agent-cli/dist/src/session/client.js +16 -5
  107. package/vendor/agent-cli/dist/src/session/client.js.map +1 -1
  108. package/vendor/agent-cli/dist/src/session/link-session.d.ts +3 -0
  109. package/vendor/agent-cli/dist/src/session/link-session.d.ts.map +1 -1
  110. package/vendor/agent-cli/dist/src/session/link-session.js +17 -1
  111. package/vendor/agent-cli/dist/src/session/link-session.js.map +1 -1
  112. package/vendor/agent-cli/dist/src/session/process-observability.d.ts +3 -0
  113. package/vendor/agent-cli/dist/src/session/process-observability.d.ts.map +1 -1
  114. package/vendor/agent-cli/dist/src/session/process-observability.js +11 -0
  115. package/vendor/agent-cli/dist/src/session/process-observability.js.map +1 -1
  116. package/vendor/agent-cli/dist/src/session/process-request.d.ts +3 -2
  117. package/vendor/agent-cli/dist/src/session/process-request.d.ts.map +1 -1
  118. package/vendor/agent-cli/dist/src/session/process-request.js +27 -9
  119. package/vendor/agent-cli/dist/src/session/process-request.js.map +1 -1
  120. package/vendor/agent-cli/dist/src/session/run-start-body.d.ts +2 -0
  121. package/vendor/agent-cli/dist/src/session/run-start-body.d.ts.map +1 -1
  122. package/vendor/agent-cli/dist/src/session/run-start-body.js +9 -3
  123. package/vendor/agent-cli/dist/src/session/run-start-body.js.map +1 -1
  124. package/vendor/agent-cli/dist/src/session/run-steer.d.ts +42 -0
  125. package/vendor/agent-cli/dist/src/session/run-steer.d.ts.map +1 -0
  126. package/vendor/agent-cli/dist/src/session/run-steer.js +205 -0
  127. package/vendor/agent-cli/dist/src/session/run-steer.js.map +1 -0
  128. package/vendor/agent-cli/dist/src/shared/types.d.ts +10 -0
  129. package/vendor/agent-cli/dist/src/shared/types.d.ts.map +1 -1
  130. package/vendor/agent-cli/dist/src/tools/context-program-receipt.d.ts +21 -0
  131. package/vendor/agent-cli/dist/src/tools/context-program-receipt.d.ts.map +1 -0
  132. package/vendor/agent-cli/dist/src/tools/context-program-receipt.js +102 -0
  133. package/vendor/agent-cli/dist/src/tools/context-program-receipt.js.map +1 -0
  134. package/vendor/agent-cli/dist/src/tools/context-program.d.ts.map +1 -1
  135. package/vendor/agent-cli/dist/src/tools/context-program.js +3 -0
  136. package/vendor/agent-cli/dist/src/tools/context-program.js.map +1 -1
  137. package/resources/js/context/.role/AGENTS_DESIGN.md +0 -9
  138. package/resources/js/context/agents/aigc-asset.md +0 -168
  139. package/resources/js/context/knowledge/AigcEnabled.md +0 -49
  140. package/resources/js/context/knowledge/FrontendComponents.md +0 -17
  141. package/resources/js/context/knowledge/MobileAdaptation.md +0 -73
  142. package/resources/js/context/knowledge/MobileAdapted.md +0 -36
  143. package/resources/js/context/knowledge/Multiplayer/GameplaySystemKnowledge.md +0 -114
  144. package/resources/js/context/knowledge/Multiplayer/OverviewKnowledge.md +0 -115
  145. package/resources/js/context/knowledge/Multiplayer/StateSyncKnowledge.md +0 -392
  146. package/resources/js/context/knowledge/PlatformServices.md +0 -190
  147. package/resources/js/context/knowledge/ProjectDisplayConfig.md +0 -35
  148. package/resources/js/context/knowledge/Subsystems/Optional/MultiplayerManagerKnowledge.md +0 -242
  149. package/resources/js/context/knowledge/Ui.md +0 -11
  150. package/resources/js/context/knowledge/UiEditorCompat.md +0 -21
  151. package/resources/js/context/rules/MultiplayerCapability.md +0 -23
  152. package/resources/js/context/rules/MultiplayerRoomEntryUX.md +0 -63
  153. package/resources/js/context/rules/PlatformBoundaryModules.md +0 -44
  154. package/resources/js/context/rules/preview_ready.md +0 -8
  155. package/resources/js/context/skills/aigc-generate/knowledge/audio.md +0 -39
  156. package/resources/js/context/skills/aigc-generate/knowledge/batch-replace.md +0 -26
  157. package/resources/js/context/skills/aigc-generate/knowledge/character2d.md +0 -132
  158. package/resources/js/context/skills/aigc-generate/knowledge/non-stepwise-aigc.md +0 -53
  159. package/resources/js/context/skills/aigc-generate/knowledge/texture-prop.md +0 -52
  160. package/resources/js/context/skills/aigc-generate/knowledge/texture-scene.md +0 -191
  161. package/resources/js/context/skills/aigc-generate/knowledge/texture-ui.md +0 -55
  162. package/resources/js/context/skills/asset-search/scripts/asset_display.mjs +0 -62
  163. package/resources/js/context/skills/asset-search/scripts/config.json +0 -5
  164. package/resources/js/context/skills/asset-search/scripts/provided_assets.mjs +0 -125
  165. package/resources/js/context/skills/asset-search/scripts/search.mjs +0 -760
  166. package/resources/js/context/skills/asset-search/scripts/sprite_source_materializer.mjs +0 -657
  167. package/resources/js/context/skills/asset-search/strategies/anim2d.md +0 -42
  168. package/resources/js/context/skills/asset-search/strategies/audio.md +0 -34
  169. package/resources/js/context/skills/asset-search/strategies/effect2d.md +0 -31
  170. package/resources/js/context/skills/asset-search/strategies/texture-prop.md +0 -22
  171. package/resources/js/context/skills/asset-search/strategies/ui-common.md +0 -40
  172. package/resources/js/context/skills/asset-search/strategies/ui-style.md +0 -28
  173. package/resources/js/context/skills/export-config/scripts/translate-asset-titles.mjs +0 -161
  174. package/resources/js/context/skills/lightgame-runtime-adapt/SKILL.md +0 -93
  175. package/resources/js/context/skills/lightgame-runtime-adapt/project/game-runtime.json +0 -7
  176. package/resources/js/context/skills/lightgame-runtime-adapt/project/package.json +0 -22
  177. package/resources/js/context/skills/lightgame-runtime-adapt/project/runtime/lightgame/1.1.0/platform/identity/qq-ai-game-sdk.min.js +0 -5
  178. package/resources/js/context/skills/lightgame-runtime-adapt/project/runtime/lightgame/1.1.0/platform/identity/qq-session.mjs +0 -208
  179. package/resources/js/context/skills/lightgame-runtime-adapt/project/runtime/lightgame/1.1.0/platform/identity/shared.mjs +0 -37
  180. package/resources/js/context/skills/lightgame-runtime-adapt/project/runtime/lightgame/1.1.0/platform/platform-capture-video.mjs +0 -227
  181. package/resources/js/context/skills/lightgame-runtime-adapt/project/runtime/lightgame/1.1.0/platform/platform-service.d.mts +0 -31
  182. package/resources/js/context/skills/lightgame-runtime-adapt/project/runtime/lightgame/1.1.0/platform/platform-service.mjs +0 -272
  183. package/resources/js/context/skills/lightgame-runtime-adapt/project/runtime/lightgame/1.1.0/platform/platform.d.mts +0 -79
  184. package/resources/js/context/skills/lightgame-runtime-adapt/project/runtime/lightgame/1.1.0/platform/platform.mjs +0 -29
  185. package/resources/js/context/skills/lightgame-runtime-adapt/project/runtime/lightgame/1.1.0/release.json +0 -22
  186. package/resources/js/context/skills/lightgame-runtime-adapt/project/runtime/lightgame/1.1.0/tooling/cli.mjs +0 -16
  187. package/resources/js/context/skills/lightgame-runtime-adapt/project/runtime/lightgame/1.1.0/tooling/project.d.mts +0 -4
  188. package/resources/js/context/skills/lightgame-runtime-adapt/project/runtime/lightgame/1.1.0/tooling/project.mjs +0 -50
  189. package/resources/js/context/skills/lightgame-runtime-adapt/project/runtime/lightgame/1.1.0/tooling/vite.d.mts +0 -3
  190. package/resources/js/context/skills/lightgame-runtime-adapt/project/runtime/lightgame/1.1.0/tooling/vite.mjs +0 -72
  191. package/resources/js/context/skills/lightgame-runtime-adapt/project/runtime/lightgame/1.1.0/tools/assets.d.mts +0 -24
  192. package/resources/js/context/skills/lightgame-runtime-adapt/project/runtime/lightgame/1.1.0/tools/assets.mjs +0 -2
  193. package/resources/js/context/skills/lightgame-runtime-adapt/project/runtime/lightgame/1.1.0/tools/astc.d.mts +0 -10
  194. package/resources/js/context/skills/lightgame-runtime-adapt/project/runtime/lightgame/1.1.0/tools/astc.mjs +0 -1
  195. package/resources/js/context/skills/lightgame-runtime-adapt/project/scripts/config-export.mjs +0 -37
  196. package/resources/js/context/skills/lightgame-runtime-adapt/project/scripts/refresh-runtime.mjs +0 -50
  197. package/resources/js/context/skills/lightgame-runtime-adapt/project/scripts/skill-modules/export-config/cli.mjs +0 -20
  198. package/resources/js/context/skills/lightgame-runtime-adapt/project/scripts/skill-modules/export-config/config.d.mts +0 -19
  199. package/resources/js/context/skills/lightgame-runtime-adapt/project/scripts/skill-modules/export-config/config.mjs +0 -1
  200. package/resources/js/context/skills/lightgame-runtime-adapt/project/scripts/skill-modules/export-config/installed.json +0 -6
  201. package/resources/js/context/skills/lightgame-runtime-adapt/project/scripts/skill-modules/export-config/project.d.mts +0 -6
  202. package/resources/js/context/skills/lightgame-runtime-adapt/project/scripts/skill-modules/export-config/project.mjs +0 -77
  203. package/resources/js/context/skills/lightgame-runtime-adapt/project/scripts/skill-modules/export-config/vite.d.mts +0 -2
  204. package/resources/js/context/skills/lightgame-runtime-adapt/project/scripts/skill-modules/export-config/vite.mjs +0 -34
  205. package/resources/js/context/skills/lightgame-runtime-adapt/project/src/display/ui-stage.ts +0 -156
  206. package/resources/js/context/skills/lightgame-runtime-adapt/project/src/display/viewport.ts +0 -249
  207. package/resources/js/context/skills/lightgame-runtime-adapt/project/src/main.ts +0 -87
  208. package/resources/js/context/skills/lightgame-runtime-adapt/project/src/platform.ts +0 -2
  209. package/resources/js/context/skills/lightgame-runtime-adapt/project/src/screenUi.ts +0 -185
  210. package/resources/js/context/skills/lightgame-runtime-adapt/project/src/style.css +0 -294
  211. package/resources/js/context/skills/lightgame-runtime-adapt/project/tsconfig.json +0 -20
  212. package/resources/js/context/skills/lightgame-runtime-adapt/project/vite.config.ts +0 -5
  213. package/resources/js/context/skills/lightgame-runtime-adapt/scripts/install-template.mjs +0 -159
  214. package/resources/js/context/skills/mobile-adaptation/SKILL.md +0 -277
  215. package/resources/js/context/skills/mobile-adaptation/assets/example/src/input/input-config.json +0 -50
  216. package/resources/js/context/skills/mobile-adaptation/assets/example/src/input/input-layer.ts +0 -862
  217. package/resources/js/context/skills/mobile-adaptation/assets/example/src/input/input-platform.ts +0 -92
  218. package/resources/js/context/skills/mobile-adaptation/assets/example/src/input/input-primitives.ts +0 -254
  219. package/resources/js/context/skills/mobile-adaptation/assets/example/src/input/look-pad.ts +0 -245
  220. package/resources/js/context/skills/mobile-adaptation/assets/example/src/ui/touch-controls.css +0 -135
  221. package/resources/js/context/skills/mobile-adaptation/references/input-config.md +0 -342
  222. package/resources/js/context/skills/mobile-adaptation/references/verification.md +0 -140
  223. package/resources/js/context/skills/mobile-adaptation/references/web-audio.md +0 -11
  224. package/resources/js/context/skills/mobile-compat-qa/SKILL.md +0 -53
  225. package/resources/js/context/skills/mobile-compat-qa/references/startup-diagnosis.md +0 -23
  226. package/resources/js/context/skills/mobile-compat-qa/references/web-lifecycle.md +0 -20
  227. package/resources/js/context/skills/mobile-compat-qa/references/web-performance.md +0 -19
  228. package/resources/js/context/skills/optimization-suggestions/SKILL.md +0 -89
  229. package/resources/js/context/skills/platform-services/SKILL.md +0 -101
  230. package/resources/js/context/skills/platform-services/assets/modules/MultiplayerManager.ts +0 -465
  231. package/resources/js/context/skills/platform-services/assets/modules/eventBus.ts +0 -57
  232. package/resources/js/context/skills/platform-services/assets/modules/identity/qq-ai-game-sdk.min.js +0 -5
  233. package/resources/js/context/skills/platform-services/assets/modules/identity/qq-session.mjs +0 -208
  234. package/resources/js/context/skills/platform-services/assets/modules/identity/shared.mjs +0 -37
  235. package/resources/js/context/skills/platform-services/assets/modules/leaderboard.d.mts +0 -39
  236. package/resources/js/context/skills/platform-services/assets/modules/leaderboard.mjs +0 -1
  237. package/resources/js/context/skills/platform-services/assets/modules/log.ts +0 -35
  238. package/resources/js/context/skills/platform-services/assets/modules/multiplayer/clockSync.ts +0 -61
  239. package/resources/js/context/skills/platform-services/assets/modules/multiplayer/dsClient.ts +0 -52
  240. package/resources/js/context/skills/platform-services/assets/modules/multiplayer/payloadCodec.ts +0 -30
  241. package/resources/js/context/skills/platform-services/assets/modules/multiplayer/roomHttp.ts +0 -89
  242. package/resources/js/context/skills/platform-services/assets/modules/multiplayer/types.ts +0 -47
  243. package/resources/js/context/skills/platform-services/assets/modules/platform-service.d.mts +0 -31
  244. package/resources/js/context/skills/platform-services/assets/modules/platform-service.mjs +0 -272
  245. package/resources/js/context/skills/platform-services/assets/modules/save.d.mts +0 -49
  246. package/resources/js/context/skills/platform-services/assets/modules/save.mjs +0 -1
  247. package/resources/js/context/skills/platform-services/assets/scaffold/ds/main.mjs +0 -7
  248. package/resources/js/context/skills/platform-services/assets/scaffold/ds/rooms/SyncRoom.mjs +0 -264
  249. package/resources/js/context/skills/platform-services/assets/scaffold/ds/rooms/syncSchema.mjs +0 -39
  250. package/resources/js/context/skills/platform-services/references/SERVER_GUIDE.md +0 -139
  251. package/resources/js/context/skills/platform-services/references/api_reference.md +0 -18
  252. package/resources/js/context/skills/platform-services/references/leaderboard_playbook.md +0 -96
  253. package/resources/js/context/skills/platform-services/scripts/install.mjs +0 -148
  254. package/resources/js/context/skills/resolution-adaptation/SKILL.md +0 -47
  255. package/resources/js/context/skills/resolution-adaptation/assets/display/ui-stage.ts +0 -156
  256. package/resources/js/context/skills/resolution-adaptation/assets/display/viewport.ts +0 -249
  257. package/resources/js/context/skills/resolution-adaptation/assets/example/main.ts +0 -98
  258. package/resources/js/context/skills/resolution-adaptation/assets/example/ui-tokens.css +0 -200
  259. package/resources/js/context/skills/resolution-adaptation/references/audit.md +0 -31
  260. package/resources/js/context/skills/resolution-adaptation/references/device-safe-area.md +0 -40
  261. package/resources/js/context/skills/resolution-adaptation/references/game-ui-occlusion.md +0 -18
  262. package/resources/js/context/skills/resolution-adaptation/references/layout-rules.md +0 -15
  263. package/resources/js/context/skills/resolution-adaptation/references/troubleshooting.md +0 -34
  264. package/resources/js/context/skills/resolution-adaptation/references/viewport-api.md +0 -38
  265. package/resources/js/context/skills/resolution-adaptation/references/world-resize.md +0 -55
  266. package/resources/js/context/skills/resolution-adaptation/scripts/aspect_audit.mjs +0 -448
  267. package/resources/js/context/skills/scene-editor-compat/SKILL.md +0 -94
  268. package/resources/js/context/skills/scene-editor-compat/assets/example/localcraft.assets.json +0 -13
  269. package/resources/js/context/skills/scene-editor-compat/assets/example/localcraft.scene-editor.json +0 -6
  270. package/resources/js/context/skills/scene-editor-compat/assets/example/src/game/sceneAdapter.ts +0 -25
  271. package/resources/js/context/skills/scene-editor-compat/assets/example/src/scenes/main.scene.json +0 -18
  272. package/resources/js/context/skills/scene-editor-compat/assets/runtime/release.json +0 -7
  273. package/resources/js/context/skills/scene-editor-compat/assets/runtime/scene.d.mts +0 -42
  274. package/resources/js/context/skills/scene-editor-compat/assets/runtime/scene.mjs +0 -144
  275. package/resources/js/context/skills/scene-editor-compat/docs/contract.md +0 -330
  276. package/resources/js/context/skills/scene-editor-compat/docs/resource-sync.md +0 -64
  277. package/resources/js/context/skills/scene-editor-compat/docs/runtime-state.md +0 -28
  278. package/resources/js/context/skills/scene-editor-compat/docs/terrain-contract.md +0 -47
  279. package/resources/js/context/skills/scene-editor-compat/docs/visual-contract.md +0 -64
  280. package/resources/js/context/skills/scene-editor-compat/examples/platformer-ts/localcraft.assets.json +0 -38
  281. package/resources/js/context/skills/scene-editor-compat/examples/platformer-ts/localcraft.scene-editor.json +0 -9
  282. package/resources/js/context/skills/scene-editor-compat/examples/platformer-ts/src/game/sceneAdapter.ts +0 -59
  283. package/resources/js/context/skills/scene-editor-compat/examples/platformer-ts/src/game/sceneBlockers.ts +0 -30
  284. package/resources/js/context/skills/scene-editor-compat/examples/platformer-ts/src/game/sceneFileAssets.ts +0 -66
  285. package/resources/js/context/skills/scene-editor-compat/examples/platformer-ts/src/scenes/Main.Scene.ts +0 -20
  286. package/resources/js/context/skills/scene-editor-compat/examples/platformer-ts/src/scenes/SceneTypes.ts +0 -26
  287. package/resources/js/context/skills/scene-editor-compat/references/contract.md +0 -73
  288. package/resources/js/context/skills/scene-editor-compat/scripts/apply_scene_marker.py +0 -162
  289. package/resources/js/context/skills/scene-editor-compat/scripts/check_scene_contract.py +0 -853
  290. package/resources/js/context/skills/scene-editor-compat/scripts/check_scene_resource_urls.py +0 -173
  291. package/resources/js/context/skills/scene-editor-compat/scripts/scene-editor.mjs +0 -427
  292. package/resources/js/context/skills/scene-editor-compat/version.json +0 -1
  293. package/resources/js/context/skills/ui-editor-compat/SKILL.md +0 -48
  294. package/resources/js/context/skills/ui-editor-compat/assets/example/hud/WidgetLayout_Hud.ts +0 -35
  295. package/resources/js/context/skills/ui-editor-compat/assets/example/hud/WidgetLogic_Hud.ts +0 -74
  296. package/resources/js/context/skills/ui-editor-compat/assets/example/hud/hud.css +0 -60
  297. package/resources/js/context/skills/ui-editor-compat/assets/runtime/dom-ui.d.mts +0 -45
  298. package/resources/js/context/skills/ui-editor-compat/assets/runtime/dom-ui.mjs +0 -265
  299. package/resources/js/context/skills/ui-editor-compat/assets/runtime/release.json +0 -7
  300. package/resources/js/context/skills/ui-editor-compat/references/contract.md +0 -132
  301. package/resources/js/context/skills/ui-editor-compat/scripts/editor-contract.mjs +0 -327
  302. package/resources/js/context/skills/ui-editor-compat/scripts/project-files.mjs +0 -80
  303. package/resources/js/context/skills/ui-editor-compat/scripts/ui-editor.mjs +0 -84
  304. package/resources/js/context/skills/version-update/SKILL.md +0 -192
  305. package/resources/js/context/skills/version-update/scripts/check_runtime_refs.mjs +0 -129
  306. package/resources/js/context/skills/version-update/scripts/feature_snapshot.mjs +0 -159
  307. package/resources/js/context/skills/version-update/scripts/update_feature_version.mjs +0 -157
  308. package/resources/js/context/skills/version-update/upgrade_diffs/.gitkeep +0 -0
  309. package/resources/js/context/version/version.json +0 -1
  310. package/resources/js/project/SPEC/assist/.gitkeep +0 -0
  311. package/resources/js/project/SPEC/guide/.gitkeep +0 -0
  312. package/resources/js/project/SPEC/plan/.gitkeep +0 -0
  313. package/resources/js/project/SPEC/readme.md +0 -6
  314. package/resources/js/project/SPEC/res/.gitkeep +0 -0
  315. package/resources/js/project/SPEC/task-item/.gitkeep +0 -0
  316. package/resources/js/project/runtime/lightgame/1.0.0/platform/config.d.mts +0 -19
  317. package/resources/js/project/runtime/lightgame/1.0.0/platform/config.mjs +0 -1
  318. package/resources/js/project/runtime/lightgame/1.0.0/platform/leaderboard.d.mts +0 -39
  319. package/resources/js/project/runtime/lightgame/1.0.0/platform/leaderboard.mjs +0 -1
  320. package/resources/js/project/runtime/lightgame/1.0.0/platform/platform-capture-video.mjs +0 -227
  321. package/resources/js/project/runtime/lightgame/1.0.0/platform/platform-service.d.mts +0 -25
  322. package/resources/js/project/runtime/lightgame/1.0.0/platform/platform-service.mjs +0 -1
  323. package/resources/js/project/runtime/lightgame/1.0.0/platform/platform.d.mts +0 -79
  324. package/resources/js/project/runtime/lightgame/1.0.0/platform/platform.mjs +0 -29
  325. package/resources/js/project/runtime/lightgame/1.0.0/platform/save.d.mts +0 -49
  326. package/resources/js/project/runtime/lightgame/1.0.0/platform/save.mjs +0 -1
  327. package/resources/js/project/runtime/lightgame/1.0.0/release.json +0 -37
  328. package/resources/js/project/runtime/lightgame/1.0.0/tooling/cli.mjs +0 -2
  329. package/resources/js/project/runtime/lightgame/1.0.0/tooling/project.d.mts +0 -8
  330. package/resources/js/project/runtime/lightgame/1.0.0/tooling/project.mjs +0 -2
  331. package/resources/js/project/runtime/lightgame/1.0.0/tooling/vite.d.mts +0 -3
  332. package/resources/js/project/runtime/lightgame/1.0.0/tooling/vite.mjs +0 -8
  333. package/resources/js/project/runtime/lightgame/1.0.0/tools/assets.d.mts +0 -24
  334. package/resources/js/project/runtime/lightgame/1.0.0/tools/assets.mjs +0 -2
  335. package/resources/js/project/runtime/lightgame/1.0.0/tools/astc.d.mts +0 -10
  336. package/resources/js/project/runtime/lightgame/1.0.0/tools/astc.mjs +0 -1
  337. package/resources/js/project/runtime/lightgame/1.0.0/tools/audio.d.mts +0 -20
  338. package/resources/js/project/runtime/lightgame/1.0.0/tools/audio.mjs +0 -1
  339. package/resources/js/project/runtime/lightgame/1.0.0/tools/canvas.d.mts +0 -21
  340. package/resources/js/project/runtime/lightgame/1.0.0/tools/canvas.mjs +0 -1
  341. package/resources/js/project/runtime/lightgame/1.0.0/tools/input.d.mts +0 -17
  342. package/resources/js/project/runtime/lightgame/1.0.0/tools/input.mjs +0 -1
  343. package/resources/js/project/runtime/lightgame/1.0.0/tools/three.d.mts +0 -40
  344. package/resources/js/project/runtime/lightgame/1.0.0/tools/three.mjs +0 -1
  345. package/resources/js/project/runtime/lightgame/1.0.0/tools/ui.d.mts +0 -10
  346. package/resources/js/project/runtime/lightgame/1.0.0/tools/ui.mjs +0 -1
  347. package/resources/js/project/runtime/lightgame/1.0.0/tools/video.d.mts +0 -8
  348. package/resources/js/project/runtime/lightgame/1.0.0/tools/video.mjs +0 -1
  349. package/resources/js/project/scripts/refresh-runtime.mjs +0 -50
  350. package/resources/js/project/vendor/core-manager-js/package.json +0 -33
  351. package/resources/js/project/vendor/core-manager-js/src/.versions.json +0 -42
  352. package/resources/js/project/vendor/core-manager-js/src/CoreManagerPlugin.ts +0 -41
  353. package/resources/js/project/vendor/core-manager-js/src/assetManager/AssetRef.ts +0 -93
  354. package/resources/js/project/vendor/core-manager-js/src/assetManager/AstcFirstImageFile.ts +0 -203
  355. package/resources/js/project/vendor/core-manager-js/src/assetManager/AstcTextureLoader.ts +0 -106
  356. package/resources/js/project/vendor/core-manager-js/src/assetManager/resolveAssetUrl.test.ts +0 -25
  357. package/resources/js/project/vendor/core-manager-js/src/assetManager/resolveAssetUrl.ts +0 -21
  358. package/resources/js/project/vendor/core-manager-js/src/audioManager/AudioManager.test.ts +0 -65
  359. package/resources/js/project/vendor/core-manager-js/src/audioManager/AudioManager.ts +0 -340
  360. package/resources/js/project/vendor/core-manager-js/src/configManager/FeatureConfig.ts +0 -87
  361. package/resources/js/project/vendor/core-manager-js/src/configManager/tuneRuntime.d.mts +0 -92
  362. package/resources/js/project/vendor/core-manager-js/src/configManager/tuneRuntime.mjs +0 -271
  363. package/resources/js/project/vendor/core-manager-js/src/index.ts +0 -31
  364. package/resources/js/project/vendor/core-manager-js/src/inputManager/InputConfig.ts +0 -81
  365. package/resources/js/project/vendor/core-manager-js/src/inputManager/InputManager.test.ts +0 -43
  366. package/resources/js/project/vendor/core-manager-js/src/inputManager/InputManager.ts +0 -32
  367. package/resources/js/project/vendor/core-manager-js/src/inputManager/InputRuntime.test.ts +0 -141
  368. package/resources/js/project/vendor/core-manager-js/src/inputManager/InputRuntime.ts +0 -20
  369. package/resources/js/project/vendor/core-manager-js/src/inputManager/KeyboardProvider.ts +0 -183
  370. package/resources/js/project/vendor/core-manager-js/src/inputManager/TouchProvider.ts +0 -304
  371. package/resources/js/project/vendor/core-manager-js/src/inputManager/VirtualJoystick.ts +0 -351
  372. package/resources/js/project/vendor/core-manager-js/src/inputManager/_internal/InputManagerImpl.ts +0 -180
  373. package/resources/js/project/vendor/core-manager-js/src/inputManager/icons.b64 +0 -13
  374. package/resources/js/project/vendor/core-manager-js/src/inputManager/icons.b64.d.ts +0 -14
  375. package/resources/js/project/vendor/core-manager-js/src/inputManager/input_config.example.json +0 -68
  376. package/resources/js/project/vendor/core-manager-js/src/logManager/DebugConsole.ts +0 -433
  377. package/resources/js/project/vendor/core-manager-js/src/logManager/LogCapture.ts +0 -118
  378. package/resources/js/project/vendor/core-manager-js/src/logManager/LogManager.ts +0 -444
  379. package/resources/js/project/vendor/core-manager-js/src/logManager/ScreenCapture.ts +0 -485
  380. package/resources/js/project/vendor/core-manager-js/src/logManager/ScreenCaptureVideo.test.ts +0 -66
  381. package/resources/js/project/vendor/core-manager-js/src/logManager/ScreenCaptureVideo.ts +0 -149
  382. package/resources/js/project/vendor/core-manager-js/src/logManager/icons.b64 +0 -9
  383. package/resources/js/project/vendor/core-manager-js/src/resourceManager/AssetUrlResolver.ts +0 -29
  384. package/resources/js/project/vendor/core-manager-js/src/resourceManager/ResourceManager.test.ts +0 -88
  385. package/resources/js/project/vendor/core-manager-js/src/resourceManager/ResourceManager.ts +0 -122
  386. package/resources/js/project/vendor/core-manager-js/src/runtime.ts +0 -24
  387. package/resources/js/project/vendor/core-manager-js/src/spriteAnimManager/CharacterEntity.ts +0 -318
  388. package/resources/js/project/vendor/core-manager-js/src/spriteAnimManager/CharacterPhysicsBinding.test.ts +0 -151
  389. package/resources/js/project/vendor/core-manager-js/src/spriteAnimManager/CharacterPhysicsBinding.ts +0 -235
  390. package/resources/js/project/vendor/core-manager-js/src/spriteAnimManager/EffectComposite.test.ts +0 -98
  391. package/resources/js/project/vendor/core-manager-js/src/spriteAnimManager/EffectComposite.ts +0 -94
  392. package/resources/js/project/vendor/core-manager-js/src/spriteAnimManager/EffectEntity.ts +0 -209
  393. package/resources/js/project/vendor/core-manager-js/src/spriteAnimManager/FxManager.test.ts +0 -106
  394. package/resources/js/project/vendor/core-manager-js/src/spriteAnimManager/FxManager.ts +0 -341
  395. package/resources/js/project/vendor/core-manager-js/src/spriteAnimManager/FxRecipe.test.ts +0 -68
  396. package/resources/js/project/vendor/core-manager-js/src/spriteAnimManager/FxRecipe.ts +0 -236
  397. package/resources/js/project/vendor/core-manager-js/src/spriteAnimManager/SpriteAnimManager.test.ts +0 -22
  398. package/resources/js/project/vendor/core-manager-js/src/spriteAnimManager/SpriteAnimManager.ts +0 -29
  399. package/resources/js/project/vendor/core-manager-js/src/spriteAnimManager/SpriteEntity.test.ts +0 -197
  400. package/resources/js/project/vendor/core-manager-js/src/uiManager/DomUiContracts.ts +0 -9
  401. package/resources/js/project/vendor/core-manager-js/src/uiManager/DomUiKit.ts +0 -555
  402. package/resources/js/project/vendor/core-manager-js/src/uiManager/UIFacadePlugin.test.ts +0 -112
  403. package/resources/js/project/vendor/core-manager-js/src/uiManager/UIFacadePlugin.ts +0 -178
  404. package/resources/js/project/vendor/core-manager-js/src/uiManager/ui-base.css +0 -246
  405. package/resources/js/project/vendor/core-manager-js/src/videoManager/VideoManager.ts +0 -139
  406. package/resources/js/project/vendor/core-manager-js/tsconfig.json +0 -15
  407. package/resources/js/project/vendor/run.sh +0 -4
  408. package/resources/js/project/version/craft_feature_version.json +0 -42
  409. package/resources/js/project/version/project_feature_version.json +0 -11
  410. package/resources/js3d/context/.role/AGENTS_DESIGN.md +0 -9
  411. package/resources/js3d/context/knowledge/3D/PoseInterpolationKnowledge.md +0 -75
  412. package/resources/js3d/context/knowledge/CodingGuide/SceneEditableGuide.md +0 -42
  413. package/resources/js3d/context/knowledge/FrontendComponents.md +0 -19
  414. package/resources/js3d/context/knowledge/MobileAdaptation.md +0 -73
  415. package/resources/js3d/context/knowledge/MobileAdapted.md +0 -36
  416. package/resources/js3d/context/knowledge/Multiplayer/GameplaySystemKnowledge.md +0 -114
  417. package/resources/js3d/context/knowledge/Multiplayer/OverviewKnowledge.md +0 -117
  418. package/resources/js3d/context/knowledge/Multiplayer/StateSyncKnowledge.md +0 -430
  419. package/resources/js3d/context/knowledge/PlatformServices.md +0 -190
  420. package/resources/js3d/context/knowledge/ProjectDisplayConfig.md +0 -35
  421. package/resources/js3d/context/knowledge/SceneEditorCompat.md +0 -35
  422. package/resources/js3d/context/knowledge/StepByStep.md +0 -21
  423. package/resources/js3d/context/knowledge/Subsystems/Optional/MultiplayerManagerKnowledge.md +0 -242
  424. package/resources/js3d/context/knowledge/UiEditorCompat.md +0 -21
  425. package/resources/js3d/context/rules/MultiplayerCapability.md +0 -27
  426. package/resources/js3d/context/rules/MultiplayerRoomEntryUX.md +0 -63
  427. package/resources/js3d/context/rules/PlatformBoundaryModules.md +0 -44
  428. package/resources/js3d/context/rules/preview_ready.md +0 -8
  429. package/resources/js3d/context/skills/aigc-integration/assets/sprite-sheet-player.mjs +0 -70
  430. package/resources/js3d/context/skills/aigc-integration/callback.md +0 -77
  431. package/resources/js3d/context/skills/aigc-integration/knowledge/aigc/README.md +0 -23
  432. package/resources/js3d/context/skills/aigc-integration/knowledge/aigc/audio-aigc-knowledge.md +0 -38
  433. package/resources/js3d/context/skills/aigc-integration/knowledge/aigc/character2d-aigc-knowledge.md +0 -72
  434. package/resources/js3d/context/skills/aigc-integration/knowledge/aigc/staticmesh-aigc-knowledge.md +0 -33
  435. package/resources/js3d/context/skills/aigc-integration/knowledge/aigc/texture-prop-aigc-knowledge.md +0 -36
  436. package/resources/js3d/context/skills/aigc-integration/knowledge/aigc/texture-scene-aigc-knowledge.md +0 -37
  437. package/resources/js3d/context/skills/aigc-integration/knowledge/aigc/texture-ui-aigc-knowledge.md +0 -35
  438. package/resources/js3d/context/skills/asset-search/references/sprite-sheets.md +0 -58
  439. package/resources/js3d/context/skills/asset-search/scripts/asset_display.mjs +0 -62
  440. package/resources/js3d/context/skills/asset-search/scripts/config.json +0 -235
  441. package/resources/js3d/context/skills/asset-search/scripts/manifest_pipeline.mjs +0 -905
  442. package/resources/js3d/context/skills/asset-search/scripts/preflight.mjs +0 -79
  443. package/resources/js3d/context/skills/asset-search/scripts/provided_assets.mjs +0 -74
  444. package/resources/js3d/context/skills/asset-search/scripts/search.mjs +0 -637
  445. package/resources/js3d/context/skills/asset-search/scripts/sprite_source_materializer.mjs +0 -667
  446. package/resources/js3d/context/skills/asset-search/strategies/anim2d.md +0 -42
  447. package/resources/js3d/context/skills/asset-search/strategies/effect2d.md +0 -31
  448. package/resources/js3d/context/skills/asset-usage-audit/references/case-tidewater-zoo.md +0 -89
  449. package/resources/js3d/context/skills/asset-usage-audit/references/optimization-playbook.md +0 -143
  450. package/resources/js3d/context/skills/asset-usage-audit/references/usage-model.md +0 -90
  451. package/resources/js3d/context/skills/export-config/scripts/translate-asset-titles.mjs +0 -161
  452. package/resources/js3d/context/skills/game-art-style/SKILL.md +0 -60
  453. package/resources/js3d/context/skills/game-art-style/assets/previews/cartoon.png +0 -0
  454. package/resources/js3d/context/skills/game-art-style/assets/previews/comic.png +0 -0
  455. package/resources/js3d/context/skills/game-art-style/assets/previews/cozy.png +0 -0
  456. package/resources/js3d/context/skills/game-art-style/assets/previews/cyber.png +0 -0
  457. package/resources/js3d/context/skills/game-art-style/assets/previews/horror.png +0 -0
  458. package/resources/js3d/context/skills/game-art-style/assets/previews/lowpoly.png +0 -0
  459. package/resources/js3d/context/skills/game-art-style/assets/previews/paper.png +0 -0
  460. package/resources/js3d/context/skills/game-art-style/assets/previews/voxel.png +0 -0
  461. package/resources/js3d/context/skills/game-art-style/references/art-parameters-lite.md +0 -38
  462. package/resources/js3d/context/skills/game-art-style/references/construction.md +0 -111
  463. package/resources/js3d/context/skills/game-art-style/references/materials-textures.md +0 -105
  464. package/resources/js3d/context/skills/game-art-style/references/sources.md +0 -25
  465. package/resources/js3d/context/skills/game-art-style/references/styles/cartoon.md +0 -175
  466. package/resources/js3d/context/skills/game-art-style/references/styles/comic.md +0 -168
  467. package/resources/js3d/context/skills/game-art-style/references/styles/cozy.md +0 -191
  468. package/resources/js3d/context/skills/game-art-style/references/styles/cyber.md +0 -165
  469. package/resources/js3d/context/skills/game-art-style/references/styles/horror.md +0 -173
  470. package/resources/js3d/context/skills/game-art-style/references/styles/lowpoly.md +0 -185
  471. package/resources/js3d/context/skills/game-art-style/references/styles/paper.md +0 -181
  472. package/resources/js3d/context/skills/game-art-style/references/styles/voxel.md +0 -189
  473. package/resources/js3d/context/skills/game-art-style/references/user-style-document.md +0 -88
  474. package/resources/js3d/context/skills/mobile-adaptation/SKILL.md +0 -301
  475. package/resources/js3d/context/skills/mobile-adaptation/assets/example/src/input/input-config.json +0 -104
  476. package/resources/js3d/context/skills/mobile-adaptation/assets/example/src/input/input-layer.ts +0 -933
  477. package/resources/js3d/context/skills/mobile-adaptation/assets/example/src/input/input-platform.ts +0 -92
  478. package/resources/js3d/context/skills/mobile-adaptation/assets/example/src/input/input-primitives.ts +0 -254
  479. package/resources/js3d/context/skills/mobile-adaptation/assets/example/src/input/look-pad.ts +0 -245
  480. package/resources/js3d/context/skills/mobile-adaptation/assets/example/src/ui/touch-controls.css +0 -257
  481. package/resources/js3d/context/skills/mobile-adaptation/references/input-config.md +0 -342
  482. package/resources/js3d/context/skills/mobile-adaptation/references/verification.md +0 -140
  483. package/resources/js3d/context/skills/mobile-adaptation/references/web-audio.md +0 -11
  484. package/resources/js3d/context/skills/mobile-compat-qa/SKILL.md +0 -53
  485. package/resources/js3d/context/skills/mobile-compat-qa/references/startup-diagnosis.md +0 -23
  486. package/resources/js3d/context/skills/mobile-compat-qa/references/web-form-input.md +0 -10
  487. package/resources/js3d/context/skills/mobile-compat-qa/references/web-lifecycle.md +0 -20
  488. package/resources/js3d/context/skills/mobile-compat-qa/references/web-performance.md +0 -19
  489. package/resources/js3d/context/skills/optimization-suggestions/SKILL.md +0 -74
  490. package/resources/js3d/context/skills/performance-audit/references/case-notes.md +0 -93
  491. package/resources/js3d/context/skills/performance-audit/references/rules.md +0 -183
  492. package/resources/js3d/context/skills/platform-services/SKILL.md +0 -101
  493. package/resources/js3d/context/skills/platform-services/assets/modules/MultiplayerManager.ts +0 -465
  494. package/resources/js3d/context/skills/platform-services/assets/modules/eventBus.ts +0 -57
  495. package/resources/js3d/context/skills/platform-services/assets/modules/identity/qq-ai-game-sdk.min.js +0 -5
  496. package/resources/js3d/context/skills/platform-services/assets/modules/identity/qq-session.mjs +0 -208
  497. package/resources/js3d/context/skills/platform-services/assets/modules/identity/shared.mjs +0 -37
  498. package/resources/js3d/context/skills/platform-services/assets/modules/leaderboard.d.mts +0 -39
  499. package/resources/js3d/context/skills/platform-services/assets/modules/leaderboard.mjs +0 -1
  500. package/resources/js3d/context/skills/platform-services/assets/modules/log.ts +0 -35
  501. package/resources/js3d/context/skills/platform-services/assets/modules/multiplayer/clockSync.ts +0 -61
  502. package/resources/js3d/context/skills/platform-services/assets/modules/multiplayer/dsClient.ts +0 -52
  503. package/resources/js3d/context/skills/platform-services/assets/modules/multiplayer/payloadCodec.ts +0 -30
  504. package/resources/js3d/context/skills/platform-services/assets/modules/multiplayer/roomHttp.ts +0 -89
  505. package/resources/js3d/context/skills/platform-services/assets/modules/multiplayer/types.ts +0 -47
  506. package/resources/js3d/context/skills/platform-services/assets/modules/platform-service.d.mts +0 -31
  507. package/resources/js3d/context/skills/platform-services/assets/modules/platform-service.mjs +0 -272
  508. package/resources/js3d/context/skills/platform-services/assets/modules/save.d.mts +0 -49
  509. package/resources/js3d/context/skills/platform-services/assets/modules/save.mjs +0 -1
  510. package/resources/js3d/context/skills/platform-services/assets/scaffold/ds/main.mjs +0 -7
  511. package/resources/js3d/context/skills/platform-services/assets/scaffold/ds/rooms/SyncRoom.mjs +0 -264
  512. package/resources/js3d/context/skills/platform-services/assets/scaffold/ds/rooms/syncSchema.mjs +0 -39
  513. package/resources/js3d/context/skills/platform-services/references/SERVER_GUIDE.md +0 -139
  514. package/resources/js3d/context/skills/platform-services/references/api_reference.md +0 -18
  515. package/resources/js3d/context/skills/platform-services/references/leaderboard_playbook.md +0 -96
  516. package/resources/js3d/context/skills/platform-services/scripts/install.mjs +0 -148
  517. package/resources/js3d/context/skills/resolution-adaptation/SKILL.md +0 -46
  518. package/resources/js3d/context/skills/resolution-adaptation/assets/display/ui-stage.ts +0 -156
  519. package/resources/js3d/context/skills/resolution-adaptation/assets/display/viewport.ts +0 -239
  520. package/resources/js3d/context/skills/resolution-adaptation/assets/example/main.ts +0 -129
  521. package/resources/js3d/context/skills/resolution-adaptation/assets/example/ui-tokens.css +0 -188
  522. package/resources/js3d/context/skills/resolution-adaptation/references/audit.md +0 -31
  523. package/resources/js3d/context/skills/resolution-adaptation/references/device-safe-area.md +0 -40
  524. package/resources/js3d/context/skills/resolution-adaptation/references/game-ui-occlusion.md +0 -18
  525. package/resources/js3d/context/skills/resolution-adaptation/references/layout-rules.md +0 -15
  526. package/resources/js3d/context/skills/resolution-adaptation/references/troubleshooting.md +0 -34
  527. package/resources/js3d/context/skills/resolution-adaptation/references/viewport-api.md +0 -38
  528. package/resources/js3d/context/skills/resolution-adaptation/scripts/aspect_audit.mjs +0 -448
  529. package/resources/js3d/context/skills/scene-editor-compat/SKILL.md +0 -599
  530. package/resources/js3d/context/skills/scene-editor-compat/references/bundle-contract.md +0 -141
  531. package/resources/js3d/context/skills/scene-editor-compat/references/editor-integration.md +0 -92
  532. package/resources/js3d/context/skills/scene-editor-compat/references/scene-data-format.md +0 -125
  533. package/resources/js3d/context/skills/scene-editor-compat/references/slots-rules.md +0 -113
  534. package/resources/js3d/context/skills/scene-editor-compat/scripts/scene-editor.mjs +0 -1187
  535. package/resources/js3d/context/skills/threejs-game-quality/SKILL.md +0 -53
  536. package/resources/js3d/context/skills/threejs-game-quality/agents/openai.yaml +0 -4
  537. package/resources/js3d/context/skills/threejs-game-quality/references/01-build.md +0 -94
  538. package/resources/js3d/context/skills/threejs-game-quality/references/02-avoid.md +0 -50
  539. package/resources/js3d/context/skills/threejs-game-quality/references/03-detect.md +0 -105
  540. package/resources/js3d/context/skills/threejs-game-quality/references/camera-by-genre.md +0 -147
  541. package/resources/js3d/context/skills/threejs-game-quality/references/camera-distance.md +0 -79
  542. package/resources/js3d/context/skills/threejs-game-quality/references/camera-sources.md +0 -56
  543. package/resources/js3d/context/skills/threejs-game-quality/references/character-motion-face.md +0 -51
  544. package/resources/js3d/context/skills/threejs-game-quality/references/parameter-contract.md +0 -55
  545. package/resources/js3d/context/skills/threejs-game-quality/references/refine-existing.md +0 -78
  546. package/resources/js3d/context/skills/threejs-game-quality/references/rendering-stability.md +0 -84
  547. package/resources/js3d/context/skills/threejs-game-quality/references/runtime-tools.md +0 -120
  548. package/resources/js3d/context/skills/threejs-game-quality/scripts/package.json +0 -4
  549. package/resources/js3d/context/skills/threejs-game-quality/scripts/runtime-audit.js +0 -238
  550. package/resources/js3d/context/skills/ui-editor-compat/SKILL.md +0 -59
  551. package/resources/js3d/context/skills/ui-editor-compat/assets/example/hud/WidgetLayout_Hud.ts +0 -35
  552. package/resources/js3d/context/skills/ui-editor-compat/assets/example/hud/WidgetLogic_Hud.ts +0 -61
  553. package/resources/js3d/context/skills/ui-editor-compat/assets/example/hud/hud.css +0 -60
  554. package/resources/js3d/context/skills/ui-editor-compat/assets/runtime/dom-ui.d.mts +0 -45
  555. package/resources/js3d/context/skills/ui-editor-compat/assets/runtime/dom-ui.mjs +0 -265
  556. package/resources/js3d/context/skills/ui-editor-compat/assets/runtime/release.json +0 -7
  557. package/resources/js3d/context/skills/ui-editor-compat/references/contract.md +0 -110
  558. package/resources/js3d/context/skills/ui-editor-compat/scripts/editor-contract.mjs +0 -327
  559. package/resources/js3d/context/skills/ui-editor-compat/scripts/project-files.mjs +0 -80
  560. package/resources/js3d/context/skills/ui-editor-compat/scripts/ui-editor.mjs +0 -84
  561. package/resources/js3d/context/skills/version-update/SKILL.md +0 -191
  562. package/resources/js3d/context/skills/version-update/scripts/check_runtime_refs.mjs +0 -129
  563. package/resources/js3d/context/skills/version-update/scripts/feature_snapshot.mjs +0 -159
  564. package/resources/js3d/context/skills/version-update/scripts/update_feature_version.mjs +0 -157
  565. package/resources/js3d/context/skills/version-update/upgrade_diffs/.gitkeep +0 -0
  566. package/resources/js3d/context/version/version.json +0 -1
  567. package/resources/js3d/project/runtime/lightgame/1.0.0/platform/config.d.mts +0 -19
  568. package/resources/js3d/project/runtime/lightgame/1.0.0/platform/config.mjs +0 -1
  569. package/resources/js3d/project/runtime/lightgame/1.0.0/platform/leaderboard.d.mts +0 -39
  570. package/resources/js3d/project/runtime/lightgame/1.0.0/platform/leaderboard.mjs +0 -1
  571. package/resources/js3d/project/runtime/lightgame/1.0.0/platform/platform-capture-video.mjs +0 -227
  572. package/resources/js3d/project/runtime/lightgame/1.0.0/platform/platform-service.d.mts +0 -25
  573. package/resources/js3d/project/runtime/lightgame/1.0.0/platform/platform-service.mjs +0 -1
  574. package/resources/js3d/project/runtime/lightgame/1.0.0/platform/platform.d.mts +0 -79
  575. package/resources/js3d/project/runtime/lightgame/1.0.0/platform/platform.mjs +0 -30
  576. package/resources/js3d/project/runtime/lightgame/1.0.0/platform/save.d.mts +0 -49
  577. package/resources/js3d/project/runtime/lightgame/1.0.0/platform/save.mjs +0 -1
  578. package/resources/js3d/project/runtime/lightgame/1.0.0/release.json +0 -39
  579. package/resources/js3d/project/runtime/lightgame/1.0.0/tooling/cli.mjs +0 -2
  580. package/resources/js3d/project/runtime/lightgame/1.0.0/tooling/project.d.mts +0 -8
  581. package/resources/js3d/project/runtime/lightgame/1.0.0/tooling/project.mjs +0 -2
  582. package/resources/js3d/project/runtime/lightgame/1.0.0/tooling/vite.d.mts +0 -3
  583. package/resources/js3d/project/runtime/lightgame/1.0.0/tooling/vite.mjs +0 -7
  584. package/resources/js3d/project/runtime/lightgame/1.0.0/tools/assets.d.mts +0 -24
  585. package/resources/js3d/project/runtime/lightgame/1.0.0/tools/assets.mjs +0 -2
  586. package/resources/js3d/project/runtime/lightgame/1.0.0/tools/astc.d.mts +0 -10
  587. package/resources/js3d/project/runtime/lightgame/1.0.0/tools/astc.mjs +0 -1
  588. package/resources/js3d/project/runtime/lightgame/1.0.0/tools/audio.d.mts +0 -20
  589. package/resources/js3d/project/runtime/lightgame/1.0.0/tools/audio.mjs +0 -1
  590. package/resources/js3d/project/runtime/lightgame/1.0.0/tools/canvas.d.mts +0 -21
  591. package/resources/js3d/project/runtime/lightgame/1.0.0/tools/canvas.mjs +0 -1
  592. package/resources/js3d/project/runtime/lightgame/1.0.0/tools/glb.d.mts +0 -26
  593. package/resources/js3d/project/runtime/lightgame/1.0.0/tools/glb.mjs +0 -351
  594. package/resources/js3d/project/runtime/lightgame/1.0.0/tools/input.d.mts +0 -17
  595. package/resources/js3d/project/runtime/lightgame/1.0.0/tools/input.mjs +0 -1
  596. package/resources/js3d/project/runtime/lightgame/1.0.0/tools/three.d.mts +0 -40
  597. package/resources/js3d/project/runtime/lightgame/1.0.0/tools/three.mjs +0 -1
  598. package/resources/js3d/project/runtime/lightgame/1.0.0/tools/ui.d.mts +0 -10
  599. package/resources/js3d/project/runtime/lightgame/1.0.0/tools/ui.mjs +0 -1
  600. package/resources/js3d/project/runtime/lightgame/1.0.0/tools/video.d.mts +0 -8
  601. package/resources/js3d/project/runtime/lightgame/1.0.0/tools/video.mjs +0 -1
  602. package/resources/js3d/project/scripts/refresh-runtime.mjs +0 -50
  603. package/resources/js3d/project/vendor/core-manager-three/package.json +0 -12
  604. package/resources/js3d/project/vendor/core-manager-three/src/index.ts +0 -2
  605. package/resources/js3d/project/vendor/run.sh +0 -4
  606. package/resources/js3d/project/version/craft_feature_version.json +0 -42
  607. package/resources/js3d/project/version/project_feature_version.json +0 -11
  608. package/vendor/agent-cli/dist/src/artifacts/scene-asset-delivery.d.ts +0 -7
  609. package/vendor/agent-cli/dist/src/artifacts/scene-asset-delivery.d.ts.map +0 -1
  610. package/vendor/agent-cli/dist/src/artifacts/scene-asset-delivery.js +0 -145
  611. package/vendor/agent-cli/dist/src/artifacts/scene-asset-delivery.js.map +0 -1
  612. /package/resources/js/{context/skills/export-config/scripts → project/scripts/config-export}/assert-asset-wiring.mjs +0 -0
  613. /package/resources/js3d/{context/skills/export-config/scripts → project/scripts/config-export}/assert-asset-wiring.mjs +0 -0
  614. /package/resources/js3d/{context/skills/export-config/scripts → project/scripts/config-export}/sync-asset-controls.mjs +0 -0
@@ -1,327 +0,0 @@
1
- /**
2
- * Read-only validation of the historical UI Editor contract.
3
- * Evidence: 5b0b1f99^:js/context/skills/ui-editor-compat/scripts/{
4
- * _ts_frontend,verify_editor_parse,verify_editor_roundtrip}.cjs.
5
- * The editor's actual astParser.ts/codegen.ts are not bundled or executed here.
6
- * A deliberately restricted AST interpreter models its five mock factories;
7
- * no project imports, DOM code, or arbitrary JavaScript are executed.
8
- */
9
- import { readFile, readdir, lstat } from 'node:fs/promises';
10
- import { createRequire } from 'node:module';
11
- import { resolve, join, basename, dirname, relative } from 'node:path';
12
- import { projectFile, bridgePath, verifyBridge } from './project-files.mjs';
13
-
14
- export const CONTRACT_MODEL = 'historical-contract-model';
15
- const factories = new Map([
16
- ['createPanel', 'Panel'], ['createText', 'Text'], ['createImage', 'Image'],
17
- ['createButton', 'Button'], ['createScrim', 'Panel'],
18
- ]);
19
- const layers = Object.freeze({ BACKGROUND: 0, HUD: 100, PANEL: 300, SCRIM: 600, MODAL: 650, TOAST: 900 });
20
- const nodeRef = Symbol('mock-widget');
21
- const reserved = new Set(['__proto__', 'prototype', 'constructor']);
22
-
23
- function frontend(source, options) {
24
- const ts = options?.typescript;
25
- if (!ts?.createSourceFile) throw new Error('A project-provided TypeScript module is required');
26
- const fileName = options.fileName ?? 'WidgetLayout_Screen.ts';
27
- const sf = ts.createSourceFile(fileName, source, ts.ScriptTarget.Latest, true, ts.ScriptKind.TS);
28
- function fail(node, message) {
29
- const position = sf.getLineAndCharacterOfPosition(node?.getStart(sf) ?? 0);
30
- throw new Error(`${basename(fileName)}:${position.line + 1}:${position.character + 1}: ${message}`);
31
- }
32
- if (sf.parseDiagnostics.length) fail(undefined, ts.flattenDiagnosticMessageText(sf.parseDiagnostics[0].messageText, '\n'));
33
- return { ts, sf, fail, fileName };
34
- }
35
-
36
- function propertyName(ts, sf, node, fail) {
37
- if (ts.isIdentifier(node) || ts.isStringLiteral(node)) {
38
- if (reserved.has(node.text)) fail(node, `Reserved property ${node.text} is unsupported`);
39
- return node.text;
40
- }
41
- fail(node, 'Computed option and Refs names are not editable');
42
- }
43
-
44
- /**
45
- * Collect a deterministic mock widget tree without running project code.
46
- * options: {typescript, fileName}. Nodes preserve factory source ranges so
47
- * repeated helper invocations cannot be mistaken for independently editable nodes.
48
- */
49
- export function collectLayout(source, options = {}) {
50
- const { ts, sf, fail, fileName } = frontend(source, options);
51
- const match = /^WidgetLayout_([A-Z][A-Za-z0-9]*)\.ts$/.exec(basename(fileName));
52
- if (!match) fail(undefined, 'Expected WidgetLayout_<Name>.ts');
53
- const name = match[1];
54
- const scanner = ts.createScanner(ts.ScriptTarget.Latest, false, ts.LanguageVariant.Standard, source);
55
- const surfaces = [];
56
- for (let token = scanner.scan(); token !== ts.SyntaxKind.EndOfFileToken; token = scanner.scan()) {
57
- if (token === ts.SyntaxKind.SingleLineCommentTrivia) {
58
- const surface = /^\/\/\s*SURFACE_MODE:\s*(fullscreen|overlay|modal)\s*$/.exec(scanner.getTokenText());
59
- if (surface) surfaces.push(surface[1]);
60
- }
61
- }
62
- if (surfaces.length !== 1) fail(undefined, 'Exactly one // SURFACE_MODE: fullscreen|overlay|modal comment is required');
63
-
64
- const functions = new Map();
65
- const imported = new Set();
66
- let refsInterface;
67
- const exported = node => node.modifiers?.some(modifier => modifier.kind === ts.SyntaxKind.ExportKeyword);
68
- for (const statement of sf.statements) {
69
- if (ts.isImportDeclaration(statement)) {
70
- if (!statement.importClause) continue; // CSS ownership is checked by checkProject.
71
- const clause = statement.importClause;
72
- if (clause.isTypeOnly) continue;
73
- if (clause.name || !clause.namedBindings || !ts.isNamedImports(clause.namedBindings)) fail(statement, 'Layout runtime imports must be named factory imports; put business imports in WidgetLogic');
74
- for (const specifier of clause.namedBindings.elements) {
75
- if (specifier.isTypeOnly) continue;
76
- const actual = specifier.propertyName?.text ?? specifier.name.text;
77
- if ((!factories.has(actual) && actual !== 'UI_LAYER') || actual !== specifier.name.text) fail(specifier, 'Use unaliased createPanel/createText/createImage/createButton/createScrim or UI_LAYER imports; other runtime imports belong in WidgetLogic');
78
- imported.add(actual);
79
- }
80
- } else if (ts.isInterfaceDeclaration(statement)) {
81
- if (statement.name.text === `${name}Refs`) refsInterface = statement;
82
- } else if (ts.isTypeAliasDeclaration(statement) || ts.isEmptyStatement(statement)) {
83
- continue;
84
- } else if (ts.isFunctionDeclaration(statement) && statement.name && statement.body) {
85
- if (functions.has(statement.name.text)) fail(statement, 'Duplicate layout helper declaration');
86
- if (statement.modifiers?.some(modifier => modifier.kind === ts.SyntaxKind.AsyncKeyword) || statement.asteriskToken) fail(statement, 'Layout helpers must be synchronous, non-generator functions');
87
- functions.set(statement.name.text, statement);
88
- } else fail(statement, 'Layout may contain imports, types and static factory functions only; move effects and business logic to WidgetLogic');
89
- }
90
- const entries = [...functions.keys()].filter(value => /^create\w*Layout$/.test(value));
91
- if (entries.length !== 1 || entries[0] !== `create${name}Layout`) fail(undefined, `Expected the unique create${name}Layout entry`);
92
- const entry = functions.get(entries[0]);
93
- if (!exported(entry) || entry.modifiers?.some(modifier => modifier.kind === ts.SyntaxKind.AsyncKeyword) || entry.asteriskToken) fail(entry, 'Layout entry must be an exported synchronous function declaration');
94
- if (entry.parameters.length > 1) fail(entry, 'Layout entry accepts at most one images/options parameter');
95
- if (!refsInterface || !exported(refsInterface)) fail(undefined, `Export interface ${name}Refs with a required root field`);
96
- const rootMember = refsInterface.members.find(member => member.name?.getText(sf) === 'root');
97
- if (!rootMember || rootMember.questionToken) fail(refsInterface, `${name}Refs must have a required root field`);
98
-
99
- const nodes = [];
100
- const ranges = new Set();
101
- let callDepth = 0;
102
-
103
- function literal(node, path, edits) {
104
- if (ts.isStringLiteral(node) || ts.isNumericLiteral(node) || node.kind === ts.SyntaxKind.TrueKeyword || node.kind === ts.SyntaxKind.FalseKeyword || node.kind === ts.SyntaxKind.NullKeyword || (ts.isPrefixUnaryExpression(node) && node.operator === ts.SyntaxKind.MinusToken && ts.isNumericLiteral(node.operand))) {
105
- const value = ts.isStringLiteral(node) ? node.text : ts.isNumericLiteral(node) ? Number(node.text) : ts.isPrefixUnaryExpression(node) ? -Number(node.operand.text) : node.kind === ts.SyntaxKind.TrueKeyword ? true : node.kind === ts.SyntaxKind.FalseKeyword ? false : null;
106
- edits.push({ key: path, start: node.getStart(sf), end: node.end, value });
107
- return value;
108
- }
109
- if (ts.isObjectLiteralExpression(node)) {
110
- const result = {};
111
- for (const property of node.properties) {
112
- if (!ts.isPropertyAssignment(property)) fail(property, 'Editable option objects cannot contain spreads, methods or shorthand values');
113
- const key = propertyName(ts, sf, property.name, fail);
114
- if (Object.hasOwn(result, key)) fail(property, 'Duplicate option property');
115
- result[key] = literal(property.initializer, path ? `${path}.${key}` : key, edits);
116
- }
117
- return result;
118
- }
119
- fail(node, 'Editable options must be inline string/number/boolean literals or literal objects; variables and template strings are display-only');
120
- }
121
-
122
- function objectValue(node, scope) {
123
- const result = {};
124
- for (const property of node.properties) {
125
- if (!ts.isPropertyAssignment(property) && !ts.isShorthandPropertyAssignment(property)) fail(property, 'Refs must use explicit object fields without spreads or methods');
126
- const key = propertyName(ts, sf, property.name, fail);
127
- if (Object.hasOwn(result, key)) fail(property, 'Duplicate Refs property');
128
- result[key] = evaluate(ts.isShorthandPropertyAssignment(property) ? property.name : property.initializer, scope);
129
- }
130
- return result;
131
- }
132
-
133
- function createWidget(call, scope, factory) {
134
- if (!imported.has(factory)) fail(call, `${factory} must be an unaliased named import`);
135
- if (call.arguments.length !== 1 || !ts.isObjectLiteralExpression(call.arguments[0])) fail(call, `${factory} requires exactly one inline options object`);
136
- if (ranges.has(call.getStart(sf))) fail(call, 'One factory source call created multiple widgets; expand repeated helper calls so each node has independently editable literals');
137
- ranges.add(call.getStart(sf));
138
- const params = {}, edits = [];
139
- let parentId = null;
140
- for (const property of call.arguments[0].properties) {
141
- if (!ts.isPropertyAssignment(property) && !ts.isShorthandPropertyAssignment(property)) fail(property, 'Factory options cannot contain spreads, methods or computed values');
142
- const key = propertyName(ts, sf, property.name, fail);
143
- const valueNode = ts.isShorthandPropertyAssignment(property) ? property.name : property.initializer;
144
- if (Object.hasOwn(params, key)) fail(property, 'Duplicate factory option');
145
- if (key === 'parent') {
146
- const parent = evaluate(valueNode, scope);
147
- if (parent?.[nodeRef] === undefined) fail(property, 'parent must refer to an already-created mock widget');
148
- parentId = parent[nodeRef];
149
- params.parent = parentId;
150
- } else if (key === 'layer' && ts.isPropertyAccessExpression(valueNode) && valueNode.expression.getText(sf) === 'UI_LAYER') {
151
- if (!imported.has('UI_LAYER') || !Object.hasOwn(layers, valueNode.name.text)) fail(valueNode, 'Unknown UI_LAYER constant');
152
- params.layer = layers[valueNode.name.text];
153
- } else {
154
- if (key === 'style' || key.startsWith('on')) fail(property, 'Visual styling and handlers belong in owner CSS / WidgetLogic');
155
- params[key] = literal(valueNode, key, edits);
156
- }
157
- }
158
- for (const key of ['className', ...(factory === 'createText' ? ['text'] : factory === 'createButton' ? ['label'] : factory === 'createImage' ? ['src'] : [])]) {
159
- if (typeof params[key] !== 'string' || (key === 'className' && !params[key].trim())) fail(call, `${factory}.${key} requires an inline string literal${key === 'className' ? ' with a nonempty class' : ''}`);
160
- }
161
- const id = nodes.length;
162
- nodes.push({ id, type: factories.get(factory), factory, params, parentId, edits });
163
- return { [nodeRef]: id };
164
- }
165
-
166
- function evaluate(node, scope) {
167
- if (ts.isIdentifier(node)) {
168
- if (!scope.has(node.text)) fail(node, `Unknown layout value ${node.text}; business state belongs in WidgetLogic`);
169
- return scope.get(node.text);
170
- }
171
- if (ts.isObjectLiteralExpression(node)) return objectValue(node, scope);
172
- if (ts.isStringLiteral(node) || ts.isNumericLiteral(node) || node.kind === ts.SyntaxKind.TrueKeyword || node.kind === ts.SyntaxKind.FalseKeyword || node.kind === ts.SyntaxKind.NullKeyword) return literal(node, '', []);
173
- if (ts.isPropertyAccessExpression(node)) {
174
- const base = evaluate(node.expression, scope);
175
- if (!base || !Object.hasOwn(base, node.name.text)) fail(node, 'Only existing Refs object properties can be read in static Layout');
176
- return base[node.name.text];
177
- }
178
- if (ts.isCallExpression(node) && ts.isIdentifier(node.expression)) {
179
- const called = node.expression.text;
180
- if (factories.has(called)) return createWidget(node, scope, called);
181
- if (functions.has(called) && called !== entry.name.text) return invoke(functions.get(called), node.arguments.map(argument => evaluate(argument, scope)));
182
- }
183
- fail(node, 'Unsupported layout expression: no DOM construction, callbacks, dynamic imports, state mutations or business calls');
184
- }
185
-
186
- function invoke(fn, arguments_) {
187
- if (++callDepth > 16) fail(fn, 'Recursive layout helpers are unsupported');
188
- const scope = new Map();
189
- for (const [index, parameter] of fn.parameters.entries()) {
190
- if (!ts.isIdentifier(parameter.name) || parameter.dotDotDotToken) fail(parameter, 'Layout helper parameters must be simple names');
191
- scope.set(parameter.name.text, arguments_[index] ?? (parameter.initializer ? evaluate(parameter.initializer, scope) : {}));
192
- }
193
- let returned;
194
- for (const statement of fn.body.statements) {
195
- if (ts.isVariableStatement(statement) && statement.declarationList.flags & ts.NodeFlags.Const) {
196
- for (const declaration of statement.declarationList.declarations) {
197
- if (!ts.isIdentifier(declaration.name) || !declaration.initializer || scope.has(declaration.name.text)) fail(declaration, 'Use distinct const names for layout widgets and Refs');
198
- scope.set(declaration.name.text, evaluate(declaration.initializer, scope));
199
- }
200
- } else if (ts.isReturnStatement(statement) && statement.expression) {
201
- returned = evaluate(statement.expression, scope);
202
- if (statement !== fn.body.statements.at(-1)) fail(statement, 'Return must be the final layout statement');
203
- } else fail(statement, 'Layout must be a static list of const declarations and a final return; loops, conditions, event binding and mutations belong in WidgetLogic');
204
- }
205
- --callDepth;
206
- return returned;
207
- }
208
-
209
- const returned = invoke(entry, []);
210
- if (!nodes.length) fail(entry, 'Layout did not create any factory widgets');
211
- if (returned?.root?.[nodeRef] === undefined) fail(entry, 'Return an object whose root is a factory widget');
212
- const roots = nodes.filter(node => node.parentId === null);
213
- if (!roots.some(node => node.id === returned.root[nodeRef])) fail(entry, 'Refs.root must be an unparented root widget');
214
- const referenced = new Set();
215
- function collectReferences(value) {
216
- if (value?.[nodeRef] !== undefined) referenced.add(value[nodeRef]);
217
- else if (value && typeof value === 'object') for (const child of Object.values(value)) collectReferences(child);
218
- }
219
- collectReferences(returned);
220
- for (const root of roots) {
221
- if (!referenced.has(root.id)) fail(entry, `Unparented widget ${root.id} (${root.params.className}) is absent from returned Refs; context.mount(refs) would not mount it. Return every root, directly or in nested Refs.`);
222
- }
223
- for (const member of refsInterface.members) {
224
- if (!member.name || member.questionToken) continue;
225
- const key = propertyName(ts, sf, member.name, fail);
226
- if (!Object.hasOwn(returned, key)) fail(member, `Required ${name}Refs.${key} is not returned by the layout`);
227
- }
228
- function serializeRefs(value) {
229
- if (value?.[nodeRef] !== undefined) return value[nodeRef];
230
- if (value && typeof value === 'object') return Object.fromEntries(Object.entries(value).map(([key, child]) => [key, serializeRefs(child)]));
231
- return value;
232
- }
233
- return { model: CONTRACT_MODEL, layoutFunction: entry.name.text, surfaceMode: surfaces[0], nodes, refs: serializeRefs(returned) };
234
- }
235
-
236
- /** Rewrites exactly one factory option literal in memory. Never writes files. */
237
- export function editLayoutLiteral(source, options) {
238
- const { nodeIndex, key, value } = options ?? {};
239
- const layout = collectLayout(source, options);
240
- const field = layout.nodes[nodeIndex]?.edits.find(edit => edit.key === key);
241
- if (!field) throw new Error(`Node ${nodeIndex} has no editable literal for ${key}`);
242
- if (value === null || !['string', 'number', 'boolean'].includes(typeof value) || typeof value !== typeof field.value || (typeof value === 'number' && !Number.isFinite(value))) throw new Error('Replacement must be a finite literal of the same primitive type');
243
- return source.slice(0, field.start) + JSON.stringify(value) + source.slice(field.end);
244
- }
245
-
246
- function checkRoundtrip(source, options, before) {
247
- let edits = 0;
248
- for (const node of before.nodes) {
249
- for (const field of node.edits) {
250
- if (field.value === null) continue;
251
- const value = typeof field.value === 'string' ? `${field.value}__editor_check__` : typeof field.value === 'boolean' ? !field.value : field.value + 1;
252
- const changed = editLayoutLiteral(source, { ...options, nodeIndex: node.id, key: field.key, value });
253
- const after = collectLayout(changed, options);
254
- const actual = field.key.split('.').reduce((result, part) => result?.[part], after.nodes[node.id].params);
255
- if (actual !== value || JSON.stringify(before.refs) !== JSON.stringify(after.refs) || after.nodes.length !== before.nodes.length || after.nodes.some((next, index) => next.parentId !== before.nodes[index].parentId || next.type !== before.nodes[index].type)) throw new Error(`Roundtrip changed hierarchy/Refs or failed to apply node ${node.id}.${field.key}`);
256
- edits++;
257
- }
258
- }
259
- return { ok: edits > 0, edits };
260
- }
261
-
262
- /** Check only src/ui/<owner>/ layout files; do not read or execute game modules. */
263
- export async function checkProject(projectRoot) {
264
- const root = resolve(projectRoot);
265
- const result = { ok: false, model: CONTRACT_MODEL, files: [], errors: [] };
266
- let typescript;
267
- try { typescript = createRequire(join(root, 'package.json'))('typescript'); }
268
- catch { result.errors.push('Project TypeScript is unavailable. Use the project-provided node_modules; this check never installs dependencies.'); return result; }
269
- try { await verifyBridge(root); }
270
- catch (error) { result.errors.push(error.message); }
271
- const candidates = [];
272
- async function scan(directory) {
273
- await projectFile(root, relative(root, directory));
274
- for (const entry of await readdir(directory, { withFileTypes: true })) {
275
- const path = join(directory, entry.name);
276
- if (entry.isSymbolicLink()) {
277
- result.errors.push(`UI files must not use a symbolic link: ${relative(root, path).replaceAll('\\', '/')} (code snapshots omit links)`);
278
- continue;
279
- }
280
- if (entry.name.startsWith('.') || entry.name === 'node_modules') continue;
281
- if (entry.isDirectory()) await scan(path);
282
- else if (entry.isFile() && /^(?:WidgetLayout|UiPanel|UIPanel|Panel|UiLayout|Layout)_.*\.ts$/.test(entry.name)) candidates.push(path);
283
- }
284
- }
285
- try { await scan(join(root, 'src/ui')); }
286
- catch (error) { if (error.code !== 'ENOENT') result.errors.push(`Cannot read src/ui: ${error.message}`); }
287
- for (const path of candidates.sort()) {
288
- const report = { path: relative(root, path).replaceAll('\\', '/'), owner: basename(dirname(path)), name: basename(path).replace(/^WidgetLayout_|\.ts$/g, ''), nodeCount: 0, roundtrip: { ok: false, edits: 0 }, errors: [] };
289
- result.files.push(report);
290
- try {
291
- if (dirname(path) === join(root, 'src/ui')) throw new Error('Put Layout, Logic and owner CSS together under src/ui/<owner>/');
292
- await projectFile(root, relative(root, path));
293
- const source = await readFile(path, 'utf8');
294
- const options = { typescript, fileName: path };
295
- const layout = collectLayout(source, options);
296
- report.nodeCount = layout.nodes.length;
297
- report.surfaceMode = layout.surfaceMode;
298
- const { sf, ts } = frontend(source, options);
299
- // UIEditor_0.0.1 filters import sources BEFORE collecting any nodes.
300
- // A direct dom-ui.mjs import passes the mock tree but produces zero screens.
301
- for (const statement of sf.statements) {
302
- if (!ts.isImportDeclaration(statement) || !statement.importClause || statement.importClause.isTypeOnly) continue;
303
- const bindings = statement.importClause.namedBindings;
304
- if (bindings && ts.isNamedImports(bindings) && bindings.elements.every(item => item.isTypeOnly)) continue;
305
- const specifier = statement.moduleSpecifier.text;
306
- const expected = relative(dirname(path), join(root, bridgePath)).replaceAll('\\', '/').replace(/\.ts$/, '');
307
- if (!specifier.startsWith('.') || !specifier.endsWith('/DomUiKit') || resolve(dirname(path), `${specifier}.ts`) !== join(root, bridgePath)
308
- || !/from\s+['"][^'"]*DomUiKit['"]/.test(statement.getText(sf))) {
309
- throw new Error(`Layout factory imports must use '${expected}' (without .ts), resolving to ${bridgePath}; direct dom-ui.mjs imports are skipped by UIEditor_0.0.1`);
310
- }
311
- }
312
- const css = `./${report.owner}.css`;
313
- if (!sf.statements.some(statement => ts.isImportDeclaration(statement) && statement.moduleSpecifier.text === css && !statement.importClause)) throw new Error(`Layout must import '${css}' for its owner stylesheet`);
314
- for (const sibling of [`${report.owner}.css`, `WidgetLogic_${report.name}.ts`]) {
315
- const siblingPath = await projectFile(root, relative(root, join(dirname(path), sibling)));
316
- if (!(await lstat(siblingPath)).isFile()) throw new Error(`${sibling} must be a regular file next to the Layout`);
317
- }
318
- report.roundtrip = checkRoundtrip(source, options, layout);
319
- } catch (error) {
320
- report.errors.push(error.message);
321
- result.errors.push(`${report.path}: ${error.message}`);
322
- }
323
- }
324
- if (!result.files.length) result.errors.push('No WidgetLayout_<Name>.ts files found under src/ui/<owner>/; an empty project cannot be marked');
325
- result.ok = result.files.length > 0 && result.errors.length === 0;
326
- return result;
327
- }
@@ -1,80 +0,0 @@
1
- import { lstat, mkdir, readFile, writeFile, rename, unlink, link } from 'node:fs/promises';
2
- import { resolve, relative, isAbsolute, dirname, join } from 'node:path';
3
- import { randomUUID, createHash } from 'node:crypto';
4
-
5
- export const adapterVersion = '1.0.0';
6
- export const adapterPath = `runtime/ui-editor/${adapterVersion}`;
7
- export const bridgePath = 'src/ui/DomUiKit.ts';
8
- export const bridgeSource = `export * from '../../${adapterPath}/dom-ui.mjs';\n`;
9
- export const digest = value => createHash('sha256').update(value).digest('hex');
10
-
11
- export async function verifyBridge(project) {
12
- const path = await projectFile(project, bridgePath);
13
- let source;
14
- try { source = await readFile(path, 'utf8'); }
15
- catch (error) { throw new Error(`Missing or unreadable ${bridgePath}; run ui-editor.mjs install first. ${error.message}`); }
16
- if (source.replaceAll('\r\n', '\n').trim() !== bridgeSource.trim()) {
17
- throw new Error(`${bridgePath} must re-export the fixed UI adapter: ${bridgeSource.trim()} Existing file was preserved; review it before reinstalling.`);
18
- }
19
- }
20
-
21
- /** Reject links in every existing path component before reading or writing project files. */
22
- export async function projectFile(project, path = '') {
23
- const root = resolve(project);
24
- const target = resolve(root, path);
25
- const rel = relative(root, target);
26
- if (rel === '..' || rel.startsWith('../') || rel.startsWith('..\\') || isAbsolute(rel)) throw new Error(`Path escapes project: ${path}`);
27
- let current = target;
28
- while (true) {
29
- try {
30
- const info = await lstat(current);
31
- if (info.isSymbolicLink()) throw new Error(`UI editor files must not traverse a symbolic link: ${current}`);
32
- if (current !== target && !info.isDirectory()) throw new Error(`Not a directory: ${current}`);
33
- } catch (error) { if (error.code !== 'ENOENT') throw error; }
34
- const parent = dirname(current);
35
- if (parent === current) break;
36
- current = parent;
37
- }
38
- return target;
39
- }
40
-
41
- export async function readJson(path) {
42
- try { return JSON.parse(await readFile(path, 'utf8')); }
43
- catch (error) { throw new Error(`${path}: ${error.message}`, { cause: error }); }
44
- }
45
-
46
- /** Publish complete files. exclusive=true preserves an existing file even during concurrent installs. */
47
- export async function writeProjectFile(project, path, content, { exclusive = false, expectedContent } = {}) {
48
- const target = await projectFile(project, path);
49
- await mkdir(dirname(target), { recursive: true });
50
- await projectFile(project, path);
51
- const temporary = join(dirname(target), `.ui-editor-${randomUUID()}.tmp`);
52
- try {
53
- await writeFile(temporary, content, { flag: 'wx' });
54
- await projectFile(project, path);
55
- if (expectedContent !== undefined) {
56
- let current = null;
57
- try { current = await readFile(target, 'utf8'); } catch (error) { if (error.code !== 'ENOENT') throw error; }
58
- if (current !== expectedContent) throw new Error(`Project file changed while preparing the update; it was preserved: ${target}. Retry after the other edit finishes.`);
59
- }
60
- if (exclusive) {
61
- try { await link(temporary, target); }
62
- catch (error) {
63
- if (error.code !== 'EEXIST') throw error;
64
- if (!(await readFile(target)).equals(Buffer.from(content))) throw new Error(`Existing adapter file differs; it was preserved: ${target}`);
65
- }
66
- } else await rename(temporary, target);
67
- } finally { await unlink(temporary).catch(error => { if (error.code !== 'ENOENT') throw error; }); }
68
- }
69
-
70
- export async function verifyAdapter(project) {
71
- const base = await projectFile(project, adapterPath);
72
- const release = await readJson(await projectFile(base, 'release.json'));
73
- if (release.version !== adapterVersion || !release.files || typeof release.files !== 'object' || Array.isArray(release.files) || !release.files['dom-ui.mjs'] || !release.files['dom-ui.d.mts']) throw new Error('UI editor adapter release is invalid');
74
- for (const [name, expected] of Object.entries(release.files)) {
75
- if (typeof expected !== 'string' || !/^[a-f0-9]{64}$/.test(expected)) throw new Error(`Invalid adapter digest: ${name}`);
76
- const bytes = await readFile(await projectFile(base, name));
77
- if (digest(bytes) !== expected) throw new Error(`UI editor adapter integrity mismatch: ${name}. Restore its fixed release; do not edit generated runtime files.`);
78
- }
79
- return release;
80
- }
@@ -1,84 +0,0 @@
1
- import { readFile, lstat } from 'node:fs/promises';
2
- import { dirname, resolve, relative, isAbsolute } from 'node:path';
3
- import { fileURLToPath, pathToFileURL } from 'node:url';
4
- import { checkProject } from './editor-contract.mjs';
5
- import { checkFeatureVersion, updateFeatureVersion } from '../../version-update/scripts/update_feature_version.mjs';
6
- import { adapterPath, adapterVersion, bridgePath, bridgeSource, digest, projectFile, readJson, verifyAdapter, verifyBridge, writeProjectFile } from './project-files.mjs';
7
-
8
- const assets = resolve(dirname(fileURLToPath(import.meta.url)), '../assets/runtime');
9
-
10
- export async function installAdapter(project, source = assets) {
11
- const root = await projectFile(project);
12
- const info = await lstat(root);
13
- if (!info.isDirectory()) throw new Error('Project root must be a directory');
14
- await readJson(await projectFile(root, 'package.json'));
15
- const releaseBytes = await readFile(resolve(source, 'release.json'));
16
- const release = JSON.parse(releaseBytes);
17
- if (release.version !== adapterVersion || !release.files?.['dom-ui.mjs'] || !release.files?.['dom-ui.d.mts']) throw new Error('Bundled UI editor adapter release is invalid');
18
- const files = new Map();
19
- for (const [name, expected] of Object.entries(release.files)) {
20
- const bytes = await readFile(await projectFile(source, name));
21
- if (digest(bytes) !== expected) throw new Error(`Bundled adapter is damaged: ${name}`);
22
- files.set(`${adapterPath}/${name}`, bytes);
23
- }
24
- files.set(`${adapterPath}/release.json`, releaseBytes);
25
- files.set(bridgePath, Buffer.from(bridgeSource));
26
- // Complete preflight before changing anything; an edited published version is never replaced.
27
- for (const [name, bytes] of files) {
28
- const target = await projectFile(root, name);
29
- try {
30
- if (!(await readFile(target)).equals(bytes)) throw new Error(`Existing adapter file differs; it was preserved: ${target}`);
31
- } catch (error) { if (error.code !== 'ENOENT') throw error; }
32
- }
33
- for (const [name, bytes] of files) await writeProjectFile(root, name, bytes, { exclusive: true });
34
- await verifyAdapter(root);
35
- await verifyBridge(root);
36
- return { root: adapterPath, version: adapterVersion, bridge: bridgePath, files: files.size };
37
- }
38
-
39
- export async function checkAdaptation(project) {
40
- await verifyAdapter(project);
41
- return checkProject(resolve(project));
42
- }
43
-
44
- export async function markProject(project) {
45
- const result = await checkAdaptation(project);
46
- if (!result.ok) throw new Error(`UI editor compatibility check failed:\n${result.errors.join('\n')}`);
47
- await checkFeatureVersion(project, 'uieditor');
48
- const path = 'SPEC/plan/dev-config.json';
49
- const target = await projectFile(project, path);
50
- let config = {};
51
- let previous = null;
52
- try {
53
- previous = await readFile(target, 'utf8');
54
- config = JSON.parse(previous);
55
- if (!config || typeof config !== 'object' || Array.isArray(config)) throw new Error('Expected an object');
56
- } catch (error) { if (error.code !== 'ENOENT') throw new Error(`Cannot merge ${path}; existing content preserved: ${error.message}`); }
57
- config.ui_editor_compat = true;
58
- config.ui_editor_adapter = { root: adapterPath };
59
- const next = `${JSON.stringify(config, null, 2)}\n`;
60
- if (next !== previous) await writeProjectFile(project, path, next, { expectedContent: previous });
61
- const feature = await updateFeatureVersion(project, 'uieditor', { ifPresent: true });
62
- return { ...result, changed: next !== previous, featureVersion: feature ? feature.currentVersion : null };
63
- }
64
-
65
- export async function runCli(args = process.argv.slice(2)) {
66
- const command = args[0];
67
- const option = args.indexOf('--project');
68
- if (!['install', 'check', 'mark'].includes(command) || option < 0 || !args[option + 1] || args[option + 1].startsWith('--') || args.length !== 3) throw new Error('Usage: node ui-editor.mjs install|check|mark --project <project-directory>');
69
- const project = resolve(args[option + 1]);
70
- if (command === 'install') {
71
- const result = await installAdapter(project);
72
- console.log(`[UI editor] Installed fixed adapter ${result.version} at ${result.root} and bridge ${result.bridge}; gameplay and SDK were preserved.`);
73
- return result;
74
- }
75
- const result = command === 'mark' ? await markProject(project) : await checkAdaptation(project);
76
- for (const file of result.files) console.log(`[UI editor] ${isAbsolute(file.path) ? relative(project, file.path) : file.path}: ${file.nodeCount} nodes`);
77
- if (!result.ok) throw new Error(result.errors.join('\n'));
78
- console.log(`[UI editor] ${result.files.length} layout(s) passed historical-contract-model checks and in-memory edit/reparse. Live editor validation is separate.${command === 'mark' ? ' Compatibility marker saved.' : ''}`);
79
- return result;
80
- }
81
-
82
- if (process.argv[1] && import.meta.url === pathToFileURL(resolve(process.argv[1])).href) {
83
- runCli().catch(error => { console.error(`[UI editor] ${error.message}`); process.exitCode = 1; });
84
- }