@playdrop/playdrop-cli 0.3.1-build.1 → 0.3.5-build.1

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 (371) hide show
  1. package/README.md +60 -22
  2. package/config/client-meta.json +5 -5
  3. package/dist/apps/build.js +90 -114
  4. package/dist/apps/upload.js +35 -11
  5. package/dist/apps/validate.js +61 -0
  6. package/dist/assets/model-artifacts.d.ts +8 -0
  7. package/dist/assets/model-artifacts.js +375 -0
  8. package/dist/assets/model-worker.d.ts +22 -0
  9. package/dist/assets/model-worker.js +123 -0
  10. package/dist/catalogue.d.ts +10 -4
  11. package/dist/catalogue.js +272 -45
  12. package/dist/commandContext.d.ts +1 -0
  13. package/dist/commandContext.js +45 -15
  14. package/dist/commands/browse.d.ts +16 -0
  15. package/dist/commands/browse.js +370 -0
  16. package/dist/commands/build.js +12 -4
  17. package/dist/commands/capture.js +24 -24
  18. package/dist/commands/captureRemote.d.ts +11 -0
  19. package/dist/commands/captureRemote.js +90 -0
  20. package/dist/commands/comments.d.ts +14 -0
  21. package/dist/commands/comments.js +189 -0
  22. package/dist/commands/create.js +112 -72
  23. package/dist/commands/creations.d.ts +49 -0
  24. package/dist/commands/creations.js +657 -0
  25. package/dist/commands/credits.d.ts +10 -0
  26. package/dist/commands/credits.js +91 -0
  27. package/dist/commands/detail.d.ts +2 -2
  28. package/dist/commands/detail.js +148 -290
  29. package/dist/commands/dev.js +26 -24
  30. package/dist/commands/devServer.js +88 -9
  31. package/dist/commands/devShared.js +2 -2
  32. package/dist/commands/documentation.d.ts +4 -1
  33. package/dist/commands/documentation.js +79 -104
  34. package/dist/commands/feedback.d.ts +12 -9
  35. package/dist/commands/feedback.js +125 -257
  36. package/dist/commands/format.js +6 -13
  37. package/dist/commands/generation.d.ts +11 -0
  38. package/dist/commands/generation.js +329 -43
  39. package/dist/commands/gettingStarted.d.ts +1 -0
  40. package/dist/commands/gettingStarted.js +26 -0
  41. package/dist/commands/init.js +26 -24
  42. package/dist/commands/login.js +9 -8
  43. package/dist/commands/logout.js +2 -1
  44. package/dist/commands/notifications.d.ts +14 -0
  45. package/dist/commands/notifications.js +179 -0
  46. package/dist/commands/search.d.ts +13 -0
  47. package/dist/commands/search.js +198 -0
  48. package/dist/commands/upload.js +83 -35
  49. package/dist/commands/validate.js +15 -1
  50. package/dist/commands/versionsBrowse.d.ts +7 -0
  51. package/dist/commands/versionsBrowse.js +209 -0
  52. package/dist/commands/whoami.js +9 -8
  53. package/dist/errors.d.ts +9 -0
  54. package/dist/errors.js +52 -0
  55. package/dist/externalAssetPackValidation.d.ts +2 -0
  56. package/dist/externalAssetPackValidation.js +115 -0
  57. package/dist/http.js +1 -1
  58. package/dist/index.js +570 -629
  59. package/dist/messages.js +11 -11
  60. package/dist/output.d.ts +5 -0
  61. package/dist/output.js +45 -0
  62. package/dist/playwright.js +10 -2
  63. package/dist/refs.d.ts +18 -0
  64. package/dist/refs.js +105 -0
  65. package/node_modules/@playdrop/ai-client/dist/index.d.ts +43 -16
  66. package/node_modules/@playdrop/ai-client/dist/index.d.ts.map +1 -1
  67. package/node_modules/@playdrop/ai-client/package.json +1 -0
  68. package/node_modules/@playdrop/api-client/dist/client.d.ts +77 -43
  69. package/node_modules/@playdrop/api-client/dist/client.d.ts.map +1 -1
  70. package/node_modules/@playdrop/api-client/dist/client.js +379 -1574
  71. package/node_modules/@playdrop/api-client/dist/core/errors.d.ts +9 -0
  72. package/node_modules/@playdrop/api-client/dist/core/errors.d.ts.map +1 -0
  73. package/node_modules/@playdrop/api-client/dist/core/errors.js +46 -0
  74. package/node_modules/@playdrop/api-client/dist/core/request.d.ts +27 -0
  75. package/node_modules/@playdrop/api-client/dist/core/request.d.ts.map +1 -0
  76. package/node_modules/@playdrop/api-client/dist/core/request.js +122 -0
  77. package/node_modules/@playdrop/api-client/dist/domains/admin.d.ts +75 -0
  78. package/node_modules/@playdrop/api-client/dist/domains/admin.d.ts.map +1 -0
  79. package/node_modules/@playdrop/api-client/dist/domains/admin.js +282 -0
  80. package/node_modules/@playdrop/api-client/dist/domains/ai.d.ts +22 -0
  81. package/node_modules/@playdrop/api-client/dist/domains/ai.d.ts.map +1 -0
  82. package/node_modules/@playdrop/api-client/dist/domains/ai.js +15 -0
  83. package/node_modules/@playdrop/api-client/dist/domains/apps.d.ts +60 -0
  84. package/node_modules/@playdrop/api-client/dist/domains/apps.d.ts.map +1 -0
  85. package/node_modules/@playdrop/api-client/dist/domains/apps.js +301 -0
  86. package/node_modules/@playdrop/api-client/dist/domains/asset-packs.d.ts +59 -0
  87. package/node_modules/@playdrop/api-client/dist/domains/asset-packs.d.ts.map +1 -0
  88. package/node_modules/@playdrop/api-client/dist/domains/asset-packs.js +297 -0
  89. package/node_modules/@playdrop/api-client/dist/domains/assets.d.ts +62 -0
  90. package/node_modules/@playdrop/api-client/dist/domains/assets.d.ts.map +1 -0
  91. package/node_modules/@playdrop/api-client/dist/domains/assets.js +297 -0
  92. package/node_modules/@playdrop/api-client/dist/domains/auth.d.ts +28 -0
  93. package/node_modules/@playdrop/api-client/dist/domains/auth.d.ts.map +1 -0
  94. package/node_modules/@playdrop/api-client/dist/domains/auth.js +78 -0
  95. package/node_modules/@playdrop/api-client/dist/domains/comments.d.ts +29 -0
  96. package/node_modules/@playdrop/api-client/dist/domains/comments.d.ts.map +1 -0
  97. package/node_modules/@playdrop/api-client/dist/domains/comments.js +65 -0
  98. package/node_modules/@playdrop/api-client/dist/domains/me.d.ts +24 -0
  99. package/node_modules/@playdrop/api-client/dist/domains/me.d.ts.map +1 -0
  100. package/node_modules/@playdrop/api-client/dist/domains/me.js +35 -0
  101. package/node_modules/@playdrop/api-client/dist/domains/payments.d.ts +37 -0
  102. package/node_modules/@playdrop/api-client/dist/domains/payments.d.ts.map +1 -0
  103. package/node_modules/@playdrop/api-client/dist/domains/payments.js +148 -0
  104. package/node_modules/@playdrop/api-client/dist/domains/search.d.ts +27 -0
  105. package/node_modules/@playdrop/api-client/dist/domains/search.d.ts.map +1 -0
  106. package/node_modules/@playdrop/api-client/dist/domains/search.js +65 -0
  107. package/node_modules/@playdrop/api-client/dist/index.d.ts +59 -60
  108. package/node_modules/@playdrop/api-client/dist/index.d.ts.map +1 -1
  109. package/node_modules/@playdrop/api-client/dist/index.js +142 -53
  110. package/node_modules/@playdrop/api-client/package.json +3 -2
  111. package/node_modules/@playdrop/{entity-core → boxel-core}/dist/src/entity-cleaner.d.ts +3 -3
  112. package/node_modules/@playdrop/boxel-core/dist/src/entity-cleaner.js.map +1 -0
  113. package/node_modules/@playdrop/{entity-core → boxel-core}/dist/src/entity-utils.d.ts +8 -8
  114. package/node_modules/@playdrop/boxel-core/dist/src/entity-utils.js.map +1 -0
  115. package/node_modules/@playdrop/{entity-core → boxel-core}/dist/src/humanoid/r15/common.d.ts +2 -2
  116. package/node_modules/@playdrop/{entity-core → boxel-core}/dist/src/humanoid/r15/common.js.map +1 -1
  117. package/node_modules/@playdrop/{entity-core → boxel-core}/dist/src/humanoid/r15/textured-builder.d.ts +2 -2
  118. package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r15/textured-builder.js.map +1 -0
  119. package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r15/types.d.ts +6 -0
  120. package/node_modules/@playdrop/{entity-core → boxel-core}/dist/src/humanoid/r15/voxel-builder.d.ts +2 -2
  121. package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r15/voxel-builder.js.map +1 -0
  122. package/node_modules/@playdrop/{entity-core → boxel-core}/dist/src/humanoid/r6/builder.d.ts +3 -3
  123. package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r6/builder.js.map +1 -0
  124. package/node_modules/@playdrop/{entity-core → boxel-core}/dist/src/humanoid/templates/index.d.ts +4 -4
  125. package/node_modules/@playdrop/boxel-core/dist/src/humanoid/templates/index.js.map +1 -0
  126. package/node_modules/@playdrop/{entity-core → boxel-core}/dist/src/palette_tools.d.ts +4 -4
  127. package/node_modules/@playdrop/boxel-core/dist/src/palette_tools.js.map +1 -0
  128. package/node_modules/@playdrop/boxel-core/dist/src/serialization.d.ts +4 -0
  129. package/node_modules/@playdrop/{entity-core → boxel-core}/dist/src/serialization.js +10 -10
  130. package/node_modules/@playdrop/{entity-core → boxel-core}/dist/src/serialization.js.map +1 -1
  131. package/node_modules/@playdrop/{entity-core → boxel-core}/dist/src/textures.d.ts +5 -5
  132. package/node_modules/@playdrop/{entity-core → boxel-core}/dist/src/textures.js.map +1 -1
  133. package/node_modules/@playdrop/{entity-core → boxel-core}/dist/src/transforms/textured-boxes/infer-face.d.ts +2 -2
  134. package/node_modules/@playdrop/boxel-core/dist/src/transforms/textured-boxes/infer-face.js.map +1 -0
  135. package/node_modules/@playdrop/{entity-core → boxel-core}/dist/src/transforms/textured-boxes/layer-mode.d.ts +2 -2
  136. package/node_modules/@playdrop/{entity-core → boxel-core}/dist/src/transforms/textured-boxes/layer-mode.js +1 -1
  137. package/node_modules/@playdrop/boxel-core/dist/src/transforms/textured-boxes/layer-mode.js.map +1 -0
  138. package/node_modules/@playdrop/boxel-core/dist/src/transforms/textured-boxes/merge-overlay.d.ts +2 -0
  139. package/node_modules/@playdrop/boxel-core/dist/src/transforms/textured-boxes/merge-overlay.js.map +1 -0
  140. package/node_modules/@playdrop/{entity-core → boxel-core}/dist/src/transforms/textured-boxes/slice.d.ts +2 -2
  141. package/node_modules/@playdrop/{entity-core → boxel-core}/dist/src/transforms/textured-boxes/slice.js +1 -1
  142. package/node_modules/@playdrop/boxel-core/dist/src/transforms/textured-boxes/slice.js.map +1 -0
  143. package/node_modules/@playdrop/boxel-core/dist/src/transforms/upscale.d.ts +3 -0
  144. package/node_modules/@playdrop/{entity-core → boxel-core}/dist/src/transforms/upscale.js +1 -1
  145. package/node_modules/@playdrop/{entity-core → boxel-core}/dist/src/transforms/upscale.js.map +1 -1
  146. package/node_modules/@playdrop/{entity-core → boxel-core}/dist/src/transforms/voxels/slice.d.ts +2 -2
  147. package/node_modules/@playdrop/{entity-core → boxel-core}/dist/src/transforms/voxels/slice.js.map +1 -1
  148. package/node_modules/@playdrop/{entity-core → boxel-core}/dist/src/types.d.ts +3 -3
  149. package/node_modules/@playdrop/{entity-core → boxel-core}/dist/src/validation.d.ts +10 -10
  150. package/node_modules/@playdrop/{entity-core → boxel-core}/dist/src/validation.js +36 -36
  151. package/node_modules/@playdrop/{entity-core → boxel-core}/dist/src/validation.js.map +1 -1
  152. package/node_modules/@playdrop/boxel-core/dist/test/entity-utils.test.js.map +1 -0
  153. package/node_modules/@playdrop/{entity-core → boxel-core}/dist/test/index.test.js +2 -2
  154. package/node_modules/@playdrop/{entity-core → boxel-core}/dist/test/index.test.js.map +1 -1
  155. package/node_modules/@playdrop/boxel-core/dist/test/layer-mode.test.js.map +1 -0
  156. package/node_modules/@playdrop/boxel-core/dist/test/palette-tools.test.js.map +1 -0
  157. package/node_modules/@playdrop/{entity-core → boxel-core}/dist/test/serialization.test.js +6 -6
  158. package/node_modules/@playdrop/{entity-core → boxel-core}/dist/test/serialization.test.js.map +1 -1
  159. package/node_modules/@playdrop/boxel-core/dist/test/textures.test.js.map +1 -0
  160. package/node_modules/@playdrop/{entity-core → boxel-core}/dist/test/types.test.js +1 -1
  161. package/node_modules/@playdrop/boxel-core/dist/test/types.test.js.map +1 -0
  162. package/node_modules/@playdrop/boxel-core/dist/test/upscale.test.js.map +1 -0
  163. package/node_modules/@playdrop/{entity-core → boxel-core}/dist/test/validation.test.js +11 -11
  164. package/node_modules/@playdrop/{entity-core → boxel-core}/dist/test/validation.test.js.map +1 -1
  165. package/node_modules/@playdrop/{entity-core → boxel-core}/package.json +3 -3
  166. package/node_modules/@playdrop/boxel-three/dist/src/animations.d.ts +4 -0
  167. package/node_modules/@playdrop/{entity-three → boxel-three}/dist/src/animations.js +1 -1
  168. package/node_modules/@playdrop/{entity-three → boxel-three}/dist/src/builders.d.ts +1 -1
  169. package/node_modules/@playdrop/{entity-three → boxel-three}/dist/src/builders.js +3 -3
  170. package/node_modules/@playdrop/{entity-three → boxel-three}/dist/src/context.d.ts +3 -3
  171. package/node_modules/@playdrop/{entity-three → boxel-three}/dist/src/exporters/glb.d.ts +9 -9
  172. package/node_modules/@playdrop/{entity-three → boxel-three}/dist/src/exporters/glb.js +4 -4
  173. package/node_modules/@playdrop/{entity-three → boxel-three}/dist/src/exporters/image.d.ts +4 -4
  174. package/node_modules/@playdrop/{entity-three → boxel-three}/dist/src/exporters/image.js +5 -5
  175. package/node_modules/@playdrop/boxel-three/dist/src/index.d.ts +17 -0
  176. package/node_modules/@playdrop/boxel-three/dist/src/index.js +15 -0
  177. package/node_modules/@playdrop/{entity-three → boxel-three}/dist/src/instantiate.d.ts +4 -4
  178. package/node_modules/@playdrop/{entity-three → boxel-three}/dist/src/instantiate.js +4 -4
  179. package/node_modules/@playdrop/{entity-three → boxel-three}/dist/src/nodes.d.ts +1 -1
  180. package/node_modules/@playdrop/boxel-three/dist/src/overlays.d.ts +7 -0
  181. package/node_modules/@playdrop/{entity-three → boxel-three}/dist/src/overlays.js +1 -1
  182. package/node_modules/@playdrop/boxel-three/dist/src/scene.d.ts +3 -0
  183. package/node_modules/@playdrop/{entity-three → boxel-three}/dist/src/scene.js +6 -6
  184. package/node_modules/@playdrop/{entity-three → boxel-three}/dist/src/skinned-mesh.d.ts +2 -2
  185. package/node_modules/@playdrop/{entity-three → boxel-three}/dist/src/textures.d.ts +1 -1
  186. package/node_modules/@playdrop/{entity-three → boxel-three}/dist/src/textures.js +2 -2
  187. package/node_modules/@playdrop/{entity-three → boxel-three}/dist/src/types.d.ts +15 -15
  188. package/node_modules/@playdrop/{entity-three → boxel-three}/dist/src/voxels/faces.d.ts +1 -1
  189. package/node_modules/@playdrop/{entity-three → boxel-three}/dist/src/voxels/mesher.d.ts +1 -1
  190. package/node_modules/@playdrop/{entity-three → boxel-three}/dist/src/voxels/mesher.js +1 -1
  191. package/node_modules/@playdrop/{entity-three → boxel-three}/dist/test/export-image.playwright.test.js +4 -4
  192. package/node_modules/@playdrop/{entity-three → boxel-three}/dist/test/fixtures/render-worker.d.ts +3 -3
  193. package/node_modules/@playdrop/{entity-three → boxel-three}/dist/test/fixtures/render-worker.js +10 -10
  194. package/node_modules/@playdrop/{entity-three → boxel-three}/dist/test/glb-skinned.test.js +6 -6
  195. package/node_modules/@playdrop/boxel-three/dist/test/index.test.js +8 -0
  196. package/node_modules/@playdrop/{entity-three → boxel-three}/dist/test/instantiate.test.js +3 -3
  197. package/node_modules/@playdrop/{entity-three → boxel-three}/dist/test/overlays.test.js +3 -3
  198. package/node_modules/@playdrop/{entity-three → boxel-three}/dist/test/scene-filter.test.js +5 -5
  199. package/node_modules/@playdrop/{entity-three → boxel-three}/dist/test/scene-smoke.test.js +3 -3
  200. package/node_modules/@playdrop/{entity-three → boxel-three}/dist/test/skinned-mesh.test.js +3 -3
  201. package/node_modules/@playdrop/{entity-three → boxel-three}/dist/test/textured-overlay.test.js +3 -3
  202. package/node_modules/@playdrop/{entity-three → boxel-three}/package.json +5 -4
  203. package/node_modules/@playdrop/config/client-meta.json +5 -5
  204. package/node_modules/@playdrop/config/dist/src/constants.d.ts +5 -0
  205. package/node_modules/@playdrop/config/dist/src/constants.d.ts.map +1 -1
  206. package/node_modules/@playdrop/config/dist/src/constants.js +5 -1
  207. package/node_modules/@playdrop/config/dist/tsconfig.tsbuildinfo +1 -1
  208. package/node_modules/@playdrop/config/package.json +1 -1
  209. package/node_modules/@playdrop/types/dist/api.d.ts +326 -62
  210. package/node_modules/@playdrop/types/dist/api.d.ts.map +1 -1
  211. package/node_modules/@playdrop/types/dist/api.js +56 -0
  212. package/node_modules/@playdrop/types/dist/app.d.ts +0 -14
  213. package/node_modules/@playdrop/types/dist/app.d.ts.map +1 -1
  214. package/node_modules/@playdrop/types/dist/app.js +0 -10
  215. package/node_modules/@playdrop/types/dist/asset-pack.d.ts +12 -1
  216. package/node_modules/@playdrop/types/dist/asset-pack.d.ts.map +1 -1
  217. package/node_modules/@playdrop/types/dist/asset.d.ts +85 -4
  218. package/node_modules/@playdrop/types/dist/asset.d.ts.map +1 -1
  219. package/node_modules/@playdrop/types/dist/asset.js +43 -37
  220. package/node_modules/@playdrop/types/dist/entity.d.ts +2 -2
  221. package/node_modules/@playdrop/types/dist/entity.d.ts.map +1 -1
  222. package/node_modules/@playdrop/types/dist/entity.js +2 -2
  223. package/node_modules/@playdrop/types/dist/realtime.d.ts +27 -26
  224. package/node_modules/@playdrop/types/dist/realtime.d.ts.map +1 -1
  225. package/node_modules/@playdrop/types/dist/version.d.ts +5 -0
  226. package/node_modules/@playdrop/types/dist/version.d.ts.map +1 -1
  227. package/package.json +11 -9
  228. package/bin/playdrop-cli +0 -2
  229. package/dist/commands/asset-packs.d.ts +0 -27
  230. package/dist/commands/asset-packs.js +0 -508
  231. package/dist/commands/assets.d.ts +0 -35
  232. package/dist/commands/assets.js +0 -668
  233. package/dist/commands/list.d.ts +0 -7
  234. package/dist/commands/list.js +0 -347
  235. package/dist/commands/migrateCatalogueV2.d.ts +0 -1
  236. package/dist/commands/migrateCatalogueV2.js +0 -142
  237. package/dist/commands/versions.d.ts +0 -17
  238. package/dist/commands/versions.js +0 -384
  239. package/node_modules/@playdrop/entity-core/dist/src/entity-cleaner.js.map +0 -1
  240. package/node_modules/@playdrop/entity-core/dist/src/entity-utils.js.map +0 -1
  241. package/node_modules/@playdrop/entity-core/dist/src/humanoid/r15/textured-builder.js.map +0 -1
  242. package/node_modules/@playdrop/entity-core/dist/src/humanoid/r15/types.d.ts +0 -6
  243. package/node_modules/@playdrop/entity-core/dist/src/humanoid/r15/voxel-builder.js.map +0 -1
  244. package/node_modules/@playdrop/entity-core/dist/src/humanoid/r6/builder.js.map +0 -1
  245. package/node_modules/@playdrop/entity-core/dist/src/humanoid/templates/index.js.map +0 -1
  246. package/node_modules/@playdrop/entity-core/dist/src/palette_tools.js.map +0 -1
  247. package/node_modules/@playdrop/entity-core/dist/src/serialization.d.ts +0 -4
  248. package/node_modules/@playdrop/entity-core/dist/src/transforms/textured-boxes/infer-face.js.map +0 -1
  249. package/node_modules/@playdrop/entity-core/dist/src/transforms/textured-boxes/layer-mode.js.map +0 -1
  250. package/node_modules/@playdrop/entity-core/dist/src/transforms/textured-boxes/merge-overlay.d.ts +0 -2
  251. package/node_modules/@playdrop/entity-core/dist/src/transforms/textured-boxes/merge-overlay.js.map +0 -1
  252. package/node_modules/@playdrop/entity-core/dist/src/transforms/textured-boxes/slice.js.map +0 -1
  253. package/node_modules/@playdrop/entity-core/dist/src/transforms/upscale.d.ts +0 -3
  254. package/node_modules/@playdrop/entity-core/dist/test/entity-utils.test.js.map +0 -1
  255. package/node_modules/@playdrop/entity-core/dist/test/layer-mode.test.js.map +0 -1
  256. package/node_modules/@playdrop/entity-core/dist/test/palette-tools.test.js.map +0 -1
  257. package/node_modules/@playdrop/entity-core/dist/test/textures.test.js.map +0 -1
  258. package/node_modules/@playdrop/entity-core/dist/test/types.test.js.map +0 -1
  259. package/node_modules/@playdrop/entity-core/dist/test/upscale.test.js.map +0 -1
  260. package/node_modules/@playdrop/entity-three/dist/src/animations.d.ts +0 -4
  261. package/node_modules/@playdrop/entity-three/dist/src/index.d.ts +0 -17
  262. package/node_modules/@playdrop/entity-three/dist/src/index.js +0 -15
  263. package/node_modules/@playdrop/entity-three/dist/src/overlays.d.ts +0 -7
  264. package/node_modules/@playdrop/entity-three/dist/src/scene.d.ts +0 -3
  265. package/node_modules/@playdrop/entity-three/dist/test/index.test.js +0 -8
  266. package/node_modules/@playdrop/types/dist/profile-asset-semantics.d.ts +0 -22
  267. package/node_modules/@playdrop/types/dist/profile-asset-semantics.d.ts.map +0 -1
  268. package/node_modules/@playdrop/types/dist/profile-asset-semantics.js +0 -105
  269. /package/node_modules/@playdrop/{entity-core → boxel-core}/dist/src/entity-cleaner.js +0 -0
  270. /package/node_modules/@playdrop/{entity-core → boxel-core}/dist/src/entity-utils.js +0 -0
  271. /package/node_modules/@playdrop/{entity-core → boxel-core}/dist/src/format-utils.d.ts +0 -0
  272. /package/node_modules/@playdrop/{entity-core → boxel-core}/dist/src/format-utils.js +0 -0
  273. /package/node_modules/@playdrop/{entity-core → boxel-core}/dist/src/format-utils.js.map +0 -0
  274. /package/node_modules/@playdrop/{entity-core → boxel-core}/dist/src/humanoid/geometry.d.ts +0 -0
  275. /package/node_modules/@playdrop/{entity-core → boxel-core}/dist/src/humanoid/geometry.js +0 -0
  276. /package/node_modules/@playdrop/{entity-core → boxel-core}/dist/src/humanoid/geometry.js.map +0 -0
  277. /package/node_modules/@playdrop/{entity-core → boxel-core}/dist/src/humanoid/index.d.ts +0 -0
  278. /package/node_modules/@playdrop/{entity-core → boxel-core}/dist/src/humanoid/index.js +0 -0
  279. /package/node_modules/@playdrop/{entity-core → boxel-core}/dist/src/humanoid/index.js.map +0 -0
  280. /package/node_modules/@playdrop/{entity-core → boxel-core}/dist/src/humanoid/r15/common.js +0 -0
  281. /package/node_modules/@playdrop/{entity-core → boxel-core}/dist/src/humanoid/r15/index.d.ts +0 -0
  282. /package/node_modules/@playdrop/{entity-core → boxel-core}/dist/src/humanoid/r15/index.js +0 -0
  283. /package/node_modules/@playdrop/{entity-core → boxel-core}/dist/src/humanoid/r15/index.js.map +0 -0
  284. /package/node_modules/@playdrop/{entity-core → boxel-core}/dist/src/humanoid/r15/textured-builder.js +0 -0
  285. /package/node_modules/@playdrop/{entity-core → boxel-core}/dist/src/humanoid/r15/types.js +0 -0
  286. /package/node_modules/@playdrop/{entity-core → boxel-core}/dist/src/humanoid/r15/types.js.map +0 -0
  287. /package/node_modules/@playdrop/{entity-core → boxel-core}/dist/src/humanoid/r15/voxel-builder.js +0 -0
  288. /package/node_modules/@playdrop/{entity-core → boxel-core}/dist/src/humanoid/r6/builder.js +0 -0
  289. /package/node_modules/@playdrop/{entity-core → boxel-core}/dist/src/humanoid/r6/index.d.ts +0 -0
  290. /package/node_modules/@playdrop/{entity-core → boxel-core}/dist/src/humanoid/r6/index.js +0 -0
  291. /package/node_modules/@playdrop/{entity-core → boxel-core}/dist/src/humanoid/r6/index.js.map +0 -0
  292. /package/node_modules/@playdrop/{entity-core → boxel-core}/dist/src/humanoid/r6/scanner.d.ts +0 -0
  293. /package/node_modules/@playdrop/{entity-core → boxel-core}/dist/src/humanoid/r6/scanner.js +0 -0
  294. /package/node_modules/@playdrop/{entity-core → boxel-core}/dist/src/humanoid/r6/scanner.js.map +0 -0
  295. /package/node_modules/@playdrop/{entity-core → boxel-core}/dist/src/humanoid/r6/textures/artifacts.d.ts +0 -0
  296. /package/node_modules/@playdrop/{entity-core → boxel-core}/dist/src/humanoid/r6/textures/artifacts.js +0 -0
  297. /package/node_modules/@playdrop/{entity-core → boxel-core}/dist/src/humanoid/r6/textures/artifacts.js.map +0 -0
  298. /package/node_modules/@playdrop/{entity-core → boxel-core}/dist/src/humanoid/r6/textures/face-map.d.ts +0 -0
  299. /package/node_modules/@playdrop/{entity-core → boxel-core}/dist/src/humanoid/r6/textures/face-map.js +0 -0
  300. /package/node_modules/@playdrop/{entity-core → boxel-core}/dist/src/humanoid/r6/textures/face-map.js.map +0 -0
  301. /package/node_modules/@playdrop/{entity-core → boxel-core}/dist/src/humanoid/templates/humanoid_r15.json +0 -0
  302. /package/node_modules/@playdrop/{entity-core → boxel-core}/dist/src/humanoid/templates/humanoid_r6.json +0 -0
  303. /package/node_modules/@playdrop/{entity-core → boxel-core}/dist/src/humanoid/templates/index.js +0 -0
  304. /package/node_modules/@playdrop/{entity-core → boxel-core}/dist/src/index.d.ts +0 -0
  305. /package/node_modules/@playdrop/{entity-core → boxel-core}/dist/src/index.js +0 -0
  306. /package/node_modules/@playdrop/{entity-core → boxel-core}/dist/src/index.js.map +0 -0
  307. /package/node_modules/@playdrop/{entity-core → boxel-core}/dist/src/materials.d.ts +0 -0
  308. /package/node_modules/@playdrop/{entity-core → boxel-core}/dist/src/materials.js +0 -0
  309. /package/node_modules/@playdrop/{entity-core → boxel-core}/dist/src/materials.js.map +0 -0
  310. /package/node_modules/@playdrop/{entity-core → boxel-core}/dist/src/palette_tools.js +0 -0
  311. /package/node_modules/@playdrop/{entity-core → boxel-core}/dist/src/textures.js +0 -0
  312. /package/node_modules/@playdrop/{entity-core → boxel-core}/dist/src/transforms/textured-boxes/infer-face.js +0 -0
  313. /package/node_modules/@playdrop/{entity-core → boxel-core}/dist/src/transforms/textured-boxes/merge-overlay.js +0 -0
  314. /package/node_modules/@playdrop/{entity-core → boxel-core}/dist/src/transforms/voxels/slice.js +0 -0
  315. /package/node_modules/@playdrop/{entity-core → boxel-core}/dist/src/transforms/voxels/textured-to-voxel.d.ts +0 -0
  316. /package/node_modules/@playdrop/{entity-core → boxel-core}/dist/src/transforms/voxels/textured-to-voxel.js +0 -0
  317. /package/node_modules/@playdrop/{entity-core → boxel-core}/dist/src/transforms/voxels/textured-to-voxel.js.map +0 -0
  318. /package/node_modules/@playdrop/{entity-core → boxel-core}/dist/src/types.js +0 -0
  319. /package/node_modules/@playdrop/{entity-core → boxel-core}/dist/src/types.js.map +0 -0
  320. /package/node_modules/@playdrop/{entity-core → boxel-core}/dist/src/voxels/greedy-mesher.d.ts +0 -0
  321. /package/node_modules/@playdrop/{entity-core → boxel-core}/dist/src/voxels/greedy-mesher.js +0 -0
  322. /package/node_modules/@playdrop/{entity-core → boxel-core}/dist/src/voxels/greedy-mesher.js.map +0 -0
  323. /package/node_modules/@playdrop/{entity-core → boxel-core}/dist/src/voxels.d.ts +0 -0
  324. /package/node_modules/@playdrop/{entity-core → boxel-core}/dist/src/voxels.js +0 -0
  325. /package/node_modules/@playdrop/{entity-core → boxel-core}/dist/src/voxels.js.map +0 -0
  326. /package/node_modules/@playdrop/{entity-core → boxel-core}/dist/test/entity-utils.test.d.ts +0 -0
  327. /package/node_modules/@playdrop/{entity-core → boxel-core}/dist/test/entity-utils.test.js +0 -0
  328. /package/node_modules/@playdrop/{entity-core → boxel-core}/dist/test/greedy-mesher.test.d.ts +0 -0
  329. /package/node_modules/@playdrop/{entity-core → boxel-core}/dist/test/greedy-mesher.test.js +0 -0
  330. /package/node_modules/@playdrop/{entity-core → boxel-core}/dist/test/greedy-mesher.test.js.map +0 -0
  331. /package/node_modules/@playdrop/{entity-core → boxel-core}/dist/test/humanoid/humanoid-builders.test.d.ts +0 -0
  332. /package/node_modules/@playdrop/{entity-core → boxel-core}/dist/test/humanoid/humanoid-builders.test.js +0 -0
  333. /package/node_modules/@playdrop/{entity-core → boxel-core}/dist/test/humanoid/humanoid-builders.test.js.map +0 -0
  334. /package/node_modules/@playdrop/{entity-core → boxel-core}/dist/test/index.test.d.ts +0 -0
  335. /package/node_modules/@playdrop/{entity-core → boxel-core}/dist/test/layer-mode.test.d.ts +0 -0
  336. /package/node_modules/@playdrop/{entity-core → boxel-core}/dist/test/layer-mode.test.js +0 -0
  337. /package/node_modules/@playdrop/{entity-core → boxel-core}/dist/test/materials.test.d.ts +0 -0
  338. /package/node_modules/@playdrop/{entity-core → boxel-core}/dist/test/materials.test.js +0 -0
  339. /package/node_modules/@playdrop/{entity-core → boxel-core}/dist/test/materials.test.js.map +0 -0
  340. /package/node_modules/@playdrop/{entity-core → boxel-core}/dist/test/palette-tools.test.d.ts +0 -0
  341. /package/node_modules/@playdrop/{entity-core → boxel-core}/dist/test/palette-tools.test.js +0 -0
  342. /package/node_modules/@playdrop/{entity-core → boxel-core}/dist/test/serialization.test.d.ts +0 -0
  343. /package/node_modules/@playdrop/{entity-core → boxel-core}/dist/test/textures.test.d.ts +0 -0
  344. /package/node_modules/@playdrop/{entity-core → boxel-core}/dist/test/textures.test.js +0 -0
  345. /package/node_modules/@playdrop/{entity-core → boxel-core}/dist/test/types.test.d.ts +0 -0
  346. /package/node_modules/@playdrop/{entity-core → boxel-core}/dist/test/upscale.test.d.ts +0 -0
  347. /package/node_modules/@playdrop/{entity-core → boxel-core}/dist/test/upscale.test.js +0 -0
  348. /package/node_modules/@playdrop/{entity-core → boxel-core}/dist/test/validation.test.d.ts +0 -0
  349. /package/node_modules/@playdrop/{entity-core → boxel-core}/dist/test/voxels.test.d.ts +0 -0
  350. /package/node_modules/@playdrop/{entity-core → boxel-core}/dist/test/voxels.test.js +0 -0
  351. /package/node_modules/@playdrop/{entity-core → boxel-core}/dist/test/voxels.test.js.map +0 -0
  352. /package/node_modules/@playdrop/{entity-three → boxel-three}/dist/src/context.js +0 -0
  353. /package/node_modules/@playdrop/{entity-three → boxel-three}/dist/src/nodes.js +0 -0
  354. /package/node_modules/@playdrop/{entity-three → boxel-three}/dist/src/primitives.d.ts +0 -0
  355. /package/node_modules/@playdrop/{entity-three → boxel-three}/dist/src/primitives.js +0 -0
  356. /package/node_modules/@playdrop/{entity-three → boxel-three}/dist/src/skinned-mesh.js +0 -0
  357. /package/node_modules/@playdrop/{entity-three → boxel-three}/dist/src/texture-atlas.d.ts +0 -0
  358. /package/node_modules/@playdrop/{entity-three → boxel-three}/dist/src/texture-atlas.js +0 -0
  359. /package/node_modules/@playdrop/{entity-three → boxel-three}/dist/src/types.js +0 -0
  360. /package/node_modules/@playdrop/{entity-three → boxel-three}/dist/src/voxels/faces.js +0 -0
  361. /package/node_modules/@playdrop/{entity-three → boxel-three}/dist/test/export-image.playwright.test.d.ts +0 -0
  362. /package/node_modules/@playdrop/{entity-three → boxel-three}/dist/test/glb-skinned.test.d.ts +0 -0
  363. /package/node_modules/@playdrop/{entity-three → boxel-three}/dist/test/index.test.d.ts +0 -0
  364. /package/node_modules/@playdrop/{entity-three → boxel-three}/dist/test/instantiate.test.d.ts +0 -0
  365. /package/node_modules/@playdrop/{entity-three → boxel-three}/dist/test/overlays.test.d.ts +0 -0
  366. /package/node_modules/@playdrop/{entity-three → boxel-three}/dist/test/scene-filter.test.d.ts +0 -0
  367. /package/node_modules/@playdrop/{entity-three → boxel-three}/dist/test/scene-smoke.test.d.ts +0 -0
  368. /package/node_modules/@playdrop/{entity-three → boxel-three}/dist/test/skinned-mesh.test.d.ts +0 -0
  369. /package/node_modules/@playdrop/{entity-three → boxel-three}/dist/test/textured-overlay.test.d.ts +0 -0
  370. /package/node_modules/@playdrop/{entity-three → boxel-three}/dist/test/voxels.test.d.ts +0 -0
  371. /package/node_modules/@playdrop/{entity-three → boxel-three}/dist/test/voxels.test.js +0 -0
