@playdrop/playdrop-cli 0.16.5 → 0.16.11

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 (383) hide show
  1. package/bin/playdrop +1 -2
  2. package/config/client-meta.json +4 -4
  3. package/dist/apiClient.d.ts +2 -2
  4. package/dist/apiClient.js +16 -20
  5. package/dist/appUrls.d.ts +2 -2
  6. package/dist/appUrls.js +31 -33
  7. package/dist/apps/build.d.ts +2 -2
  8. package/dist/apps/build.js +83 -83
  9. package/dist/apps/index.d.ts +7 -7
  10. package/dist/apps/index.js +8 -8
  11. package/dist/apps/loadCheck.d.ts +28 -16
  12. package/dist/apps/loadCheck.js +411 -279
  13. package/dist/apps/registration.d.ts +3 -3
  14. package/dist/apps/registration.js +1 -1
  15. package/dist/apps/staticHtml.d.ts +3 -3
  16. package/dist/apps/staticHtml.js +90 -91
  17. package/dist/apps/surfaceProfiles.d.ts +2 -2
  18. package/dist/apps/surfaceProfiles.js +6 -6
  19. package/dist/apps/upload.d.ts +5 -5
  20. package/dist/apps/upload.js +75 -81
  21. package/dist/apps/validate.d.ts +2 -2
  22. package/dist/apps/validate.js +18 -22
  23. package/dist/assetSpecs.d.ts +2 -2
  24. package/dist/assetSpecs.js +35 -35
  25. package/dist/assets/model-artifacts.d.ts +1 -1
  26. package/dist/assets/model-artifacts.js +81 -77
  27. package/dist/assets/model-worker.d.ts +1 -1
  28. package/dist/assets/model-worker.js +6 -6
  29. package/dist/browser.js +9 -9
  30. package/dist/catalogue-utils.d.ts +1 -1
  31. package/dist/catalogue-utils.js +26 -26
  32. package/dist/catalogue.d.ts +21 -16
  33. package/dist/catalogue.js +509 -413
  34. package/dist/clientInfo.d.ts +1 -1
  35. package/dist/clientInfo.js +28 -28
  36. package/dist/commandContext.d.ts +5 -5
  37. package/dist/commandContext.js +19 -23
  38. package/dist/commands/accounts.js +6 -6
  39. package/dist/commands/ads.js +16 -16
  40. package/dist/commands/agents.d.ts +2 -2
  41. package/dist/commands/agents.js +131 -127
  42. package/dist/commands/boosts.js +41 -31
  43. package/dist/commands/browse.d.ts +2 -2
  44. package/dist/commands/browse.js +168 -128
  45. package/dist/commands/build.js +9 -9
  46. package/dist/commands/captureListing.d.ts +8 -8
  47. package/dist/commands/captureListing.js +292 -332
  48. package/dist/commands/changelog.js +1 -1
  49. package/dist/commands/chat.js +51 -53
  50. package/dist/commands/check.d.ts +1 -1
  51. package/dist/commands/check.js +44 -44
  52. package/dist/commands/clients.d.ts +3 -3
  53. package/dist/commands/clients.js +67 -64
  54. package/dist/commands/comments.js +36 -29
  55. package/dist/commands/create.js +305 -312
  56. package/dist/commands/createRemixContent.d.ts +1 -1
  57. package/dist/commands/createRemixContent.js +65 -60
  58. package/dist/commands/creations.js +205 -135
  59. package/dist/commands/credits.js +37 -27
  60. package/dist/commands/detail.js +40 -34
  61. package/dist/commands/dev.js +103 -126
  62. package/dist/commands/devBrowser.js +74 -65
  63. package/dist/commands/devRuntimeAssets.d.ts +4 -4
  64. package/dist/commands/devRuntimeAssets.js +38 -40
  65. package/dist/commands/devServer.d.ts +4 -4
  66. package/dist/commands/devServer.js +183 -174
  67. package/dist/commands/devShared.d.ts +3 -3
  68. package/dist/commands/devShared.js +31 -31
  69. package/dist/commands/doctor.d.ts +5 -5
  70. package/dist/commands/doctor.js +63 -57
  71. package/dist/commands/documentation.js +42 -32
  72. package/dist/commands/feedback.js +59 -42
  73. package/dist/commands/format.js +9 -9
  74. package/dist/commands/generation.d.ts +2 -2
  75. package/dist/commands/generation.js +344 -326
  76. package/dist/commands/init.d.ts +4 -4
  77. package/dist/commands/init.js +64 -61
  78. package/dist/commands/login.d.ts +2 -2
  79. package/dist/commands/login.js +42 -62
  80. package/dist/commands/logout.js +4 -4
  81. package/dist/commands/marketing.d.ts +8 -8
  82. package/dist/commands/marketing.js +246 -297
  83. package/dist/commands/notes.js +19 -19
  84. package/dist/commands/notifications.js +34 -22
  85. package/dist/commands/npmProcess.js +3 -3
  86. package/dist/commands/ownedRuntimeImageValidation.d.ts +1 -1
  87. package/dist/commands/ownedRuntimeImageValidation.js +19 -17
  88. package/dist/commands/play.js +12 -21
  89. package/dist/commands/publicPages.js +8 -4
  90. package/dist/commands/review.js +123 -110
  91. package/dist/commands/search.js +107 -88
  92. package/dist/commands/tags.js +10 -12
  93. package/dist/commands/taskCaptureSession.d.ts +3 -3
  94. package/dist/commands/taskCaptureSession.js +3 -3
  95. package/dist/commands/tweaks.js +25 -23
  96. package/dist/commands/upgrade.js +40 -31
  97. package/dist/commands/upload-content.d.ts +5 -5
  98. package/dist/commands/upload-content.js +130 -122
  99. package/dist/commands/upload-graph.d.ts +1 -1
  100. package/dist/commands/upload-graph.js +7 -11
  101. package/dist/commands/upload.d.ts +7 -7
  102. package/dist/commands/upload.js +196 -217
  103. package/dist/commands/validate.js +33 -32
  104. package/dist/commands/versionsBrowse.js +61 -51
  105. package/dist/commands/whoami.js +11 -14
  106. package/dist/commands/worker/archive-staging.d.ts +9 -0
  107. package/dist/commands/worker/archive-staging.js +257 -0
  108. package/dist/commands/worker/instrument-evidence.d.ts +1 -1
  109. package/dist/commands/worker/instrument-evidence.js +41 -43
  110. package/dist/commands/worker/provider-telemetry.d.ts +2 -1
  111. package/dist/commands/worker/provider-telemetry.js +181 -64
  112. package/dist/commands/worker/runtime.d.ts +18 -3
  113. package/dist/commands/worker/runtime.js +291 -239
  114. package/dist/commands/worker.d.ts +83 -22
  115. package/dist/commands/worker.js +1980 -1411
  116. package/dist/commands/workspaces.d.ts +2 -2
  117. package/dist/commands/workspaces.js +57 -57
  118. package/dist/config.js +23 -20
  119. package/dist/devAuth.d.ts +3 -3
  120. package/dist/devAuth.js +20 -17
  121. package/dist/environment.d.ts +1 -1
  122. package/dist/environment.js +34 -34
  123. package/dist/errors.d.ts +1 -1
  124. package/dist/errors.js +7 -7
  125. package/dist/externalAssetPackValidation.d.ts +1 -1
  126. package/dist/externalAssetPackValidation.js +9 -9
  127. package/dist/http.d.ts +1 -1
  128. package/dist/http.js +9 -9
  129. package/dist/index.js +657 -664
  130. package/dist/listingCaptureLease.js +23 -23
  131. package/dist/listingPreflight.d.ts +2 -2
  132. package/dist/listingPreflight.js +33 -33
  133. package/dist/messages.js +6 -14
  134. package/dist/output.js +9 -9
  135. package/dist/playwright.d.ts +1 -1
  136. package/dist/playwright.js +35 -40
  137. package/dist/proxyFetch.js +30 -27
  138. package/dist/recorderRelease.js +8 -8
  139. package/dist/refs.d.ts +5 -5
  140. package/dist/refs.js +40 -37
  141. package/dist/sessionCookie.js +15 -21
  142. package/dist/shellProbe.js +5 -5
  143. package/dist/taskSelection.d.ts +3 -3
  144. package/dist/taskSelection.js +67 -62
  145. package/dist/taskUtils.d.ts +1 -1
  146. package/dist/taskUtils.js +4 -4
  147. package/dist/tweakStaleness.d.ts +3 -3
  148. package/dist/tweakStaleness.js +8 -8
  149. package/dist/uploadLog.d.ts +3 -3
  150. package/dist/uploadLog.js +51 -51
  151. package/dist/versionCompare.js +3 -3
  152. package/dist/workerAppProject.d.ts +1 -1
  153. package/dist/workerAppProject.js +10 -17
  154. package/dist/workspaceAuth.d.ts +1 -1
  155. package/dist/workspaceAuth.js +28 -22
  156. package/node_modules/@playdrop/ai-client/dist/index.d.ts +35 -35
  157. package/node_modules/@playdrop/ai-client/dist/index.d.ts.map +1 -1
  158. package/node_modules/@playdrop/api-client/dist/client.d.ts +34 -33
  159. package/node_modules/@playdrop/api-client/dist/client.d.ts.map +1 -1
  160. package/node_modules/@playdrop/api-client/dist/core/errors.d.ts +1 -1
  161. package/node_modules/@playdrop/api-client/dist/core/errors.d.ts.map +1 -1
  162. package/node_modules/@playdrop/api-client/dist/core/request.d.ts +2 -2
  163. package/node_modules/@playdrop/api-client/dist/core/request.d.ts.map +1 -1
  164. package/node_modules/@playdrop/api-client/dist/domains/admin.d.ts +2 -2
  165. package/node_modules/@playdrop/api-client/dist/domains/admin.d.ts.map +1 -1
  166. package/node_modules/@playdrop/api-client/dist/domains/admin.js +4 -1
  167. package/node_modules/@playdrop/api-client/dist/domains/agent-tasks.d.ts +4 -3
  168. package/node_modules/@playdrop/api-client/dist/domains/agent-tasks.d.ts.map +1 -1
  169. package/node_modules/@playdrop/api-client/dist/domains/agent-tasks.js +12 -0
  170. package/node_modules/@playdrop/api-client/dist/domains/ai.d.ts +2 -2
  171. package/node_modules/@playdrop/api-client/dist/domains/ai.d.ts.map +1 -1
  172. package/node_modules/@playdrop/api-client/dist/domains/apps.d.ts +4 -4
  173. package/node_modules/@playdrop/api-client/dist/domains/apps.d.ts.map +1 -1
  174. package/node_modules/@playdrop/api-client/dist/domains/asset-packs.d.ts +4 -4
  175. package/node_modules/@playdrop/api-client/dist/domains/asset-packs.d.ts.map +1 -1
  176. package/node_modules/@playdrop/api-client/dist/domains/assets.d.ts +4 -4
  177. package/node_modules/@playdrop/api-client/dist/domains/assets.d.ts.map +1 -1
  178. package/node_modules/@playdrop/api-client/dist/domains/auth.d.ts +2 -2
  179. package/node_modules/@playdrop/api-client/dist/domains/auth.d.ts.map +1 -1
  180. package/node_modules/@playdrop/api-client/dist/domains/chat.d.ts +2 -2
  181. package/node_modules/@playdrop/api-client/dist/domains/chat.d.ts.map +1 -1
  182. package/node_modules/@playdrop/api-client/dist/domains/comments.d.ts +3 -3
  183. package/node_modules/@playdrop/api-client/dist/domains/comments.d.ts.map +1 -1
  184. package/node_modules/@playdrop/api-client/dist/domains/free-credits.d.ts +2 -2
  185. package/node_modules/@playdrop/api-client/dist/domains/free-credits.d.ts.map +1 -1
  186. package/node_modules/@playdrop/api-client/dist/domains/me.d.ts +2 -2
  187. package/node_modules/@playdrop/api-client/dist/domains/me.d.ts.map +1 -1
  188. package/node_modules/@playdrop/api-client/dist/domains/payments.d.ts +2 -2
  189. package/node_modules/@playdrop/api-client/dist/domains/payments.d.ts.map +1 -1
  190. package/node_modules/@playdrop/api-client/dist/domains/player-meta.d.ts +2 -2
  191. package/node_modules/@playdrop/api-client/dist/domains/player-meta.d.ts.map +1 -1
  192. package/node_modules/@playdrop/api-client/dist/domains/playtrade.d.ts +3 -3
  193. package/node_modules/@playdrop/api-client/dist/domains/playtrade.d.ts.map +1 -1
  194. package/node_modules/@playdrop/api-client/dist/domains/playtrade.js +2 -2
  195. package/node_modules/@playdrop/api-client/dist/domains/search.d.ts +2 -2
  196. package/node_modules/@playdrop/api-client/dist/domains/search.d.ts.map +1 -1
  197. package/node_modules/@playdrop/api-client/dist/domains/tags.d.ts +2 -2
  198. package/node_modules/@playdrop/api-client/dist/domains/tags.d.ts.map +1 -1
  199. package/node_modules/@playdrop/api-client/dist/index.d.ts +19 -18
  200. package/node_modules/@playdrop/api-client/dist/index.d.ts.map +1 -1
  201. package/node_modules/@playdrop/api-client/dist/index.js +7 -2
  202. package/node_modules/@playdrop/boxel-core/dist/src/entity-cleaner.d.ts +1 -1
  203. package/node_modules/@playdrop/boxel-core/dist/src/entity-cleaner.js +47 -47
  204. package/node_modules/@playdrop/boxel-core/dist/src/entity-cleaner.js.map +1 -1
  205. package/node_modules/@playdrop/boxel-core/dist/src/entity-utils.d.ts +3 -3
  206. package/node_modules/@playdrop/boxel-core/dist/src/entity-utils.js +32 -47
  207. package/node_modules/@playdrop/boxel-core/dist/src/entity-utils.js.map +1 -1
  208. package/node_modules/@playdrop/boxel-core/dist/src/format-utils.js +16 -18
  209. package/node_modules/@playdrop/boxel-core/dist/src/format-utils.js.map +1 -1
  210. package/node_modules/@playdrop/boxel-core/dist/src/humanoid/geometry.d.ts +2 -2
  211. package/node_modules/@playdrop/boxel-core/dist/src/humanoid/index.d.ts +4 -4
  212. package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r15/common.d.ts +1 -1
  213. package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r15/index.d.ts +3 -3
  214. package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r15/textured-builder.d.ts +2 -2
  215. package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r15/textured-builder.js +44 -45
  216. package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r15/textured-builder.js.map +1 -1
  217. package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r15/types.d.ts +1 -1
  218. package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r15/voxel-builder.d.ts +2 -2
  219. package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r15/voxel-builder.js +40 -44
  220. package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r15/voxel-builder.js.map +1 -1
  221. package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r6/builder.d.ts +2 -2
  222. package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r6/builder.js +30 -34
  223. package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r6/builder.js.map +1 -1
  224. package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r6/index.d.ts +4 -4
  225. package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r6/index.js.map +1 -1
  226. package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r6/scanner.d.ts +3 -3
  227. package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r6/scanner.js +23 -20
  228. package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r6/scanner.js.map +1 -1
  229. package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r6/textures/artifacts.d.ts +3 -3
  230. package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r6/textures/artifacts.js +3 -3
  231. package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r6/textures/face-map.d.ts +1 -1
  232. package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r6/textures/face-map.js +21 -21
  233. package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r6/textures/face-map.js.map +1 -1
  234. package/node_modules/@playdrop/boxel-core/dist/src/humanoid/templates/index.d.ts +1 -1
  235. package/node_modules/@playdrop/boxel-core/dist/src/humanoid/templates/index.js +2 -2
  236. package/node_modules/@playdrop/boxel-core/dist/src/index.d.ts +19 -19
  237. package/node_modules/@playdrop/boxel-core/dist/src/materials.d.ts +1 -1
  238. package/node_modules/@playdrop/boxel-core/dist/src/materials.js +12 -16
  239. package/node_modules/@playdrop/boxel-core/dist/src/materials.js.map +1 -1
  240. package/node_modules/@playdrop/boxel-core/dist/src/palette_tools.d.ts +1 -1
  241. package/node_modules/@playdrop/boxel-core/dist/src/palette_tools.js +38 -41
  242. package/node_modules/@playdrop/boxel-core/dist/src/palette_tools.js.map +1 -1
  243. package/node_modules/@playdrop/boxel-core/dist/src/serialization.d.ts +1 -1
  244. package/node_modules/@playdrop/boxel-core/dist/src/serialization.js +54 -56
  245. package/node_modules/@playdrop/boxel-core/dist/src/serialization.js.map +1 -1
  246. package/node_modules/@playdrop/boxel-core/dist/src/textures.d.ts +3 -3
  247. package/node_modules/@playdrop/boxel-core/dist/src/textures.js +39 -45
  248. package/node_modules/@playdrop/boxel-core/dist/src/textures.js.map +1 -1
  249. package/node_modules/@playdrop/boxel-core/dist/src/transforms/textured-boxes/infer-face.d.ts +2 -2
  250. package/node_modules/@playdrop/boxel-core/dist/src/transforms/textured-boxes/infer-face.js +39 -43
  251. package/node_modules/@playdrop/boxel-core/dist/src/transforms/textured-boxes/infer-face.js.map +1 -1
  252. package/node_modules/@playdrop/boxel-core/dist/src/transforms/textured-boxes/layer-mode.d.ts +3 -3
  253. package/node_modules/@playdrop/boxel-core/dist/src/transforms/textured-boxes/layer-mode.js +35 -35
  254. package/node_modules/@playdrop/boxel-core/dist/src/transforms/textured-boxes/layer-mode.js.map +1 -1
  255. package/node_modules/@playdrop/boxel-core/dist/src/transforms/textured-boxes/merge-overlay.d.ts +1 -1
  256. package/node_modules/@playdrop/boxel-core/dist/src/transforms/textured-boxes/merge-overlay.js +18 -18
  257. package/node_modules/@playdrop/boxel-core/dist/src/transforms/textured-boxes/merge-overlay.js.map +1 -1
  258. package/node_modules/@playdrop/boxel-core/dist/src/transforms/textured-boxes/slice.d.ts +3 -3
  259. package/node_modules/@playdrop/boxel-core/dist/src/transforms/textured-boxes/slice.js +50 -48
  260. package/node_modules/@playdrop/boxel-core/dist/src/transforms/textured-boxes/slice.js.map +1 -1
  261. package/node_modules/@playdrop/boxel-core/dist/src/transforms/upscale.d.ts +1 -1
  262. package/node_modules/@playdrop/boxel-core/dist/src/transforms/upscale.js +22 -26
  263. package/node_modules/@playdrop/boxel-core/dist/src/transforms/upscale.js.map +1 -1
  264. package/node_modules/@playdrop/boxel-core/dist/src/transforms/voxels/slice.d.ts +2 -2
  265. package/node_modules/@playdrop/boxel-core/dist/src/transforms/voxels/slice.js +8 -8
  266. package/node_modules/@playdrop/boxel-core/dist/src/transforms/voxels/slice.js.map +1 -1
  267. package/node_modules/@playdrop/boxel-core/dist/src/transforms/voxels/textured-to-voxel.d.ts +2 -2
  268. package/node_modules/@playdrop/boxel-core/dist/src/transforms/voxels/textured-to-voxel.js +23 -28
  269. package/node_modules/@playdrop/boxel-core/dist/src/transforms/voxels/textured-to-voxel.js.map +1 -1
  270. package/node_modules/@playdrop/boxel-core/dist/src/types.d.ts +8 -8
  271. package/node_modules/@playdrop/boxel-core/dist/src/validation.d.ts +1 -1
  272. package/node_modules/@playdrop/boxel-core/dist/src/validation.js +93 -95
  273. package/node_modules/@playdrop/boxel-core/dist/src/validation.js.map +1 -1
  274. package/node_modules/@playdrop/boxel-core/dist/src/voxels/greedy-mesher.d.ts +1 -1
  275. package/node_modules/@playdrop/boxel-core/dist/src/voxels/greedy-mesher.js +2 -2
  276. package/node_modules/@playdrop/boxel-core/dist/src/voxels/greedy-mesher.js.map +1 -1
  277. package/node_modules/@playdrop/boxel-core/dist/src/voxels.d.ts +1 -1
  278. package/node_modules/@playdrop/boxel-core/dist/src/voxels.js +2 -7
  279. package/node_modules/@playdrop/boxel-core/dist/src/voxels.js.map +1 -1
  280. package/node_modules/@playdrop/boxel-three/dist/src/animations.d.ts +3 -3
  281. package/node_modules/@playdrop/boxel-three/dist/src/builders.d.ts +4 -4
  282. package/node_modules/@playdrop/boxel-three/dist/src/context.d.ts +3 -3
  283. package/node_modules/@playdrop/boxel-three/dist/src/exporters/glb.d.ts +6 -6
  284. package/node_modules/@playdrop/boxel-three/dist/src/exporters/glb.js +9 -1
  285. package/node_modules/@playdrop/boxel-three/dist/src/exporters/image.d.ts +3 -3
  286. package/node_modules/@playdrop/boxel-three/dist/src/index.d.ts +17 -17
  287. package/node_modules/@playdrop/boxel-three/dist/src/instantiate.d.ts +9 -9
  288. package/node_modules/@playdrop/boxel-three/dist/src/nodes.d.ts +3 -3
  289. package/node_modules/@playdrop/boxel-three/dist/src/nodes.js +1 -1
  290. package/node_modules/@playdrop/boxel-three/dist/src/overlays.d.ts +2 -2
  291. package/node_modules/@playdrop/boxel-three/dist/src/primitives.d.ts +1 -1
  292. package/node_modules/@playdrop/boxel-three/dist/src/scene.d.ts +1 -1
  293. package/node_modules/@playdrop/boxel-three/dist/src/skinned-mesh.d.ts +2 -2
  294. package/node_modules/@playdrop/boxel-three/dist/src/texture-atlas.d.ts +1 -1
  295. package/node_modules/@playdrop/boxel-three/dist/src/textures.d.ts +3 -3
  296. package/node_modules/@playdrop/boxel-three/dist/src/types.d.ts +4 -4
  297. package/node_modules/@playdrop/boxel-three/dist/src/voxels/faces.d.ts +2 -2
  298. package/node_modules/@playdrop/boxel-three/dist/src/voxels/mesher.d.ts +1 -1
  299. package/node_modules/@playdrop/boxel-three/dist/test/fixtures/render-worker.d.ts +1 -1
  300. package/node_modules/@playdrop/config/client-meta.json +4 -4
  301. package/node_modules/@playdrop/config/dist/src/client-meta.d.ts +1 -1
  302. package/node_modules/@playdrop/config/dist/src/client-meta.d.ts.map +1 -1
  303. package/node_modules/@playdrop/config/dist/src/client-meta.js +10 -10
  304. package/node_modules/@playdrop/config/dist/src/constants.js +10 -10
  305. package/node_modules/@playdrop/config/dist/src/creator-plans.d.ts +1 -1
  306. package/node_modules/@playdrop/config/dist/src/creator-plans.d.ts.map +1 -1
  307. package/node_modules/@playdrop/config/dist/src/creator-plans.js +27 -28
  308. package/node_modules/@playdrop/config/dist/src/deployment.d.ts +4 -4
  309. package/node_modules/@playdrop/config/dist/src/deployment.d.ts.map +1 -1
  310. package/node_modules/@playdrop/config/dist/src/deployment.js +42 -41
  311. package/node_modules/@playdrop/config/dist/src/game-arena.js +12 -12
  312. package/node_modules/@playdrop/config/dist/src/index.d.ts +9 -9
  313. package/node_modules/@playdrop/config/dist/src/index.d.ts.map +1 -1
  314. package/node_modules/@playdrop/config/dist/src/index.js +24 -25
  315. package/node_modules/@playdrop/config/dist/src/public-deployment.d.ts +4 -4
  316. package/node_modules/@playdrop/config/dist/src/public-deployment.d.ts.map +1 -1
  317. package/node_modules/@playdrop/config/dist/src/public-deployment.js +41 -39
  318. package/node_modules/@playdrop/config/dist/src/runtime-client-meta.js +1 -3
  319. package/node_modules/@playdrop/config/dist/src/runtime-service-origins.d.ts.map +1 -1
  320. package/node_modules/@playdrop/config/dist/src/runtime-service-origins.js +23 -25
  321. package/node_modules/@playdrop/config/dist/src/server/fastify.d.ts +5 -5
  322. package/node_modules/@playdrop/config/dist/src/server/fastify.d.ts.map +1 -1
  323. package/node_modules/@playdrop/config/dist/src/server/fastify.js +44 -46
  324. package/node_modules/@playdrop/config/dist/src/server/logging.d.ts +1 -1
  325. package/node_modules/@playdrop/config/dist/src/server/logging.d.ts.map +1 -1
  326. package/node_modules/@playdrop/config/dist/src/server/logging.js +6 -8
  327. package/node_modules/@playdrop/config/dist/src/types.d.ts +2 -2
  328. package/node_modules/@playdrop/config/dist/test/creator-plans.test.js +12 -12
  329. package/node_modules/@playdrop/config/dist/test/deployment.test.js +59 -59
  330. package/node_modules/@playdrop/config/dist/test/fastify.test.js +4 -4
  331. package/node_modules/@playdrop/config/dist/test/game-arena.test.js +8 -8
  332. package/node_modules/@playdrop/config/dist/test/logging.test.js +6 -6
  333. package/node_modules/@playdrop/config/dist/test/validateClientEnvironment.test.js +57 -57
  334. package/node_modules/@playdrop/config/dist/tsconfig.tsbuildinfo +1 -1
  335. package/node_modules/@playdrop/types/dist/agent-task-playtest.d.ts.map +1 -1
  336. package/node_modules/@playdrop/types/dist/agent-task-terminal.d.ts +2 -2
  337. package/node_modules/@playdrop/types/dist/agent-task-terminal.d.ts.map +1 -1
  338. package/node_modules/@playdrop/types/dist/api.d.ts +314 -250
  339. package/node_modules/@playdrop/types/dist/api.d.ts.map +1 -1
  340. package/node_modules/@playdrop/types/dist/api.js +40 -59
  341. package/node_modules/@playdrop/types/dist/app-capability-filters.d.ts +2 -2
  342. package/node_modules/@playdrop/types/dist/app-playtest-tape.d.ts +6 -6
  343. package/node_modules/@playdrop/types/dist/app-playtest-tape.d.ts.map +1 -1
  344. package/node_modules/@playdrop/types/dist/app-review.d.ts +2 -2
  345. package/node_modules/@playdrop/types/dist/app-review.d.ts.map +1 -1
  346. package/node_modules/@playdrop/types/dist/app-review.js +1 -6
  347. package/node_modules/@playdrop/types/dist/app.d.ts.map +1 -1
  348. package/node_modules/@playdrop/types/dist/asset-pack.d.ts +5 -5
  349. package/node_modules/@playdrop/types/dist/asset-spec.d.ts +4 -4
  350. package/node_modules/@playdrop/types/dist/asset.d.ts +11 -11
  351. package/node_modules/@playdrop/types/dist/attachment-policy.d.ts.map +1 -1
  352. package/node_modules/@playdrop/types/dist/chat.d.ts +3 -3
  353. package/node_modules/@playdrop/types/dist/creator-public-image.d.ts.map +1 -1
  354. package/node_modules/@playdrop/types/dist/graph.d.ts +4 -4
  355. package/node_modules/@playdrop/types/dist/index.d.ts +25 -25
  356. package/node_modules/@playdrop/types/dist/instrument-evidence.d.ts +2 -2
  357. package/node_modules/@playdrop/types/dist/instrument-evidence.d.ts.map +1 -1
  358. package/node_modules/@playdrop/types/dist/instrument-evidence.js +2 -11
  359. package/node_modules/@playdrop/types/dist/locale.d.ts +2 -2
  360. package/node_modules/@playdrop/types/dist/locale.d.ts.map +1 -1
  361. package/node_modules/@playdrop/types/dist/locale.js +2 -17
  362. package/node_modules/@playdrop/types/dist/owned-assets.d.ts +2 -2
  363. package/node_modules/@playdrop/types/dist/owned-assets.d.ts.map +1 -1
  364. package/node_modules/@playdrop/types/dist/player-meta.d.ts +3 -3
  365. package/node_modules/@playdrop/types/dist/player-meta.d.ts.map +1 -1
  366. package/node_modules/@playdrop/types/dist/playtest-notes.d.ts +11 -11
  367. package/node_modules/@playdrop/types/dist/playtest-notes.d.ts.map +1 -1
  368. package/node_modules/@playdrop/types/dist/playtrade.d.ts +8 -5
  369. package/node_modules/@playdrop/types/dist/playtrade.d.ts.map +1 -1
  370. package/node_modules/@playdrop/types/dist/realtime.d.ts +1 -1
  371. package/node_modules/@playdrop/types/dist/tweaks.d.ts +4 -4
  372. package/node_modules/@playdrop/types/dist/tweaks.d.ts.map +1 -1
  373. package/node_modules/@playdrop/types/dist/tweaks.js +12 -2
  374. package/node_modules/@playdrop/types/dist/version.d.ts +14 -14
  375. package/node_modules/@playdrop/types/dist/version.d.ts.map +1 -1
  376. package/node_modules/@playdrop/types/dist/version.js +4 -1
  377. package/node_modules/@playdrop/vox-three/dist/src/index.d.ts +1 -1
  378. package/node_modules/@playdrop/vox-three/dist/src/vox.d.ts +2 -2
  379. package/node_modules/@playdrop/vox-three/dist/src/vox.js +20 -18
  380. package/node_modules/@playdrop/vox-three/dist/src/vox.js.map +1 -1
  381. package/node_modules/@playdrop/vox-three/dist/test/vox.test.js +11 -14
  382. package/node_modules/@playdrop/vox-three/dist/test/vox.test.js.map +1 -1
  383. package/package.json +1 -1
