@craft_eco/craft-mcp 0.1.29 → 0.1.31

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 (1140) hide show
  1. package/README.md +17 -60
  2. package/bin/craft-mcp.mjs +7 -1
  3. package/dist-server/game-workflow/check.mjs +3 -2
  4. package/dist-server/game-workflow/context-state.mjs +68 -67
  5. package/dist-server/game-workflow/draft-archive.mjs +147 -2
  6. package/dist-server/game-workflow/draft-upload-identity.mjs +11 -0
  7. package/dist-server/game-workflow/draft-uploads.mjs +105 -60
  8. package/dist-server/game-workflow/native-context.mjs +289 -289
  9. package/dist-server/game-workflow/project-bundles.mjs +246 -246
  10. package/dist-server/game-workflow/project-context.mjs +56 -18
  11. package/dist-server/game-workflow/project-install.mjs +81 -0
  12. package/dist-server/game-workflow/projects.mjs +37 -7
  13. package/dist-server/game-workflow/tasks.mjs +1 -1
  14. package/dist-server/game-workflow/work-scope.mjs +7 -7
  15. package/dist-server/integrations/config.mjs +162 -145
  16. package/dist-server/integrations/connect.mjs +48 -0
  17. package/dist-server/integrations/connection-handoff.mjs +36 -42
  18. package/dist-server/integrations/dsh-config.mjs +182 -182
  19. package/dist-server/integrations/fixed-launcher.mjs +31 -0
  20. package/dist-server/integrations/host-config-scope.mjs +16 -0
  21. package/dist-server/integrations/host-reload.mjs +25 -0
  22. package/dist-server/integrations/hosts.mjs +93 -55
  23. package/dist-server/integrations/install.mjs +337 -205
  24. package/dist-server/integrations/installation-state.mjs +85 -84
  25. package/dist-server/integrations/installation-transaction.mjs +27 -0
  26. package/dist-server/integrations/jsonc-config.mjs +56 -0
  27. package/dist-server/integrations/launcher-start.mjs +52 -0
  28. package/dist-server/integrations/npm-diagnostics.mjs +32 -0
  29. package/dist-server/integrations/opencode-config.mjs +94 -0
  30. package/dist-server/integrations/project-setup.mjs +206 -0
  31. package/dist-server/integrations/registration-identity.mjs +15 -0
  32. package/dist-server/integrations/runtime-candidate.mjs +103 -0
  33. package/dist-server/integrations/runtime-gc.mjs +191 -188
  34. package/dist-server/integrations/runtime-identity.mjs +22 -0
  35. package/dist-server/integrations/runtime.mjs +111 -126
  36. package/dist-server/integrations/updates.mjs +331 -225
  37. package/dist-server/integrations/version-policy.mjs +32 -32
  38. package/dist-server/launcher.mjs +1852 -0
  39. package/dist-server/mcp/control-panel.mjs +8 -23
  40. package/dist-server/mcp/server.mjs +47 -82
  41. package/dist-server/mcp/update-session.mjs +185 -92
  42. package/dist-server/upstream/craft-aigc.mjs +43 -16
  43. package/dist-server/upstream/draft-source.mjs +29 -0
  44. package/package.json +5 -3
  45. package/resources/context-filter-report.json +120 -0
  46. package/resources/craft-create/SKILL.md +19 -19
  47. package/resources/craft-update/SKILL.md +9 -11
  48. package/resources/targets/claude/js/bootstrap/SKILL.md +3 -1
  49. package/resources/targets/claude/js/craft-game-maker/SKILL.md +11 -15
  50. package/resources/targets/claude/js/js/bundle.json +7 -7
  51. package/resources/targets/claude/js/recovery.md +5 -1
  52. package/resources/targets/claude/js/target.json +1 -1
  53. package/resources/targets/claude/js3d/bootstrap/SKILL.md +3 -1
  54. package/resources/targets/claude/js3d/craft-game-maker/SKILL.md +11 -15
  55. package/resources/targets/claude/js3d/js3d/bundle.json +8 -8
  56. package/resources/targets/claude/js3d/js3d/context/skills/asset-usage-audit/scripts/lib/scan.mjs +2 -2
  57. package/resources/targets/claude/js3d/recovery.md +5 -1
  58. package/resources/targets/claude/js3d/target.json +1 -1
  59. package/resources/targets/codebuddy/js/bootstrap/SKILL.md +3 -1
  60. package/resources/targets/codebuddy/js/craft-game-maker/SKILL.md +11 -15
  61. package/resources/targets/codebuddy/js/js/bundle.json +7 -7
  62. package/resources/targets/codebuddy/js/recovery.md +5 -1
  63. package/resources/targets/codebuddy/js/target.json +1 -1
  64. package/resources/targets/codebuddy/js3d/bootstrap/SKILL.md +3 -1
  65. package/resources/targets/codebuddy/js3d/craft-game-maker/SKILL.md +11 -15
  66. package/resources/targets/codebuddy/js3d/js3d/bundle.json +8 -8
  67. package/resources/targets/codebuddy/js3d/js3d/context/skills/asset-usage-audit/scripts/lib/scan.mjs +2 -2
  68. package/resources/targets/codebuddy/js3d/recovery.md +5 -1
  69. package/resources/targets/codebuddy/js3d/target.json +1 -1
  70. package/resources/targets/codex/js/bootstrap/SKILL.md +2 -4
  71. package/resources/targets/codex/js/craft-game-maker/SKILL.md +11 -15
  72. package/resources/targets/codex/js/js/bundle.json +7 -7
  73. package/resources/targets/codex/js/recovery.md +3 -3
  74. package/resources/targets/codex/js/target.json +1 -1
  75. package/resources/targets/codex/js3d/bootstrap/SKILL.md +2 -4
  76. package/resources/targets/codex/js3d/craft-game-maker/SKILL.md +11 -15
  77. package/resources/targets/codex/js3d/js3d/bundle.json +8 -8
  78. package/resources/targets/codex/js3d/js3d/context/skills/asset-usage-audit/scripts/lib/scan.mjs +2 -2
  79. package/resources/targets/codex/js3d/recovery.md +3 -3
  80. package/resources/targets/codex/js3d/target.json +1 -1
  81. package/resources/targets/comate/js/bootstrap/SKILL.md +20 -0
  82. package/resources/targets/comate/js/context-filter-report.json +27 -0
  83. package/resources/targets/comate/js/craft-game-maker/SKILL.md +72 -0
  84. package/resources/targets/comate/js/craft-game-maker/js.md +10 -0
  85. package/resources/targets/comate/js/js/bundle.json +97 -0
  86. package/resources/targets/comate/js/js/context/AGENTS.md +29 -0
  87. package/resources/targets/comate/js/js/context/hooks/hooks.json +14 -0
  88. package/resources/targets/comate/js/js/context/knowledge/AssetUrl.md +9 -0
  89. package/resources/targets/comate/js/js/context/knowledge/AssetWiring.md +7 -0
  90. package/resources/targets/comate/js/js/context/knowledge/Layout.md +7 -0
  91. package/resources/targets/comate/js/js/context/knowledge/Lifecycle.md +11 -0
  92. package/resources/targets/comate/js/js/context/knowledge/ResourceLoading.md +9 -0
  93. package/resources/targets/comate/js/js/context/skills/export-config/SKILL.md +16 -0
  94. package/resources/targets/comate/js/js/context/skills/export-config/assets/tooling/cli.mjs +20 -0
  95. package/resources/targets/comate/js/js/context/skills/export-config/assets/tooling/config.d.mts +19 -0
  96. package/resources/targets/comate/js/js/context/skills/export-config/assets/tooling/config.mjs +1 -0
  97. package/resources/targets/comate/js/js/context/skills/export-config/assets/tooling/project.d.mts +6 -0
  98. package/resources/targets/comate/js/js/context/skills/export-config/assets/tooling/project.mjs +77 -0
  99. package/resources/targets/comate/js/js/context/skills/export-config/assets/tooling/vite.d.mts +2 -0
  100. package/resources/targets/comate/js/js/context/skills/export-config/assets/tooling/vite.mjs +34 -0
  101. package/resources/targets/comate/js/js/context/skills/export-config/scripts/export-config.mjs +4 -0
  102. package/resources/targets/comate/js/js/context/skills/export-config/scripts/install.mjs +89 -0
  103. package/resources/targets/comate/js/js/context/skills/export-config/scripts/panel-resource-path.mjs +106 -0
  104. package/resources/targets/comate/js/js/context/skills/index.json +19 -0
  105. package/resources/targets/comate/js/js/context/skills/visual-qa/SKILL.md +14 -0
  106. package/resources/targets/comate/js/js/project/README.md +7 -0
  107. package/resources/targets/comate/js/js/project/configs/assets.json +1 -0
  108. package/resources/targets/comate/js/js/project/configs/game.controls.json +3 -0
  109. package/resources/targets/comate/js/js/project/configs/game.json +3 -0
  110. package/resources/targets/comate/js/js/project/game-runtime.json +7 -0
  111. package/resources/targets/comate/js/js/project/game.config.json +7 -0
  112. package/resources/targets/comate/js/js/project/index.html +20 -0
  113. package/resources/targets/comate/js/js/project/package.json +22 -0
  114. package/resources/targets/comate/js/js/project/runtime/lightgame/1.1.0/platform/identity/qq-ai-game-sdk.min.js +5 -0
  115. package/resources/targets/comate/js/js/project/runtime/lightgame/1.1.0/platform/identity/qq-session.mjs +208 -0
  116. package/resources/targets/comate/js/js/project/runtime/lightgame/1.1.0/platform/identity/shared.mjs +37 -0
  117. package/resources/targets/comate/js/js/project/runtime/lightgame/1.1.0/platform/platform-capture-video.mjs +227 -0
  118. package/resources/targets/comate/js/js/project/runtime/lightgame/1.1.0/platform/platform-service.d.mts +31 -0
  119. package/resources/targets/comate/js/js/project/runtime/lightgame/1.1.0/platform/platform-service.mjs +272 -0
  120. package/resources/targets/comate/js/js/project/runtime/lightgame/1.1.0/platform/platform.d.mts +79 -0
  121. package/resources/targets/comate/js/js/project/runtime/lightgame/1.1.0/platform/platform.mjs +29 -0
  122. package/resources/targets/comate/js/js/project/runtime/lightgame/1.1.0/release.json +22 -0
  123. package/resources/targets/comate/js/js/project/runtime/lightgame/1.1.0/tooling/cli.mjs +16 -0
  124. package/resources/targets/comate/js/js/project/runtime/lightgame/1.1.0/tooling/project.d.mts +4 -0
  125. package/resources/targets/comate/js/js/project/runtime/lightgame/1.1.0/tooling/project.mjs +50 -0
  126. package/resources/targets/comate/js/js/project/runtime/lightgame/1.1.0/tooling/vite.d.mts +3 -0
  127. package/resources/targets/comate/js/js/project/runtime/lightgame/1.1.0/tooling/vite.mjs +72 -0
  128. package/resources/targets/comate/js/js/project/runtime/lightgame/1.1.0/tools/assets.d.mts +24 -0
  129. package/resources/targets/comate/js/js/project/runtime/lightgame/1.1.0/tools/assets.mjs +2 -0
  130. package/resources/targets/comate/js/js/project/runtime/lightgame/1.1.0/tools/astc.d.mts +10 -0
  131. package/resources/targets/comate/js/js/project/runtime/lightgame/1.1.0/tools/astc.mjs +1 -0
  132. package/resources/targets/comate/js/js/project/scripts/config-export/assert-asset-wiring.mjs +72 -0
  133. package/resources/targets/comate/js/js/project/scripts/config-export/panel-resource-path.mjs +106 -0
  134. package/resources/targets/comate/js/js/project/scripts/config-export/sync-asset-controls.mjs +316 -0
  135. package/resources/targets/comate/js/js/project/scripts/config-export.mjs +13 -0
  136. package/resources/targets/comate/js/js/project/scripts/skill-modules/export-config/cli.mjs +20 -0
  137. package/resources/targets/comate/js/js/project/scripts/skill-modules/export-config/config.d.mts +19 -0
  138. package/resources/targets/comate/js/js/project/scripts/skill-modules/export-config/config.mjs +1 -0
  139. package/resources/targets/comate/js/js/project/scripts/skill-modules/export-config/installed.json +6 -0
  140. package/resources/targets/comate/js/js/project/scripts/skill-modules/export-config/project.d.mts +6 -0
  141. package/resources/targets/comate/js/js/project/scripts/skill-modules/export-config/project.mjs +77 -0
  142. package/resources/targets/comate/js/js/project/scripts/skill-modules/export-config/vite.d.mts +2 -0
  143. package/resources/targets/comate/js/js/project/scripts/skill-modules/export-config/vite.mjs +34 -0
  144. package/resources/targets/comate/js/js/project/scripts/write-preview-ready.mjs +22 -0
  145. package/resources/targets/comate/js/js/project/src/display/ui-stage.ts +156 -0
  146. package/resources/targets/comate/js/js/project/src/display/viewport.ts +249 -0
  147. package/resources/targets/comate/js/js/project/src/main.ts +87 -0
  148. package/resources/targets/comate/js/js/project/src/platform.ts +2 -0
  149. package/resources/targets/comate/js/js/project/src/scenes/LoadScene.ts +89 -0
  150. package/resources/targets/comate/js/js/project/src/scenes/PlayScene.ts +17 -0
  151. package/resources/targets/comate/js/js/project/src/screenUi.ts +185 -0
  152. package/resources/targets/comate/js/js/project/src/style.css +294 -0
  153. package/resources/targets/comate/js/js/project/tsconfig.json +20 -0
  154. package/resources/targets/comate/js/js/project/unified_data_control_config.json +20 -0
  155. package/resources/targets/comate/js/js/project/vite.config.ts +5 -0
  156. package/resources/targets/comate/js/recovery.md +17 -0
  157. package/resources/targets/comate/js/target.json +61 -0
  158. package/resources/targets/comate/js3d/bootstrap/SKILL.md +20 -0
  159. package/resources/targets/comate/js3d/context-filter-report.json +27 -0
  160. package/resources/targets/comate/js3d/craft-game-maker/SKILL.md +72 -0
  161. package/resources/targets/comate/js3d/craft-game-maker/js3d.md +12 -0
  162. package/resources/targets/comate/js3d/js3d/bundle.json +108 -0
  163. package/resources/targets/comate/js3d/js3d/context/AGENTS.md +30 -0
  164. package/resources/targets/comate/js3d/js3d/context/hooks/hooks.json +14 -0
  165. package/resources/targets/comate/js3d/js3d/context/knowledge/AssetUrl.md +9 -0
  166. package/resources/targets/comate/js3d/js3d/context/knowledge/AssetWiring.md +7 -0
  167. package/resources/targets/comate/js3d/js3d/context/knowledge/CodingGuide/Pitfalls.md +11 -0
  168. package/resources/targets/comate/js3d/js3d/context/knowledge/Layout.md +7 -0
  169. package/resources/targets/comate/js3d/js3d/context/knowledge/ResourceLoading.md +11 -0
  170. package/resources/targets/comate/js3d/js3d/context/knowledge/Runtime.md +9 -0
  171. package/resources/targets/comate/js3d/js3d/context/skills/asset-usage-audit/SKILL.md +16 -0
  172. package/resources/targets/comate/js3d/js3d/context/skills/asset-usage-audit/scripts/compare-animations.mjs +48 -0
  173. package/resources/targets/comate/js3d/js3d/context/skills/asset-usage-audit/scripts/lib/anim.mjs +266 -0
  174. package/resources/targets/comate/js3d/js3d/context/skills/asset-usage-audit/scripts/lib/glb.mjs +241 -0
  175. package/resources/targets/comate/js3d/js3d/context/skills/asset-usage-audit/scripts/lib/scan.mjs +455 -0
  176. package/resources/targets/comate/js3d/js3d/context/skills/asset-usage-audit/scripts/scan-assets.mjs +77 -0
  177. package/resources/targets/comate/js3d/js3d/context/skills/export-config/SKILL.md +16 -0
  178. package/resources/targets/comate/js3d/js3d/context/skills/export-config/assets/tooling/cli.mjs +20 -0
  179. package/resources/targets/comate/js3d/js3d/context/skills/export-config/assets/tooling/config.d.mts +19 -0
  180. package/resources/targets/comate/js3d/js3d/context/skills/export-config/assets/tooling/config.mjs +1 -0
  181. package/resources/targets/comate/js3d/js3d/context/skills/export-config/assets/tooling/project.d.mts +6 -0
  182. package/resources/targets/comate/js3d/js3d/context/skills/export-config/assets/tooling/project.mjs +77 -0
  183. package/resources/targets/comate/js3d/js3d/context/skills/export-config/assets/tooling/vite.d.mts +2 -0
  184. package/resources/targets/comate/js3d/js3d/context/skills/export-config/assets/tooling/vite.mjs +34 -0
  185. package/resources/targets/comate/js3d/js3d/context/skills/export-config/scripts/export-config.mjs +4 -0
  186. package/resources/targets/comate/js3d/js3d/context/skills/export-config/scripts/install.mjs +89 -0
  187. package/resources/targets/comate/js3d/js3d/context/skills/export-config/scripts/panel-resource-path.mjs +106 -0
  188. package/resources/targets/comate/js3d/js3d/context/skills/index.json +31 -0
  189. package/resources/targets/comate/js3d/js3d/context/skills/performance-audit/SKILL.md +21 -0
  190. package/resources/targets/comate/js3d/js3d/context/skills/performance-audit/scripts/lib/rules.mjs +470 -0
  191. package/resources/targets/comate/js3d/js3d/context/skills/performance-audit/scripts/lib/scan.mjs +387 -0
  192. package/resources/targets/comate/js3d/js3d/context/skills/performance-audit/scripts/lib/source.mjs +398 -0
  193. package/resources/targets/comate/js3d/js3d/context/skills/performance-audit/scripts/scan-perf.mjs +130 -0
  194. package/resources/targets/comate/js3d/js3d/context/skills/visual-qa/SKILL.md +14 -0
  195. package/resources/targets/comate/js3d/js3d/project/README.md +7 -0
  196. package/resources/targets/comate/js3d/js3d/project/configs/game.controls.json +3 -0
  197. package/resources/targets/comate/js3d/js3d/project/configs/game.json +3 -0
  198. package/resources/targets/comate/js3d/js3d/project/game-runtime.json +7 -0
  199. package/resources/targets/comate/js3d/js3d/project/game.config.json +7 -0
  200. package/resources/targets/comate/js3d/js3d/project/index.html +12 -0
  201. package/resources/targets/comate/js3d/js3d/project/package.json +23 -0
  202. package/resources/targets/comate/js3d/js3d/project/runtime/lightgame/1.1.0/platform/identity/qq-ai-game-sdk.min.js +5 -0
  203. package/resources/targets/comate/js3d/js3d/project/runtime/lightgame/1.1.0/platform/identity/qq-session.mjs +208 -0
  204. package/resources/targets/comate/js3d/js3d/project/runtime/lightgame/1.1.0/platform/identity/shared.mjs +37 -0
  205. package/resources/targets/comate/js3d/js3d/project/runtime/lightgame/1.1.0/platform/platform-capture-video.mjs +227 -0
  206. package/resources/targets/comate/js3d/js3d/project/runtime/lightgame/1.1.0/platform/platform-service.d.mts +31 -0
  207. package/resources/targets/comate/js3d/js3d/project/runtime/lightgame/1.1.0/platform/platform-service.mjs +272 -0
  208. package/resources/targets/comate/js3d/js3d/project/runtime/lightgame/1.1.0/platform/platform.d.mts +79 -0
  209. package/resources/targets/comate/js3d/js3d/project/runtime/lightgame/1.1.0/platform/platform.mjs +30 -0
  210. package/resources/targets/comate/js3d/js3d/project/runtime/lightgame/1.1.0/release.json +24 -0
  211. package/resources/targets/comate/js3d/js3d/project/runtime/lightgame/1.1.0/tooling/cli.mjs +16 -0
  212. package/resources/targets/comate/js3d/js3d/project/runtime/lightgame/1.1.0/tooling/project.d.mts +4 -0
  213. package/resources/targets/comate/js3d/js3d/project/runtime/lightgame/1.1.0/tooling/project.mjs +50 -0
  214. package/resources/targets/comate/js3d/js3d/project/runtime/lightgame/1.1.0/tooling/vite.d.mts +3 -0
  215. package/resources/targets/comate/js3d/js3d/project/runtime/lightgame/1.1.0/tooling/vite.mjs +72 -0
  216. package/resources/targets/comate/js3d/js3d/project/runtime/lightgame/1.1.0/tools/assets.d.mts +24 -0
  217. package/resources/targets/comate/js3d/js3d/project/runtime/lightgame/1.1.0/tools/assets.mjs +2 -0
  218. package/resources/targets/comate/js3d/js3d/project/runtime/lightgame/1.1.0/tools/astc.d.mts +10 -0
  219. package/resources/targets/comate/js3d/js3d/project/runtime/lightgame/1.1.0/tools/astc.mjs +1 -0
  220. package/resources/targets/comate/js3d/js3d/project/runtime/lightgame/1.1.0/tools/glb.d.mts +26 -0
  221. package/resources/targets/comate/js3d/js3d/project/runtime/lightgame/1.1.0/tools/glb.mjs +351 -0
  222. package/resources/targets/comate/js3d/js3d/project/scripts/config-export/assert-asset-wiring.mjs +97 -0
  223. package/resources/targets/comate/js3d/js3d/project/scripts/config-export/panel-resource-path.mjs +106 -0
  224. package/resources/targets/comate/js3d/js3d/project/scripts/config-export/sync-asset-controls.mjs +327 -0
  225. package/resources/targets/comate/js3d/js3d/project/scripts/config-export/sync-scene-assets.mjs +191 -0
  226. package/resources/targets/comate/js3d/js3d/project/scripts/config-export.mjs +15 -0
  227. package/resources/targets/comate/js3d/js3d/project/scripts/skill-modules/export-config/cli.mjs +20 -0
  228. package/resources/targets/comate/js3d/js3d/project/scripts/skill-modules/export-config/config.d.mts +19 -0
  229. package/resources/targets/comate/js3d/js3d/project/scripts/skill-modules/export-config/config.mjs +1 -0
  230. package/resources/targets/comate/js3d/js3d/project/scripts/skill-modules/export-config/installed.json +6 -0
  231. package/resources/targets/comate/js3d/js3d/project/scripts/skill-modules/export-config/project.d.mts +6 -0
  232. package/resources/targets/comate/js3d/js3d/project/scripts/skill-modules/export-config/project.mjs +77 -0
  233. package/resources/targets/comate/js3d/js3d/project/scripts/skill-modules/export-config/vite.d.mts +2 -0
  234. package/resources/targets/comate/js3d/js3d/project/scripts/skill-modules/export-config/vite.mjs +34 -0
  235. package/resources/targets/comate/js3d/js3d/project/scripts/write-preview-ready.mjs +22 -0
  236. package/resources/targets/comate/js3d/js3d/project/src/display/ui-stage.ts +156 -0
  237. package/resources/targets/comate/js3d/js3d/project/src/display/viewport.ts +239 -0
  238. package/resources/targets/comate/js3d/js3d/project/src/main.ts +85 -0
  239. package/resources/targets/comate/js3d/js3d/project/src/platform.ts +2 -0
  240. package/resources/targets/comate/js3d/js3d/project/src/style.css +83 -0
  241. package/resources/targets/comate/js3d/js3d/project/tsconfig.json +20 -0
  242. package/resources/targets/comate/js3d/js3d/project/unified_data_control_config.json +20 -0
  243. package/resources/targets/comate/js3d/js3d/project/vite.config.ts +5 -0
  244. package/resources/targets/comate/js3d/recovery.md +17 -0
  245. package/resources/targets/comate/js3d/target.json +60 -0
  246. package/resources/targets/cursor/js/bootstrap/SKILL.md +3 -1
  247. package/resources/targets/cursor/js/craft-game-maker/SKILL.md +11 -15
  248. package/resources/targets/cursor/js/js/bundle.json +7 -7
  249. package/resources/targets/cursor/js/recovery.md +5 -1
  250. package/resources/targets/cursor/js/target.json +1 -1
  251. package/resources/targets/cursor/js3d/bootstrap/SKILL.md +3 -1
  252. package/resources/targets/cursor/js3d/craft-game-maker/SKILL.md +11 -15
  253. package/resources/targets/cursor/js3d/js3d/bundle.json +8 -8
  254. package/resources/targets/cursor/js3d/js3d/context/skills/asset-usage-audit/scripts/lib/scan.mjs +2 -2
  255. package/resources/targets/cursor/js3d/recovery.md +5 -1
  256. package/resources/targets/cursor/js3d/target.json +1 -1
  257. package/resources/targets/dsh/js/bootstrap/SKILL.md +3 -1
  258. package/resources/targets/dsh/js/craft-game-maker/SKILL.md +11 -15
  259. package/resources/targets/dsh/js/js/bundle.json +7 -7
  260. package/resources/targets/dsh/js/recovery.md +5 -1
  261. package/resources/targets/dsh/js/target.json +1 -1
  262. package/resources/targets/dsh/js3d/bootstrap/SKILL.md +3 -1
  263. package/resources/targets/dsh/js3d/craft-game-maker/SKILL.md +11 -15
  264. package/resources/targets/dsh/js3d/js3d/bundle.json +8 -8
  265. package/resources/targets/dsh/js3d/js3d/context/skills/asset-usage-audit/scripts/lib/scan.mjs +2 -2
  266. package/resources/targets/dsh/js3d/recovery.md +5 -1
  267. package/resources/targets/dsh/js3d/target.json +1 -1
  268. package/resources/targets/index.json +104 -32
  269. package/resources/targets/kimi/js/bootstrap/SKILL.md +3 -1
  270. package/resources/targets/kimi/js/craft-game-maker/SKILL.md +11 -15
  271. package/resources/targets/kimi/js/js/bundle.json +7 -7
  272. package/resources/targets/kimi/js/recovery.md +5 -1
  273. package/resources/targets/kimi/js/target.json +1 -1
  274. package/resources/targets/kimi/js3d/bootstrap/SKILL.md +3 -1
  275. package/resources/targets/kimi/js3d/craft-game-maker/SKILL.md +11 -15
  276. package/resources/targets/kimi/js3d/js3d/bundle.json +8 -8
  277. package/resources/targets/kimi/js3d/js3d/context/skills/asset-usage-audit/scripts/lib/scan.mjs +2 -2
  278. package/resources/targets/kimi/js3d/recovery.md +5 -1
  279. package/resources/targets/kimi/js3d/target.json +1 -1
  280. package/resources/targets/opencode/js/bootstrap/SKILL.md +20 -0
  281. package/resources/targets/opencode/js/context-filter-report.json +27 -0
  282. package/resources/targets/opencode/js/craft-game-maker/SKILL.md +72 -0
  283. package/resources/targets/opencode/js/craft-game-maker/js.md +10 -0
  284. package/resources/targets/opencode/js/js/bundle.json +97 -0
  285. package/resources/targets/opencode/js/js/context/AGENTS.md +29 -0
  286. package/resources/targets/opencode/js/js/context/hooks/hooks.json +14 -0
  287. package/resources/targets/opencode/js/js/context/knowledge/AssetUrl.md +9 -0
  288. package/resources/targets/opencode/js/js/context/knowledge/AssetWiring.md +7 -0
  289. package/resources/targets/opencode/js/js/context/knowledge/Layout.md +7 -0
  290. package/resources/targets/opencode/js/js/context/knowledge/Lifecycle.md +11 -0
  291. package/resources/targets/opencode/js/js/context/knowledge/ResourceLoading.md +9 -0
  292. package/resources/targets/opencode/js/js/context/skills/export-config/SKILL.md +16 -0
  293. package/resources/targets/opencode/js/js/context/skills/export-config/assets/tooling/cli.mjs +20 -0
  294. package/resources/targets/opencode/js/js/context/skills/export-config/assets/tooling/config.d.mts +19 -0
  295. package/resources/targets/opencode/js/js/context/skills/export-config/assets/tooling/config.mjs +1 -0
  296. package/resources/targets/opencode/js/js/context/skills/export-config/assets/tooling/project.d.mts +6 -0
  297. package/resources/targets/opencode/js/js/context/skills/export-config/assets/tooling/project.mjs +77 -0
  298. package/resources/targets/opencode/js/js/context/skills/export-config/assets/tooling/vite.d.mts +2 -0
  299. package/resources/targets/opencode/js/js/context/skills/export-config/assets/tooling/vite.mjs +34 -0
  300. package/resources/targets/opencode/js/js/context/skills/export-config/scripts/export-config.mjs +4 -0
  301. package/resources/targets/opencode/js/js/context/skills/export-config/scripts/install.mjs +89 -0
  302. package/resources/targets/opencode/js/js/context/skills/export-config/scripts/panel-resource-path.mjs +106 -0
  303. package/resources/targets/opencode/js/js/context/skills/index.json +19 -0
  304. package/resources/targets/opencode/js/js/context/skills/visual-qa/SKILL.md +14 -0
  305. package/resources/targets/opencode/js/js/project/README.md +7 -0
  306. package/resources/targets/opencode/js/js/project/configs/assets.json +1 -0
  307. package/resources/targets/opencode/js/js/project/configs/game.controls.json +3 -0
  308. package/resources/targets/opencode/js/js/project/configs/game.json +3 -0
  309. package/resources/targets/opencode/js/js/project/game-runtime.json +7 -0
  310. package/resources/targets/opencode/js/js/project/game.config.json +7 -0
  311. package/resources/targets/opencode/js/js/project/index.html +20 -0
  312. package/resources/targets/opencode/js/js/project/package.json +22 -0
  313. package/resources/targets/opencode/js/js/project/runtime/lightgame/1.1.0/platform/identity/qq-ai-game-sdk.min.js +5 -0
  314. package/resources/targets/opencode/js/js/project/runtime/lightgame/1.1.0/platform/identity/qq-session.mjs +208 -0
  315. package/resources/targets/opencode/js/js/project/runtime/lightgame/1.1.0/platform/identity/shared.mjs +37 -0
  316. package/resources/targets/opencode/js/js/project/runtime/lightgame/1.1.0/platform/platform-capture-video.mjs +227 -0
  317. package/resources/targets/opencode/js/js/project/runtime/lightgame/1.1.0/platform/platform-service.d.mts +31 -0
  318. package/resources/targets/opencode/js/js/project/runtime/lightgame/1.1.0/platform/platform-service.mjs +272 -0
  319. package/resources/targets/opencode/js/js/project/runtime/lightgame/1.1.0/platform/platform.d.mts +79 -0
  320. package/resources/targets/opencode/js/js/project/runtime/lightgame/1.1.0/platform/platform.mjs +29 -0
  321. package/resources/targets/opencode/js/js/project/runtime/lightgame/1.1.0/release.json +22 -0
  322. package/resources/targets/opencode/js/js/project/runtime/lightgame/1.1.0/tooling/cli.mjs +16 -0
  323. package/resources/targets/opencode/js/js/project/runtime/lightgame/1.1.0/tooling/project.d.mts +4 -0
  324. package/resources/targets/opencode/js/js/project/runtime/lightgame/1.1.0/tooling/project.mjs +50 -0
  325. package/resources/targets/opencode/js/js/project/runtime/lightgame/1.1.0/tooling/vite.d.mts +3 -0
  326. package/resources/targets/opencode/js/js/project/runtime/lightgame/1.1.0/tooling/vite.mjs +72 -0
  327. package/resources/targets/opencode/js/js/project/runtime/lightgame/1.1.0/tools/assets.d.mts +24 -0
  328. package/resources/targets/opencode/js/js/project/runtime/lightgame/1.1.0/tools/assets.mjs +2 -0
  329. package/resources/targets/opencode/js/js/project/runtime/lightgame/1.1.0/tools/astc.d.mts +10 -0
  330. package/resources/targets/opencode/js/js/project/runtime/lightgame/1.1.0/tools/astc.mjs +1 -0
  331. package/resources/targets/opencode/js/js/project/scripts/config-export/assert-asset-wiring.mjs +72 -0
  332. package/resources/targets/opencode/js/js/project/scripts/config-export/panel-resource-path.mjs +106 -0
  333. package/resources/targets/opencode/js/js/project/scripts/config-export/sync-asset-controls.mjs +316 -0
  334. package/resources/targets/opencode/js/js/project/scripts/config-export.mjs +13 -0
  335. package/resources/targets/opencode/js/js/project/scripts/skill-modules/export-config/cli.mjs +20 -0
  336. package/resources/targets/opencode/js/js/project/scripts/skill-modules/export-config/config.d.mts +19 -0
  337. package/resources/targets/opencode/js/js/project/scripts/skill-modules/export-config/config.mjs +1 -0
  338. package/resources/targets/opencode/js/js/project/scripts/skill-modules/export-config/installed.json +6 -0
  339. package/resources/targets/opencode/js/js/project/scripts/skill-modules/export-config/project.d.mts +6 -0
  340. package/resources/targets/opencode/js/js/project/scripts/skill-modules/export-config/project.mjs +77 -0
  341. package/resources/targets/opencode/js/js/project/scripts/skill-modules/export-config/vite.d.mts +2 -0
  342. package/resources/targets/opencode/js/js/project/scripts/skill-modules/export-config/vite.mjs +34 -0
  343. package/resources/targets/opencode/js/js/project/scripts/write-preview-ready.mjs +22 -0
  344. package/resources/targets/opencode/js/js/project/src/display/ui-stage.ts +156 -0
  345. package/resources/targets/opencode/js/js/project/src/display/viewport.ts +249 -0
  346. package/resources/targets/opencode/js/js/project/src/main.ts +87 -0
  347. package/resources/targets/opencode/js/js/project/src/platform.ts +2 -0
  348. package/resources/targets/opencode/js/js/project/src/scenes/LoadScene.ts +89 -0
  349. package/resources/targets/opencode/js/js/project/src/scenes/PlayScene.ts +17 -0
  350. package/resources/targets/opencode/js/js/project/src/screenUi.ts +185 -0
  351. package/resources/targets/opencode/js/js/project/src/style.css +294 -0
  352. package/resources/targets/opencode/js/js/project/tsconfig.json +20 -0
  353. package/resources/targets/opencode/js/js/project/unified_data_control_config.json +20 -0
  354. package/resources/targets/opencode/js/js/project/vite.config.ts +5 -0
  355. package/resources/targets/opencode/js/recovery.md +17 -0
  356. package/resources/targets/opencode/js/target.json +61 -0
  357. package/resources/targets/opencode/js3d/bootstrap/SKILL.md +20 -0
  358. package/resources/targets/opencode/js3d/context-filter-report.json +27 -0
  359. package/resources/targets/opencode/js3d/craft-game-maker/SKILL.md +72 -0
  360. package/resources/targets/opencode/js3d/craft-game-maker/js3d.md +12 -0
  361. package/resources/targets/opencode/js3d/js3d/bundle.json +108 -0
  362. package/resources/targets/opencode/js3d/js3d/context/AGENTS.md +30 -0
  363. package/resources/targets/opencode/js3d/js3d/context/hooks/hooks.json +14 -0
  364. package/resources/targets/opencode/js3d/js3d/context/knowledge/AssetUrl.md +9 -0
  365. package/resources/targets/opencode/js3d/js3d/context/knowledge/AssetWiring.md +7 -0
  366. package/resources/targets/opencode/js3d/js3d/context/knowledge/CodingGuide/Pitfalls.md +11 -0
  367. package/resources/targets/opencode/js3d/js3d/context/knowledge/Layout.md +7 -0
  368. package/resources/targets/opencode/js3d/js3d/context/knowledge/ResourceLoading.md +11 -0
  369. package/resources/targets/opencode/js3d/js3d/context/knowledge/Runtime.md +9 -0
  370. package/resources/targets/opencode/js3d/js3d/context/skills/asset-usage-audit/SKILL.md +16 -0
  371. package/resources/targets/opencode/js3d/js3d/context/skills/asset-usage-audit/scripts/compare-animations.mjs +48 -0
  372. package/resources/targets/opencode/js3d/js3d/context/skills/asset-usage-audit/scripts/lib/anim.mjs +266 -0
  373. package/resources/targets/opencode/js3d/js3d/context/skills/asset-usage-audit/scripts/lib/glb.mjs +241 -0
  374. package/resources/targets/opencode/js3d/js3d/context/skills/asset-usage-audit/scripts/lib/scan.mjs +455 -0
  375. package/resources/targets/opencode/js3d/js3d/context/skills/asset-usage-audit/scripts/scan-assets.mjs +77 -0
  376. package/resources/targets/opencode/js3d/js3d/context/skills/export-config/SKILL.md +16 -0
  377. package/resources/targets/opencode/js3d/js3d/context/skills/export-config/assets/tooling/cli.mjs +20 -0
  378. package/resources/targets/opencode/js3d/js3d/context/skills/export-config/assets/tooling/config.d.mts +19 -0
  379. package/resources/targets/opencode/js3d/js3d/context/skills/export-config/assets/tooling/config.mjs +1 -0
  380. package/resources/targets/opencode/js3d/js3d/context/skills/export-config/assets/tooling/project.d.mts +6 -0
  381. package/resources/targets/opencode/js3d/js3d/context/skills/export-config/assets/tooling/project.mjs +77 -0
  382. package/resources/targets/opencode/js3d/js3d/context/skills/export-config/assets/tooling/vite.d.mts +2 -0
  383. package/resources/targets/opencode/js3d/js3d/context/skills/export-config/assets/tooling/vite.mjs +34 -0
  384. package/resources/targets/opencode/js3d/js3d/context/skills/export-config/scripts/export-config.mjs +4 -0
  385. package/resources/targets/opencode/js3d/js3d/context/skills/export-config/scripts/install.mjs +89 -0
  386. package/resources/targets/opencode/js3d/js3d/context/skills/export-config/scripts/panel-resource-path.mjs +106 -0
  387. package/resources/targets/opencode/js3d/js3d/context/skills/index.json +31 -0
  388. package/resources/targets/opencode/js3d/js3d/context/skills/performance-audit/SKILL.md +21 -0
  389. package/resources/targets/opencode/js3d/js3d/context/skills/performance-audit/scripts/lib/rules.mjs +470 -0
  390. package/resources/targets/opencode/js3d/js3d/context/skills/performance-audit/scripts/lib/scan.mjs +387 -0
  391. package/resources/targets/opencode/js3d/js3d/context/skills/performance-audit/scripts/lib/source.mjs +398 -0
  392. package/resources/targets/opencode/js3d/js3d/context/skills/performance-audit/scripts/scan-perf.mjs +130 -0
  393. package/resources/targets/opencode/js3d/js3d/context/skills/visual-qa/SKILL.md +14 -0
  394. package/resources/targets/opencode/js3d/js3d/project/README.md +7 -0
  395. package/resources/targets/opencode/js3d/js3d/project/configs/game.controls.json +3 -0
  396. package/resources/targets/opencode/js3d/js3d/project/configs/game.json +3 -0
  397. package/resources/targets/opencode/js3d/js3d/project/game-runtime.json +7 -0
  398. package/resources/targets/opencode/js3d/js3d/project/game.config.json +7 -0
  399. package/resources/targets/opencode/js3d/js3d/project/index.html +12 -0
  400. package/resources/targets/opencode/js3d/js3d/project/package.json +23 -0
  401. package/resources/targets/opencode/js3d/js3d/project/runtime/lightgame/1.1.0/platform/identity/qq-ai-game-sdk.min.js +5 -0
  402. package/resources/targets/opencode/js3d/js3d/project/runtime/lightgame/1.1.0/platform/identity/qq-session.mjs +208 -0
  403. package/resources/targets/opencode/js3d/js3d/project/runtime/lightgame/1.1.0/platform/identity/shared.mjs +37 -0
  404. package/resources/targets/opencode/js3d/js3d/project/runtime/lightgame/1.1.0/platform/platform-capture-video.mjs +227 -0
  405. package/resources/targets/opencode/js3d/js3d/project/runtime/lightgame/1.1.0/platform/platform-service.d.mts +31 -0
  406. package/resources/targets/opencode/js3d/js3d/project/runtime/lightgame/1.1.0/platform/platform-service.mjs +272 -0
  407. package/resources/targets/opencode/js3d/js3d/project/runtime/lightgame/1.1.0/platform/platform.d.mts +79 -0
  408. package/resources/targets/opencode/js3d/js3d/project/runtime/lightgame/1.1.0/platform/platform.mjs +30 -0
  409. package/resources/targets/opencode/js3d/js3d/project/runtime/lightgame/1.1.0/release.json +24 -0
  410. package/resources/targets/opencode/js3d/js3d/project/runtime/lightgame/1.1.0/tooling/cli.mjs +16 -0
  411. package/resources/targets/opencode/js3d/js3d/project/runtime/lightgame/1.1.0/tooling/project.d.mts +4 -0
  412. package/resources/targets/opencode/js3d/js3d/project/runtime/lightgame/1.1.0/tooling/project.mjs +50 -0
  413. package/resources/targets/opencode/js3d/js3d/project/runtime/lightgame/1.1.0/tooling/vite.d.mts +3 -0
  414. package/resources/targets/opencode/js3d/js3d/project/runtime/lightgame/1.1.0/tooling/vite.mjs +72 -0
  415. package/resources/targets/opencode/js3d/js3d/project/runtime/lightgame/1.1.0/tools/assets.d.mts +24 -0
  416. package/resources/targets/opencode/js3d/js3d/project/runtime/lightgame/1.1.0/tools/assets.mjs +2 -0
  417. package/resources/targets/opencode/js3d/js3d/project/runtime/lightgame/1.1.0/tools/astc.d.mts +10 -0
  418. package/resources/targets/opencode/js3d/js3d/project/runtime/lightgame/1.1.0/tools/astc.mjs +1 -0
  419. package/resources/targets/opencode/js3d/js3d/project/runtime/lightgame/1.1.0/tools/glb.d.mts +26 -0
  420. package/resources/targets/opencode/js3d/js3d/project/runtime/lightgame/1.1.0/tools/glb.mjs +351 -0
  421. package/resources/targets/opencode/js3d/js3d/project/scripts/config-export/assert-asset-wiring.mjs +97 -0
  422. package/resources/targets/opencode/js3d/js3d/project/scripts/config-export/panel-resource-path.mjs +106 -0
  423. package/resources/targets/opencode/js3d/js3d/project/scripts/config-export/sync-asset-controls.mjs +327 -0
  424. package/resources/targets/opencode/js3d/js3d/project/scripts/config-export/sync-scene-assets.mjs +191 -0
  425. package/resources/targets/opencode/js3d/js3d/project/scripts/config-export.mjs +15 -0
  426. package/resources/targets/opencode/js3d/js3d/project/scripts/skill-modules/export-config/cli.mjs +20 -0
  427. package/resources/targets/opencode/js3d/js3d/project/scripts/skill-modules/export-config/config.d.mts +19 -0
  428. package/resources/targets/opencode/js3d/js3d/project/scripts/skill-modules/export-config/config.mjs +1 -0
  429. package/resources/targets/opencode/js3d/js3d/project/scripts/skill-modules/export-config/installed.json +6 -0
  430. package/resources/targets/opencode/js3d/js3d/project/scripts/skill-modules/export-config/project.d.mts +6 -0
  431. package/resources/targets/opencode/js3d/js3d/project/scripts/skill-modules/export-config/project.mjs +77 -0
  432. package/resources/targets/opencode/js3d/js3d/project/scripts/skill-modules/export-config/vite.d.mts +2 -0
  433. package/resources/targets/opencode/js3d/js3d/project/scripts/skill-modules/export-config/vite.mjs +34 -0
  434. package/resources/targets/opencode/js3d/js3d/project/scripts/write-preview-ready.mjs +22 -0
  435. package/resources/targets/opencode/js3d/js3d/project/src/display/ui-stage.ts +156 -0
  436. package/resources/targets/opencode/js3d/js3d/project/src/display/viewport.ts +239 -0
  437. package/resources/targets/opencode/js3d/js3d/project/src/main.ts +85 -0
  438. package/resources/targets/opencode/js3d/js3d/project/src/platform.ts +2 -0
  439. package/resources/targets/opencode/js3d/js3d/project/src/style.css +83 -0
  440. package/resources/targets/opencode/js3d/js3d/project/tsconfig.json +20 -0
  441. package/resources/targets/opencode/js3d/js3d/project/unified_data_control_config.json +20 -0
  442. package/resources/targets/opencode/js3d/js3d/project/vite.config.ts +5 -0
  443. package/resources/targets/opencode/js3d/recovery.md +17 -0
  444. package/resources/targets/opencode/js3d/target.json +60 -0
  445. package/resources/targets/qoder/js/bootstrap/SKILL.md +20 -0
  446. package/resources/targets/qoder/js/context-filter-report.json +27 -0
  447. package/resources/targets/qoder/js/craft-game-maker/SKILL.md +72 -0
  448. package/resources/targets/qoder/js/craft-game-maker/js.md +10 -0
  449. package/resources/targets/qoder/js/js/bundle.json +97 -0
  450. package/resources/targets/qoder/js/js/context/AGENTS.md +31 -0
  451. package/resources/targets/qoder/js/js/context/hooks/hooks.json +14 -0
  452. package/resources/targets/qoder/js/js/context/knowledge/AssetUrl.md +9 -0
  453. package/resources/targets/qoder/js/js/context/knowledge/AssetWiring.md +7 -0
  454. package/resources/targets/qoder/js/js/context/knowledge/Layout.md +7 -0
  455. package/resources/targets/qoder/js/js/context/knowledge/Lifecycle.md +11 -0
  456. package/resources/targets/qoder/js/js/context/knowledge/ResourceLoading.md +9 -0
  457. package/resources/targets/qoder/js/js/context/skills/export-config/SKILL.md +16 -0
  458. package/resources/targets/qoder/js/js/context/skills/export-config/assets/tooling/cli.mjs +20 -0
  459. package/resources/targets/qoder/js/js/context/skills/export-config/assets/tooling/config.d.mts +19 -0
  460. package/resources/targets/qoder/js/js/context/skills/export-config/assets/tooling/config.mjs +1 -0
  461. package/resources/targets/qoder/js/js/context/skills/export-config/assets/tooling/project.d.mts +6 -0
  462. package/resources/targets/qoder/js/js/context/skills/export-config/assets/tooling/project.mjs +77 -0
  463. package/resources/targets/qoder/js/js/context/skills/export-config/assets/tooling/vite.d.mts +2 -0
  464. package/resources/targets/qoder/js/js/context/skills/export-config/assets/tooling/vite.mjs +34 -0
  465. package/resources/targets/qoder/js/js/context/skills/export-config/scripts/export-config.mjs +4 -0
  466. package/resources/targets/qoder/js/js/context/skills/export-config/scripts/install.mjs +89 -0
  467. package/resources/targets/qoder/js/js/context/skills/export-config/scripts/panel-resource-path.mjs +106 -0
  468. package/resources/targets/qoder/js/js/context/skills/index.json +19 -0
  469. package/resources/targets/qoder/js/js/context/skills/visual-qa/SKILL.md +14 -0
  470. package/resources/targets/qoder/js/js/project/README.md +7 -0
  471. package/resources/targets/qoder/js/js/project/configs/assets.json +1 -0
  472. package/resources/targets/qoder/js/js/project/configs/game.controls.json +3 -0
  473. package/resources/targets/qoder/js/js/project/configs/game.json +3 -0
  474. package/resources/targets/qoder/js/js/project/game-runtime.json +7 -0
  475. package/resources/targets/qoder/js/js/project/game.config.json +7 -0
  476. package/resources/targets/qoder/js/js/project/index.html +20 -0
  477. package/resources/targets/qoder/js/js/project/package.json +22 -0
  478. package/resources/targets/qoder/js/js/project/runtime/lightgame/1.1.0/platform/identity/qq-ai-game-sdk.min.js +5 -0
  479. package/resources/targets/qoder/js/js/project/runtime/lightgame/1.1.0/platform/identity/qq-session.mjs +208 -0
  480. package/resources/targets/qoder/js/js/project/runtime/lightgame/1.1.0/platform/identity/shared.mjs +37 -0
  481. package/resources/targets/qoder/js/js/project/runtime/lightgame/1.1.0/platform/platform-capture-video.mjs +227 -0
  482. package/resources/targets/qoder/js/js/project/runtime/lightgame/1.1.0/platform/platform-service.d.mts +31 -0
  483. package/resources/targets/qoder/js/js/project/runtime/lightgame/1.1.0/platform/platform-service.mjs +272 -0
  484. package/resources/targets/qoder/js/js/project/runtime/lightgame/1.1.0/platform/platform.d.mts +79 -0
  485. package/resources/targets/qoder/js/js/project/runtime/lightgame/1.1.0/platform/platform.mjs +29 -0
  486. package/resources/targets/qoder/js/js/project/runtime/lightgame/1.1.0/release.json +22 -0
  487. package/resources/targets/qoder/js/js/project/runtime/lightgame/1.1.0/tooling/cli.mjs +16 -0
  488. package/resources/targets/qoder/js/js/project/runtime/lightgame/1.1.0/tooling/project.d.mts +4 -0
  489. package/resources/targets/qoder/js/js/project/runtime/lightgame/1.1.0/tooling/project.mjs +50 -0
  490. package/resources/targets/qoder/js/js/project/runtime/lightgame/1.1.0/tooling/vite.d.mts +3 -0
  491. package/resources/targets/qoder/js/js/project/runtime/lightgame/1.1.0/tooling/vite.mjs +72 -0
  492. package/resources/targets/qoder/js/js/project/runtime/lightgame/1.1.0/tools/assets.d.mts +24 -0
  493. package/resources/targets/qoder/js/js/project/runtime/lightgame/1.1.0/tools/assets.mjs +2 -0
  494. package/resources/targets/qoder/js/js/project/runtime/lightgame/1.1.0/tools/astc.d.mts +10 -0
  495. package/resources/targets/qoder/js/js/project/runtime/lightgame/1.1.0/tools/astc.mjs +1 -0
  496. package/resources/targets/qoder/js/js/project/scripts/config-export/assert-asset-wiring.mjs +72 -0
  497. package/resources/targets/qoder/js/js/project/scripts/config-export/panel-resource-path.mjs +106 -0
  498. package/resources/targets/qoder/js/js/project/scripts/config-export/sync-asset-controls.mjs +316 -0
  499. package/resources/targets/qoder/js/js/project/scripts/config-export.mjs +13 -0
  500. package/resources/targets/qoder/js/js/project/scripts/skill-modules/export-config/cli.mjs +20 -0
  501. package/resources/targets/qoder/js/js/project/scripts/skill-modules/export-config/config.d.mts +19 -0
  502. package/resources/targets/qoder/js/js/project/scripts/skill-modules/export-config/config.mjs +1 -0
  503. package/resources/targets/qoder/js/js/project/scripts/skill-modules/export-config/installed.json +6 -0
  504. package/resources/targets/qoder/js/js/project/scripts/skill-modules/export-config/project.d.mts +6 -0
  505. package/resources/targets/qoder/js/js/project/scripts/skill-modules/export-config/project.mjs +77 -0
  506. package/resources/targets/qoder/js/js/project/scripts/skill-modules/export-config/vite.d.mts +2 -0
  507. package/resources/targets/qoder/js/js/project/scripts/skill-modules/export-config/vite.mjs +34 -0
  508. package/resources/targets/qoder/js/js/project/scripts/write-preview-ready.mjs +22 -0
  509. package/resources/targets/qoder/js/js/project/src/display/ui-stage.ts +156 -0
  510. package/resources/targets/qoder/js/js/project/src/display/viewport.ts +249 -0
  511. package/resources/targets/qoder/js/js/project/src/main.ts +87 -0
  512. package/resources/targets/qoder/js/js/project/src/platform.ts +2 -0
  513. package/resources/targets/qoder/js/js/project/src/scenes/LoadScene.ts +89 -0
  514. package/resources/targets/qoder/js/js/project/src/scenes/PlayScene.ts +17 -0
  515. package/resources/targets/qoder/js/js/project/src/screenUi.ts +185 -0
  516. package/resources/targets/qoder/js/js/project/src/style.css +294 -0
  517. package/resources/targets/qoder/js/js/project/tsconfig.json +20 -0
  518. package/resources/targets/qoder/js/js/project/unified_data_control_config.json +20 -0
  519. package/resources/targets/qoder/js/js/project/vite.config.ts +5 -0
  520. package/resources/targets/qoder/js/recovery.md +17 -0
  521. package/resources/targets/qoder/js/target.json +61 -0
  522. package/resources/targets/qoder/js3d/bootstrap/SKILL.md +20 -0
  523. package/resources/targets/qoder/js3d/context-filter-report.json +27 -0
  524. package/resources/targets/qoder/js3d/craft-game-maker/SKILL.md +72 -0
  525. package/resources/targets/qoder/js3d/craft-game-maker/js3d.md +12 -0
  526. package/resources/targets/qoder/js3d/js3d/bundle.json +108 -0
  527. package/resources/targets/qoder/js3d/js3d/context/AGENTS.md +32 -0
  528. package/resources/targets/qoder/js3d/js3d/context/hooks/hooks.json +14 -0
  529. package/resources/targets/qoder/js3d/js3d/context/knowledge/AssetUrl.md +9 -0
  530. package/resources/targets/qoder/js3d/js3d/context/knowledge/AssetWiring.md +7 -0
  531. package/resources/targets/qoder/js3d/js3d/context/knowledge/CodingGuide/Pitfalls.md +11 -0
  532. package/resources/targets/qoder/js3d/js3d/context/knowledge/Layout.md +7 -0
  533. package/resources/targets/qoder/js3d/js3d/context/knowledge/ResourceLoading.md +11 -0
  534. package/resources/targets/qoder/js3d/js3d/context/knowledge/Runtime.md +9 -0
  535. package/resources/targets/qoder/js3d/js3d/context/skills/asset-usage-audit/SKILL.md +16 -0
  536. package/resources/targets/qoder/js3d/js3d/context/skills/asset-usage-audit/scripts/compare-animations.mjs +48 -0
  537. package/resources/targets/qoder/js3d/js3d/context/skills/asset-usage-audit/scripts/lib/anim.mjs +266 -0
  538. package/resources/targets/qoder/js3d/js3d/context/skills/asset-usage-audit/scripts/lib/glb.mjs +241 -0
  539. package/resources/targets/qoder/js3d/js3d/context/skills/asset-usage-audit/scripts/lib/scan.mjs +455 -0
  540. package/resources/targets/qoder/js3d/js3d/context/skills/asset-usage-audit/scripts/scan-assets.mjs +77 -0
  541. package/resources/targets/qoder/js3d/js3d/context/skills/export-config/SKILL.md +16 -0
  542. package/resources/targets/qoder/js3d/js3d/context/skills/export-config/assets/tooling/cli.mjs +20 -0
  543. package/resources/targets/qoder/js3d/js3d/context/skills/export-config/assets/tooling/config.d.mts +19 -0
  544. package/resources/targets/qoder/js3d/js3d/context/skills/export-config/assets/tooling/config.mjs +1 -0
  545. package/resources/targets/qoder/js3d/js3d/context/skills/export-config/assets/tooling/project.d.mts +6 -0
  546. package/resources/targets/qoder/js3d/js3d/context/skills/export-config/assets/tooling/project.mjs +77 -0
  547. package/resources/targets/qoder/js3d/js3d/context/skills/export-config/assets/tooling/vite.d.mts +2 -0
  548. package/resources/targets/qoder/js3d/js3d/context/skills/export-config/assets/tooling/vite.mjs +34 -0
  549. package/resources/targets/qoder/js3d/js3d/context/skills/export-config/scripts/export-config.mjs +4 -0
  550. package/resources/targets/qoder/js3d/js3d/context/skills/export-config/scripts/install.mjs +89 -0
  551. package/resources/targets/qoder/js3d/js3d/context/skills/export-config/scripts/panel-resource-path.mjs +106 -0
  552. package/resources/targets/qoder/js3d/js3d/context/skills/index.json +31 -0
  553. package/resources/targets/qoder/js3d/js3d/context/skills/performance-audit/SKILL.md +21 -0
  554. package/resources/targets/qoder/js3d/js3d/context/skills/performance-audit/scripts/lib/rules.mjs +470 -0
  555. package/resources/targets/qoder/js3d/js3d/context/skills/performance-audit/scripts/lib/scan.mjs +387 -0
  556. package/resources/targets/qoder/js3d/js3d/context/skills/performance-audit/scripts/lib/source.mjs +398 -0
  557. package/resources/targets/qoder/js3d/js3d/context/skills/performance-audit/scripts/scan-perf.mjs +130 -0
  558. package/resources/targets/qoder/js3d/js3d/context/skills/visual-qa/SKILL.md +14 -0
  559. package/resources/targets/qoder/js3d/js3d/project/README.md +7 -0
  560. package/resources/targets/qoder/js3d/js3d/project/configs/game.controls.json +3 -0
  561. package/resources/targets/qoder/js3d/js3d/project/configs/game.json +3 -0
  562. package/resources/targets/qoder/js3d/js3d/project/game-runtime.json +7 -0
  563. package/resources/targets/qoder/js3d/js3d/project/game.config.json +7 -0
  564. package/resources/targets/qoder/js3d/js3d/project/index.html +12 -0
  565. package/resources/targets/qoder/js3d/js3d/project/package.json +23 -0
  566. package/resources/targets/qoder/js3d/js3d/project/runtime/lightgame/1.1.0/platform/identity/qq-ai-game-sdk.min.js +5 -0
  567. package/resources/targets/qoder/js3d/js3d/project/runtime/lightgame/1.1.0/platform/identity/qq-session.mjs +208 -0
  568. package/resources/targets/qoder/js3d/js3d/project/runtime/lightgame/1.1.0/platform/identity/shared.mjs +37 -0
  569. package/resources/targets/qoder/js3d/js3d/project/runtime/lightgame/1.1.0/platform/platform-capture-video.mjs +227 -0
  570. package/resources/targets/qoder/js3d/js3d/project/runtime/lightgame/1.1.0/platform/platform-service.d.mts +31 -0
  571. package/resources/targets/qoder/js3d/js3d/project/runtime/lightgame/1.1.0/platform/platform-service.mjs +272 -0
  572. package/resources/targets/qoder/js3d/js3d/project/runtime/lightgame/1.1.0/platform/platform.d.mts +79 -0
  573. package/resources/targets/qoder/js3d/js3d/project/runtime/lightgame/1.1.0/platform/platform.mjs +30 -0
  574. package/resources/targets/qoder/js3d/js3d/project/runtime/lightgame/1.1.0/release.json +24 -0
  575. package/resources/targets/qoder/js3d/js3d/project/runtime/lightgame/1.1.0/tooling/cli.mjs +16 -0
  576. package/resources/targets/qoder/js3d/js3d/project/runtime/lightgame/1.1.0/tooling/project.d.mts +4 -0
  577. package/resources/targets/qoder/js3d/js3d/project/runtime/lightgame/1.1.0/tooling/project.mjs +50 -0
  578. package/resources/targets/qoder/js3d/js3d/project/runtime/lightgame/1.1.0/tooling/vite.d.mts +3 -0
  579. package/resources/targets/qoder/js3d/js3d/project/runtime/lightgame/1.1.0/tooling/vite.mjs +72 -0
  580. package/resources/targets/qoder/js3d/js3d/project/runtime/lightgame/1.1.0/tools/assets.d.mts +24 -0
  581. package/resources/targets/qoder/js3d/js3d/project/runtime/lightgame/1.1.0/tools/assets.mjs +2 -0
  582. package/resources/targets/qoder/js3d/js3d/project/runtime/lightgame/1.1.0/tools/astc.d.mts +10 -0
  583. package/resources/targets/qoder/js3d/js3d/project/runtime/lightgame/1.1.0/tools/astc.mjs +1 -0
  584. package/resources/targets/qoder/js3d/js3d/project/runtime/lightgame/1.1.0/tools/glb.d.mts +26 -0
  585. package/resources/targets/qoder/js3d/js3d/project/runtime/lightgame/1.1.0/tools/glb.mjs +351 -0
  586. package/resources/targets/qoder/js3d/js3d/project/scripts/config-export/assert-asset-wiring.mjs +97 -0
  587. package/resources/targets/qoder/js3d/js3d/project/scripts/config-export/panel-resource-path.mjs +106 -0
  588. package/resources/targets/qoder/js3d/js3d/project/scripts/config-export/sync-asset-controls.mjs +327 -0
  589. package/resources/targets/qoder/js3d/js3d/project/scripts/config-export/sync-scene-assets.mjs +191 -0
  590. package/resources/targets/qoder/js3d/js3d/project/scripts/config-export.mjs +15 -0
  591. package/resources/targets/qoder/js3d/js3d/project/scripts/skill-modules/export-config/cli.mjs +20 -0
  592. package/resources/targets/qoder/js3d/js3d/project/scripts/skill-modules/export-config/config.d.mts +19 -0
  593. package/resources/targets/qoder/js3d/js3d/project/scripts/skill-modules/export-config/config.mjs +1 -0
  594. package/resources/targets/qoder/js3d/js3d/project/scripts/skill-modules/export-config/installed.json +6 -0
  595. package/resources/targets/qoder/js3d/js3d/project/scripts/skill-modules/export-config/project.d.mts +6 -0
  596. package/resources/targets/qoder/js3d/js3d/project/scripts/skill-modules/export-config/project.mjs +77 -0
  597. package/resources/targets/qoder/js3d/js3d/project/scripts/skill-modules/export-config/vite.d.mts +2 -0
  598. package/resources/targets/qoder/js3d/js3d/project/scripts/skill-modules/export-config/vite.mjs +34 -0
  599. package/resources/targets/qoder/js3d/js3d/project/scripts/write-preview-ready.mjs +22 -0
  600. package/resources/targets/qoder/js3d/js3d/project/src/display/ui-stage.ts +156 -0
  601. package/resources/targets/qoder/js3d/js3d/project/src/display/viewport.ts +239 -0
  602. package/resources/targets/qoder/js3d/js3d/project/src/main.ts +85 -0
  603. package/resources/targets/qoder/js3d/js3d/project/src/platform.ts +2 -0
  604. package/resources/targets/qoder/js3d/js3d/project/src/style.css +83 -0
  605. package/resources/targets/qoder/js3d/js3d/project/tsconfig.json +20 -0
  606. package/resources/targets/qoder/js3d/js3d/project/unified_data_control_config.json +20 -0
  607. package/resources/targets/qoder/js3d/js3d/project/vite.config.ts +5 -0
  608. package/resources/targets/qoder/js3d/recovery.md +17 -0
  609. package/resources/targets/qoder/js3d/target.json +60 -0
  610. package/resources/targets/qoder-cn/js/bootstrap/SKILL.md +20 -0
  611. package/resources/targets/qoder-cn/js/context-filter-report.json +27 -0
  612. package/resources/targets/qoder-cn/js/craft-game-maker/SKILL.md +72 -0
  613. package/resources/targets/qoder-cn/js/craft-game-maker/js.md +10 -0
  614. package/resources/targets/qoder-cn/js/js/bundle.json +97 -0
  615. package/resources/targets/qoder-cn/js/js/context/AGENTS.md +31 -0
  616. package/resources/targets/qoder-cn/js/js/context/hooks/hooks.json +14 -0
  617. package/resources/targets/qoder-cn/js/js/context/knowledge/AssetUrl.md +9 -0
  618. package/resources/targets/qoder-cn/js/js/context/knowledge/AssetWiring.md +7 -0
  619. package/resources/targets/qoder-cn/js/js/context/knowledge/Layout.md +7 -0
  620. package/resources/targets/qoder-cn/js/js/context/knowledge/Lifecycle.md +11 -0
  621. package/resources/targets/qoder-cn/js/js/context/knowledge/ResourceLoading.md +9 -0
  622. package/resources/targets/qoder-cn/js/js/context/skills/export-config/SKILL.md +16 -0
  623. package/resources/targets/qoder-cn/js/js/context/skills/export-config/assets/tooling/cli.mjs +20 -0
  624. package/resources/targets/qoder-cn/js/js/context/skills/export-config/assets/tooling/config.d.mts +19 -0
  625. package/resources/targets/qoder-cn/js/js/context/skills/export-config/assets/tooling/config.mjs +1 -0
  626. package/resources/targets/qoder-cn/js/js/context/skills/export-config/assets/tooling/project.d.mts +6 -0
  627. package/resources/targets/qoder-cn/js/js/context/skills/export-config/assets/tooling/project.mjs +77 -0
  628. package/resources/targets/qoder-cn/js/js/context/skills/export-config/assets/tooling/vite.d.mts +2 -0
  629. package/resources/targets/qoder-cn/js/js/context/skills/export-config/assets/tooling/vite.mjs +34 -0
  630. package/resources/targets/qoder-cn/js/js/context/skills/export-config/scripts/export-config.mjs +4 -0
  631. package/resources/targets/qoder-cn/js/js/context/skills/export-config/scripts/install.mjs +89 -0
  632. package/resources/targets/qoder-cn/js/js/context/skills/export-config/scripts/panel-resource-path.mjs +106 -0
  633. package/resources/targets/qoder-cn/js/js/context/skills/index.json +19 -0
  634. package/resources/targets/qoder-cn/js/js/context/skills/visual-qa/SKILL.md +14 -0
  635. package/resources/targets/qoder-cn/js/js/project/README.md +7 -0
  636. package/resources/targets/qoder-cn/js/js/project/configs/assets.json +1 -0
  637. package/resources/targets/qoder-cn/js/js/project/configs/game.controls.json +3 -0
  638. package/resources/targets/qoder-cn/js/js/project/configs/game.json +3 -0
  639. package/resources/targets/qoder-cn/js/js/project/game-runtime.json +7 -0
  640. package/resources/targets/qoder-cn/js/js/project/game.config.json +7 -0
  641. package/resources/targets/qoder-cn/js/js/project/index.html +20 -0
  642. package/resources/targets/qoder-cn/js/js/project/package.json +22 -0
  643. package/resources/targets/qoder-cn/js/js/project/runtime/lightgame/1.1.0/platform/identity/qq-ai-game-sdk.min.js +5 -0
  644. package/resources/targets/qoder-cn/js/js/project/runtime/lightgame/1.1.0/platform/identity/qq-session.mjs +208 -0
  645. package/resources/targets/qoder-cn/js/js/project/runtime/lightgame/1.1.0/platform/identity/shared.mjs +37 -0
  646. package/resources/targets/qoder-cn/js/js/project/runtime/lightgame/1.1.0/platform/platform-capture-video.mjs +227 -0
  647. package/resources/targets/qoder-cn/js/js/project/runtime/lightgame/1.1.0/platform/platform-service.d.mts +31 -0
  648. package/resources/targets/qoder-cn/js/js/project/runtime/lightgame/1.1.0/platform/platform-service.mjs +272 -0
  649. package/resources/targets/qoder-cn/js/js/project/runtime/lightgame/1.1.0/platform/platform.d.mts +79 -0
  650. package/resources/targets/qoder-cn/js/js/project/runtime/lightgame/1.1.0/platform/platform.mjs +29 -0
  651. package/resources/targets/qoder-cn/js/js/project/runtime/lightgame/1.1.0/release.json +22 -0
  652. package/resources/targets/qoder-cn/js/js/project/runtime/lightgame/1.1.0/tooling/cli.mjs +16 -0
  653. package/resources/targets/qoder-cn/js/js/project/runtime/lightgame/1.1.0/tooling/project.d.mts +4 -0
  654. package/resources/targets/qoder-cn/js/js/project/runtime/lightgame/1.1.0/tooling/project.mjs +50 -0
  655. package/resources/targets/qoder-cn/js/js/project/runtime/lightgame/1.1.0/tooling/vite.d.mts +3 -0
  656. package/resources/targets/qoder-cn/js/js/project/runtime/lightgame/1.1.0/tooling/vite.mjs +72 -0
  657. package/resources/targets/qoder-cn/js/js/project/runtime/lightgame/1.1.0/tools/assets.d.mts +24 -0
  658. package/resources/targets/qoder-cn/js/js/project/runtime/lightgame/1.1.0/tools/assets.mjs +2 -0
  659. package/resources/targets/qoder-cn/js/js/project/runtime/lightgame/1.1.0/tools/astc.d.mts +10 -0
  660. package/resources/targets/qoder-cn/js/js/project/runtime/lightgame/1.1.0/tools/astc.mjs +1 -0
  661. package/resources/targets/qoder-cn/js/js/project/scripts/config-export/assert-asset-wiring.mjs +72 -0
  662. package/resources/targets/qoder-cn/js/js/project/scripts/config-export/panel-resource-path.mjs +106 -0
  663. package/resources/targets/qoder-cn/js/js/project/scripts/config-export/sync-asset-controls.mjs +316 -0
  664. package/resources/targets/qoder-cn/js/js/project/scripts/config-export.mjs +13 -0
  665. package/resources/targets/qoder-cn/js/js/project/scripts/skill-modules/export-config/cli.mjs +20 -0
  666. package/resources/targets/qoder-cn/js/js/project/scripts/skill-modules/export-config/config.d.mts +19 -0
  667. package/resources/targets/qoder-cn/js/js/project/scripts/skill-modules/export-config/config.mjs +1 -0
  668. package/resources/targets/qoder-cn/js/js/project/scripts/skill-modules/export-config/installed.json +6 -0
  669. package/resources/targets/qoder-cn/js/js/project/scripts/skill-modules/export-config/project.d.mts +6 -0
  670. package/resources/targets/qoder-cn/js/js/project/scripts/skill-modules/export-config/project.mjs +77 -0
  671. package/resources/targets/qoder-cn/js/js/project/scripts/skill-modules/export-config/vite.d.mts +2 -0
  672. package/resources/targets/qoder-cn/js/js/project/scripts/skill-modules/export-config/vite.mjs +34 -0
  673. package/resources/targets/qoder-cn/js/js/project/scripts/write-preview-ready.mjs +22 -0
  674. package/resources/targets/qoder-cn/js/js/project/src/display/ui-stage.ts +156 -0
  675. package/resources/targets/qoder-cn/js/js/project/src/display/viewport.ts +249 -0
  676. package/resources/targets/qoder-cn/js/js/project/src/main.ts +87 -0
  677. package/resources/targets/qoder-cn/js/js/project/src/platform.ts +2 -0
  678. package/resources/targets/qoder-cn/js/js/project/src/scenes/LoadScene.ts +89 -0
  679. package/resources/targets/qoder-cn/js/js/project/src/scenes/PlayScene.ts +17 -0
  680. package/resources/targets/qoder-cn/js/js/project/src/screenUi.ts +185 -0
  681. package/resources/targets/qoder-cn/js/js/project/src/style.css +294 -0
  682. package/resources/targets/qoder-cn/js/js/project/tsconfig.json +20 -0
  683. package/resources/targets/qoder-cn/js/js/project/unified_data_control_config.json +20 -0
  684. package/resources/targets/qoder-cn/js/js/project/vite.config.ts +5 -0
  685. package/resources/targets/qoder-cn/js/recovery.md +17 -0
  686. package/resources/targets/qoder-cn/js/target.json +61 -0
  687. package/resources/targets/qoder-cn/js3d/bootstrap/SKILL.md +20 -0
  688. package/resources/targets/qoder-cn/js3d/context-filter-report.json +27 -0
  689. package/resources/targets/qoder-cn/js3d/craft-game-maker/SKILL.md +72 -0
  690. package/resources/targets/qoder-cn/js3d/craft-game-maker/js3d.md +12 -0
  691. package/resources/targets/qoder-cn/js3d/js3d/bundle.json +108 -0
  692. package/resources/targets/qoder-cn/js3d/js3d/context/AGENTS.md +32 -0
  693. package/resources/targets/qoder-cn/js3d/js3d/context/hooks/hooks.json +14 -0
  694. package/resources/targets/qoder-cn/js3d/js3d/context/knowledge/AssetUrl.md +9 -0
  695. package/resources/targets/qoder-cn/js3d/js3d/context/knowledge/AssetWiring.md +7 -0
  696. package/resources/targets/qoder-cn/js3d/js3d/context/knowledge/CodingGuide/Pitfalls.md +11 -0
  697. package/resources/targets/qoder-cn/js3d/js3d/context/knowledge/Layout.md +7 -0
  698. package/resources/targets/qoder-cn/js3d/js3d/context/knowledge/ResourceLoading.md +11 -0
  699. package/resources/targets/qoder-cn/js3d/js3d/context/knowledge/Runtime.md +9 -0
  700. package/resources/targets/qoder-cn/js3d/js3d/context/skills/asset-usage-audit/SKILL.md +16 -0
  701. package/resources/targets/qoder-cn/js3d/js3d/context/skills/asset-usage-audit/scripts/compare-animations.mjs +48 -0
  702. package/resources/targets/qoder-cn/js3d/js3d/context/skills/asset-usage-audit/scripts/lib/anim.mjs +266 -0
  703. package/resources/targets/qoder-cn/js3d/js3d/context/skills/asset-usage-audit/scripts/lib/glb.mjs +241 -0
  704. package/resources/targets/qoder-cn/js3d/js3d/context/skills/asset-usage-audit/scripts/lib/scan.mjs +455 -0
  705. package/resources/targets/qoder-cn/js3d/js3d/context/skills/asset-usage-audit/scripts/scan-assets.mjs +77 -0
  706. package/resources/targets/qoder-cn/js3d/js3d/context/skills/export-config/SKILL.md +16 -0
  707. package/resources/targets/qoder-cn/js3d/js3d/context/skills/export-config/assets/tooling/cli.mjs +20 -0
  708. package/resources/targets/qoder-cn/js3d/js3d/context/skills/export-config/assets/tooling/config.d.mts +19 -0
  709. package/resources/targets/qoder-cn/js3d/js3d/context/skills/export-config/assets/tooling/config.mjs +1 -0
  710. package/resources/targets/qoder-cn/js3d/js3d/context/skills/export-config/assets/tooling/project.d.mts +6 -0
  711. package/resources/targets/qoder-cn/js3d/js3d/context/skills/export-config/assets/tooling/project.mjs +77 -0
  712. package/resources/targets/qoder-cn/js3d/js3d/context/skills/export-config/assets/tooling/vite.d.mts +2 -0
  713. package/resources/targets/qoder-cn/js3d/js3d/context/skills/export-config/assets/tooling/vite.mjs +34 -0
  714. package/resources/targets/qoder-cn/js3d/js3d/context/skills/export-config/scripts/export-config.mjs +4 -0
  715. package/resources/targets/qoder-cn/js3d/js3d/context/skills/export-config/scripts/install.mjs +89 -0
  716. package/resources/targets/qoder-cn/js3d/js3d/context/skills/export-config/scripts/panel-resource-path.mjs +106 -0
  717. package/resources/targets/qoder-cn/js3d/js3d/context/skills/index.json +31 -0
  718. package/resources/targets/qoder-cn/js3d/js3d/context/skills/performance-audit/SKILL.md +21 -0
  719. package/resources/targets/qoder-cn/js3d/js3d/context/skills/performance-audit/scripts/lib/rules.mjs +470 -0
  720. package/resources/targets/qoder-cn/js3d/js3d/context/skills/performance-audit/scripts/lib/scan.mjs +387 -0
  721. package/resources/targets/qoder-cn/js3d/js3d/context/skills/performance-audit/scripts/lib/source.mjs +398 -0
  722. package/resources/targets/qoder-cn/js3d/js3d/context/skills/performance-audit/scripts/scan-perf.mjs +130 -0
  723. package/resources/targets/qoder-cn/js3d/js3d/context/skills/visual-qa/SKILL.md +14 -0
  724. package/resources/targets/qoder-cn/js3d/js3d/project/README.md +7 -0
  725. package/resources/targets/qoder-cn/js3d/js3d/project/configs/game.controls.json +3 -0
  726. package/resources/targets/qoder-cn/js3d/js3d/project/configs/game.json +3 -0
  727. package/resources/targets/qoder-cn/js3d/js3d/project/game-runtime.json +7 -0
  728. package/resources/targets/qoder-cn/js3d/js3d/project/game.config.json +7 -0
  729. package/resources/targets/qoder-cn/js3d/js3d/project/index.html +12 -0
  730. package/resources/targets/qoder-cn/js3d/js3d/project/package.json +23 -0
  731. package/resources/targets/qoder-cn/js3d/js3d/project/runtime/lightgame/1.1.0/platform/identity/qq-ai-game-sdk.min.js +5 -0
  732. package/resources/targets/qoder-cn/js3d/js3d/project/runtime/lightgame/1.1.0/platform/identity/qq-session.mjs +208 -0
  733. package/resources/targets/qoder-cn/js3d/js3d/project/runtime/lightgame/1.1.0/platform/identity/shared.mjs +37 -0
  734. package/resources/targets/qoder-cn/js3d/js3d/project/runtime/lightgame/1.1.0/platform/platform-capture-video.mjs +227 -0
  735. package/resources/targets/qoder-cn/js3d/js3d/project/runtime/lightgame/1.1.0/platform/platform-service.d.mts +31 -0
  736. package/resources/targets/qoder-cn/js3d/js3d/project/runtime/lightgame/1.1.0/platform/platform-service.mjs +272 -0
  737. package/resources/targets/qoder-cn/js3d/js3d/project/runtime/lightgame/1.1.0/platform/platform.d.mts +79 -0
  738. package/resources/targets/qoder-cn/js3d/js3d/project/runtime/lightgame/1.1.0/platform/platform.mjs +30 -0
  739. package/resources/targets/qoder-cn/js3d/js3d/project/runtime/lightgame/1.1.0/release.json +24 -0
  740. package/resources/targets/qoder-cn/js3d/js3d/project/runtime/lightgame/1.1.0/tooling/cli.mjs +16 -0
  741. package/resources/targets/qoder-cn/js3d/js3d/project/runtime/lightgame/1.1.0/tooling/project.d.mts +4 -0
  742. package/resources/targets/qoder-cn/js3d/js3d/project/runtime/lightgame/1.1.0/tooling/project.mjs +50 -0
  743. package/resources/targets/qoder-cn/js3d/js3d/project/runtime/lightgame/1.1.0/tooling/vite.d.mts +3 -0
  744. package/resources/targets/qoder-cn/js3d/js3d/project/runtime/lightgame/1.1.0/tooling/vite.mjs +72 -0
  745. package/resources/targets/qoder-cn/js3d/js3d/project/runtime/lightgame/1.1.0/tools/assets.d.mts +24 -0
  746. package/resources/targets/qoder-cn/js3d/js3d/project/runtime/lightgame/1.1.0/tools/assets.mjs +2 -0
  747. package/resources/targets/qoder-cn/js3d/js3d/project/runtime/lightgame/1.1.0/tools/astc.d.mts +10 -0
  748. package/resources/targets/qoder-cn/js3d/js3d/project/runtime/lightgame/1.1.0/tools/astc.mjs +1 -0
  749. package/resources/targets/qoder-cn/js3d/js3d/project/runtime/lightgame/1.1.0/tools/glb.d.mts +26 -0
  750. package/resources/targets/qoder-cn/js3d/js3d/project/runtime/lightgame/1.1.0/tools/glb.mjs +351 -0
  751. package/resources/targets/qoder-cn/js3d/js3d/project/scripts/config-export/assert-asset-wiring.mjs +97 -0
  752. package/resources/targets/qoder-cn/js3d/js3d/project/scripts/config-export/panel-resource-path.mjs +106 -0
  753. package/resources/targets/qoder-cn/js3d/js3d/project/scripts/config-export/sync-asset-controls.mjs +327 -0
  754. package/resources/targets/qoder-cn/js3d/js3d/project/scripts/config-export/sync-scene-assets.mjs +191 -0
  755. package/resources/targets/qoder-cn/js3d/js3d/project/scripts/config-export.mjs +15 -0
  756. package/resources/targets/qoder-cn/js3d/js3d/project/scripts/skill-modules/export-config/cli.mjs +20 -0
  757. package/resources/targets/qoder-cn/js3d/js3d/project/scripts/skill-modules/export-config/config.d.mts +19 -0
  758. package/resources/targets/qoder-cn/js3d/js3d/project/scripts/skill-modules/export-config/config.mjs +1 -0
  759. package/resources/targets/qoder-cn/js3d/js3d/project/scripts/skill-modules/export-config/installed.json +6 -0
  760. package/resources/targets/qoder-cn/js3d/js3d/project/scripts/skill-modules/export-config/project.d.mts +6 -0
  761. package/resources/targets/qoder-cn/js3d/js3d/project/scripts/skill-modules/export-config/project.mjs +77 -0
  762. package/resources/targets/qoder-cn/js3d/js3d/project/scripts/skill-modules/export-config/vite.d.mts +2 -0
  763. package/resources/targets/qoder-cn/js3d/js3d/project/scripts/skill-modules/export-config/vite.mjs +34 -0
  764. package/resources/targets/qoder-cn/js3d/js3d/project/scripts/write-preview-ready.mjs +22 -0
  765. package/resources/targets/qoder-cn/js3d/js3d/project/src/display/ui-stage.ts +156 -0
  766. package/resources/targets/qoder-cn/js3d/js3d/project/src/display/viewport.ts +239 -0
  767. package/resources/targets/qoder-cn/js3d/js3d/project/src/main.ts +85 -0
  768. package/resources/targets/qoder-cn/js3d/js3d/project/src/platform.ts +2 -0
  769. package/resources/targets/qoder-cn/js3d/js3d/project/src/style.css +83 -0
  770. package/resources/targets/qoder-cn/js3d/js3d/project/tsconfig.json +20 -0
  771. package/resources/targets/qoder-cn/js3d/js3d/project/unified_data_control_config.json +20 -0
  772. package/resources/targets/qoder-cn/js3d/js3d/project/vite.config.ts +5 -0
  773. package/resources/targets/qoder-cn/js3d/recovery.md +17 -0
  774. package/resources/targets/qoder-cn/js3d/target.json +60 -0
  775. package/resources/targets/qwen/js/bootstrap/SKILL.md +20 -0
  776. package/resources/targets/qwen/js/context-filter-report.json +27 -0
  777. package/resources/targets/qwen/js/craft-game-maker/SKILL.md +72 -0
  778. package/resources/targets/qwen/js/craft-game-maker/js.md +10 -0
  779. package/resources/targets/qwen/js/js/bundle.json +97 -0
  780. package/resources/targets/qwen/js/js/context/AGENTS.md +29 -0
  781. package/resources/targets/qwen/js/js/context/hooks/hooks.json +14 -0
  782. package/resources/targets/qwen/js/js/context/knowledge/AssetUrl.md +9 -0
  783. package/resources/targets/qwen/js/js/context/knowledge/AssetWiring.md +7 -0
  784. package/resources/targets/qwen/js/js/context/knowledge/Layout.md +7 -0
  785. package/resources/targets/qwen/js/js/context/knowledge/Lifecycle.md +11 -0
  786. package/resources/targets/qwen/js/js/context/knowledge/ResourceLoading.md +9 -0
  787. package/resources/targets/qwen/js/js/context/skills/export-config/SKILL.md +16 -0
  788. package/resources/targets/qwen/js/js/context/skills/export-config/assets/tooling/cli.mjs +20 -0
  789. package/resources/targets/qwen/js/js/context/skills/export-config/assets/tooling/config.d.mts +19 -0
  790. package/resources/targets/qwen/js/js/context/skills/export-config/assets/tooling/config.mjs +1 -0
  791. package/resources/targets/qwen/js/js/context/skills/export-config/assets/tooling/project.d.mts +6 -0
  792. package/resources/targets/qwen/js/js/context/skills/export-config/assets/tooling/project.mjs +77 -0
  793. package/resources/targets/qwen/js/js/context/skills/export-config/assets/tooling/vite.d.mts +2 -0
  794. package/resources/targets/qwen/js/js/context/skills/export-config/assets/tooling/vite.mjs +34 -0
  795. package/resources/targets/qwen/js/js/context/skills/export-config/scripts/export-config.mjs +4 -0
  796. package/resources/targets/qwen/js/js/context/skills/export-config/scripts/install.mjs +89 -0
  797. package/resources/targets/qwen/js/js/context/skills/export-config/scripts/panel-resource-path.mjs +106 -0
  798. package/resources/targets/qwen/js/js/context/skills/index.json +19 -0
  799. package/resources/targets/qwen/js/js/context/skills/visual-qa/SKILL.md +14 -0
  800. package/resources/targets/qwen/js/js/project/README.md +7 -0
  801. package/resources/targets/qwen/js/js/project/configs/assets.json +1 -0
  802. package/resources/targets/qwen/js/js/project/configs/game.controls.json +3 -0
  803. package/resources/targets/qwen/js/js/project/configs/game.json +3 -0
  804. package/resources/targets/qwen/js/js/project/game-runtime.json +7 -0
  805. package/resources/targets/qwen/js/js/project/game.config.json +7 -0
  806. package/resources/targets/qwen/js/js/project/index.html +20 -0
  807. package/resources/targets/qwen/js/js/project/package.json +22 -0
  808. package/resources/targets/qwen/js/js/project/runtime/lightgame/1.1.0/platform/identity/qq-ai-game-sdk.min.js +5 -0
  809. package/resources/targets/qwen/js/js/project/runtime/lightgame/1.1.0/platform/identity/qq-session.mjs +208 -0
  810. package/resources/targets/qwen/js/js/project/runtime/lightgame/1.1.0/platform/identity/shared.mjs +37 -0
  811. package/resources/targets/qwen/js/js/project/runtime/lightgame/1.1.0/platform/platform-capture-video.mjs +227 -0
  812. package/resources/targets/qwen/js/js/project/runtime/lightgame/1.1.0/platform/platform-service.d.mts +31 -0
  813. package/resources/targets/qwen/js/js/project/runtime/lightgame/1.1.0/platform/platform-service.mjs +272 -0
  814. package/resources/targets/qwen/js/js/project/runtime/lightgame/1.1.0/platform/platform.d.mts +79 -0
  815. package/resources/targets/qwen/js/js/project/runtime/lightgame/1.1.0/platform/platform.mjs +29 -0
  816. package/resources/targets/qwen/js/js/project/runtime/lightgame/1.1.0/release.json +22 -0
  817. package/resources/targets/qwen/js/js/project/runtime/lightgame/1.1.0/tooling/cli.mjs +16 -0
  818. package/resources/targets/qwen/js/js/project/runtime/lightgame/1.1.0/tooling/project.d.mts +4 -0
  819. package/resources/targets/qwen/js/js/project/runtime/lightgame/1.1.0/tooling/project.mjs +50 -0
  820. package/resources/targets/qwen/js/js/project/runtime/lightgame/1.1.0/tooling/vite.d.mts +3 -0
  821. package/resources/targets/qwen/js/js/project/runtime/lightgame/1.1.0/tooling/vite.mjs +72 -0
  822. package/resources/targets/qwen/js/js/project/runtime/lightgame/1.1.0/tools/assets.d.mts +24 -0
  823. package/resources/targets/qwen/js/js/project/runtime/lightgame/1.1.0/tools/assets.mjs +2 -0
  824. package/resources/targets/qwen/js/js/project/runtime/lightgame/1.1.0/tools/astc.d.mts +10 -0
  825. package/resources/targets/qwen/js/js/project/runtime/lightgame/1.1.0/tools/astc.mjs +1 -0
  826. package/resources/targets/qwen/js/js/project/scripts/config-export/assert-asset-wiring.mjs +72 -0
  827. package/resources/targets/qwen/js/js/project/scripts/config-export/panel-resource-path.mjs +106 -0
  828. package/resources/targets/qwen/js/js/project/scripts/config-export/sync-asset-controls.mjs +316 -0
  829. package/resources/targets/qwen/js/js/project/scripts/config-export.mjs +13 -0
  830. package/resources/targets/qwen/js/js/project/scripts/skill-modules/export-config/cli.mjs +20 -0
  831. package/resources/targets/qwen/js/js/project/scripts/skill-modules/export-config/config.d.mts +19 -0
  832. package/resources/targets/qwen/js/js/project/scripts/skill-modules/export-config/config.mjs +1 -0
  833. package/resources/targets/qwen/js/js/project/scripts/skill-modules/export-config/installed.json +6 -0
  834. package/resources/targets/qwen/js/js/project/scripts/skill-modules/export-config/project.d.mts +6 -0
  835. package/resources/targets/qwen/js/js/project/scripts/skill-modules/export-config/project.mjs +77 -0
  836. package/resources/targets/qwen/js/js/project/scripts/skill-modules/export-config/vite.d.mts +2 -0
  837. package/resources/targets/qwen/js/js/project/scripts/skill-modules/export-config/vite.mjs +34 -0
  838. package/resources/targets/qwen/js/js/project/scripts/write-preview-ready.mjs +22 -0
  839. package/resources/targets/qwen/js/js/project/src/display/ui-stage.ts +156 -0
  840. package/resources/targets/qwen/js/js/project/src/display/viewport.ts +249 -0
  841. package/resources/targets/qwen/js/js/project/src/main.ts +87 -0
  842. package/resources/targets/qwen/js/js/project/src/platform.ts +2 -0
  843. package/resources/targets/qwen/js/js/project/src/scenes/LoadScene.ts +89 -0
  844. package/resources/targets/qwen/js/js/project/src/scenes/PlayScene.ts +17 -0
  845. package/resources/targets/qwen/js/js/project/src/screenUi.ts +185 -0
  846. package/resources/targets/qwen/js/js/project/src/style.css +294 -0
  847. package/resources/targets/qwen/js/js/project/tsconfig.json +20 -0
  848. package/resources/targets/qwen/js/js/project/unified_data_control_config.json +20 -0
  849. package/resources/targets/qwen/js/js/project/vite.config.ts +5 -0
  850. package/resources/targets/qwen/js/recovery.md +17 -0
  851. package/resources/targets/qwen/js/target.json +61 -0
  852. package/resources/targets/qwen/js3d/bootstrap/SKILL.md +20 -0
  853. package/resources/targets/qwen/js3d/context-filter-report.json +27 -0
  854. package/resources/targets/qwen/js3d/craft-game-maker/SKILL.md +72 -0
  855. package/resources/targets/qwen/js3d/craft-game-maker/js3d.md +12 -0
  856. package/resources/targets/qwen/js3d/js3d/bundle.json +108 -0
  857. package/resources/targets/qwen/js3d/js3d/context/AGENTS.md +30 -0
  858. package/resources/targets/qwen/js3d/js3d/context/hooks/hooks.json +14 -0
  859. package/resources/targets/qwen/js3d/js3d/context/knowledge/AssetUrl.md +9 -0
  860. package/resources/targets/qwen/js3d/js3d/context/knowledge/AssetWiring.md +7 -0
  861. package/resources/targets/qwen/js3d/js3d/context/knowledge/CodingGuide/Pitfalls.md +11 -0
  862. package/resources/targets/qwen/js3d/js3d/context/knowledge/Layout.md +7 -0
  863. package/resources/targets/qwen/js3d/js3d/context/knowledge/ResourceLoading.md +11 -0
  864. package/resources/targets/qwen/js3d/js3d/context/knowledge/Runtime.md +9 -0
  865. package/resources/targets/qwen/js3d/js3d/context/skills/asset-usage-audit/SKILL.md +16 -0
  866. package/resources/targets/qwen/js3d/js3d/context/skills/asset-usage-audit/scripts/compare-animations.mjs +48 -0
  867. package/resources/targets/qwen/js3d/js3d/context/skills/asset-usage-audit/scripts/lib/anim.mjs +266 -0
  868. package/resources/targets/qwen/js3d/js3d/context/skills/asset-usage-audit/scripts/lib/glb.mjs +241 -0
  869. package/resources/targets/qwen/js3d/js3d/context/skills/asset-usage-audit/scripts/lib/scan.mjs +455 -0
  870. package/resources/targets/qwen/js3d/js3d/context/skills/asset-usage-audit/scripts/scan-assets.mjs +77 -0
  871. package/resources/targets/qwen/js3d/js3d/context/skills/export-config/SKILL.md +16 -0
  872. package/resources/targets/qwen/js3d/js3d/context/skills/export-config/assets/tooling/cli.mjs +20 -0
  873. package/resources/targets/qwen/js3d/js3d/context/skills/export-config/assets/tooling/config.d.mts +19 -0
  874. package/resources/targets/qwen/js3d/js3d/context/skills/export-config/assets/tooling/config.mjs +1 -0
  875. package/resources/targets/qwen/js3d/js3d/context/skills/export-config/assets/tooling/project.d.mts +6 -0
  876. package/resources/targets/qwen/js3d/js3d/context/skills/export-config/assets/tooling/project.mjs +77 -0
  877. package/resources/targets/qwen/js3d/js3d/context/skills/export-config/assets/tooling/vite.d.mts +2 -0
  878. package/resources/targets/qwen/js3d/js3d/context/skills/export-config/assets/tooling/vite.mjs +34 -0
  879. package/resources/targets/qwen/js3d/js3d/context/skills/export-config/scripts/export-config.mjs +4 -0
  880. package/resources/targets/qwen/js3d/js3d/context/skills/export-config/scripts/install.mjs +89 -0
  881. package/resources/targets/qwen/js3d/js3d/context/skills/export-config/scripts/panel-resource-path.mjs +106 -0
  882. package/resources/targets/qwen/js3d/js3d/context/skills/index.json +31 -0
  883. package/resources/targets/qwen/js3d/js3d/context/skills/performance-audit/SKILL.md +21 -0
  884. package/resources/targets/qwen/js3d/js3d/context/skills/performance-audit/scripts/lib/rules.mjs +470 -0
  885. package/resources/targets/qwen/js3d/js3d/context/skills/performance-audit/scripts/lib/scan.mjs +387 -0
  886. package/resources/targets/qwen/js3d/js3d/context/skills/performance-audit/scripts/lib/source.mjs +398 -0
  887. package/resources/targets/qwen/js3d/js3d/context/skills/performance-audit/scripts/scan-perf.mjs +130 -0
  888. package/resources/targets/qwen/js3d/js3d/context/skills/visual-qa/SKILL.md +14 -0
  889. package/resources/targets/qwen/js3d/js3d/project/README.md +7 -0
  890. package/resources/targets/qwen/js3d/js3d/project/configs/game.controls.json +3 -0
  891. package/resources/targets/qwen/js3d/js3d/project/configs/game.json +3 -0
  892. package/resources/targets/qwen/js3d/js3d/project/game-runtime.json +7 -0
  893. package/resources/targets/qwen/js3d/js3d/project/game.config.json +7 -0
  894. package/resources/targets/qwen/js3d/js3d/project/index.html +12 -0
  895. package/resources/targets/qwen/js3d/js3d/project/package.json +23 -0
  896. package/resources/targets/qwen/js3d/js3d/project/runtime/lightgame/1.1.0/platform/identity/qq-ai-game-sdk.min.js +5 -0
  897. package/resources/targets/qwen/js3d/js3d/project/runtime/lightgame/1.1.0/platform/identity/qq-session.mjs +208 -0
  898. package/resources/targets/qwen/js3d/js3d/project/runtime/lightgame/1.1.0/platform/identity/shared.mjs +37 -0
  899. package/resources/targets/qwen/js3d/js3d/project/runtime/lightgame/1.1.0/platform/platform-capture-video.mjs +227 -0
  900. package/resources/targets/qwen/js3d/js3d/project/runtime/lightgame/1.1.0/platform/platform-service.d.mts +31 -0
  901. package/resources/targets/qwen/js3d/js3d/project/runtime/lightgame/1.1.0/platform/platform-service.mjs +272 -0
  902. package/resources/targets/qwen/js3d/js3d/project/runtime/lightgame/1.1.0/platform/platform.d.mts +79 -0
  903. package/resources/targets/qwen/js3d/js3d/project/runtime/lightgame/1.1.0/platform/platform.mjs +30 -0
  904. package/resources/targets/qwen/js3d/js3d/project/runtime/lightgame/1.1.0/release.json +24 -0
  905. package/resources/targets/qwen/js3d/js3d/project/runtime/lightgame/1.1.0/tooling/cli.mjs +16 -0
  906. package/resources/targets/qwen/js3d/js3d/project/runtime/lightgame/1.1.0/tooling/project.d.mts +4 -0
  907. package/resources/targets/qwen/js3d/js3d/project/runtime/lightgame/1.1.0/tooling/project.mjs +50 -0
  908. package/resources/targets/qwen/js3d/js3d/project/runtime/lightgame/1.1.0/tooling/vite.d.mts +3 -0
  909. package/resources/targets/qwen/js3d/js3d/project/runtime/lightgame/1.1.0/tooling/vite.mjs +72 -0
  910. package/resources/targets/qwen/js3d/js3d/project/runtime/lightgame/1.1.0/tools/assets.d.mts +24 -0
  911. package/resources/targets/qwen/js3d/js3d/project/runtime/lightgame/1.1.0/tools/assets.mjs +2 -0
  912. package/resources/targets/qwen/js3d/js3d/project/runtime/lightgame/1.1.0/tools/astc.d.mts +10 -0
  913. package/resources/targets/qwen/js3d/js3d/project/runtime/lightgame/1.1.0/tools/astc.mjs +1 -0
  914. package/resources/targets/qwen/js3d/js3d/project/runtime/lightgame/1.1.0/tools/glb.d.mts +26 -0
  915. package/resources/targets/qwen/js3d/js3d/project/runtime/lightgame/1.1.0/tools/glb.mjs +351 -0
  916. package/resources/targets/qwen/js3d/js3d/project/scripts/config-export/assert-asset-wiring.mjs +97 -0
  917. package/resources/targets/qwen/js3d/js3d/project/scripts/config-export/panel-resource-path.mjs +106 -0
  918. package/resources/targets/qwen/js3d/js3d/project/scripts/config-export/sync-asset-controls.mjs +327 -0
  919. package/resources/targets/qwen/js3d/js3d/project/scripts/config-export/sync-scene-assets.mjs +191 -0
  920. package/resources/targets/qwen/js3d/js3d/project/scripts/config-export.mjs +15 -0
  921. package/resources/targets/qwen/js3d/js3d/project/scripts/skill-modules/export-config/cli.mjs +20 -0
  922. package/resources/targets/qwen/js3d/js3d/project/scripts/skill-modules/export-config/config.d.mts +19 -0
  923. package/resources/targets/qwen/js3d/js3d/project/scripts/skill-modules/export-config/config.mjs +1 -0
  924. package/resources/targets/qwen/js3d/js3d/project/scripts/skill-modules/export-config/installed.json +6 -0
  925. package/resources/targets/qwen/js3d/js3d/project/scripts/skill-modules/export-config/project.d.mts +6 -0
  926. package/resources/targets/qwen/js3d/js3d/project/scripts/skill-modules/export-config/project.mjs +77 -0
  927. package/resources/targets/qwen/js3d/js3d/project/scripts/skill-modules/export-config/vite.d.mts +2 -0
  928. package/resources/targets/qwen/js3d/js3d/project/scripts/skill-modules/export-config/vite.mjs +34 -0
  929. package/resources/targets/qwen/js3d/js3d/project/scripts/write-preview-ready.mjs +22 -0
  930. package/resources/targets/qwen/js3d/js3d/project/src/display/ui-stage.ts +156 -0
  931. package/resources/targets/qwen/js3d/js3d/project/src/display/viewport.ts +239 -0
  932. package/resources/targets/qwen/js3d/js3d/project/src/main.ts +85 -0
  933. package/resources/targets/qwen/js3d/js3d/project/src/platform.ts +2 -0
  934. package/resources/targets/qwen/js3d/js3d/project/src/style.css +83 -0
  935. package/resources/targets/qwen/js3d/js3d/project/tsconfig.json +20 -0
  936. package/resources/targets/qwen/js3d/js3d/project/unified_data_control_config.json +20 -0
  937. package/resources/targets/qwen/js3d/js3d/project/vite.config.ts +5 -0
  938. package/resources/targets/qwen/js3d/recovery.md +17 -0
  939. package/resources/targets/qwen/js3d/target.json +60 -0
  940. package/resources/targets/trae/js/bootstrap/SKILL.md +20 -0
  941. package/resources/targets/trae/js/context-filter-report.json +27 -0
  942. package/resources/targets/trae/js/craft-game-maker/SKILL.md +72 -0
  943. package/resources/targets/trae/js/craft-game-maker/js.md +10 -0
  944. package/resources/targets/trae/js/js/bundle.json +97 -0
  945. package/resources/targets/trae/js/js/context/AGENTS.md +29 -0
  946. package/resources/targets/trae/js/js/context/hooks/hooks.json +14 -0
  947. package/resources/targets/trae/js/js/context/knowledge/AssetUrl.md +9 -0
  948. package/resources/targets/trae/js/js/context/knowledge/AssetWiring.md +7 -0
  949. package/resources/targets/trae/js/js/context/knowledge/Layout.md +7 -0
  950. package/resources/targets/trae/js/js/context/knowledge/Lifecycle.md +11 -0
  951. package/resources/targets/trae/js/js/context/knowledge/ResourceLoading.md +9 -0
  952. package/resources/targets/trae/js/js/context/skills/export-config/SKILL.md +16 -0
  953. package/resources/targets/trae/js/js/context/skills/export-config/assets/tooling/cli.mjs +20 -0
  954. package/resources/targets/trae/js/js/context/skills/export-config/assets/tooling/config.d.mts +19 -0
  955. package/resources/targets/trae/js/js/context/skills/export-config/assets/tooling/config.mjs +1 -0
  956. package/resources/targets/trae/js/js/context/skills/export-config/assets/tooling/project.d.mts +6 -0
  957. package/resources/targets/trae/js/js/context/skills/export-config/assets/tooling/project.mjs +77 -0
  958. package/resources/targets/trae/js/js/context/skills/export-config/assets/tooling/vite.d.mts +2 -0
  959. package/resources/targets/trae/js/js/context/skills/export-config/assets/tooling/vite.mjs +34 -0
  960. package/resources/targets/trae/js/js/context/skills/export-config/scripts/export-config.mjs +4 -0
  961. package/resources/targets/trae/js/js/context/skills/export-config/scripts/install.mjs +89 -0
  962. package/resources/targets/trae/js/js/context/skills/export-config/scripts/panel-resource-path.mjs +106 -0
  963. package/resources/targets/trae/js/js/context/skills/index.json +19 -0
  964. package/resources/targets/trae/js/js/context/skills/visual-qa/SKILL.md +14 -0
  965. package/resources/targets/trae/js/js/project/README.md +7 -0
  966. package/resources/targets/trae/js/js/project/configs/assets.json +1 -0
  967. package/resources/targets/trae/js/js/project/configs/game.controls.json +3 -0
  968. package/resources/targets/trae/js/js/project/configs/game.json +3 -0
  969. package/resources/targets/trae/js/js/project/game-runtime.json +7 -0
  970. package/resources/targets/trae/js/js/project/game.config.json +7 -0
  971. package/resources/targets/trae/js/js/project/index.html +20 -0
  972. package/resources/targets/trae/js/js/project/package.json +22 -0
  973. package/resources/targets/trae/js/js/project/runtime/lightgame/1.1.0/platform/identity/qq-ai-game-sdk.min.js +5 -0
  974. package/resources/targets/trae/js/js/project/runtime/lightgame/1.1.0/platform/identity/qq-session.mjs +208 -0
  975. package/resources/targets/trae/js/js/project/runtime/lightgame/1.1.0/platform/identity/shared.mjs +37 -0
  976. package/resources/targets/trae/js/js/project/runtime/lightgame/1.1.0/platform/platform-capture-video.mjs +227 -0
  977. package/resources/targets/trae/js/js/project/runtime/lightgame/1.1.0/platform/platform-service.d.mts +31 -0
  978. package/resources/targets/trae/js/js/project/runtime/lightgame/1.1.0/platform/platform-service.mjs +272 -0
  979. package/resources/targets/trae/js/js/project/runtime/lightgame/1.1.0/platform/platform.d.mts +79 -0
  980. package/resources/targets/trae/js/js/project/runtime/lightgame/1.1.0/platform/platform.mjs +29 -0
  981. package/resources/targets/trae/js/js/project/runtime/lightgame/1.1.0/release.json +22 -0
  982. package/resources/targets/trae/js/js/project/runtime/lightgame/1.1.0/tooling/cli.mjs +16 -0
  983. package/resources/targets/trae/js/js/project/runtime/lightgame/1.1.0/tooling/project.d.mts +4 -0
  984. package/resources/targets/trae/js/js/project/runtime/lightgame/1.1.0/tooling/project.mjs +50 -0
  985. package/resources/targets/trae/js/js/project/runtime/lightgame/1.1.0/tooling/vite.d.mts +3 -0
  986. package/resources/targets/trae/js/js/project/runtime/lightgame/1.1.0/tooling/vite.mjs +72 -0
  987. package/resources/targets/trae/js/js/project/runtime/lightgame/1.1.0/tools/assets.d.mts +24 -0
  988. package/resources/targets/trae/js/js/project/runtime/lightgame/1.1.0/tools/assets.mjs +2 -0
  989. package/resources/targets/trae/js/js/project/runtime/lightgame/1.1.0/tools/astc.d.mts +10 -0
  990. package/resources/targets/trae/js/js/project/runtime/lightgame/1.1.0/tools/astc.mjs +1 -0
  991. package/resources/targets/trae/js/js/project/scripts/config-export/assert-asset-wiring.mjs +72 -0
  992. package/resources/targets/trae/js/js/project/scripts/config-export/panel-resource-path.mjs +106 -0
  993. package/resources/targets/trae/js/js/project/scripts/config-export/sync-asset-controls.mjs +316 -0
  994. package/resources/targets/trae/js/js/project/scripts/config-export.mjs +13 -0
  995. package/resources/targets/trae/js/js/project/scripts/skill-modules/export-config/cli.mjs +20 -0
  996. package/resources/targets/trae/js/js/project/scripts/skill-modules/export-config/config.d.mts +19 -0
  997. package/resources/targets/trae/js/js/project/scripts/skill-modules/export-config/config.mjs +1 -0
  998. package/resources/targets/trae/js/js/project/scripts/skill-modules/export-config/installed.json +6 -0
  999. package/resources/targets/trae/js/js/project/scripts/skill-modules/export-config/project.d.mts +6 -0
  1000. package/resources/targets/trae/js/js/project/scripts/skill-modules/export-config/project.mjs +77 -0
  1001. package/resources/targets/trae/js/js/project/scripts/skill-modules/export-config/vite.d.mts +2 -0
  1002. package/resources/targets/trae/js/js/project/scripts/skill-modules/export-config/vite.mjs +34 -0
  1003. package/resources/targets/trae/js/js/project/scripts/write-preview-ready.mjs +22 -0
  1004. package/resources/targets/trae/js/js/project/src/display/ui-stage.ts +156 -0
  1005. package/resources/targets/trae/js/js/project/src/display/viewport.ts +249 -0
  1006. package/resources/targets/trae/js/js/project/src/main.ts +87 -0
  1007. package/resources/targets/trae/js/js/project/src/platform.ts +2 -0
  1008. package/resources/targets/trae/js/js/project/src/scenes/LoadScene.ts +89 -0
  1009. package/resources/targets/trae/js/js/project/src/scenes/PlayScene.ts +17 -0
  1010. package/resources/targets/trae/js/js/project/src/screenUi.ts +185 -0
  1011. package/resources/targets/trae/js/js/project/src/style.css +294 -0
  1012. package/resources/targets/trae/js/js/project/tsconfig.json +20 -0
  1013. package/resources/targets/trae/js/js/project/unified_data_control_config.json +20 -0
  1014. package/resources/targets/trae/js/js/project/vite.config.ts +5 -0
  1015. package/resources/targets/trae/js/recovery.md +17 -0
  1016. package/resources/targets/trae/js/target.json +61 -0
  1017. package/resources/targets/trae/js3d/bootstrap/SKILL.md +20 -0
  1018. package/resources/targets/trae/js3d/context-filter-report.json +27 -0
  1019. package/resources/targets/trae/js3d/craft-game-maker/SKILL.md +72 -0
  1020. package/resources/targets/trae/js3d/craft-game-maker/js3d.md +12 -0
  1021. package/resources/targets/trae/js3d/js3d/bundle.json +108 -0
  1022. package/resources/targets/trae/js3d/js3d/context/AGENTS.md +30 -0
  1023. package/resources/targets/trae/js3d/js3d/context/hooks/hooks.json +14 -0
  1024. package/resources/targets/trae/js3d/js3d/context/knowledge/AssetUrl.md +9 -0
  1025. package/resources/targets/trae/js3d/js3d/context/knowledge/AssetWiring.md +7 -0
  1026. package/resources/targets/trae/js3d/js3d/context/knowledge/CodingGuide/Pitfalls.md +11 -0
  1027. package/resources/targets/trae/js3d/js3d/context/knowledge/Layout.md +7 -0
  1028. package/resources/targets/trae/js3d/js3d/context/knowledge/ResourceLoading.md +11 -0
  1029. package/resources/targets/trae/js3d/js3d/context/knowledge/Runtime.md +9 -0
  1030. package/resources/targets/trae/js3d/js3d/context/skills/asset-usage-audit/SKILL.md +16 -0
  1031. package/resources/targets/trae/js3d/js3d/context/skills/asset-usage-audit/scripts/compare-animations.mjs +48 -0
  1032. package/resources/targets/trae/js3d/js3d/context/skills/asset-usage-audit/scripts/lib/anim.mjs +266 -0
  1033. package/resources/targets/trae/js3d/js3d/context/skills/asset-usage-audit/scripts/lib/glb.mjs +241 -0
  1034. package/resources/targets/trae/js3d/js3d/context/skills/asset-usage-audit/scripts/lib/scan.mjs +455 -0
  1035. package/resources/targets/trae/js3d/js3d/context/skills/asset-usage-audit/scripts/scan-assets.mjs +77 -0
  1036. package/resources/targets/trae/js3d/js3d/context/skills/export-config/SKILL.md +16 -0
  1037. package/resources/targets/trae/js3d/js3d/context/skills/export-config/assets/tooling/cli.mjs +20 -0
  1038. package/resources/targets/trae/js3d/js3d/context/skills/export-config/assets/tooling/config.d.mts +19 -0
  1039. package/resources/targets/trae/js3d/js3d/context/skills/export-config/assets/tooling/config.mjs +1 -0
  1040. package/resources/targets/trae/js3d/js3d/context/skills/export-config/assets/tooling/project.d.mts +6 -0
  1041. package/resources/targets/trae/js3d/js3d/context/skills/export-config/assets/tooling/project.mjs +77 -0
  1042. package/resources/targets/trae/js3d/js3d/context/skills/export-config/assets/tooling/vite.d.mts +2 -0
  1043. package/resources/targets/trae/js3d/js3d/context/skills/export-config/assets/tooling/vite.mjs +34 -0
  1044. package/resources/targets/trae/js3d/js3d/context/skills/export-config/scripts/export-config.mjs +4 -0
  1045. package/resources/targets/trae/js3d/js3d/context/skills/export-config/scripts/install.mjs +89 -0
  1046. package/resources/targets/trae/js3d/js3d/context/skills/export-config/scripts/panel-resource-path.mjs +106 -0
  1047. package/resources/targets/trae/js3d/js3d/context/skills/index.json +31 -0
  1048. package/resources/targets/trae/js3d/js3d/context/skills/performance-audit/SKILL.md +21 -0
  1049. package/resources/targets/trae/js3d/js3d/context/skills/performance-audit/scripts/lib/rules.mjs +470 -0
  1050. package/resources/targets/trae/js3d/js3d/context/skills/performance-audit/scripts/lib/scan.mjs +387 -0
  1051. package/resources/targets/trae/js3d/js3d/context/skills/performance-audit/scripts/lib/source.mjs +398 -0
  1052. package/resources/targets/trae/js3d/js3d/context/skills/performance-audit/scripts/scan-perf.mjs +130 -0
  1053. package/resources/targets/trae/js3d/js3d/context/skills/visual-qa/SKILL.md +14 -0
  1054. package/resources/targets/trae/js3d/js3d/project/README.md +7 -0
  1055. package/resources/targets/trae/js3d/js3d/project/configs/game.controls.json +3 -0
  1056. package/resources/targets/trae/js3d/js3d/project/configs/game.json +3 -0
  1057. package/resources/targets/trae/js3d/js3d/project/game-runtime.json +7 -0
  1058. package/resources/targets/trae/js3d/js3d/project/game.config.json +7 -0
  1059. package/resources/targets/trae/js3d/js3d/project/index.html +12 -0
  1060. package/resources/targets/trae/js3d/js3d/project/package.json +23 -0
  1061. package/resources/targets/trae/js3d/js3d/project/runtime/lightgame/1.1.0/platform/identity/qq-ai-game-sdk.min.js +5 -0
  1062. package/resources/targets/trae/js3d/js3d/project/runtime/lightgame/1.1.0/platform/identity/qq-session.mjs +208 -0
  1063. package/resources/targets/trae/js3d/js3d/project/runtime/lightgame/1.1.0/platform/identity/shared.mjs +37 -0
  1064. package/resources/targets/trae/js3d/js3d/project/runtime/lightgame/1.1.0/platform/platform-capture-video.mjs +227 -0
  1065. package/resources/targets/trae/js3d/js3d/project/runtime/lightgame/1.1.0/platform/platform-service.d.mts +31 -0
  1066. package/resources/targets/trae/js3d/js3d/project/runtime/lightgame/1.1.0/platform/platform-service.mjs +272 -0
  1067. package/resources/targets/trae/js3d/js3d/project/runtime/lightgame/1.1.0/platform/platform.d.mts +79 -0
  1068. package/resources/targets/trae/js3d/js3d/project/runtime/lightgame/1.1.0/platform/platform.mjs +30 -0
  1069. package/resources/targets/trae/js3d/js3d/project/runtime/lightgame/1.1.0/release.json +24 -0
  1070. package/resources/targets/trae/js3d/js3d/project/runtime/lightgame/1.1.0/tooling/cli.mjs +16 -0
  1071. package/resources/targets/trae/js3d/js3d/project/runtime/lightgame/1.1.0/tooling/project.d.mts +4 -0
  1072. package/resources/targets/trae/js3d/js3d/project/runtime/lightgame/1.1.0/tooling/project.mjs +50 -0
  1073. package/resources/targets/trae/js3d/js3d/project/runtime/lightgame/1.1.0/tooling/vite.d.mts +3 -0
  1074. package/resources/targets/trae/js3d/js3d/project/runtime/lightgame/1.1.0/tooling/vite.mjs +72 -0
  1075. package/resources/targets/trae/js3d/js3d/project/runtime/lightgame/1.1.0/tools/assets.d.mts +24 -0
  1076. package/resources/targets/trae/js3d/js3d/project/runtime/lightgame/1.1.0/tools/assets.mjs +2 -0
  1077. package/resources/targets/trae/js3d/js3d/project/runtime/lightgame/1.1.0/tools/astc.d.mts +10 -0
  1078. package/resources/targets/trae/js3d/js3d/project/runtime/lightgame/1.1.0/tools/astc.mjs +1 -0
  1079. package/resources/targets/trae/js3d/js3d/project/runtime/lightgame/1.1.0/tools/glb.d.mts +26 -0
  1080. package/resources/targets/trae/js3d/js3d/project/runtime/lightgame/1.1.0/tools/glb.mjs +351 -0
  1081. package/resources/targets/trae/js3d/js3d/project/scripts/config-export/assert-asset-wiring.mjs +97 -0
  1082. package/resources/targets/trae/js3d/js3d/project/scripts/config-export/panel-resource-path.mjs +106 -0
  1083. package/resources/targets/trae/js3d/js3d/project/scripts/config-export/sync-asset-controls.mjs +327 -0
  1084. package/resources/targets/trae/js3d/js3d/project/scripts/config-export/sync-scene-assets.mjs +191 -0
  1085. package/resources/targets/trae/js3d/js3d/project/scripts/config-export.mjs +15 -0
  1086. package/resources/targets/trae/js3d/js3d/project/scripts/skill-modules/export-config/cli.mjs +20 -0
  1087. package/resources/targets/trae/js3d/js3d/project/scripts/skill-modules/export-config/config.d.mts +19 -0
  1088. package/resources/targets/trae/js3d/js3d/project/scripts/skill-modules/export-config/config.mjs +1 -0
  1089. package/resources/targets/trae/js3d/js3d/project/scripts/skill-modules/export-config/installed.json +6 -0
  1090. package/resources/targets/trae/js3d/js3d/project/scripts/skill-modules/export-config/project.d.mts +6 -0
  1091. package/resources/targets/trae/js3d/js3d/project/scripts/skill-modules/export-config/project.mjs +77 -0
  1092. package/resources/targets/trae/js3d/js3d/project/scripts/skill-modules/export-config/vite.d.mts +2 -0
  1093. package/resources/targets/trae/js3d/js3d/project/scripts/skill-modules/export-config/vite.mjs +34 -0
  1094. package/resources/targets/trae/js3d/js3d/project/scripts/write-preview-ready.mjs +22 -0
  1095. package/resources/targets/trae/js3d/js3d/project/src/display/ui-stage.ts +156 -0
  1096. package/resources/targets/trae/js3d/js3d/project/src/display/viewport.ts +239 -0
  1097. package/resources/targets/trae/js3d/js3d/project/src/main.ts +85 -0
  1098. package/resources/targets/trae/js3d/js3d/project/src/platform.ts +2 -0
  1099. package/resources/targets/trae/js3d/js3d/project/src/style.css +83 -0
  1100. package/resources/targets/trae/js3d/js3d/project/tsconfig.json +20 -0
  1101. package/resources/targets/trae/js3d/js3d/project/unified_data_control_config.json +20 -0
  1102. package/resources/targets/trae/js3d/js3d/project/vite.config.ts +5 -0
  1103. package/resources/targets/trae/js3d/recovery.md +17 -0
  1104. package/resources/targets/trae/js3d/target.json +60 -0
  1105. package/resources/targets/workbuddy/js/bootstrap/SKILL.md +22 -24
  1106. package/resources/targets/workbuddy/js/craft-game-maker/SKILL.md +11 -15
  1107. package/resources/targets/workbuddy/js/js/bundle.json +8 -8
  1108. package/resources/targets/workbuddy/js/js/context/AGENTS.md +29 -29
  1109. package/resources/targets/workbuddy/js/recovery.md +19 -19
  1110. package/resources/targets/workbuddy/js/target.json +1 -1
  1111. package/resources/targets/workbuddy/js3d/bootstrap/SKILL.md +22 -24
  1112. package/resources/targets/workbuddy/js3d/craft-game-maker/SKILL.md +11 -15
  1113. package/resources/targets/workbuddy/js3d/js3d/bundle.json +9 -9
  1114. package/resources/targets/workbuddy/js3d/js3d/context/AGENTS.md +30 -30
  1115. package/resources/targets/workbuddy/js3d/js3d/context/skills/asset-usage-audit/scripts/lib/scan.mjs +2 -2
  1116. package/resources/targets/workbuddy/js3d/recovery.md +19 -19
  1117. package/resources/targets/workbuddy/js3d/target.json +1 -1
  1118. package/resources/targets/zcode/js/bootstrap/SKILL.md +3 -1
  1119. package/resources/targets/zcode/js/craft-game-maker/SKILL.md +11 -15
  1120. package/resources/targets/zcode/js/js/bundle.json +7 -7
  1121. package/resources/targets/zcode/js/recovery.md +5 -1
  1122. package/resources/targets/zcode/js/target.json +1 -1
  1123. package/resources/targets/zcode/js3d/bootstrap/SKILL.md +3 -1
  1124. package/resources/targets/zcode/js3d/craft-game-maker/SKILL.md +11 -15
  1125. package/resources/targets/zcode/js3d/js3d/bundle.json +8 -8
  1126. package/resources/targets/zcode/js3d/js3d/context/skills/asset-usage-audit/scripts/lib/scan.mjs +2 -2
  1127. package/resources/targets/zcode/js3d/recovery.md +5 -1
  1128. package/resources/targets/zcode/js3d/target.json +1 -1
  1129. package/vendor/craft-runtime/SOURCE.json +3 -3
  1130. package/vendor/craft-runtime/package.json +1 -1
  1131. package/dist-server/game-workflow/publication-materials.mjs +0 -92
  1132. package/dist-server/game-workflow/publications.mjs +0 -168
  1133. package/dist-server/game-workflow/publish-capture-worker.mjs +0 -57
  1134. package/dist-server/game-workflow/publish-capture.mjs +0 -75
  1135. package/dist-server/mcp/publication-page.html +0 -86
  1136. package/dist-server/mcp/publication-page.mjs +0 -375
  1137. package/dist-server/mcp/publication-preview.mjs +0 -63
  1138. package/dist-server/mcp/publication-tools.mjs +0 -22
  1139. package/dist-server/mcp/publish-panel.mjs +0 -210
  1140. package/dist-server/upstream/publication-transport.mjs +0 -101