package/README.md CHANGED
@@ -1,24 +1,62 @@
1
1
  # @playdrop/playdrop-cli
2
2
 
3
- command-line interface for creators and AI agents interacting with the Playdrop platform.
4
- Learn more at [https://playdrop.ai](https://playdrop.ai)
5
-
6
- ## Key Commands
7
- - `playdrop-cli login` – authenticate
8
- - `playdrop-cli init <path>` – initialize a workspace directory (try `~/Documents/playdrop` or `.`)
9
- - `playdrop-cli create <name> (--template creator/template/name | --remix creator/type/name)` – scaffold a new project from a template or remix.
10
- - `playdrop-cli dev <name>` – serve an app locally.
11
- - `playdrop-cli capture [name] [--timeout seconds] [--log-level level] [--surface target] [--screenshot path]` – run the dev frame in Playwright, stream console logs, and fail on browser errors (timeout default: 5 seconds, max: 600; surfaces: desktop, mobile-landscape, mobile-portrait; log levels: debug, info, warn, error; screenshots saved as PNG).
12
- - `playdrop-cli detail <creator/type/name>` – inspect metadata for an app, asset, or pack (`--format json` for raw output).
13
- - `playdrop-cli list [--type ... --creator ... --max ...]` – discover apps, assets, and packs available to your account (defaults to all creators).
14
- - `playdrop-cli feedback --title <title> [--comment text|--file path]` – send feedback to the Playdrop team; CLI metadata is attached automatically.
15
- - `playdrop-cli upload <pathOrName>` – publish apps, assets, and packs from a catalogue root (`category` and `subcategory` are required for each catalogue asset entry).
16
- - `playdrop-cli versions <list|set-current|publish|unpublish|delete> <app> [version] [--creator <username|me>]` – manage app versions as owner or admin (`app` supports `name` or `creator/type/name`).
17
- - `playdrop-cli generate <image|music|sfx|video|model_3d> "<prompt>" [--duration <value>] [--ratio <ratio>]` – generate assets directly with the AI server and store them in your account (`--duration` accepts plain numbers, `s`, or `ms`; `--ratio` supports image `1:1|3:4|9:16|4:3|16:9` and video `16:9|9:16`).
18
- - `playdrop-cli generations [--type ... --limit ... --offset ... --format text|json]` – browse persisted AI generations and generated asset refs.
19
- - `playdrop-cli assets categories [--format text|json]` list canonical category/subcategory definitions and format constraints.
20
- - `playdrop-cli assets download-file <asset-ref-or-key> [--revision rN] [--role primary] [--out path]` – download one runtime file for a specific role.
21
- - `playdrop-cli assets download-source <asset-ref-or-key> [--revision rN] [--out path]` – download the full source ZIP bundle.
22
- - `playdrop-cli assets versions <list|set-current|publish|unpublish|delete> <asset> [revision] [--creator <username|me>]` – manage asset version visibility/current/delete.
23
- - `playdrop-cli asset-packs download-source <pack-ref-or-key> [--version x.y.z] [--out path]` – download the full source ZIP bundle for an asset pack version.
24
- - `playdrop-cli asset-packs versions <list|set-current|publish|unpublish|delete> <pack> [version] [--creator <username|me>]` – manage asset pack versions.
3
+ Command-line interface for creators and AI agents using Playdrop.
4
+
5
+ ## Main Commands
6
+
7
+ ```bash
8
+ playdrop auth login
9
+ playdrop browse
10
+ playdrop search "city builder"
11
+ playdrop detail playdrop/app/hangingout
12
+ playdrop comments browse playdrop/app/hangingout
13
+ playdrop versions browse playdrop/app/hangingout
14
+ playdrop credits balance
15
+ playdrop notifications browse
16
+ playdrop creations browse
17
+ playdrop ai create image "Pixel art hero portrait"
18
+ playdrop project init .
19
+ playdrop project create app my-app --template playdrop/template/html_template
20
+ playdrop project dev my-app
21
+ playdrop project publish .
22
+ playdrop documentation browse
23
+ playdrop feedback send --title "Bug report" --comment "Details here."
24
+ playdrop getting-started
25
+ ```
26
+
27
+ ## Ref Format
28
+
29
+ Public content refs are always:
30
+
31
+ ```text
32
+ <creator>/<kind>/<name>
33
+ ```
34
+
35
+ Valid kinds:
36
+
37
+ - `app`
38
+ - `asset`
39
+ - `asset-pack`
40
+
41
+ Examples:
42
+
43
+ - `playdrop/app/hangingout`
44
+ - `playdrop/asset/astro`
45
+ - `playdrop/asset-pack/starter-kit`
46
+
47
+ ## Local Project Flow
48
+
49
+ ```bash
50
+ playdrop auth login
51
+ playdrop project init .
52
+ playdrop project create app my-app --template playdrop/template/html_template
53
+ playdrop project dev my-app
54
+ playdrop project publish .
55
+ ```
56
+
57
+ ## Documentation
58
+
59
+ ```bash
60
+ playdrop documentation browse
61
+ playdrop documentation read getting-started.md
62
+ ```
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "0.3.1",
2
+ "version": "0.3.5",
3
3
  "build": 1,
4
4
  "platforms": {
5
5
  "ios": {
@@ -26,19 +26,19 @@
26
26
  },
27
27
  "clients": {
28
28
  "web": {
29
- "minimumVersion": "0.3.1",
29
+ "minimumVersion": "0.3.5",
30
30
  "minimumBuild": 1
31
31
  },
32
32
  "admin": {
33
- "minimumVersion": "0.3.1",
33
+ "minimumVersion": "0.3.5",
34
34
  "minimumBuild": 1
35
35
  },
36
36
  "apple": {
37
- "minimumVersion": "0.3.1",
37
+ "minimumVersion": "0.3.5",
38
38
  "minimumBuild": 1
39
39
  },
40
40
  "cli": {
41
- "minimumVersion": "0.3.1",
41
+ "minimumVersion": "0.3.5",
42
42
  "minimumBuild": 1
43
43
  }
44
44
  }
@@ -173,9 +173,21 @@ function normalizeRelativePath(root, target) {
173
173
  const rel = (0, node_path_1.relative)(root, target).split(node_path_1.sep).join('/');
174
174
  return rel.replace(/^\/+/, '');
175
175
  }
176
- function collectProjectFiles(projectDir, rules) {
176
+ function isPathWithinRoot(rootDir, targetPath) {
177
+ const normalizedRoot = (0, node_path_1.resolve)(rootDir);
178
+ const normalizedTarget = (0, node_path_1.resolve)(targetPath);
179
+ if (normalizedTarget === normalizedRoot) {
180
+ return true;
181
+ }
182
+ const rootPrefix = normalizedRoot.endsWith(node_path_1.sep) ? normalizedRoot : `${normalizedRoot}${node_path_1.sep}`;
183
+ return normalizedTarget.startsWith(rootPrefix);
184
+ }
185
+ function collectProjectFiles(rootDir, rules, options) {
186
+ const includeRelativeFiles = options?.includeRelativeFiles ?? [];
187
+ const enforceReservedBundleNames = options?.enforceReservedBundleNames ?? false;
177
188
  const results = [];
178
- const stack = [projectDir];
189
+ const fileByRelativePath = new Map();
190
+ const stack = [rootDir];
179
191
  const visited = new Set();
180
192
  while (stack.length > 0) {
181
193
  const current = stack.pop();
@@ -191,10 +203,13 @@ function collectProjectFiles(projectDir, rules) {
191
203
  }
192
204
  for (const entry of dirEntries) {
193
205
  const absolutePath = (0, node_path_1.join)(current, entry.name);
194
- const relativePath = normalizeRelativePath(projectDir, absolutePath);
206
+ const relativePath = normalizeRelativePath(rootDir, absolutePath);
195
207
  if (!relativePath)
196
208
  continue;
197
209
  const isDir = entry.isDirectory();
210
+ if (!isDir && enforceReservedBundleNames && isReservedBundlePath(relativePath)) {
211
+ throw new Error(`[apps][build] Reserved bundle filename "${relativePath}" is not allowed. Use dedicated source/ecs/server upload fields.`);
212
+ }
198
213
  const ignoreTarget = isDir ? `${relativePath}/` : relativePath;
199
214
  if (shouldIgnore(ignoreTarget, isDir, rules))
200
215
  continue;
@@ -213,127 +228,87 @@ function collectProjectFiles(projectDir, rules) {
213
228
  }
214
229
  if (!stats.isFile())
215
230
  continue;
216
- results.push({
231
+ const record = {
217
232
  absolutePath,
218
233
  relativePath: relativePath.split('/').join('/'),
219
234
  mtime: stats.mtime,
220
- });
235
+ };
236
+ results.push(record);
237
+ fileByRelativePath.set(record.relativePath, record);
221
238
  }
222
239
  }
240
+ for (const includePath of includeRelativeFiles) {
241
+ const normalizedIncludePath = (0, node_path_1.normalize)(includePath).split(node_path_1.sep).join('/');
242
+ if (!normalizedIncludePath || normalizedIncludePath === '.') {
243
+ continue;
244
+ }
245
+ if (normalizedIncludePath.startsWith('..')) {
246
+ throw new Error(`[apps][build] Invalid include file path "${includePath}".`);
247
+ }
248
+ if (fileByRelativePath.has(normalizedIncludePath)) {
249
+ continue;
250
+ }
251
+ const absolutePath = (0, node_path_1.resolve)(rootDir, normalizedIncludePath);
252
+ if (!isPathWithinRoot(rootDir, absolutePath)) {
253
+ throw new Error(`[apps][build] Included file "${includePath}" escapes the project root.`);
254
+ }
255
+ if (!(0, node_fs_1.existsSync)(absolutePath)) {
256
+ continue;
257
+ }
258
+ const stats = (0, node_fs_1.statSync)(absolutePath);
259
+ if (!stats.isFile()) {
260
+ continue;
261
+ }
262
+ if (enforceReservedBundleNames && isReservedBundlePath(normalizedIncludePath)) {
263
+ throw new Error(`[apps][build] Reserved bundle filename "${normalizedIncludePath}" is not allowed. Use dedicated source/ecs/server upload fields.`);
264
+ }
265
+ const record = {
266
+ absolutePath,
267
+ relativePath: normalizedIncludePath,
268
+ mtime: stats.mtime,
269
+ };
270
+ results.push(record);
271
+ fileByRelativePath.set(record.relativePath, record);
272
+ }
223
273
  results.sort((a, b) => a.relativePath.localeCompare(b.relativePath));
224
274
  return results;
225
275
  }
226
- function collectHtmlSourceFiles(task) {
227
- const files = [];
228
- const htmlStats = (0, node_fs_1.statSync)(task.filePath);
229
- files.push({
230
- absolutePath: task.filePath,
231
- relativePath: (0, node_path_1.basename)(task.filePath),
232
- mtime: htmlStats.mtime,
233
- });
234
- const readmePath = (0, node_path_1.join)(task.projectDir, 'README.md');
235
- if ((0, node_fs_1.existsSync)(readmePath)) {
236
- const stats = (0, node_fs_1.statSync)(readmePath);
237
- files.push({ absolutePath: readmePath, relativePath: 'README.md', mtime: stats.mtime });
238
- }
239
- const agentsPath = (0, node_path_1.join)(task.projectDir, 'AGENTS.md');
240
- if ((0, node_fs_1.existsSync)(agentsPath)) {
241
- const stats = (0, node_fs_1.statSync)(agentsPath);
242
- files.push({ absolutePath: agentsPath, relativePath: 'AGENTS.md', mtime: stats.mtime });
243
- }
244
- if (task.catalogueAbsolutePath && (0, node_fs_1.existsSync)(task.catalogueAbsolutePath)) {
245
- const stats = (0, node_fs_1.statSync)(task.catalogueAbsolutePath);
246
- const relativePath = normalizeRelativePath(task.projectDir, task.catalogueAbsolutePath) || 'catalogue.json';
247
- files.push({ absolutePath: task.catalogueAbsolutePath, relativePath, mtime: stats.mtime });
276
+ // Files that are uploaded separately and should not be included in the bundle zip.
277
+ const RESERVED_BUNDLE_FILES = new Set(['source.zip', 'ecs.json', 'server.js']);
278
+ function isReservedBundlePath(relativePath) {
279
+ const normalized = relativePath.replace(/\\/g, '/');
280
+ const basenameValue = normalized.split('/').pop()?.toLowerCase() || '';
281
+ return RESERVED_BUNDLE_FILES.has(basenameValue);
282
+ }
283
+ function resolveRuntimeRoot(task) {
284
+ return (0, node_path_1.resolve)((0, node_path_1.dirname)(task.filePath));
285
+ }
286
+ function resolveBundleEntryPoint(task, runtimeRoot) {
287
+ const entryPoint = normalizeRelativePath(runtimeRoot, task.filePath);
288
+ if (!entryPoint || entryPoint.startsWith('..')) {
289
+ throw new Error(`[apps][build] App entry file for ${task.name} must remain inside runtime root ${runtimeRoot}.`);
248
290
  }
249
- files.sort((a, b) => a.relativePath.localeCompare(b.relativePath));
250
- return files;
291
+ return entryPoint;
251
292
  }
252
- // Files that are uploaded separately and should not be included in the bundle zip
253
- const RESERVED_BUNDLE_FILES = new Set(['ecs.json', 'server.js']);
254
293
  /**
255
294
  * Collect files for the bundle zip.
256
- * - For TypeScript projects: all files in the dist folder (excluding reserved files)
257
- * - For HTML projects: just the single HTML file (renamed to entry point)
295
+ * Collect files for the bundle zip from the runtime root (dirname(entry file)).
258
296
  */
259
297
  function collectBundleFiles(task) {
260
- if (task.isTypescriptProject) {
261
- const projectDir = (0, node_path_1.resolve)(task.projectDir);
262
- const outputDir = (0, node_path_1.resolve)((0, node_path_1.dirname)(task.filePath));
263
- if (outputDir === projectDir) {
264
- // If the app output is at project root, avoid zipping the whole project tree.
265
- // Bundle only the declared app entry file.
266
- const htmlStats = (0, node_fs_1.statSync)(task.filePath);
267
- const entryPoint = task.relativeFile || (0, node_path_1.basename)(task.filePath);
268
- return [{
269
- absolutePath: task.filePath,
270
- relativePath: entryPoint,
271
- mtime: htmlStats.mtime,
272
- }];
273
- }
274
- // For TypeScript projects with a dedicated output folder, zip that folder.
275
- const distDir = outputDir;
276
- const results = [];
277
- const stack = [distDir];
278
- const visited = new Set();
279
- while (stack.length > 0) {
280
- const current = stack.pop();
281
- if (visited.has(current))
282
- continue;
283
- visited.add(current);
284
- let dirEntries = [];
285
- try {
286
- dirEntries = (0, node_fs_1.readdirSync)(current, { withFileTypes: true });
287
- }
288
- catch {
289
- continue;
290
- }
291
- for (const entry of dirEntries) {
292
- const absolutePath = (0, node_path_1.join)(current, entry.name);
293
- const relativePath = normalizeRelativePath(distDir, absolutePath);
294
- if (!relativePath)
295
- continue;
296
- if (entry.isDirectory()) {
297
- stack.push(absolutePath);
298
- continue;
299
- }
300
- if (!entry.isFile())
301
- continue;
302
- // Skip reserved files - they are uploaded separately
303
- if (RESERVED_BUNDLE_FILES.has(entry.name)) {
304
- continue;
305
- }
306
- let stats;
307
- try {
308
- stats = (0, node_fs_1.statSync)(absolutePath);
309
- }
310
- catch {
311
- continue;
312
- }
313
- results.push({
314
- absolutePath,
315
- relativePath,
316
- mtime: stats.mtime,
317
- });
318
- }
319
- }
320
- results.sort((a, b) => a.relativePath.localeCompare(b.relativePath));
321
- return results;
322
- }
323
- // For HTML projects, zip just the single HTML file
324
- const htmlStats = (0, node_fs_1.statSync)(task.filePath);
325
- const entryPoint = task.relativeFile || (0, node_path_1.basename)(task.filePath);
326
- return [{
327
- absolutePath: task.filePath,
328
- relativePath: entryPoint,
329
- mtime: htmlStats.mtime,
330
- }];
298
+ const runtimeRoot = resolveRuntimeRoot(task);
299
+ const entryPoint = resolveBundleEntryPoint(task, runtimeRoot);
300
+ const rules = buildIgnoreRules(task.projectDir);
301
+ const entries = collectProjectFiles(runtimeRoot, rules, {
302
+ includeRelativeFiles: [entryPoint],
303
+ enforceReservedBundleNames: true,
304
+ });
305
+ return { entries, entryPoint };
331
306
  }
332
307
  function createBundleArchive(task) {
333
- const entries = collectBundleFiles(task);
308
+ const { entries, entryPoint } = collectBundleFiles(task);
334
309
  const buffer = createZipArchive(entries);
335
310
  const hash = (0, node_crypto_1.createHash)('sha256').update(buffer).digest('hex');
336
- return { buffer, hash };
311
+ return { buffer, hash, entryPoint };
337
312
  }
338
313
  const CRC32_TABLE = (() => {
339
314
  const table = new Uint32Array(256);
@@ -468,20 +443,25 @@ function createZipArchive(entries) {
468
443
  return Buffer.concat(chunks);
469
444
  }
470
445
  function createSourceArchive(task) {
446
+ const rules = buildIgnoreRules(task.projectDir);
447
+ const includeFiles = ['README.md', 'AGENTS.md'];
448
+ if (task.catalogueAbsolutePath && (0, node_fs_1.existsSync)(task.catalogueAbsolutePath)) {
449
+ const relativeCataloguePath = normalizeRelativePath(task.projectDir, task.catalogueAbsolutePath) || 'catalogue.json';
450
+ includeFiles.push(relativeCataloguePath);
451
+ }
471
452
  if (task.isTypescriptProject) {
472
453
  const cached = typescriptSourceCache.get(task.projectDir);
473
454
  if (cached) {
474
455
  return cached;
475
456
  }
476
- const rules = buildIgnoreRules(task.projectDir);
477
- const entries = collectProjectFiles(task.projectDir, rules);
457
+ const entries = collectProjectFiles(task.projectDir, rules, { includeRelativeFiles: includeFiles });
478
458
  const buffer = createZipArchive(entries);
479
459
  const hash = (0, node_crypto_1.createHash)('sha256').update(buffer).digest('hex');
480
460
  const record = { buffer, hash };
481
461
  typescriptSourceCache.set(task.projectDir, record);
482
462
  return record;
483
463
  }
484
- const entries = collectHtmlSourceFiles(task);
464
+ const entries = collectProjectFiles(task.projectDir, rules, { includeRelativeFiles: includeFiles });
485
465
  const buffer = createZipArchive(entries);
486
466
  const hash = (0, node_crypto_1.createHash)('sha256').update(buffer).digest('hex');
487
467
  return { buffer, hash };
@@ -524,11 +504,7 @@ async function buildApp(task) {
524
504
  if (task.surfaceTargets && task.surfaceTargets.length > 0) {
525
505
  metadata.surfaceTargets = task.surfaceTargets;
526
506
  }
527
- // For TypeScript projects, files are stored relative to dist directory,
528
- // so entryPoint should be the filename, not the full catalogue path
529
- metadata.entryPoint = task.isTypescriptProject
530
- ? (0, node_path_1.basename)(task.relativeFile)
531
- : task.relativeFile;
507
+ metadata.entryPoint = bundleArchive.entryPoint;
532
508
  // Build ecs file if path is defined
533
509
  let ecsFile;
534
510
  let ecsHash;
@@ -5,11 +5,33 @@ const types_1 = require("@playdrop/types");
5
5
  const node_fs_1 = require("node:fs");
6
6
  const node_path_1 = require("node:path");
7
7
  const http_1 = require("../http");
8
+ function isPngSignature(content) {
9
+ if (content.length < 8) {
10
+ return false;
11
+ }
12
+ return (content[0] === 0x89
13
+ && content[1] === 0x50
14
+ && content[2] === 0x4e
15
+ && content[3] === 0x47
16
+ && content[4] === 0x0d
17
+ && content[5] === 0x0a
18
+ && content[6] === 0x1a
19
+ && content[7] === 0x0a);
20
+ }
21
+ function isMp4Signature(content) {
22
+ if (content.length < 12) {
23
+ return false;
24
+ }
25
+ return content.toString('ascii', 4, 8) === 'ftyp';
26
+ }
8
27
  /**
9
28
  * Create a File object from a file path with specified MIME type.
10
29
  */
11
- function createFileFromPath(filePath, mimeType) {
30
+ function createFileFromPath(filePath, mimeType, validator) {
12
31
  const content = (0, node_fs_1.readFileSync)(filePath);
32
+ if (validator && !validator(content)) {
33
+ throw new Error(`Invalid listing file signature for ${filePath}. Expected ${mimeType}.`);
34
+ }
13
35
  const name = (0, node_path_1.basename)(filePath);
14
36
  return new File([content], name, { type: mimeType });
15
37
  }
@@ -25,6 +47,10 @@ async function uploadApp(client, task, artifacts, options) {
25
47
  * Upload an app version using the versioned API.
26
48
  */
27
49
  async function uploadAppVersion(client, task, artifacts, options) {
50
+ const creatorUsername = typeof options?.creatorUsername === 'string' ? options.creatorUsername.trim() : '';
51
+ if (!creatorUsername) {
52
+ throw new Error(`Missing creator username for app "${task.name}" upload.`);
53
+ }
28
54
  const versionOptions = {
29
55
  version: task.version,
30
56
  releaseNotes: task.releaseNotes,
@@ -37,8 +63,6 @@ async function uploadAppVersion(client, task, artifacts, options) {
37
63
  type: task.type,
38
64
  emoji: task.emoji ?? undefined,
39
65
  color: task.color ?? undefined,
40
- // Admin-only: publish as different user
41
- creatorUsername: options?.creatorUsername,
42
66
  };
43
67
  // For EXTERNAL hosting mode, use externalUrl instead of bundle
44
68
  if (task.hostingMode === 'EXTERNAL') {
@@ -61,29 +85,29 @@ async function uploadAppVersion(client, task, artifacts, options) {
61
85
  // Add listing assets if provided
62
86
  if (task.listing) {
63
87
  if (task.listing.iconPath) {
64
- versionOptions.icon = createFileFromPath(task.listing.iconPath, 'image/png');
88
+ versionOptions.icon = createFileFromPath(task.listing.iconPath, 'image/png', isPngSignature);
65
89
  }
66
90
  if (task.listing.heroPortraitPath) {
67
- versionOptions.heroPortrait = createFileFromPath(task.listing.heroPortraitPath, 'image/png');
91
+ versionOptions.heroPortrait = createFileFromPath(task.listing.heroPortraitPath, 'image/png', isPngSignature);
68
92
  }
69
93
  if (task.listing.heroLandscapePath) {
70
- versionOptions.heroLandscape = createFileFromPath(task.listing.heroLandscapePath, 'image/png');
94
+ versionOptions.heroLandscape = createFileFromPath(task.listing.heroLandscapePath, 'image/png', isPngSignature);
71
95
  }
72
96
  if (task.listing.screenshotPortraitPaths.length > 0) {
73
- versionOptions.screenshotsPortrait = task.listing.screenshotPortraitPaths.map((p) => createFileFromPath(p, 'image/png'));
97
+ versionOptions.screenshotsPortrait = task.listing.screenshotPortraitPaths.map((p) => createFileFromPath(p, 'image/png', isPngSignature));
74
98
  }
75
99
  if (task.listing.screenshotLandscapePaths.length > 0) {
76
- versionOptions.screenshotsLandscape = task.listing.screenshotLandscapePaths.map((p) => createFileFromPath(p, 'image/png'));
100
+ versionOptions.screenshotsLandscape = task.listing.screenshotLandscapePaths.map((p) => createFileFromPath(p, 'image/png', isPngSignature));
77
101
  }
78
102
  if (task.listing.videoPortraitPaths.length > 0) {
79
- versionOptions.videosPortrait = task.listing.videoPortraitPaths.map((p) => createFileFromPath(p, 'video/mp4'));
103
+ versionOptions.videosPortrait = task.listing.videoPortraitPaths.map((p) => createFileFromPath(p, 'video/mp4', isMp4Signature));
80
104
  }
81
105
  if (task.listing.videoLandscapePaths.length > 0) {
82
- versionOptions.videosLandscape = task.listing.videoLandscapePaths.map((p) => createFileFromPath(p, 'video/mp4'));
106
+ versionOptions.videosLandscape = task.listing.videoLandscapePaths.map((p) => createFileFromPath(p, 'video/mp4', isMp4Signature));
83
107
  }
84
108
  }
85
109
  try {
86
- const response = await client.uploadAppVersion(task.name, versionOptions);
110
+ const response = await client.uploadAppVersion(creatorUsername, task.name, versionOptions);
87
111
  return {
88
112
  versionCreated: true,
89
113
  version: response?.version?.version,
@@ -7,6 +7,15 @@ const node_path_1 = require("node:path");
7
7
  const build_1 = require("./build");
8
8
  const projectValidateCache = new Map();
9
9
  const projectFormatCache = new Map();
10
+ const LEGACY_SCAN_EXTENSIONS = new Set(['.ts', '.tsx', '.js', '.jsx', '.mjs', '.cjs', '.html']);
11
+ const LEGACY_SCAN_IGNORED_DIRS = new Set(['node_modules', '.git', 'dist-test', 'coverage']);
12
+ const LEGACY_SDK_SYMBOL_PATTERNS = [
13
+ { symbol: 'selectedAvatarKey', pattern: /\bselectedAvatarKey\b/g },
14
+ { symbol: 'sdk.entities', pattern: /\bsdk\s*\.\s*entities\b/g },
15
+ { symbol: 'sdk.assets.avatar', pattern: /\bsdk\s*\.\s*assets\s*\.\s*avatar\b/g },
16
+ { symbol: 'sdk.assets.block', pattern: /\bsdk\s*\.\s*assets\s*\.\s*block\b/g },
17
+ { symbol: 'loadEntity(', pattern: /\.\s*loadEntity\s*\(/g },
18
+ ];
10
19
  function ensureWithinProject(task) {
11
20
  const relativePath = (0, node_path_1.relative)(task.projectDir, task.filePath);
12
21
  const segments = relativePath.split(/[/\\]+/);
@@ -24,6 +33,54 @@ async function ensureValidateScript(task) {
24
33
  }
25
34
  await projectValidateCache.get(task.projectDir);
26
35
  }
36
+ function scanForLegacySdkSymbols(task) {
37
+ const findings = [];
38
+ const scanFile = (filePath) => {
39
+ const extension = (0, node_path_1.extname)(filePath).toLowerCase();
40
+ if (!LEGACY_SCAN_EXTENSIONS.has(extension)) {
41
+ return;
42
+ }
43
+ const source = (0, node_fs_1.readFileSync)(filePath, 'utf8');
44
+ for (const { symbol, pattern } of LEGACY_SDK_SYMBOL_PATTERNS) {
45
+ pattern.lastIndex = 0;
46
+ const hit = pattern.exec(source);
47
+ if (!hit) {
48
+ continue;
49
+ }
50
+ const index = typeof hit.index === 'number' ? hit.index : 0;
51
+ const line = source.slice(0, index).split('\n').length;
52
+ findings.push({
53
+ file: (0, node_path_1.relative)(task.projectDir, filePath),
54
+ line,
55
+ symbol,
56
+ });
57
+ }
58
+ };
59
+ const walk = (directory) => {
60
+ const entries = (0, node_fs_1.readdirSync)(directory, { withFileTypes: true });
61
+ for (const entry of entries) {
62
+ if (LEGACY_SCAN_IGNORED_DIRS.has(entry.name)) {
63
+ continue;
64
+ }
65
+ const nextPath = (0, node_path_1.join)(directory, entry.name);
66
+ if (entry.isDirectory()) {
67
+ walk(nextPath);
68
+ }
69
+ else if (entry.isFile()) {
70
+ scanFile(nextPath);
71
+ }
72
+ }
73
+ };
74
+ walk(task.projectDir);
75
+ if (findings.length > 0) {
76
+ const details = findings
77
+ .slice(0, 10)
78
+ .map((entry) => `${entry.file}:${entry.line} (${entry.symbol})`)
79
+ .join(', ');
80
+ const suffix = findings.length > 10 ? ` (+${findings.length - 10} more)` : '';
81
+ throw new Error(`[apps][validate] legacy SDK symbols detected for ${task.name}: ${details}${suffix}. Remove entity-era APIs before publishing.`);
82
+ }
83
+ }
27
84
  async function runFormatScript(task) {
28
85
  if (!task.packageJsonPath || !task.hasFormatScript) {
29
86
  return false;
@@ -53,6 +110,9 @@ async function validateAppTask(task) {
53
110
  if (!task.relativeFile) {
54
111
  throw new Error(`[apps][validate] ${task.name} is missing a "file" field in ${task.cataloguePath}.`);
55
112
  }
113
+ if (task.isTypescriptProject && !task.hasValidateScript) {
114
+ throw new Error(`[apps][validate] ${task.name} is missing a required "validate" script in package.json. Define a validate command (for example "validate": "npm run build").`);
115
+ }
56
116
  ensureWithinProject(task);
57
117
  if (!task.isTypescriptProject) {
58
118
  if (!(0, node_fs_1.existsSync)(task.filePath)) {
@@ -72,4 +132,5 @@ async function validateAppTask(task) {
72
132
  throw new Error(`[apps][validate] npm run validate failed for ${task.name}: ${message}`);
73
133
  }
74
134
  }
135
+ scanForLegacySdkSymbols(task);
75
136
  }
@@ -0,0 +1,8 @@
1
+ import type { AssetTask, EmbeddedAssetTask } from '../catalogue';
2
+ type ModelAssetTask = AssetTask | EmbeddedAssetTask;
3
+ export declare function isGeneratedModel3DAssetTask(task: ModelAssetTask, format?: string): boolean;
4
+ export declare function assertGeneratedModel3DAssetRoles(task: ModelAssetTask, format?: string): void;
5
+ export declare function prepareModel3DAssetArtifacts(task: ModelAssetTask, options?: {
6
+ dryRun?: boolean;
7
+ }): Promise<boolean>;
8
+ export {};