@@ -10,39 +10,39 @@ const node_path_1 = require("node:path");
10
10
  const http_1 = require("../http");
11
11
  const loadCheck_1 = require("./loadCheck");
12
12
  const EXTENSION_TO_MIME = {
13
- '.png': 'image/png',
14
- '.jpg': 'image/jpeg',
15
- '.jpeg': 'image/jpeg',
16
- '.webp': 'image/webp',
17
- '.gif': 'image/gif',
18
- '.mp4': 'video/mp4',
19
- '.webm': 'video/webm',
20
- '.mp3': 'audio/mpeg',
21
- '.wav': 'audio/wav',
22
- '.ogg': 'audio/ogg',
23
- '.json': 'application/json',
24
- '.gltf': 'model/gltf+json',
25
- '.glb': 'model/gltf-binary',
26
- '.vox': 'application/octet-stream',
13
+ ".png": "image/png",
14
+ ".jpg": "image/jpeg",
15
+ ".jpeg": "image/jpeg",
16
+ ".webp": "image/webp",
17
+ ".gif": "image/gif",
18
+ ".mp4": "video/mp4",
19
+ ".webm": "video/webm",
20
+ ".mp3": "audio/mpeg",
21
+ ".wav": "audio/wav",
22
+ ".ogg": "audio/ogg",
23
+ ".json": "application/json",
24
+ ".gltf": "model/gltf+json",
25
+ ".glb": "model/gltf-binary",
26
+ ".vox": "application/octet-stream",
27
27
  };
