@craft_eco/craft-mcp 0.1.28 → 0.1.29

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 (980) hide show
  1. package/README.md +23 -17
  2. package/bin/craft-mcp.mjs +4 -1
  3. package/dist-server/game-workflow/asset-import.mjs +5 -1
  4. package/dist-server/game-workflow/assets.mjs +6 -2
  5. package/dist-server/game-workflow/bundle-files.mjs +9 -6
  6. package/dist-server/game-workflow/check.mjs +5 -0
  7. package/dist-server/game-workflow/context-state.mjs +67 -0
  8. package/dist-server/game-workflow/draft-uploads.mjs +3 -0
  9. package/dist-server/game-workflow/engines.mjs +3 -3
  10. package/dist-server/game-workflow/library-assets.mjs +2 -1
  11. package/dist-server/game-workflow/local-context.mjs +62 -0
  12. package/dist-server/game-workflow/native-context.mjs +289 -0
  13. package/dist-server/game-workflow/project-bundles.mjs +246 -129
  14. package/dist-server/game-workflow/project-context.mjs +183 -45
  15. package/dist-server/game-workflow/project-leases.mjs +101 -30
  16. package/dist-server/game-workflow/projects.mjs +86 -10
  17. package/dist-server/game-workflow/publications.mjs +5 -1
  18. package/dist-server/game-workflow/tasks.mjs +6 -1
  19. package/dist-server/game-workflow/work-scope.mjs +7 -0
  20. package/dist-server/integrations/config.mjs +145 -71
  21. package/dist-server/integrations/connection-handoff.mjs +42 -0
  22. package/dist-server/integrations/dsh-config.mjs +182 -0
  23. package/dist-server/integrations/files.mjs +54 -54
  24. package/dist-server/integrations/hosts.mjs +55 -35
  25. package/dist-server/integrations/install.mjs +205 -86
  26. package/dist-server/integrations/installation-state.mjs +84 -0
  27. package/dist-server/integrations/runtime-gc.mjs +188 -0
  28. package/dist-server/integrations/runtime.mjs +126 -72
  29. package/dist-server/integrations/updates.mjs +225 -0
  30. package/dist-server/integrations/version-policy.mjs +32 -0
  31. package/dist-server/mcp/control-panel.mjs +5 -2
  32. package/dist-server/mcp/publish-panel.mjs +7 -2
  33. package/dist-server/mcp/server.mjs +134 -26
  34. package/dist-server/mcp/start.mjs +8 -2
  35. package/dist-server/mcp/update-session.mjs +92 -0
  36. package/package.json +2 -2
  37. package/resources/context-filter-report.json +177 -0
  38. package/resources/craft-create/SKILL.md +19 -11
  39. package/resources/craft-update/SKILL.md +25 -0
  40. package/resources/targets/claude/js/bootstrap/SKILL.md +18 -0
  41. package/resources/targets/claude/js/context-filter-report.json +27 -0
  42. package/resources/targets/claude/js/craft-game-maker/SKILL.md +76 -0
  43. package/resources/targets/claude/js/craft-game-maker/js.md +10 -0
  44. package/resources/targets/claude/js/js/bundle.json +97 -0
  45. package/resources/targets/claude/js/js/context/AGENTS.md +29 -0
  46. package/resources/targets/claude/js/js/context/hooks/hooks.json +14 -0
  47. package/resources/targets/claude/js/js/context/knowledge/AssetUrl.md +9 -0
  48. package/resources/targets/claude/js/js/context/knowledge/AssetWiring.md +7 -0
  49. package/resources/targets/claude/js/js/context/knowledge/Layout.md +7 -0
  50. package/resources/targets/claude/js/js/context/knowledge/Lifecycle.md +11 -0
  51. package/resources/targets/claude/js/js/context/knowledge/ResourceLoading.md +9 -0
  52. package/resources/targets/claude/js/js/context/skills/export-config/SKILL.md +16 -0
  53. package/resources/targets/claude/js/js/context/skills/export-config/assets/tooling/cli.mjs +20 -0
  54. package/resources/targets/claude/js/js/context/skills/export-config/assets/tooling/config.d.mts +19 -0
  55. package/resources/targets/claude/js/js/context/skills/export-config/assets/tooling/config.mjs +1 -0
  56. package/resources/targets/claude/js/js/context/skills/export-config/assets/tooling/project.d.mts +6 -0
  57. package/resources/targets/claude/js/js/context/skills/export-config/assets/tooling/project.mjs +77 -0
  58. package/resources/targets/claude/js/js/context/skills/export-config/assets/tooling/vite.d.mts +2 -0
  59. package/resources/targets/claude/js/js/context/skills/export-config/assets/tooling/vite.mjs +34 -0
  60. package/resources/targets/claude/js/js/context/skills/export-config/scripts/export-config.mjs +4 -0
  61. package/resources/targets/claude/js/js/context/skills/export-config/scripts/install.mjs +89 -0
  62. package/resources/targets/claude/js/js/context/skills/export-config/scripts/panel-resource-path.mjs +106 -0
  63. package/resources/targets/claude/js/js/context/skills/index.json +19 -0
  64. package/resources/targets/claude/js/js/context/skills/visual-qa/SKILL.md +14 -0
  65. package/resources/targets/claude/js/js/project/README.md +7 -0
  66. package/resources/targets/claude/js/js/project/configs/assets.json +1 -0
  67. package/resources/targets/claude/js/js/project/configs/game.controls.json +3 -0
  68. package/resources/targets/claude/js/js/project/configs/game.json +3 -0
  69. package/resources/targets/claude/js/js/project/game-runtime.json +7 -0
  70. package/resources/targets/claude/js/js/project/game.config.json +7 -0
  71. package/resources/targets/claude/js/js/project/index.html +20 -0
  72. package/resources/targets/claude/js/js/project/package.json +22 -0
  73. package/resources/targets/claude/js/js/project/runtime/lightgame/1.1.0/platform/identity/qq-ai-game-sdk.min.js +5 -0
  74. package/resources/targets/claude/js/js/project/runtime/lightgame/1.1.0/platform/identity/qq-session.mjs +208 -0
  75. package/resources/targets/claude/js/js/project/runtime/lightgame/1.1.0/platform/identity/shared.mjs +37 -0
  76. package/resources/targets/claude/js/js/project/runtime/lightgame/1.1.0/platform/platform-capture-video.mjs +227 -0
  77. package/resources/targets/claude/js/js/project/runtime/lightgame/1.1.0/platform/platform-service.d.mts +31 -0
  78. package/resources/targets/claude/js/js/project/runtime/lightgame/1.1.0/platform/platform-service.mjs +272 -0
  79. package/resources/targets/claude/js/js/project/runtime/lightgame/1.1.0/platform/platform.d.mts +79 -0
  80. package/resources/targets/claude/js/js/project/runtime/lightgame/1.1.0/platform/platform.mjs +29 -0
  81. package/resources/targets/claude/js/js/project/runtime/lightgame/1.1.0/release.json +22 -0
  82. package/resources/targets/claude/js/js/project/runtime/lightgame/1.1.0/tooling/cli.mjs +16 -0
  83. package/resources/targets/claude/js/js/project/runtime/lightgame/1.1.0/tooling/project.d.mts +4 -0
  84. package/resources/targets/claude/js/js/project/runtime/lightgame/1.1.0/tooling/project.mjs +50 -0
  85. package/resources/targets/claude/js/js/project/runtime/lightgame/1.1.0/tooling/vite.d.mts +3 -0
  86. package/resources/targets/claude/js/js/project/runtime/lightgame/1.1.0/tooling/vite.mjs +72 -0
  87. package/resources/targets/claude/js/js/project/runtime/lightgame/1.1.0/tools/assets.d.mts +24 -0
  88. package/resources/targets/claude/js/js/project/runtime/lightgame/1.1.0/tools/assets.mjs +2 -0
  89. package/resources/targets/claude/js/js/project/runtime/lightgame/1.1.0/tools/astc.d.mts +10 -0
  90. package/resources/targets/claude/js/js/project/runtime/lightgame/1.1.0/tools/astc.mjs +1 -0
  91. package/resources/targets/claude/js/js/project/scripts/config-export/assert-asset-wiring.mjs +72 -0
  92. package/resources/targets/claude/js/js/project/scripts/config-export/panel-resource-path.mjs +106 -0
  93. package/resources/targets/claude/js/js/project/scripts/config-export/sync-asset-controls.mjs +316 -0
  94. package/resources/targets/claude/js/js/project/scripts/config-export.mjs +13 -0
  95. package/resources/targets/claude/js/js/project/scripts/skill-modules/export-config/cli.mjs +20 -0
  96. package/resources/targets/claude/js/js/project/scripts/skill-modules/export-config/config.d.mts +19 -0
  97. package/resources/targets/claude/js/js/project/scripts/skill-modules/export-config/config.mjs +1 -0
  98. package/resources/targets/claude/js/js/project/scripts/skill-modules/export-config/installed.json +6 -0
  99. package/resources/targets/claude/js/js/project/scripts/skill-modules/export-config/project.d.mts +6 -0
  100. package/resources/targets/claude/js/js/project/scripts/skill-modules/export-config/project.mjs +77 -0
  101. package/resources/targets/claude/js/js/project/scripts/skill-modules/export-config/vite.d.mts +2 -0
  102. package/resources/targets/claude/js/js/project/scripts/skill-modules/export-config/vite.mjs +34 -0
  103. package/resources/targets/claude/js/js/project/scripts/write-preview-ready.mjs +22 -0
  104. package/resources/targets/claude/js/js/project/src/display/ui-stage.ts +156 -0
  105. package/resources/targets/claude/js/js/project/src/display/viewport.ts +249 -0
  106. package/resources/targets/claude/js/js/project/src/main.ts +87 -0
  107. package/resources/targets/claude/js/js/project/src/platform.ts +2 -0
  108. package/resources/targets/claude/js/js/project/src/scenes/LoadScene.ts +89 -0
  109. package/resources/targets/claude/js/js/project/src/scenes/PlayScene.ts +17 -0
  110. package/resources/targets/claude/js/js/project/src/screenUi.ts +185 -0
  111. package/resources/targets/claude/js/js/project/src/style.css +294 -0
  112. package/resources/targets/claude/js/js/project/tsconfig.json +20 -0
  113. package/resources/targets/claude/js/js/project/unified_data_control_config.json +20 -0
  114. package/resources/targets/claude/js/js/project/vite.config.ts +5 -0
  115. package/resources/targets/claude/js/recovery.md +13 -0
  116. package/resources/targets/claude/js/target.json +61 -0
  117. package/resources/targets/claude/js3d/bootstrap/SKILL.md +18 -0
  118. package/resources/targets/claude/js3d/context-filter-report.json +27 -0
  119. package/resources/targets/claude/js3d/craft-game-maker/SKILL.md +76 -0
  120. package/resources/targets/claude/js3d/craft-game-maker/js3d.md +12 -0
  121. package/resources/targets/claude/js3d/js3d/bundle.json +108 -0
  122. package/resources/targets/claude/js3d/js3d/context/AGENTS.md +30 -0
  123. package/resources/targets/claude/js3d/js3d/context/hooks/hooks.json +14 -0
  124. package/resources/targets/claude/js3d/js3d/context/knowledge/AssetUrl.md +9 -0
  125. package/resources/targets/claude/js3d/js3d/context/knowledge/AssetWiring.md +7 -0
  126. package/resources/targets/claude/js3d/js3d/context/knowledge/CodingGuide/Pitfalls.md +11 -0
  127. package/resources/targets/claude/js3d/js3d/context/knowledge/Layout.md +7 -0
  128. package/resources/targets/{workbuddy/js3d/js3d/context/skills/asset-search/references/resource-config.md → claude/js3d/js3d/context/knowledge/ResourceLoading.md} +2 -2
  129. package/resources/targets/claude/js3d/js3d/context/knowledge/Runtime.md +9 -0
  130. package/resources/targets/claude/js3d/js3d/context/skills/asset-usage-audit/SKILL.md +16 -0
  131. package/resources/targets/claude/js3d/js3d/context/skills/asset-usage-audit/scripts/compare-animations.mjs +48 -0
  132. package/resources/targets/claude/js3d/js3d/context/skills/asset-usage-audit/scripts/lib/anim.mjs +266 -0
  133. package/resources/targets/claude/js3d/js3d/context/skills/asset-usage-audit/scripts/lib/glb.mjs +241 -0
  134. package/resources/targets/claude/js3d/js3d/context/skills/asset-usage-audit/scripts/lib/scan.mjs +455 -0
  135. package/resources/targets/claude/js3d/js3d/context/skills/asset-usage-audit/scripts/scan-assets.mjs +77 -0
  136. package/resources/targets/claude/js3d/js3d/context/skills/export-config/SKILL.md +16 -0
  137. package/resources/targets/claude/js3d/js3d/context/skills/export-config/assets/tooling/cli.mjs +20 -0
  138. package/resources/targets/claude/js3d/js3d/context/skills/export-config/assets/tooling/config.d.mts +19 -0
  139. package/resources/targets/claude/js3d/js3d/context/skills/export-config/assets/tooling/config.mjs +1 -0
  140. package/resources/targets/claude/js3d/js3d/context/skills/export-config/assets/tooling/project.d.mts +6 -0
  141. package/resources/targets/claude/js3d/js3d/context/skills/export-config/assets/tooling/project.mjs +77 -0
  142. package/resources/targets/claude/js3d/js3d/context/skills/export-config/assets/tooling/vite.d.mts +2 -0
  143. package/resources/targets/claude/js3d/js3d/context/skills/export-config/assets/tooling/vite.mjs +34 -0
  144. package/resources/targets/claude/js3d/js3d/context/skills/export-config/scripts/export-config.mjs +4 -0
  145. package/resources/targets/claude/js3d/js3d/context/skills/export-config/scripts/install.mjs +89 -0
  146. package/resources/targets/claude/js3d/js3d/context/skills/export-config/scripts/panel-resource-path.mjs +106 -0
  147. package/resources/targets/claude/js3d/js3d/context/skills/index.json +31 -0
  148. package/resources/targets/claude/js3d/js3d/context/skills/performance-audit/SKILL.md +21 -0
  149. package/resources/targets/claude/js3d/js3d/context/skills/performance-audit/scripts/lib/rules.mjs +470 -0
  150. package/resources/targets/claude/js3d/js3d/context/skills/performance-audit/scripts/lib/scan.mjs +387 -0
  151. package/resources/targets/claude/js3d/js3d/context/skills/performance-audit/scripts/lib/source.mjs +398 -0
  152. package/resources/targets/claude/js3d/js3d/context/skills/performance-audit/scripts/scan-perf.mjs +130 -0
  153. package/resources/targets/claude/js3d/js3d/context/skills/visual-qa/SKILL.md +14 -0
  154. package/resources/targets/claude/js3d/js3d/project/README.md +7 -0
  155. package/resources/targets/claude/js3d/js3d/project/configs/game.controls.json +3 -0
  156. package/resources/targets/claude/js3d/js3d/project/configs/game.json +3 -0
  157. package/resources/targets/claude/js3d/js3d/project/game-runtime.json +7 -0
  158. package/resources/targets/claude/js3d/js3d/project/game.config.json +7 -0
  159. package/resources/targets/claude/js3d/js3d/project/index.html +12 -0
  160. package/resources/targets/claude/js3d/js3d/project/package.json +23 -0
  161. package/resources/targets/claude/js3d/js3d/project/runtime/lightgame/1.1.0/platform/identity/qq-ai-game-sdk.min.js +5 -0
  162. package/resources/targets/claude/js3d/js3d/project/runtime/lightgame/1.1.0/platform/identity/qq-session.mjs +208 -0
  163. package/resources/targets/claude/js3d/js3d/project/runtime/lightgame/1.1.0/platform/identity/shared.mjs +37 -0
  164. package/resources/targets/claude/js3d/js3d/project/runtime/lightgame/1.1.0/platform/platform-capture-video.mjs +227 -0
  165. package/resources/targets/claude/js3d/js3d/project/runtime/lightgame/1.1.0/platform/platform-service.d.mts +31 -0
  166. package/resources/targets/claude/js3d/js3d/project/runtime/lightgame/1.1.0/platform/platform-service.mjs +272 -0
  167. package/resources/targets/claude/js3d/js3d/project/runtime/lightgame/1.1.0/platform/platform.d.mts +79 -0
  168. package/resources/targets/claude/js3d/js3d/project/runtime/lightgame/1.1.0/platform/platform.mjs +30 -0
  169. package/resources/targets/claude/js3d/js3d/project/runtime/lightgame/1.1.0/release.json +24 -0
  170. package/resources/targets/claude/js3d/js3d/project/runtime/lightgame/1.1.0/tooling/cli.mjs +16 -0
  171. package/resources/targets/claude/js3d/js3d/project/runtime/lightgame/1.1.0/tooling/project.d.mts +4 -0
  172. package/resources/targets/claude/js3d/js3d/project/runtime/lightgame/1.1.0/tooling/project.mjs +50 -0
  173. package/resources/targets/claude/js3d/js3d/project/runtime/lightgame/1.1.0/tooling/vite.d.mts +3 -0
  174. package/resources/targets/claude/js3d/js3d/project/runtime/lightgame/1.1.0/tooling/vite.mjs +72 -0
  175. package/resources/targets/claude/js3d/js3d/project/runtime/lightgame/1.1.0/tools/assets.d.mts +24 -0
  176. package/resources/targets/claude/js3d/js3d/project/runtime/lightgame/1.1.0/tools/assets.mjs +2 -0
  177. package/resources/targets/claude/js3d/js3d/project/runtime/lightgame/1.1.0/tools/astc.d.mts +10 -0
  178. package/resources/targets/claude/js3d/js3d/project/runtime/lightgame/1.1.0/tools/astc.mjs +1 -0
  179. package/resources/targets/claude/js3d/js3d/project/runtime/lightgame/1.1.0/tools/glb.d.mts +26 -0
  180. package/resources/targets/claude/js3d/js3d/project/runtime/lightgame/1.1.0/tools/glb.mjs +351 -0
  181. package/resources/targets/claude/js3d/js3d/project/scripts/config-export/assert-asset-wiring.mjs +97 -0
  182. package/resources/targets/claude/js3d/js3d/project/scripts/config-export/panel-resource-path.mjs +106 -0
  183. package/resources/targets/claude/js3d/js3d/project/scripts/config-export/sync-asset-controls.mjs +327 -0
  184. package/resources/targets/claude/js3d/js3d/project/scripts/config-export/sync-scene-assets.mjs +191 -0
  185. package/resources/targets/claude/js3d/js3d/project/scripts/config-export.mjs +15 -0
  186. package/resources/targets/claude/js3d/js3d/project/scripts/skill-modules/export-config/cli.mjs +20 -0
  187. package/resources/targets/claude/js3d/js3d/project/scripts/skill-modules/export-config/config.d.mts +19 -0
  188. package/resources/targets/claude/js3d/js3d/project/scripts/skill-modules/export-config/config.mjs +1 -0
  189. package/resources/targets/claude/js3d/js3d/project/scripts/skill-modules/export-config/installed.json +6 -0
  190. package/resources/targets/claude/js3d/js3d/project/scripts/skill-modules/export-config/project.d.mts +6 -0
  191. package/resources/targets/claude/js3d/js3d/project/scripts/skill-modules/export-config/project.mjs +77 -0
  192. package/resources/targets/claude/js3d/js3d/project/scripts/skill-modules/export-config/vite.d.mts +2 -0
  193. package/resources/targets/claude/js3d/js3d/project/scripts/skill-modules/export-config/vite.mjs +34 -0
  194. package/resources/targets/claude/js3d/js3d/project/scripts/write-preview-ready.mjs +22 -0
  195. package/resources/targets/claude/js3d/js3d/project/src/display/ui-stage.ts +156 -0
  196. package/resources/targets/claude/js3d/js3d/project/src/display/viewport.ts +239 -0
  197. package/resources/targets/claude/js3d/js3d/project/src/main.ts +85 -0
  198. package/resources/targets/claude/js3d/js3d/project/src/platform.ts +2 -0
  199. package/resources/targets/claude/js3d/js3d/project/src/style.css +83 -0
  200. package/resources/targets/claude/js3d/js3d/project/tsconfig.json +20 -0
  201. package/resources/targets/claude/js3d/js3d/project/unified_data_control_config.json +20 -0
  202. package/resources/targets/claude/js3d/js3d/project/vite.config.ts +5 -0
  203. package/resources/targets/claude/js3d/recovery.md +13 -0
  204. package/resources/targets/claude/js3d/target.json +60 -0
  205. package/resources/targets/codebuddy/js/bootstrap/SKILL.md +5 -1
  206. package/resources/targets/codebuddy/js/context-filter-report.json +27 -0
  207. package/resources/targets/codebuddy/js/craft-game-maker/SKILL.md +18 -19
  208. package/resources/targets/codebuddy/js/craft-game-maker/js.md +2 -2
  209. package/resources/targets/codebuddy/js/js/bundle.json +16 -18
  210. package/resources/targets/codebuddy/js/js/context/AGENTS.md +10 -6
  211. package/resources/targets/codebuddy/js/js/context/knowledge/AssetUrl.md +4 -4
  212. package/resources/targets/codebuddy/js/js/context/knowledge/AssetWiring.md +7 -0
  213. package/resources/targets/codebuddy/js/js/context/knowledge/ResourceLoading.md +9 -0
  214. package/resources/targets/codebuddy/js/js/context/skills/export-config/SKILL.md +2 -2
  215. package/resources/targets/codebuddy/js/js/context/skills/index.json +2 -14
  216. package/resources/targets/codebuddy/js/js/context/skills/visual-qa/SKILL.md +1 -1
  217. package/resources/targets/codebuddy/js/recovery.md +10 -4
  218. package/resources/targets/codebuddy/js/target.json +1 -1
  219. package/resources/targets/codebuddy/js3d/bootstrap/SKILL.md +5 -1
  220. package/resources/targets/codebuddy/js3d/context-filter-report.json +27 -0
  221. package/resources/targets/codebuddy/js3d/craft-game-maker/SKILL.md +18 -19
  222. package/resources/targets/codebuddy/js3d/craft-game-maker/js3d.md +3 -4
  223. package/resources/targets/codebuddy/js3d/js3d/bundle.json +19 -21
  224. package/resources/targets/codebuddy/js3d/js3d/context/AGENTS.md +10 -6
  225. package/resources/targets/codebuddy/js3d/js3d/context/knowledge/AssetUrl.md +4 -4
  226. package/resources/targets/codebuddy/js3d/js3d/context/knowledge/AssetWiring.md +7 -0
  227. package/resources/targets/{codex/js3d/js3d/context/skills/asset-search/references/resource-config.md → codebuddy/js3d/js3d/context/knowledge/ResourceLoading.md} +2 -2
  228. package/resources/targets/codebuddy/js3d/js3d/context/skills/asset-usage-audit/SKILL.md +1 -1
  229. package/resources/targets/codebuddy/js3d/js3d/context/skills/asset-usage-audit/scripts/lib/scan.mjs +2 -2
  230. package/resources/targets/codebuddy/js3d/js3d/context/skills/export-config/SKILL.md +2 -2
  231. package/resources/targets/codebuddy/js3d/js3d/context/skills/index.json +4 -16
  232. package/resources/targets/codebuddy/js3d/js3d/context/skills/performance-audit/SKILL.md +1 -1
  233. package/resources/targets/codebuddy/js3d/js3d/context/skills/visual-qa/SKILL.md +1 -1
  234. package/resources/targets/codebuddy/js3d/recovery.md +10 -4
  235. package/resources/targets/codebuddy/js3d/target.json +1 -1
  236. package/resources/targets/codex/js/bootstrap/SKILL.md +9 -1
  237. package/resources/targets/codex/js/context-filter-report.json +27 -0
  238. package/resources/targets/codex/js/craft-game-maker/SKILL.md +18 -19
  239. package/resources/targets/codex/js/craft-game-maker/js.md +2 -2
  240. package/resources/targets/codex/js/js/bundle.json +16 -18
  241. package/resources/targets/codex/js/js/context/AGENTS.md +10 -6
  242. package/resources/targets/codex/js/js/context/knowledge/AssetUrl.md +4 -4
  243. package/resources/targets/codex/js/js/context/knowledge/AssetWiring.md +7 -0
  244. package/resources/targets/codex/js/js/context/knowledge/ResourceLoading.md +9 -0
  245. package/resources/targets/codex/js/js/context/skills/export-config/SKILL.md +2 -2
  246. package/resources/targets/codex/js/js/context/skills/index.json +2 -14
  247. package/resources/targets/codex/js/js/context/skills/visual-qa/SKILL.md +1 -1
  248. package/resources/targets/codex/js/recovery.md +14 -4
  249. package/resources/targets/codex/js/target.json +1 -1
  250. package/resources/targets/codex/js3d/bootstrap/SKILL.md +9 -1
  251. package/resources/targets/codex/js3d/context-filter-report.json +27 -0
  252. package/resources/targets/codex/js3d/craft-game-maker/SKILL.md +18 -19
  253. package/resources/targets/codex/js3d/craft-game-maker/js3d.md +3 -4
  254. package/resources/targets/codex/js3d/js3d/bundle.json +19 -21
  255. package/resources/targets/codex/js3d/js3d/context/AGENTS.md +10 -6
  256. package/resources/targets/codex/js3d/js3d/context/knowledge/AssetUrl.md +4 -4
  257. package/resources/targets/codex/js3d/js3d/context/knowledge/AssetWiring.md +7 -0
  258. package/resources/targets/{codebuddy/js3d/js3d/context/skills/asset-search/references/resource-config.md → codex/js3d/js3d/context/knowledge/ResourceLoading.md} +2 -2
  259. package/resources/targets/codex/js3d/js3d/context/skills/asset-usage-audit/SKILL.md +1 -1
  260. package/resources/targets/codex/js3d/js3d/context/skills/asset-usage-audit/scripts/lib/scan.mjs +2 -2
  261. package/resources/targets/codex/js3d/js3d/context/skills/export-config/SKILL.md +2 -2
  262. package/resources/targets/codex/js3d/js3d/context/skills/index.json +4 -16
  263. package/resources/targets/codex/js3d/js3d/context/skills/performance-audit/SKILL.md +1 -1
  264. package/resources/targets/codex/js3d/js3d/context/skills/visual-qa/SKILL.md +1 -1
  265. package/resources/targets/codex/js3d/recovery.md +14 -4
  266. package/resources/targets/codex/js3d/target.json +1 -1
  267. package/resources/targets/cursor/js/bootstrap/SKILL.md +18 -0
  268. package/resources/targets/cursor/js/context-filter-report.json +27 -0
  269. package/resources/targets/cursor/js/craft-game-maker/SKILL.md +76 -0
  270. package/resources/targets/cursor/js/craft-game-maker/js.md +10 -0
  271. package/resources/targets/cursor/js/js/bundle.json +97 -0
  272. package/resources/targets/cursor/js/js/context/AGENTS.md +29 -0
  273. package/resources/targets/cursor/js/js/context/hooks/hooks.json +14 -0
  274. package/resources/targets/cursor/js/js/context/knowledge/AssetUrl.md +9 -0
  275. package/resources/targets/cursor/js/js/context/knowledge/AssetWiring.md +7 -0
  276. package/resources/targets/cursor/js/js/context/knowledge/Layout.md +7 -0
  277. package/resources/targets/cursor/js/js/context/knowledge/Lifecycle.md +11 -0
  278. package/resources/targets/cursor/js/js/context/knowledge/ResourceLoading.md +9 -0
  279. package/resources/targets/cursor/js/js/context/skills/export-config/SKILL.md +16 -0
  280. package/resources/targets/cursor/js/js/context/skills/export-config/assets/tooling/cli.mjs +20 -0
  281. package/resources/targets/cursor/js/js/context/skills/export-config/assets/tooling/config.d.mts +19 -0
  282. package/resources/targets/cursor/js/js/context/skills/export-config/assets/tooling/config.mjs +1 -0
  283. package/resources/targets/cursor/js/js/context/skills/export-config/assets/tooling/project.d.mts +6 -0
  284. package/resources/targets/cursor/js/js/context/skills/export-config/assets/tooling/project.mjs +77 -0
  285. package/resources/targets/cursor/js/js/context/skills/export-config/assets/tooling/vite.d.mts +2 -0
  286. package/resources/targets/cursor/js/js/context/skills/export-config/assets/tooling/vite.mjs +34 -0
  287. package/resources/targets/cursor/js/js/context/skills/export-config/scripts/export-config.mjs +4 -0
  288. package/resources/targets/cursor/js/js/context/skills/export-config/scripts/install.mjs +89 -0
  289. package/resources/targets/cursor/js/js/context/skills/export-config/scripts/panel-resource-path.mjs +106 -0
  290. package/resources/targets/cursor/js/js/context/skills/index.json +19 -0
  291. package/resources/targets/cursor/js/js/context/skills/visual-qa/SKILL.md +14 -0
  292. package/resources/targets/cursor/js/js/project/README.md +7 -0
  293. package/resources/targets/cursor/js/js/project/configs/assets.json +1 -0
  294. package/resources/targets/cursor/js/js/project/configs/game.controls.json +3 -0
  295. package/resources/targets/cursor/js/js/project/configs/game.json +3 -0
  296. package/resources/targets/cursor/js/js/project/game-runtime.json +7 -0
  297. package/resources/targets/cursor/js/js/project/game.config.json +7 -0
  298. package/resources/targets/cursor/js/js/project/index.html +20 -0
  299. package/resources/targets/cursor/js/js/project/package.json +22 -0
  300. package/resources/targets/cursor/js/js/project/runtime/lightgame/1.1.0/platform/identity/qq-ai-game-sdk.min.js +5 -0
  301. package/resources/targets/cursor/js/js/project/runtime/lightgame/1.1.0/platform/identity/qq-session.mjs +208 -0
  302. package/resources/targets/cursor/js/js/project/runtime/lightgame/1.1.0/platform/identity/shared.mjs +37 -0
  303. package/resources/targets/cursor/js/js/project/runtime/lightgame/1.1.0/platform/platform-capture-video.mjs +227 -0
  304. package/resources/targets/cursor/js/js/project/runtime/lightgame/1.1.0/platform/platform-service.d.mts +31 -0
  305. package/resources/targets/cursor/js/js/project/runtime/lightgame/1.1.0/platform/platform-service.mjs +272 -0
  306. package/resources/targets/cursor/js/js/project/runtime/lightgame/1.1.0/platform/platform.d.mts +79 -0
  307. package/resources/targets/cursor/js/js/project/runtime/lightgame/1.1.0/platform/platform.mjs +29 -0
  308. package/resources/targets/cursor/js/js/project/runtime/lightgame/1.1.0/release.json +22 -0
  309. package/resources/targets/cursor/js/js/project/runtime/lightgame/1.1.0/tooling/cli.mjs +16 -0
  310. package/resources/targets/cursor/js/js/project/runtime/lightgame/1.1.0/tooling/project.d.mts +4 -0
  311. package/resources/targets/cursor/js/js/project/runtime/lightgame/1.1.0/tooling/project.mjs +50 -0
  312. package/resources/targets/cursor/js/js/project/runtime/lightgame/1.1.0/tooling/vite.d.mts +3 -0
  313. package/resources/targets/cursor/js/js/project/runtime/lightgame/1.1.0/tooling/vite.mjs +72 -0
  314. package/resources/targets/cursor/js/js/project/runtime/lightgame/1.1.0/tools/assets.d.mts +24 -0
  315. package/resources/targets/cursor/js/js/project/runtime/lightgame/1.1.0/tools/assets.mjs +2 -0
  316. package/resources/targets/cursor/js/js/project/runtime/lightgame/1.1.0/tools/astc.d.mts +10 -0
  317. package/resources/targets/cursor/js/js/project/runtime/lightgame/1.1.0/tools/astc.mjs +1 -0
  318. package/resources/targets/cursor/js/js/project/scripts/config-export/assert-asset-wiring.mjs +72 -0
  319. package/resources/targets/cursor/js/js/project/scripts/config-export/panel-resource-path.mjs +106 -0
  320. package/resources/targets/cursor/js/js/project/scripts/config-export/sync-asset-controls.mjs +316 -0
  321. package/resources/targets/cursor/js/js/project/scripts/config-export.mjs +13 -0
  322. package/resources/targets/cursor/js/js/project/scripts/skill-modules/export-config/cli.mjs +20 -0
  323. package/resources/targets/cursor/js/js/project/scripts/skill-modules/export-config/config.d.mts +19 -0
  324. package/resources/targets/cursor/js/js/project/scripts/skill-modules/export-config/config.mjs +1 -0
  325. package/resources/targets/cursor/js/js/project/scripts/skill-modules/export-config/installed.json +6 -0
  326. package/resources/targets/cursor/js/js/project/scripts/skill-modules/export-config/project.d.mts +6 -0
  327. package/resources/targets/cursor/js/js/project/scripts/skill-modules/export-config/project.mjs +77 -0
  328. package/resources/targets/cursor/js/js/project/scripts/skill-modules/export-config/vite.d.mts +2 -0
  329. package/resources/targets/cursor/js/js/project/scripts/skill-modules/export-config/vite.mjs +34 -0
  330. package/resources/targets/cursor/js/js/project/scripts/write-preview-ready.mjs +22 -0
  331. package/resources/targets/cursor/js/js/project/src/display/ui-stage.ts +156 -0
  332. package/resources/targets/cursor/js/js/project/src/display/viewport.ts +249 -0
  333. package/resources/targets/cursor/js/js/project/src/main.ts +87 -0
  334. package/resources/targets/cursor/js/js/project/src/platform.ts +2 -0
  335. package/resources/targets/cursor/js/js/project/src/scenes/LoadScene.ts +89 -0
  336. package/resources/targets/cursor/js/js/project/src/scenes/PlayScene.ts +17 -0
  337. package/resources/targets/cursor/js/js/project/src/screenUi.ts +185 -0
  338. package/resources/targets/cursor/js/js/project/src/style.css +294 -0
  339. package/resources/targets/cursor/js/js/project/tsconfig.json +20 -0
  340. package/resources/targets/cursor/js/js/project/unified_data_control_config.json +20 -0
  341. package/resources/targets/cursor/js/js/project/vite.config.ts +5 -0
  342. package/resources/targets/cursor/js/recovery.md +13 -0
  343. package/resources/targets/cursor/js/target.json +61 -0
  344. package/resources/targets/cursor/js3d/bootstrap/SKILL.md +18 -0
  345. package/resources/targets/cursor/js3d/context-filter-report.json +27 -0
  346. package/resources/targets/cursor/js3d/craft-game-maker/SKILL.md +76 -0
  347. package/resources/targets/cursor/js3d/craft-game-maker/js3d.md +12 -0
  348. package/resources/targets/cursor/js3d/js3d/bundle.json +108 -0
  349. package/resources/targets/cursor/js3d/js3d/context/AGENTS.md +30 -0
  350. package/resources/targets/cursor/js3d/js3d/context/hooks/hooks.json +14 -0
  351. package/resources/targets/cursor/js3d/js3d/context/knowledge/AssetUrl.md +9 -0
  352. package/resources/targets/cursor/js3d/js3d/context/knowledge/AssetWiring.md +7 -0
  353. package/resources/targets/cursor/js3d/js3d/context/knowledge/CodingGuide/Pitfalls.md +11 -0
  354. package/resources/targets/cursor/js3d/js3d/context/knowledge/Layout.md +7 -0
  355. package/resources/targets/cursor/js3d/js3d/context/knowledge/ResourceLoading.md +11 -0
  356. package/resources/targets/cursor/js3d/js3d/context/knowledge/Runtime.md +9 -0
  357. package/resources/targets/cursor/js3d/js3d/context/skills/asset-usage-audit/SKILL.md +16 -0
  358. package/resources/targets/cursor/js3d/js3d/context/skills/asset-usage-audit/scripts/compare-animations.mjs +48 -0
  359. package/resources/targets/cursor/js3d/js3d/context/skills/asset-usage-audit/scripts/lib/anim.mjs +266 -0
  360. package/resources/targets/cursor/js3d/js3d/context/skills/asset-usage-audit/scripts/lib/glb.mjs +241 -0
  361. package/resources/targets/cursor/js3d/js3d/context/skills/asset-usage-audit/scripts/lib/scan.mjs +455 -0
  362. package/resources/targets/cursor/js3d/js3d/context/skills/asset-usage-audit/scripts/scan-assets.mjs +77 -0
  363. package/resources/targets/cursor/js3d/js3d/context/skills/export-config/SKILL.md +16 -0
  364. package/resources/targets/cursor/js3d/js3d/context/skills/export-config/assets/tooling/cli.mjs +20 -0
  365. package/resources/targets/cursor/js3d/js3d/context/skills/export-config/assets/tooling/config.d.mts +19 -0
  366. package/resources/targets/cursor/js3d/js3d/context/skills/export-config/assets/tooling/config.mjs +1 -0
  367. package/resources/targets/cursor/js3d/js3d/context/skills/export-config/assets/tooling/project.d.mts +6 -0
  368. package/resources/targets/cursor/js3d/js3d/context/skills/export-config/assets/tooling/project.mjs +77 -0
  369. package/resources/targets/cursor/js3d/js3d/context/skills/export-config/assets/tooling/vite.d.mts +2 -0
  370. package/resources/targets/cursor/js3d/js3d/context/skills/export-config/assets/tooling/vite.mjs +34 -0
  371. package/resources/targets/cursor/js3d/js3d/context/skills/export-config/scripts/export-config.mjs +4 -0
  372. package/resources/targets/cursor/js3d/js3d/context/skills/export-config/scripts/install.mjs +89 -0
  373. package/resources/targets/cursor/js3d/js3d/context/skills/export-config/scripts/panel-resource-path.mjs +106 -0
  374. package/resources/targets/cursor/js3d/js3d/context/skills/index.json +31 -0
  375. package/resources/targets/cursor/js3d/js3d/context/skills/performance-audit/SKILL.md +21 -0
  376. package/resources/targets/cursor/js3d/js3d/context/skills/performance-audit/scripts/lib/rules.mjs +470 -0
  377. package/resources/targets/cursor/js3d/js3d/context/skills/performance-audit/scripts/lib/scan.mjs +387 -0
  378. package/resources/targets/cursor/js3d/js3d/context/skills/performance-audit/scripts/lib/source.mjs +398 -0
  379. package/resources/targets/cursor/js3d/js3d/context/skills/performance-audit/scripts/scan-perf.mjs +130 -0
  380. package/resources/targets/cursor/js3d/js3d/context/skills/visual-qa/SKILL.md +14 -0
  381. package/resources/targets/cursor/js3d/js3d/project/README.md +7 -0
  382. package/resources/targets/cursor/js3d/js3d/project/configs/game.controls.json +3 -0
  383. package/resources/targets/cursor/js3d/js3d/project/configs/game.json +3 -0
  384. package/resources/targets/cursor/js3d/js3d/project/game-runtime.json +7 -0
  385. package/resources/targets/cursor/js3d/js3d/project/game.config.json +7 -0
  386. package/resources/targets/cursor/js3d/js3d/project/index.html +12 -0
  387. package/resources/targets/cursor/js3d/js3d/project/package.json +23 -0
  388. package/resources/targets/cursor/js3d/js3d/project/runtime/lightgame/1.1.0/platform/identity/qq-ai-game-sdk.min.js +5 -0
  389. package/resources/targets/cursor/js3d/js3d/project/runtime/lightgame/1.1.0/platform/identity/qq-session.mjs +208 -0
  390. package/resources/targets/cursor/js3d/js3d/project/runtime/lightgame/1.1.0/platform/identity/shared.mjs +37 -0
  391. package/resources/targets/cursor/js3d/js3d/project/runtime/lightgame/1.1.0/platform/platform-capture-video.mjs +227 -0
  392. package/resources/targets/cursor/js3d/js3d/project/runtime/lightgame/1.1.0/platform/platform-service.d.mts +31 -0
  393. package/resources/targets/cursor/js3d/js3d/project/runtime/lightgame/1.1.0/platform/platform-service.mjs +272 -0
  394. package/resources/targets/cursor/js3d/js3d/project/runtime/lightgame/1.1.0/platform/platform.d.mts +79 -0
  395. package/resources/targets/cursor/js3d/js3d/project/runtime/lightgame/1.1.0/platform/platform.mjs +30 -0
  396. package/resources/targets/cursor/js3d/js3d/project/runtime/lightgame/1.1.0/release.json +24 -0
  397. package/resources/targets/cursor/js3d/js3d/project/runtime/lightgame/1.1.0/tooling/cli.mjs +16 -0
  398. package/resources/targets/cursor/js3d/js3d/project/runtime/lightgame/1.1.0/tooling/project.d.mts +4 -0
  399. package/resources/targets/cursor/js3d/js3d/project/runtime/lightgame/1.1.0/tooling/project.mjs +50 -0
  400. package/resources/targets/cursor/js3d/js3d/project/runtime/lightgame/1.1.0/tooling/vite.d.mts +3 -0
  401. package/resources/targets/cursor/js3d/js3d/project/runtime/lightgame/1.1.0/tooling/vite.mjs +72 -0
  402. package/resources/targets/cursor/js3d/js3d/project/runtime/lightgame/1.1.0/tools/assets.d.mts +24 -0
  403. package/resources/targets/cursor/js3d/js3d/project/runtime/lightgame/1.1.0/tools/assets.mjs +2 -0
  404. package/resources/targets/cursor/js3d/js3d/project/runtime/lightgame/1.1.0/tools/astc.d.mts +10 -0
  405. package/resources/targets/cursor/js3d/js3d/project/runtime/lightgame/1.1.0/tools/astc.mjs +1 -0
  406. package/resources/targets/cursor/js3d/js3d/project/runtime/lightgame/1.1.0/tools/glb.d.mts +26 -0
  407. package/resources/targets/cursor/js3d/js3d/project/runtime/lightgame/1.1.0/tools/glb.mjs +351 -0
  408. package/resources/targets/cursor/js3d/js3d/project/scripts/config-export/assert-asset-wiring.mjs +97 -0
  409. package/resources/targets/cursor/js3d/js3d/project/scripts/config-export/panel-resource-path.mjs +106 -0
  410. package/resources/targets/cursor/js3d/js3d/project/scripts/config-export/sync-asset-controls.mjs +327 -0
  411. package/resources/targets/cursor/js3d/js3d/project/scripts/config-export/sync-scene-assets.mjs +191 -0
  412. package/resources/targets/cursor/js3d/js3d/project/scripts/config-export.mjs +15 -0
  413. package/resources/targets/cursor/js3d/js3d/project/scripts/skill-modules/export-config/cli.mjs +20 -0
  414. package/resources/targets/cursor/js3d/js3d/project/scripts/skill-modules/export-config/config.d.mts +19 -0
  415. package/resources/targets/cursor/js3d/js3d/project/scripts/skill-modules/export-config/config.mjs +1 -0
  416. package/resources/targets/cursor/js3d/js3d/project/scripts/skill-modules/export-config/installed.json +6 -0
  417. package/resources/targets/cursor/js3d/js3d/project/scripts/skill-modules/export-config/project.d.mts +6 -0
  418. package/resources/targets/cursor/js3d/js3d/project/scripts/skill-modules/export-config/project.mjs +77 -0
  419. package/resources/targets/cursor/js3d/js3d/project/scripts/skill-modules/export-config/vite.d.mts +2 -0
  420. package/resources/targets/cursor/js3d/js3d/project/scripts/skill-modules/export-config/vite.mjs +34 -0
  421. package/resources/targets/cursor/js3d/js3d/project/scripts/write-preview-ready.mjs +22 -0
  422. package/resources/targets/cursor/js3d/js3d/project/src/display/ui-stage.ts +156 -0
  423. package/resources/targets/cursor/js3d/js3d/project/src/display/viewport.ts +239 -0
  424. package/resources/targets/cursor/js3d/js3d/project/src/main.ts +85 -0
  425. package/resources/targets/cursor/js3d/js3d/project/src/platform.ts +2 -0
  426. package/resources/targets/cursor/js3d/js3d/project/src/style.css +83 -0
  427. package/resources/targets/cursor/js3d/js3d/project/tsconfig.json +20 -0
  428. package/resources/targets/cursor/js3d/js3d/project/unified_data_control_config.json +20 -0
  429. package/resources/targets/cursor/js3d/js3d/project/vite.config.ts +5 -0
  430. package/resources/targets/cursor/js3d/recovery.md +13 -0
  431. package/resources/targets/cursor/js3d/target.json +60 -0
  432. package/resources/targets/dsh/js/bootstrap/SKILL.md +18 -0
  433. package/resources/targets/dsh/js/context-filter-report.json +27 -0
  434. package/resources/targets/dsh/js/craft-game-maker/SKILL.md +76 -0
  435. package/resources/targets/dsh/js/craft-game-maker/js.md +10 -0
  436. package/resources/targets/dsh/js/js/bundle.json +97 -0
  437. package/resources/targets/dsh/js/js/context/AGENTS.md +29 -0
  438. package/resources/targets/dsh/js/js/context/hooks/hooks.json +14 -0
  439. package/resources/targets/dsh/js/js/context/knowledge/AssetUrl.md +9 -0
  440. package/resources/targets/dsh/js/js/context/knowledge/AssetWiring.md +7 -0
  441. package/resources/targets/dsh/js/js/context/knowledge/Layout.md +7 -0
  442. package/resources/targets/dsh/js/js/context/knowledge/Lifecycle.md +11 -0
  443. package/resources/targets/dsh/js/js/context/knowledge/ResourceLoading.md +9 -0
  444. package/resources/targets/dsh/js/js/context/skills/export-config/SKILL.md +16 -0
  445. package/resources/targets/dsh/js/js/context/skills/export-config/assets/tooling/cli.mjs +20 -0
  446. package/resources/targets/dsh/js/js/context/skills/export-config/assets/tooling/config.d.mts +19 -0
  447. package/resources/targets/dsh/js/js/context/skills/export-config/assets/tooling/config.mjs +1 -0
  448. package/resources/targets/dsh/js/js/context/skills/export-config/assets/tooling/project.d.mts +6 -0
  449. package/resources/targets/dsh/js/js/context/skills/export-config/assets/tooling/project.mjs +77 -0
  450. package/resources/targets/dsh/js/js/context/skills/export-config/assets/tooling/vite.d.mts +2 -0
  451. package/resources/targets/dsh/js/js/context/skills/export-config/assets/tooling/vite.mjs +34 -0
  452. package/resources/targets/dsh/js/js/context/skills/export-config/scripts/export-config.mjs +4 -0
  453. package/resources/targets/dsh/js/js/context/skills/export-config/scripts/install.mjs +89 -0
  454. package/resources/targets/dsh/js/js/context/skills/export-config/scripts/panel-resource-path.mjs +106 -0
  455. package/resources/targets/dsh/js/js/context/skills/index.json +19 -0
  456. package/resources/targets/dsh/js/js/context/skills/visual-qa/SKILL.md +14 -0
  457. package/resources/targets/dsh/js/js/project/README.md +7 -0
  458. package/resources/targets/dsh/js/js/project/configs/assets.json +1 -0
  459. package/resources/targets/dsh/js/js/project/configs/game.controls.json +3 -0
  460. package/resources/targets/dsh/js/js/project/configs/game.json +3 -0
  461. package/resources/targets/dsh/js/js/project/game-runtime.json +7 -0
  462. package/resources/targets/dsh/js/js/project/game.config.json +7 -0
  463. package/resources/targets/dsh/js/js/project/index.html +20 -0
  464. package/resources/targets/dsh/js/js/project/package.json +22 -0
  465. package/resources/targets/dsh/js/js/project/runtime/lightgame/1.1.0/platform/identity/qq-ai-game-sdk.min.js +5 -0
  466. package/resources/targets/dsh/js/js/project/runtime/lightgame/1.1.0/platform/identity/qq-session.mjs +208 -0
  467. package/resources/targets/dsh/js/js/project/runtime/lightgame/1.1.0/platform/identity/shared.mjs +37 -0
  468. package/resources/targets/dsh/js/js/project/runtime/lightgame/1.1.0/platform/platform-capture-video.mjs +227 -0
  469. package/resources/targets/dsh/js/js/project/runtime/lightgame/1.1.0/platform/platform-service.d.mts +31 -0
  470. package/resources/targets/dsh/js/js/project/runtime/lightgame/1.1.0/platform/platform-service.mjs +272 -0
  471. package/resources/targets/dsh/js/js/project/runtime/lightgame/1.1.0/platform/platform.d.mts +79 -0
  472. package/resources/targets/dsh/js/js/project/runtime/lightgame/1.1.0/platform/platform.mjs +29 -0
  473. package/resources/targets/dsh/js/js/project/runtime/lightgame/1.1.0/release.json +22 -0
  474. package/resources/targets/dsh/js/js/project/runtime/lightgame/1.1.0/tooling/cli.mjs +16 -0
  475. package/resources/targets/dsh/js/js/project/runtime/lightgame/1.1.0/tooling/project.d.mts +4 -0
  476. package/resources/targets/dsh/js/js/project/runtime/lightgame/1.1.0/tooling/project.mjs +50 -0
  477. package/resources/targets/dsh/js/js/project/runtime/lightgame/1.1.0/tooling/vite.d.mts +3 -0
  478. package/resources/targets/dsh/js/js/project/runtime/lightgame/1.1.0/tooling/vite.mjs +72 -0
  479. package/resources/targets/dsh/js/js/project/runtime/lightgame/1.1.0/tools/assets.d.mts +24 -0
  480. package/resources/targets/dsh/js/js/project/runtime/lightgame/1.1.0/tools/assets.mjs +2 -0
  481. package/resources/targets/dsh/js/js/project/runtime/lightgame/1.1.0/tools/astc.d.mts +10 -0
  482. package/resources/targets/dsh/js/js/project/runtime/lightgame/1.1.0/tools/astc.mjs +1 -0
  483. package/resources/targets/dsh/js/js/project/scripts/config-export/assert-asset-wiring.mjs +72 -0
  484. package/resources/targets/dsh/js/js/project/scripts/config-export/panel-resource-path.mjs +106 -0
  485. package/resources/targets/dsh/js/js/project/scripts/config-export/sync-asset-controls.mjs +316 -0
  486. package/resources/targets/dsh/js/js/project/scripts/config-export.mjs +13 -0
  487. package/resources/targets/dsh/js/js/project/scripts/skill-modules/export-config/cli.mjs +20 -0
  488. package/resources/targets/dsh/js/js/project/scripts/skill-modules/export-config/config.d.mts +19 -0
  489. package/resources/targets/dsh/js/js/project/scripts/skill-modules/export-config/config.mjs +1 -0
  490. package/resources/targets/dsh/js/js/project/scripts/skill-modules/export-config/installed.json +6 -0
  491. package/resources/targets/dsh/js/js/project/scripts/skill-modules/export-config/project.d.mts +6 -0
  492. package/resources/targets/dsh/js/js/project/scripts/skill-modules/export-config/project.mjs +77 -0
  493. package/resources/targets/dsh/js/js/project/scripts/skill-modules/export-config/vite.d.mts +2 -0
  494. package/resources/targets/dsh/js/js/project/scripts/skill-modules/export-config/vite.mjs +34 -0
  495. package/resources/targets/dsh/js/js/project/scripts/write-preview-ready.mjs +22 -0
  496. package/resources/targets/dsh/js/js/project/src/display/ui-stage.ts +156 -0
  497. package/resources/targets/dsh/js/js/project/src/display/viewport.ts +249 -0
  498. package/resources/targets/dsh/js/js/project/src/main.ts +87 -0
  499. package/resources/targets/dsh/js/js/project/src/platform.ts +2 -0
  500. package/resources/targets/dsh/js/js/project/src/scenes/LoadScene.ts +89 -0
  501. package/resources/targets/dsh/js/js/project/src/scenes/PlayScene.ts +17 -0
  502. package/resources/targets/dsh/js/js/project/src/screenUi.ts +185 -0
  503. package/resources/targets/dsh/js/js/project/src/style.css +294 -0
  504. package/resources/targets/dsh/js/js/project/tsconfig.json +20 -0
  505. package/resources/targets/dsh/js/js/project/unified_data_control_config.json +20 -0
  506. package/resources/targets/dsh/js/js/project/vite.config.ts +5 -0
  507. package/resources/targets/dsh/js/recovery.md +13 -0
  508. package/resources/targets/dsh/js/target.json +61 -0
  509. package/resources/targets/dsh/js3d/bootstrap/SKILL.md +18 -0
  510. package/resources/targets/dsh/js3d/context-filter-report.json +27 -0
  511. package/resources/targets/dsh/js3d/craft-game-maker/SKILL.md +76 -0
  512. package/resources/targets/dsh/js3d/craft-game-maker/js3d.md +12 -0
  513. package/resources/targets/dsh/js3d/js3d/bundle.json +108 -0
  514. package/resources/targets/dsh/js3d/js3d/context/AGENTS.md +30 -0
  515. package/resources/targets/dsh/js3d/js3d/context/hooks/hooks.json +14 -0
  516. package/resources/targets/dsh/js3d/js3d/context/knowledge/AssetUrl.md +9 -0
  517. package/resources/targets/dsh/js3d/js3d/context/knowledge/AssetWiring.md +7 -0
  518. package/resources/targets/dsh/js3d/js3d/context/knowledge/CodingGuide/Pitfalls.md +11 -0
  519. package/resources/targets/dsh/js3d/js3d/context/knowledge/Layout.md +7 -0
  520. package/resources/targets/dsh/js3d/js3d/context/knowledge/ResourceLoading.md +11 -0
  521. package/resources/targets/dsh/js3d/js3d/context/knowledge/Runtime.md +9 -0
  522. package/resources/targets/dsh/js3d/js3d/context/skills/asset-usage-audit/SKILL.md +16 -0
  523. package/resources/targets/dsh/js3d/js3d/context/skills/asset-usage-audit/scripts/compare-animations.mjs +48 -0
  524. package/resources/targets/dsh/js3d/js3d/context/skills/asset-usage-audit/scripts/lib/anim.mjs +266 -0
  525. package/resources/targets/dsh/js3d/js3d/context/skills/asset-usage-audit/scripts/lib/glb.mjs +241 -0
  526. package/resources/targets/dsh/js3d/js3d/context/skills/asset-usage-audit/scripts/lib/scan.mjs +455 -0
  527. package/resources/targets/dsh/js3d/js3d/context/skills/asset-usage-audit/scripts/scan-assets.mjs +77 -0
  528. package/resources/targets/dsh/js3d/js3d/context/skills/export-config/SKILL.md +16 -0
  529. package/resources/targets/dsh/js3d/js3d/context/skills/export-config/assets/tooling/cli.mjs +20 -0
  530. package/resources/targets/dsh/js3d/js3d/context/skills/export-config/assets/tooling/config.d.mts +19 -0
  531. package/resources/targets/dsh/js3d/js3d/context/skills/export-config/assets/tooling/config.mjs +1 -0
  532. package/resources/targets/dsh/js3d/js3d/context/skills/export-config/assets/tooling/project.d.mts +6 -0
  533. package/resources/targets/dsh/js3d/js3d/context/skills/export-config/assets/tooling/project.mjs +77 -0
  534. package/resources/targets/dsh/js3d/js3d/context/skills/export-config/assets/tooling/vite.d.mts +2 -0
  535. package/resources/targets/dsh/js3d/js3d/context/skills/export-config/assets/tooling/vite.mjs +34 -0
  536. package/resources/targets/dsh/js3d/js3d/context/skills/export-config/scripts/export-config.mjs +4 -0
  537. package/resources/targets/dsh/js3d/js3d/context/skills/export-config/scripts/install.mjs +89 -0
  538. package/resources/targets/dsh/js3d/js3d/context/skills/export-config/scripts/panel-resource-path.mjs +106 -0
  539. package/resources/targets/dsh/js3d/js3d/context/skills/index.json +31 -0
  540. package/resources/targets/dsh/js3d/js3d/context/skills/performance-audit/SKILL.md +21 -0
  541. package/resources/targets/dsh/js3d/js3d/context/skills/performance-audit/scripts/lib/rules.mjs +470 -0
  542. package/resources/targets/dsh/js3d/js3d/context/skills/performance-audit/scripts/lib/scan.mjs +387 -0
  543. package/resources/targets/dsh/js3d/js3d/context/skills/performance-audit/scripts/lib/source.mjs +398 -0
  544. package/resources/targets/dsh/js3d/js3d/context/skills/performance-audit/scripts/scan-perf.mjs +130 -0
  545. package/resources/targets/dsh/js3d/js3d/context/skills/visual-qa/SKILL.md +14 -0
  546. package/resources/targets/dsh/js3d/js3d/project/README.md +7 -0
  547. package/resources/targets/dsh/js3d/js3d/project/configs/game.controls.json +3 -0
  548. package/resources/targets/dsh/js3d/js3d/project/configs/game.json +3 -0
  549. package/resources/targets/dsh/js3d/js3d/project/game-runtime.json +7 -0
  550. package/resources/targets/dsh/js3d/js3d/project/game.config.json +7 -0
  551. package/resources/targets/dsh/js3d/js3d/project/index.html +12 -0
  552. package/resources/targets/dsh/js3d/js3d/project/package.json +23 -0
  553. package/resources/targets/dsh/js3d/js3d/project/runtime/lightgame/1.1.0/platform/identity/qq-ai-game-sdk.min.js +5 -0
  554. package/resources/targets/dsh/js3d/js3d/project/runtime/lightgame/1.1.0/platform/identity/qq-session.mjs +208 -0
  555. package/resources/targets/dsh/js3d/js3d/project/runtime/lightgame/1.1.0/platform/identity/shared.mjs +37 -0
  556. package/resources/targets/dsh/js3d/js3d/project/runtime/lightgame/1.1.0/platform/platform-capture-video.mjs +227 -0
  557. package/resources/targets/dsh/js3d/js3d/project/runtime/lightgame/1.1.0/platform/platform-service.d.mts +31 -0
  558. package/resources/targets/dsh/js3d/js3d/project/runtime/lightgame/1.1.0/platform/platform-service.mjs +272 -0
  559. package/resources/targets/dsh/js3d/js3d/project/runtime/lightgame/1.1.0/platform/platform.d.mts +79 -0
  560. package/resources/targets/dsh/js3d/js3d/project/runtime/lightgame/1.1.0/platform/platform.mjs +30 -0
  561. package/resources/targets/dsh/js3d/js3d/project/runtime/lightgame/1.1.0/release.json +24 -0
  562. package/resources/targets/dsh/js3d/js3d/project/runtime/lightgame/1.1.0/tooling/cli.mjs +16 -0
  563. package/resources/targets/dsh/js3d/js3d/project/runtime/lightgame/1.1.0/tooling/project.d.mts +4 -0
  564. package/resources/targets/dsh/js3d/js3d/project/runtime/lightgame/1.1.0/tooling/project.mjs +50 -0
  565. package/resources/targets/dsh/js3d/js3d/project/runtime/lightgame/1.1.0/tooling/vite.d.mts +3 -0
  566. package/resources/targets/dsh/js3d/js3d/project/runtime/lightgame/1.1.0/tooling/vite.mjs +72 -0
  567. package/resources/targets/dsh/js3d/js3d/project/runtime/lightgame/1.1.0/tools/assets.d.mts +24 -0
  568. package/resources/targets/dsh/js3d/js3d/project/runtime/lightgame/1.1.0/tools/assets.mjs +2 -0
  569. package/resources/targets/dsh/js3d/js3d/project/runtime/lightgame/1.1.0/tools/astc.d.mts +10 -0
  570. package/resources/targets/dsh/js3d/js3d/project/runtime/lightgame/1.1.0/tools/astc.mjs +1 -0
  571. package/resources/targets/dsh/js3d/js3d/project/runtime/lightgame/1.1.0/tools/glb.d.mts +26 -0
  572. package/resources/targets/dsh/js3d/js3d/project/runtime/lightgame/1.1.0/tools/glb.mjs +351 -0
  573. package/resources/targets/dsh/js3d/js3d/project/scripts/config-export/assert-asset-wiring.mjs +97 -0
  574. package/resources/targets/dsh/js3d/js3d/project/scripts/config-export/panel-resource-path.mjs +106 -0
  575. package/resources/targets/dsh/js3d/js3d/project/scripts/config-export/sync-asset-controls.mjs +327 -0
  576. package/resources/targets/dsh/js3d/js3d/project/scripts/config-export/sync-scene-assets.mjs +191 -0
  577. package/resources/targets/dsh/js3d/js3d/project/scripts/config-export.mjs +15 -0
  578. package/resources/targets/dsh/js3d/js3d/project/scripts/skill-modules/export-config/cli.mjs +20 -0
  579. package/resources/targets/dsh/js3d/js3d/project/scripts/skill-modules/export-config/config.d.mts +19 -0
  580. package/resources/targets/dsh/js3d/js3d/project/scripts/skill-modules/export-config/config.mjs +1 -0
  581. package/resources/targets/dsh/js3d/js3d/project/scripts/skill-modules/export-config/installed.json +6 -0
  582. package/resources/targets/dsh/js3d/js3d/project/scripts/skill-modules/export-config/project.d.mts +6 -0
  583. package/resources/targets/dsh/js3d/js3d/project/scripts/skill-modules/export-config/project.mjs +77 -0
  584. package/resources/targets/dsh/js3d/js3d/project/scripts/skill-modules/export-config/vite.d.mts +2 -0
  585. package/resources/targets/dsh/js3d/js3d/project/scripts/skill-modules/export-config/vite.mjs +34 -0
  586. package/resources/targets/dsh/js3d/js3d/project/scripts/write-preview-ready.mjs +22 -0
  587. package/resources/targets/dsh/js3d/js3d/project/src/display/ui-stage.ts +156 -0
  588. package/resources/targets/dsh/js3d/js3d/project/src/display/viewport.ts +239 -0
  589. package/resources/targets/dsh/js3d/js3d/project/src/main.ts +85 -0
  590. package/resources/targets/dsh/js3d/js3d/project/src/platform.ts +2 -0
  591. package/resources/targets/dsh/js3d/js3d/project/src/style.css +83 -0
  592. package/resources/targets/dsh/js3d/js3d/project/tsconfig.json +20 -0
  593. package/resources/targets/dsh/js3d/js3d/project/unified_data_control_config.json +20 -0
  594. package/resources/targets/dsh/js3d/js3d/project/vite.config.ts +5 -0
  595. package/resources/targets/dsh/js3d/recovery.md +13 -0
  596. package/resources/targets/dsh/js3d/target.json +60 -0
  597. package/resources/targets/index.json +72 -12
  598. package/resources/targets/kimi/js/bootstrap/SKILL.md +18 -0
  599. package/resources/targets/kimi/js/context-filter-report.json +27 -0
  600. package/resources/targets/kimi/js/craft-game-maker/SKILL.md +76 -0
  601. package/resources/targets/kimi/js/craft-game-maker/js.md +10 -0
  602. package/resources/targets/kimi/js/js/bundle.json +97 -0
  603. package/resources/targets/kimi/js/js/context/AGENTS.md +29 -0
  604. package/resources/targets/kimi/js/js/context/hooks/hooks.json +14 -0
  605. package/resources/targets/kimi/js/js/context/knowledge/AssetUrl.md +9 -0
  606. package/resources/targets/kimi/js/js/context/knowledge/AssetWiring.md +7 -0
  607. package/resources/targets/kimi/js/js/context/knowledge/Layout.md +7 -0
  608. package/resources/targets/kimi/js/js/context/knowledge/Lifecycle.md +11 -0
  609. package/resources/targets/kimi/js/js/context/knowledge/ResourceLoading.md +9 -0
  610. package/resources/targets/kimi/js/js/context/skills/export-config/SKILL.md +16 -0
  611. package/resources/targets/kimi/js/js/context/skills/export-config/assets/tooling/cli.mjs +20 -0
  612. package/resources/targets/kimi/js/js/context/skills/export-config/assets/tooling/config.d.mts +19 -0
  613. package/resources/targets/kimi/js/js/context/skills/export-config/assets/tooling/config.mjs +1 -0
  614. package/resources/targets/kimi/js/js/context/skills/export-config/assets/tooling/project.d.mts +6 -0
  615. package/resources/targets/kimi/js/js/context/skills/export-config/assets/tooling/project.mjs +77 -0
  616. package/resources/targets/kimi/js/js/context/skills/export-config/assets/tooling/vite.d.mts +2 -0
  617. package/resources/targets/kimi/js/js/context/skills/export-config/assets/tooling/vite.mjs +34 -0
  618. package/resources/targets/kimi/js/js/context/skills/export-config/scripts/export-config.mjs +4 -0
  619. package/resources/targets/kimi/js/js/context/skills/export-config/scripts/install.mjs +89 -0
  620. package/resources/targets/kimi/js/js/context/skills/export-config/scripts/panel-resource-path.mjs +106 -0
  621. package/resources/targets/kimi/js/js/context/skills/index.json +19 -0
  622. package/resources/targets/kimi/js/js/context/skills/visual-qa/SKILL.md +14 -0
  623. package/resources/targets/kimi/js/js/project/README.md +7 -0
  624. package/resources/targets/kimi/js/js/project/configs/assets.json +1 -0
  625. package/resources/targets/kimi/js/js/project/configs/game.controls.json +3 -0
  626. package/resources/targets/kimi/js/js/project/configs/game.json +3 -0
  627. package/resources/targets/kimi/js/js/project/game-runtime.json +7 -0
  628. package/resources/targets/kimi/js/js/project/game.config.json +7 -0
  629. package/resources/targets/kimi/js/js/project/index.html +20 -0
  630. package/resources/targets/kimi/js/js/project/package.json +22 -0
  631. package/resources/targets/kimi/js/js/project/runtime/lightgame/1.1.0/platform/identity/qq-ai-game-sdk.min.js +5 -0
  632. package/resources/targets/kimi/js/js/project/runtime/lightgame/1.1.0/platform/identity/qq-session.mjs +208 -0
  633. package/resources/targets/kimi/js/js/project/runtime/lightgame/1.1.0/platform/identity/shared.mjs +37 -0
  634. package/resources/targets/kimi/js/js/project/runtime/lightgame/1.1.0/platform/platform-capture-video.mjs +227 -0
  635. package/resources/targets/kimi/js/js/project/runtime/lightgame/1.1.0/platform/platform-service.d.mts +31 -0
  636. package/resources/targets/kimi/js/js/project/runtime/lightgame/1.1.0/platform/platform-service.mjs +272 -0
  637. package/resources/targets/kimi/js/js/project/runtime/lightgame/1.1.0/platform/platform.d.mts +79 -0
  638. package/resources/targets/kimi/js/js/project/runtime/lightgame/1.1.0/platform/platform.mjs +29 -0
  639. package/resources/targets/kimi/js/js/project/runtime/lightgame/1.1.0/release.json +22 -0
  640. package/resources/targets/kimi/js/js/project/runtime/lightgame/1.1.0/tooling/cli.mjs +16 -0
  641. package/resources/targets/kimi/js/js/project/runtime/lightgame/1.1.0/tooling/project.d.mts +4 -0
  642. package/resources/targets/kimi/js/js/project/runtime/lightgame/1.1.0/tooling/project.mjs +50 -0
  643. package/resources/targets/kimi/js/js/project/runtime/lightgame/1.1.0/tooling/vite.d.mts +3 -0
  644. package/resources/targets/kimi/js/js/project/runtime/lightgame/1.1.0/tooling/vite.mjs +72 -0
  645. package/resources/targets/kimi/js/js/project/runtime/lightgame/1.1.0/tools/assets.d.mts +24 -0
  646. package/resources/targets/kimi/js/js/project/runtime/lightgame/1.1.0/tools/assets.mjs +2 -0
  647. package/resources/targets/kimi/js/js/project/runtime/lightgame/1.1.0/tools/astc.d.mts +10 -0
  648. package/resources/targets/kimi/js/js/project/runtime/lightgame/1.1.0/tools/astc.mjs +1 -0
  649. package/resources/targets/kimi/js/js/project/scripts/config-export/assert-asset-wiring.mjs +72 -0
  650. package/resources/targets/kimi/js/js/project/scripts/config-export/panel-resource-path.mjs +106 -0
  651. package/resources/targets/kimi/js/js/project/scripts/config-export/sync-asset-controls.mjs +316 -0
  652. package/resources/targets/kimi/js/js/project/scripts/config-export.mjs +13 -0
  653. package/resources/targets/kimi/js/js/project/scripts/skill-modules/export-config/cli.mjs +20 -0
  654. package/resources/targets/kimi/js/js/project/scripts/skill-modules/export-config/config.d.mts +19 -0
  655. package/resources/targets/kimi/js/js/project/scripts/skill-modules/export-config/config.mjs +1 -0
  656. package/resources/targets/kimi/js/js/project/scripts/skill-modules/export-config/installed.json +6 -0
  657. package/resources/targets/kimi/js/js/project/scripts/skill-modules/export-config/project.d.mts +6 -0
  658. package/resources/targets/kimi/js/js/project/scripts/skill-modules/export-config/project.mjs +77 -0
  659. package/resources/targets/kimi/js/js/project/scripts/skill-modules/export-config/vite.d.mts +2 -0
  660. package/resources/targets/kimi/js/js/project/scripts/skill-modules/export-config/vite.mjs +34 -0
  661. package/resources/targets/kimi/js/js/project/scripts/write-preview-ready.mjs +22 -0
  662. package/resources/targets/kimi/js/js/project/src/display/ui-stage.ts +156 -0
  663. package/resources/targets/kimi/js/js/project/src/display/viewport.ts +249 -0
  664. package/resources/targets/kimi/js/js/project/src/main.ts +87 -0
  665. package/resources/targets/kimi/js/js/project/src/platform.ts +2 -0
  666. package/resources/targets/kimi/js/js/project/src/scenes/LoadScene.ts +89 -0
  667. package/resources/targets/kimi/js/js/project/src/scenes/PlayScene.ts +17 -0
  668. package/resources/targets/kimi/js/js/project/src/screenUi.ts +185 -0
  669. package/resources/targets/kimi/js/js/project/src/style.css +294 -0
  670. package/resources/targets/kimi/js/js/project/tsconfig.json +20 -0
  671. package/resources/targets/kimi/js/js/project/unified_data_control_config.json +20 -0
  672. package/resources/targets/kimi/js/js/project/vite.config.ts +5 -0
  673. package/resources/targets/kimi/js/recovery.md +13 -0
  674. package/resources/targets/kimi/js/target.json +61 -0
  675. package/resources/targets/kimi/js3d/bootstrap/SKILL.md +18 -0
  676. package/resources/targets/kimi/js3d/context-filter-report.json +27 -0
  677. package/resources/targets/kimi/js3d/craft-game-maker/SKILL.md +76 -0
  678. package/resources/targets/kimi/js3d/craft-game-maker/js3d.md +12 -0
  679. package/resources/targets/kimi/js3d/js3d/bundle.json +108 -0
  680. package/resources/targets/kimi/js3d/js3d/context/AGENTS.md +30 -0
  681. package/resources/targets/kimi/js3d/js3d/context/hooks/hooks.json +14 -0
  682. package/resources/targets/kimi/js3d/js3d/context/knowledge/AssetUrl.md +9 -0
  683. package/resources/targets/kimi/js3d/js3d/context/knowledge/AssetWiring.md +7 -0
  684. package/resources/targets/kimi/js3d/js3d/context/knowledge/CodingGuide/Pitfalls.md +11 -0
  685. package/resources/targets/kimi/js3d/js3d/context/knowledge/Layout.md +7 -0
  686. package/resources/targets/kimi/js3d/js3d/context/knowledge/ResourceLoading.md +11 -0
  687. package/resources/targets/kimi/js3d/js3d/context/knowledge/Runtime.md +9 -0
  688. package/resources/targets/kimi/js3d/js3d/context/skills/asset-usage-audit/SKILL.md +16 -0
  689. package/resources/targets/kimi/js3d/js3d/context/skills/asset-usage-audit/scripts/compare-animations.mjs +48 -0
  690. package/resources/targets/kimi/js3d/js3d/context/skills/asset-usage-audit/scripts/lib/anim.mjs +266 -0
  691. package/resources/targets/kimi/js3d/js3d/context/skills/asset-usage-audit/scripts/lib/glb.mjs +241 -0
  692. package/resources/targets/kimi/js3d/js3d/context/skills/asset-usage-audit/scripts/lib/scan.mjs +455 -0
  693. package/resources/targets/kimi/js3d/js3d/context/skills/asset-usage-audit/scripts/scan-assets.mjs +77 -0
  694. package/resources/targets/kimi/js3d/js3d/context/skills/export-config/SKILL.md +16 -0
  695. package/resources/targets/kimi/js3d/js3d/context/skills/export-config/assets/tooling/cli.mjs +20 -0
  696. package/resources/targets/kimi/js3d/js3d/context/skills/export-config/assets/tooling/config.d.mts +19 -0
  697. package/resources/targets/kimi/js3d/js3d/context/skills/export-config/assets/tooling/config.mjs +1 -0
  698. package/resources/targets/kimi/js3d/js3d/context/skills/export-config/assets/tooling/project.d.mts +6 -0
  699. package/resources/targets/kimi/js3d/js3d/context/skills/export-config/assets/tooling/project.mjs +77 -0
  700. package/resources/targets/kimi/js3d/js3d/context/skills/export-config/assets/tooling/vite.d.mts +2 -0
  701. package/resources/targets/kimi/js3d/js3d/context/skills/export-config/assets/tooling/vite.mjs +34 -0
  702. package/resources/targets/kimi/js3d/js3d/context/skills/export-config/scripts/export-config.mjs +4 -0
  703. package/resources/targets/kimi/js3d/js3d/context/skills/export-config/scripts/install.mjs +89 -0
  704. package/resources/targets/kimi/js3d/js3d/context/skills/export-config/scripts/panel-resource-path.mjs +106 -0
  705. package/resources/targets/kimi/js3d/js3d/context/skills/index.json +31 -0
  706. package/resources/targets/kimi/js3d/js3d/context/skills/performance-audit/SKILL.md +21 -0
  707. package/resources/targets/kimi/js3d/js3d/context/skills/performance-audit/scripts/lib/rules.mjs +470 -0
  708. package/resources/targets/kimi/js3d/js3d/context/skills/performance-audit/scripts/lib/scan.mjs +387 -0
  709. package/resources/targets/kimi/js3d/js3d/context/skills/performance-audit/scripts/lib/source.mjs +398 -0
  710. package/resources/targets/kimi/js3d/js3d/context/skills/performance-audit/scripts/scan-perf.mjs +130 -0
  711. package/resources/targets/kimi/js3d/js3d/context/skills/visual-qa/SKILL.md +14 -0
  712. package/resources/targets/kimi/js3d/js3d/project/README.md +7 -0
  713. package/resources/targets/kimi/js3d/js3d/project/configs/game.controls.json +3 -0
  714. package/resources/targets/kimi/js3d/js3d/project/configs/game.json +3 -0
  715. package/resources/targets/kimi/js3d/js3d/project/game-runtime.json +7 -0
  716. package/resources/targets/kimi/js3d/js3d/project/game.config.json +7 -0
  717. package/resources/targets/kimi/js3d/js3d/project/index.html +12 -0
  718. package/resources/targets/kimi/js3d/js3d/project/package.json +23 -0
  719. package/resources/targets/kimi/js3d/js3d/project/runtime/lightgame/1.1.0/platform/identity/qq-ai-game-sdk.min.js +5 -0
  720. package/resources/targets/kimi/js3d/js3d/project/runtime/lightgame/1.1.0/platform/identity/qq-session.mjs +208 -0
  721. package/resources/targets/kimi/js3d/js3d/project/runtime/lightgame/1.1.0/platform/identity/shared.mjs +37 -0
  722. package/resources/targets/kimi/js3d/js3d/project/runtime/lightgame/1.1.0/platform/platform-capture-video.mjs +227 -0
  723. package/resources/targets/kimi/js3d/js3d/project/runtime/lightgame/1.1.0/platform/platform-service.d.mts +31 -0
  724. package/resources/targets/kimi/js3d/js3d/project/runtime/lightgame/1.1.0/platform/platform-service.mjs +272 -0
  725. package/resources/targets/kimi/js3d/js3d/project/runtime/lightgame/1.1.0/platform/platform.d.mts +79 -0
  726. package/resources/targets/kimi/js3d/js3d/project/runtime/lightgame/1.1.0/platform/platform.mjs +30 -0
  727. package/resources/targets/kimi/js3d/js3d/project/runtime/lightgame/1.1.0/release.json +24 -0
  728. package/resources/targets/kimi/js3d/js3d/project/runtime/lightgame/1.1.0/tooling/cli.mjs +16 -0
  729. package/resources/targets/kimi/js3d/js3d/project/runtime/lightgame/1.1.0/tooling/project.d.mts +4 -0
  730. package/resources/targets/kimi/js3d/js3d/project/runtime/lightgame/1.1.0/tooling/project.mjs +50 -0
  731. package/resources/targets/kimi/js3d/js3d/project/runtime/lightgame/1.1.0/tooling/vite.d.mts +3 -0
  732. package/resources/targets/kimi/js3d/js3d/project/runtime/lightgame/1.1.0/tooling/vite.mjs +72 -0
  733. package/resources/targets/kimi/js3d/js3d/project/runtime/lightgame/1.1.0/tools/assets.d.mts +24 -0
  734. package/resources/targets/kimi/js3d/js3d/project/runtime/lightgame/1.1.0/tools/assets.mjs +2 -0
  735. package/resources/targets/kimi/js3d/js3d/project/runtime/lightgame/1.1.0/tools/astc.d.mts +10 -0
  736. package/resources/targets/kimi/js3d/js3d/project/runtime/lightgame/1.1.0/tools/astc.mjs +1 -0
  737. package/resources/targets/kimi/js3d/js3d/project/runtime/lightgame/1.1.0/tools/glb.d.mts +26 -0
  738. package/resources/targets/kimi/js3d/js3d/project/runtime/lightgame/1.1.0/tools/glb.mjs +351 -0
  739. package/resources/targets/kimi/js3d/js3d/project/scripts/config-export/assert-asset-wiring.mjs +97 -0
  740. package/resources/targets/kimi/js3d/js3d/project/scripts/config-export/panel-resource-path.mjs +106 -0
  741. package/resources/targets/kimi/js3d/js3d/project/scripts/config-export/sync-asset-controls.mjs +327 -0
  742. package/resources/targets/kimi/js3d/js3d/project/scripts/config-export/sync-scene-assets.mjs +191 -0
  743. package/resources/targets/kimi/js3d/js3d/project/scripts/config-export.mjs +15 -0
  744. package/resources/targets/kimi/js3d/js3d/project/scripts/skill-modules/export-config/cli.mjs +20 -0
  745. package/resources/targets/kimi/js3d/js3d/project/scripts/skill-modules/export-config/config.d.mts +19 -0
  746. package/resources/targets/kimi/js3d/js3d/project/scripts/skill-modules/export-config/config.mjs +1 -0
  747. package/resources/targets/kimi/js3d/js3d/project/scripts/skill-modules/export-config/installed.json +6 -0
  748. package/resources/targets/kimi/js3d/js3d/project/scripts/skill-modules/export-config/project.d.mts +6 -0
  749. package/resources/targets/kimi/js3d/js3d/project/scripts/skill-modules/export-config/project.mjs +77 -0
  750. package/resources/targets/kimi/js3d/js3d/project/scripts/skill-modules/export-config/vite.d.mts +2 -0
  751. package/resources/targets/kimi/js3d/js3d/project/scripts/skill-modules/export-config/vite.mjs +34 -0
  752. package/resources/targets/kimi/js3d/js3d/project/scripts/write-preview-ready.mjs +22 -0
  753. package/resources/targets/kimi/js3d/js3d/project/src/display/ui-stage.ts +156 -0
  754. package/resources/targets/kimi/js3d/js3d/project/src/display/viewport.ts +239 -0
  755. package/resources/targets/kimi/js3d/js3d/project/src/main.ts +85 -0
  756. package/resources/targets/kimi/js3d/js3d/project/src/platform.ts +2 -0
  757. package/resources/targets/kimi/js3d/js3d/project/src/style.css +83 -0
  758. package/resources/targets/kimi/js3d/js3d/project/tsconfig.json +20 -0
  759. package/resources/targets/kimi/js3d/js3d/project/unified_data_control_config.json +20 -0
  760. package/resources/targets/kimi/js3d/js3d/project/vite.config.ts +5 -0
  761. package/resources/targets/kimi/js3d/recovery.md +13 -0
  762. package/resources/targets/kimi/js3d/target.json +60 -0
  763. package/resources/targets/workbuddy/js/bootstrap/SKILL.md +24 -14
  764. package/resources/targets/workbuddy/js/context-filter-report.json +27 -0
  765. package/resources/targets/workbuddy/js/craft-game-maker/SKILL.md +18 -19
  766. package/resources/targets/workbuddy/js/craft-game-maker/js.md +2 -2
  767. package/resources/targets/workbuddy/js/js/bundle.json +16 -18
  768. package/resources/targets/workbuddy/js/js/context/AGENTS.md +29 -25
  769. package/resources/targets/workbuddy/js/js/context/knowledge/AssetUrl.md +4 -4
  770. package/resources/targets/workbuddy/js/js/context/knowledge/AssetWiring.md +7 -0
  771. package/resources/targets/workbuddy/js/js/context/knowledge/ResourceLoading.md +9 -0
  772. package/resources/targets/workbuddy/js/js/context/skills/export-config/SKILL.md +2 -2
  773. package/resources/targets/workbuddy/js/js/context/skills/index.json +2 -14
  774. package/resources/targets/workbuddy/js/js/context/skills/visual-qa/SKILL.md +1 -1
  775. package/resources/targets/workbuddy/js/recovery.md +19 -7
  776. package/resources/targets/workbuddy/js/target.json +1 -1
  777. package/resources/targets/workbuddy/js3d/bootstrap/SKILL.md +24 -14
  778. package/resources/targets/workbuddy/js3d/context-filter-report.json +27 -0
  779. package/resources/targets/workbuddy/js3d/craft-game-maker/SKILL.md +18 -19
  780. package/resources/targets/workbuddy/js3d/craft-game-maker/js3d.md +3 -4
  781. package/resources/targets/workbuddy/js3d/js3d/bundle.json +19 -21
  782. package/resources/targets/workbuddy/js3d/js3d/context/AGENTS.md +30 -26
  783. package/resources/targets/workbuddy/js3d/js3d/context/knowledge/AssetUrl.md +4 -4
  784. package/resources/targets/workbuddy/js3d/js3d/context/knowledge/AssetWiring.md +7 -0
  785. package/resources/targets/workbuddy/js3d/js3d/context/knowledge/ResourceLoading.md +11 -0
  786. package/resources/targets/workbuddy/js3d/js3d/context/skills/asset-usage-audit/SKILL.md +1 -1
  787. package/resources/targets/workbuddy/js3d/js3d/context/skills/asset-usage-audit/scripts/lib/scan.mjs +2 -2
  788. package/resources/targets/workbuddy/js3d/js3d/context/skills/export-config/SKILL.md +2 -2
  789. package/resources/targets/workbuddy/js3d/js3d/context/skills/index.json +4 -16
  790. package/resources/targets/workbuddy/js3d/js3d/context/skills/performance-audit/SKILL.md +1 -1
  791. package/resources/targets/workbuddy/js3d/js3d/context/skills/visual-qa/SKILL.md +1 -1
  792. package/resources/targets/workbuddy/js3d/recovery.md +19 -7
  793. package/resources/targets/workbuddy/js3d/target.json +1 -1
  794. package/resources/targets/zcode/js/bootstrap/SKILL.md +18 -0
  795. package/resources/targets/zcode/js/context-filter-report.json +27 -0
  796. package/resources/targets/zcode/js/craft-game-maker/SKILL.md +76 -0
  797. package/resources/targets/zcode/js/craft-game-maker/js.md +10 -0
  798. package/resources/targets/zcode/js/js/bundle.json +97 -0
  799. package/resources/targets/zcode/js/js/context/AGENTS.md +29 -0
  800. package/resources/targets/zcode/js/js/context/hooks/hooks.json +14 -0
  801. package/resources/targets/zcode/js/js/context/knowledge/AssetUrl.md +9 -0
  802. package/resources/targets/zcode/js/js/context/knowledge/AssetWiring.md +7 -0
  803. package/resources/targets/zcode/js/js/context/knowledge/Layout.md +7 -0
  804. package/resources/targets/zcode/js/js/context/knowledge/Lifecycle.md +11 -0
  805. package/resources/targets/zcode/js/js/context/knowledge/ResourceLoading.md +9 -0
  806. package/resources/targets/zcode/js/js/context/skills/export-config/SKILL.md +16 -0
  807. package/resources/targets/zcode/js/js/context/skills/export-config/assets/tooling/cli.mjs +20 -0
  808. package/resources/targets/zcode/js/js/context/skills/export-config/assets/tooling/config.d.mts +19 -0
  809. package/resources/targets/zcode/js/js/context/skills/export-config/assets/tooling/config.mjs +1 -0
  810. package/resources/targets/zcode/js/js/context/skills/export-config/assets/tooling/project.d.mts +6 -0
  811. package/resources/targets/zcode/js/js/context/skills/export-config/assets/tooling/project.mjs +77 -0
  812. package/resources/targets/zcode/js/js/context/skills/export-config/assets/tooling/vite.d.mts +2 -0
  813. package/resources/targets/zcode/js/js/context/skills/export-config/assets/tooling/vite.mjs +34 -0
  814. package/resources/targets/zcode/js/js/context/skills/export-config/scripts/export-config.mjs +4 -0
  815. package/resources/targets/zcode/js/js/context/skills/export-config/scripts/install.mjs +89 -0
  816. package/resources/targets/zcode/js/js/context/skills/export-config/scripts/panel-resource-path.mjs +106 -0
  817. package/resources/targets/zcode/js/js/context/skills/index.json +19 -0
  818. package/resources/targets/zcode/js/js/context/skills/visual-qa/SKILL.md +14 -0
  819. package/resources/targets/zcode/js/js/project/README.md +7 -0
  820. package/resources/targets/zcode/js/js/project/configs/assets.json +1 -0
  821. package/resources/targets/zcode/js/js/project/configs/game.controls.json +3 -0
  822. package/resources/targets/zcode/js/js/project/configs/game.json +3 -0
  823. package/resources/targets/zcode/js/js/project/game-runtime.json +7 -0
  824. package/resources/targets/zcode/js/js/project/game.config.json +7 -0
  825. package/resources/targets/zcode/js/js/project/index.html +20 -0
  826. package/resources/targets/zcode/js/js/project/package.json +22 -0
  827. package/resources/targets/zcode/js/js/project/runtime/lightgame/1.1.0/platform/identity/qq-ai-game-sdk.min.js +5 -0
  828. package/resources/targets/zcode/js/js/project/runtime/lightgame/1.1.0/platform/identity/qq-session.mjs +208 -0
  829. package/resources/targets/zcode/js/js/project/runtime/lightgame/1.1.0/platform/identity/shared.mjs +37 -0
  830. package/resources/targets/zcode/js/js/project/runtime/lightgame/1.1.0/platform/platform-capture-video.mjs +227 -0
  831. package/resources/targets/zcode/js/js/project/runtime/lightgame/1.1.0/platform/platform-service.d.mts +31 -0
  832. package/resources/targets/zcode/js/js/project/runtime/lightgame/1.1.0/platform/platform-service.mjs +272 -0
  833. package/resources/targets/zcode/js/js/project/runtime/lightgame/1.1.0/platform/platform.d.mts +79 -0
  834. package/resources/targets/zcode/js/js/project/runtime/lightgame/1.1.0/platform/platform.mjs +29 -0
  835. package/resources/targets/zcode/js/js/project/runtime/lightgame/1.1.0/release.json +22 -0
  836. package/resources/targets/zcode/js/js/project/runtime/lightgame/1.1.0/tooling/cli.mjs +16 -0
  837. package/resources/targets/zcode/js/js/project/runtime/lightgame/1.1.0/tooling/project.d.mts +4 -0
  838. package/resources/targets/zcode/js/js/project/runtime/lightgame/1.1.0/tooling/project.mjs +50 -0
  839. package/resources/targets/zcode/js/js/project/runtime/lightgame/1.1.0/tooling/vite.d.mts +3 -0
  840. package/resources/targets/zcode/js/js/project/runtime/lightgame/1.1.0/tooling/vite.mjs +72 -0
  841. package/resources/targets/zcode/js/js/project/runtime/lightgame/1.1.0/tools/assets.d.mts +24 -0
  842. package/resources/targets/zcode/js/js/project/runtime/lightgame/1.1.0/tools/assets.mjs +2 -0
  843. package/resources/targets/zcode/js/js/project/runtime/lightgame/1.1.0/tools/astc.d.mts +10 -0
  844. package/resources/targets/zcode/js/js/project/runtime/lightgame/1.1.0/tools/astc.mjs +1 -0
  845. package/resources/targets/zcode/js/js/project/scripts/config-export/assert-asset-wiring.mjs +72 -0
  846. package/resources/targets/zcode/js/js/project/scripts/config-export/panel-resource-path.mjs +106 -0
  847. package/resources/targets/zcode/js/js/project/scripts/config-export/sync-asset-controls.mjs +316 -0
  848. package/resources/targets/zcode/js/js/project/scripts/config-export.mjs +13 -0
  849. package/resources/targets/zcode/js/js/project/scripts/skill-modules/export-config/cli.mjs +20 -0
  850. package/resources/targets/zcode/js/js/project/scripts/skill-modules/export-config/config.d.mts +19 -0
  851. package/resources/targets/zcode/js/js/project/scripts/skill-modules/export-config/config.mjs +1 -0
  852. package/resources/targets/zcode/js/js/project/scripts/skill-modules/export-config/installed.json +6 -0
  853. package/resources/targets/zcode/js/js/project/scripts/skill-modules/export-config/project.d.mts +6 -0
  854. package/resources/targets/zcode/js/js/project/scripts/skill-modules/export-config/project.mjs +77 -0
  855. package/resources/targets/zcode/js/js/project/scripts/skill-modules/export-config/vite.d.mts +2 -0
  856. package/resources/targets/zcode/js/js/project/scripts/skill-modules/export-config/vite.mjs +34 -0
  857. package/resources/targets/zcode/js/js/project/scripts/write-preview-ready.mjs +22 -0
  858. package/resources/targets/zcode/js/js/project/src/display/ui-stage.ts +156 -0
  859. package/resources/targets/zcode/js/js/project/src/display/viewport.ts +249 -0
  860. package/resources/targets/zcode/js/js/project/src/main.ts +87 -0
  861. package/resources/targets/zcode/js/js/project/src/platform.ts +2 -0
  862. package/resources/targets/zcode/js/js/project/src/scenes/LoadScene.ts +89 -0
  863. package/resources/targets/zcode/js/js/project/src/scenes/PlayScene.ts +17 -0
  864. package/resources/targets/zcode/js/js/project/src/screenUi.ts +185 -0
  865. package/resources/targets/zcode/js/js/project/src/style.css +294 -0
  866. package/resources/targets/zcode/js/js/project/tsconfig.json +20 -0
  867. package/resources/targets/zcode/js/js/project/unified_data_control_config.json +20 -0
  868. package/resources/targets/zcode/js/js/project/vite.config.ts +5 -0
  869. package/resources/targets/zcode/js/recovery.md +13 -0
  870. package/resources/targets/zcode/js/target.json +61 -0
  871. package/resources/targets/zcode/js3d/bootstrap/SKILL.md +18 -0
  872. package/resources/targets/zcode/js3d/context-filter-report.json +27 -0
  873. package/resources/targets/zcode/js3d/craft-game-maker/SKILL.md +76 -0
  874. package/resources/targets/zcode/js3d/craft-game-maker/js3d.md +12 -0
  875. package/resources/targets/zcode/js3d/js3d/bundle.json +108 -0
  876. package/resources/targets/zcode/js3d/js3d/context/AGENTS.md +30 -0
  877. package/resources/targets/zcode/js3d/js3d/context/hooks/hooks.json +14 -0
  878. package/resources/targets/zcode/js3d/js3d/context/knowledge/AssetUrl.md +9 -0
  879. package/resources/targets/zcode/js3d/js3d/context/knowledge/AssetWiring.md +7 -0
  880. package/resources/targets/zcode/js3d/js3d/context/knowledge/CodingGuide/Pitfalls.md +11 -0
  881. package/resources/targets/zcode/js3d/js3d/context/knowledge/Layout.md +7 -0
  882. package/resources/targets/zcode/js3d/js3d/context/knowledge/ResourceLoading.md +11 -0
  883. package/resources/targets/zcode/js3d/js3d/context/knowledge/Runtime.md +9 -0
  884. package/resources/targets/zcode/js3d/js3d/context/skills/asset-usage-audit/SKILL.md +16 -0
  885. package/resources/targets/zcode/js3d/js3d/context/skills/asset-usage-audit/scripts/compare-animations.mjs +48 -0
  886. package/resources/targets/zcode/js3d/js3d/context/skills/asset-usage-audit/scripts/lib/anim.mjs +266 -0
  887. package/resources/targets/zcode/js3d/js3d/context/skills/asset-usage-audit/scripts/lib/glb.mjs +241 -0
  888. package/resources/targets/zcode/js3d/js3d/context/skills/asset-usage-audit/scripts/lib/scan.mjs +455 -0
  889. package/resources/targets/zcode/js3d/js3d/context/skills/asset-usage-audit/scripts/scan-assets.mjs +77 -0
  890. package/resources/targets/zcode/js3d/js3d/context/skills/export-config/SKILL.md +16 -0
  891. package/resources/targets/zcode/js3d/js3d/context/skills/export-config/assets/tooling/cli.mjs +20 -0
  892. package/resources/targets/zcode/js3d/js3d/context/skills/export-config/assets/tooling/config.d.mts +19 -0
  893. package/resources/targets/zcode/js3d/js3d/context/skills/export-config/assets/tooling/config.mjs +1 -0
  894. package/resources/targets/zcode/js3d/js3d/context/skills/export-config/assets/tooling/project.d.mts +6 -0
  895. package/resources/targets/zcode/js3d/js3d/context/skills/export-config/assets/tooling/project.mjs +77 -0
  896. package/resources/targets/zcode/js3d/js3d/context/skills/export-config/assets/tooling/vite.d.mts +2 -0
  897. package/resources/targets/zcode/js3d/js3d/context/skills/export-config/assets/tooling/vite.mjs +34 -0
  898. package/resources/targets/zcode/js3d/js3d/context/skills/export-config/scripts/export-config.mjs +4 -0
  899. package/resources/targets/zcode/js3d/js3d/context/skills/export-config/scripts/install.mjs +89 -0
  900. package/resources/targets/zcode/js3d/js3d/context/skills/export-config/scripts/panel-resource-path.mjs +106 -0
  901. package/resources/targets/zcode/js3d/js3d/context/skills/index.json +31 -0
  902. package/resources/targets/zcode/js3d/js3d/context/skills/performance-audit/SKILL.md +21 -0
  903. package/resources/targets/zcode/js3d/js3d/context/skills/performance-audit/scripts/lib/rules.mjs +470 -0
  904. package/resources/targets/zcode/js3d/js3d/context/skills/performance-audit/scripts/lib/scan.mjs +387 -0
  905. package/resources/targets/zcode/js3d/js3d/context/skills/performance-audit/scripts/lib/source.mjs +398 -0
  906. package/resources/targets/zcode/js3d/js3d/context/skills/performance-audit/scripts/scan-perf.mjs +130 -0
  907. package/resources/targets/zcode/js3d/js3d/context/skills/visual-qa/SKILL.md +14 -0
  908. package/resources/targets/zcode/js3d/js3d/project/README.md +7 -0
  909. package/resources/targets/zcode/js3d/js3d/project/configs/game.controls.json +3 -0
  910. package/resources/targets/zcode/js3d/js3d/project/configs/game.json +3 -0
  911. package/resources/targets/zcode/js3d/js3d/project/game-runtime.json +7 -0
  912. package/resources/targets/zcode/js3d/js3d/project/game.config.json +7 -0
  913. package/resources/targets/zcode/js3d/js3d/project/index.html +12 -0
  914. package/resources/targets/zcode/js3d/js3d/project/package.json +23 -0
  915. package/resources/targets/zcode/js3d/js3d/project/runtime/lightgame/1.1.0/platform/identity/qq-ai-game-sdk.min.js +5 -0
  916. package/resources/targets/zcode/js3d/js3d/project/runtime/lightgame/1.1.0/platform/identity/qq-session.mjs +208 -0
  917. package/resources/targets/zcode/js3d/js3d/project/runtime/lightgame/1.1.0/platform/identity/shared.mjs +37 -0
  918. package/resources/targets/zcode/js3d/js3d/project/runtime/lightgame/1.1.0/platform/platform-capture-video.mjs +227 -0
  919. package/resources/targets/zcode/js3d/js3d/project/runtime/lightgame/1.1.0/platform/platform-service.d.mts +31 -0
  920. package/resources/targets/zcode/js3d/js3d/project/runtime/lightgame/1.1.0/platform/platform-service.mjs +272 -0
  921. package/resources/targets/zcode/js3d/js3d/project/runtime/lightgame/1.1.0/platform/platform.d.mts +79 -0
  922. package/resources/targets/zcode/js3d/js3d/project/runtime/lightgame/1.1.0/platform/platform.mjs +30 -0
  923. package/resources/targets/zcode/js3d/js3d/project/runtime/lightgame/1.1.0/release.json +24 -0
  924. package/resources/targets/zcode/js3d/js3d/project/runtime/lightgame/1.1.0/tooling/cli.mjs +16 -0
  925. package/resources/targets/zcode/js3d/js3d/project/runtime/lightgame/1.1.0/tooling/project.d.mts +4 -0
  926. package/resources/targets/zcode/js3d/js3d/project/runtime/lightgame/1.1.0/tooling/project.mjs +50 -0
  927. package/resources/targets/zcode/js3d/js3d/project/runtime/lightgame/1.1.0/tooling/vite.d.mts +3 -0
  928. package/resources/targets/zcode/js3d/js3d/project/runtime/lightgame/1.1.0/tooling/vite.mjs +72 -0
  929. package/resources/targets/zcode/js3d/js3d/project/runtime/lightgame/1.1.0/tools/assets.d.mts +24 -0
  930. package/resources/targets/zcode/js3d/js3d/project/runtime/lightgame/1.1.0/tools/assets.mjs +2 -0
  931. package/resources/targets/zcode/js3d/js3d/project/runtime/lightgame/1.1.0/tools/astc.d.mts +10 -0
  932. package/resources/targets/zcode/js3d/js3d/project/runtime/lightgame/1.1.0/tools/astc.mjs +1 -0
  933. package/resources/targets/zcode/js3d/js3d/project/runtime/lightgame/1.1.0/tools/glb.d.mts +26 -0
  934. package/resources/targets/zcode/js3d/js3d/project/runtime/lightgame/1.1.0/tools/glb.mjs +351 -0
  935. package/resources/targets/zcode/js3d/js3d/project/scripts/config-export/assert-asset-wiring.mjs +97 -0
  936. package/resources/targets/zcode/js3d/js3d/project/scripts/config-export/panel-resource-path.mjs +106 -0
  937. package/resources/targets/zcode/js3d/js3d/project/scripts/config-export/sync-asset-controls.mjs +327 -0
  938. package/resources/targets/zcode/js3d/js3d/project/scripts/config-export/sync-scene-assets.mjs +191 -0
  939. package/resources/targets/zcode/js3d/js3d/project/scripts/config-export.mjs +15 -0
  940. package/resources/targets/zcode/js3d/js3d/project/scripts/skill-modules/export-config/cli.mjs +20 -0
  941. package/resources/targets/zcode/js3d/js3d/project/scripts/skill-modules/export-config/config.d.mts +19 -0
  942. package/resources/targets/zcode/js3d/js3d/project/scripts/skill-modules/export-config/config.mjs +1 -0
  943. package/resources/targets/zcode/js3d/js3d/project/scripts/skill-modules/export-config/installed.json +6 -0
  944. package/resources/targets/zcode/js3d/js3d/project/scripts/skill-modules/export-config/project.d.mts +6 -0
  945. package/resources/targets/zcode/js3d/js3d/project/scripts/skill-modules/export-config/project.mjs +77 -0
  946. package/resources/targets/zcode/js3d/js3d/project/scripts/skill-modules/export-config/vite.d.mts +2 -0
  947. package/resources/targets/zcode/js3d/js3d/project/scripts/skill-modules/export-config/vite.mjs +34 -0
  948. package/resources/targets/zcode/js3d/js3d/project/scripts/write-preview-ready.mjs +22 -0
  949. package/resources/targets/zcode/js3d/js3d/project/src/display/ui-stage.ts +156 -0
  950. package/resources/targets/zcode/js3d/js3d/project/src/display/viewport.ts +239 -0
  951. package/resources/targets/zcode/js3d/js3d/project/src/main.ts +85 -0
  952. package/resources/targets/zcode/js3d/js3d/project/src/platform.ts +2 -0
  953. package/resources/targets/zcode/js3d/js3d/project/src/style.css +83 -0
  954. package/resources/targets/zcode/js3d/js3d/project/tsconfig.json +20 -0
  955. package/resources/targets/zcode/js3d/js3d/project/unified_data_control_config.json +20 -0
  956. package/resources/targets/zcode/js3d/js3d/project/vite.config.ts +5 -0
  957. package/resources/targets/zcode/js3d/recovery.md +13 -0
  958. package/resources/targets/zcode/js3d/target.json +60 -0
  959. package/vendor/craft-runtime/SOURCE.json +2 -2
  960. package/resources/targets/codebuddy/js/js/context/knowledge/AigcWiring.md +0 -9
  961. package/resources/targets/codebuddy/js/js/context/skills/aigc-generate/SKILL.md +0 -14
  962. package/resources/targets/codebuddy/js/js/context/skills/asset-search/SKILL.md +0 -12
  963. package/resources/targets/codebuddy/js/js/context/skills/asset-search/references/resource-config.md +0 -9
  964. package/resources/targets/codebuddy/js3d/js3d/context/knowledge/AigcWiring.md +0 -9
  965. package/resources/targets/codebuddy/js3d/js3d/context/skills/aigc-integration/SKILL.md +0 -14
  966. package/resources/targets/codebuddy/js3d/js3d/context/skills/asset-search/SKILL.md +0 -12
  967. package/resources/targets/codex/js/js/context/knowledge/AigcWiring.md +0 -9
  968. package/resources/targets/codex/js/js/context/skills/aigc-generate/SKILL.md +0 -14
  969. package/resources/targets/codex/js/js/context/skills/asset-search/SKILL.md +0 -12
  970. package/resources/targets/codex/js/js/context/skills/asset-search/references/resource-config.md +0 -9
  971. package/resources/targets/codex/js3d/js3d/context/knowledge/AigcWiring.md +0 -9
  972. package/resources/targets/codex/js3d/js3d/context/skills/aigc-integration/SKILL.md +0 -14
  973. package/resources/targets/codex/js3d/js3d/context/skills/asset-search/SKILL.md +0 -12
  974. package/resources/targets/workbuddy/js/js/context/knowledge/AigcWiring.md +0 -9
  975. package/resources/targets/workbuddy/js/js/context/skills/aigc-generate/SKILL.md +0 -14
  976. package/resources/targets/workbuddy/js/js/context/skills/asset-search/SKILL.md +0 -12
  977. package/resources/targets/workbuddy/js/js/context/skills/asset-search/references/resource-config.md +0 -9
  978. package/resources/targets/workbuddy/js3d/js3d/context/knowledge/AigcWiring.md +0 -9
  979. package/resources/targets/workbuddy/js3d/js3d/context/skills/aigc-integration/SKILL.md +0 -14
  980. package/resources/targets/workbuddy/js3d/js3d/context/skills/asset-search/SKILL.md +0 -12
