@craft_eco/craft-mcp 0.1.28 → 0.1.29

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (980) hide show
  1. package/README.md +23 -17
  2. package/bin/craft-mcp.mjs +4 -1
  3. package/dist-server/game-workflow/asset-import.mjs +5 -1
  4. package/dist-server/game-workflow/assets.mjs +6 -2
  5. package/dist-server/game-workflow/bundle-files.mjs +9 -6
  6. package/dist-server/game-workflow/check.mjs +5 -0
  7. package/dist-server/game-workflow/context-state.mjs +67 -0
  8. package/dist-server/game-workflow/draft-uploads.mjs +3 -0
  9. package/dist-server/game-workflow/engines.mjs +3 -3
  10. package/dist-server/game-workflow/library-assets.mjs +2 -1
  11. package/dist-server/game-workflow/local-context.mjs +62 -0
  12. package/dist-server/game-workflow/native-context.mjs +289 -0
  13. package/dist-server/game-workflow/project-bundles.mjs +246 -129
  14. package/dist-server/game-workflow/project-context.mjs +183 -45
  15. package/dist-server/game-workflow/project-leases.mjs +101 -30
  16. package/dist-server/game-workflow/projects.mjs +86 -10
  17. package/dist-server/game-workflow/publications.mjs +5 -1
  18. package/dist-server/game-workflow/tasks.mjs +6 -1
  19. package/dist-server/game-workflow/work-scope.mjs +7 -0
  20. package/dist-server/integrations/config.mjs +145 -71
  21. package/dist-server/integrations/connection-handoff.mjs +42 -0
  22. package/dist-server/integrations/dsh-config.mjs +182 -0
  23. package/dist-server/integrations/files.mjs +54 -54
  24. package/dist-server/integrations/hosts.mjs +55 -35
  25. package/dist-server/integrations/install.mjs +205 -86
  26. package/dist-server/integrations/installation-state.mjs +84 -0
  27. package/dist-server/integrations/runtime-gc.mjs +188 -0
  28. package/dist-server/integrations/runtime.mjs +126 -72
  29. package/dist-server/integrations/updates.mjs +225 -0
  30. package/dist-server/integrations/version-policy.mjs +32 -0
  31. package/dist-server/mcp/control-panel.mjs +5 -2
  32. package/dist-server/mcp/publish-panel.mjs +7 -2
  33. package/dist-server/mcp/server.mjs +134 -26
  34. package/dist-server/mcp/start.mjs +8 -2
  35. package/dist-server/mcp/update-session.mjs +92 -0
  36. package/package.json +2 -2
  37. package/resources/context-filter-report.json +177 -0
  38. package/resources/craft-create/SKILL.md +19 -11
  39. package/resources/craft-update/SKILL.md +25 -0
  40. package/resources/targets/claude/js/bootstrap/SKILL.md +18 -0
  41. package/resources/targets/claude/js/context-filter-report.json +27 -0
  42. package/resources/targets/claude/js/craft-game-maker/SKILL.md +76 -0
  43. package/resources/targets/claude/js/craft-game-maker/js.md +10 -0
  44. package/resources/targets/claude/js/js/bundle.json +97 -0
  45. package/resources/targets/claude/js/js/context/AGENTS.md +29 -0
  46. package/resources/targets/claude/js/js/context/hooks/hooks.json +14 -0
  47. package/resources/targets/claude/js/js/context/knowledge/AssetUrl.md +9 -0
  48. package/resources/targets/claude/js/js/context/knowledge/AssetWiring.md +7 -0
  49. package/resources/targets/claude/js/js/context/knowledge/Layout.md +7 -0
  50. package/resources/targets/claude/js/js/context/knowledge/Lifecycle.md +11 -0
  51. package/resources/targets/claude/js/js/context/knowledge/ResourceLoading.md +9 -0
  52. package/resources/targets/claude/js/js/context/skills/export-config/SKILL.md +16 -0
  53. package/resources/targets/claude/js/js/context/skills/export-config/assets/tooling/cli.mjs +20 -0
  54. package/resources/targets/claude/js/js/context/skills/export-config/assets/tooling/config.d.mts +19 -0
  55. package/resources/targets/claude/js/js/context/skills/export-config/assets/tooling/config.mjs +1 -0
  56. package/resources/targets/claude/js/js/context/skills/export-config/assets/tooling/project.d.mts +6 -0
  57. package/resources/targets/claude/js/js/context/skills/export-config/assets/tooling/project.mjs +77 -0
  58. package/resources/targets/claude/js/js/context/skills/export-config/assets/tooling/vite.d.mts +2 -0
  59. package/resources/targets/claude/js/js/context/skills/export-config/assets/tooling/vite.mjs +34 -0
  60. package/resources/targets/claude/js/js/context/skills/export-config/scripts/export-config.mjs +4 -0
  61. package/resources/targets/claude/js/js/context/skills/export-config/scripts/install.mjs +89 -0
  62. package/resources/targets/claude/js/js/context/skills/export-config/scripts/panel-resource-path.mjs +106 -0
  63. package/resources/targets/claude/js/js/context/skills/index.json +19 -0
  64. package/resources/targets/claude/js/js/context/skills/visual-qa/SKILL.md +14 -0
  65. package/resources/targets/claude/js/js/project/README.md +7 -0
  66. package/resources/targets/claude/js/js/project/configs/assets.json +1 -0
  67. package/resources/targets/claude/js/js/project/configs/game.controls.json +3 -0
  68. package/resources/targets/claude/js/js/project/configs/game.json +3 -0
  69. package/resources/targets/claude/js/js/project/game-runtime.json +7 -0
  70. package/resources/targets/claude/js/js/project/game.config.json +7 -0
  71. package/resources/targets/claude/js/js/project/index.html +20 -0
  72. package/resources/targets/claude/js/js/project/package.json +22 -0
  73. package/resources/targets/claude/js/js/project/runtime/lightgame/1.1.0/platform/identity/qq-ai-game-sdk.min.js +5 -0
  74. package/resources/targets/claude/js/js/project/runtime/lightgame/1.1.0/platform/identity/qq-session.mjs +208 -0
  75. package/resources/targets/claude/js/js/project/runtime/lightgame/1.1.0/platform/identity/shared.mjs +37 -0
  76. package/resources/targets/claude/js/js/project/runtime/lightgame/1.1.0/platform/platform-capture-video.mjs +227 -0
  77. package/resources/targets/claude/js/js/project/runtime/lightgame/1.1.0/platform/platform-service.d.mts +31 -0
  78. package/resources/targets/claude/js/js/project/runtime/lightgame/1.1.0/platform/platform-service.mjs +272 -0
  79. package/resources/targets/claude/js/js/project/runtime/lightgame/1.1.0/platform/platform.d.mts +79 -0
  80. package/resources/targets/claude/js/js/project/runtime/lightgame/1.1.0/platform/platform.mjs +29 -0
  81. package/resources/targets/claude/js/js/project/runtime/lightgame/1.1.0/release.json +22 -0
  82. package/resources/targets/claude/js/js/project/runtime/lightgame/1.1.0/tooling/cli.mjs +16 -0
  83. package/resources/targets/claude/js/js/project/runtime/lightgame/1.1.0/tooling/project.d.mts +4 -0
  84. package/resources/targets/claude/js/js/project/runtime/lightgame/1.1.0/tooling/project.mjs +50 -0
  85. package/resources/targets/claude/js/js/project/runtime/lightgame/1.1.0/tooling/vite.d.mts +3 -0
  86. package/resources/targets/claude/js/js/project/runtime/lightgame/1.1.0/tooling/vite.mjs +72 -0
  87. package/resources/targets/claude/js/js/project/runtime/lightgame/1.1.0/tools/assets.d.mts +24 -0
  88. package/resources/targets/claude/js/js/project/runtime/lightgame/1.1.0/tools/assets.mjs +2 -0
  89. package/resources/targets/claude/js/js/project/runtime/lightgame/1.1.0/tools/astc.d.mts +10 -0
  90. package/resources/targets/claude/js/js/project/runtime/lightgame/1.1.0/tools/astc.mjs +1 -0
  91. package/resources/targets/claude/js/js/project/scripts/config-export/assert-asset-wiring.mjs +72 -0
  92. package/resources/targets/claude/js/js/project/scripts/config-export/panel-resource-path.mjs +106 -0
  93. package/resources/targets/claude/js/js/project/scripts/config-export/sync-asset-controls.mjs +316 -0
  94. package/resources/targets/claude/js/js/project/scripts/config-export.mjs +13 -0
  95. package/resources/targets/claude/js/js/project/scripts/skill-modules/export-config/cli.mjs +20 -0
  96. package/resources/targets/claude/js/js/project/scripts/skill-modules/export-config/config.d.mts +19 -0
  97. package/resources/targets/claude/js/js/project/scripts/skill-modules/export-config/config.mjs +1 -0
  98. package/resources/targets/claude/js/js/project/scripts/skill-modules/export-config/installed.json +6 -0
  99. package/resources/targets/claude/js/js/project/scripts/skill-modules/export-config/project.d.mts +6 -0
  100. package/resources/targets/claude/js/js/project/scripts/skill-modules/export-config/project.mjs +77 -0
  101. package/resources/targets/claude/js/js/project/scripts/skill-modules/export-config/vite.d.mts +2 -0
  102. package/resources/targets/claude/js/js/project/scripts/skill-modules/export-config/vite.mjs +34 -0
  103. package/resources/targets/claude/js/js/project/scripts/write-preview-ready.mjs +22 -0
  104. package/resources/targets/claude/js/js/project/src/display/ui-stage.ts +156 -0
  105. package/resources/targets/claude/js/js/project/src/display/viewport.ts +249 -0
  106. package/resources/targets/claude/js/js/project/src/main.ts +87 -0
  107. package/resources/targets/claude/js/js/project/src/platform.ts +2 -0
  108. package/resources/targets/claude/js/js/project/src/scenes/LoadScene.ts +89 -0
  109. package/resources/targets/claude/js/js/project/src/scenes/PlayScene.ts +17 -0
  110. package/resources/targets/claude/js/js/project/src/screenUi.ts +185 -0
  111. package/resources/targets/claude/js/js/project/src/style.css +294 -0
  112. package/resources/targets/claude/js/js/project/tsconfig.json +20 -0
  113. package/resources/targets/claude/js/js/project/unified_data_control_config.json +20 -0
  114. package/resources/targets/claude/js/js/project/vite.config.ts +5 -0
  115. package/resources/targets/claude/js/recovery.md +13 -0
  116. package/resources/targets/claude/js/target.json +61 -0
  117. package/resources/targets/claude/js3d/bootstrap/SKILL.md +18 -0
  118. package/resources/targets/claude/js3d/context-filter-report.json +27 -0
  119. package/resources/targets/claude/js3d/craft-game-maker/SKILL.md +76 -0
  120. package/resources/targets/claude/js3d/craft-game-maker/js3d.md +12 -0
  121. package/resources/targets/claude/js3d/js3d/bundle.json +108 -0
  122. package/resources/targets/claude/js3d/js3d/context/AGENTS.md +30 -0
  123. package/resources/targets/claude/js3d/js3d/context/hooks/hooks.json +14 -0
  124. package/resources/targets/claude/js3d/js3d/context/knowledge/AssetUrl.md +9 -0
  125. package/resources/targets/claude/js3d/js3d/context/knowledge/AssetWiring.md +7 -0
  126. package/resources/targets/claude/js3d/js3d/context/knowledge/CodingGuide/Pitfalls.md +11 -0
  127. package/resources/targets/claude/js3d/js3d/context/knowledge/Layout.md +7 -0
  128. package/resources/targets/{workbuddy/js3d/js3d/context/skills/asset-search/references/resource-config.md → claude/js3d/js3d/context/knowledge/ResourceLoading.md} +2 -2
  129. package/resources/targets/claude/js3d/js3d/context/knowledge/Runtime.md +9 -0
  130. package/resources/targets/claude/js3d/js3d/context/skills/asset-usage-audit/SKILL.md +16 -0
  131. package/resources/targets/claude/js3d/js3d/context/skills/asset-usage-audit/scripts/compare-animations.mjs +48 -0
  132. package/resources/targets/claude/js3d/js3d/context/skills/asset-usage-audit/scripts/lib/anim.mjs +266 -0
  133. package/resources/targets/claude/js3d/js3d/context/skills/asset-usage-audit/scripts/lib/glb.mjs +241 -0
  134. package/resources/targets/claude/js3d/js3d/context/skills/asset-usage-audit/scripts/lib/scan.mjs +455 -0
  135. package/resources/targets/claude/js3d/js3d/context/skills/asset-usage-audit/scripts/scan-assets.mjs +77 -0
  136. package/resources/targets/claude/js3d/js3d/context/skills/export-config/SKILL.md +16 -0
  137. package/resources/targets/claude/js3d/js3d/context/skills/export-config/assets/tooling/cli.mjs +20 -0
  138. package/resources/targets/claude/js3d/js3d/context/skills/export-config/assets/tooling/config.d.mts +19 -0
  139. package/resources/targets/claude/js3d/js3d/context/skills/export-config/assets/tooling/config.mjs +1 -0
  140. package/resources/targets/claude/js3d/js3d/context/skills/export-config/assets/tooling/project.d.mts +6 -0
  141. package/resources/targets/claude/js3d/js3d/context/skills/export-config/assets/tooling/project.mjs +77 -0
  142. package/resources/targets/claude/js3d/js3d/context/skills/export-config/assets/tooling/vite.d.mts +2 -0
  143. package/resources/targets/claude/js3d/js3d/context/skills/export-config/assets/tooling/vite.mjs +34 -0
  144. package/resources/targets/claude/js3d/js3d/context/skills/export-config/scripts/export-config.mjs +4 -0
  145. package/resources/targets/claude/js3d/js3d/context/skills/export-config/scripts/install.mjs +89 -0
  146. package/resources/targets/claude/js3d/js3d/context/skills/export-config/scripts/panel-resource-path.mjs +106 -0
  147. package/resources/targets/claude/js3d/js3d/context/skills/index.json +31 -0
  148. package/resources/targets/claude/js3d/js3d/context/skills/performance-audit/SKILL.md +21 -0
  149. package/resources/targets/claude/js3d/js3d/context/skills/performance-audit/scripts/lib/rules.mjs +470 -0
  150. package/resources/targets/claude/js3d/js3d/context/skills/performance-audit/scripts/lib/scan.mjs +387 -0
  151. package/resources/targets/claude/js3d/js3d/context/skills/performance-audit/scripts/lib/source.mjs +398 -0
  152. package/resources/targets/claude/js3d/js3d/context/skills/performance-audit/scripts/scan-perf.mjs +130 -0
  153. package/resources/targets/claude/js3d/js3d/context/skills/visual-qa/SKILL.md +14 -0
  154. package/resources/targets/claude/js3d/js3d/project/README.md +7 -0
  155. package/resources/targets/claude/js3d/js3d/project/configs/game.controls.json +3 -0
  156. package/resources/targets/claude/js3d/js3d/project/configs/game.json +3 -0
  157. package/resources/targets/claude/js3d/js3d/project/game-runtime.json +7 -0
  158. package/resources/targets/claude/js3d/js3d/project/game.config.json +7 -0
  159. package/resources/targets/claude/js3d/js3d/project/index.html +12 -0
  160. package/resources/targets/claude/js3d/js3d/project/package.json +23 -0
  161. package/resources/targets/claude/js3d/js3d/project/runtime/lightgame/1.1.0/platform/identity/qq-ai-game-sdk.min.js +5 -0
  162. package/resources/targets/claude/js3d/js3d/project/runtime/lightgame/1.1.0/platform/identity/qq-session.mjs +208 -0
  163. package/resources/targets/claude/js3d/js3d/project/runtime/lightgame/1.1.0/platform/identity/shared.mjs +37 -0
  164. package/resources/targets/claude/js3d/js3d/project/runtime/lightgame/1.1.0/platform/platform-capture-video.mjs +227 -0
  165. package/resources/targets/claude/js3d/js3d/project/runtime/lightgame/1.1.0/platform/platform-service.d.mts +31 -0
  166. package/resources/targets/claude/js3d/js3d/project/runtime/lightgame/1.1.0/platform/platform-service.mjs +272 -0
  167. package/resources/targets/claude/js3d/js3d/project/runtime/lightgame/1.1.0/platform/platform.d.mts +79 -0
  168. package/resources/targets/claude/js3d/js3d/project/runtime/lightgame/1.1.0/platform/platform.mjs +30 -0
  169. package/resources/targets/claude/js3d/js3d/project/runtime/lightgame/1.1.0/release.json +24 -0
  170. package/resources/targets/claude/js3d/js3d/project/runtime/lightgame/1.1.0/tooling/cli.mjs +16 -0
  171. package/resources/targets/claude/js3d/js3d/project/runtime/lightgame/1.1.0/tooling/project.d.mts +4 -0
  172. package/resources/targets/claude/js3d/js3d/project/runtime/lightgame/1.1.0/tooling/project.mjs +50 -0
  173. package/resources/targets/claude/js3d/js3d/project/runtime/lightgame/1.1.0/tooling/vite.d.mts +3 -0
  174. package/resources/targets/claude/js3d/js3d/project/runtime/lightgame/1.1.0/tooling/vite.mjs +72 -0
  175. package/resources/targets/claude/js3d/js3d/project/runtime/lightgame/1.1.0/tools/assets.d.mts +24 -0
  176. package/resources/targets/claude/js3d/js3d/project/runtime/lightgame/1.1.0/tools/assets.mjs +2 -0
  177. package/resources/targets/claude/js3d/js3d/project/runtime/lightgame/1.1.0/tools/astc.d.mts +10 -0
  178. package/resources/targets/claude/js3d/js3d/project/runtime/lightgame/1.1.0/tools/astc.mjs +1 -0
  179. package/resources/targets/claude/js3d/js3d/project/runtime/lightgame/1.1.0/tools/glb.d.mts +26 -0
  180. package/resources/targets/claude/js3d/js3d/project/runtime/lightgame/1.1.0/tools/glb.mjs +351 -0
  181. package/resources/targets/claude/js3d/js3d/project/scripts/config-export/assert-asset-wiring.mjs +97 -0
  182. package/resources/targets/claude/js3d/js3d/project/scripts/config-export/panel-resource-path.mjs +106 -0
  183. package/resources/targets/claude/js3d/js3d/project/scripts/config-export/sync-asset-controls.mjs +327 -0
  184. package/resources/targets/claude/js3d/js3d/project/scripts/config-export/sync-scene-assets.mjs +191 -0
  185. package/resources/targets/claude/js3d/js3d/project/scripts/config-export.mjs +15 -0
  186. package/resources/targets/claude/js3d/js3d/project/scripts/skill-modules/export-config/cli.mjs +20 -0
  187. package/resources/targets/claude/js3d/js3d/project/scripts/skill-modules/export-config/config.d.mts +19 -0
  188. package/resources/targets/claude/js3d/js3d/project/scripts/skill-modules/export-config/config.mjs +1 -0
  189. package/resources/targets/claude/js3d/js3d/project/scripts/skill-modules/export-config/installed.json +6 -0
  190. package/resources/targets/claude/js3d/js3d/project/scripts/skill-modules/export-config/project.d.mts +6 -0
  191. package/resources/targets/claude/js3d/js3d/project/scripts/skill-modules/export-config/project.mjs +77 -0
  192. package/resources/targets/claude/js3d/js3d/project/scripts/skill-modules/export-config/vite.d.mts +2 -0
  193. package/resources/targets/claude/js3d/js3d/project/scripts/skill-modules/export-config/vite.mjs +34 -0
  194. package/resources/targets/claude/js3d/js3d/project/scripts/write-preview-ready.mjs +22 -0
  195. package/resources/targets/claude/js3d/js3d/project/src/display/ui-stage.ts +156 -0
  196. package/resources/targets/claude/js3d/js3d/project/src/display/viewport.ts +239 -0
  197. package/resources/targets/claude/js3d/js3d/project/src/main.ts +85 -0
  198. package/resources/targets/claude/js3d/js3d/project/src/platform.ts +2 -0
  199. package/resources/targets/claude/js3d/js3d/project/src/style.css +83 -0
  200. package/resources/targets/claude/js3d/js3d/project/tsconfig.json +20 -0
  201. package/resources/targets/claude/js3d/js3d/project/unified_data_control_config.json +20 -0
  202. package/resources/targets/claude/js3d/js3d/project/vite.config.ts +5 -0
  203. package/resources/targets/claude/js3d/recovery.md +13 -0
  204. package/resources/targets/claude/js3d/target.json +60 -0
  205. package/resources/targets/codebuddy/js/bootstrap/SKILL.md +5 -1
  206. package/resources/targets/codebuddy/js/context-filter-report.json +27 -0
  207. package/resources/targets/codebuddy/js/craft-game-maker/SKILL.md +18 -19
  208. package/resources/targets/codebuddy/js/craft-game-maker/js.md +2 -2
  209. package/resources/targets/codebuddy/js/js/bundle.json +16 -18
  210. package/resources/targets/codebuddy/js/js/context/AGENTS.md +10 -6
  211. package/resources/targets/codebuddy/js/js/context/knowledge/AssetUrl.md +4 -4
  212. package/resources/targets/codebuddy/js/js/context/knowledge/AssetWiring.md +7 -0
  213. package/resources/targets/codebuddy/js/js/context/knowledge/ResourceLoading.md +9 -0
  214. package/resources/targets/codebuddy/js/js/context/skills/export-config/SKILL.md +2 -2
  215. package/resources/targets/codebuddy/js/js/context/skills/index.json +2 -14
  216. package/resources/targets/codebuddy/js/js/context/skills/visual-qa/SKILL.md +1 -1
  217. package/resources/targets/codebuddy/js/recovery.md +10 -4
  218. package/resources/targets/codebuddy/js/target.json +1 -1
  219. package/resources/targets/codebuddy/js3d/bootstrap/SKILL.md +5 -1
  220. package/resources/targets/codebuddy/js3d/context-filter-report.json +27 -0
  221. package/resources/targets/codebuddy/js3d/craft-game-maker/SKILL.md +18 -19
  222. package/resources/targets/codebuddy/js3d/craft-game-maker/js3d.md +3 -4
  223. package/resources/targets/codebuddy/js3d/js3d/bundle.json +19 -21
  224. package/resources/targets/codebuddy/js3d/js3d/context/AGENTS.md +10 -6
  225. package/resources/targets/codebuddy/js3d/js3d/context/knowledge/AssetUrl.md +4 -4
  226. package/resources/targets/codebuddy/js3d/js3d/context/knowledge/AssetWiring.md +7 -0
  227. package/resources/targets/{codex/js3d/js3d/context/skills/asset-search/references/resource-config.md → codebuddy/js3d/js3d/context/knowledge/ResourceLoading.md} +2 -2
  228. package/resources/targets/codebuddy/js3d/js3d/context/skills/asset-usage-audit/SKILL.md +1 -1
  229. package/resources/targets/codebuddy/js3d/js3d/context/skills/asset-usage-audit/scripts/lib/scan.mjs +2 -2
  230. package/resources/targets/codebuddy/js3d/js3d/context/skills/export-config/SKILL.md +2 -2
  231. package/resources/targets/codebuddy/js3d/js3d/context/skills/index.json +4 -16
  232. package/resources/targets/codebuddy/js3d/js3d/context/skills/performance-audit/SKILL.md +1 -1
  233. package/resources/targets/codebuddy/js3d/js3d/context/skills/visual-qa/SKILL.md +1 -1
  234. package/resources/targets/codebuddy/js3d/recovery.md +10 -4
  235. package/resources/targets/codebuddy/js3d/target.json +1 -1
  236. package/resources/targets/codex/js/bootstrap/SKILL.md +9 -1
  237. package/resources/targets/codex/js/context-filter-report.json +27 -0
  238. package/resources/targets/codex/js/craft-game-maker/SKILL.md +18 -19
  239. package/resources/targets/codex/js/craft-game-maker/js.md +2 -2
  240. package/resources/targets/codex/js/js/bundle.json +16 -18
  241. package/resources/targets/codex/js/js/context/AGENTS.md +10 -6
  242. package/resources/targets/codex/js/js/context/knowledge/AssetUrl.md +4 -4
  243. package/resources/targets/codex/js/js/context/knowledge/AssetWiring.md +7 -0
  244. package/resources/targets/codex/js/js/context/knowledge/ResourceLoading.md +9 -0
  245. package/resources/targets/codex/js/js/context/skills/export-config/SKILL.md +2 -2
  246. package/resources/targets/codex/js/js/context/skills/index.json +2 -14
  247. package/resources/targets/codex/js/js/context/skills/visual-qa/SKILL.md +1 -1
  248. package/resources/targets/codex/js/recovery.md +14 -4
  249. package/resources/targets/codex/js/target.json +1 -1
  250. package/resources/targets/codex/js3d/bootstrap/SKILL.md +9 -1
  251. package/resources/targets/codex/js3d/context-filter-report.json +27 -0
  252. package/resources/targets/codex/js3d/craft-game-maker/SKILL.md +18 -19
  253. package/resources/targets/codex/js3d/craft-game-maker/js3d.md +3 -4
  254. package/resources/targets/codex/js3d/js3d/bundle.json +19 -21
  255. package/resources/targets/codex/js3d/js3d/context/AGENTS.md +10 -6
  256. package/resources/targets/codex/js3d/js3d/context/knowledge/AssetUrl.md +4 -4
  257. package/resources/targets/codex/js3d/js3d/context/knowledge/AssetWiring.md +7 -0
  258. package/resources/targets/{codebuddy/js3d/js3d/context/skills/asset-search/references/resource-config.md → codex/js3d/js3d/context/knowledge/ResourceLoading.md} +2 -2
  259. package/resources/targets/codex/js3d/js3d/context/skills/asset-usage-audit/SKILL.md +1 -1
  260. package/resources/targets/codex/js3d/js3d/context/skills/asset-usage-audit/scripts/lib/scan.mjs +2 -2
  261. package/resources/targets/codex/js3d/js3d/context/skills/export-config/SKILL.md +2 -2
  262. package/resources/targets/codex/js3d/js3d/context/skills/index.json +4 -16
  263. package/resources/targets/codex/js3d/js3d/context/skills/performance-audit/SKILL.md +1 -1
  264. package/resources/targets/codex/js3d/js3d/context/skills/visual-qa/SKILL.md +1 -1
  265. package/resources/targets/codex/js3d/recovery.md +14 -4
  266. package/resources/targets/codex/js3d/target.json +1 -1
  267. package/resources/targets/cursor/js/bootstrap/SKILL.md +18 -0
  268. package/resources/targets/cursor/js/context-filter-report.json +27 -0
  269. package/resources/targets/cursor/js/craft-game-maker/SKILL.md +76 -0
  270. package/resources/targets/cursor/js/craft-game-maker/js.md +10 -0
  271. package/resources/targets/cursor/js/js/bundle.json +97 -0
  272. package/resources/targets/cursor/js/js/context/AGENTS.md +29 -0
  273. package/resources/targets/cursor/js/js/context/hooks/hooks.json +14 -0
  274. package/resources/targets/cursor/js/js/context/knowledge/AssetUrl.md +9 -0
  275. package/resources/targets/cursor/js/js/context/knowledge/AssetWiring.md +7 -0
  276. package/resources/targets/cursor/js/js/context/knowledge/Layout.md +7 -0
  277. package/resources/targets/cursor/js/js/context/knowledge/Lifecycle.md +11 -0
  278. package/resources/targets/cursor/js/js/context/knowledge/ResourceLoading.md +9 -0
  279. package/resources/targets/cursor/js/js/context/skills/export-config/SKILL.md +16 -0
  280. package/resources/targets/cursor/js/js/context/skills/export-config/assets/tooling/cli.mjs +20 -0
  281. package/resources/targets/cursor/js/js/context/skills/export-config/assets/tooling/config.d.mts +19 -0
  282. package/resources/targets/cursor/js/js/context/skills/export-config/assets/tooling/config.mjs +1 -0
  283. package/resources/targets/cursor/js/js/context/skills/export-config/assets/tooling/project.d.mts +6 -0
  284. package/resources/targets/cursor/js/js/context/skills/export-config/assets/tooling/project.mjs +77 -0
  285. package/resources/targets/cursor/js/js/context/skills/export-config/assets/tooling/vite.d.mts +2 -0
  286. package/resources/targets/cursor/js/js/context/skills/export-config/assets/tooling/vite.mjs +34 -0
  287. package/resources/targets/cursor/js/js/context/skills/export-config/scripts/export-config.mjs +4 -0
  288. package/resources/targets/cursor/js/js/context/skills/export-config/scripts/install.mjs +89 -0
  289. package/resources/targets/cursor/js/js/context/skills/export-config/scripts/panel-resource-path.mjs +106 -0
  290. package/resources/targets/cursor/js/js/context/skills/index.json +19 -0
  291. package/resources/targets/cursor/js/js/context/skills/visual-qa/SKILL.md +14 -0
  292. package/resources/targets/cursor/js/js/project/README.md +7 -0
  293. package/resources/targets/cursor/js/js/project/configs/assets.json +1 -0
  294. package/resources/targets/cursor/js/js/project/configs/game.controls.json +3 -0
  295. package/resources/targets/cursor/js/js/project/configs/game.json +3 -0
  296. package/resources/targets/cursor/js/js/project/game-runtime.json +7 -0
  297. package/resources/targets/cursor/js/js/project/game.config.json +7 -0
  298. package/resources/targets/cursor/js/js/project/index.html +20 -0
  299. package/resources/targets/cursor/js/js/project/package.json +22 -0
  300. package/resources/targets/cursor/js/js/project/runtime/lightgame/1.1.0/platform/identity/qq-ai-game-sdk.min.js +5 -0
  301. package/resources/targets/cursor/js/js/project/runtime/lightgame/1.1.0/platform/identity/qq-session.mjs +208 -0
  302. package/resources/targets/cursor/js/js/project/runtime/lightgame/1.1.0/platform/identity/shared.mjs +37 -0
  303. package/resources/targets/cursor/js/js/project/runtime/lightgame/1.1.0/platform/platform-capture-video.mjs +227 -0
  304. package/resources/targets/cursor/js/js/project/runtime/lightgame/1.1.0/platform/platform-service.d.mts +31 -0
  305. package/resources/targets/cursor/js/js/project/runtime/lightgame/1.1.0/platform/platform-service.mjs +272 -0
  306. package/resources/targets/cursor/js/js/project/runtime/lightgame/1.1.0/platform/platform.d.mts +79 -0
  307. package/resources/targets/cursor/js/js/project/runtime/lightgame/1.1.0/platform/platform.mjs +29 -0
  308. package/resources/targets/cursor/js/js/project/runtime/lightgame/1.1.0/release.json +22 -0
  309. package/resources/targets/cursor/js/js/project/runtime/lightgame/1.1.0/tooling/cli.mjs +16 -0
  310. package/resources/targets/cursor/js/js/project/runtime/lightgame/1.1.0/tooling/project.d.mts +4 -0
  311. package/resources/targets/cursor/js/js/project/runtime/lightgame/1.1.0/tooling/project.mjs +50 -0
  312. package/resources/targets/cursor/js/js/project/runtime/lightgame/1.1.0/tooling/vite.d.mts +3 -0
  313. package/resources/targets/cursor/js/js/project/runtime/lightgame/1.1.0/tooling/vite.mjs +72 -0
  314. package/resources/targets/cursor/js/js/project/runtime/lightgame/1.1.0/tools/assets.d.mts +24 -0
  315. package/resources/targets/cursor/js/js/project/runtime/lightgame/1.1.0/tools/assets.mjs +2 -0
  316. package/resources/targets/cursor/js/js/project/runtime/lightgame/1.1.0/tools/astc.d.mts +10 -0
  317. package/resources/targets/cursor/js/js/project/runtime/lightgame/1.1.0/tools/astc.mjs +1 -0
  318. package/resources/targets/cursor/js/js/project/scripts/config-export/assert-asset-wiring.mjs +72 -0
  319. package/resources/targets/cursor/js/js/project/scripts/config-export/panel-resource-path.mjs +106 -0
  320. package/resources/targets/cursor/js/js/project/scripts/config-export/sync-asset-controls.mjs +316 -0
  321. package/resources/targets/cursor/js/js/project/scripts/config-export.mjs +13 -0
  322. package/resources/targets/cursor/js/js/project/scripts/skill-modules/export-config/cli.mjs +20 -0
  323. package/resources/targets/cursor/js/js/project/scripts/skill-modules/export-config/config.d.mts +19 -0
  324. package/resources/targets/cursor/js/js/project/scripts/skill-modules/export-config/config.mjs +1 -0
  325. package/resources/targets/cursor/js/js/project/scripts/skill-modules/export-config/installed.json +6 -0
  326. package/resources/targets/cursor/js/js/project/scripts/skill-modules/export-config/project.d.mts +6 -0
  327. package/resources/targets/cursor/js/js/project/scripts/skill-modules/export-config/project.mjs +77 -0
  328. package/resources/targets/cursor/js/js/project/scripts/skill-modules/export-config/vite.d.mts +2 -0
  329. package/resources/targets/cursor/js/js/project/scripts/skill-modules/export-config/vite.mjs +34 -0
  330. package/resources/targets/cursor/js/js/project/scripts/write-preview-ready.mjs +22 -0
  331. package/resources/targets/cursor/js/js/project/src/display/ui-stage.ts +156 -0
  332. package/resources/targets/cursor/js/js/project/src/display/viewport.ts +249 -0
  333. package/resources/targets/cursor/js/js/project/src/main.ts +87 -0
  334. package/resources/targets/cursor/js/js/project/src/platform.ts +2 -0
  335. package/resources/targets/cursor/js/js/project/src/scenes/LoadScene.ts +89 -0
  336. package/resources/targets/cursor/js/js/project/src/scenes/PlayScene.ts +17 -0
  337. package/resources/targets/cursor/js/js/project/src/screenUi.ts +185 -0
  338. package/resources/targets/cursor/js/js/project/src/style.css +294 -0
  339. package/resources/targets/cursor/js/js/project/tsconfig.json +20 -0
  340. package/resources/targets/cursor/js/js/project/unified_data_control_config.json +20 -0
  341. package/resources/targets/cursor/js/js/project/vite.config.ts +5 -0
  342. package/resources/targets/cursor/js/recovery.md +13 -0
  343. package/resources/targets/cursor/js/target.json +61 -0
  344. package/resources/targets/cursor/js3d/bootstrap/SKILL.md +18 -0
  345. package/resources/targets/cursor/js3d/context-filter-report.json +27 -0
  346. package/resources/targets/cursor/js3d/craft-game-maker/SKILL.md +76 -0
  347. package/resources/targets/cursor/js3d/craft-game-maker/js3d.md +12 -0
  348. package/resources/targets/cursor/js3d/js3d/bundle.json +108 -0
  349. package/resources/targets/cursor/js3d/js3d/context/AGENTS.md +30 -0
  350. package/resources/targets/cursor/js3d/js3d/context/hooks/hooks.json +14 -0
  351. package/resources/targets/cursor/js3d/js3d/context/knowledge/AssetUrl.md +9 -0
  352. package/resources/targets/cursor/js3d/js3d/context/knowledge/AssetWiring.md +7 -0
  353. package/resources/targets/cursor/js3d/js3d/context/knowledge/CodingGuide/Pitfalls.md +11 -0
  354. package/resources/targets/cursor/js3d/js3d/context/knowledge/Layout.md +7 -0
  355. package/resources/targets/cursor/js3d/js3d/context/knowledge/ResourceLoading.md +11 -0
  356. package/resources/targets/cursor/js3d/js3d/context/knowledge/Runtime.md +9 -0
  357. package/resources/targets/cursor/js3d/js3d/context/skills/asset-usage-audit/SKILL.md +16 -0
  358. package/resources/targets/cursor/js3d/js3d/context/skills/asset-usage-audit/scripts/compare-animations.mjs +48 -0
  359. package/resources/targets/cursor/js3d/js3d/context/skills/asset-usage-audit/scripts/lib/anim.mjs +266 -0
  360. package/resources/targets/cursor/js3d/js3d/context/skills/asset-usage-audit/scripts/lib/glb.mjs +241 -0
  361. package/resources/targets/cursor/js3d/js3d/context/skills/asset-usage-audit/scripts/lib/scan.mjs +455 -0
  362. package/resources/targets/cursor/js3d/js3d/context/skills/asset-usage-audit/scripts/scan-assets.mjs +77 -0
  363. package/resources/targets/cursor/js3d/js3d/context/skills/export-config/SKILL.md +16 -0
  364. package/resources/targets/cursor/js3d/js3d/context/skills/export-config/assets/tooling/cli.mjs +20 -0
  365. package/resources/targets/cursor/js3d/js3d/context/skills/export-config/assets/tooling/config.d.mts +19 -0
  366. package/resources/targets/cursor/js3d/js3d/context/skills/export-config/assets/tooling/config.mjs +1 -0
  367. package/resources/targets/cursor/js3d/js3d/context/skills/export-config/assets/tooling/project.d.mts +6 -0
  368. package/resources/targets/cursor/js3d/js3d/context/skills/export-config/assets/tooling/project.mjs +77 -0
  369. package/resources/targets/cursor/js3d/js3d/context/skills/export-config/assets/tooling/vite.d.mts +2 -0
  370. package/resources/targets/cursor/js3d/js3d/context/skills/export-config/assets/tooling/vite.mjs +34 -0
  371. package/resources/targets/cursor/js3d/js3d/context/skills/export-config/scripts/export-config.mjs +4 -0
  372. package/resources/targets/cursor/js3d/js3d/context/skills/export-config/scripts/install.mjs +89 -0
  373. package/resources/targets/cursor/js3d/js3d/context/skills/export-config/scripts/panel-resource-path.mjs +106 -0
  374. package/resources/targets/cursor/js3d/js3d/context/skills/index.json +31 -0
  375. package/resources/targets/cursor/js3d/js3d/context/skills/performance-audit/SKILL.md +21 -0
  376. package/resources/targets/cursor/js3d/js3d/context/skills/performance-audit/scripts/lib/rules.mjs +470 -0
  377. package/resources/targets/cursor/js3d/js3d/context/skills/performance-audit/scripts/lib/scan.mjs +387 -0
  378. package/resources/targets/cursor/js3d/js3d/context/skills/performance-audit/scripts/lib/source.mjs +398 -0
  379. package/resources/targets/cursor/js3d/js3d/context/skills/performance-audit/scripts/scan-perf.mjs +130 -0
  380. package/resources/targets/cursor/js3d/js3d/context/skills/visual-qa/SKILL.md +14 -0
  381. package/resources/targets/cursor/js3d/js3d/project/README.md +7 -0
  382. package/resources/targets/cursor/js3d/js3d/project/configs/game.controls.json +3 -0
  383. package/resources/targets/cursor/js3d/js3d/project/configs/game.json +3 -0
  384. package/resources/targets/cursor/js3d/js3d/project/game-runtime.json +7 -0
  385. package/resources/targets/cursor/js3d/js3d/project/game.config.json +7 -0
  386. package/resources/targets/cursor/js3d/js3d/project/index.html +12 -0
  387. package/resources/targets/cursor/js3d/js3d/project/package.json +23 -0
  388. package/resources/targets/cursor/js3d/js3d/project/runtime/lightgame/1.1.0/platform/identity/qq-ai-game-sdk.min.js +5 -0
  389. package/resources/targets/cursor/js3d/js3d/project/runtime/lightgame/1.1.0/platform/identity/qq-session.mjs +208 -0
  390. package/resources/targets/cursor/js3d/js3d/project/runtime/lightgame/1.1.0/platform/identity/shared.mjs +37 -0
  391. package/resources/targets/cursor/js3d/js3d/project/runtime/lightgame/1.1.0/platform/platform-capture-video.mjs +227 -0
  392. package/resources/targets/cursor/js3d/js3d/project/runtime/lightgame/1.1.0/platform/platform-service.d.mts +31 -0
  393. package/resources/targets/cursor/js3d/js3d/project/runtime/lightgame/1.1.0/platform/platform-service.mjs +272 -0
  394. package/resources/targets/cursor/js3d/js3d/project/runtime/lightgame/1.1.0/platform/platform.d.mts +79 -0
  395. package/resources/targets/cursor/js3d/js3d/project/runtime/lightgame/1.1.0/platform/platform.mjs +30 -0
  396. package/resources/targets/cursor/js3d/js3d/project/runtime/lightgame/1.1.0/release.json +24 -0
  397. package/resources/targets/cursor/js3d/js3d/project/runtime/lightgame/1.1.0/tooling/cli.mjs +16 -0
  398. package/resources/targets/cursor/js3d/js3d/project/runtime/lightgame/1.1.0/tooling/project.d.mts +4 -0
  399. package/resources/targets/cursor/js3d/js3d/project/runtime/lightgame/1.1.0/tooling/project.mjs +50 -0
  400. package/resources/targets/cursor/js3d/js3d/project/runtime/lightgame/1.1.0/tooling/vite.d.mts +3 -0
  401. package/resources/targets/cursor/js3d/js3d/project/runtime/lightgame/1.1.0/tooling/vite.mjs +72 -0
  402. package/resources/targets/cursor/js3d/js3d/project/runtime/lightgame/1.1.0/tools/assets.d.mts +24 -0
  403. package/resources/targets/cursor/js3d/js3d/project/runtime/lightgame/1.1.0/tools/assets.mjs +2 -0
  404. package/resources/targets/cursor/js3d/js3d/project/runtime/lightgame/1.1.0/tools/astc.d.mts +10 -0
  405. package/resources/targets/cursor/js3d/js3d/project/runtime/lightgame/1.1.0/tools/astc.mjs +1 -0
  406. package/resources/targets/cursor/js3d/js3d/project/runtime/lightgame/1.1.0/tools/glb.d.mts +26 -0
  407. package/resources/targets/cursor/js3d/js3d/project/runtime/lightgame/1.1.0/tools/glb.mjs +351 -0
  408. package/resources/targets/cursor/js3d/js3d/project/scripts/config-export/assert-asset-wiring.mjs +97 -0
  409. package/resources/targets/cursor/js3d/js3d/project/scripts/config-export/panel-resource-path.mjs +106 -0
  410. package/resources/targets/cursor/js3d/js3d/project/scripts/config-export/sync-asset-controls.mjs +327 -0
  411. package/resources/targets/cursor/js3d/js3d/project/scripts/config-export/sync-scene-assets.mjs +191 -0
  412. package/resources/targets/cursor/js3d/js3d/project/scripts/config-export.mjs +15 -0
  413. package/resources/targets/cursor/js3d/js3d/project/scripts/skill-modules/export-config/cli.mjs +20 -0
  414. package/resources/targets/cursor/js3d/js3d/project/scripts/skill-modules/export-config/config.d.mts +19 -0
  415. package/resources/targets/cursor/js3d/js3d/project/scripts/skill-modules/export-config/config.mjs +1 -0
  416. package/resources/targets/cursor/js3d/js3d/project/scripts/skill-modules/export-config/installed.json +6 -0
  417. package/resources/targets/cursor/js3d/js3d/project/scripts/skill-modules/export-config/project.d.mts +6 -0
  418. package/resources/targets/cursor/js3d/js3d/project/scripts/skill-modules/export-config/project.mjs +77 -0
  419. package/resources/targets/cursor/js3d/js3d/project/scripts/skill-modules/export-config/vite.d.mts +2 -0
  420. package/resources/targets/cursor/js3d/js3d/project/scripts/skill-modules/export-config/vite.mjs +34 -0
  421. package/resources/targets/cursor/js3d/js3d/project/scripts/write-preview-ready.mjs +22 -0
  422. package/resources/targets/cursor/js3d/js3d/project/src/display/ui-stage.ts +156 -0
  423. package/resources/targets/cursor/js3d/js3d/project/src/display/viewport.ts +239 -0
  424. package/resources/targets/cursor/js3d/js3d/project/src/main.ts +85 -0
  425. package/resources/targets/cursor/js3d/js3d/project/src/platform.ts +2 -0
  426. package/resources/targets/cursor/js3d/js3d/project/src/style.css +83 -0
  427. package/resources/targets/cursor/js3d/js3d/project/tsconfig.json +20 -0
  428. package/resources/targets/cursor/js3d/js3d/project/unified_data_control_config.json +20 -0
  429. package/resources/targets/cursor/js3d/js3d/project/vite.config.ts +5 -0
  430. package/resources/targets/cursor/js3d/recovery.md +13 -0
  431. package/resources/targets/cursor/js3d/target.json +60 -0
  432. package/resources/targets/dsh/js/bootstrap/SKILL.md +18 -0
  433. package/resources/targets/dsh/js/context-filter-report.json +27 -0
  434. package/resources/targets/dsh/js/craft-game-maker/SKILL.md +76 -0
  435. package/resources/targets/dsh/js/craft-game-maker/js.md +10 -0
  436. package/resources/targets/dsh/js/js/bundle.json +97 -0
  437. package/resources/targets/dsh/js/js/context/AGENTS.md +29 -0
  438. package/resources/targets/dsh/js/js/context/hooks/hooks.json +14 -0
  439. package/resources/targets/dsh/js/js/context/knowledge/AssetUrl.md +9 -0
  440. package/resources/targets/dsh/js/js/context/knowledge/AssetWiring.md +7 -0
  441. package/resources/targets/dsh/js/js/context/knowledge/Layout.md +7 -0
  442. package/resources/targets/dsh/js/js/context/knowledge/Lifecycle.md +11 -0
  443. package/resources/targets/dsh/js/js/context/knowledge/ResourceLoading.md +9 -0
  444. package/resources/targets/dsh/js/js/context/skills/export-config/SKILL.md +16 -0
  445. package/resources/targets/dsh/js/js/context/skills/export-config/assets/tooling/cli.mjs +20 -0
  446. package/resources/targets/dsh/js/js/context/skills/export-config/assets/tooling/config.d.mts +19 -0
  447. package/resources/targets/dsh/js/js/context/skills/export-config/assets/tooling/config.mjs +1 -0
  448. package/resources/targets/dsh/js/js/context/skills/export-config/assets/tooling/project.d.mts +6 -0
  449. package/resources/targets/dsh/js/js/context/skills/export-config/assets/tooling/project.mjs +77 -0
  450. package/resources/targets/dsh/js/js/context/skills/export-config/assets/tooling/vite.d.mts +2 -0
  451. package/resources/targets/dsh/js/js/context/skills/export-config/assets/tooling/vite.mjs +34 -0
  452. package/resources/targets/dsh/js/js/context/skills/export-config/scripts/export-config.mjs +4 -0
  453. package/resources/targets/dsh/js/js/context/skills/export-config/scripts/install.mjs +89 -0
  454. package/resources/targets/dsh/js/js/context/skills/export-config/scripts/panel-resource-path.mjs +106 -0
  455. package/resources/targets/dsh/js/js/context/skills/index.json +19 -0
  456. package/resources/targets/dsh/js/js/context/skills/visual-qa/SKILL.md +14 -0
  457. package/resources/targets/dsh/js/js/project/README.md +7 -0
  458. package/resources/targets/dsh/js/js/project/configs/assets.json +1 -0
  459. package/resources/targets/dsh/js/js/project/configs/game.controls.json +3 -0
  460. package/resources/targets/dsh/js/js/project/configs/game.json +3 -0
  461. package/resources/targets/dsh/js/js/project/game-runtime.json +7 -0
  462. package/resources/targets/dsh/js/js/project/game.config.json +7 -0
  463. package/resources/targets/dsh/js/js/project/index.html +20 -0
  464. package/resources/targets/dsh/js/js/project/package.json +22 -0
  465. package/resources/targets/dsh/js/js/project/runtime/lightgame/1.1.0/platform/identity/qq-ai-game-sdk.min.js +5 -0
  466. package/resources/targets/dsh/js/js/project/runtime/lightgame/1.1.0/platform/identity/qq-session.mjs +208 -0
  467. package/resources/targets/dsh/js/js/project/runtime/lightgame/1.1.0/platform/identity/shared.mjs +37 -0
  468. package/resources/targets/dsh/js/js/project/runtime/lightgame/1.1.0/platform/platform-capture-video.mjs +227 -0
  469. package/resources/targets/dsh/js/js/project/runtime/lightgame/1.1.0/platform/platform-service.d.mts +31 -0
  470. package/resources/targets/dsh/js/js/project/runtime/lightgame/1.1.0/platform/platform-service.mjs +272 -0
  471. package/resources/targets/dsh/js/js/project/runtime/lightgame/1.1.0/platform/platform.d.mts +79 -0
  472. package/resources/targets/dsh/js/js/project/runtime/lightgame/1.1.0/platform/platform.mjs +29 -0
  473. package/resources/targets/dsh/js/js/project/runtime/lightgame/1.1.0/release.json +22 -0
  474. package/resources/targets/dsh/js/js/project/runtime/lightgame/1.1.0/tooling/cli.mjs +16 -0
  475. package/resources/targets/dsh/js/js/project/runtime/lightgame/1.1.0/tooling/project.d.mts +4 -0
  476. package/resources/targets/dsh/js/js/project/runtime/lightgame/1.1.0/tooling/project.mjs +50 -0
  477. package/resources/targets/dsh/js/js/project/runtime/lightgame/1.1.0/tooling/vite.d.mts +3 -0
  478. package/resources/targets/dsh/js/js/project/runtime/lightgame/1.1.0/tooling/vite.mjs +72 -0
  479. package/resources/targets/dsh/js/js/project/runtime/lightgame/1.1.0/tools/assets.d.mts +24 -0
  480. package/resources/targets/dsh/js/js/project/runtime/lightgame/1.1.0/tools/assets.mjs +2 -0
  481. package/resources/targets/dsh/js/js/project/runtime/lightgame/1.1.0/tools/astc.d.mts +10 -0
  482. package/resources/targets/dsh/js/js/project/runtime/lightgame/1.1.0/tools/astc.mjs +1 -0
  483. package/resources/targets/dsh/js/js/project/scripts/config-export/assert-asset-wiring.mjs +72 -0
  484. package/resources/targets/dsh/js/js/project/scripts/config-export/panel-resource-path.mjs +106 -0
  485. package/resources/targets/dsh/js/js/project/scripts/config-export/sync-asset-controls.mjs +316 -0
  486. package/resources/targets/dsh/js/js/project/scripts/config-export.mjs +13 -0
  487. package/resources/targets/dsh/js/js/project/scripts/skill-modules/export-config/cli.mjs +20 -0
  488. package/resources/targets/dsh/js/js/project/scripts/skill-modules/export-config/config.d.mts +19 -0
  489. package/resources/targets/dsh/js/js/project/scripts/skill-modules/export-config/config.mjs +1 -0
  490. package/resources/targets/dsh/js/js/project/scripts/skill-modules/export-config/installed.json +6 -0
  491. package/resources/targets/dsh/js/js/project/scripts/skill-modules/export-config/project.d.mts +6 -0
  492. package/resources/targets/dsh/js/js/project/scripts/skill-modules/export-config/project.mjs +77 -0
  493. package/resources/targets/dsh/js/js/project/scripts/skill-modules/export-config/vite.d.mts +2 -0
  494. package/resources/targets/dsh/js/js/project/scripts/skill-modules/export-config/vite.mjs +34 -0
  495. package/resources/targets/dsh/js/js/project/scripts/write-preview-ready.mjs +22 -0
  496. package/resources/targets/dsh/js/js/project/src/display/ui-stage.ts +156 -0
  497. package/resources/targets/dsh/js/js/project/src/display/viewport.ts +249 -0
  498. package/resources/targets/dsh/js/js/project/src/main.ts +87 -0
  499. package/resources/targets/dsh/js/js/project/src/platform.ts +2 -0
  500. package/resources/targets/dsh/js/js/project/src/scenes/LoadScene.ts +89 -0
  501. package/resources/targets/dsh/js/js/project/src/scenes/PlayScene.ts +17 -0
  502. package/resources/targets/dsh/js/js/project/src/screenUi.ts +185 -0
  503. package/resources/targets/dsh/js/js/project/src/style.css +294 -0
  504. package/resources/targets/dsh/js/js/project/tsconfig.json +20 -0
  505. package/resources/targets/dsh/js/js/project/unified_data_control_config.json +20 -0
  506. package/resources/targets/dsh/js/js/project/vite.config.ts +5 -0
  507. package/resources/targets/dsh/js/recovery.md +13 -0
  508. package/resources/targets/dsh/js/target.json +61 -0
  509. package/resources/targets/dsh/js3d/bootstrap/SKILL.md +18 -0
  510. package/resources/targets/dsh/js3d/context-filter-report.json +27 -0
  511. package/resources/targets/dsh/js3d/craft-game-maker/SKILL.md +76 -0
  512. package/resources/targets/dsh/js3d/craft-game-maker/js3d.md +12 -0
  513. package/resources/targets/dsh/js3d/js3d/bundle.json +108 -0
  514. package/resources/targets/dsh/js3d/js3d/context/AGENTS.md +30 -0
  515. package/resources/targets/dsh/js3d/js3d/context/hooks/hooks.json +14 -0
  516. package/resources/targets/dsh/js3d/js3d/context/knowledge/AssetUrl.md +9 -0
  517. package/resources/targets/dsh/js3d/js3d/context/knowledge/AssetWiring.md +7 -0
  518. package/resources/targets/dsh/js3d/js3d/context/knowledge/CodingGuide/Pitfalls.md +11 -0
  519. package/resources/targets/dsh/js3d/js3d/context/knowledge/Layout.md +7 -0
  520. package/resources/targets/dsh/js3d/js3d/context/knowledge/ResourceLoading.md +11 -0
  521. package/resources/targets/dsh/js3d/js3d/context/knowledge/Runtime.md +9 -0
  522. package/resources/targets/dsh/js3d/js3d/context/skills/asset-usage-audit/SKILL.md +16 -0
  523. package/resources/targets/dsh/js3d/js3d/context/skills/asset-usage-audit/scripts/compare-animations.mjs +48 -0
  524. package/resources/targets/dsh/js3d/js3d/context/skills/asset-usage-audit/scripts/lib/anim.mjs +266 -0
  525. package/resources/targets/dsh/js3d/js3d/context/skills/asset-usage-audit/scripts/lib/glb.mjs +241 -0
  526. package/resources/targets/dsh/js3d/js3d/context/skills/asset-usage-audit/scripts/lib/scan.mjs +455 -0
  527. package/resources/targets/dsh/js3d/js3d/context/skills/asset-usage-audit/scripts/scan-assets.mjs +77 -0
  528. package/resources/targets/dsh/js3d/js3d/context/skills/export-config/SKILL.md +16 -0
  529. package/resources/targets/dsh/js3d/js3d/context/skills/export-config/assets/tooling/cli.mjs +20 -0
  530. package/resources/targets/dsh/js3d/js3d/context/skills/export-config/assets/tooling/config.d.mts +19 -0
  531. package/resources/targets/dsh/js3d/js3d/context/skills/export-config/assets/tooling/config.mjs +1 -0
  532. package/resources/targets/dsh/js3d/js3d/context/skills/export-config/assets/tooling/project.d.mts +6 -0
  533. package/resources/targets/dsh/js3d/js3d/context/skills/export-config/assets/tooling/project.mjs +77 -0
  534. package/resources/targets/dsh/js3d/js3d/context/skills/export-config/assets/tooling/vite.d.mts +2 -0
  535. package/resources/targets/dsh/js3d/js3d/context/skills/export-config/assets/tooling/vite.mjs +34 -0
  536. package/resources/targets/dsh/js3d/js3d/context/skills/export-config/scripts/export-config.mjs +4 -0
  537. package/resources/targets/dsh/js3d/js3d/context/skills/export-config/scripts/install.mjs +89 -0
  538. package/resources/targets/dsh/js3d/js3d/context/skills/export-config/scripts/panel-resource-path.mjs +106 -0
  539. package/resources/targets/dsh/js3d/js3d/context/skills/index.json +31 -0
  540. package/resources/targets/dsh/js3d/js3d/context/skills/performance-audit/SKILL.md +21 -0
  541. package/resources/targets/dsh/js3d/js3d/context/skills/performance-audit/scripts/lib/rules.mjs +470 -0
  542. package/resources/targets/dsh/js3d/js3d/context/skills/performance-audit/scripts/lib/scan.mjs +387 -0
  543. package/resources/targets/dsh/js3d/js3d/context/skills/performance-audit/scripts/lib/source.mjs +398 -0
  544. package/resources/targets/dsh/js3d/js3d/context/skills/performance-audit/scripts/scan-perf.mjs +130 -0
  545. package/resources/targets/dsh/js3d/js3d/context/skills/visual-qa/SKILL.md +14 -0
  546. package/resources/targets/dsh/js3d/js3d/project/README.md +7 -0
  547. package/resources/targets/dsh/js3d/js3d/project/configs/game.controls.json +3 -0
  548. package/resources/targets/dsh/js3d/js3d/project/configs/game.json +3 -0
  549. package/resources/targets/dsh/js3d/js3d/project/game-runtime.json +7 -0
  550. package/resources/targets/dsh/js3d/js3d/project/game.config.json +7 -0
  551. package/resources/targets/dsh/js3d/js3d/project/index.html +12 -0
  552. package/resources/targets/dsh/js3d/js3d/project/package.json +23 -0
  553. package/resources/targets/dsh/js3d/js3d/project/runtime/lightgame/1.1.0/platform/identity/qq-ai-game-sdk.min.js +5 -0
  554. package/resources/targets/dsh/js3d/js3d/project/runtime/lightgame/1.1.0/platform/identity/qq-session.mjs +208 -0
  555. package/resources/targets/dsh/js3d/js3d/project/runtime/lightgame/1.1.0/platform/identity/shared.mjs +37 -0
  556. package/resources/targets/dsh/js3d/js3d/project/runtime/lightgame/1.1.0/platform/platform-capture-video.mjs +227 -0
  557. package/resources/targets/dsh/js3d/js3d/project/runtime/lightgame/1.1.0/platform/platform-service.d.mts +31 -0
  558. package/resources/targets/dsh/js3d/js3d/project/runtime/lightgame/1.1.0/platform/platform-service.mjs +272 -0
  559. package/resources/targets/dsh/js3d/js3d/project/runtime/lightgame/1.1.0/platform/platform.d.mts +79 -0
  560. package/resources/targets/dsh/js3d/js3d/project/runtime/lightgame/1.1.0/platform/platform.mjs +30 -0
  561. package/resources/targets/dsh/js3d/js3d/project/runtime/lightgame/1.1.0/release.json +24 -0
  562. package/resources/targets/dsh/js3d/js3d/project/runtime/lightgame/1.1.0/tooling/cli.mjs +16 -0
  563. package/resources/targets/dsh/js3d/js3d/project/runtime/lightgame/1.1.0/tooling/project.d.mts +4 -0
  564. package/resources/targets/dsh/js3d/js3d/project/runtime/lightgame/1.1.0/tooling/project.mjs +50 -0
  565. package/resources/targets/dsh/js3d/js3d/project/runtime/lightgame/1.1.0/tooling/vite.d.mts +3 -0
  566. package/resources/targets/dsh/js3d/js3d/project/runtime/lightgame/1.1.0/tooling/vite.mjs +72 -0
  567. package/resources/targets/dsh/js3d/js3d/project/runtime/lightgame/1.1.0/tools/assets.d.mts +24 -0
  568. package/resources/targets/dsh/js3d/js3d/project/runtime/lightgame/1.1.0/tools/assets.mjs +2 -0
  569. package/resources/targets/dsh/js3d/js3d/project/runtime/lightgame/1.1.0/tools/astc.d.mts +10 -0
  570. package/resources/targets/dsh/js3d/js3d/project/runtime/lightgame/1.1.0/tools/astc.mjs +1 -0
  571. package/resources/targets/dsh/js3d/js3d/project/runtime/lightgame/1.1.0/tools/glb.d.mts +26 -0
  572. package/resources/targets/dsh/js3d/js3d/project/runtime/lightgame/1.1.0/tools/glb.mjs +351 -0
  573. package/resources/targets/dsh/js3d/js3d/project/scripts/config-export/assert-asset-wiring.mjs +97 -0
  574. package/resources/targets/dsh/js3d/js3d/project/scripts/config-export/panel-resource-path.mjs +106 -0
  575. package/resources/targets/dsh/js3d/js3d/project/scripts/config-export/sync-asset-controls.mjs +327 -0
  576. package/resources/targets/dsh/js3d/js3d/project/scripts/config-export/sync-scene-assets.mjs +191 -0
  577. package/resources/targets/dsh/js3d/js3d/project/scripts/config-export.mjs +15 -0
  578. package/resources/targets/dsh/js3d/js3d/project/scripts/skill-modules/export-config/cli.mjs +20 -0
  579. package/resources/targets/dsh/js3d/js3d/project/scripts/skill-modules/export-config/config.d.mts +19 -0
  580. package/resources/targets/dsh/js3d/js3d/project/scripts/skill-modules/export-config/config.mjs +1 -0
  581. package/resources/targets/dsh/js3d/js3d/project/scripts/skill-modules/export-config/installed.json +6 -0
  582. package/resources/targets/dsh/js3d/js3d/project/scripts/skill-modules/export-config/project.d.mts +6 -0
  583. package/resources/targets/dsh/js3d/js3d/project/scripts/skill-modules/export-config/project.mjs +77 -0
  584. package/resources/targets/dsh/js3d/js3d/project/scripts/skill-modules/export-config/vite.d.mts +2 -0
  585. package/resources/targets/dsh/js3d/js3d/project/scripts/skill-modules/export-config/vite.mjs +34 -0
  586. package/resources/targets/dsh/js3d/js3d/project/scripts/write-preview-ready.mjs +22 -0
  587. package/resources/targets/dsh/js3d/js3d/project/src/display/ui-stage.ts +156 -0
  588. package/resources/targets/dsh/js3d/js3d/project/src/display/viewport.ts +239 -0
  589. package/resources/targets/dsh/js3d/js3d/project/src/main.ts +85 -0
  590. package/resources/targets/dsh/js3d/js3d/project/src/platform.ts +2 -0
  591. package/resources/targets/dsh/js3d/js3d/project/src/style.css +83 -0
  592. package/resources/targets/dsh/js3d/js3d/project/tsconfig.json +20 -0
  593. package/resources/targets/dsh/js3d/js3d/project/unified_data_control_config.json +20 -0
  594. package/resources/targets/dsh/js3d/js3d/project/vite.config.ts +5 -0
  595. package/resources/targets/dsh/js3d/recovery.md +13 -0
  596. package/resources/targets/dsh/js3d/target.json +60 -0
  597. package/resources/targets/index.json +72 -12
  598. package/resources/targets/kimi/js/bootstrap/SKILL.md +18 -0
  599. package/resources/targets/kimi/js/context-filter-report.json +27 -0
  600. package/resources/targets/kimi/js/craft-game-maker/SKILL.md +76 -0
  601. package/resources/targets/kimi/js/craft-game-maker/js.md +10 -0
  602. package/resources/targets/kimi/js/js/bundle.json +97 -0
  603. package/resources/targets/kimi/js/js/context/AGENTS.md +29 -0
  604. package/resources/targets/kimi/js/js/context/hooks/hooks.json +14 -0
  605. package/resources/targets/kimi/js/js/context/knowledge/AssetUrl.md +9 -0
  606. package/resources/targets/kimi/js/js/context/knowledge/AssetWiring.md +7 -0
  607. package/resources/targets/kimi/js/js/context/knowledge/Layout.md +7 -0
  608. package/resources/targets/kimi/js/js/context/knowledge/Lifecycle.md +11 -0
  609. package/resources/targets/kimi/js/js/context/knowledge/ResourceLoading.md +9 -0
  610. package/resources/targets/kimi/js/js/context/skills/export-config/SKILL.md +16 -0
  611. package/resources/targets/kimi/js/js/context/skills/export-config/assets/tooling/cli.mjs +20 -0
  612. package/resources/targets/kimi/js/js/context/skills/export-config/assets/tooling/config.d.mts +19 -0
  613. package/resources/targets/kimi/js/js/context/skills/export-config/assets/tooling/config.mjs +1 -0
  614. package/resources/targets/kimi/js/js/context/skills/export-config/assets/tooling/project.d.mts +6 -0
  615. package/resources/targets/kimi/js/js/context/skills/export-config/assets/tooling/project.mjs +77 -0
  616. package/resources/targets/kimi/js/js/context/skills/export-config/assets/tooling/vite.d.mts +2 -0
  617. package/resources/targets/kimi/js/js/context/skills/export-config/assets/tooling/vite.mjs +34 -0
  618. package/resources/targets/kimi/js/js/context/skills/export-config/scripts/export-config.mjs +4 -0
  619. package/resources/targets/kimi/js/js/context/skills/export-config/scripts/install.mjs +89 -0
  620. package/resources/targets/kimi/js/js/context/skills/export-config/scripts/panel-resource-path.mjs +106 -0
  621. package/resources/targets/kimi/js/js/context/skills/index.json +19 -0
  622. package/resources/targets/kimi/js/js/context/skills/visual-qa/SKILL.md +14 -0
  623. package/resources/targets/kimi/js/js/project/README.md +7 -0
  624. package/resources/targets/kimi/js/js/project/configs/assets.json +1 -0
  625. package/resources/targets/kimi/js/js/project/configs/game.controls.json +3 -0
  626. package/resources/targets/kimi/js/js/project/configs/game.json +3 -0
  627. package/resources/targets/kimi/js/js/project/game-runtime.json +7 -0
  628. package/resources/targets/kimi/js/js/project/game.config.json +7 -0
  629. package/resources/targets/kimi/js/js/project/index.html +20 -0
  630. package/resources/targets/kimi/js/js/project/package.json +22 -0
  631. package/resources/targets/kimi/js/js/project/runtime/lightgame/1.1.0/platform/identity/qq-ai-game-sdk.min.js +5 -0
  632. package/resources/targets/kimi/js/js/project/runtime/lightgame/1.1.0/platform/identity/qq-session.mjs +208 -0
  633. package/resources/targets/kimi/js/js/project/runtime/lightgame/1.1.0/platform/identity/shared.mjs +37 -0
  634. package/resources/targets/kimi/js/js/project/runtime/lightgame/1.1.0/platform/platform-capture-video.mjs +227 -0
  635. package/resources/targets/kimi/js/js/project/runtime/lightgame/1.1.0/platform/platform-service.d.mts +31 -0
  636. package/resources/targets/kimi/js/js/project/runtime/lightgame/1.1.0/platform/platform-service.mjs +272 -0
  637. package/resources/targets/kimi/js/js/project/runtime/lightgame/1.1.0/platform/platform.d.mts +79 -0
  638. package/resources/targets/kimi/js/js/project/runtime/lightgame/1.1.0/platform/platform.mjs +29 -0
  639. package/resources/targets/kimi/js/js/project/runtime/lightgame/1.1.0/release.json +22 -0
  640. package/resources/targets/kimi/js/js/project/runtime/lightgame/1.1.0/tooling/cli.mjs +16 -0
  641. package/resources/targets/kimi/js/js/project/runtime/lightgame/1.1.0/tooling/project.d.mts +4 -0
  642. package/resources/targets/kimi/js/js/project/runtime/lightgame/1.1.0/tooling/project.mjs +50 -0
  643. package/resources/targets/kimi/js/js/project/runtime/lightgame/1.1.0/tooling/vite.d.mts +3 -0
  644. package/resources/targets/kimi/js/js/project/runtime/lightgame/1.1.0/tooling/vite.mjs +72 -0
  645. package/resources/targets/kimi/js/js/project/runtime/lightgame/1.1.0/tools/assets.d.mts +24 -0
  646. package/resources/targets/kimi/js/js/project/runtime/lightgame/1.1.0/tools/assets.mjs +2 -0
  647. package/resources/targets/kimi/js/js/project/runtime/lightgame/1.1.0/tools/astc.d.mts +10 -0
  648. package/resources/targets/kimi/js/js/project/runtime/lightgame/1.1.0/tools/astc.mjs +1 -0
  649. package/resources/targets/kimi/js/js/project/scripts/config-export/assert-asset-wiring.mjs +72 -0
  650. package/resources/targets/kimi/js/js/project/scripts/config-export/panel-resource-path.mjs +106 -0
  651. package/resources/targets/kimi/js/js/project/scripts/config-export/sync-asset-controls.mjs +316 -0
  652. package/resources/targets/kimi/js/js/project/scripts/config-export.mjs +13 -0
  653. package/resources/targets/kimi/js/js/project/scripts/skill-modules/export-config/cli.mjs +20 -0
  654. package/resources/targets/kimi/js/js/project/scripts/skill-modules/export-config/config.d.mts +19 -0
  655. package/resources/targets/kimi/js/js/project/scripts/skill-modules/export-config/config.mjs +1 -0
  656. package/resources/targets/kimi/js/js/project/scripts/skill-modules/export-config/installed.json +6 -0
  657. package/resources/targets/kimi/js/js/project/scripts/skill-modules/export-config/project.d.mts +6 -0
  658. package/resources/targets/kimi/js/js/project/scripts/skill-modules/export-config/project.mjs +77 -0
  659. package/resources/targets/kimi/js/js/project/scripts/skill-modules/export-config/vite.d.mts +2 -0
  660. package/resources/targets/kimi/js/js/project/scripts/skill-modules/export-config/vite.mjs +34 -0
  661. package/resources/targets/kimi/js/js/project/scripts/write-preview-ready.mjs +22 -0
  662. package/resources/targets/kimi/js/js/project/src/display/ui-stage.ts +156 -0
  663. package/resources/targets/kimi/js/js/project/src/display/viewport.ts +249 -0
  664. package/resources/targets/kimi/js/js/project/src/main.ts +87 -0
  665. package/resources/targets/kimi/js/js/project/src/platform.ts +2 -0
  666. package/resources/targets/kimi/js/js/project/src/scenes/LoadScene.ts +89 -0
  667. package/resources/targets/kimi/js/js/project/src/scenes/PlayScene.ts +17 -0
  668. package/resources/targets/kimi/js/js/project/src/screenUi.ts +185 -0
  669. package/resources/targets/kimi/js/js/project/src/style.css +294 -0
  670. package/resources/targets/kimi/js/js/project/tsconfig.json +20 -0
  671. package/resources/targets/kimi/js/js/project/unified_data_control_config.json +20 -0
  672. package/resources/targets/kimi/js/js/project/vite.config.ts +5 -0
  673. package/resources/targets/kimi/js/recovery.md +13 -0
  674. package/resources/targets/kimi/js/target.json +61 -0
  675. package/resources/targets/kimi/js3d/bootstrap/SKILL.md +18 -0
  676. package/resources/targets/kimi/js3d/context-filter-report.json +27 -0
  677. package/resources/targets/kimi/js3d/craft-game-maker/SKILL.md +76 -0
  678. package/resources/targets/kimi/js3d/craft-game-maker/js3d.md +12 -0
  679. package/resources/targets/kimi/js3d/js3d/bundle.json +108 -0
  680. package/resources/targets/kimi/js3d/js3d/context/AGENTS.md +30 -0
  681. package/resources/targets/kimi/js3d/js3d/context/hooks/hooks.json +14 -0
  682. package/resources/targets/kimi/js3d/js3d/context/knowledge/AssetUrl.md +9 -0
  683. package/resources/targets/kimi/js3d/js3d/context/knowledge/AssetWiring.md +7 -0
  684. package/resources/targets/kimi/js3d/js3d/context/knowledge/CodingGuide/Pitfalls.md +11 -0
  685. package/resources/targets/kimi/js3d/js3d/context/knowledge/Layout.md +7 -0
  686. package/resources/targets/kimi/js3d/js3d/context/knowledge/ResourceLoading.md +11 -0
  687. package/resources/targets/kimi/js3d/js3d/context/knowledge/Runtime.md +9 -0
  688. package/resources/targets/kimi/js3d/js3d/context/skills/asset-usage-audit/SKILL.md +16 -0
  689. package/resources/targets/kimi/js3d/js3d/context/skills/asset-usage-audit/scripts/compare-animations.mjs +48 -0
  690. package/resources/targets/kimi/js3d/js3d/context/skills/asset-usage-audit/scripts/lib/anim.mjs +266 -0
  691. package/resources/targets/kimi/js3d/js3d/context/skills/asset-usage-audit/scripts/lib/glb.mjs +241 -0
  692. package/resources/targets/kimi/js3d/js3d/context/skills/asset-usage-audit/scripts/lib/scan.mjs +455 -0
  693. package/resources/targets/kimi/js3d/js3d/context/skills/asset-usage-audit/scripts/scan-assets.mjs +77 -0
  694. package/resources/targets/kimi/js3d/js3d/context/skills/export-config/SKILL.md +16 -0
  695. package/resources/targets/kimi/js3d/js3d/context/skills/export-config/assets/tooling/cli.mjs +20 -0
  696. package/resources/targets/kimi/js3d/js3d/context/skills/export-config/assets/tooling/config.d.mts +19 -0
  697. package/resources/targets/kimi/js3d/js3d/context/skills/export-config/assets/tooling/config.mjs +1 -0
  698. package/resources/targets/kimi/js3d/js3d/context/skills/export-config/assets/tooling/project.d.mts +6 -0
  699. package/resources/targets/kimi/js3d/js3d/context/skills/export-config/assets/tooling/project.mjs +77 -0
  700. package/resources/targets/kimi/js3d/js3d/context/skills/export-config/assets/tooling/vite.d.mts +2 -0
  701. package/resources/targets/kimi/js3d/js3d/context/skills/export-config/assets/tooling/vite.mjs +34 -0
  702. package/resources/targets/kimi/js3d/js3d/context/skills/export-config/scripts/export-config.mjs +4 -0
  703. package/resources/targets/kimi/js3d/js3d/context/skills/export-config/scripts/install.mjs +89 -0
  704. package/resources/targets/kimi/js3d/js3d/context/skills/export-config/scripts/panel-resource-path.mjs +106 -0
  705. package/resources/targets/kimi/js3d/js3d/context/skills/index.json +31 -0
  706. package/resources/targets/kimi/js3d/js3d/context/skills/performance-audit/SKILL.md +21 -0
  707. package/resources/targets/kimi/js3d/js3d/context/skills/performance-audit/scripts/lib/rules.mjs +470 -0
  708. package/resources/targets/kimi/js3d/js3d/context/skills/performance-audit/scripts/lib/scan.mjs +387 -0
  709. package/resources/targets/kimi/js3d/js3d/context/skills/performance-audit/scripts/lib/source.mjs +398 -0
  710. package/resources/targets/kimi/js3d/js3d/context/skills/performance-audit/scripts/scan-perf.mjs +130 -0
  711. package/resources/targets/kimi/js3d/js3d/context/skills/visual-qa/SKILL.md +14 -0
  712. package/resources/targets/kimi/js3d/js3d/project/README.md +7 -0
  713. package/resources/targets/kimi/js3d/js3d/project/configs/game.controls.json +3 -0
  714. package/resources/targets/kimi/js3d/js3d/project/configs/game.json +3 -0
  715. package/resources/targets/kimi/js3d/js3d/project/game-runtime.json +7 -0
  716. package/resources/targets/kimi/js3d/js3d/project/game.config.json +7 -0
  717. package/resources/targets/kimi/js3d/js3d/project/index.html +12 -0
  718. package/resources/targets/kimi/js3d/js3d/project/package.json +23 -0
  719. package/resources/targets/kimi/js3d/js3d/project/runtime/lightgame/1.1.0/platform/identity/qq-ai-game-sdk.min.js +5 -0
  720. package/resources/targets/kimi/js3d/js3d/project/runtime/lightgame/1.1.0/platform/identity/qq-session.mjs +208 -0
  721. package/resources/targets/kimi/js3d/js3d/project/runtime/lightgame/1.1.0/platform/identity/shared.mjs +37 -0
  722. package/resources/targets/kimi/js3d/js3d/project/runtime/lightgame/1.1.0/platform/platform-capture-video.mjs +227 -0
  723. package/resources/targets/kimi/js3d/js3d/project/runtime/lightgame/1.1.0/platform/platform-service.d.mts +31 -0
  724. package/resources/targets/kimi/js3d/js3d/project/runtime/lightgame/1.1.0/platform/platform-service.mjs +272 -0
  725. package/resources/targets/kimi/js3d/js3d/project/runtime/lightgame/1.1.0/platform/platform.d.mts +79 -0
  726. package/resources/targets/kimi/js3d/js3d/project/runtime/lightgame/1.1.0/platform/platform.mjs +30 -0
  727. package/resources/targets/kimi/js3d/js3d/project/runtime/lightgame/1.1.0/release.json +24 -0
  728. package/resources/targets/kimi/js3d/js3d/project/runtime/lightgame/1.1.0/tooling/cli.mjs +16 -0
  729. package/resources/targets/kimi/js3d/js3d/project/runtime/lightgame/1.1.0/tooling/project.d.mts +4 -0
  730. package/resources/targets/kimi/js3d/js3d/project/runtime/lightgame/1.1.0/tooling/project.mjs +50 -0
  731. package/resources/targets/kimi/js3d/js3d/project/runtime/lightgame/1.1.0/tooling/vite.d.mts +3 -0
  732. package/resources/targets/kimi/js3d/js3d/project/runtime/lightgame/1.1.0/tooling/vite.mjs +72 -0
  733. package/resources/targets/kimi/js3d/js3d/project/runtime/lightgame/1.1.0/tools/assets.d.mts +24 -0
  734. package/resources/targets/kimi/js3d/js3d/project/runtime/lightgame/1.1.0/tools/assets.mjs +2 -0
  735. package/resources/targets/kimi/js3d/js3d/project/runtime/lightgame/1.1.0/tools/astc.d.mts +10 -0
  736. package/resources/targets/kimi/js3d/js3d/project/runtime/lightgame/1.1.0/tools/astc.mjs +1 -0
  737. package/resources/targets/kimi/js3d/js3d/project/runtime/lightgame/1.1.0/tools/glb.d.mts +26 -0
  738. package/resources/targets/kimi/js3d/js3d/project/runtime/lightgame/1.1.0/tools/glb.mjs +351 -0
  739. package/resources/targets/kimi/js3d/js3d/project/scripts/config-export/assert-asset-wiring.mjs +97 -0
  740. package/resources/targets/kimi/js3d/js3d/project/scripts/config-export/panel-resource-path.mjs +106 -0
  741. package/resources/targets/kimi/js3d/js3d/project/scripts/config-export/sync-asset-controls.mjs +327 -0
  742. package/resources/targets/kimi/js3d/js3d/project/scripts/config-export/sync-scene-assets.mjs +191 -0
  743. package/resources/targets/kimi/js3d/js3d/project/scripts/config-export.mjs +15 -0
  744. package/resources/targets/kimi/js3d/js3d/project/scripts/skill-modules/export-config/cli.mjs +20 -0
  745. package/resources/targets/kimi/js3d/js3d/project/scripts/skill-modules/export-config/config.d.mts +19 -0
  746. package/resources/targets/kimi/js3d/js3d/project/scripts/skill-modules/export-config/config.mjs +1 -0
  747. package/resources/targets/kimi/js3d/js3d/project/scripts/skill-modules/export-config/installed.json +6 -0
  748. package/resources/targets/kimi/js3d/js3d/project/scripts/skill-modules/export-config/project.d.mts +6 -0
  749. package/resources/targets/kimi/js3d/js3d/project/scripts/skill-modules/export-config/project.mjs +77 -0
  750. package/resources/targets/kimi/js3d/js3d/project/scripts/skill-modules/export-config/vite.d.mts +2 -0
  751. package/resources/targets/kimi/js3d/js3d/project/scripts/skill-modules/export-config/vite.mjs +34 -0
  752. package/resources/targets/kimi/js3d/js3d/project/scripts/write-preview-ready.mjs +22 -0
  753. package/resources/targets/kimi/js3d/js3d/project/src/display/ui-stage.ts +156 -0
  754. package/resources/targets/kimi/js3d/js3d/project/src/display/viewport.ts +239 -0
  755. package/resources/targets/kimi/js3d/js3d/project/src/main.ts +85 -0
  756. package/resources/targets/kimi/js3d/js3d/project/src/platform.ts +2 -0
  757. package/resources/targets/kimi/js3d/js3d/project/src/style.css +83 -0
  758. package/resources/targets/kimi/js3d/js3d/project/tsconfig.json +20 -0
  759. package/resources/targets/kimi/js3d/js3d/project/unified_data_control_config.json +20 -0
  760. package/resources/targets/kimi/js3d/js3d/project/vite.config.ts +5 -0
  761. package/resources/targets/kimi/js3d/recovery.md +13 -0
  762. package/resources/targets/kimi/js3d/target.json +60 -0
  763. package/resources/targets/workbuddy/js/bootstrap/SKILL.md +24 -14
  764. package/resources/targets/workbuddy/js/context-filter-report.json +27 -0
  765. package/resources/targets/workbuddy/js/craft-game-maker/SKILL.md +18 -19
  766. package/resources/targets/workbuddy/js/craft-game-maker/js.md +2 -2
  767. package/resources/targets/workbuddy/js/js/bundle.json +16 -18
  768. package/resources/targets/workbuddy/js/js/context/AGENTS.md +29 -25
  769. package/resources/targets/workbuddy/js/js/context/knowledge/AssetUrl.md +4 -4
  770. package/resources/targets/workbuddy/js/js/context/knowledge/AssetWiring.md +7 -0
  771. package/resources/targets/workbuddy/js/js/context/knowledge/ResourceLoading.md +9 -0
  772. package/resources/targets/workbuddy/js/js/context/skills/export-config/SKILL.md +2 -2
  773. package/resources/targets/workbuddy/js/js/context/skills/index.json +2 -14
  774. package/resources/targets/workbuddy/js/js/context/skills/visual-qa/SKILL.md +1 -1
  775. package/resources/targets/workbuddy/js/recovery.md +19 -7
  776. package/resources/targets/workbuddy/js/target.json +1 -1
  777. package/resources/targets/workbuddy/js3d/bootstrap/SKILL.md +24 -14
  778. package/resources/targets/workbuddy/js3d/context-filter-report.json +27 -0
  779. package/resources/targets/workbuddy/js3d/craft-game-maker/SKILL.md +18 -19
  780. package/resources/targets/workbuddy/js3d/craft-game-maker/js3d.md +3 -4
  781. package/resources/targets/workbuddy/js3d/js3d/bundle.json +19 -21
  782. package/resources/targets/workbuddy/js3d/js3d/context/AGENTS.md +30 -26
  783. package/resources/targets/workbuddy/js3d/js3d/context/knowledge/AssetUrl.md +4 -4
  784. package/resources/targets/workbuddy/js3d/js3d/context/knowledge/AssetWiring.md +7 -0
  785. package/resources/targets/workbuddy/js3d/js3d/context/knowledge/ResourceLoading.md +11 -0
  786. package/resources/targets/workbuddy/js3d/js3d/context/skills/asset-usage-audit/SKILL.md +1 -1
  787. package/resources/targets/workbuddy/js3d/js3d/context/skills/asset-usage-audit/scripts/lib/scan.mjs +2 -2
  788. package/resources/targets/workbuddy/js3d/js3d/context/skills/export-config/SKILL.md +2 -2
  789. package/resources/targets/workbuddy/js3d/js3d/context/skills/index.json +4 -16
  790. package/resources/targets/workbuddy/js3d/js3d/context/skills/performance-audit/SKILL.md +1 -1
  791. package/resources/targets/workbuddy/js3d/js3d/context/skills/visual-qa/SKILL.md +1 -1
  792. package/resources/targets/workbuddy/js3d/recovery.md +19 -7
  793. package/resources/targets/workbuddy/js3d/target.json +1 -1
  794. package/resources/targets/zcode/js/bootstrap/SKILL.md +18 -0
  795. package/resources/targets/zcode/js/context-filter-report.json +27 -0
  796. package/resources/targets/zcode/js/craft-game-maker/SKILL.md +76 -0
  797. package/resources/targets/zcode/js/craft-game-maker/js.md +10 -0
  798. package/resources/targets/zcode/js/js/bundle.json +97 -0
  799. package/resources/targets/zcode/js/js/context/AGENTS.md +29 -0
  800. package/resources/targets/zcode/js/js/context/hooks/hooks.json +14 -0
  801. package/resources/targets/zcode/js/js/context/knowledge/AssetUrl.md +9 -0
  802. package/resources/targets/zcode/js/js/context/knowledge/AssetWiring.md +7 -0
  803. package/resources/targets/zcode/js/js/context/knowledge/Layout.md +7 -0
  804. package/resources/targets/zcode/js/js/context/knowledge/Lifecycle.md +11 -0
  805. package/resources/targets/zcode/js/js/context/knowledge/ResourceLoading.md +9 -0
  806. package/resources/targets/zcode/js/js/context/skills/export-config/SKILL.md +16 -0
  807. package/resources/targets/zcode/js/js/context/skills/export-config/assets/tooling/cli.mjs +20 -0
  808. package/resources/targets/zcode/js/js/context/skills/export-config/assets/tooling/config.d.mts +19 -0
  809. package/resources/targets/zcode/js/js/context/skills/export-config/assets/tooling/config.mjs +1 -0
  810. package/resources/targets/zcode/js/js/context/skills/export-config/assets/tooling/project.d.mts +6 -0
  811. package/resources/targets/zcode/js/js/context/skills/export-config/assets/tooling/project.mjs +77 -0
  812. package/resources/targets/zcode/js/js/context/skills/export-config/assets/tooling/vite.d.mts +2 -0
  813. package/resources/targets/zcode/js/js/context/skills/export-config/assets/tooling/vite.mjs +34 -0
  814. package/resources/targets/zcode/js/js/context/skills/export-config/scripts/export-config.mjs +4 -0
  815. package/resources/targets/zcode/js/js/context/skills/export-config/scripts/install.mjs +89 -0
  816. package/resources/targets/zcode/js/js/context/skills/export-config/scripts/panel-resource-path.mjs +106 -0
  817. package/resources/targets/zcode/js/js/context/skills/index.json +19 -0
  818. package/resources/targets/zcode/js/js/context/skills/visual-qa/SKILL.md +14 -0
  819. package/resources/targets/zcode/js/js/project/README.md +7 -0
  820. package/resources/targets/zcode/js/js/project/configs/assets.json +1 -0
  821. package/resources/targets/zcode/js/js/project/configs/game.controls.json +3 -0
  822. package/resources/targets/zcode/js/js/project/configs/game.json +3 -0
  823. package/resources/targets/zcode/js/js/project/game-runtime.json +7 -0
  824. package/resources/targets/zcode/js/js/project/game.config.json +7 -0
  825. package/resources/targets/zcode/js/js/project/index.html +20 -0
  826. package/resources/targets/zcode/js/js/project/package.json +22 -0
  827. package/resources/targets/zcode/js/js/project/runtime/lightgame/1.1.0/platform/identity/qq-ai-game-sdk.min.js +5 -0
  828. package/resources/targets/zcode/js/js/project/runtime/lightgame/1.1.0/platform/identity/qq-session.mjs +208 -0
  829. package/resources/targets/zcode/js/js/project/runtime/lightgame/1.1.0/platform/identity/shared.mjs +37 -0
  830. package/resources/targets/zcode/js/js/project/runtime/lightgame/1.1.0/platform/platform-capture-video.mjs +227 -0
  831. package/resources/targets/zcode/js/js/project/runtime/lightgame/1.1.0/platform/platform-service.d.mts +31 -0
  832. package/resources/targets/zcode/js/js/project/runtime/lightgame/1.1.0/platform/platform-service.mjs +272 -0
  833. package/resources/targets/zcode/js/js/project/runtime/lightgame/1.1.0/platform/platform.d.mts +79 -0
  834. package/resources/targets/zcode/js/js/project/runtime/lightgame/1.1.0/platform/platform.mjs +29 -0
  835. package/resources/targets/zcode/js/js/project/runtime/lightgame/1.1.0/release.json +22 -0
  836. package/resources/targets/zcode/js/js/project/runtime/lightgame/1.1.0/tooling/cli.mjs +16 -0
  837. package/resources/targets/zcode/js/js/project/runtime/lightgame/1.1.0/tooling/project.d.mts +4 -0
  838. package/resources/targets/zcode/js/js/project/runtime/lightgame/1.1.0/tooling/project.mjs +50 -0
  839. package/resources/targets/zcode/js/js/project/runtime/lightgame/1.1.0/tooling/vite.d.mts +3 -0
  840. package/resources/targets/zcode/js/js/project/runtime/lightgame/1.1.0/tooling/vite.mjs +72 -0
  841. package/resources/targets/zcode/js/js/project/runtime/lightgame/1.1.0/tools/assets.d.mts +24 -0
  842. package/resources/targets/zcode/js/js/project/runtime/lightgame/1.1.0/tools/assets.mjs +2 -0
  843. package/resources/targets/zcode/js/js/project/runtime/lightgame/1.1.0/tools/astc.d.mts +10 -0
  844. package/resources/targets/zcode/js/js/project/runtime/lightgame/1.1.0/tools/astc.mjs +1 -0
  845. package/resources/targets/zcode/js/js/project/scripts/config-export/assert-asset-wiring.mjs +72 -0
  846. package/resources/targets/zcode/js/js/project/scripts/config-export/panel-resource-path.mjs +106 -0
  847. package/resources/targets/zcode/js/js/project/scripts/config-export/sync-asset-controls.mjs +316 -0
  848. package/resources/targets/zcode/js/js/project/scripts/config-export.mjs +13 -0
  849. package/resources/targets/zcode/js/js/project/scripts/skill-modules/export-config/cli.mjs +20 -0
  850. package/resources/targets/zcode/js/js/project/scripts/skill-modules/export-config/config.d.mts +19 -0
  851. package/resources/targets/zcode/js/js/project/scripts/skill-modules/export-config/config.mjs +1 -0
  852. package/resources/targets/zcode/js/js/project/scripts/skill-modules/export-config/installed.json +6 -0
  853. package/resources/targets/zcode/js/js/project/scripts/skill-modules/export-config/project.d.mts +6 -0
  854. package/resources/targets/zcode/js/js/project/scripts/skill-modules/export-config/project.mjs +77 -0
  855. package/resources/targets/zcode/js/js/project/scripts/skill-modules/export-config/vite.d.mts +2 -0
  856. package/resources/targets/zcode/js/js/project/scripts/skill-modules/export-config/vite.mjs +34 -0
  857. package/resources/targets/zcode/js/js/project/scripts/write-preview-ready.mjs +22 -0
  858. package/resources/targets/zcode/js/js/project/src/display/ui-stage.ts +156 -0
  859. package/resources/targets/zcode/js/js/project/src/display/viewport.ts +249 -0
  860. package/resources/targets/zcode/js/js/project/src/main.ts +87 -0
  861. package/resources/targets/zcode/js/js/project/src/platform.ts +2 -0
  862. package/resources/targets/zcode/js/js/project/src/scenes/LoadScene.ts +89 -0
  863. package/resources/targets/zcode/js/js/project/src/scenes/PlayScene.ts +17 -0
  864. package/resources/targets/zcode/js/js/project/src/screenUi.ts +185 -0
  865. package/resources/targets/zcode/js/js/project/src/style.css +294 -0
  866. package/resources/targets/zcode/js/js/project/tsconfig.json +20 -0
  867. package/resources/targets/zcode/js/js/project/unified_data_control_config.json +20 -0
  868. package/resources/targets/zcode/js/js/project/vite.config.ts +5 -0
  869. package/resources/targets/zcode/js/recovery.md +13 -0
  870. package/resources/targets/zcode/js/target.json +61 -0
  871. package/resources/targets/zcode/js3d/bootstrap/SKILL.md +18 -0
  872. package/resources/targets/zcode/js3d/context-filter-report.json +27 -0
  873. package/resources/targets/zcode/js3d/craft-game-maker/SKILL.md +76 -0
  874. package/resources/targets/zcode/js3d/craft-game-maker/js3d.md +12 -0
  875. package/resources/targets/zcode/js3d/js3d/bundle.json +108 -0
  876. package/resources/targets/zcode/js3d/js3d/context/AGENTS.md +30 -0
  877. package/resources/targets/zcode/js3d/js3d/context/hooks/hooks.json +14 -0
  878. package/resources/targets/zcode/js3d/js3d/context/knowledge/AssetUrl.md +9 -0
  879. package/resources/targets/zcode/js3d/js3d/context/knowledge/AssetWiring.md +7 -0
  880. package/resources/targets/zcode/js3d/js3d/context/knowledge/CodingGuide/Pitfalls.md +11 -0
  881. package/resources/targets/zcode/js3d/js3d/context/knowledge/Layout.md +7 -0
  882. package/resources/targets/zcode/js3d/js3d/context/knowledge/ResourceLoading.md +11 -0
  883. package/resources/targets/zcode/js3d/js3d/context/knowledge/Runtime.md +9 -0
  884. package/resources/targets/zcode/js3d/js3d/context/skills/asset-usage-audit/SKILL.md +16 -0
  885. package/resources/targets/zcode/js3d/js3d/context/skills/asset-usage-audit/scripts/compare-animations.mjs +48 -0
  886. package/resources/targets/zcode/js3d/js3d/context/skills/asset-usage-audit/scripts/lib/anim.mjs +266 -0
  887. package/resources/targets/zcode/js3d/js3d/context/skills/asset-usage-audit/scripts/lib/glb.mjs +241 -0
  888. package/resources/targets/zcode/js3d/js3d/context/skills/asset-usage-audit/scripts/lib/scan.mjs +455 -0
  889. package/resources/targets/zcode/js3d/js3d/context/skills/asset-usage-audit/scripts/scan-assets.mjs +77 -0
  890. package/resources/targets/zcode/js3d/js3d/context/skills/export-config/SKILL.md +16 -0
  891. package/resources/targets/zcode/js3d/js3d/context/skills/export-config/assets/tooling/cli.mjs +20 -0
  892. package/resources/targets/zcode/js3d/js3d/context/skills/export-config/assets/tooling/config.d.mts +19 -0
  893. package/resources/targets/zcode/js3d/js3d/context/skills/export-config/assets/tooling/config.mjs +1 -0
  894. package/resources/targets/zcode/js3d/js3d/context/skills/export-config/assets/tooling/project.d.mts +6 -0
  895. package/resources/targets/zcode/js3d/js3d/context/skills/export-config/assets/tooling/project.mjs +77 -0
  896. package/resources/targets/zcode/js3d/js3d/context/skills/export-config/assets/tooling/vite.d.mts +2 -0
  897. package/resources/targets/zcode/js3d/js3d/context/skills/export-config/assets/tooling/vite.mjs +34 -0
  898. package/resources/targets/zcode/js3d/js3d/context/skills/export-config/scripts/export-config.mjs +4 -0
  899. package/resources/targets/zcode/js3d/js3d/context/skills/export-config/scripts/install.mjs +89 -0
  900. package/resources/targets/zcode/js3d/js3d/context/skills/export-config/scripts/panel-resource-path.mjs +106 -0
  901. package/resources/targets/zcode/js3d/js3d/context/skills/index.json +31 -0
  902. package/resources/targets/zcode/js3d/js3d/context/skills/performance-audit/SKILL.md +21 -0
  903. package/resources/targets/zcode/js3d/js3d/context/skills/performance-audit/scripts/lib/rules.mjs +470 -0
  904. package/resources/targets/zcode/js3d/js3d/context/skills/performance-audit/scripts/lib/scan.mjs +387 -0
  905. package/resources/targets/zcode/js3d/js3d/context/skills/performance-audit/scripts/lib/source.mjs +398 -0
  906. package/resources/targets/zcode/js3d/js3d/context/skills/performance-audit/scripts/scan-perf.mjs +130 -0
  907. package/resources/targets/zcode/js3d/js3d/context/skills/visual-qa/SKILL.md +14 -0
  908. package/resources/targets/zcode/js3d/js3d/project/README.md +7 -0
  909. package/resources/targets/zcode/js3d/js3d/project/configs/game.controls.json +3 -0
  910. package/resources/targets/zcode/js3d/js3d/project/configs/game.json +3 -0
  911. package/resources/targets/zcode/js3d/js3d/project/game-runtime.json +7 -0
  912. package/resources/targets/zcode/js3d/js3d/project/game.config.json +7 -0
  913. package/resources/targets/zcode/js3d/js3d/project/index.html +12 -0
  914. package/resources/targets/zcode/js3d/js3d/project/package.json +23 -0
  915. package/resources/targets/zcode/js3d/js3d/project/runtime/lightgame/1.1.0/platform/identity/qq-ai-game-sdk.min.js +5 -0
  916. package/resources/targets/zcode/js3d/js3d/project/runtime/lightgame/1.1.0/platform/identity/qq-session.mjs +208 -0
  917. package/resources/targets/zcode/js3d/js3d/project/runtime/lightgame/1.1.0/platform/identity/shared.mjs +37 -0
  918. package/resources/targets/zcode/js3d/js3d/project/runtime/lightgame/1.1.0/platform/platform-capture-video.mjs +227 -0
  919. package/resources/targets/zcode/js3d/js3d/project/runtime/lightgame/1.1.0/platform/platform-service.d.mts +31 -0
  920. package/resources/targets/zcode/js3d/js3d/project/runtime/lightgame/1.1.0/platform/platform-service.mjs +272 -0
  921. package/resources/targets/zcode/js3d/js3d/project/runtime/lightgame/1.1.0/platform/platform.d.mts +79 -0
  922. package/resources/targets/zcode/js3d/js3d/project/runtime/lightgame/1.1.0/platform/platform.mjs +30 -0
  923. package/resources/targets/zcode/js3d/js3d/project/runtime/lightgame/1.1.0/release.json +24 -0
  924. package/resources/targets/zcode/js3d/js3d/project/runtime/lightgame/1.1.0/tooling/cli.mjs +16 -0
  925. package/resources/targets/zcode/js3d/js3d/project/runtime/lightgame/1.1.0/tooling/project.d.mts +4 -0
  926. package/resources/targets/zcode/js3d/js3d/project/runtime/lightgame/1.1.0/tooling/project.mjs +50 -0
  927. package/resources/targets/zcode/js3d/js3d/project/runtime/lightgame/1.1.0/tooling/vite.d.mts +3 -0
  928. package/resources/targets/zcode/js3d/js3d/project/runtime/lightgame/1.1.0/tooling/vite.mjs +72 -0
  929. package/resources/targets/zcode/js3d/js3d/project/runtime/lightgame/1.1.0/tools/assets.d.mts +24 -0
  930. package/resources/targets/zcode/js3d/js3d/project/runtime/lightgame/1.1.0/tools/assets.mjs +2 -0
  931. package/resources/targets/zcode/js3d/js3d/project/runtime/lightgame/1.1.0/tools/astc.d.mts +10 -0
  932. package/resources/targets/zcode/js3d/js3d/project/runtime/lightgame/1.1.0/tools/astc.mjs +1 -0
  933. package/resources/targets/zcode/js3d/js3d/project/runtime/lightgame/1.1.0/tools/glb.d.mts +26 -0
  934. package/resources/targets/zcode/js3d/js3d/project/runtime/lightgame/1.1.0/tools/glb.mjs +351 -0
  935. package/resources/targets/zcode/js3d/js3d/project/scripts/config-export/assert-asset-wiring.mjs +97 -0
  936. package/resources/targets/zcode/js3d/js3d/project/scripts/config-export/panel-resource-path.mjs +106 -0
  937. package/resources/targets/zcode/js3d/js3d/project/scripts/config-export/sync-asset-controls.mjs +327 -0
  938. package/resources/targets/zcode/js3d/js3d/project/scripts/config-export/sync-scene-assets.mjs +191 -0
  939. package/resources/targets/zcode/js3d/js3d/project/scripts/config-export.mjs +15 -0
  940. package/resources/targets/zcode/js3d/js3d/project/scripts/skill-modules/export-config/cli.mjs +20 -0
  941. package/resources/targets/zcode/js3d/js3d/project/scripts/skill-modules/export-config/config.d.mts +19 -0
  942. package/resources/targets/zcode/js3d/js3d/project/scripts/skill-modules/export-config/config.mjs +1 -0
  943. package/resources/targets/zcode/js3d/js3d/project/scripts/skill-modules/export-config/installed.json +6 -0
  944. package/resources/targets/zcode/js3d/js3d/project/scripts/skill-modules/export-config/project.d.mts +6 -0
  945. package/resources/targets/zcode/js3d/js3d/project/scripts/skill-modules/export-config/project.mjs +77 -0
  946. package/resources/targets/zcode/js3d/js3d/project/scripts/skill-modules/export-config/vite.d.mts +2 -0
  947. package/resources/targets/zcode/js3d/js3d/project/scripts/skill-modules/export-config/vite.mjs +34 -0
  948. package/resources/targets/zcode/js3d/js3d/project/scripts/write-preview-ready.mjs +22 -0
  949. package/resources/targets/zcode/js3d/js3d/project/src/display/ui-stage.ts +156 -0
  950. package/resources/targets/zcode/js3d/js3d/project/src/display/viewport.ts +239 -0
  951. package/resources/targets/zcode/js3d/js3d/project/src/main.ts +85 -0
  952. package/resources/targets/zcode/js3d/js3d/project/src/platform.ts +2 -0
  953. package/resources/targets/zcode/js3d/js3d/project/src/style.css +83 -0
  954. package/resources/targets/zcode/js3d/js3d/project/tsconfig.json +20 -0
  955. package/resources/targets/zcode/js3d/js3d/project/unified_data_control_config.json +20 -0
  956. package/resources/targets/zcode/js3d/js3d/project/vite.config.ts +5 -0
  957. package/resources/targets/zcode/js3d/recovery.md +13 -0
  958. package/resources/targets/zcode/js3d/target.json +60 -0
  959. package/vendor/craft-runtime/SOURCE.json +2 -2
  960. package/resources/targets/codebuddy/js/js/context/knowledge/AigcWiring.md +0 -9
  961. package/resources/targets/codebuddy/js/js/context/skills/aigc-generate/SKILL.md +0 -14
  962. package/resources/targets/codebuddy/js/js/context/skills/asset-search/SKILL.md +0 -12
  963. package/resources/targets/codebuddy/js/js/context/skills/asset-search/references/resource-config.md +0 -9
  964. package/resources/targets/codebuddy/js3d/js3d/context/knowledge/AigcWiring.md +0 -9
  965. package/resources/targets/codebuddy/js3d/js3d/context/skills/aigc-integration/SKILL.md +0 -14
  966. package/resources/targets/codebuddy/js3d/js3d/context/skills/asset-search/SKILL.md +0 -12
  967. package/resources/targets/codex/js/js/context/knowledge/AigcWiring.md +0 -9
  968. package/resources/targets/codex/js/js/context/skills/aigc-generate/SKILL.md +0 -14
  969. package/resources/targets/codex/js/js/context/skills/asset-search/SKILL.md +0 -12
  970. package/resources/targets/codex/js/js/context/skills/asset-search/references/resource-config.md +0 -9
  971. package/resources/targets/codex/js3d/js3d/context/knowledge/AigcWiring.md +0 -9
  972. package/resources/targets/codex/js3d/js3d/context/skills/aigc-integration/SKILL.md +0 -14
  973. package/resources/targets/codex/js3d/js3d/context/skills/asset-search/SKILL.md +0 -12
  974. package/resources/targets/workbuddy/js/js/context/knowledge/AigcWiring.md +0 -9
  975. package/resources/targets/workbuddy/js/js/context/skills/aigc-generate/SKILL.md +0 -14
  976. package/resources/targets/workbuddy/js/js/context/skills/asset-search/SKILL.md +0 -12
  977. package/resources/targets/workbuddy/js/js/context/skills/asset-search/references/resource-config.md +0 -9
  978. package/resources/targets/workbuddy/js3d/js3d/context/knowledge/AigcWiring.md +0 -9
  979. package/resources/targets/workbuddy/js3d/js3d/context/skills/aigc-integration/SKILL.md +0 -14
  980. package/resources/targets/workbuddy/js3d/js3d/context/skills/asset-search/SKILL.md +0 -12