28
28
  function isPngSignature(content) {
29
29
  if (content.length < 8) {
30
30
  return false;
31
31
  }
32
- return (content[0] === 0x89
33
- && content[1] === 0x50
34
- && content[2] === 0x4e
35
- && content[3] === 0x47
36
- && content[4] === 0x0d
37
- && content[5] === 0x0a
38
- && content[6] === 0x1a
39
- && content[7] === 0x0a);
32
+ return (content[0] === 0x89 &&
33
+ content[1] === 0x50 &&
34
+ content[2] === 0x4e &&
35
+ content[3] === 0x47 &&
36
+ content[4] === 0x0d &&
37
+ content[5] === 0x0a &&
38
+ content[6] === 0x1a &&
39
+ content[7] === 0x0a);
40
40
  }
41
41
  function isMp4Signature(content) {
42
42
  if (content.length < 12) {
43
43
  return false;
44
44
  }
45
- return content.toString('ascii', 4, 8) === 'ftyp';
45
+ return content.toString("ascii", 4, 8) === "ftyp";
46
46
  }
47
47
  function createUploadValidationError(code, message) {
48
48
  const error = new Error(`${code}: ${message}`);
@@ -73,9 +73,9 @@ async function bufferFromFile(file) {
73
73
  return Buffer.from(await file.arrayBuffer());
74
74
  }
75
75
  function computeSha256Hex(buffer) {
76
- return (0, node_crypto_1.createHash)('sha256').update(buffer).digest('hex');
76
+ return (0, node_crypto_1.createHash)("sha256").update(buffer).digest("hex");
77
77
  }
78
- function resolveMimeType(filename, fallback = 'application/octet-stream') {
78
+ function resolveMimeType(filename, fallback = "application/octet-stream") {
79
79
  const type = EXTENSION_TO_MIME[(0, node_path_1.extname)(filename).toLowerCase()];
80
80
  return type ?? fallback;
81
81
  }
@@ -116,7 +116,11 @@ async function prepareOwnedAssetUpload(task) {
116
116
  description: task.description,
117
117
  category: task.category,
118
118
  subcategory: task.subcategory,
119
- format: task.format || (0, node_path_1.extname)(files[0]?.filename || '').replace(/^\./, '').toUpperCase() || 'GLB',
119
+ format: task.format ||
120
+ (0, node_path_1.extname)(files[0]?.filename || "")
121
+ .replace(/^\./, "")
122
+ .toUpperCase() ||
123
+ "GLB",
120
124
  visibility: task.visibility,
121
125
  license: task.license,
122
126
  assetSpec: task.assetSpec,
@@ -138,7 +142,7 @@ function ensurePreparedArtifactSize(file, maxBytes, code, label) {
138
142
  function accumulateUploadBytes(taskName, currentTotal, nextBytes) {
139
143
  const nextTotal = currentTotal + nextBytes;
140
144
  if (nextTotal > config_1.MAX_VERSION_TOTAL_BYTES) {
141
- throw createUploadValidationError('upload_too_large', `Total upload for "${taskName}" exceeds ${formatLimitBytes(config_1.MAX_VERSION_TOTAL_BYTES)}. Received ${nextTotal} bytes.`);
145
+ throw createUploadValidationError("upload_too_large", `Total upload for "${taskName}" exceeds ${formatLimitBytes(config_1.MAX_VERSION_TOTAL_BYTES)}. Received ${nextTotal} bytes.`);
142
146
  }
143
147
  return nextTotal;
144
148
  }
@@ -160,55 +164,55 @@ async function prepareAppUploadFiles(task, artifacts) {
160
164
  }
161
165
  }
162
166
  for (const definition of task.achievements ?? []) {
163
- const prepared = createFileFromPath(definition.iconPath, 'image/png', config_1.MAX_VERSION_ICON_BYTES, 'achievement_icon_too_large', 'invalid_achievement_icon_content_type', `Achievement icon "${definition.key}"`, isPngSignature);
167
+ const prepared = createFileFromPath(definition.iconPath, "image/png", config_1.MAX_VERSION_ICON_BYTES, "achievement_icon_too_large", "invalid_achievement_icon_content_type", `Achievement icon "${definition.key}"`, isPngSignature);
164
168
  totalUploadBytes = pushPreparedFile(task.name, totalUploadBytes, prepared);
165
169
  sessionFiles.push(await buildPreparedSessionFile(`achievementIcon:${definition.key}`, prepared.file));
166
170
  }
167
- if (task.hostingMode === 'EXTERNAL') {
171
+ if (task.hostingMode === "EXTERNAL") {
168
172
  // no hosted files
169
173
  }
170
174
  else if (artifacts) {
171
- totalUploadBytes = pushPreparedArtifact(task, totalUploadBytes, artifacts.bundleFile, config_1.MAX_VERSION_BUNDLE_BYTES, 'bundle_too_large', 'Bundle');
172
- totalUploadBytes = pushPreparedArtifact(task, totalUploadBytes, artifacts.sourceFile, config_1.MAX_APP_SOURCE_BYTES, 'source_too_large', 'Source archive');
173
- sessionFiles.push(await buildPreparedSessionFile('bundle', artifacts.bundleFile));
174
- sessionFiles.push(await buildPreparedSessionFile('source', artifacts.sourceFile));
175
+ totalUploadBytes = pushPreparedArtifact(task, totalUploadBytes, artifacts.bundleFile, config_1.MAX_VERSION_BUNDLE_BYTES, "bundle_too_large", "Bundle");
176
+ totalUploadBytes = pushPreparedArtifact(task, totalUploadBytes, artifacts.sourceFile, config_1.MAX_APP_SOURCE_BYTES, "source_too_large", "Source archive");
177
+ sessionFiles.push(await buildPreparedSessionFile("bundle", artifacts.bundleFile));
178
+ sessionFiles.push(await buildPreparedSessionFile("source", artifacts.sourceFile));
175
179
  }
176
180
  if (listing?.iconPath) {
177
- const prepared = createFileFromPath(listing.iconPath, 'image/png', config_1.MAX_VERSION_ICON_BYTES, 'icon_too_large', 'invalid_icon_content_type', 'Icon', isPngSignature);
181
+ const prepared = createFileFromPath(listing.iconPath, "image/png", config_1.MAX_VERSION_ICON_BYTES, "icon_too_large", "invalid_icon_content_type", "Icon", isPngSignature);
178
182
  totalUploadBytes = pushPreparedFile(task.name, totalUploadBytes, prepared);
179
- sessionFiles.push(await buildPreparedSessionFile('icon', prepared.file));
183
+ sessionFiles.push(await buildPreparedSessionFile("icon", prepared.file));
180
184
  }
181
185
  if (listing?.heroPortraitPath) {
182
- const prepared = createFileFromPath(listing.heroPortraitPath, 'image/png', config_1.MAX_VERSION_HERO_BYTES, 'hero_portrait_too_large', 'invalid_hero_portrait_content_type', 'Hero portrait', isPngSignature);
186
+ const prepared = createFileFromPath(listing.heroPortraitPath, "image/png", config_1.MAX_VERSION_HERO_BYTES, "hero_portrait_too_large", "invalid_hero_portrait_content_type", "Hero portrait", isPngSignature);
183
187
  totalUploadBytes = pushPreparedFile(task.name, totalUploadBytes, prepared);
184
- sessionFiles.push(await buildPreparedSessionFile('heroPortrait', prepared.file));
188
+ sessionFiles.push(await buildPreparedSessionFile("heroPortrait", prepared.file));
185
189
  }
186
190
  if (listing?.heroLandscapePath) {
187
- const prepared = createFileFromPath(listing.heroLandscapePath, 'image/png', config_1.MAX_VERSION_HERO_BYTES, 'hero_landscape_too_large', 'invalid_hero_landscape_content_type', 'Hero landscape', isPngSignature);
191
+ const prepared = createFileFromPath(listing.heroLandscapePath, "image/png", config_1.MAX_VERSION_HERO_BYTES, "hero_landscape_too_large", "invalid_hero_landscape_content_type", "Hero landscape", isPngSignature);
188
192
  totalUploadBytes = pushPreparedFile(task.name, totalUploadBytes, prepared);
189
- sessionFiles.push(await buildPreparedSessionFile('heroLandscape', prepared.file));
193
+ sessionFiles.push(await buildPreparedSessionFile("heroLandscape", prepared.file));
190
194
  }
191
195
  for (let index = 0; index < (listing?.screenshotPortraitPaths ?? []).length; index += 1) {
192
196
  const filePath = listing.screenshotPortraitPaths[index];
193
- const prepared = createFileFromPath(filePath, 'image/png', config_1.MAX_VERSION_SCREENSHOT_BYTES, 'screenshot_portrait_too_large', 'invalid_screenshot_portrait_content_type', `Portrait screenshot ${index + 1}`, isPngSignature);
197
+ const prepared = createFileFromPath(filePath, "image/png", config_1.MAX_VERSION_SCREENSHOT_BYTES, "screenshot_portrait_too_large", "invalid_screenshot_portrait_content_type", `Portrait screenshot ${index + 1}`, isPngSignature);
194
198
  totalUploadBytes = pushPreparedFile(task.name, totalUploadBytes, prepared);
195
199
  sessionFiles.push(await buildPreparedSessionFile(`screenshotsPortrait:${index}`, prepared.file));
196
200
  }
197
201
  for (let index = 0; index < (listing?.screenshotLandscapePaths ?? []).length; index += 1) {
198
202
  const filePath = listing.screenshotLandscapePaths[index];
199
- const prepared = createFileFromPath(filePath, 'image/png', config_1.MAX_VERSION_SCREENSHOT_BYTES, 'screenshot_landscape_too_large', 'invalid_screenshot_landscape_content_type', `Landscape screenshot ${index + 1}`, isPngSignature);
203
+ const prepared = createFileFromPath(filePath, "image/png", config_1.MAX_VERSION_SCREENSHOT_BYTES, "screenshot_landscape_too_large", "invalid_screenshot_landscape_content_type", `Landscape screenshot ${index + 1}`, isPngSignature);
200
204
  totalUploadBytes = pushPreparedFile(task.name, totalUploadBytes, prepared);
201
205
  sessionFiles.push(await buildPreparedSessionFile(`screenshotsLandscape:${index}`, prepared.file));
202
206
  }
203
207
  for (let index = 0; index < (listing?.videoPortraitPaths ?? []).length; index += 1) {
204
208
  const filePath = listing.videoPortraitPaths[index];
205
- const prepared = createFileFromPath(filePath, 'video/mp4', config_1.MAX_VERSION_VIDEO_BYTES, 'video_portrait_too_large', 'invalid_video_portrait_content_type', `Portrait video ${index + 1}`, isMp4Signature);
209
+ const prepared = createFileFromPath(filePath, "video/mp4", config_1.MAX_VERSION_VIDEO_BYTES, "video_portrait_too_large", "invalid_video_portrait_content_type", `Portrait video ${index + 1}`, isMp4Signature);
206
210
  totalUploadBytes = pushPreparedFile(task.name, totalUploadBytes, prepared);
207
211
  sessionFiles.push(await buildPreparedSessionFile(`videosPortrait:${index}`, prepared.file));
208
212
  }
209
213
  for (let index = 0; index < (listing?.videoLandscapePaths ?? []).length; index += 1) {
210
214
  const filePath = listing.videoLandscapePaths[index];
211
- const prepared = createFileFromPath(filePath, 'video/mp4', config_1.MAX_VERSION_VIDEO_BYTES, 'video_landscape_too_large', 'invalid_video_landscape_content_type', `Landscape video ${index + 1}`, isMp4Signature);
215
+ const prepared = createFileFromPath(filePath, "video/mp4", config_1.MAX_VERSION_VIDEO_BYTES, "video_landscape_too_large", "invalid_video_landscape_content_type", `Landscape video ${index + 1}`, isMp4Signature);
212
216
  totalUploadBytes = pushPreparedFile(task.name, totalUploadBytes, prepared);
213
217
  sessionFiles.push(await buildPreparedSessionFile(`videosLandscape:${index}`, prepared.file));
214
218
  }
@@ -226,21 +230,21 @@ async function uploadApp(client, task, artifacts, options) {
226
230
  * Upload an app version using the versioned API.
227
231
  */
228
232
  async function uploadAppVersion(client, task, artifacts, options) {
229
- const creatorUsername = typeof options?.creatorUsername === 'string' ? options.creatorUsername.trim() : '';
233
+ const creatorUsername = typeof options?.creatorUsername === "string" ? options.creatorUsername.trim() : "";
230
234
  if (!creatorUsername) {
231
235
  throw new Error(`Missing creator username for app "${task.name}" upload.`);
232
236
  }
233
237
  const achievements = task.achievements ?? [];
234
238
  const leaderboards = task.leaderboards ?? [];
235
239
  const listing = task.listing;
236
- const { sessionFiles: preparedSessionFiles, ownedAssets: preparedOwnedAssets, } = await prepareAppUploadFiles(task, artifacts);
240
+ const { sessionFiles: preparedSessionFiles, ownedAssets: preparedOwnedAssets } = await prepareAppUploadFiles(task, artifacts);
237
241
  const initializeRequest = {
238
242
  version: task.version,
239
243
  agentTaskId: options?.agentTaskId,
240
244
  playtestProof: options?.playtestProof,
241
245
  releaseNotes: task.releaseNotes,
242
246
  visibility: task.versionVisibility,
243
- setAsCurrent: task.versionVisibility === 'PRIVATE' ? false : undefined,
247
+ setAsCurrent: task.versionVisibility === "PRIVATE" ? false : undefined,
244
248
  license: task.license,
245
249
  remixRef: task.remix,
246
250
  usesAssets: task.uses.assets.map((entry) => ({
@@ -291,7 +295,7 @@ async function uploadAppVersion(client, task, artifacts, options) {
291
295
  ...(definition.unitLabel ? { unitLabel: definition.unitLabel } : {}),
292
296
  status: definition.status,
293
297
  })),
294
- externalUrl: task.hostingMode === 'EXTERNAL' ? task.externalUrl : undefined,
298
+ externalUrl: task.hostingMode === "EXTERNAL" ? task.externalUrl : undefined,
295
299
  listingMedia: listing?.mediaMetadata,
296
300
  files: preparedSessionFiles.map((file) => ({
297
301
  fileKey: file.fileKey,
@@ -328,7 +332,7 @@ async function uploadAppVersion(client, task, artifacts, options) {
328
332
  try {
329
333
  const initialized = await client.initializeAppUpload(creatorUsername, task.name, initializeRequest);
330
334
  sessionId = initialized.session.id;
331
- if (initialized.status !== 'finalized') {
335
+ if (initialized.status !== "finalized") {
332
336
  const uploadedFileKeys = new Set(initialized.session.uploadedFileKeys);
333
337
  const uploadedOwnedAssetKeys = new Set(initialized.session.uploadedOwnedAssetKeys);
334
338
  for (const file of preparedSessionFiles) {
@@ -352,9 +356,7 @@ async function uploadAppVersion(client, task, artifacts, options) {
352
356
  })),
353
357
  });
354
358
  }
355
- if (task.hostingMode !== 'EXTERNAL'
356
- && !task.externalUrl
357
- && options?.playtestSmokeCheckRequired) {
359
+ if (task.hostingMode !== "EXTERNAL" && !task.externalUrl && options?.playtestSmokeCheckRequired) {
358
360
  await (0, loadCheck_1.runUploadedHostedPlaytestSmokeCheck)({
359
361
  client,
360
362
  creatorUsername,
@@ -366,9 +368,7 @@ async function uploadAppVersion(client, task, artifacts, options) {
366
368
  captureSession: options?.captureSession,
367
369
  });
368
370
  }
369
- else if (task.hostingMode !== 'EXTERNAL'
370
- && !task.externalUrl
371
- && options?.runStagedUploadLoadCheck) {
371
+ else if (task.hostingMode !== "EXTERNAL" && !task.externalUrl && options?.runStagedUploadLoadCheck) {
372
372
  const loadCheck = await (0, loadCheck_1.runUploadedHostedLoadCheck)({
373
373
  client,
374
374
  creatorUsername,
@@ -379,11 +379,11 @@ async function uploadAppVersion(client, task, artifacts, options) {
379
379
  currentUser: options?.user ?? null,
380
380
  captureSession: options?.captureSession,
381
381
  });
382
- if (loadCheck.status !== 'PASSED') {
383
- throw new Error((0, loadCheck_1.formatHostedLoadCheckFailure)(task.name, loadCheck, 'staged'));
382
+ if (loadCheck.status !== "PASSED") {
383
+ throw new Error((0, loadCheck_1.formatHostedLoadCheckFailure)(task.name, loadCheck, "staged"));
384
384
  }
385
385
  }
386
- if (task.editorSupported && task.hostingMode !== 'EXTERNAL' && !task.externalUrl) {
386
+ if (task.editorSupported && task.hostingMode !== "EXTERNAL" && !task.externalUrl) {
387
387
  const editorLoadCheck = await (0, loadCheck_1.runUploadedHostedLoadCheck)({
388
388
  client,
389
389
  creatorUsername,
@@ -393,31 +393,27 @@ async function uploadAppVersion(client, task, artifacts, options) {
393
393
  token: options?.token ?? null,
394
394
  currentUser: options?.user ?? null,
395
395
  captureSession: options?.captureSession,
396
- phase: 'editor',
396
+ phase: "editor",
397
397
  verifyEditorPhaseRoundTrip: true,
398
398
  });
399
- if (editorLoadCheck.status !== 'PASSED') {
400
- throw new Error((0, loadCheck_1.formatHostedLoadCheckFailure)(task.name, editorLoadCheck, 'editor'));
399
+ if (editorLoadCheck.status !== "PASSED") {
400
+ throw new Error((0, loadCheck_1.formatHostedLoadCheckFailure)(task.name, editorLoadCheck, "editor"));
401
401
  }
402
402
  }
403
403
  }
404
- const finalized = initialized.status === 'finalized'
404
+ const finalized = initialized.status === "finalized"
405
405
  ? initialized.finalized
406
406
  : await client.finalizeAppUpload(creatorUsername, task.name, sessionId);
407
407
  if (!finalized) {
408
408
  throw new Error(`Upload failed for ${task.name}: missing finalized app upload payload`);
409
409
  }
410
- const version = initialized.status === 'finalized'
411
- ? finalized?.version
412
- : finalized.version;
413
- const versionNodeId = initialized.status === 'finalized'
414
- ? finalized?.versionNodeId
415
- : finalized.versionNodeId;
410
+ const version = initialized.status === "finalized" ? finalized?.version : finalized.version;
411
+ const versionNodeId = initialized.status === "finalized" ? finalized?.versionNodeId : finalized.versionNodeId;
416
412
  return {
417
413
  versionCreated: true,
418
414
  version: version?.version,
419
- versionId: typeof version?.id === 'number' ? version.id : undefined,
420
- versionNodeId: typeof versionNodeId === 'string' ? versionNodeId : undefined,
415
+ versionId: typeof version?.id === "number" ? version.id : undefined,
416
+ versionNodeId: typeof versionNodeId === "string" ? versionNodeId : undefined,
421
417
  };
422
418
  }
423
419
  catch (unknownError) {
@@ -430,34 +426,32 @@ async function uploadAppVersion(client, task, artifacts, options) {
430
426
  }
431
427
  }
432
428
  if (unknownError instanceof types_1.UnsupportedClientError) {
433
- (0, http_1.handleUnsupportedError)(unknownError, 'Upload app version');
429
+ (0, http_1.handleUnsupportedError)(unknownError, "Upload app version");
434
430
  }
435
431
  if (unknownError instanceof http_1.CLIUnsupportedClientError) {
436
432
  throw unknownError;
437
433
  }
438
434
  if (unknownError instanceof types_1.ApiError) {
439
435
  const detail = unknownError.message?.trim();
440
- if (unknownError.code === 'version_limit_reached') {
436
+ if (unknownError.code === "version_limit_reached") {
441
437
  const appRef = `${creatorUsername}/app/${task.name}`;
442
- throw new Error(`${detail || `App "${task.name}" has reached the maximum version count.`}\n`
443
- + `Review versions: playdrop versions browse ${appRef}\n`
444
- + `Delete one old version: playdrop creations apps versions delete ${task.name} <version>`);
438
+ throw new Error(`${detail || `App "${task.name}" has reached the maximum version count.`}\n` +
439
+ `Review versions: playdrop versions browse ${appRef}\n` +
440
+ `Delete one old version: playdrop creations apps versions delete ${task.name} <version>`);
445
441
  }
446
- if (unknownError.status === 409 && unknownError.code === 'version_exists') {
442
+ if (unknownError.status === 409 && unknownError.code === "version_exists") {
447
443
  if (options?.agentTaskId !== undefined) {
448
444
  throw new Error(`Version ${task.version} already exists for app "${task.name}".\n` +
449
- 'This task has a fixed outputVersion; do not bump catalogue.json. The required task version has already been consumed by an upload attempt, so fail the task with the operational reason.');
445
+ "This task has a fixed outputVersion; do not bump catalogue.json. The required task version has already been consumed by an upload attempt, so fail the task with the operational reason.");
450
446
  }
451
447
  throw new Error(`Version ${task.version} already exists for app "${task.name}".\n` +
452
448
  `Hint: Update "version" in catalogue.json to a new version (e.g., bump to the next patch).`);
453
449
  }
454
450
  const statusText = `status ${unknownError.status}`;
455
- const errorCode = typeof unknownError.code === 'string' && unknownError.code.trim().length > 0
456
- ? unknownError.code.trim()
457
- : '';
451
+ const errorCode = typeof unknownError.code === "string" && unknownError.code.trim().length > 0 ? unknownError.code.trim() : "";
458
452
  const annotatedMessage = detail
459
- ? `${errorCode ? `${errorCode}: ` : ''}${detail}`
460
- : `${statusText}${errorCode ? ` (${errorCode})` : ''}`;
453
+ ? `${errorCode ? `${errorCode}: ` : ""}${detail}`
454
+ : `${statusText}${errorCode ? ` (${errorCode})` : ""}`;
461
455
  throw new Error(`Upload failed for ${task.name}: ${annotatedMessage}`);
462
456
  }
463
457
  throw unknownError;
@@ -1,5 +1,5 @@
1
- import type { AppTask } from '../catalogue';
2
- export type AppValidationWarningMode = 'source' | 'bundle';
1
+ import type { AppTask } from "../catalogue";
2
+ export type AppValidationWarningMode = "source" | "bundle";
3
3
  export declare function collectAppValidationWarnings(task: AppTask, _mode?: AppValidationWarningMode): string[];
4
4
  export declare function runFormatScript(task: AppTask): Promise<boolean>;
5
5
  export declare function validateAppTask(task: AppTask): Promise<void>;
@@ -13,7 +13,7 @@ const projectFormatCache = new Map();
13
13
  function ensureWithinProject(task) {
14
14
  const relativePath = (0, node_path_1.relative)(task.projectDir, task.filePath);
15
15
  const segments = relativePath.split(/[/\\]+/);
16
- if (!relativePath || relativePath.startsWith('..') || segments.includes('..')) {
16
+ if (!relativePath || relativePath.startsWith("..") || segments.includes("..")) {
17
17
  throw new Error(`[apps][validate] Bundle path for ${task.name} must remain inside ${task.projectDir}. Update catalogue entry ${task.cataloguePath}.`);
18
18
  }
19
19
  }
@@ -22,14 +22,14 @@ async function ensureValidateScript(task) {
22
22
  return;
23
23
  }
24
24
  if (!projectValidateCache.has(task.projectDir)) {
25
- const promise = (0, build_1.runNpmScript)(task.projectDir, 'validate');
25
+ const promise = (0, build_1.runNpmScript)(task.projectDir, "validate");
26
26
  projectValidateCache.set(task.projectDir, promise);
27
27
  }
28
28
  await projectValidateCache.get(task.projectDir);
29
29
  }
30
30
  function safeReadFile(filePath) {
31
31
  try {
32
- return (0, node_fs_1.readFileSync)(filePath, 'utf8');
32
+ return (0, node_fs_1.readFileSync)(filePath, "utf8");
33
33
  }
34
34
  catch {
35
35
  return null;
@@ -54,27 +54,23 @@ function collectOutdatedSdkVersionWarnings(task) {
54
54
  if (!(0, semver_1.valid)(cliVersion)) {
55
55
  return [];
56
56
  }
57
- const sdkTypesDependency = typeof packageJson?.devDependencies?.['playdrop-sdk-types'] === 'string'
58
- ? packageJson.devDependencies['playdrop-sdk-types']
59
- : typeof packageJson?.dependencies?.['playdrop-sdk-types'] === 'string'
60
- ? packageJson.dependencies['playdrop-sdk-types']
61
- : '';
62
- const sdkTypesVersion = typeof packageJson?.playdrop?.sdkTypesVersion === 'string'
63
- ? packageJson.playdrop.sdkTypesVersion.trim()
64
- : '';
65
- const usesVendoredSdkTypes = sdkTypesDependency.includes('playdrop-sdk-types')
66
- && (sdkTypesDependency.startsWith('file:') || sdkTypesDependency.includes('.tgz'));
67
- if (!usesVendoredSdkTypes
68
- || !(0, semver_1.valid)(sdkTypesVersion)
69
- || !(0, semver_1.lt)(sdkTypesVersion, cliVersion)) {
57
+ const sdkTypesDependency = typeof packageJson?.devDependencies?.["playdrop-sdk-types"] === "string"
58
+ ? packageJson.devDependencies["playdrop-sdk-types"]
59
+ : typeof packageJson?.dependencies?.["playdrop-sdk-types"] === "string"
60
+ ? packageJson.dependencies["playdrop-sdk-types"]
61
+ : "";
62
+ const sdkTypesVersion = typeof packageJson?.playdrop?.sdkTypesVersion === "string" ? packageJson.playdrop.sdkTypesVersion.trim() : "";
63
+ const usesVendoredSdkTypes = sdkTypesDependency.includes("playdrop-sdk-types") &&
64
+ (sdkTypesDependency.startsWith("file:") || sdkTypesDependency.includes(".tgz"));
65
+ if (!usesVendoredSdkTypes || !(0, semver_1.valid)(sdkTypesVersion) || !(0, semver_1.lt)(sdkTypesVersion, cliVersion)) {
70
66
  return [];
71
67
  }
72
68
  return [
73
69
  `[apps][validate] ${task.name} vendors playdrop-sdk-types.tgz at ${sdkTypesVersion}, which is older than this CLI version ${cliVersion}. Refresh vendor/playdrop-sdk-types.tgz and package.json playdrop.sdkTypesVersion before upload.`,
74
70
  ];
75
71
  }
76
- function collectAppValidationWarnings(task, _mode = 'source') {
77
- const isExternal = task.hostingMode === 'EXTERNAL' || !!task.externalUrl;
72
+ function collectAppValidationWarnings(task, _mode = "source") {
73
+ const isExternal = task.hostingMode === "EXTERNAL" || !!task.externalUrl;
78
74
  if (isExternal) {
79
75
  return [];
80
76
  }
@@ -85,22 +81,22 @@ async function runFormatScript(task) {
85
81
  return false;
86
82
  }
87
83
  if (!projectFormatCache.has(task.projectDir)) {
88
- projectFormatCache.set(task.projectDir, (0, build_1.runNpmScript)(task.projectDir, 'format'));
84
+ projectFormatCache.set(task.projectDir, (0, build_1.runNpmScript)(task.projectDir, "format"));
89
85
  }
90
86
  await projectFormatCache.get(task.projectDir);
91
87
  return true;
92
88
  }
93
89
  async function validateAppTask(task) {
94
90
  if (!task.name) {
95
- throw new Error('[apps][validate] App entry is missing a name.');
91
+ throw new Error("[apps][validate] App entry is missing a name.");
96
92
  }
97
93
  // External apps don't need file validation - they're hosted elsewhere
98
- const isExternal = task.hostingMode === 'EXTERNAL' || !!task.externalUrl;
94
+ const isExternal = task.hostingMode === "EXTERNAL" || !!task.externalUrl;
99
95
  if (isExternal) {
100
96
  if (!task.externalUrl) {
101
97
  throw new Error(`[apps][validate] ${task.name} is marked as EXTERNAL but missing externalUrl.`);
102
98
  }
103
- if (!task.externalUrl.startsWith('https://')) {
99
+ if (!task.externalUrl.startsWith("https://")) {
104
100
  throw new Error(`[apps][validate] ${task.name} externalUrl must be HTTPS.`);
105
101
  }
106
102
  // External apps pass validation - no local files needed
@@ -1,5 +1,5 @@
1
- import { type AssetSpecCapability, type AssetSpecContract, type AssetSpecValidationKind } from '@playdrop/types';
2
- export declare function resolveCustomAssetRoleContentType(filePath: string, roleContract?: Pick<AssetSpecContract['roles'][number], 'contentTypes'> | null): string;
1
+ import { type AssetSpecCapability, type AssetSpecContract, type AssetSpecValidationKind } from "@playdrop/types";
2
+ export declare function resolveCustomAssetRoleContentType(filePath: string, roleContract?: Pick<AssetSpecContract["roles"][number], "contentTypes"> | null): string;
3
3
  export type AssetSpecSupportDeclaration = {
4
4
  assetSpec: string;
5
5
  versionRange: string;
@@ -15,23 +15,23 @@ const node_fs_1 = require("node:fs");
15
15
  const node_path_1 = require("node:path");
16
16
  const semver_1 = require("semver");
17
17
  const LOCAL_EXTENSION_TO_MIME = {
18
- '.png': 'image/png',
19
- '.jpg': 'image/jpeg',
20
- '.jpeg': 'image/jpeg',
21
- '.webp': 'image/webp',
22
- '.gif': 'image/gif',
23
- '.aseprite': 'application/octet-stream',
24
- '.mp4': 'video/mp4',
25
- '.webm': 'video/webm',
26
- '.mp3': 'audio/mpeg',
27
- '.wav': 'audio/wav',
28
- '.ogg': 'audio/ogg',
29
- '.vox': 'application/octet-stream',
30
- '.gltf': 'model/gltf+json',
31
- '.glb': 'model/gltf-binary',
32
- '.json': 'application/json',
33
- '.md': 'text/markdown',
34
- '.txt': 'text/plain',
18
+ ".png": "image/png",
19
+ ".jpg": "image/jpeg",
20
+ ".jpeg": "image/jpeg",
21
+ ".webp": "image/webp",
22
+ ".gif": "image/gif",
23
+ ".aseprite": "application/octet-stream",
24
+ ".mp4": "video/mp4",
25
+ ".webm": "video/webm",
26
+ ".mp3": "audio/mpeg",
27
+ ".wav": "audio/wav",
28
+ ".ogg": "audio/ogg",
29
+ ".vox": "application/octet-stream",
30
+ ".gltf": "model/gltf+json",
31
+ ".glb": "model/gltf-binary",
32
+ ".json": "application/json",
33
+ ".md": "text/markdown",
34
+ ".txt": "text/plain",
35
35
  };
36
36
  const ajv = new ajv_1.default({
37
37
  allErrors: true,
@@ -41,8 +41,8 @@ const ajv = new ajv_1.default({
41
41
  const validateContractMetaSchema = ajv.compile(types_1.ASSET_SPEC_CONTRACT_META_SCHEMA);
42
42
  function formatAjvErrors(prefix) {
43
43
  return (validateContractMetaSchema.errors ?? []).map((issue) => {
44
- const path = issue.instancePath || issue.schemaPath || '/';
45
- return `${prefix} contract is invalid at ${path}: ${issue.message ?? 'schema validation failed'}.`;
44
+ const path = issue.instancePath || issue.schemaPath || "/";
45
+ return `${prefix} contract is invalid at ${path}: ${issue.message ?? "schema validation failed"}.`;
46
46
  });
47
47
  }
48
48
  function createContractValidator() {
@@ -53,7 +53,7 @@ function createContractValidator() {
53
53
  });
54
54
  }
55
55
  function resolveMimeTypeFromPath(filePath) {
56
- return LOCAL_EXTENSION_TO_MIME[(0, node_path_1.extname)(filePath).toLowerCase()] ?? 'application/octet-stream';
56
+ return LOCAL_EXTENSION_TO_MIME[(0, node_path_1.extname)(filePath).toLowerCase()] ?? "application/octet-stream";
57
57
  }
58
58
  function resolveCustomAssetRoleContentType(filePath, roleContract) {
59
59
  const resolvedContentType = resolveMimeTypeFromPath(filePath);
@@ -67,7 +67,7 @@ function resolveCustomAssetRoleContentType(filePath, roleContract) {
67
67
  return contentType.trim();
68
68
  }
69
69
  }
70
- if ((0, node_path_1.extname)(filePath).toLowerCase() === '.json') {
70
+ if ((0, node_path_1.extname)(filePath).toLowerCase() === ".json") {
71
71
  const jsonLikeContentType = roleContract.contentTypes.find((contentType) => (0, types_1.isJsonLikeAssetSpecContentType)(contentType));
72
72
  if (jsonLikeContentType) {
73
73
  return jsonLikeContentType.trim();
@@ -86,17 +86,17 @@ function normalizeAssetSpecSupportEntries(raw, errors, context) {
86
86
  const rows = [];
87
87
  for (let index = 0; index < raw.length; index += 1) {
88
88
  const entry = raw[index];
89
- if (!entry || typeof entry !== 'object' || Array.isArray(entry)) {
89
+ if (!entry || typeof entry !== "object" || Array.isArray(entry)) {
90
90
  errors.push(`${context} assetSpecSupport[${index}] must be an object.`);
91
91
  continue;
92
92
  }
93
- const assetSpec = typeof entry.assetSpec === 'string' ? entry.assetSpec.trim() : '';
93
+ const assetSpec = typeof entry.assetSpec === "string" ? entry.assetSpec.trim() : "";
94
94
  const parsedAssetSpec = (0, types_1.parseAssetSpecFamilyRef)(assetSpec);
95
95
  if (!assetSpec || !parsedAssetSpec) {
96
96
  errors.push(`${context} assetSpecSupport[${index}].assetSpec must be an asset spec family ref.`);
97
97
  continue;
98
98
  }
99
- const versionRange = typeof entry.versionRange === 'string' ? entry.versionRange.trim() : '';
99
+ const versionRange = typeof entry.versionRange === "string" ? entry.versionRange.trim() : "";
100
100
  if (!versionRange || !(0, semver_1.validRange)(versionRange)) {
101
101
  errors.push(`${context} assetSpecSupport[${index}].versionRange must be a valid semver range.`);
102
102
  continue;
@@ -142,7 +142,7 @@ function loadAndValidateAssetSpecContract(catalogueDir, relativeContractPath, er
142
142
  errors.push(`${context} contract exceeds the ${types_1.ASSET_SPEC_CONTRACT_MAX_BYTES} byte limit.`);
143
143
  return null;
144
144
  }
145
- rawText = (0, node_fs_1.readFileSync)(contractPath, 'utf8');
145
+ rawText = (0, node_fs_1.readFileSync)(contractPath, "utf8");
146
146
  }
147
147
  catch {
148
148
  errors.push(`${context} contract file not found at ${contractPath}.`);
@@ -153,7 +153,7 @@ function loadAndValidateAssetSpecContract(catalogueDir, relativeContractPath, er
153
153
  parsed = JSON.parse(rawText);
154
154
  }
155
155
  catch (error) {
156
- errors.push(`${context} contract must be valid JSON (${error?.message ?? 'parse failed'}).`);
156
+ errors.push(`${context} contract must be valid JSON (${error?.message ?? "parse failed"}).`);
157
157
  return null;
158
158
  }
159
159
  if (!validateContractMetaSchema(parsed)) {
@@ -183,7 +183,7 @@ function loadAndValidateAssetSpecContract(catalogueDir, relativeContractPath, er
183
183
  schemaAjv.compile(role.jsonSchema);
184
184
  }
185
185
  catch (error) {
186
- errors.push(`${context} contract role "${role.name}" jsonSchema is invalid (${error?.message ?? 'compile failed'}).`);
186
+ errors.push(`${context} contract role "${role.name}" jsonSchema is invalid (${error?.message ?? "compile failed"}).`);
187
187
  hasContractError = true;
188
188
  }
189
189
  }
@@ -207,7 +207,7 @@ function loadAndValidateAssetSpecContract(catalogueDir, relativeContractPath, er
207
207
  }
208
208
  return {
209
209
  contract,
210
- validationKind: contract.roles.some((role) => role.jsonSchema) ? 'JSON_SCHEMA' : 'NONE',
210
+ validationKind: contract.roles.some((role) => role.jsonSchema) ? "JSON_SCHEMA" : "NONE",
211
211
  contractPath,
212
212
  };
213
213
  }
@@ -226,28 +226,28 @@ function validateCustomAssetFilesAgainstContract(contract, filePaths, errors, co
226
226
  if (roleContract.extensions?.length) {
227
227
  const allowedExtensions = roleContract.extensions.map((value) => value.trim().toLowerCase());
228
228
  if (!allowedExtensions.includes(extension)) {
229
- errors.push(`${context} role "${rawRole}" must use one of ${allowedExtensions.join(', ')}.`);
229
+ errors.push(`${context} role "${rawRole}" must use one of ${allowedExtensions.join(", ")}.`);
230
230
  }
231
231
  }
232
232
  const resolvedContentType = resolveCustomAssetRoleContentType(filePath, roleContract);
233
233
  const normalizedContentTypes = roleContract.contentTypes.map((value) => value.trim().toLowerCase());
234
234
  if (!normalizedContentTypes.includes(resolvedContentType.toLowerCase())) {
235
- errors.push(`${context} role "${rawRole}" must use one of ${normalizedContentTypes.join(', ')}.`);
235
+ errors.push(`${context} role "${rawRole}" must use one of ${normalizedContentTypes.join(", ")}.`);
236
236
  }
237
237
  if (roleContract.jsonSchema) {
238
238
  try {
239
- const rawText = (0, node_fs_1.readFileSync)(filePath, 'utf8');
239
+ const rawText = (0, node_fs_1.readFileSync)(filePath, "utf8");
240
240
  const parsedJson = JSON.parse(rawText);
241
241
  const schemaAjv = createContractValidator();
242
242
  const validateJson = schemaAjv.compile(roleContract.jsonSchema);
243
243
  if (!validateJson(parsedJson)) {
244
244
  const firstIssue = validateJson.errors?.[0];
245
- const issuePath = firstIssue?.instancePath || firstIssue?.schemaPath || '/';
246
- errors.push(`${context} role "${rawRole}" JSON content failed schema validation at ${issuePath}: ${firstIssue?.message ?? 'schema validation failed'}.`);
245
+ const issuePath = firstIssue?.instancePath || firstIssue?.schemaPath || "/";
246
+ errors.push(`${context} role "${rawRole}" JSON content failed schema validation at ${issuePath}: ${firstIssue?.message ?? "schema validation failed"}.`);
247
247
  }
248
248
  }
249
249
  catch (error) {
250
- errors.push(`${context} role "${rawRole}" JSON content is invalid (${error?.message ?? 'parse failed'}).`);
250
+ errors.push(`${context} role "${rawRole}" JSON content is invalid (${error?.message ?? "parse failed"}).`);
251
251
  }
252
252
  }
253
253
  }
@@ -261,7 +261,7 @@ function normalizeAssetSpecVersionRef(raw, errors, context) {
261
261
  if (raw === undefined || raw === null) {
262
262
  return undefined;
263
263
  }
264
- if (typeof raw !== 'string' || raw.trim().length === 0) {
264
+ if (typeof raw !== "string" || raw.trim().length === 0) {
265
265
  errors.push(`${context} assetSpec must be an exact asset spec version ref.`);
266
266
  return undefined;
267
267
  }
@@ -1,4 +1,4 @@
1
- import type { AssetTask, OwnedAssetTask, PackOwnedAssetTask } from '../catalogue';
1
+ import type { AssetTask, OwnedAssetTask, PackOwnedAssetTask } from "../catalogue";
2
2
  type ModelAssetTask = AssetTask | OwnedAssetTask | PackOwnedAssetTask;
3
3
  export declare function isGeneratedModel3DAssetTask(task: ModelAssetTask, format?: string): boolean;
4
4
  export declare function assertGeneratedModel3DAssetRoles(task: ModelAssetTask, format?: string): void;