@playdrop/playdrop-cli 0.16.2 → 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
@@ -8,7 +8,7 @@ const worker_1 = require("./worker");
8
8
  const WORKER_UPDATE_POLL_DEFAULT_MS = 3000;
9
9
  const WORKER_UPDATE_TIMEOUT_DEFAULT_MS = 15 * 60000;
10
10
  function readPositiveIntegerEnv(name, fallback) {
11
- const raw = process.env[name]?.trim() || '';
11
+ const raw = process.env[name]?.trim() || "";
12
12
  const value = Number(raw);
13
13
  return Number.isInteger(value) && value > 0 ? value : fallback;
14
14
  }
@@ -18,21 +18,21 @@ function sleep(ms) {
18
18
  });
19
19
  }
20
20
  function validateTargetVersion(value) {
21
- const version = value?.trim() || process.env.PLAYDROP_CLI_TARGET_VERSION?.trim() || '';
21
+ const version = value?.trim() || process.env.PLAYDROP_CLI_TARGET_VERSION?.trim() || "";
22
22
  if (!/^\d+\.\d+\.\d+(?:[-+][0-9A-Za-z.-]+)?$/.test(version)) {
23
- throw new Error('playdrop_update_target_version_required: pass --target-version <version> or set PLAYDROP_CLI_TARGET_VERSION. Managed workers should use playdrop update --worker.');
23
+ throw new Error("playdrop_update_target_version_required: pass --target-version <version> or set PLAYDROP_CLI_TARGET_VERSION. Managed workers should use playdrop update --worker.");
24
24
  }
25
25
  return version;
26
26
  }