@@ -0,0 +1,24 @@
1
+ export interface AssetUrlOptions { cdnBaseUrl?: string; baseUrl?: string }
2
+ export function resolveAssetUrl(path: string, options?: AssetUrlOptions): string;
3
+ export function decodeImage(blob: Blob, options?: { signal?: AbortSignal }): Promise<ImageBitmap | HTMLImageElement>;
4
+ export interface AssetProgress { active: number; queued: number; completed: number; total: number; ratio: number }
5
+ export interface AssetLoadOptions { type?: string; signal?: AbortSignal }
6
+ export interface AssetLoaderOptions extends AssetUrlOptions {
7
+ concurrency?: number;
8
+ fetch?: typeof fetch;
9
+ decodeImage?: (blob: Blob, options: { signal: AbortSignal }) => Promise<unknown>;
10
+ loaders?: Record<string, (url: string, options: { signal: AbortSignal }) => Promise<unknown>>;
11
+ disposeResource?: (value: unknown, type: string) => void;
12
+ onProgress?: (progress: AssetProgress) => void;
13
+ }
14
+ export interface AssetLoader {
15
+ load<T = ImageBitmap | HTMLImageElement>(path: string, options?: AssetLoadOptions): Promise<T>;
16
+ loadAll<T = unknown>(items: readonly (string | ({ path: string } & AssetLoadOptions))[], options?: { signal?: AbortSignal }): Promise<T[]>;
17
+ get<T = unknown>(path: string, type?: string): T | undefined;
18
+ has(path: string, type?: string): boolean;
19
+ progress(): AssetProgress;
20
+ release(path: string, type?: string): boolean;
21
+ clear(): void;
22
+ dispose(): void;
23
+ }
24
+ export function createAssetLoader(options?: AssetLoaderOptions): AssetLoader;
@@ -0,0 +1,2 @@
1
+ var __defProp=Object.defineProperty;var __name=(target,value)=>__defProp(target,"name",{value,configurable:true});function resolveAssetUrl(path,{cdnBaseUrl="",baseUrl}={}){const value=String(path??"").trim();if(!value)throw new TypeError("Asset path must not be empty");if(/^(?:[a-z][a-z\d+.-]*:|\/\/)/i.test(value))return value;const encoded=encodeURI(value).replace(/%25([\da-f]{2})/gi,"%$1");const localPrefix=/^(?:assets|game|res|cfg|fonts)\//.test(value);if(cdnBaseUrl&&!localPrefix&&(value.startsWith("/Game/")||!/^(?:\/|\.\.?\/)/.test(value))){return`${cdnBaseUrl.replace(/\/+$/,"")}/${encoded.replace(/^\/+/,"")}`}return baseUrl?new URL(encoded,baseUrl).href:encoded}__name(resolveAssetUrl,"resolveAssetUrl");function abortError(){return new DOMException("Asset load cancelled","AbortError")}__name(abortError,"abortError");function disposeValue(value){value?.close?.()}__name(disposeValue,"disposeValue");async function decodeImage(blob,{signal}={}){if(signal?.aborted)throw signal.reason??abortError();if(typeof globalThis.createImageBitmap==="function"){const bitmap=await globalThis.createImageBitmap(blob);if(signal?.aborted){bitmap.close();throw signal.reason??abortError()}return bitmap}if(typeof globalThis.Image!=="function")throw new Error("Image decoding requires createImageBitmap or a browser Image");return new Promise((resolve,reject)=>{const image=new globalThis.Image;const url=URL.createObjectURL(blob);const cleanup=__name(()=>{image.onload=image.onerror=null;signal?.removeEventListener("abort",cancel);URL.revokeObjectURL(url)},"cleanup");const cancel=__name(()=>{cleanup();image.removeAttribute("src");reject(signal.reason??abortError())},"cancel");image.onload=()=>{cleanup();resolve(image)};image.onerror=()=>{cleanup();reject(new Error("Image decode failed"))};signal?.addEventListener("abort",cancel,{once:true});image.src=url})}__name(decodeImage,"decodeImage");function createAssetLoader(options={}){const concurrency=options.concurrency??4;if(!Number.isInteger(concurrency)||concurrency<1)throw new RangeError("concurrency must be a positive integer");const fetcher=options.fetch??globalThis.fetch;const imageDecoder=options.decodeImage??decodeImage;const cache=new Map;const pending=new Map;const queue=[];let active=0,total=0,completed=0,disposed=false;const keyFor=__name((path,type)=>`${type}
2
+ ${resolveAssetUrl(path,options)}`,"keyFor");const progress=__name(()=>({active,queued:queue.filter(j=>!j.controller.signal.aborted).length,completed,total,ratio:total?completed/total:1}),"progress");const report=__name(()=>{try{options.onProgress?.(progress())}catch{}},"report");const free=__name(entry=>{(options.disposeResource??disposeValue)(entry.value,entry.type)},"free");async function fetchValue(job){const{signal}=job.controller;if(options.loaders?.[job.type])return options.loaders[job.type](job.url,{signal});if(typeof fetcher!=="function")throw new Error("Provide fetch to load assets in this environment");const response=await fetcher(job.url,{signal});if(!response.ok)throw new Error(`HTTP ${response.status} loading ${job.url}`);switch(job.type){case"json":return response.json();case"text":return response.text();case"binary":return response.arrayBuffer();case"blob":return response.blob();case"image":return imageDecoder(await response.blob(),{signal});default:throw new TypeError(`Unknown asset type '${job.type}'; provide a loader for it`)}}__name(fetchValue,"fetchValue");function pump(){while(active<concurrency&&queue.length){const job=queue.shift();if(job.controller.signal.aborted){finish(job,void 0,job.controller.signal.reason??abortError());continue}active++;job.started=true;report();Promise.resolve().then(()=>fetchValue(job)).then(value=>{if(job.controller.signal.aborted||disposed){let cleanupError;try{free({value,type:job.type})}catch(error){cleanupError=error}finish(job,void 0,cleanupError??job.controller.signal.reason??abortError())}else finish(job,value)},error=>finish(job,void 0,error))}}__name(pump,"pump");function finish(job,value,error){if(job.started)active--;if(pending.get(job.key)===job)pending.delete(job.key);completed++;if(!error)cache.set(job.key,{value,type:job.type});else if(!job.controller.signal.aborted&&error?.name!=="AbortError")error=new Error(`Failed to load ${job.type} asset '${job.url}': ${error?.message??String(error)}`,{cause:error});for(const subscriber of job.subscribers){subscriber.cleanup();if(error)subscriber.reject(error);else subscriber.resolve(value)}job.subscribers.clear();report();queueMicrotask(pump)}__name(finish,"finish");function load(path,{type="image",signal}={}){if(disposed)return Promise.reject(new Error("Asset loader is disposed"));if(signal?.aborted)return Promise.reject(signal.reason??abortError());const url=resolveAssetUrl(path,options);const key=keyFor(path,type);if(cache.has(key))return Promise.resolve(cache.get(key).value);let job=pending.get(key);if(!job||job.controller.signal.aborted){job={key,url,type,controller:new AbortController,subscribers:new Set,started:false};pending.set(key,job);queue.push(job);total++}return new Promise((resolve,reject)=>{const cancel=__name(()=>{subscriber.cleanup();job.subscribers.delete(subscriber);reject(signal.reason??abortError());if(!job.subscribers.size)job.controller.abort(abortError())},"cancel");const subscriber={resolve,reject,cleanup:__name(()=>signal?.removeEventListener("abort",cancel),"cleanup")};job.subscribers.add(subscriber);signal?.addEventListener("abort",cancel,{once:true});pump()})}__name(load,"load");function release(path,type="image"){const key=keyFor(path,type);const job=pending.get(key);if(job){job.controller.abort(abortError());for(const sub of job.subscribers){sub.cleanup();sub.reject(job.controller.signal.reason)}job.subscribers.clear()}const entry=cache.get(key);if(entry){cache.delete(key);free(entry)}return Boolean(job||entry)}__name(release,"release");function clear(){for(const job of pending.values()){job.controller.abort(abortError());for(const sub of job.subscribers){sub.cleanup();sub.reject(job.controller.signal.reason)}job.subscribers.clear()}const entries=[...cache.values()];cache.clear();const errors=[];for(const entry of entries){try{free(entry)}catch(error){errors.push(error)}}if(errors.length)throw new AggregateError(errors,"Asset resource cleanup failed")}__name(clear,"clear");return{load,loadAll:__name((items,{signal}={})=>Promise.all(items.map(item=>typeof item==="string"?load(item,{signal}):load(item.path,{...item,signal:item.signal??signal}))),"loadAll"),get:__name((path,type="image")=>cache.get(keyFor(path,type))?.value,"get"),has:__name((path,type="image")=>cache.has(keyFor(path,type)),"has"),progress,release,clear,dispose(){if(!disposed){disposed=true;clear()}}}}__name(createAssetLoader,"createAssetLoader");export{createAssetLoader,decodeImage,resolveAssetUrl};
@@ -0,0 +1,10 @@
1
+ import type { AssetUrlOptions } from './assets.mjs';
2
+ export function supportsAstc(gl: WebGLRenderingContext | WebGL2RenderingContext): boolean;
3
+ export function toAstcKtxUrl(url: string): string | null;
4
+ export interface AstcTextureData { width: number; height: number; internalFormat: number; mipmaps: { width: number; height: number; data: Uint8Array }[] }
5
+ export function parseAstcKtx(buffer: ArrayBuffer): AstcTextureData;
6
+ export function loadAstcTexture(gl: WebGLRenderingContext | WebGL2RenderingContext, url: string, options?: AssetUrlOptions & {
7
+ fallbackUrl?: string; fetch?: typeof fetch; signal?: AbortSignal;
8
+ decodeImage?: (blob: Blob, options: { signal?: AbortSignal }) => Promise<ImageBitmap | HTMLImageElement>;
9
+ onFallback?: (error: unknown) => void;
10
+ }): Promise<{ texture: WebGLTexture; width: number; height: number; format: 'astc' | 'image'; dispose(): void }>;
@@ -0,0 +1 @@
1
+ var __defProp=Object.defineProperty;var __name=(target,value)=>__defProp(target,"name",{value,configurable:true});function resolveAssetUrl(path,{cdnBaseUrl="",baseUrl}={}){const value=String(path??"").trim();if(!value)throw new TypeError("Asset path must not be empty");if(/^(?:[a-z][a-z\d+.-]*:|\/\/)/i.test(value))return value;const encoded=encodeURI(value).replace(/%25([\da-f]{2})/gi,"%$1");const localPrefix=/^(?:assets|game|res|cfg|fonts)\//.test(value);if(cdnBaseUrl&&!localPrefix&&(value.startsWith("/Game/")||!/^(?:\/|\.\.?\/)/.test(value))){return`${cdnBaseUrl.replace(/\/+$/,"")}/${encoded.replace(/^\/+/,"")}`}return baseUrl?new URL(encoded,baseUrl).href:encoded}__name(resolveAssetUrl,"resolveAssetUrl");function abortError(){return new DOMException("Asset load cancelled","AbortError")}__name(abortError,"abortError");async function decodeImage(blob,{signal}={}){if(signal?.aborted)throw signal.reason??abortError();if(typeof globalThis.createImageBitmap==="function"){const bitmap=await globalThis.createImageBitmap(blob);if(signal?.aborted){bitmap.close();throw signal.reason??abortError()}return bitmap}if(typeof globalThis.Image!=="function")throw new Error("Image decoding requires createImageBitmap or a browser Image");return new Promise((resolve,reject)=>{const image=new globalThis.Image;const url=URL.createObjectURL(blob);const cleanup=__name(()=>{image.onload=image.onerror=null;signal?.removeEventListener("abort",cancel);URL.revokeObjectURL(url)},"cleanup");const cancel=__name(()=>{cleanup();image.removeAttribute("src");reject(signal.reason??abortError())},"cancel");image.onload=()=>{cleanup();resolve(image)};image.onerror=()=>{cleanup();reject(new Error("Image decode failed"))};signal?.addEventListener("abort",cancel,{once:true});image.src=url})}__name(decodeImage,"decodeImage");function supportsAstc(gl){return Boolean(gl&&!gl.isContextLost?.()&&(gl.getExtension("WEBGL_compressed_texture_astc")||gl.getExtension("WEBKIT_WEBGL_compressed_texture_astc")))}__name(supportsAstc,"supportsAstc");function toAstcKtxUrl(url){if(/^(?:data:|blob:)/i.test(url))return null;const match=String(url).match(/^([^?#]*)([?#].*)?$/);return match&&/\.(?:png|jpe?g)$/i.test(match[1])?`${match[1].replace(/\.(?:png|jpe?g)$/i,".ktx")}${match[2]??""}`:null}__name(toAstcKtxUrl,"toAstcKtxUrl");function parseAstcKtx(buffer){if(!(buffer instanceof ArrayBuffer)||buffer.byteLength<64)throw new TypeError("KTX v1 requires at least 64 bytes");const bytes=new Uint8Array(buffer),magic=[171,75,84,88,32,49,49,187,13,10,26,10];if(!magic.every((value,i)=>bytes[i]===value))throw new Error("Invalid KTX v1 identifier");const view=new DataView(buffer),marker=view.getUint32(12,true);if(marker!==67305985&&marker!==16909060)throw new Error("Invalid KTX byte order");const littleEndian=marker===67305985,read=__name(offset2=>view.getUint32(offset2,littleEndian),"read");const internalFormat=read(28),width=read(36),height=read(40),levels=read(56)||1;const formatIndex=internalFormat>=37808&&internalFormat<=37821?internalFormat-37808:internalFormat>=37840&&internalFormat<=37853?internalFormat-37840:-1;if(formatIndex<0||read(16)!==0||read(20)!==1||read(24)!==0||read(32)!==6408)throw new Error("KTX is not an ASTC RGBA compressed texture");if(!width||!height||read(44)!==0||read(48)!==0||read(52)!==1)throw new Error("Only nonempty 2D, nonarray KTX textures are supported");if(levels>Math.floor(Math.log2(Math.max(width,height)))+1)throw new Error("Invalid KTX mip count");const blockSizes=[[4,4],[5,4],[5,5],[6,5],[6,6],[8,5],[8,6],[8,8],[10,5],[10,6],[10,8],[10,10],[12,10],[12,12]];const[blockWidth,blockHeight]=blockSizes[formatIndex],mipmaps=[];let offset=64+read(60);if(offset%4!==0||offset>buffer.byteLength)throw new Error("Invalid KTX metadata size");for(let level=0;level<levels;level++){if(offset+4>buffer.byteLength)throw new Error("Truncated KTX mip header");const size=read(offset);offset+=4;const mipWidth=Math.max(1,Math.floor(width/2**level)),mipHeight=Math.max(1,Math.floor(height/2**level));const expected=Math.ceil(mipWidth/blockWidth)*Math.ceil(mipHeight/blockHeight)*16;if(size!==expected||offset+size>buffer.byteLength)throw new Error("Invalid or truncated ASTC mip data");mipmaps.push({width:mipWidth,height:mipHeight,data:new Uint8Array(buffer,offset,size)});offset+=size+(4-size%4)%4}return{width,height,internalFormat,mipmaps}}__name(parseAstcKtx,"parseAstcKtx");function checkSignal(signal){if(signal?.aborted)throw signal.reason??new DOMException("Texture load cancelled","AbortError")}__name(checkSignal,"checkSignal");async function loadAstcTexture(gl,url,options={}){if(!gl||typeof gl.createTexture!=="function")throw new TypeError("A WebGL rendering context is required; Canvas 2D is unsupported");if(gl.isContextLost?.())throw new Error("WebGL context is lost");const fetcher=options.fetch??globalThis.fetch,decodeImage2=options.decodeImage??decodeImage;const fetchChecked=__name(async path=>{checkSignal(options.signal);const response=await fetcher(resolveAssetUrl(path,options),{signal:options.signal});if(!response.ok)throw new Error(`HTTP ${response.status} loading ${path}`);return response},"fetchChecked");function upload(data,compressed){checkSignal(options.signal);if(gl.isContextLost?.())throw new Error("WebGL context is lost");const previousBinding=gl.getParameter(gl.TEXTURE_BINDING_2D),texture=gl.createTexture();if(!texture)throw new Error("WebGL could not allocate a texture");try{gl.bindTexture(gl.TEXTURE_2D,texture);if(compressed)data.mipmaps.forEach((mip,level)=>gl.compressedTexImage2D(gl.TEXTURE_2D,level,data.internalFormat,mip.width,mip.height,0,mip.data));else gl.texImage2D(gl.TEXTURE_2D,0,gl.RGBA,gl.RGBA,gl.UNSIGNED_BYTE,data);gl.texParameteri(gl.TEXTURE_2D,gl.TEXTURE_WRAP_S,gl.CLAMP_TO_EDGE);gl.texParameteri(gl.TEXTURE_2D,gl.TEXTURE_WRAP_T,gl.CLAMP_TO_EDGE);gl.texParameteri(gl.TEXTURE_2D,gl.TEXTURE_MIN_FILTER,gl.LINEAR);gl.texParameteri(gl.TEXTURE_2D,gl.TEXTURE_MAG_FILTER,gl.LINEAR);const error=gl.getError();if(error!==gl.NO_ERROR)throw new Error(`WebGL texture upload error 0x${error.toString(16)}`)}catch(error){gl.deleteTexture(texture);throw error}finally{gl.bindTexture(gl.TEXTURE_2D,previousBinding)}let disposed=false;return{texture,width:data.width||data.naturalWidth,height:data.height||data.naturalHeight,format:compressed?"astc":"image",dispose(){if(!disposed){disposed=true;gl.deleteTexture(texture)}}}}__name(upload,"upload");try{checkSignal(options.signal);if(!supportsAstc(gl))throw new Error("ASTC is not supported by this WebGL context");const data=parseAstcKtx(await(await fetchChecked(url)).arrayBuffer());const supportedFormats=gl.getParameter(gl.COMPRESSED_TEXTURE_FORMATS);if(!Array.from(supportedFormats??[]).includes(data.internalFormat))throw new Error("This ASTC internal format is unsupported");return upload(data,true)}catch(error){checkSignal(options.signal);if(!options.fallbackUrl||error?.name==="AbortError"||gl.isContextLost?.())throw error;options.onFallback?.(error);const image=await decodeImage2(await(await fetchChecked(options.fallbackUrl)).blob(),{signal:options.signal});try{return upload(image,false)}finally{image.close?.()}}}__name(loadAstcTexture,"loadAstcTexture");export{loadAstcTexture,parseAstcKtx,supportsAstc,toAstcKtxUrl};
@@ -0,0 +1,72 @@
1
+ import { existsSync, readdirSync, readFileSync } from 'node:fs';
2
+ import { join, relative } from 'node:path';
3
+ import { isExportableUrl } from './sync-asset-controls.mjs';
4
+
5
+ const QUOTED_URL = /(['"`])((?:https?:\/\/file\.craft\.qq\.com\/|\/Game\/|Game\/)[^'"`\\]*)\1/g;
6
+
7
+ function walkTsFiles(dir, acc = []) {
8
+ if (!existsSync(dir)) return acc;
9
+ for (const entry of readdirSync(dir, { withFileTypes: true })) {
10
+ if (entry.name.startsWith('.')) continue;
11
+ const path = join(dir, entry.name);
12
+ if (entry.isDirectory()) {
13
+ walkTsFiles(path, acc);
14
+ continue;
15
+ }
16
+ if (entry.isFile() && entry.name.endsWith('.ts') && !entry.name.endsWith('.d.ts')) acc.push(path);
17
+ }
18
+ return acc;
19
+ }
20
+
21
+ function readJson(path, fallback) {
22
+ if (!existsSync(path)) return fallback;
23
+ try {
24
+ return JSON.parse(readFileSync(path, 'utf8'));
25
+ } catch {
26
+ return fallback;
27
+ }
28
+ }
29
+
30
+ export function findHardcodedAssetUrls(projectRoot) {
31
+ const srcRoot = join(projectRoot, 'src');
32
+ const found = [];
33
+ for (const file of walkTsFiles(srcRoot)) {
34
+ const text = readFileSync(file, 'utf8');
35
+ if (text.includes('configs/assets.json')) continue;
36
+ for (const match of text.matchAll(QUOTED_URL)) {
37
+ const url = match[2].trim();
38
+ if (!isExportableUrl(url)) continue;
39
+ found.push({ file: relative(projectRoot, file), url });
40
+ }
41
+ }
42
+ return found;
43
+ }
44
+
45
+ export function findMissingAssetSchemas(projectRoot) {
46
+ const assets = readJson(join(projectRoot, 'configs', 'assets.json'), {});
47
+ const snapshot = readJson(join(projectRoot, 'unified_data_control_config.json'), []);
48
+ if (!assets || typeof assets !== 'object' || Array.isArray(assets)) return [];
49
+ const schemas = new Set(
50
+ (Array.isArray(snapshot) ? snapshot : [])
51
+ .map((entry) => entry?.schema)
52
+ .filter((schema) => typeof schema === 'string'),
53
+ );
54
+ const missing = [];
55
+ for (const [name, value] of Object.entries(assets)) {
56
+ if (!isExportableUrl(value)) continue;
57
+ if (!schemas.has(`assets.${name}`)) missing.push(name);
58
+ }
59
+ return missing;
60
+ }
61
+
62
+ export function assertAssetsWired(projectRoot) {
63
+ const literals = findHardcodedAssetUrls(projectRoot);
64
+ if (literals.length) {
65
+ const lines = literals.map((item) => `${item.file}: ${item.url}`).join('\n');
66
+ throw new Error(`资源地址写在源码里,未从 configs/assets.json 导入:\n${lines}`);
67
+ }
68
+ const missing = findMissingAssetSchemas(projectRoot);
69
+ if (missing.length) {
70
+ throw new Error(`configs/assets.json 的这些键没有进入 unified_data_control_config.json:${missing.join(', ')}`);
71
+ }
72
+ }
@@ -0,0 +1,106 @@
1
+ // 资源地址归一化的唯一实现。只改 https://file.craft.qq.com 和相对路径:
2
+ // 库资源收成 Game/,其它路径把百分号编码解回中文,相对路径保留原前缀。
3
+ // UTF-8 与 GBK 都能解时,只有 GBK 得到汉字而 UTF-8 不是汉字才用 GBK。
4
+
5
+ function percentEncodedBytes(text) {
6
+ const bytes = [];
7
+ let index = 0;
8
+ while (index < text.length) {
9
+ if (text[index] === '%' && /^[0-9A-Fa-f]{2}$/.test(text.slice(index + 1, index + 3))) {
10
+ bytes.push(Number.parseInt(text.slice(index + 1, index + 3), 16));
11
+ index += 3;
12
+ continue;
13
+ }
14
+ const code = text.charCodeAt(index);
15
+ if (code > 0x7f) return null;
16
+ bytes.push(code);
17
+ index += 1;
18
+ }
19
+ return bytes;
20
+ }
21
+
22
+ function hasCjk(text) {
23
+ return /[\u3400-\u9fff]/.test(text);
24
+ }
25
+
26
+ function decodeGbk(bytes) {
27
+ try {
28
+ return new TextDecoder('gbk', { fatal: true }).decode(Uint8Array.from(bytes));
29
+ } catch {
30
+ return null;
31
+ }
32
+ }
33
+
34
+ function decodeResourcePath(text) {
35
+ const bytes = percentEncodedBytes(text);
36
+ if (!bytes) return text;
37
+ let utf8 = null;
38
+ try {
39
+ utf8 = decodeURIComponent(text);
40
+ } catch {
41
+ utf8 = null;
42
+ }
43
+ const gbk = bytes.some((byte) => byte >= 0x80) ? decodeGbk(bytes) : null;
44
+ if (utf8 && gbk && utf8 !== gbk) {
45
+ return hasCjk(gbk) && !hasCjk(utf8) ? gbk : utf8;
46
+ }
47
+ return utf8 ?? gbk ?? text;
48
+ }
49
+
50
+ function hasNonAscii(text) {
51
+ for (let index = 0; index < text.length; index += 1) {
52
+ if (text.charCodeAt(index) > 0x7f) return true;
53
+ }
54
+ return false;
55
+ }
56
+
57
+ function restoreGamePath(source) {
58
+ let path = source;
59
+ try {
60
+ const url = new URL(source);
61
+ if (url.protocol !== 'https:' || url.hostname !== 'file.craft.qq.com') return source;
62
+ path = url.pathname;
63
+ } catch { /* 相对路径 */ }
64
+ if (!/^\/?Game\//.test(path)) return source;
65
+ const decoded = decodeResourcePath(path.startsWith('/') ? path : `/${path}`).replace(/^\/+/, '');
66
+ return decoded.startsWith('Game/') ? decoded : source;
67
+ }
68
+
69
+ function decodeRelativePath(source) {
70
+ if (/^(?:[a-z][a-z\d+.-]*:|\/\/)/i.test(source)) return source;
71
+ const parts = source.match(/^([^?#]*)([?#].*)?$/);
72
+ if (!parts || !parts[1].includes('%')) return source;
73
+ const decoded = decodeResourcePath(parts[1]);
74
+ if (decoded === parts[1] || !hasNonAscii(decoded)) return source;
75
+ const rest = parts[2] ?? '';
76
+ if (/^\/?Game\//.test(decoded)) return decoded.replace(/^\/+/, '') + rest;
77
+ return decoded + rest;
78
+ }
79
+
80
+ function decodeAbsoluteUrl(source) {
81
+ let url;
82
+ try {
83
+ url = new URL(source);
84
+ } catch {
85
+ return source;
86
+ }
87
+ if (url.protocol !== 'https:' || url.hostname !== 'file.craft.qq.com') return source;
88
+ const decodedPath = decodeResourcePath(url.pathname);
89
+ if (decodedPath === url.pathname || !hasNonAscii(decodedPath)) return source;
90
+ const href = url.href;
91
+ const origin = url.origin;
92
+ if (!href.startsWith(origin)) return source;
93
+ const rest = href.slice(origin.length);
94
+ if (!rest.startsWith(url.pathname)) return source;
95
+ return origin + decodedPath + rest.slice(url.pathname.length);
96
+ }
97
+
98
+ export function toPanelResourcePath(value) {
99
+ const source = String(value ?? '').trim();
100
+ if (!source) return source;
101
+ const restored = restoreGamePath(source);
102
+ if (restored.startsWith('Game/')) return restored;
103
+ const absolute = decodeAbsoluteUrl(source);
104
+ if (absolute !== source) return absolute;
105
+ return decodeRelativePath(source);
106
+ }
@@ -0,0 +1,316 @@
1
+ import { existsSync, mkdirSync, readdirSync, readFileSync, writeFileSync } from 'node:fs';
2
+ import { join } from 'node:path';
3
+ import { toPanelResourcePath } from './panel-resource-path.mjs';
4
+
5
+ export const ASSET_URL_RE = /^(?:https?:\/\/(?![^/?#]*@)|\/Game\/|Game\/)/;
6
+
7
+ export const SLOT_META = {
8
+ anim2d: { asset_type: 'PaperFlipbook', group: '角色' },
9
+ character2d: { asset_type: 'PaperFlipbook', group: '角色' },
10
+ effect2d: { asset_type: 'PaperFlipbook', group: '特效' },
11
+ 'texture-scene': { asset_type: 'Texture2D', group: '场景贴图' },
12
+ textureScene: { asset_type: 'Texture2D', group: '场景贴图' },
13
+ 'texture-prop': { asset_type: 'Texture2D', group: '道具贴图' },
14
+ textureProp: { asset_type: 'Texture2D', group: '道具贴图' },
15
+ 'texture-ui': { asset_type: 'Texture2D', group: '界面贴图' },
16
+ textureUI: { asset_type: 'Texture2D', group: '界面贴图' },
17
+ audio: { asset_type: 'SoundWave', group: '音频' },
18
+ video: { asset_type: 'Video', group: '视频' },
19
+ };
20
+
21
+ const SLOT_MARK_RE = /^\s*\/\/\s*@slot\s+(\S+)\s+(\S+)(?:\s+(\S+))?\s*$/;
22
+
23
+ function walkTsFiles(dir, acc = []) {
24
+ if (!existsSync(dir)) return acc;
25
+ for (const entry of readdirSync(dir, { withFileTypes: true })) {
26
+ if (entry.name.startsWith('.')) continue;
27
+ const path = join(dir, entry.name);
28
+ if (entry.isDirectory()) {
29
+ walkTsFiles(path, acc);
30
+ continue;
31
+ }
32
+ if (entry.isFile() && entry.name.endsWith('.ts') && !entry.name.endsWith('.d.ts')) acc.push(path);
33
+ }
34
+ return acc;
35
+ }
36
+
37
+ function isRelativeResourcePath(source) {
38
+ if (/^(?:[a-z][a-z\d+.-]*:|\/\/)/i.test(source)) return false;
39
+ if (source.startsWith('./') || /(?:^|\/)\.\.(?:\/|$)/.test(source)) return false;
40
+ return /^(?:\/?Glb\/Game\/|test1\/)/.test(source);
41
+ }
42
+
43
+ export function isExportableUrl(value) {
44
+ const source = String(value ?? '').trim();
45
+ if (!source || /['"\\]/.test(source)) return false;
46
+ return ASSET_URL_RE.test(source) || isRelativeResourcePath(source);
47
+ }
48
+
49
+ export function collectSlots(srcRoot) {
50
+ const byName = new Map();
51
+ for (const file of walkTsFiles(srcRoot)) {
52
+ const lines = readFileSync(file, 'utf8').split('\n');
53
+ for (const line of lines) {
54
+ const match = SLOT_MARK_RE.exec(line);
55
+ if (!match) continue;
56
+ const category = match[1];
57
+ const name = match[2];
58
+ if (!SLOT_META[category]) continue;
59
+ if (byName.has(name)) continue;
60
+ byName.set(name, { category, name, source: match[3] });
61
+ }
62
+ }
63
+ return [...byName.values()];
64
+ }
65
+
66
+ export function mergeSlotUrlsIntoAssets(assets, slots) {
67
+ const next = (assets && typeof assets === 'object' && !Array.isArray(assets))
68
+ ? { ...assets }
69
+ : {};
70
+ let changed = false;
71
+ for (const slot of slots) {
72
+ const current = String(next[slot.name] ?? '').trim();
73
+ if (isExportableUrl(current)) continue;
74
+ if (!isExportableUrl(slot.source)) continue;
75
+ next[slot.name] = String(slot.source).trim();
76
+ changed = true;
77
+ }
78
+ return { assets: next, changed };
79
+ }
80
+
81
+ export function rewriteAssetAddresses(assets) {
82
+ const json = (assets && typeof assets === 'object' && !Array.isArray(assets))
83
+ ? { ...assets }
84
+ : {};
85
+ let changed = false;
86
+ for (const [name, value] of Object.entries(json)) {
87
+ if (typeof value !== 'string' || !isExportableUrl(value)) continue;
88
+ const panel = toPanelResourcePath(value);
89
+ if (panel === value) continue;
90
+ json[name] = panel;
91
+ changed = true;
92
+ }
93
+ return { assets: json, changed };
94
+ }
95
+
96
+ function inferMeta(name, previous) {
97
+ const prevType = previous?.asset_type;
98
+ if (prevType === 'SoundWave') return SLOT_META.audio;
99
+ if (prevType === 'PaperFlipbook') return SLOT_META.character2d;
100
+ if (prevType === 'Video') return SLOT_META.video;
101
+ if (prevType === 'Texture2D') return SLOT_META['texture-ui'];
102
+ if (/bgm|music|audio|sfx/i.test(name)) return SLOT_META.audio;
103
+ return SLOT_META['texture-ui'];
104
+ }
105
+
106
+ function controlEntry(name, meta, previous) {
107
+ const title = typeof previous?.title === 'string' && previous.title.trim()
108
+ ? previous.title.trim()
109
+ : name;
110
+ return {
111
+ title,
112
+ tab: '游戏资源',
113
+ group: meta.group,
114
+ type: 'resource',
115
+ asset_type: meta.asset_type,
116
+ };
117
+ }
118
+
119
+ export function buildAssetControls({ slots, assets, previous = {} }) {
120
+ const out = {};
121
+ const seen = new Set();
122
+ const json = (assets && typeof assets === 'object' && !Array.isArray(assets)) ? assets : {};
123
+
124
+ for (const slot of slots) {
125
+ if (!isExportableUrl(json[slot.name])) continue;
126
+ const meta = SLOT_META[slot.category];
127
+ if (!meta) continue;
128
+ seen.add(slot.name);
129
+ out[slot.name] = controlEntry(slot.name, meta, previous[slot.name]);
130
+ }
131
+
132
+ for (const [name, value] of Object.entries(json)) {
133
+ if (seen.has(name)) continue;
134
+ if (!isExportableUrl(value)) continue;
135
+ const meta = inferMeta(name, previous[name]);
136
+ out[name] = controlEntry(name, meta, previous[name]);
137
+ }
138
+
139
+ return out;
140
+ }
141
+
142
+ function rewriteResourceNode(node, controls, path, state) {
143
+ if (Array.isArray(node)) {
144
+ return node.map((item, index) => rewriteResourceNode(item, controls, `${path}.${index}`, state));
145
+ }
146
+ if (node && typeof node === 'object') {
147
+ const out = {};
148
+ for (const [key, value] of Object.entries(node)) {
149
+ const nextPath = path ? `${path}.${key}` : key;
150
+ out[key] = rewriteResourceNode(value, controls, nextPath, state);
151
+ }
152
+ return out;
153
+ }
154
+ if (typeof node !== 'string' || controls[path]?.type !== 'resource') return node;
155
+ const panel = toPanelResourcePath(node);
156
+ if (panel !== node) state.changed = true;
157
+ return panel;
158
+ }
159
+
160
+ function rewriteOwnedResourcePaths(configDir) {
161
+ if (!existsSync(configDir)) return;
162
+ for (const name of readdirSync(configDir)) {
163
+ if (!name.endsWith('.json') || name.endsWith('.controls.json') || name === 'assets.json') continue;
164
+ const controls = readJson(join(configDir, `${name.slice(0, -'.json'.length)}.controls.json`), null);
165
+ if (!controls || typeof controls !== 'object' || Array.isArray(controls)) continue;
166
+ const dataPath = join(configDir, name);
167
+ const data = readJson(dataPath, null);
168
+ if (!data || typeof data !== 'object' || Array.isArray(data)) continue;
169
+ const state = { changed: false };
170
+ const next = rewriteResourceNode(data, controls, '', state);
171
+ if (!state.changed) continue;
172
+ writeFileSync(dataPath, `${JSON.stringify(next, null, 2)}\n`, 'utf8');
173
+ }
174
+ }
175
+
176
+ const RESOURCE_PATH_FIELDS = ['origin', 'default', 'value', 'change_value', 'previous_value'];
177
+
178
+ export function decodeSnapshotResourcePaths(projectRoot) {
179
+ const snapshotPath = join(projectRoot, 'unified_data_control_config.json');
180
+ if (!existsSync(snapshotPath)) return { updated: 0 };
181
+ let snapshot;
182
+ try {
183
+ snapshot = JSON.parse(readFileSync(snapshotPath, 'utf8'));
184
+ } catch {
185
+ return { updated: 0 };
186
+ }
187
+ if (!Array.isArray(snapshot)) return { updated: 0 };
188
+ let updated = 0;
189
+ for (const entry of snapshot) {
190
+ const control = entry?.control;
191
+ if (control?.type !== 'resource') continue;
192
+ let changed = false;
193
+ for (const field of RESOURCE_PATH_FIELDS) {
194
+ if (typeof control[field] !== 'string') continue;
195
+ const panel = toPanelResourcePath(control[field]);
196
+ if (panel === control[field]) continue;
197
+ control[field] = panel;
198
+ changed = true;
199
+ }
200
+ if (changed) updated += 1;
201
+ }
202
+ if (updated) writeFileSync(snapshotPath, `${JSON.stringify(snapshot, null, 2)}\n`, 'utf8');
203
+ return { updated };
204
+ }
205
+
206
+ function readJson(path, fallback) {
207
+ if (!existsSync(path)) return fallback;
208
+ try {
209
+ return JSON.parse(readFileSync(path, 'utf8'));
210
+ } catch {
211
+ return fallback;
212
+ }
213
+ }
214
+
215
+ export function syncAssetControls(projectRoot) {
216
+ const srcRoot = join(projectRoot, 'src');
217
+ const configDir = join(projectRoot, 'configs');
218
+ const assetsPath = join(configDir, 'assets.json');
219
+ const controlsPath = join(configDir, 'assets.controls.json');
220
+ const assets = readJson(assetsPath, {});
221
+ const previous = readJson(controlsPath, {});
222
+ const slots = collectSlots(srcRoot);
223
+ const merged = mergeSlotUrlsIntoAssets(assets, slots);
224
+ const rewritten = rewriteAssetAddresses(merged.assets);
225
+ const nextAssets = rewritten.assets;
226
+ if (merged.changed || rewritten.changed) {
227
+ mkdirSync(configDir, { recursive: true });
228
+ writeFileSync(assetsPath, `${JSON.stringify(nextAssets, null, 2)}\n`, 'utf8');
229
+ }
230
+ const controls = buildAssetControls({ slots, assets: nextAssets, previous });
231
+ const count = Object.keys(controls).length;
232
+ rewriteOwnedResourcePaths(configDir);
233
+ if (count === 0 && !existsSync(controlsPath)) {
234
+ return { path: controlsPath, count };
235
+ }
236
+ mkdirSync(configDir, { recursive: true });
237
+ writeFileSync(controlsPath, `${JSON.stringify(controls, null, 2)}\n`, 'utf8');
238
+ return { path: controlsPath, count };
239
+ }
240
+
241
+ export function readControlSnapshot(projectRoot) {
242
+ const snapshotPath = join(projectRoot, 'unified_data_control_config.json');
243
+ if (!existsSync(snapshotPath)) return [];
244
+ try {
245
+ const snapshot = JSON.parse(readFileSync(snapshotPath, 'utf8'));
246
+ return Array.isArray(snapshot) ? snapshot : [];
247
+ } catch {
248
+ return [];
249
+ }
250
+ }
251
+
252
+ function overlayValue(control) {
253
+ if (!control || typeof control !== 'object') return '';
254
+ if (Object.hasOwn(control, 'change_value')) return control.change_value;
255
+ if (Object.hasOwn(control, 'value')) return control.value;
256
+ return control.default;
257
+ }
258
+
259
+ export function applySnapshotAssetAddresses(projectRoot, previousSnapshot = []) {
260
+ const snapshotPath = join(projectRoot, 'unified_data_control_config.json');
261
+ const assetsPath = join(projectRoot, 'configs', 'assets.json');
262
+ if (!existsSync(snapshotPath) || !existsSync(assetsPath)) return { updated: 0 };
263
+ const assets = readJson(assetsPath, {});
264
+ let snapshot;
265
+ try {
266
+ snapshot = JSON.parse(readFileSync(snapshotPath, 'utf8'));
267
+ } catch {
268
+ return { updated: 0 };
269
+ }
270
+ if (!Array.isArray(snapshot)) return { updated: 0 };
271
+
272
+ const prevBySchema = new Map(
273
+ (Array.isArray(previousSnapshot) ? previousSnapshot : [])
274
+ .filter((entry) => entry && typeof entry.schema === 'string')
275
+ .map((entry) => [entry.schema, entry]),
276
+ );
277
+ let updated = 0;
278
+
279
+ for (const entry of snapshot) {
280
+ if (!entry || typeof entry.schema !== 'string' || !entry.schema.startsWith('assets.')) continue;
281
+ if (entry.control?.type !== 'resource') continue;
282
+ const name = entry.schema.slice('assets.'.length);
283
+ if (!name || name.includes('.')) continue;
284
+ const jsonUrl = String(assets[name] ?? '').trim();
285
+ if (!isExportableUrl(jsonUrl)) continue;
286
+ const panel = toPanelResourcePath(jsonUrl);
287
+ const prev = prevBySchema.get(entry.schema);
288
+ const prevOrigin = prev?.control?.origin ?? prev?.control?.default;
289
+ const prevPanel = prev ? toPanelResourcePath(prevOrigin) : '';
290
+ const codeChanged = !prev || (prevPanel !== panel && prevPanel !== toPanelResourcePath(jsonUrl));
291
+ const forceAlign = codeChanged;
292
+ const ctrl = entry.control;
293
+ const already = ctrl.origin === panel
294
+ && ctrl.default === panel
295
+ && overlayValue(ctrl) === panel
296
+ && !Object.hasOwn(ctrl, 'change_value');
297
+ if (already) {
298
+ continue;
299
+ }
300
+ const originTouched = ctrl.origin !== panel || ctrl.default !== panel;
301
+ if (!forceAlign && !originTouched) continue;
302
+ ctrl.origin = panel;
303
+ ctrl.default = panel;
304
+ if (forceAlign) {
305
+ ctrl.value = panel;
306
+ delete ctrl.change_value;
307
+ delete ctrl.previous_value;
308
+ }
309
+ updated += 1;
310
+ }
311
+
312
+ if (updated) {
313
+ writeFileSync(snapshotPath, `${JSON.stringify(snapshot, null, 2)}\n`, 'utf8');
314
+ }
315
+ return { updated };
316
+ }
@@ -0,0 +1,13 @@
1
+ // One local export pipeline for npm builds and the bound Craft skill.
2
+ import { resolve } from 'node:path';
3
+ import { runCli } from './skill-modules/export-config/cli.mjs';
4
+ import { assertAssetsWired } from './config-export/assert-asset-wiring.mjs';
5
+ import { syncAssetControls, readControlSnapshot, applySnapshotAssetAddresses, decodeSnapshotResourcePaths } from './config-export/sync-asset-controls.mjs';
6
+
7
+ const project = resolve(process.cwd());
8
+ const previousSnapshot = readControlSnapshot(project);
9
+ syncAssetControls(project);
10
+ await runCli(['export-config', '--project', project]);
11
+ applySnapshotAssetAddresses(project, previousSnapshot);
12
+ decodeSnapshotResourcePaths(project);
13
+ assertAssetsWired(project);
@@ -0,0 +1,20 @@
1
+ import { resolve } from 'node:path';
2
+ import { pathToFileURL } from 'node:url';
3
+ import { exportProjectConfig } from './project.mjs';
4
+
5
+ export async function runCli(args = process.argv.slice(2)) {
6
+ if ((args[0] ?? 'export-config') !== 'export-config') throw new Error('Usage: cli.mjs export-config [--project <directory>] [--check]');
7
+ let project = process.cwd(), check = false;
8
+ for (let index = 1; index < args.length; index++) {
9
+ if (args[index] === '--check') check = true;
10
+ else if (args[index] === '--project' && args[index + 1] && !args[index + 1].startsWith('--')) project = args[++index];
11
+ else throw new Error(`Invalid export-config option: ${args[index]}`);
12
+ }
13
+ const result = await exportProjectConfig(resolve(project), { check, onWarn: message => console.warn(`[LightGame config] ${message}`) });
14
+ console.log(`[LightGame] ${result.entries.length} controls ${result.changed ? 'exported' : 'unchanged'}`);
15
+ return result;
16
+ }
17
+
18
+ if (process.argv[1] && import.meta.url === pathToFileURL(resolve(process.argv[1])).href) {
19
+ runCli().catch(error => { console.error(`[LightGame config] ${error.message}`); process.exitCode = 1; });
20
+ }
@@ -0,0 +1,19 @@
1
+ export interface ControlMetadata {
2
+ type?: 'int' | 'float' | 'number' | 'num_slider' | 'bool' | 'boolean' | 'switch' | 'enum' | 'dropdown' | 'string' | 'text' | 'color' | 'resource';
3
+ enabled?: boolean; expose?: boolean; title?: string; description?: string;
4
+ min?: number; max?: number; step?: number; unit?: string; alpha?: boolean;
5
+ options?: Array<string | number | {value: string | number; label?: string}>;
6
+ tab?: string; group?: string; priority?: number;
7
+ category?: string; subcategory?: string; asset_type?: string;
8
+ }
9
+ export interface ConfigEntry {
10
+ schema: string; enabled: boolean; title: string; description: string;
11
+ locator: { tab: string; group: string; priority: number };
12
+ control: Record<string, unknown> & { type: string; default: unknown; value?: unknown; origin?: unknown };
13
+ }
14
+ export interface ConfigOptions { onWarn?: (message: string) => void; cdnBase?: string }
15
+ export function normalizeAssetUrl(value: unknown, cdnBase?: string): string;
16
+ export function inferControl(value: unknown, metadata?: ControlMetadata): ConfigEntry['control'] | null;
17
+ export function validateControlValue(control: ConfigEntry['control'], value: unknown): boolean;
18
+ export function createConfigEntries(owner: string, data: object, metadata?: Record<string, ControlMetadata>, previous?: ConfigEntry[], options?: ConfigOptions): ConfigEntry[];
19
+ export function resolveConfig<T extends object>(owner: string, data: T, metadata?: Record<string, ControlMetadata>, entries?: ConfigEntry[], options?: ConfigOptions): T;
@@ -0,0 +1 @@
1
+ var __defProp=Object.defineProperty;var __name=(target,value)=>__defProp(target,"name",{value,configurable:true});function resolveAssetUrl(path,{cdnBaseUrl="",baseUrl}={}){const value=String(path??"").trim();if(!value)throw new TypeError("Asset path must not be empty");if(/^(?:[a-z][a-z\d+.-]*:|\/\/)/i.test(value))return value;const encoded=encodeURI(value).replace(/%25([\da-f]{2})/gi,"%$1");const localPrefix=/^(?:assets|game|res|cfg|fonts)\//.test(value);if(cdnBaseUrl&&!localPrefix&&(value.startsWith("/Game/")||!/^(?:\/|\.\.?\/)/.test(value))){return`${cdnBaseUrl.replace(/\/+$/,"")}/${encoded.replace(/^\/+/,"")}`}return baseUrl?new URL(encoded,baseUrl).href:encoded}__name(resolveAssetUrl,"resolveAssetUrl");var has=__name((value,key)=>Object.prototype.hasOwnProperty.call(value,key),"has");var record=__name(value=>value!==null&&typeof value==="object"&&!Array.isArray(value),"record");var equal=__name((a,b)=>typeof a===typeof b&&(typeof a==="number"?Math.abs(a-b)<1e-9:a===b),"equal");var colorPattern=/^#(?:[a-f\d]{3}|[a-f\d]{4}|[a-f\d]{6}|[a-f\d]{8})$/i;var reserved=new Set(["__proto__","prototype","constructor"]);function assertKey(key,label){if(!key||key.includes(".")||reserved.has(key))throw new TypeError(`${label}: config keys must be nonempty, safe and contain no dots (${key})`)}__name(assertKey,"assertKey");function normalizeAssetUrl(value,cdnBase="https://file.craft.qq.com"){const path=String(value??"").trim().replaceAll("\\","/");return path?resolveAssetUrl(path,{cdnBaseUrl:cdnBase}):""}__name(normalizeAssetUrl,"normalizeAssetUrl");function inferControl(value,metadata={}){if(metadata.enabled===false||metadata.expose===false)return null;const kind=metadata.type??(typeof value==="number"?"number":typeof value==="boolean"?"boolean":typeof value==="string"&&colorPattern.test(value)?"color":void 0);if(!kind)return null;let control;switch(kind){case"int":case"float":case"number":case"num_slider":{if(typeof value!=="number"||!Number.isFinite(value))throw new TypeError("numeric controls require a finite numeric default");const span=Math.max(1,Math.abs(value)*2);const min=metadata.min??Math.min(0,value-span);const max=metadata.max??Math.max(1,value+span);const step=metadata.step??(kind==="int"||kind!=="float"&&Number.isInteger(value)?1:.01);if(![min,max,step].every(Number.isFinite)||min>max||step<=0||value<min||value>max)throw new TypeError("numeric min/max/step must be finite, contain the default, and step must be positive");control={type:"num_slider",default:value,min,max,step,unit:metadata.unit??""};if(kind==="int")control.integer=true;break}case"bool":case"boolean":case"switch":if(typeof value!=="boolean")throw new TypeError("switch controls require a boolean default");control={type:"switch",default:value};break;case"enum":case"dropdown":{const options=metadata.options?.map(option=>record(option)?{value:option.value,label:String(option.label??option.value)}:{value:option,label:String(option)});if(!options?.length||options.some(option=>!["string","number"].includes(typeof option.value))||new Set(options.map(option=>`${typeof option.value}:${option.value}`)).size!==options.length||!options.some(option=>equal(option.value,value)))throw new TypeError("dropdown options must be unique scalar values and contain the default");control={type:"dropdown",default:value,options};break}case"string":case"text":if(typeof value!=="string")throw new TypeError("text controls require a string default");control={type:"text",default:value};break;case"color":if(typeof value!=="string"||!colorPattern.test(value))throw new TypeError("color controls require a hexadecimal color default");control={type:"color",default:value,alpha:metadata.alpha??(value.length===5||value.length===9)};break;case"resource":if(typeof value!=="string")throw new TypeError("resource controls require a string default");control={type:"resource",default:value};for(const key of["category","subcategory","asset_type"])if(metadata[key]!==void 0)control[key]=metadata[key];break;default:throw new TypeError(`unsupported control type: ${kind}`)}return control}__name(inferControl,"inferControl");function validateControlValue(control,value){switch(control.type){case"num_slider":return typeof value==="number"&&Number.isFinite(value)&&value>=control.min&&value<=control.max&&(!control.integer||Number.isInteger(value));case"switch":return typeof value==="boolean";case"color":return typeof value==="string"&&colorPattern.test(value);case"dropdown":return control.options.some(option=>equal(option.value,value));case"text":case"resource":return typeof value==="string";default:return false}}__name(validateControlValue,"validateControlValue");function leaves(data,metadata,owner){if(!record(data)||!record(metadata))throw new TypeError(`${owner}: config and controls must be JSON objects`);const output=[];const seen=new Set;function walk(value,parts){if(Array.isArray(value))return;if(record(value)){for(const[key,child]of Object.entries(value)){assertKey(key,owner);walk(child,[...parts,key])}return}const path=parts.join(".");const meta=metadata[path]??{};if(!record(meta))throw new TypeError(`${owner}.${path}: controls metadata must be an object`);seen.add(path);try{const control=inferControl(value,meta);if(control)output.push({path,parts,control,meta,value})}catch(error){throw new TypeError(`${owner}.${path}: ${error.message}`)}}__name(walk,"walk");walk(data,[]);for(const key of Object.keys(metadata))if(!seen.has(key))throw new TypeError(`${owner}.${key}: control refers to a missing scalar field (arrays are not exposed)`);return output}__name(leaves,"leaves");function createConfigEntries(owner,data,metadata={},previous=[],options={}){assertKey(owner,"config filename");const oldBySchema=new Map((Array.isArray(previous)?previous:[]).map(item=>[item.schema,item]));return leaves(data,metadata,owner).map(({path,control,meta,value})=>{const schema=`${owner}.${path}`;const old=oldBySchema.get(schema);const oldControl=old?.control;let selected=value;let stale=oldControl?.previous_value;if(oldControl){const candidate=has(oldControl,"change_value")?oldControl.change_value:has(oldControl,"value")?oldControl.value:oldControl.default;const origin=has(oldControl,"origin")?oldControl.origin:oldControl.default;if(!equal(origin,value)&&equal(candidate,origin)){selected=value;stale=void 0}else if((control.type==="resource"||equal(origin,value))&&validateControlValue(control,candidate)){selected=candidate;if(!equal(candidate,value))stale=void 0}else if(!equal(candidate,value)){stale=candidate;options.onWarn?.(`${schema}: saved override is incompatible with the current default or constraints; using code default`)}}return{schema,enabled:old?.enabled!==false,title:meta.title??old?.title??path,description:meta.description??old?.description??"",locator:{tab:meta.tab??owner,group:meta.group??path.split(".")[0],priority:meta.priority??0},control:{...control,...control.type==="resource"?Object.fromEntries(["category","subcategory","asset_type"].filter(key=>control[key]===void 0&&oldControl?.[key]!==void 0).map(key=>[key,oldControl[key]])):{},origin:value,value:selected,...stale!==void 0?{previous_value:stale}:{}}}})}__name(createConfigEntries,"createConfigEntries");function resolveConfig(owner,data,metadata={},entries=[],options={}){const result=JSON.parse(JSON.stringify(data));const index=new Map((Array.isArray(entries)?entries:[]).map(item=>[item.schema,item]));for(const{path,parts,control,value}of leaves(data,metadata,owner)){const item=index.get(`${owner}.${path}`);let selected=value;if(item?.enabled!==false&&item?.control){const stored=item.control;const candidate=has(stored,"change_value")?stored.change_value:has(stored,"value")?stored.value:stored.default;const origin=has(stored,"origin")?stored.origin:stored.default;if(!equal(origin,value)&&equal(candidate,origin))selected=value;else if((control.type==="resource"||equal(origin,value))&&validateControlValue(control,candidate))selected=candidate;else options.onWarn?.(`${owner}.${path}: ignored incompatible saved override`)}if(control.type==="resource")selected=normalizeAssetUrl(selected,options.cdnBase);let parent=result;for(const key of parts.slice(0,-1))parent=parent[key];parent[parts.at(-1)]=selected}return result}__name(resolveConfig,"resolveConfig");export{createConfigEntries,inferControl,normalizeAssetUrl,resolveConfig,validateControlValue};
@@ -0,0 +1,6 @@
1
+ {
2
+ "version": "1.1.0",
3
+ "modules": [
4
+ "config"
5
+ ]
6
+ }