@craft_eco/craft-mcp 0.1.25 → 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 (620) hide show
  1. package/README.md +31 -10
  2. package/bin/craft-mcp.mjs +10 -8
  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/game-workflow/publication-materials.mjs +18 -20
  9. package/dist-server/game-workflow/publications.mjs +15 -17
  10. package/dist-server/game-workflow/publish-capture.mjs +21 -57
  11. package/dist-server/integrations/config.mjs +71 -0
  12. package/dist-server/integrations/files.mjs +54 -0
  13. package/dist-server/integrations/hosts.mjs +30 -0
  14. package/dist-server/integrations/install.mjs +86 -0
  15. package/dist-server/integrations/runtime.mjs +71 -0
  16. package/dist-server/mcp/publication-page.mjs +18 -50
  17. package/dist-server/mcp/publish-panel.mjs +28 -35
  18. package/dist-server/mcp/server.mjs +17 -14
  19. package/dist-server/preview/preview-launcher.mjs +9 -2
  20. package/dist-server/preview/preview-start.mjs +2 -2
  21. package/dist-server/upstream/publication-transport.mjs +19 -19
  22. package/package.json +10 -2
  23. package/resources/craft-create/SKILL.md +14 -0
  24. package/resources/craft-game-maker/SKILL.md +77 -71
  25. package/resources/craft-game-maker/js.md +10 -10
  26. package/resources/craft-game-maker/js3d.md +13 -13
  27. package/resources/game_visual_qa.mjs +1149 -1149
  28. package/resources/js/bundle.json +93 -0
  29. package/resources/js/context/AGENTS.md +15 -102
  30. package/resources/js/context/knowledge/AigcWiring.md +5 -196
  31. package/resources/js/context/knowledge/AssetUrl.md +5 -20
  32. package/resources/js/context/knowledge/Layout.md +7 -0
  33. package/resources/js/context/knowledge/Lifecycle.md +6 -27
  34. package/resources/js/context/skills/aigc-generate/SKILL.md +6 -141
  35. package/resources/js/context/skills/asset-search/SKILL.md +5 -62
  36. package/resources/js/context/skills/asset-search/references/resource-config.md +9 -0
  37. package/resources/js/context/skills/export-config/SKILL.md +7 -19
  38. package/resources/js/context/skills/export-config/scripts/export-config.mjs +3 -45
  39. package/resources/js/context/skills/index.json +30 -0
  40. package/resources/js/context/skills/visual-qa/SKILL.md +6 -28
  41. package/resources/js/project/README.md +4 -96
  42. package/resources/js/project/package.json +1 -2
  43. package/resources/js/project/scripts/config-export/panel-resource-path.mjs +106 -0
  44. package/resources/js/{context/skills/export-config/scripts → project/scripts/config-export}/sync-asset-controls.mjs +1 -37
  45. package/resources/js/project/scripts/config-export.mjs +10 -34
  46. package/resources/js3d/bundle.json +104 -0
  47. package/resources/js3d/context/AGENTS.md +16 -85
  48. package/resources/js3d/context/knowledge/AigcWiring.md +9 -0
  49. package/resources/js3d/context/knowledge/AssetUrl.md +9 -0
  50. package/resources/js3d/context/knowledge/CodingGuide/Pitfalls.md +9 -67
  51. package/resources/js3d/context/knowledge/Layout.md +7 -0
  52. package/resources/js3d/context/knowledge/Runtime.md +5 -30
  53. package/resources/js3d/context/skills/aigc-integration/SKILL.md +6 -164
  54. package/resources/js3d/context/skills/asset-search/SKILL.md +5 -171
  55. package/resources/js3d/context/skills/asset-search/references/resource-config.md +6 -94
  56. package/resources/js3d/context/skills/asset-usage-audit/SKILL.md +6 -82
  57. package/resources/js3d/context/skills/export-config/SKILL.md +7 -11
  58. package/resources/js3d/context/skills/export-config/scripts/export-config.mjs +3 -55
  59. package/resources/js3d/context/skills/index.json +42 -0
  60. package/resources/js3d/context/skills/performance-audit/SKILL.md +8 -153
  61. package/resources/js3d/context/skills/visual-qa/SKILL.md +14 -0
  62. package/resources/js3d/project/README.md +4 -103
  63. package/resources/js3d/project/package.json +1 -2
  64. package/resources/js3d/project/scripts/config-export/panel-resource-path.mjs +106 -0
  65. package/resources/js3d/{context/skills/export-config/scripts → project/scripts/config-export}/sync-scene-assets.mjs +3 -28
  66. package/resources/js3d/project/scripts/config-export.mjs +12 -34
  67. package/vendor/agent-cli/dist/src/artifacts/build-failure.d.ts +8 -0
  68. package/vendor/agent-cli/dist/src/artifacts/build-failure.d.ts.map +1 -0
  69. package/vendor/agent-cli/dist/src/artifacts/build-failure.js +39 -0
  70. package/vendor/agent-cli/dist/src/artifacts/build-failure.js.map +1 -0
  71. package/vendor/agent-cli/dist/src/artifacts/dependency-toolchain.d.ts +5 -0
  72. package/vendor/agent-cli/dist/src/artifacts/dependency-toolchain.d.ts.map +1 -0
  73. package/vendor/agent-cli/dist/src/artifacts/dependency-toolchain.js +45 -0
  74. package/vendor/agent-cli/dist/src/artifacts/dependency-toolchain.js.map +1 -0
  75. package/vendor/agent-cli/dist/src/artifacts/preinstalled-dependencies.d.ts.map +1 -1
  76. package/vendor/agent-cli/dist/src/artifacts/preinstalled-dependencies.js +2 -1
  77. package/vendor/agent-cli/dist/src/artifacts/preinstalled-dependencies.js.map +1 -1
  78. package/vendor/agent-cli/dist/src/artifacts/prepare.d.ts +2 -0
  79. package/vendor/agent-cli/dist/src/artifacts/prepare.d.ts.map +1 -1
  80. package/vendor/agent-cli/dist/src/artifacts/prepare.js +7 -2
  81. package/vendor/agent-cli/dist/src/artifacts/prepare.js.map +1 -1
  82. package/vendor/agent-cli/dist/src/artifacts/process-artifacts.d.ts +2 -0
  83. package/vendor/agent-cli/dist/src/artifacts/process-artifacts.d.ts.map +1 -1
  84. package/vendor/agent-cli/dist/src/artifacts/process-artifacts.js +27 -16
  85. package/vendor/agent-cli/dist/src/artifacts/process-artifacts.js.map +1 -1
  86. package/vendor/agent-cli/dist/src/artifacts/scene-asset-references.d.ts +14 -0
  87. package/vendor/agent-cli/dist/src/artifacts/scene-asset-references.d.ts.map +1 -0
  88. package/vendor/agent-cli/dist/src/artifacts/scene-asset-references.js +119 -0
  89. package/vendor/agent-cli/dist/src/artifacts/scene-asset-references.js.map +1 -0
  90. package/vendor/agent-cli/dist/src/artifacts/static.d.ts.map +1 -1
  91. package/vendor/agent-cli/dist/src/artifacts/static.js +20 -6
  92. package/vendor/agent-cli/dist/src/artifacts/static.js.map +1 -1
  93. package/vendor/agent-cli/dist/src/cli/process-protocol.d.ts.map +1 -1
  94. package/vendor/agent-cli/dist/src/cli/process-protocol.js +24 -2
  95. package/vendor/agent-cli/dist/src/cli/process-protocol.js.map +1 -1
  96. package/vendor/agent-cli/dist/src/cli/process-steering.d.ts +21 -0
  97. package/vendor/agent-cli/dist/src/cli/process-steering.d.ts.map +1 -0
  98. package/vendor/agent-cli/dist/src/cli/process-steering.js +66 -0
  99. package/vendor/agent-cli/dist/src/cli/process-steering.js.map +1 -0
  100. package/vendor/agent-cli/dist/src/context/user-skill-bundle.js +1 -1
  101. package/vendor/agent-cli/dist/src/context/user-skill-bundle.js.map +1 -1
  102. package/vendor/agent-cli/dist/src/index.d.ts +4 -1
  103. package/vendor/agent-cli/dist/src/index.d.ts.map +1 -1
  104. package/vendor/agent-cli/dist/src/index.js +3 -0
  105. package/vendor/agent-cli/dist/src/index.js.map +1 -1
  106. package/vendor/agent-cli/dist/src/protocol/messages/messages.gen.d.ts +29 -1
  107. package/vendor/agent-cli/dist/src/protocol/messages/messages.gen.d.ts.map +1 -1
  108. package/vendor/agent-cli/dist/src/protocol/messages/messages.gen.js +18 -1
  109. package/vendor/agent-cli/dist/src/protocol/messages/messages.gen.js.map +1 -1
  110. package/vendor/agent-cli/dist/src/session/client.d.ts +10 -0
  111. package/vendor/agent-cli/dist/src/session/client.d.ts.map +1 -1
  112. package/vendor/agent-cli/dist/src/session/client.js +15 -5
  113. package/vendor/agent-cli/dist/src/session/client.js.map +1 -1
  114. package/vendor/agent-cli/dist/src/session/link-session.d.ts +3 -0
  115. package/vendor/agent-cli/dist/src/session/link-session.d.ts.map +1 -1
  116. package/vendor/agent-cli/dist/src/session/link-session.js +14 -1
  117. package/vendor/agent-cli/dist/src/session/link-session.js.map +1 -1
  118. package/vendor/agent-cli/dist/src/session/process-observability.d.ts +3 -0
  119. package/vendor/agent-cli/dist/src/session/process-observability.d.ts.map +1 -1
  120. package/vendor/agent-cli/dist/src/session/process-observability.js +11 -0
  121. package/vendor/agent-cli/dist/src/session/process-observability.js.map +1 -1
  122. package/vendor/agent-cli/dist/src/session/process-request.d.ts +3 -2
  123. package/vendor/agent-cli/dist/src/session/process-request.d.ts.map +1 -1
  124. package/vendor/agent-cli/dist/src/session/process-request.js +27 -9
  125. package/vendor/agent-cli/dist/src/session/process-request.js.map +1 -1
  126. package/vendor/agent-cli/dist/src/session/run-start-body.d.ts +1 -0
  127. package/vendor/agent-cli/dist/src/session/run-start-body.d.ts.map +1 -1
  128. package/vendor/agent-cli/dist/src/session/run-start-body.js +8 -3
  129. package/vendor/agent-cli/dist/src/session/run-start-body.js.map +1 -1
  130. package/vendor/agent-cli/dist/src/session/run-steer.d.ts +42 -0
  131. package/vendor/agent-cli/dist/src/session/run-steer.d.ts.map +1 -0
  132. package/vendor/agent-cli/dist/src/session/run-steer.js +205 -0
  133. package/vendor/agent-cli/dist/src/session/run-steer.js.map +1 -0
  134. package/vendor/agent-cli/dist/src/shared/types.d.ts +6 -0
  135. package/vendor/agent-cli/dist/src/shared/types.d.ts.map +1 -1
  136. package/vendor/agent-cli/dist/src/tools/context-program-receipt.d.ts +21 -0
  137. package/vendor/agent-cli/dist/src/tools/context-program-receipt.d.ts.map +1 -0
  138. package/vendor/agent-cli/dist/src/tools/context-program-receipt.js +102 -0
  139. package/vendor/agent-cli/dist/src/tools/context-program-receipt.js.map +1 -0
  140. package/vendor/agent-cli/dist/src/tools/context-program.d.ts.map +1 -1
  141. package/vendor/agent-cli/dist/src/tools/context-program.js +3 -0
  142. package/vendor/agent-cli/dist/src/tools/context-program.js.map +1 -1
  143. package/resources/js/context/.role/AGENTS_DESIGN.md +0 -9
  144. package/resources/js/context/agents/aigc-asset.md +0 -168
  145. package/resources/js/context/knowledge/AigcEnabled.md +0 -49
  146. package/resources/js/context/knowledge/FrontendComponents.md +0 -17
  147. package/resources/js/context/knowledge/MobileAdaptation.md +0 -73
  148. package/resources/js/context/knowledge/MobileAdapted.md +0 -36
  149. package/resources/js/context/knowledge/Multiplayer/GameplaySystemKnowledge.md +0 -114
  150. package/resources/js/context/knowledge/Multiplayer/OverviewKnowledge.md +0 -115
  151. package/resources/js/context/knowledge/Multiplayer/StateSyncKnowledge.md +0 -392
  152. package/resources/js/context/knowledge/PlatformServices.md +0 -190
  153. package/resources/js/context/knowledge/ProjectDisplayConfig.md +0 -35
  154. package/resources/js/context/knowledge/Subsystems/Optional/MultiplayerManagerKnowledge.md +0 -242
  155. package/resources/js/context/knowledge/Ui.md +0 -11
  156. package/resources/js/context/knowledge/UiEditorCompat.md +0 -21
  157. package/resources/js/context/rules/MultiplayerCapability.md +0 -23
  158. package/resources/js/context/rules/MultiplayerRoomEntryUX.md +0 -63
  159. package/resources/js/context/rules/PlatformBoundaryModules.md +0 -44
  160. package/resources/js/context/rules/preview_ready.md +0 -8
  161. package/resources/js/context/skills/aigc-generate/knowledge/audio.md +0 -39
  162. package/resources/js/context/skills/aigc-generate/knowledge/batch-replace.md +0 -26
  163. package/resources/js/context/skills/aigc-generate/knowledge/character2d.md +0 -132
  164. package/resources/js/context/skills/aigc-generate/knowledge/non-stepwise-aigc.md +0 -53
  165. package/resources/js/context/skills/aigc-generate/knowledge/texture-prop.md +0 -52
  166. package/resources/js/context/skills/aigc-generate/knowledge/texture-scene.md +0 -191
  167. package/resources/js/context/skills/aigc-generate/knowledge/texture-ui.md +0 -55
  168. package/resources/js/context/skills/asset-search/scripts/asset_display.mjs +0 -62
  169. package/resources/js/context/skills/asset-search/scripts/config.json +0 -5
  170. package/resources/js/context/skills/asset-search/scripts/provided_assets.mjs +0 -125
  171. package/resources/js/context/skills/asset-search/scripts/search.mjs +0 -760
  172. package/resources/js/context/skills/asset-search/scripts/sprite_source_materializer.mjs +0 -657
  173. package/resources/js/context/skills/asset-search/strategies/anim2d.md +0 -42
  174. package/resources/js/context/skills/asset-search/strategies/audio.md +0 -34
  175. package/resources/js/context/skills/asset-search/strategies/effect2d.md +0 -31
  176. package/resources/js/context/skills/asset-search/strategies/texture-prop.md +0 -22
  177. package/resources/js/context/skills/asset-search/strategies/ui-common.md +0 -40
  178. package/resources/js/context/skills/asset-search/strategies/ui-style.md +0 -28
  179. package/resources/js/context/skills/export-config/scripts/translate-asset-titles.mjs +0 -161
  180. package/resources/js/context/skills/lightgame-runtime-adapt/SKILL.md +0 -93
  181. package/resources/js/context/skills/lightgame-runtime-adapt/project/game-runtime.json +0 -7
  182. package/resources/js/context/skills/lightgame-runtime-adapt/project/package.json +0 -22
  183. package/resources/js/context/skills/lightgame-runtime-adapt/project/runtime/lightgame/1.1.0/platform/identity/qq-ai-game-sdk.min.js +0 -5
  184. package/resources/js/context/skills/lightgame-runtime-adapt/project/runtime/lightgame/1.1.0/platform/identity/qq-session.mjs +0 -208
  185. package/resources/js/context/skills/lightgame-runtime-adapt/project/runtime/lightgame/1.1.0/platform/identity/shared.mjs +0 -37
  186. package/resources/js/context/skills/lightgame-runtime-adapt/project/runtime/lightgame/1.1.0/platform/platform-capture-video.mjs +0 -227
  187. package/resources/js/context/skills/lightgame-runtime-adapt/project/runtime/lightgame/1.1.0/platform/platform-service.d.mts +0 -31
  188. package/resources/js/context/skills/lightgame-runtime-adapt/project/runtime/lightgame/1.1.0/platform/platform-service.mjs +0 -272
  189. package/resources/js/context/skills/lightgame-runtime-adapt/project/runtime/lightgame/1.1.0/platform/platform.d.mts +0 -79
  190. package/resources/js/context/skills/lightgame-runtime-adapt/project/runtime/lightgame/1.1.0/platform/platform.mjs +0 -29
  191. package/resources/js/context/skills/lightgame-runtime-adapt/project/runtime/lightgame/1.1.0/release.json +0 -22
  192. package/resources/js/context/skills/lightgame-runtime-adapt/project/runtime/lightgame/1.1.0/tooling/cli.mjs +0 -16
  193. package/resources/js/context/skills/lightgame-runtime-adapt/project/runtime/lightgame/1.1.0/tooling/project.d.mts +0 -4
  194. package/resources/js/context/skills/lightgame-runtime-adapt/project/runtime/lightgame/1.1.0/tooling/project.mjs +0 -50
  195. package/resources/js/context/skills/lightgame-runtime-adapt/project/runtime/lightgame/1.1.0/tooling/vite.d.mts +0 -3
  196. package/resources/js/context/skills/lightgame-runtime-adapt/project/runtime/lightgame/1.1.0/tooling/vite.mjs +0 -72
  197. package/resources/js/context/skills/lightgame-runtime-adapt/project/runtime/lightgame/1.1.0/tools/assets.d.mts +0 -24
  198. package/resources/js/context/skills/lightgame-runtime-adapt/project/runtime/lightgame/1.1.0/tools/assets.mjs +0 -2
  199. package/resources/js/context/skills/lightgame-runtime-adapt/project/runtime/lightgame/1.1.0/tools/astc.d.mts +0 -10
  200. package/resources/js/context/skills/lightgame-runtime-adapt/project/runtime/lightgame/1.1.0/tools/astc.mjs +0 -1
  201. package/resources/js/context/skills/lightgame-runtime-adapt/project/scripts/config-export.mjs +0 -37
  202. package/resources/js/context/skills/lightgame-runtime-adapt/project/scripts/refresh-runtime.mjs +0 -50
  203. package/resources/js/context/skills/lightgame-runtime-adapt/project/scripts/skill-modules/export-config/cli.mjs +0 -20
  204. package/resources/js/context/skills/lightgame-runtime-adapt/project/scripts/skill-modules/export-config/config.d.mts +0 -19
  205. package/resources/js/context/skills/lightgame-runtime-adapt/project/scripts/skill-modules/export-config/config.mjs +0 -1
  206. package/resources/js/context/skills/lightgame-runtime-adapt/project/scripts/skill-modules/export-config/installed.json +0 -6
  207. package/resources/js/context/skills/lightgame-runtime-adapt/project/scripts/skill-modules/export-config/project.d.mts +0 -6
  208. package/resources/js/context/skills/lightgame-runtime-adapt/project/scripts/skill-modules/export-config/project.mjs +0 -77
  209. package/resources/js/context/skills/lightgame-runtime-adapt/project/scripts/skill-modules/export-config/vite.d.mts +0 -2
  210. package/resources/js/context/skills/lightgame-runtime-adapt/project/scripts/skill-modules/export-config/vite.mjs +0 -34
  211. package/resources/js/context/skills/lightgame-runtime-adapt/project/src/display/ui-stage.ts +0 -156
  212. package/resources/js/context/skills/lightgame-runtime-adapt/project/src/display/viewport.ts +0 -249
  213. package/resources/js/context/skills/lightgame-runtime-adapt/project/src/main.ts +0 -87
  214. package/resources/js/context/skills/lightgame-runtime-adapt/project/src/platform.ts +0 -2
  215. package/resources/js/context/skills/lightgame-runtime-adapt/project/src/screenUi.ts +0 -185
  216. package/resources/js/context/skills/lightgame-runtime-adapt/project/src/style.css +0 -294
  217. package/resources/js/context/skills/lightgame-runtime-adapt/project/tsconfig.json +0 -20
  218. package/resources/js/context/skills/lightgame-runtime-adapt/project/vite.config.ts +0 -5
  219. package/resources/js/context/skills/lightgame-runtime-adapt/scripts/install-template.mjs +0 -159
  220. package/resources/js/context/skills/mobile-adaptation/SKILL.md +0 -277
  221. package/resources/js/context/skills/mobile-adaptation/assets/example/src/input/input-config.json +0 -50
  222. package/resources/js/context/skills/mobile-adaptation/assets/example/src/input/input-layer.ts +0 -862
  223. package/resources/js/context/skills/mobile-adaptation/assets/example/src/input/input-platform.ts +0 -92
  224. package/resources/js/context/skills/mobile-adaptation/assets/example/src/input/input-primitives.ts +0 -254
  225. package/resources/js/context/skills/mobile-adaptation/assets/example/src/input/look-pad.ts +0 -245
  226. package/resources/js/context/skills/mobile-adaptation/assets/example/src/ui/touch-controls.css +0 -135
  227. package/resources/js/context/skills/mobile-adaptation/references/input-config.md +0 -342
  228. package/resources/js/context/skills/mobile-adaptation/references/verification.md +0 -140
  229. package/resources/js/context/skills/mobile-adaptation/references/web-audio.md +0 -11
  230. package/resources/js/context/skills/mobile-compat-qa/SKILL.md +0 -53
  231. package/resources/js/context/skills/mobile-compat-qa/references/startup-diagnosis.md +0 -23
  232. package/resources/js/context/skills/mobile-compat-qa/references/web-lifecycle.md +0 -20
  233. package/resources/js/context/skills/mobile-compat-qa/references/web-performance.md +0 -19
  234. package/resources/js/context/skills/optimization-suggestions/SKILL.md +0 -89
  235. package/resources/js/context/skills/platform-services/SKILL.md +0 -101
  236. package/resources/js/context/skills/platform-services/assets/modules/MultiplayerManager.ts +0 -465
  237. package/resources/js/context/skills/platform-services/assets/modules/eventBus.ts +0 -57
  238. package/resources/js/context/skills/platform-services/assets/modules/identity/qq-ai-game-sdk.min.js +0 -5
  239. package/resources/js/context/skills/platform-services/assets/modules/identity/qq-session.mjs +0 -208
  240. package/resources/js/context/skills/platform-services/assets/modules/identity/shared.mjs +0 -37
  241. package/resources/js/context/skills/platform-services/assets/modules/leaderboard.d.mts +0 -39
  242. package/resources/js/context/skills/platform-services/assets/modules/leaderboard.mjs +0 -1
  243. package/resources/js/context/skills/platform-services/assets/modules/log.ts +0 -35
  244. package/resources/js/context/skills/platform-services/assets/modules/multiplayer/clockSync.ts +0 -61
  245. package/resources/js/context/skills/platform-services/assets/modules/multiplayer/dsClient.ts +0 -52
  246. package/resources/js/context/skills/platform-services/assets/modules/multiplayer/payloadCodec.ts +0 -30
  247. package/resources/js/context/skills/platform-services/assets/modules/multiplayer/roomHttp.ts +0 -89
  248. package/resources/js/context/skills/platform-services/assets/modules/multiplayer/types.ts +0 -47
  249. package/resources/js/context/skills/platform-services/assets/modules/platform-service.d.mts +0 -31
  250. package/resources/js/context/skills/platform-services/assets/modules/platform-service.mjs +0 -272
  251. package/resources/js/context/skills/platform-services/assets/modules/save.d.mts +0 -49
  252. package/resources/js/context/skills/platform-services/assets/modules/save.mjs +0 -1
  253. package/resources/js/context/skills/platform-services/assets/scaffold/ds/main.mjs +0 -7
  254. package/resources/js/context/skills/platform-services/assets/scaffold/ds/rooms/SyncRoom.mjs +0 -264
  255. package/resources/js/context/skills/platform-services/assets/scaffold/ds/rooms/syncSchema.mjs +0 -39
  256. package/resources/js/context/skills/platform-services/references/SERVER_GUIDE.md +0 -139
  257. package/resources/js/context/skills/platform-services/references/api_reference.md +0 -18
  258. package/resources/js/context/skills/platform-services/references/leaderboard_playbook.md +0 -96
  259. package/resources/js/context/skills/platform-services/scripts/install.mjs +0 -148
  260. package/resources/js/context/skills/resolution-adaptation/SKILL.md +0 -47
  261. package/resources/js/context/skills/resolution-adaptation/assets/display/ui-stage.ts +0 -156
  262. package/resources/js/context/skills/resolution-adaptation/assets/display/viewport.ts +0 -249
  263. package/resources/js/context/skills/resolution-adaptation/assets/example/main.ts +0 -98
  264. package/resources/js/context/skills/resolution-adaptation/assets/example/ui-tokens.css +0 -200
  265. package/resources/js/context/skills/resolution-adaptation/references/audit.md +0 -31
  266. package/resources/js/context/skills/resolution-adaptation/references/device-safe-area.md +0 -40
  267. package/resources/js/context/skills/resolution-adaptation/references/game-ui-occlusion.md +0 -18
  268. package/resources/js/context/skills/resolution-adaptation/references/layout-rules.md +0 -15
  269. package/resources/js/context/skills/resolution-adaptation/references/troubleshooting.md +0 -34
  270. package/resources/js/context/skills/resolution-adaptation/references/viewport-api.md +0 -38
  271. package/resources/js/context/skills/resolution-adaptation/references/world-resize.md +0 -55
  272. package/resources/js/context/skills/resolution-adaptation/scripts/aspect_audit.mjs +0 -448
  273. package/resources/js/context/skills/scene-editor-compat/SKILL.md +0 -94
  274. package/resources/js/context/skills/scene-editor-compat/assets/example/localcraft.assets.json +0 -13
  275. package/resources/js/context/skills/scene-editor-compat/assets/example/localcraft.scene-editor.json +0 -6
  276. package/resources/js/context/skills/scene-editor-compat/assets/example/src/game/sceneAdapter.ts +0 -25
  277. package/resources/js/context/skills/scene-editor-compat/assets/example/src/scenes/main.scene.json +0 -18
  278. package/resources/js/context/skills/scene-editor-compat/assets/runtime/release.json +0 -7
  279. package/resources/js/context/skills/scene-editor-compat/assets/runtime/scene.d.mts +0 -42
  280. package/resources/js/context/skills/scene-editor-compat/assets/runtime/scene.mjs +0 -144
  281. package/resources/js/context/skills/scene-editor-compat/docs/contract.md +0 -330
  282. package/resources/js/context/skills/scene-editor-compat/docs/resource-sync.md +0 -64
  283. package/resources/js/context/skills/scene-editor-compat/docs/runtime-state.md +0 -28
  284. package/resources/js/context/skills/scene-editor-compat/docs/terrain-contract.md +0 -47
  285. package/resources/js/context/skills/scene-editor-compat/docs/visual-contract.md +0 -64
  286. package/resources/js/context/skills/scene-editor-compat/examples/platformer-ts/localcraft.assets.json +0 -38
  287. package/resources/js/context/skills/scene-editor-compat/examples/platformer-ts/localcraft.scene-editor.json +0 -9
  288. package/resources/js/context/skills/scene-editor-compat/examples/platformer-ts/src/game/sceneAdapter.ts +0 -59
  289. package/resources/js/context/skills/scene-editor-compat/examples/platformer-ts/src/game/sceneBlockers.ts +0 -30
  290. package/resources/js/context/skills/scene-editor-compat/examples/platformer-ts/src/game/sceneFileAssets.ts +0 -66
  291. package/resources/js/context/skills/scene-editor-compat/examples/platformer-ts/src/scenes/Main.Scene.ts +0 -20
  292. package/resources/js/context/skills/scene-editor-compat/examples/platformer-ts/src/scenes/SceneTypes.ts +0 -26
  293. package/resources/js/context/skills/scene-editor-compat/references/contract.md +0 -73
  294. package/resources/js/context/skills/scene-editor-compat/scripts/apply_scene_marker.py +0 -162
  295. package/resources/js/context/skills/scene-editor-compat/scripts/check_scene_contract.py +0 -853
  296. package/resources/js/context/skills/scene-editor-compat/scripts/check_scene_resource_urls.py +0 -173
  297. package/resources/js/context/skills/scene-editor-compat/scripts/scene-editor.mjs +0 -427
  298. package/resources/js/context/skills/scene-editor-compat/version.json +0 -1
  299. package/resources/js/context/skills/ui-editor-compat/SKILL.md +0 -48
  300. package/resources/js/context/skills/ui-editor-compat/assets/example/hud/WidgetLayout_Hud.ts +0 -35
  301. package/resources/js/context/skills/ui-editor-compat/assets/example/hud/WidgetLogic_Hud.ts +0 -74
  302. package/resources/js/context/skills/ui-editor-compat/assets/example/hud/hud.css +0 -60
  303. package/resources/js/context/skills/ui-editor-compat/assets/runtime/dom-ui.d.mts +0 -45
  304. package/resources/js/context/skills/ui-editor-compat/assets/runtime/dom-ui.mjs +0 -265
  305. package/resources/js/context/skills/ui-editor-compat/assets/runtime/release.json +0 -7
  306. package/resources/js/context/skills/ui-editor-compat/references/contract.md +0 -132
  307. package/resources/js/context/skills/ui-editor-compat/scripts/editor-contract.mjs +0 -327
  308. package/resources/js/context/skills/ui-editor-compat/scripts/project-files.mjs +0 -80
  309. package/resources/js/context/skills/ui-editor-compat/scripts/ui-editor.mjs +0 -84
  310. package/resources/js/context/skills/version-update/SKILL.md +0 -192
  311. package/resources/js/context/skills/version-update/scripts/check_runtime_refs.mjs +0 -129
  312. package/resources/js/context/skills/version-update/scripts/feature_snapshot.mjs +0 -159
  313. package/resources/js/context/skills/version-update/scripts/update_feature_version.mjs +0 -157
  314. package/resources/js/context/skills/version-update/upgrade_diffs/.gitkeep +0 -0
  315. package/resources/js/context/version/version.json +0 -1
  316. package/resources/js/project/SPEC/assist/.gitkeep +0 -0
  317. package/resources/js/project/SPEC/guide/.gitkeep +0 -0
  318. package/resources/js/project/SPEC/plan/.gitkeep +0 -0
  319. package/resources/js/project/SPEC/readme.md +0 -6
  320. package/resources/js/project/SPEC/res/.gitkeep +0 -0
  321. package/resources/js/project/SPEC/task-item/.gitkeep +0 -0
  322. package/resources/js/project/runtime/lightgame/1.0.0/platform/config.d.mts +0 -19
  323. package/resources/js/project/runtime/lightgame/1.0.0/platform/config.mjs +0 -1
  324. package/resources/js/project/runtime/lightgame/1.0.0/platform/leaderboard.d.mts +0 -39
  325. package/resources/js/project/runtime/lightgame/1.0.0/platform/leaderboard.mjs +0 -1
  326. package/resources/js/project/runtime/lightgame/1.0.0/platform/platform-capture-video.mjs +0 -227
  327. package/resources/js/project/runtime/lightgame/1.0.0/platform/platform-service.d.mts +0 -25
  328. package/resources/js/project/runtime/lightgame/1.0.0/platform/platform-service.mjs +0 -1
  329. package/resources/js/project/runtime/lightgame/1.0.0/platform/platform.d.mts +0 -79
  330. package/resources/js/project/runtime/lightgame/1.0.0/platform/platform.mjs +0 -29
  331. package/resources/js/project/runtime/lightgame/1.0.0/platform/save.d.mts +0 -49
  332. package/resources/js/project/runtime/lightgame/1.0.0/platform/save.mjs +0 -1
  333. package/resources/js/project/runtime/lightgame/1.0.0/release.json +0 -37
  334. package/resources/js/project/runtime/lightgame/1.0.0/tooling/cli.mjs +0 -2
  335. package/resources/js/project/runtime/lightgame/1.0.0/tooling/project.d.mts +0 -8
  336. package/resources/js/project/runtime/lightgame/1.0.0/tooling/project.mjs +0 -2
  337. package/resources/js/project/runtime/lightgame/1.0.0/tooling/vite.d.mts +0 -3
  338. package/resources/js/project/runtime/lightgame/1.0.0/tooling/vite.mjs +0 -8
  339. package/resources/js/project/runtime/lightgame/1.0.0/tools/assets.d.mts +0 -24
  340. package/resources/js/project/runtime/lightgame/1.0.0/tools/assets.mjs +0 -2
  341. package/resources/js/project/runtime/lightgame/1.0.0/tools/astc.d.mts +0 -10
  342. package/resources/js/project/runtime/lightgame/1.0.0/tools/astc.mjs +0 -1
  343. package/resources/js/project/runtime/lightgame/1.0.0/tools/audio.d.mts +0 -20
  344. package/resources/js/project/runtime/lightgame/1.0.0/tools/audio.mjs +0 -1
  345. package/resources/js/project/runtime/lightgame/1.0.0/tools/canvas.d.mts +0 -21
  346. package/resources/js/project/runtime/lightgame/1.0.0/tools/canvas.mjs +0 -1
  347. package/resources/js/project/runtime/lightgame/1.0.0/tools/input.d.mts +0 -17
  348. package/resources/js/project/runtime/lightgame/1.0.0/tools/input.mjs +0 -1
  349. package/resources/js/project/runtime/lightgame/1.0.0/tools/three.d.mts +0 -40
  350. package/resources/js/project/runtime/lightgame/1.0.0/tools/three.mjs +0 -1
  351. package/resources/js/project/runtime/lightgame/1.0.0/tools/ui.d.mts +0 -10
  352. package/resources/js/project/runtime/lightgame/1.0.0/tools/ui.mjs +0 -1
  353. package/resources/js/project/runtime/lightgame/1.0.0/tools/video.d.mts +0 -8
  354. package/resources/js/project/runtime/lightgame/1.0.0/tools/video.mjs +0 -1
  355. package/resources/js/project/scripts/refresh-runtime.mjs +0 -50
  356. package/resources/js/project/vendor/core-manager-js/package.json +0 -33
  357. package/resources/js/project/vendor/core-manager-js/src/.versions.json +0 -42
  358. package/resources/js/project/vendor/core-manager-js/src/CoreManagerPlugin.ts +0 -41
  359. package/resources/js/project/vendor/core-manager-js/src/assetManager/AssetRef.ts +0 -93
  360. package/resources/js/project/vendor/core-manager-js/src/assetManager/AstcFirstImageFile.ts +0 -203
  361. package/resources/js/project/vendor/core-manager-js/src/assetManager/AstcTextureLoader.ts +0 -106
  362. package/resources/js/project/vendor/core-manager-js/src/assetManager/resolveAssetUrl.test.ts +0 -25
  363. package/resources/js/project/vendor/core-manager-js/src/assetManager/resolveAssetUrl.ts +0 -21
  364. package/resources/js/project/vendor/core-manager-js/src/audioManager/AudioManager.test.ts +0 -65
  365. package/resources/js/project/vendor/core-manager-js/src/audioManager/AudioManager.ts +0 -340
  366. package/resources/js/project/vendor/core-manager-js/src/configManager/FeatureConfig.ts +0 -87
  367. package/resources/js/project/vendor/core-manager-js/src/configManager/tuneRuntime.d.mts +0 -92
  368. package/resources/js/project/vendor/core-manager-js/src/configManager/tuneRuntime.mjs +0 -271
  369. package/resources/js/project/vendor/core-manager-js/src/index.ts +0 -31
  370. package/resources/js/project/vendor/core-manager-js/src/inputManager/InputConfig.ts +0 -81
  371. package/resources/js/project/vendor/core-manager-js/src/inputManager/InputManager.test.ts +0 -43
  372. package/resources/js/project/vendor/core-manager-js/src/inputManager/InputManager.ts +0 -32
  373. package/resources/js/project/vendor/core-manager-js/src/inputManager/InputRuntime.test.ts +0 -141
  374. package/resources/js/project/vendor/core-manager-js/src/inputManager/InputRuntime.ts +0 -20
  375. package/resources/js/project/vendor/core-manager-js/src/inputManager/KeyboardProvider.ts +0 -183
  376. package/resources/js/project/vendor/core-manager-js/src/inputManager/TouchProvider.ts +0 -304
  377. package/resources/js/project/vendor/core-manager-js/src/inputManager/VirtualJoystick.ts +0 -351
  378. package/resources/js/project/vendor/core-manager-js/src/inputManager/_internal/InputManagerImpl.ts +0 -180
  379. package/resources/js/project/vendor/core-manager-js/src/inputManager/icons.b64 +0 -13
  380. package/resources/js/project/vendor/core-manager-js/src/inputManager/icons.b64.d.ts +0 -14
  381. package/resources/js/project/vendor/core-manager-js/src/inputManager/input_config.example.json +0 -68
  382. package/resources/js/project/vendor/core-manager-js/src/logManager/DebugConsole.ts +0 -433
  383. package/resources/js/project/vendor/core-manager-js/src/logManager/LogCapture.ts +0 -118
  384. package/resources/js/project/vendor/core-manager-js/src/logManager/LogManager.ts +0 -444
  385. package/resources/js/project/vendor/core-manager-js/src/logManager/ScreenCapture.ts +0 -485
  386. package/resources/js/project/vendor/core-manager-js/src/logManager/ScreenCaptureVideo.test.ts +0 -66
  387. package/resources/js/project/vendor/core-manager-js/src/logManager/ScreenCaptureVideo.ts +0 -149
  388. package/resources/js/project/vendor/core-manager-js/src/logManager/icons.b64 +0 -9
  389. package/resources/js/project/vendor/core-manager-js/src/resourceManager/AssetUrlResolver.ts +0 -29
  390. package/resources/js/project/vendor/core-manager-js/src/resourceManager/ResourceManager.test.ts +0 -88
  391. package/resources/js/project/vendor/core-manager-js/src/resourceManager/ResourceManager.ts +0 -122
  392. package/resources/js/project/vendor/core-manager-js/src/runtime.ts +0 -24
  393. package/resources/js/project/vendor/core-manager-js/src/spriteAnimManager/CharacterEntity.ts +0 -318
  394. package/resources/js/project/vendor/core-manager-js/src/spriteAnimManager/CharacterPhysicsBinding.test.ts +0 -151
  395. package/resources/js/project/vendor/core-manager-js/src/spriteAnimManager/CharacterPhysicsBinding.ts +0 -235
  396. package/resources/js/project/vendor/core-manager-js/src/spriteAnimManager/EffectComposite.test.ts +0 -98
  397. package/resources/js/project/vendor/core-manager-js/src/spriteAnimManager/EffectComposite.ts +0 -94
  398. package/resources/js/project/vendor/core-manager-js/src/spriteAnimManager/EffectEntity.ts +0 -209
  399. package/resources/js/project/vendor/core-manager-js/src/spriteAnimManager/FxManager.test.ts +0 -106
  400. package/resources/js/project/vendor/core-manager-js/src/spriteAnimManager/FxManager.ts +0 -341
  401. package/resources/js/project/vendor/core-manager-js/src/spriteAnimManager/FxRecipe.test.ts +0 -68
  402. package/resources/js/project/vendor/core-manager-js/src/spriteAnimManager/FxRecipe.ts +0 -236
  403. package/resources/js/project/vendor/core-manager-js/src/spriteAnimManager/SpriteAnimManager.test.ts +0 -22
  404. package/resources/js/project/vendor/core-manager-js/src/spriteAnimManager/SpriteAnimManager.ts +0 -29
  405. package/resources/js/project/vendor/core-manager-js/src/spriteAnimManager/SpriteEntity.test.ts +0 -197
  406. package/resources/js/project/vendor/core-manager-js/src/uiManager/DomUiContracts.ts +0 -9
  407. package/resources/js/project/vendor/core-manager-js/src/uiManager/DomUiKit.ts +0 -555
  408. package/resources/js/project/vendor/core-manager-js/src/uiManager/UIFacadePlugin.test.ts +0 -112
  409. package/resources/js/project/vendor/core-manager-js/src/uiManager/UIFacadePlugin.ts +0 -178
  410. package/resources/js/project/vendor/core-manager-js/src/uiManager/ui-base.css +0 -246
  411. package/resources/js/project/vendor/core-manager-js/src/videoManager/VideoManager.ts +0 -139
  412. package/resources/js/project/vendor/core-manager-js/tsconfig.json +0 -15
  413. package/resources/js/project/vendor/run.sh +0 -4
  414. package/resources/js/project/version/craft_feature_version.json +0 -42
  415. package/resources/js/project/version/project_feature_version.json +0 -11
  416. package/resources/js3d/context/.role/AGENTS_DESIGN.md +0 -9
  417. package/resources/js3d/context/knowledge/3D/PoseInterpolationKnowledge.md +0 -75
  418. package/resources/js3d/context/knowledge/CodingGuide/SceneEditableGuide.md +0 -42
  419. package/resources/js3d/context/knowledge/FrontendComponents.md +0 -19
  420. package/resources/js3d/context/knowledge/MobileAdaptation.md +0 -73
  421. package/resources/js3d/context/knowledge/MobileAdapted.md +0 -36
  422. package/resources/js3d/context/knowledge/Multiplayer/GameplaySystemKnowledge.md +0 -114
  423. package/resources/js3d/context/knowledge/Multiplayer/OverviewKnowledge.md +0 -117
  424. package/resources/js3d/context/knowledge/Multiplayer/StateSyncKnowledge.md +0 -430
  425. package/resources/js3d/context/knowledge/PlatformServices.md +0 -190
  426. package/resources/js3d/context/knowledge/ProjectDisplayConfig.md +0 -35
  427. package/resources/js3d/context/knowledge/SceneEditorCompat.md +0 -35
  428. package/resources/js3d/context/knowledge/StepByStep.md +0 -21
  429. package/resources/js3d/context/knowledge/Subsystems/Optional/MultiplayerManagerKnowledge.md +0 -242
  430. package/resources/js3d/context/knowledge/UiEditorCompat.md +0 -21
  431. package/resources/js3d/context/rules/MultiplayerCapability.md +0 -27
  432. package/resources/js3d/context/rules/MultiplayerRoomEntryUX.md +0 -63
  433. package/resources/js3d/context/rules/PlatformBoundaryModules.md +0 -44
  434. package/resources/js3d/context/rules/preview_ready.md +0 -8
  435. package/resources/js3d/context/skills/aigc-integration/assets/sprite-sheet-player.mjs +0 -70
  436. package/resources/js3d/context/skills/aigc-integration/callback.md +0 -77
  437. package/resources/js3d/context/skills/aigc-integration/knowledge/aigc/README.md +0 -23
  438. package/resources/js3d/context/skills/aigc-integration/knowledge/aigc/audio-aigc-knowledge.md +0 -38
  439. package/resources/js3d/context/skills/aigc-integration/knowledge/aigc/character2d-aigc-knowledge.md +0 -72
  440. package/resources/js3d/context/skills/aigc-integration/knowledge/aigc/staticmesh-aigc-knowledge.md +0 -33
  441. package/resources/js3d/context/skills/aigc-integration/knowledge/aigc/texture-prop-aigc-knowledge.md +0 -36
  442. package/resources/js3d/context/skills/aigc-integration/knowledge/aigc/texture-scene-aigc-knowledge.md +0 -37
  443. package/resources/js3d/context/skills/aigc-integration/knowledge/aigc/texture-ui-aigc-knowledge.md +0 -35
  444. package/resources/js3d/context/skills/asset-search/references/sprite-sheets.md +0 -58
  445. package/resources/js3d/context/skills/asset-search/scripts/asset_display.mjs +0 -62
  446. package/resources/js3d/context/skills/asset-search/scripts/config.json +0 -235
  447. package/resources/js3d/context/skills/asset-search/scripts/manifest_pipeline.mjs +0 -905
  448. package/resources/js3d/context/skills/asset-search/scripts/preflight.mjs +0 -79
  449. package/resources/js3d/context/skills/asset-search/scripts/provided_assets.mjs +0 -74
  450. package/resources/js3d/context/skills/asset-search/scripts/search.mjs +0 -637
  451. package/resources/js3d/context/skills/asset-search/scripts/sprite_source_materializer.mjs +0 -667
  452. package/resources/js3d/context/skills/asset-search/strategies/anim2d.md +0 -42
  453. package/resources/js3d/context/skills/asset-search/strategies/effect2d.md +0 -31
  454. package/resources/js3d/context/skills/asset-usage-audit/references/case-tidewater-zoo.md +0 -89
  455. package/resources/js3d/context/skills/asset-usage-audit/references/optimization-playbook.md +0 -143
  456. package/resources/js3d/context/skills/asset-usage-audit/references/usage-model.md +0 -90
  457. package/resources/js3d/context/skills/export-config/scripts/translate-asset-titles.mjs +0 -161
  458. package/resources/js3d/context/skills/game-art-style/SKILL.md +0 -60
  459. package/resources/js3d/context/skills/game-art-style/assets/previews/cartoon.png +0 -0
  460. package/resources/js3d/context/skills/game-art-style/assets/previews/comic.png +0 -0
  461. package/resources/js3d/context/skills/game-art-style/assets/previews/cozy.png +0 -0
  462. package/resources/js3d/context/skills/game-art-style/assets/previews/cyber.png +0 -0
  463. package/resources/js3d/context/skills/game-art-style/assets/previews/horror.png +0 -0
  464. package/resources/js3d/context/skills/game-art-style/assets/previews/lowpoly.png +0 -0
  465. package/resources/js3d/context/skills/game-art-style/assets/previews/paper.png +0 -0
  466. package/resources/js3d/context/skills/game-art-style/assets/previews/voxel.png +0 -0
  467. package/resources/js3d/context/skills/game-art-style/references/art-parameters-lite.md +0 -38
  468. package/resources/js3d/context/skills/game-art-style/references/construction.md +0 -111
  469. package/resources/js3d/context/skills/game-art-style/references/materials-textures.md +0 -105
  470. package/resources/js3d/context/skills/game-art-style/references/sources.md +0 -25
  471. package/resources/js3d/context/skills/game-art-style/references/styles/cartoon.md +0 -175
  472. package/resources/js3d/context/skills/game-art-style/references/styles/comic.md +0 -168
  473. package/resources/js3d/context/skills/game-art-style/references/styles/cozy.md +0 -191
  474. package/resources/js3d/context/skills/game-art-style/references/styles/cyber.md +0 -165
  475. package/resources/js3d/context/skills/game-art-style/references/styles/horror.md +0 -173
  476. package/resources/js3d/context/skills/game-art-style/references/styles/lowpoly.md +0 -185
  477. package/resources/js3d/context/skills/game-art-style/references/styles/paper.md +0 -181
  478. package/resources/js3d/context/skills/game-art-style/references/styles/voxel.md +0 -189
  479. package/resources/js3d/context/skills/game-art-style/references/user-style-document.md +0 -88
  480. package/resources/js3d/context/skills/mobile-adaptation/SKILL.md +0 -301
  481. package/resources/js3d/context/skills/mobile-adaptation/assets/example/src/input/input-config.json +0 -104
  482. package/resources/js3d/context/skills/mobile-adaptation/assets/example/src/input/input-layer.ts +0 -933
  483. package/resources/js3d/context/skills/mobile-adaptation/assets/example/src/input/input-platform.ts +0 -92
  484. package/resources/js3d/context/skills/mobile-adaptation/assets/example/src/input/input-primitives.ts +0 -254
  485. package/resources/js3d/context/skills/mobile-adaptation/assets/example/src/input/look-pad.ts +0 -245
  486. package/resources/js3d/context/skills/mobile-adaptation/assets/example/src/ui/touch-controls.css +0 -257
  487. package/resources/js3d/context/skills/mobile-adaptation/references/input-config.md +0 -342
  488. package/resources/js3d/context/skills/mobile-adaptation/references/verification.md +0 -140
  489. package/resources/js3d/context/skills/mobile-adaptation/references/web-audio.md +0 -11
  490. package/resources/js3d/context/skills/mobile-compat-qa/SKILL.md +0 -53
  491. package/resources/js3d/context/skills/mobile-compat-qa/references/startup-diagnosis.md +0 -23
  492. package/resources/js3d/context/skills/mobile-compat-qa/references/web-form-input.md +0 -10
  493. package/resources/js3d/context/skills/mobile-compat-qa/references/web-lifecycle.md +0 -20
  494. package/resources/js3d/context/skills/mobile-compat-qa/references/web-performance.md +0 -19
  495. package/resources/js3d/context/skills/optimization-suggestions/SKILL.md +0 -74
  496. package/resources/js3d/context/skills/performance-audit/references/case-notes.md +0 -93
  497. package/resources/js3d/context/skills/performance-audit/references/rules.md +0 -183
  498. package/resources/js3d/context/skills/platform-services/SKILL.md +0 -101
  499. package/resources/js3d/context/skills/platform-services/assets/modules/MultiplayerManager.ts +0 -465
  500. package/resources/js3d/context/skills/platform-services/assets/modules/eventBus.ts +0 -57
  501. package/resources/js3d/context/skills/platform-services/assets/modules/identity/qq-ai-game-sdk.min.js +0 -5
  502. package/resources/js3d/context/skills/platform-services/assets/modules/identity/qq-session.mjs +0 -208
  503. package/resources/js3d/context/skills/platform-services/assets/modules/identity/shared.mjs +0 -37
  504. package/resources/js3d/context/skills/platform-services/assets/modules/leaderboard.d.mts +0 -39
  505. package/resources/js3d/context/skills/platform-services/assets/modules/leaderboard.mjs +0 -1
  506. package/resources/js3d/context/skills/platform-services/assets/modules/log.ts +0 -35
  507. package/resources/js3d/context/skills/platform-services/assets/modules/multiplayer/clockSync.ts +0 -61
  508. package/resources/js3d/context/skills/platform-services/assets/modules/multiplayer/dsClient.ts +0 -52
  509. package/resources/js3d/context/skills/platform-services/assets/modules/multiplayer/payloadCodec.ts +0 -30
  510. package/resources/js3d/context/skills/platform-services/assets/modules/multiplayer/roomHttp.ts +0 -89
  511. package/resources/js3d/context/skills/platform-services/assets/modules/multiplayer/types.ts +0 -47
  512. package/resources/js3d/context/skills/platform-services/assets/modules/platform-service.d.mts +0 -31
  513. package/resources/js3d/context/skills/platform-services/assets/modules/platform-service.mjs +0 -272
  514. package/resources/js3d/context/skills/platform-services/assets/modules/save.d.mts +0 -49
  515. package/resources/js3d/context/skills/platform-services/assets/modules/save.mjs +0 -1
  516. package/resources/js3d/context/skills/platform-services/assets/scaffold/ds/main.mjs +0 -7
  517. package/resources/js3d/context/skills/platform-services/assets/scaffold/ds/rooms/SyncRoom.mjs +0 -264
  518. package/resources/js3d/context/skills/platform-services/assets/scaffold/ds/rooms/syncSchema.mjs +0 -39
  519. package/resources/js3d/context/skills/platform-services/references/SERVER_GUIDE.md +0 -139
  520. package/resources/js3d/context/skills/platform-services/references/api_reference.md +0 -18
  521. package/resources/js3d/context/skills/platform-services/references/leaderboard_playbook.md +0 -96
  522. package/resources/js3d/context/skills/platform-services/scripts/install.mjs +0 -148
  523. package/resources/js3d/context/skills/resolution-adaptation/SKILL.md +0 -46
  524. package/resources/js3d/context/skills/resolution-adaptation/assets/display/ui-stage.ts +0 -156
  525. package/resources/js3d/context/skills/resolution-adaptation/assets/display/viewport.ts +0 -239
  526. package/resources/js3d/context/skills/resolution-adaptation/assets/example/main.ts +0 -129
  527. package/resources/js3d/context/skills/resolution-adaptation/assets/example/ui-tokens.css +0 -188
  528. package/resources/js3d/context/skills/resolution-adaptation/references/audit.md +0 -31
  529. package/resources/js3d/context/skills/resolution-adaptation/references/device-safe-area.md +0 -40
  530. package/resources/js3d/context/skills/resolution-adaptation/references/game-ui-occlusion.md +0 -18
  531. package/resources/js3d/context/skills/resolution-adaptation/references/layout-rules.md +0 -15
  532. package/resources/js3d/context/skills/resolution-adaptation/references/troubleshooting.md +0 -34
  533. package/resources/js3d/context/skills/resolution-adaptation/references/viewport-api.md +0 -38
  534. package/resources/js3d/context/skills/resolution-adaptation/scripts/aspect_audit.mjs +0 -448
  535. package/resources/js3d/context/skills/scene-editor-compat/SKILL.md +0 -599
  536. package/resources/js3d/context/skills/scene-editor-compat/references/bundle-contract.md +0 -141
  537. package/resources/js3d/context/skills/scene-editor-compat/references/editor-integration.md +0 -92
  538. package/resources/js3d/context/skills/scene-editor-compat/references/scene-data-format.md +0 -125
  539. package/resources/js3d/context/skills/scene-editor-compat/references/slots-rules.md +0 -113
  540. package/resources/js3d/context/skills/scene-editor-compat/scripts/scene-editor.mjs +0 -1187
  541. package/resources/js3d/context/skills/threejs-game-quality/SKILL.md +0 -53
  542. package/resources/js3d/context/skills/threejs-game-quality/agents/openai.yaml +0 -4
  543. package/resources/js3d/context/skills/threejs-game-quality/references/01-build.md +0 -94
  544. package/resources/js3d/context/skills/threejs-game-quality/references/02-avoid.md +0 -50
  545. package/resources/js3d/context/skills/threejs-game-quality/references/03-detect.md +0 -105
  546. package/resources/js3d/context/skills/threejs-game-quality/references/camera-by-genre.md +0 -147
  547. package/resources/js3d/context/skills/threejs-game-quality/references/camera-distance.md +0 -79
  548. package/resources/js3d/context/skills/threejs-game-quality/references/camera-sources.md +0 -56
  549. package/resources/js3d/context/skills/threejs-game-quality/references/character-motion-face.md +0 -51
  550. package/resources/js3d/context/skills/threejs-game-quality/references/parameter-contract.md +0 -55
  551. package/resources/js3d/context/skills/threejs-game-quality/references/refine-existing.md +0 -78
  552. package/resources/js3d/context/skills/threejs-game-quality/references/rendering-stability.md +0 -84
  553. package/resources/js3d/context/skills/threejs-game-quality/references/runtime-tools.md +0 -120
  554. package/resources/js3d/context/skills/threejs-game-quality/scripts/package.json +0 -4
  555. package/resources/js3d/context/skills/threejs-game-quality/scripts/runtime-audit.js +0 -238
  556. package/resources/js3d/context/skills/ui-editor-compat/SKILL.md +0 -59
  557. package/resources/js3d/context/skills/ui-editor-compat/assets/example/hud/WidgetLayout_Hud.ts +0 -35
  558. package/resources/js3d/context/skills/ui-editor-compat/assets/example/hud/WidgetLogic_Hud.ts +0 -61
  559. package/resources/js3d/context/skills/ui-editor-compat/assets/example/hud/hud.css +0 -60
  560. package/resources/js3d/context/skills/ui-editor-compat/assets/runtime/dom-ui.d.mts +0 -45
  561. package/resources/js3d/context/skills/ui-editor-compat/assets/runtime/dom-ui.mjs +0 -265
  562. package/resources/js3d/context/skills/ui-editor-compat/assets/runtime/release.json +0 -7
  563. package/resources/js3d/context/skills/ui-editor-compat/references/contract.md +0 -110
  564. package/resources/js3d/context/skills/ui-editor-compat/scripts/editor-contract.mjs +0 -327
  565. package/resources/js3d/context/skills/ui-editor-compat/scripts/project-files.mjs +0 -80
  566. package/resources/js3d/context/skills/ui-editor-compat/scripts/ui-editor.mjs +0 -84
  567. package/resources/js3d/context/skills/version-update/SKILL.md +0 -191
  568. package/resources/js3d/context/skills/version-update/scripts/check_runtime_refs.mjs +0 -129
  569. package/resources/js3d/context/skills/version-update/scripts/feature_snapshot.mjs +0 -159
  570. package/resources/js3d/context/skills/version-update/scripts/update_feature_version.mjs +0 -157
  571. package/resources/js3d/context/skills/version-update/upgrade_diffs/.gitkeep +0 -0
  572. package/resources/js3d/context/version/version.json +0 -1
  573. package/resources/js3d/project/runtime/lightgame/1.0.0/platform/config.d.mts +0 -19
  574. package/resources/js3d/project/runtime/lightgame/1.0.0/platform/config.mjs +0 -1
  575. package/resources/js3d/project/runtime/lightgame/1.0.0/platform/leaderboard.d.mts +0 -39
  576. package/resources/js3d/project/runtime/lightgame/1.0.0/platform/leaderboard.mjs +0 -1
  577. package/resources/js3d/project/runtime/lightgame/1.0.0/platform/platform-capture-video.mjs +0 -227
  578. package/resources/js3d/project/runtime/lightgame/1.0.0/platform/platform-service.d.mts +0 -25
  579. package/resources/js3d/project/runtime/lightgame/1.0.0/platform/platform-service.mjs +0 -1
  580. package/resources/js3d/project/runtime/lightgame/1.0.0/platform/platform.d.mts +0 -79
  581. package/resources/js3d/project/runtime/lightgame/1.0.0/platform/platform.mjs +0 -30
  582. package/resources/js3d/project/runtime/lightgame/1.0.0/platform/save.d.mts +0 -49
  583. package/resources/js3d/project/runtime/lightgame/1.0.0/platform/save.mjs +0 -1
  584. package/resources/js3d/project/runtime/lightgame/1.0.0/release.json +0 -39
  585. package/resources/js3d/project/runtime/lightgame/1.0.0/tooling/cli.mjs +0 -2
  586. package/resources/js3d/project/runtime/lightgame/1.0.0/tooling/project.d.mts +0 -8
  587. package/resources/js3d/project/runtime/lightgame/1.0.0/tooling/project.mjs +0 -2
  588. package/resources/js3d/project/runtime/lightgame/1.0.0/tooling/vite.d.mts +0 -3
  589. package/resources/js3d/project/runtime/lightgame/1.0.0/tooling/vite.mjs +0 -7
  590. package/resources/js3d/project/runtime/lightgame/1.0.0/tools/assets.d.mts +0 -24
  591. package/resources/js3d/project/runtime/lightgame/1.0.0/tools/assets.mjs +0 -2
  592. package/resources/js3d/project/runtime/lightgame/1.0.0/tools/astc.d.mts +0 -10
  593. package/resources/js3d/project/runtime/lightgame/1.0.0/tools/astc.mjs +0 -1
  594. package/resources/js3d/project/runtime/lightgame/1.0.0/tools/audio.d.mts +0 -20
  595. package/resources/js3d/project/runtime/lightgame/1.0.0/tools/audio.mjs +0 -1
  596. package/resources/js3d/project/runtime/lightgame/1.0.0/tools/canvas.d.mts +0 -21
  597. package/resources/js3d/project/runtime/lightgame/1.0.0/tools/canvas.mjs +0 -1
  598. package/resources/js3d/project/runtime/lightgame/1.0.0/tools/glb.d.mts +0 -26
  599. package/resources/js3d/project/runtime/lightgame/1.0.0/tools/glb.mjs +0 -351
  600. package/resources/js3d/project/runtime/lightgame/1.0.0/tools/input.d.mts +0 -17
  601. package/resources/js3d/project/runtime/lightgame/1.0.0/tools/input.mjs +0 -1
  602. package/resources/js3d/project/runtime/lightgame/1.0.0/tools/three.d.mts +0 -40
  603. package/resources/js3d/project/runtime/lightgame/1.0.0/tools/three.mjs +0 -1
  604. package/resources/js3d/project/runtime/lightgame/1.0.0/tools/ui.d.mts +0 -10
  605. package/resources/js3d/project/runtime/lightgame/1.0.0/tools/ui.mjs +0 -1
  606. package/resources/js3d/project/runtime/lightgame/1.0.0/tools/video.d.mts +0 -8
  607. package/resources/js3d/project/runtime/lightgame/1.0.0/tools/video.mjs +0 -1
  608. package/resources/js3d/project/scripts/refresh-runtime.mjs +0 -50
  609. package/resources/js3d/project/vendor/core-manager-three/package.json +0 -12
  610. package/resources/js3d/project/vendor/core-manager-three/src/index.ts +0 -2
  611. package/resources/js3d/project/vendor/run.sh +0 -4
  612. package/resources/js3d/project/version/craft_feature_version.json +0 -42
  613. package/resources/js3d/project/version/project_feature_version.json +0 -11
  614. package/vendor/agent-cli/dist/src/artifacts/scene-asset-delivery.d.ts +0 -7
  615. package/vendor/agent-cli/dist/src/artifacts/scene-asset-delivery.d.ts.map +0 -1
  616. package/vendor/agent-cli/dist/src/artifacts/scene-asset-delivery.js +0 -145
  617. package/vendor/agent-cli/dist/src/artifacts/scene-asset-delivery.js.map +0 -1
  618. /package/resources/js/{context/skills/export-config/scripts → project/scripts/config-export}/assert-asset-wiring.mjs +0 -0
  619. /package/resources/js3d/{context/skills/export-config/scripts → project/scripts/config-export}/assert-asset-wiring.mjs +0 -0
  620. /package/resources/js3d/{context/skills/export-config/scripts → project/scripts/config-export}/sync-asset-controls.mjs +0 -0
