@craft_eco/craft-mcp 0.1.25 → 0.1.26

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 (620) hide show
  1. package/README.md +31 -10
  2. package/bin/craft-mcp.mjs +10 -8
  3. package/dist-server/game-workflow/bundle-files.mjs +43 -0
  4. package/dist-server/game-workflow/engines.mjs +13 -6
  5. package/dist-server/game-workflow/project-bundles.mjs +90 -0
  6. package/dist-server/game-workflow/project-context.mjs +91 -0
  7. package/dist-server/game-workflow/projects.mjs +16 -4
  8. package/dist-server/game-workflow/publication-materials.mjs +18 -20
  9. package/dist-server/game-workflow/publications.mjs +15 -17
  10. package/dist-server/game-workflow/publish-capture.mjs +21 -57
  11. package/dist-server/integrations/config.mjs +71 -0
  12. package/dist-server/integrations/files.mjs +54 -0
  13. package/dist-server/integrations/hosts.mjs +30 -0
  14. package/dist-server/integrations/install.mjs +86 -0
  15. package/dist-server/integrations/runtime.mjs +71 -0
  16. package/dist-server/mcp/publication-page.mjs +18 -50
  17. package/dist-server/mcp/publish-panel.mjs +28 -35
  18. package/dist-server/mcp/server.mjs +17 -14
  19. package/dist-server/preview/preview-launcher.mjs +9 -2
  20. package/dist-server/preview/preview-start.mjs +2 -2
  21. package/dist-server/upstream/publication-transport.mjs +19 -19
  22. package/package.json +10 -2
  23. package/resources/craft-create/SKILL.md +14 -0
  24. package/resources/craft-game-maker/SKILL.md +77 -71
  25. package/resources/craft-game-maker/js.md +10 -10
  26. package/resources/craft-game-maker/js3d.md +13 -13
  27. package/resources/game_visual_qa.mjs +1149 -1149
  28. package/resources/js/bundle.json +93 -0
  29. package/resources/js/context/AGENTS.md +15 -102
  30. package/resources/js/context/knowledge/AigcWiring.md +5 -196
  31. package/resources/js/context/knowledge/AssetUrl.md +5 -20
  32. package/resources/js/context/knowledge/Layout.md +7 -0
  33. package/resources/js/context/knowledge/Lifecycle.md +6 -27
  34. package/resources/js/context/skills/aigc-generate/SKILL.md +6 -141
  35. package/resources/js/context/skills/asset-search/SKILL.md +5 -62
  36. package/resources/js/context/skills/asset-search/references/resource-config.md +9 -0
  37. package/resources/js/context/skills/export-config/SKILL.md +7 -19
  38. package/resources/js/context/skills/export-config/scripts/export-config.mjs +3 -45
  39. package/resources/js/context/skills/index.json +30 -0
  40. package/resources/js/context/skills/visual-qa/SKILL.md +6 -28
  41. package/resources/js/project/README.md +4 -96
  42. package/resources/js/project/package.json +1 -2
  43. package/resources/js/project/scripts/config-export/panel-resource-path.mjs +106 -0
  44. package/resources/js/{context/skills/export-config/scripts → project/scripts/config-export}/sync-asset-controls.mjs +1 -37
  45. package/resources/js/project/scripts/config-export.mjs +10 -34
  46. package/resources/js3d/bundle.json +104 -0
  47. package/resources/js3d/context/AGENTS.md +16 -85
  48. package/resources/js3d/context/knowledge/AigcWiring.md +9 -0
  49. package/resources/js3d/context/knowledge/AssetUrl.md +9 -0
  50. package/resources/js3d/context/knowledge/CodingGuide/Pitfalls.md +9 -67
  51. package/resources/js3d/context/knowledge/Layout.md +7 -0
  52. package/resources/js3d/context/knowledge/Runtime.md +5 -30
  53. package/resources/js3d/context/skills/aigc-integration/SKILL.md +6 -164
  54. package/resources/js3d/context/skills/asset-search/SKILL.md +5 -171
  55. package/resources/js3d/context/skills/asset-search/references/resource-config.md +6 -94
  56. package/resources/js3d/context/skills/asset-usage-audit/SKILL.md +6 -82
  57. package/resources/js3d/context/skills/export-config/SKILL.md +7 -11
  58. package/resources/js3d/context/skills/export-config/scripts/export-config.mjs +3 -55
  59. package/resources/js3d/context/skills/index.json +42 -0
  60. package/resources/js3d/context/skills/performance-audit/SKILL.md +8 -153
  61. package/resources/js3d/context/skills/visual-qa/SKILL.md +14 -0
  62. package/resources/js3d/project/README.md +4 -103
  63. package/resources/js3d/project/package.json +1 -2
  64. package/resources/js3d/project/scripts/config-export/panel-resource-path.mjs +106 -0
  65. package/resources/js3d/{context/skills/export-config/scripts → project/scripts/config-export}/sync-scene-assets.mjs +3 -28
  66. package/resources/js3d/project/scripts/config-export.mjs +12 -34
  67. package/vendor/agent-cli/dist/src/artifacts/build-failure.d.ts +8 -0
  68. package/vendor/agent-cli/dist/src/artifacts/build-failure.d.ts.map +1 -0
  69. package/vendor/agent-cli/dist/src/artifacts/build-failure.js +39 -0
  70. package/vendor/agent-cli/dist/src/artifacts/build-failure.js.map +1 -0
  71. package/vendor/agent-cli/dist/src/artifacts/dependency-toolchain.d.ts +5 -0
  72. package/vendor/agent-cli/dist/src/artifacts/dependency-toolchain.d.ts.map +1 -0
  73. package/vendor/agent-cli/dist/src/artifacts/dependency-toolchain.js +45 -0
  74. package/vendor/agent-cli/dist/src/artifacts/dependency-toolchain.js.map +1 -0
  75. package/vendor/agent-cli/dist/src/artifacts/preinstalled-dependencies.d.ts.map +1 -1
  76. package/vendor/agent-cli/dist/src/artifacts/preinstalled-dependencies.js +2 -1
  77. package/vendor/agent-cli/dist/src/artifacts/preinstalled-dependencies.js.map +1 -1
  78. package/vendor/agent-cli/dist/src/artifacts/prepare.d.ts +2 -0
  79. package/vendor/agent-cli/dist/src/artifacts/prepare.d.ts.map +1 -1
  80. package/vendor/agent-cli/dist/src/artifacts/prepare.js +7 -2
  81. package/vendor/agent-cli/dist/src/artifacts/prepare.js.map +1 -1
  82. package/vendor/agent-cli/dist/src/artifacts/process-artifacts.d.ts +2 -0
  83. package/vendor/agent-cli/dist/src/artifacts/process-artifacts.d.ts.map +1 -1
  84. package/vendor/agent-cli/dist/src/artifacts/process-artifacts.js +27 -16
  85. package/vendor/agent-cli/dist/src/artifacts/process-artifacts.js.map +1 -1
  86. package/vendor/agent-cli/dist/src/artifacts/scene-asset-references.d.ts +14 -0
  87. package/vendor/agent-cli/dist/src/artifacts/scene-asset-references.d.ts.map +1 -0
  88. package/vendor/agent-cli/dist/src/artifacts/scene-asset-references.js +119 -0
  89. package/vendor/agent-cli/dist/src/artifacts/scene-asset-references.js.map +1 -0
  90. package/vendor/agent-cli/dist/src/artifacts/static.d.ts.map +1 -1
  91. package/vendor/agent-cli/dist/src/artifacts/static.js +20 -6
  92. package/vendor/agent-cli/dist/src/artifacts/static.js.map +1 -1
  93. package/vendor/agent-cli/dist/src/cli/process-protocol.d.ts.map +1 -1
  94. package/vendor/agent-cli/dist/src/cli/process-protocol.js +24 -2
  95. package/vendor/agent-cli/dist/src/cli/process-protocol.js.map +1 -1
  96. package/vendor/agent-cli/dist/src/cli/process-steering.d.ts +21 -0
  97. package/vendor/agent-cli/dist/src/cli/process-steering.d.ts.map +1 -0
  98. package/vendor/agent-cli/dist/src/cli/process-steering.js +66 -0
  99. package/vendor/agent-cli/dist/src/cli/process-steering.js.map +1 -0
  100. package/vendor/agent-cli/dist/src/context/user-skill-bundle.js +1 -1
  101. package/vendor/agent-cli/dist/src/context/user-skill-bundle.js.map +1 -1
  102. package/vendor/agent-cli/dist/src/index.d.ts +4 -1
  103. package/vendor/agent-cli/dist/src/index.d.ts.map +1 -1
  104. package/vendor/agent-cli/dist/src/index.js +3 -0
  105. package/vendor/agent-cli/dist/src/index.js.map +1 -1
  106. package/vendor/agent-cli/dist/src/protocol/messages/messages.gen.d.ts +29 -1
  107. package/vendor/agent-cli/dist/src/protocol/messages/messages.gen.d.ts.map +1 -1
  108. package/vendor/agent-cli/dist/src/protocol/messages/messages.gen.js +18 -1
  109. package/vendor/agent-cli/dist/src/protocol/messages/messages.gen.js.map +1 -1
  110. package/vendor/agent-cli/dist/src/session/client.d.ts +10 -0
  111. package/vendor/agent-cli/dist/src/session/client.d.ts.map +1 -1
  112. package/vendor/agent-cli/dist/src/session/client.js +15 -5
  113. package/vendor/agent-cli/dist/src/session/client.js.map +1 -1
  114. package/vendor/agent-cli/dist/src/session/link-session.d.ts +3 -0
  115. package/vendor/agent-cli/dist/src/session/link-session.d.ts.map +1 -1
  116. package/vendor/agent-cli/dist/src/session/link-session.js +14 -1
  117. package/vendor/agent-cli/dist/src/session/link-session.js.map +1 -1
  118. package/vendor/agent-cli/dist/src/session/process-observability.d.ts +3 -0
  119. package/vendor/agent-cli/dist/src/session/process-observability.d.ts.map +1 -1
  120. package/vendor/agent-cli/dist/src/session/process-observability.js +11 -0
  121. package/vendor/agent-cli/dist/src/session/process-observability.js.map +1 -1
  122. package/vendor/agent-cli/dist/src/session/process-request.d.ts +3 -2
  123. package/vendor/agent-cli/dist/src/session/process-request.d.ts.map +1 -1
  124. package/vendor/agent-cli/dist/src/session/process-request.js +27 -9
  125. package/vendor/agent-cli/dist/src/session/process-request.js.map +1 -1
  126. package/vendor/agent-cli/dist/src/session/run-start-body.d.ts +1 -0
  127. package/vendor/agent-cli/dist/src/session/run-start-body.d.ts.map +1 -1
  128. package/vendor/agent-cli/dist/src/session/run-start-body.js +8 -3
  129. package/vendor/agent-cli/dist/src/session/run-start-body.js.map +1 -1
  130. package/vendor/agent-cli/dist/src/session/run-steer.d.ts +42 -0
  131. package/vendor/agent-cli/dist/src/session/run-steer.d.ts.map +1 -0
  132. package/vendor/agent-cli/dist/src/session/run-steer.js +205 -0
  133. package/vendor/agent-cli/dist/src/session/run-steer.js.map +1 -0
  134. package/vendor/agent-cli/dist/src/shared/types.d.ts +6 -0
  135. package/vendor/agent-cli/dist/src/shared/types.d.ts.map +1 -1
  136. package/vendor/agent-cli/dist/src/tools/context-program-receipt.d.ts +21 -0
  137. package/vendor/agent-cli/dist/src/tools/context-program-receipt.d.ts.map +1 -0
  138. package/vendor/agent-cli/dist/src/tools/context-program-receipt.js +102 -0
  139. package/vendor/agent-cli/dist/src/tools/context-program-receipt.js.map +1 -0
  140. package/vendor/agent-cli/dist/src/tools/context-program.d.ts.map +1 -1
  141. package/vendor/agent-cli/dist/src/tools/context-program.js +3 -0
  142. package/vendor/agent-cli/dist/src/tools/context-program.js.map +1 -1
  143. package/resources/js/context/.role/AGENTS_DESIGN.md +0 -9
  144. package/resources/js/context/agents/aigc-asset.md +0 -168
  145. package/resources/js/context/knowledge/AigcEnabled.md +0 -49
  146. package/resources/js/context/knowledge/FrontendComponents.md +0 -17
  147. package/resources/js/context/knowledge/MobileAdaptation.md +0 -73
  148. package/resources/js/context/knowledge/MobileAdapted.md +0 -36
  149. package/resources/js/context/knowledge/Multiplayer/GameplaySystemKnowledge.md +0 -114
  150. package/resources/js/context/knowledge/Multiplayer/OverviewKnowledge.md +0 -115
  151. package/resources/js/context/knowledge/Multiplayer/StateSyncKnowledge.md +0 -392
  152. package/resources/js/context/knowledge/PlatformServices.md +0 -190
  153. package/resources/js/context/knowledge/ProjectDisplayConfig.md +0 -35
  154. package/resources/js/context/knowledge/Subsystems/Optional/MultiplayerManagerKnowledge.md +0 -242
  155. package/resources/js/context/knowledge/Ui.md +0 -11
  156. package/resources/js/context/knowledge/UiEditorCompat.md +0 -21
  157. package/resources/js/context/rules/MultiplayerCapability.md +0 -23
  158. package/resources/js/context/rules/MultiplayerRoomEntryUX.md +0 -63
  159. package/resources/js/context/rules/PlatformBoundaryModules.md +0 -44
  160. package/resources/js/context/rules/preview_ready.md +0 -8
  161. package/resources/js/context/skills/aigc-generate/knowledge/audio.md +0 -39
  162. package/resources/js/context/skills/aigc-generate/knowledge/batch-replace.md +0 -26
  163. package/resources/js/context/skills/aigc-generate/knowledge/character2d.md +0 -132
  164. package/resources/js/context/skills/aigc-generate/knowledge/non-stepwise-aigc.md +0 -53
  165. package/resources/js/context/skills/aigc-generate/knowledge/texture-prop.md +0 -52
  166. package/resources/js/context/skills/aigc-generate/knowledge/texture-scene.md +0 -191
  167. package/resources/js/context/skills/aigc-generate/knowledge/texture-ui.md +0 -55
  168. package/resources/js/context/skills/asset-search/scripts/asset_display.mjs +0 -62
  169. package/resources/js/context/skills/asset-search/scripts/config.json +0 -5
  170. package/resources/js/context/skills/asset-search/scripts/provided_assets.mjs +0 -125
  171. package/resources/js/context/skills/asset-search/scripts/search.mjs +0 -760
  172. package/resources/js/context/skills/asset-search/scripts/sprite_source_materializer.mjs +0 -657
  173. package/resources/js/context/skills/asset-search/strategies/anim2d.md +0 -42
  174. package/resources/js/context/skills/asset-search/strategies/audio.md +0 -34
  175. package/resources/js/context/skills/asset-search/strategies/effect2d.md +0 -31
  176. package/resources/js/context/skills/asset-search/strategies/texture-prop.md +0 -22
  177. package/resources/js/context/skills/asset-search/strategies/ui-common.md +0 -40
  178. package/resources/js/context/skills/asset-search/strategies/ui-style.md +0 -28
  179. package/resources/js/context/skills/export-config/scripts/translate-asset-titles.mjs +0 -161
  180. package/resources/js/context/skills/lightgame-runtime-adapt/SKILL.md +0 -93
  181. package/resources/js/context/skills/lightgame-runtime-adapt/project/game-runtime.json +0 -7
  182. package/resources/js/context/skills/lightgame-runtime-adapt/project/package.json +0 -22
  183. package/resources/js/context/skills/lightgame-runtime-adapt/project/runtime/lightgame/1.1.0/platform/identity/qq-ai-game-sdk.min.js +0 -5
  184. package/resources/js/context/skills/lightgame-runtime-adapt/project/runtime/lightgame/1.1.0/platform/identity/qq-session.mjs +0 -208
  185. package/resources/js/context/skills/lightgame-runtime-adapt/project/runtime/lightgame/1.1.0/platform/identity/shared.mjs +0 -37
  186. package/resources/js/context/skills/lightgame-runtime-adapt/project/runtime/lightgame/1.1.0/platform/platform-capture-video.mjs +0 -227
  187. package/resources/js/context/skills/lightgame-runtime-adapt/project/runtime/lightgame/1.1.0/platform/platform-service.d.mts +0 -31
  188. package/resources/js/context/skills/lightgame-runtime-adapt/project/runtime/lightgame/1.1.0/platform/platform-service.mjs +0 -272
  189. package/resources/js/context/skills/lightgame-runtime-adapt/project/runtime/lightgame/1.1.0/platform/platform.d.mts +0 -79
  190. package/resources/js/context/skills/lightgame-runtime-adapt/project/runtime/lightgame/1.1.0/platform/platform.mjs +0 -29
  191. package/resources/js/context/skills/lightgame-runtime-adapt/project/runtime/lightgame/1.1.0/release.json +0 -22
  192. package/resources/js/context/skills/lightgame-runtime-adapt/project/runtime/lightgame/1.1.0/tooling/cli.mjs +0 -16
  193. package/resources/js/context/skills/lightgame-runtime-adapt/project/runtime/lightgame/1.1.0/tooling/project.d.mts +0 -4
  194. package/resources/js/context/skills/lightgame-runtime-adapt/project/runtime/lightgame/1.1.0/tooling/project.mjs +0 -50
  195. package/resources/js/context/skills/lightgame-runtime-adapt/project/runtime/lightgame/1.1.0/tooling/vite.d.mts +0 -3
  196. package/resources/js/context/skills/lightgame-runtime-adapt/project/runtime/lightgame/1.1.0/tooling/vite.mjs +0 -72
  197. package/resources/js/context/skills/lightgame-runtime-adapt/project/runtime/lightgame/1.1.0/tools/assets.d.mts +0 -24
  198. package/resources/js/context/skills/lightgame-runtime-adapt/project/runtime/lightgame/1.1.0/tools/assets.mjs +0 -2
  199. package/resources/js/context/skills/lightgame-runtime-adapt/project/runtime/lightgame/1.1.0/tools/astc.d.mts +0 -10
  200. package/resources/js/context/skills/lightgame-runtime-adapt/project/runtime/lightgame/1.1.0/tools/astc.mjs +0 -1
  201. package/resources/js/context/skills/lightgame-runtime-adapt/project/scripts/config-export.mjs +0 -37
  202. package/resources/js/context/skills/lightgame-runtime-adapt/project/scripts/refresh-runtime.mjs +0 -50
  203. package/resources/js/context/skills/lightgame-runtime-adapt/project/scripts/skill-modules/export-config/cli.mjs +0 -20
  204. package/resources/js/context/skills/lightgame-runtime-adapt/project/scripts/skill-modules/export-config/config.d.mts +0 -19
  205. package/resources/js/context/skills/lightgame-runtime-adapt/project/scripts/skill-modules/export-config/config.mjs +0 -1
  206. package/resources/js/context/skills/lightgame-runtime-adapt/project/scripts/skill-modules/export-config/installed.json +0 -6
  207. package/resources/js/context/skills/lightgame-runtime-adapt/project/scripts/skill-modules/export-config/project.d.mts +0 -6
  208. package/resources/js/context/skills/lightgame-runtime-adapt/project/scripts/skill-modules/export-config/project.mjs +0 -77
  209. package/resources/js/context/skills/lightgame-runtime-adapt/project/scripts/skill-modules/export-config/vite.d.mts +0 -2
  210. package/resources/js/context/skills/lightgame-runtime-adapt/project/scripts/skill-modules/export-config/vite.mjs +0 -34
  211. package/resources/js/context/skills/lightgame-runtime-adapt/project/src/display/ui-stage.ts +0 -156
  212. package/resources/js/context/skills/lightgame-runtime-adapt/project/src/display/viewport.ts +0 -249
  213. package/resources/js/context/skills/lightgame-runtime-adapt/project/src/main.ts +0 -87
  214. package/resources/js/context/skills/lightgame-runtime-adapt/project/src/platform.ts +0 -2
  215. package/resources/js/context/skills/lightgame-runtime-adapt/project/src/screenUi.ts +0 -185
  216. package/resources/js/context/skills/lightgame-runtime-adapt/project/src/style.css +0 -294
  217. package/resources/js/context/skills/lightgame-runtime-adapt/project/tsconfig.json +0 -20
  218. package/resources/js/context/skills/lightgame-runtime-adapt/project/vite.config.ts +0 -5
  219. package/resources/js/context/skills/lightgame-runtime-adapt/scripts/install-template.mjs +0 -159
  220. package/resources/js/context/skills/mobile-adaptation/SKILL.md +0 -277
  221. package/resources/js/context/skills/mobile-adaptation/assets/example/src/input/input-config.json +0 -50
  222. package/resources/js/context/skills/mobile-adaptation/assets/example/src/input/input-layer.ts +0 -862
  223. package/resources/js/context/skills/mobile-adaptation/assets/example/src/input/input-platform.ts +0 -92
  224. package/resources/js/context/skills/mobile-adaptation/assets/example/src/input/input-primitives.ts +0 -254
  225. package/resources/js/context/skills/mobile-adaptation/assets/example/src/input/look-pad.ts +0 -245
  226. package/resources/js/context/skills/mobile-adaptation/assets/example/src/ui/touch-controls.css +0 -135
  227. package/resources/js/context/skills/mobile-adaptation/references/input-config.md +0 -342
  228. package/resources/js/context/skills/mobile-adaptation/references/verification.md +0 -140
  229. package/resources/js/context/skills/mobile-adaptation/references/web-audio.md +0 -11
  230. package/resources/js/context/skills/mobile-compat-qa/SKILL.md +0 -53
  231. package/resources/js/context/skills/mobile-compat-qa/references/startup-diagnosis.md +0 -23
  232. package/resources/js/context/skills/mobile-compat-qa/references/web-lifecycle.md +0 -20
  233. package/resources/js/context/skills/mobile-compat-qa/references/web-performance.md +0 -19
  234. package/resources/js/context/skills/optimization-suggestions/SKILL.md +0 -89
  235. package/resources/js/context/skills/platform-services/SKILL.md +0 -101
  236. package/resources/js/context/skills/platform-services/assets/modules/MultiplayerManager.ts +0 -465
  237. package/resources/js/context/skills/platform-services/assets/modules/eventBus.ts +0 -57
  238. package/resources/js/context/skills/platform-services/assets/modules/identity/qq-ai-game-sdk.min.js +0 -5
  239. package/resources/js/context/skills/platform-services/assets/modules/identity/qq-session.mjs +0 -208
  240. package/resources/js/context/skills/platform-services/assets/modules/identity/shared.mjs +0 -37
  241. package/resources/js/context/skills/platform-services/assets/modules/leaderboard.d.mts +0 -39
  242. package/resources/js/context/skills/platform-services/assets/modules/leaderboard.mjs +0 -1
  243. package/resources/js/context/skills/platform-services/assets/modules/log.ts +0 -35
  244. package/resources/js/context/skills/platform-services/assets/modules/multiplayer/clockSync.ts +0 -61
  245. package/resources/js/context/skills/platform-services/assets/modules/multiplayer/dsClient.ts +0 -52
  246. package/resources/js/context/skills/platform-services/assets/modules/multiplayer/payloadCodec.ts +0 -30
  247. package/resources/js/context/skills/platform-services/assets/modules/multiplayer/roomHttp.ts +0 -89
  248. package/resources/js/context/skills/platform-services/assets/modules/multiplayer/types.ts +0 -47
  249. package/resources/js/context/skills/platform-services/assets/modules/platform-service.d.mts +0 -31
  250. package/resources/js/context/skills/platform-services/assets/modules/platform-service.mjs +0 -272
  251. package/resources/js/context/skills/platform-services/assets/modules/save.d.mts +0 -49
  252. package/resources/js/context/skills/platform-services/assets/modules/save.mjs +0 -1
  253. package/resources/js/context/skills/platform-services/assets/scaffold/ds/main.mjs +0 -7
  254. package/resources/js/context/skills/platform-services/assets/scaffold/ds/rooms/SyncRoom.mjs +0 -264
  255. package/resources/js/context/skills/platform-services/assets/scaffold/ds/rooms/syncSchema.mjs +0 -39
  256. package/resources/js/context/skills/platform-services/references/SERVER_GUIDE.md +0 -139
  257. package/resources/js/context/skills/platform-services/references/api_reference.md +0 -18
  258. package/resources/js/context/skills/platform-services/references/leaderboard_playbook.md +0 -96
  259. package/resources/js/context/skills/platform-services/scripts/install.mjs +0 -148
  260. package/resources/js/context/skills/resolution-adaptation/SKILL.md +0 -47
  261. package/resources/js/context/skills/resolution-adaptation/assets/display/ui-stage.ts +0 -156
  262. package/resources/js/context/skills/resolution-adaptation/assets/display/viewport.ts +0 -249
  263. package/resources/js/context/skills/resolution-adaptation/assets/example/main.ts +0 -98
  264. package/resources/js/context/skills/resolution-adaptation/assets/example/ui-tokens.css +0 -200
  265. package/resources/js/context/skills/resolution-adaptation/references/audit.md +0 -31
  266. package/resources/js/context/skills/resolution-adaptation/references/device-safe-area.md +0 -40
  267. package/resources/js/context/skills/resolution-adaptation/references/game-ui-occlusion.md +0 -18
  268. package/resources/js/context/skills/resolution-adaptation/references/layout-rules.md +0 -15
  269. package/resources/js/context/skills/resolution-adaptation/references/troubleshooting.md +0 -34
  270. package/resources/js/context/skills/resolution-adaptation/references/viewport-api.md +0 -38
  271. package/resources/js/context/skills/resolution-adaptation/references/world-resize.md +0 -55
  272. package/resources/js/context/skills/resolution-adaptation/scripts/aspect_audit.mjs +0 -448
  273. package/resources/js/context/skills/scene-editor-compat/SKILL.md +0 -94
  274. package/resources/js/context/skills/scene-editor-compat/assets/example/localcraft.assets.json +0 -13
  275. package/resources/js/context/skills/scene-editor-compat/assets/example/localcraft.scene-editor.json +0 -6
  276. package/resources/js/context/skills/scene-editor-compat/assets/example/src/game/sceneAdapter.ts +0 -25
  277. package/resources/js/context/skills/scene-editor-compat/assets/example/src/scenes/main.scene.json +0 -18
  278. package/resources/js/context/skills/scene-editor-compat/assets/runtime/release.json +0 -7
  279. package/resources/js/context/skills/scene-editor-compat/assets/runtime/scene.d.mts +0 -42
  280. package/resources/js/context/skills/scene-editor-compat/assets/runtime/scene.mjs +0 -144
  281. package/resources/js/context/skills/scene-editor-compat/docs/contract.md +0 -330
  282. package/resources/js/context/skills/scene-editor-compat/docs/resource-sync.md +0 -64
  283. package/resources/js/context/skills/scene-editor-compat/docs/runtime-state.md +0 -28
  284. package/resources/js/context/skills/scene-editor-compat/docs/terrain-contract.md +0 -47
  285. package/resources/js/context/skills/scene-editor-compat/docs/visual-contract.md +0 -64
  286. package/resources/js/context/skills/scene-editor-compat/examples/platformer-ts/localcraft.assets.json +0 -38
  287. package/resources/js/context/skills/scene-editor-compat/examples/platformer-ts/localcraft.scene-editor.json +0 -9
  288. package/resources/js/context/skills/scene-editor-compat/examples/platformer-ts/src/game/sceneAdapter.ts +0 -59
  289. package/resources/js/context/skills/scene-editor-compat/examples/platformer-ts/src/game/sceneBlockers.ts +0 -30
  290. package/resources/js/context/skills/scene-editor-compat/examples/platformer-ts/src/game/sceneFileAssets.ts +0 -66
  291. package/resources/js/context/skills/scene-editor-compat/examples/platformer-ts/src/scenes/Main.Scene.ts +0 -20
  292. package/resources/js/context/skills/scene-editor-compat/examples/platformer-ts/src/scenes/SceneTypes.ts +0 -26
  293. package/resources/js/context/skills/scene-editor-compat/references/contract.md +0 -73
  294. package/resources/js/context/skills/scene-editor-compat/scripts/apply_scene_marker.py +0 -162
  295. package/resources/js/context/skills/scene-editor-compat/scripts/check_scene_contract.py +0 -853
  296. package/resources/js/context/skills/scene-editor-compat/scripts/check_scene_resource_urls.py +0 -173
  297. package/resources/js/context/skills/scene-editor-compat/scripts/scene-editor.mjs +0 -427
  298. package/resources/js/context/skills/scene-editor-compat/version.json +0 -1
  299. package/resources/js/context/skills/ui-editor-compat/SKILL.md +0 -48
  300. package/resources/js/context/skills/ui-editor-compat/assets/example/hud/WidgetLayout_Hud.ts +0 -35
  301. package/resources/js/context/skills/ui-editor-compat/assets/example/hud/WidgetLogic_Hud.ts +0 -74
  302. package/resources/js/context/skills/ui-editor-compat/assets/example/hud/hud.css +0 -60
  303. package/resources/js/context/skills/ui-editor-compat/assets/runtime/dom-ui.d.mts +0 -45
  304. package/resources/js/context/skills/ui-editor-compat/assets/runtime/dom-ui.mjs +0 -265
  305. package/resources/js/context/skills/ui-editor-compat/assets/runtime/release.json +0 -7
  306. package/resources/js/context/skills/ui-editor-compat/references/contract.md +0 -132
  307. package/resources/js/context/skills/ui-editor-compat/scripts/editor-contract.mjs +0 -327
  308. package/resources/js/context/skills/ui-editor-compat/scripts/project-files.mjs +0 -80
  309. package/resources/js/context/skills/ui-editor-compat/scripts/ui-editor.mjs +0 -84
  310. package/resources/js/context/skills/version-update/SKILL.md +0 -192
  311. package/resources/js/context/skills/version-update/scripts/check_runtime_refs.mjs +0 -129
  312. package/resources/js/context/skills/version-update/scripts/feature_snapshot.mjs +0 -159
  313. package/resources/js/context/skills/version-update/scripts/update_feature_version.mjs +0 -157
  314. package/resources/js/context/skills/version-update/upgrade_diffs/.gitkeep +0 -0
  315. package/resources/js/context/version/version.json +0 -1
  316. package/resources/js/project/SPEC/assist/.gitkeep +0 -0
  317. package/resources/js/project/SPEC/guide/.gitkeep +0 -0
  318. package/resources/js/project/SPEC/plan/.gitkeep +0 -0
  319. package/resources/js/project/SPEC/readme.md +0 -6
  320. package/resources/js/project/SPEC/res/.gitkeep +0 -0
  321. package/resources/js/project/SPEC/task-item/.gitkeep +0 -0
  322. package/resources/js/project/runtime/lightgame/1.0.0/platform/config.d.mts +0 -19
  323. package/resources/js/project/runtime/lightgame/1.0.0/platform/config.mjs +0 -1
  324. package/resources/js/project/runtime/lightgame/1.0.0/platform/leaderboard.d.mts +0 -39
  325. package/resources/js/project/runtime/lightgame/1.0.0/platform/leaderboard.mjs +0 -1
  326. package/resources/js/project/runtime/lightgame/1.0.0/platform/platform-capture-video.mjs +0 -227
  327. package/resources/js/project/runtime/lightgame/1.0.0/platform/platform-service.d.mts +0 -25
  328. package/resources/js/project/runtime/lightgame/1.0.0/platform/platform-service.mjs +0 -1
  329. package/resources/js/project/runtime/lightgame/1.0.0/platform/platform.d.mts +0 -79
  330. package/resources/js/project/runtime/lightgame/1.0.0/platform/platform.mjs +0 -29
  331. package/resources/js/project/runtime/lightgame/1.0.0/platform/save.d.mts +0 -49
  332. package/resources/js/project/runtime/lightgame/1.0.0/platform/save.mjs +0 -1
  333. package/resources/js/project/runtime/lightgame/1.0.0/release.json +0 -37
  334. package/resources/js/project/runtime/lightgame/1.0.0/tooling/cli.mjs +0 -2
  335. package/resources/js/project/runtime/lightgame/1.0.0/tooling/project.d.mts +0 -8
  336. package/resources/js/project/runtime/lightgame/1.0.0/tooling/project.mjs +0 -2
  337. package/resources/js/project/runtime/lightgame/1.0.0/tooling/vite.d.mts +0 -3
  338. package/resources/js/project/runtime/lightgame/1.0.0/tooling/vite.mjs +0 -8
  339. package/resources/js/project/runtime/lightgame/1.0.0/tools/assets.d.mts +0 -24
  340. package/resources/js/project/runtime/lightgame/1.0.0/tools/assets.mjs +0 -2
  341. package/resources/js/project/runtime/lightgame/1.0.0/tools/astc.d.mts +0 -10
  342. package/resources/js/project/runtime/lightgame/1.0.0/tools/astc.mjs +0 -1
  343. package/resources/js/project/runtime/lightgame/1.0.0/tools/audio.d.mts +0 -20
  344. package/resources/js/project/runtime/lightgame/1.0.0/tools/audio.mjs +0 -1
  345. package/resources/js/project/runtime/lightgame/1.0.0/tools/canvas.d.mts +0 -21
  346. package/resources/js/project/runtime/lightgame/1.0.0/tools/canvas.mjs +0 -1
  347. package/resources/js/project/runtime/lightgame/1.0.0/tools/input.d.mts +0 -17
  348. package/resources/js/project/runtime/lightgame/1.0.0/tools/input.mjs +0 -1
  349. package/resources/js/project/runtime/lightgame/1.0.0/tools/three.d.mts +0 -40
  350. package/resources/js/project/runtime/lightgame/1.0.0/tools/three.mjs +0 -1
  351. package/resources/js/project/runtime/lightgame/1.0.0/tools/ui.d.mts +0 -10
  352. package/resources/js/project/runtime/lightgame/1.0.0/tools/ui.mjs +0 -1
  353. package/resources/js/project/runtime/lightgame/1.0.0/tools/video.d.mts +0 -8
  354. package/resources/js/project/runtime/lightgame/1.0.0/tools/video.mjs +0 -1
  355. package/resources/js/project/scripts/refresh-runtime.mjs +0 -50
  356. package/resources/js/project/vendor/core-manager-js/package.json +0 -33
  357. package/resources/js/project/vendor/core-manager-js/src/.versions.json +0 -42
  358. package/resources/js/project/vendor/core-manager-js/src/CoreManagerPlugin.ts +0 -41
  359. package/resources/js/project/vendor/core-manager-js/src/assetManager/AssetRef.ts +0 -93
  360. package/resources/js/project/vendor/core-manager-js/src/assetManager/AstcFirstImageFile.ts +0 -203
  361. package/resources/js/project/vendor/core-manager-js/src/assetManager/AstcTextureLoader.ts +0 -106
  362. package/resources/js/project/vendor/core-manager-js/src/assetManager/resolveAssetUrl.test.ts +0 -25
  363. package/resources/js/project/vendor/core-manager-js/src/assetManager/resolveAssetUrl.ts +0 -21
  364. package/resources/js/project/vendor/core-manager-js/src/audioManager/AudioManager.test.ts +0 -65
  365. package/resources/js/project/vendor/core-manager-js/src/audioManager/AudioManager.ts +0 -340
  366. package/resources/js/project/vendor/core-manager-js/src/configManager/FeatureConfig.ts +0 -87
  367. package/resources/js/project/vendor/core-manager-js/src/configManager/tuneRuntime.d.mts +0 -92
  368. package/resources/js/project/vendor/core-manager-js/src/configManager/tuneRuntime.mjs +0 -271
  369. package/resources/js/project/vendor/core-manager-js/src/index.ts +0 -31
  370. package/resources/js/project/vendor/core-manager-js/src/inputManager/InputConfig.ts +0 -81
  371. package/resources/js/project/vendor/core-manager-js/src/inputManager/InputManager.test.ts +0 -43
  372. package/resources/js/project/vendor/core-manager-js/src/inputManager/InputManager.ts +0 -32
  373. package/resources/js/project/vendor/core-manager-js/src/inputManager/InputRuntime.test.ts +0 -141
  374. package/resources/js/project/vendor/core-manager-js/src/inputManager/InputRuntime.ts +0 -20
  375. package/resources/js/project/vendor/core-manager-js/src/inputManager/KeyboardProvider.ts +0 -183
  376. package/resources/js/project/vendor/core-manager-js/src/inputManager/TouchProvider.ts +0 -304
  377. package/resources/js/project/vendor/core-manager-js/src/inputManager/VirtualJoystick.ts +0 -351
  378. package/resources/js/project/vendor/core-manager-js/src/inputManager/_internal/InputManagerImpl.ts +0 -180
  379. package/resources/js/project/vendor/core-manager-js/src/inputManager/icons.b64 +0 -13
  380. package/resources/js/project/vendor/core-manager-js/src/inputManager/icons.b64.d.ts +0 -14
  381. package/resources/js/project/vendor/core-manager-js/src/inputManager/input_config.example.json +0 -68
  382. package/resources/js/project/vendor/core-manager-js/src/logManager/DebugConsole.ts +0 -433
  383. package/resources/js/project/vendor/core-manager-js/src/logManager/LogCapture.ts +0 -118
  384. package/resources/js/project/vendor/core-manager-js/src/logManager/LogManager.ts +0 -444
  385. package/resources/js/project/vendor/core-manager-js/src/logManager/ScreenCapture.ts +0 -485
  386. package/resources/js/project/vendor/core-manager-js/src/logManager/ScreenCaptureVideo.test.ts +0 -66
  387. package/resources/js/project/vendor/core-manager-js/src/logManager/ScreenCaptureVideo.ts +0 -149
  388. package/resources/js/project/vendor/core-manager-js/src/logManager/icons.b64 +0 -9
  389. package/resources/js/project/vendor/core-manager-js/src/resourceManager/AssetUrlResolver.ts +0 -29
  390. package/resources/js/project/vendor/core-manager-js/src/resourceManager/ResourceManager.test.ts +0 -88
  391. package/resources/js/project/vendor/core-manager-js/src/resourceManager/ResourceManager.ts +0 -122
  392. package/resources/js/project/vendor/core-manager-js/src/runtime.ts +0 -24
  393. package/resources/js/project/vendor/core-manager-js/src/spriteAnimManager/CharacterEntity.ts +0 -318
  394. package/resources/js/project/vendor/core-manager-js/src/spriteAnimManager/CharacterPhysicsBinding.test.ts +0 -151
  395. package/resources/js/project/vendor/core-manager-js/src/spriteAnimManager/CharacterPhysicsBinding.ts +0 -235
  396. package/resources/js/project/vendor/core-manager-js/src/spriteAnimManager/EffectComposite.test.ts +0 -98
  397. package/resources/js/project/vendor/core-manager-js/src/spriteAnimManager/EffectComposite.ts +0 -94
  398. package/resources/js/project/vendor/core-manager-js/src/spriteAnimManager/EffectEntity.ts +0 -209
  399. package/resources/js/project/vendor/core-manager-js/src/spriteAnimManager/FxManager.test.ts +0 -106
  400. package/resources/js/project/vendor/core-manager-js/src/spriteAnimManager/FxManager.ts +0 -341
  401. package/resources/js/project/vendor/core-manager-js/src/spriteAnimManager/FxRecipe.test.ts +0 -68
  402. package/resources/js/project/vendor/core-manager-js/src/spriteAnimManager/FxRecipe.ts +0 -236
  403. package/resources/js/project/vendor/core-manager-js/src/spriteAnimManager/SpriteAnimManager.test.ts +0 -22
  404. package/resources/js/project/vendor/core-manager-js/src/spriteAnimManager/SpriteAnimManager.ts +0 -29
  405. package/resources/js/project/vendor/core-manager-js/src/spriteAnimManager/SpriteEntity.test.ts +0 -197
  406. package/resources/js/project/vendor/core-manager-js/src/uiManager/DomUiContracts.ts +0 -9
  407. package/resources/js/project/vendor/core-manager-js/src/uiManager/DomUiKit.ts +0 -555
  408. package/resources/js/project/vendor/core-manager-js/src/uiManager/UIFacadePlugin.test.ts +0 -112
  409. package/resources/js/project/vendor/core-manager-js/src/uiManager/UIFacadePlugin.ts +0 -178
  410. package/resources/js/project/vendor/core-manager-js/src/uiManager/ui-base.css +0 -246
  411. package/resources/js/project/vendor/core-manager-js/src/videoManager/VideoManager.ts +0 -139
  412. package/resources/js/project/vendor/core-manager-js/tsconfig.json +0 -15
  413. package/resources/js/project/vendor/run.sh +0 -4
  414. package/resources/js/project/version/craft_feature_version.json +0 -42
  415. package/resources/js/project/version/project_feature_version.json +0 -11
  416. package/resources/js3d/context/.role/AGENTS_DESIGN.md +0 -9
  417. package/resources/js3d/context/knowledge/3D/PoseInterpolationKnowledge.md +0 -75
  418. package/resources/js3d/context/knowledge/CodingGuide/SceneEditableGuide.md +0 -42
  419. package/resources/js3d/context/knowledge/FrontendComponents.md +0 -19
  420. package/resources/js3d/context/knowledge/MobileAdaptation.md +0 -73
  421. package/resources/js3d/context/knowledge/MobileAdapted.md +0 -36
  422. package/resources/js3d/context/knowledge/Multiplayer/GameplaySystemKnowledge.md +0 -114
  423. package/resources/js3d/context/knowledge/Multiplayer/OverviewKnowledge.md +0 -117
  424. package/resources/js3d/context/knowledge/Multiplayer/StateSyncKnowledge.md +0 -430
  425. package/resources/js3d/context/knowledge/PlatformServices.md +0 -190
  426. package/resources/js3d/context/knowledge/ProjectDisplayConfig.md +0 -35
  427. package/resources/js3d/context/knowledge/SceneEditorCompat.md +0 -35
  428. package/resources/js3d/context/knowledge/StepByStep.md +0 -21
  429. package/resources/js3d/context/knowledge/Subsystems/Optional/MultiplayerManagerKnowledge.md +0 -242
  430. package/resources/js3d/context/knowledge/UiEditorCompat.md +0 -21
  431. package/resources/js3d/context/rules/MultiplayerCapability.md +0 -27
  432. package/resources/js3d/context/rules/MultiplayerRoomEntryUX.md +0 -63
  433. package/resources/js3d/context/rules/PlatformBoundaryModules.md +0 -44
  434. package/resources/js3d/context/rules/preview_ready.md +0 -8
  435. package/resources/js3d/context/skills/aigc-integration/assets/sprite-sheet-player.mjs +0 -70
  436. package/resources/js3d/context/skills/aigc-integration/callback.md +0 -77
  437. package/resources/js3d/context/skills/aigc-integration/knowledge/aigc/README.md +0 -23
  438. package/resources/js3d/context/skills/aigc-integration/knowledge/aigc/audio-aigc-knowledge.md +0 -38
  439. package/resources/js3d/context/skills/aigc-integration/knowledge/aigc/character2d-aigc-knowledge.md +0 -72
  440. package/resources/js3d/context/skills/aigc-integration/knowledge/aigc/staticmesh-aigc-knowledge.md +0 -33
  441. package/resources/js3d/context/skills/aigc-integration/knowledge/aigc/texture-prop-aigc-knowledge.md +0 -36
  442. package/resources/js3d/context/skills/aigc-integration/knowledge/aigc/texture-scene-aigc-knowledge.md +0 -37
  443. package/resources/js3d/context/skills/aigc-integration/knowledge/aigc/texture-ui-aigc-knowledge.md +0 -35
  444. package/resources/js3d/context/skills/asset-search/references/sprite-sheets.md +0 -58
  445. package/resources/js3d/context/skills/asset-search/scripts/asset_display.mjs +0 -62
  446. package/resources/js3d/context/skills/asset-search/scripts/config.json +0 -235
  447. package/resources/js3d/context/skills/asset-search/scripts/manifest_pipeline.mjs +0 -905
  448. package/resources/js3d/context/skills/asset-search/scripts/preflight.mjs +0 -79
  449. package/resources/js3d/context/skills/asset-search/scripts/provided_assets.mjs +0 -74
  450. package/resources/js3d/context/skills/asset-search/scripts/search.mjs +0 -637
  451. package/resources/js3d/context/skills/asset-search/scripts/sprite_source_materializer.mjs +0 -667
  452. package/resources/js3d/context/skills/asset-search/strategies/anim2d.md +0 -42
  453. package/resources/js3d/context/skills/asset-search/strategies/effect2d.md +0 -31
  454. package/resources/js3d/context/skills/asset-usage-audit/references/case-tidewater-zoo.md +0 -89
  455. package/resources/js3d/context/skills/asset-usage-audit/references/optimization-playbook.md +0 -143
  456. package/resources/js3d/context/skills/asset-usage-audit/references/usage-model.md +0 -90
  457. package/resources/js3d/context/skills/export-config/scripts/translate-asset-titles.mjs +0 -161
  458. package/resources/js3d/context/skills/game-art-style/SKILL.md +0 -60
  459. package/resources/js3d/context/skills/game-art-style/assets/previews/cartoon.png +0 -0
  460. package/resources/js3d/context/skills/game-art-style/assets/previews/comic.png +0 -0
  461. package/resources/js3d/context/skills/game-art-style/assets/previews/cozy.png +0 -0
  462. package/resources/js3d/context/skills/game-art-style/assets/previews/cyber.png +0 -0
  463. package/resources/js3d/context/skills/game-art-style/assets/previews/horror.png +0 -0
  464. package/resources/js3d/context/skills/game-art-style/assets/previews/lowpoly.png +0 -0
  465. package/resources/js3d/context/skills/game-art-style/assets/previews/paper.png +0 -0
  466. package/resources/js3d/context/skills/game-art-style/assets/previews/voxel.png +0 -0
  467. package/resources/js3d/context/skills/game-art-style/references/art-parameters-lite.md +0 -38
  468. package/resources/js3d/context/skills/game-art-style/references/construction.md +0 -111
  469. package/resources/js3d/context/skills/game-art-style/references/materials-textures.md +0 -105
  470. package/resources/js3d/context/skills/game-art-style/references/sources.md +0 -25
  471. package/resources/js3d/context/skills/game-art-style/references/styles/cartoon.md +0 -175
  472. package/resources/js3d/context/skills/game-art-style/references/styles/comic.md +0 -168
  473. package/resources/js3d/context/skills/game-art-style/references/styles/cozy.md +0 -191
  474. package/resources/js3d/context/skills/game-art-style/references/styles/cyber.md +0 -165
  475. package/resources/js3d/context/skills/game-art-style/references/styles/horror.md +0 -173
  476. package/resources/js3d/context/skills/game-art-style/references/styles/lowpoly.md +0 -185
  477. package/resources/js3d/context/skills/game-art-style/references/styles/paper.md +0 -181
  478. package/resources/js3d/context/skills/game-art-style/references/styles/voxel.md +0 -189
  479. package/resources/js3d/context/skills/game-art-style/references/user-style-document.md +0 -88
  480. package/resources/js3d/context/skills/mobile-adaptation/SKILL.md +0 -301
  481. package/resources/js3d/context/skills/mobile-adaptation/assets/example/src/input/input-config.json +0 -104
  482. package/resources/js3d/context/skills/mobile-adaptation/assets/example/src/input/input-layer.ts +0 -933
  483. package/resources/js3d/context/skills/mobile-adaptation/assets/example/src/input/input-platform.ts +0 -92
  484. package/resources/js3d/context/skills/mobile-adaptation/assets/example/src/input/input-primitives.ts +0 -254
  485. package/resources/js3d/context/skills/mobile-adaptation/assets/example/src/input/look-pad.ts +0 -245
  486. package/resources/js3d/context/skills/mobile-adaptation/assets/example/src/ui/touch-controls.css +0 -257
  487. package/resources/js3d/context/skills/mobile-adaptation/references/input-config.md +0 -342
  488. package/resources/js3d/context/skills/mobile-adaptation/references/verification.md +0 -140
  489. package/resources/js3d/context/skills/mobile-adaptation/references/web-audio.md +0 -11
  490. package/resources/js3d/context/skills/mobile-compat-qa/SKILL.md +0 -53
  491. package/resources/js3d/context/skills/mobile-compat-qa/references/startup-diagnosis.md +0 -23
  492. package/resources/js3d/context/skills/mobile-compat-qa/references/web-form-input.md +0 -10
  493. package/resources/js3d/context/skills/mobile-compat-qa/references/web-lifecycle.md +0 -20
  494. package/resources/js3d/context/skills/mobile-compat-qa/references/web-performance.md +0 -19
  495. package/resources/js3d/context/skills/optimization-suggestions/SKILL.md +0 -74
  496. package/resources/js3d/context/skills/performance-audit/references/case-notes.md +0 -93
  497. package/resources/js3d/context/skills/performance-audit/references/rules.md +0 -183
  498. package/resources/js3d/context/skills/platform-services/SKILL.md +0 -101
  499. package/resources/js3d/context/skills/platform-services/assets/modules/MultiplayerManager.ts +0 -465
  500. package/resources/js3d/context/skills/platform-services/assets/modules/eventBus.ts +0 -57
  501. package/resources/js3d/context/skills/platform-services/assets/modules/identity/qq-ai-game-sdk.min.js +0 -5
  502. package/resources/js3d/context/skills/platform-services/assets/modules/identity/qq-session.mjs +0 -208
  503. package/resources/js3d/context/skills/platform-services/assets/modules/identity/shared.mjs +0 -37
  504. package/resources/js3d/context/skills/platform-services/assets/modules/leaderboard.d.mts +0 -39
  505. package/resources/js3d/context/skills/platform-services/assets/modules/leaderboard.mjs +0 -1
  506. package/resources/js3d/context/skills/platform-services/assets/modules/log.ts +0 -35
  507. package/resources/js3d/context/skills/platform-services/assets/modules/multiplayer/clockSync.ts +0 -61
  508. package/resources/js3d/context/skills/platform-services/assets/modules/multiplayer/dsClient.ts +0 -52
  509. package/resources/js3d/context/skills/platform-services/assets/modules/multiplayer/payloadCodec.ts +0 -30
  510. package/resources/js3d/context/skills/platform-services/assets/modules/multiplayer/roomHttp.ts +0 -89
  511. package/resources/js3d/context/skills/platform-services/assets/modules/multiplayer/types.ts +0 -47
  512. package/resources/js3d/context/skills/platform-services/assets/modules/platform-service.d.mts +0 -31
  513. package/resources/js3d/context/skills/platform-services/assets/modules/platform-service.mjs +0 -272
  514. package/resources/js3d/context/skills/platform-services/assets/modules/save.d.mts +0 -49
  515. package/resources/js3d/context/skills/platform-services/assets/modules/save.mjs +0 -1
  516. package/resources/js3d/context/skills/platform-services/assets/scaffold/ds/main.mjs +0 -7
  517. package/resources/js3d/context/skills/platform-services/assets/scaffold/ds/rooms/SyncRoom.mjs +0 -264
  518. package/resources/js3d/context/skills/platform-services/assets/scaffold/ds/rooms/syncSchema.mjs +0 -39
  519. package/resources/js3d/context/skills/platform-services/references/SERVER_GUIDE.md +0 -139
  520. package/resources/js3d/context/skills/platform-services/references/api_reference.md +0 -18
  521. package/resources/js3d/context/skills/platform-services/references/leaderboard_playbook.md +0 -96
  522. package/resources/js3d/context/skills/platform-services/scripts/install.mjs +0 -148
  523. package/resources/js3d/context/skills/resolution-adaptation/SKILL.md +0 -46
  524. package/resources/js3d/context/skills/resolution-adaptation/assets/display/ui-stage.ts +0 -156
  525. package/resources/js3d/context/skills/resolution-adaptation/assets/display/viewport.ts +0 -239
  526. package/resources/js3d/context/skills/resolution-adaptation/assets/example/main.ts +0 -129
  527. package/resources/js3d/context/skills/resolution-adaptation/assets/example/ui-tokens.css +0 -188
  528. package/resources/js3d/context/skills/resolution-adaptation/references/audit.md +0 -31
  529. package/resources/js3d/context/skills/resolution-adaptation/references/device-safe-area.md +0 -40
  530. package/resources/js3d/context/skills/resolution-adaptation/references/game-ui-occlusion.md +0 -18
  531. package/resources/js3d/context/skills/resolution-adaptation/references/layout-rules.md +0 -15
  532. package/resources/js3d/context/skills/resolution-adaptation/references/troubleshooting.md +0 -34
  533. package/resources/js3d/context/skills/resolution-adaptation/references/viewport-api.md +0 -38
  534. package/resources/js3d/context/skills/resolution-adaptation/scripts/aspect_audit.mjs +0 -448
  535. package/resources/js3d/context/skills/scene-editor-compat/SKILL.md +0 -599
  536. package/resources/js3d/context/skills/scene-editor-compat/references/bundle-contract.md +0 -141
  537. package/resources/js3d/context/skills/scene-editor-compat/references/editor-integration.md +0 -92
  538. package/resources/js3d/context/skills/scene-editor-compat/references/scene-data-format.md +0 -125
  539. package/resources/js3d/context/skills/scene-editor-compat/references/slots-rules.md +0 -113
  540. package/resources/js3d/context/skills/scene-editor-compat/scripts/scene-editor.mjs +0 -1187
  541. package/resources/js3d/context/skills/threejs-game-quality/SKILL.md +0 -53
  542. package/resources/js3d/context/skills/threejs-game-quality/agents/openai.yaml +0 -4
  543. package/resources/js3d/context/skills/threejs-game-quality/references/01-build.md +0 -94
  544. package/resources/js3d/context/skills/threejs-game-quality/references/02-avoid.md +0 -50
  545. package/resources/js3d/context/skills/threejs-game-quality/references/03-detect.md +0 -105
  546. package/resources/js3d/context/skills/threejs-game-quality/references/camera-by-genre.md +0 -147
  547. package/resources/js3d/context/skills/threejs-game-quality/references/camera-distance.md +0 -79
  548. package/resources/js3d/context/skills/threejs-game-quality/references/camera-sources.md +0 -56
  549. package/resources/js3d/context/skills/threejs-game-quality/references/character-motion-face.md +0 -51
  550. package/resources/js3d/context/skills/threejs-game-quality/references/parameter-contract.md +0 -55
  551. package/resources/js3d/context/skills/threejs-game-quality/references/refine-existing.md +0 -78
  552. package/resources/js3d/context/skills/threejs-game-quality/references/rendering-stability.md +0 -84
  553. package/resources/js3d/context/skills/threejs-game-quality/references/runtime-tools.md +0 -120
  554. package/resources/js3d/context/skills/threejs-game-quality/scripts/package.json +0 -4
  555. package/resources/js3d/context/skills/threejs-game-quality/scripts/runtime-audit.js +0 -238
  556. package/resources/js3d/context/skills/ui-editor-compat/SKILL.md +0 -59
  557. package/resources/js3d/context/skills/ui-editor-compat/assets/example/hud/WidgetLayout_Hud.ts +0 -35
  558. package/resources/js3d/context/skills/ui-editor-compat/assets/example/hud/WidgetLogic_Hud.ts +0 -61
  559. package/resources/js3d/context/skills/ui-editor-compat/assets/example/hud/hud.css +0 -60
  560. package/resources/js3d/context/skills/ui-editor-compat/assets/runtime/dom-ui.d.mts +0 -45
  561. package/resources/js3d/context/skills/ui-editor-compat/assets/runtime/dom-ui.mjs +0 -265
  562. package/resources/js3d/context/skills/ui-editor-compat/assets/runtime/release.json +0 -7
  563. package/resources/js3d/context/skills/ui-editor-compat/references/contract.md +0 -110
  564. package/resources/js3d/context/skills/ui-editor-compat/scripts/editor-contract.mjs +0 -327
  565. package/resources/js3d/context/skills/ui-editor-compat/scripts/project-files.mjs +0 -80
  566. package/resources/js3d/context/skills/ui-editor-compat/scripts/ui-editor.mjs +0 -84
  567. package/resources/js3d/context/skills/version-update/SKILL.md +0 -191
  568. package/resources/js3d/context/skills/version-update/scripts/check_runtime_refs.mjs +0 -129
  569. package/resources/js3d/context/skills/version-update/scripts/feature_snapshot.mjs +0 -159
  570. package/resources/js3d/context/skills/version-update/scripts/update_feature_version.mjs +0 -157
  571. package/resources/js3d/context/skills/version-update/upgrade_diffs/.gitkeep +0 -0
  572. package/resources/js3d/context/version/version.json +0 -1
  573. package/resources/js3d/project/runtime/lightgame/1.0.0/platform/config.d.mts +0 -19
  574. package/resources/js3d/project/runtime/lightgame/1.0.0/platform/config.mjs +0 -1
  575. package/resources/js3d/project/runtime/lightgame/1.0.0/platform/leaderboard.d.mts +0 -39
  576. package/resources/js3d/project/runtime/lightgame/1.0.0/platform/leaderboard.mjs +0 -1
  577. package/resources/js3d/project/runtime/lightgame/1.0.0/platform/platform-capture-video.mjs +0 -227
  578. package/resources/js3d/project/runtime/lightgame/1.0.0/platform/platform-service.d.mts +0 -25
  579. package/resources/js3d/project/runtime/lightgame/1.0.0/platform/platform-service.mjs +0 -1
  580. package/resources/js3d/project/runtime/lightgame/1.0.0/platform/platform.d.mts +0 -79
  581. package/resources/js3d/project/runtime/lightgame/1.0.0/platform/platform.mjs +0 -30
  582. package/resources/js3d/project/runtime/lightgame/1.0.0/platform/save.d.mts +0 -49
  583. package/resources/js3d/project/runtime/lightgame/1.0.0/platform/save.mjs +0 -1
  584. package/resources/js3d/project/runtime/lightgame/1.0.0/release.json +0 -39
  585. package/resources/js3d/project/runtime/lightgame/1.0.0/tooling/cli.mjs +0 -2
  586. package/resources/js3d/project/runtime/lightgame/1.0.0/tooling/project.d.mts +0 -8
  587. package/resources/js3d/project/runtime/lightgame/1.0.0/tooling/project.mjs +0 -2
  588. package/resources/js3d/project/runtime/lightgame/1.0.0/tooling/vite.d.mts +0 -3
  589. package/resources/js3d/project/runtime/lightgame/1.0.0/tooling/vite.mjs +0 -7
  590. package/resources/js3d/project/runtime/lightgame/1.0.0/tools/assets.d.mts +0 -24
  591. package/resources/js3d/project/runtime/lightgame/1.0.0/tools/assets.mjs +0 -2
  592. package/resources/js3d/project/runtime/lightgame/1.0.0/tools/astc.d.mts +0 -10
  593. package/resources/js3d/project/runtime/lightgame/1.0.0/tools/astc.mjs +0 -1
  594. package/resources/js3d/project/runtime/lightgame/1.0.0/tools/audio.d.mts +0 -20
  595. package/resources/js3d/project/runtime/lightgame/1.0.0/tools/audio.mjs +0 -1
  596. package/resources/js3d/project/runtime/lightgame/1.0.0/tools/canvas.d.mts +0 -21
  597. package/resources/js3d/project/runtime/lightgame/1.0.0/tools/canvas.mjs +0 -1
  598. package/resources/js3d/project/runtime/lightgame/1.0.0/tools/glb.d.mts +0 -26
  599. package/resources/js3d/project/runtime/lightgame/1.0.0/tools/glb.mjs +0 -351
  600. package/resources/js3d/project/runtime/lightgame/1.0.0/tools/input.d.mts +0 -17
  601. package/resources/js3d/project/runtime/lightgame/1.0.0/tools/input.mjs +0 -1
  602. package/resources/js3d/project/runtime/lightgame/1.0.0/tools/three.d.mts +0 -40
  603. package/resources/js3d/project/runtime/lightgame/1.0.0/tools/three.mjs +0 -1
  604. package/resources/js3d/project/runtime/lightgame/1.0.0/tools/ui.d.mts +0 -10
  605. package/resources/js3d/project/runtime/lightgame/1.0.0/tools/ui.mjs +0 -1
  606. package/resources/js3d/project/runtime/lightgame/1.0.0/tools/video.d.mts +0 -8
  607. package/resources/js3d/project/runtime/lightgame/1.0.0/tools/video.mjs +0 -1
  608. package/resources/js3d/project/scripts/refresh-runtime.mjs +0 -50
  609. package/resources/js3d/project/vendor/core-manager-three/package.json +0 -12
  610. package/resources/js3d/project/vendor/core-manager-three/src/index.ts +0 -2
  611. package/resources/js3d/project/vendor/run.sh +0 -4
  612. package/resources/js3d/project/version/craft_feature_version.json +0 -42
  613. package/resources/js3d/project/version/project_feature_version.json +0 -11
  614. package/vendor/agent-cli/dist/src/artifacts/scene-asset-delivery.d.ts +0 -7
  615. package/vendor/agent-cli/dist/src/artifacts/scene-asset-delivery.d.ts.map +0 -1
  616. package/vendor/agent-cli/dist/src/artifacts/scene-asset-delivery.js +0 -145
  617. package/vendor/agent-cli/dist/src/artifacts/scene-asset-delivery.js.map +0 -1
  618. /package/resources/js/{context/skills/export-config/scripts → project/scripts/config-export}/assert-asset-wiring.mjs +0 -0
  619. /package/resources/js3d/{context/skills/export-config/scripts → project/scripts/config-export}/assert-asset-wiring.mjs +0 -0
  620. /package/resources/js3d/{context/skills/export-config/scripts → project/scripts/config-export}/sync-asset-controls.mjs +0 -0
