@craft_eco/craft-mcp 0.1.30 → 0.1.32

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 (1100) hide show
  1. package/README.md +12 -10
  2. package/bin/craft-mcp.mjs +6 -3
  3. package/dist-server/game-workflow/check.mjs +35 -13
  4. package/dist-server/game-workflow/context-state.mjs +9 -8
  5. package/dist-server/game-workflow/draft-archive.mjs +14 -5
  6. package/dist-server/game-workflow/draft-uploads.mjs +22 -9
  7. package/dist-server/game-workflow/local-context.mjs +62 -62
  8. package/dist-server/game-workflow/project-context.mjs +49 -11
  9. package/dist-server/game-workflow/project-install.mjs +81 -0
  10. package/dist-server/game-workflow/projects.mjs +31 -3
  11. package/dist-server/game-workflow/upload-security-policy.mjs +241 -0
  12. package/dist-server/game-workflow/upload-security.mjs +41 -0
  13. package/dist-server/integrations/config.mjs +20 -3
  14. package/dist-server/integrations/connect.mjs +15 -3
  15. package/dist-server/integrations/dsh-config.mjs +2 -2
  16. package/dist-server/integrations/files.mjs +54 -54
  17. package/dist-server/integrations/host-config-scope.mjs +16 -0
  18. package/dist-server/integrations/host-reload.mjs +6 -0
  19. package/dist-server/integrations/hosts.mjs +44 -6
  20. package/dist-server/integrations/install.mjs +193 -79
  21. package/dist-server/integrations/installation-state.mjs +1 -0
  22. package/dist-server/integrations/installation-transaction.mjs +27 -0
  23. package/dist-server/integrations/jsonc-config.mjs +56 -0
  24. package/dist-server/integrations/opencode-config.mjs +94 -0
  25. package/dist-server/integrations/project-setup.mjs +206 -0
  26. package/dist-server/integrations/registration-identity.mjs +15 -0
  27. package/dist-server/integrations/runtime-candidate.mjs +103 -0
  28. package/dist-server/integrations/runtime-gc.mjs +131 -35
  29. package/dist-server/integrations/updates.mjs +114 -41
  30. package/dist-server/launcher.mjs +8 -1
  31. package/dist-server/mcp/server.mjs +47 -21
  32. package/dist-server/mcp/update-session.mjs +88 -10
  33. package/package.json +5 -2
  34. package/resources/context-filter-report.json +121 -1
  35. package/resources/craft-create/SKILL.md +2 -0
  36. package/resources/craft-update/SKILL.md +2 -0
  37. package/resources/targets/claude/js/context-filter-report.json +1 -1
  38. package/resources/targets/claude/js/craft-game-maker/SKILL.md +3 -3
  39. package/resources/targets/claude/js/js/bundle.json +5 -5
  40. package/resources/targets/claude/js/target.json +1 -1
  41. package/resources/targets/claude/js3d/context-filter-report.json +1 -1
  42. package/resources/targets/claude/js3d/craft-game-maker/SKILL.md +3 -3
  43. package/resources/targets/claude/js3d/js3d/bundle.json +6 -6
  44. package/resources/targets/claude/js3d/js3d/context/skills/asset-usage-audit/scripts/lib/scan.mjs +2 -2
  45. package/resources/targets/claude/js3d/target.json +1 -1
  46. package/resources/targets/codebuddy/js/context-filter-report.json +1 -1
  47. package/resources/targets/codebuddy/js/craft-game-maker/SKILL.md +3 -3
  48. package/resources/targets/codebuddy/js/js/bundle.json +5 -5
  49. package/resources/targets/codebuddy/js/target.json +1 -1
  50. package/resources/targets/codebuddy/js3d/context-filter-report.json +1 -1
  51. package/resources/targets/codebuddy/js3d/craft-game-maker/SKILL.md +3 -3
  52. package/resources/targets/codebuddy/js3d/js3d/bundle.json +6 -6
  53. package/resources/targets/codebuddy/js3d/js3d/context/skills/asset-usage-audit/scripts/lib/scan.mjs +2 -2
  54. package/resources/targets/codebuddy/js3d/target.json +1 -1
  55. package/resources/targets/codex/js/context-filter-report.json +1 -1
  56. package/resources/targets/codex/js/craft-game-maker/SKILL.md +3 -3
  57. package/resources/targets/codex/js/js/bundle.json +5 -5
  58. package/resources/targets/codex/js/target.json +1 -1
  59. package/resources/targets/codex/js3d/context-filter-report.json +1 -1
  60. package/resources/targets/codex/js3d/craft-game-maker/SKILL.md +3 -3
  61. package/resources/targets/codex/js3d/js3d/bundle.json +6 -6
  62. package/resources/targets/codex/js3d/js3d/context/skills/asset-usage-audit/scripts/lib/scan.mjs +2 -2
  63. package/resources/targets/codex/js3d/target.json +1 -1
  64. package/resources/targets/comate/js/bootstrap/SKILL.md +20 -0
  65. package/resources/targets/comate/js/context-filter-report.json +27 -0
  66. package/resources/targets/comate/js/craft-game-maker/SKILL.md +72 -0
  67. package/resources/targets/comate/js/craft-game-maker/js.md +10 -0
  68. package/resources/targets/comate/js/js/bundle.json +97 -0
  69. package/resources/targets/comate/js/js/context/AGENTS.md +29 -0
  70. package/resources/targets/comate/js/js/context/hooks/hooks.json +14 -0
  71. package/resources/targets/comate/js/js/context/knowledge/AssetUrl.md +9 -0
  72. package/resources/targets/comate/js/js/context/knowledge/AssetWiring.md +7 -0
  73. package/resources/targets/comate/js/js/context/knowledge/Layout.md +7 -0
  74. package/resources/targets/comate/js/js/context/knowledge/Lifecycle.md +11 -0
  75. package/resources/targets/comate/js/js/context/knowledge/ResourceLoading.md +9 -0
  76. package/resources/targets/comate/js/js/context/skills/export-config/SKILL.md +16 -0
  77. package/resources/targets/comate/js/js/context/skills/export-config/assets/tooling/cli.mjs +20 -0
  78. package/resources/targets/comate/js/js/context/skills/export-config/assets/tooling/config.d.mts +19 -0
  79. package/resources/targets/comate/js/js/context/skills/export-config/assets/tooling/config.mjs +1 -0
  80. package/resources/targets/comate/js/js/context/skills/export-config/assets/tooling/project.d.mts +6 -0
  81. package/resources/targets/comate/js/js/context/skills/export-config/assets/tooling/project.mjs +77 -0
  82. package/resources/targets/comate/js/js/context/skills/export-config/assets/tooling/vite.d.mts +2 -0
  83. package/resources/targets/comate/js/js/context/skills/export-config/assets/tooling/vite.mjs +34 -0
  84. package/resources/targets/comate/js/js/context/skills/export-config/scripts/export-config.mjs +4 -0
  85. package/resources/targets/comate/js/js/context/skills/export-config/scripts/install.mjs +89 -0
  86. package/resources/targets/comate/js/js/context/skills/export-config/scripts/panel-resource-path.mjs +106 -0
  87. package/resources/targets/comate/js/js/context/skills/index.json +19 -0
  88. package/resources/targets/comate/js/js/context/skills/visual-qa/SKILL.md +14 -0
  89. package/resources/targets/comate/js/js/project/README.md +7 -0
  90. package/resources/targets/comate/js/js/project/configs/assets.json +1 -0
  91. package/resources/targets/comate/js/js/project/configs/game.controls.json +3 -0
  92. package/resources/targets/comate/js/js/project/configs/game.json +3 -0
  93. package/resources/targets/comate/js/js/project/game-runtime.json +7 -0
  94. package/resources/targets/comate/js/js/project/game.config.json +7 -0
  95. package/resources/targets/comate/js/js/project/index.html +20 -0
  96. package/resources/targets/comate/js/js/project/package.json +22 -0
  97. package/resources/targets/comate/js/js/project/runtime/lightgame/1.1.0/platform/identity/qq-ai-game-sdk.min.js +5 -0
  98. package/resources/targets/comate/js/js/project/runtime/lightgame/1.1.0/platform/identity/qq-session.mjs +208 -0
  99. package/resources/targets/comate/js/js/project/runtime/lightgame/1.1.0/platform/identity/shared.mjs +37 -0
  100. package/resources/targets/comate/js/js/project/runtime/lightgame/1.1.0/platform/platform-capture-video.mjs +227 -0
  101. package/resources/targets/comate/js/js/project/runtime/lightgame/1.1.0/platform/platform-service.d.mts +31 -0
  102. package/resources/targets/comate/js/js/project/runtime/lightgame/1.1.0/platform/platform-service.mjs +272 -0
  103. package/resources/targets/comate/js/js/project/runtime/lightgame/1.1.0/platform/platform.d.mts +79 -0
  104. package/resources/targets/comate/js/js/project/runtime/lightgame/1.1.0/platform/platform.mjs +29 -0
  105. package/resources/targets/comate/js/js/project/runtime/lightgame/1.1.0/release.json +22 -0
  106. package/resources/targets/comate/js/js/project/runtime/lightgame/1.1.0/tooling/cli.mjs +16 -0
  107. package/resources/targets/comate/js/js/project/runtime/lightgame/1.1.0/tooling/project.d.mts +4 -0
  108. package/resources/targets/comate/js/js/project/runtime/lightgame/1.1.0/tooling/project.mjs +50 -0
  109. package/resources/targets/comate/js/js/project/runtime/lightgame/1.1.0/tooling/vite.d.mts +3 -0
  110. package/resources/targets/comate/js/js/project/runtime/lightgame/1.1.0/tooling/vite.mjs +72 -0
  111. package/resources/targets/comate/js/js/project/runtime/lightgame/1.1.0/tools/assets.d.mts +24 -0
  112. package/resources/targets/comate/js/js/project/runtime/lightgame/1.1.0/tools/assets.mjs +2 -0
  113. package/resources/targets/comate/js/js/project/runtime/lightgame/1.1.0/tools/astc.d.mts +10 -0
  114. package/resources/targets/comate/js/js/project/runtime/lightgame/1.1.0/tools/astc.mjs +1 -0
  115. package/resources/targets/comate/js/js/project/scripts/config-export/assert-asset-wiring.mjs +72 -0
  116. package/resources/targets/comate/js/js/project/scripts/config-export/panel-resource-path.mjs +106 -0
  117. package/resources/targets/comate/js/js/project/scripts/config-export/sync-asset-controls.mjs +316 -0
  118. package/resources/targets/comate/js/js/project/scripts/config-export.mjs +13 -0
  119. package/resources/targets/comate/js/js/project/scripts/skill-modules/export-config/cli.mjs +20 -0
  120. package/resources/targets/comate/js/js/project/scripts/skill-modules/export-config/config.d.mts +19 -0
  121. package/resources/targets/comate/js/js/project/scripts/skill-modules/export-config/config.mjs +1 -0
  122. package/resources/targets/comate/js/js/project/scripts/skill-modules/export-config/installed.json +6 -0
  123. package/resources/targets/comate/js/js/project/scripts/skill-modules/export-config/project.d.mts +6 -0
  124. package/resources/targets/comate/js/js/project/scripts/skill-modules/export-config/project.mjs +77 -0
  125. package/resources/targets/comate/js/js/project/scripts/skill-modules/export-config/vite.d.mts +2 -0
  126. package/resources/targets/comate/js/js/project/scripts/skill-modules/export-config/vite.mjs +34 -0
  127. package/resources/targets/comate/js/js/project/scripts/write-preview-ready.mjs +22 -0
  128. package/resources/targets/comate/js/js/project/src/display/ui-stage.ts +156 -0
  129. package/resources/targets/comate/js/js/project/src/display/viewport.ts +249 -0
  130. package/resources/targets/comate/js/js/project/src/main.ts +87 -0
  131. package/resources/targets/comate/js/js/project/src/platform.ts +2 -0
  132. package/resources/targets/comate/js/js/project/src/scenes/LoadScene.ts +89 -0
  133. package/resources/targets/comate/js/js/project/src/scenes/PlayScene.ts +17 -0
  134. package/resources/targets/comate/js/js/project/src/screenUi.ts +185 -0
  135. package/resources/targets/comate/js/js/project/src/style.css +294 -0
  136. package/resources/targets/comate/js/js/project/tsconfig.json +20 -0
  137. package/resources/targets/comate/js/js/project/unified_data_control_config.json +20 -0
  138. package/resources/targets/comate/js/js/project/vite.config.ts +5 -0
  139. package/resources/targets/comate/js/recovery.md +17 -0
  140. package/resources/targets/comate/js/target.json +61 -0
  141. package/resources/targets/comate/js3d/bootstrap/SKILL.md +20 -0
  142. package/resources/targets/comate/js3d/context-filter-report.json +27 -0
  143. package/resources/targets/comate/js3d/craft-game-maker/SKILL.md +72 -0
  144. package/resources/targets/comate/js3d/craft-game-maker/js3d.md +12 -0
  145. package/resources/targets/comate/js3d/js3d/bundle.json +108 -0
  146. package/resources/targets/comate/js3d/js3d/context/AGENTS.md +30 -0
  147. package/resources/targets/comate/js3d/js3d/context/hooks/hooks.json +14 -0
  148. package/resources/targets/comate/js3d/js3d/context/knowledge/AssetUrl.md +9 -0
  149. package/resources/targets/comate/js3d/js3d/context/knowledge/AssetWiring.md +7 -0
  150. package/resources/targets/comate/js3d/js3d/context/knowledge/CodingGuide/Pitfalls.md +11 -0
  151. package/resources/targets/comate/js3d/js3d/context/knowledge/Layout.md +7 -0
  152. package/resources/targets/comate/js3d/js3d/context/knowledge/ResourceLoading.md +11 -0
  153. package/resources/targets/comate/js3d/js3d/context/knowledge/Runtime.md +9 -0
  154. package/resources/targets/comate/js3d/js3d/context/skills/asset-usage-audit/SKILL.md +16 -0
  155. package/resources/targets/comate/js3d/js3d/context/skills/asset-usage-audit/scripts/compare-animations.mjs +48 -0
  156. package/resources/targets/comate/js3d/js3d/context/skills/asset-usage-audit/scripts/lib/anim.mjs +266 -0
  157. package/resources/targets/comate/js3d/js3d/context/skills/asset-usage-audit/scripts/lib/glb.mjs +241 -0
  158. package/resources/targets/comate/js3d/js3d/context/skills/asset-usage-audit/scripts/lib/scan.mjs +455 -0
  159. package/resources/targets/comate/js3d/js3d/context/skills/asset-usage-audit/scripts/scan-assets.mjs +77 -0
  160. package/resources/targets/comate/js3d/js3d/context/skills/export-config/SKILL.md +16 -0
  161. package/resources/targets/comate/js3d/js3d/context/skills/export-config/assets/tooling/cli.mjs +20 -0
  162. package/resources/targets/comate/js3d/js3d/context/skills/export-config/assets/tooling/config.d.mts +19 -0
  163. package/resources/targets/comate/js3d/js3d/context/skills/export-config/assets/tooling/config.mjs +1 -0
  164. package/resources/targets/comate/js3d/js3d/context/skills/export-config/assets/tooling/project.d.mts +6 -0
  165. package/resources/targets/comate/js3d/js3d/context/skills/export-config/assets/tooling/project.mjs +77 -0
  166. package/resources/targets/comate/js3d/js3d/context/skills/export-config/assets/tooling/vite.d.mts +2 -0
  167. package/resources/targets/comate/js3d/js3d/context/skills/export-config/assets/tooling/vite.mjs +34 -0
  168. package/resources/targets/comate/js3d/js3d/context/skills/export-config/scripts/export-config.mjs +4 -0
  169. package/resources/targets/comate/js3d/js3d/context/skills/export-config/scripts/install.mjs +89 -0
  170. package/resources/targets/comate/js3d/js3d/context/skills/export-config/scripts/panel-resource-path.mjs +106 -0
  171. package/resources/targets/comate/js3d/js3d/context/skills/index.json +31 -0
  172. package/resources/targets/comate/js3d/js3d/context/skills/performance-audit/SKILL.md +21 -0
  173. package/resources/targets/comate/js3d/js3d/context/skills/performance-audit/scripts/lib/rules.mjs +470 -0
  174. package/resources/targets/comate/js3d/js3d/context/skills/performance-audit/scripts/lib/scan.mjs +387 -0
  175. package/resources/targets/comate/js3d/js3d/context/skills/performance-audit/scripts/lib/source.mjs +398 -0
  176. package/resources/targets/comate/js3d/js3d/context/skills/performance-audit/scripts/scan-perf.mjs +130 -0
  177. package/resources/targets/comate/js3d/js3d/context/skills/visual-qa/SKILL.md +14 -0
  178. package/resources/targets/comate/js3d/js3d/project/README.md +7 -0
  179. package/resources/targets/comate/js3d/js3d/project/configs/game.controls.json +3 -0
  180. package/resources/targets/comate/js3d/js3d/project/configs/game.json +3 -0
  181. package/resources/targets/comate/js3d/js3d/project/game-runtime.json +7 -0
  182. package/resources/targets/comate/js3d/js3d/project/game.config.json +7 -0
  183. package/resources/targets/comate/js3d/js3d/project/index.html +12 -0
  184. package/resources/targets/comate/js3d/js3d/project/package.json +23 -0
  185. package/resources/targets/comate/js3d/js3d/project/runtime/lightgame/1.1.0/platform/identity/qq-ai-game-sdk.min.js +5 -0
  186. package/resources/targets/comate/js3d/js3d/project/runtime/lightgame/1.1.0/platform/identity/qq-session.mjs +208 -0
  187. package/resources/targets/comate/js3d/js3d/project/runtime/lightgame/1.1.0/platform/identity/shared.mjs +37 -0
  188. package/resources/targets/comate/js3d/js3d/project/runtime/lightgame/1.1.0/platform/platform-capture-video.mjs +227 -0
  189. package/resources/targets/comate/js3d/js3d/project/runtime/lightgame/1.1.0/platform/platform-service.d.mts +31 -0
  190. package/resources/targets/comate/js3d/js3d/project/runtime/lightgame/1.1.0/platform/platform-service.mjs +272 -0
  191. package/resources/targets/comate/js3d/js3d/project/runtime/lightgame/1.1.0/platform/platform.d.mts +79 -0
  192. package/resources/targets/comate/js3d/js3d/project/runtime/lightgame/1.1.0/platform/platform.mjs +30 -0
  193. package/resources/targets/comate/js3d/js3d/project/runtime/lightgame/1.1.0/release.json +24 -0
  194. package/resources/targets/comate/js3d/js3d/project/runtime/lightgame/1.1.0/tooling/cli.mjs +16 -0
  195. package/resources/targets/comate/js3d/js3d/project/runtime/lightgame/1.1.0/tooling/project.d.mts +4 -0
  196. package/resources/targets/comate/js3d/js3d/project/runtime/lightgame/1.1.0/tooling/project.mjs +50 -0
  197. package/resources/targets/comate/js3d/js3d/project/runtime/lightgame/1.1.0/tooling/vite.d.mts +3 -0
  198. package/resources/targets/comate/js3d/js3d/project/runtime/lightgame/1.1.0/tooling/vite.mjs +72 -0
  199. package/resources/targets/comate/js3d/js3d/project/runtime/lightgame/1.1.0/tools/assets.d.mts +24 -0
  200. package/resources/targets/comate/js3d/js3d/project/runtime/lightgame/1.1.0/tools/assets.mjs +2 -0
  201. package/resources/targets/comate/js3d/js3d/project/runtime/lightgame/1.1.0/tools/astc.d.mts +10 -0
  202. package/resources/targets/comate/js3d/js3d/project/runtime/lightgame/1.1.0/tools/astc.mjs +1 -0
  203. package/resources/targets/comate/js3d/js3d/project/runtime/lightgame/1.1.0/tools/glb.d.mts +26 -0
  204. package/resources/targets/comate/js3d/js3d/project/runtime/lightgame/1.1.0/tools/glb.mjs +351 -0
  205. package/resources/targets/comate/js3d/js3d/project/scripts/config-export/assert-asset-wiring.mjs +97 -0
  206. package/resources/targets/comate/js3d/js3d/project/scripts/config-export/panel-resource-path.mjs +106 -0
  207. package/resources/targets/comate/js3d/js3d/project/scripts/config-export/sync-asset-controls.mjs +327 -0
  208. package/resources/targets/comate/js3d/js3d/project/scripts/config-export/sync-scene-assets.mjs +191 -0
  209. package/resources/targets/comate/js3d/js3d/project/scripts/config-export.mjs +15 -0
  210. package/resources/targets/comate/js3d/js3d/project/scripts/skill-modules/export-config/cli.mjs +20 -0
  211. package/resources/targets/comate/js3d/js3d/project/scripts/skill-modules/export-config/config.d.mts +19 -0
  212. package/resources/targets/comate/js3d/js3d/project/scripts/skill-modules/export-config/config.mjs +1 -0
  213. package/resources/targets/comate/js3d/js3d/project/scripts/skill-modules/export-config/installed.json +6 -0
  214. package/resources/targets/comate/js3d/js3d/project/scripts/skill-modules/export-config/project.d.mts +6 -0
  215. package/resources/targets/comate/js3d/js3d/project/scripts/skill-modules/export-config/project.mjs +77 -0
  216. package/resources/targets/comate/js3d/js3d/project/scripts/skill-modules/export-config/vite.d.mts +2 -0
  217. package/resources/targets/comate/js3d/js3d/project/scripts/skill-modules/export-config/vite.mjs +34 -0
  218. package/resources/targets/comate/js3d/js3d/project/scripts/write-preview-ready.mjs +22 -0
  219. package/resources/targets/comate/js3d/js3d/project/src/display/ui-stage.ts +156 -0
  220. package/resources/targets/comate/js3d/js3d/project/src/display/viewport.ts +239 -0
  221. package/resources/targets/comate/js3d/js3d/project/src/main.ts +85 -0
  222. package/resources/targets/comate/js3d/js3d/project/src/platform.ts +2 -0
  223. package/resources/targets/comate/js3d/js3d/project/src/style.css +83 -0
  224. package/resources/targets/comate/js3d/js3d/project/tsconfig.json +20 -0
  225. package/resources/targets/comate/js3d/js3d/project/unified_data_control_config.json +20 -0
  226. package/resources/targets/comate/js3d/js3d/project/vite.config.ts +5 -0
  227. package/resources/targets/comate/js3d/recovery.md +17 -0
  228. package/resources/targets/comate/js3d/target.json +60 -0
  229. package/resources/targets/cursor/js/context-filter-report.json +1 -1
  230. package/resources/targets/cursor/js/craft-game-maker/SKILL.md +3 -3
  231. package/resources/targets/cursor/js/js/bundle.json +5 -5
  232. package/resources/targets/cursor/js/target.json +1 -1
  233. package/resources/targets/cursor/js3d/context-filter-report.json +1 -1
  234. package/resources/targets/cursor/js3d/craft-game-maker/SKILL.md +3 -3
  235. package/resources/targets/cursor/js3d/js3d/bundle.json +6 -6
  236. package/resources/targets/cursor/js3d/js3d/context/skills/asset-usage-audit/scripts/lib/scan.mjs +2 -2
  237. package/resources/targets/cursor/js3d/target.json +1 -1
  238. package/resources/targets/dsh/js/context-filter-report.json +1 -1
  239. package/resources/targets/dsh/js/craft-game-maker/SKILL.md +3 -3
  240. package/resources/targets/dsh/js/js/bundle.json +5 -5
  241. package/resources/targets/dsh/js/target.json +1 -1
  242. package/resources/targets/dsh/js3d/context-filter-report.json +1 -1
  243. package/resources/targets/dsh/js3d/craft-game-maker/SKILL.md +3 -3
  244. package/resources/targets/dsh/js3d/js3d/bundle.json +6 -6
  245. package/resources/targets/dsh/js3d/js3d/context/skills/asset-usage-audit/scripts/lib/scan.mjs +2 -2
  246. package/resources/targets/dsh/js3d/target.json +1 -1
  247. package/resources/targets/index.json +104 -32
  248. package/resources/targets/kimi/js/context-filter-report.json +1 -1
  249. package/resources/targets/kimi/js/craft-game-maker/SKILL.md +3 -3
  250. package/resources/targets/kimi/js/js/bundle.json +5 -5
  251. package/resources/targets/kimi/js/target.json +1 -1
  252. package/resources/targets/kimi/js3d/context-filter-report.json +1 -1
  253. package/resources/targets/kimi/js3d/craft-game-maker/SKILL.md +3 -3
  254. package/resources/targets/kimi/js3d/js3d/bundle.json +6 -6
  255. package/resources/targets/kimi/js3d/js3d/context/skills/asset-usage-audit/scripts/lib/scan.mjs +2 -2
  256. package/resources/targets/kimi/js3d/target.json +1 -1
  257. package/resources/targets/opencode/js/bootstrap/SKILL.md +20 -0
  258. package/resources/targets/opencode/js/context-filter-report.json +27 -0
  259. package/resources/targets/opencode/js/craft-game-maker/SKILL.md +72 -0
  260. package/resources/targets/opencode/js/craft-game-maker/js.md +10 -0
  261. package/resources/targets/opencode/js/js/bundle.json +97 -0
  262. package/resources/targets/opencode/js/js/context/AGENTS.md +29 -0
  263. package/resources/targets/opencode/js/js/context/hooks/hooks.json +14 -0
  264. package/resources/targets/opencode/js/js/context/knowledge/AssetUrl.md +9 -0
  265. package/resources/targets/opencode/js/js/context/knowledge/AssetWiring.md +7 -0
  266. package/resources/targets/opencode/js/js/context/knowledge/Layout.md +7 -0
  267. package/resources/targets/opencode/js/js/context/knowledge/Lifecycle.md +11 -0
  268. package/resources/targets/opencode/js/js/context/knowledge/ResourceLoading.md +9 -0
  269. package/resources/targets/opencode/js/js/context/skills/export-config/SKILL.md +16 -0
  270. package/resources/targets/opencode/js/js/context/skills/export-config/assets/tooling/cli.mjs +20 -0
  271. package/resources/targets/opencode/js/js/context/skills/export-config/assets/tooling/config.d.mts +19 -0
  272. package/resources/targets/opencode/js/js/context/skills/export-config/assets/tooling/config.mjs +1 -0
  273. package/resources/targets/opencode/js/js/context/skills/export-config/assets/tooling/project.d.mts +6 -0
  274. package/resources/targets/opencode/js/js/context/skills/export-config/assets/tooling/project.mjs +77 -0
  275. package/resources/targets/opencode/js/js/context/skills/export-config/assets/tooling/vite.d.mts +2 -0
  276. package/resources/targets/opencode/js/js/context/skills/export-config/assets/tooling/vite.mjs +34 -0
  277. package/resources/targets/opencode/js/js/context/skills/export-config/scripts/export-config.mjs +4 -0
  278. package/resources/targets/opencode/js/js/context/skills/export-config/scripts/install.mjs +89 -0
  279. package/resources/targets/opencode/js/js/context/skills/export-config/scripts/panel-resource-path.mjs +106 -0
  280. package/resources/targets/opencode/js/js/context/skills/index.json +19 -0
  281. package/resources/targets/opencode/js/js/context/skills/visual-qa/SKILL.md +14 -0
  282. package/resources/targets/opencode/js/js/project/README.md +7 -0
  283. package/resources/targets/opencode/js/js/project/configs/assets.json +1 -0
  284. package/resources/targets/opencode/js/js/project/configs/game.controls.json +3 -0
  285. package/resources/targets/opencode/js/js/project/configs/game.json +3 -0
  286. package/resources/targets/opencode/js/js/project/game-runtime.json +7 -0
  287. package/resources/targets/opencode/js/js/project/game.config.json +7 -0
  288. package/resources/targets/opencode/js/js/project/index.html +20 -0
  289. package/resources/targets/opencode/js/js/project/package.json +22 -0
  290. package/resources/targets/opencode/js/js/project/runtime/lightgame/1.1.0/platform/identity/qq-ai-game-sdk.min.js +5 -0
  291. package/resources/targets/opencode/js/js/project/runtime/lightgame/1.1.0/platform/identity/qq-session.mjs +208 -0
  292. package/resources/targets/opencode/js/js/project/runtime/lightgame/1.1.0/platform/identity/shared.mjs +37 -0
  293. package/resources/targets/opencode/js/js/project/runtime/lightgame/1.1.0/platform/platform-capture-video.mjs +227 -0
  294. package/resources/targets/opencode/js/js/project/runtime/lightgame/1.1.0/platform/platform-service.d.mts +31 -0
  295. package/resources/targets/opencode/js/js/project/runtime/lightgame/1.1.0/platform/platform-service.mjs +272 -0
  296. package/resources/targets/opencode/js/js/project/runtime/lightgame/1.1.0/platform/platform.d.mts +79 -0
  297. package/resources/targets/opencode/js/js/project/runtime/lightgame/1.1.0/platform/platform.mjs +29 -0
  298. package/resources/targets/opencode/js/js/project/runtime/lightgame/1.1.0/release.json +22 -0
  299. package/resources/targets/opencode/js/js/project/runtime/lightgame/1.1.0/tooling/cli.mjs +16 -0
  300. package/resources/targets/opencode/js/js/project/runtime/lightgame/1.1.0/tooling/project.d.mts +4 -0
  301. package/resources/targets/opencode/js/js/project/runtime/lightgame/1.1.0/tooling/project.mjs +50 -0
  302. package/resources/targets/opencode/js/js/project/runtime/lightgame/1.1.0/tooling/vite.d.mts +3 -0
  303. package/resources/targets/opencode/js/js/project/runtime/lightgame/1.1.0/tooling/vite.mjs +72 -0
  304. package/resources/targets/opencode/js/js/project/runtime/lightgame/1.1.0/tools/assets.d.mts +24 -0
  305. package/resources/targets/opencode/js/js/project/runtime/lightgame/1.1.0/tools/assets.mjs +2 -0
  306. package/resources/targets/opencode/js/js/project/runtime/lightgame/1.1.0/tools/astc.d.mts +10 -0
  307. package/resources/targets/opencode/js/js/project/runtime/lightgame/1.1.0/tools/astc.mjs +1 -0
  308. package/resources/targets/opencode/js/js/project/scripts/config-export/assert-asset-wiring.mjs +72 -0
  309. package/resources/targets/opencode/js/js/project/scripts/config-export/panel-resource-path.mjs +106 -0
  310. package/resources/targets/opencode/js/js/project/scripts/config-export/sync-asset-controls.mjs +316 -0
  311. package/resources/targets/opencode/js/js/project/scripts/config-export.mjs +13 -0
  312. package/resources/targets/opencode/js/js/project/scripts/skill-modules/export-config/cli.mjs +20 -0
  313. package/resources/targets/opencode/js/js/project/scripts/skill-modules/export-config/config.d.mts +19 -0
  314. package/resources/targets/opencode/js/js/project/scripts/skill-modules/export-config/config.mjs +1 -0
  315. package/resources/targets/opencode/js/js/project/scripts/skill-modules/export-config/installed.json +6 -0
  316. package/resources/targets/opencode/js/js/project/scripts/skill-modules/export-config/project.d.mts +6 -0
  317. package/resources/targets/opencode/js/js/project/scripts/skill-modules/export-config/project.mjs +77 -0
  318. package/resources/targets/opencode/js/js/project/scripts/skill-modules/export-config/vite.d.mts +2 -0
  319. package/resources/targets/opencode/js/js/project/scripts/skill-modules/export-config/vite.mjs +34 -0
  320. package/resources/targets/opencode/js/js/project/scripts/write-preview-ready.mjs +22 -0
  321. package/resources/targets/opencode/js/js/project/src/display/ui-stage.ts +156 -0
  322. package/resources/targets/opencode/js/js/project/src/display/viewport.ts +249 -0
  323. package/resources/targets/opencode/js/js/project/src/main.ts +87 -0
  324. package/resources/targets/opencode/js/js/project/src/platform.ts +2 -0
  325. package/resources/targets/opencode/js/js/project/src/scenes/LoadScene.ts +89 -0
  326. package/resources/targets/opencode/js/js/project/src/scenes/PlayScene.ts +17 -0
  327. package/resources/targets/opencode/js/js/project/src/screenUi.ts +185 -0
  328. package/resources/targets/opencode/js/js/project/src/style.css +294 -0
  329. package/resources/targets/opencode/js/js/project/tsconfig.json +20 -0
  330. package/resources/targets/opencode/js/js/project/unified_data_control_config.json +20 -0
  331. package/resources/targets/opencode/js/js/project/vite.config.ts +5 -0
  332. package/resources/targets/opencode/js/recovery.md +17 -0
  333. package/resources/targets/opencode/js/target.json +61 -0
  334. package/resources/targets/opencode/js3d/bootstrap/SKILL.md +20 -0
  335. package/resources/targets/opencode/js3d/context-filter-report.json +27 -0
  336. package/resources/targets/opencode/js3d/craft-game-maker/SKILL.md +72 -0
  337. package/resources/targets/opencode/js3d/craft-game-maker/js3d.md +12 -0
  338. package/resources/targets/opencode/js3d/js3d/bundle.json +108 -0
  339. package/resources/targets/opencode/js3d/js3d/context/AGENTS.md +30 -0
  340. package/resources/targets/opencode/js3d/js3d/context/hooks/hooks.json +14 -0
  341. package/resources/targets/opencode/js3d/js3d/context/knowledge/AssetUrl.md +9 -0
  342. package/resources/targets/opencode/js3d/js3d/context/knowledge/AssetWiring.md +7 -0
  343. package/resources/targets/opencode/js3d/js3d/context/knowledge/CodingGuide/Pitfalls.md +11 -0
  344. package/resources/targets/opencode/js3d/js3d/context/knowledge/Layout.md +7 -0
  345. package/resources/targets/opencode/js3d/js3d/context/knowledge/ResourceLoading.md +11 -0
  346. package/resources/targets/opencode/js3d/js3d/context/knowledge/Runtime.md +9 -0
  347. package/resources/targets/opencode/js3d/js3d/context/skills/asset-usage-audit/SKILL.md +16 -0
  348. package/resources/targets/opencode/js3d/js3d/context/skills/asset-usage-audit/scripts/compare-animations.mjs +48 -0
  349. package/resources/targets/opencode/js3d/js3d/context/skills/asset-usage-audit/scripts/lib/anim.mjs +266 -0
  350. package/resources/targets/opencode/js3d/js3d/context/skills/asset-usage-audit/scripts/lib/glb.mjs +241 -0
  351. package/resources/targets/opencode/js3d/js3d/context/skills/asset-usage-audit/scripts/lib/scan.mjs +455 -0
  352. package/resources/targets/opencode/js3d/js3d/context/skills/asset-usage-audit/scripts/scan-assets.mjs +77 -0
  353. package/resources/targets/opencode/js3d/js3d/context/skills/export-config/SKILL.md +16 -0
  354. package/resources/targets/opencode/js3d/js3d/context/skills/export-config/assets/tooling/cli.mjs +20 -0
  355. package/resources/targets/opencode/js3d/js3d/context/skills/export-config/assets/tooling/config.d.mts +19 -0
  356. package/resources/targets/opencode/js3d/js3d/context/skills/export-config/assets/tooling/config.mjs +1 -0
  357. package/resources/targets/opencode/js3d/js3d/context/skills/export-config/assets/tooling/project.d.mts +6 -0
  358. package/resources/targets/opencode/js3d/js3d/context/skills/export-config/assets/tooling/project.mjs +77 -0
  359. package/resources/targets/opencode/js3d/js3d/context/skills/export-config/assets/tooling/vite.d.mts +2 -0
  360. package/resources/targets/opencode/js3d/js3d/context/skills/export-config/assets/tooling/vite.mjs +34 -0
  361. package/resources/targets/opencode/js3d/js3d/context/skills/export-config/scripts/export-config.mjs +4 -0
  362. package/resources/targets/opencode/js3d/js3d/context/skills/export-config/scripts/install.mjs +89 -0
  363. package/resources/targets/opencode/js3d/js3d/context/skills/export-config/scripts/panel-resource-path.mjs +106 -0
  364. package/resources/targets/opencode/js3d/js3d/context/skills/index.json +31 -0
  365. package/resources/targets/opencode/js3d/js3d/context/skills/performance-audit/SKILL.md +21 -0
  366. package/resources/targets/opencode/js3d/js3d/context/skills/performance-audit/scripts/lib/rules.mjs +470 -0
  367. package/resources/targets/opencode/js3d/js3d/context/skills/performance-audit/scripts/lib/scan.mjs +387 -0
  368. package/resources/targets/opencode/js3d/js3d/context/skills/performance-audit/scripts/lib/source.mjs +398 -0
  369. package/resources/targets/opencode/js3d/js3d/context/skills/performance-audit/scripts/scan-perf.mjs +130 -0
  370. package/resources/targets/opencode/js3d/js3d/context/skills/visual-qa/SKILL.md +14 -0
  371. package/resources/targets/opencode/js3d/js3d/project/README.md +7 -0
  372. package/resources/targets/opencode/js3d/js3d/project/configs/game.controls.json +3 -0
  373. package/resources/targets/opencode/js3d/js3d/project/configs/game.json +3 -0
  374. package/resources/targets/opencode/js3d/js3d/project/game-runtime.json +7 -0
  375. package/resources/targets/opencode/js3d/js3d/project/game.config.json +7 -0
  376. package/resources/targets/opencode/js3d/js3d/project/index.html +12 -0
  377. package/resources/targets/opencode/js3d/js3d/project/package.json +23 -0
  378. package/resources/targets/opencode/js3d/js3d/project/runtime/lightgame/1.1.0/platform/identity/qq-ai-game-sdk.min.js +5 -0
  379. package/resources/targets/opencode/js3d/js3d/project/runtime/lightgame/1.1.0/platform/identity/qq-session.mjs +208 -0
  380. package/resources/targets/opencode/js3d/js3d/project/runtime/lightgame/1.1.0/platform/identity/shared.mjs +37 -0
  381. package/resources/targets/opencode/js3d/js3d/project/runtime/lightgame/1.1.0/platform/platform-capture-video.mjs +227 -0
  382. package/resources/targets/opencode/js3d/js3d/project/runtime/lightgame/1.1.0/platform/platform-service.d.mts +31 -0
  383. package/resources/targets/opencode/js3d/js3d/project/runtime/lightgame/1.1.0/platform/platform-service.mjs +272 -0
  384. package/resources/targets/opencode/js3d/js3d/project/runtime/lightgame/1.1.0/platform/platform.d.mts +79 -0
  385. package/resources/targets/opencode/js3d/js3d/project/runtime/lightgame/1.1.0/platform/platform.mjs +30 -0
  386. package/resources/targets/opencode/js3d/js3d/project/runtime/lightgame/1.1.0/release.json +24 -0
  387. package/resources/targets/opencode/js3d/js3d/project/runtime/lightgame/1.1.0/tooling/cli.mjs +16 -0
  388. package/resources/targets/opencode/js3d/js3d/project/runtime/lightgame/1.1.0/tooling/project.d.mts +4 -0
  389. package/resources/targets/opencode/js3d/js3d/project/runtime/lightgame/1.1.0/tooling/project.mjs +50 -0
  390. package/resources/targets/opencode/js3d/js3d/project/runtime/lightgame/1.1.0/tooling/vite.d.mts +3 -0
  391. package/resources/targets/opencode/js3d/js3d/project/runtime/lightgame/1.1.0/tooling/vite.mjs +72 -0
  392. package/resources/targets/opencode/js3d/js3d/project/runtime/lightgame/1.1.0/tools/assets.d.mts +24 -0
  393. package/resources/targets/opencode/js3d/js3d/project/runtime/lightgame/1.1.0/tools/assets.mjs +2 -0
  394. package/resources/targets/opencode/js3d/js3d/project/runtime/lightgame/1.1.0/tools/astc.d.mts +10 -0
  395. package/resources/targets/opencode/js3d/js3d/project/runtime/lightgame/1.1.0/tools/astc.mjs +1 -0
  396. package/resources/targets/opencode/js3d/js3d/project/runtime/lightgame/1.1.0/tools/glb.d.mts +26 -0
  397. package/resources/targets/opencode/js3d/js3d/project/runtime/lightgame/1.1.0/tools/glb.mjs +351 -0
  398. package/resources/targets/opencode/js3d/js3d/project/scripts/config-export/assert-asset-wiring.mjs +97 -0
  399. package/resources/targets/opencode/js3d/js3d/project/scripts/config-export/panel-resource-path.mjs +106 -0
  400. package/resources/targets/opencode/js3d/js3d/project/scripts/config-export/sync-asset-controls.mjs +327 -0
  401. package/resources/targets/opencode/js3d/js3d/project/scripts/config-export/sync-scene-assets.mjs +191 -0
  402. package/resources/targets/opencode/js3d/js3d/project/scripts/config-export.mjs +15 -0
  403. package/resources/targets/opencode/js3d/js3d/project/scripts/skill-modules/export-config/cli.mjs +20 -0
  404. package/resources/targets/opencode/js3d/js3d/project/scripts/skill-modules/export-config/config.d.mts +19 -0
  405. package/resources/targets/opencode/js3d/js3d/project/scripts/skill-modules/export-config/config.mjs +1 -0
  406. package/resources/targets/opencode/js3d/js3d/project/scripts/skill-modules/export-config/installed.json +6 -0
  407. package/resources/targets/opencode/js3d/js3d/project/scripts/skill-modules/export-config/project.d.mts +6 -0
  408. package/resources/targets/opencode/js3d/js3d/project/scripts/skill-modules/export-config/project.mjs +77 -0
  409. package/resources/targets/opencode/js3d/js3d/project/scripts/skill-modules/export-config/vite.d.mts +2 -0
  410. package/resources/targets/opencode/js3d/js3d/project/scripts/skill-modules/export-config/vite.mjs +34 -0
  411. package/resources/targets/opencode/js3d/js3d/project/scripts/write-preview-ready.mjs +22 -0
  412. package/resources/targets/opencode/js3d/js3d/project/src/display/ui-stage.ts +156 -0
  413. package/resources/targets/opencode/js3d/js3d/project/src/display/viewport.ts +239 -0
  414. package/resources/targets/opencode/js3d/js3d/project/src/main.ts +85 -0
  415. package/resources/targets/opencode/js3d/js3d/project/src/platform.ts +2 -0
  416. package/resources/targets/opencode/js3d/js3d/project/src/style.css +83 -0
  417. package/resources/targets/opencode/js3d/js3d/project/tsconfig.json +20 -0
  418. package/resources/targets/opencode/js3d/js3d/project/unified_data_control_config.json +20 -0
  419. package/resources/targets/opencode/js3d/js3d/project/vite.config.ts +5 -0
  420. package/resources/targets/opencode/js3d/recovery.md +17 -0
  421. package/resources/targets/opencode/js3d/target.json +60 -0
  422. package/resources/targets/qoder/js/bootstrap/SKILL.md +20 -0
  423. package/resources/targets/qoder/js/context-filter-report.json +27 -0
  424. package/resources/targets/qoder/js/craft-game-maker/SKILL.md +72 -0
  425. package/resources/targets/qoder/js/craft-game-maker/js.md +10 -0
  426. package/resources/targets/qoder/js/js/bundle.json +97 -0
  427. package/resources/targets/qoder/js/js/context/AGENTS.md +31 -0
  428. package/resources/targets/qoder/js/js/context/hooks/hooks.json +14 -0
  429. package/resources/targets/qoder/js/js/context/knowledge/AssetUrl.md +9 -0
  430. package/resources/targets/qoder/js/js/context/knowledge/AssetWiring.md +7 -0
  431. package/resources/targets/qoder/js/js/context/knowledge/Layout.md +7 -0
  432. package/resources/targets/qoder/js/js/context/knowledge/Lifecycle.md +11 -0
  433. package/resources/targets/qoder/js/js/context/knowledge/ResourceLoading.md +9 -0
  434. package/resources/targets/qoder/js/js/context/skills/export-config/SKILL.md +16 -0
  435. package/resources/targets/qoder/js/js/context/skills/export-config/assets/tooling/cli.mjs +20 -0
  436. package/resources/targets/qoder/js/js/context/skills/export-config/assets/tooling/config.d.mts +19 -0
  437. package/resources/targets/qoder/js/js/context/skills/export-config/assets/tooling/config.mjs +1 -0
  438. package/resources/targets/qoder/js/js/context/skills/export-config/assets/tooling/project.d.mts +6 -0
  439. package/resources/targets/qoder/js/js/context/skills/export-config/assets/tooling/project.mjs +77 -0
  440. package/resources/targets/qoder/js/js/context/skills/export-config/assets/tooling/vite.d.mts +2 -0
  441. package/resources/targets/qoder/js/js/context/skills/export-config/assets/tooling/vite.mjs +34 -0
  442. package/resources/targets/qoder/js/js/context/skills/export-config/scripts/export-config.mjs +4 -0
  443. package/resources/targets/qoder/js/js/context/skills/export-config/scripts/install.mjs +89 -0
  444. package/resources/targets/qoder/js/js/context/skills/export-config/scripts/panel-resource-path.mjs +106 -0
  445. package/resources/targets/qoder/js/js/context/skills/index.json +19 -0
  446. package/resources/targets/qoder/js/js/context/skills/visual-qa/SKILL.md +14 -0
  447. package/resources/targets/qoder/js/js/project/README.md +7 -0
  448. package/resources/targets/qoder/js/js/project/configs/assets.json +1 -0
  449. package/resources/targets/qoder/js/js/project/configs/game.controls.json +3 -0
  450. package/resources/targets/qoder/js/js/project/configs/game.json +3 -0
  451. package/resources/targets/qoder/js/js/project/game-runtime.json +7 -0
  452. package/resources/targets/qoder/js/js/project/game.config.json +7 -0
  453. package/resources/targets/qoder/js/js/project/index.html +20 -0
  454. package/resources/targets/qoder/js/js/project/package.json +22 -0
  455. package/resources/targets/qoder/js/js/project/runtime/lightgame/1.1.0/platform/identity/qq-ai-game-sdk.min.js +5 -0
  456. package/resources/targets/qoder/js/js/project/runtime/lightgame/1.1.0/platform/identity/qq-session.mjs +208 -0
  457. package/resources/targets/qoder/js/js/project/runtime/lightgame/1.1.0/platform/identity/shared.mjs +37 -0
  458. package/resources/targets/qoder/js/js/project/runtime/lightgame/1.1.0/platform/platform-capture-video.mjs +227 -0
  459. package/resources/targets/qoder/js/js/project/runtime/lightgame/1.1.0/platform/platform-service.d.mts +31 -0
  460. package/resources/targets/qoder/js/js/project/runtime/lightgame/1.1.0/platform/platform-service.mjs +272 -0
  461. package/resources/targets/qoder/js/js/project/runtime/lightgame/1.1.0/platform/platform.d.mts +79 -0
  462. package/resources/targets/qoder/js/js/project/runtime/lightgame/1.1.0/platform/platform.mjs +29 -0
  463. package/resources/targets/qoder/js/js/project/runtime/lightgame/1.1.0/release.json +22 -0
  464. package/resources/targets/qoder/js/js/project/runtime/lightgame/1.1.0/tooling/cli.mjs +16 -0
  465. package/resources/targets/qoder/js/js/project/runtime/lightgame/1.1.0/tooling/project.d.mts +4 -0
  466. package/resources/targets/qoder/js/js/project/runtime/lightgame/1.1.0/tooling/project.mjs +50 -0
  467. package/resources/targets/qoder/js/js/project/runtime/lightgame/1.1.0/tooling/vite.d.mts +3 -0
  468. package/resources/targets/qoder/js/js/project/runtime/lightgame/1.1.0/tooling/vite.mjs +72 -0
  469. package/resources/targets/qoder/js/js/project/runtime/lightgame/1.1.0/tools/assets.d.mts +24 -0
  470. package/resources/targets/qoder/js/js/project/runtime/lightgame/1.1.0/tools/assets.mjs +2 -0
  471. package/resources/targets/qoder/js/js/project/runtime/lightgame/1.1.0/tools/astc.d.mts +10 -0
  472. package/resources/targets/qoder/js/js/project/runtime/lightgame/1.1.0/tools/astc.mjs +1 -0
  473. package/resources/targets/qoder/js/js/project/scripts/config-export/assert-asset-wiring.mjs +72 -0
  474. package/resources/targets/qoder/js/js/project/scripts/config-export/panel-resource-path.mjs +106 -0
  475. package/resources/targets/qoder/js/js/project/scripts/config-export/sync-asset-controls.mjs +316 -0
  476. package/resources/targets/qoder/js/js/project/scripts/config-export.mjs +13 -0
  477. package/resources/targets/qoder/js/js/project/scripts/skill-modules/export-config/cli.mjs +20 -0
  478. package/resources/targets/qoder/js/js/project/scripts/skill-modules/export-config/config.d.mts +19 -0
  479. package/resources/targets/qoder/js/js/project/scripts/skill-modules/export-config/config.mjs +1 -0
  480. package/resources/targets/qoder/js/js/project/scripts/skill-modules/export-config/installed.json +6 -0
  481. package/resources/targets/qoder/js/js/project/scripts/skill-modules/export-config/project.d.mts +6 -0
  482. package/resources/targets/qoder/js/js/project/scripts/skill-modules/export-config/project.mjs +77 -0
  483. package/resources/targets/qoder/js/js/project/scripts/skill-modules/export-config/vite.d.mts +2 -0
  484. package/resources/targets/qoder/js/js/project/scripts/skill-modules/export-config/vite.mjs +34 -0
  485. package/resources/targets/qoder/js/js/project/scripts/write-preview-ready.mjs +22 -0
  486. package/resources/targets/qoder/js/js/project/src/display/ui-stage.ts +156 -0
  487. package/resources/targets/qoder/js/js/project/src/display/viewport.ts +249 -0
  488. package/resources/targets/qoder/js/js/project/src/main.ts +87 -0
  489. package/resources/targets/qoder/js/js/project/src/platform.ts +2 -0
  490. package/resources/targets/qoder/js/js/project/src/scenes/LoadScene.ts +89 -0
  491. package/resources/targets/qoder/js/js/project/src/scenes/PlayScene.ts +17 -0
  492. package/resources/targets/qoder/js/js/project/src/screenUi.ts +185 -0
  493. package/resources/targets/qoder/js/js/project/src/style.css +294 -0
  494. package/resources/targets/qoder/js/js/project/tsconfig.json +20 -0
  495. package/resources/targets/qoder/js/js/project/unified_data_control_config.json +20 -0
  496. package/resources/targets/qoder/js/js/project/vite.config.ts +5 -0
  497. package/resources/targets/qoder/js/recovery.md +17 -0
  498. package/resources/targets/qoder/js/target.json +61 -0
  499. package/resources/targets/qoder/js3d/bootstrap/SKILL.md +20 -0
  500. package/resources/targets/qoder/js3d/context-filter-report.json +27 -0
  501. package/resources/targets/qoder/js3d/craft-game-maker/SKILL.md +72 -0
  502. package/resources/targets/qoder/js3d/craft-game-maker/js3d.md +12 -0
  503. package/resources/targets/qoder/js3d/js3d/bundle.json +108 -0
  504. package/resources/targets/qoder/js3d/js3d/context/AGENTS.md +32 -0
  505. package/resources/targets/qoder/js3d/js3d/context/hooks/hooks.json +14 -0
  506. package/resources/targets/qoder/js3d/js3d/context/knowledge/AssetUrl.md +9 -0
  507. package/resources/targets/qoder/js3d/js3d/context/knowledge/AssetWiring.md +7 -0
  508. package/resources/targets/qoder/js3d/js3d/context/knowledge/CodingGuide/Pitfalls.md +11 -0
  509. package/resources/targets/qoder/js3d/js3d/context/knowledge/Layout.md +7 -0
  510. package/resources/targets/qoder/js3d/js3d/context/knowledge/ResourceLoading.md +11 -0
  511. package/resources/targets/qoder/js3d/js3d/context/knowledge/Runtime.md +9 -0
  512. package/resources/targets/qoder/js3d/js3d/context/skills/asset-usage-audit/SKILL.md +16 -0
  513. package/resources/targets/qoder/js3d/js3d/context/skills/asset-usage-audit/scripts/compare-animations.mjs +48 -0
  514. package/resources/targets/qoder/js3d/js3d/context/skills/asset-usage-audit/scripts/lib/anim.mjs +266 -0
  515. package/resources/targets/qoder/js3d/js3d/context/skills/asset-usage-audit/scripts/lib/glb.mjs +241 -0
  516. package/resources/targets/qoder/js3d/js3d/context/skills/asset-usage-audit/scripts/lib/scan.mjs +455 -0
  517. package/resources/targets/qoder/js3d/js3d/context/skills/asset-usage-audit/scripts/scan-assets.mjs +77 -0
  518. package/resources/targets/qoder/js3d/js3d/context/skills/export-config/SKILL.md +16 -0
  519. package/resources/targets/qoder/js3d/js3d/context/skills/export-config/assets/tooling/cli.mjs +20 -0
  520. package/resources/targets/qoder/js3d/js3d/context/skills/export-config/assets/tooling/config.d.mts +19 -0
  521. package/resources/targets/qoder/js3d/js3d/context/skills/export-config/assets/tooling/config.mjs +1 -0
  522. package/resources/targets/qoder/js3d/js3d/context/skills/export-config/assets/tooling/project.d.mts +6 -0
  523. package/resources/targets/qoder/js3d/js3d/context/skills/export-config/assets/tooling/project.mjs +77 -0
  524. package/resources/targets/qoder/js3d/js3d/context/skills/export-config/assets/tooling/vite.d.mts +2 -0
  525. package/resources/targets/qoder/js3d/js3d/context/skills/export-config/assets/tooling/vite.mjs +34 -0
  526. package/resources/targets/qoder/js3d/js3d/context/skills/export-config/scripts/export-config.mjs +4 -0
  527. package/resources/targets/qoder/js3d/js3d/context/skills/export-config/scripts/install.mjs +89 -0
  528. package/resources/targets/qoder/js3d/js3d/context/skills/export-config/scripts/panel-resource-path.mjs +106 -0
  529. package/resources/targets/qoder/js3d/js3d/context/skills/index.json +31 -0
  530. package/resources/targets/qoder/js3d/js3d/context/skills/performance-audit/SKILL.md +21 -0
  531. package/resources/targets/qoder/js3d/js3d/context/skills/performance-audit/scripts/lib/rules.mjs +470 -0
  532. package/resources/targets/qoder/js3d/js3d/context/skills/performance-audit/scripts/lib/scan.mjs +387 -0
  533. package/resources/targets/qoder/js3d/js3d/context/skills/performance-audit/scripts/lib/source.mjs +398 -0
  534. package/resources/targets/qoder/js3d/js3d/context/skills/performance-audit/scripts/scan-perf.mjs +130 -0
  535. package/resources/targets/qoder/js3d/js3d/context/skills/visual-qa/SKILL.md +14 -0
  536. package/resources/targets/qoder/js3d/js3d/project/README.md +7 -0
  537. package/resources/targets/qoder/js3d/js3d/project/configs/game.controls.json +3 -0
  538. package/resources/targets/qoder/js3d/js3d/project/configs/game.json +3 -0
  539. package/resources/targets/qoder/js3d/js3d/project/game-runtime.json +7 -0
  540. package/resources/targets/qoder/js3d/js3d/project/game.config.json +7 -0
  541. package/resources/targets/qoder/js3d/js3d/project/index.html +12 -0
  542. package/resources/targets/qoder/js3d/js3d/project/package.json +23 -0
  543. package/resources/targets/qoder/js3d/js3d/project/runtime/lightgame/1.1.0/platform/identity/qq-ai-game-sdk.min.js +5 -0
  544. package/resources/targets/qoder/js3d/js3d/project/runtime/lightgame/1.1.0/platform/identity/qq-session.mjs +208 -0
  545. package/resources/targets/qoder/js3d/js3d/project/runtime/lightgame/1.1.0/platform/identity/shared.mjs +37 -0
  546. package/resources/targets/qoder/js3d/js3d/project/runtime/lightgame/1.1.0/platform/platform-capture-video.mjs +227 -0
  547. package/resources/targets/qoder/js3d/js3d/project/runtime/lightgame/1.1.0/platform/platform-service.d.mts +31 -0
  548. package/resources/targets/qoder/js3d/js3d/project/runtime/lightgame/1.1.0/platform/platform-service.mjs +272 -0
  549. package/resources/targets/qoder/js3d/js3d/project/runtime/lightgame/1.1.0/platform/platform.d.mts +79 -0
  550. package/resources/targets/qoder/js3d/js3d/project/runtime/lightgame/1.1.0/platform/platform.mjs +30 -0
  551. package/resources/targets/qoder/js3d/js3d/project/runtime/lightgame/1.1.0/release.json +24 -0
  552. package/resources/targets/qoder/js3d/js3d/project/runtime/lightgame/1.1.0/tooling/cli.mjs +16 -0
  553. package/resources/targets/qoder/js3d/js3d/project/runtime/lightgame/1.1.0/tooling/project.d.mts +4 -0
  554. package/resources/targets/qoder/js3d/js3d/project/runtime/lightgame/1.1.0/tooling/project.mjs +50 -0
  555. package/resources/targets/qoder/js3d/js3d/project/runtime/lightgame/1.1.0/tooling/vite.d.mts +3 -0
  556. package/resources/targets/qoder/js3d/js3d/project/runtime/lightgame/1.1.0/tooling/vite.mjs +72 -0
  557. package/resources/targets/qoder/js3d/js3d/project/runtime/lightgame/1.1.0/tools/assets.d.mts +24 -0
  558. package/resources/targets/qoder/js3d/js3d/project/runtime/lightgame/1.1.0/tools/assets.mjs +2 -0
  559. package/resources/targets/qoder/js3d/js3d/project/runtime/lightgame/1.1.0/tools/astc.d.mts +10 -0
  560. package/resources/targets/qoder/js3d/js3d/project/runtime/lightgame/1.1.0/tools/astc.mjs +1 -0
  561. package/resources/targets/qoder/js3d/js3d/project/runtime/lightgame/1.1.0/tools/glb.d.mts +26 -0
  562. package/resources/targets/qoder/js3d/js3d/project/runtime/lightgame/1.1.0/tools/glb.mjs +351 -0
  563. package/resources/targets/qoder/js3d/js3d/project/scripts/config-export/assert-asset-wiring.mjs +97 -0
  564. package/resources/targets/qoder/js3d/js3d/project/scripts/config-export/panel-resource-path.mjs +106 -0
  565. package/resources/targets/qoder/js3d/js3d/project/scripts/config-export/sync-asset-controls.mjs +327 -0
  566. package/resources/targets/qoder/js3d/js3d/project/scripts/config-export/sync-scene-assets.mjs +191 -0
  567. package/resources/targets/qoder/js3d/js3d/project/scripts/config-export.mjs +15 -0
  568. package/resources/targets/qoder/js3d/js3d/project/scripts/skill-modules/export-config/cli.mjs +20 -0
  569. package/resources/targets/qoder/js3d/js3d/project/scripts/skill-modules/export-config/config.d.mts +19 -0
  570. package/resources/targets/qoder/js3d/js3d/project/scripts/skill-modules/export-config/config.mjs +1 -0
  571. package/resources/targets/qoder/js3d/js3d/project/scripts/skill-modules/export-config/installed.json +6 -0
  572. package/resources/targets/qoder/js3d/js3d/project/scripts/skill-modules/export-config/project.d.mts +6 -0
  573. package/resources/targets/qoder/js3d/js3d/project/scripts/skill-modules/export-config/project.mjs +77 -0
  574. package/resources/targets/qoder/js3d/js3d/project/scripts/skill-modules/export-config/vite.d.mts +2 -0
  575. package/resources/targets/qoder/js3d/js3d/project/scripts/skill-modules/export-config/vite.mjs +34 -0
  576. package/resources/targets/qoder/js3d/js3d/project/scripts/write-preview-ready.mjs +22 -0
  577. package/resources/targets/qoder/js3d/js3d/project/src/display/ui-stage.ts +156 -0
  578. package/resources/targets/qoder/js3d/js3d/project/src/display/viewport.ts +239 -0
  579. package/resources/targets/qoder/js3d/js3d/project/src/main.ts +85 -0
  580. package/resources/targets/qoder/js3d/js3d/project/src/platform.ts +2 -0
  581. package/resources/targets/qoder/js3d/js3d/project/src/style.css +83 -0
  582. package/resources/targets/qoder/js3d/js3d/project/tsconfig.json +20 -0
  583. package/resources/targets/qoder/js3d/js3d/project/unified_data_control_config.json +20 -0
  584. package/resources/targets/qoder/js3d/js3d/project/vite.config.ts +5 -0
  585. package/resources/targets/qoder/js3d/recovery.md +17 -0
  586. package/resources/targets/qoder/js3d/target.json +60 -0
  587. package/resources/targets/qoder-cn/js/bootstrap/SKILL.md +20 -0
  588. package/resources/targets/qoder-cn/js/context-filter-report.json +27 -0
  589. package/resources/targets/qoder-cn/js/craft-game-maker/SKILL.md +72 -0
  590. package/resources/targets/qoder-cn/js/craft-game-maker/js.md +10 -0
  591. package/resources/targets/qoder-cn/js/js/bundle.json +97 -0
  592. package/resources/targets/qoder-cn/js/js/context/AGENTS.md +31 -0
  593. package/resources/targets/qoder-cn/js/js/context/hooks/hooks.json +14 -0
  594. package/resources/targets/qoder-cn/js/js/context/knowledge/AssetUrl.md +9 -0
  595. package/resources/targets/qoder-cn/js/js/context/knowledge/AssetWiring.md +7 -0
  596. package/resources/targets/qoder-cn/js/js/context/knowledge/Layout.md +7 -0
  597. package/resources/targets/qoder-cn/js/js/context/knowledge/Lifecycle.md +11 -0
  598. package/resources/targets/qoder-cn/js/js/context/knowledge/ResourceLoading.md +9 -0
  599. package/resources/targets/qoder-cn/js/js/context/skills/export-config/SKILL.md +16 -0
  600. package/resources/targets/qoder-cn/js/js/context/skills/export-config/assets/tooling/cli.mjs +20 -0
  601. package/resources/targets/qoder-cn/js/js/context/skills/export-config/assets/tooling/config.d.mts +19 -0
  602. package/resources/targets/qoder-cn/js/js/context/skills/export-config/assets/tooling/config.mjs +1 -0
  603. package/resources/targets/qoder-cn/js/js/context/skills/export-config/assets/tooling/project.d.mts +6 -0
  604. package/resources/targets/qoder-cn/js/js/context/skills/export-config/assets/tooling/project.mjs +77 -0
  605. package/resources/targets/qoder-cn/js/js/context/skills/export-config/assets/tooling/vite.d.mts +2 -0
  606. package/resources/targets/qoder-cn/js/js/context/skills/export-config/assets/tooling/vite.mjs +34 -0
  607. package/resources/targets/qoder-cn/js/js/context/skills/export-config/scripts/export-config.mjs +4 -0
  608. package/resources/targets/qoder-cn/js/js/context/skills/export-config/scripts/install.mjs +89 -0
  609. package/resources/targets/qoder-cn/js/js/context/skills/export-config/scripts/panel-resource-path.mjs +106 -0
  610. package/resources/targets/qoder-cn/js/js/context/skills/index.json +19 -0
  611. package/resources/targets/qoder-cn/js/js/context/skills/visual-qa/SKILL.md +14 -0
  612. package/resources/targets/qoder-cn/js/js/project/README.md +7 -0
  613. package/resources/targets/qoder-cn/js/js/project/configs/assets.json +1 -0
  614. package/resources/targets/qoder-cn/js/js/project/configs/game.controls.json +3 -0
  615. package/resources/targets/qoder-cn/js/js/project/configs/game.json +3 -0
  616. package/resources/targets/qoder-cn/js/js/project/game-runtime.json +7 -0
  617. package/resources/targets/qoder-cn/js/js/project/game.config.json +7 -0
  618. package/resources/targets/qoder-cn/js/js/project/index.html +20 -0
  619. package/resources/targets/qoder-cn/js/js/project/package.json +22 -0
  620. package/resources/targets/qoder-cn/js/js/project/runtime/lightgame/1.1.0/platform/identity/qq-ai-game-sdk.min.js +5 -0
  621. package/resources/targets/qoder-cn/js/js/project/runtime/lightgame/1.1.0/platform/identity/qq-session.mjs +208 -0
  622. package/resources/targets/qoder-cn/js/js/project/runtime/lightgame/1.1.0/platform/identity/shared.mjs +37 -0
  623. package/resources/targets/qoder-cn/js/js/project/runtime/lightgame/1.1.0/platform/platform-capture-video.mjs +227 -0
  624. package/resources/targets/qoder-cn/js/js/project/runtime/lightgame/1.1.0/platform/platform-service.d.mts +31 -0
  625. package/resources/targets/qoder-cn/js/js/project/runtime/lightgame/1.1.0/platform/platform-service.mjs +272 -0
  626. package/resources/targets/qoder-cn/js/js/project/runtime/lightgame/1.1.0/platform/platform.d.mts +79 -0
  627. package/resources/targets/qoder-cn/js/js/project/runtime/lightgame/1.1.0/platform/platform.mjs +29 -0
  628. package/resources/targets/qoder-cn/js/js/project/runtime/lightgame/1.1.0/release.json +22 -0
  629. package/resources/targets/qoder-cn/js/js/project/runtime/lightgame/1.1.0/tooling/cli.mjs +16 -0
  630. package/resources/targets/qoder-cn/js/js/project/runtime/lightgame/1.1.0/tooling/project.d.mts +4 -0
  631. package/resources/targets/qoder-cn/js/js/project/runtime/lightgame/1.1.0/tooling/project.mjs +50 -0
  632. package/resources/targets/qoder-cn/js/js/project/runtime/lightgame/1.1.0/tooling/vite.d.mts +3 -0
  633. package/resources/targets/qoder-cn/js/js/project/runtime/lightgame/1.1.0/tooling/vite.mjs +72 -0
  634. package/resources/targets/qoder-cn/js/js/project/runtime/lightgame/1.1.0/tools/assets.d.mts +24 -0
  635. package/resources/targets/qoder-cn/js/js/project/runtime/lightgame/1.1.0/tools/assets.mjs +2 -0
  636. package/resources/targets/qoder-cn/js/js/project/runtime/lightgame/1.1.0/tools/astc.d.mts +10 -0
  637. package/resources/targets/qoder-cn/js/js/project/runtime/lightgame/1.1.0/tools/astc.mjs +1 -0
  638. package/resources/targets/qoder-cn/js/js/project/scripts/config-export/assert-asset-wiring.mjs +72 -0
  639. package/resources/targets/qoder-cn/js/js/project/scripts/config-export/panel-resource-path.mjs +106 -0
  640. package/resources/targets/qoder-cn/js/js/project/scripts/config-export/sync-asset-controls.mjs +316 -0
  641. package/resources/targets/qoder-cn/js/js/project/scripts/config-export.mjs +13 -0
  642. package/resources/targets/qoder-cn/js/js/project/scripts/skill-modules/export-config/cli.mjs +20 -0
  643. package/resources/targets/qoder-cn/js/js/project/scripts/skill-modules/export-config/config.d.mts +19 -0
  644. package/resources/targets/qoder-cn/js/js/project/scripts/skill-modules/export-config/config.mjs +1 -0
  645. package/resources/targets/qoder-cn/js/js/project/scripts/skill-modules/export-config/installed.json +6 -0
  646. package/resources/targets/qoder-cn/js/js/project/scripts/skill-modules/export-config/project.d.mts +6 -0
  647. package/resources/targets/qoder-cn/js/js/project/scripts/skill-modules/export-config/project.mjs +77 -0
  648. package/resources/targets/qoder-cn/js/js/project/scripts/skill-modules/export-config/vite.d.mts +2 -0
  649. package/resources/targets/qoder-cn/js/js/project/scripts/skill-modules/export-config/vite.mjs +34 -0
  650. package/resources/targets/qoder-cn/js/js/project/scripts/write-preview-ready.mjs +22 -0
  651. package/resources/targets/qoder-cn/js/js/project/src/display/ui-stage.ts +156 -0
  652. package/resources/targets/qoder-cn/js/js/project/src/display/viewport.ts +249 -0
  653. package/resources/targets/qoder-cn/js/js/project/src/main.ts +87 -0
  654. package/resources/targets/qoder-cn/js/js/project/src/platform.ts +2 -0
  655. package/resources/targets/qoder-cn/js/js/project/src/scenes/LoadScene.ts +89 -0
  656. package/resources/targets/qoder-cn/js/js/project/src/scenes/PlayScene.ts +17 -0
  657. package/resources/targets/qoder-cn/js/js/project/src/screenUi.ts +185 -0
  658. package/resources/targets/qoder-cn/js/js/project/src/style.css +294 -0
  659. package/resources/targets/qoder-cn/js/js/project/tsconfig.json +20 -0
  660. package/resources/targets/qoder-cn/js/js/project/unified_data_control_config.json +20 -0
  661. package/resources/targets/qoder-cn/js/js/project/vite.config.ts +5 -0
  662. package/resources/targets/qoder-cn/js/recovery.md +17 -0
  663. package/resources/targets/qoder-cn/js/target.json +61 -0
  664. package/resources/targets/qoder-cn/js3d/bootstrap/SKILL.md +20 -0
  665. package/resources/targets/qoder-cn/js3d/context-filter-report.json +27 -0
  666. package/resources/targets/qoder-cn/js3d/craft-game-maker/SKILL.md +72 -0
  667. package/resources/targets/qoder-cn/js3d/craft-game-maker/js3d.md +12 -0
  668. package/resources/targets/qoder-cn/js3d/js3d/bundle.json +108 -0
  669. package/resources/targets/qoder-cn/js3d/js3d/context/AGENTS.md +32 -0
  670. package/resources/targets/qoder-cn/js3d/js3d/context/hooks/hooks.json +14 -0
  671. package/resources/targets/qoder-cn/js3d/js3d/context/knowledge/AssetUrl.md +9 -0
  672. package/resources/targets/qoder-cn/js3d/js3d/context/knowledge/AssetWiring.md +7 -0
  673. package/resources/targets/qoder-cn/js3d/js3d/context/knowledge/CodingGuide/Pitfalls.md +11 -0
  674. package/resources/targets/qoder-cn/js3d/js3d/context/knowledge/Layout.md +7 -0
  675. package/resources/targets/qoder-cn/js3d/js3d/context/knowledge/ResourceLoading.md +11 -0
  676. package/resources/targets/qoder-cn/js3d/js3d/context/knowledge/Runtime.md +9 -0
  677. package/resources/targets/qoder-cn/js3d/js3d/context/skills/asset-usage-audit/SKILL.md +16 -0
  678. package/resources/targets/qoder-cn/js3d/js3d/context/skills/asset-usage-audit/scripts/compare-animations.mjs +48 -0
  679. package/resources/targets/qoder-cn/js3d/js3d/context/skills/asset-usage-audit/scripts/lib/anim.mjs +266 -0
  680. package/resources/targets/qoder-cn/js3d/js3d/context/skills/asset-usage-audit/scripts/lib/glb.mjs +241 -0
  681. package/resources/targets/qoder-cn/js3d/js3d/context/skills/asset-usage-audit/scripts/lib/scan.mjs +455 -0
  682. package/resources/targets/qoder-cn/js3d/js3d/context/skills/asset-usage-audit/scripts/scan-assets.mjs +77 -0
  683. package/resources/targets/qoder-cn/js3d/js3d/context/skills/export-config/SKILL.md +16 -0
  684. package/resources/targets/qoder-cn/js3d/js3d/context/skills/export-config/assets/tooling/cli.mjs +20 -0
  685. package/resources/targets/qoder-cn/js3d/js3d/context/skills/export-config/assets/tooling/config.d.mts +19 -0
  686. package/resources/targets/qoder-cn/js3d/js3d/context/skills/export-config/assets/tooling/config.mjs +1 -0
  687. package/resources/targets/qoder-cn/js3d/js3d/context/skills/export-config/assets/tooling/project.d.mts +6 -0
  688. package/resources/targets/qoder-cn/js3d/js3d/context/skills/export-config/assets/tooling/project.mjs +77 -0
  689. package/resources/targets/qoder-cn/js3d/js3d/context/skills/export-config/assets/tooling/vite.d.mts +2 -0
  690. package/resources/targets/qoder-cn/js3d/js3d/context/skills/export-config/assets/tooling/vite.mjs +34 -0
  691. package/resources/targets/qoder-cn/js3d/js3d/context/skills/export-config/scripts/export-config.mjs +4 -0
  692. package/resources/targets/qoder-cn/js3d/js3d/context/skills/export-config/scripts/install.mjs +89 -0
  693. package/resources/targets/qoder-cn/js3d/js3d/context/skills/export-config/scripts/panel-resource-path.mjs +106 -0
  694. package/resources/targets/qoder-cn/js3d/js3d/context/skills/index.json +31 -0
  695. package/resources/targets/qoder-cn/js3d/js3d/context/skills/performance-audit/SKILL.md +21 -0
  696. package/resources/targets/qoder-cn/js3d/js3d/context/skills/performance-audit/scripts/lib/rules.mjs +470 -0
  697. package/resources/targets/qoder-cn/js3d/js3d/context/skills/performance-audit/scripts/lib/scan.mjs +387 -0
  698. package/resources/targets/qoder-cn/js3d/js3d/context/skills/performance-audit/scripts/lib/source.mjs +398 -0
  699. package/resources/targets/qoder-cn/js3d/js3d/context/skills/performance-audit/scripts/scan-perf.mjs +130 -0
  700. package/resources/targets/qoder-cn/js3d/js3d/context/skills/visual-qa/SKILL.md +14 -0
  701. package/resources/targets/qoder-cn/js3d/js3d/project/README.md +7 -0
  702. package/resources/targets/qoder-cn/js3d/js3d/project/configs/game.controls.json +3 -0
  703. package/resources/targets/qoder-cn/js3d/js3d/project/configs/game.json +3 -0
  704. package/resources/targets/qoder-cn/js3d/js3d/project/game-runtime.json +7 -0
  705. package/resources/targets/qoder-cn/js3d/js3d/project/game.config.json +7 -0
  706. package/resources/targets/qoder-cn/js3d/js3d/project/index.html +12 -0
  707. package/resources/targets/qoder-cn/js3d/js3d/project/package.json +23 -0
  708. package/resources/targets/qoder-cn/js3d/js3d/project/runtime/lightgame/1.1.0/platform/identity/qq-ai-game-sdk.min.js +5 -0
  709. package/resources/targets/qoder-cn/js3d/js3d/project/runtime/lightgame/1.1.0/platform/identity/qq-session.mjs +208 -0
  710. package/resources/targets/qoder-cn/js3d/js3d/project/runtime/lightgame/1.1.0/platform/identity/shared.mjs +37 -0
  711. package/resources/targets/qoder-cn/js3d/js3d/project/runtime/lightgame/1.1.0/platform/platform-capture-video.mjs +227 -0
  712. package/resources/targets/qoder-cn/js3d/js3d/project/runtime/lightgame/1.1.0/platform/platform-service.d.mts +31 -0
  713. package/resources/targets/qoder-cn/js3d/js3d/project/runtime/lightgame/1.1.0/platform/platform-service.mjs +272 -0
  714. package/resources/targets/qoder-cn/js3d/js3d/project/runtime/lightgame/1.1.0/platform/platform.d.mts +79 -0
  715. package/resources/targets/qoder-cn/js3d/js3d/project/runtime/lightgame/1.1.0/platform/platform.mjs +30 -0
  716. package/resources/targets/qoder-cn/js3d/js3d/project/runtime/lightgame/1.1.0/release.json +24 -0
  717. package/resources/targets/qoder-cn/js3d/js3d/project/runtime/lightgame/1.1.0/tooling/cli.mjs +16 -0
  718. package/resources/targets/qoder-cn/js3d/js3d/project/runtime/lightgame/1.1.0/tooling/project.d.mts +4 -0
  719. package/resources/targets/qoder-cn/js3d/js3d/project/runtime/lightgame/1.1.0/tooling/project.mjs +50 -0
  720. package/resources/targets/qoder-cn/js3d/js3d/project/runtime/lightgame/1.1.0/tooling/vite.d.mts +3 -0
  721. package/resources/targets/qoder-cn/js3d/js3d/project/runtime/lightgame/1.1.0/tooling/vite.mjs +72 -0
  722. package/resources/targets/qoder-cn/js3d/js3d/project/runtime/lightgame/1.1.0/tools/assets.d.mts +24 -0
  723. package/resources/targets/qoder-cn/js3d/js3d/project/runtime/lightgame/1.1.0/tools/assets.mjs +2 -0
  724. package/resources/targets/qoder-cn/js3d/js3d/project/runtime/lightgame/1.1.0/tools/astc.d.mts +10 -0
  725. package/resources/targets/qoder-cn/js3d/js3d/project/runtime/lightgame/1.1.0/tools/astc.mjs +1 -0
  726. package/resources/targets/qoder-cn/js3d/js3d/project/runtime/lightgame/1.1.0/tools/glb.d.mts +26 -0
  727. package/resources/targets/qoder-cn/js3d/js3d/project/runtime/lightgame/1.1.0/tools/glb.mjs +351 -0
  728. package/resources/targets/qoder-cn/js3d/js3d/project/scripts/config-export/assert-asset-wiring.mjs +97 -0
  729. package/resources/targets/qoder-cn/js3d/js3d/project/scripts/config-export/panel-resource-path.mjs +106 -0
  730. package/resources/targets/qoder-cn/js3d/js3d/project/scripts/config-export/sync-asset-controls.mjs +327 -0
  731. package/resources/targets/qoder-cn/js3d/js3d/project/scripts/config-export/sync-scene-assets.mjs +191 -0
  732. package/resources/targets/qoder-cn/js3d/js3d/project/scripts/config-export.mjs +15 -0
  733. package/resources/targets/qoder-cn/js3d/js3d/project/scripts/skill-modules/export-config/cli.mjs +20 -0
  734. package/resources/targets/qoder-cn/js3d/js3d/project/scripts/skill-modules/export-config/config.d.mts +19 -0
  735. package/resources/targets/qoder-cn/js3d/js3d/project/scripts/skill-modules/export-config/config.mjs +1 -0
  736. package/resources/targets/qoder-cn/js3d/js3d/project/scripts/skill-modules/export-config/installed.json +6 -0
  737. package/resources/targets/qoder-cn/js3d/js3d/project/scripts/skill-modules/export-config/project.d.mts +6 -0
  738. package/resources/targets/qoder-cn/js3d/js3d/project/scripts/skill-modules/export-config/project.mjs +77 -0
  739. package/resources/targets/qoder-cn/js3d/js3d/project/scripts/skill-modules/export-config/vite.d.mts +2 -0
  740. package/resources/targets/qoder-cn/js3d/js3d/project/scripts/skill-modules/export-config/vite.mjs +34 -0
  741. package/resources/targets/qoder-cn/js3d/js3d/project/scripts/write-preview-ready.mjs +22 -0
  742. package/resources/targets/qoder-cn/js3d/js3d/project/src/display/ui-stage.ts +156 -0
  743. package/resources/targets/qoder-cn/js3d/js3d/project/src/display/viewport.ts +239 -0
  744. package/resources/targets/qoder-cn/js3d/js3d/project/src/main.ts +85 -0
  745. package/resources/targets/qoder-cn/js3d/js3d/project/src/platform.ts +2 -0
  746. package/resources/targets/qoder-cn/js3d/js3d/project/src/style.css +83 -0
  747. package/resources/targets/qoder-cn/js3d/js3d/project/tsconfig.json +20 -0
  748. package/resources/targets/qoder-cn/js3d/js3d/project/unified_data_control_config.json +20 -0
  749. package/resources/targets/qoder-cn/js3d/js3d/project/vite.config.ts +5 -0
  750. package/resources/targets/qoder-cn/js3d/recovery.md +17 -0
  751. package/resources/targets/qoder-cn/js3d/target.json +60 -0
  752. package/resources/targets/qwen/js/bootstrap/SKILL.md +20 -0
  753. package/resources/targets/qwen/js/context-filter-report.json +27 -0
  754. package/resources/targets/qwen/js/craft-game-maker/SKILL.md +72 -0
  755. package/resources/targets/qwen/js/craft-game-maker/js.md +10 -0
  756. package/resources/targets/qwen/js/js/bundle.json +97 -0
  757. package/resources/targets/qwen/js/js/context/AGENTS.md +29 -0
  758. package/resources/targets/qwen/js/js/context/hooks/hooks.json +14 -0
  759. package/resources/targets/qwen/js/js/context/knowledge/AssetUrl.md +9 -0
  760. package/resources/targets/qwen/js/js/context/knowledge/AssetWiring.md +7 -0
  761. package/resources/targets/qwen/js/js/context/knowledge/Layout.md +7 -0
  762. package/resources/targets/qwen/js/js/context/knowledge/Lifecycle.md +11 -0
  763. package/resources/targets/qwen/js/js/context/knowledge/ResourceLoading.md +9 -0
  764. package/resources/targets/qwen/js/js/context/skills/export-config/SKILL.md +16 -0
  765. package/resources/targets/qwen/js/js/context/skills/export-config/assets/tooling/cli.mjs +20 -0
  766. package/resources/targets/qwen/js/js/context/skills/export-config/assets/tooling/config.d.mts +19 -0
  767. package/resources/targets/qwen/js/js/context/skills/export-config/assets/tooling/config.mjs +1 -0
  768. package/resources/targets/qwen/js/js/context/skills/export-config/assets/tooling/project.d.mts +6 -0
  769. package/resources/targets/qwen/js/js/context/skills/export-config/assets/tooling/project.mjs +77 -0
  770. package/resources/targets/qwen/js/js/context/skills/export-config/assets/tooling/vite.d.mts +2 -0
  771. package/resources/targets/qwen/js/js/context/skills/export-config/assets/tooling/vite.mjs +34 -0
  772. package/resources/targets/qwen/js/js/context/skills/export-config/scripts/export-config.mjs +4 -0
  773. package/resources/targets/qwen/js/js/context/skills/export-config/scripts/install.mjs +89 -0
  774. package/resources/targets/qwen/js/js/context/skills/export-config/scripts/panel-resource-path.mjs +106 -0
  775. package/resources/targets/qwen/js/js/context/skills/index.json +19 -0
  776. package/resources/targets/qwen/js/js/context/skills/visual-qa/SKILL.md +14 -0
  777. package/resources/targets/qwen/js/js/project/README.md +7 -0
  778. package/resources/targets/qwen/js/js/project/configs/assets.json +1 -0
  779. package/resources/targets/qwen/js/js/project/configs/game.controls.json +3 -0
  780. package/resources/targets/qwen/js/js/project/configs/game.json +3 -0
  781. package/resources/targets/qwen/js/js/project/game-runtime.json +7 -0
  782. package/resources/targets/qwen/js/js/project/game.config.json +7 -0
  783. package/resources/targets/qwen/js/js/project/index.html +20 -0
  784. package/resources/targets/qwen/js/js/project/package.json +22 -0
  785. package/resources/targets/qwen/js/js/project/runtime/lightgame/1.1.0/platform/identity/qq-ai-game-sdk.min.js +5 -0
  786. package/resources/targets/qwen/js/js/project/runtime/lightgame/1.1.0/platform/identity/qq-session.mjs +208 -0
  787. package/resources/targets/qwen/js/js/project/runtime/lightgame/1.1.0/platform/identity/shared.mjs +37 -0
  788. package/resources/targets/qwen/js/js/project/runtime/lightgame/1.1.0/platform/platform-capture-video.mjs +227 -0
  789. package/resources/targets/qwen/js/js/project/runtime/lightgame/1.1.0/platform/platform-service.d.mts +31 -0
  790. package/resources/targets/qwen/js/js/project/runtime/lightgame/1.1.0/platform/platform-service.mjs +272 -0
  791. package/resources/targets/qwen/js/js/project/runtime/lightgame/1.1.0/platform/platform.d.mts +79 -0
  792. package/resources/targets/qwen/js/js/project/runtime/lightgame/1.1.0/platform/platform.mjs +29 -0
  793. package/resources/targets/qwen/js/js/project/runtime/lightgame/1.1.0/release.json +22 -0
  794. package/resources/targets/qwen/js/js/project/runtime/lightgame/1.1.0/tooling/cli.mjs +16 -0
  795. package/resources/targets/qwen/js/js/project/runtime/lightgame/1.1.0/tooling/project.d.mts +4 -0
  796. package/resources/targets/qwen/js/js/project/runtime/lightgame/1.1.0/tooling/project.mjs +50 -0
  797. package/resources/targets/qwen/js/js/project/runtime/lightgame/1.1.0/tooling/vite.d.mts +3 -0
  798. package/resources/targets/qwen/js/js/project/runtime/lightgame/1.1.0/tooling/vite.mjs +72 -0
  799. package/resources/targets/qwen/js/js/project/runtime/lightgame/1.1.0/tools/assets.d.mts +24 -0
  800. package/resources/targets/qwen/js/js/project/runtime/lightgame/1.1.0/tools/assets.mjs +2 -0
  801. package/resources/targets/qwen/js/js/project/runtime/lightgame/1.1.0/tools/astc.d.mts +10 -0
  802. package/resources/targets/qwen/js/js/project/runtime/lightgame/1.1.0/tools/astc.mjs +1 -0
  803. package/resources/targets/qwen/js/js/project/scripts/config-export/assert-asset-wiring.mjs +72 -0
  804. package/resources/targets/qwen/js/js/project/scripts/config-export/panel-resource-path.mjs +106 -0
  805. package/resources/targets/qwen/js/js/project/scripts/config-export/sync-asset-controls.mjs +316 -0
  806. package/resources/targets/qwen/js/js/project/scripts/config-export.mjs +13 -0
  807. package/resources/targets/qwen/js/js/project/scripts/skill-modules/export-config/cli.mjs +20 -0
  808. package/resources/targets/qwen/js/js/project/scripts/skill-modules/export-config/config.d.mts +19 -0
  809. package/resources/targets/qwen/js/js/project/scripts/skill-modules/export-config/config.mjs +1 -0
  810. package/resources/targets/qwen/js/js/project/scripts/skill-modules/export-config/installed.json +6 -0
  811. package/resources/targets/qwen/js/js/project/scripts/skill-modules/export-config/project.d.mts +6 -0
  812. package/resources/targets/qwen/js/js/project/scripts/skill-modules/export-config/project.mjs +77 -0
  813. package/resources/targets/qwen/js/js/project/scripts/skill-modules/export-config/vite.d.mts +2 -0
  814. package/resources/targets/qwen/js/js/project/scripts/skill-modules/export-config/vite.mjs +34 -0
  815. package/resources/targets/qwen/js/js/project/scripts/write-preview-ready.mjs +22 -0
  816. package/resources/targets/qwen/js/js/project/src/display/ui-stage.ts +156 -0
  817. package/resources/targets/qwen/js/js/project/src/display/viewport.ts +249 -0
  818. package/resources/targets/qwen/js/js/project/src/main.ts +87 -0
  819. package/resources/targets/qwen/js/js/project/src/platform.ts +2 -0
  820. package/resources/targets/qwen/js/js/project/src/scenes/LoadScene.ts +89 -0
  821. package/resources/targets/qwen/js/js/project/src/scenes/PlayScene.ts +17 -0
  822. package/resources/targets/qwen/js/js/project/src/screenUi.ts +185 -0
  823. package/resources/targets/qwen/js/js/project/src/style.css +294 -0
  824. package/resources/targets/qwen/js/js/project/tsconfig.json +20 -0
  825. package/resources/targets/qwen/js/js/project/unified_data_control_config.json +20 -0
  826. package/resources/targets/qwen/js/js/project/vite.config.ts +5 -0
  827. package/resources/targets/qwen/js/recovery.md +17 -0
  828. package/resources/targets/qwen/js/target.json +61 -0
  829. package/resources/targets/qwen/js3d/bootstrap/SKILL.md +20 -0
  830. package/resources/targets/qwen/js3d/context-filter-report.json +27 -0
  831. package/resources/targets/qwen/js3d/craft-game-maker/SKILL.md +72 -0
  832. package/resources/targets/qwen/js3d/craft-game-maker/js3d.md +12 -0
  833. package/resources/targets/qwen/js3d/js3d/bundle.json +108 -0
  834. package/resources/targets/qwen/js3d/js3d/context/AGENTS.md +30 -0
  835. package/resources/targets/qwen/js3d/js3d/context/hooks/hooks.json +14 -0
  836. package/resources/targets/qwen/js3d/js3d/context/knowledge/AssetUrl.md +9 -0
  837. package/resources/targets/qwen/js3d/js3d/context/knowledge/AssetWiring.md +7 -0
  838. package/resources/targets/qwen/js3d/js3d/context/knowledge/CodingGuide/Pitfalls.md +11 -0
  839. package/resources/targets/qwen/js3d/js3d/context/knowledge/Layout.md +7 -0
  840. package/resources/targets/qwen/js3d/js3d/context/knowledge/ResourceLoading.md +11 -0
  841. package/resources/targets/qwen/js3d/js3d/context/knowledge/Runtime.md +9 -0
  842. package/resources/targets/qwen/js3d/js3d/context/skills/asset-usage-audit/SKILL.md +16 -0
  843. package/resources/targets/qwen/js3d/js3d/context/skills/asset-usage-audit/scripts/compare-animations.mjs +48 -0
  844. package/resources/targets/qwen/js3d/js3d/context/skills/asset-usage-audit/scripts/lib/anim.mjs +266 -0
  845. package/resources/targets/qwen/js3d/js3d/context/skills/asset-usage-audit/scripts/lib/glb.mjs +241 -0
  846. package/resources/targets/qwen/js3d/js3d/context/skills/asset-usage-audit/scripts/lib/scan.mjs +455 -0
  847. package/resources/targets/qwen/js3d/js3d/context/skills/asset-usage-audit/scripts/scan-assets.mjs +77 -0
  848. package/resources/targets/qwen/js3d/js3d/context/skills/export-config/SKILL.md +16 -0
  849. package/resources/targets/qwen/js3d/js3d/context/skills/export-config/assets/tooling/cli.mjs +20 -0
  850. package/resources/targets/qwen/js3d/js3d/context/skills/export-config/assets/tooling/config.d.mts +19 -0
  851. package/resources/targets/qwen/js3d/js3d/context/skills/export-config/assets/tooling/config.mjs +1 -0
  852. package/resources/targets/qwen/js3d/js3d/context/skills/export-config/assets/tooling/project.d.mts +6 -0
  853. package/resources/targets/qwen/js3d/js3d/context/skills/export-config/assets/tooling/project.mjs +77 -0
  854. package/resources/targets/qwen/js3d/js3d/context/skills/export-config/assets/tooling/vite.d.mts +2 -0
  855. package/resources/targets/qwen/js3d/js3d/context/skills/export-config/assets/tooling/vite.mjs +34 -0
  856. package/resources/targets/qwen/js3d/js3d/context/skills/export-config/scripts/export-config.mjs +4 -0
  857. package/resources/targets/qwen/js3d/js3d/context/skills/export-config/scripts/install.mjs +89 -0
  858. package/resources/targets/qwen/js3d/js3d/context/skills/export-config/scripts/panel-resource-path.mjs +106 -0
  859. package/resources/targets/qwen/js3d/js3d/context/skills/index.json +31 -0
  860. package/resources/targets/qwen/js3d/js3d/context/skills/performance-audit/SKILL.md +21 -0
  861. package/resources/targets/qwen/js3d/js3d/context/skills/performance-audit/scripts/lib/rules.mjs +470 -0
  862. package/resources/targets/qwen/js3d/js3d/context/skills/performance-audit/scripts/lib/scan.mjs +387 -0
  863. package/resources/targets/qwen/js3d/js3d/context/skills/performance-audit/scripts/lib/source.mjs +398 -0
  864. package/resources/targets/qwen/js3d/js3d/context/skills/performance-audit/scripts/scan-perf.mjs +130 -0
  865. package/resources/targets/qwen/js3d/js3d/context/skills/visual-qa/SKILL.md +14 -0
  866. package/resources/targets/qwen/js3d/js3d/project/README.md +7 -0
  867. package/resources/targets/qwen/js3d/js3d/project/configs/game.controls.json +3 -0
  868. package/resources/targets/qwen/js3d/js3d/project/configs/game.json +3 -0
  869. package/resources/targets/qwen/js3d/js3d/project/game-runtime.json +7 -0
  870. package/resources/targets/qwen/js3d/js3d/project/game.config.json +7 -0
  871. package/resources/targets/qwen/js3d/js3d/project/index.html +12 -0
  872. package/resources/targets/qwen/js3d/js3d/project/package.json +23 -0
  873. package/resources/targets/qwen/js3d/js3d/project/runtime/lightgame/1.1.0/platform/identity/qq-ai-game-sdk.min.js +5 -0
  874. package/resources/targets/qwen/js3d/js3d/project/runtime/lightgame/1.1.0/platform/identity/qq-session.mjs +208 -0
  875. package/resources/targets/qwen/js3d/js3d/project/runtime/lightgame/1.1.0/platform/identity/shared.mjs +37 -0
  876. package/resources/targets/qwen/js3d/js3d/project/runtime/lightgame/1.1.0/platform/platform-capture-video.mjs +227 -0
  877. package/resources/targets/qwen/js3d/js3d/project/runtime/lightgame/1.1.0/platform/platform-service.d.mts +31 -0
  878. package/resources/targets/qwen/js3d/js3d/project/runtime/lightgame/1.1.0/platform/platform-service.mjs +272 -0
  879. package/resources/targets/qwen/js3d/js3d/project/runtime/lightgame/1.1.0/platform/platform.d.mts +79 -0
  880. package/resources/targets/qwen/js3d/js3d/project/runtime/lightgame/1.1.0/platform/platform.mjs +30 -0
  881. package/resources/targets/qwen/js3d/js3d/project/runtime/lightgame/1.1.0/release.json +24 -0
  882. package/resources/targets/qwen/js3d/js3d/project/runtime/lightgame/1.1.0/tooling/cli.mjs +16 -0
  883. package/resources/targets/qwen/js3d/js3d/project/runtime/lightgame/1.1.0/tooling/project.d.mts +4 -0
  884. package/resources/targets/qwen/js3d/js3d/project/runtime/lightgame/1.1.0/tooling/project.mjs +50 -0
  885. package/resources/targets/qwen/js3d/js3d/project/runtime/lightgame/1.1.0/tooling/vite.d.mts +3 -0
  886. package/resources/targets/qwen/js3d/js3d/project/runtime/lightgame/1.1.0/tooling/vite.mjs +72 -0
  887. package/resources/targets/qwen/js3d/js3d/project/runtime/lightgame/1.1.0/tools/assets.d.mts +24 -0
  888. package/resources/targets/qwen/js3d/js3d/project/runtime/lightgame/1.1.0/tools/assets.mjs +2 -0
  889. package/resources/targets/qwen/js3d/js3d/project/runtime/lightgame/1.1.0/tools/astc.d.mts +10 -0
  890. package/resources/targets/qwen/js3d/js3d/project/runtime/lightgame/1.1.0/tools/astc.mjs +1 -0
  891. package/resources/targets/qwen/js3d/js3d/project/runtime/lightgame/1.1.0/tools/glb.d.mts +26 -0
  892. package/resources/targets/qwen/js3d/js3d/project/runtime/lightgame/1.1.0/tools/glb.mjs +351 -0
  893. package/resources/targets/qwen/js3d/js3d/project/scripts/config-export/assert-asset-wiring.mjs +97 -0
  894. package/resources/targets/qwen/js3d/js3d/project/scripts/config-export/panel-resource-path.mjs +106 -0
  895. package/resources/targets/qwen/js3d/js3d/project/scripts/config-export/sync-asset-controls.mjs +327 -0
  896. package/resources/targets/qwen/js3d/js3d/project/scripts/config-export/sync-scene-assets.mjs +191 -0
  897. package/resources/targets/qwen/js3d/js3d/project/scripts/config-export.mjs +15 -0
  898. package/resources/targets/qwen/js3d/js3d/project/scripts/skill-modules/export-config/cli.mjs +20 -0
  899. package/resources/targets/qwen/js3d/js3d/project/scripts/skill-modules/export-config/config.d.mts +19 -0
  900. package/resources/targets/qwen/js3d/js3d/project/scripts/skill-modules/export-config/config.mjs +1 -0
  901. package/resources/targets/qwen/js3d/js3d/project/scripts/skill-modules/export-config/installed.json +6 -0
  902. package/resources/targets/qwen/js3d/js3d/project/scripts/skill-modules/export-config/project.d.mts +6 -0
  903. package/resources/targets/qwen/js3d/js3d/project/scripts/skill-modules/export-config/project.mjs +77 -0
  904. package/resources/targets/qwen/js3d/js3d/project/scripts/skill-modules/export-config/vite.d.mts +2 -0
  905. package/resources/targets/qwen/js3d/js3d/project/scripts/skill-modules/export-config/vite.mjs +34 -0
  906. package/resources/targets/qwen/js3d/js3d/project/scripts/write-preview-ready.mjs +22 -0
  907. package/resources/targets/qwen/js3d/js3d/project/src/display/ui-stage.ts +156 -0
  908. package/resources/targets/qwen/js3d/js3d/project/src/display/viewport.ts +239 -0
  909. package/resources/targets/qwen/js3d/js3d/project/src/main.ts +85 -0
  910. package/resources/targets/qwen/js3d/js3d/project/src/platform.ts +2 -0
  911. package/resources/targets/qwen/js3d/js3d/project/src/style.css +83 -0
  912. package/resources/targets/qwen/js3d/js3d/project/tsconfig.json +20 -0
  913. package/resources/targets/qwen/js3d/js3d/project/unified_data_control_config.json +20 -0
  914. package/resources/targets/qwen/js3d/js3d/project/vite.config.ts +5 -0
  915. package/resources/targets/qwen/js3d/recovery.md +17 -0
  916. package/resources/targets/qwen/js3d/target.json +60 -0
  917. package/resources/targets/trae/js/bootstrap/SKILL.md +20 -0
  918. package/resources/targets/trae/js/context-filter-report.json +27 -0
  919. package/resources/targets/trae/js/craft-game-maker/SKILL.md +72 -0
  920. package/resources/targets/trae/js/craft-game-maker/js.md +10 -0
  921. package/resources/targets/trae/js/js/bundle.json +97 -0
  922. package/resources/targets/trae/js/js/context/AGENTS.md +29 -0
  923. package/resources/targets/trae/js/js/context/hooks/hooks.json +14 -0
  924. package/resources/targets/trae/js/js/context/knowledge/AssetUrl.md +9 -0
  925. package/resources/targets/trae/js/js/context/knowledge/AssetWiring.md +7 -0
  926. package/resources/targets/trae/js/js/context/knowledge/Layout.md +7 -0
  927. package/resources/targets/trae/js/js/context/knowledge/Lifecycle.md +11 -0
  928. package/resources/targets/trae/js/js/context/knowledge/ResourceLoading.md +9 -0
  929. package/resources/targets/trae/js/js/context/skills/export-config/SKILL.md +16 -0
  930. package/resources/targets/trae/js/js/context/skills/export-config/assets/tooling/cli.mjs +20 -0
  931. package/resources/targets/trae/js/js/context/skills/export-config/assets/tooling/config.d.mts +19 -0
  932. package/resources/targets/trae/js/js/context/skills/export-config/assets/tooling/config.mjs +1 -0
  933. package/resources/targets/trae/js/js/context/skills/export-config/assets/tooling/project.d.mts +6 -0
  934. package/resources/targets/trae/js/js/context/skills/export-config/assets/tooling/project.mjs +77 -0
  935. package/resources/targets/trae/js/js/context/skills/export-config/assets/tooling/vite.d.mts +2 -0
  936. package/resources/targets/trae/js/js/context/skills/export-config/assets/tooling/vite.mjs +34 -0
  937. package/resources/targets/trae/js/js/context/skills/export-config/scripts/export-config.mjs +4 -0
  938. package/resources/targets/trae/js/js/context/skills/export-config/scripts/install.mjs +89 -0
  939. package/resources/targets/trae/js/js/context/skills/export-config/scripts/panel-resource-path.mjs +106 -0
  940. package/resources/targets/trae/js/js/context/skills/index.json +19 -0
  941. package/resources/targets/trae/js/js/context/skills/visual-qa/SKILL.md +14 -0
  942. package/resources/targets/trae/js/js/project/README.md +7 -0
  943. package/resources/targets/trae/js/js/project/configs/assets.json +1 -0
  944. package/resources/targets/trae/js/js/project/configs/game.controls.json +3 -0
  945. package/resources/targets/trae/js/js/project/configs/game.json +3 -0
  946. package/resources/targets/trae/js/js/project/game-runtime.json +7 -0
  947. package/resources/targets/trae/js/js/project/game.config.json +7 -0
  948. package/resources/targets/trae/js/js/project/index.html +20 -0
  949. package/resources/targets/trae/js/js/project/package.json +22 -0
  950. package/resources/targets/trae/js/js/project/runtime/lightgame/1.1.0/platform/identity/qq-ai-game-sdk.min.js +5 -0
  951. package/resources/targets/trae/js/js/project/runtime/lightgame/1.1.0/platform/identity/qq-session.mjs +208 -0
  952. package/resources/targets/trae/js/js/project/runtime/lightgame/1.1.0/platform/identity/shared.mjs +37 -0
  953. package/resources/targets/trae/js/js/project/runtime/lightgame/1.1.0/platform/platform-capture-video.mjs +227 -0
  954. package/resources/targets/trae/js/js/project/runtime/lightgame/1.1.0/platform/platform-service.d.mts +31 -0
  955. package/resources/targets/trae/js/js/project/runtime/lightgame/1.1.0/platform/platform-service.mjs +272 -0
  956. package/resources/targets/trae/js/js/project/runtime/lightgame/1.1.0/platform/platform.d.mts +79 -0
  957. package/resources/targets/trae/js/js/project/runtime/lightgame/1.1.0/platform/platform.mjs +29 -0
  958. package/resources/targets/trae/js/js/project/runtime/lightgame/1.1.0/release.json +22 -0
  959. package/resources/targets/trae/js/js/project/runtime/lightgame/1.1.0/tooling/cli.mjs +16 -0
  960. package/resources/targets/trae/js/js/project/runtime/lightgame/1.1.0/tooling/project.d.mts +4 -0
  961. package/resources/targets/trae/js/js/project/runtime/lightgame/1.1.0/tooling/project.mjs +50 -0
  962. package/resources/targets/trae/js/js/project/runtime/lightgame/1.1.0/tooling/vite.d.mts +3 -0
  963. package/resources/targets/trae/js/js/project/runtime/lightgame/1.1.0/tooling/vite.mjs +72 -0
  964. package/resources/targets/trae/js/js/project/runtime/lightgame/1.1.0/tools/assets.d.mts +24 -0
  965. package/resources/targets/trae/js/js/project/runtime/lightgame/1.1.0/tools/assets.mjs +2 -0
  966. package/resources/targets/trae/js/js/project/runtime/lightgame/1.1.0/tools/astc.d.mts +10 -0
  967. package/resources/targets/trae/js/js/project/runtime/lightgame/1.1.0/tools/astc.mjs +1 -0
  968. package/resources/targets/trae/js/js/project/scripts/config-export/assert-asset-wiring.mjs +72 -0
  969. package/resources/targets/trae/js/js/project/scripts/config-export/panel-resource-path.mjs +106 -0
  970. package/resources/targets/trae/js/js/project/scripts/config-export/sync-asset-controls.mjs +316 -0
  971. package/resources/targets/trae/js/js/project/scripts/config-export.mjs +13 -0
  972. package/resources/targets/trae/js/js/project/scripts/skill-modules/export-config/cli.mjs +20 -0
  973. package/resources/targets/trae/js/js/project/scripts/skill-modules/export-config/config.d.mts +19 -0
  974. package/resources/targets/trae/js/js/project/scripts/skill-modules/export-config/config.mjs +1 -0
  975. package/resources/targets/trae/js/js/project/scripts/skill-modules/export-config/installed.json +6 -0
  976. package/resources/targets/trae/js/js/project/scripts/skill-modules/export-config/project.d.mts +6 -0
  977. package/resources/targets/trae/js/js/project/scripts/skill-modules/export-config/project.mjs +77 -0
  978. package/resources/targets/trae/js/js/project/scripts/skill-modules/export-config/vite.d.mts +2 -0
  979. package/resources/targets/trae/js/js/project/scripts/skill-modules/export-config/vite.mjs +34 -0
  980. package/resources/targets/trae/js/js/project/scripts/write-preview-ready.mjs +22 -0
  981. package/resources/targets/trae/js/js/project/src/display/ui-stage.ts +156 -0
  982. package/resources/targets/trae/js/js/project/src/display/viewport.ts +249 -0
  983. package/resources/targets/trae/js/js/project/src/main.ts +87 -0
  984. package/resources/targets/trae/js/js/project/src/platform.ts +2 -0
  985. package/resources/targets/trae/js/js/project/src/scenes/LoadScene.ts +89 -0
  986. package/resources/targets/trae/js/js/project/src/scenes/PlayScene.ts +17 -0
  987. package/resources/targets/trae/js/js/project/src/screenUi.ts +185 -0
  988. package/resources/targets/trae/js/js/project/src/style.css +294 -0
  989. package/resources/targets/trae/js/js/project/tsconfig.json +20 -0
  990. package/resources/targets/trae/js/js/project/unified_data_control_config.json +20 -0
  991. package/resources/targets/trae/js/js/project/vite.config.ts +5 -0
  992. package/resources/targets/trae/js/recovery.md +17 -0
  993. package/resources/targets/trae/js/target.json +61 -0
  994. package/resources/targets/trae/js3d/bootstrap/SKILL.md +20 -0
  995. package/resources/targets/trae/js3d/context-filter-report.json +27 -0
  996. package/resources/targets/trae/js3d/craft-game-maker/SKILL.md +72 -0
  997. package/resources/targets/trae/js3d/craft-game-maker/js3d.md +12 -0
  998. package/resources/targets/trae/js3d/js3d/bundle.json +108 -0
  999. package/resources/targets/trae/js3d/js3d/context/AGENTS.md +30 -0
  1000. package/resources/targets/trae/js3d/js3d/context/hooks/hooks.json +14 -0
  1001. package/resources/targets/trae/js3d/js3d/context/knowledge/AssetUrl.md +9 -0
  1002. package/resources/targets/trae/js3d/js3d/context/knowledge/AssetWiring.md +7 -0
  1003. package/resources/targets/trae/js3d/js3d/context/knowledge/CodingGuide/Pitfalls.md +11 -0
  1004. package/resources/targets/trae/js3d/js3d/context/knowledge/Layout.md +7 -0
  1005. package/resources/targets/trae/js3d/js3d/context/knowledge/ResourceLoading.md +11 -0
  1006. package/resources/targets/trae/js3d/js3d/context/knowledge/Runtime.md +9 -0
  1007. package/resources/targets/trae/js3d/js3d/context/skills/asset-usage-audit/SKILL.md +16 -0
  1008. package/resources/targets/trae/js3d/js3d/context/skills/asset-usage-audit/scripts/compare-animations.mjs +48 -0
  1009. package/resources/targets/trae/js3d/js3d/context/skills/asset-usage-audit/scripts/lib/anim.mjs +266 -0
  1010. package/resources/targets/trae/js3d/js3d/context/skills/asset-usage-audit/scripts/lib/glb.mjs +241 -0
  1011. package/resources/targets/trae/js3d/js3d/context/skills/asset-usage-audit/scripts/lib/scan.mjs +455 -0
  1012. package/resources/targets/trae/js3d/js3d/context/skills/asset-usage-audit/scripts/scan-assets.mjs +77 -0
  1013. package/resources/targets/trae/js3d/js3d/context/skills/export-config/SKILL.md +16 -0
  1014. package/resources/targets/trae/js3d/js3d/context/skills/export-config/assets/tooling/cli.mjs +20 -0
  1015. package/resources/targets/trae/js3d/js3d/context/skills/export-config/assets/tooling/config.d.mts +19 -0
  1016. package/resources/targets/trae/js3d/js3d/context/skills/export-config/assets/tooling/config.mjs +1 -0
  1017. package/resources/targets/trae/js3d/js3d/context/skills/export-config/assets/tooling/project.d.mts +6 -0
  1018. package/resources/targets/trae/js3d/js3d/context/skills/export-config/assets/tooling/project.mjs +77 -0
  1019. package/resources/targets/trae/js3d/js3d/context/skills/export-config/assets/tooling/vite.d.mts +2 -0
  1020. package/resources/targets/trae/js3d/js3d/context/skills/export-config/assets/tooling/vite.mjs +34 -0
  1021. package/resources/targets/trae/js3d/js3d/context/skills/export-config/scripts/export-config.mjs +4 -0
  1022. package/resources/targets/trae/js3d/js3d/context/skills/export-config/scripts/install.mjs +89 -0
  1023. package/resources/targets/trae/js3d/js3d/context/skills/export-config/scripts/panel-resource-path.mjs +106 -0
  1024. package/resources/targets/trae/js3d/js3d/context/skills/index.json +31 -0
  1025. package/resources/targets/trae/js3d/js3d/context/skills/performance-audit/SKILL.md +21 -0
  1026. package/resources/targets/trae/js3d/js3d/context/skills/performance-audit/scripts/lib/rules.mjs +470 -0
  1027. package/resources/targets/trae/js3d/js3d/context/skills/performance-audit/scripts/lib/scan.mjs +387 -0
  1028. package/resources/targets/trae/js3d/js3d/context/skills/performance-audit/scripts/lib/source.mjs +398 -0
  1029. package/resources/targets/trae/js3d/js3d/context/skills/performance-audit/scripts/scan-perf.mjs +130 -0
  1030. package/resources/targets/trae/js3d/js3d/context/skills/visual-qa/SKILL.md +14 -0
  1031. package/resources/targets/trae/js3d/js3d/project/README.md +7 -0
  1032. package/resources/targets/trae/js3d/js3d/project/configs/game.controls.json +3 -0
  1033. package/resources/targets/trae/js3d/js3d/project/configs/game.json +3 -0
  1034. package/resources/targets/trae/js3d/js3d/project/game-runtime.json +7 -0
  1035. package/resources/targets/trae/js3d/js3d/project/game.config.json +7 -0
  1036. package/resources/targets/trae/js3d/js3d/project/index.html +12 -0
  1037. package/resources/targets/trae/js3d/js3d/project/package.json +23 -0
  1038. package/resources/targets/trae/js3d/js3d/project/runtime/lightgame/1.1.0/platform/identity/qq-ai-game-sdk.min.js +5 -0
  1039. package/resources/targets/trae/js3d/js3d/project/runtime/lightgame/1.1.0/platform/identity/qq-session.mjs +208 -0
  1040. package/resources/targets/trae/js3d/js3d/project/runtime/lightgame/1.1.0/platform/identity/shared.mjs +37 -0
  1041. package/resources/targets/trae/js3d/js3d/project/runtime/lightgame/1.1.0/platform/platform-capture-video.mjs +227 -0
  1042. package/resources/targets/trae/js3d/js3d/project/runtime/lightgame/1.1.0/platform/platform-service.d.mts +31 -0
  1043. package/resources/targets/trae/js3d/js3d/project/runtime/lightgame/1.1.0/platform/platform-service.mjs +272 -0
  1044. package/resources/targets/trae/js3d/js3d/project/runtime/lightgame/1.1.0/platform/platform.d.mts +79 -0
  1045. package/resources/targets/trae/js3d/js3d/project/runtime/lightgame/1.1.0/platform/platform.mjs +30 -0
  1046. package/resources/targets/trae/js3d/js3d/project/runtime/lightgame/1.1.0/release.json +24 -0
  1047. package/resources/targets/trae/js3d/js3d/project/runtime/lightgame/1.1.0/tooling/cli.mjs +16 -0
  1048. package/resources/targets/trae/js3d/js3d/project/runtime/lightgame/1.1.0/tooling/project.d.mts +4 -0
  1049. package/resources/targets/trae/js3d/js3d/project/runtime/lightgame/1.1.0/tooling/project.mjs +50 -0
  1050. package/resources/targets/trae/js3d/js3d/project/runtime/lightgame/1.1.0/tooling/vite.d.mts +3 -0
  1051. package/resources/targets/trae/js3d/js3d/project/runtime/lightgame/1.1.0/tooling/vite.mjs +72 -0
  1052. package/resources/targets/trae/js3d/js3d/project/runtime/lightgame/1.1.0/tools/assets.d.mts +24 -0
  1053. package/resources/targets/trae/js3d/js3d/project/runtime/lightgame/1.1.0/tools/assets.mjs +2 -0
  1054. package/resources/targets/trae/js3d/js3d/project/runtime/lightgame/1.1.0/tools/astc.d.mts +10 -0
  1055. package/resources/targets/trae/js3d/js3d/project/runtime/lightgame/1.1.0/tools/astc.mjs +1 -0
  1056. package/resources/targets/trae/js3d/js3d/project/runtime/lightgame/1.1.0/tools/glb.d.mts +26 -0
  1057. package/resources/targets/trae/js3d/js3d/project/runtime/lightgame/1.1.0/tools/glb.mjs +351 -0
  1058. package/resources/targets/trae/js3d/js3d/project/scripts/config-export/assert-asset-wiring.mjs +97 -0
  1059. package/resources/targets/trae/js3d/js3d/project/scripts/config-export/panel-resource-path.mjs +106 -0
  1060. package/resources/targets/trae/js3d/js3d/project/scripts/config-export/sync-asset-controls.mjs +327 -0
  1061. package/resources/targets/trae/js3d/js3d/project/scripts/config-export/sync-scene-assets.mjs +191 -0
  1062. package/resources/targets/trae/js3d/js3d/project/scripts/config-export.mjs +15 -0
  1063. package/resources/targets/trae/js3d/js3d/project/scripts/skill-modules/export-config/cli.mjs +20 -0
  1064. package/resources/targets/trae/js3d/js3d/project/scripts/skill-modules/export-config/config.d.mts +19 -0
  1065. package/resources/targets/trae/js3d/js3d/project/scripts/skill-modules/export-config/config.mjs +1 -0
  1066. package/resources/targets/trae/js3d/js3d/project/scripts/skill-modules/export-config/installed.json +6 -0
  1067. package/resources/targets/trae/js3d/js3d/project/scripts/skill-modules/export-config/project.d.mts +6 -0
  1068. package/resources/targets/trae/js3d/js3d/project/scripts/skill-modules/export-config/project.mjs +77 -0
  1069. package/resources/targets/trae/js3d/js3d/project/scripts/skill-modules/export-config/vite.d.mts +2 -0
  1070. package/resources/targets/trae/js3d/js3d/project/scripts/skill-modules/export-config/vite.mjs +34 -0
  1071. package/resources/targets/trae/js3d/js3d/project/scripts/write-preview-ready.mjs +22 -0
  1072. package/resources/targets/trae/js3d/js3d/project/src/display/ui-stage.ts +156 -0
  1073. package/resources/targets/trae/js3d/js3d/project/src/display/viewport.ts +239 -0
  1074. package/resources/targets/trae/js3d/js3d/project/src/main.ts +85 -0
  1075. package/resources/targets/trae/js3d/js3d/project/src/platform.ts +2 -0
  1076. package/resources/targets/trae/js3d/js3d/project/src/style.css +83 -0
  1077. package/resources/targets/trae/js3d/js3d/project/tsconfig.json +20 -0
  1078. package/resources/targets/trae/js3d/js3d/project/unified_data_control_config.json +20 -0
  1079. package/resources/targets/trae/js3d/js3d/project/vite.config.ts +5 -0
  1080. package/resources/targets/trae/js3d/recovery.md +17 -0
  1081. package/resources/targets/trae/js3d/target.json +60 -0
  1082. package/resources/targets/workbuddy/js/context-filter-report.json +1 -1
  1083. package/resources/targets/workbuddy/js/craft-game-maker/SKILL.md +3 -3
  1084. package/resources/targets/workbuddy/js/js/bundle.json +5 -5
  1085. package/resources/targets/workbuddy/js/target.json +1 -1
  1086. package/resources/targets/workbuddy/js3d/context-filter-report.json +1 -1
  1087. package/resources/targets/workbuddy/js3d/craft-game-maker/SKILL.md +3 -3
  1088. package/resources/targets/workbuddy/js3d/js3d/bundle.json +6 -6
  1089. package/resources/targets/workbuddy/js3d/js3d/context/skills/asset-usage-audit/scripts/lib/scan.mjs +2 -2
  1090. package/resources/targets/workbuddy/js3d/target.json +1 -1
  1091. package/resources/targets/zcode/js/context-filter-report.json +1 -1
  1092. package/resources/targets/zcode/js/craft-game-maker/SKILL.md +3 -3
  1093. package/resources/targets/zcode/js/js/bundle.json +5 -5
  1094. package/resources/targets/zcode/js/target.json +1 -1
  1095. package/resources/targets/zcode/js3d/context-filter-report.json +1 -1
  1096. package/resources/targets/zcode/js3d/craft-game-maker/SKILL.md +3 -3
  1097. package/resources/targets/zcode/js3d/js3d/bundle.json +6 -6
  1098. package/resources/targets/zcode/js3d/js3d/context/skills/asset-usage-audit/scripts/lib/scan.mjs +2 -2
  1099. package/resources/targets/zcode/js3d/target.json +1 -1
  1100. package/vendor/craft-runtime/SOURCE.json +1 -1