@@ -1,149 +1,14 @@
1
1
  ---
2
2
  name: aigc-generate
3
- description: AIGC 资产生成。何时提交见 knowledge/AigcEnabled.md。造清单、提示词与提交全部由 aigc-asset 子代理负责,本 skill 只管触发、取结果与接线。音频只生成 BGM,禁止音效。
3
+ description: 为 2D / Phaser 游戏生成并接入图片、音乐或角色序列帧;用户需要生成素材时使用。
4
4
  ---
5
5
 
6
- # JS AIGC 生成
6
+ # 2D 素材生成
7
7
 
8
- 你负责三件事:**决定这轮要不要生成**、**把生成交给 `aigc-asset`**、**拿到 URL 后接线**。
8
+ 先确定画面用途、比例、风格、透明背景与对应 slot。按用户需求选择生成素材范围,不将所有 HUD 或几何形状自动转成生成任务。
9
9
 
10
- **提示词怎么写、清单怎么造、怎么提交,都不在这里** —— 那些规则与 5~6 份 prompt 模板都归
11
- `aigc-asset` 子代理,它自己持有提交工具。它跑完只回一份实体名清单,
12
- 不会把模板和推敲过程带进你的上下文。
10
+ 读取 craft_game_info.aigc 的可用类型。调用 craft_assets_generate,每批 1~8 项,使用稳定 request_key;图像、音乐、序列帧分别使用当前 schema 的 kind。角色多个动作先取得同一参考立绘的真实 URL,再作为 image_url 传入 sprite_sheet 请求。
13
11
 
