@playdrop/playdrop-cli 0.16.16 → 0.17.0

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 (363) hide show
  1. package/config/client-meta.json +4 -4
  2. package/dist/apiClient.d.ts +1 -2
  3. package/dist/apiClient.js +1 -16
  4. package/dist/appUrls.js +4 -0
  5. package/dist/apps/build.d.ts +12 -4
  6. package/dist/apps/build.js +55 -22
  7. package/dist/apps/index.d.ts +2 -1
  8. package/dist/apps/index.js +4 -1
  9. package/dist/apps/loadCheck.d.ts +5 -1
  10. package/dist/apps/loadCheck.js +52 -18
  11. package/dist/apps/serverBuild.d.ts +17 -0
  12. package/dist/apps/serverBuild.js +155 -0
  13. package/dist/apps/staticHtml.d.ts +1 -0
  14. package/dist/apps/staticHtml.js +19 -10
  15. package/dist/apps/upload.d.ts +12 -2
  16. package/dist/apps/upload.js +127 -46
  17. package/dist/catalogue.d.ts +23 -1
  18. package/dist/catalogue.js +126 -100
  19. package/dist/commandContext.d.ts +6 -3
  20. package/dist/commandContext.js +108 -18
  21. package/dist/commands/build.js +0 -7
  22. package/dist/commands/captureListing.d.ts +3 -0
  23. package/dist/commands/captureListing.js +48 -4
  24. package/dist/commands/chat.d.ts +4 -0
  25. package/dist/commands/chat.js +133 -8
  26. package/dist/commands/check.js +34 -1
  27. package/dist/commands/create.js +30 -263
  28. package/dist/commands/dev.js +37 -3
  29. package/dist/commands/devBrowser.js +2 -2
  30. package/dist/commands/devGameServer.d.ts +16 -0
  31. package/dist/commands/devGameServer.js +237 -0
  32. package/dist/commands/devRuntimeAssets.d.ts +1 -0
  33. package/dist/commands/devRuntimeAssets.js +2 -0
  34. package/dist/commands/devServer.d.ts +3 -0
  35. package/dist/commands/devServer.js +111 -5
  36. package/dist/commands/generation.d.ts +33 -4
  37. package/dist/commands/generation.js +304 -115
  38. package/dist/commands/login.js +23 -7
  39. package/dist/commands/review.d.ts +1 -1
  40. package/dist/commands/review.js +68 -95
  41. package/dist/commands/source.d.ts +19 -0
  42. package/dist/commands/source.js +142 -0
  43. package/dist/commands/tweaks.js +5 -11
  44. package/dist/commands/upload-content.d.ts +1 -1
  45. package/dist/commands/upload-content.js +16 -12
  46. package/dist/commands/upload.d.ts +17 -1
  47. package/dist/commands/upload.js +47 -10
  48. package/dist/commands/worker/archive-staging.d.ts +1 -0
  49. package/dist/commands/worker/archive-staging.js +13 -2
  50. package/dist/commands/worker/e2e-fixtures.d.ts +32 -0
  51. package/dist/commands/worker/e2e-fixtures.js +466 -0
  52. package/dist/commands/worker/game-server-infra.d.ts +80 -0
  53. package/dist/commands/worker/game-server-infra.js +595 -0
  54. package/dist/commands/worker/game-source-git.d.ts +126 -0
  55. package/dist/commands/worker/game-source-git.js +780 -0
  56. package/dist/commands/worker/generation.d.ts +94 -0
  57. package/dist/commands/worker/generation.js +1458 -0
  58. package/dist/commands/worker/runtime.d.ts +8 -10
  59. package/dist/commands/worker/runtime.js +51 -45
  60. package/dist/commands/worker.d.ts +79 -19
  61. package/dist/commands/worker.js +1796 -419
  62. package/dist/config.d.ts +2 -0
  63. package/dist/config.js +16 -3
  64. package/dist/environment.d.ts +0 -1
  65. package/dist/environment.js +0 -8
  66. package/dist/index.js +92 -13
  67. package/dist/workerAppProject.d.ts +1 -1
  68. package/dist/workerAppProject.js +15 -2
  69. package/node_modules/@playdrop/api-client/dist/client.d.ts +72 -25
  70. package/node_modules/@playdrop/api-client/dist/client.d.ts.map +1 -1
  71. package/node_modules/@playdrop/api-client/dist/client.js +33 -0
  72. package/node_modules/@playdrop/api-client/dist/core/request.d.ts +1 -0
  73. package/node_modules/@playdrop/api-client/dist/core/request.d.ts.map +1 -1
  74. package/node_modules/@playdrop/api-client/dist/core/request.js +17 -11
  75. package/node_modules/@playdrop/api-client/dist/domains/agent-tasks.d.ts +51 -6
  76. package/node_modules/@playdrop/api-client/dist/domains/agent-tasks.d.ts.map +1 -1
  77. package/node_modules/@playdrop/api-client/dist/domains/agent-tasks.js +338 -41
  78. package/node_modules/@playdrop/api-client/dist/domains/ai.d.ts +24 -1
  79. package/node_modules/@playdrop/api-client/dist/domains/ai.d.ts.map +1 -1
  80. package/node_modules/@playdrop/api-client/dist/domains/ai.js +20 -0
  81. package/node_modules/@playdrop/api-client/dist/domains/apps.d.ts +13 -8
  82. package/node_modules/@playdrop/api-client/dist/domains/apps.d.ts.map +1 -1
  83. package/node_modules/@playdrop/api-client/dist/domains/apps.js +158 -90
  84. package/node_modules/@playdrop/api-client/dist/domains/assets.d.ts +4 -0
  85. package/node_modules/@playdrop/api-client/dist/domains/assets.d.ts.map +1 -1
  86. package/node_modules/@playdrop/api-client/dist/domains/assets.js +27 -0
  87. package/node_modules/@playdrop/api-client/dist/domains/chat.d.ts +35 -3
  88. package/node_modules/@playdrop/api-client/dist/domains/chat.d.ts.map +1 -1
  89. package/node_modules/@playdrop/api-client/dist/domains/chat.js +89 -7
  90. package/node_modules/@playdrop/api-client/dist/domains/player-meta.d.ts +2 -1
  91. package/node_modules/@playdrop/api-client/dist/domains/player-meta.d.ts.map +1 -1
  92. package/node_modules/@playdrop/api-client/dist/domains/player-meta.js +9 -0
  93. package/node_modules/@playdrop/api-client/dist/domains/playtrade.d.ts +1 -2
  94. package/node_modules/@playdrop/api-client/dist/domains/playtrade.d.ts.map +1 -1
  95. package/node_modules/@playdrop/api-client/dist/domains/playtrade.js +0 -11
  96. package/node_modules/@playdrop/api-client/dist/domains/social.d.ts +29 -0
  97. package/node_modules/@playdrop/api-client/dist/domains/social.d.ts.map +1 -0
  98. package/node_modules/@playdrop/api-client/dist/domains/social.js +79 -0
  99. package/node_modules/@playdrop/api-client/dist/index.d.ts +80 -29
  100. package/node_modules/@playdrop/api-client/dist/index.d.ts.map +1 -1
  101. package/node_modules/@playdrop/api-client/dist/index.js +217 -56
  102. package/node_modules/@playdrop/api-client/dist/runtime.d.ts +18 -0
  103. package/node_modules/@playdrop/api-client/dist/runtime.d.ts.map +1 -0
  104. package/node_modules/@playdrop/api-client/dist/runtime.js +54 -0
  105. package/node_modules/@playdrop/api-client/package.json +7 -0
  106. package/node_modules/@playdrop/config/client-meta.json +4 -4
  107. package/node_modules/@playdrop/config/dist/src/creator-plans.d.ts +11 -0
  108. package/node_modules/@playdrop/config/dist/src/creator-plans.d.ts.map +1 -1
  109. package/node_modules/@playdrop/config/dist/src/creator-plans.js +13 -1
  110. package/node_modules/@playdrop/config/dist/src/deployment.d.ts +0 -1
  111. package/node_modules/@playdrop/config/dist/src/deployment.d.ts.map +1 -1
  112. package/node_modules/@playdrop/config/dist/src/deployment.js +0 -8
  113. package/node_modules/@playdrop/config/dist/src/public-deployment.d.ts +0 -1
  114. package/node_modules/@playdrop/config/dist/src/public-deployment.d.ts.map +1 -1
  115. package/node_modules/@playdrop/config/dist/src/public-deployment.js +0 -8
  116. package/node_modules/@playdrop/config/dist/src/runtime-service-origins.d.ts +1 -1
  117. package/node_modules/@playdrop/config/dist/src/runtime-service-origins.js +2 -2
  118. package/node_modules/@playdrop/config/dist/src/server/logging.d.ts.map +1 -1
  119. package/node_modules/@playdrop/config/dist/src/server/logging.js +31 -2
  120. package/node_modules/@playdrop/config/dist/test/creator-plans.test.js +10 -0
  121. package/node_modules/@playdrop/config/dist/test/deployment.test.js +0 -4
  122. package/node_modules/@playdrop/config/dist/test/runtime-service-origins.test.js +2 -0
  123. package/node_modules/@playdrop/config/dist/tsconfig.tsbuildinfo +1 -1
  124. package/node_modules/@playdrop/config/package.json +6 -0
  125. package/node_modules/@playdrop/game-source-git/dist/src/archive.d.ts +9 -0
  126. package/node_modules/@playdrop/game-source-git/dist/src/archive.d.ts.map +1 -0
  127. package/node_modules/@playdrop/game-source-git/dist/src/archive.js +107 -0
  128. package/node_modules/@playdrop/game-source-git/dist/src/bundle-storage.d.ts +29 -0
  129. package/node_modules/@playdrop/game-source-git/dist/src/bundle-storage.d.ts.map +1 -0
  130. package/node_modules/@playdrop/game-source-git/dist/src/bundle-storage.js +64 -0
  131. package/node_modules/@playdrop/game-source-git/dist/src/export.d.ts +8 -0
  132. package/node_modules/@playdrop/game-source-git/dist/src/export.d.ts.map +1 -0
  133. package/node_modules/@playdrop/game-source-git/dist/src/export.js +25 -0
  134. package/node_modules/@playdrop/game-source-git/dist/src/git.d.ts +39 -0
  135. package/node_modules/@playdrop/game-source-git/dist/src/git.d.ts.map +1 -0
  136. package/node_modules/@playdrop/game-source-git/dist/src/git.js +195 -0
  137. package/node_modules/@playdrop/game-source-git/dist/src/ignore.d.ts +6 -0
  138. package/node_modules/@playdrop/game-source-git/dist/src/ignore.d.ts.map +1 -0
  139. package/node_modules/@playdrop/game-source-git/dist/src/ignore.js +51 -0
  140. package/node_modules/@playdrop/game-source-git/dist/src/index.d.ts +10 -0
  141. package/node_modules/@playdrop/game-source-git/dist/src/index.d.ts.map +1 -0
  142. package/node_modules/@playdrop/{boxel-core/dist/src/humanoid/r15 → game-source-git/dist/src}/index.js +9 -4
  143. package/node_modules/@playdrop/game-source-git/dist/src/lock.d.ts +17 -0
  144. package/node_modules/@playdrop/game-source-git/dist/src/lock.d.ts.map +1 -0
  145. package/node_modules/@playdrop/game-source-git/dist/src/lock.js +72 -0
  146. package/node_modules/@playdrop/game-source-git/dist/src/materialize.d.ts +10 -0
  147. package/node_modules/@playdrop/game-source-git/dist/src/materialize.d.ts.map +1 -0
  148. package/node_modules/@playdrop/game-source-git/dist/src/materialize.js +99 -0
  149. package/node_modules/@playdrop/game-source-git/dist/src/paths.d.ts +24 -0
  150. package/node_modules/@playdrop/game-source-git/dist/src/paths.d.ts.map +1 -0
  151. package/node_modules/@playdrop/game-source-git/dist/src/paths.js +207 -0
  152. package/node_modules/@playdrop/game-source-git/dist/src/repository.d.ts +66 -0
  153. package/node_modules/@playdrop/game-source-git/dist/src/repository.d.ts.map +1 -0
  154. package/node_modules/@playdrop/game-source-git/dist/src/repository.js +213 -0
  155. package/node_modules/@playdrop/game-source-git/dist/test/core.test.d.ts +2 -0
  156. package/node_modules/@playdrop/game-source-git/dist/test/core.test.d.ts.map +1 -0
  157. package/node_modules/@playdrop/game-source-git/dist/test/core.test.js +441 -0
  158. package/node_modules/@playdrop/game-source-git/dist/tsconfig.tsbuildinfo +1 -0
  159. package/node_modules/@playdrop/game-source-git/package.json +28 -0
  160. package/node_modules/@playdrop/types/dist/agent-task-terminal.d.ts +2 -2
  161. package/node_modules/@playdrop/types/dist/agent-task-terminal.d.ts.map +1 -1
  162. package/node_modules/@playdrop/types/dist/agent-task-terminal.js +15 -9
  163. package/node_modules/@playdrop/types/dist/api.d.ts +728 -164
  164. package/node_modules/@playdrop/types/dist/api.d.ts.map +1 -1
  165. package/node_modules/@playdrop/types/dist/api.js +60 -11
  166. package/node_modules/@playdrop/types/dist/asset-pack.d.ts +2 -0
  167. package/node_modules/@playdrop/types/dist/asset-pack.d.ts.map +1 -1
  168. package/node_modules/@playdrop/types/dist/asset.d.ts +22 -8
  169. package/node_modules/@playdrop/types/dist/asset.d.ts.map +1 -1
  170. package/node_modules/@playdrop/types/dist/asset.js +26 -26
  171. package/node_modules/@playdrop/types/dist/chat.d.ts +107 -3
  172. package/node_modules/@playdrop/types/dist/chat.d.ts.map +1 -1
  173. package/node_modules/@playdrop/types/dist/chat.js +33 -4
  174. package/node_modules/@playdrop/types/dist/index.d.ts +3 -0
  175. package/node_modules/@playdrop/types/dist/index.d.ts.map +1 -1
  176. package/node_modules/@playdrop/types/dist/index.js +7 -1
  177. package/node_modules/@playdrop/types/dist/public-cache-tags.d.ts +11 -0
  178. package/node_modules/@playdrop/types/dist/public-cache-tags.d.ts.map +1 -0
  179. package/node_modules/@playdrop/types/dist/public-cache-tags.js +78 -0
  180. package/node_modules/@playdrop/types/dist/realtime.d.ts +3 -15
  181. package/node_modules/@playdrop/types/dist/realtime.d.ts.map +1 -1
  182. package/node_modules/@playdrop/types/dist/social.d.ts +64 -0
  183. package/node_modules/@playdrop/types/dist/social.d.ts.map +1 -0
  184. package/node_modules/@playdrop/{boxel-three/dist/src/types.js → types/dist/social.js} +14 -2
  185. package/node_modules/@playdrop/types/dist/spritesheet.d.ts +51 -0
  186. package/node_modules/@playdrop/types/dist/spritesheet.d.ts.map +1 -0
  187. package/node_modules/@playdrop/types/dist/spritesheet.js +73 -0
  188. package/node_modules/@playdrop/types/dist/version.d.ts +86 -58
  189. package/node_modules/@playdrop/types/dist/version.d.ts.map +1 -1
  190. package/node_modules/@playdrop/types/dist/version.js +111 -0
  191. package/node_modules/@playdrop/types/package.json +14 -0
  192. package/node_modules/@playdrop/vox-three/dist/src/index.d.ts +1 -1
  193. package/node_modules/@playdrop/vox-three/dist/src/index.js +1 -1
  194. package/node_modules/@playdrop/vox-three/dist/src/index.js.map +1 -1
  195. package/node_modules/@playdrop/vox-three/dist/src/vox.d.ts +0 -3
  196. package/node_modules/@playdrop/vox-three/dist/src/vox.js +0 -110
  197. package/node_modules/@playdrop/vox-three/dist/src/vox.js.map +1 -1
  198. package/node_modules/@playdrop/vox-three/dist/test/vox.test.js +0 -18
  199. package/node_modules/@playdrop/vox-three/dist/test/vox.test.js.map +1 -1
  200. package/node_modules/@playdrop/vox-three/package.json +8 -4
  201. package/package.json +9 -11
  202. package/dist/assets/model-artifacts.d.ts +0 -8
  203. package/dist/assets/model-artifacts.js +0 -382
  204. package/dist/assets/model-worker.d.ts +0 -22
  205. package/dist/assets/model-worker.js +0 -123
  206. package/node_modules/@playdrop/ai-client/dist/index.d.ts +0 -441
  207. package/node_modules/@playdrop/ai-client/dist/index.d.ts.map +0 -1
  208. package/node_modules/@playdrop/ai-client/dist/index.js +0 -499
  209. package/node_modules/@playdrop/ai-client/package.json +0 -22
  210. package/node_modules/@playdrop/boxel-core/dist/src/entity-cleaner.d.ts +0 -13
  211. package/node_modules/@playdrop/boxel-core/dist/src/entity-cleaner.js +0 -141
  212. package/node_modules/@playdrop/boxel-core/dist/src/entity-cleaner.js.map +0 -1
  213. package/node_modules/@playdrop/boxel-core/dist/src/entity-utils.d.ts +0 -47
  214. package/node_modules/@playdrop/boxel-core/dist/src/entity-utils.js +0 -313
  215. package/node_modules/@playdrop/boxel-core/dist/src/entity-utils.js.map +0 -1
  216. package/node_modules/@playdrop/boxel-core/dist/src/format-utils.d.ts +0 -3
  217. package/node_modules/@playdrop/boxel-core/dist/src/format-utils.js +0 -36
  218. package/node_modules/@playdrop/boxel-core/dist/src/format-utils.js.map +0 -1
  219. package/node_modules/@playdrop/boxel-core/dist/src/humanoid/geometry.d.ts +0 -23
  220. package/node_modules/@playdrop/boxel-core/dist/src/humanoid/geometry.js +0 -11
  221. package/node_modules/@playdrop/boxel-core/dist/src/humanoid/geometry.js.map +0 -1
  222. package/node_modules/@playdrop/boxel-core/dist/src/humanoid/index.d.ts +0 -4
  223. package/node_modules/@playdrop/boxel-core/dist/src/humanoid/index.js +0 -21
  224. package/node_modules/@playdrop/boxel-core/dist/src/humanoid/index.js.map +0 -1
  225. package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r15/common.d.ts +0 -4
  226. package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r15/common.js +0 -24
  227. package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r15/common.js.map +0 -1
  228. package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r15/index.d.ts +0 -3
  229. package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r15/index.js.map +0 -1
  230. package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r15/textured-builder.d.ts +0 -3
  231. package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r15/textured-builder.js +0 -387
  232. package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r15/textured-builder.js.map +0 -1
  233. package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r15/types.d.ts +0 -6
  234. package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r15/types.js +0 -3
  235. package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r15/types.js.map +0 -1
  236. package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r15/voxel-builder.d.ts +0 -3
  237. package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r15/voxel-builder.js +0 -373
  238. package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r15/voxel-builder.js.map +0 -1
  239. package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r6/builder.d.ts +0 -12
  240. package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r6/builder.js +0 -215
  241. package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r6/builder.js.map +0 -1
  242. package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r6/index.d.ts +0 -4
  243. package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r6/index.js +0 -18
  244. package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r6/index.js.map +0 -1
  245. package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r6/scanner.d.ts +0 -42
  246. package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r6/scanner.js +0 -145
  247. package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r6/scanner.js.map +0 -1
  248. package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r6/textures/artifacts.d.ts +0 -26
  249. package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r6/textures/artifacts.js +0 -65
  250. package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r6/textures/artifacts.js.map +0 -1
  251. package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r6/textures/face-map.d.ts +0 -33
  252. package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r6/textures/face-map.js +0 -175
  253. package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r6/textures/face-map.js.map +0 -1
  254. package/node_modules/@playdrop/boxel-core/dist/src/humanoid/templates/humanoid_r15.json +0 -1517
  255. package/node_modules/@playdrop/boxel-core/dist/src/humanoid/templates/humanoid_r6.json +0 -61
  256. package/node_modules/@playdrop/boxel-core/dist/src/humanoid/templates/index.d.ts +0 -10
  257. package/node_modules/@playdrop/boxel-core/dist/src/humanoid/templates/index.js +0 -23
  258. package/node_modules/@playdrop/boxel-core/dist/src/humanoid/templates/index.js.map +0 -1
  259. package/node_modules/@playdrop/boxel-core/dist/src/index.d.ts +0 -19
  260. package/node_modules/@playdrop/boxel-core/dist/src/index.js +0 -36
  261. package/node_modules/@playdrop/boxel-core/dist/src/index.js.map +0 -1
  262. package/node_modules/@playdrop/boxel-core/dist/src/materials.d.ts +0 -26
  263. package/node_modules/@playdrop/boxel-core/dist/src/materials.js +0 -184
  264. package/node_modules/@playdrop/boxel-core/dist/src/materials.js.map +0 -1
  265. package/node_modules/@playdrop/boxel-core/dist/src/palette_tools.d.ts +0 -68
  266. package/node_modules/@playdrop/boxel-core/dist/src/palette_tools.js +0 -488
  267. package/node_modules/@playdrop/boxel-core/dist/src/palette_tools.js.map +0 -1
  268. package/node_modules/@playdrop/boxel-core/dist/src/serialization.d.ts +0 -4
  269. package/node_modules/@playdrop/boxel-core/dist/src/serialization.js +0 -380
  270. package/node_modules/@playdrop/boxel-core/dist/src/serialization.js.map +0 -1
  271. package/node_modules/@playdrop/boxel-core/dist/src/textures.d.ts +0 -29
  272. package/node_modules/@playdrop/boxel-core/dist/src/textures.js +0 -208
  273. package/node_modules/@playdrop/boxel-core/dist/src/textures.js.map +0 -1
  274. package/node_modules/@playdrop/boxel-core/dist/src/transforms/textured-boxes/infer-face.d.ts +0 -9
  275. package/node_modules/@playdrop/boxel-core/dist/src/transforms/textured-boxes/infer-face.js +0 -312
  276. package/node_modules/@playdrop/boxel-core/dist/src/transforms/textured-boxes/infer-face.js.map +0 -1
  277. package/node_modules/@playdrop/boxel-core/dist/src/transforms/textured-boxes/layer-mode.d.ts +0 -9
  278. package/node_modules/@playdrop/boxel-core/dist/src/transforms/textured-boxes/layer-mode.js +0 -154
  279. package/node_modules/@playdrop/boxel-core/dist/src/transforms/textured-boxes/layer-mode.js.map +0 -1
  280. package/node_modules/@playdrop/boxel-core/dist/src/transforms/textured-boxes/merge-overlay.d.ts +0 -2
  281. package/node_modules/@playdrop/boxel-core/dist/src/transforms/textured-boxes/merge-overlay.js +0 -121
  282. package/node_modules/@playdrop/boxel-core/dist/src/transforms/textured-boxes/merge-overlay.js.map +0 -1
  283. package/node_modules/@playdrop/boxel-core/dist/src/transforms/textured-boxes/slice.d.ts +0 -20
  284. package/node_modules/@playdrop/boxel-core/dist/src/transforms/textured-boxes/slice.js +0 -389
  285. package/node_modules/@playdrop/boxel-core/dist/src/transforms/textured-boxes/slice.js.map +0 -1
  286. package/node_modules/@playdrop/boxel-core/dist/src/transforms/upscale.d.ts +0 -3
  287. package/node_modules/@playdrop/boxel-core/dist/src/transforms/upscale.js +0 -206
  288. package/node_modules/@playdrop/boxel-core/dist/src/transforms/upscale.js.map +0 -1
  289. package/node_modules/@playdrop/boxel-core/dist/src/transforms/voxels/slice.d.ts +0 -12
  290. package/node_modules/@playdrop/boxel-core/dist/src/transforms/voxels/slice.js +0 -81
  291. package/node_modules/@playdrop/boxel-core/dist/src/transforms/voxels/slice.js.map +0 -1
  292. package/node_modules/@playdrop/boxel-core/dist/src/transforms/voxels/textured-to-voxel.d.ts +0 -12
  293. package/node_modules/@playdrop/boxel-core/dist/src/transforms/voxels/textured-to-voxel.js +0 -318
  294. package/node_modules/@playdrop/boxel-core/dist/src/transforms/voxels/textured-to-voxel.js.map +0 -1
  295. package/node_modules/@playdrop/boxel-core/dist/src/types.d.ts +0 -168
  296. package/node_modules/@playdrop/boxel-core/dist/src/types.js +0 -3
  297. package/node_modules/@playdrop/boxel-core/dist/src/types.js.map +0 -1
  298. package/node_modules/@playdrop/boxel-core/dist/src/validation.d.ts +0 -24
  299. package/node_modules/@playdrop/boxel-core/dist/src/validation.js +0 -620
  300. package/node_modules/@playdrop/boxel-core/dist/src/validation.js.map +0 -1
  301. package/node_modules/@playdrop/boxel-core/dist/src/voxels/greedy-mesher.d.ts +0 -11
  302. package/node_modules/@playdrop/boxel-core/dist/src/voxels/greedy-mesher.js +0 -135
  303. package/node_modules/@playdrop/boxel-core/dist/src/voxels/greedy-mesher.js.map +0 -1
  304. package/node_modules/@playdrop/boxel-core/dist/src/voxels.d.ts +0 -23
  305. package/node_modules/@playdrop/boxel-core/dist/src/voxels.js +0 -52
  306. package/node_modules/@playdrop/boxel-core/dist/src/voxels.js.map +0 -1
  307. package/node_modules/@playdrop/boxel-core/package.json +0 -19
  308. package/node_modules/@playdrop/boxel-three/dist/src/animations.d.ts +0 -4
  309. package/node_modules/@playdrop/boxel-three/dist/src/animations.js +0 -92
  310. package/node_modules/@playdrop/boxel-three/dist/src/builders.d.ts +0 -8
  311. package/node_modules/@playdrop/boxel-three/dist/src/builders.js +0 -363
  312. package/node_modules/@playdrop/boxel-three/dist/src/context.d.ts +0 -24
  313. package/node_modules/@playdrop/boxel-three/dist/src/context.js +0 -58
  314. package/node_modules/@playdrop/boxel-three/dist/src/exporters/glb.d.ts +0 -100
  315. package/node_modules/@playdrop/boxel-three/dist/src/exporters/glb.js +0 -927
  316. package/node_modules/@playdrop/boxel-three/dist/src/exporters/image.d.ts +0 -18
  317. package/node_modules/@playdrop/boxel-three/dist/src/exporters/image.js +0 -294
  318. package/node_modules/@playdrop/boxel-three/dist/src/index.d.ts +0 -17
  319. package/node_modules/@playdrop/boxel-three/dist/src/index.js +0 -64
  320. package/node_modules/@playdrop/boxel-three/dist/src/instantiate.d.ts +0 -40
  321. package/node_modules/@playdrop/boxel-three/dist/src/instantiate.js +0 -96
  322. package/node_modules/@playdrop/boxel-three/dist/src/nodes.d.ts +0 -8
  323. package/node_modules/@playdrop/boxel-three/dist/src/nodes.js +0 -88
  324. package/node_modules/@playdrop/boxel-three/dist/src/overlays.d.ts +0 -7
  325. package/node_modules/@playdrop/boxel-three/dist/src/overlays.js +0 -123
  326. package/node_modules/@playdrop/boxel-three/dist/src/primitives.d.ts +0 -4
  327. package/node_modules/@playdrop/boxel-three/dist/src/primitives.js +0 -48
  328. package/node_modules/@playdrop/boxel-three/dist/src/scene.d.ts +0 -3
  329. package/node_modules/@playdrop/boxel-three/dist/src/scene.js +0 -168
  330. package/node_modules/@playdrop/boxel-three/dist/src/skinned-mesh.d.ts +0 -29
  331. package/node_modules/@playdrop/boxel-three/dist/src/skinned-mesh.js +0 -623
  332. package/node_modules/@playdrop/boxel-three/dist/src/texture-atlas.d.ts +0 -13
  333. package/node_modules/@playdrop/boxel-three/dist/src/texture-atlas.js +0 -133
  334. package/node_modules/@playdrop/boxel-three/dist/src/textures.d.ts +0 -17
  335. package/node_modules/@playdrop/boxel-three/dist/src/textures.js +0 -216
  336. package/node_modules/@playdrop/boxel-three/dist/src/types.d.ts +0 -112
  337. package/node_modules/@playdrop/boxel-three/dist/src/voxels/faces.d.ts +0 -28
  338. package/node_modules/@playdrop/boxel-three/dist/src/voxels/faces.js +0 -344
  339. package/node_modules/@playdrop/boxel-three/dist/src/voxels/mesher.d.ts +0 -24
  340. package/node_modules/@playdrop/boxel-three/dist/src/voxels/mesher.js +0 -113
  341. package/node_modules/@playdrop/boxel-three/dist/test/export-image.playwright.test.d.ts +0 -1
  342. package/node_modules/@playdrop/boxel-three/dist/test/export-image.playwright.test.js +0 -137
  343. package/node_modules/@playdrop/boxel-three/dist/test/fixtures/render-worker.d.ts +0 -20
  344. package/node_modules/@playdrop/boxel-three/dist/test/fixtures/render-worker.js +0 -85
  345. package/node_modules/@playdrop/boxel-three/dist/test/glb-skinned.test.d.ts +0 -1
  346. package/node_modules/@playdrop/boxel-three/dist/test/glb-skinned.test.js +0 -104
  347. package/node_modules/@playdrop/boxel-three/dist/test/index.test.d.ts +0 -1
  348. package/node_modules/@playdrop/boxel-three/dist/test/index.test.js +0 -30
  349. package/node_modules/@playdrop/boxel-three/dist/test/instantiate.test.d.ts +0 -1
  350. package/node_modules/@playdrop/boxel-three/dist/test/instantiate.test.js +0 -88
  351. package/node_modules/@playdrop/boxel-three/dist/test/overlays.test.d.ts +0 -1
  352. package/node_modules/@playdrop/boxel-three/dist/test/overlays.test.js +0 -42
  353. package/node_modules/@playdrop/boxel-three/dist/test/scene-filter.test.d.ts +0 -1
  354. package/node_modules/@playdrop/boxel-three/dist/test/scene-filter.test.js +0 -73
  355. package/node_modules/@playdrop/boxel-three/dist/test/scene-smoke.test.d.ts +0 -1
  356. package/node_modules/@playdrop/boxel-three/dist/test/scene-smoke.test.js +0 -85
  357. package/node_modules/@playdrop/boxel-three/dist/test/skinned-mesh.test.d.ts +0 -1
  358. package/node_modules/@playdrop/boxel-three/dist/test/skinned-mesh.test.js +0 -73
  359. package/node_modules/@playdrop/boxel-three/dist/test/textured-overlay.test.d.ts +0 -1
  360. package/node_modules/@playdrop/boxel-three/dist/test/textured-overlay.test.js +0 -136
  361. package/node_modules/@playdrop/boxel-three/dist/test/voxels.test.d.ts +0 -1
  362. package/node_modules/@playdrop/boxel-three/dist/test/voxels.test.js +0 -42
  363. package/node_modules/@playdrop/boxel-three/package.json +0 -28
