@craft_eco/craft-mcp 0.1.28 → 0.1.30

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 (999) hide show
  1. package/README.md +21 -60
  2. package/bin/craft-mcp.mjs +7 -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 +8 -2
  7. package/dist-server/game-workflow/context-state.mjs +67 -0
  8. package/dist-server/game-workflow/draft-archive.mjs +147 -2
  9. package/dist-server/game-workflow/draft-upload-identity.mjs +11 -0
  10. package/dist-server/game-workflow/draft-uploads.mjs +108 -60
  11. package/dist-server/game-workflow/engines.mjs +3 -3
  12. package/dist-server/game-workflow/library-assets.mjs +2 -1
  13. package/dist-server/game-workflow/local-context.mjs +62 -0
  14. package/dist-server/game-workflow/native-context.mjs +289 -0
  15. package/dist-server/game-workflow/project-bundles.mjs +121 -4
  16. package/dist-server/game-workflow/project-context.mjs +183 -45
  17. package/dist-server/game-workflow/project-leases.mjs +101 -30
  18. package/dist-server/game-workflow/projects.mjs +92 -14
  19. package/dist-server/game-workflow/tasks.mjs +7 -2
  20. package/dist-server/game-workflow/work-scope.mjs +7 -0
  21. package/dist-server/integrations/config.mjs +90 -16
  22. package/dist-server/integrations/connect.mjs +36 -0
  23. package/dist-server/integrations/connection-handoff.mjs +36 -0
  24. package/dist-server/integrations/dsh-config.mjs +182 -0
  25. package/dist-server/integrations/fixed-launcher.mjs +31 -0
  26. package/dist-server/integrations/host-reload.mjs +19 -0
  27. package/dist-server/integrations/hosts.mjs +27 -7
  28. package/dist-server/integrations/install.mjs +168 -31
  29. package/dist-server/integrations/installation-state.mjs +84 -0
  30. package/dist-server/integrations/launcher-start.mjs +52 -0
  31. package/dist-server/integrations/npm-diagnostics.mjs +32 -0
  32. package/dist-server/integrations/runtime-gc.mjs +191 -0
  33. package/dist-server/integrations/runtime-identity.mjs +22 -0
  34. package/dist-server/integrations/runtime.mjs +64 -25
  35. package/dist-server/integrations/updates.mjs +258 -0
  36. package/dist-server/integrations/version-policy.mjs +32 -0
  37. package/dist-server/launcher.mjs +1845 -0
  38. package/dist-server/mcp/control-panel.mjs +12 -24
  39. package/dist-server/mcp/server.mjs +150 -91
  40. package/dist-server/mcp/start.mjs +8 -2
  41. package/dist-server/mcp/update-session.mjs +107 -0
  42. package/dist-server/upstream/craft-aigc.mjs +43 -16
  43. package/dist-server/upstream/draft-source.mjs +29 -0
  44. package/package.json +4 -3
  45. package/resources/context-filter-report.json +177 -0
  46. package/resources/craft-create/SKILL.md +10 -2
  47. package/resources/craft-update/SKILL.md +23 -0
  48. package/resources/targets/claude/js/bootstrap/SKILL.md +20 -0
  49. package/resources/targets/claude/js/context-filter-report.json +27 -0
  50. package/resources/targets/claude/js/craft-game-maker/SKILL.md +72 -0
  51. package/resources/targets/claude/js/craft-game-maker/js.md +10 -0
  52. package/resources/targets/claude/js/js/bundle.json +97 -0
  53. package/resources/targets/claude/js/js/context/AGENTS.md +29 -0
  54. package/resources/targets/claude/js/js/context/hooks/hooks.json +14 -0
  55. package/resources/targets/claude/js/js/context/knowledge/AssetUrl.md +9 -0
  56. package/resources/targets/claude/js/js/context/knowledge/AssetWiring.md +7 -0
  57. package/resources/targets/claude/js/js/context/knowledge/Layout.md +7 -0
  58. package/resources/targets/claude/js/js/context/knowledge/Lifecycle.md +11 -0
  59. package/resources/targets/claude/js/js/context/knowledge/ResourceLoading.md +9 -0
  60. package/resources/targets/claude/js/js/context/skills/export-config/SKILL.md +16 -0
  61. package/resources/targets/claude/js/js/context/skills/export-config/assets/tooling/cli.mjs +20 -0
  62. package/resources/targets/claude/js/js/context/skills/export-config/assets/tooling/config.d.mts +19 -0
  63. package/resources/targets/claude/js/js/context/skills/export-config/assets/tooling/config.mjs +1 -0
  64. package/resources/targets/claude/js/js/context/skills/export-config/assets/tooling/project.d.mts +6 -0
  65. package/resources/targets/claude/js/js/context/skills/export-config/assets/tooling/project.mjs +77 -0
  66. package/resources/targets/claude/js/js/context/skills/export-config/assets/tooling/vite.d.mts +2 -0
  67. package/resources/targets/claude/js/js/context/skills/export-config/assets/tooling/vite.mjs +34 -0
  68. package/resources/targets/claude/js/js/context/skills/export-config/scripts/export-config.mjs +4 -0
  69. package/resources/targets/claude/js/js/context/skills/export-config/scripts/install.mjs +89 -0
  70. package/resources/targets/claude/js/js/context/skills/export-config/scripts/panel-resource-path.mjs +106 -0
  71. package/resources/targets/claude/js/js/context/skills/index.json +19 -0
  72. package/resources/targets/claude/js/js/context/skills/visual-qa/SKILL.md +14 -0
  73. package/resources/targets/claude/js/js/project/README.md +7 -0
  74. package/resources/targets/claude/js/js/project/configs/assets.json +1 -0
  75. package/resources/targets/claude/js/js/project/configs/game.controls.json +3 -0
  76. package/resources/targets/claude/js/js/project/configs/game.json +3 -0
  77. package/resources/targets/claude/js/js/project/game-runtime.json +7 -0
  78. package/resources/targets/claude/js/js/project/game.config.json +7 -0
  79. package/resources/targets/claude/js/js/project/index.html +20 -0
  80. package/resources/targets/claude/js/js/project/package.json +22 -0
  81. package/resources/targets/claude/js/js/project/runtime/lightgame/1.1.0/platform/identity/qq-ai-game-sdk.min.js +5 -0
  82. package/resources/targets/claude/js/js/project/runtime/lightgame/1.1.0/platform/identity/qq-session.mjs +208 -0
  83. package/resources/targets/claude/js/js/project/runtime/lightgame/1.1.0/platform/identity/shared.mjs +37 -0
  84. package/resources/targets/claude/js/js/project/runtime/lightgame/1.1.0/platform/platform-capture-video.mjs +227 -0
  85. package/resources/targets/claude/js/js/project/runtime/lightgame/1.1.0/platform/platform-service.d.mts +31 -0
  86. package/resources/targets/claude/js/js/project/runtime/lightgame/1.1.0/platform/platform-service.mjs +272 -0
  87. package/resources/targets/claude/js/js/project/runtime/lightgame/1.1.0/platform/platform.d.mts +79 -0
  88. package/resources/targets/claude/js/js/project/runtime/lightgame/1.1.0/platform/platform.mjs +29 -0
  89. package/resources/targets/claude/js/js/project/runtime/lightgame/1.1.0/release.json +22 -0
  90. package/resources/targets/claude/js/js/project/runtime/lightgame/1.1.0/tooling/cli.mjs +16 -0
  91. package/resources/targets/claude/js/js/project/runtime/lightgame/1.1.0/tooling/project.d.mts +4 -0
  92. package/resources/targets/claude/js/js/project/runtime/lightgame/1.1.0/tooling/project.mjs +50 -0
  93. package/resources/targets/claude/js/js/project/runtime/lightgame/1.1.0/tooling/vite.d.mts +3 -0
  94. package/resources/targets/claude/js/js/project/runtime/lightgame/1.1.0/tooling/vite.mjs +72 -0
  95. package/resources/targets/claude/js/js/project/runtime/lightgame/1.1.0/tools/assets.d.mts +24 -0
  96. package/resources/targets/claude/js/js/project/runtime/lightgame/1.1.0/tools/assets.mjs +2 -0
  97. package/resources/targets/claude/js/js/project/runtime/lightgame/1.1.0/tools/astc.d.mts +10 -0
  98. package/resources/targets/claude/js/js/project/runtime/lightgame/1.1.0/tools/astc.mjs +1 -0
  99. package/resources/targets/claude/js/js/project/scripts/config-export/assert-asset-wiring.mjs +72 -0
  100. package/resources/targets/claude/js/js/project/scripts/config-export/panel-resource-path.mjs +106 -0
  101. package/resources/targets/claude/js/js/project/scripts/config-export/sync-asset-controls.mjs +316 -0
  102. package/resources/targets/claude/js/js/project/scripts/config-export.mjs +13 -0
  103. package/resources/targets/claude/js/js/project/scripts/skill-modules/export-config/cli.mjs +20 -0
  104. package/resources/targets/claude/js/js/project/scripts/skill-modules/export-config/config.d.mts +19 -0
  105. package/resources/targets/claude/js/js/project/scripts/skill-modules/export-config/config.mjs +1 -0
  106. package/resources/targets/claude/js/js/project/scripts/skill-modules/export-config/installed.json +6 -0
  107. package/resources/targets/claude/js/js/project/scripts/skill-modules/export-config/project.d.mts +6 -0
  108. package/resources/targets/claude/js/js/project/scripts/skill-modules/export-config/project.mjs +77 -0
  109. package/resources/targets/claude/js/js/project/scripts/skill-modules/export-config/vite.d.mts +2 -0
  110. package/resources/targets/claude/js/js/project/scripts/skill-modules/export-config/vite.mjs +34 -0
  111. package/resources/targets/claude/js/js/project/scripts/write-preview-ready.mjs +22 -0
  112. package/resources/targets/claude/js/js/project/src/display/ui-stage.ts +156 -0
  113. package/resources/targets/claude/js/js/project/src/display/viewport.ts +249 -0
  114. package/resources/targets/claude/js/js/project/src/main.ts +87 -0
  115. package/resources/targets/claude/js/js/project/src/platform.ts +2 -0
  116. package/resources/targets/claude/js/js/project/src/scenes/LoadScene.ts +89 -0
  117. package/resources/targets/claude/js/js/project/src/scenes/PlayScene.ts +17 -0
  118. package/resources/targets/claude/js/js/project/src/screenUi.ts +185 -0
  119. package/resources/targets/claude/js/js/project/src/style.css +294 -0
  120. package/resources/targets/claude/js/js/project/tsconfig.json +20 -0
  121. package/resources/targets/claude/js/js/project/unified_data_control_config.json +20 -0
  122. package/resources/targets/claude/js/js/project/vite.config.ts +5 -0
  123. package/resources/targets/claude/js/recovery.md +17 -0
  124. package/resources/targets/claude/js/target.json +61 -0
  125. package/resources/targets/claude/js3d/bootstrap/SKILL.md +20 -0
  126. package/resources/targets/claude/js3d/context-filter-report.json +27 -0
  127. package/resources/targets/claude/js3d/craft-game-maker/SKILL.md +72 -0
  128. package/resources/targets/claude/js3d/craft-game-maker/js3d.md +12 -0
  129. package/resources/targets/claude/js3d/js3d/bundle.json +108 -0
  130. package/resources/targets/claude/js3d/js3d/context/AGENTS.md +30 -0
  131. package/resources/targets/claude/js3d/js3d/context/hooks/hooks.json +14 -0
  132. package/resources/targets/claude/js3d/js3d/context/knowledge/AssetUrl.md +9 -0
  133. package/resources/targets/claude/js3d/js3d/context/knowledge/AssetWiring.md +7 -0
  134. package/resources/targets/claude/js3d/js3d/context/knowledge/CodingGuide/Pitfalls.md +11 -0
  135. package/resources/targets/claude/js3d/js3d/context/knowledge/Layout.md +7 -0
  136. package/resources/targets/{workbuddy/js3d/js3d/context/skills/asset-search/references/resource-config.md → claude/js3d/js3d/context/knowledge/ResourceLoading.md} +2 -2
  137. package/resources/targets/claude/js3d/js3d/context/knowledge/Runtime.md +9 -0
  138. package/resources/targets/claude/js3d/js3d/context/skills/asset-usage-audit/SKILL.md +16 -0
  139. package/resources/targets/claude/js3d/js3d/context/skills/asset-usage-audit/scripts/compare-animations.mjs +48 -0
  140. package/resources/targets/claude/js3d/js3d/context/skills/asset-usage-audit/scripts/lib/anim.mjs +266 -0
  141. package/resources/targets/claude/js3d/js3d/context/skills/asset-usage-audit/scripts/lib/glb.mjs +241 -0
  142. package/resources/targets/claude/js3d/js3d/context/skills/asset-usage-audit/scripts/lib/scan.mjs +455 -0
  143. package/resources/targets/claude/js3d/js3d/context/skills/asset-usage-audit/scripts/scan-assets.mjs +77 -0
  144. package/resources/targets/claude/js3d/js3d/context/skills/export-config/SKILL.md +16 -0
  145. package/resources/targets/claude/js3d/js3d/context/skills/export-config/assets/tooling/cli.mjs +20 -0
  146. package/resources/targets/claude/js3d/js3d/context/skills/export-config/assets/tooling/config.d.mts +19 -0
  147. package/resources/targets/claude/js3d/js3d/context/skills/export-config/assets/tooling/config.mjs +1 -0
  148. package/resources/targets/claude/js3d/js3d/context/skills/export-config/assets/tooling/project.d.mts +6 -0
  149. package/resources/targets/claude/js3d/js3d/context/skills/export-config/assets/tooling/project.mjs +77 -0
  150. package/resources/targets/claude/js3d/js3d/context/skills/export-config/assets/tooling/vite.d.mts +2 -0
  151. package/resources/targets/claude/js3d/js3d/context/skills/export-config/assets/tooling/vite.mjs +34 -0
  152. package/resources/targets/claude/js3d/js3d/context/skills/export-config/scripts/export-config.mjs +4 -0
  153. package/resources/targets/claude/js3d/js3d/context/skills/export-config/scripts/install.mjs +89 -0
  154. package/resources/targets/claude/js3d/js3d/context/skills/export-config/scripts/panel-resource-path.mjs +106 -0
  155. package/resources/targets/claude/js3d/js3d/context/skills/index.json +31 -0
  156. package/resources/targets/claude/js3d/js3d/context/skills/performance-audit/SKILL.md +21 -0
  157. package/resources/targets/claude/js3d/js3d/context/skills/performance-audit/scripts/lib/rules.mjs +470 -0
  158. package/resources/targets/claude/js3d/js3d/context/skills/performance-audit/scripts/lib/scan.mjs +387 -0
  159. package/resources/targets/claude/js3d/js3d/context/skills/performance-audit/scripts/lib/source.mjs +398 -0
  160. package/resources/targets/claude/js3d/js3d/context/skills/performance-audit/scripts/scan-perf.mjs +130 -0
  161. package/resources/targets/claude/js3d/js3d/context/skills/visual-qa/SKILL.md +14 -0
  162. package/resources/targets/claude/js3d/js3d/project/README.md +7 -0
  163. package/resources/targets/claude/js3d/js3d/project/configs/game.controls.json +3 -0
  164. package/resources/targets/claude/js3d/js3d/project/configs/game.json +3 -0
  165. package/resources/targets/claude/js3d/js3d/project/game-runtime.json +7 -0
  166. package/resources/targets/claude/js3d/js3d/project/game.config.json +7 -0
  167. package/resources/targets/claude/js3d/js3d/project/index.html +12 -0
  168. package/resources/targets/claude/js3d/js3d/project/package.json +23 -0
  169. package/resources/targets/claude/js3d/js3d/project/runtime/lightgame/1.1.0/platform/identity/qq-ai-game-sdk.min.js +5 -0
  170. package/resources/targets/claude/js3d/js3d/project/runtime/lightgame/1.1.0/platform/identity/qq-session.mjs +208 -0
  171. package/resources/targets/claude/js3d/js3d/project/runtime/lightgame/1.1.0/platform/identity/shared.mjs +37 -0
  172. package/resources/targets/claude/js3d/js3d/project/runtime/lightgame/1.1.0/platform/platform-capture-video.mjs +227 -0
  173. package/resources/targets/claude/js3d/js3d/project/runtime/lightgame/1.1.0/platform/platform-service.d.mts +31 -0
  174. package/resources/targets/claude/js3d/js3d/project/runtime/lightgame/1.1.0/platform/platform-service.mjs +272 -0
  175. package/resources/targets/claude/js3d/js3d/project/runtime/lightgame/1.1.0/platform/platform.d.mts +79 -0
  176. package/resources/targets/claude/js3d/js3d/project/runtime/lightgame/1.1.0/platform/platform.mjs +30 -0
  177. package/resources/targets/claude/js3d/js3d/project/runtime/lightgame/1.1.0/release.json +24 -0
  178. package/resources/targets/claude/js3d/js3d/project/runtime/lightgame/1.1.0/tooling/cli.mjs +16 -0
  179. package/resources/targets/claude/js3d/js3d/project/runtime/lightgame/1.1.0/tooling/project.d.mts +4 -0
  180. package/resources/targets/claude/js3d/js3d/project/runtime/lightgame/1.1.0/tooling/project.mjs +50 -0
  181. package/resources/targets/claude/js3d/js3d/project/runtime/lightgame/1.1.0/tooling/vite.d.mts +3 -0
  182. package/resources/targets/claude/js3d/js3d/project/runtime/lightgame/1.1.0/tooling/vite.mjs +72 -0
  183. package/resources/targets/claude/js3d/js3d/project/runtime/lightgame/1.1.0/tools/assets.d.mts +24 -0
  184. package/resources/targets/claude/js3d/js3d/project/runtime/lightgame/1.1.0/tools/assets.mjs +2 -0
  185. package/resources/targets/claude/js3d/js3d/project/runtime/lightgame/1.1.0/tools/astc.d.mts +10 -0
  186. package/resources/targets/claude/js3d/js3d/project/runtime/lightgame/1.1.0/tools/astc.mjs +1 -0
  187. package/resources/targets/claude/js3d/js3d/project/runtime/lightgame/1.1.0/tools/glb.d.mts +26 -0
  188. package/resources/targets/claude/js3d/js3d/project/runtime/lightgame/1.1.0/tools/glb.mjs +351 -0
  189. package/resources/targets/claude/js3d/js3d/project/scripts/config-export/assert-asset-wiring.mjs +97 -0
  190. package/resources/targets/claude/js3d/js3d/project/scripts/config-export/panel-resource-path.mjs +106 -0
  191. package/resources/targets/claude/js3d/js3d/project/scripts/config-export/sync-asset-controls.mjs +327 -0
  192. package/resources/targets/claude/js3d/js3d/project/scripts/config-export/sync-scene-assets.mjs +191 -0
  193. package/resources/targets/claude/js3d/js3d/project/scripts/config-export.mjs +15 -0
  194. package/resources/targets/claude/js3d/js3d/project/scripts/skill-modules/export-config/cli.mjs +20 -0
  195. package/resources/targets/claude/js3d/js3d/project/scripts/skill-modules/export-config/config.d.mts +19 -0
  196. package/resources/targets/claude/js3d/js3d/project/scripts/skill-modules/export-config/config.mjs +1 -0
  197. package/resources/targets/claude/js3d/js3d/project/scripts/skill-modules/export-config/installed.json +6 -0
  198. package/resources/targets/claude/js3d/js3d/project/scripts/skill-modules/export-config/project.d.mts +6 -0
  199. package/resources/targets/claude/js3d/js3d/project/scripts/skill-modules/export-config/project.mjs +77 -0
  200. package/resources/targets/claude/js3d/js3d/project/scripts/skill-modules/export-config/vite.d.mts +2 -0
  201. package/resources/targets/claude/js3d/js3d/project/scripts/skill-modules/export-config/vite.mjs +34 -0
  202. package/resources/targets/claude/js3d/js3d/project/scripts/write-preview-ready.mjs +22 -0
  203. package/resources/targets/claude/js3d/js3d/project/src/display/ui-stage.ts +156 -0
  204. package/resources/targets/claude/js3d/js3d/project/src/display/viewport.ts +239 -0
  205. package/resources/targets/claude/js3d/js3d/project/src/main.ts +85 -0
  206. package/resources/targets/claude/js3d/js3d/project/src/platform.ts +2 -0
  207. package/resources/targets/claude/js3d/js3d/project/src/style.css +83 -0
  208. package/resources/targets/claude/js3d/js3d/project/tsconfig.json +20 -0
  209. package/resources/targets/claude/js3d/js3d/project/unified_data_control_config.json +20 -0
  210. package/resources/targets/claude/js3d/js3d/project/vite.config.ts +5 -0
  211. package/resources/targets/claude/js3d/recovery.md +17 -0
  212. package/resources/targets/claude/js3d/target.json +60 -0
  213. package/resources/targets/codebuddy/js/bootstrap/SKILL.md +7 -1
  214. package/resources/targets/codebuddy/js/context-filter-report.json +27 -0
  215. package/resources/targets/codebuddy/js/craft-game-maker/SKILL.md +24 -29
  216. package/resources/targets/codebuddy/js/craft-game-maker/js.md +2 -2
  217. package/resources/targets/codebuddy/js/js/bundle.json +16 -18
  218. package/resources/targets/codebuddy/js/js/context/AGENTS.md +10 -6
  219. package/resources/targets/codebuddy/js/js/context/knowledge/AssetUrl.md +4 -4
  220. package/resources/targets/codebuddy/js/js/context/knowledge/AssetWiring.md +7 -0
  221. package/resources/targets/codebuddy/js/js/context/knowledge/ResourceLoading.md +9 -0
  222. package/resources/targets/codebuddy/js/js/context/skills/export-config/SKILL.md +2 -2
  223. package/resources/targets/codebuddy/js/js/context/skills/index.json +2 -14
  224. package/resources/targets/codebuddy/js/js/context/skills/visual-qa/SKILL.md +1 -1
  225. package/resources/targets/codebuddy/js/recovery.md +14 -4
  226. package/resources/targets/codebuddy/js/target.json +1 -1
  227. package/resources/targets/codebuddy/js3d/bootstrap/SKILL.md +7 -1
  228. package/resources/targets/codebuddy/js3d/context-filter-report.json +27 -0
  229. package/resources/targets/codebuddy/js3d/craft-game-maker/SKILL.md +24 -29
  230. package/resources/targets/codebuddy/js3d/craft-game-maker/js3d.md +3 -4
  231. package/resources/targets/codebuddy/js3d/js3d/bundle.json +19 -21
  232. package/resources/targets/codebuddy/js3d/js3d/context/AGENTS.md +10 -6
  233. package/resources/targets/codebuddy/js3d/js3d/context/knowledge/AssetUrl.md +4 -4
  234. package/resources/targets/codebuddy/js3d/js3d/context/knowledge/AssetWiring.md +7 -0
  235. package/resources/targets/{codex/js3d/js3d/context/skills/asset-search/references/resource-config.md → codebuddy/js3d/js3d/context/knowledge/ResourceLoading.md} +2 -2
  236. package/resources/targets/codebuddy/js3d/js3d/context/skills/asset-usage-audit/SKILL.md +1 -1
  237. package/resources/targets/codebuddy/js3d/js3d/context/skills/asset-usage-audit/scripts/lib/scan.mjs +2 -2
  238. package/resources/targets/codebuddy/js3d/js3d/context/skills/export-config/SKILL.md +2 -2
  239. package/resources/targets/codebuddy/js3d/js3d/context/skills/index.json +4 -16
  240. package/resources/targets/codebuddy/js3d/js3d/context/skills/performance-audit/SKILL.md +1 -1
  241. package/resources/targets/codebuddy/js3d/js3d/context/skills/visual-qa/SKILL.md +1 -1
  242. package/resources/targets/codebuddy/js3d/recovery.md +14 -4
  243. package/resources/targets/codebuddy/js3d/target.json +1 -1
  244. package/resources/targets/codex/js/bootstrap/SKILL.md +7 -1
  245. package/resources/targets/codex/js/context-filter-report.json +27 -0
  246. package/resources/targets/codex/js/craft-game-maker/SKILL.md +24 -29
  247. package/resources/targets/codex/js/craft-game-maker/js.md +2 -2
  248. package/resources/targets/codex/js/js/bundle.json +16 -18
  249. package/resources/targets/codex/js/js/context/AGENTS.md +10 -6
  250. package/resources/targets/codex/js/js/context/knowledge/AssetUrl.md +4 -4
  251. package/resources/targets/codex/js/js/context/knowledge/AssetWiring.md +7 -0
  252. package/resources/targets/codex/js/js/context/knowledge/ResourceLoading.md +9 -0
  253. package/resources/targets/codex/js/js/context/skills/export-config/SKILL.md +2 -2
  254. package/resources/targets/codex/js/js/context/skills/index.json +2 -14
  255. package/resources/targets/codex/js/js/context/skills/visual-qa/SKILL.md +1 -1
  256. package/resources/targets/codex/js/recovery.md +14 -4
  257. package/resources/targets/codex/js/target.json +1 -1
  258. package/resources/targets/codex/js3d/bootstrap/SKILL.md +7 -1
  259. package/resources/targets/codex/js3d/context-filter-report.json +27 -0
  260. package/resources/targets/codex/js3d/craft-game-maker/SKILL.md +24 -29
  261. package/resources/targets/codex/js3d/craft-game-maker/js3d.md +3 -4
  262. package/resources/targets/codex/js3d/js3d/bundle.json +19 -21
  263. package/resources/targets/codex/js3d/js3d/context/AGENTS.md +10 -6
  264. package/resources/targets/codex/js3d/js3d/context/knowledge/AssetUrl.md +4 -4
  265. package/resources/targets/codex/js3d/js3d/context/knowledge/AssetWiring.md +7 -0
  266. package/resources/targets/{codebuddy/js3d/js3d/context/skills/asset-search/references/resource-config.md → codex/js3d/js3d/context/knowledge/ResourceLoading.md} +2 -2
  267. package/resources/targets/codex/js3d/js3d/context/skills/asset-usage-audit/SKILL.md +1 -1
  268. package/resources/targets/codex/js3d/js3d/context/skills/asset-usage-audit/scripts/lib/scan.mjs +2 -2
  269. package/resources/targets/codex/js3d/js3d/context/skills/export-config/SKILL.md +2 -2
  270. package/resources/targets/codex/js3d/js3d/context/skills/index.json +4 -16
  271. package/resources/targets/codex/js3d/js3d/context/skills/performance-audit/SKILL.md +1 -1
  272. package/resources/targets/codex/js3d/js3d/context/skills/visual-qa/SKILL.md +1 -1
  273. package/resources/targets/codex/js3d/recovery.md +14 -4
  274. package/resources/targets/codex/js3d/target.json +1 -1
  275. package/resources/targets/cursor/js/bootstrap/SKILL.md +20 -0
  276. package/resources/targets/cursor/js/context-filter-report.json +27 -0
  277. package/resources/targets/cursor/js/craft-game-maker/SKILL.md +72 -0
  278. package/resources/targets/cursor/js/craft-game-maker/js.md +10 -0
  279. package/resources/targets/cursor/js/js/bundle.json +97 -0
  280. package/resources/targets/cursor/js/js/context/AGENTS.md +29 -0
  281. package/resources/targets/cursor/js/js/context/hooks/hooks.json +14 -0
  282. package/resources/targets/cursor/js/js/context/knowledge/AssetUrl.md +9 -0
  283. package/resources/targets/cursor/js/js/context/knowledge/AssetWiring.md +7 -0
  284. package/resources/targets/cursor/js/js/context/knowledge/Layout.md +7 -0
  285. package/resources/targets/cursor/js/js/context/knowledge/Lifecycle.md +11 -0
  286. package/resources/targets/cursor/js/js/context/knowledge/ResourceLoading.md +9 -0
  287. package/resources/targets/cursor/js/js/context/skills/export-config/SKILL.md +16 -0
  288. package/resources/targets/cursor/js/js/context/skills/export-config/assets/tooling/cli.mjs +20 -0
  289. package/resources/targets/cursor/js/js/context/skills/export-config/assets/tooling/config.d.mts +19 -0
  290. package/resources/targets/cursor/js/js/context/skills/export-config/assets/tooling/config.mjs +1 -0
  291. package/resources/targets/cursor/js/js/context/skills/export-config/assets/tooling/project.d.mts +6 -0
  292. package/resources/targets/cursor/js/js/context/skills/export-config/assets/tooling/project.mjs +77 -0
  293. package/resources/targets/cursor/js/js/context/skills/export-config/assets/tooling/vite.d.mts +2 -0
  294. package/resources/targets/cursor/js/js/context/skills/export-config/assets/tooling/vite.mjs +34 -0
  295. package/resources/targets/cursor/js/js/context/skills/export-config/scripts/export-config.mjs +4 -0
  296. package/resources/targets/cursor/js/js/context/skills/export-config/scripts/install.mjs +89 -0
  297. package/resources/targets/cursor/js/js/context/skills/export-config/scripts/panel-resource-path.mjs +106 -0
  298. package/resources/targets/cursor/js/js/context/skills/index.json +19 -0
  299. package/resources/targets/cursor/js/js/context/skills/visual-qa/SKILL.md +14 -0
  300. package/resources/targets/cursor/js/js/project/README.md +7 -0
  301. package/resources/targets/cursor/js/js/project/configs/assets.json +1 -0
  302. package/resources/targets/cursor/js/js/project/configs/game.controls.json +3 -0
  303. package/resources/targets/cursor/js/js/project/configs/game.json +3 -0
  304. package/resources/targets/cursor/js/js/project/game-runtime.json +7 -0
  305. package/resources/targets/cursor/js/js/project/game.config.json +7 -0
  306. package/resources/targets/cursor/js/js/project/index.html +20 -0
  307. package/resources/targets/cursor/js/js/project/package.json +22 -0
  308. package/resources/targets/cursor/js/js/project/runtime/lightgame/1.1.0/platform/identity/qq-ai-game-sdk.min.js +5 -0
  309. package/resources/targets/cursor/js/js/project/runtime/lightgame/1.1.0/platform/identity/qq-session.mjs +208 -0
  310. package/resources/targets/cursor/js/js/project/runtime/lightgame/1.1.0/platform/identity/shared.mjs +37 -0
  311. package/resources/targets/cursor/js/js/project/runtime/lightgame/1.1.0/platform/platform-capture-video.mjs +227 -0
  312. package/resources/targets/cursor/js/js/project/runtime/lightgame/1.1.0/platform/platform-service.d.mts +31 -0
  313. package/resources/targets/cursor/js/js/project/runtime/lightgame/1.1.0/platform/platform-service.mjs +272 -0
  314. package/resources/targets/cursor/js/js/project/runtime/lightgame/1.1.0/platform/platform.d.mts +79 -0
  315. package/resources/targets/cursor/js/js/project/runtime/lightgame/1.1.0/platform/platform.mjs +29 -0
  316. package/resources/targets/cursor/js/js/project/runtime/lightgame/1.1.0/release.json +22 -0
  317. package/resources/targets/cursor/js/js/project/runtime/lightgame/1.1.0/tooling/cli.mjs +16 -0
  318. package/resources/targets/cursor/js/js/project/runtime/lightgame/1.1.0/tooling/project.d.mts +4 -0
  319. package/resources/targets/cursor/js/js/project/runtime/lightgame/1.1.0/tooling/project.mjs +50 -0
  320. package/resources/targets/cursor/js/js/project/runtime/lightgame/1.1.0/tooling/vite.d.mts +3 -0
  321. package/resources/targets/cursor/js/js/project/runtime/lightgame/1.1.0/tooling/vite.mjs +72 -0
  322. package/resources/targets/cursor/js/js/project/runtime/lightgame/1.1.0/tools/assets.d.mts +24 -0
  323. package/resources/targets/cursor/js/js/project/runtime/lightgame/1.1.0/tools/assets.mjs +2 -0
  324. package/resources/targets/cursor/js/js/project/runtime/lightgame/1.1.0/tools/astc.d.mts +10 -0
  325. package/resources/targets/cursor/js/js/project/runtime/lightgame/1.1.0/tools/astc.mjs +1 -0
  326. package/resources/targets/cursor/js/js/project/scripts/config-export/assert-asset-wiring.mjs +72 -0
  327. package/resources/targets/cursor/js/js/project/scripts/config-export/panel-resource-path.mjs +106 -0
  328. package/resources/targets/cursor/js/js/project/scripts/config-export/sync-asset-controls.mjs +316 -0
  329. package/resources/targets/cursor/js/js/project/scripts/config-export.mjs +13 -0
  330. package/resources/targets/cursor/js/js/project/scripts/skill-modules/export-config/cli.mjs +20 -0
  331. package/resources/targets/cursor/js/js/project/scripts/skill-modules/export-config/config.d.mts +19 -0
  332. package/resources/targets/cursor/js/js/project/scripts/skill-modules/export-config/config.mjs +1 -0
  333. package/resources/targets/cursor/js/js/project/scripts/skill-modules/export-config/installed.json +6 -0
  334. package/resources/targets/cursor/js/js/project/scripts/skill-modules/export-config/project.d.mts +6 -0
  335. package/resources/targets/cursor/js/js/project/scripts/skill-modules/export-config/project.mjs +77 -0
  336. package/resources/targets/cursor/js/js/project/scripts/skill-modules/export-config/vite.d.mts +2 -0
  337. package/resources/targets/cursor/js/js/project/scripts/skill-modules/export-config/vite.mjs +34 -0
  338. package/resources/targets/cursor/js/js/project/scripts/write-preview-ready.mjs +22 -0
  339. package/resources/targets/cursor/js/js/project/src/display/ui-stage.ts +156 -0
  340. package/resources/targets/cursor/js/js/project/src/display/viewport.ts +249 -0
  341. package/resources/targets/cursor/js/js/project/src/main.ts +87 -0
  342. package/resources/targets/cursor/js/js/project/src/platform.ts +2 -0
  343. package/resources/targets/cursor/js/js/project/src/scenes/LoadScene.ts +89 -0
  344. package/resources/targets/cursor/js/js/project/src/scenes/PlayScene.ts +17 -0
  345. package/resources/targets/cursor/js/js/project/src/screenUi.ts +185 -0
  346. package/resources/targets/cursor/js/js/project/src/style.css +294 -0
  347. package/resources/targets/cursor/js/js/project/tsconfig.json +20 -0
  348. package/resources/targets/cursor/js/js/project/unified_data_control_config.json +20 -0
  349. package/resources/targets/cursor/js/js/project/vite.config.ts +5 -0
  350. package/resources/targets/cursor/js/recovery.md +17 -0
  351. package/resources/targets/cursor/js/target.json +61 -0
  352. package/resources/targets/cursor/js3d/bootstrap/SKILL.md +20 -0
  353. package/resources/targets/cursor/js3d/context-filter-report.json +27 -0
  354. package/resources/targets/cursor/js3d/craft-game-maker/SKILL.md +72 -0
  355. package/resources/targets/cursor/js3d/craft-game-maker/js3d.md +12 -0
  356. package/resources/targets/cursor/js3d/js3d/bundle.json +108 -0
  357. package/resources/targets/cursor/js3d/js3d/context/AGENTS.md +30 -0
  358. package/resources/targets/cursor/js3d/js3d/context/hooks/hooks.json +14 -0
  359. package/resources/targets/cursor/js3d/js3d/context/knowledge/AssetUrl.md +9 -0
  360. package/resources/targets/cursor/js3d/js3d/context/knowledge/AssetWiring.md +7 -0
  361. package/resources/targets/cursor/js3d/js3d/context/knowledge/CodingGuide/Pitfalls.md +11 -0
  362. package/resources/targets/cursor/js3d/js3d/context/knowledge/Layout.md +7 -0
  363. package/resources/targets/cursor/js3d/js3d/context/knowledge/ResourceLoading.md +11 -0
  364. package/resources/targets/cursor/js3d/js3d/context/knowledge/Runtime.md +9 -0
  365. package/resources/targets/cursor/js3d/js3d/context/skills/asset-usage-audit/SKILL.md +16 -0
  366. package/resources/targets/cursor/js3d/js3d/context/skills/asset-usage-audit/scripts/compare-animations.mjs +48 -0
  367. package/resources/targets/cursor/js3d/js3d/context/skills/asset-usage-audit/scripts/lib/anim.mjs +266 -0
  368. package/resources/targets/cursor/js3d/js3d/context/skills/asset-usage-audit/scripts/lib/glb.mjs +241 -0
  369. package/resources/targets/cursor/js3d/js3d/context/skills/asset-usage-audit/scripts/lib/scan.mjs +455 -0
  370. package/resources/targets/cursor/js3d/js3d/context/skills/asset-usage-audit/scripts/scan-assets.mjs +77 -0
  371. package/resources/targets/cursor/js3d/js3d/context/skills/export-config/SKILL.md +16 -0
  372. package/resources/targets/cursor/js3d/js3d/context/skills/export-config/assets/tooling/cli.mjs +20 -0
  373. package/resources/targets/cursor/js3d/js3d/context/skills/export-config/assets/tooling/config.d.mts +19 -0
  374. package/resources/targets/cursor/js3d/js3d/context/skills/export-config/assets/tooling/config.mjs +1 -0
  375. package/resources/targets/cursor/js3d/js3d/context/skills/export-config/assets/tooling/project.d.mts +6 -0
  376. package/resources/targets/cursor/js3d/js3d/context/skills/export-config/assets/tooling/project.mjs +77 -0
  377. package/resources/targets/cursor/js3d/js3d/context/skills/export-config/assets/tooling/vite.d.mts +2 -0
  378. package/resources/targets/cursor/js3d/js3d/context/skills/export-config/assets/tooling/vite.mjs +34 -0
  379. package/resources/targets/cursor/js3d/js3d/context/skills/export-config/scripts/export-config.mjs +4 -0
  380. package/resources/targets/cursor/js3d/js3d/context/skills/export-config/scripts/install.mjs +89 -0
  381. package/resources/targets/cursor/js3d/js3d/context/skills/export-config/scripts/panel-resource-path.mjs +106 -0
  382. package/resources/targets/cursor/js3d/js3d/context/skills/index.json +31 -0
  383. package/resources/targets/cursor/js3d/js3d/context/skills/performance-audit/SKILL.md +21 -0
  384. package/resources/targets/cursor/js3d/js3d/context/skills/performance-audit/scripts/lib/rules.mjs +470 -0
  385. package/resources/targets/cursor/js3d/js3d/context/skills/performance-audit/scripts/lib/scan.mjs +387 -0
  386. package/resources/targets/cursor/js3d/js3d/context/skills/performance-audit/scripts/lib/source.mjs +398 -0
  387. package/resources/targets/cursor/js3d/js3d/context/skills/performance-audit/scripts/scan-perf.mjs +130 -0
  388. package/resources/targets/cursor/js3d/js3d/context/skills/visual-qa/SKILL.md +14 -0
  389. package/resources/targets/cursor/js3d/js3d/project/README.md +7 -0
  390. package/resources/targets/cursor/js3d/js3d/project/configs/game.controls.json +3 -0
  391. package/resources/targets/cursor/js3d/js3d/project/configs/game.json +3 -0
  392. package/resources/targets/cursor/js3d/js3d/project/game-runtime.json +7 -0
  393. package/resources/targets/cursor/js3d/js3d/project/game.config.json +7 -0
  394. package/resources/targets/cursor/js3d/js3d/project/index.html +12 -0
  395. package/resources/targets/cursor/js3d/js3d/project/package.json +23 -0
  396. package/resources/targets/cursor/js3d/js3d/project/runtime/lightgame/1.1.0/platform/identity/qq-ai-game-sdk.min.js +5 -0
  397. package/resources/targets/cursor/js3d/js3d/project/runtime/lightgame/1.1.0/platform/identity/qq-session.mjs +208 -0
  398. package/resources/targets/cursor/js3d/js3d/project/runtime/lightgame/1.1.0/platform/identity/shared.mjs +37 -0
  399. package/resources/targets/cursor/js3d/js3d/project/runtime/lightgame/1.1.0/platform/platform-capture-video.mjs +227 -0
  400. package/resources/targets/cursor/js3d/js3d/project/runtime/lightgame/1.1.0/platform/platform-service.d.mts +31 -0
  401. package/resources/targets/cursor/js3d/js3d/project/runtime/lightgame/1.1.0/platform/platform-service.mjs +272 -0
  402. package/resources/targets/cursor/js3d/js3d/project/runtime/lightgame/1.1.0/platform/platform.d.mts +79 -0
  403. package/resources/targets/cursor/js3d/js3d/project/runtime/lightgame/1.1.0/platform/platform.mjs +30 -0
  404. package/resources/targets/cursor/js3d/js3d/project/runtime/lightgame/1.1.0/release.json +24 -0
  405. package/resources/targets/cursor/js3d/js3d/project/runtime/lightgame/1.1.0/tooling/cli.mjs +16 -0
  406. package/resources/targets/cursor/js3d/js3d/project/runtime/lightgame/1.1.0/tooling/project.d.mts +4 -0
  407. package/resources/targets/cursor/js3d/js3d/project/runtime/lightgame/1.1.0/tooling/project.mjs +50 -0
  408. package/resources/targets/cursor/js3d/js3d/project/runtime/lightgame/1.1.0/tooling/vite.d.mts +3 -0
  409. package/resources/targets/cursor/js3d/js3d/project/runtime/lightgame/1.1.0/tooling/vite.mjs +72 -0
  410. package/resources/targets/cursor/js3d/js3d/project/runtime/lightgame/1.1.0/tools/assets.d.mts +24 -0
  411. package/resources/targets/cursor/js3d/js3d/project/runtime/lightgame/1.1.0/tools/assets.mjs +2 -0
  412. package/resources/targets/cursor/js3d/js3d/project/runtime/lightgame/1.1.0/tools/astc.d.mts +10 -0
  413. package/resources/targets/cursor/js3d/js3d/project/runtime/lightgame/1.1.0/tools/astc.mjs +1 -0
  414. package/resources/targets/cursor/js3d/js3d/project/runtime/lightgame/1.1.0/tools/glb.d.mts +26 -0
  415. package/resources/targets/cursor/js3d/js3d/project/runtime/lightgame/1.1.0/tools/glb.mjs +351 -0
  416. package/resources/targets/cursor/js3d/js3d/project/scripts/config-export/assert-asset-wiring.mjs +97 -0
  417. package/resources/targets/cursor/js3d/js3d/project/scripts/config-export/panel-resource-path.mjs +106 -0
  418. package/resources/targets/cursor/js3d/js3d/project/scripts/config-export/sync-asset-controls.mjs +327 -0
  419. package/resources/targets/cursor/js3d/js3d/project/scripts/config-export/sync-scene-assets.mjs +191 -0
  420. package/resources/targets/cursor/js3d/js3d/project/scripts/config-export.mjs +15 -0
  421. package/resources/targets/cursor/js3d/js3d/project/scripts/skill-modules/export-config/cli.mjs +20 -0
  422. package/resources/targets/cursor/js3d/js3d/project/scripts/skill-modules/export-config/config.d.mts +19 -0
  423. package/resources/targets/cursor/js3d/js3d/project/scripts/skill-modules/export-config/config.mjs +1 -0
  424. package/resources/targets/cursor/js3d/js3d/project/scripts/skill-modules/export-config/installed.json +6 -0
  425. package/resources/targets/cursor/js3d/js3d/project/scripts/skill-modules/export-config/project.d.mts +6 -0
  426. package/resources/targets/cursor/js3d/js3d/project/scripts/skill-modules/export-config/project.mjs +77 -0
  427. package/resources/targets/cursor/js3d/js3d/project/scripts/skill-modules/export-config/vite.d.mts +2 -0
  428. package/resources/targets/cursor/js3d/js3d/project/scripts/skill-modules/export-config/vite.mjs +34 -0
  429. package/resources/targets/cursor/js3d/js3d/project/scripts/write-preview-ready.mjs +22 -0
  430. package/resources/targets/cursor/js3d/js3d/project/src/display/ui-stage.ts +156 -0
  431. package/resources/targets/cursor/js3d/js3d/project/src/display/viewport.ts +239 -0
  432. package/resources/targets/cursor/js3d/js3d/project/src/main.ts +85 -0
  433. package/resources/targets/cursor/js3d/js3d/project/src/platform.ts +2 -0
  434. package/resources/targets/cursor/js3d/js3d/project/src/style.css +83 -0
  435. package/resources/targets/cursor/js3d/js3d/project/tsconfig.json +20 -0
  436. package/resources/targets/cursor/js3d/js3d/project/unified_data_control_config.json +20 -0
  437. package/resources/targets/cursor/js3d/js3d/project/vite.config.ts +5 -0
  438. package/resources/targets/cursor/js3d/recovery.md +17 -0
  439. package/resources/targets/cursor/js3d/target.json +60 -0
  440. package/resources/targets/dsh/js/bootstrap/SKILL.md +20 -0
  441. package/resources/targets/dsh/js/context-filter-report.json +27 -0
  442. package/resources/targets/dsh/js/craft-game-maker/SKILL.md +72 -0
  443. package/resources/targets/dsh/js/craft-game-maker/js.md +10 -0
  444. package/resources/targets/dsh/js/js/bundle.json +97 -0
  445. package/resources/targets/dsh/js/js/context/AGENTS.md +29 -0
  446. package/resources/targets/dsh/js/js/context/hooks/hooks.json +14 -0
  447. package/resources/targets/dsh/js/js/context/knowledge/AssetUrl.md +9 -0
  448. package/resources/targets/dsh/js/js/context/knowledge/AssetWiring.md +7 -0
  449. package/resources/targets/dsh/js/js/context/knowledge/Layout.md +7 -0
  450. package/resources/targets/dsh/js/js/context/knowledge/Lifecycle.md +11 -0
  451. package/resources/targets/dsh/js/js/context/knowledge/ResourceLoading.md +9 -0
  452. package/resources/targets/dsh/js/js/context/skills/export-config/SKILL.md +16 -0
  453. package/resources/targets/dsh/js/js/context/skills/export-config/assets/tooling/cli.mjs +20 -0
  454. package/resources/targets/dsh/js/js/context/skills/export-config/assets/tooling/config.d.mts +19 -0
  455. package/resources/targets/dsh/js/js/context/skills/export-config/assets/tooling/config.mjs +1 -0
  456. package/resources/targets/dsh/js/js/context/skills/export-config/assets/tooling/project.d.mts +6 -0
  457. package/resources/targets/dsh/js/js/context/skills/export-config/assets/tooling/project.mjs +77 -0
  458. package/resources/targets/dsh/js/js/context/skills/export-config/assets/tooling/vite.d.mts +2 -0
  459. package/resources/targets/dsh/js/js/context/skills/export-config/assets/tooling/vite.mjs +34 -0
  460. package/resources/targets/dsh/js/js/context/skills/export-config/scripts/export-config.mjs +4 -0
  461. package/resources/targets/dsh/js/js/context/skills/export-config/scripts/install.mjs +89 -0
  462. package/resources/targets/dsh/js/js/context/skills/export-config/scripts/panel-resource-path.mjs +106 -0
  463. package/resources/targets/dsh/js/js/context/skills/index.json +19 -0
  464. package/resources/targets/dsh/js/js/context/skills/visual-qa/SKILL.md +14 -0
  465. package/resources/targets/dsh/js/js/project/README.md +7 -0
  466. package/resources/targets/dsh/js/js/project/configs/assets.json +1 -0
  467. package/resources/targets/dsh/js/js/project/configs/game.controls.json +3 -0
  468. package/resources/targets/dsh/js/js/project/configs/game.json +3 -0
  469. package/resources/targets/dsh/js/js/project/game-runtime.json +7 -0
  470. package/resources/targets/dsh/js/js/project/game.config.json +7 -0
  471. package/resources/targets/dsh/js/js/project/index.html +20 -0
  472. package/resources/targets/dsh/js/js/project/package.json +22 -0
  473. package/resources/targets/dsh/js/js/project/runtime/lightgame/1.1.0/platform/identity/qq-ai-game-sdk.min.js +5 -0
  474. package/resources/targets/dsh/js/js/project/runtime/lightgame/1.1.0/platform/identity/qq-session.mjs +208 -0
  475. package/resources/targets/dsh/js/js/project/runtime/lightgame/1.1.0/platform/identity/shared.mjs +37 -0
  476. package/resources/targets/dsh/js/js/project/runtime/lightgame/1.1.0/platform/platform-capture-video.mjs +227 -0
  477. package/resources/targets/dsh/js/js/project/runtime/lightgame/1.1.0/platform/platform-service.d.mts +31 -0
  478. package/resources/targets/dsh/js/js/project/runtime/lightgame/1.1.0/platform/platform-service.mjs +272 -0
  479. package/resources/targets/dsh/js/js/project/runtime/lightgame/1.1.0/platform/platform.d.mts +79 -0
  480. package/resources/targets/dsh/js/js/project/runtime/lightgame/1.1.0/platform/platform.mjs +29 -0
  481. package/resources/targets/dsh/js/js/project/runtime/lightgame/1.1.0/release.json +22 -0
  482. package/resources/targets/dsh/js/js/project/runtime/lightgame/1.1.0/tooling/cli.mjs +16 -0
  483. package/resources/targets/dsh/js/js/project/runtime/lightgame/1.1.0/tooling/project.d.mts +4 -0
  484. package/resources/targets/dsh/js/js/project/runtime/lightgame/1.1.0/tooling/project.mjs +50 -0
  485. package/resources/targets/dsh/js/js/project/runtime/lightgame/1.1.0/tooling/vite.d.mts +3 -0
  486. package/resources/targets/dsh/js/js/project/runtime/lightgame/1.1.0/tooling/vite.mjs +72 -0
  487. package/resources/targets/dsh/js/js/project/runtime/lightgame/1.1.0/tools/assets.d.mts +24 -0
  488. package/resources/targets/dsh/js/js/project/runtime/lightgame/1.1.0/tools/assets.mjs +2 -0
  489. package/resources/targets/dsh/js/js/project/runtime/lightgame/1.1.0/tools/astc.d.mts +10 -0
  490. package/resources/targets/dsh/js/js/project/runtime/lightgame/1.1.0/tools/astc.mjs +1 -0
  491. package/resources/targets/dsh/js/js/project/scripts/config-export/assert-asset-wiring.mjs +72 -0
  492. package/resources/targets/dsh/js/js/project/scripts/config-export/panel-resource-path.mjs +106 -0
  493. package/resources/targets/dsh/js/js/project/scripts/config-export/sync-asset-controls.mjs +316 -0
  494. package/resources/targets/dsh/js/js/project/scripts/config-export.mjs +13 -0
  495. package/resources/targets/dsh/js/js/project/scripts/skill-modules/export-config/cli.mjs +20 -0
  496. package/resources/targets/dsh/js/js/project/scripts/skill-modules/export-config/config.d.mts +19 -0
  497. package/resources/targets/dsh/js/js/project/scripts/skill-modules/export-config/config.mjs +1 -0
  498. package/resources/targets/dsh/js/js/project/scripts/skill-modules/export-config/installed.json +6 -0
  499. package/resources/targets/dsh/js/js/project/scripts/skill-modules/export-config/project.d.mts +6 -0
  500. package/resources/targets/dsh/js/js/project/scripts/skill-modules/export-config/project.mjs +77 -0
  501. package/resources/targets/dsh/js/js/project/scripts/skill-modules/export-config/vite.d.mts +2 -0
  502. package/resources/targets/dsh/js/js/project/scripts/skill-modules/export-config/vite.mjs +34 -0
  503. package/resources/targets/dsh/js/js/project/scripts/write-preview-ready.mjs +22 -0
  504. package/resources/targets/dsh/js/js/project/src/display/ui-stage.ts +156 -0
  505. package/resources/targets/dsh/js/js/project/src/display/viewport.ts +249 -0
  506. package/resources/targets/dsh/js/js/project/src/main.ts +87 -0
  507. package/resources/targets/dsh/js/js/project/src/platform.ts +2 -0
  508. package/resources/targets/dsh/js/js/project/src/scenes/LoadScene.ts +89 -0
  509. package/resources/targets/dsh/js/js/project/src/scenes/PlayScene.ts +17 -0
  510. package/resources/targets/dsh/js/js/project/src/screenUi.ts +185 -0
  511. package/resources/targets/dsh/js/js/project/src/style.css +294 -0
  512. package/resources/targets/dsh/js/js/project/tsconfig.json +20 -0
  513. package/resources/targets/dsh/js/js/project/unified_data_control_config.json +20 -0
  514. package/resources/targets/dsh/js/js/project/vite.config.ts +5 -0
  515. package/resources/targets/dsh/js/recovery.md +17 -0
  516. package/resources/targets/dsh/js/target.json +61 -0
  517. package/resources/targets/dsh/js3d/bootstrap/SKILL.md +20 -0
  518. package/resources/targets/dsh/js3d/context-filter-report.json +27 -0
  519. package/resources/targets/dsh/js3d/craft-game-maker/SKILL.md +72 -0
  520. package/resources/targets/dsh/js3d/craft-game-maker/js3d.md +12 -0
  521. package/resources/targets/dsh/js3d/js3d/bundle.json +108 -0
  522. package/resources/targets/dsh/js3d/js3d/context/AGENTS.md +30 -0
  523. package/resources/targets/dsh/js3d/js3d/context/hooks/hooks.json +14 -0
  524. package/resources/targets/dsh/js3d/js3d/context/knowledge/AssetUrl.md +9 -0
  525. package/resources/targets/dsh/js3d/js3d/context/knowledge/AssetWiring.md +7 -0
  526. package/resources/targets/dsh/js3d/js3d/context/knowledge/CodingGuide/Pitfalls.md +11 -0
  527. package/resources/targets/dsh/js3d/js3d/context/knowledge/Layout.md +7 -0
  528. package/resources/targets/dsh/js3d/js3d/context/knowledge/ResourceLoading.md +11 -0
  529. package/resources/targets/dsh/js3d/js3d/context/knowledge/Runtime.md +9 -0
  530. package/resources/targets/dsh/js3d/js3d/context/skills/asset-usage-audit/SKILL.md +16 -0
  531. package/resources/targets/dsh/js3d/js3d/context/skills/asset-usage-audit/scripts/compare-animations.mjs +48 -0
  532. package/resources/targets/dsh/js3d/js3d/context/skills/asset-usage-audit/scripts/lib/anim.mjs +266 -0
  533. package/resources/targets/dsh/js3d/js3d/context/skills/asset-usage-audit/scripts/lib/glb.mjs +241 -0
  534. package/resources/targets/dsh/js3d/js3d/context/skills/asset-usage-audit/scripts/lib/scan.mjs +455 -0
  535. package/resources/targets/dsh/js3d/js3d/context/skills/asset-usage-audit/scripts/scan-assets.mjs +77 -0
  536. package/resources/targets/dsh/js3d/js3d/context/skills/export-config/SKILL.md +16 -0
  537. package/resources/targets/dsh/js3d/js3d/context/skills/export-config/assets/tooling/cli.mjs +20 -0
  538. package/resources/targets/dsh/js3d/js3d/context/skills/export-config/assets/tooling/config.d.mts +19 -0
  539. package/resources/targets/dsh/js3d/js3d/context/skills/export-config/assets/tooling/config.mjs +1 -0
  540. package/resources/targets/dsh/js3d/js3d/context/skills/export-config/assets/tooling/project.d.mts +6 -0
  541. package/resources/targets/dsh/js3d/js3d/context/skills/export-config/assets/tooling/project.mjs +77 -0
  542. package/resources/targets/dsh/js3d/js3d/context/skills/export-config/assets/tooling/vite.d.mts +2 -0
  543. package/resources/targets/dsh/js3d/js3d/context/skills/export-config/assets/tooling/vite.mjs +34 -0
  544. package/resources/targets/dsh/js3d/js3d/context/skills/export-config/scripts/export-config.mjs +4 -0
  545. package/resources/targets/dsh/js3d/js3d/context/skills/export-config/scripts/install.mjs +89 -0
  546. package/resources/targets/dsh/js3d/js3d/context/skills/export-config/scripts/panel-resource-path.mjs +106 -0
  547. package/resources/targets/dsh/js3d/js3d/context/skills/index.json +31 -0
  548. package/resources/targets/dsh/js3d/js3d/context/skills/performance-audit/SKILL.md +21 -0
  549. package/resources/targets/dsh/js3d/js3d/context/skills/performance-audit/scripts/lib/rules.mjs +470 -0
  550. package/resources/targets/dsh/js3d/js3d/context/skills/performance-audit/scripts/lib/scan.mjs +387 -0
  551. package/resources/targets/dsh/js3d/js3d/context/skills/performance-audit/scripts/lib/source.mjs +398 -0
  552. package/resources/targets/dsh/js3d/js3d/context/skills/performance-audit/scripts/scan-perf.mjs +130 -0
  553. package/resources/targets/dsh/js3d/js3d/context/skills/visual-qa/SKILL.md +14 -0
  554. package/resources/targets/dsh/js3d/js3d/project/README.md +7 -0
  555. package/resources/targets/dsh/js3d/js3d/project/configs/game.controls.json +3 -0
  556. package/resources/targets/dsh/js3d/js3d/project/configs/game.json +3 -0
  557. package/resources/targets/dsh/js3d/js3d/project/game-runtime.json +7 -0
  558. package/resources/targets/dsh/js3d/js3d/project/game.config.json +7 -0
  559. package/resources/targets/dsh/js3d/js3d/project/index.html +12 -0
  560. package/resources/targets/dsh/js3d/js3d/project/package.json +23 -0
  561. package/resources/targets/dsh/js3d/js3d/project/runtime/lightgame/1.1.0/platform/identity/qq-ai-game-sdk.min.js +5 -0
  562. package/resources/targets/dsh/js3d/js3d/project/runtime/lightgame/1.1.0/platform/identity/qq-session.mjs +208 -0
  563. package/resources/targets/dsh/js3d/js3d/project/runtime/lightgame/1.1.0/platform/identity/shared.mjs +37 -0
  564. package/resources/targets/dsh/js3d/js3d/project/runtime/lightgame/1.1.0/platform/platform-capture-video.mjs +227 -0
  565. package/resources/targets/dsh/js3d/js3d/project/runtime/lightgame/1.1.0/platform/platform-service.d.mts +31 -0
  566. package/resources/targets/dsh/js3d/js3d/project/runtime/lightgame/1.1.0/platform/platform-service.mjs +272 -0
  567. package/resources/targets/dsh/js3d/js3d/project/runtime/lightgame/1.1.0/platform/platform.d.mts +79 -0
  568. package/resources/targets/dsh/js3d/js3d/project/runtime/lightgame/1.1.0/platform/platform.mjs +30 -0
  569. package/resources/targets/dsh/js3d/js3d/project/runtime/lightgame/1.1.0/release.json +24 -0
  570. package/resources/targets/dsh/js3d/js3d/project/runtime/lightgame/1.1.0/tooling/cli.mjs +16 -0
  571. package/resources/targets/dsh/js3d/js3d/project/runtime/lightgame/1.1.0/tooling/project.d.mts +4 -0
  572. package/resources/targets/dsh/js3d/js3d/project/runtime/lightgame/1.1.0/tooling/project.mjs +50 -0
  573. package/resources/targets/dsh/js3d/js3d/project/runtime/lightgame/1.1.0/tooling/vite.d.mts +3 -0
  574. package/resources/targets/dsh/js3d/js3d/project/runtime/lightgame/1.1.0/tooling/vite.mjs +72 -0
  575. package/resources/targets/dsh/js3d/js3d/project/runtime/lightgame/1.1.0/tools/assets.d.mts +24 -0
  576. package/resources/targets/dsh/js3d/js3d/project/runtime/lightgame/1.1.0/tools/assets.mjs +2 -0
  577. package/resources/targets/dsh/js3d/js3d/project/runtime/lightgame/1.1.0/tools/astc.d.mts +10 -0
  578. package/resources/targets/dsh/js3d/js3d/project/runtime/lightgame/1.1.0/tools/astc.mjs +1 -0
  579. package/resources/targets/dsh/js3d/js3d/project/runtime/lightgame/1.1.0/tools/glb.d.mts +26 -0
  580. package/resources/targets/dsh/js3d/js3d/project/runtime/lightgame/1.1.0/tools/glb.mjs +351 -0
  581. package/resources/targets/dsh/js3d/js3d/project/scripts/config-export/assert-asset-wiring.mjs +97 -0
  582. package/resources/targets/dsh/js3d/js3d/project/scripts/config-export/panel-resource-path.mjs +106 -0
  583. package/resources/targets/dsh/js3d/js3d/project/scripts/config-export/sync-asset-controls.mjs +327 -0
  584. package/resources/targets/dsh/js3d/js3d/project/scripts/config-export/sync-scene-assets.mjs +191 -0
  585. package/resources/targets/dsh/js3d/js3d/project/scripts/config-export.mjs +15 -0
  586. package/resources/targets/dsh/js3d/js3d/project/scripts/skill-modules/export-config/cli.mjs +20 -0
  587. package/resources/targets/dsh/js3d/js3d/project/scripts/skill-modules/export-config/config.d.mts +19 -0
  588. package/resources/targets/dsh/js3d/js3d/project/scripts/skill-modules/export-config/config.mjs +1 -0
  589. package/resources/targets/dsh/js3d/js3d/project/scripts/skill-modules/export-config/installed.json +6 -0
  590. package/resources/targets/dsh/js3d/js3d/project/scripts/skill-modules/export-config/project.d.mts +6 -0
  591. package/resources/targets/dsh/js3d/js3d/project/scripts/skill-modules/export-config/project.mjs +77 -0
  592. package/resources/targets/dsh/js3d/js3d/project/scripts/skill-modules/export-config/vite.d.mts +2 -0
  593. package/resources/targets/dsh/js3d/js3d/project/scripts/skill-modules/export-config/vite.mjs +34 -0
  594. package/resources/targets/dsh/js3d/js3d/project/scripts/write-preview-ready.mjs +22 -0
  595. package/resources/targets/dsh/js3d/js3d/project/src/display/ui-stage.ts +156 -0
  596. package/resources/targets/dsh/js3d/js3d/project/src/display/viewport.ts +239 -0
  597. package/resources/targets/dsh/js3d/js3d/project/src/main.ts +85 -0
  598. package/resources/targets/dsh/js3d/js3d/project/src/platform.ts +2 -0
  599. package/resources/targets/dsh/js3d/js3d/project/src/style.css +83 -0
  600. package/resources/targets/dsh/js3d/js3d/project/tsconfig.json +20 -0
  601. package/resources/targets/dsh/js3d/js3d/project/unified_data_control_config.json +20 -0
  602. package/resources/targets/dsh/js3d/js3d/project/vite.config.ts +5 -0
  603. package/resources/targets/dsh/js3d/recovery.md +17 -0
  604. package/resources/targets/dsh/js3d/target.json +60 -0
  605. package/resources/targets/index.json +72 -12
  606. package/resources/targets/kimi/js/bootstrap/SKILL.md +20 -0
  607. package/resources/targets/kimi/js/context-filter-report.json +27 -0
  608. package/resources/targets/kimi/js/craft-game-maker/SKILL.md +72 -0
  609. package/resources/targets/kimi/js/craft-game-maker/js.md +10 -0
  610. package/resources/targets/kimi/js/js/bundle.json +97 -0
  611. package/resources/targets/kimi/js/js/context/AGENTS.md +29 -0
  612. package/resources/targets/kimi/js/js/context/hooks/hooks.json +14 -0
  613. package/resources/targets/kimi/js/js/context/knowledge/AssetUrl.md +9 -0
  614. package/resources/targets/kimi/js/js/context/knowledge/AssetWiring.md +7 -0
  615. package/resources/targets/kimi/js/js/context/knowledge/Layout.md +7 -0
  616. package/resources/targets/kimi/js/js/context/knowledge/Lifecycle.md +11 -0
  617. package/resources/targets/kimi/js/js/context/knowledge/ResourceLoading.md +9 -0
  618. package/resources/targets/kimi/js/js/context/skills/export-config/SKILL.md +16 -0
  619. package/resources/targets/kimi/js/js/context/skills/export-config/assets/tooling/cli.mjs +20 -0
  620. package/resources/targets/kimi/js/js/context/skills/export-config/assets/tooling/config.d.mts +19 -0
  621. package/resources/targets/kimi/js/js/context/skills/export-config/assets/tooling/config.mjs +1 -0
  622. package/resources/targets/kimi/js/js/context/skills/export-config/assets/tooling/project.d.mts +6 -0
  623. package/resources/targets/kimi/js/js/context/skills/export-config/assets/tooling/project.mjs +77 -0
  624. package/resources/targets/kimi/js/js/context/skills/export-config/assets/tooling/vite.d.mts +2 -0
  625. package/resources/targets/kimi/js/js/context/skills/export-config/assets/tooling/vite.mjs +34 -0
  626. package/resources/targets/kimi/js/js/context/skills/export-config/scripts/export-config.mjs +4 -0
  627. package/resources/targets/kimi/js/js/context/skills/export-config/scripts/install.mjs +89 -0
  628. package/resources/targets/kimi/js/js/context/skills/export-config/scripts/panel-resource-path.mjs +106 -0
  629. package/resources/targets/kimi/js/js/context/skills/index.json +19 -0
  630. package/resources/targets/kimi/js/js/context/skills/visual-qa/SKILL.md +14 -0
  631. package/resources/targets/kimi/js/js/project/README.md +7 -0
  632. package/resources/targets/kimi/js/js/project/configs/assets.json +1 -0
  633. package/resources/targets/kimi/js/js/project/configs/game.controls.json +3 -0
  634. package/resources/targets/kimi/js/js/project/configs/game.json +3 -0
  635. package/resources/targets/kimi/js/js/project/game-runtime.json +7 -0
  636. package/resources/targets/kimi/js/js/project/game.config.json +7 -0
  637. package/resources/targets/kimi/js/js/project/index.html +20 -0
  638. package/resources/targets/kimi/js/js/project/package.json +22 -0
  639. package/resources/targets/kimi/js/js/project/runtime/lightgame/1.1.0/platform/identity/qq-ai-game-sdk.min.js +5 -0
  640. package/resources/targets/kimi/js/js/project/runtime/lightgame/1.1.0/platform/identity/qq-session.mjs +208 -0
  641. package/resources/targets/kimi/js/js/project/runtime/lightgame/1.1.0/platform/identity/shared.mjs +37 -0
  642. package/resources/targets/kimi/js/js/project/runtime/lightgame/1.1.0/platform/platform-capture-video.mjs +227 -0
  643. package/resources/targets/kimi/js/js/project/runtime/lightgame/1.1.0/platform/platform-service.d.mts +31 -0
  644. package/resources/targets/kimi/js/js/project/runtime/lightgame/1.1.0/platform/platform-service.mjs +272 -0
  645. package/resources/targets/kimi/js/js/project/runtime/lightgame/1.1.0/platform/platform.d.mts +79 -0
  646. package/resources/targets/kimi/js/js/project/runtime/lightgame/1.1.0/platform/platform.mjs +29 -0
  647. package/resources/targets/kimi/js/js/project/runtime/lightgame/1.1.0/release.json +22 -0
  648. package/resources/targets/kimi/js/js/project/runtime/lightgame/1.1.0/tooling/cli.mjs +16 -0
  649. package/resources/targets/kimi/js/js/project/runtime/lightgame/1.1.0/tooling/project.d.mts +4 -0
  650. package/resources/targets/kimi/js/js/project/runtime/lightgame/1.1.0/tooling/project.mjs +50 -0
  651. package/resources/targets/kimi/js/js/project/runtime/lightgame/1.1.0/tooling/vite.d.mts +3 -0
  652. package/resources/targets/kimi/js/js/project/runtime/lightgame/1.1.0/tooling/vite.mjs +72 -0
  653. package/resources/targets/kimi/js/js/project/runtime/lightgame/1.1.0/tools/assets.d.mts +24 -0
  654. package/resources/targets/kimi/js/js/project/runtime/lightgame/1.1.0/tools/assets.mjs +2 -0
  655. package/resources/targets/kimi/js/js/project/runtime/lightgame/1.1.0/tools/astc.d.mts +10 -0
  656. package/resources/targets/kimi/js/js/project/runtime/lightgame/1.1.0/tools/astc.mjs +1 -0
  657. package/resources/targets/kimi/js/js/project/scripts/config-export/assert-asset-wiring.mjs +72 -0
  658. package/resources/targets/kimi/js/js/project/scripts/config-export/panel-resource-path.mjs +106 -0
  659. package/resources/targets/kimi/js/js/project/scripts/config-export/sync-asset-controls.mjs +316 -0
  660. package/resources/targets/kimi/js/js/project/scripts/config-export.mjs +13 -0
  661. package/resources/targets/kimi/js/js/project/scripts/skill-modules/export-config/cli.mjs +20 -0
  662. package/resources/targets/kimi/js/js/project/scripts/skill-modules/export-config/config.d.mts +19 -0
  663. package/resources/targets/kimi/js/js/project/scripts/skill-modules/export-config/config.mjs +1 -0
  664. package/resources/targets/kimi/js/js/project/scripts/skill-modules/export-config/installed.json +6 -0
  665. package/resources/targets/kimi/js/js/project/scripts/skill-modules/export-config/project.d.mts +6 -0
  666. package/resources/targets/kimi/js/js/project/scripts/skill-modules/export-config/project.mjs +77 -0
  667. package/resources/targets/kimi/js/js/project/scripts/skill-modules/export-config/vite.d.mts +2 -0
  668. package/resources/targets/kimi/js/js/project/scripts/skill-modules/export-config/vite.mjs +34 -0
  669. package/resources/targets/kimi/js/js/project/scripts/write-preview-ready.mjs +22 -0
  670. package/resources/targets/kimi/js/js/project/src/display/ui-stage.ts +156 -0
  671. package/resources/targets/kimi/js/js/project/src/display/viewport.ts +249 -0
  672. package/resources/targets/kimi/js/js/project/src/main.ts +87 -0
  673. package/resources/targets/kimi/js/js/project/src/platform.ts +2 -0
  674. package/resources/targets/kimi/js/js/project/src/scenes/LoadScene.ts +89 -0
  675. package/resources/targets/kimi/js/js/project/src/scenes/PlayScene.ts +17 -0
  676. package/resources/targets/kimi/js/js/project/src/screenUi.ts +185 -0
  677. package/resources/targets/kimi/js/js/project/src/style.css +294 -0
  678. package/resources/targets/kimi/js/js/project/tsconfig.json +20 -0
  679. package/resources/targets/kimi/js/js/project/unified_data_control_config.json +20 -0
  680. package/resources/targets/kimi/js/js/project/vite.config.ts +5 -0
  681. package/resources/targets/kimi/js/recovery.md +17 -0
  682. package/resources/targets/kimi/js/target.json +61 -0
  683. package/resources/targets/kimi/js3d/bootstrap/SKILL.md +20 -0
  684. package/resources/targets/kimi/js3d/context-filter-report.json +27 -0
  685. package/resources/targets/kimi/js3d/craft-game-maker/SKILL.md +72 -0
  686. package/resources/targets/kimi/js3d/craft-game-maker/js3d.md +12 -0
  687. package/resources/targets/kimi/js3d/js3d/bundle.json +108 -0
  688. package/resources/targets/kimi/js3d/js3d/context/AGENTS.md +30 -0
  689. package/resources/targets/kimi/js3d/js3d/context/hooks/hooks.json +14 -0
  690. package/resources/targets/kimi/js3d/js3d/context/knowledge/AssetUrl.md +9 -0
  691. package/resources/targets/kimi/js3d/js3d/context/knowledge/AssetWiring.md +7 -0
  692. package/resources/targets/kimi/js3d/js3d/context/knowledge/CodingGuide/Pitfalls.md +11 -0
  693. package/resources/targets/kimi/js3d/js3d/context/knowledge/Layout.md +7 -0
  694. package/resources/targets/kimi/js3d/js3d/context/knowledge/ResourceLoading.md +11 -0
  695. package/resources/targets/kimi/js3d/js3d/context/knowledge/Runtime.md +9 -0
  696. package/resources/targets/kimi/js3d/js3d/context/skills/asset-usage-audit/SKILL.md +16 -0
  697. package/resources/targets/kimi/js3d/js3d/context/skills/asset-usage-audit/scripts/compare-animations.mjs +48 -0
  698. package/resources/targets/kimi/js3d/js3d/context/skills/asset-usage-audit/scripts/lib/anim.mjs +266 -0
  699. package/resources/targets/kimi/js3d/js3d/context/skills/asset-usage-audit/scripts/lib/glb.mjs +241 -0
  700. package/resources/targets/kimi/js3d/js3d/context/skills/asset-usage-audit/scripts/lib/scan.mjs +455 -0
  701. package/resources/targets/kimi/js3d/js3d/context/skills/asset-usage-audit/scripts/scan-assets.mjs +77 -0
  702. package/resources/targets/kimi/js3d/js3d/context/skills/export-config/SKILL.md +16 -0
  703. package/resources/targets/kimi/js3d/js3d/context/skills/export-config/assets/tooling/cli.mjs +20 -0
  704. package/resources/targets/kimi/js3d/js3d/context/skills/export-config/assets/tooling/config.d.mts +19 -0
  705. package/resources/targets/kimi/js3d/js3d/context/skills/export-config/assets/tooling/config.mjs +1 -0
  706. package/resources/targets/kimi/js3d/js3d/context/skills/export-config/assets/tooling/project.d.mts +6 -0
  707. package/resources/targets/kimi/js3d/js3d/context/skills/export-config/assets/tooling/project.mjs +77 -0
  708. package/resources/targets/kimi/js3d/js3d/context/skills/export-config/assets/tooling/vite.d.mts +2 -0
  709. package/resources/targets/kimi/js3d/js3d/context/skills/export-config/assets/tooling/vite.mjs +34 -0
  710. package/resources/targets/kimi/js3d/js3d/context/skills/export-config/scripts/export-config.mjs +4 -0
  711. package/resources/targets/kimi/js3d/js3d/context/skills/export-config/scripts/install.mjs +89 -0
  712. package/resources/targets/kimi/js3d/js3d/context/skills/export-config/scripts/panel-resource-path.mjs +106 -0
  713. package/resources/targets/kimi/js3d/js3d/context/skills/index.json +31 -0
  714. package/resources/targets/kimi/js3d/js3d/context/skills/performance-audit/SKILL.md +21 -0
  715. package/resources/targets/kimi/js3d/js3d/context/skills/performance-audit/scripts/lib/rules.mjs +470 -0
  716. package/resources/targets/kimi/js3d/js3d/context/skills/performance-audit/scripts/lib/scan.mjs +387 -0
  717. package/resources/targets/kimi/js3d/js3d/context/skills/performance-audit/scripts/lib/source.mjs +398 -0
  718. package/resources/targets/kimi/js3d/js3d/context/skills/performance-audit/scripts/scan-perf.mjs +130 -0
  719. package/resources/targets/kimi/js3d/js3d/context/skills/visual-qa/SKILL.md +14 -0
  720. package/resources/targets/kimi/js3d/js3d/project/README.md +7 -0
  721. package/resources/targets/kimi/js3d/js3d/project/configs/game.controls.json +3 -0
  722. package/resources/targets/kimi/js3d/js3d/project/configs/game.json +3 -0
  723. package/resources/targets/kimi/js3d/js3d/project/game-runtime.json +7 -0
  724. package/resources/targets/kimi/js3d/js3d/project/game.config.json +7 -0
  725. package/resources/targets/kimi/js3d/js3d/project/index.html +12 -0
  726. package/resources/targets/kimi/js3d/js3d/project/package.json +23 -0
  727. package/resources/targets/kimi/js3d/js3d/project/runtime/lightgame/1.1.0/platform/identity/qq-ai-game-sdk.min.js +5 -0
  728. package/resources/targets/kimi/js3d/js3d/project/runtime/lightgame/1.1.0/platform/identity/qq-session.mjs +208 -0
  729. package/resources/targets/kimi/js3d/js3d/project/runtime/lightgame/1.1.0/platform/identity/shared.mjs +37 -0
  730. package/resources/targets/kimi/js3d/js3d/project/runtime/lightgame/1.1.0/platform/platform-capture-video.mjs +227 -0
  731. package/resources/targets/kimi/js3d/js3d/project/runtime/lightgame/1.1.0/platform/platform-service.d.mts +31 -0
  732. package/resources/targets/kimi/js3d/js3d/project/runtime/lightgame/1.1.0/platform/platform-service.mjs +272 -0
  733. package/resources/targets/kimi/js3d/js3d/project/runtime/lightgame/1.1.0/platform/platform.d.mts +79 -0
  734. package/resources/targets/kimi/js3d/js3d/project/runtime/lightgame/1.1.0/platform/platform.mjs +30 -0
  735. package/resources/targets/kimi/js3d/js3d/project/runtime/lightgame/1.1.0/release.json +24 -0
  736. package/resources/targets/kimi/js3d/js3d/project/runtime/lightgame/1.1.0/tooling/cli.mjs +16 -0
  737. package/resources/targets/kimi/js3d/js3d/project/runtime/lightgame/1.1.0/tooling/project.d.mts +4 -0
  738. package/resources/targets/kimi/js3d/js3d/project/runtime/lightgame/1.1.0/tooling/project.mjs +50 -0
  739. package/resources/targets/kimi/js3d/js3d/project/runtime/lightgame/1.1.0/tooling/vite.d.mts +3 -0
  740. package/resources/targets/kimi/js3d/js3d/project/runtime/lightgame/1.1.0/tooling/vite.mjs +72 -0
  741. package/resources/targets/kimi/js3d/js3d/project/runtime/lightgame/1.1.0/tools/assets.d.mts +24 -0
  742. package/resources/targets/kimi/js3d/js3d/project/runtime/lightgame/1.1.0/tools/assets.mjs +2 -0
  743. package/resources/targets/kimi/js3d/js3d/project/runtime/lightgame/1.1.0/tools/astc.d.mts +10 -0
  744. package/resources/targets/kimi/js3d/js3d/project/runtime/lightgame/1.1.0/tools/astc.mjs +1 -0
  745. package/resources/targets/kimi/js3d/js3d/project/runtime/lightgame/1.1.0/tools/glb.d.mts +26 -0
  746. package/resources/targets/kimi/js3d/js3d/project/runtime/lightgame/1.1.0/tools/glb.mjs +351 -0
  747. package/resources/targets/kimi/js3d/js3d/project/scripts/config-export/assert-asset-wiring.mjs +97 -0
  748. package/resources/targets/kimi/js3d/js3d/project/scripts/config-export/panel-resource-path.mjs +106 -0
  749. package/resources/targets/kimi/js3d/js3d/project/scripts/config-export/sync-asset-controls.mjs +327 -0
  750. package/resources/targets/kimi/js3d/js3d/project/scripts/config-export/sync-scene-assets.mjs +191 -0
  751. package/resources/targets/kimi/js3d/js3d/project/scripts/config-export.mjs +15 -0
  752. package/resources/targets/kimi/js3d/js3d/project/scripts/skill-modules/export-config/cli.mjs +20 -0
  753. package/resources/targets/kimi/js3d/js3d/project/scripts/skill-modules/export-config/config.d.mts +19 -0
  754. package/resources/targets/kimi/js3d/js3d/project/scripts/skill-modules/export-config/config.mjs +1 -0
  755. package/resources/targets/kimi/js3d/js3d/project/scripts/skill-modules/export-config/installed.json +6 -0
  756. package/resources/targets/kimi/js3d/js3d/project/scripts/skill-modules/export-config/project.d.mts +6 -0
  757. package/resources/targets/kimi/js3d/js3d/project/scripts/skill-modules/export-config/project.mjs +77 -0
  758. package/resources/targets/kimi/js3d/js3d/project/scripts/skill-modules/export-config/vite.d.mts +2 -0
  759. package/resources/targets/kimi/js3d/js3d/project/scripts/skill-modules/export-config/vite.mjs +34 -0
  760. package/resources/targets/kimi/js3d/js3d/project/scripts/write-preview-ready.mjs +22 -0
  761. package/resources/targets/kimi/js3d/js3d/project/src/display/ui-stage.ts +156 -0
  762. package/resources/targets/kimi/js3d/js3d/project/src/display/viewport.ts +239 -0
  763. package/resources/targets/kimi/js3d/js3d/project/src/main.ts +85 -0
  764. package/resources/targets/kimi/js3d/js3d/project/src/platform.ts +2 -0
  765. package/resources/targets/kimi/js3d/js3d/project/src/style.css +83 -0
  766. package/resources/targets/kimi/js3d/js3d/project/tsconfig.json +20 -0
  767. package/resources/targets/kimi/js3d/js3d/project/unified_data_control_config.json +20 -0
  768. package/resources/targets/kimi/js3d/js3d/project/vite.config.ts +5 -0
  769. package/resources/targets/kimi/js3d/recovery.md +17 -0
  770. package/resources/targets/kimi/js3d/target.json +60 -0
  771. package/resources/targets/workbuddy/js/bootstrap/SKILL.md +9 -1
  772. package/resources/targets/workbuddy/js/context-filter-report.json +27 -0
  773. package/resources/targets/workbuddy/js/craft-game-maker/SKILL.md +24 -29
  774. package/resources/targets/workbuddy/js/craft-game-maker/js.md +2 -2
  775. package/resources/targets/workbuddy/js/js/bundle.json +16 -18
  776. package/resources/targets/workbuddy/js/js/context/AGENTS.md +10 -6
  777. package/resources/targets/workbuddy/js/js/context/knowledge/AssetUrl.md +4 -4
  778. package/resources/targets/workbuddy/js/js/context/knowledge/AssetWiring.md +7 -0
  779. package/resources/targets/workbuddy/js/js/context/knowledge/ResourceLoading.md +9 -0
  780. package/resources/targets/workbuddy/js/js/context/skills/export-config/SKILL.md +2 -2
  781. package/resources/targets/workbuddy/js/js/context/skills/index.json +2 -14
  782. package/resources/targets/workbuddy/js/js/context/skills/visual-qa/SKILL.md +1 -1
  783. package/resources/targets/workbuddy/js/recovery.md +16 -4
  784. package/resources/targets/workbuddy/js/target.json +1 -1
  785. package/resources/targets/workbuddy/js3d/bootstrap/SKILL.md +9 -1
  786. package/resources/targets/workbuddy/js3d/context-filter-report.json +27 -0
  787. package/resources/targets/workbuddy/js3d/craft-game-maker/SKILL.md +24 -29
  788. package/resources/targets/workbuddy/js3d/craft-game-maker/js3d.md +3 -4
  789. package/resources/targets/workbuddy/js3d/js3d/bundle.json +19 -21
  790. package/resources/targets/workbuddy/js3d/js3d/context/AGENTS.md +10 -6
  791. package/resources/targets/workbuddy/js3d/js3d/context/knowledge/AssetUrl.md +4 -4
  792. package/resources/targets/workbuddy/js3d/js3d/context/knowledge/AssetWiring.md +7 -0
  793. package/resources/targets/workbuddy/js3d/js3d/context/knowledge/ResourceLoading.md +11 -0
  794. package/resources/targets/workbuddy/js3d/js3d/context/skills/asset-usage-audit/SKILL.md +1 -1
  795. package/resources/targets/workbuddy/js3d/js3d/context/skills/asset-usage-audit/scripts/lib/scan.mjs +2 -2
  796. package/resources/targets/workbuddy/js3d/js3d/context/skills/export-config/SKILL.md +2 -2
  797. package/resources/targets/workbuddy/js3d/js3d/context/skills/index.json +4 -16
  798. package/resources/targets/workbuddy/js3d/js3d/context/skills/performance-audit/SKILL.md +1 -1
  799. package/resources/targets/workbuddy/js3d/js3d/context/skills/visual-qa/SKILL.md +1 -1
  800. package/resources/targets/workbuddy/js3d/recovery.md +16 -4
  801. package/resources/targets/workbuddy/js3d/target.json +1 -1
  802. package/resources/targets/zcode/js/bootstrap/SKILL.md +20 -0
  803. package/resources/targets/zcode/js/context-filter-report.json +27 -0
  804. package/resources/targets/zcode/js/craft-game-maker/SKILL.md +72 -0
  805. package/resources/targets/zcode/js/craft-game-maker/js.md +10 -0
  806. package/resources/targets/zcode/js/js/bundle.json +97 -0
  807. package/resources/targets/zcode/js/js/context/AGENTS.md +29 -0
  808. package/resources/targets/zcode/js/js/context/hooks/hooks.json +14 -0
  809. package/resources/targets/zcode/js/js/context/knowledge/AssetUrl.md +9 -0
  810. package/resources/targets/zcode/js/js/context/knowledge/AssetWiring.md +7 -0
  811. package/resources/targets/zcode/js/js/context/knowledge/Layout.md +7 -0
  812. package/resources/targets/zcode/js/js/context/knowledge/Lifecycle.md +11 -0
  813. package/resources/targets/zcode/js/js/context/knowledge/ResourceLoading.md +9 -0
  814. package/resources/targets/zcode/js/js/context/skills/export-config/SKILL.md +16 -0
  815. package/resources/targets/zcode/js/js/context/skills/export-config/assets/tooling/cli.mjs +20 -0
  816. package/resources/targets/zcode/js/js/context/skills/export-config/assets/tooling/config.d.mts +19 -0
  817. package/resources/targets/zcode/js/js/context/skills/export-config/assets/tooling/config.mjs +1 -0
  818. package/resources/targets/zcode/js/js/context/skills/export-config/assets/tooling/project.d.mts +6 -0
  819. package/resources/targets/zcode/js/js/context/skills/export-config/assets/tooling/project.mjs +77 -0
  820. package/resources/targets/zcode/js/js/context/skills/export-config/assets/tooling/vite.d.mts +2 -0
  821. package/resources/targets/zcode/js/js/context/skills/export-config/assets/tooling/vite.mjs +34 -0
  822. package/resources/targets/zcode/js/js/context/skills/export-config/scripts/export-config.mjs +4 -0
  823. package/resources/targets/zcode/js/js/context/skills/export-config/scripts/install.mjs +89 -0
  824. package/resources/targets/zcode/js/js/context/skills/export-config/scripts/panel-resource-path.mjs +106 -0
  825. package/resources/targets/zcode/js/js/context/skills/index.json +19 -0
  826. package/resources/targets/zcode/js/js/context/skills/visual-qa/SKILL.md +14 -0
  827. package/resources/targets/zcode/js/js/project/README.md +7 -0
  828. package/resources/targets/zcode/js/js/project/configs/assets.json +1 -0
  829. package/resources/targets/zcode/js/js/project/configs/game.controls.json +3 -0
  830. package/resources/targets/zcode/js/js/project/configs/game.json +3 -0
  831. package/resources/targets/zcode/js/js/project/game-runtime.json +7 -0
  832. package/resources/targets/zcode/js/js/project/game.config.json +7 -0
  833. package/resources/targets/zcode/js/js/project/index.html +20 -0
  834. package/resources/targets/zcode/js/js/project/package.json +22 -0
  835. package/resources/targets/zcode/js/js/project/runtime/lightgame/1.1.0/platform/identity/qq-ai-game-sdk.min.js +5 -0
  836. package/resources/targets/zcode/js/js/project/runtime/lightgame/1.1.0/platform/identity/qq-session.mjs +208 -0
  837. package/resources/targets/zcode/js/js/project/runtime/lightgame/1.1.0/platform/identity/shared.mjs +37 -0
  838. package/resources/targets/zcode/js/js/project/runtime/lightgame/1.1.0/platform/platform-capture-video.mjs +227 -0
  839. package/resources/targets/zcode/js/js/project/runtime/lightgame/1.1.0/platform/platform-service.d.mts +31 -0
  840. package/resources/targets/zcode/js/js/project/runtime/lightgame/1.1.0/platform/platform-service.mjs +272 -0
  841. package/resources/targets/zcode/js/js/project/runtime/lightgame/1.1.0/platform/platform.d.mts +79 -0
  842. package/resources/targets/zcode/js/js/project/runtime/lightgame/1.1.0/platform/platform.mjs +29 -0
  843. package/resources/targets/zcode/js/js/project/runtime/lightgame/1.1.0/release.json +22 -0
  844. package/resources/targets/zcode/js/js/project/runtime/lightgame/1.1.0/tooling/cli.mjs +16 -0
  845. package/resources/targets/zcode/js/js/project/runtime/lightgame/1.1.0/tooling/project.d.mts +4 -0
  846. package/resources/targets/zcode/js/js/project/runtime/lightgame/1.1.0/tooling/project.mjs +50 -0
  847. package/resources/targets/zcode/js/js/project/runtime/lightgame/1.1.0/tooling/vite.d.mts +3 -0
  848. package/resources/targets/zcode/js/js/project/runtime/lightgame/1.1.0/tooling/vite.mjs +72 -0
  849. package/resources/targets/zcode/js/js/project/runtime/lightgame/1.1.0/tools/assets.d.mts +24 -0
  850. package/resources/targets/zcode/js/js/project/runtime/lightgame/1.1.0/tools/assets.mjs +2 -0
  851. package/resources/targets/zcode/js/js/project/runtime/lightgame/1.1.0/tools/astc.d.mts +10 -0
  852. package/resources/targets/zcode/js/js/project/runtime/lightgame/1.1.0/tools/astc.mjs +1 -0
  853. package/resources/targets/zcode/js/js/project/scripts/config-export/assert-asset-wiring.mjs +72 -0
  854. package/resources/targets/zcode/js/js/project/scripts/config-export/panel-resource-path.mjs +106 -0
  855. package/resources/targets/zcode/js/js/project/scripts/config-export/sync-asset-controls.mjs +316 -0
  856. package/resources/targets/zcode/js/js/project/scripts/config-export.mjs +13 -0
  857. package/resources/targets/zcode/js/js/project/scripts/skill-modules/export-config/cli.mjs +20 -0
  858. package/resources/targets/zcode/js/js/project/scripts/skill-modules/export-config/config.d.mts +19 -0
  859. package/resources/targets/zcode/js/js/project/scripts/skill-modules/export-config/config.mjs +1 -0
  860. package/resources/targets/zcode/js/js/project/scripts/skill-modules/export-config/installed.json +6 -0
  861. package/resources/targets/zcode/js/js/project/scripts/skill-modules/export-config/project.d.mts +6 -0
  862. package/resources/targets/zcode/js/js/project/scripts/skill-modules/export-config/project.mjs +77 -0
  863. package/resources/targets/zcode/js/js/project/scripts/skill-modules/export-config/vite.d.mts +2 -0
  864. package/resources/targets/zcode/js/js/project/scripts/skill-modules/export-config/vite.mjs +34 -0
  865. package/resources/targets/zcode/js/js/project/scripts/write-preview-ready.mjs +22 -0
  866. package/resources/targets/zcode/js/js/project/src/display/ui-stage.ts +156 -0
  867. package/resources/targets/zcode/js/js/project/src/display/viewport.ts +249 -0
  868. package/resources/targets/zcode/js/js/project/src/main.ts +87 -0
  869. package/resources/targets/zcode/js/js/project/src/platform.ts +2 -0
  870. package/resources/targets/zcode/js/js/project/src/scenes/LoadScene.ts +89 -0
  871. package/resources/targets/zcode/js/js/project/src/scenes/PlayScene.ts +17 -0
  872. package/resources/targets/zcode/js/js/project/src/screenUi.ts +185 -0
  873. package/resources/targets/zcode/js/js/project/src/style.css +294 -0
  874. package/resources/targets/zcode/js/js/project/tsconfig.json +20 -0
  875. package/resources/targets/zcode/js/js/project/unified_data_control_config.json +20 -0
  876. package/resources/targets/zcode/js/js/project/vite.config.ts +5 -0
  877. package/resources/targets/zcode/js/recovery.md +17 -0
  878. package/resources/targets/zcode/js/target.json +61 -0
  879. package/resources/targets/zcode/js3d/bootstrap/SKILL.md +20 -0
  880. package/resources/targets/zcode/js3d/context-filter-report.json +27 -0
  881. package/resources/targets/zcode/js3d/craft-game-maker/SKILL.md +72 -0
  882. package/resources/targets/zcode/js3d/craft-game-maker/js3d.md +12 -0
  883. package/resources/targets/zcode/js3d/js3d/bundle.json +108 -0
  884. package/resources/targets/zcode/js3d/js3d/context/AGENTS.md +30 -0
  885. package/resources/targets/zcode/js3d/js3d/context/hooks/hooks.json +14 -0
  886. package/resources/targets/zcode/js3d/js3d/context/knowledge/AssetUrl.md +9 -0
  887. package/resources/targets/zcode/js3d/js3d/context/knowledge/AssetWiring.md +7 -0
  888. package/resources/targets/zcode/js3d/js3d/context/knowledge/CodingGuide/Pitfalls.md +11 -0
  889. package/resources/targets/zcode/js3d/js3d/context/knowledge/Layout.md +7 -0
  890. package/resources/targets/zcode/js3d/js3d/context/knowledge/ResourceLoading.md +11 -0
  891. package/resources/targets/zcode/js3d/js3d/context/knowledge/Runtime.md +9 -0
  892. package/resources/targets/zcode/js3d/js3d/context/skills/asset-usage-audit/SKILL.md +16 -0
  893. package/resources/targets/zcode/js3d/js3d/context/skills/asset-usage-audit/scripts/compare-animations.mjs +48 -0
  894. package/resources/targets/zcode/js3d/js3d/context/skills/asset-usage-audit/scripts/lib/anim.mjs +266 -0
  895. package/resources/targets/zcode/js3d/js3d/context/skills/asset-usage-audit/scripts/lib/glb.mjs +241 -0
  896. package/resources/targets/zcode/js3d/js3d/context/skills/asset-usage-audit/scripts/lib/scan.mjs +455 -0
  897. package/resources/targets/zcode/js3d/js3d/context/skills/asset-usage-audit/scripts/scan-assets.mjs +77 -0
  898. package/resources/targets/zcode/js3d/js3d/context/skills/export-config/SKILL.md +16 -0
  899. package/resources/targets/zcode/js3d/js3d/context/skills/export-config/assets/tooling/cli.mjs +20 -0
  900. package/resources/targets/zcode/js3d/js3d/context/skills/export-config/assets/tooling/config.d.mts +19 -0
  901. package/resources/targets/zcode/js3d/js3d/context/skills/export-config/assets/tooling/config.mjs +1 -0
  902. package/resources/targets/zcode/js3d/js3d/context/skills/export-config/assets/tooling/project.d.mts +6 -0
  903. package/resources/targets/zcode/js3d/js3d/context/skills/export-config/assets/tooling/project.mjs +77 -0
  904. package/resources/targets/zcode/js3d/js3d/context/skills/export-config/assets/tooling/vite.d.mts +2 -0
  905. package/resources/targets/zcode/js3d/js3d/context/skills/export-config/assets/tooling/vite.mjs +34 -0
  906. package/resources/targets/zcode/js3d/js3d/context/skills/export-config/scripts/export-config.mjs +4 -0
  907. package/resources/targets/zcode/js3d/js3d/context/skills/export-config/scripts/install.mjs +89 -0
  908. package/resources/targets/zcode/js3d/js3d/context/skills/export-config/scripts/panel-resource-path.mjs +106 -0
  909. package/resources/targets/zcode/js3d/js3d/context/skills/index.json +31 -0
  910. package/resources/targets/zcode/js3d/js3d/context/skills/performance-audit/SKILL.md +21 -0
  911. package/resources/targets/zcode/js3d/js3d/context/skills/performance-audit/scripts/lib/rules.mjs +470 -0
  912. package/resources/targets/zcode/js3d/js3d/context/skills/performance-audit/scripts/lib/scan.mjs +387 -0
  913. package/resources/targets/zcode/js3d/js3d/context/skills/performance-audit/scripts/lib/source.mjs +398 -0
  914. package/resources/targets/zcode/js3d/js3d/context/skills/performance-audit/scripts/scan-perf.mjs +130 -0
  915. package/resources/targets/zcode/js3d/js3d/context/skills/visual-qa/SKILL.md +14 -0
  916. package/resources/targets/zcode/js3d/js3d/project/README.md +7 -0
  917. package/resources/targets/zcode/js3d/js3d/project/configs/game.controls.json +3 -0
  918. package/resources/targets/zcode/js3d/js3d/project/configs/game.json +3 -0
  919. package/resources/targets/zcode/js3d/js3d/project/game-runtime.json +7 -0
  920. package/resources/targets/zcode/js3d/js3d/project/game.config.json +7 -0
  921. package/resources/targets/zcode/js3d/js3d/project/index.html +12 -0
  922. package/resources/targets/zcode/js3d/js3d/project/package.json +23 -0
  923. package/resources/targets/zcode/js3d/js3d/project/runtime/lightgame/1.1.0/platform/identity/qq-ai-game-sdk.min.js +5 -0
  924. package/resources/targets/zcode/js3d/js3d/project/runtime/lightgame/1.1.0/platform/identity/qq-session.mjs +208 -0
  925. package/resources/targets/zcode/js3d/js3d/project/runtime/lightgame/1.1.0/platform/identity/shared.mjs +37 -0
  926. package/resources/targets/zcode/js3d/js3d/project/runtime/lightgame/1.1.0/platform/platform-capture-video.mjs +227 -0
  927. package/resources/targets/zcode/js3d/js3d/project/runtime/lightgame/1.1.0/platform/platform-service.d.mts +31 -0
  928. package/resources/targets/zcode/js3d/js3d/project/runtime/lightgame/1.1.0/platform/platform-service.mjs +272 -0
  929. package/resources/targets/zcode/js3d/js3d/project/runtime/lightgame/1.1.0/platform/platform.d.mts +79 -0
  930. package/resources/targets/zcode/js3d/js3d/project/runtime/lightgame/1.1.0/platform/platform.mjs +30 -0
  931. package/resources/targets/zcode/js3d/js3d/project/runtime/lightgame/1.1.0/release.json +24 -0
  932. package/resources/targets/zcode/js3d/js3d/project/runtime/lightgame/1.1.0/tooling/cli.mjs +16 -0
  933. package/resources/targets/zcode/js3d/js3d/project/runtime/lightgame/1.1.0/tooling/project.d.mts +4 -0
  934. package/resources/targets/zcode/js3d/js3d/project/runtime/lightgame/1.1.0/tooling/project.mjs +50 -0
  935. package/resources/targets/zcode/js3d/js3d/project/runtime/lightgame/1.1.0/tooling/vite.d.mts +3 -0
  936. package/resources/targets/zcode/js3d/js3d/project/runtime/lightgame/1.1.0/tooling/vite.mjs +72 -0
  937. package/resources/targets/zcode/js3d/js3d/project/runtime/lightgame/1.1.0/tools/assets.d.mts +24 -0
  938. package/resources/targets/zcode/js3d/js3d/project/runtime/lightgame/1.1.0/tools/assets.mjs +2 -0
  939. package/resources/targets/zcode/js3d/js3d/project/runtime/lightgame/1.1.0/tools/astc.d.mts +10 -0
  940. package/resources/targets/zcode/js3d/js3d/project/runtime/lightgame/1.1.0/tools/astc.mjs +1 -0
  941. package/resources/targets/zcode/js3d/js3d/project/runtime/lightgame/1.1.0/tools/glb.d.mts +26 -0
  942. package/resources/targets/zcode/js3d/js3d/project/runtime/lightgame/1.1.0/tools/glb.mjs +351 -0
  943. package/resources/targets/zcode/js3d/js3d/project/scripts/config-export/assert-asset-wiring.mjs +97 -0
  944. package/resources/targets/zcode/js3d/js3d/project/scripts/config-export/panel-resource-path.mjs +106 -0
  945. package/resources/targets/zcode/js3d/js3d/project/scripts/config-export/sync-asset-controls.mjs +327 -0
  946. package/resources/targets/zcode/js3d/js3d/project/scripts/config-export/sync-scene-assets.mjs +191 -0
  947. package/resources/targets/zcode/js3d/js3d/project/scripts/config-export.mjs +15 -0
  948. package/resources/targets/zcode/js3d/js3d/project/scripts/skill-modules/export-config/cli.mjs +20 -0
  949. package/resources/targets/zcode/js3d/js3d/project/scripts/skill-modules/export-config/config.d.mts +19 -0
  950. package/resources/targets/zcode/js3d/js3d/project/scripts/skill-modules/export-config/config.mjs +1 -0
  951. package/resources/targets/zcode/js3d/js3d/project/scripts/skill-modules/export-config/installed.json +6 -0
  952. package/resources/targets/zcode/js3d/js3d/project/scripts/skill-modules/export-config/project.d.mts +6 -0
  953. package/resources/targets/zcode/js3d/js3d/project/scripts/skill-modules/export-config/project.mjs +77 -0
  954. package/resources/targets/zcode/js3d/js3d/project/scripts/skill-modules/export-config/vite.d.mts +2 -0
  955. package/resources/targets/zcode/js3d/js3d/project/scripts/skill-modules/export-config/vite.mjs +34 -0
  956. package/resources/targets/zcode/js3d/js3d/project/scripts/write-preview-ready.mjs +22 -0
  957. package/resources/targets/zcode/js3d/js3d/project/src/display/ui-stage.ts +156 -0
  958. package/resources/targets/zcode/js3d/js3d/project/src/display/viewport.ts +239 -0
  959. package/resources/targets/zcode/js3d/js3d/project/src/main.ts +85 -0
  960. package/resources/targets/zcode/js3d/js3d/project/src/platform.ts +2 -0
  961. package/resources/targets/zcode/js3d/js3d/project/src/style.css +83 -0
  962. package/resources/targets/zcode/js3d/js3d/project/tsconfig.json +20 -0
  963. package/resources/targets/zcode/js3d/js3d/project/unified_data_control_config.json +20 -0
  964. package/resources/targets/zcode/js3d/js3d/project/vite.config.ts +5 -0
  965. package/resources/targets/zcode/js3d/recovery.md +17 -0
  966. package/resources/targets/zcode/js3d/target.json +60 -0
  967. package/vendor/craft-runtime/SOURCE.json +3 -3
  968. package/vendor/craft-runtime/package.json +1 -1
  969. package/dist-server/game-workflow/publication-materials.mjs +0 -92
  970. package/dist-server/game-workflow/publications.mjs +0 -164
  971. package/dist-server/game-workflow/publish-capture-worker.mjs +0 -57
  972. package/dist-server/game-workflow/publish-capture.mjs +0 -75
  973. package/dist-server/mcp/publication-page.html +0 -86
  974. package/dist-server/mcp/publication-page.mjs +0 -375
  975. package/dist-server/mcp/publication-preview.mjs +0 -63
  976. package/dist-server/mcp/publication-tools.mjs +0 -22
  977. package/dist-server/mcp/publish-panel.mjs +0 -205
  978. package/dist-server/upstream/publication-transport.mjs +0 -101
  979. package/resources/targets/codebuddy/js/js/context/knowledge/AigcWiring.md +0 -9
  980. package/resources/targets/codebuddy/js/js/context/skills/aigc-generate/SKILL.md +0 -14
  981. package/resources/targets/codebuddy/js/js/context/skills/asset-search/SKILL.md +0 -12
  982. package/resources/targets/codebuddy/js/js/context/skills/asset-search/references/resource-config.md +0 -9
  983. package/resources/targets/codebuddy/js3d/js3d/context/knowledge/AigcWiring.md +0 -9
  984. package/resources/targets/codebuddy/js3d/js3d/context/skills/aigc-integration/SKILL.md +0 -14
  985. package/resources/targets/codebuddy/js3d/js3d/context/skills/asset-search/SKILL.md +0 -12
  986. package/resources/targets/codex/js/js/context/knowledge/AigcWiring.md +0 -9
  987. package/resources/targets/codex/js/js/context/skills/aigc-generate/SKILL.md +0 -14
  988. package/resources/targets/codex/js/js/context/skills/asset-search/SKILL.md +0 -12
  989. package/resources/targets/codex/js/js/context/skills/asset-search/references/resource-config.md +0 -9
  990. package/resources/targets/codex/js3d/js3d/context/knowledge/AigcWiring.md +0 -9
  991. package/resources/targets/codex/js3d/js3d/context/skills/aigc-integration/SKILL.md +0 -14
  992. package/resources/targets/codex/js3d/js3d/context/skills/asset-search/SKILL.md +0 -12
  993. package/resources/targets/workbuddy/js/js/context/knowledge/AigcWiring.md +0 -9
  994. package/resources/targets/workbuddy/js/js/context/skills/aigc-generate/SKILL.md +0 -14
  995. package/resources/targets/workbuddy/js/js/context/skills/asset-search/SKILL.md +0 -12
  996. package/resources/targets/workbuddy/js/js/context/skills/asset-search/references/resource-config.md +0 -9
  997. package/resources/targets/workbuddy/js3d/js3d/context/knowledge/AigcWiring.md +0 -9
  998. package/resources/targets/workbuddy/js3d/js3d/context/skills/aigc-integration/SKILL.md +0 -14
  999. package/resources/targets/workbuddy/js3d/js3d/context/skills/asset-search/SKILL.md +0 -12