14
- ## 不走 AIGC 的,你自己实现
12
+ 提示词说明对象、视角、构图、画风、可读性和用途;图集需明确动作与连续性,避免把 UI 文本画进角色素材。透明背景按工具字段传入。
15
13
 
16
- - `effect2d`:程序绘制(`this.tweens.add` / Phaser 粒子)。
17
- - 音效(`*_sfx` / `win_sfx` / `lose_sfx`):程序合成。用户要「AI 生成音效」时说不支持,
18
- 不要改画成 BGM。
19
- - HUD 数字、血条、暂停/胜负底板:DOM / 直绘。
20
- - 3D / 骨骼 / 动捕(含用户说「生成 xx 模型」):对用户说「当前是 2D 游戏,不支持生成 xxx」。
21
- 代价:后端无管线;降级出图会让用户以为模型已生成。
22
-
23
- 血条等实时矢量、特效、音效保持程序。零散装饰可直绘;面积大的装饰要进 AIGC 清单。
24
-
25
- ## SOP
26
-
27
- ### 1. 让 aigc-asset 造清单并提交
28
-
29
- `aigc-asset` 持有提交工具,你没有。它读设计文档、选模板、构造提示词、提交,
30
- `summary` 回一份已提交的实体名单——**这份 summary 是你能看到它那一侧的全部内容**。
31
-
32
- 调它,objective 写清本轮范围(首轮 / 迭代、以及迭代时要替换哪些槽位):
33
-
34
- ```json
35
- {"handoff":{"objective":"首轮:按 SPEC/plan/游戏设计.md 生成本轮全部 AIGC 资产"}}
36
- ```
37
-
38
- 它的回报里有三样东西,各有下游:
39
-
40
- | 回报内容 | 你用它做什么 |
41
- |---|---|
42
- | 实体名单 | 按类型列给用户(一行一类,只写资产名与类型,不带 slot 名与接口名),不等确认 |
43
- | 被拒条目 | 如实告诉用户哪些没提交、为什么 |
44
- | 末尾「后续」一行 | 提交工具的原话,里面带着后台任务的 `task_id` —— **那是第 3 步 `wait_for_tasks` 的必填参数** |
45
-
46
- ```
47
- 英雄立绘(图)
48
- 主场景背景、地面、金币(图)
49
- 主题 BGM(音)
50
- 英雄待机、英雄跑动(序列帧)
51
- ```
52
-
53
- 列完清单**立即提醒用户去任务中心确认积分消耗**。
54
-
55
- 每条资产按次计费,所以一个 run 调一次 `aigc-asset` 就够——它内部已经把整单一次交完了。
56
-
57
- ### 2. 立刻写代码
58
-
59
- **下一组工具必须含 `write_file` 写 `src/`。** 不要等生成、不要轮询。
60
-
61
- 可文件化实体按「有资产就加载、无则直绘 / 合成兜底」接线,`@slot` 第三段暂空 ——
62
- 不需要 `result_url` 也能写分流(URL 空则直绘)。
63
- 写法只在 `${CRAFT_CONTEXT_DIR}/knowledge/AigcWiring.md`,入队与加载层只在 `${CRAFT_CONTEXT_DIR}/knowledge/Lifecycle.md`。
64
-
65
- 会播序列帧的角色先用立绘占位,齐套后再换成图集。只出立绘的角色不要建动画。
66
-
67
- ### 3. 取结果
68
-
69
- 两个工具回答两个不同层次的问题,别混:
70
-
71
- | 工具 | 回答 |
72
- |---|---|
73
- | `wait_for_tasks(task_ids=["<第 1 步的 task_id>"])` | 后台生成器跑完了吗、有没有挂、挂在哪 |
74
- | `aigc_status` | 账本里每条资产的结果是什么 |
75
-
76
- 顺序由此确定:第一次构建通过后,先收回后台任务,再读账本。
77
-
78
- **账本无法表达「写账本的进程死了」。** 生成器启动就失败时,`.aigc-queue/` 里连账本文件都不会
79
- 创建,`aigc_status` 只能报 `progress.total = 0`;它不区分「还没写第一条」和「永远不会写了」。
80
- 此时唯一有信息的地方是后台任务的返回——所以 `total = 0` 是「去看上表第一行」的信号,
81
- 不是「再等等」的信号,也不是等更久或多查几次能改变的。
82
-
83
- 后台任务报失败时,**先分清失败在哪一层——两层的可重试性是相反的**:
84
-
85
- | 层 | 判据 | 可重试性 |
86
- |---|---|---|
87
- | 生成器没跑起来 | 后台任务 error + **账本零条目** | **可以重试**:一条资产都没送到后端,不存在重复计费 |
88
- | 提交成功、生成失败 | 账本有条目,`status=failed` | 不重试:已经计费,重提会再扣一次 |
89
-
90
- 第一层就重新调一次 `aigc-asset`(它会重新构造并提交)。**同一轮内只重试一次**:
91
- 代码或配置层面的故障重试结果完全一样,两次都失败说明不是偶发抖动。
92
- 两次都失败后按「本轮没有 AIGC 资产」交付程序直绘版本,并**明确告诉用户是生成服务没起来、
93
- 不是资产做不出来**——这两件事对用户的含义完全不同。
94
-
95
- 账本有条目时,每条只有三种状态:
96
-
97
- | `status` | 处置 |
98
- |---|---|
99
- | `completed` | 带 `result_url`,按 `AigcWiring.md` 接线 |
100
- | `failed` | 读 `reason` 与 `advice`,按 `advice` 处置,**不要重新提交** |
101
- | `pending_confirm` | **催用户去任务中心确认积分消耗**,然后继续 `wait_for_tasks`。**禁止结束本轮**——本轮一结束仍在跑的任务会被杀掉 |
102
-
103
- `advice` 取值:`keep_procedural`(该槽位保持程序直绘)/
104
- `keep_portrait_placeholder`(序列帧失败,保持立绘占位、动作槽第三段留空)/
105
- `blank_third_segment`(路径/地块/方格/平台第三段留空,**不改走直绘**)。
106
-
107
- 失败不重试、不伪造 URL、不改走素材召回。用户明确要求重试时才再提。
108
- `result_url` 为空或 `failed` 时工程文件不动。
109
-
110
- ### 4. 接线
111
-
112
- `result_url` 按 `${CRAFT_CONTEXT_DIR}/knowledge/AigcWiring.md` 接到 Phaser Scene / 音频,
113
- 写入 `@slot` 第三段与 `configs/assets.json`,再 `npm run config:export` → 调用 `game_visual_qa`。
114
- 顺序与常驻 `AGENTS.md` 相同。
115
-
116
- 序列帧 `result_url` 是 manifest JSON,按该接线文件「序列帧」播,不要把整张图集当一帧。
117
- 本 skill 自身不落盘、不生成资产文件。
118
-
119
- ### 5. 同一现象连报两轮:先看图,再改代码
120
-
121
- 视觉验收只能报「看到了什么」,分不清「实体没渲染」与「渲染了但融进背景」——
122
- 两者报告一样,修法一个在代码、一个在资产。
123
- 所以连报两轮就先 `read_images` 看那张资产:与背景同明度区间就是资产问题,
124
- 改代码不会让它变可见,重新生成或加描边 / 背光才会。
125
-
126
- ## 首轮直接生成
127
-
128
- 触发条件见 `${CRAFT_CONTEXT_DIR}/knowledge/AigcEnabled.md`。
129
- 按 `${CRAFT_SKILL_DIR}/knowledge/non-stepwise-aigc.md` 执行。完整规则只在该文件。
130
-
131
- ## 迭代生成
132
-
133
- 条件见 `${CRAFT_CONTEXT_DIR}/knowledge/AigcEnabled.md`「迭代生成」。
134
- 按 `batch-replace.md` 过滤出要替换的槽位,把槽位清单写进 `aigc-asset` 的 objective。
135
- 指定单槽也走同一次调用。
136
-
137
- ## 边界
138
-
139
- - **不改工程资产文件**:成功也只把 URL 用于接线。
140
- - **失败不改**:`failed` / `result_url` 为空时工程文件不动。
141
- - **实体名只是本轮对位名**。展示名用 `aigc-asset` 回报的 `display_name`,不填实体英文 id。
142
- - **失败不伪造**:不得编造 `result_url`,也不得在 AIGC 失败后自行改走素材召回。
143
- - **`aigc-asset` 不在工具列表时**:如实告诉用户「当前服务端还没有 AIGC 生成能力」,
144
- 并问他是等更新还是本轮先用程序直绘。两者是不同交付物,由用户选。
145
- - **对用户口径**:生成中说「在帮你生成 XX」,完成说「已生成完成」。
146
- `failed` 的槽位不要说成已生成完成,按 `reason` 告诉用户。
147
- **未提交的批次不要说成「在等你确认」或「会随后跟上」**,也不要说「你确认后跟我说继续,我再生成其余」。
148
- 何时能说「初版已完成」见 `knowledge/non-stepwise-aigc.md`。
149
- 不暴露接口、action、job_id、查询过程、后端域名。失败只说结果与建议,不贴后端报文。
14
+ 轮询并记录实际任务 ID、资源 ID 和产物;需要平台预览确认时展示真实状态。完成后按 [接线](../../knowledge/AigcWiring.md) 与 [图集规则](../asset-search/references/resource-config.md) 接入和验收。
@@ -1,69 +1,12 @@
1
1
  ---