@@ -5,12 +5,16 @@ import { readInstallation, readInstallationSnapshot, activationStatus, registryO
5
5
  import { compareVersions, requireForwardVersion, parseVersion } from './version-policy.mjs';
6
6
  import { stageRegistryRuntime, getRuntimeIdentity, probeRuntime } from './runtime.mjs';
7
7
  import { optionalFile, assertPlainPath, commitFiles } from './files.mjs';
8
- import { hostPaths, hostEnvironment, installTargets } from './hosts.mjs';
8
+ import { hostPaths, hostCommandOptions, installTargets } from './hosts.mjs';
9
9
  import { craftConfig, mergeConfig } from './config.mjs';
10
10
  import { assertDshSharedScope } from './dsh-config.mjs';
11
11
  import { connectionHandoff } from './connection-handoff.mjs';
12
12
  import { planLauncher, verifyLauncher } from './fixed-launcher.mjs';
13
13
  import os from 'node:os';
14
+ import { setTimeout as delay } from 'node:timers/promises';
15
+ import { unchangedInstallation, installationChanged, installationBusy } from './installation-transaction.mjs';
16
+ import { prepareRuntimeCandidate, publishRuntimeCandidate, disposeRuntimeCandidate, refreshRuntimeCandidate } from './runtime-candidate.mjs';
17
+ import { assertHostConfigScope } from './host-config-scope.mjs';
14
18
 
15
19
  export { readInstallation } from './installation-state.mjs';
16
20
  const pending = new Map();
@@ -66,17 +70,35 @@ async function candidateSkills(state, identity) {
66
70
  return changes;
67
71
  }
68
72
 
73
+ const shortLock = { stale: 120000, retries: 0 };
74
+
75
+ async function confirmationSnapshot(installationFile, current) {
76
+ const snapshot = await readInstallationSnapshot(installationFile), { state } = snapshot;
77
+ await assertHostConfigScope(state.config,state.host,state.config_peers);
78
+ if (state.schema !== 2 || state.activation_mode !== activationMode) throw new Error('Legacy Craft installation requires the standard installer before reconnecting');
79
+ if (activationStatus(current, state.target).status !== 'active_verified') throw installationChanged('The current connection does not match the configured update target');
80
+ await verifyLauncher(state, installationFile);
81
+ const skills = await candidateSkills(state, current);
82
+ if (skills.some(change => change.before !== change.after)) throw new Error('Installed global Skills differ from the configured runtime; run install again');
83
+ return snapshot;
84
+ }
85
+
69
86
  export async function confirmActiveInstallation({ installationFile, current }) {
70
87
  if (!current?.instance_id) throw new Error('An actual runtime instance is required to confirm the installation');
71
- const unlock = await lockfile.lock(installationFile, { stale: 120000, retries: { retries: 30, minTimeout: 100, maxTimeout: 500 } });
88
+ // Capture small shared files consistently. Full package hashing never blocks
89
+ // installers; a second short transaction detects concurrent scope/target changes.
90
+ let unlock = await lockfile.lock(installationFile, shortLock), snapshot;
91
+ try { snapshot = await confirmationSnapshot(installationFile, current); }
92
+ finally { await unlock(); }
93
+ let identity, integrityError;
94
+ try { identity = await getRuntimeIdentity(current.package_root); }
95
+ catch (error) { integrityError = error; }
96
+ unlock = await lockfile.lock(installationFile, shortLock);
72
97
  try {
73
- const { state, text: before } = await readInstallationSnapshot(installationFile);
74
- if (state.schema !== 2 || state.activation_mode !== activationMode) throw new Error('Legacy Craft installation requires the standard installer before reconnecting');
75
- if (activationStatus(current, state.target).status !== 'active_verified') throw new Error('The current connection does not match the configured update target');
76
- if (!sameRuntimeIdentity(await getRuntimeIdentity(current.package_root), state.target)) throw new Error('The running package files do not match the configured update target');
77
- await verifyLauncher(state, installationFile);
78
- const skills = await candidateSkills(state, current);
79
- if (skills.some(change => change.before !== change.after)) throw new Error('Installed global Skills differ from the configured runtime; run install again');
98
+ await unchangedInstallation(installationFile, snapshot.state);
99
+ if (integrityError) throw integrityError;
100
+ if (!sameRuntimeIdentity(identity, snapshot.state.target)) throw new Error('The running package files do not match the configured update target');
101
+ const { state, text: before } = await confirmationSnapshot(installationFile, current);
80
102
  const previous = state.connection_verification;
81
103
  const receipt = previous?.instance_id === current.instance_id ? previous : { version: current.version, build_id: current.build_id, instance_id: current.instance_id, confirmed_at: new Date().toISOString() };
82
104
  const written = await commitFiles([{ file: installationFile, before, after: receipt === previous ? before : JSON.stringify({ ...state, connection_verification: receipt }, null, 2) + '\n' }]);
@@ -84,7 +106,18 @@ export async function confirmActiveInstallation({ installationFile, current }) {
84
106
  } finally { await unlock(); }
85
107
  }
86
108
 
109
+ async function saveCheckReceipt(installationFile, expected, receipt) {
110
+ const unlock = await lockfile.lock(installationFile, { ...shortLock, retries: { retries: 3, minTimeout: 25, maxTimeout: 100 } });
111
+ try {
112
+ const { state, text: before } = await unchangedInstallation(installationFile, expected);
113
+ const after = { ...state, last_check: receipt };
114
+ await commitFiles([{ file: installationFile, before, after: JSON.stringify(after, null, 2) + '\n' }]);
115
+ return after;
116
+ } finally { await unlock(); }
117
+ }
118
+
87
119
  async function hostUpdate(state, installationFile, launcher, identity) {
120
+ await assertHostConfigScope(state.config,state.host,state.config_peers);
88
121
  await assertPlainPath(state.config);
89
122
  if (state.host === 'dsh') assertDshSharedScope({ dshHome: path.dirname(state.config) });
90
123
  const before = await optionalFile(state.config);
@@ -103,9 +136,8 @@ async function hostUpdate(state, installationFile, launcher, identity) {
103
136
  return { file: state.config, before, after: mergeConfig(before, state.host, connection, { previousName: state.server_id, enable: false }) };
104
137
  }
105
138
 
106
- async function checkLocked({ installationFile, current, intent, requestKey, projectCompatibility, registryReceipt, lookup, materialize, probe }) {
107
- const snapshot = await readInstallationSnapshot(installationFile), before = snapshot.text;
108
- let state = snapshot.state;
139
+ async function checkSnapshot({ installationFile, current, intent, requestKey, projectCompatibility, registryReceipt, lookup, materialize, probe }) {
140
+ let state = (await readInstallationSnapshot(installationFile)).state;
109
141
  if (current.package !== state.source.package) return result(state, current, 'error', { code: 'package_mismatch', can_continue: false });
110
142
  try { requireForwardVersion(state.target, current); }
111
143
  catch (error) { return result(state, current, 'error', { code: 'target_not_forward', message: error.message, can_continue: false }); }
@@ -121,8 +153,11 @@ async function checkLocked({ installationFile, current, intent, requestKey, proj
121
153
  try { if (projectCompatibility) await projectCompatibility(current.package_root); }
122
154
  catch (error) { currentIncompatible = error.message; }
123
155
  }
124
- const keepCurrent = (status, extra = {}) => result(state, current, currentIncompatible ? 'incompatible' : status,
125
- { ...extra, can_continue: state.schema === 2 && !activationPending && !currentIncompatible && extra.can_continue !== false, ...(currentIncompatible ? { underlying_status: status, message: currentIncompatible } : {}) });
156
+ const keepCurrent = async (status, extra = {}) => {
157
+ await unchangedInstallation(installationFile, state);
158
+ return result(state, current, currentIncompatible ? 'incompatible' : status,
159
+ { ...extra, can_continue: state.schema === 2 && !activationPending && !currentIncompatible && extra.can_continue !== false, ...(currentIncompatible ? { underlying_status: status, message: currentIncompatible } : {}) });
160
+ };
126
161
  if (state.policy.mode === 'off' && !['inspect', 'update'].includes(intent)) return keepCurrent('disabled');
127
162
  let remote, checkedAt;
128
163
  const last = registryReceipt ?? state.last_check;
@@ -152,10 +187,9 @@ async function checkLocked({ installationFile, current, intent, requestKey, proj
152
187
  // Public version checks are read-only. Their receipts live in the MCP
153
188
  // connection; only an installer/preparation may persist a receipt.
154
189
  if (intent !== 'inspect') {
155
- const after = { ...state, last_check: receipt };
156
- await commitFiles([{ file: installationFile, before, after: JSON.stringify(after, null, 2) + '\n' }]);
157
- state = after;
190
+ state = await saveCheckReceipt(installationFile, state, receipt);
158
191
  }
192
+ await unchangedInstallation(installationFile, state);
159
193
  if (currentIncompatible && comparison <= 0) return keepCurrent(comparison < 0 ? 'local_ahead' : 'current', { checked_at: checkedAt, remote });
160
194
  const remoteStatus = comparison < 0 ? 'local_ahead' : comparison === 0 ? 'current' : 'available';
161
195
  return result(state, current, state.schema === 1 && comparison <= 0 ? 'migration_required' : activationPending && comparison <= 0 ? 'pending_reconnect' : remoteStatus, { checked_at: checkedAt, remote,
@@ -167,12 +201,11 @@ async function checkLocked({ installationFile, current, intent, requestKey, proj
167
201
  const runtimeRoot = state.runtime_root;
168
202
  if (!path.isAbsolute(runtimeRoot ?? '')) return result(state, current, 'error', { code: 'invalid_runtime_root', can_continue: false });
169
203
  await mkdir(runtimeRoot, { recursive: true });
170
- const unlock = await lockfile.lock(runtimeRoot, { stale: 120000, retries: { retries: 20, minTimeout: 250, maxTimeout: 1000 } });
171
- let originalConfig;
204
+ let candidate, originalConfig;
172
205
  try {
173
206
  originalConfig = await optionalFile(state.config);
174
- const runtime = await materialize(state.source, remote, runtimeRoot);
175
- const identity = await getRuntimeIdentity(runtime.package_root ?? path.resolve(path.dirname(runtime.entry), '..'));
207
+ candidate = await prepareRuntimeCandidate(runtimeRoot, stagingRoot => materialize(state.source, remote, stagingRoot));
208
+ let identity = candidate.identity;
176
209
  if (!within(runtimeRoot, identity.package_root) || identity.package !== state.source.package || identity.version !== remote.version) throw new Error('Candidate runtime identity/path mismatch');
177
210
  requireForwardVersion(identity, state.target);
178
211
  if (projectCompatibility) {
@@ -182,50 +215,84 @@ async function checkLocked({ installationFile, current, intent, requestKey, proj
182
215
  const verified = await probe({ command: process.execPath, args: [identity.entry, '--workspace', state.workspace], env: { CRAFT_CLIENT_IDE: state.host, CRAFT_WEB_URL: state.platform, CLIENT_WORKSPACE_ROOT: state.workspace } },
183
216
  { version: identity.version, build_id: identity.build_id, host: state.host, workspace: state.workspace, platform: state.platform });
184
217
  if (verified.runtime?.activation_mode !== activationMode) throw new Error('Candidate runtime does not support activation at the next MCP start');
185
- const launcherPlan = await planLauncher(installationFile, state.launcher, identity.package_root);
186
- const skillChanges = await candidateSkills(state, identity), configChange = await hostUpdate(state, installationFile, launcherPlan.launcher, identity);
187
- const target = { ...identity, origin: { kind: 'npm', registry: state.source.registry, integrity: remote.integrity } };
188
- const after = { ...state, schema: 2, activation_mode: activationMode, launcher: launcherPlan.launcher, anchor: identity, target, skills_runtime: skillRuntimeIdentity(identity), last_check: receipt, updated_at: new Date().toISOString() };
189
- delete after.connection_verification;
190
- await commitFiles([...skillChanges, launcherPlan.change, { file: installationFile, before, after: JSON.stringify(after, null, 2) + '\n' }, configChange]);
191
- state = after;
192
- return result(state, current, 'pending_reconnect', { checked_at: checkedAt, remote, reconnect_required: true, can_continue: false, verified: { ...verified, scope: 'standalone_probe' } });
218
+ if (!sameRuntimeIdentity(await getRuntimeIdentity(identity.package_root), identity)) throw new Error('Candidate runtime changed during startup verification');
219
+ // Neither registry traffic nor materialization/probing owns a shared lock.
220
+ // Re-read the authoritative state before publishing; receipt-only writes merge.
221
+ const commitCandidate = async () => {
222
+ const unlockState = await lockfile.lock(installationFile, shortLock);
223
+ let unlockRuntime;
224
+ try {
225
+ const latest = await unchangedInstallation(installationFile, state);
226
+ state = latest.state;
227
+ unlockRuntime = await lockfile.lock(runtimeRoot, shortLock);
228
+ identity = await publishRuntimeCandidate(candidate);
229
+ requireForwardVersion(identity, state.target);
230
+ const launcherPlan = await planLauncher(installationFile, state.launcher, identity.package_root);
231
+ const skillChanges = await candidateSkills(state, identity), configChange = await hostUpdate(state, installationFile, launcherPlan.launcher, identity);
232
+ const target = { ...identity, origin: { kind: 'npm', registry: state.source.registry, integrity: remote.integrity } };
233
+ const after = { ...state, schema: 2, activation_mode: activationMode, launcher: launcherPlan.launcher, anchor: identity, target, skills_runtime: skillRuntimeIdentity(identity), last_check: receipt, updated_at: new Date().toISOString() };
234
+ delete after.connection_verification;
235
+ await commitFiles([...skillChanges, launcherPlan.change, { file: installationFile, before: latest.text, after: JSON.stringify(after, null, 2) + '\n' }, configChange]);
236
+ state = after;
237
+ return result(state, current, 'pending_reconnect', { checked_at: checkedAt, remote, reconnect_required: true, can_continue: false, verified: { ...verified, scope: 'standalone_probe' } });
238
+ } finally { try { await unlockRuntime?.(); } finally { await unlockState(); } }
239
+ };
240
+ for (let attempt = 0; ; attempt++) {
241
+ try { return await commitCandidate(); }
242
+ catch (error) {
243
+ if (!['INSTALLATION_CHANGED','ELOCKED'].includes(error.code) || attempt >= 3) throw error;
244
+ // A second host can publish identical bytes while our own installation
245
+ // remains unchanged. Reuse the complete download and revalidate the
246
+ // existing target outside locks, rather than downloading a second time.
247
+ await unchangedInstallation(installationFile, state);
248
+ if (error.code === 'INSTALLATION_CHANGED') await refreshRuntimeCandidate(candidate);
249
+ await delay(100 * (attempt + 1));
250
+ }
251
+ }
252
+
253
+
193
254
  } catch (error) {
255
+ if (['ELOCKED', 'INSTALLATION_CHANGED'].includes(error.code)) throw error;
194
256
  const failure = { checked_at: checkedAt, remote, code: 'candidate_rejected', message: error.message, ...(error.npm_code?{npm_code:error.npm_code}:{}) };
195
257
  try {
196
258
  // A failed candidate must not disable a verified existing installation.
197
259
  // Recheck the rollback, scope and complete old package before allowing work.
198
260
  if (state.schema !== 2 || activationPending || currentIncompatible) throw new Error(currentIncompatible ?? 'No compatible active installation to retain');
199
- if (await optionalFile(installationFile) !== before) throw new Error('Installation state changed; rollback could not be verified');
261
+ await unchangedInstallation(installationFile, state);
200
262
  if (originalConfig === undefined || originalConfig === null || await optionalFile(state.config) !== originalConfig) throw new Error('Host configuration changed; rollback could not be verified');
201
263
  if (!sameRuntimeIdentity(await getRuntimeIdentity(current.package_root), state.target)) throw new Error('Existing runtime integrity check failed');
202
264
  await hostUpdate(state, installationFile, state.launcher ?? { entry: current.entry }, current);
203
265
  if (!state.launcher && path.resolve(craftConfig(originalConfig, state.host, state.server_id).args[0]) !== path.resolve(current.entry)) throw new Error('Existing runtime entry differs from the configured connection');
204
266
  const skills = await candidateSkills(state, current);
205
267
  if (skills.some(change => change.before !== change.after)) throw new Error('Existing managed Skills differ from the current runtime');
268
+ await unchangedInstallation(installationFile, state);
206
269
  return result(state, current, 'update_failed', { ...failure, can_continue: true, retained_version: current.version,
207
270
  next: 'Report the update failure and continue with the verified existing version. A later new work can retry the update; do not claim the newest version is running.' });
208
271
  } catch (fallbackError) {
272
+ if (fallbackError.code === 'INSTALLATION_CHANGED') throw fallbackError;
209
273
  return result(state, current, 'error', { ...failure, can_continue: false, fallback_error: fallbackError.message });
210
274
  }
211
275
  }
212
- finally { await unlock(); }
276
+ finally { if (candidate) await disposeRuntimeCandidate(candidate); }
213
277
  }
214
278
 
215
279
  export async function checkForUpdate({ installationFile, current, intent = 'inspect', requestKey, projectCompatibility, registryReceipt, lookup = queryRegistry, materialize = stageRegistryRuntime, probe = probeRuntime }) {
216
280
  if (!installationFile) return { status: 'unmanaged', current, can_continue: true, activation_required: false, note: 'Install Craft once to enable automatic updates.' };
217
281
  if (!['inspect', 'auto', 'create', 'resume', 'update'].includes(intent)) throw new Error('Invalid update intent');
218
- // Serialize per installation across processes. A shared promise only merges
219
- // the same logical request in this process; a later work still checks npm.
282
+ // Deduplicate only the same logical request. Other readers and downloads
283
+ // proceed independently; the short commit compares their installation snapshot.
220
284
  const key = requestKey ? JSON.stringify([installationFile, current.build_id, current.instance_id, intent, requestKey]) : Symbol('unkeyed update');
221
285
  if (pending.has(key)) return pending.get(key);
222
286
  const operation = (async () => {
223
- let unlock;
224
- try {
225
- unlock = await lockfile.lock(installationFile, { stale: 120000, retries: { retries: 30, minTimeout: 100, maxTimeout: 500 } });
226
- return await checkLocked({ installationFile, current, intent, requestKey, projectCompatibility, registryReceipt, lookup, materialize, probe });
227
- } catch (error) { return { status: 'error', code: 'update_failed', message: error.message, current, can_continue: false, activation_required: false }; }
228
- finally { await unlock?.(); }
287
+ for (let attempt = 0; attempt < 3; attempt++) {
288
+ try {
289
+ return await checkSnapshot({ installationFile, current, intent, requestKey, projectCompatibility, registryReceipt, lookup, materialize, probe });
290
+ } catch (error) {
291
+ if (error.code === 'INSTALLATION_CHANGED' && attempt < 2) continue;
292
+ if (['ELOCKED', 'INSTALLATION_CHANGED'].includes(error.code)) return installationBusy(error, current);
293
+ return { status: 'error', code: 'update_failed', message: error.message, current, can_continue: false, activation_required: false };
294
+ }
295
+ }
229
296
  })();
230
297
  pending.set(key, operation);
231
298
  try { return await operation; } finally { if (pending.get(key) === operation) pending.delete(key); }
@@ -235,12 +302,13 @@ export async function runUpdateCommand(args) {
235
302
  const [command, ...rest] = args, options = {};
236
303
  for (let i = 0; i < rest.length; i += 2) {
237
304
  const key = rest[i]?.replace(/^--/, '');
238
- if (rest[i] !== '--ide' || !rest[i + 1] || Object.hasOwn(options, key)) throw new Error('Use craft-mcp ' + command + ' --ide <host>');
305
+ if (!['--ide','--host-config','--trae-region'].includes(rest[i]) || !rest[i + 1] || Object.hasOwn(options, key)) throw new Error('Use craft-mcp ' + command + ' --ide <host> [--host-config ABS] [--trae-region global|cn]');
239
306
  options[key] = rest[i + 1];
240
307
  }
241
308
  const results = [];
309
+ const hostOptions = hostCommandOptions(options);
242
310
  for (const host of installTargets(options.ide)) {
243
- const paths = hostPaths(os.homedir(), host, process.env.CODEX_HOME, hostEnvironment());
311
+ const paths = hostPaths(os.homedir(), host, process.env.CODEX_HOME, hostOptions);
244
312
  await assertPlainPath(paths.config);
245
313
  assertDshSharedScope(paths);
246
314
  const connection = craftConfig(await optionalFile(paths.config) ?? '', host);
@@ -249,6 +317,11 @@ export async function runUpdateCommand(args) {
249
317
  const state = await readInstallation(installationFile);
250
318
  const current = await getRuntimeIdentity(state.target.package_root);
251
319
  const update = await checkForUpdate({ installationFile, current, intent: command === 'update' ? 'update' : 'inspect', requestKey: 'cli-' + Date.now() });
320
+ if (update.status === 'installation_busy') {
321
+ results.push({ host, ...update, scope: 'configured_runtime' });
322
+ process.exitCode = 1;
323
+ continue;
324
+ }
252
325
  // A CLI can inspect configured files, but cannot prove a host connection.
253
326
  results.push({ host, ...update, activation: { status: 'pending_connection_verification', expected: update.target }, can_continue: false, scope: 'configured_runtime', note: 'Call craft_game_info in the actual host connection to confirm activation.',
254
327
  ...(!['error','update_failed','incompatible','migration_required'].includes(update.status) ? {connection_handoff:connectionHandoff({host,target:update.target,workspace:state.workspace,platform:state.platform,intent:command==='update'?'update':'inspect'})} : {}) });
@@ -1686,7 +1686,13 @@ var hosts = Object.freeze({
1686
1686
  claude: { label: "Claude Code", config: ".claude.json", skills: ".claude/skills", projectSkills: ".claude/skills", format: "json" },
1687
1687
  dsh: { label: "DSH", config: ".dsh/cordis.patch.yml", skills: ".dsh/skills", projectSkills: ".dsh/skills", format: "yaml" },
1688
1688
  zcode: { label: "ZCode", config: ".zcode/cli/config.json", skills: ".zcode/skills", projectSkills: ".zcode/skills", format: "json" },
1689
- kimi: { label: "Kimi Code", config: ".kimi-code/mcp.json", skills: ".kimi-code/skills", projectSkills: ".kimi-code/skills", format: "json" }
1689
+ kimi: { label: "Kimi Code", config: ".kimi-code/mcp.json", skills: ".kimi-code/skills", projectSkills: ".kimi-code/skills", format: "json" },
1690
+ trae: { label: "TRAE", skills: ".trae/skills", projectSkills: ".trae/skills", format: "json", explicitConfig: true },
1691
+ "qoder-cn": { label: "Qoder CN", config: ".qoder-cn/mcp.json", skills: ".qoder-cn/skills", projectSkills: ".qoder-cn/skills", discoverySkill: ".qoder/skills/craft-project-qoder-cn/SKILL.md", format: "json" },
1692
+ qoder: { label: "Qoder", skills: ".qoder/skills", projectSkills: ".qoder/skills", format: "json", explicitConfig: true },
1693
+ comate: { label: "\u6587\u5FC3\u5FEB\u7801", config: ".comate/mcp.json", skills: ".comate/skills", projectSkills: ".comate/skills", format: "json" },
1694
+ opencode: { label: "OpenCode", config: ".config/opencode/opencode.json", skills: ".config/opencode/skills", projectSkills: ".opencode/skills", format: "jsonc" },
1695
+ qwen: { label: "Qwen Code", config: ".qwen/settings.json", skills: ".qwen/skills", projectSkills: ".qwen/skills", format: "jsonc" }
1690
1696
  });
1691
1697
 
1692
1698
  // dist-server/integrations/installation-state.mjs
@@ -1725,6 +1731,7 @@ async function readInstallationSnapshot(file) {
1725
1731
  if (![1, 2].includes(state.schema) || state.schema === 2 && state.activation_mode !== activationMode || !state.id || !Object.hasOwn(hosts, state.host) || !path2.isAbsolute(state.config ?? "") || !path2.isAbsolute(state.workspace ?? "") || !state.server_id || !["auto", "off"].includes(state.policy?.mode)) throw new Error("Invalid Craft installation state");
1726
1732
  validateIdentity(state.anchor);
1727
1733
  validateIdentity(state.target);
1734
+ if (state.config_peers !== void 0 && (!Array.isArray(state.config_peers) || state.config_peers.some((file2) => typeof file2 !== "string" || !path2.isAbsolute(file2)))) throw new Error("Invalid additional host configuration paths");
1728
1735
  if (state.source?.package !== state.anchor.package || state.target.package !== state.anchor.package) throw new Error("Craft installation package identity mismatch");
1729
1736
  installedSkillEntries(state);
1730
1737
  if (state.skills_runtime !== void 0) {
@@ -29,6 +29,7 @@ import { currentWork, withWork, guardWork } from '../game-workflow/work-scope.mj
29
29
  import { getRuntimeIdentity } from '../integrations/runtime.mjs';
30
30
  import { UpdateSession } from './update-session.mjs';
31
31
  import { registerRuntimeConnection } from '../integrations/runtime-gc.mjs';
32
+ import { readInstallation, sameRuntimeIdentity } from '../integrations/installation-state.mjs';
32
33
 
33
34
  // Consume before any project/build subprocess can inherit the credential.
34
35
  let connectorToken = takeConnectorToken();
@@ -46,7 +47,20 @@ if (connectorAuth) {
46
47
  }
47
48
  const host = clientIde(process.env.CRAFT_CLIENT_IDE);
48
49
  const { instructions:guide, workflow:bootstrapWorkflow, engines } = await loadEngineResources(resources,host);
49
- const projects = new Projects(root,state,engines,host); await projects.init();
50
+ const projects = new Projects(root,state,engines,host,async()=>{
51
+ // Test/local transports are not a portable service address. Never publish a
52
+ // loopback mock server into a project that will be opened on another machine.
53
+ if(new URL(platform.base).protocol!=='https:') return {unavailable:'non_portable_platform'};
54
+ const installationFile=process.env.CRAFT_INSTALLATION_FILE;
55
+ if(!installationFile) return {version,platform:platform.base};
56
+ const installation=await readInstallation(installationFile);
57
+ const canonical=value=>process.platform==='win32'?path.resolve(value).toLowerCase():path.resolve(value);
58
+ if(installation.host!==host || canonical(installation.workspace)!==canonical(root) || new URL(installation.platform).origin!==new URL(platform.base).origin || installation.source.package!==runtimeIdentity.package) {
59
+ throw new Error('Craft installation scope differs from this connection; reconnect before preparing project installation information');
60
+ }
61
+ if(!sameRuntimeIdentity(runtimeIdentity,installation.target)) throw new Error('The installed Craft target differs from this running connection; reconnect and verify the actual runtime before preparing project installation information');
62
+ return {version,platform:platform.base,registry:installation.source.registry,channel:installation.source.channel};
63
+ }); await projects.init();
50
64
  const tasks = new Tasks(state); await tasks.init();
51
65
  const previews = new Previews(state);
52
66
  const leases = new ProjectLeases(root,name=>tasks.cancelProject(name)); await leases.init();
@@ -59,6 +73,7 @@ const resourcePaths = { capture:path.join(resources,'game_visual_qa.mjs'), evide
59
73
  const drafts = new DraftUploads(platform,uploadStore,resourcePaths.evidence,new DraftBindings(getProjectBindingsDir(),root));
60
74
  const mutations = new Set();
61
75
  let closing = false;
76
+ let runtimeMaintenance;
62
77
  let authInteraction=false;
63
78
  async function validateWork(work,{preparing=false}={}) {
64
79
  await leases.assert(work.name,work.work_id,{ready:!preparing,context_revision:work.context_revision});
@@ -69,7 +84,8 @@ function runtimeBusy({excludeUpdate=false}={}) {
69
84
  if(platform.store.getSession().loggedIn) authInteraction=false;
70
85
  const busy={work_count:leases.activeCount,task_count:tasks.activeCount,mutation_count:mutations.size,
71
86
  interaction_count:panel.activeRequests+Number(authInteraction),
72
- update_count:Math.max(0,updates.activeOperations-Number(excludeUpdate))};
87
+ update_count:Math.max(0,updates.activeOperations-Number(excludeUpdate)),
88
+ maintenance_count:Number(Boolean(runtimeMaintenance))};
73
89
  return {...busy,can_reconnect:!closing && Object.values(busy).every(count=>count===0)};
74
90
  }
75
91
  const updates=new UpdateSession({installationFile:process.env.CRAFT_INSTALLATION_FILE,current:runtimeIdentity,projects,host,workspace:root,platform:platform.base,busy:runtimeBusy});
@@ -90,7 +106,7 @@ const engineField = { engine:{ type:'string',enum:['js','js3d'],description:'Cho
90
106
  const taskField = { task_id:{ type:'string' } };
91
107
  const workField = {work_id:{type:'string',description:'Exact work_id from the completed prepare. Keep it for this editing work; release when finished.'}};
92
108
  const workTools=new Set(['craft_assets_generate','craft_assets_search','craft_assets_import','craft_game_check','craft_game_review','craft_game_deliver','craft_game_upload','craft_preview_stop','craft_task_cancel']);
93
- const draftFields = { ...nameField, check_task_id:{ type:'string', description:'ID of the passing check for this exact draft build. Reuse the same ID to recover an upload.' },
109
+ const draftFields = { ...nameField, check_task_id:{ type:'string', description:'ID of the completed check that froze this source and dist. Reuse the same ID to recover an upload.' },
94
110
  upload_mode:{type:'string',enum:['current_project','new_project'],description:'Defaults to current_project: append a version using local source/dist and make it current, without merging Web edits. Use new_project only when the user explicitly asks for a new cloud project; success switches the local binding.'},
95
111
  request_key:{type:'string',pattern:'^[A-Za-z0-9_-]{1,80}$',description:'Required for new_project. Create a new key for an explicitly new upload operation; reuse the exact key, mode and check_task_id on retry or status queries.'} };
96
112
  const tool = (name,description,properties={},required=[])=>({ name,description,inputSchema:{ type:'object',properties:{...properties,...(workTools.has(name)?workField:{})},required:[...required,...(workTools.has(name)?['work_id']:[])],additionalProperties:false },...(['craft_game_info','craft_update_check'].includes(name)?{annotations:{readOnlyHint:true,destructiveHint:false,idempotentHint:true}}:name==='craft_update'?{annotations:{readOnlyHint:false,destructiveHint:false}}:{}) });
@@ -104,7 +120,7 @@ const tools = [
104
120
  tool('craft_assets_search','Search the Craft asset library without generating assets. Read craft_game_info.library for categories matching the saved engine. Submit 1 to 8 slot/category/query entries; inspect candidates, scores, metadata and per-slot errors. Poll craft_task_status, then import chosen source=library with search_id/candidate_id. No arbitrary URLs or external search credentials.',{...nameField,...searchFields},['name','queries']),
105
121
  tool('craft_assets_import','Import existing AIGC outputs by resource_id, or selected library candidates with source=library, search_id and candidate_id. One source per batch. Never generates assets. Preserves the original AIGC URL or library Path and updates engine configs/controls without downloading payloads. Poll craft_task_status.',{...nameField,...importFields},['name','assets']),
106
122
  tool('craft_assets_status','Read durable asset requests and import results for the current account and project.',nameField,['name']),
107
- tool('craft_game_check','Finalize engine exports, build, exercise the core loop, settlement and restart, and capture real screenshots. Each step must assert real snapshot().game fields. Poll craft_task_status, then craft_game_review.',{
123
+ tool('craft_game_check','Finalize engine exports, freeze the source and build, and perform the mandatory upload security check. If it passes, exercise the core loop, settlement and restart and capture screenshots. Each step must assert real snapshot().game fields. Poll craft_task_status. If security fails, report the findings and stop the upload. Gameplay and visual findings affect verified preview delivery.',{
108
124
  ...nameField, brief:{ type:'string' }, steps:{ type:'array',minItems:3,maxItems:3,items:{ type:'object',properties:{
109
125
  phase:{ type:'string',enum:['loop','settlement','restart'] },action:{ type:'string',enum:['click','press','drag','wait'] },
110
126
  target:{ type:'string' },key:{ type:'string' },x:{ type:'number' },y:{ type:'number' },to_x:{ type:'number' },to_y:{ type:'number' },ms:{ type:'integer',minimum:1,maximum:30000 },expected:{ type:'string' },
@@ -113,11 +129,11 @@ const tools = [
113
129
  },['name','brief','steps']),
114
130
  tool('craft_task_status','Wait up to 15 seconds and read background progress. Continue polling while running; do not end the user task while assets/checks are running.',{ ...taskField,wait_ms:{ type:'integer',minimum:0,maximum:15000 } },['task_id']),
115
131
  tool('craft_task_cancel','Stop this local task and wait for cleanup. For generation tasks also attempt remote queued-task cancellation; processing tasks may continue remotely. Import cancellation stops only the local import.',taskField,['task_id']),
116
- tool('craft_game_review','Return the check screenshots as images for visual inspection by the host AI IDE. Inspect actual visuals and referenced resources, composition, clipping, readability and requested transparency.',taskField,['task_id']),
132
+ tool('craft_game_review','Return available check screenshots as images, including when the check reported issues. Inspect actual visuals and referenced resources, composition, clipping, readability and requested transparency.',taskField,['task_id']),
117
133
  tool('craft_game_deliver','Prepare a verified preview after a current passing check and visual review. Craft does not launch the process. Run result.start.script with the external host terminal tool in the background, then poll craft_game_info(name).preview until running=true and snapshot matches this delivery. Verify the page before reporting its URL. The host or OS may reclaim it; restart using the returned command.',{
118
134
  ...taskField,visual_passed:{ type:'boolean' },visual_notes:{ type:'string',minLength:10,maxLength:2000 },
119
135
  },['task_id','visual_passed','visual_notes']),
120
- tool('craft_game_upload','Before uploading, tell the user that local source/dist will become the current cloud version and Web edits not synced locally are not included; history remains available for rollback. Default: append to the bound project (create on first upload). Only explicit user requests select new_project. Poll craft_task_status; retry with the same check_task_id, upload_mode and request_key. On success report version_number (vN), appid and project_url; publication remains in Craft Web.',draftFields,['name','check_task_id']),
136
+ tool('craft_game_upload','Upload a completed check with frozen source and dist. Upload rechecks both snapshots for security and blocks when the check fails. Report the findings and rerun the game check after fixing them. Gameplay, capture and visual findings are advisory for upload. Before uploading, tell the user that local source/dist will become the current cloud version and Web edits not synced locally are not included. History remains available for rollback. Default: append to the bound project (create on first upload). Only explicit user requests select new_project. Poll craft_task_status and use the same check_task_id, upload_mode and request_key for a retry. On success report version_number (vN), appid and project_url. Publication remains in Craft Web.',draftFields,['name','check_task_id']),
121
137
  tool('craft_game_upload_status','Read the private upload receipt for this check, including the Craft Web project link when complete.',draftFields,['name','check_task_id']),
122
138
  tool('craft_preview_stop','Stop this project host-launched preview and cancel pending starts, including an earlier session preview.',nameField,['name']),
123
139
  tool('craft_auth_open','Check login first. Return a login URL only when unauthenticated; an authenticated account continues without a login URL. Image generation uses automatic platform billing. Never read credentials or automate login.'),
@@ -129,13 +145,9 @@ const server = new Server({ name:'craft-local',version },{ capabilities:{ tools:
129
145
  let connectionReady=Promise.resolve();
130
146
  server.oninitialized=()=>{
131
147
  if(closing) return;
132
- connectionReady=(async()=>{
133
- const confirmation=await updates.connected();
134
- if(confirmation.status==='active_verified') {
135
- try { await runtimeConnection?.collect(); }
136
- catch { process.stderr.write('[craft] Runtime cleanup skipped; MCP remains active.\n'); }
137
- }
138
- })();
148
+ // Hosts also initialize short-lived discovery probes. They can close or kill
149
+ // the child immediately after tools/list, so readiness must never start GC.
150
+ connectionReady=updates.connected();
139
151
  };
140
152
  server.setRequestHandler(ListToolsRequestSchema,async()=>({ tools }));
141
153
  function viewTask(task) {
@@ -148,9 +160,9 @@ function viewTask(task) {
148
160
  const { artifacts,snapshot_id,source_snapshot,...result } = task.result;
149
161
  return { ...task,result };
150
162
  }
151
- async function checkedTask(id, name, resumeUpload = false) {
163
+ async function completedCheck(id, name, resumeUpload = false) {
152
164
  const task = await tasks.get(id);
153
- if (task.kind !== 'check' || task.status !== 'completed' || !task.result?.gate?.passed) throw new Error('A completed passing game check is required');
165
+ if (task.kind !== 'check' || task.status !== 'completed' || !task.result) throw new Error('A completed game check is required');
154
166
  if (name !== undefined && task.name !== name) throw new Error('Game check belongs to a different project');
155
167
  const work=currentWork();
156
168
  if(!work || work.name!==task.name) throw new Error('A prepared work for this project is required');
@@ -224,7 +236,7 @@ server.setRequestHandler(CallToolRequestSchema,async request=>{
224
236
  }
225
237
  const updateStatus=await updates.status();
226
238
  result = { version, runtime:{...runtimeIdentity,busy:runtimeBusy(),activation:updateStatus.activation??{status:updateStatus.status}},update:updateStatus,host, workspace:root, workspace_layout:'<workspace>/<name>', platform:platform.base, engine:project?.engine ?? selected?.engine ?? null, supported_engines:Object.keys(engines),
227
- context_binding:project?.context_binding,
239
+ context_binding:project?.context_binding,project_install:project?.project_install,
228
240
  version_status:project?.version_status,integrity:project?.integrity,preparation:project?.preparation,registration_required:project?.registration_required,occupancy,project_context:project?.project_context,
229
241
  project:project?.project, preview:project ? await previews.status(project.project) : undefined,
230
242
  llm:'external AI IDE host', images:'Craft platform', aigc:assetCapabilities(selected?.engine),library:libraryCapabilities(selected?.engine),draft_upload:true,publish_in_web:true,
@@ -250,7 +262,17 @@ server.setRequestHandler(CallToolRequestSchema,async request=>{
250
262
  }
251
263
  case 'craft_game_release': {
252
264
  if(mutations.has(args.name) || tasks.busy(args.name)) throw new Error('Background work is running; wait or cancel and wait for cleanup before release');
253
- result=await leases.release(args.name,args.work_id); break;
265
+ result=await leases.release(args.name,args.work_id);
266
+ // Maintenance belongs to an awaited end-of-work operation, never a
267
+ // handshake, read-only query, shutdown callback or detached timer.
268
+ if(runtimeConnection && runtimeBusy().can_reconnect) {
269
+ const maintenance=runtimeConnection.collect();
270
+ runtimeMaintenance=maintenance;
271
+ try { await maintenance; }
272
+ catch { process.stderr.write('[craft] Runtime cleanup skipped; released work remains complete.\n'); }
273
+ finally { if(runtimeMaintenance===maintenance) runtimeMaintenance=undefined; }
274
+ }
275
+ break;
254
276
  }
255
277
  case 'craft_assets_generate': {
256
278
  const inputs=generationInputs(args);
@@ -304,8 +326,10 @@ server.setRequestHandler(CallToolRequestSchema,async request=>{
304
326
  break;
305
327
  }
306
328
  case 'craft_game_review': {
307
- const { task } = await checkedTask(args.task_id);
308
- const content = [{ type:'text',text:JSON.stringify({ task_id:args.task_id, review:'Inspect every screenshot. Report visual_passed and concrete findings; a browser pass alone is not visual acceptance.' }) }];
329
+ const { task } = await completedCheck(args.task_id);
330
+ const review = task.result.screenshots.length ? 'Inspect every available screenshot. Report visual_passed and concrete findings; a browser pass alone is not visual acceptance.' :
331
+ 'No screenshots were captured. Report the capture issues from craft_task_status.';
332
+ const content = [{ type:'text',text:JSON.stringify({ task_id:args.task_id, review }) }];
309
333
  for (const file of task.result.screenshots) {
310
334
  const data = await readFile(file); if (data.length > 4 * 1024 * 1024) throw new Error('Screenshot too large');
311
335
  content.push({ type:'image',mimeType:'image/jpeg',data:data.toString('base64') });
@@ -313,7 +337,8 @@ server.setRequestHandler(CallToolRequestSchema,async request=>{
313
337
  reviewed.add(args.task_id); return { content };
314
338
  }
315
339
  case 'craft_game_deliver': {
316
- const { task,project } = await checkedTask(args.task_id);
340
+ const { task,project } = await completedCheck(args.task_id);
341
+ if (!task.result.gate?.passed) throw new Error('A passing game check is required for a verified preview');
317
342
  if (!reviewed.has(args.task_id) || args.visual_passed !== true || args.visual_notes.trim().length < 10 || args.visual_notes.length > 2000) throw new Error('Read and review the screenshots before delivery');
318
343
  result = { ...await previews.prepare(project,task.result.artifacts), project, name:task.name, check_task_id:args.task_id, visual_notes:args.visual_notes }; break;
319
344
  }
@@ -322,7 +347,7 @@ server.setRequestHandler(CallToolRequestSchema,async request=>{
322
347
  if (!status.authenticated) { result = loginAction(); break; }
323
348
  // An already authorized upload resumes its frozen check, even after later source edits.
324
349
  const resume = await drafts.hasRequest(args.name,args.check_task_id,status.user_id,args);
325
- const { task } = await checkedTask(args.check_task_id,args.name,resume);
350
+ const { task } = await completedCheck(args.check_task_id,args.name,resume);
326
351
  result = viewTask(await tasks.start(args.name,'upload',signal=>drafts.upload(task,status.user_id,signal,args),
327
352
  { owner:status.user_id, platform:platform.base, check_task_id:args.check_task_id,upload_mode:args.upload_mode ?? 'current_project',request_key:args.request_key }));
328
353
  break;
@@ -365,6 +390,7 @@ function shutdown() {
365
390
  shutdownPromise=(async()=>{
366
391
  await updates.close();
367
392
  await connectionReady.catch(()=>{});
393
+ await runtimeMaintenance?.catch(()=>{});
368
394
  await tasks.close(); await leases.close(); await panel.close(); await server.close();
369
395
  try { await runtimeConnection?.close(); }
370
396
  catch { process.stderr.write('[craft] Runtime cleanup skipped during shutdown.\n'); }