@@ -0,0 +1,227 @@
1
+ /** Paint <video> current frames onto a screenshot canvas. SVG foreignObject cannot rasterize video. */
2
+
3
+ const HAVE_CURRENT_DATA = 2;
4
+
5
+ function messageOf(error) {
6
+ try { return error?.message || String(error); } catch { return '[unreadable error]'; }
7
+ }
8
+
9
+ function queryVideos(root) {
10
+ if (!root) return [];
11
+ const nested = typeof root.querySelectorAll === 'function' ? [...root.querySelectorAll('video')] : [];
12
+ return root.tagName === 'VIDEO' ? [root, ...nested] : nested;
13
+ }
14
+
15
+ /**
16
+ * VIDEO 不当 DOM 快照根(foreignObject 拷不走当前帧,空壳会盖住 paint 结果)。
17
+ * 除 UI roots 外还扫 canvas 父节点和 document.body,才能画到与 canvas 平级的 overlay。
18
+ */
19
+ export function collectPaintVideos(canvas, roots) {
20
+ const seen = new Set();
21
+ const videos = [];
22
+ const add = (root) => {
23
+ for (const video of queryVideos(root)) {
24
+ if (seen.has(video)) continue;
25
+ seen.add(video);
26
+ videos.push(video);
27
+ }
28
+ };
29
+ for (const root of roots) add(root);
30
+ add(canvas?.parentElement);
31
+ add(canvas?.ownerDocument?.body);
32
+ return videos;
33
+ }
34
+
35
+ /**
36
+ * Map object-fit into a drawImage source crop and dest offset inside the element box.
37
+ * Dest sizes are the element's box in destination pixels; source sizes are videoWidth/Height.
38
+ */
39
+ export function objectFitDrawRect(videoWidth, videoHeight, destWidth, destHeight, objectFit = 'contain') {
40
+ const vw = videoWidth;
41
+ const vh = videoHeight;
42
+ const dw = destWidth;
43
+ const dh = destHeight;
44
+ if (!(vw > 0 && vh > 0 && dw > 0 && dh > 0)) return null;
45
+ const fit = objectFit || 'contain';
46
+ if (fit === 'fill') return { sx: 0, sy: 0, sw: vw, sh: vh, dx: 0, dy: 0, dw, dh };
47
+ if (fit === 'none' || (fit === 'scale-down' && vw <= dw && vh <= dh)) {
48
+ const sw = Math.min(vw, dw);
49
+ const sh = Math.min(vh, dh);
50
+ return {
51
+ sx: vw > dw ? (vw - dw) / 2 : 0,
52
+ sy: vh > dh ? (vh - dh) / 2 : 0,
53
+ sw, sh,
54
+ dx: vw > dw ? 0 : (dw - vw) / 2,
55
+ dy: vh > dh ? 0 : (dh - vh) / 2,
56
+ dw: sw, dh: sh,
57
+ };
58
+ }
59
+ const videoRatio = vw / vh;
60
+ const destRatio = dw / dh;
61
+ if (fit === 'cover') {
62
+ if (videoRatio > destRatio) {
63
+ const sw = vh * destRatio;
64
+ return { sx: (vw - sw) / 2, sy: 0, sw, sh: vh, dx: 0, dy: 0, dw, dh };
65
+ }
66
+ const sh = vw / destRatio;
67
+ return { sx: 0, sy: (vh - sh) / 2, sw: vw, sh, dx: 0, dy: 0, dw, dh };
68
+ }
69
+ if (videoRatio > destRatio) {
70
+ const usedH = dw / videoRatio;
71
+ return { sx: 0, sy: 0, sw: vw, sh: vh, dx: 0, dy: (dh - usedH) / 2, dw, dh: usedH };
72
+ }
73
+ const usedW = dh * videoRatio;
74
+ return { sx: 0, sy: 0, sw: vw, sh: vh, dx: (dw - usedW) / 2, dy: 0, dw: usedW, dh };
75
+ }
76
+
77
+ export function unionCaptureRect(canvasRect, roots) {
78
+ let left = canvasRect.left;
79
+ let top = canvasRect.top;
80
+ let right = canvasRect.left + (canvasRect.width || 0);
81
+ let bottom = canvasRect.top + (canvasRect.height || 0);
82
+ for (const root of roots) {
83
+ if (typeof root.getBoundingClientRect !== 'function') continue;
84
+ const rect = root.getBoundingClientRect();
85
+ if (!rect.width || !rect.height) continue;
86
+ left = Math.min(left, rect.left);
87
+ top = Math.min(top, rect.top);
88
+ right = Math.max(right, rect.left + rect.width);
89
+ bottom = Math.max(bottom, rect.top + rect.height);
90
+ }
91
+ return { left, top, width: Math.max(0, right - left), height: Math.max(0, bottom - top) };
92
+ }
93
+
94
+ function paintOneVideo(context, video, canvasRect, scaleX, scaleY, win, notes) {
95
+ if (video.hasAttribute?.('data-game-runtime-ignore')) return;
96
+ const style = win.getComputedStyle(video);
97
+ if (style.display === 'none' || style.visibility === 'hidden' || Number(style.opacity) === 0) return;
98
+ if (video.readyState < HAVE_CURRENT_DATA) {
99
+ notes.push('video overlay omitted: no current frame');
100
+ return;
101
+ }
102
+ const rect = video.getBoundingClientRect();
103
+ if (!rect.width || !rect.height) return;
104
+ const boxX = (rect.left - canvasRect.left) * scaleX;
105
+ const boxY = (rect.top - canvasRect.top) * scaleY;
106
+ const boxW = rect.width * scaleX;
107
+ const boxH = rect.height * scaleY;
108
+ const fit = objectFitDrawRect(video.videoWidth, video.videoHeight, boxW, boxH, style.objectFit);
109
+ if (!fit) {
110
+ notes.push('video overlay omitted: no current frame');
111
+ return;
112
+ }
113
+ try {
114
+ context.drawImage(video, fit.sx, fit.sy, fit.sw, fit.sh, boxX + fit.dx, boxY + fit.dy, fit.dw, fit.dh);
115
+ } catch (error) {
116
+ notes.push(`video overlay omitted: ${messageOf(error)}`);
117
+ }
118
+ }
119
+
120
+ /** Draw every visible video under `roots` or beside the canvas onto `copy`. Failures are notes; they must not fail the screenshot. */
121
+ export function paintVideos(copy, canvas, roots, win, notes) {
122
+ const videos = collectPaintVideos(canvas, roots);
123
+ const frame = unionCaptureRect(canvas.getBoundingClientRect(), [...roots, ...videos]);
124
+ const scaleX = copy.width / (frame.width || copy.width);
125
+ const scaleY = copy.height / (frame.height || copy.height);
126
+ const context = copy.getContext('2d');
127
+ if (!context) return;
128
+ for (const video of videos) {
129
+ paintOneVideo(context, video, frame, scaleX, scaleY, win, notes);
130
+ }
131
+ }
132
+
133
+ function queryCanvases(root) {
134
+ if (!root) return [];
135
+ const nested = typeof root.querySelectorAll === 'function' ? [...root.querySelectorAll('canvas')] : [];
136
+ return root.tagName === 'CANVAS' ? [root, ...nested] : nested;
137
+ }
138
+
139
+ /**
140
+ * CANVAS 不当 DOM 快照根(foreignObject 拷不走像素)。跳过 connectPreview 底图。
141
+ * 除 UI roots 外还扫父节点和 body,才能画到与底图平级的 overlay。
142
+ */
143
+ export function collectPaintCanvases(canvas, roots) {
144
+ const seen = new Set();
145
+ const canvases = [];
146
+ const add = (root) => {
147
+ for (const node of queryCanvases(root)) {
148
+ if (node === canvas || seen.has(node)) continue;
149
+ seen.add(node);
150
+ canvases.push(node);
151
+ }
152
+ };
153
+ for (const root of roots) add(root);
154
+ add(canvas?.parentElement);
155
+ add(canvas?.ownerDocument?.body);
156
+ return canvases;
157
+ }
158
+
159
+ function paintOneCanvas(context, node, canvasRect, scaleX, scaleY, win, notes) {
160
+ if (node.hasAttribute?.('data-game-runtime-ignore')) return false;
161
+ const style = win.getComputedStyle(node);
162
+ if (style.display === 'none' || style.visibility === 'hidden' || Number(style.opacity) === 0) return false;
163
+ const rect = node.getBoundingClientRect();
164
+ if (!rect.width || !rect.height) return false;
165
+ const sw = node.width || 0;
166
+ const sh = node.height || 0;
167
+ if (!(sw > 0 && sh > 0)) {
168
+ notes.push('canvas overlay omitted: empty bitmap');
169
+ return false;
170
+ }
171
+ const boxX = (rect.left - canvasRect.left) * scaleX;
172
+ const boxY = (rect.top - canvasRect.top) * scaleY;
173
+ const boxW = rect.width * scaleX;
174
+ const boxH = rect.height * scaleY;
175
+ const fit = objectFitDrawRect(sw, sh, boxW, boxH, style.objectFit || 'fill');
176
+ if (!fit) {
177
+ notes.push('canvas overlay omitted: empty bitmap');
178
+ return false;
179
+ }
180
+ try {
181
+ context.drawImage(node, fit.sx, fit.sy, fit.sw, fit.sh, boxX + fit.dx, boxY + fit.dy, fit.dw, fit.dh);
182
+ return true;
183
+ } catch (error) {
184
+ notes.push(`canvas overlay omitted: ${messageOf(error)}`);
185
+ return false;
186
+ }
187
+ }
188
+
189
+ /**
190
+ * Draw every visible extra canvas under `roots` or beside the preview canvas onto `copy`.
191
+ * Positioning uses the same union as the screenshot canvas (roots + videos), otherwise scale drifts.
192
+ */
193
+ export function paintCanvases(copy, canvas, roots, win, notes) {
194
+ const overlays = collectPaintCanvases(canvas, roots);
195
+ const videos = collectPaintVideos(canvas, roots);
196
+ const frame = unionCaptureRect(canvas.getBoundingClientRect(), [...roots, ...videos]);
197
+ const scaleX = copy.width / (frame.width || copy.width);
198
+ const scaleY = copy.height / (frame.height || copy.height);
199
+ const context = copy.getContext('2d');
200
+ if (!context) return 0;
201
+ let painted = 0;
202
+ for (const node of overlays) {
203
+ if (paintOneCanvas(context, node, frame, scaleX, scaleY, win, notes)) painted += 1;
204
+ }
205
+ return painted;
206
+ }
207
+
208
+ /**
209
+ * foreignObject 合成后再画额外 canvas:同层 CSS 底图仍在克隆里,先画会被盖住。
210
+ * 有实际绘制才重编码,避免无 overlay 时多一次 toDataURL。
211
+ */
212
+ export function finishCanvasOverlays(copy, canvas, roots, win, notes, composite) {
213
+ let painted = 0;
214
+ try {
215
+ painted = paintCanvases(copy, canvas, roots, win, notes);
216
+ } catch (error) {
217
+ notes.push(`canvas overlay omitted: ${messageOf(error)}`);
218
+ }
219
+ if (!painted) return composite;
220
+ try {
221
+ const data = copy.toDataURL('image/png');
222
+ if (data.startsWith('data:image/')) return { ...composite, data };
223
+ } catch (error) {
224
+ notes.push(`canvas overlay omitted: ${messageOf(error)}`);
225
+ }
226
+ return composite;
227
+ }
@@ -0,0 +1,31 @@
1
+ export type PlatformState = 'pending' | 'active' | 'noop';
2
+ export type PlatformEvent = 'state-change' | 'token-refreshed' | 'dispose';
3
+ export interface PlatformServiceOptions { window?: Window; targetOrigin?: string; initTimeoutMs?: number; }
4
+ export interface PlatformRequestOptions {
5
+ path: string; body?: Record<string, unknown>; timeoutMs?: number; headers?: HeadersInit;
6
+ /** Reject if the host identity has changed since this operation was queued. */
7
+ sessionId?: number;
8
+ }
9
+ export interface PlatformResponse<T = Record<string, unknown>> { ok: boolean; code: string; message: string; data?: T; }
10
+ export interface PlatformService {
11
+ readonly disposed: boolean;
12
+ /**
13
+ * Installs the listener for the parent's `{ type: 'runtime-init' }`; when the page URL carries
14
+ * `qq_test` (with `api` and `app_id`) it starts QQ login + session exchange instead.
15
+ * Does not post to the parent or wait for host identity.
16
+ */
17
+ init(): Promise<void>;
18
+ /** Waits at most initTimeoutMs. Never await before sending the game's ready message. */
19
+ whenReady(): Promise<void>;
20
+ getState(): PlatformState; isReady(): boolean;
21
+ /** Gateway base of the active identity (no trailing slash); '' until active. */
22
+ getApi(): string;
23
+ getAppId(): string; getPlayerId(): string; getPlayerName(): string; getSessionId(): number;
24
+ request<T = Record<string, unknown>>(options: PlatformRequestOptions): Promise<PlatformResponse<T>>;
25
+ on(event: PlatformEvent, listener: (...args: any[]) => void): () => void;
26
+ off(event: PlatformEvent, listener: (...args: any[]) => void): void;
27
+ dispose(): void;
28
+ }
29
+ export function createPlatformService(options?: PlatformServiceOptions): PlatformService;
30
+ export function getPlatformService(options?: PlatformServiceOptions): PlatformService;
31
+ export const PlatformServiceManager: Omit<PlatformService, 'disposed'>;
@@ -0,0 +1,272 @@
1
+ import { apiBase, duration, failure, parentOrigin, unavailable } from './identity/shared.mjs';
2
+ import { createQqSession, readQqRuntime } from './identity/qq-session.mjs';
3
+
4
+ const SERVICE_KEY = Symbol.for('@game-runtime/platform-service/v1');
5
+ const REQUEST_PATH = /^\/[A-Za-z0-9/_-]+$/;
6
+ const MAX_WAITERS = 16;
7
+
8
+ export function createPlatformService(options = {}) {
9
+ const win = options.window ?? (typeof window === 'undefined' ? undefined : window);
10
+ let initialized = false, disposed = false, state = 'pending', identity = null, session = 0, initTimer;
11
+ let origin = null, qqSession = null;
12
+ const waiters = new Set(), requests = new Set(), listeners = new Map();
13
+
14
+ const emit = (event, ...args) => {
15
+ for (const listener of [...(listeners.get(event) || [])]) {
16
+ try {
17
+ listener(...args);
18
+ } catch {}
19
+ }
20
+ };
21
+
22
+ const log = message => {
23
+ try {
24
+ win?.console?.info?.(`[platform-service] ${message}`);
25
+ } catch {}
26
+ };
27
+
28
+ const settle = next => {
29
+ const previous = state;
30
+ state = next;
31
+ clearTimeout(initTimer);
32
+ for (const resolve of waiters) resolve();
33
+ waiters.clear();
34
+ if (previous !== next) {
35
+ log(`state ${previous} -> ${next}`);
36
+ emit('state-change', next, previous);
37
+ }
38
+ };
39
+
40
+ const invalidate = () => {
41
+ session++;
42
+ for (const cancel of [...requests]) cancel();
43
+ };
44
+
45
+ const sameAccount = next => !!identity && identity.api === next.api && identity.appId === next.appId && identity.playerId === next.playerId;
46
+
47
+ const adopt = next => {
48
+ if (!sameAccount(next)) invalidate();
49
+ identity = next;
50
+ };
51
+
52
+ const onMessage = event => {
53
+ const message = event.data || {};
54
+ const type = message.type;
55
+ if (type !== 'runtime-init' && type !== 'session-token-refresh') return;
56
+ if (disposed || !origin || event.source !== win?.parent || event.origin !== origin) {
57
+ log(`${type} ignored: source/origin mismatch`);
58
+ return;
59
+ }
60
+ const data = message.data;
61
+ if (!data || typeof data !== 'object') {
62
+ log(`${type} ignored: missing data`);
63
+ return;
64
+ }
65
+ if (type === 'runtime-init') {
66
+ const api = typeof data.api === 'string' ? apiBase(data.api.trim()) : null;
67
+ const token = typeof data.token === 'string' ? data.token.trim() : '';
68
+ const appId = typeof data.app_id === 'string' ? data.app_id.trim() : '';
69
+ const playerId = typeof data.player_id === 'string' ? data.player_id.trim() : '';
70
+ if (!api || !token || !appId || !playerId) {
71
+ log('runtime-init ignored: incomplete identity');
72
+ return;
73
+ }
74
+ adopt({ api, token, appId, playerId, playerName: typeof data.player_name === 'string' ? data.player_name.trim() : '' });
75
+ log('runtime-init active');
76
+ settle('active');
77
+ } else if (identity && typeof data.token === 'string' && data.token.trim()) {
78
+ identity = { ...identity, token: data.token.trim() };
79
+ log('session-token-refresh applied');
80
+ emit('token-refreshed');
81
+ } else {
82
+ log('session-token-refresh ignored');
83
+ }
84
+ };
85
+
86
+ const listenToParent = () => {
87
+ origin = parentOrigin(win, options.targetOrigin);
88
+ if (!win?.addEventListener || !win.parent || win.parent === win) {
89
+ log('noop: not in a parent frame');
90
+ settle('noop');
91
+ } else if (!origin) {
92
+ log('noop: parent origin unresolved');
93
+ settle('noop');
94
+ } else {
95
+ win.addEventListener('message', onMessage);
96
+ win.addEventListener('pagehide', service.dispose);
97
+ initTimer = setTimeout(() => {
98
+ log('noop: runtime-init timed out');
99
+ settle('noop');
100
+ }, duration(options.initTimeoutMs, 5e3));
101
+ log(`listening for runtime-init from ${origin}`);
102
+ }
103
+ };
104
+
105
+ const applyQqIdentity = next => {
106
+ if (disposed) return;
107
+ if (state === 'active' && sameAccount(next)) {
108
+ identity = next;
109
+ log('qq session refreshed');
110
+ emit('token-refreshed');
111
+ return;
112
+ }
113
+ adopt(next);
114
+ log('qq session active');
115
+ settle('active');
116
+ };
117
+
118
+ const failQqSession = reason => {
119
+ log(`qq session failed: ${reason}`);
120
+ if (state === 'pending') settle('noop');
121
+ };
122
+
123
+ const onQqPageHide = event => {
124
+ if (event.persisted || disposed) return;
125
+ service.dispose();
126
+ };
127
+
128
+ const startQq = runtime => {
129
+ if (runtime.invalid) {
130
+ log(`noop: qq runtime config ${runtime.reason}`);
131
+ settle('noop');
132
+ return;
133
+ }
134
+ win.addEventListener?.('pagehide', onQqPageHide);
135
+ initTimer = setTimeout(() => {
136
+ log('noop: qq session timed out');
137
+ settle('noop');
138
+ }, duration(options.initTimeoutMs, 5e3));
139
+ qqSession = createQqSession({ win, runtime, loadSdk: options.loadQqSdk, log, apply: applyQqIdentity, fail: failQqSession });
140
+ void qqSession.start();
141
+ };
142
+
143
+ const dispatch = async (request, expectedSession) => {
144
+ if (disposed || state !== 'active' || session !== expectedSession) return unavailable();
145
+ const currentIdentity = identity;
146
+ const controller = new AbortController();
147
+ let timer, cancel;
148
+ const interrupted = new Promise(resolve => {
149
+ cancel = () => {
150
+ controller.abort();
151
+ resolve(unavailable());
152
+ };
153
+ requests.add(cancel);
154
+ timer = setTimeout(() => {
155
+ controller.abort();
156
+ resolve(failure());
157
+ }, duration(request.timeoutMs, 1e4));
158
+ });
159
+ const operation = async () => {
160
+ try {
161
+ const headers = new Headers(request.headers);
162
+ headers.set('Content-Type', 'application/json');
163
+ headers.set('Authorization', `Bearer ${currentIdentity.token}`);
164
+ const fetchImpl = win?.fetch ? win.fetch.bind(win) : globalThis.fetch;
165
+ const response = await fetchImpl(`${currentIdentity.api}${request.path}`, {
166
+ method: 'POST',
167
+ headers,
168
+ body: JSON.stringify(request.body ?? {}),
169
+ signal: controller.signal,
170
+ redirect: 'error',
171
+ credentials: 'omit',
172
+ });
173
+ if (response.status === 401) return failure('AUTH_FAILED', '登录态失效');
174
+ if (response.status === 403) return failure('FORBIDDEN', '无权操作');
175
+ if (response.status !== 200) return failure();
176
+ const envelope = await response.json();
177
+ if (envelope?.code !== 0 || typeof envelope?.data?.result !== 'string' || !envelope.data.result) return failure();
178
+ const data = envelope.data;
179
+ return { ok: data.result === 'OK', code: data.result, message: typeof data.message === 'string' ? data.message : '', data };
180
+ } catch {
181
+ return failure();
182
+ }
183
+ };
184
+ try {
185
+ const result = await Promise.race([operation(), interrupted]);
186
+ if (disposed || session !== expectedSession) return unavailable();
187
+ return { ...result, tokenChanged: identity.token !== currentIdentity.token };
188
+ } finally {
189
+ clearTimeout(timer);
190
+ requests.delete(cancel);
191
+ }
192
+ };
193
+
194
+ const service = {
195
+ get disposed() {
196
+ return disposed;
197
+ },
198
+ init() {
199
+ if (initialized || disposed) return Promise.resolve();
200
+ initialized = true;
201
+ const qq = readQqRuntime(win);
202
+ if (qq) startQq(qq);
203
+ else listenToParent();
204
+ return Promise.resolve();
205
+ },
206
+ whenReady() {
207
+ void service.init();
208
+ if (state !== 'pending' || disposed) return Promise.resolve();
209
+ if (waiters.size >= MAX_WAITERS) {
210
+ const oldest = waiters.values().next().value;
211
+ waiters.delete(oldest);
212
+ oldest();
213
+ }
214
+ return new Promise(resolve => waiters.add(resolve));
215
+ },
216
+ getState: () => state,
217
+ isReady: () => state === 'active' && !disposed,
218
+ getApi: () => identity?.api ?? '',
219
+ getAppId: () => identity?.appId ?? '',
220
+ getPlayerId: () => identity?.playerId ?? '',
221
+ getPlayerName: () => identity?.playerName ?? '',
222
+ getSessionId: () => session,
223
+ async request(request) {
224
+ if (!request || typeof request.path !== 'string' || !REQUEST_PATH.test(request.path)) return failure('INVALID_ARGUMENT', '非法请求路径');
225
+ const expected = request.sessionId ?? (state === 'pending' ? null : session);
226
+ await service.whenReady();
227
+ if (disposed || state !== 'active' || (expected !== null && expected !== session)) return unavailable();
228
+ const requestSession = session;
229
+ let result = await dispatch(request, requestSession);
230
+ if (result.code === 'AUTH_FAILED' && (result.tokenChanged || (await qqSession?.reauthenticate()))) {
231
+ result = await dispatch(request, requestSession);
232
+ }
233
+ const { tokenChanged, ...publicResult } = result;
234
+ return publicResult;
235
+ },
236
+ on(event, listener) {
237
+ if (!listeners.has(event)) listeners.set(event, new Set());
238
+ listeners.get(event).add(listener);
239
+ return () => service.off(event, listener);
240
+ },
241
+ off(event, listener) {
242
+ listeners.get(event)?.delete(listener);
243
+ },
244
+ dispose() {
245
+ if (disposed) return;
246
+ disposed = true;
247
+ qqSession?.dispose();
248
+ qqSession = null;
249
+ invalidate();
250
+ identity = null;
251
+ settle('noop');
252
+ win?.removeEventListener?.('message', onMessage);
253
+ win?.removeEventListener?.('pagehide', service.dispose);
254
+ win?.removeEventListener?.('pagehide', onQqPageHide);
255
+ emit('dispose');
256
+ listeners.clear();
257
+ if (win?.[SERVICE_KEY] === service) delete win[SERVICE_KEY];
258
+ },
259
+ };
260
+ return service;
261
+ }
262
+
263
+ export function getPlatformService(options = {}) {
264
+ const win = options.window ?? (typeof window === 'undefined' ? undefined : window);
265
+ if (!win) throw new Error('getPlatformService requires a browser window');
266
+ if (!win[SERVICE_KEY] || win[SERVICE_KEY].disposed) win[SERVICE_KEY] = createPlatformService({ ...options, window: win });
267
+ return win[SERVICE_KEY];
268
+ }
269
+
270
+ const METHODS = ['init', 'whenReady', 'getState', 'isReady', 'getApi', 'getAppId', 'getPlayerId', 'getPlayerName', 'getSessionId', 'request', 'on', 'off', 'dispose'];
271
+
272
+ export const PlatformServiceManager = Object.freeze(Object.fromEntries(METHODS.map(method => [method, (...args) => getPlatformService()[method](...args)])));
@@ -0,0 +1,79 @@
1
+ export type RuntimeResult = 0 | 1 | 2;
2
+ export type LogLevel = 'info' | 'debug' | 'warn' | 'error';
3
+ export interface LogEntry { time: number; level: LogLevel; message: string; source: string }
4
+ export interface UiRectSnapshot { x: number; y: number; w: number; h: number }
5
+ export interface UiNodeSnapshot {
6
+ desc: string;
7
+ rect: UiRectSnapshot;
8
+ text?: string;
9
+ overflow?: string;
10
+ layer?: number;
11
+ children?: UiNodeSnapshot[];
12
+ }
13
+ /** Rectangles are in backing-store pixels, relative to the union of canvas and UI roots. */
14
+ export interface UiTreeSnapshot {
15
+ design: { width: number; height: number };
16
+ scale: number;
17
+ nodeCount: number;
18
+ truncated: boolean;
19
+ hiddenSkipped: number;
20
+ issues: string[];
21
+ layers: UiNodeSnapshot[];
22
+ }
23
+ export type CaptureResult = {
24
+ ok: true;
25
+ data: string;
26
+ composited: boolean;
27
+ note?: string;
28
+ uiTree: UiTreeSnapshot | null;
29
+ } | { ok: false; error: string };
30
+ export interface PlatformOptions {
31
+ /** Defaults to whether the URL has a preview query parameter. */
32
+ preview?: boolean;
33
+ /** Configure a known parent origin where available; legacy default is '*'. */
34
+ targetOrigin?: string;
35
+ /** Defaults to 3000 ms after the first actual frame, or an initialization error. */
36
+ resultDelayMs?: number;
37
+ /** Frame + DOM composition deadline; defaults to 4000 ms. */
38
+ captureTimeoutMs?: number;
39
+ maxLogs?: number;
40
+ maxLogChars?: number;
41
+ /** The panel is only mounted in preview mode. Defaults to true. */
42
+ showLogPanel?: boolean;
43
+ }
44
+ export interface PreviewOptions extends PlatformOptions {
45
+ /** Omit to discover #ui-root and canvas siblings; null/false captures canvas only. */
46
+ uiRoot?: HTMLElement | string | Array<HTMLElement | string> | null | false;
47
+ /**
48
+ * Render the current game frame synchronously without updating game state.
49
+ * Include postprocessing if used. The bridge copies the canvas before awaiting
50
+ * UI resources. For asynchronous renderers, omit this and call afterRender().
51
+ * Static/on-demand scenes should provide this callback.
52
+ */
53
+ renderForCapture?: () => void;
54
+ }
55
+ export interface PreviewConnection {
56
+ /** Call immediately after the renderer submits a real frame, in the same task. */
57
+ afterRender(): void;
58
+ /** Mark initialization complete; ready/onloadend also require a rendered frame. */
59
+ markReady(): void;
60
+ /** Cancels pending captures; the last connection also disposes the page bridge. */
61
+ dispose(): void;
62
+ }
63
+ export interface PlatformBridge {
64
+ readonly disposed: boolean;
65
+ connect(canvas: HTMLCanvasElement, options?: PreviewOptions): PreviewConnection;
66
+ getLogs(): LogEntry[];
67
+ exportLogs(): string;
68
+ clearLogs(): void;
69
+ /** Explicit user action only. Returns false when unframed, empty, or disposed. */
70
+ sendLogsToParent(): boolean;
71
+ /** Capture the active (most recently connected) canvas without posting a reply. */
72
+ capture(): Promise<CaptureResult>;
73
+ captureUiTree(): UiTreeSnapshot | null;
74
+ dispose(): void;
75
+ }
76
+ /** Import has no browser side effects. First initialization determines page options. */
77
+ export function startPlatform(options?: PlatformOptions): PlatformBridge;
78
+ /** Connect before renderer construction to capture WebGL creation errors. */
79
+ export function connectPreview(canvas: HTMLCanvasElement, options?: PreviewOptions): PreviewConnection;