2
2
  name: asset-search
3
- description: 单点资产召回或提供官方文件,回传 path 并保存原始结果。BGM 可召回,音效默认程序合成。视觉默认 AIGC / 直绘,召回仅在用户提供或点名素材库时进行。
3
+ description: 为当前 2D / Phaser 游戏检索并导入 Craft 素材库资源;需要现有图片、音频或图集。
4
4
  ---
5
5
 
6
- # Asset Search
6
+ # 2D / Phaser 素材库
7
7
 
8
- 按实体名召回或提供文件资产,命中的 path 回传到 stdout;序列帧(`anim2d` / `effect2d`)的候选 Path 就是图集 png,另附 `sprite` 帧信息。召回原始 JSON 自动保存在项目 `.asset-search/`,返回项目相对 `report_path`;不改业务配置。拿到 path 后按 `${CRAFT_CONTEXT_DIR}/knowledge/AigcWiring.md` 写进 `configs/assets.json` 与 `@slot`。
8
+ 读取 craft_game_info 的当前引擎 library 分类,按实际 slot、category、query 调用 craft_assets_search。等待任务完成,检查候选类型、metadata、score 和错误,按需求选用;搜索本身不生成素材。
9
9
 
10
- URL 门禁只在 `${CRAFT_CONTEXT_DIR}/knowledge/AssetUrl.md`。`resolveAssetUrl` 与 ASTC 在 `runtime/lightgame/1.1.0/tools/`,不要为此执行召回。
10
+ 通过 craft_assets_import 传 source=library、search_id、candidate_id、slot、稳定 request_key 导入。只使用返回候选,不猜测资源地址。不同来源分批处理,AssetId 与生成任务 resource_id 分开保存。
11
11
 