@@ -0,0 +1,1852 @@
1
+ // craft-mcp:launcher:v1
2
+ import { createRequire as launcherRequire } from "node:module"; const require = launcherRequire(import.meta.url);
3
+ var __create = Object.create;
4
+ var __defProp = Object.defineProperty;
5
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
6
+ var __getOwnPropNames = Object.getOwnPropertyNames;
7
+ var __getProtoOf = Object.getPrototypeOf;
8
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
9
+ var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
10
+ get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
11
+ }) : x)(function(x) {
12
+ if (typeof require !== "undefined") return require.apply(this, arguments);
13
+ throw Error('Dynamic require of "' + x + '" is not supported');
14
+ });
15
+ var __commonJS = (cb, mod) => function __require2() {
16
+ return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
17
+ };
18
+ var __copyProps = (to, from, except, desc) => {
19
+ if (from && typeof from === "object" || typeof from === "function") {
20
+ for (let key of __getOwnPropNames(from))
21
+ if (!__hasOwnProp.call(to, key) && key !== except)
22
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
23
+ }
24
+ return to;
25
+ };
26
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
27
+ // If the importer is in node compatibility mode or this is not an ESM
28
+ // file that has been converted to a CommonJS file using a Babel-
29
+ // compatible transform (i.e. "__esModule" has not been set), then set
30
+ // "default" to the CommonJS "module.exports" for node compatibility.
31
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
32
+ mod
33
+ ));
34
+
35
+ // node_modules/graceful-fs/polyfills.js
36
+ var require_polyfills = __commonJS({
37
+ "node_modules/graceful-fs/polyfills.js"(exports, module) {
38
+ var constants = __require("constants");
39
+ var origCwd = process.cwd;
40
+ var cwd = null;
41
+ var platform = process.env.GRACEFUL_FS_PLATFORM || process.platform;
42
+ process.cwd = function() {
43
+ if (!cwd)
44
+ cwd = origCwd.call(process);
45
+ return cwd;
46
+ };
47
+ try {
48
+ process.cwd();
49
+ } catch (er) {
50
+ }
51
+ if (typeof process.chdir === "function") {
52
+ chdir = process.chdir;
53
+ process.chdir = function(d) {
54
+ cwd = null;
55
+ chdir.call(process, d);
56
+ };
57
+ if (Object.setPrototypeOf) Object.setPrototypeOf(process.chdir, chdir);
58
+ }
59
+ var chdir;
60
+ module.exports = patch;
61
+ function patch(fs) {
62
+ if (constants.hasOwnProperty("O_SYMLINK") && process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)) {
63
+ patchLchmod(fs);
64
+ }
65
+ if (!fs.lutimes) {
66
+ patchLutimes(fs);
67
+ }
68
+ fs.chown = chownFix(fs.chown);
69
+ fs.fchown = chownFix(fs.fchown);
70
+ fs.lchown = chownFix(fs.lchown);
71
+ fs.chmod = chmodFix(fs.chmod);
72
+ fs.fchmod = chmodFix(fs.fchmod);
73
+ fs.lchmod = chmodFix(fs.lchmod);
74
+ fs.chownSync = chownFixSync(fs.chownSync);
75
+ fs.fchownSync = chownFixSync(fs.fchownSync);
76
+ fs.lchownSync = chownFixSync(fs.lchownSync);
77
+ fs.chmodSync = chmodFixSync(fs.chmodSync);
78
+ fs.fchmodSync = chmodFixSync(fs.fchmodSync);
79
+ fs.lchmodSync = chmodFixSync(fs.lchmodSync);
80
+ fs.stat = statFix(fs.stat);
81
+ fs.fstat = statFix(fs.fstat);
82
+ fs.lstat = statFix(fs.lstat);
83
+ fs.statSync = statFixSync(fs.statSync);
84
+ fs.fstatSync = statFixSync(fs.fstatSync);
85
+ fs.lstatSync = statFixSync(fs.lstatSync);
86
+ if (fs.chmod && !fs.lchmod) {
87
+ fs.lchmod = function(path6, mode, cb) {
88
+ if (cb) process.nextTick(cb);
89
+ };
90
+ fs.lchmodSync = function() {
91
+ };
92
+ }
93
+ if (fs.chown && !fs.lchown) {
94
+ fs.lchown = function(path6, uid, gid, cb) {
95
+ if (cb) process.nextTick(cb);
96
+ };
97
+ fs.lchownSync = function() {
98
+ };
99
+ }
100
+ if (platform === "win32") {
101
+ fs.rename = typeof fs.rename !== "function" ? fs.rename : (function(fs$rename) {
102
+ function rename2(from, to, cb) {
103
+ var start2 = Date.now();
104
+ var backoff = 0;
105
+ fs$rename(from, to, function CB(er) {
106
+ if (er && (er.code === "EACCES" || er.code === "EPERM" || er.code === "EBUSY") && Date.now() - start2 < 6e4) {
107
+ setTimeout(function() {
108
+ fs.stat(to, function(stater, st) {
109
+ if (stater && stater.code === "ENOENT")
110
+ fs$rename(from, to, CB);
111
+ else
112
+ cb(er);
113
+ });
114
+ }, backoff);
115
+ if (backoff < 100)
116
+ backoff += 10;
117
+ return;
118
+ }
119
+ if (cb) cb(er);
120
+ });
121
+ }
122
+ if (Object.setPrototypeOf) Object.setPrototypeOf(rename2, fs$rename);
123
+ return rename2;
124
+ })(fs.rename);
125
+ }
126
+ fs.read = typeof fs.read !== "function" ? fs.read : (function(fs$read) {
127
+ function read(fd, buffer, offset, length, position, callback_) {
128
+ var callback;
129
+ if (callback_ && typeof callback_ === "function") {
130
+ var eagCounter = 0;
131
+ callback = function(er, _, __) {
132
+ if (er && er.code === "EAGAIN" && eagCounter < 10) {
133
+ eagCounter++;
134
+ return fs$read.call(fs, fd, buffer, offset, length, position, callback);
135
+ }
136
+ callback_.apply(this, arguments);
137
+ };
138
+ }
139
+ return fs$read.call(fs, fd, buffer, offset, length, position, callback);
140
+ }
141
+ if (Object.setPrototypeOf) Object.setPrototypeOf(read, fs$read);
142
+ return read;
143
+ })(fs.read);
144
+ fs.readSync = typeof fs.readSync !== "function" ? fs.readSync : /* @__PURE__ */ (function(fs$readSync) {
145
+ return function(fd, buffer, offset, length, position) {
146
+ var eagCounter = 0;
147
+ while (true) {
148
+ try {
149
+ return fs$readSync.call(fs, fd, buffer, offset, length, position);
150
+ } catch (er) {
151
+ if (er.code === "EAGAIN" && eagCounter < 10) {
152
+ eagCounter++;
153
+ continue;
154
+ }
155
+ throw er;
156
+ }
157
+ }
158
+ };
159
+ })(fs.readSync);
160
+ function patchLchmod(fs2) {
161
+ fs2.lchmod = function(path6, mode, callback) {
162
+ fs2.open(
163
+ path6,
164
+ constants.O_WRONLY | constants.O_SYMLINK,
165
+ mode,
166
+ function(err, fd) {
167
+ if (err) {
168
+ if (callback) callback(err);
169
+ return;
170
+ }
171
+ fs2.fchmod(fd, mode, function(err2) {
172
+ fs2.close(fd, function(err22) {
173
+ if (callback) callback(err2 || err22);
174
+ });
175
+ });
176
+ }
177
+ );
178
+ };
179
+ fs2.lchmodSync = function(path6, mode) {
180
+ var fd = fs2.openSync(path6, constants.O_WRONLY | constants.O_SYMLINK, mode);
181
+ var threw = true;
182
+ var ret;
183
+ try {
184
+ ret = fs2.fchmodSync(fd, mode);
185
+ threw = false;
186
+ } finally {
187
+ if (threw) {
188
+ try {
189
+ fs2.closeSync(fd);
190
+ } catch (er) {
191
+ }
192
+ } else {
193
+ fs2.closeSync(fd);
194
+ }
195
+ }
196
+ return ret;
197
+ };
198
+ }
199
+ function patchLutimes(fs2) {
200
+ if (constants.hasOwnProperty("O_SYMLINK") && fs2.futimes) {
201
+ fs2.lutimes = function(path6, at, mt, cb) {
202
+ fs2.open(path6, constants.O_SYMLINK, function(er, fd) {
203
+ if (er) {
204
+ if (cb) cb(er);
205
+ return;
206
+ }
207
+ fs2.futimes(fd, at, mt, function(er2) {
208
+ fs2.close(fd, function(er22) {
209
+ if (cb) cb(er2 || er22);
210
+ });
211
+ });
212
+ });
213
+ };
214
+ fs2.lutimesSync = function(path6, at, mt) {
215
+ var fd = fs2.openSync(path6, constants.O_SYMLINK);
216
+ var ret;
217
+ var threw = true;
218
+ try {
219
+ ret = fs2.futimesSync(fd, at, mt);
220
+ threw = false;
221
+ } finally {
222
+ if (threw) {
223
+ try {
224
+ fs2.closeSync(fd);
225
+ } catch (er) {
226
+ }
227
+ } else {
228
+ fs2.closeSync(fd);
229
+ }
230
+ }
231
+ return ret;
232
+ };
233
+ } else if (fs2.futimes) {
234
+ fs2.lutimes = function(_a, _b, _c, cb) {
235
+ if (cb) process.nextTick(cb);
236
+ };
237
+ fs2.lutimesSync = function() {
238
+ };
239
+ }
240
+ }
241
+ function chmodFix(orig) {
242
+ if (!orig) return orig;
243
+ return function(target, mode, cb) {
244
+ return orig.call(fs, target, mode, function(er) {
245
+ if (chownErOk(er)) er = null;
246
+ if (cb) cb.apply(this, arguments);
247
+ });
248
+ };
249
+ }
250
+ function chmodFixSync(orig) {
251
+ if (!orig) return orig;
252
+ return function(target, mode) {
253
+ try {
254
+ return orig.call(fs, target, mode);
255
+ } catch (er) {
256
+ if (!chownErOk(er)) throw er;
257
+ }
258
+ };
259
+ }
260
+ function chownFix(orig) {
261
+ if (!orig) return orig;
262
+ return function(target, uid, gid, cb) {
263
+ return orig.call(fs, target, uid, gid, function(er) {
264
+ if (chownErOk(er)) er = null;
265
+ if (cb) cb.apply(this, arguments);
266
+ });
267
+ };
268
+ }
269
+ function chownFixSync(orig) {
270
+ if (!orig) return orig;
271
+ return function(target, uid, gid) {
272
+ try {
273
+ return orig.call(fs, target, uid, gid);
274
+ } catch (er) {
275
+ if (!chownErOk(er)) throw er;
276
+ }
277
+ };
278
+ }
279
+ function statFix(orig) {
280
+ if (!orig) return orig;
281
+ return function(target, options, cb) {
282
+ if (typeof options === "function") {
283
+ cb = options;
284
+ options = null;
285
+ }
286
+ function callback(er, stats) {
287
+ if (stats) {
288
+ if (stats.uid < 0) stats.uid += 4294967296;
289
+ if (stats.gid < 0) stats.gid += 4294967296;
290
+ }
291
+ if (cb) cb.apply(this, arguments);
292
+ }
293
+ return options ? orig.call(fs, target, options, callback) : orig.call(fs, target, callback);
294
+ };
295
+ }
296
+ function statFixSync(orig) {
297
+ if (!orig) return orig;
298
+ return function(target, options) {
299
+ var stats = options ? orig.call(fs, target, options) : orig.call(fs, target);
300
+ if (stats) {
301
+ if (stats.uid < 0) stats.uid += 4294967296;
302
+ if (stats.gid < 0) stats.gid += 4294967296;
303
+ }
304
+ return stats;
305
+ };
306
+ }
307
+ function chownErOk(er) {
308
+ if (!er)
309
+ return true;
310
+ if (er.code === "ENOSYS")
311
+ return true;
312
+ var nonroot = !process.getuid || process.getuid() !== 0;
313
+ if (nonroot) {
314
+ if (er.code === "EINVAL" || er.code === "EPERM")
315
+ return true;
316
+ }
317
+ return false;
318
+ }
319
+ }
320
+ }
321
+ });
322
+
323
+ // node_modules/graceful-fs/legacy-streams.js
324
+ var require_legacy_streams = __commonJS({
325
+ "node_modules/graceful-fs/legacy-streams.js"(exports, module) {
326
+ var Stream = __require("stream").Stream;
327
+ module.exports = legacy;
328
+ function legacy(fs) {
329
+ return {
330
+ ReadStream,
331
+ WriteStream
332
+ };
333
+ function ReadStream(path6, options) {
334
+ if (!(this instanceof ReadStream)) return new ReadStream(path6, options);
335
+ Stream.call(this);
336
+ var self = this;
337
+ this.path = path6;
338
+ this.fd = null;
339
+ this.readable = true;
340
+ this.paused = false;
341
+ this.flags = "r";
342
+ this.mode = 438;
343
+ this.bufferSize = 64 * 1024;
344
+ options = options || {};
345
+ var keys = Object.keys(options);
346
+ for (var index = 0, length = keys.length; index < length; index++) {
347
+ var key = keys[index];
348
+ this[key] = options[key];
349
+ }
350
+ if (this.encoding) this.setEncoding(this.encoding);
351
+ if (this.start !== void 0) {
352
+ if ("number" !== typeof this.start) {
353
+ throw TypeError("start must be a Number");
354
+ }
355
+ if (this.end === void 0) {
356
+ this.end = Infinity;
357
+ } else if ("number" !== typeof this.end) {
358
+ throw TypeError("end must be a Number");
359
+ }
360
+ if (this.start > this.end) {
361
+ throw new Error("start must be <= end");
362
+ }
363
+ this.pos = this.start;
364
+ }
365
+ if (this.fd !== null) {
366
+ process.nextTick(function() {
367
+ self._read();
368
+ });
369
+ return;
370
+ }
371
+ fs.open(this.path, this.flags, this.mode, function(err, fd) {
372
+ if (err) {
373
+ self.emit("error", err);
374
+ self.readable = false;
375
+ return;
376
+ }
377
+ self.fd = fd;
378
+ self.emit("open", fd);
379
+ self._read();
380
+ });
381
+ }
382
+ function WriteStream(path6, options) {
383
+ if (!(this instanceof WriteStream)) return new WriteStream(path6, options);
384
+ Stream.call(this);
385
+ this.path = path6;
386
+ this.fd = null;
387
+ this.writable = true;
388
+ this.flags = "w";
389
+ this.encoding = "binary";
390
+ this.mode = 438;
391
+ this.bytesWritten = 0;
392
+ options = options || {};
393
+ var keys = Object.keys(options);
394
+ for (var index = 0, length = keys.length; index < length; index++) {
395
+ var key = keys[index];
396
+ this[key] = options[key];
397
+ }
398
+ if (this.start !== void 0) {
399
+ if ("number" !== typeof this.start) {
400
+ throw TypeError("start must be a Number");
401
+ }
402
+ if (this.start < 0) {
403
+ throw new Error("start must be >= zero");
404
+ }
405
+ this.pos = this.start;
406
+ }
407
+ this.busy = false;
408
+ this._queue = [];
409
+ if (this.fd === null) {
410
+ this._open = fs.open;
411
+ this._queue.push([this._open, this.path, this.flags, this.mode, void 0]);
412
+ this.flush();
413
+ }
414
+ }
415
+ }
416
+ }
417
+ });
418
+
419
+ // node_modules/graceful-fs/clone.js
420
+ var require_clone = __commonJS({
421
+ "node_modules/graceful-fs/clone.js"(exports, module) {
422
+ "use strict";
423
+ module.exports = clone;
424
+ var getPrototypeOf = Object.getPrototypeOf || function(obj) {
425
+ return obj.__proto__;
426
+ };
427
+ function clone(obj) {
428
+ if (obj === null || typeof obj !== "object")
429
+ return obj;
430
+ if (obj instanceof Object)
431
+ var copy = { __proto__: getPrototypeOf(obj) };
432
+ else
433
+ var copy = /* @__PURE__ */ Object.create(null);
434
+ Object.getOwnPropertyNames(obj).forEach(function(key) {
435
+ Object.defineProperty(copy, key, Object.getOwnPropertyDescriptor(obj, key));
436
+ });
437
+ return copy;
438
+ }
439
+ }
440
+ });
441
+
442
+ // node_modules/graceful-fs/graceful-fs.js
443
+ var require_graceful_fs = __commonJS({
444
+ "node_modules/graceful-fs/graceful-fs.js"(exports, module) {
445
+ var fs = __require("fs");
446
+ var polyfills = require_polyfills();
447
+ var legacy = require_legacy_streams();
448
+ var clone = require_clone();
449
+ var util = __require("util");
450
+ var gracefulQueue;
451
+ var previousSymbol;
452
+ if (typeof Symbol === "function" && typeof Symbol.for === "function") {
453
+ gracefulQueue = /* @__PURE__ */ Symbol.for("graceful-fs.queue");
454
+ previousSymbol = /* @__PURE__ */ Symbol.for("graceful-fs.previous");
455
+ } else {
456
+ gracefulQueue = "___graceful-fs.queue";
457
+ previousSymbol = "___graceful-fs.previous";
458
+ }
459
+ function noop() {
460
+ }
461
+ function publishQueue(context, queue2) {
462
+ Object.defineProperty(context, gracefulQueue, {
463
+ get: function() {
464
+ return queue2;
465
+ }
466
+ });
467
+ }
468
+ var debug = noop;
469
+ if (util.debuglog)
470
+ debug = util.debuglog("gfs4");
471
+ else if (/\bgfs4\b/i.test(process.env.NODE_DEBUG || ""))
472
+ debug = function() {
473
+ var m = util.format.apply(util, arguments);
474
+ m = "GFS4: " + m.split(/\n/).join("\nGFS4: ");
475
+ console.error(m);
476
+ };
477
+ if (!fs[gracefulQueue]) {
478
+ queue = global[gracefulQueue] || [];
479
+ publishQueue(fs, queue);
480
+ fs.close = (function(fs$close) {
481
+ function close(fd, cb) {
482
+ return fs$close.call(fs, fd, function(err) {
483
+ if (!err) {
484
+ resetQueue();
485
+ }
486
+ if (typeof cb === "function")
487
+ cb.apply(this, arguments);
488
+ });
489
+ }
490
+ Object.defineProperty(close, previousSymbol, {
491
+ value: fs$close
492
+ });
493
+ return close;
494
+ })(fs.close);
495
+ fs.closeSync = (function(fs$closeSync) {
496
+ function closeSync(fd) {
497
+ fs$closeSync.apply(fs, arguments);
498
+ resetQueue();
499
+ }
500
+ Object.defineProperty(closeSync, previousSymbol, {
501
+ value: fs$closeSync
502
+ });
503
+ return closeSync;
504
+ })(fs.closeSync);
505
+ if (/\bgfs4\b/i.test(process.env.NODE_DEBUG || "")) {
506
+ process.on("exit", function() {
507
+ debug(fs[gracefulQueue]);
508
+ __require("assert").equal(fs[gracefulQueue].length, 0);
509
+ });
510
+ }
511
+ }
512
+ var queue;
513
+ if (!global[gracefulQueue]) {
514
+ publishQueue(global, fs[gracefulQueue]);
515
+ }
516
+ module.exports = patch(clone(fs));
517
+ if (process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH && !fs.__patched) {
518
+ module.exports = patch(fs);
519
+ fs.__patched = true;
520
+ }
521
+ function patch(fs2) {
522
+ polyfills(fs2);
523
+ fs2.gracefulify = patch;
524
+ fs2.createReadStream = createReadStream;
525
+ fs2.createWriteStream = createWriteStream;
526
+ var fs$readFile = fs2.readFile;
527
+ fs2.readFile = readFile5;
528
+ function readFile5(path6, options, cb) {
529
+ if (typeof options === "function")
530
+ cb = options, options = null;
531
+ return go$readFile(path6, options, cb);
532
+ function go$readFile(path7, options2, cb2, startTime) {
533
+ return fs$readFile(path7, options2, function(err) {
534
+ if (err && (err.code === "EMFILE" || err.code === "ENFILE"))
535
+ enqueue([go$readFile, [path7, options2, cb2], err, startTime || Date.now(), Date.now()]);
536
+ else {
537
+ if (typeof cb2 === "function")
538
+ cb2.apply(this, arguments);
539
+ }
540
+ });
541
+ }
542
+ }
543
+ var fs$writeFile = fs2.writeFile;
544
+ fs2.writeFile = writeFile3;
545
+ function writeFile3(path6, data, options, cb) {
546
+ if (typeof options === "function")
547
+ cb = options, options = null;
548
+ return go$writeFile(path6, data, options, cb);
549
+ function go$writeFile(path7, data2, options2, cb2, startTime) {
550
+ return fs$writeFile(path7, data2, options2, function(err) {
551
+ if (err && (err.code === "EMFILE" || err.code === "ENFILE"))
552
+ enqueue([go$writeFile, [path7, data2, options2, cb2], err, startTime || Date.now(), Date.now()]);
553
+ else {
554
+ if (typeof cb2 === "function")
555
+ cb2.apply(this, arguments);
556
+ }
557
+ });
558
+ }
559
+ }
560
+ var fs$appendFile = fs2.appendFile;
561
+ if (fs$appendFile)
562
+ fs2.appendFile = appendFile;
563
+ function appendFile(path6, data, options, cb) {
564
+ if (typeof options === "function")
565
+ cb = options, options = null;
566
+ return go$appendFile(path6, data, options, cb);
567
+ function go$appendFile(path7, data2, options2, cb2, startTime) {
568
+ return fs$appendFile(path7, data2, options2, function(err) {
569
+ if (err && (err.code === "EMFILE" || err.code === "ENFILE"))
570
+ enqueue([go$appendFile, [path7, data2, options2, cb2], err, startTime || Date.now(), Date.now()]);
571
+ else {
572
+ if (typeof cb2 === "function")
573
+ cb2.apply(this, arguments);
574
+ }
575
+ });
576
+ }
577
+ }
578
+ var fs$copyFile = fs2.copyFile;
579
+ if (fs$copyFile)
580
+ fs2.copyFile = copyFile;
581
+ function copyFile(src, dest, flags, cb) {
582
+ if (typeof flags === "function") {
583
+ cb = flags;
584
+ flags = 0;
585
+ }
586
+ return go$copyFile(src, dest, flags, cb);
587
+ function go$copyFile(src2, dest2, flags2, cb2, startTime) {
588
+ return fs$copyFile(src2, dest2, flags2, function(err) {
589
+ if (err && (err.code === "EMFILE" || err.code === "ENFILE"))
590
+ enqueue([go$copyFile, [src2, dest2, flags2, cb2], err, startTime || Date.now(), Date.now()]);
591
+ else {
592
+ if (typeof cb2 === "function")
593
+ cb2.apply(this, arguments);
594
+ }
595
+ });
596
+ }
597
+ }
598
+ var fs$readdir = fs2.readdir;
599
+ fs2.readdir = readdir2;
600
+ var noReaddirOptionVersions = /^v[0-5]\./;
601
+ function readdir2(path6, options, cb) {
602
+ if (typeof options === "function")
603
+ cb = options, options = null;
604
+ var go$readdir = noReaddirOptionVersions.test(process.version) ? function go$readdir2(path7, options2, cb2, startTime) {
605
+ return fs$readdir(path7, fs$readdirCallback(
606
+ path7,
607
+ options2,
608
+ cb2,
609
+ startTime
610
+ ));
611
+ } : function go$readdir2(path7, options2, cb2, startTime) {
612
+ return fs$readdir(path7, options2, fs$readdirCallback(
613
+ path7,
614
+ options2,
615
+ cb2,
616
+ startTime
617
+ ));
618
+ };
619
+ return go$readdir(path6, options, cb);
620
+ function fs$readdirCallback(path7, options2, cb2, startTime) {
621
+ return function(err, files) {
622
+ if (err && (err.code === "EMFILE" || err.code === "ENFILE"))
623
+ enqueue([
624
+ go$readdir,
625
+ [path7, options2, cb2],
626
+ err,
627
+ startTime || Date.now(),
628
+ Date.now()
629
+ ]);
630
+ else {
631
+ if (files && files.sort)
632
+ files.sort();
633
+ if (typeof cb2 === "function")
634
+ cb2.call(this, err, files);
635
+ }
636
+ };
637
+ }
638
+ }
639
+ if (process.version.substr(0, 4) === "v0.8") {
640
+ var legStreams = legacy(fs2);
641
+ ReadStream = legStreams.ReadStream;
642
+ WriteStream = legStreams.WriteStream;
643
+ }
644
+ var fs$ReadStream = fs2.ReadStream;
645
+ if (fs$ReadStream) {
646
+ ReadStream.prototype = Object.create(fs$ReadStream.prototype);
647
+ ReadStream.prototype.open = ReadStream$open;
648
+ }
649
+ var fs$WriteStream = fs2.WriteStream;
650
+ if (fs$WriteStream) {
651
+ WriteStream.prototype = Object.create(fs$WriteStream.prototype);
652
+ WriteStream.prototype.open = WriteStream$open;
653
+ }
654
+ Object.defineProperty(fs2, "ReadStream", {
655
+ get: function() {
656
+ return ReadStream;
657
+ },
658
+ set: function(val) {
659
+ ReadStream = val;
660
+ },
661
+ enumerable: true,
662
+ configurable: true
663
+ });
664
+ Object.defineProperty(fs2, "WriteStream", {
665
+ get: function() {
666
+ return WriteStream;
667
+ },
668
+ set: function(val) {
669
+ WriteStream = val;
670
+ },
671
+ enumerable: true,
672
+ configurable: true
673
+ });
674
+ var FileReadStream = ReadStream;
675
+ Object.defineProperty(fs2, "FileReadStream", {
676
+ get: function() {
677
+ return FileReadStream;
678
+ },
679
+ set: function(val) {
680
+ FileReadStream = val;
681
+ },
682
+ enumerable: true,
683
+ configurable: true
684
+ });
685
+ var FileWriteStream = WriteStream;
686
+ Object.defineProperty(fs2, "FileWriteStream", {
687
+ get: function() {
688
+ return FileWriteStream;
689
+ },
690
+ set: function(val) {
691
+ FileWriteStream = val;
692
+ },
693
+ enumerable: true,
694
+ configurable: true
695
+ });
696
+ function ReadStream(path6, options) {
697
+ if (this instanceof ReadStream)
698
+ return fs$ReadStream.apply(this, arguments), this;
699
+ else
700
+ return ReadStream.apply(Object.create(ReadStream.prototype), arguments);
701
+ }
702
+ function ReadStream$open() {
703
+ var that = this;
704
+ open(that.path, that.flags, that.mode, function(err, fd) {
705
+ if (err) {
706
+ if (that.autoClose)
707
+ that.destroy();
708
+ that.emit("error", err);
709
+ } else {
710
+ that.fd = fd;
711
+ that.emit("open", fd);
712
+ that.read();
713
+ }
714
+ });
715
+ }
716
+ function WriteStream(path6, options) {
717
+ if (this instanceof WriteStream)
718
+ return fs$WriteStream.apply(this, arguments), this;
719
+ else
720
+ return WriteStream.apply(Object.create(WriteStream.prototype), arguments);
721
+ }
722
+ function WriteStream$open() {
723
+ var that = this;
724
+ open(that.path, that.flags, that.mode, function(err, fd) {
725
+ if (err) {
726
+ that.destroy();
727
+ that.emit("error", err);
728
+ } else {
729
+ that.fd = fd;
730
+ that.emit("open", fd);
731
+ }
732
+ });
733
+ }
734
+ function createReadStream(path6, options) {
735
+ return new fs2.ReadStream(path6, options);
736
+ }
737
+ function createWriteStream(path6, options) {
738
+ return new fs2.WriteStream(path6, options);
739
+ }
740
+ var fs$open = fs2.open;
741
+ fs2.open = open;
742
+ function open(path6, flags, mode, cb) {
743
+ if (typeof mode === "function")
744
+ cb = mode, mode = null;
745
+ return go$open(path6, flags, mode, cb);
746
+ function go$open(path7, flags2, mode2, cb2, startTime) {
747
+ return fs$open(path7, flags2, mode2, function(err, fd) {
748
+ if (err && (err.code === "EMFILE" || err.code === "ENFILE"))
749
+ enqueue([go$open, [path7, flags2, mode2, cb2], err, startTime || Date.now(), Date.now()]);
750
+ else {
751
+ if (typeof cb2 === "function")
752
+ cb2.apply(this, arguments);
753
+ }
754
+ });
755
+ }
756
+ }
757
+ return fs2;
758
+ }
759
+ function enqueue(elem) {
760
+ debug("ENQUEUE", elem[0].name, elem[1]);
761
+ fs[gracefulQueue].push(elem);
762
+ retry();
763
+ }
764
+ var retryTimer;
765
+ function resetQueue() {
766
+ var now = Date.now();
767
+ for (var i = 0; i < fs[gracefulQueue].length; ++i) {
768
+ if (fs[gracefulQueue][i].length > 2) {
769
+ fs[gracefulQueue][i][3] = now;
770
+ fs[gracefulQueue][i][4] = now;
771
+ }
772
+ }
773
+ retry();
774
+ }
775
+ function retry() {
776
+ clearTimeout(retryTimer);
777
+ retryTimer = void 0;
778
+ if (fs[gracefulQueue].length === 0)
779
+ return;
780
+ var elem = fs[gracefulQueue].shift();
781
+ var fn = elem[0];
782
+ var args = elem[1];
783
+ var err = elem[2];
784
+ var startTime = elem[3];
785
+ var lastTime = elem[4];
786
+ if (startTime === void 0) {
787
+ debug("RETRY", fn.name, args);
788
+ fn.apply(null, args);
789
+ } else if (Date.now() - startTime >= 6e4) {
790
+ debug("TIMEOUT", fn.name, args);
791
+ var cb = args.pop();
792
+ if (typeof cb === "function")
793
+ cb.call(null, err);
794
+ } else {
795
+ var sinceAttempt = Date.now() - lastTime;
796
+ var sinceStart = Math.max(lastTime - startTime, 1);
797
+ var desiredDelay = Math.min(sinceStart * 1.2, 100);
798
+ if (sinceAttempt >= desiredDelay) {
799
+ debug("RETRY", fn.name, args);
800
+ fn.apply(null, args.concat([startTime]));
801
+ } else {
802
+ fs[gracefulQueue].push(elem);
803
+ }
804
+ }
805
+ if (retryTimer === void 0) {
806
+ retryTimer = setTimeout(retry, 0);
807
+ }
808
+ }
809
+ }
810
+ });
811
+
812
+ // node_modules/retry/lib/retry_operation.js
813
+ var require_retry_operation = __commonJS({
814
+ "node_modules/retry/lib/retry_operation.js"(exports, module) {
815
+ function RetryOperation(timeouts, options) {
816
+ if (typeof options === "boolean") {
817
+ options = { forever: options };
818
+ }
819
+ this._originalTimeouts = JSON.parse(JSON.stringify(timeouts));
820
+ this._timeouts = timeouts;
821
+ this._options = options || {};
822
+ this._maxRetryTime = options && options.maxRetryTime || Infinity;
823
+ this._fn = null;
824
+ this._errors = [];
825
+ this._attempts = 1;
826
+ this._operationTimeout = null;
827
+ this._operationTimeoutCb = null;
828
+ this._timeout = null;
829
+ this._operationStart = null;
830
+ if (this._options.forever) {
831
+ this._cachedTimeouts = this._timeouts.slice(0);
832
+ }
833
+ }
834
+ module.exports = RetryOperation;
835
+ RetryOperation.prototype.reset = function() {
836
+ this._attempts = 1;
837
+ this._timeouts = this._originalTimeouts;
838
+ };
839
+ RetryOperation.prototype.stop = function() {
840
+ if (this._timeout) {
841
+ clearTimeout(this._timeout);
842
+ }
843
+ this._timeouts = [];
844
+ this._cachedTimeouts = null;
845
+ };
846
+ RetryOperation.prototype.retry = function(err) {
847
+ if (this._timeout) {
848
+ clearTimeout(this._timeout);
849
+ }
850
+ if (!err) {
851
+ return false;
852
+ }
853
+ var currentTime = (/* @__PURE__ */ new Date()).getTime();
854
+ if (err && currentTime - this._operationStart >= this._maxRetryTime) {
855
+ this._errors.unshift(new Error("RetryOperation timeout occurred"));
856
+ return false;
857
+ }
858
+ this._errors.push(err);
859
+ var timeout = this._timeouts.shift();
860
+ if (timeout === void 0) {
861
+ if (this._cachedTimeouts) {
862
+ this._errors.splice(this._errors.length - 1, this._errors.length);
863
+ this._timeouts = this._cachedTimeouts.slice(0);
864
+ timeout = this._timeouts.shift();
865
+ } else {
866
+ return false;
867
+ }
868
+ }
869
+ var self = this;
870
+ var timer = setTimeout(function() {
871
+ self._attempts++;
872
+ if (self._operationTimeoutCb) {
873
+ self._timeout = setTimeout(function() {
874
+ self._operationTimeoutCb(self._attempts);
875
+ }, self._operationTimeout);
876
+ if (self._options.unref) {
877
+ self._timeout.unref();
878
+ }
879
+ }
880
+ self._fn(self._attempts);
881
+ }, timeout);
882
+ if (this._options.unref) {
883
+ timer.unref();
884
+ }
885
+ return true;
886
+ };
887
+ RetryOperation.prototype.attempt = function(fn, timeoutOps) {
888
+ this._fn = fn;
889
+ if (timeoutOps) {
890
+ if (timeoutOps.timeout) {
891
+ this._operationTimeout = timeoutOps.timeout;
892
+ }
893
+ if (timeoutOps.cb) {
894
+ this._operationTimeoutCb = timeoutOps.cb;
895
+ }
896
+ }
897
+ var self = this;
898
+ if (this._operationTimeoutCb) {
899
+ this._timeout = setTimeout(function() {
900
+ self._operationTimeoutCb();
901
+ }, self._operationTimeout);
902
+ }
903
+ this._operationStart = (/* @__PURE__ */ new Date()).getTime();
904
+ this._fn(this._attempts);
905
+ };
906
+ RetryOperation.prototype.try = function(fn) {
907
+ console.log("Using RetryOperation.try() is deprecated");
908
+ this.attempt(fn);
909
+ };
910
+ RetryOperation.prototype.start = function(fn) {
911
+ console.log("Using RetryOperation.start() is deprecated");
912
+ this.attempt(fn);
913
+ };
914
+ RetryOperation.prototype.start = RetryOperation.prototype.try;
915
+ RetryOperation.prototype.errors = function() {
916
+ return this._errors;
917
+ };
918
+ RetryOperation.prototype.attempts = function() {
919
+ return this._attempts;
920
+ };
921
+ RetryOperation.prototype.mainError = function() {
922
+ if (this._errors.length === 0) {
923
+ return null;
924
+ }
925
+ var counts = {};
926
+ var mainError = null;
927
+ var mainErrorCount = 0;
928
+ for (var i = 0; i < this._errors.length; i++) {
929
+ var error = this._errors[i];
930
+ var message = error.message;
931
+ var count = (counts[message] || 0) + 1;
932
+ counts[message] = count;
933
+ if (count >= mainErrorCount) {
934
+ mainError = error;
935
+ mainErrorCount = count;
936
+ }
937
+ }
938
+ return mainError;
939
+ };
940
+ }
941
+ });
942
+
943
+ // node_modules/retry/lib/retry.js
944
+ var require_retry = __commonJS({
945
+ "node_modules/retry/lib/retry.js"(exports) {
946
+ var RetryOperation = require_retry_operation();
947
+ exports.operation = function(options) {
948
+ var timeouts = exports.timeouts(options);
949
+ return new RetryOperation(timeouts, {
950
+ forever: options && options.forever,
951
+ unref: options && options.unref,
952
+ maxRetryTime: options && options.maxRetryTime
953
+ });
954
+ };
955
+ exports.timeouts = function(options) {
956
+ if (options instanceof Array) {
957
+ return [].concat(options);
958
+ }
959
+ var opts = {
960
+ retries: 10,
961
+ factor: 2,
962
+ minTimeout: 1 * 1e3,
963
+ maxTimeout: Infinity,
964
+ randomize: false
965
+ };
966
+ for (var key in options) {
967
+ opts[key] = options[key];
968
+ }
969
+ if (opts.minTimeout > opts.maxTimeout) {
970
+ throw new Error("minTimeout is greater than maxTimeout");
971
+ }
972
+ var timeouts = [];
973
+ for (var i = 0; i < opts.retries; i++) {
974
+ timeouts.push(this.createTimeout(i, opts));
975
+ }
976
+ if (options && options.forever && !timeouts.length) {
977
+ timeouts.push(this.createTimeout(i, opts));
978
+ }
979
+ timeouts.sort(function(a, b) {
980
+ return a - b;
981
+ });
982
+ return timeouts;
983
+ };
984
+ exports.createTimeout = function(attempt, opts) {
985
+ var random = opts.randomize ? Math.random() + 1 : 1;
986
+ var timeout = Math.round(random * opts.minTimeout * Math.pow(opts.factor, attempt));
987
+ timeout = Math.min(timeout, opts.maxTimeout);
988
+ return timeout;
989
+ };
990
+ exports.wrap = function(obj, options, methods) {
991
+ if (options instanceof Array) {
992
+ methods = options;
993
+ options = null;
994
+ }
995
+ if (!methods) {
996
+ methods = [];
997
+ for (var key in obj) {
998
+ if (typeof obj[key] === "function") {
999
+ methods.push(key);
1000
+ }
1001
+ }
1002
+ }
1003
+ for (var i = 0; i < methods.length; i++) {
1004
+ var method = methods[i];
1005
+ var original = obj[method];
1006
+ obj[method] = function retryWrapper(original2) {
1007
+ var op = exports.operation(options);
1008
+ var args = Array.prototype.slice.call(arguments, 1);
1009
+ var callback = args.pop();
1010
+ args.push(function(err) {
1011
+ if (op.retry(err)) {
1012
+ return;
1013
+ }
1014
+ if (err) {
1015
+ arguments[0] = op.mainError();
1016
+ }
1017
+ callback.apply(this, arguments);
1018
+ });
1019
+ op.attempt(function() {
1020
+ original2.apply(obj, args);
1021
+ });
1022
+ }.bind(obj, original);
1023
+ obj[method].options = options;
1024
+ }
1025
+ };
1026
+ }
1027
+ });
1028
+
1029
+ // node_modules/retry/index.js
1030
+ var require_retry2 = __commonJS({
1031
+ "node_modules/retry/index.js"(exports, module) {
1032
+ module.exports = require_retry();
1033
+ }
1034
+ });
1035
+
1036
+ // node_modules/signal-exit/signals.js
1037
+ var require_signals = __commonJS({
1038
+ "node_modules/signal-exit/signals.js"(exports, module) {
1039
+ module.exports = [
1040
+ "SIGABRT",
1041
+ "SIGALRM",
1042
+ "SIGHUP",
1043
+ "SIGINT",
1044
+ "SIGTERM"
1045
+ ];
1046
+ if (process.platform !== "win32") {
1047
+ module.exports.push(
1048
+ "SIGVTALRM",
1049
+ "SIGXCPU",
1050
+ "SIGXFSZ",
1051
+ "SIGUSR2",
1052
+ "SIGTRAP",
1053
+ "SIGSYS",
1054
+ "SIGQUIT",
1055
+ "SIGIOT"
1056
+ // should detect profiler and enable/disable accordingly.
1057
+ // see #21
1058
+ // 'SIGPROF'
1059
+ );
1060
+ }
1061
+ if (process.platform === "linux") {
1062
+ module.exports.push(
1063
+ "SIGIO",
1064
+ "SIGPOLL",
1065
+ "SIGPWR",
1066
+ "SIGSTKFLT",
1067
+ "SIGUNUSED"
1068
+ );
1069
+ }
1070
+ }
1071
+ });
1072
+
1073
+ // node_modules/signal-exit/index.js
1074
+ var require_signal_exit = __commonJS({
1075
+ "node_modules/signal-exit/index.js"(exports, module) {
1076
+ var process2 = global.process;
1077
+ var processOk = function(process3) {
1078
+ return process3 && typeof process3 === "object" && typeof process3.removeListener === "function" && typeof process3.emit === "function" && typeof process3.reallyExit === "function" && typeof process3.listeners === "function" && typeof process3.kill === "function" && typeof process3.pid === "number" && typeof process3.on === "function";
1079
+ };
1080
+ if (!processOk(process2)) {
1081
+ module.exports = function() {
1082
+ return function() {
1083
+ };
1084
+ };
1085
+ } else {
1086
+ assert = __require("assert");
1087
+ signals = require_signals();
1088
+ isWin = /^win/i.test(process2.platform);
1089
+ EE = __require("events");
1090
+ if (typeof EE !== "function") {
1091
+ EE = EE.EventEmitter;
1092
+ }
1093
+ if (process2.__signal_exit_emitter__) {
1094
+ emitter = process2.__signal_exit_emitter__;
1095
+ } else {
1096
+ emitter = process2.__signal_exit_emitter__ = new EE();
1097
+ emitter.count = 0;
1098
+ emitter.emitted = {};
1099
+ }
1100
+ if (!emitter.infinite) {
1101
+ emitter.setMaxListeners(Infinity);
1102
+ emitter.infinite = true;
1103
+ }
1104
+ module.exports = function(cb, opts) {
1105
+ if (!processOk(global.process)) {
1106
+ return function() {
1107
+ };
1108
+ }
1109
+ assert.equal(typeof cb, "function", "a callback must be provided for exit handler");
1110
+ if (loaded === false) {
1111
+ load();
1112
+ }
1113
+ var ev = "exit";
1114
+ if (opts && opts.alwaysLast) {
1115
+ ev = "afterexit";
1116
+ }
1117
+ var remove = function() {
1118
+ emitter.removeListener(ev, cb);
1119
+ if (emitter.listeners("exit").length === 0 && emitter.listeners("afterexit").length === 0) {
1120
+ unload();
1121
+ }
1122
+ };
1123
+ emitter.on(ev, cb);
1124
+ return remove;
1125
+ };
1126
+ unload = function unload2() {
1127
+ if (!loaded || !processOk(global.process)) {
1128
+ return;
1129
+ }
1130
+ loaded = false;
1131
+ signals.forEach(function(sig) {
1132
+ try {
1133
+ process2.removeListener(sig, sigListeners[sig]);
1134
+ } catch (er) {
1135
+ }
1136
+ });
1137
+ process2.emit = originalProcessEmit;
1138
+ process2.reallyExit = originalProcessReallyExit;
1139
+ emitter.count -= 1;
1140
+ };
1141
+ module.exports.unload = unload;
1142
+ emit = function emit2(event, code, signal) {
1143
+ if (emitter.emitted[event]) {
1144
+ return;
1145
+ }
1146
+ emitter.emitted[event] = true;
1147
+ emitter.emit(event, code, signal);
1148
+ };
1149
+ sigListeners = {};
1150
+ signals.forEach(function(sig) {
1151
+ sigListeners[sig] = function listener() {
1152
+ if (!processOk(global.process)) {
1153
+ return;
1154
+ }
1155
+ var listeners = process2.listeners(sig);
1156
+ if (listeners.length === emitter.count) {
1157
+ unload();
1158
+ emit("exit", null, sig);
1159
+ emit("afterexit", null, sig);
1160
+ if (isWin && sig === "SIGHUP") {
1161
+ sig = "SIGINT";
1162
+ }
1163
+ process2.kill(process2.pid, sig);
1164
+ }
1165
+ };
1166
+ });
1167
+ module.exports.signals = function() {
1168
+ return signals;
1169
+ };
1170
+ loaded = false;
1171
+ load = function load2() {
1172
+ if (loaded || !processOk(global.process)) {
1173
+ return;
1174
+ }
1175
+ loaded = true;
1176
+ emitter.count += 1;
1177
+ signals = signals.filter(function(sig) {
1178
+ try {
1179
+ process2.on(sig, sigListeners[sig]);
1180
+ return true;
1181
+ } catch (er) {
1182
+ return false;
1183
+ }
1184
+ });
1185
+ process2.emit = processEmit;
1186
+ process2.reallyExit = processReallyExit;
1187
+ };
1188
+ module.exports.load = load;
1189
+ originalProcessReallyExit = process2.reallyExit;
1190
+ processReallyExit = function processReallyExit2(code) {
1191
+ if (!processOk(global.process)) {
1192
+ return;
1193
+ }
1194
+ process2.exitCode = code || /* istanbul ignore next */
1195
+ 0;
1196
+ emit("exit", process2.exitCode, null);
1197
+ emit("afterexit", process2.exitCode, null);
1198
+ originalProcessReallyExit.call(process2, process2.exitCode);
1199
+ };
1200
+ originalProcessEmit = process2.emit;
1201
+ processEmit = function processEmit2(ev, arg) {
1202
+ if (ev === "exit" && processOk(global.process)) {
1203
+ if (arg !== void 0) {
1204
+ process2.exitCode = arg;
1205
+ }
1206
+ var ret = originalProcessEmit.apply(this, arguments);
1207
+ emit("exit", process2.exitCode, null);
1208
+ emit("afterexit", process2.exitCode, null);
1209
+ return ret;
1210
+ } else {
1211
+ return originalProcessEmit.apply(this, arguments);
1212
+ }
1213
+ };
1214
+ }
1215
+ var assert;
1216
+ var signals;
1217
+ var isWin;
1218
+ var EE;
1219
+ var emitter;
1220
+ var unload;
1221
+ var emit;
1222
+ var sigListeners;
1223
+ var loaded;
1224
+ var load;
1225
+ var originalProcessReallyExit;
1226
+ var processReallyExit;
1227
+ var originalProcessEmit;
1228
+ var processEmit;
1229
+ }
1230
+ });
1231
+
1232
+ // node_modules/proper-lockfile/lib/mtime-precision.js
1233
+ var require_mtime_precision = __commonJS({
1234
+ "node_modules/proper-lockfile/lib/mtime-precision.js"(exports, module) {
1235
+ "use strict";
1236
+ var cacheSymbol = /* @__PURE__ */ Symbol();
1237
+ function probe(file, fs, callback) {
1238
+ const cachedPrecision = fs[cacheSymbol];
1239
+ if (cachedPrecision) {
1240
+ return fs.stat(file, (err, stat) => {
1241
+ if (err) {
1242
+ return callback(err);
1243
+ }
1244
+ callback(null, stat.mtime, cachedPrecision);
1245
+ });
1246
+ }
1247
+ const mtime = new Date(Math.ceil(Date.now() / 1e3) * 1e3 + 5);
1248
+ fs.utimes(file, mtime, mtime, (err) => {
1249
+ if (err) {
1250
+ return callback(err);
1251
+ }
1252
+ fs.stat(file, (err2, stat) => {
1253
+ if (err2) {
1254
+ return callback(err2);
1255
+ }
1256
+ const precision = stat.mtime.getTime() % 1e3 === 0 ? "s" : "ms";
1257
+ Object.defineProperty(fs, cacheSymbol, { value: precision });
1258
+ callback(null, stat.mtime, precision);
1259
+ });
1260
+ });
1261
+ }
1262
+ function getMtime(precision) {
1263
+ let now = Date.now();
1264
+ if (precision === "s") {
1265
+ now = Math.ceil(now / 1e3) * 1e3;
1266
+ }
1267
+ return new Date(now);
1268
+ }
1269
+ module.exports.probe = probe;
1270
+ module.exports.getMtime = getMtime;
1271
+ }
1272
+ });
1273
+
1274
+ // node_modules/proper-lockfile/lib/lockfile.js
1275
+ var require_lockfile = __commonJS({
1276
+ "node_modules/proper-lockfile/lib/lockfile.js"(exports, module) {
1277
+ "use strict";
1278
+ var path6 = __require("path");
1279
+ var fs = require_graceful_fs();
1280
+ var retry = require_retry2();
1281
+ var onExit = require_signal_exit();
1282
+ var mtimePrecision = require_mtime_precision();
1283
+ var locks = {};
1284
+ function getLockFile(file, options) {
1285
+ return options.lockfilePath || `${file}.lock`;
1286
+ }
1287
+ function resolveCanonicalPath(file, options, callback) {
1288
+ if (!options.realpath) {
1289
+ return callback(null, path6.resolve(file));
1290
+ }
1291
+ options.fs.realpath(file, callback);
1292
+ }
1293
+ function acquireLock(file, options, callback) {
1294
+ const lockfilePath = getLockFile(file, options);
1295
+ options.fs.mkdir(lockfilePath, (err) => {
1296
+ if (!err) {
1297
+ return mtimePrecision.probe(lockfilePath, options.fs, (err2, mtime, mtimePrecision2) => {
1298
+ if (err2) {
1299
+ options.fs.rmdir(lockfilePath, () => {
1300
+ });
1301
+ return callback(err2);
1302
+ }
1303
+ callback(null, mtime, mtimePrecision2);
1304
+ });
1305
+ }
1306
+ if (err.code !== "EEXIST") {
1307
+ return callback(err);
1308
+ }
1309
+ if (options.stale <= 0) {
1310
+ return callback(Object.assign(new Error("Lock file is already being held"), { code: "ELOCKED", file }));
1311
+ }
1312
+ options.fs.stat(lockfilePath, (err2, stat) => {
1313
+ if (err2) {
1314
+ if (err2.code === "ENOENT") {
1315
+ return acquireLock(file, { ...options, stale: 0 }, callback);
1316
+ }
1317
+ return callback(err2);
1318
+ }
1319
+ if (!isLockStale(stat, options)) {
1320
+ return callback(Object.assign(new Error("Lock file is already being held"), { code: "ELOCKED", file }));
1321
+ }
1322
+ removeLock(file, options, (err3) => {
1323
+ if (err3) {
1324
+ return callback(err3);
1325
+ }
1326
+ acquireLock(file, { ...options, stale: 0 }, callback);
1327
+ });
1328
+ });
1329
+ });
1330
+ }
1331
+ function isLockStale(stat, options) {
1332
+ return stat.mtime.getTime() < Date.now() - options.stale;
1333
+ }
1334
+ function removeLock(file, options, callback) {
1335
+ options.fs.rmdir(getLockFile(file, options), (err) => {
1336
+ if (err && err.code !== "ENOENT") {
1337
+ return callback(err);
1338
+ }
1339
+ callback();
1340
+ });
1341
+ }
1342
+ function updateLock(file, options) {
1343
+ const lock2 = locks[file];
1344
+ if (lock2.updateTimeout) {
1345
+ return;
1346
+ }
1347
+ lock2.updateDelay = lock2.updateDelay || options.update;
1348
+ lock2.updateTimeout = setTimeout(() => {
1349
+ lock2.updateTimeout = null;
1350
+ options.fs.stat(lock2.lockfilePath, (err, stat) => {
1351
+ const isOverThreshold = lock2.lastUpdate + options.stale < Date.now();
1352
+ if (err) {
1353
+ if (err.code === "ENOENT" || isOverThreshold) {
1354
+ return setLockAsCompromised(file, lock2, Object.assign(err, { code: "ECOMPROMISED" }));
1355
+ }
1356
+ lock2.updateDelay = 1e3;
1357
+ return updateLock(file, options);
1358
+ }
1359
+ const isMtimeOurs = lock2.mtime.getTime() === stat.mtime.getTime();
1360
+ if (!isMtimeOurs) {
1361
+ return setLockAsCompromised(
1362
+ file,
1363
+ lock2,
1364
+ Object.assign(
1365
+ new Error("Unable to update lock within the stale threshold"),
1366
+ { code: "ECOMPROMISED" }
1367
+ )
1368
+ );
1369
+ }
1370
+ const mtime = mtimePrecision.getMtime(lock2.mtimePrecision);
1371
+ options.fs.utimes(lock2.lockfilePath, mtime, mtime, (err2) => {
1372
+ const isOverThreshold2 = lock2.lastUpdate + options.stale < Date.now();
1373
+ if (lock2.released) {
1374
+ return;
1375
+ }
1376
+ if (err2) {
1377
+ if (err2.code === "ENOENT" || isOverThreshold2) {
1378
+ return setLockAsCompromised(file, lock2, Object.assign(err2, { code: "ECOMPROMISED" }));
1379
+ }
1380
+ lock2.updateDelay = 1e3;
1381
+ return updateLock(file, options);
1382
+ }
1383
+ lock2.mtime = mtime;
1384
+ lock2.lastUpdate = Date.now();
1385
+ lock2.updateDelay = null;
1386
+ updateLock(file, options);
1387
+ });
1388
+ });
1389
+ }, lock2.updateDelay);
1390
+ if (lock2.updateTimeout.unref) {
1391
+ lock2.updateTimeout.unref();
1392
+ }
1393
+ }
1394
+ function setLockAsCompromised(file, lock2, err) {
1395
+ lock2.released = true;
1396
+ if (lock2.updateTimeout) {
1397
+ clearTimeout(lock2.updateTimeout);
1398
+ }
1399
+ if (locks[file] === lock2) {
1400
+ delete locks[file];
1401
+ }
1402
+ lock2.options.onCompromised(err);
1403
+ }
1404
+ function lock(file, options, callback) {
1405
+ options = {
1406
+ stale: 1e4,
1407
+ update: null,
1408
+ realpath: true,
1409
+ retries: 0,
1410
+ fs,
1411
+ onCompromised: (err) => {
1412
+ throw err;
1413
+ },
1414
+ ...options
1415
+ };
1416
+ options.retries = options.retries || 0;
1417
+ options.retries = typeof options.retries === "number" ? { retries: options.retries } : options.retries;
1418
+ options.stale = Math.max(options.stale || 0, 2e3);
1419
+ options.update = options.update == null ? options.stale / 2 : options.update || 0;
1420
+ options.update = Math.max(Math.min(options.update, options.stale / 2), 1e3);
1421
+ resolveCanonicalPath(file, options, (err, file2) => {
1422
+ if (err) {
1423
+ return callback(err);
1424
+ }
1425
+ const operation = retry.operation(options.retries);
1426
+ operation.attempt(() => {
1427
+ acquireLock(file2, options, (err2, mtime, mtimePrecision2) => {
1428
+ if (operation.retry(err2)) {
1429
+ return;
1430
+ }
1431
+ if (err2) {
1432
+ return callback(operation.mainError());
1433
+ }
1434
+ const lock2 = locks[file2] = {
1435
+ lockfilePath: getLockFile(file2, options),
1436
+ mtime,
1437
+ mtimePrecision: mtimePrecision2,
1438
+ options,
1439
+ lastUpdate: Date.now()
1440
+ };
1441
+ updateLock(file2, options);
1442
+ callback(null, (releasedCallback) => {
1443
+ if (lock2.released) {
1444
+ return releasedCallback && releasedCallback(Object.assign(new Error("Lock is already released"), { code: "ERELEASED" }));
1445
+ }
1446
+ unlock(file2, { ...options, realpath: false }, releasedCallback);
1447
+ });
1448
+ });
1449
+ });
1450
+ });
1451
+ }
1452
+ function unlock(file, options, callback) {
1453
+ options = {
1454
+ fs,
1455
+ realpath: true,
1456
+ ...options
1457
+ };
1458
+ resolveCanonicalPath(file, options, (err, file2) => {
1459
+ if (err) {
1460
+ return callback(err);
1461
+ }
1462
+ const lock2 = locks[file2];
1463
+ if (!lock2) {
1464
+ return callback(Object.assign(new Error("Lock is not acquired/owned by you"), { code: "ENOTACQUIRED" }));
1465
+ }
1466
+ lock2.updateTimeout && clearTimeout(lock2.updateTimeout);
1467
+ lock2.released = true;
1468
+ delete locks[file2];
1469
+ removeLock(file2, options, callback);
1470
+ });
1471
+ }
1472
+ function check(file, options, callback) {
1473
+ options = {
1474
+ stale: 1e4,
1475
+ realpath: true,
1476
+ fs,
1477
+ ...options
1478
+ };
1479
+ options.stale = Math.max(options.stale || 0, 2e3);
1480
+ resolveCanonicalPath(file, options, (err, file2) => {
1481
+ if (err) {
1482
+ return callback(err);
1483
+ }
1484
+ options.fs.stat(getLockFile(file2, options), (err2, stat) => {
1485
+ if (err2) {
1486
+ return err2.code === "ENOENT" ? callback(null, false) : callback(err2);
1487
+ }
1488
+ return callback(null, !isLockStale(stat, options));
1489
+ });
1490
+ });
1491
+ }
1492
+ function getLocks() {
1493
+ return locks;
1494
+ }
1495
+ onExit(() => {
1496
+ for (const file in locks) {
1497
+ const options = locks[file].options;
1498
+ try {
1499
+ options.fs.rmdirSync(getLockFile(file, options));
1500
+ } catch (e) {
1501
+ }
1502
+ }
1503
+ });
1504
+ module.exports.lock = lock;
1505
+ module.exports.unlock = unlock;
1506
+ module.exports.check = check;
1507
+ module.exports.getLocks = getLocks;
1508
+ }
1509
+ });
1510
+
1511
+ // node_modules/proper-lockfile/lib/adapter.js
1512
+ var require_adapter = __commonJS({
1513
+ "node_modules/proper-lockfile/lib/adapter.js"(exports, module) {
1514
+ "use strict";
1515
+ var fs = require_graceful_fs();
1516
+ function createSyncFs(fs2) {
1517
+ const methods = ["mkdir", "realpath", "stat", "rmdir", "utimes"];
1518
+ const newFs = { ...fs2 };
1519
+ methods.forEach((method) => {
1520
+ newFs[method] = (...args) => {
1521
+ const callback = args.pop();
1522
+ let ret;
1523
+ try {
1524
+ ret = fs2[`${method}Sync`](...args);
1525
+ } catch (err) {
1526
+ return callback(err);
1527
+ }
1528
+ callback(null, ret);
1529
+ };
1530
+ });
1531
+ return newFs;
1532
+ }
1533
+ function toPromise(method) {
1534
+ return (...args) => new Promise((resolve, reject) => {
1535
+ args.push((err, result) => {
1536
+ if (err) {
1537
+ reject(err);
1538
+ } else {
1539
+ resolve(result);
1540
+ }
1541
+ });
1542
+ method(...args);
1543
+ });
1544
+ }
1545
+ function toSync(method) {
1546
+ return (...args) => {
1547
+ let err;
1548
+ let result;
1549
+ args.push((_err, _result) => {
1550
+ err = _err;
1551
+ result = _result;
1552
+ });
1553
+ method(...args);
1554
+ if (err) {
1555
+ throw err;
1556
+ }
1557
+ return result;
1558
+ };
1559
+ }
1560
+ function toSyncOptions(options) {
1561
+ options = { ...options };
1562
+ options.fs = createSyncFs(options.fs || fs);
1563
+ if (typeof options.retries === "number" && options.retries > 0 || options.retries && typeof options.retries.retries === "number" && options.retries.retries > 0) {
1564
+ throw Object.assign(new Error("Cannot use retries with the sync api"), { code: "ESYNC" });
1565
+ }
1566
+ return options;
1567
+ }
1568
+ module.exports = {
1569
+ toPromise,
1570
+ toSync,
1571
+ toSyncOptions
1572
+ };
1573
+ }
1574
+ });
1575
+
1576
+ // node_modules/proper-lockfile/index.js
1577
+ var require_proper_lockfile = __commonJS({
1578
+ "node_modules/proper-lockfile/index.js"(exports, module) {
1579
+ "use strict";
1580
+ var lockfile2 = require_lockfile();
1581
+ var { toPromise, toSync, toSyncOptions } = require_adapter();
1582
+ async function lock(file, options) {
1583
+ const release = await toPromise(lockfile2.lock)(file, options);
1584
+ return toPromise(release);
1585
+ }
1586
+ function lockSync(file, options) {
1587
+ const release = toSync(lockfile2.lock)(file, toSyncOptions(options));
1588
+ return toSync(release);
1589
+ }
1590
+ function unlock(file, options) {
1591
+ return toPromise(lockfile2.unlock)(file, options);
1592
+ }
1593
+ function unlockSync(file, options) {
1594
+ return toSync(lockfile2.unlock)(file, toSyncOptions(options));
1595
+ }
1596
+ function check(file, options) {
1597
+ return toPromise(lockfile2.check)(file, options);
1598
+ }
1599
+ function checkSync(file, options) {
1600
+ return toSync(lockfile2.check)(file, toSyncOptions(options));
1601
+ }
1602
+ module.exports = lock;
1603
+ module.exports.lock = lock;
1604
+ module.exports.unlock = unlock;
1605
+ module.exports.lockSync = lockSync;
1606
+ module.exports.unlockSync = unlockSync;
1607
+ module.exports.check = check;
1608
+ module.exports.checkSync = checkSync;
1609
+ }
1610
+ });
1611
+
1612
+ // dist-server/integrations/launcher-start.mjs
1613
+ var import_proper_lockfile = __toESM(require_proper_lockfile(), 1);
1614
+ import path5 from "node:path";
1615
+ import { pathToFileURL } from "node:url";
1616
+ import { readFile as readFile4, mkdir as mkdir2, writeFile as writeFile2, unlink as unlink2 } from "node:fs/promises";
1617
+ import { unlinkSync } from "node:fs";
1618
+ import { randomUUID } from "node:crypto";
1619
+
1620
+ // dist-server/integrations/installation-state.mjs
1621
+ import path2 from "node:path";
1622
+
1623
+ // dist-server/integrations/files.mjs
1624
+ import path from "node:path";
1625
+ import { lstat, readFile, mkdir, writeFile, rename, unlink } from "node:fs/promises";
1626
+ async function optionalFile(file) {
1627
+ try {
1628
+ return await readFile(file, "utf8");
1629
+ } catch (error) {
1630
+ if (error.code !== "ENOENT") throw error;
1631
+ return null;
1632
+ }
1633
+ }
1634
+ async function assertPlainPath(file) {
1635
+ let current = path.resolve(file);
1636
+ for (; ; ) {
1637
+ try {
1638
+ const info = await lstat(current);
1639
+ if (info.isSymbolicLink() || (current === path.resolve(file) ? !info.isFile() : !info.isDirectory())) throw new Error("Refusing linked or invalid install path: " + current);
1640
+ } catch (error) {
1641
+ if (error.code !== "ENOENT") throw error;
1642
+ }
1643
+ const parent = path.dirname(current);
1644
+ if (parent === current) break;
1645
+ current = parent;
1646
+ }
1647
+ }
1648
+
1649
+ // dist-server/integrations/version-policy.mjs
1650
+ var pattern = /^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-([0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*))?(?:\+[0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*)?$/;
1651
+ function parseVersion(value) {
1652
+ const match = typeof value === "string" && pattern.exec(value);
1653
+ if (!match) throw new Error("Invalid Craft version: " + value);
1654
+ const numbers = match.slice(1, 4).map(Number), prerelease = match[4]?.split(".") ?? [];
1655
+ if (numbers.some((number) => !Number.isSafeInteger(number)) || prerelease.some((part) => /^\d+$/.test(part) && (part.length > 1 && part[0] === "0"))) throw new Error("Invalid Craft version: " + value);
1656
+ return { numbers, prerelease };
1657
+ }
1658
+ function compareVersions(left, right) {
1659
+ const a = parseVersion(left), b = parseVersion(right);
1660
+ for (let i = 0; i < 3; i++) if (a.numbers[i] !== b.numbers[i]) return a.numbers[i] < b.numbers[i] ? -1 : 1;
1661
+ if (!a.prerelease.length || !b.prerelease.length) return a.prerelease.length === b.prerelease.length ? 0 : a.prerelease.length ? -1 : 1;
1662
+ for (let i = 0; i < Math.max(a.prerelease.length, b.prerelease.length); i++) {
1663
+ const x = a.prerelease[i], y = b.prerelease[i];
1664
+ if (x === y) continue;
1665
+ if (x === void 0 || y === void 0) return x === void 0 ? -1 : 1;
1666
+ const xn = /^\d+$/.test(x), yn = /^\d+$/.test(y);
1667
+ if (xn && yn) return BigInt(x) < BigInt(y) ? -1 : 1;
1668
+ if (xn !== yn) return xn ? -1 : 1;
1669
+ return x < y ? -1 : 1;
1670
+ }
1671
+ return 0;
1672
+ }
1673
+ function requireForwardVersion(next, previous) {
1674
+ if (!previous) return;
1675
+ const comparison = compareVersions(next.version, previous.version);
1676
+ if (comparison < 0) throw new Error("Craft downgrade refused: " + previous.version + " -> " + next.version);
1677
+ if (comparison === 0 && previous.build_id && next.build_id && previous.build_id !== next.build_id) throw new Error("Craft same-version build replacement refused; publish a new version");
1678
+ }
1679
+
1680
+ // dist-server/integrations/hosts.mjs
1681
+ var hosts = Object.freeze({
1682
+ codex: { label: "Codex", config: ".codex/config.toml", skills: ".agents/skills", projectSkills: ".agents/skills", format: "toml" },
1683
+ workbuddy: { label: "WorkBuddy", config: ".workbuddy/mcp.json", skills: ".workbuddy/skills", projectSkills: ".workbuddy/skills", format: "json" },
1684
+ codebuddy: { label: "CodeBuddy", config: ".codebuddy/.mcp.json", skills: ".codebuddy/skills", projectSkills: ".codebuddy/skills", format: "json" },
1685
+ cursor: { label: "Cursor", config: ".cursor/mcp.json", skills: ".cursor/skills", projectSkills: ".cursor/skills", format: "json" },
1686
+ claude: { label: "Claude Code", config: ".claude.json", skills: ".claude/skills", projectSkills: ".claude/skills", format: "json" },
1687
+ dsh: { label: "DSH", config: ".dsh/cordis.patch.yml", skills: ".dsh/skills", projectSkills: ".dsh/skills", format: "yaml" },
1688
+ zcode: { label: "ZCode", config: ".zcode/cli/config.json", skills: ".zcode/skills", projectSkills: ".zcode/skills", format: "json" },
1689
+ kimi: { label: "Kimi Code", config: ".kimi-code/mcp.json", skills: ".kimi-code/skills", projectSkills: ".kimi-code/skills", format: "json" },
1690
+ trae: { label: "TRAE", skills: ".trae/skills", projectSkills: ".trae/skills", format: "json", explicitConfig: true },
1691
+ "qoder-cn": { label: "Qoder CN", config: ".qoder-cn/mcp.json", skills: ".qoder-cn/skills", projectSkills: ".qoder-cn/skills", discoverySkill: ".qoder/skills/craft-project-qoder-cn/SKILL.md", format: "json" },
1692
+ qoder: { label: "Qoder", skills: ".qoder/skills", projectSkills: ".qoder/skills", format: "json", explicitConfig: true },
1693
+ comate: { label: "\u6587\u5FC3\u5FEB\u7801", config: ".comate/mcp.json", skills: ".comate/skills", projectSkills: ".comate/skills", format: "json" },
1694
+ opencode: { label: "OpenCode", config: ".config/opencode/opencode.json", skills: ".config/opencode/skills", projectSkills: ".opencode/skills", format: "jsonc" },
1695
+ qwen: { label: "Qwen Code", config: ".qwen/settings.json", skills: ".qwen/skills", projectSkills: ".qwen/skills", format: "jsonc" }
1696
+ });
1697
+
1698
+ // dist-server/integrations/installation-state.mjs
1699
+ var defaultRegistry = "https://registry.npmjs.org/";
1700
+ var activationMode = "next_mcp_start";
1701
+ function sameRuntimeIdentity(left, right) {
1702
+ const samePath = (a, b) => typeof a === "string" && typeof b === "string" && (process.platform === "win32" ? path2.resolve(a).toLowerCase() === path2.resolve(b).toLowerCase() : path2.resolve(a) === path2.resolve(b));
1703
+ return Boolean(left && right && left.package === right.package && left.version === right.version && left.build_id === right.build_id && samePath(left.package_root, right.package_root) && samePath(left.entry, right.entry));
1704
+ }
1705
+ var managedSkillMarkers = Object.freeze({ "craft-create": "<!-- craft-mcp:bootstrap:v1 -->", "craft-update": "<!-- craft-mcp:update:v1 -->" });
1706
+ function installedSkillEntries(state) {
1707
+ if (state.skills === void 0) return [];
1708
+ if (!state.skills || typeof state.skills !== "object" || Array.isArray(state.skills) || !state.skills["craft-create"]) throw new Error("Invalid installed Skill destinations");
1709
+ return Object.entries(state.skills).map(([name, file]) => {
1710
+ if (!Object.hasOwn(managedSkillMarkers, name) || typeof file !== "string" || !path2.isAbsolute(file) || path2.basename(file) !== "SKILL.md" || path2.basename(path2.dirname(file)) !== name) throw new Error("Invalid installed Skill destination");
1711
+ return { name, file, marker: managedSkillMarkers[name] };
1712
+ });
1713
+ }
1714
+ function registryOrigin(value = defaultRegistry) {
1715
+ const url = new URL(value);
1716
+ if (url.protocol !== "https:" || url.username || url.password || url.search || url.hash) throw new Error("Registry must be a credential-free HTTPS URL");
1717
+ return url.href.replace(/\/?$/, "/");
1718
+ }
1719
+ function validateIdentity(identity) {
1720
+ if (!identity || typeof identity !== "object") throw new Error("Missing Craft runtime identity");
1721
+ parseVersion(identity.version);
1722
+ if (!identity.package || !/^[a-f0-9]{64}$/.test(identity.build_id ?? "") || !path2.isAbsolute(identity.package_root ?? "") || !path2.isAbsolute(identity.entry ?? "")) throw new Error("Invalid Craft runtime identity");
1723
+ if (path2.resolve(identity.entry) !== path2.join(path2.resolve(identity.package_root), "bin", "craft-mcp.mjs")) throw new Error("Craft entry is outside its runtime package");
1724
+ return identity;
1725
+ }
1726
+ async function readInstallationSnapshot(file) {
1727
+ if (!file || !path2.isAbsolute(file)) throw new Error("CRAFT_INSTALLATION_FILE must be absolute");
1728
+ const text = await optionalFile(file);
1729
+ if (text === null) throw new Error("Craft installation state is missing; run install again");
1730
+ const state = JSON.parse(text);
1731
+ if (![1, 2].includes(state.schema) || state.schema === 2 && state.activation_mode !== activationMode || !state.id || !Object.hasOwn(hosts, state.host) || !path2.isAbsolute(state.config ?? "") || !path2.isAbsolute(state.workspace ?? "") || !state.server_id || !["auto", "off"].includes(state.policy?.mode)) throw new Error("Invalid Craft installation state");
1732
+ validateIdentity(state.anchor);
1733
+ validateIdentity(state.target);
1734
+ if (state.config_peers !== void 0 && (!Array.isArray(state.config_peers) || state.config_peers.some((file2) => typeof file2 !== "string" || !path2.isAbsolute(file2)))) throw new Error("Invalid additional host configuration paths");
1735
+ if (state.source?.package !== state.anchor.package || state.target.package !== state.anchor.package) throw new Error("Craft installation package identity mismatch");
1736
+ installedSkillEntries(state);
1737
+ if (state.skills_runtime !== void 0) {
1738
+ validateIdentity(state.skills_runtime);
1739
+ if (state.skills_runtime.package !== state.source.package) throw new Error("Installed Skill runtime package identity mismatch");
1740
+ requireForwardVersion(state.target, state.skills_runtime);
1741
+ }
1742
+ if (state.schema === 2 && (!sameRuntimeIdentity(state.anchor, state.target) || !sameRuntimeIdentity(state.skills_runtime, state.target))) throw new Error("Configured runtime and installed Skill identities differ");
1743
+ if (state.connection_verification !== void 0) {
1744
+ const receipt = state.connection_verification;
1745
+ if (!receipt || receipt.version !== state.target.version || receipt.build_id !== state.target.build_id || typeof receipt.instance_id !== "string" || !receipt.instance_id || !Number.isFinite(Date.parse(receipt.confirmed_at))) throw new Error("Invalid Craft connection verification receipt");
1746
+ }
1747
+ registryOrigin(state.source.registry);
1748
+ if (!/^[a-zA-Z][a-zA-Z0-9._-]*$/.test(state.source.channel ?? "")) throw new Error("Invalid Craft update channel");
1749
+ return { state, text };
1750
+ }
1751
+ async function readInstallation(file) {
1752
+ return (await readInstallationSnapshot(file)).state;
1753
+ }
1754
+
1755
+ // dist-server/integrations/runtime-identity.mjs
1756
+ import path3 from "node:path";
1757
+ import { readFile as readFile2, readdir, lstat as lstat2 } from "node:fs/promises";
1758
+ import { createHash } from "node:crypto";
1759
+ async function getRuntimeIdentity(packageRoot) {
1760
+ packageRoot = path3.resolve(packageRoot);
1761
+ const pkg = JSON.parse(await readFile2(path3.join(packageRoot, "package.json"), "utf8"));
1762
+ const hash = createHash("sha256");
1763
+ async function visit(relative) {
1764
+ const file = path3.join(packageRoot, relative);
1765
+ let info;
1766
+ try {
1767
+ info = await lstat2(file);
1768
+ } catch (error) {
1769
+ if (error.code === "ENOENT") return;
1770
+ throw error;
1771
+ }
1772
+ if (info.isSymbolicLink()) throw new Error("Craft runtime contains a linked product file: " + relative);
1773
+ if (info.isDirectory()) {
1774
+ for (const entry of (await readdir(file)).sort()) if (entry !== "node_modules") await visit(relative + "/" + entry);
1775
+ } else if (info.isFile()) hash.update(relative + "\0").update(await readFile2(file)).update("\0");
1776
+ else throw new Error("Invalid Craft runtime file: " + relative);
1777
+ }
1778
+ for (const relative of ["package.json", "bin", "dist-server", "resources", "vendor"]) await visit(relative);
1779
+ return { package: pkg.name, version: pkg.version, build_id: hash.digest("hex"), package_root: packageRoot, entry: path3.join(packageRoot, "bin/craft-mcp.mjs") };
1780
+ }
1781
+
1782
+ // dist-server/integrations/fixed-launcher.mjs
1783
+ import path4 from "node:path";
1784
+ import { readFile as readFile3 } from "node:fs/promises";
1785
+ import { createHash as createHash2 } from "node:crypto";
1786
+ function launcherPath(installationFile) {
1787
+ return installationFile.replace(/\.json$/, "") + ".launcher.mjs";
1788
+ }
1789
+ async function verifyLauncher(state, installationFile, connection) {
1790
+ if (!state.launcher) return { mode: "legacy_versioned_entry" };
1791
+ const expected = launcherPath(installationFile);
1792
+ if (state.launcher.schema !== 1 || state.launcher.entry !== expected || !/^[a-f0-9]{64}$/.test(state.launcher.sha256 ?? "")) throw new Error("Invalid Craft fixed launcher identity");
1793
+ if (state.launcher.kind !== void 0) throw new Error("Unsupported Craft launcher; run the standard installer and reconnect");
1794
+ await assertPlainPath(expected);
1795
+ if (createHash2("sha256").update(await readFile3(expected)).digest("hex") !== state.launcher.sha256) throw new Error("Craft fixed launcher integrity mismatch");
1796
+ if (connection && path4.resolve(connection.args?.[0] ?? "") !== path4.resolve(expected)) throw new Error("Craft host configuration does not use the installed fixed launcher");
1797
+ return { mode: "fixed_entry", entry: expected };
1798
+ }
1799
+
1800
+ // dist-server/integrations/launcher-start.mjs
1801
+ async function start() {
1802
+ const entry = path5.resolve(process.argv[1]);
1803
+ const installationFile = entry.replace(/\.launcher\.mjs$/, ".json");
1804
+ if (launcherPath(installationFile) !== entry) throw new Error("Invalid Craft launcher path");
1805
+ await assertPlainPath(installationFile);
1806
+ const initial = await readInstallation(installationFile);
1807
+ await assertPlainPath(path5.join(initial.runtime_root, ".path-check"));
1808
+ const unlock = await import_proper_lockfile.default.lock(initial.runtime_root, { stale: 12e4, retries: { retries: 240, minTimeout: 250, maxTimeout: 500 } });
1809
+ let identity, state, lease;
1810
+ try {
1811
+ state = await readInstallation(installationFile);
1812
+ if (state.runtime_root !== initial.runtime_root || state.schema !== 2) throw new Error("Craft installation changed or needs migration");
1813
+ await verifyLauncher(state, installationFile, { args: [entry] });
1814
+ if (process.env.CRAFT_INSTALLATION_FILE && path5.resolve(process.env.CRAFT_INSTALLATION_FILE) !== installationFile) throw new Error("Craft launcher installation scope mismatch");
1815
+ for (const [key, expected] of Object.entries({ CRAFT_CLIENT_IDE: state.host, CLIENT_WORKSPACE_ROOT: state.workspace, CRAFT_WEB_URL: state.platform })) {
1816
+ if (process.env[key] && process.env[key] !== expected) throw new Error("Craft launcher scope mismatch: " + key);
1817
+ process.env[key] = expected;
1818
+ }
1819
+ const relative = path5.relative(path5.resolve(state.runtime_root), state.target.package_root);
1820
+ if (!relative || relative === ".." || relative.startsWith(".." + path5.sep) || path5.isAbsolute(relative)) throw new Error("Craft target is outside the managed runtime root");
1821
+ await assertPlainPath(state.target.entry);
1822
+ identity = await getRuntimeIdentity(state.target.package_root);
1823
+ if (!sameRuntimeIdentity(identity, state.target)) throw new Error("Craft target package integrity mismatch");
1824
+ const leaseRoot = path5.join(state.runtime_root, ".connections");
1825
+ await mkdir2(leaseRoot, { recursive: true });
1826
+ lease = path5.join(leaseRoot, "launcher-" + randomUUID() + ".json");
1827
+ await assertPlainPath(lease);
1828
+ await writeFile2(lease, JSON.stringify({ pid: process.pid, package_root: identity.package_root, version: identity.version, build_id: identity.build_id }), { flag: "wx", mode: 384 });
1829
+ process.once("exit", () => {
1830
+ try {
1831
+ unlinkSync(lease);
1832
+ } catch {
1833
+ }
1834
+ });
1835
+ } finally {
1836
+ await unlock();
1837
+ }
1838
+ if (process.env.CRAFT_STANDALONE_PROBE !== "1") process.env.CRAFT_INSTALLATION_FILE = installationFile;
1839
+ process.env.CRAFT_FIXED_LAUNCHER = entry;
1840
+ process.argv = [process.execPath, identity.entry, ...process.argv.slice(2)];
1841
+ try {
1842
+ await import(pathToFileURL(identity.entry).href);
1843
+ } catch (error) {
1844
+ await unlink2(lease).catch(() => {
1845
+ });
1846
+ throw error;
1847
+ }
1848
+ }
1849
+ await start().catch((error) => {
1850
+ process.stderr.write("Craft launcher failed: " + error.message + "\n");
1851
+ process.exitCode = 1;
1852
+ });