27
27
  function runCommand(command, args) {
28
- const commandString = `${command} ${args.join(' ')}`;
29
- console.log('Running:', commandString);
28
+ const commandString = `${command} ${args.join(" ")}`;
29
+ console.log("Running:", commandString);
30
30
  return new Promise((resolve, reject) => {
31
31
  const child = (0, node_child_process_1.spawn)(command, args, {
32
- stdio: 'inherit',
33
- shell: process.platform === 'win32'
32
+ stdio: "inherit",
33
+ shell: process.platform === "win32",
34
34
  });
35
- child.on('close', (code) => {
35
+ child.on("close", (code) => {
36
36
  if (code === 0) {
37
37
  resolve();
38
38
  }
@@ -40,22 +40,22 @@ function runCommand(command, args) {
40
40
  reject(new Error(`${command} exited with code ${code}`));
41
41
  }
42
42
  });
43
- child.on('error', (error) => reject(error));
43
+ child.on("error", (error) => reject(error));
44
44
  });
45
45
  }
46
46
  function formatWorkerUpdateState(worker) {
47
47
  return [
48
- `lifecycle=${worker.lifecycleState ?? 'unknown'}`,
49
- `update=${worker.updateState ?? 'unknown'}`,
50
- `ready=${worker.ready === true ? 'true' : worker.ready === false ? 'false' : 'unknown'}`,
51
- `cli=${worker.cliVersion ?? 'unknown'}`,
52
- ].join(' ');
48
+ `lifecycle=${worker.lifecycleState ?? "unknown"}`,
49
+ `update=${worker.updateState ?? "unknown"}`,
50
+ `ready=${worker.ready === true ? "true" : worker.ready === false ? "false" : "unknown"}`,
51
+ `cli=${worker.cliVersion ?? "unknown"}`,
52
+ ].join(" ");
53
53
  }
54
54
  async function observeManagedWorkerUpdate(input) {
55
- const pollMs = readPositiveIntegerEnv('PLAYDROP_WORKER_UPDATE_POLL_MS', WORKER_UPDATE_POLL_DEFAULT_MS);
56
- const timeoutMs = readPositiveIntegerEnv('PLAYDROP_WORKER_UPDATE_TIMEOUT_MS', WORKER_UPDATE_TIMEOUT_DEFAULT_MS);
55
+ const pollMs = readPositiveIntegerEnv("PLAYDROP_WORKER_UPDATE_POLL_MS", WORKER_UPDATE_POLL_DEFAULT_MS);
56
+ const timeoutMs = readPositiveIntegerEnv("PLAYDROP_WORKER_UPDATE_TIMEOUT_MS", WORKER_UPDATE_TIMEOUT_DEFAULT_MS);
57
57
  const deadline = Date.now() + timeoutMs;
58
- let lastState = '';
58
+ let lastState = "";
59
59
  while (Date.now() <= deadline) {
60
60
  const workers = await input.client.listMyAgentWorkers();
61
61
  const worker = workers.workers.find((candidate) => candidate.workerKey === input.workerKey);
@@ -67,18 +67,18 @@ async function observeManagedWorkerUpdate(input) {
67
67
  console.log(`Worker update progress: ${state}`);
68
68
  lastState = state;
69
69
  }
70
- if (worker.updateState === 'UPDATE_BLOCKED' || worker.lifecycleState === 'DEGRADED' || worker.ready === false) {
70
+ if (worker.updateState === "UPDATE_BLOCKED" || worker.lifecycleState === "DEGRADED" || worker.ready === false) {
71
71
  throw new Error(`playdrop_update_worker_failed: ${state}. Next action: run "playdrop worker status --json" on the worker host and inspect the wrapper failure marker under the configured worker state directory.`);
72
72
  }
73
- if (worker.activeUpdateIntentId !== input.intentId
74
- && worker.lifecycleState === 'READY'
75
- && (worker.updateState === 'CURRENT' || worker.updateState === 'UPDATE_AVAILABLE')
76
- && worker.ready === true) {
77
- if (worker.updateState === 'UPDATE_AVAILABLE') {
78
- console.log('Managed worker update settled above minimum with a target update still available.');
73
+ if (worker.activeUpdateIntentId !== input.intentId &&
74
+ worker.lifecycleState === "READY" &&
75
+ (worker.updateState === "CURRENT" || worker.updateState === "UPDATE_AVAILABLE") &&
76
+ worker.ready === true) {
77
+ if (worker.updateState === "UPDATE_AVAILABLE") {
78
+ console.log("Managed worker update settled above minimum with a target update still available.");
79
79
  }
80
80
  else {
81
- console.log('Managed worker update completed.');
81
+ console.log("Managed worker update completed.");
82
82
  }
83
83
  return;
84
84
  }
@@ -88,7 +88,9 @@ async function observeManagedWorkerUpdate(input) {
88
88
  }
89
89
  async function upgrade(options = {}) {
90
90
  if (options.worker) {
91
- const ctx = await (0, commandContext_1.resolveAuthenticatedEnvironmentContext)('update', 'Requesting a managed worker update', { env: options.env });
91
+ const ctx = await (0, commandContext_1.resolveAuthenticatedEnvironmentContext)("update", "Requesting a managed worker update", {
92
+ env: options.env,
93
+ });
92
94
  if (!ctx) {
93
95
  return;
94
96
  }
@@ -96,10 +98,10 @@ async function upgrade(options = {}) {
96
98
  const intent = await ctx.client.workerCreateUpdateIntent({
97
99
  workerKey,
98
100
  environment: ctx.env,
99
- reason: 'manual_update',
101
+ reason: "manual_update",
100
102
  });
101
103
  console.log(`Managed worker update intent ${intent.intent.id} created for worker ${workerKey}.`);
102
- console.log(`Worker state: ${intent.worker.lifecycleState ?? 'unknown'} / ${intent.worker.updateState ?? 'unknown'}`);
104
+ console.log(`Worker state: ${intent.worker.lifecycleState ?? "unknown"} / ${intent.worker.updateState ?? "unknown"}`);
103
105
  await observeManagedWorkerUpdate({
104
106
  client: ctx.client,
105
107
  workerKey,
@@ -112,11 +114,18 @@ async function upgrade(options = {}) {
112
114
  throw new Error(`playdrop_update_active_personal_worker: stop the My Agent worker first, then rerun playdrop update. pid=${activePersonalWorker.pid} worker=${activePersonalWorker.workerName}`);
113
115
  }
114
116
  const targetVersion = validateTargetVersion(options.targetVersion);
115
- const upgradeCommand = ['install', '-g', '--ignore-scripts', '--no-audit', '--no-fund', `@playdrop/playdrop-cli@${targetVersion}`];
116
- const commandString = `npm ${upgradeCommand.join(' ')}`;
117
+ const upgradeCommand = [
118
+ "install",
119
+ "-g",
120
+ "--ignore-scripts",
121
+ "--no-audit",
122
+ "--no-fund",
123
+ `@playdrop/playdrop-cli@${targetVersion}`,
124
+ ];
125
+ const commandString = `npm ${upgradeCommand.join(" ")}`;
117
126
  if (options.dryRun) {
118
127
  console.log(commandString);
119
128
  return;
120
129
  }
121
- await runCommand('npm', upgradeCommand);
130
+ await runCommand("npm", upgradeCommand);
122
131
  }
@@ -1,8 +1,8 @@
1
- import type { ApiClient } from '@playdrop/api-client';
2
- import { type AssetPackUploadedLocalAsset } from '@playdrop/types';
3
- import type { AssetPackTask, AssetSpecTask, AssetTask, OwnedAssetTask, PackOwnedAssetTask } from '../catalogue';
4
- import type { CliTask } from '../taskUtils';
5
- export type CurrentUserRole = 'CREATOR' | 'ADMIN' | null;
1
+ import type { ApiClient } from "@playdrop/api-client";
2
+ import { type AssetPackUploadedLocalAsset } from "@playdrop/types";
3
+ import type { AssetPackTask, AssetSpecTask, AssetTask, OwnedAssetTask, PackOwnedAssetTask } from "../catalogue";
4
+ import type { CliTask } from "../taskUtils";
5
+ export type CurrentUserRole = "CREATOR" | "ADMIN" | null;
6
6
  export type UploadedAssetInfo = {
7
7
  creatorUsername: string;
8
8
  name: string;
@@ -15,73 +15,69 @@ const node_path_1 = require("node:path");
15
15
  const model_artifacts_1 = require("../assets/model-artifacts");
16
16
  const assetSpecs_1 = require("../assetSpecs");
17
17
  const EXTENSION_TO_FORMAT = {
18
- '.png': 'PNG',
19
- '.jpg': 'JPEG',
20
- '.jpeg': 'JPEG',
21
- '.webp': 'WEBP',
22
- '.gif': 'GIF',
23
- '.aseprite': 'ASEPRITE',
24
- '.mp4': 'MP4',
25
- '.webm': 'WEBM',
26
- '.mp3': 'MP3',
27
- '.wav': 'WAV',
28
- '.ogg': 'OGG',
29
- '.vox': 'VOX',
30
- '.gltf': 'GLTF',
31
- '.glb': 'GLB',
18
+ ".png": "PNG",
19
+ ".jpg": "JPEG",
20
+ ".jpeg": "JPEG",
21
+ ".webp": "WEBP",
22
+ ".gif": "GIF",
23
+ ".aseprite": "ASEPRITE",
24
+ ".mp4": "MP4",
25
+ ".webm": "WEBM",
26
+ ".mp3": "MP3",
27
+ ".wav": "WAV",
28
+ ".ogg": "OGG",
29
+ ".vox": "VOX",
30
+ ".gltf": "GLTF",
31
+ ".glb": "GLB",
32
32
  };
33
33
  const EXTENSION_TO_MIME = {
34
- '.png': 'image/png',
35
- '.jpg': 'image/jpeg',
36
- '.jpeg': 'image/jpeg',
37
- '.webp': 'image/webp',
38
- '.gif': 'image/gif',
39
- '.aseprite': 'application/octet-stream',
40
- '.mp4': 'video/mp4',
41
- '.webm': 'video/webm',
42
- '.mp3': 'audio/mpeg',
43
- '.wav': 'audio/wav',
44
- '.ogg': 'audio/ogg',
45
- '.vox': 'application/octet-stream',
46
- '.gltf': 'model/gltf+json',
47
- '.glb': 'model/gltf-binary',
48
- '.json': 'application/json',
34
+ ".png": "image/png",
35
+ ".jpg": "image/jpeg",
36
+ ".jpeg": "image/jpeg",
37
+ ".webp": "image/webp",
38
+ ".gif": "image/gif",
39
+ ".aseprite": "application/octet-stream",
40
+ ".mp4": "video/mp4",
41
+ ".webm": "video/webm",
42
+ ".mp3": "audio/mpeg",
43
+ ".wav": "audio/wav",
44
+ ".ogg": "audio/ogg",
45
+ ".vox": "application/octet-stream",
46
+ ".gltf": "model/gltf+json",
47
+ ".glb": "model/gltf-binary",
48
+ ".json": "application/json",
49
49
  };
50
50
  function isPngSignature(buffer) {
51
51
  if (buffer.length < 8) {
52
52
  return false;
53
53
  }
54
- return buffer[0] === 0x89
55
- && buffer[1] === 0x50
56
- && buffer[2] === 0x4e
57
- && buffer[3] === 0x47
58
- && buffer[4] === 0x0d
59
- && buffer[5] === 0x0a
60
- && buffer[6] === 0x1a
61
- && buffer[7] === 0x0a;
54
+ return (buffer[0] === 0x89 &&
55
+ buffer[1] === 0x50 &&
56
+ buffer[2] === 0x4e &&
57
+ buffer[3] === 0x47 &&
58
+ buffer[4] === 0x0d &&
59
+ buffer[5] === 0x0a &&
60
+ buffer[6] === 0x1a &&
61
+ buffer[7] === 0x0a);
62
62
  }
63
63
  function isMp4Signature(buffer) {
64
- return buffer.length >= 12
65
- && buffer[4] === 0x66
66
- && buffer[5] === 0x74
67
- && buffer[6] === 0x79
68
- && buffer[7] === 0x70;
64
+ return buffer.length >= 12 && buffer[4] === 0x66 && buffer[5] === 0x74 && buffer[6] === 0x79 && buffer[7] === 0x70;
69
65
  }
70
66
  function createListingFileFromPath(filePath, expectedMime) {
71
67
  const data = (0, node_fs_1.readFileSync)(filePath);
72
- if (expectedMime === 'image/png' && !isPngSignature(data)) {
68
+ if (expectedMime === "image/png" && !isPngSignature(data)) {
73
69
  throw new Error(`Invalid listing file signature for ${filePath}. Expected image/png.`);
74
70
  }
75
- if (expectedMime === 'video/mp4' && !isMp4Signature(data)) {
71
+ if (expectedMime === "video/mp4" && !isMp4Signature(data)) {
76
72
  throw new Error(`Invalid listing file signature for ${filePath}. Expected video/mp4.`);
77
73
  }
78
74
  return new File([data], (0, node_path_1.basename)(filePath), { type: expectedMime });
79
75
  }
80
76
  function computeSha256Hex(buffer) {
81
- return (0, node_crypto_1.createHash)('sha256').update(buffer).digest('hex');
77
+ return (0, node_crypto_1.createHash)("sha256").update(buffer).digest("hex");
82
78
  }
83
79
  function resolveMimeType(filePath) {
84
- return EXTENSION_TO_MIME[(0, node_path_1.extname)(filePath).toLowerCase()] ?? 'application/octet-stream';
80
+ return EXTENSION_TO_MIME[(0, node_path_1.extname)(filePath).toLowerCase()] ?? "application/octet-stream";
85
81
  }
86
82
  function prepareUploadFile(filePath, fieldName, explicitMimeType) {
87
83
  const data = (0, node_fs_1.readFileSync)(filePath);
@@ -98,12 +94,12 @@ function prepareUploadFile(filePath, fieldName, explicitMimeType) {
98
94
  };
99
95
  }
100
96
  function buildListingMediaRelativePath(mediaKey) {
101
- if (mediaKey === 'icon')
102
- return 'listing/icon.png';
103
- if (mediaKey === 'heroPortrait')
104
- return 'listing/hero-portrait.png';
105
- if (mediaKey === 'heroLandscape')
106
- return 'listing/hero-landscape.png';
97
+ if (mediaKey === "icon")
98
+ return "listing/icon.png";
99
+ if (mediaKey === "heroPortrait")
100
+ return "listing/hero-portrait.png";
101
+ if (mediaKey === "heroLandscape")
102
+ return "listing/hero-landscape.png";
107
103
  const portraitScreenshot = /^screenshotsPortrait:(\d+)$/.exec(mediaKey);
108
104
  if (portraitScreenshot) {
109
105
  return `listing/screenshots/portrait/${Number.parseInt(portraitScreenshot[1], 10) + 1}.png`;
@@ -145,10 +141,8 @@ function buildPackKey(creatorUsername, name, version) {
145
141
  return `${creatorUsername}/${name}@${version}`;
146
142
  }
147
143
  function getTaskCreatorResult(task, defaultCreator, currentUserRole) {
148
- const requestedTaskOwner = 'username' in task && typeof task.username === 'string'
149
- ? String(task.username).trim()
150
- : '';
151
- const creatorTargetError = requestedTaskOwner && currentUserRole !== 'ADMIN'
144
+ const requestedTaskOwner = "username" in task && typeof task.username === "string" ? String(task.username).trim() : "";
145
+ const creatorTargetError = requestedTaskOwner && currentUserRole !== "ADMIN"
152
146
  ? `Task "${task.name}" sets username="${requestedTaskOwner}", but only admins can target another creator.`
153
147
  : null;
154
148
  return {
@@ -159,10 +153,10 @@ function getTaskCreatorResult(task, defaultCreator, currentUserRole) {
159
153
  }
160
154
  function parseUnversionedAssetTaskRef(rawRef, fallbackCreator) {
161
155
  const trimmed = rawRef.trim();
162
- if (!trimmed || trimmed.includes('@')) {
156
+ if (!trimmed || trimmed.includes("@")) {
163
157
  return null;
164
158
  }
165
- const slashIndex = trimmed.indexOf('/');
159
+ const slashIndex = trimmed.indexOf("/");
166
160
  if (slashIndex > 0) {
167
161
  return {
168
162
  creatorUsername: trimmed.slice(0, slashIndex),
@@ -178,7 +172,7 @@ function buildAssetPackUploadPlans(tasks, defaultCreator, currentUserRole) {
178
172
  const packPlansByKey = new Map();
179
173
  const ownedPackByAssetKey = new Map();
180
174
  for (const task of tasks) {
181
- if (task.kind !== 'asset-pack') {
175
+ if (task.kind !== "asset-pack") {
182
176
  continue;
183
177
  }
184
178
  const creator = getTaskCreatorResult(task, defaultCreator, currentUserRole);
@@ -222,7 +216,7 @@ function buildAssetPackUploadPlans(tasks, defaultCreator, currentUserRole) {
222
216
  };
223
217
  }
224
218
  function resolveMutationCreatorUsername(task, creatorUsername, targetCreatorUsername) {
225
- const mutationCreatorUsername = typeof targetCreatorUsername === 'string' && targetCreatorUsername.trim().length > 0
219
+ const mutationCreatorUsername = typeof targetCreatorUsername === "string" && targetCreatorUsername.trim().length > 0
226
220
  ? targetCreatorUsername.trim()
227
221
  : creatorUsername.trim();
228
222
  if (!mutationCreatorUsername) {
@@ -231,39 +225,39 @@ function resolveMutationCreatorUsername(task, creatorUsername, targetCreatorUser
231
225
  return mutationCreatorUsername;
232
226
  }
233
227
  function resolveAssetFormat(task) {
234
- if (typeof task.format === 'string' && task.format.trim().length > 0) {
228
+ if (typeof task.format === "string" && task.format.trim().length > 0) {
235
229
  return task.format.trim().toUpperCase();
236
230
  }
237
- if (task.category === 'MODEL_3D') {
231
+ if (task.category === "MODEL_3D") {
238
232
  const primaryFile = task.filePaths.primary;
239
- if (typeof primaryFile === 'string') {
233
+ if (typeof primaryFile === "string") {
240
234
  const normalizedPrimary = primaryFile.trim().toLowerCase();
241
- if (normalizedPrimary.endsWith('.boxel.json')) {
242
- return 'PLAYDROP_BOXEL_JSON';
235
+ if (normalizedPrimary.endsWith(".boxel.json")) {
236
+ return "PLAYDROP_BOXEL_JSON";
243
237
  }
244
- if (normalizedPrimary.endsWith('.vox')) {
245
- return 'VOX';
238
+ if (normalizedPrimary.endsWith(".vox")) {
239
+ return "VOX";
246
240
  }
247
241
  const primaryExtension = (0, node_path_1.extname)(normalizedPrimary);
248
- if (primaryExtension === '.glb') {
249
- return 'GLB';
242
+ if (primaryExtension === ".glb") {
243
+ return "GLB";
250
244
  }
251
- if (primaryExtension === '.gltf') {
252
- return 'GLTF';
245
+ if (primaryExtension === ".gltf") {
246
+ return "GLTF";
253
247
  }
254
248
  }
255
249
  const boxelFile = task.filePaths.boxel;
256
- if (typeof boxelFile === 'string' && boxelFile.trim().toLowerCase().endsWith('.boxel.json')) {
257
- return 'PLAYDROP_BOXEL_JSON';
250
+ if (typeof boxelFile === "string" && boxelFile.trim().toLowerCase().endsWith(".boxel.json")) {
251
+ return "PLAYDROP_BOXEL_JSON";
258
252
  }
259
253
  const meshFile = task.filePaths.mesh;
260
- if (typeof meshFile === 'string') {
254
+ if (typeof meshFile === "string") {
261
255
  const meshExtension = (0, node_path_1.extname)(meshFile).toLowerCase();
262
- if (meshExtension === '.glb') {
263
- return 'GLB';
256
+ if (meshExtension === ".glb") {
257
+ return "GLB";
264
258
  }
265
- if (meshExtension === '.gltf') {
266
- return 'GLTF';
259
+ if (meshExtension === ".gltf") {
260
+ return "GLTF";
267
261
  }
268
262
  }
269
263
  throw new Error(`Asset "${task.name}" is missing files.primary or uses an unsupported MODEL_3D primary extension.`);
@@ -283,8 +277,8 @@ function resolveAssetFormat(task) {
283
277
  return inferred;
284
278
  }
285
279
  function validateAssetSubcategoryCompatibility(task, format) {
286
- const category = typeof task.category === 'string' ? task.category.trim().toUpperCase() : '';
287
- const subcategory = typeof task.subcategory === 'string' ? task.subcategory.trim().toLowerCase() : '';
280
+ const category = typeof task.category === "string" ? task.category.trim().toUpperCase() : "";
281
+ const subcategory = typeof task.subcategory === "string" ? task.subcategory.trim().toLowerCase() : "";
288
282
  const definition = types_1.ASSET_SUBCATEGORY_DEFINITIONS_BY_KEY[`${category}:${subcategory}`];
289
283
  if (!definition) {
290
284
  throw new Error(`Asset "${task.name}" uses unsupported subcategory "${task.subcategory}" for category "${task.category}".`);
@@ -296,7 +290,7 @@ function validateAssetSubcategoryCompatibility(task, format) {
296
290
  return subcategory;
297
291
  }
298
292
  async function prepareAssetTaskUploadData(task) {
299
- if ('assetSpec' in task && typeof task.assetSpec === 'string' && task.assetSpec.trim().length > 0) {
293
+ if ("assetSpec" in task && typeof task.assetSpec === "string" && task.assetSpec.trim().length > 0) {
300
294
  const uploadFiles = Object.entries(task.filePaths)
301
295
  .sort(([leftRole], [rightRole]) => leftRole.localeCompare(rightRole))
302
296
  .map(([role, filePath]) => {
@@ -342,39 +336,39 @@ async function uploadAssetTask(client, task, sourceAppVersionId, creatorUsername
342
336
  fieldName: entry.fieldName,
343
337
  filename: entry.filename,
344
338
  }));
345
- const targetCreatorUsername = typeof creatorUsername === 'string' ? creatorUsername.trim() : '';
339
+ const targetCreatorUsername = typeof creatorUsername === "string" ? creatorUsername.trim() : "";
346
340
  if (!targetCreatorUsername) {
347
341
  throw new Error(`Asset "${task.name}" upload is missing creator username.`);
348
342
  }
349
343
  const response = await client.createAssetVersion(targetCreatorUsername, task.name, prepared.assetSpec
350
344
  ? {
351
- displayName: task.kind === 'asset' ? task.displayName : undefined,
345
+ displayName: task.kind === "asset" ? task.displayName : undefined,
352
346
  assetSpec: prepared.assetSpec,
353
- remixRef: task.kind === 'asset' ? task.remix : undefined,
347
+ remixRef: task.kind === "asset" ? task.remix : undefined,
354
348
  visibility: visibility,
355
349
  license: task.license,
356
- sourceKind: sourceAppVersionId ? 'APP_EMBEDDED' : 'UPLOAD',
350
+ sourceKind: sourceAppVersionId ? "APP_EMBEDDED" : "UPLOAD",
357
351
  sourceAppVersionId,
358
- runtimeKey: task.kind === 'owned-asset' ? task.runtimeKey : undefined,
359
- tags: task.kind === 'asset' ? task.tags : undefined,
360
- clearTags: task.kind === 'asset' || task.kind === 'owned-asset' ? options?.clearTags : undefined,
352
+ runtimeKey: task.kind === "owned-asset" ? task.runtimeKey : undefined,
353
+ tags: task.kind === "asset" ? task.tags : undefined,
354
+ clearTags: task.kind === "asset" || task.kind === "owned-asset" ? options?.clearTags : undefined,
361
355
  shopListed: task.shopListed,
362
356
  shopPriceCredits: task.shopPriceCredits,
363
357
  files,
364
358
  }
365
359
  : {
366
- displayName: task.kind === 'asset' ? task.displayName : undefined,
360
+ displayName: task.kind === "asset" ? task.displayName : undefined,
367
361
  category: task.category,
368
362
  subcategory: prepared.subcategory,
369
363
  format: prepared.format,
370
- remixRef: task.kind === 'asset' ? task.remix : undefined,
364
+ remixRef: task.kind === "asset" ? task.remix : undefined,
371
365
  visibility: visibility,
372
366
  license: task.license,
373
- sourceKind: sourceAppVersionId ? 'APP_EMBEDDED' : 'UPLOAD',
367
+ sourceKind: sourceAppVersionId ? "APP_EMBEDDED" : "UPLOAD",
374
368
  sourceAppVersionId,
375
- runtimeKey: task.kind === 'owned-asset' ? task.runtimeKey : undefined,
376
- tags: task.kind === 'asset' ? task.tags : undefined,
377
- clearTags: task.kind === 'asset' || task.kind === 'owned-asset' ? options?.clearTags : undefined,
369
+ runtimeKey: task.kind === "owned-asset" ? task.runtimeKey : undefined,
370
+ tags: task.kind === "asset" ? task.tags : undefined,
371
+ clearTags: task.kind === "asset" || task.kind === "owned-asset" ? options?.clearTags : undefined,
378
372
  shopListed: task.shopListed,
379
373
  shopPriceCredits: task.shopPriceCredits,
380
374
  files,
@@ -382,8 +376,8 @@ async function uploadAssetTask(client, task, sourceAppVersionId, creatorUsername
382
376
  const uploadedCreatorUsername = response.asset.creatorUsername;
383
377
  const name = response.asset.name;
384
378
  const revision = response.version.revision;
385
- const versionNodeId = typeof response.versionNodeId === 'string' ? response.versionNodeId.trim() : '';
386
- if (typeof uploadedCreatorUsername !== 'string' || uploadedCreatorUsername.trim().length === 0) {
379
+ const versionNodeId = typeof response.versionNodeId === "string" ? response.versionNodeId.trim() : "";
380
+ if (typeof uploadedCreatorUsername !== "string" || uploadedCreatorUsername.trim().length === 0) {
387
381
  throw new Error(`Asset "${task.name}" upload did not return creatorUsername.`);
388
382
  }
389
383
  if (!versionNodeId) {
@@ -398,14 +392,14 @@ async function uploadAssetTask(client, task, sourceAppVersionId, creatorUsername
398
392
  };
399
393
  }
400
394
  async function uploadAssetSpecTask(client, task, creatorUsername) {
401
- const targetCreatorUsername = typeof creatorUsername === 'string' ? creatorUsername.trim() : '';
395
+ const targetCreatorUsername = typeof creatorUsername === "string" ? creatorUsername.trim() : "";
402
396
  if (!targetCreatorUsername) {
403
397
  throw new Error(`Asset spec "${task.name}@${task.version}" upload is missing creator username.`);
404
398
  }
405
- const symbol = prepareUploadFile(task.symbolPath, 'symbol', 'image/svg+xml');
406
- const contract = prepareUploadFile(task.contractPath, 'contract', 'application/json');
399
+ const symbol = prepareUploadFile(task.symbolPath, "symbol", "image/svg+xml");
400
+ const contract = prepareUploadFile(task.contractPath, "contract", "application/json");
407
401
  const documentation = task.documentationPath
408
- ? prepareUploadFile(task.documentationPath, 'documentation', 'text/markdown')
402
+ ? prepareUploadFile(task.documentationPath, "documentation", "text/markdown")
409
403
  : null;
410
404
  await client.createAssetSpecVersion(targetCreatorUsername, task.name, {
411
405
  version: task.version,
@@ -449,16 +443,16 @@ function parseAssetRef(raw) {
449
443
  async function resolveAssetReference(client, rawRef, fallbackCreator, uploadedAssets) {
450
444
  const trimmed = rawRef.trim();
451
445
  if (!trimmed) {
452
- throw new Error('Asset pack has an empty asset reference.');
446
+ throw new Error("Asset pack has an empty asset reference.");
453
447
  }
454
448
  const parsed = parseAssetRef(trimmed);
455
449
  if (parsed) {
456
450
  return `asset:${parsed.creatorUsername}/${parsed.name}@r${parsed.revision}`;
457
451
  }
458
- if (trimmed.includes('@')) {
452
+ if (trimmed.includes("@")) {
459
453
  throw new Error(`Invalid asset ref "${trimmed}". Use "asset:creator/name@rN" format.`);
460
454
  }
461
- const slashIndex = trimmed.indexOf('/');
455
+ const slashIndex = trimmed.indexOf("/");
462
456
  const creatorUsername = slashIndex > 0 ? trimmed.slice(0, slashIndex) : fallbackCreator;
463
457
  const name = slashIndex > 0 ? trimmed.slice(slashIndex + 1) : trimmed;
464
458
  if (!creatorUsername || !name) {
@@ -471,13 +465,17 @@ async function resolveAssetReference(client, rawRef, fallbackCreator, uploadedAs
471
465
  }
472
466
  const detail = await client.fetchAssetBySlug(creatorUsername, name);
473
467
  const revision = detail?.asset?.currentVersion?.revision;
474
- if (typeof revision !== 'number' || !Number.isInteger(revision) || revision <= 0) {
468
+ if (typeof revision !== "number" || !Number.isInteger(revision) || revision <= 0) {
475
469
  throw new Error(`Asset "${creatorUsername}/${name}" has no current version to reference from asset pack.`);
476
470
  }
477
471
  return `asset:${creatorUsername}/${name}@r${revision}`;
478
472
  }
479
473
  function shouldAbortPackUploadOnError(error) {
480
- return error instanceof types_1.ApiError && error.status >= 400 && error.status < 500 && error.status !== 408 && error.status !== 429;
474
+ return (error instanceof types_1.ApiError &&
475
+ error.status >= 400 &&
476
+ error.status < 500 &&
477
+ error.status !== 408 &&
478
+ error.status !== 429);
481
479
  }
482
480
  function describeError(error) {
483
481
  if (error instanceof Error && error.message.trim().length > 0) {
@@ -527,7 +525,9 @@ async function buildPackMembersAndExistingAssets(client, task, mutationCreatorUs
527
525
  const ownedAssetNames = new Set(task.ownedAssets.map((asset) => asset.name));
528
526
  for (const rawRef of task.assets) {
529
527
  const localCandidate = parseUnversionedAssetTaskRef(rawRef, mutationCreatorUsername);
530
- if (localCandidate && localCandidate.creatorUsername === mutationCreatorUsername && ownedAssetNames.has(localCandidate.name)) {
528
+ if (localCandidate &&
529
+ localCandidate.creatorUsername === mutationCreatorUsername &&
530
+ ownedAssetNames.has(localCandidate.name)) {
531
531
  const localAssetKey = buildAssetKey(localCandidate.creatorUsername, localCandidate.name);
532
532
  const localUploadKey = uploadKeyByAssetKey.get(localAssetKey);
533
533
  if (localUploadKey) {
@@ -549,25 +549,25 @@ async function buildPackMembersAndExistingAssets(client, task, mutationCreatorUs
549
549
  function buildPackListingUploads(task) {
550
550
  const listingUploads = [];
551
551
  if (task.listing?.iconPath) {
552
- listingUploads.push(prepareListingMediaUpload('icon', task.listing.iconPath, 'image/png'));
552
+ listingUploads.push(prepareListingMediaUpload("icon", task.listing.iconPath, "image/png"));
553
553
  }
554
554
  if (task.listing?.heroPortraitPath) {
555
- listingUploads.push(prepareListingMediaUpload('heroPortrait', task.listing.heroPortraitPath, 'image/png'));
555
+ listingUploads.push(prepareListingMediaUpload("heroPortrait", task.listing.heroPortraitPath, "image/png"));
556
556
  }
557
557
  if (task.listing?.heroLandscapePath) {
558
- listingUploads.push(prepareListingMediaUpload('heroLandscape', task.listing.heroLandscapePath, 'image/png'));
558
+ listingUploads.push(prepareListingMediaUpload("heroLandscape", task.listing.heroLandscapePath, "image/png"));
559
559
  }
560
560
  task.listing?.screenshotPortraitPaths.forEach((filePath, index) => {
561
- listingUploads.push(prepareListingMediaUpload(`screenshotsPortrait:${index}`, filePath, 'image/png'));
561
+ listingUploads.push(prepareListingMediaUpload(`screenshotsPortrait:${index}`, filePath, "image/png"));
562
562
  });
563
563
  task.listing?.screenshotLandscapePaths.forEach((filePath, index) => {
564
- listingUploads.push(prepareListingMediaUpload(`screenshotsLandscape:${index}`, filePath, 'image/png'));
564
+ listingUploads.push(prepareListingMediaUpload(`screenshotsLandscape:${index}`, filePath, "image/png"));
565
565
  });
566
566
  task.listing?.videoPortraitPaths.forEach((filePath, index) => {
567
- listingUploads.push(prepareListingMediaUpload(`videosPortrait:${index}`, filePath, 'video/mp4'));
567
+ listingUploads.push(prepareListingMediaUpload(`videosPortrait:${index}`, filePath, "video/mp4"));
568
568
  });
569
569
  task.listing?.videoLandscapePaths.forEach((filePath, index) => {
570
- listingUploads.push(prepareListingMediaUpload(`videosLandscape:${index}`, filePath, 'video/mp4'));
570
+ listingUploads.push(prepareListingMediaUpload(`videosLandscape:${index}`, filePath, "video/mp4"));
571
571
  });
572
572
  return listingUploads;
573
573
  }
@@ -576,13 +576,21 @@ function buildPackListingPayload(listingUploads) {
576
576
  return undefined;
577
577
  }
578
578
  return {
579
- icon: listingUploads.find((entry) => entry.mediaKey === 'icon')?.entry,
580
- heroPortrait: listingUploads.find((entry) => entry.mediaKey === 'heroPortrait')?.entry,
581
- heroLandscape: listingUploads.find((entry) => entry.mediaKey === 'heroLandscape')?.entry,
582
- screenshotsPortrait: listingUploads.filter((entry) => entry.mediaKey.startsWith('screenshotsPortrait:')).map((entry) => entry.entry),
583
- screenshotsLandscape: listingUploads.filter((entry) => entry.mediaKey.startsWith('screenshotsLandscape:')).map((entry) => entry.entry),
584
- videosPortrait: listingUploads.filter((entry) => entry.mediaKey.startsWith('videosPortrait:')).map((entry) => entry.entry),
585
- videosLandscape: listingUploads.filter((entry) => entry.mediaKey.startsWith('videosLandscape:')).map((entry) => entry.entry),
579
+ icon: listingUploads.find((entry) => entry.mediaKey === "icon")?.entry,
580
+ heroPortrait: listingUploads.find((entry) => entry.mediaKey === "heroPortrait")?.entry,
581
+ heroLandscape: listingUploads.find((entry) => entry.mediaKey === "heroLandscape")?.entry,
582
+ screenshotsPortrait: listingUploads
583
+ .filter((entry) => entry.mediaKey.startsWith("screenshotsPortrait:"))
584
+ .map((entry) => entry.entry),
585
+ screenshotsLandscape: listingUploads
586
+ .filter((entry) => entry.mediaKey.startsWith("screenshotsLandscape:"))
587
+ .map((entry) => entry.entry),
588
+ videosPortrait: listingUploads
589
+ .filter((entry) => entry.mediaKey.startsWith("videosPortrait:"))
590
+ .map((entry) => entry.entry),
591
+ videosLandscape: listingUploads
592
+ .filter((entry) => entry.mediaKey.startsWith("videosLandscape:"))
593
+ .map((entry) => entry.entry),
586
594
  };
587
595
  }
588
596
  function buildPackInitializeRequest(task, ownedAssets, existingAssets, members, listingUploads, options) {
@@ -648,7 +656,7 @@ async function uploadAssetPackTask(client, task, creatorUsername, uploadedAssets
648
656
  const listingUploads = buildPackListingUploads(task);
649
657
  const initializeBody = buildPackInitializeRequest(task, ownedAssets, existingAssets, members, listingUploads, options);
650
658
  const initializeResponse = await client.initializeAssetPackUpload(mutationCreatorUsername, task.name, initializeBody);
651
- if (initializeResponse.status === 'finalized') {
659
+ if (initializeResponse.status === "finalized") {
652
660
  if (!initializeResponse.versionNodeId || !initializeResponse.version) {
653
661
  throw new Error(`Asset pack "${task.name}" finalize response is missing version details.`);
654
662
  }
@@ -658,7 +666,7 @@ async function uploadAssetPackTask(client, task, creatorUsername, uploadedAssets
658
666
  try {
659
667
  await uploadPendingPackSessionEntries(client, task, mutationCreatorUsername, sessionId, preparedLocalAssets, new Set(initializeResponse.session.uploadedAssetKeys), listingUploads, new Set(initializeResponse.session.uploadedMediaKeys));
660
668
  const finalizedResponse = await client.finalizeAssetPackUpload(mutationCreatorUsername, task.name, sessionId);
661
- const versionNodeId = typeof finalizedResponse.versionNodeId === 'string' ? finalizedResponse.versionNodeId.trim() : '';
669
+ const versionNodeId = typeof finalizedResponse.versionNodeId === "string" ? finalizedResponse.versionNodeId.trim() : "";
662
670
  if (!versionNodeId) {
663
671
  throw new Error(`Asset pack "${task.name}@${task.version}" upload did not return versionNodeId.`);
664
672
  }
@@ -1,4 +1,4 @@
1
- import type { ApiClient } from '@playdrop/api-client';
1
+ import type { ApiClient } from "@playdrop/api-client";
2
2
  type PendingRelationRow = {
3
3
  fromNodeId: string;
4
4
  type: string;