12
- ## 何时加载
13
-
14
- 仅在以下情况加载:用户明确要求从素材库召回;用户消息带上传附件(`__chat_message__.attachments[]` 中 `type=resource`)或「用户本轮引用了以下资源」块;对话里出现 `https://file.craft.qq.com/...` 或 `Game/...` 资源地址。默认视觉走 AIGC / 直绘,不经本 skill。音效默认程序合成,仅用户提供或库内命中才走这里。`video` 不召回、不 provide。
15
-
16
- 实体名取 `游戏设计.md` 或用户本轮点名的稳定名字(可带变体后缀如 `糖果方块·红`)。不写 `SPEC/`。
17
-
18
- ## category
19
-
20
- ```text
21
- anim2d effect2d texture-scene texture-prop ui-common ui-style audio
22
- ```
23
-
24
- 序列帧一律按**动作级**召回(一个动作一条候选):`anim2d` = 动画序列帧(`anim_2d_js`),`effect2d` = 特效序列帧(`effect_2d_js`)。`character2d` 只用于 AIGC 序列帧的 `--provide`,不再用于召回。
25
-
26
- ## 调用
27
-
28
- 只调 `node "${CRAFT_SKILL_DIR}/scripts/search.mjs"`,读取 stdout;项目根默认 `CRAFT_PROJECT_DIR` 或 cwd,可用 `--project-dir` 指定。接线后按 `${CRAFT_CONTEXT_DIR}/knowledge/FrontendComponents.md` 调用 `asset_display` 工具,不手写 ID 或组件标签。query 拼装见 `${CRAFT_SKILL_DIR}/strategies/<category>.md`。
29
-
30
- ### 召回
31
-
32
- ```bash
33
- node "${CRAFT_SKILL_DIR}/scripts/search.mjs" \
34
- --requests '[{
35
- "slot_id": "战斗音乐",
36
- "category": "audio",
37
- "query": "紧张的战斗背景音乐,快节奏打击乐",
38
- "filters": { "Style": ["epic", "electronic"] }
39
- }]'
40
- ```
41
-
42
- 无命中进 `misses`,保持直绘 / 合成,不伪造文件。
43
-
44
- ### 提供
45
-
46
- ```bash
47
- node "${CRAFT_SKILL_DIR}/scripts/search.mjs" \
48
- --provide \
49
- --requests '[{
50
- "slot_id": "战斗音乐",
51
- "category": "audio",
52
- "resourcePath": "/Game/assets/battle.ogg",
53
- "resource_id": "110001234"
54
- }]'
55
- ```
56
-
57
- 只接受平台附件、`/Game/...` 或 `https://file.craft.qq.com`。禁止项目内路径、禁止把本地路径补成伪官方地址。
58
-
59
- 用户引用资源块含 `resource_id` 时,将该 ID 原样传入(建议字符串);示例 ID 仅示意,不得照抄或从 URL 推测。脚本把成功项的 ID、路径与槽位保存到项目 `.asset-search/provided.json`,供 `asset_display` 工具匹配。没有 ID 时仍可提供路径,但缺少其他可匹配记录的资源不会进入展示列表。
60
-
61
- 角色多动作用 `clips + defaultAnimation` 替代 `resourcePath`(仅 `character2d`)。
62
-
63
- 多动作请求的顶层 `resource_id` 仅对应默认动作的资源地址。
64
-
65
- 序列帧 AIGC 的 `result_url` 是 PaperFlipbook manifest JSON,用 `--provide` 登记一次才能拿到帧 runtime。不要改传 GIF 或 sheet 图。
66
-
67
- ## 消费
68
-
69
- path(库资源为对话块「资源地址」原值 `Game/...`;AIGC 序列帧是 manifest JSON)写入 `configs/assets.json` 和对应 `@slot` 第三段。素材库召回的序列帧(`anim2d` / `effect2d`)槽值写候选 `sprite.sheetPath` 原值(就是图集 `.png`),帧信息取候选 `sprite` 的 `rows` / `cols` / `frameCount` / `loop`;同一角色的其它动作用候选 `SetTag`(= 角色名)再召回一次,见 `${CRAFT_CONTEXT_DIR}/knowledge/AigcWiring.md`「配置」。加载见 `${CRAFT_CONTEXT_DIR}/knowledge/AigcWiring.md`:单图 `load.image`,动作图集 `sheetUrl` + `load.spritesheet`,BGM `load.audio`。然后 `npm run config:export`,加载 `visual-qa` 后再调用 `game_visual_qa`。无 path 则直绘 / 合成。
12
+ 接线见 [资源使用](references/resource-config.md),地址见 [地址规则](../../knowledge/AssetUrl.md)。检查真实画面或音频;不把仅写入配置报告为已接入。
@@ -0,0 +1,9 @@
1
+ # Phaser 素材使用
2
+
3
+ 从 configs/assets.json 取 slot 地址,按 AssetUrl 规则解析后在 LoadScene 中入队。图片用 this.load.image,音频用 this.load.audio。PlayScene 实际通过 texture key 创建对象或播放音频,重开时复用已经加载的资源。
4
+
5
+ 库图集使用同一候选的 sheetPath、rows、cols、frameCount、loop;配置保留图集 PNG 原始 Path。加载后按真实图像和布局计算帧尺寸,不能将整张图集作为单帧。
6
+
7
+ AIGC 序列帧配置保留 manifest JSON 原始 URL,读取真实清单和帧布局后加载对应图集。模板 sheetUrl helper 仅适用于已经核实清单与同名 PNG 的契约,不能对任意 JSON 地址猜测图片。多个动作复用同一角色参考立绘;检查动画帧范围、透明边缘与碰撞体。
8
+
9
+ 有多个依赖时,必要资源全部就绪后才进入实际玩法 ready。一次失败不能通过伪造纹理键略过。
@@ -1,28 +1,16 @@
1
1
  ---