@@ -6,43 +6,30 @@ const pageAbort = new AbortController();
6
6
  const hashPattern = /^[a-f0-9]{64}$/;
7
7
  const idPattern = /^[A-Za-z0-9_-]{1,128}$/;
8
8
  const imageLimit = 2 * 1024 * 1024;
9
- const publishedTargetHelp = '当前版本已发布。请回到 WorkBuddy 重新验收同一个游戏,再用新的验收结果打开发布页。';
10
9
  let context, publication, reviewedRevision, busy = false, dirty = false, needsSync = false;
11
10
  let disposed = false, formInitialized = false, reviewGeneration = 0, statusTimer;
12
- let targetVersionPublished = false;
13
11
  let coverData, coverId, coverURL, coverGeneration = 0, coverLoading = false, imagesReady = false;
14
12
  const stateNames = { awaiting_confirmation:'等待审阅确认', submitting:'正在提交', submitted:'已提交,等待审核', sharing:'审核中',
15
13
  share_repacking:'发布处理中', share_completed:'审核通过', share_failed:'发布未完成', share_delisted:'审核未通过或已下架',
16
14
  different_publication:'目标版本存在另一条发布记录', not_submitted:'尚未提交', external_draft:'私有草稿' };
17
15
 
18
16
  function message(text) { byId('message').textContent = text; }