@@ -281,9 +281,6 @@ function buildCatalogueEntry(name, metadata, sourceInfo, relativeFilePath) {
281
281
  if (sourceInfo.templateSlug) {
282
282
  entry.templateSource = sourceInfo.templateSlug;
283
283
  }
284
- if (sourceInfo.remixRef) {
285
- entry.remix = sourceInfo.remixRef;
286
- }
287
284
  return entry;
288
285
  }
289
286
  if (typeof metadata.displayName === "string" && metadata.displayName.trim().length > 0) {
@@ -350,15 +347,6 @@ function buildCatalogueEntry(name, metadata, sourceInfo, relativeFilePath) {
350
347
  else if (sourceInfo.templateSlug) {
351
348
  entry.templateSource = sourceInfo.templateSlug;
352
349
  }
353
- if (Object.prototype.hasOwnProperty.call(metadata, "remix")) {
354
- const remix = metadata.remix;
355
- if (remix === null || typeof remix === "string") {
356
- entry.remix = remix;
357
- }
358
- }
359
- else if (sourceInfo.remixRef) {
360
- entry.remix = sourceInfo.remixRef;
361
- }
362
350
  return entry;
363
351
  }
364
352
  function readCatalogue(path) {
@@ -637,9 +625,6 @@ function updateExtractedProjectCatalogue(name, metadata, projectCataloguePath, s
637
625
  if (sourceInfo.templateSlug) {
638
626
  existing.templateSource = sourceInfo.templateSlug;
639
627
  }
640
- if (sourceInfo.remixRef) {
641
- existing.remix = sourceInfo.remixRef;
642
- }
643
628
  apps[targetIndex] = existing;
644
629
  }
645
630
  const updated = { ...parsed, apps };
@@ -686,45 +671,6 @@ function logProjectCatalogueOutcome(result, name) {
686
671
  }
687
672
  return true;
688
673
  }
689
- function buildPendingExternalRemixTask(name, metadata, sourceInfo, cataloguePath, htmlFilePath) {
690
- const absoluteCataloguePath = (0, node_path_1.resolve)(cataloguePath);
691
- const catalogueDir = (0, node_path_1.dirname)(absoluteCataloguePath);
692
- const absoluteHtmlPath = (0, node_path_1.resolve)(htmlFilePath);
693
- const relativeFilePath = (0, node_path_1.relative)(catalogueDir, absoluteHtmlPath) || `${name}.html`;
694
- const entry = buildCatalogueEntry(name, metadata, sourceInfo, relativeFilePath.replace(/\\/g, "/"));
695
- const surfaceTargets = (0, catalogue_utils_1.parseSurfaceTargets)(entry.surfaceTargets ?? DEFAULT_SURFACE_TARGETS).list;
696
- return {
697
- kind: "app",
698
- name,
699
- cataloguePath: (0, node_path_1.relative)(process.cwd(), absoluteCataloguePath) || CATALOGUE_FILENAME,
700
- catalogueAbsolutePath: absoluteCataloguePath,
701
- catalogueDir,
702
- filePath: absoluteHtmlPath,
703
- relativeFile: entry.file ?? relativeFilePath,
704
- projectDir: (0, node_path_1.dirname)(absoluteHtmlPath),
705
- packageJsonPath: null,
706
- isTypescriptProject: false,
707
- hasValidateScript: false,
708
- hasFormatScript: false,
709
- displayName: entry.displayName,
710
- description: entry.description,
711
- type: typeof entry.type === "string" ? ((0, app_1.parseAppType)(entry.type) ?? undefined) : undefined,
712
- emoji: entry.emoji,
713
- color: entry.color,
714
- surfaceTargets,
715
- assetSpecSupport: [],
716
- tags: [],
717
- missingMetadata: [],
718
- version: entry.version,
719
- remix: typeof entry.remix === "string" ? entry.remix : undefined,
720
- achievements: [],
721
- leaderboards: [],
722
- ownedAssets: [],
723
- license: types_1.DEFAULT_CONTENT_LICENSE,
724
- uses: { assets: [], packs: [] },
725
- graph: { relations: [] },
726
- };
727
- }
728
674
  function logNextSteps(name, options) {
729
675
  console.log("\nNext steps:");
730
676
  if (options.hasCatalogue && options.catalogueLabel) {
@@ -745,19 +691,10 @@ function logNextSteps(name, options) {
745
691
  }
746
692
  console.log(` - The bundled HTML entry point is ${options.entryPointLabel}.`);
747
693
  }
748
- else if (options.externalListingUrl) {
749
- console.log(` - Open the external listing at ${options.externalListingUrl} and fetch the real source yourself.`);
750
- console.log(` - Keep ${options.entryPointLabel} as the app entry point, or update catalogue.json if your source uses a different file.`);
751
- }
752
694
  else {
753
695
  console.log(` - Build your app in ${options.entryPointLabel}.`);
754
696
  }
755
- if (options.externalListingUrl) {
756
- console.log(` - After you add the real source for ${options.entryPointLabel}, test locally with "playdrop project dev ${name}".`);
757
- }
758
- else {
759
- console.log(` - Test locally with "playdrop project dev ${name}".`);
760
- }
697
+ console.log(` - Test locally with "playdrop project dev ${name}".`);
761
698
  if (options.hasCatalogue) {
762
699
  console.log(` - Publish a single app with "playdrop project publish ${name}" or everything in the catalogue with "playdrop project publish .".`);
763
700
  }
@@ -923,115 +860,6 @@ function parseTemplateKey(value) {
923
860
  }
924
861
  return null;
925
862
  }
926
- function parseRemixRef(value) {
927
- const parsed = (0, types_1.parseContentVersionRef)(value);
928
- if (!parsed || parsed.kind !== "app") {
929
- return null;
930
- }
931
- return {
932
- creator: parsed.creatorUsername,
933
- name: parsed.name,
934
- version: parsed.version,
935
- ref: (0, types_1.formatContentVersionRef)(parsed),
936
- };
937
- }
938
- function parseRemixScaffoldResponse(response, version) {
939
- const remixMode = typeof response?.remixMode === "string" ? response.remixMode : "";
940
- const archiveUrl = typeof response?.archiveUrl === "string" && response.archiveUrl.trim().length > 0
941
- ? response.archiveUrl.trim()
942
- : null;
943
- const htmlContent = typeof response?.html === "string" ? response.html : null;
944
- const externalListingUrl = typeof response?.externalListingUrl === "string" && response.externalListingUrl.trim().length > 0
945
- ? response.externalListingUrl.trim()
946
- : null;
947
- const metadata = response.metadata;
948
- const entryPoint = extractEntryPointFromMetadata(metadata);
949
- if (remixMode === "archive") {
950
- if (!archiveUrl) {
951
- throw new Error("Remix response missing archiveUrl");
952
- }
953
- return {
954
- html: null,
955
- metadata,
956
- archiveUrl,
957
- entryPoint,
958
- sourceVersion: version,
959
- };
960
- }
961
- if (remixMode === "inline-html") {
962
- if (!htmlContent) {
963
- throw new Error("Remix response missing html");
964
- }
965
- return {
966
- html: htmlContent,
967
- metadata,
968
- entryPoint,
969
- sourceVersion: null,
970
- };
971
- }
972
- if (remixMode === "external-metadata-only") {
973
- if (!externalListingUrl) {
974
- throw new Error("Remix response missing externalListingUrl");
975
- }
976
- const externalMetadata = parseExternalRemixMetadata(response.metadata);
977
- return {
978
- html: null,
979
- metadata: externalMetadata,
980
- externalListingUrl,
981
- entryPoint,
982
- sourceVersion: null,
983
- };
984
- }
985
- throw new Error(`Unsupported remix mode: ${remixMode || "missing"}`);
986
- }
987
- function parseExternalRemixMetadata(value) {
988
- if (!value || typeof value !== "object" || Array.isArray(value)) {
989
- throw new Error("Remix response missing external metadata");
990
- }
991
- const record = value;
992
- const name = typeof record.name === "string" ? record.name.trim() : "";
993
- const displayName = typeof record.displayName === "string" ? record.displayName.trim() : "";
994
- const description = typeof record.description === "string" ? record.description.trim() : "";
995
- const creatorUsername = typeof record.creatorUsername === "string" ? record.creatorUsername.trim() : "";
996
- const type = (0, app_1.parseAppType)(record.type) ?? "";
997
- const emoji = record.emoji;
998
- const color = record.color;
999
- if (!name || !displayName || !description || !creatorUsername || !type) {
1000
- throw new Error("Remix response missing required external metadata fields");
1001
- }
1002
- if (emoji !== null && typeof emoji !== "string") {
1003
- throw new Error("Remix response has invalid external metadata emoji");
1004
- }
1005
- if (color !== null && typeof color !== "string") {
1006
- throw new Error("Remix response has invalid external metadata color");
1007
- }
1008
- return {
1009
- name,
1010
- displayName,
1011
- description,
1012
- creatorUsername,
1013
- type,
1014
- emoji,
1015
- color,
1016
- surfaceTargets: (0, catalogue_utils_1.parseSurfaceTargets)(record.surfaceTargets).list,
1017
- };
1018
- }
1019
- async function fetchRemixScaffold(client, creator, app, version) {
1020
- try {
1021
- const response = await client.fetchRemixScaffold(creator, app, version);
1022
- return parseRemixScaffoldResponse(response, version);
1023
- }
1024
- catch (unknownError) {
1025
- if (unknownError instanceof types_1.UnsupportedClientError) {
1026
- (0, http_1.handleUnsupportedError)(unknownError, "Remix scaffold");
1027
- }
1028
- if (unknownError instanceof types_1.ApiError) {
1029
- const detail = unknownError.message?.trim();
1030
- throw new Error(detail || `status ${unknownError.status}`);
1031
- }
1032
- throw unknownError;
1033
- }
1034
- }
1035
863
  async function resolveAuthenticatedCreatorUsername(ctx) {
1036
864
  const workspaceOwnerUsername = ctx.workspaceAuth?.config.ownerUsername?.trim() ?? "";
1037
865
  if (workspaceOwnerUsername) {
@@ -1091,12 +919,15 @@ function describeInitSummary(summary) {
1091
919
  return `Project bootstrap recap: ${parts.join("; ")}.`;
1092
920
  }
1093
921
  async function create(name, options = {}) {
922
+ const gameSourceGitRoot = process.env.PLAYDROP_GAME_SOURCE_GIT_ROOT === "1";
1094
923
  const file = (0, node_path_1.resolve)(`${name}.html`);
1095
- const projectDirCandidate = (0, node_path_1.resolve)(name);
924
+ const projectDirCandidate = gameSourceGitRoot ? (0, node_path_1.resolve)(".") : (0, node_path_1.resolve)(name);
1096
925
  const templateOptionRaw = options.template?.trim();
1097
926
  const remixOptionRaw = options.remix?.trim();
927
+ if (remixOptionRaw) {
928
+ throw new Error("playdrop_cloud_remix_only");
929
+ }
1098
930
  let parsedTemplate = null;
1099
- let parsedRemix = null;
1100
931
  const existingLookup = (0, catalogue_1.resolveCatalogueEntries)(process.cwd(), { filterName: name });
1101
932
  if (existingLookup.errors.length > 0) {
1102
933
  for (const error of existingLookup.errors) {
@@ -1114,43 +945,21 @@ async function create(name, options = {}) {
1114
945
  return;
1115
946
  }
1116
947
  const existingTask = existingLookup.apps.length === 1 ? existingLookup.apps[0] : null;
1117
- if (templateOptionRaw && remixOptionRaw) {
1118
- (0, messages_1.printErrorWithHelp)("Cannot use --template and --remix at the same time.", [
1119
- 'Choose one source: use "--remix app:creator/name@1.2.3" to remix an app version, or "--template {creator}/template/{name}" to start from a template.',
1120
- ], { command: "project create app" });
1121
- process.exitCode = 1;
1122
- return;
1123
- }
1124
- const reuseExistingApp = existingTask !== null && !templateOptionRaw && !remixOptionRaw;
1125
- if (!reuseExistingApp && ((0, node_fs_1.existsSync)(file) || (0, node_fs_1.existsSync)(projectDirCandidate))) {
948
+ const reuseExistingApp = existingTask !== null && (!templateOptionRaw || gameSourceGitRoot);
949
+ if (!reuseExistingApp && ((0, node_fs_1.existsSync)(file) || (!gameSourceGitRoot && (0, node_fs_1.existsSync)(projectDirCandidate)))) {
1126
950
  (0, messages_1.printErrorWithHelp)(`Cannot create ${name} because a file or directory with that name already exists.`, ['Choose a different app name or remove the existing file before running "playdrop project create app" again.'], { command: "project create app" });
1127
951
  process.exitCode = 1;
1128
952
  return;
1129
953
  }
1130
- if (!templateOptionRaw && !remixOptionRaw) {
954
+ if (!templateOptionRaw) {
1131
955
  if (!reuseExistingApp) {
1132
- (0, messages_1.printErrorWithHelp)("Specify either --template or --remix when creating an app.", [
1133
- 'Use "playdrop browse --kind app --app-type template" to discover available templates.',
1134
- 'Browse https://playdrop.ai, pick an app version, and pass its canonical ref with "--remix app:creator/name@1.2.3".',
1135
- ], { command: "project create app" });
956
+ (0, messages_1.printErrorWithHelp)("Specify --template when creating a local app.", ['Use "playdrop browse --kind app --app-type template" to discover available templates.'], { command: "project create app" });
1136
957
  process.exitCode = 1;
1137
958
  return;
1138
959
  }
1139
960
  }
1140
961
  const templateOption = templateOptionRaw || undefined;
1141
- const remixOption = remixOptionRaw || undefined;
1142
- if (!reuseExistingApp && remixOption) {
1143
- parsedRemix = parseRemixRef(remixOption);
1144
- if (!parsedRemix) {
1145
- (0, messages_1.printErrorWithHelp)("The --remix value must use canonical app version ref format.", [
1146
- "Example: app:playdrop/hangingout@1.2.3.",
1147
- 'Use "playdrop browse --kind app" or "playdrop search <query> --kind app" to find remixable apps.',
1148
- ], { command: "project create app" });
1149
- process.exitCode = 1;
1150
- return;
1151
- }
1152
- }
1153
- else if (templateOption && !reuseExistingApp) {
962
+ if (templateOption && !reuseExistingApp) {
1154
963
  parsedTemplate = parseTemplateKey(templateOption);
1155
964
  if (!parsedTemplate) {
1156
965
  (0, messages_1.printErrorWithHelp)("The --template value must use the {creator}/template/{name} or {creator}/app/{name} key format.", [
@@ -1178,35 +987,9 @@ async function create(name, options = {}) {
1178
987
  let projectCataloguePath = null;
1179
988
  const client = ctx.client;
1180
989
  const sourceInfo = {};
1181
- let remixSourceTarget = null;
1182
990
  let scaffold = null;
1183
991
  let provenanceMessage = "";
1184
- if (!reuseExistingApp && remixOption) {
1185
- const parsed = parsedRemix;
1186
- remixSourceTarget = { creator: parsed.creator, name: parsed.name, version: parsed.version };
1187
- sourceInfo.remixRef = parsed.ref;
1188
- try {
1189
- scaffold = await fetchRemixScaffold(client, parsed.creator, parsed.name, parsed.version);
1190
- provenanceMessage = `Remixed from ${parsed.ref}.`;
1191
- }
1192
- catch (error) {
1193
- if (error instanceof http_1.CLIUnsupportedClientError) {
1194
- process.exitCode = 1;
1195
- return;
1196
- }
1197
- const detailMessage = error instanceof Error && error.message.trim() ? error.message.trim() : "";
1198
- const problem = detailMessage
1199
- ? `Failed to fetch remix source: ${detailMessage}`
1200
- : "Failed to fetch remix source.";
1201
- (0, messages_1.printErrorWithHelp)(problem, [
1202
- "Confirm the key is correct and that you have access to remix the source app.",
1203
- "Retry once you are logged in and the Playdrop API is reachable.",
1204
- ], { command: "project create app" });
1205
- process.exitCode = 1;
1206
- return;
1207
- }
1208
- }
1209
- else if (templateOption) {
992
+ if (templateOption) {
1210
993
  if (reuseExistingApp) {
1211
994
  // ignore template when reusing local files
1212
995
  }
@@ -1231,19 +1014,11 @@ async function create(name, options = {}) {
1231
1014
  }
1232
1015
  }
1233
1016
  if (!reuseExistingApp && !scaffold) {
1234
- (0, messages_1.printErrorWithHelp)("Failed to retrieve scaffold data. Specify a valid --template or --remix key and try again.", [
1235
- 'Use "playdrop browse --kind app --app-type template" to discover available templates.',
1236
- 'Browse https://playdrop.ai and copy an exact app version ref to pass with "--remix".',
1237
- ], { command: "project create app" });
1017
+ (0, messages_1.printErrorWithHelp)("Failed to retrieve scaffold data. Specify a valid --template key and try again.", ['Use "playdrop browse --kind app --app-type template" to discover available templates.'], { command: "project create app" });
1238
1018
  process.exitCode = 1;
1239
1019
  return;
1240
1020
  }
1241
1021
  const hasArchive = !reuseExistingApp && typeof scaffold?.archiveUrl === "string" && scaffold.archiveUrl?.trim().length > 0;
1242
- const externalRemixListingUrl = !reuseExistingApp &&
1243
- typeof scaffold?.externalListingUrl === "string" &&
1244
- scaffold.externalListingUrl.trim().length > 0
1245
- ? scaffold.externalListingUrl.trim()
1246
- : null;
1247
1022
  let htmlFilePath = reuseExistingApp && existingTask ? existingTask.filePath : "";
1248
1023
  let projectDir = reuseExistingApp && existingTask ? existingTask.projectDir : null;
1249
1024
  let packageJsonPath = reuseExistingApp && existingTask ? (existingTask.packageJsonPath ?? null) : null;
@@ -1257,18 +1032,18 @@ async function create(name, options = {}) {
1257
1032
  }
1258
1033
  if (!reuseExistingApp && hasArchive) {
1259
1034
  projectDir = projectDirCandidate;
1260
- try {
1261
- (0, node_fs_1.mkdirSync)(projectDir);
1262
- }
1263
- catch {
1264
- (0, messages_1.printErrorWithHelp)(`Cannot create ${projectDir} because it already exists.`, ['Remove or rename the existing directory before running "playdrop project create app" again.'], { command: "project create app" });
1265
- process.exitCode = 1;
1266
- return;
1035
+ if (!gameSourceGitRoot) {
1036
+ try {
1037
+ (0, node_fs_1.mkdirSync)(projectDir);
1038
+ }
1039
+ catch {
1040
+ (0, messages_1.printErrorWithHelp)(`Cannot create ${projectDir} because it already exists.`, ['Remove or rename the existing directory before running "playdrop project create app" again.'], { command: "project create app" });
1041
+ process.exitCode = 1;
1042
+ return;
1043
+ }
1267
1044
  }
1268
1045
  try {
1269
- const archiveBuffer = remixSourceTarget
1270
- ? new Uint8Array(await (await client.downloadAppSource(remixSourceTarget.creator, remixSourceTarget.name, remixSourceTarget.version)).blob.arrayBuffer())
1271
- : await downloadArchive(resolveArchiveDownloadUrl(scaffold.archiveUrl, ctx.envConfig.apiBase), ctx.envConfig.apiBase, ctx.token);
1046
+ const archiveBuffer = await downloadArchive(resolveArchiveDownloadUrl(scaffold.archiveUrl, ctx.envConfig.apiBase), ctx.envConfig.apiBase, ctx.token);
1272
1047
  const extraction = extractProjectArchive(archiveBuffer, projectDir);
1273
1048
  writeCreatedProjectWorkspaceAuth(projectDir, ctx);
1274
1049
  const extractedCatalogue = (0, node_path_1.resolve)(projectDir, CATALOGUE_FILENAME);
@@ -1298,7 +1073,9 @@ async function create(name, options = {}) {
1298
1073
  }
1299
1074
  }
1300
1075
  if (!resolvedEntryPoint) {
1301
- (0, node_fs_1.rmSync)(projectDir, { recursive: true, force: true });
1076
+ if (!gameSourceGitRoot) {
1077
+ (0, node_fs_1.rmSync)(projectDir, { recursive: true, force: true });
1078
+ }
1302
1079
  (0, messages_1.printErrorWithHelp)("Extracted project archive did not include an HTML entry point.", ["Check the template archive and ensure playdrop.project.json specifies a valid entryPoint before retrying."], { command: "project create app" });
1303
1080
  process.exitCode = 1;
1304
1081
  return;
@@ -1308,7 +1085,9 @@ async function create(name, options = {}) {
1308
1085
  packageJsonPath = (0, node_fs_1.existsSync)(packageCandidate) ? packageCandidate : null;
1309
1086
  }
1310
1087
  catch (error) {
1311
- (0, node_fs_1.rmSync)(projectDir, { recursive: true, force: true });
1088
+ if (!gameSourceGitRoot) {
1089
+ (0, node_fs_1.rmSync)(projectDir, { recursive: true, force: true });
1090
+ }
1312
1091
  const detailMessage = typeof error?.message === "string" && error.message.trim()
1313
1092
  ? error.message.trim()
1314
1093
  : "Failed to download or extract the project archive.";
@@ -1330,15 +1109,12 @@ async function create(name, options = {}) {
1330
1109
  packageJsonPath = existingTask.packageJsonPath ?? null;
1331
1110
  cataloguePathToUse = existingTask.catalogueAbsolutePath;
1332
1111
  }
1333
- else if (externalRemixListingUrl) {
1334
- htmlFilePath = file;
1335
- }
1336
1112
  else if (!scaffold?.html) {
1337
1113
  (0, messages_1.printNetworkIssue)("Unable to retrieve template content for playdrop project create app.", "project create app");
1338
1114
  process.exitCode = 1;
1339
1115
  return;
1340
1116
  }
1341
- if (!reuseExistingApp && !externalRemixListingUrl) {
1117
+ if (!reuseExistingApp) {
1342
1118
  htmlFilePath = file;
1343
1119
  const scaffoldHtml = scaffold.html;
1344
1120
  (0, node_fs_1.writeFileSync)(htmlFilePath, scaffoldHtml);
@@ -1408,13 +1184,6 @@ async function create(name, options = {}) {
1408
1184
  if (reuseExistingApp && existingTask) {
1409
1185
  registrationTask = existingTask;
1410
1186
  }
1411
- else if (!reuseExistingApp && externalRemixListingUrl && !(0, node_fs_1.existsSync)(htmlFilePath)) {
1412
- const pendingCataloguePath = workspaceCatalogueResult?.path ?? cataloguePathToUse;
1413
- if (!pendingCataloguePath) {
1414
- throw new Error("Missing catalogue path for external remix scaffold.");
1415
- }
1416
- registrationTask = buildPendingExternalRemixTask(name, scaffold.metadata, sourceInfo, pendingCataloguePath, htmlFilePath);
1417
- }
1418
1187
  else {
1419
1188
  const registrationLookup = (0, catalogue_1.resolveCatalogueEntries)(process.cwd(), { filterName: name });
1420
1189
  if (registrationLookup.errors.length > 0) {
@@ -1490,7 +1259,6 @@ async function create(name, options = {}) {
1490
1259
  name,
1491
1260
  displayName,
1492
1261
  ...(Number.isInteger(taskId) && Number(taskId) > 0 ? { agentTaskId: Number(taskId) } : {}),
1493
- ...(sourceInfo.remixRef ? { remixRef: sourceInfo.remixRef } : {}),
1494
1262
  };
1495
1263
  let creatorUsername = "";
1496
1264
  try {
@@ -1659,7 +1427,6 @@ async function create(name, options = {}) {
1659
1427
  entryPointLabel,
1660
1428
  hasPackageJson,
1661
1429
  dependenciesInstalled,
1662
- externalListingUrl: externalRemixListingUrl,
1663
1430
  });
1664
1431
  if (workspaceCatalogueUpdated && workspaceCatalogueResult) {
1665
1432
  warnMissingWorkspaceReadme(workspaceCatalogueResult.path);
@@ -18,6 +18,7 @@ const devRuntimeAssets_1 = require("./devRuntimeAssets");
18
18
  const devServer_1 = require("./devServer");
19
19
  const tweakStaleness_1 = require("../tweakStaleness");
20
20
  const devShared_1 = require("./devShared");
21
+ const devGameServer_1 = require("./devGameServer");
21
22
  function formatDevRuntimeAssetManifestFailure(error) {
22
23
  const rawMessage = error instanceof Error ? error.message : String(error ?? "unknown_error");
23
24
  if (rawMessage.startsWith("dev_runtime_asset_ref_invalid:")) {
@@ -198,8 +199,8 @@ async function dev(targetArg, appOption, devOptions = {}) {
198
199
  return;
199
200
  }
200
201
  const workspacePath = resolvedTarget.cataloguePath ?? (0, node_path_1.dirname)(filePath);
201
- await (0, commandContext_1.withEnvironment)("project dev", "Starting the dev server", async ({ client, env, envConfig, account }) => {
202
- let currentUsername = account?.username?.trim() ?? "";
202
+ await (0, commandContext_1.withEnvironment)("project dev", "Starting the dev server", async ({ client, env, envConfig, account, workspaceAuth }) => {
203
+ let currentUsername = workspaceAuth?.config.ownerUsername?.trim() ?? account?.username?.trim() ?? "";
203
204
  if (!currentUsername) {
204
205
  try {
205
206
  currentUsername = await (0, devShared_1.fetchDevUsername)(client);
@@ -229,9 +230,10 @@ async function dev(targetArg, appOption, devOptions = {}) {
229
230
  throw error;
230
231
  }
231
232
  }
233
+ let registeredApp = null;
232
234
  if (resolvedTarget.cataloguePath) {
233
235
  try {
234
- await (0, devShared_1.assertAppRegistered)(client, currentUsername, appName);
236
+ registeredApp = await (0, devShared_1.assertAppRegistered)(client, currentUsername, appName);
235
237
  }
236
238
  catch (error) {
237
239
  if (error instanceof http_1.CLIUnsupportedClientError) {
@@ -305,6 +307,36 @@ async function dev(targetArg, appOption, devOptions = {}) {
305
307
  return;
306
308
  }
307
309
  }
310
+ let gameServer = null;
311
+ if (taskLookup.task?.server) {
312
+ if (!registeredApp || typeof registeredApp.id !== "number" || !taskLookup.task.version) {
313
+ (0, messages_1.printErrorWithHelp)("A registered app and exact catalogue version are required for local game-server authentication.", ["Register the app and set its catalogue version before running project dev."], { command: "project dev" });
314
+ process.exitCode = 1;
315
+ return;
316
+ }
317
+ try {
318
+ const credential = await client.requestDevGameServerCredential(registeredApp.id, {
319
+ version: taskLookup.task.version,
320
+ });
321
+ gameServer = await (0, devGameServer_1.startDevGameServer)({
322
+ task: taskLookup.task,
323
+ credential,
324
+ platformApiUrl: envConfig.apiBase,
325
+ publicAddress: (() => {
326
+ const roomsUrl = new URL("_playdrop/rooms", new URL(".", localDevAppUrl));
327
+ return `${roomsUrl.host}${roomsUrl.pathname.replace(/\/$/u, "")}`;
328
+ })(),
329
+ });
330
+ }
331
+ catch (error) {
332
+ (0, messages_1.printErrorWithHelp)(error instanceof Error ? error.message : "Failed to start the local game server.", [
333
+ "Confirm the frozen Colyseus dependencies are installed.",
334
+ "Confirm PLAYDROP_DEV_REDIS_URL and PLAYDROP_DEV_MONGO_URL point to the required running versions.",
335
+ ], { command: "project dev" });
336
+ process.exitCode = 1;
337
+ return;
338
+ }
339
+ }
308
340
  let handle;
309
341
  try {
310
342
  handle = await (0, devServer_1.startDevServer)({
@@ -315,6 +347,8 @@ async function dev(targetArg, appOption, devOptions = {}) {
315
347
  port: devRouterPort,
316
348
  projectInfo,
317
349
  runtimeAssetManifest,
350
+ roomsPort: gameServer?.port ?? null,
351
+ roomsProcess: gameServer?.process ?? null,
318
352
  });
319
353
  }
320
354
  catch (error) {
@@ -122,8 +122,8 @@ async function devBrowser(targetArg, options = {}) {
122
122
  }
123
123
  }
124
124
  const workspacePath = resolvedTarget.cataloguePath ?? (0, node_path_1.dirname)(filePath);
125
- await (0, commandContext_1.withEnvironment)("project dev-browser", "Launching the Playdrop dev browser", async ({ client, env, envConfig, account }) => {
126
- let currentUsername = account?.username?.trim() ?? "";
125
+ await (0, commandContext_1.withEnvironment)("project dev-browser", "Launching the Playdrop dev browser", async ({ client, env, envConfig, account, workspaceAuth }) => {
126
+ let currentUsername = workspaceAuth?.config.ownerUsername?.trim() ?? account?.username?.trim() ?? "";
127
127
  if (!currentUsername) {
128
128
  try {
129
129
  currentUsername = await (0, devShared_1.fetchDevUsername)(client);
@@ -0,0 +1,16 @@
1
+ import { type ChildProcess } from "node:child_process";
2
+ import type { DevGameServerCredentialResponse } from "@playdrop/types";
3
+ import type { AppTask } from "../catalogue";
4
+ import { type GameServerBuild } from "../apps/serverBuild";
5
+ export interface DevGameServerHandle {
6
+ process: ChildProcess;
7
+ port: number;
8
+ build: GameServerBuild;
9
+ }
10
+ export declare function isValidDevRedisNamespace(namespace: string): boolean;
11
+ export declare function startDevGameServer(input: {
12
+ task: AppTask;
13
+ credential: DevGameServerCredentialResponse;
14
+ platformApiUrl: string;
15
+ publicAddress: string;
16
+ }): Promise<DevGameServerHandle | null>;