2
2
  name: export-config
3
- description: 为 JS 游戏安装配置解析、参数覆盖和 Vite 配置插件,按 @slot 与 configs/assets.json 导出 unified_data_control_config.json。配置接线、迁移及上传前使用,兼容旧 Runtime。空地址槽不进游戏资源面板。
3
+ description: 导出当前 2D / Phaser 工程的资源与可调参数配置;新增资源槽、修改配置、构建或上传前排查时使用。
4
4
  ---
5
5
 
6
- # Export Config
6
+ # 2D / Phaser 配置导出
7
7
 
8
- ## 1.1.0 配置能力
8
+ 模板已自带 scripts/skill-modules/export-config,Vite 中 gameConfig() 与 lightgame() 并列。默认值写 configs/*.json,控件元数据写同名 *.controls.json;保持业务普通 JSON import。
9
9
 
10
- 新模板已预装;迁移或缺少能力时执行 `node "${CRAFT_SKILL_DIR}/scripts/install.mjs" --project "${CRAFT_PROJECT_DIR}"`。安装器将 `assets/tooling/` 复制到 `scripts/skill-modules/export-config/` 并记录版本;重装会覆盖已装文件,不要手改。不要直接 import Skill 目录。
10
+ 在项目目录执行 `node "${CRAFT_SKILL_DIR}/scripts/export-config.mjs"`。MCP 的工程检查也通过 SDK hook 调用本工程绑定版本的技能入口;技能与普通 `npm run config:export` 共用项目内导出流程,不查找相邻工程的上下文。
11
11
 
12
- 在 `vite.config.ts` 中从该项目目录引入 `gameConfig()`,与 Runtime 的 `lightgame()` 并列启用。配置目录与 CDN 写在 `game-runtime.json` 的 `configs`、`cdnBase`。API 以随包 `.d.mts` 为准。参数覆盖、资源 URL、快照导出和配置 HMR 均由本能力提供。
12
+ 脚本同步 @slot、assets.json 与资源控件,再导出 unified_data_control_config.json,保留已有有效覆盖值。导出后核实资源 slot 有真实消费者,参数修改能改变游戏,必要加载已成功。地址规则见 [AssetUrl](../../knowledge/AssetUrl.md)。
13
13
 
14
- 上传脚本对 `1.0.0` 保留旧 CLI 分支,对 `1.1.0` 使用项目内配置 CLI。脱离 `context` 时仍能运行 `node scripts/skill-modules/export-config/cli.mjs export-config`。验收构建、面板覆盖与 HMR;不要自动升级旧工程。
14
+ 只有配置模块确实缺失或明确升级时,才执行 `node "${CRAFT_SKILL_DIR}/scripts/install.mjs" --project "${CRAFT_PROJECT_DIR}"`;它会覆盖该模块,先检查已有改动。API 以随技能 assets/tooling/*.d.mts 为准。
15
15
 
16
- ## 资源控件导出
17
-
18
- 在项目根执行。脚本先按 `@slot` 与 `configs/assets.json` 写出 `assets.controls.json`,把条目名写成中文,再导出面板快照。快照里的资源地址按 `${CRAFT_CONTEXT_DIR}/knowledge/AssetUrl.md` 改写。库资源写成 `Game/...`。`https://file.craft.qq.com` 的绝对地址,以及 `Game/`、`Glb/Game/`、`test1/` 相对路径,路径里的百分号编码(含 GBK)会解回中文写回 JSON;`configs/<owner>.json` 里 `type: resource` 的字段同样处理。这是导出脚本的既定产物,核对 JSON 时以解码后的值为准,不要改回百分号或 `result_url`。其它域名不改写。`@slot` 第三段保持写入时的原值。仅编码形态变化不会清空面板已选覆盖值。本轮 `--provide` 已写入 JSON 的槽,脚本把面板当前值写成该路径。
19
-
20
- ```bash
21
- node "${CRAFT_CONTEXT_DIR}/skills/export-config/scripts/export-config.mjs"
22
- ```
23
-
24
- `npm run config:export` 走同一脚本。只导出 `assets.json` 里已有真实 URL 的槽;第三段有地址而 JSON 仍空时会先写入 JSON。`asset_type` 由 `@slot` category 决定。接线与何时导出见 `${CRAFT_CONTEXT_DIR}/knowledge/AigcWiring.md`。
25
-
26
- 已标记 `scene_editor_compat: true` 的项目:本脚本不更新 `localcraft.assets.json`,导出成功不代替场景资源同步;导出前后的对齐与 URL 检查按 `${CRAFT_CONTEXT_DIR}/skills/scene-editor-compat/docs/resource-sync.md`。
27
-
28
- 用户本轮在面板选定的图,导出前先对齐源配置,避免导出用旧 JSON 盖回面板。不要整表改写 `origin/default` 或清空无关覆盖值。
16
+ 导出成功不等于玩法或画面通过。继续使用 craft_game_check 与 craft_game_review 验证本次最终状态。
@@ -1,46 +1,4 @@
1
- // Upload service invokes this with cwd=project. Also used by npm run config:export.
2
- import { readFile } from 'node:fs/promises';
3
- import { resolve, relative, isAbsolute } from 'node:path';
1
+ // Invoke the exporter shipped with this project's engine template.
2
+ import { resolve } from 'node:path';
4
3
  import { pathToFileURL } from 'node:url';
5
- import { assertAssetsWired } from './assert-asset-wiring.mjs';
6
- import { syncAssetControls, readControlSnapshot, applySnapshotAssetAddresses, decodeSnapshotResourcePaths } from './sync-asset-controls.mjs';
7
- import { applyPanelTitles, copyControlTitlesToSnapshot } from './translate-asset-titles.mjs';
8
-
9
- const project = resolve(process.cwd());
10
- const previousSnapshot = readControlSnapshot(project);
11
- const synced = syncAssetControls(project);
12
- console.error(`[export-config] assets.controls.json slots=${synced.count}`);
13
- const titled = await applyPanelTitles(project);
14
- if (titled.updated) {
15
- console.error(`[export-config] 面板名称已写成中文:${titled.updated} 项`);
16
- }
17
-
18
- let manifest;
19
- try { manifest = JSON.parse(await readFile(resolve(project, 'game-runtime.json'), 'utf8')); }
20
- catch (error) { if (error.code !== 'ENOENT') throw error; }
21
- if (manifest?.version === '1.1.0') {
22
- const { runCli } = await import(pathToFileURL(resolve(project, 'scripts/skill-modules/export-config/cli.mjs')).href);
23
- await runCli(['export-config', '--project', project]);
24
- } else if (manifest) {
25
- if (typeof manifest.root !== 'string' || !manifest.root.startsWith('runtime/')) throw new Error('Invalid game-runtime.json root');
26
- const cli = manifest.cli ?? 'cli.mjs';
27
- if (!['cli.mjs', 'tooling/cli.mjs'].includes(cli)) throw new Error('Invalid runtime CLI entry');
28
- const entry = resolve(project, manifest.root, cli);
29
- const rel = relative(project, entry);
30
- if (rel.startsWith('..') || isAbsolute(rel)) throw new Error('Runtime exporter must remain inside the project');
31
- const { runCli } = await import(pathToFileURL(entry).href);
32
- await runCli(['export-config', '--project', project]);
33
- }
34
- const aligned = applySnapshotAssetAddresses(project, previousSnapshot);
35
- if (aligned.updated) {
36
- console.error(`[export-config] 游戏资源当前值已对齐 assets.json:${aligned.updated} 项`);
37
- }
38
- const decoded = decodeSnapshotResourcePaths(project);
39
- if (decoded.updated) {
40
- console.error(`[export-config] 资源地址已解回中文:${decoded.updated} 项`);
41
- }
42
- const snapshotTitles = copyControlTitlesToSnapshot(project);
43
- if (snapshotTitles.updated) {
44
- console.error(`[export-config] 快照条目名已对齐中文:${snapshotTitles.updated} 项`);
45
- }
46
- assertAssetsWired(project);
4
+ await import(pathToFileURL(resolve(process.cwd(), 'scripts/config-export.mjs')).href);
@@ -0,0 +1,30 @@
1
+ {
2
+ "schema": 1,
3
+ "engine": "js",
4
+ "skills": [
5
+ {
6
+ "id": "js:aigc-generate",
7
+ "name": "aigc-generate",
8
+ "description": "为 2D / Phaser 游戏生成并接入图片、音乐或角色序列帧;用户需要生成素材时使用。",
9
+ "entrypoint": "skills/aigc-generate/SKILL.md"
10
+ },
11
+ {
12
+ "id": "js:asset-search",
13
+ "name": "asset-search",
14
+ "description": "为当前 2D / Phaser 游戏检索并导入 Craft 素材库资源;需要现有图片、音频或图集。",
15
+ "entrypoint": "skills/asset-search/SKILL.md"
16
+ },
17
+ {
18
+ "id": "js:export-config",
19
+ "name": "export-config",
20
+ "description": "导出当前 2D / Phaser 工程的资源与可调参数配置;新增资源槽、修改配置、构建或上传前排查时使用。",
21
+ "entrypoint": "skills/export-config/SKILL.md"
22
+ },
23
+ {
24
+ "id": "js:visual-qa",
25
+ "name": "visual-qa",
26
+ "description": "验收 2D / Phaser 游戏的真实输入、玩法闭环与截图;在交付预览或验证修复时使用。",
27
+ "entrypoint": "skills/visual-qa/SKILL.md"
28
+ }
29
+ ]
30
+ }
@@ -1,36 +1,14 @@
1
1
  ---
2
2
  name: visual-qa
3
- description: 调用 game_visual_qa 前加载。写 src、交 AIGC、构建时不加载。
3
+ description: 验收 2D / Phaser 游戏的真实输入、玩法闭环与截图;在交付预览或验证修复时使用。
4
4
  ---
5
5
 
6
- # 视觉自检
6
+ # 2D / Phaser 游戏验收
7
7
 
8
- 玩法能跑、文件资产已接线后再调用。按本文件写 brief / steps。
8
+ 读取当前工作流 context.workflow 的玩法观测和检查 schema。探针从真实渲染与玩法状态提供 engine、ready、frameCount 和 game;保留 Phaser POST_RENDER 与 PlayScene 状态。
9
9
 
10
- ## 验什么
10
+ 设计能由实际输入触发的检查:进入/推进核心循环、达到结算条件、重开恢复初始状态。只断言业务实际产生的值,不通过测试代码直接修改分数或结算。
11
11
 
12
- 一次试玩同时看下面三条。额度按 1→2→3 花:第 1 条没过(没到结算;有重开按钮时还没点过重开且能再玩),不为第 2、3 条单独再采。`pass` 后不要再调,`remaining_calls` 不必用完。
12
+ 调用 craft_game_check 并轮询完成,使用 craft_game_review 查看实际截图。核实主要对象、UI、尺寸、遮挡、资源透明度与当前玩法,3D 场景还检查地面接触、相机与光照。修改后重新检查受影响状态。
13
13
 
14
- 1. **循环**:进玩法后走最短路径,到达过关或失败结算(两条都有时先走先能到的那条)。有「再来一局 / 重新开始 / 再玩一次」则点下去,新一局状态已重置、角色还能操作。挡路界面(选关、背包、出发、确认、选技能等)点开并做完该步就继续往结算走;弹出弹层不等于循环已过。画面、HUD 或说明写了的键各 `press` 一次,`expected` 为位移。音乐、设置、暂停、排行榜、拆除、图鉴不采,除非不点就无法到达结算。
15
- 2. **地面**:玩法帧落地的角色 / 物体脚底对齐同一条地面线。校准见 `${CRAFT_CONTEXT_DIR}/knowledge/AigcWiring.md`「地面校准」。未进玩法帧不改 `GROUND_Y`。俯视或报告「无地面线,不校准」时不为此再采。
16
- 3. **大小**:只看明显过大或过小,档位与容差见同一文件「显示尺寸」。
17
-
18
- ## 写 steps
19
-
20
- - 一次最多 3 步,`wait` 最长 10 秒。3 步只走到结算、还没点过重开时,下一次必须验重开。走不完加 `wait`,或交付写循环未过。
21
- - 每步 `expected` 只写这一步局内推进了什么(层关了、开了哪扇门、到了结算、重开后能再动、某种键能走、HUD 或背景变了)。相机跟随下角色停在画面中间,仍算位移,看背景或计时。
22
- - 短报告的 `clickables` 与催采句不当下一步的题目。
23
-
24
- ## 结果
25
-
26
- - `pass`:停止看图。
27
- - `fail`:第 1~3 条未做到 → 同一轮改完相关代码再调。开机或图集失败先修 `LoadScene`。其余观感写交付说明。
28
- - 改了 `GROUND_Y`:再采一次,最多两次。
29
- - `unverified` 不算循环已过。判读格式失败可重试一次,不要连着重试把额度烧完。
30
- - 步骤没让循环靠近结算或重开,额度用尽也没验到 → 循环未过。
31
- - 次数用尽后不再改需要看图的外观;玩法没做完继续做,新改的外观不当成已验证。
32
- - 局部修改只验对应改动。
33
-
34
- ## 交付说明
35
-
36
- 「已验证」只写第 1~3 条实际做到哪;结算或重开没验到就写未验证,不能写循环已过。没再采是因为循环已过或不必检时照实写,不要写成次数用尽。
14
+ 通过后 craft_game_deliver 返回启动命令;让宿主后台任务持续运行,查询 running 与 snapshot,打开实际链接核实后交付。记录已验证与未覆盖项,不把静态构建或扫描无错误等同于可玩。
@@ -1,99 +1,7 @@
1
- # JS 项目
1
+ # Craft 2D / Phaser 模板
2
2
 
3
- 默认使用 Phaser 3.90、TypeScript 与 Vite。`src/main.ts` 只建 `Phaser.Game` 与平台桥;
4
- 加载在 `src/scenes/LoadScene.ts`,玩法在 `src/scenes/PlayScene.ts`。
5
- 屏幕适配方向无关:短边恒 1080,长边随容器比例伸缩,入口与 `src/display/ui-stage.ts` 成对同步。
6
- 根目录 `game.config.json` 保存供外部容器优先显示的分辨率与朝向偏好。
7
- 玩法和需求文档放在 `src/` 与 `SPEC/`。
3
+ 安装依赖后可运行 `npm run dev`;`npm run build` 包含配置导出、类型检查、Runtime 校验和 Vite 构建。
8
4
 
9
- ```sh
10
- npm install
11
- npm run dev
12
- npm run config:export
13
- npm run typecheck
14
- npm run build
15
- ```
5
+ 通过 Craft 创建时,项目根 AGENTS.md 和项目恢复 Skill 由 prepare 生成。完整引擎上下文使用 craft_game_info 返回的绑定路径,开发进度保存在 SPEC/PROGRESS.md。
16
6
 
17
- `dist/` 使用相对路径,可部署到子目录。`dist/index.html` 是普通游戏入口;
18
- `dist/index_profile.html` 额外加载性能工具箱,是独立诊断页面,不代表 Web 平台增加了 JS 性能按钮。
19
-
20
- ## 多人联机
21
-
22
- 平台已支持多人联机(状态同步)。涉及两个目录,做联机玩法前先读它们,**不要因为 `src/` 里没有联机代码就判定平台不支持**:
23
-
24
- | 目录 | 放什么 | 何时读 |
25
- |---|---|---|
26
- | `ds/` | **服端权威玩法层**(仅联机工程有,装 `platform-services` 的 `multiplayer` 时写入):Colyseus Room + Schema + 平台生命周期挂钩。`${CRAFT_CONTEXT_DIR}/skills/platform-services/references/SERVER_GUIDE.md` 是服端硬约束与消息名约定的唯一真源 | 写或修改服务端 Room / Schema 前必读 |
27
- | `src/skill-modules/platform-services/` | 需要联机时由 `platform-services` 只安装 `multiplayer`(`MultiplayerManager.ts`、`log.ts`、`eventBus.ts` 和身份文件)。排行榜、云存档是另外的模块,不会一起装上 | 做联机玩法 |
28
-
29
- 客户端联机能力只由 `platform-services` 的 `multiplayer` 安装,禁止手写替代实现;安装失败时停下报告。
30
- 旧副本与 `1.0.0` 工程的处理见 `${CRAFT_CONTEXT_DIR}/rules/PlatformBoundaryModules.md`,用法见 `${CRAFT_CONTEXT_DIR}/knowledge/Subsystems/Optional/MultiplayerManagerKnowledge.md`。
31
-
32
- ## 平台与生命周期
33
-
34
- Vite 的 `lightgame()` 插件在游戏入口之前调用平台桥,导入 SDK 模块本身不初始化游戏。
35
- `src/platform.ts` 仅转出当前固定版本的 `connectPreview`,入口需保留以下约定:
36
-
37
- - `new Phaser.Game` 使用 `parent: 'game'`、`render.preserveDrawingBuffer: true`、`physics: { default: 'arcade' }`。
38
- - 创建完成后对 `game.canvas` 调用 `connectPreview`,捕获初始化错误。
39
- - 每帧在 `Phaser.Core.Events.POST_RENDER` 里调用 `preview.afterRender()`;
40
- 加载层画出第一帧时调用 `preview.markReady()`(由 `LoadScene` 触发)。
41
- - 热更新或退出时调用 `preview.dispose()`,再 `game.destroy(true)`。
42
-
43
- `markReady` 与真实首帧均完成后发送 `onloadend`、`ready`;首帧后的 3 秒窗口发送一次
44
- `runtime-result`(0 运行错误、1 正常、2 WebGL 创建/上下文故障)。初始化错误也能在无首帧时报告失败。
45
- 日志采集在结果上报后继续工作。预览 URL 带 `preview` 参数时显示调试条(计数可为 0),用户点击「修复」才发 `runtime-log`。
46
-
47
- 截图保留原来的 `screenshot-request/response` 协议,可选顶层 `requestId`。画布同步复制后再合成
48
- `#ui-root` 与画布同级 DOM,也可通过 `uiRoot` 指定范围。DOM 合成失败会返回画布图和原因;
49
- 跨域资源、外部字体、复杂 CSS、视频、iframe、额外 canvas 不能保证完整合成。
50
-
51
- ## 参数面板
52
-
53
- 配置由 `export-config` Skill 维护,项目已预装 `scripts/skill-modules/export-config/`;`game-runtime.json` 的 `configs`、`cdnBase` 设置配置目录与 CDN。Vite 分别启用平台 `lightgame()` 和配置 `gameConfig()`,项目离开 `context` 后仍可构建和导出。
54
-
55
- 业务按普通 JSON 导入读取配置:
56
-
57
- ```ts
58
- import game from '../configs/game.json';
59
- this.cameras.main.setBackgroundColor(game.background);
60
- ```
61
-
62
- 同名 `configs/game.controls.json` 放控件标题、范围、分组等元数据。
63
- 数值、布尔值、十六进制颜色可自动推断;普通文本、枚举和资源字段需要显式控件类型。
64
- 数组不自动展成控件。导出器生成项目根的 `unified_data_control_config.json`,Vite 根据其中的
65
- `origin/value` 与当前代码默认值校验覆盖,再交给原生 JSON 导入流程。
66
-
67
- 上传前的 export-config 脚本会先导出清单,再由平台收集快照;不能只依赖 Vite build 导出。
68
- 本地修改配置后可执行 `npm run config:export`,Vite 开发模式也会监听配置并刷新。
69
- `ready` 后宿主发来的 `preview-config` 是另一个启动协议,不替代这份参数清单。
70
-
71
- ## SDK 与兼容
72
-
73
- 身份、排行榜、存档和联机通过 `platform-services` Skill 按需安装到 `src/skill-modules/platform-services/`,一次只装要用的模块。
74
- 入口在 `markReady` 前显式初始化同一个身份服务,预览桥和 `lightgame()` 不初始化或销毁服务。
75
- `1.0.0/platform/` 里的同名模块只留给已经在用的旧工程。
76
- 先正常绘制并发出 `ready`,再异步读档。云存档在无身份时会回退本机(`source: 'local'`),
77
- 不要把它当成云端已通;排行榜无平台时返回 `PLATFORM_UNAVAILABLE`,空榜是
78
- `BOARD_NOT_FOUND` 不是暂不可用。完整用法见 [平台服务说明](../context/knowledge/PlatformServices.md)。
79
-
80
- `game-runtime.json` 固定到 `runtime/lightgame/1.1.0/`,CLI 仅提供项目校验。`1.0.0` 仍在同级目录,当前工程不引用其中的模块。reassign 覆盖整个 `runtime/lightgame`。
81
-
82
- `runtime:verify` 校验哈希,Vite 检查 Vite/Phaser 版本并生成 profile。普通业务不刷新 Runtime;明确维护新版本时才更新清单。
83
-
84
- ### 能力导航
85
-
86
- 路径相对项目根;先读声明,再按需读实现。
87
-
88
- | 能力 | 路径/归属 |
89
- |---|---|
90
- | 预览、截图、日志、ready、uiTree、runtime-result | `runtime/lightgame/1.1.0/platform/platform.d.mts` |
91
- | 校验、Vite 接入、profile | `runtime/lightgame/1.1.0/tooling/` |
92
- | 参数配置、导出 | `scripts/skill-modules/export-config/` |
93
- | URL 解析、资源加载、ASTC | `runtime/lightgame/1.1.0/tools/`;玩法优先 Phaser Loader |
94
- | 身份、排行榜、存档、联机 | `platform-services` 按模块安装到 `src/skill-modules/platform-services/`。`1.0.0/platform/` 下的同名文件只给旧工程 |
95
- | 音视频、输入/UI、Canvas 效果、Three 玩法 | Agent 使用引擎/浏览器 API 在业务中实现,不回引旧 tools |
96
-
97
- `vendor/core-manager-js` 是 CoreManager 源码(`@tencent/core-manager-js` 1.0.11)。没有 `game-runtime.json` 的旧工程由平台从这里物化到 `node_modules`;有该文件的新工程不要导入这个包,玩法使用 Phaser 与业务代码,平台接入使用 `runtime/lightgame/1.1.0/`。`vendor/run.sh` 在远程沙箱把该目录装进工具链。
98
- 未带 `game-runtime.json` 的旧项目不会由导出脚本自动接入新 SDK,也不会清空原参数清单;
99
- 未带 `game-runtime.json` 的项目仍用 Phaser,按工程里现有 Scene / 加载方式改。
7
+ runtime/lightgame/1.1.0 是本模板的固定运行库。普通游戏开发使用现有声明与接口;修改 Runtime 时必须单独评审、测试并维护完整性清单。
@@ -1,5 +1,5 @@
1
1
  {
2
- "name": "lightgame-js-template",
2
+ "name": "craft-js-template",
3
3
  "private": true,
4
4
  "version": "1.0.0",
5
5
  "type": "module",
@@ -10,7 +10,6 @@
10
10
  "preview": "vite preview",
11
11
  "typecheck": "tsc --noEmit",
12
12
  "runtime:verify": "node runtime/lightgame/1.1.0/tooling/cli.mjs verify",
13
- "runtime:refresh": "node scripts/refresh-runtime.mjs",
14
13
  "config:export": "node scripts/config-export.mjs"
15
14
  },
16
15
  "dependencies": {
@@ -0,0 +1,106 @@
1
+ // 资源地址归一化的唯一实现。只改 https://file.craft.qq.com 和相对路径:
2
+ // 库资源收成 Game/,其它路径把百分号编码解回中文,相对路径保留原前缀。
3
+ // UTF-8 与 GBK 都能解时,只有 GBK 得到汉字而 UTF-8 不是汉字才用 GBK。
4
+
5
+ function percentEncodedBytes(text) {
6
+ const bytes = [];
7
+ let index = 0;
8
+ while (index < text.length) {
9
+ if (text[index] === '%' && /^[0-9A-Fa-f]{2}$/.test(text.slice(index + 1, index + 3))) {
10
+ bytes.push(Number.parseInt(text.slice(index + 1, index + 3), 16));
11
+ index += 3;
12
+ continue;
13
+ }
14
+ const code = text.charCodeAt(index);
15
+ if (code > 0x7f) return null;
16
+ bytes.push(code);
17
+ index += 1;
18
+ }
19
+ return bytes;
20
+ }
21
+
22
+ function hasCjk(text) {
23
+ return /[\u3400-\u9fff]/.test(text);
24
+ }
25
+
26
+ function decodeGbk(bytes) {
27
+ try {
28
+ return new TextDecoder('gbk', { fatal: true }).decode(Uint8Array.from(bytes));
29
+ } catch {
30
+ return null;
31
+ }
32
+ }
33
+
34
+ function decodeResourcePath(text) {
35
+ const bytes = percentEncodedBytes(text);
36
+ if (!bytes) return text;
37
+ let utf8 = null;
38
+ try {
39
+ utf8 = decodeURIComponent(text);
40
+ } catch {
41
+ utf8 = null;
42
+ }
43
+ const gbk = bytes.some((byte) => byte >= 0x80) ? decodeGbk(bytes) : null;
44
+ if (utf8 && gbk && utf8 !== gbk) {
45
+ return hasCjk(gbk) && !hasCjk(utf8) ? gbk : utf8;
46
+ }
47
+ return utf8 ?? gbk ?? text;
48
+ }
49
+
50
+ function hasNonAscii(text) {
51
+ for (let index = 0; index < text.length; index += 1) {
52
+ if (text.charCodeAt(index) > 0x7f) return true;
53
+ }
54
+ return false;
55
+ }
56
+
57
+ function restoreGamePath(source) {
58
+ let path = source;
59
+ try {
60
+ const url = new URL(source);
61
+ if (url.protocol !== 'https:' || url.hostname !== 'file.craft.qq.com') return source;
62
+ path = url.pathname;
63
+ } catch { /* 相对路径 */ }
64
+ if (!/^\/?Game\//.test(path)) return source;
65
+ const decoded = decodeResourcePath(path.startsWith('/') ? path : `/${path}`).replace(/^\/+/, '');
66
+ return decoded.startsWith('Game/') ? decoded : source;
67
+ }
68
+
69
+ function decodeRelativePath(source) {
70
+ if (/^(?:[a-z][a-z\d+.-]*:|\/\/)/i.test(source)) return source;
71
+ const parts = source.match(/^([^?#]*)([?#].*)?$/);
72
+ if (!parts || !parts[1].includes('%')) return source;
73
+ const decoded = decodeResourcePath(parts[1]);
74
+ if (decoded === parts[1] || !hasNonAscii(decoded)) return source;
75
+ const rest = parts[2] ?? '';
76
+ if (/^\/?Game\//.test(decoded)) return decoded.replace(/^\/+/, '') + rest;
77
+ return decoded + rest;
78
+ }
79
+
80
+ function decodeAbsoluteUrl(source) {
81
+ let url;
82
+ try {
83
+ url = new URL(source);
84
+ } catch {
85
+ return source;
86
+ }
87
+ if (url.protocol !== 'https:' || url.hostname !== 'file.craft.qq.com') return source;
88
+ const decodedPath = decodeResourcePath(url.pathname);
89
+ if (decodedPath === url.pathname || !hasNonAscii(decodedPath)) return source;
90
+ const href = url.href;
91
+ const origin = url.origin;
92
+ if (!href.startsWith(origin)) return source;
93
+ const rest = href.slice(origin.length);
94
+ if (!rest.startsWith(url.pathname)) return source;
95
+ return origin + decodedPath + rest.slice(url.pathname.length);
96
+ }
97
+
98
+ export function toPanelResourcePath(value) {
99
+ const source = String(value ?? '').trim();
100
+ if (!source) return source;
101
+ const restored = restoreGamePath(source);
102
+ if (restored.startsWith('Game/')) return restored;
103
+ const absolute = decodeAbsoluteUrl(source);
104
+ if (absolute !== source) return absolute;
105
+ return decodeRelativePath(source);
106
+ }