19
- function localizedText(value, fallback) {
20
- return typeof value === 'string' && /\p{Script=Han}/u.test(value) && !/\n\s+at |file:\/\/\/|[A-Za-z]:\\|\b(?:ENOENT|EACCES|EPERM)\b/.test(value) ? value : fallback;
21
- }
22
17
  function showError(error) {
23
- byId('error').textContent = localizedText(error instanceof Error ? error.message : String(error),'发布操作未完成,请刷新进度后查看。');
18
+ byId('error').textContent = error instanceof Error ? error.message : String(error);
24
19
  byId('error').hidden = false;
25
20
  }
26
21
  function clearError() { byId('error').textContent = ''; byId('error').hidden = true; }
27
- function errorText(data, fallback) {
22
+ function errorText(data) {
28
23
  const detail = data && typeof data === 'object' ? data : {};
29
- return [localizedText(detail.error || detail.message,fallback),
30
- idPattern.test(detail.request_id || '') ? '请求 ID:' + detail.request_id : ''].filter(Boolean).join('\n');
31
- }
32
- function isPublishedTaskFailure(task) {
33
- const { reason,message:rawMessage } = task.error || {};
34
- return task.kind === 'publish_prepare' && task.status === 'failed' && (reason === 'publication_version_already_published' ||
35
- typeof rawMessage === 'string' && rawMessage.startsWith('This version is already published.'));
24
+ return [detail.error || detail.message || '本地请求未完成',
25
+ detail.request_id ? '请求 ID:' + detail.request_id : ''].filter(Boolean).join('\n');
36
26
  }
37
27
  function taskError(task, fallback) {
28
+ const detail = errorText(task?.error || { error:fallback });
38
29
  if (task?.kind === 'publish_prepare' && task.status === 'failed') {
39
- if (isPublishedTaskFailure(task)) {
40
- return Object.assign(new Error(publishedTargetHelp),{ targetVersionPublished:true });
41
- }
42
- if (task.error?.reason === 'publication_review_in_progress') return new Error(errorText(task.error,'当前版本正在审核,请回到 WorkBuddy 查看原发布记录。'));
43
- return new Error(['发布材料准备失败。请重新点击「准备发布材料」重试。',errorText(task.error,'')].filter(Boolean).join('\n\n'));
30
+ return new Error('发布材料准备失败。请重新点击「准备发布材料」重试。\n\n' + detail);
44
31
  }
45
- return new Error(errorText(task?.error,task?.status === 'failed' && task.kind === 'publish_submit' ? '提交审核未完成,请刷新进度并查看原发布记录。' : fallback));
32
+ return new Error(detail);
46
33
  }
47
34
  async function request(route, body, query) {
48
35
  const url = new URL(apiBase + '/' + route, location.origin);
@@ -62,7 +49,7 @@ async function request(route, body, query) {
62
49
  }
63
50
  const data = await response.json().catch(() => null);
64
51
  if (!response.ok || !data || typeof data !== 'object') {
65
- const error = new Error(errorText(data,body === undefined ? '暂时无法读取发布信息,请刷新进度后重试。' : '发布操作未完成,请先刷新进度。')); error.httpStatus = response.status;
52
+ const error = new Error(errorText(data)); error.httpStatus = response.status;
66
53
  error.needsSync = body !== undefined && (!data || typeof data !== 'object' || response.status >= 500); throw error;
67
54
  }
68
55
  return data;
@@ -80,17 +67,10 @@ function changeStep(current) {
80
67
  if (index === current) item.setAttribute('aria-current','step'); else item.removeAttribute('aria-current');
81
68
  });
82
69
  }