@@ -4,6 +4,7 @@ import { mkdir, readFile } from 'node:fs/promises';
4
4
  import { atomicJson } from './request-store.mjs';
5
5
  import lockfile from 'proper-lockfile';
6
6
  import { leaseOptions } from './project-leases.mjs';
7
+ import { currentWork, guardWork } from './work-scope.mjs';
7
8
 
8
9
  function alive(pid) {
9
10
  if (!Number.isSafeInteger(pid) || pid < 1) return false;
@@ -25,10 +26,12 @@ export class Tasks {
25
26
  return path.join(this.directory,id + '.json');
26
27
  }
27
28
  busy(name) { return [...this.#live.values()].some(task=>task.record.name === name); }
29
+ get activeCount() { return this.#live.size; }
28
30
  async start(name, kind, operation, details = {}) {
29
31
  if (this.#closed) throw new Error('Task manager is closing');
30
32
  if (this.busy(name)) throw new Error('Project has a running task; wait or cancel it first');
31
- const record = { ...details, task_id:randomUUID(), name, kind, status:'running', created_at:new Date().toISOString(), host_id:this.#host, owner_pid:process.pid };
33
+ const work=currentWork();
34
+ const record = { ...details,...(work ? {work_id:work.work_id,context_revision:work.context_revision} : {}), task_id:randomUUID(), name, kind, status:'running', created_at:new Date().toISOString(), host_id:this.#host, owner_pid:process.pid };
32
35
  const controller = new AbortController(), task = { record, controller };
33
36
  this.#live.set(record.task_id,task);
34
37
  const persisted = atomicJson(this.file(record.task_id),record);
@@ -36,8 +39,10 @@ export class Tasks {
36
39
  try {
37
40
  await persisted;
38
41
  controller.signal.throwIfAborted();
42
+ await guardWork();
39
43
  record.result = await operation(controller.signal);
40
44
  controller.signal.throwIfAborted();
45
+ await guardWork();
41
46
  record.status = 'completed';
42
47
  } catch (error) {
43
48
  record.status = controller.signal.aborted ? 'cancelled' : 'failed';
@@ -0,0 +1,7 @@
1
+ import { AsyncLocalStorage } from 'node:async_hooks';
2
+
3
+ // Carries logical ownership through async tools, background tasks and panel actions.
4
+ const storage=new AsyncLocalStorage();
5
+ export const currentWork=()=>storage.getStore()?.work;
6
+ export const withWork=(work,validate,operation)=>storage.run({work,validate},operation);
7
+ export async function guardWork() { await storage.getStore()?.validate?.(); }
@@ -1,71 +1,145 @@
1
- import { parse, stringify } from 'smol-toml';
2
- import { isDeepStrictEqual } from 'node:util';
3
-
4
- export function readConfig(text, ide) {
5
- const config = text.trim() ? (ide === 'codex' ? parse(text) : JSON.parse(text)) : {};
6
- if (!config || typeof config !== 'object' || Array.isArray(config)) throw new Error('Expected an object config');
7
- const servers = config[ide === 'codex' ? 'mcp_servers' : 'mcpServers'];
8
- if (servers !== undefined && (!servers || typeof servers !== 'object' || Array.isArray(servers))) throw new Error('Invalid MCP server table');
9
- return config;
10
- }
11
-
12
- export function craftConfig(text, ide) {
13
- return readConfig(text, ide)[ide === 'codex' ? 'mcp_servers' : 'mcpServers']?.craft;
14
- }
15
-
16
- // Track strings and value arrays so apparent headers inside multiline values stay untouched.
17
- function sections(text) {
18
- const found = []; let offset = 0, quote = null, multiline = false, depth = 0;
19
- for (const line of text.match(/[^\n]*\n|[^\n]+$/g) ?? []) {
20
- if (!quote && depth === 0 && /^\s*\[/.test(line)) {
21
- const header = parse(line), keys = []; let child = header;
22
- while (child && typeof child === 'object' && !Array.isArray(child) && Object.keys(child).length === 1) {
23
- const key = Object.keys(child)[0]; keys.push(key); child = child[key];
24
- }
25
- found.push({ start: offset, keys });
26
- } else {
27
- for (let i = 0; i < line.length; i++) {
28
- const c = line[i];
29
- if (quote) {
30
- if (quote === '"' && c === '\\') { i++; continue; }
31
- if (c === quote) {
32
- if (!multiline) quote = null;
33
- else if (line.slice(i, i + 3) === quote.repeat(3)) {
34
- while (line[i + 3] === quote) i++;
35
- i += 2; quote = null; multiline = false;
36
- }
37
- }
38
- } else if (c === '#') break;
39
- else if (c === '"' || c === "'") { quote = c; multiline = line.slice(i, i + 3) === c.repeat(3); if (multiline) i += 2; }
40
- else if (c === '[' || c === '{') depth++;
41
- else if (c === ']' || c === '}') depth--;
42
- }
43
- }
44
- offset += line.length;
45
- }
46
- return found.map((section, i) => ({ ...section, end: found[i + 1]?.start ?? text.length }));
47
- }
48
-
49
- export function mergeConfig(text, ide, connection) {
50
- const before = readConfig(text, ide), table = ide === 'codex' ? 'mcp_servers' : 'mcpServers';
51
- const previous = before[table]?.craft ?? {};
52
- if (typeof previous !== 'object' || Array.isArray(previous)) throw new Error('Invalid craft server entry');
53
- // Preserve host-specific options and user environment; replace only connection identity.
54
- const next = { ...previous, ...connection, env: { ...previous.env, ...connection.env } };
55
- for (const key of ['url', 'http_headers', 'env_http_headers', 'bearer_token_env_var']) delete next[key];
56
- if (ide === 'codex') { delete next.disabled; next.enabled = true; }
57
- else { delete next.enabled; next.disabled = false; }
58
- const normalizedNext = ide === 'codex' ? parse(stringify({ value: next })).value : next;
59
- if (isDeepStrictEqual(previous, normalizedNext)) return text;
60
- const expected = { ...before, [table]: { ...before[table], craft: next } };
61
- if (ide !== 'codex') return JSON.stringify(expected, null, 2) + '\n';
62
- const owned = sections(text).filter(({ keys }) => keys[0] === 'mcp_servers' && keys[1] === 'craft');
63
- if (before.mcp_servers?.craft && !owned.length) throw new Error('Inline/dotted craft TOML entry: move it to [mcp_servers.craft] before installing; config was preserved');
64
- let kept = '', from = 0;
65
- for (const section of owned) { kept += text.slice(from, section.start); from = section.end; }
66
- kept += text.slice(from);
67
- const output = kept + (kept.endsWith('\n') || !kept ? '' : '\n') + '\n' + stringify({ mcp_servers: { craft: next } });
68
- // This also rejects unsupported inline parent tables without changing the user's file.
69
- if (!isDeepStrictEqual(parse(output), parse(stringify(expected)))) throw new Error('TOML merge changed unrelated settings; config was preserved');
70
- return output;
71
- }
1
+ import { parse, stringify } from 'smol-toml';
2
+ import { isDeepStrictEqual } from 'node:util';
3
+ import { readDshConfig, dshRegistrations, mergeDshConfig } from './dsh-config.mjs';
4
+
5
+ function object(value) { return value !== null && typeof value === 'object' && !Array.isArray(value); }
6
+ function serverTable(config, ide) { return ide === 'zcode' ? config.mcp?.servers : config[ide === 'codex' ? 'mcp_servers' : 'mcpServers']; }
7
+ function withServerTable(config, ide, servers) {
8
+ return ide === 'zcode' ? { ...config, mcp: { ...config.mcp, servers } } : { ...config, [ide === 'codex' ? 'mcp_servers' : 'mcpServers']: servers };
9
+ }
10
+
11
+ export function readConfig(text, ide) {
12
+ if (ide === 'dsh') return readDshConfig(text);
13
+ const config = text.trim() ? (ide === 'codex' ? parse(text) : JSON.parse(text)) : {};
14
+ if (!object(config)) throw new Error('Expected an object config');
15
+ if (ide === 'zcode' && config.mcp !== undefined && !object(config.mcp)) throw new Error('Invalid ZCode MCP config');
16
+ const servers = serverTable(config, ide);
17
+ if (servers !== undefined && !object(servers)) throw new Error('Invalid MCP server table');
18
+ return config;
19
+ }
20
+
21
+ export function craftConfig(text, ide, name = 'craft') {
22
+ if (ide === 'dsh') return dshRegistrations(text).find(entry => entry.name === name)?.connection;
23
+ return serverTable(readConfig(text, ide), ide)?.[name];
24
+ }
25
+
26
+ export function craftRegistrations(text, ide) {
27
+ if (ide === 'dsh') return dshRegistrations(text);
28
+ const servers = serverTable(readConfig(text, ide), ide) ?? {};
29
+ return Object.entries(servers).filter(([name, value]) => name === 'craft' || (Array.isArray(value?.args) && value.args.some(arg => typeof arg === 'string' && /^@craft_eco\/craft-mcp(?:@[^\s]+)?$/.test(arg)))).map(([name, connection]) => ({ name, connection }));
30
+ }
31
+
32
+ // ZCode's native table replaces the entire same-scope .agents fallback. Import
33
+ // currently effective declarations before adding the first native server.
34
+ export function importZcodeFallback(text, fallbackText) {
35
+ const before = readConfig(text, 'zcode');
36
+ if (Object.keys(serverTable(before, 'zcode') ?? {}).length || !fallbackText?.trim()) return text;
37
+ const fallback = readConfig(fallbackText, 'cursor'), servers = fallback.mcpServers ?? {};
38
+ if (!Object.keys(servers).length) return text;
39
+ const preserved = Object.fromEntries(Object.entries(servers).map(([name, server]) => [name, validateZcodeServer(server, name)]));
40
+ return JSON.stringify(withServerTable(before, 'zcode', preserved), null, 2) + '\n';
41
+ }
42
+
43
+ function validateZcodeServer(server, name) {
44
+ const fail = () => { throw new Error('ZCode MCP entry cannot be preserved safely: ' + name + '; repair its schema before installing; config was preserved'); };
45
+ if (!object(server)) fail();
46
+ const normalized = { ...server };
47
+ if (normalized.env === undefined && normalized.environment !== undefined) normalized.env = normalized.environment;
48
+ if (normalized.headers === undefined && normalized.http_headers !== undefined) normalized.headers = normalized.http_headers;
49
+ if (normalized.enable !== undefined) {
50
+ if (typeof normalized.enable !== 'boolean') fail();
51
+ normalized.enabled = normalized.enable === false ? false : normalized.enabled ?? true;
52
+ }
53
+ for (const key of ['environment', 'http_headers', 'enable', 'timeout', 'startup_timeout_sec']) delete normalized[key];
54
+ if (normalized.type === 'remote') normalized.type = 'http';
55
+ normalized.type ??= normalized.command ? 'stdio' : normalized.url ? 'http' : undefined;
56
+ const common = ['alwaysLoad', 'isolation', 'protocolVersion', 'enabled', 'timeoutMs', 'type'];
57
+ const fields = normalized.type === 'stdio' ? ['command', 'args', 'cwd', 'env'] : ['url', 'headers', 'oauth'];
58
+ if (!['stdio', 'http', 'sse'].includes(normalized.type) || Object.keys(normalized).some(key => ![...common, ...fields].includes(key))) fail();
59
+ if (normalized.type === 'stdio') {
60
+ if (typeof normalized.command !== 'string' || !normalized.command.trim()) fail();
61
+ if (normalized.args !== undefined && (!Array.isArray(normalized.args) || normalized.args.some(arg => typeof arg !== 'string'))) fail();
62
+ if (normalized.cwd !== undefined && (typeof normalized.cwd !== 'string' || !normalized.cwd)) fail();
63
+ } else if (typeof normalized.url !== 'string' || !normalized.url) fail();
64
+ for (const field of ['env', 'headers']) if (normalized[field] !== undefined && (!object(normalized[field]) || Object.values(normalized[field]).some(value => typeof value !== 'string'))) fail();
65
+ for (const field of ['alwaysLoad', 'enabled']) if (normalized[field] !== undefined && typeof normalized[field] !== 'boolean') fail();
66
+ if (normalized.timeoutMs !== undefined && !(Number.isFinite(normalized.timeoutMs) && normalized.timeoutMs > 0)) fail();
67
+ if (normalized.isolation !== undefined && !['session', 'workspace'].includes(normalized.isolation)) fail();
68
+ if (normalized.protocolVersion !== undefined && !['auto', 'legacy', '2026-07-28'].includes(normalized.protocolVersion)) fail();
69
+ // Complex OAuth declarations need the host's own importer; do not silently
70
+ // replace a working fallback when the installer cannot prove equivalence.
71
+ if (normalized.oauth !== undefined) fail();
72
+ return normalized;
73
+ }
74
+
75
+ // Track strings and value arrays so apparent headers inside multiline values stay untouched.
76
+ function sections(text) {
77
+ const found = []; let offset = 0, quote = null, multiline = false, depth = 0;
78
+ for (const line of text.match(/[^\n]*\n|[^\n]+$/g) ?? []) {
79
+ if (!quote && depth === 0 && /^\s*\[/.test(line)) {
80
+ const header = parse(line), keys = []; let child = header;
81
+ while (child && typeof child === 'object' && !Array.isArray(child) && Object.keys(child).length === 1) {
82
+ const key = Object.keys(child)[0]; keys.push(key); child = child[key];
83
+ }
84
+ found.push({ start: offset, keys });
85
+ } else {
86
+ for (let i = 0; i < line.length; i++) {
87
+ const c = line[i];
88
+ if (quote) {
89
+ if (quote === '"' && c === '\\') { i++; continue; }
90
+ if (c === quote) {
91
+ if (!multiline) quote = null;
92
+ else if (line.slice(i, i + 3) === quote.repeat(3)) {
93
+ while (line[i + 3] === quote) i++;
94
+ i += 2; quote = null; multiline = false;
95
+ }
96
+ }
97
+ } else if (c === '#') break;
98
+ else if (c === '"' || c === "'") { quote = c; multiline = line.slice(i, i + 3) === c.repeat(3); if (multiline) i += 2; }
99
+ else if (c === '[' || c === '{') depth++;
100
+ else if (c === ']' || c === '}') depth--;
101
+ }
102
+ }
103
+ offset += line.length;
104
+ }
105
+ return found.map((section, i) => ({ ...section, end: found[i + 1]?.start ?? text.length }));
106
+ }
107
+
108
+ export function mergeConfig(text, ide, connection, { previousName = 'craft', enable = true } = {}) {
109
+ if (ide === 'dsh') return mergeDshConfig(text, connection, { previousName, enable });
110
+ const before = readConfig(text, ide), servers = serverTable(before, ide);
111
+ if (previousName !== 'craft' && servers?.craft) throw new Error('Craft installation conflicts with an existing craft registration');
112
+ const previous = servers?.[previousName] ?? {};
113
+ if (!object(previous)) throw new Error('Invalid craft server entry');
114
+ // Preserve host-specific options and user environment; replace only connection identity.
115
+ let next = { ...previous, ...connection, env: { ...(ide === 'zcode' ? previous.environment : {}), ...previous.env, ...connection.env } };
116
+ for (const key of ['url', 'headers', 'http_headers', 'env_http_headers', 'bearer_token_env_var', 'bearerTokenEnvVar', 'oauth', 'auth']) delete next[key];
117
+ if (ide === 'codex') { delete next.disabled; next.enabled = true; }
118
+ else if (['claude', 'zcode', 'kimi'].includes(ide)) {
119
+ for (const key of ['disabled', 'enable', 'timeout', 'startup_timeout_sec']) delete next[key];
120
+ if (ide === 'claude') { delete next.enabled; delete next.timeoutMs; delete next.startupTimeoutMs; }
121
+ else {
122
+ next.enabled = true;
123
+ if (ide === 'zcode') { delete next.startupTimeoutMs; next = validateZcodeServer(next, 'craft'); }
124
+ else { delete next.type; delete next.timeoutMs; delete next.environment_id; next.transport = 'stdio'; next.executor = 'local'; }
125
+ }
126
+ } else { delete next.enabled; next.disabled = false; }
127
+ if (!enable) for (const key of ['enabled', 'disabled', 'enable']) {
128
+ if (Object.hasOwn(previous, key)) next[key] = previous[key]; else delete next[key];
129
+ }
130
+ const normalizedNext = ide === 'codex' ? parse(stringify({ value: next })).value : next;
131
+ if (previousName === 'craft' && isDeepStrictEqual(previous, normalizedNext)) return text;
132
+ const nextServers = { ...servers, craft: next };
133
+ if (previousName !== 'craft') delete nextServers[previousName];
134
+ const expected = withServerTable(before, ide, nextServers);
135
+ if (ide !== 'codex') return JSON.stringify(expected, null, 2) + '\n';
136
+ const owned = sections(text).filter(({ keys }) => keys[0] === 'mcp_servers' && keys[1] === previousName);
137
+ if (before.mcp_servers?.[previousName] && !owned.length) throw new Error('Inline/dotted craft TOML entry: move it to [mcp_servers.craft] before installing; config was preserved');
138
+ let kept = '', from = 0;
139
+ for (const section of owned) { kept += text.slice(from, section.start); from = section.end; }
140
+ kept += text.slice(from);
141
+ const output = kept + (kept.endsWith('\n') || !kept ? '' : '\n') + '\n' + stringify({ mcp_servers: { craft: next } });
142
+ // This also rejects unsupported inline parent tables without changing the user's file.
143
+ if (!isDeepStrictEqual(parse(output), parse(stringify(expected)))) throw new Error('TOML merge changed unrelated settings; config was preserved');
144
+ return output;
145
+ }
@@ -0,0 +1,42 @@
1
+ // The MCP process cannot discover or invoke its parent's control plane. This
2
+ // contract is consumed by the host agent after the update response completes.
3
+ export function connectionHandoff({ host, target, current, workspace, platform, serverId = 'craft', busy, intent = 'inspect', name, requestKey }) {
4
+ const readOnly = intent === 'inspect';
5
+ const idle = busy?.can_reconnect;
6
+ const codex = host === 'codex';
7
+ const workbuddy = host === 'workbuddy';
8
+ const state = readOnly ? 'inspect_only' : idle === false ? 'wait_for_idle' : idle === true ? 'ready' : 'check_current_connection';
9
+ const fallback = workbuddy
10
+ ? ['在 WorkBuddy 的“专家·技能·连接器 → 连接器 → 自定义连接器”中重连 Craft。',
11
+ '实际版本仍旧时,保存进度,从 Windows 托盘完整退出 WorkBuddy 后重新打开,等待 Craft 就绪;仅关闭窗口可能保留后台。',
12
+ '只有页面实际提示未信任时才由用户点击“信任”;每次更新不一定需要重新信任。']
13
+ : [`使用 ${codex ? 'Codex' : '宿主'} 提供的 Craft 重连入口。`,
14
+ `重连后实际版本仍旧或没有重连入口时,保存进度,完整退出并重新打开 ${codex ? 'Codex' : '宿主'}。`,
15
+ '仅在宿主实际要求信任或授权时,按其提示由用户完成。'];
16
+ const next = readOnly
17
+ ? '本次仅检查版本,不自动重载或重启。开始创建、恢复或明确更新时,再处理当前连接切版。'
18
+ : idle === false
19
+ ? '先等待活动任务结束,保存进度并 release 本会话的工作;其他会话占用等待其正常释放。再查询忙闲状态,现在不要重载或重启。'
20
+ : `${idle === true ? '' : '先查询当前宿主聊天的 Craft 连接并确认没有活动工作。'}${codex
21
+ ? '若宿主实际提供可控制当前聊天的原生重载能力,先遵循宿主规则确认其影响范围内没有活动工作,再于更新调用返回后自动尝试一次;本连接空闲不代表其他聊天空闲。无法确认作用范围、能力缺失、失败或仍是旧版时按回退步骤提示用户。'
22
+ : '完成活动工作后按宿主回退步骤重连 Craft。'}重连后必须通过当前聊天的 craft_game_info 核对实际版本、build_id、instance_id、active_verified 和宿主范围;安装回执、重载成功提示或连接绿灯不能代替核验。`;
23
+ return {
24
+ schema: 1, executor: 'host_agent', host, server_id: serverId, intent, state,
25
+ after_response: true,
26
+ automatic_reload: readOnly ? 'disabled_read_only' : codex ? 'if_host_capability_available' : 'not_requested',
27
+ automatic_reload_attempts: readOnly || !codex ? 0 : 1,
28
+ capability_source: 'actual_host_tools', capability_availability: 'not_observable_from_mcp',
29
+ busy: busy ?? null, busy_scope: 'current_connection',
30
+ preflight: { tool: 'craft_game_info', require_idle: true, honor_host_control_scope: true, require_control_scope_idle: true,
31
+ unknown_control_scope: 'manual_reconnect', if_already_verified: 'continue_without_reload' },
32
+ expected: { version: target?.version, build_id: target?.build_id, host, workspace, platform },
33
+ ...(current?.instance_id ? { previous_instance_id: current.instance_id } : {}),
34
+ verify: { tool: 'craft_game_info', arguments: name ? { name } : {}, scope: 'current_chat_connection',
35
+ required: ['version', 'runtime.version', 'runtime.build_id', 'runtime.instance_id', 'runtime.activation.status', 'host', 'workspace', 'platform'],
36
+ activation_status: 'active_verified', recheck_busy_before_reload: true,
37
+ require_new_instance: Boolean(current?.instance_id && (current.version !== target?.version || current.build_id !== target?.build_id)),
38
+ independent_probe_is_not_confirmation: true },
39
+ retry: { ...(requestKey ? { request_key: requestKey } : {}), only_explicitly_unstarted_prepare: true, never_replay_paid_operations: true },
40
+ fallback, next,
41
+ };
42
+ }
@@ -0,0 +1,182 @@
1
+ import path from 'node:path';
2
+ import { readFileSync, readdirSync, lstatSync, realpathSync } from 'node:fs';
3
+ import { isDeepStrictEqual } from 'node:util';
4
+ import { isAlias, isMap, isSeq, parseDocument } from 'yaml';
5
+
6
+ const pluginName = '@deepseek-ai/dsh-mcp-client';
7
+ const pluginId = 'mcp-craft';
8
+ const isRecord = value => value !== null && typeof value === 'object' && !Array.isArray(value);
9
+
10
+ function documentFor(text) {
11
+ const document = parseDocument(text || '[]\n', { uniqueKeys: true });
12
+ if (document.errors.length) throw new Error('Invalid DSH YAML configuration: ' + document.errors[0].message);
13
+ if (document.contents === null) document.contents = document.createNode([]);
14
+ if (!isSeq(document.contents)) throw new Error('DSH configuration must be a YAML patch array');
15
+ return document;
16
+ }
17
+
18
+ /** Read plain patch data without evaluating Cordis !!js expressions. */
19
+ export function readDshConfig(text) {
20
+ return documentFor(text).toJS();
21
+ }
22
+
23
+ function isCraft(value) {
24
+ const config = value?.config;
25
+ return value?.id === pluginId || (value?.name === pluginName && (
26
+ config?.serverName === 'craft' ||
27
+ (Array.isArray(config?.args) && config.args.some(arg => typeof arg === 'string' && /^@craft_eco\/craft-mcp(?:@[^\s]+)?$/.test(arg)))
28
+ ));
29
+ }
30
+
31
+ function hasDynamicNode(node) {
32
+ if (!node || typeof node !== 'object') return false;
33
+ if (isAlias(node) || node.tag) return true;
34
+ if (isMap(node)) return node.items.some(pair => hasDynamicNode(pair.key) || hasDynamicNode(pair.value));
35
+ if (isSeq(node)) return node.items.some(hasDynamicNode);
36
+ return false;
37
+ }
38
+
39
+ function candidates(document) {
40
+ const rows = [], identities = new Set(), allIds = new Map();
41
+ const values = document.toJS();
42
+ for (const [patchIndex, patch] of document.contents.items.entries()) {
43
+ if (!isMap(patch)) throw new Error('DSH patch entries must be YAML mappings');
44
+ const insert = patch.get('insert', true);
45
+ if (insert !== undefined && !isSeq(insert)) throw new Error('DSH insert patch must contain an array');
46
+ const entries = insert ? insert.items : [patch];
47
+ for (const [entryIndex, node] of entries.entries()) {
48
+ if (!isMap(node)) throw new Error('DSH plugin entries must be YAML mappings');
49
+ const value = insert ? values[patchIndex].insert[entryIndex] : values[patchIndex];
50
+ if (typeof value.id === 'string') allIds.set(value.id, (allIds.get(value.id) ?? 0) + 1);
51
+ if (!isCraft(value)) continue;
52
+ if (!insert || patch.items.some(pair => pair.key?.value !== 'insert')) {
53
+ throw new Error('Ambiguous Craft DSH patch: use one complete insert registration without additional patch operations');
54
+ }
55
+ if (hasDynamicNode(node)) throw new Error('Dynamic or aliased Craft DSH configuration cannot be changed safely');
56
+ if (value.name !== pluginName) throw new Error('DSH plugin id mcp-craft belongs to another plugin');
57
+ if (typeof value.id !== 'string' || !value.id.trim()) throw new Error('Craft DSH registration requires an explicit plugin id');
58
+ if (!isRecord(value.config) || typeof value.config.serverName !== 'string' || !/^[A-Za-z0-9_-]{1,32}$/.test(value.config.serverName)) {
59
+ throw new Error('Invalid Craft DSH server configuration');
60
+ }
61
+ if (value.disabled !== undefined && typeof value.disabled !== 'boolean') throw new Error('Craft DSH disabled must be a boolean');
62
+ if (identities.has(value.id)) throw new Error('Duplicate Craft DSH plugin id');
63
+ identities.add(value.id);
64
+ rows.push({ node, value });
65
+ }
66
+ }
67
+ if (rows.length > 1) throw new Error('Multiple Craft DSH registrations found; keep one registration before installing');
68
+ for (const { value } of rows) {
69
+ if (allIds.get(value.id) > 1) throw new Error('Ambiguous or duplicate Craft DSH plugin id');
70
+ }
71
+ // A later id-only patch could silently override or disable the inserted server.
72
+ for (const patch of document.contents.items) {
73
+ if (patch.has('insert')) continue;
74
+ const id = patch.get('id');
75
+ if (identities.has(id)) throw new Error('Ambiguous Craft DSH id override; keep settings in the insert registration');
76
+ }
77
+ return rows;
78
+ }
79
+
80
+ function connectionFor(value) {
81
+ const { serverName: _serverName, transport, ...connection } = value.config;
82
+ return { ...connection, type: transport, disabled: value.disabled === true };
83
+ }
84
+
85
+ /** Craft registrations only; connection uses the common installer/probe shape. */
86
+ export function dshRegistrations(text) {
87
+ return candidates(documentFor(text)).map(({ value }) => ({ name: value.config.serverName, connection: connectionFor(value) }));
88
+ }
89
+
90
+ function connectionConfig(connection, previous = {}) {
91
+ if (!isRecord(connection) || typeof connection.command !== 'string' || !connection.command.trim() ||
92
+ !Array.isArray(connection.args) || connection.args.some(arg => typeof arg !== 'string') ||
93
+ (connection.env !== undefined && (!isRecord(connection.env) || Object.values(connection.env).some(value => typeof value !== 'string')))) {
94
+ throw new Error('Craft DSH requires a valid stdio command, args and string environment');
95
+ }
96
+ if (previous.env !== undefined && (!isRecord(previous.env) || Object.values(previous.env).some(value => typeof value !== 'string'))) {
97
+ throw new Error('Invalid existing Craft DSH environment');
98
+ }
99
+ const next = { ...previous, ...connection, serverName: 'craft', transport: 'stdio', env: { ...previous.env, ...connection.env } };
100
+ next.startupTimeoutMs ??= connection.timeout ?? (connection.startup_timeout_sec ? connection.startup_timeout_sec * 1000 : 120000);
101
+ next.toolCallTimeoutMs ??= 3600000;
102
+ next.failOnStartupError ??= true;
103
+ for (const key of ['type', 'timeout', 'startup_timeout_sec', 'enabled', 'disabled', 'url', 'headers', 'http_headers', 'env_http_headers', 'bearer_token_env_var']) delete next[key];
104
+ return next;
105
+ }
106
+
107
+ /** Merge a single owned stdio registration while retaining unrelated YAML nodes. */
108
+ export function mergeDshConfig(text, connection, { previousName = 'craft', enable = true } = {}) {
109
+ const document = documentFor(text), found = candidates(document);
110
+ const previous = found.find(row => row.value.config.serverName === previousName);
111
+ if (found.length && !previous) throw new Error('Craft DSH installation conflicts with an existing registration');
112
+ if (!previous && previousName !== 'craft') throw new Error('Previous Craft DSH registration was not found');
113
+ const config = connectionConfig(connection, previous?.value.config);
114
+ if (!previous) {
115
+ document.contents.items.push(document.createNode({ insert: [{ id: pluginId, name: pluginName, config }] }));
116
+ } else {
117
+ const next = { ...previous.value, config };
118
+ if (enable && next.disabled === true) next.disabled = false;
119
+ if (isDeepStrictEqual(previous.value, next)) return text;
120
+ const configNode = previous.node.get('config', true);
121
+ for (const pair of [...configNode.items]) {
122
+ if (!Object.hasOwn(config, pair.key.value)) configNode.delete(pair.key.value);
123
+ }
124
+ for (const [key, value] of Object.entries(config)) {
125
+ if (isDeepStrictEqual(previous.value.config[key], value)) continue;
126
+ if (key === 'env' && isMap(configNode.get('env', true))) {
127
+ const env = configNode.get('env', true);
128
+ for (const [name, setting] of Object.entries(value)) {
129
+ if (previous.value.config.env?.[name] !== setting) env.set(name, setting);
130
+ }
131
+ } else configNode.set(key, document.createNode(value));
132
+ }
133
+ if (enable && previous.value.disabled === true) previous.node.set('disabled', false);
134
+ }
135
+ document.contents.flow = false;
136
+ const output = document.toString({ lineWidth: 0 });
137
+ const written = dshRegistrations(output);
138
+ if (written.length !== 1 || written[0].name !== 'craft' || !isDeepStrictEqual(written[0].connection, connectionFor({ config, disabled: !enable && previous?.value.disabled === true }))) {
139
+ throw new Error('Generated Craft DSH configuration failed validation');
140
+ }
141
+ return output;
142
+ }
143
+
144
+ /** Read-only profile inventory; callers decide how to handle an existing scope. */
145
+ export function inspectDshProfiles(dshHome) {
146
+ const profiles = path.join(dshHome, 'profiles');
147
+ let root;
148
+ try {
149
+ const stat = lstatSync(dshHome);
150
+ if (stat.isSymbolicLink() || !stat.isDirectory()) throw new Error('DSH home must be a plain directory');
151
+ root = realpathSync(dshHome);
152
+ } catch (error) { if (error.code === 'ENOENT') return []; throw error; }
153
+ const checkedPath = (file, type) => {
154
+ const stat = lstatSync(file);
155
+ if (stat.isSymbolicLink() || (type === 'directory' ? !stat.isDirectory() : !stat.isFile())) throw new Error('DSH profile paths must not contain links or special files: ' + file);
156
+ const relative = path.relative(root, realpathSync(file));
157
+ if (relative === '..' || relative.startsWith('..' + path.sep) || path.isAbsolute(relative)) throw new Error('DSH profile path escapes its home: ' + file);
158
+ };
159
+ let entries;
160
+ try { checkedPath(profiles, 'directory'); entries = readdirSync(profiles, { withFileTypes: true }); }
161
+ catch (error) { if (error.code === 'ENOENT') return []; throw error; }
162
+ const found = [];
163
+ for (const entry of entries.sort((a, b) => a.name.localeCompare(b.name))) {
164
+ if (entry.isSymbolicLink()) throw new Error('DSH profile paths must not contain links: ' + path.join(profiles, entry.name));
165
+ if (!entry.isDirectory()) continue;
166
+ checkedPath(path.join(profiles, entry.name), 'directory');
167
+ const configPath = path.join(profiles, entry.name, 'cordis.patch.yml');
168
+ let text;
169
+ try { checkedPath(configPath, 'file'); text = readFileSync(configPath, 'utf8'); }
170
+ catch (error) { if (error.code === 'ENOENT') continue; throw error; }
171
+ const registrations = dshRegistrations(text);
172
+ if (registrations.length) found.push({ path: configPath, registrations });
173
+ }
174
+ return found;
175
+ }
176
+
177
+ /** Shared install/doctor/update guard; never move profile-owned registrations. */
178
+ export function assertDshSharedScope(paths) {
179
+ if (!paths.dshHome) return;
180
+ const profiles = inspectDshProfiles(paths.dshHome);
181
+ if (profiles.length) throw new Error('DSH already has a profile-scoped Craft registration: ' + profiles.map(profile => profile.path).join(', ') + '. Preserve it and resolve that registration before installing or checking the shared DSH_HOME configuration; a duplicate MCP was not created.');
182
+ }
@@ -1,54 +1,54 @@
1
- import path from 'node:path';
2
- import { lstat, readFile, mkdir, writeFile, rename, unlink } from 'node:fs/promises';
3
- import { randomUUID } from 'node:crypto';
4
-
5
- export async function optionalFile(file) {
6
- try { return await readFile(file, 'utf8'); }
7
- catch (error) { if (error.code !== 'ENOENT') throw error; return null; }
8
- }
9
-
10
- export async function assertPlainPath(file) {
11
- let current = path.resolve(file);
12
- for (;;) {
13
- try {
14
- const info = await lstat(current);
15
- if (info.isSymbolicLink() || (current === path.resolve(file) ? !info.isFile() : !info.isDirectory())) throw new Error('Refusing linked or invalid install path: ' + current);
16
- } catch (error) { if (error.code !== 'ENOENT') throw error; }
17
- const parent = path.dirname(current); if (parent === current) break; current = parent;
18
- }
19
- }
20
-
21
- async function replace(file, text) {
22
- await mkdir(path.dirname(file), { recursive: true });
23
- const temporary = file + '.' + randomUUID() + '.tmp';
24
- try { await writeFile(temporary, text, { mode: 0o600, flag: 'wx' }); await rename(temporary, file); }
25
- finally { await unlink(temporary).catch(error => { if (error.code !== 'ENOENT') throw error; }); }
26
- }
27
-
28
- // Preflight all destinations, keep private backups, and roll back only our unchanged writes.
29
- export async function commitFiles(changes) {
30
- const pending = changes.filter(change => change.before !== change.after), committed = [], backups = [];
31
- for (const change of pending) {
32
- await assertPlainPath(change.file);
33
- if (await optionalFile(change.file) !== change.before) throw new Error('File changed during installation: ' + change.file);
34
- }
35
- try {
36
- for (const change of pending) {
37
- await assertPlainPath(change.file);
38
- if (await optionalFile(change.file) !== change.before) throw new Error('File changed during installation: ' + change.file);
39
- if (change.before !== null) {
40
- const backup = change.file + '.craft-backup-' + randomUUID();
41
- await writeFile(backup, change.before, { flag: 'wx', mode: 0o600 }); backups.push(backup);
42
- }
43
- await replace(change.file, change.after); committed.push(change);
44
- }
45
- } catch (error) {
46
- for (const change of committed.reverse()) {
47
- if (await optionalFile(change.file) === change.after) {
48
- if (change.before === null) await unlink(change.file); else await replace(change.file, change.before);
49
- }
50
- }
51
- throw error;
52
- }
53
- return { changed: pending.map(change => change.file), backups };
54
- }
1
+ import path from 'node:path';
2
+ import { lstat, readFile, mkdir, writeFile, rename, unlink } from 'node:fs/promises';
3
+ import { randomUUID } from 'node:crypto';
4
+
5
+ export async function optionalFile(file) {
6
+ try { return await readFile(file, 'utf8'); }
7
+ catch (error) { if (error.code !== 'ENOENT') throw error; return null; }
8
+ }
9
+
10
+ export async function assertPlainPath(file) {
11
+ let current = path.resolve(file);
12
+ for (;;) {
13
+ try {
14
+ const info = await lstat(current);
15
+ if (info.isSymbolicLink() || (current === path.resolve(file) ? !info.isFile() : !info.isDirectory())) throw new Error('Refusing linked or invalid install path: ' + current);
16
+ } catch (error) { if (error.code !== 'ENOENT') throw error; }
17
+ const parent = path.dirname(current); if (parent === current) break; current = parent;
18
+ }
19
+ }
20
+
21
+ async function replace(file, text) {
22
+ await mkdir(path.dirname(file), { recursive: true });
23
+ const temporary = file + '.' + randomUUID() + '.tmp';
24
+ try { await writeFile(temporary, text, { mode: 0o600, flag: 'wx' }); await rename(temporary, file); }
25
+ finally { await unlink(temporary).catch(error => { if (error.code !== 'ENOENT') throw error; }); }
26
+ }
27
+
28
+ // Preflight all destinations, keep private backups, and roll back only our unchanged writes.
29
+ export async function commitFiles(changes) {
30
+ const pending = changes.filter(change => change.before !== change.after), committed = [], backups = [];
31
+ for (const change of pending) {
32
+ await assertPlainPath(change.file);
33
+ if (await optionalFile(change.file) !== change.before) throw new Error('File changed during installation: ' + change.file);
34
+ }
35
+ try {
36
+ for (const change of pending) {
37
+ await assertPlainPath(change.file);
38
+ if (await optionalFile(change.file) !== change.before) throw new Error('File changed during installation: ' + change.file);
39
+ if (change.before !== null) {
40
+ const backup = change.file + '.craft-backup-' + randomUUID();
41
+ await writeFile(backup, change.before, { flag: 'wx', mode: 0o600 }); backups.push(backup);
42
+ }
43
+ await replace(change.file, change.after); committed.push(change);
44
+ }
45
+ } catch (error) {
46
+ for (const change of committed.reverse()) {
47
+ if (await optionalFile(change.file) === change.after) {
48
+ if (change.before === null) await unlink(change.file); else await replace(change.file, change.before);
49
+ }
50
+ }
51
+ throw error;
52
+ }
53
+ return { changed: pending.map(change => change.file), backups };
54
+ }