83
- function showPublishedTarget() {
84
- targetVersionPublished = true;
85
- if (!publication?.published) changeStep(0);
86
- byId('status').textContent = '当前版本已发布';
87
- byId('status').dataset.state = 'share_completed';
88
- message(publishedTargetHelp);
89
- }
90
70
  function isInProgress() { return ['submitting','submitted','sharing','share_repacking'].includes(publication?.state); }
91
- function isLocked() { return targetVersionPublished || publication?.published === true || isInProgress() || publication?.state === 'different_publication'; }
71
+ function isLocked() { return publication?.published === true || isInProgress() || publication?.state === 'different_publication'; }
92
72
  function canConfirm() {
93
- return Boolean(!targetVersionPublished && publication && reviewedRevision === publication.revision && imagesReady && !dirty && !needsSync &&
73
+ return Boolean(publication && reviewedRevision === publication.revision && imagesReady && !dirty && !needsSync &&
94
74
  publication.materials?.open_to_recreate === false &&
95
75
  (publication.state === 'awaiting_confirmation' || publication.finalization_retry_required === true));
96
76
  }
@@ -98,7 +78,7 @@ function updateControls() {
98
78
  byId('refresh').disabled = busy;
99
79
  byId('materials-fields').disabled = busy || coverLoading || !context || needsSync || isLocked();
100
80
  byId('previous-cover').hidden = context?.previous_publication?.cover_available !== true || Boolean(coverData);
101
- byId('review').hidden = targetVersionPublished || !publication || dirty || !['awaiting_confirmation'].includes(publication.state) && !publication.finalization_retry_required;
81
+ byId('review').hidden = !publication || dirty || !['awaiting_confirmation'].includes(publication.state) && !publication.finalization_retry_required;
102
82
  byId('review').disabled = busy || needsSync;
103
83
  byId('confirm').disabled = busy || !canConfirm();
104
84
  byId('submit').disabled = busy || !canConfirm() || !byId('confirm').checked;
@@ -170,12 +150,11 @@ function setPublication(value) {
170
150
  value.name !== context.name || value.check_task_id !== context.check_task_id) throw new Error('发布回执与当前检查不一致,请返回 AI IDE 重新打开发布页面。');
171
151
  if (reviewedRevision !== value.revision) { reviewedRevision = undefined; imagesReady = false; byId('confirm').checked = false; }
172
152
  publication = value;
173
- byId('status').textContent = Object.hasOwn(stateNames,value.state) ? stateNames[value.state] : '状态待确认';
153
+ byId('status').textContent = stateNames[value.state] || value.state;
174
154
  byId('status').dataset.state = value.state;
175
- byId('publication-progress').textContent = localizedText(value.status_reason,value.published ? '当前目标版本已通过审核。' :
155
+ byId('publication-progress').textContent = value.status_reason || (value.published ? '当前目标版本已通过审核。' :
176
156
  value.finalization_retry_required ? '审核后的发布收尾尚未完成,可重试同一份已确认材料。' :
177
- isInProgress() ? '材料已受理,正在查询同一发布记录的审核进度。请保留此页面,不要重复提交。' :
178
- value.status_reason ? '请在 Craft 平台查看此版本的审核详情。' : '');
157
+ isInProgress() ? '材料已受理,正在查询同一发布记录的审核进度。请保留此页面,不要重复提交。' : '');
179
158
  if (value.published) { changeStep(3); message('当前目标版本已通过审核,可以打开已发布游戏。'); }
180
159
  else if (isInProgress()) { changeStep(3); message('已提交审核,正在等待当前版本的结果。'); }
181
160
  else if (!dirty) changeStep(2);
@@ -286,9 +265,6 @@ async function loadState() {
286
265
  byId('cover-help').textContent = previous?.cover_available === true ? coverHelp : coverHelp + coverFallback;
287
266
  if (!formInitialized) fillForm(state.publication?.materials ?? previous?.materials);
288
267
  if (state.publication) setPublication(state.publication);
289
- if (targetVersionPublished || state.target_version_published || state.publication?.state === 'share_completed') {
290
- showPublishedTarget(); return;
291
- }
292
268
  if (state.task_id) {
293
269
  const task = await request('task',undefined,{ task_id:state.task_id });
294
270
  if (task.status === 'running') { changeStep(1); message('正在恢复原发布任务…'); }
@@ -296,9 +272,7 @@ async function loadState() {
296
272
  const result = await waitForTask(task);
297
273
  setPublication(await request('status',undefined,{ publication_id:result.publication_id }));
298
274
  if (!dirty) fillForm(publication.materials);
299
- } else if (task.status !== 'completed' && (!state.publication || isPublishedTaskFailure(task))) {
300
- throw taskError(task,'原任务已中断,请回 WorkBuddy 查看。');
301
- }
275
+ } else if (task.status !== 'completed' && !state.publication) throw taskError(task,'原任务已中断,请回 AI IDE 查看。');
302
276
  }
303
277
  if (publication && !dirty && (publication.state === 'awaiting_confirmation' || publication.finalization_retry_required)) {
304
278
  await reviewPublication(publication); message('材料已准备。请核对文案、封面和全部展示截图,再确认公开提交。');
@@ -311,7 +285,7 @@ async function loadState() {
311
285
  }
312
286
  function scheduleStatus() {
313
287
  clearTimeout(statusTimer);
314
- if (disposed || targetVersionPublished || !publication || !isInProgress()) return;
288
+ if (disposed || !publication || !isInProgress()) return;
315
289
  statusTimer = setTimeout(async () => {
316
290
  if (busy) { scheduleStatus(); return; }
317
291
  try {
@@ -331,13 +305,7 @@ async function perform(action) {
331
305
  if (busy || disposed) return;
332
306
  busy = true; clearTimeout(statusTimer); clearError(); updateControls();
333
307
  try { await action(); }
334
- catch (error) {
335
- if (!disposed) {
336
- if (error.needsSync) needsSync = true;
337
- if (error.targetVersionPublished) showPublishedTarget();
338
- else showError(error);
339
- }
340
- }
308
+ catch (error) { if (!disposed) { if (error.needsSync) needsSync = true; showError(error); } }
341
309
  finally { busy = false; updateControls(); scheduleStatus(); }
342
310
  }
343
311
  function clearCover(resetInput = true) {
@@ -367,7 +335,7 @@ byId('cover-file').addEventListener('change',async () => {
367
335
  byId('clear-cover').onclick = () => { clearCover(); invalidateReview(); };
368
336
  byId('materials-form').onsubmit = event => {
369
337
  event.preventDefault();
370
- if (coverLoading || needsSync || isLocked() || !byId('materials-form').reportValidity()) return;
338
+ if (coverLoading || !byId('materials-form').reportValidity()) return;
371
339
  void perform(async () => {
372
340
  const materials = materialInput();
373
341
  reviewedRevision = undefined; imagesReady = false; byId('confirm').checked = false;
@@ -7,16 +7,12 @@ import { publicationMaterials } from '../game-workflow/publication-materials.mjs
7
7
 
8
8
  const identifier = /^[a-zA-Z0-9_-]{1,128}$/;
9
9
  const failure = (message,status=400)=>Object.assign(new Error(message),{ status });
10
- const pageChanged = 'Craft 账号已变更或发布页已失效。请回到 AI IDE 重新打开发布页。';
11
- const publicationCheckMismatch = '发布记录与当前验收结果不匹配。请回到 AI IDE 打开对应的发布页。';
12
- const previewUnavailable = '本地游戏预览暂不可用。请重新加载页面后再试,已保存的发布进度仍可查看。';
13
- const coverRequirements = '请选择不超过 2 MiB 的 PNG 或 JPEG 封面图片。';
14
10
  function bodyFields(body,keys,required=keys) {
15
11
  if (!body || typeof body !== 'object' || Array.isArray(body) || Object.keys(body).some(key=>!keys.includes(key)) ||
16
- required.some(key=>!Object.hasOwn(body,key))) throw failure('发布请求缺少必要资料或包含无效字段。');
12
+ required.some(key=>!Object.hasOwn(body,key))) throw failure('Invalid publication request');
17
13
  }
18
14
  function selectedId(value) {
19
- if (typeof value !== 'string' || !identifier.test(value)) throw failure('发布记录或任务标识无效。请回到 AI IDE 重新打开发布页。');
15
+ if (typeof value !== 'string' || !identifier.test(value)) throw failure('Invalid publication identity');
20
16
  return value;
21
17
  }
22
18
 
@@ -36,20 +32,20 @@ export function createPublishPanel({ platform,projects,tasks,drafts,publications
36
32
  }
37
33
  async function scopeFor(cap) {
38
34
  const scope = scopes.get(cap);
39
- if (!scope) throw failure('本地发布页已失效。请回到 AI IDE 重新打开发布页。',404);
35
+ if (!scope) throw failure('This local publication page is unavailable. Reopen it from Craft.',404);
40
36
  if (!current(scope)) {
41
37
  await retire(cap,scope);
42
- throw failure(pageChanged,403);
38
+ throw failure('Craft account or publication page changed. Reopen the page.',403);
43
39
  }
44
40
  return scope;
45
41
  }
46
42
  function requireCurrent(scope) {
47
- if (!current(scope)) throw failure(pageChanged,403);
43
+ if (!current(scope)) throw failure('Craft account or publication page changed. Reopen the page.',403);
48
44
  }
49
45
  async function publication(scope,id) {
50
- if (selectedId(id) !== scope.publication_id) throw failure('发布记录不属于当前页面。请回到 AI IDE 打开对应的发布页。',403);
46
+ if (selectedId(id) !== scope.publication_id) throw failure('Publication does not belong to this page',403);
51
47
  const result = await publications.status(scope.name,id,scope.owner);
52
- if (result.check_task_id !== scope.check_task_id) throw failure(publicationCheckMismatch,403);
48
+ if (result.check_task_id !== scope.check_task_id) throw failure('Publication does not match this checked build',403);
53
49
  requireCurrent(scope); return result;
54
50
  }
55
51
  async function preview(scope) {
@@ -61,7 +57,7 @@ export function createPublishPanel({ platform,projects,tasks,drafts,publications
61
57
  handle=await pending;
62
58
  url=new URL(handle.url);
63
59
  if (url.protocol !== 'http:' || url.hostname !== '127.0.0.1' || url.origin === origin || url.username || url.password || url.hash) {
64
- throw failure('发布预览需要独立的本机回环地址。');
60
+ throw failure('Publication preview must use an isolated loopback origin');
65
61
  }
66
62
  } catch {
67
63
  if (scope.preview === pending) delete scope.preview;
@@ -79,18 +75,18 @@ export function createPublishPanel({ platform,projects,tasks,drafts,publications
79
75
  return {
80
76
  bindOrigin(value) { origin=value; },
81
77
  async open(name,checkId,publicationId) {
82
- if (closed || !origin) throw failure('本地发布页暂不可用。请重新连接 Craft MCP 后再试。');
78
+ if (closed || !origin) throw failure('Local publication panel is unavailable');
83
79
  projects.file(name); selectedId(checkId);
84
80
  const account=platform.account(),session=platform.store.getSession();
85
81
  const resume=Boolean(publicationId) || await drafts.hasRequest(name,checkId,account.user_id);
86
82
  const context=await checkedTask(checkId,name,resume);
87
83
  for (const [cap,existing] of scopes) if (!current(existing)) await retire(cap,existing);
88
- if (scopes.size >= 32) throw failure('已打开的发布页过多。请关闭并重新连接 Craft MCP,再打开发布页。');
84
+ if (scopes.size >= 32) throw failure('Close and reconnect Craft to reopen the local publication panel');
89
85
  const scope={ name,check_task_id:checkId,check:context.task,project:context.project,owner:account.user_id,
90
86
  platform:platform.base,token:session.token,created:now(),tasks:new Set() };
91
87
  if (publicationId) {
92
88
  const existing=await publications.status(name,selectedId(publicationId),account.user_id);
93
- if (existing.check_task_id !== checkId) throw failure(publicationCheckMismatch,403);
89
+ if (existing.check_task_id !== checkId) throw failure('Publication does not match this checked build',403);
94
90
  scope.publication_id=publicationId;
95
91
  }
96
92
  requireCurrent(scope);
@@ -103,14 +99,14 @@ export function createPublishPanel({ platform,projects,tasks,drafts,publications
103
99
  async document(cap) {
104
100
  const scope=await scopeFor(cap),runtime_url=await preview(scope);
105
101
  scope.document_loaded=true;scope.document_preview_origin=runtime_url ? new URL(runtime_url).origin : undefined;
106
- return { runtime_url,...(scope.preview_unavailable ? { preview_error:previewUnavailable } : {}) };
102
+ return { runtime_url,...(scope.preview_unavailable ? { preview_error:'Local frozen preview is unavailable. Reload this page to retry; saved publication status remains available.' } : {}) };
107
103
  },
108
104
  async handle(cap,action,method,query,body) {
109
105
  const scope=await scopeFor(cap);
110
106
  const writing=['cover','prepare','review','submit'].includes(action);
111
- if (method !== (writing ? 'POST' : 'GET')) throw failure('发布页不支持此请求方式。请从页面上的按钮发起操作。',405);
107
+ if (method !== (writing ? 'POST' : 'GET')) throw failure('Publication method is not allowed',405);
112
108
  const allowedQuery=action === 'task' ? ['task_id'] : action === 'status' ? ['publication_id'] : [];
113
- if ([...query.keys()].some(key=>!allowedQuery.includes(key)) || allowedQuery.some(key=>query.getAll(key).length !== 1)) throw failure('发布查询参数无效。请刷新页面后再试。');
109
+ if ([...query.keys()].some(key=>!allowedQuery.includes(key)) || allowedQuery.some(key=>query.getAll(key).length !== 1)) throw failure('Invalid publication query');
114
110
  if (action === 'state') {
115
111
  const [options,draft,saved,previous]=await Promise.all([
116
112
  platform.publicationSession(scope.owner)('options'),
@@ -122,38 +118,35 @@ export function createPublishPanel({ platform,projects,tasks,drafts,publications
122
118
  const runtime_url=scope.document_loaded && !scope.document_preview_origin ? undefined : await preview(scope); requireCurrent(scope);
123
119
  const account=platform.account();
124
120
  scope.previous=previous;
125
- const target_version_published=draft.state === 'draft_ready' && previous?.published === true && previous.conversation_id === draft.conversation_id &&
126
- previous.version_id === draft.version_id;
127
121
  return { name:scope.name,check_task_id:scope.check_task_id,engine:scope.check.result.engine,platform:scope.platform,
128
- account:{ user_id:account.user_id,nickname:account.nickname },draft,options,publication:saved,target_version_published,
122
+ account:{ user_id:account.user_id,nickname:account.nickname },draft,options,publication:saved,
129
123
  ...(previous ? { previous_publication:{ materials:previous.materials,cover_available:Boolean(previous.cover_url) } } : {}),
130
124
  task_id:scope.task_id,runtime_url,preview_unavailable:scope.preview_unavailable === true,
131
- ...(scope.preview_unavailable ? { preview_error:previewUnavailable } : {}) };
125
+ ...(scope.preview_unavailable ? { preview_error:'Local frozen preview is unavailable. Reload this page to retry; saved publication status remains available.' } : {}) };
132
126
  }
133
127
  if (action === 'task') {
134
128
  const id=selectedId(query.get('task_id'));
135
- if (!scope.tasks.has(id)) throw failure('任务不属于当前发布页。请回到 AI IDE 打开对应的发布页。',403);
129
+ if (!scope.tasks.has(id)) throw failure('Task does not belong to this page',403);
136
130
  const result=viewTask(await tasks.get(id)); requireCurrent(scope); return result;
137
131
  }
138
132
  if (action === 'status') return publication(scope,query.get('publication_id'));
139
- if (!writing) throw failure('发布页不支持此操作。',404);
133
+ if (!writing) throw failure('Unknown publication action',404);
140
134
  return mutate(scope.name,async()=>{
141
135
  requireCurrent(scope);
142
136
  if (action === 'cover') {
143
137
  bodyFields(body,['data']);
144
138
  if (typeof body.data !== 'string' || body.data.length > Math.ceil(2*1024*1024/3)*4 ||
145
- !/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(body.data)) throw failure(coverRequirements);
139
+ !/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(body.data)) throw failure('Cover must be a PNG/JPEG image of at most 2 MiB');
146
140
  const data=Buffer.from(body.data,'base64');
147
- if (!data.length || data.length > 2*1024*1024) throw failure(coverRequirements);
148
- let extension;
149
- try { extension=imageExtension(data); } catch { throw failure(coverRequirements); }
150
- if (!['png','jpg'].includes(extension)) throw failure(coverRequirements);
151
- if (!coverDirectory) throw failure('本地封面暂存不可用。请重新连接 Craft MCP 后再试。');
141
+ if (!data.length || data.length > 2*1024*1024) throw failure('Cover must be a PNG/JPEG image of at most 2 MiB');
142
+ const extension=imageExtension(data);
143
+ if (!['png','jpg'].includes(extension)) throw failure('Cover must be a PNG or JPEG image');
144
+ if (!coverDirectory) throw failure('Local cover staging is unavailable');
152
145
  coverRoot ??= privateDirectory(coverDirectory,projects.root);
153
146
  const root=await coverRoot;
154
147
  const directory=scope.cover_directory ?? path.join(root,cap);
155
148
  await mkdir(directory,{ recursive:true,mode:0o700 });
156
- if ((await lstat(directory)).isSymbolicLink() || await realpath(directory) !== directory) throw failure('本地封面暂存目录无效。请重新连接 Craft MCP 后再试。');
149
+ if ((await lstat(directory)).isSymbolicLink() || await realpath(directory) !== directory) throw failure('Invalid private cover directory');
157
150
  scope.cover_directory=directory;
158
151
  const id=randomUUID(),file=id+'.'+extension;
159
152
  await writeFile(path.join(directory,file),data,{ flag:'wx',mode:0o600 });
@@ -165,9 +158,9 @@ export function createPublishPanel({ platform,projects,tasks,drafts,publications
165
158
  }
166
159
  if (action === 'prepare') {
167
160
  bodyFields(body,['materials','cover_id','reuse_previous_cover'],['materials']); publicationMaterials(body.materials);
168
- if (body.materials.cover_path !== undefined) throw failure('请在当前发布页选择封面图片。');
169
- if (body.cover_id !== undefined && (typeof body.cover_id !== 'string' || body.cover_id !== scope.cover?.id)) throw failure('封面不属于当前发布页。请重新选择封面图片。',403);
170
- if (body.reuse_previous_cover !== undefined && typeof body.reuse_previous_cover !== 'boolean') throw failure('请选择是否沿用上次的封面。');
161
+ if (body.materials.cover_path !== undefined) throw failure('Choose a cover image on this local page');
162
+ if (body.cover_id !== undefined && (typeof body.cover_id !== 'string' || body.cover_id !== scope.cover?.id)) throw failure('Cover does not belong to this page',403);
163
+ if (body.reuse_previous_cover !== undefined && typeof body.reuse_previous_cover !== 'boolean') throw failure('Choose whether to reuse the previous cover');
171
164
  const stagedCover=body.cover_id ? scope.cover : undefined;
172
165
  const resume=await drafts.hasRequest(scope.name,scope.check_task_id,scope.owner);
173
166
  const context=await checkedTask(scope.check_task_id,scope.name,resume);
@@ -195,7 +188,7 @@ export function createPublishPanel({ platform,projects,tasks,drafts,publications
195
188
  requireCurrent(scope); return result;
196
189
  }
197
190
  bodyFields(body,['publication_id','revision','confirmed']);
198
- if (typeof body.revision !== 'string' || !/^[0-9a-f]{64}$/.test(body.revision) || body.confirmed !== true) throw failure('请先审阅并确认当前版本的发布材料,再提交审核。');
191
+ if (typeof body.revision !== 'string' || !/^[0-9a-f]{64}$/.test(body.revision) || body.confirmed !== true) throw failure('Confirm the exact reviewed publication revision');
199
192
  await publication(scope,body.publication_id); requireCurrent(scope);
200
193
  const task=await tasks.start(scope.name,'publish_submit',signal=>{
201
194
  requireCurrent(scope);
@@ -21,11 +21,12 @@ import { Previews } from '../preview/local-static-preview.mjs';
21
21
  import { openControlPanel } from './control-panel.mjs';
22
22
  import { createPublishPanel } from './publish-panel.mjs';
23
23
  import { openPublicationPreview } from './publication-preview.mjs';
24
- import { loadEngineResources } from '../game-workflow/engines.mjs';
24
+ import { loadEngineResources, loadEngineResource } from '../game-workflow/engines.mjs';
25
25
  import { assetCapabilities } from '../game-workflow/resource-catalog.mjs';
26
26
  import { takeConnectorToken, ConnectorAuthStore, connectorLoginAction } from '../core/connector-auth.mjs';
27
27
  import { generationFields, importFields, generationInputs, searchFields, importSource } from './asset-tools.mjs';
28
28
  import { publicationTools } from './publication-tools.mjs';
29
+ import { clientIde } from '../integrations/hosts.mjs';
29
30
 
30
31
  // Consume before any project/build subprocess can inherit the credential.
31
32
  let connectorToken = takeConnectorToken();
@@ -41,7 +42,8 @@ if (connectorAuth) {
41
42
  finally { connectorToken = undefined; }
42
43
  }
43
44
  const { instructions:guide, engines } = await loadEngineResources(resources);
44
- const projects = new Projects(root,state,engines); await projects.init();
45
+ const host = clientIde(process.env.CRAFT_CLIENT_IDE);
46
+ const projects = new Projects(root,state,engines,host); await projects.init();
45
47
  const tasks = new Tasks(state); await tasks.init();
46
48
  const previews = new Previews(state);
47
49
  const leases = new ProjectLeases(root,name=>tasks.cancelProject(name)); await leases.init();
@@ -122,13 +124,12 @@ function viewTask(task) {
122
124
  }
123
125
  async function checkedTask(id, name, resumeUpload = false) {
124
126
  const task = await tasks.get(id);
125
- if (task.kind !== 'check' || task.status !== 'completed' || !task.result?.gate?.passed) throw new Error('请先完成游戏验收并使用通过的验收结果。');
126
- if (name !== undefined && task.name !== name) throw new Error('该验收结果属于其他游戏,请使用当前游戏的验收结果。');
127
+ if (task.kind !== 'check' || task.status !== 'completed' || !task.result?.gate?.passed) throw new Error('A completed passing game check is required');
128
+ if (name !== undefined && task.name !== name) throw new Error('Game check belongs to a different project');
127
129
  const { project,engine } = await projects.describe(task.name);
128
130
  await leases.acquire(task.name);
129
- if (task.result.engine && task.result.engine !== engine) throw new Error('验收后游戏引擎已变更,请重新验收当前游戏。');
130
- if (tasks.busy(task.name)) throw new Error('当前游戏还有任务在运行,请等待任务完成后继续。');
131
- if (!resumeUpload && task.result.source !== await fingerprint(project)) throw new Error('验收后游戏文件已变更,请重新验收当前游戏。');
131
+ if (task.result.engine && task.result.engine !== engine) throw new Error('Game engine changed since verification');
132
+ if (tasks.busy(task.name) || (!resumeUpload && task.result.source !== await fingerprint(project))) throw new Error('Game changed since verification; check again');
132
133
  return { task, project };
133
134
  }
134
135
  server.setRequestHandler(CallToolRequestSchema,async request=>{
@@ -151,10 +152,11 @@ server.setRequestHandler(CallToolRequestSchema,async request=>{
151
152
  let result;
152
153
  switch (definition.name) {
153
154
  case 'craft_game_info': {
154
- const project = args.name ? await projects.describe(args.name) : undefined;
155
+ const project = args.name ? await projects.describe(args.name,{allowUnbound:true}) : undefined;
155
156
  if (project && args.engine && args.engine !== project.engine) throw new Error('Project engine is fixed to ' + project.engine);
156
- const selected = engines[project?.engine ?? args.engine];
157
- result = { version, workspace:root, platform:platform.base, engine:selected?.engine ?? null, supported_engines:Object.keys(engines),
157
+ const selected = project ? (project.context_binding.status === 'bound' ? await projects.resourcesFor(project) : undefined) : args.engine ? await loadEngineResource(resources,args.engine,engines[args.engine].bundle.id) : undefined;
158
+ result = { version, host, workspace:root, workspace_layout:'<workspace>/<name>', platform:platform.base, engine:project?.engine ?? selected?.engine ?? null, supported_engines:Object.keys(engines),
159
+ context_binding:project?.context_binding,
158
160
  project:project?.project, preview:project ? await previews.status(project.project) : undefined,
159
161
  llm:'external AI IDE host', images:'Craft platform', aigc:assetCapabilities(selected?.engine),library:libraryCapabilities(selected?.engine),publishing:true,draft_upload:true,
160
162
  publication:{ local_page:true,open_tool:'craft_game_publish_open',requires:'Open the independent local page to preview the frozen build and confirm its exact reviewed materials; platform publish_enabled and ACE gates',material_visibility:'public_on_upload' },
@@ -164,8 +166,8 @@ server.setRequestHandler(CallToolRequestSchema,async request=>{
164
166
  case 'craft_game_prepare': result = await tasks.start(args.name,'prepare',async signal=>{
165
167
  const project = await projects.prepare(args.name,args.engine,signal);
166
168
  await installProjectDependencies(project.project,undefined,signal);
167
- const selected = engines[project.engine];
168
- return { ...project, instructions:selected.instructions, context:selected.context, next:'Read the selected engine AGENTS.md and follow its relevant skills and user requirements for asset-source and presentation decisions. Implement gameplay, use resource tools when required by that plan, check, review and deliver.' };
169
+ const selected = await projects.resourcesFor(project);
170
+ return { ...project, workspace:root, instructions:selected.instructions, context:selected.context, next:'Open project as the host working directory. Read context.workflow, context.engine.entrypoint and context.engine.skills_index. Select skills by their descriptions and read their entrypoints relative to context.engine.directory. The project AGENTS.md and native craft-project skill restore this pinned context in later sessions. Implement, check, review and deliver.' };
169
171
  }); break;
170
172
  case 'craft_assets_generate': {
171
173
  const inputs=generationInputs(args);
@@ -199,8 +201,9 @@ server.setRequestHandler(CallToolRequestSchema,async request=>{
199
201
  }
200
202
  case 'craft_game_check': {
201
203
  validateSteps(args.steps);
202
- const { project,engine } = await projects.describe(args.name);
203
- const selected = {...resourcePaths,engine,context:engines[engine].context.engine.directory};
204
+ const description = await projects.describe(args.name), {project,engine} = description;
205
+ const bound = await projects.resourcesFor(description);
206
+ const selected = {...resourcePaths,engine,context:bound.context.engine.directory};
204
207
  result = await tasks.start(args.name,'check',signal=>checkGame(project,selected,args.brief,args.steps,signal)); break;
205
208
  }
206
209
  case 'craft_task_status': result = viewTask(await tasks.get(args.task_id,args.wait_ms ?? 15000)); break;
@@ -7,18 +7,25 @@ import { atomicJson } from '../game-workflow/request-store.mjs';
7
7
 
8
8
  // Executed by the external host terminal, never by the MCP server.
9
9
  const run=process.argv[2];
10
+ const managed=process.argv[3]==='--managed';
10
11
  try {
11
12
  if(!run || !path.isAbsolute(run))throw new Error('Pass the absolute preview launch directory');
13
+ if(process.argv[3] && !managed)throw new Error('Unknown preview launch mode');
12
14
  await writeFile(path.join(run,'stderr.log'),'',{flag:'a',mode:0o600});
13
15
  const env={PATH:path.dirname(process.execPath)};
14
16
  for(const name of ['SystemRoot','WINDIR','TEMP','TMP'])if(process.env[name])env[name]=process.env[name];
15
17
  const child=spawn(process.execPath,[fileURLToPath(new URL('./preview-worker.mjs',import.meta.url)),run],{
16
- cwd:run,detached:true,windowsHide:true,stdio:'ignore',env,
18
+ cwd:run,detached:!managed,windowsHide:true,stdio:'ignore',env,
17
19
  });
18
- await once(child,'spawn');child.unref();
20
+ const closed=managed ? once(child,'exit') : null;
21
+ await once(child,'spawn');
22
+ if(!managed)child.unref();
23
+ // Keep the host's background task alive; WorkBuddy reclaims descendants when its terminal task exits.
24
+ if(managed)for(const signal of ['SIGINT','SIGTERM'])process.once(signal,()=>child.kill(signal));
19
25
  const receipt=JSON.stringify({status:'starting',pid:child.pid,next:'Poll craft_game_info(name).preview and verify its snapshot before reporting a URL.'})+'\n';
20
26
  await writeFile(path.join(run,'stdout.log'),receipt,{flag:'a',mode:0o600});
21
27
  process.stdout.write(receipt);
28
+ if(managed){const [code]=await closed;process.exitCode=code ?? 1;}
22
29
  } catch(error) {
23
30
  const message=String(error.message).slice(0,2000);
24
31
  if(run&&path.isAbsolute(run))await atomicJson(path.join(run,'error.json'),{message}).catch(()=>{});
@@ -2,11 +2,11 @@ import path from 'node:path';
2
2
  import { fileURLToPath } from 'node:url';
3
3
 
4
4
  export function hostStart(run) {
5
- const command=process.execPath,args=[fileURLToPath(new URL('./preview-launcher.mjs',import.meta.url)),run];
5
+ const command=process.execPath,args=[fileURLToPath(new URL('./preview-launcher.mjs',import.meta.url)),run,'--managed'];
6
6
  const stdout=path.join(run,'stdout.log'),stderr=path.join(run,'stderr.log');
7
7
  const quote=value=>"'"+value.replaceAll("'",process.platform==='win32'?"''":"'\\''")+"'";
8
8
  const script=(process.platform==='win32'?'& ':'')+[command,...args].map(quote).join(' ');
9
9
  return {command,args,cwd:run,background:true,shell:process.platform==='win32'?'powershell':'sh',script,
10
10
  logs:{stdout,stderr,events:path.join(run,'events.jsonl')},
11
- next:'Run this command with the external host terminal tool, then poll craft_game_info(name).preview until running=true and its snapshot matches this delivery. Verify the page before reporting its live URL. The host may reclaim the process; use this command again if it stops.'};
11
+ next:'Run this long-lived command in a host background terminal and keep that task alive. Do not wait for terminal completion before polling craft_game_info(name).preview until running=true and its snapshot matches this delivery. Verify the page before reporting its live URL. Stopping the terminal may stop the preview; use this command again if needed.'};
12
12
  }
@@ -2,25 +2,25 @@ const idPattern = /^[a-zA-Z0-9_-]{1,128}$/;
2
2
  const hashPattern = /^[0-9a-f]{64}$/;
3
3
 
4
4
  function identifier(value) {
5
- if (typeof value !== 'string' || !idPattern.test(value)) throw new Error('发布记录标识无效。请重新打开发布页。');
5
+ if (typeof value !== 'string' || !idPattern.test(value)) throw new Error('Invalid publication identifier');
6
6
  return value;
7
7
  }
8
8
 
9
9
  function imageURL(value, token, base) {
10
- if (typeof value !== 'string' || value.includes(token)) throw new Error('平台返回的发布图片地址无效。');
10
+ if (typeof value !== 'string' || value.includes(token)) throw new Error('Invalid publication image URL');
11
11
  const url = new URL(value);
12
12
  if (url.username || url.password || url.hash || url.search ||
13
13
  (url.protocol !== 'https:' && !(url.protocol === 'http:' && new URL(base).hostname === '127.0.0.1' && url.hostname === '127.0.0.1'))) {
14
- throw new Error('平台返回的发布图片地址无效。');
14
+ throw new Error('Invalid publication image URL');
15
15
  }
16
16
  return url.href;
17
17
  }
18
18
 
19
19
  function previousPublication(data, conversationId, owner, token, base) {
20
- if (!data || typeof data !== 'object' || !Object.hasOwn(data,'share_info')) throw new Error('无法读取上次发布资料。请刷新进度后重试。');
20
+ if (!data || typeof data !== 'object' || !Object.hasOwn(data,'share_info')) throw new Error('Invalid publication history response');
21
21
  const previous = data.share_info;
22
22
  if (previous === null) return;
23
- if (previous?.conversation_id !== conversationId || previous.user_id !== owner) throw new Error('上次发布资料与当前项目或账号不一致。请重新打开对应的发布页。');
23
+ if (previous?.conversation_id !== conversationId || previous.user_id !== owner) throw new Error('Publication history belongs to a different project or account');
24
24
  if (!['share_completed','share_delisted'].includes(previous.status)) return;
25
25
 
26
26
  const text = value => typeof value === 'string' && !value.includes(token) ? value : '';
@@ -28,23 +28,23 @@ function previousPublication(data, conversationId, owner, token, base) {
28
28
  let tags, cover;
29
29
  try { tags = JSON.parse(previous.game_tags); } catch { /* Old releases may have no category metadata. */ }
30
30
  try { cover = imageURL(previous.cover_image_cos,token,base); } catch { /* Legacy covers may be unavailable. */ }
31
- return { conversation_id:conversationId,version_id:identifier(previous.version_id),published:previous.status === 'share_completed',
31
+ return { conversation_id:conversationId,version_id:identifier(previous.version_id),
32
32
  materials:{ game_name:text(previous.game_name),instructions:text(previous.instructions),game_type:text(tags?.game_type),
33
33
  art_styles:list(tags?.art_styles),play_tags:list(Array.isArray(tags) ? tags : tags?.play_tags) },
34
34
  ...(cover ? { cover_url:cover } : {}),cover_image_source:previous.cover_image_source === 1 ? 1 : 2 };
35
35
  }
36
36
 
37
37
  export function publicationSession({ base, token, owner, current, http }) {
38
- if (new URL(base).pathname !== '/') throw new Error('Craft 平台地址格式无效,请检查 MCP 的平台配置。');
38
+ if (new URL(base).pathname !== '/') throw new Error('Publication requires a Craft platform origin');
39
39
  return async (kind, options = {}, signal) => {
40
- if (!current()) throw new Error('Craft 登录账号已变更,请重新打开发布页。');
40
+ if (!current()) throw new Error('Craft account changed');
41
41
  let endpoint, method = 'GET', body, form;
42
42
  if (kind === 'options') endpoint = '/api/ms/gamemeta/game-style';
43
43
  else if (kind === 'image') {
44
44
  const { image, conversation_id, version_id, external_manifest_sha256, purpose } = options;
45
45
  if (!['cover','screenshot','audit-shot'].includes(purpose) || !hashPattern.test(external_manifest_sha256) ||
46
46
  !Buffer.isBuffer(image?.data) || !image.data.length || image.data.length > 2 * 1024 * 1024 ||
47
- !['png','jpg'].includes(image.extension)) throw new Error('发布图片格式无效或超过 2 MiB,请重新选择图片或采集截图。');
47
+ !['png','jpg'].includes(image.extension)) throw new Error('Invalid publication image');
48
48
  endpoint = '/api/ms/versions/share-cover'; method = 'POST';
49
49
  form = new FormData();
50
50
  for (const [key,value] of Object.entries({ conversation_id:identifier(conversation_id), version_id:identifier(version_id), external_manifest_sha256, purpose })) form.set(key,value);
@@ -52,25 +52,25 @@ export function publicationSession({ base, token, owner, current, http }) {
52
52
  } else if (kind === 'submit') {
53
53
  endpoint = '/api/ms/versions/share'; method = 'POST'; body = options.input;
54
54
  identifier(body?.client_request_id); identifier(body?.conversation_id); identifier(body?.version_id);
55
- if (!hashPattern.test(body.external_manifest_sha256)) throw new Error('发布版本缺少有效的构建校验值。请回到 WorkBuddy 核对验收结果。');
55
+ if (!hashPattern.test(body.external_manifest_sha256)) throw new Error('Invalid publication manifest');
56
56
  } else if (kind === 'status') endpoint = `/api/ms/versions/${identifier(options.version_id)}/detail`;
57
57
  else if (kind === 'previous') endpoint = `/api/ms/conversations/${identifier(options.conversation_id)}/publish-context`;
58
- else throw new Error('无法识别此发布操作。请刷新页面后重试。');
58
+ else throw new Error('Unknown publication operation');
59
59
  const data = await http(endpoint,method,body,signal,{ form,draft:true,businessErrors:true,bare:kind === 'options' });
60
- if (!current()) throw new Error('发布期间 Craft 登录账号已变更,请重新打开发布页。');
60
+ if (!current()) throw new Error('Craft account changed during publication');
61
61
  if (kind === 'options') {
62
- if (!data || typeof data !== 'object' || Array.isArray(data)) throw new Error('无法读取游戏分类,请刷新进度后重试。');
62
+ if (!data || typeof data !== 'object' || Array.isArray(data)) throw new Error('Invalid publication category response');
63
63
  const result = {};
64
64
  for (const key of ['game_types','art_styles','play_tags']) {
65
- if (!data || !Object.hasOwn(data,key)) throw new Error('无法读取游戏分类,请刷新进度后重试。');
65
+ if (!data || !Object.hasOwn(data,key)) throw new Error('Invalid publication category response');
66
66
  const values = data[key] ?? [];
67
- if (!Array.isArray(values) || values.length > 200 || values.some(item=>typeof item !== 'string' || item.length > 100 || item.includes(token))) throw new Error('无法读取游戏分类,请刷新进度后重试。');
67
+ if (!Array.isArray(values) || values.length > 200 || values.some(item=>typeof item !== 'string' || item.length > 100 || item.includes(token))) throw new Error('Invalid publication category response');
68
68
  result[key] = values;
69
69
  }
70
70
  return result;
71
71
  }
72
72
  if (kind === 'image') {
73
- if (!hashPattern.test(data?.sha256) || data.bytes !== options.image.data.length) throw new Error('平台返回的图片上传回执不完整。请先刷新进度。');
73
+ if (!hashPattern.test(data?.sha256) || data.bytes !== options.image.data.length) throw new Error('Invalid publication material receipt');
74
74
  return { cover_url:imageURL(data.cover_url,token,base),material_id:identifier(data.material_id),sha256:data.sha256,bytes:data.bytes };
75
75
  }
76
76
  if (kind === 'submit') return { accepted:true };
@@ -79,7 +79,7 @@ export function publicationSession({ base, token, owner, current, http }) {
79
79
  if (!publication) return { state:'not_submitted', version_id:options.version_id };
80
80
  if (publication.version_id !== options.version_id || !hashPattern.test(publication.external_manifest_sha256) ||
81
81
  !hashPattern.test(publication.request_sha256) || typeof publication.status !== 'string' || !/^[a-z_]{1,48}$/.test(publication.status)) {
82
- throw new Error('平台返回的发布状态无效。请刷新进度后重试。');
82
+ throw new Error('Invalid publication status response');
83
83
  }
84
84
  const result = { client_request_id:identifier(publication.client_request_id),request_sha256:publication.request_sha256,
85
85
  external_manifest_sha256:publication.external_manifest_sha256,version_id:publication.version_id,
@@ -87,13 +87,13 @@ export function publicationSession({ base, token, owner, current, http }) {
87
87
  status_reason:typeof publication.status_reason === 'string' ? publication.status_reason.split(token).join('[REDACTED]').slice(0,1000) : '' };
88
88
  if (publication.finalization_retry_required !== undefined) {
89
89
  if (typeof publication.finalization_retry_required !== 'boolean' ||
90
- (publication.finalization_retry_required && result.state !== 'sharing')) throw new Error('平台返回的发布收尾状态无效。请刷新进度后重试。');
90
+ (publication.finalization_retry_required && result.state !== 'sharing')) throw new Error('Invalid publication finalization state');
91
91
  result.finalization_retry_required = publication.finalization_retry_required;
92
92
  }
93
93
  if (publication.public_url !== undefined && publication.public_url !== '') {
94
94
  const url = new URL(publication.public_url);
95
95
  if (result.state !== 'share_completed' || publication.published_version_id !== options.version_id ||
96
- url.origin !== new URL(base).origin || url.username || url.password || publication.public_url.includes(token)) throw new Error('公开链接与已发布版本不一致。请在 Craft 平台查看该版本。');
96
+ url.origin !== new URL(base).origin || url.username || url.password || publication.public_url.includes(token)) throw new Error('Publication URL does not match the completed version');
97
97
  result.public_url = url.href;
98
98
  }
99
99
  return result;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@craft_eco/craft-mcp",
3
- "version": "0.1.25",
3
+ "version": "0.1.26",
4
4
  "type": "module",
5
5
  "engines": {
6
6
  "node": ">=22.12.0"
@@ -12,10 +12,16 @@
12
12
  "@modelcontextprotocol/sdk": "1.32.1",
13
13
  "playwright": "1.63.0",
14
14
  "proper-lockfile": "4.1.2",
15
+ "smol-toml": "1.9.1",
16
+ "yaml": "2.8.1",
15
17
  "@vscode/ripgrep": "^1.18.0",
16
18
  "ws": "^8.21.3"
17
19
  },
18
20
  "description": "Craft 2D/Phaser and 3D/Three.js game-making MCP for AI IDEs supporting stdio",
21
+ "repository": {
22
+ "type": "git",
23
+ "url": "https://git.woa.com/EcoGame/WXUP/WXUPAgent/CraftCli.git"
24
+ },
19
25
  "bin": {
20
26
  "craft-mcp": "bin/craft-mcp.mjs"
21
27
  },
@@ -32,5 +38,7 @@
32
38
  "registry": "https://registry.npmjs.org/",
33
39
  "access": "public"
34
40
  },
35
- "craftDefaultPlatform": "https://pre.craft.qq.com"
41
+ "craft": {
42
+ "platform": "https://test.craft.qq.com"
43
+ }
36
44
  }