@playdrop/playdrop-cli 0.16.12 → 0.17.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (364) hide show
  1. package/config/client-meta.json +4 -4
  2. package/dist/apiClient.d.ts +1 -2
  3. package/dist/apiClient.js +1 -16
  4. package/dist/appUrls.js +4 -0
  5. package/dist/apps/build.d.ts +12 -4
  6. package/dist/apps/build.js +55 -22
  7. package/dist/apps/index.d.ts +2 -1
  8. package/dist/apps/index.js +4 -1
  9. package/dist/apps/loadCheck.d.ts +5 -1
  10. package/dist/apps/loadCheck.js +52 -18
  11. package/dist/apps/serverBuild.d.ts +17 -0
  12. package/dist/apps/serverBuild.js +155 -0
  13. package/dist/apps/staticHtml.d.ts +1 -0
  14. package/dist/apps/staticHtml.js +19 -10
  15. package/dist/apps/upload.d.ts +12 -2
  16. package/dist/apps/upload.js +127 -46
  17. package/dist/catalogue.d.ts +23 -1
  18. package/dist/catalogue.js +126 -100
  19. package/dist/commandContext.d.ts +6 -3
  20. package/dist/commandContext.js +108 -18
  21. package/dist/commands/build.js +0 -7
  22. package/dist/commands/captureListing.d.ts +3 -0
  23. package/dist/commands/captureListing.js +48 -4
  24. package/dist/commands/chat.d.ts +4 -7
  25. package/dist/commands/chat.js +165 -77
  26. package/dist/commands/check.js +34 -1
  27. package/dist/commands/create.js +30 -263
  28. package/dist/commands/dev.js +37 -3
  29. package/dist/commands/devBrowser.js +2 -2
  30. package/dist/commands/devGameServer.d.ts +16 -0
  31. package/dist/commands/devGameServer.js +237 -0
  32. package/dist/commands/devRuntimeAssets.d.ts +1 -0
  33. package/dist/commands/devRuntimeAssets.js +2 -0
  34. package/dist/commands/devServer.d.ts +3 -0
  35. package/dist/commands/devServer.js +111 -5
  36. package/dist/commands/generation.d.ts +33 -4
  37. package/dist/commands/generation.js +304 -115
  38. package/dist/commands/login.js +23 -7
  39. package/dist/commands/review.d.ts +1 -1
  40. package/dist/commands/review.js +68 -95
  41. package/dist/commands/source.d.ts +19 -0
  42. package/dist/commands/source.js +142 -0
  43. package/dist/commands/tweaks.js +5 -11
  44. package/dist/commands/upload-content.d.ts +1 -1
  45. package/dist/commands/upload-content.js +16 -12
  46. package/dist/commands/upload.d.ts +17 -1
  47. package/dist/commands/upload.js +47 -10
  48. package/dist/commands/worker/archive-staging.d.ts +1 -0
  49. package/dist/commands/worker/archive-staging.js +13 -2
  50. package/dist/commands/worker/e2e-fixtures.d.ts +32 -0
  51. package/dist/commands/worker/e2e-fixtures.js +466 -0
  52. package/dist/commands/worker/game-server-infra.d.ts +80 -0
  53. package/dist/commands/worker/game-server-infra.js +595 -0
  54. package/dist/commands/worker/game-source-git.d.ts +126 -0
  55. package/dist/commands/worker/game-source-git.js +780 -0
  56. package/dist/commands/worker/generation.d.ts +94 -0
  57. package/dist/commands/worker/generation.js +1458 -0
  58. package/dist/commands/worker/provider-telemetry.js +1 -1
  59. package/dist/commands/worker/runtime.d.ts +8 -10
  60. package/dist/commands/worker/runtime.js +53 -48
  61. package/dist/commands/worker.d.ts +79 -19
  62. package/dist/commands/worker.js +1796 -419
  63. package/dist/config.d.ts +2 -0
  64. package/dist/config.js +16 -3
  65. package/dist/environment.d.ts +0 -1
  66. package/dist/environment.js +0 -8
  67. package/dist/index.js +92 -22
  68. package/dist/workerAppProject.d.ts +1 -1
  69. package/dist/workerAppProject.js +15 -2
  70. package/node_modules/@playdrop/api-client/dist/client.d.ts +143 -39
  71. package/node_modules/@playdrop/api-client/dist/client.d.ts.map +1 -1
  72. package/node_modules/@playdrop/api-client/dist/client.js +33 -0
  73. package/node_modules/@playdrop/api-client/dist/core/request.d.ts +1 -0
  74. package/node_modules/@playdrop/api-client/dist/core/request.d.ts.map +1 -1
  75. package/node_modules/@playdrop/api-client/dist/core/request.js +17 -11
  76. package/node_modules/@playdrop/api-client/dist/domains/agent-tasks.d.ts +51 -6
  77. package/node_modules/@playdrop/api-client/dist/domains/agent-tasks.d.ts.map +1 -1
  78. package/node_modules/@playdrop/api-client/dist/domains/agent-tasks.js +338 -41
  79. package/node_modules/@playdrop/api-client/dist/domains/ai.d.ts +24 -1
  80. package/node_modules/@playdrop/api-client/dist/domains/ai.d.ts.map +1 -1
  81. package/node_modules/@playdrop/api-client/dist/domains/ai.js +20 -0
  82. package/node_modules/@playdrop/api-client/dist/domains/apps.d.ts +13 -8
  83. package/node_modules/@playdrop/api-client/dist/domains/apps.d.ts.map +1 -1
  84. package/node_modules/@playdrop/api-client/dist/domains/apps.js +158 -90
  85. package/node_modules/@playdrop/api-client/dist/domains/assets.d.ts +4 -0
  86. package/node_modules/@playdrop/api-client/dist/domains/assets.d.ts.map +1 -1
  87. package/node_modules/@playdrop/api-client/dist/domains/assets.js +27 -0
  88. package/node_modules/@playdrop/api-client/dist/domains/chat.d.ts +152 -21
  89. package/node_modules/@playdrop/api-client/dist/domains/chat.d.ts.map +1 -1
  90. package/node_modules/@playdrop/api-client/dist/domains/chat.js +477 -100
  91. package/node_modules/@playdrop/api-client/dist/domains/player-meta.d.ts +2 -1
  92. package/node_modules/@playdrop/api-client/dist/domains/player-meta.d.ts.map +1 -1
  93. package/node_modules/@playdrop/api-client/dist/domains/player-meta.js +9 -0
  94. package/node_modules/@playdrop/api-client/dist/domains/playtrade.d.ts +1 -2
  95. package/node_modules/@playdrop/api-client/dist/domains/playtrade.d.ts.map +1 -1
  96. package/node_modules/@playdrop/api-client/dist/domains/playtrade.js +0 -11
  97. package/node_modules/@playdrop/api-client/dist/domains/social.d.ts +29 -0
  98. package/node_modules/@playdrop/api-client/dist/domains/social.d.ts.map +1 -0
  99. package/node_modules/@playdrop/api-client/dist/domains/social.js +79 -0
  100. package/node_modules/@playdrop/api-client/dist/index.d.ts +81 -30
  101. package/node_modules/@playdrop/api-client/dist/index.d.ts.map +1 -1
  102. package/node_modules/@playdrop/api-client/dist/index.js +217 -56
  103. package/node_modules/@playdrop/api-client/dist/runtime.d.ts +18 -0
  104. package/node_modules/@playdrop/api-client/dist/runtime.d.ts.map +1 -0
  105. package/node_modules/@playdrop/api-client/dist/runtime.js +54 -0
  106. package/node_modules/@playdrop/api-client/package.json +7 -0
  107. package/node_modules/@playdrop/config/client-meta.json +4 -4
  108. package/node_modules/@playdrop/config/dist/src/creator-plans.d.ts +11 -0
  109. package/node_modules/@playdrop/config/dist/src/creator-plans.d.ts.map +1 -1
  110. package/node_modules/@playdrop/config/dist/src/creator-plans.js +13 -1
  111. package/node_modules/@playdrop/config/dist/src/deployment.d.ts +0 -1
  112. package/node_modules/@playdrop/config/dist/src/deployment.d.ts.map +1 -1
  113. package/node_modules/@playdrop/config/dist/src/deployment.js +0 -8
  114. package/node_modules/@playdrop/config/dist/src/public-deployment.d.ts +0 -1
  115. package/node_modules/@playdrop/config/dist/src/public-deployment.d.ts.map +1 -1
  116. package/node_modules/@playdrop/config/dist/src/public-deployment.js +0 -8
  117. package/node_modules/@playdrop/config/dist/src/runtime-service-origins.d.ts +1 -1
  118. package/node_modules/@playdrop/config/dist/src/runtime-service-origins.js +2 -2
  119. package/node_modules/@playdrop/config/dist/src/server/logging.d.ts.map +1 -1
  120. package/node_modules/@playdrop/config/dist/src/server/logging.js +31 -2
  121. package/node_modules/@playdrop/config/dist/test/creator-plans.test.js +10 -0
  122. package/node_modules/@playdrop/config/dist/test/deployment.test.js +0 -4
  123. package/node_modules/@playdrop/config/dist/test/runtime-service-origins.test.js +2 -0
  124. package/node_modules/@playdrop/config/dist/tsconfig.tsbuildinfo +1 -1
  125. package/node_modules/@playdrop/config/package.json +6 -0
  126. package/node_modules/@playdrop/game-source-git/dist/src/archive.d.ts +9 -0
  127. package/node_modules/@playdrop/game-source-git/dist/src/archive.d.ts.map +1 -0
  128. package/node_modules/@playdrop/game-source-git/dist/src/archive.js +107 -0
  129. package/node_modules/@playdrop/game-source-git/dist/src/bundle-storage.d.ts +29 -0
  130. package/node_modules/@playdrop/game-source-git/dist/src/bundle-storage.d.ts.map +1 -0
  131. package/node_modules/@playdrop/game-source-git/dist/src/bundle-storage.js +64 -0
  132. package/node_modules/@playdrop/game-source-git/dist/src/export.d.ts +8 -0
  133. package/node_modules/@playdrop/game-source-git/dist/src/export.d.ts.map +1 -0
  134. package/node_modules/@playdrop/game-source-git/dist/src/export.js +25 -0
  135. package/node_modules/@playdrop/game-source-git/dist/src/git.d.ts +39 -0
  136. package/node_modules/@playdrop/game-source-git/dist/src/git.d.ts.map +1 -0
  137. package/node_modules/@playdrop/game-source-git/dist/src/git.js +195 -0
  138. package/node_modules/@playdrop/game-source-git/dist/src/ignore.d.ts +6 -0
  139. package/node_modules/@playdrop/game-source-git/dist/src/ignore.d.ts.map +1 -0
  140. package/node_modules/@playdrop/game-source-git/dist/src/ignore.js +51 -0
  141. package/node_modules/@playdrop/game-source-git/dist/src/index.d.ts +10 -0
  142. package/node_modules/@playdrop/game-source-git/dist/src/index.d.ts.map +1 -0
  143. package/node_modules/@playdrop/{boxel-core/dist/src/humanoid/r15 → game-source-git/dist/src}/index.js +9 -4
  144. package/node_modules/@playdrop/game-source-git/dist/src/lock.d.ts +17 -0
  145. package/node_modules/@playdrop/game-source-git/dist/src/lock.d.ts.map +1 -0
  146. package/node_modules/@playdrop/game-source-git/dist/src/lock.js +72 -0
  147. package/node_modules/@playdrop/game-source-git/dist/src/materialize.d.ts +10 -0
  148. package/node_modules/@playdrop/game-source-git/dist/src/materialize.d.ts.map +1 -0
  149. package/node_modules/@playdrop/game-source-git/dist/src/materialize.js +99 -0
  150. package/node_modules/@playdrop/game-source-git/dist/src/paths.d.ts +24 -0
  151. package/node_modules/@playdrop/game-source-git/dist/src/paths.d.ts.map +1 -0
  152. package/node_modules/@playdrop/game-source-git/dist/src/paths.js +207 -0
  153. package/node_modules/@playdrop/game-source-git/dist/src/repository.d.ts +66 -0
  154. package/node_modules/@playdrop/game-source-git/dist/src/repository.d.ts.map +1 -0
  155. package/node_modules/@playdrop/game-source-git/dist/src/repository.js +213 -0
  156. package/node_modules/@playdrop/game-source-git/dist/test/core.test.d.ts +2 -0
  157. package/node_modules/@playdrop/game-source-git/dist/test/core.test.d.ts.map +1 -0
  158. package/node_modules/@playdrop/game-source-git/dist/test/core.test.js +441 -0
  159. package/node_modules/@playdrop/game-source-git/dist/tsconfig.tsbuildinfo +1 -0
  160. package/node_modules/@playdrop/game-source-git/package.json +28 -0
  161. package/node_modules/@playdrop/types/dist/agent-task-terminal.d.ts +2 -2
  162. package/node_modules/@playdrop/types/dist/agent-task-terminal.d.ts.map +1 -1
  163. package/node_modules/@playdrop/types/dist/agent-task-terminal.js +15 -9
  164. package/node_modules/@playdrop/types/dist/api.d.ts +730 -166
  165. package/node_modules/@playdrop/types/dist/api.d.ts.map +1 -1
  166. package/node_modules/@playdrop/types/dist/api.js +65 -18
  167. package/node_modules/@playdrop/types/dist/asset-pack.d.ts +2 -0
  168. package/node_modules/@playdrop/types/dist/asset-pack.d.ts.map +1 -1
  169. package/node_modules/@playdrop/types/dist/asset.d.ts +22 -8
  170. package/node_modules/@playdrop/types/dist/asset.d.ts.map +1 -1
  171. package/node_modules/@playdrop/types/dist/asset.js +26 -26
  172. package/node_modules/@playdrop/types/dist/chat.d.ts +273 -31
  173. package/node_modules/@playdrop/types/dist/chat.d.ts.map +1 -1
  174. package/node_modules/@playdrop/types/dist/chat.js +38 -4
  175. package/node_modules/@playdrop/types/dist/index.d.ts +3 -0
  176. package/node_modules/@playdrop/types/dist/index.d.ts.map +1 -1
  177. package/node_modules/@playdrop/types/dist/index.js +7 -1
  178. package/node_modules/@playdrop/types/dist/public-cache-tags.d.ts +11 -0
  179. package/node_modules/@playdrop/types/dist/public-cache-tags.d.ts.map +1 -0
  180. package/node_modules/@playdrop/types/dist/public-cache-tags.js +78 -0
  181. package/node_modules/@playdrop/types/dist/realtime.d.ts +3 -15
  182. package/node_modules/@playdrop/types/dist/realtime.d.ts.map +1 -1
  183. package/node_modules/@playdrop/types/dist/social.d.ts +64 -0
  184. package/node_modules/@playdrop/types/dist/social.d.ts.map +1 -0
  185. package/node_modules/@playdrop/{boxel-three/dist/src/types.js → types/dist/social.js} +14 -2
  186. package/node_modules/@playdrop/types/dist/spritesheet.d.ts +51 -0
  187. package/node_modules/@playdrop/types/dist/spritesheet.d.ts.map +1 -0
  188. package/node_modules/@playdrop/types/dist/spritesheet.js +73 -0
  189. package/node_modules/@playdrop/types/dist/version.d.ts +86 -58
  190. package/node_modules/@playdrop/types/dist/version.d.ts.map +1 -1
  191. package/node_modules/@playdrop/types/dist/version.js +111 -0
  192. package/node_modules/@playdrop/types/package.json +14 -0
  193. package/node_modules/@playdrop/vox-three/dist/src/index.d.ts +1 -1
  194. package/node_modules/@playdrop/vox-three/dist/src/index.js +1 -1
  195. package/node_modules/@playdrop/vox-three/dist/src/index.js.map +1 -1
  196. package/node_modules/@playdrop/vox-three/dist/src/vox.d.ts +0 -3
  197. package/node_modules/@playdrop/vox-three/dist/src/vox.js +0 -110
  198. package/node_modules/@playdrop/vox-three/dist/src/vox.js.map +1 -1
  199. package/node_modules/@playdrop/vox-three/dist/test/vox.test.js +0 -18
  200. package/node_modules/@playdrop/vox-three/dist/test/vox.test.js.map +1 -1
  201. package/node_modules/@playdrop/vox-three/package.json +8 -4
  202. package/package.json +9 -11
  203. package/dist/assets/model-artifacts.d.ts +0 -8
  204. package/dist/assets/model-artifacts.js +0 -382
  205. package/dist/assets/model-worker.d.ts +0 -22
  206. package/dist/assets/model-worker.js +0 -123
  207. package/node_modules/@playdrop/ai-client/dist/index.d.ts +0 -441
  208. package/node_modules/@playdrop/ai-client/dist/index.d.ts.map +0 -1
  209. package/node_modules/@playdrop/ai-client/dist/index.js +0 -499
  210. package/node_modules/@playdrop/ai-client/package.json +0 -22
  211. package/node_modules/@playdrop/boxel-core/dist/src/entity-cleaner.d.ts +0 -13
  212. package/node_modules/@playdrop/boxel-core/dist/src/entity-cleaner.js +0 -141
  213. package/node_modules/@playdrop/boxel-core/dist/src/entity-cleaner.js.map +0 -1
  214. package/node_modules/@playdrop/boxel-core/dist/src/entity-utils.d.ts +0 -47
  215. package/node_modules/@playdrop/boxel-core/dist/src/entity-utils.js +0 -313
  216. package/node_modules/@playdrop/boxel-core/dist/src/entity-utils.js.map +0 -1
  217. package/node_modules/@playdrop/boxel-core/dist/src/format-utils.d.ts +0 -3
  218. package/node_modules/@playdrop/boxel-core/dist/src/format-utils.js +0 -36
  219. package/node_modules/@playdrop/boxel-core/dist/src/format-utils.js.map +0 -1
  220. package/node_modules/@playdrop/boxel-core/dist/src/humanoid/geometry.d.ts +0 -23
  221. package/node_modules/@playdrop/boxel-core/dist/src/humanoid/geometry.js +0 -11
  222. package/node_modules/@playdrop/boxel-core/dist/src/humanoid/geometry.js.map +0 -1
  223. package/node_modules/@playdrop/boxel-core/dist/src/humanoid/index.d.ts +0 -4
  224. package/node_modules/@playdrop/boxel-core/dist/src/humanoid/index.js +0 -21
  225. package/node_modules/@playdrop/boxel-core/dist/src/humanoid/index.js.map +0 -1
  226. package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r15/common.d.ts +0 -4
  227. package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r15/common.js +0 -24
  228. package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r15/common.js.map +0 -1
  229. package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r15/index.d.ts +0 -3
  230. package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r15/index.js.map +0 -1
  231. package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r15/textured-builder.d.ts +0 -3
  232. package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r15/textured-builder.js +0 -387
  233. package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r15/textured-builder.js.map +0 -1
  234. package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r15/types.d.ts +0 -6
  235. package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r15/types.js +0 -3
  236. package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r15/types.js.map +0 -1
  237. package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r15/voxel-builder.d.ts +0 -3
  238. package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r15/voxel-builder.js +0 -373
  239. package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r15/voxel-builder.js.map +0 -1
  240. package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r6/builder.d.ts +0 -12
  241. package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r6/builder.js +0 -215
  242. package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r6/builder.js.map +0 -1
  243. package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r6/index.d.ts +0 -4
  244. package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r6/index.js +0 -18
  245. package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r6/index.js.map +0 -1
  246. package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r6/scanner.d.ts +0 -42
  247. package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r6/scanner.js +0 -145
  248. package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r6/scanner.js.map +0 -1
  249. package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r6/textures/artifacts.d.ts +0 -26
  250. package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r6/textures/artifacts.js +0 -65
  251. package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r6/textures/artifacts.js.map +0 -1
  252. package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r6/textures/face-map.d.ts +0 -33
  253. package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r6/textures/face-map.js +0 -175
  254. package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r6/textures/face-map.js.map +0 -1
  255. package/node_modules/@playdrop/boxel-core/dist/src/humanoid/templates/humanoid_r15.json +0 -1517
  256. package/node_modules/@playdrop/boxel-core/dist/src/humanoid/templates/humanoid_r6.json +0 -61
  257. package/node_modules/@playdrop/boxel-core/dist/src/humanoid/templates/index.d.ts +0 -10
  258. package/node_modules/@playdrop/boxel-core/dist/src/humanoid/templates/index.js +0 -23
  259. package/node_modules/@playdrop/boxel-core/dist/src/humanoid/templates/index.js.map +0 -1
  260. package/node_modules/@playdrop/boxel-core/dist/src/index.d.ts +0 -19
  261. package/node_modules/@playdrop/boxel-core/dist/src/index.js +0 -36
  262. package/node_modules/@playdrop/boxel-core/dist/src/index.js.map +0 -1
  263. package/node_modules/@playdrop/boxel-core/dist/src/materials.d.ts +0 -26
  264. package/node_modules/@playdrop/boxel-core/dist/src/materials.js +0 -184
  265. package/node_modules/@playdrop/boxel-core/dist/src/materials.js.map +0 -1
  266. package/node_modules/@playdrop/boxel-core/dist/src/palette_tools.d.ts +0 -68
  267. package/node_modules/@playdrop/boxel-core/dist/src/palette_tools.js +0 -488
  268. package/node_modules/@playdrop/boxel-core/dist/src/palette_tools.js.map +0 -1
  269. package/node_modules/@playdrop/boxel-core/dist/src/serialization.d.ts +0 -4
  270. package/node_modules/@playdrop/boxel-core/dist/src/serialization.js +0 -380
  271. package/node_modules/@playdrop/boxel-core/dist/src/serialization.js.map +0 -1
  272. package/node_modules/@playdrop/boxel-core/dist/src/textures.d.ts +0 -29
  273. package/node_modules/@playdrop/boxel-core/dist/src/textures.js +0 -208
  274. package/node_modules/@playdrop/boxel-core/dist/src/textures.js.map +0 -1
  275. package/node_modules/@playdrop/boxel-core/dist/src/transforms/textured-boxes/infer-face.d.ts +0 -9
  276. package/node_modules/@playdrop/boxel-core/dist/src/transforms/textured-boxes/infer-face.js +0 -312
  277. package/node_modules/@playdrop/boxel-core/dist/src/transforms/textured-boxes/infer-face.js.map +0 -1
  278. package/node_modules/@playdrop/boxel-core/dist/src/transforms/textured-boxes/layer-mode.d.ts +0 -9
  279. package/node_modules/@playdrop/boxel-core/dist/src/transforms/textured-boxes/layer-mode.js +0 -154
  280. package/node_modules/@playdrop/boxel-core/dist/src/transforms/textured-boxes/layer-mode.js.map +0 -1
  281. package/node_modules/@playdrop/boxel-core/dist/src/transforms/textured-boxes/merge-overlay.d.ts +0 -2
  282. package/node_modules/@playdrop/boxel-core/dist/src/transforms/textured-boxes/merge-overlay.js +0 -121
  283. package/node_modules/@playdrop/boxel-core/dist/src/transforms/textured-boxes/merge-overlay.js.map +0 -1
  284. package/node_modules/@playdrop/boxel-core/dist/src/transforms/textured-boxes/slice.d.ts +0 -20
  285. package/node_modules/@playdrop/boxel-core/dist/src/transforms/textured-boxes/slice.js +0 -389
  286. package/node_modules/@playdrop/boxel-core/dist/src/transforms/textured-boxes/slice.js.map +0 -1
  287. package/node_modules/@playdrop/boxel-core/dist/src/transforms/upscale.d.ts +0 -3
  288. package/node_modules/@playdrop/boxel-core/dist/src/transforms/upscale.js +0 -206
  289. package/node_modules/@playdrop/boxel-core/dist/src/transforms/upscale.js.map +0 -1
  290. package/node_modules/@playdrop/boxel-core/dist/src/transforms/voxels/slice.d.ts +0 -12
  291. package/node_modules/@playdrop/boxel-core/dist/src/transforms/voxels/slice.js +0 -81
  292. package/node_modules/@playdrop/boxel-core/dist/src/transforms/voxels/slice.js.map +0 -1
  293. package/node_modules/@playdrop/boxel-core/dist/src/transforms/voxels/textured-to-voxel.d.ts +0 -12
  294. package/node_modules/@playdrop/boxel-core/dist/src/transforms/voxels/textured-to-voxel.js +0 -318
  295. package/node_modules/@playdrop/boxel-core/dist/src/transforms/voxels/textured-to-voxel.js.map +0 -1
  296. package/node_modules/@playdrop/boxel-core/dist/src/types.d.ts +0 -168
  297. package/node_modules/@playdrop/boxel-core/dist/src/types.js +0 -3
  298. package/node_modules/@playdrop/boxel-core/dist/src/types.js.map +0 -1
  299. package/node_modules/@playdrop/boxel-core/dist/src/validation.d.ts +0 -24
  300. package/node_modules/@playdrop/boxel-core/dist/src/validation.js +0 -620
  301. package/node_modules/@playdrop/boxel-core/dist/src/validation.js.map +0 -1
  302. package/node_modules/@playdrop/boxel-core/dist/src/voxels/greedy-mesher.d.ts +0 -11
  303. package/node_modules/@playdrop/boxel-core/dist/src/voxels/greedy-mesher.js +0 -135
  304. package/node_modules/@playdrop/boxel-core/dist/src/voxels/greedy-mesher.js.map +0 -1
  305. package/node_modules/@playdrop/boxel-core/dist/src/voxels.d.ts +0 -23
  306. package/node_modules/@playdrop/boxel-core/dist/src/voxels.js +0 -52
  307. package/node_modules/@playdrop/boxel-core/dist/src/voxels.js.map +0 -1
  308. package/node_modules/@playdrop/boxel-core/package.json +0 -19
  309. package/node_modules/@playdrop/boxel-three/dist/src/animations.d.ts +0 -4
  310. package/node_modules/@playdrop/boxel-three/dist/src/animations.js +0 -92
  311. package/node_modules/@playdrop/boxel-three/dist/src/builders.d.ts +0 -8
  312. package/node_modules/@playdrop/boxel-three/dist/src/builders.js +0 -363
  313. package/node_modules/@playdrop/boxel-three/dist/src/context.d.ts +0 -24
  314. package/node_modules/@playdrop/boxel-three/dist/src/context.js +0 -58
  315. package/node_modules/@playdrop/boxel-three/dist/src/exporters/glb.d.ts +0 -100
  316. package/node_modules/@playdrop/boxel-three/dist/src/exporters/glb.js +0 -927
  317. package/node_modules/@playdrop/boxel-three/dist/src/exporters/image.d.ts +0 -18
  318. package/node_modules/@playdrop/boxel-three/dist/src/exporters/image.js +0 -294
  319. package/node_modules/@playdrop/boxel-three/dist/src/index.d.ts +0 -17
  320. package/node_modules/@playdrop/boxel-three/dist/src/index.js +0 -64
  321. package/node_modules/@playdrop/boxel-three/dist/src/instantiate.d.ts +0 -40
  322. package/node_modules/@playdrop/boxel-three/dist/src/instantiate.js +0 -96
  323. package/node_modules/@playdrop/boxel-three/dist/src/nodes.d.ts +0 -8
  324. package/node_modules/@playdrop/boxel-three/dist/src/nodes.js +0 -88
  325. package/node_modules/@playdrop/boxel-three/dist/src/overlays.d.ts +0 -7
  326. package/node_modules/@playdrop/boxel-three/dist/src/overlays.js +0 -123
  327. package/node_modules/@playdrop/boxel-three/dist/src/primitives.d.ts +0 -4
  328. package/node_modules/@playdrop/boxel-three/dist/src/primitives.js +0 -48
  329. package/node_modules/@playdrop/boxel-three/dist/src/scene.d.ts +0 -3
  330. package/node_modules/@playdrop/boxel-three/dist/src/scene.js +0 -168
  331. package/node_modules/@playdrop/boxel-three/dist/src/skinned-mesh.d.ts +0 -29
  332. package/node_modules/@playdrop/boxel-three/dist/src/skinned-mesh.js +0 -623
  333. package/node_modules/@playdrop/boxel-three/dist/src/texture-atlas.d.ts +0 -13
  334. package/node_modules/@playdrop/boxel-three/dist/src/texture-atlas.js +0 -133
  335. package/node_modules/@playdrop/boxel-three/dist/src/textures.d.ts +0 -17
  336. package/node_modules/@playdrop/boxel-three/dist/src/textures.js +0 -216
  337. package/node_modules/@playdrop/boxel-three/dist/src/types.d.ts +0 -112
  338. package/node_modules/@playdrop/boxel-three/dist/src/voxels/faces.d.ts +0 -28
  339. package/node_modules/@playdrop/boxel-three/dist/src/voxels/faces.js +0 -344
  340. package/node_modules/@playdrop/boxel-three/dist/src/voxels/mesher.d.ts +0 -24
  341. package/node_modules/@playdrop/boxel-three/dist/src/voxels/mesher.js +0 -113
  342. package/node_modules/@playdrop/boxel-three/dist/test/export-image.playwright.test.d.ts +0 -1
  343. package/node_modules/@playdrop/boxel-three/dist/test/export-image.playwright.test.js +0 -137
  344. package/node_modules/@playdrop/boxel-three/dist/test/fixtures/render-worker.d.ts +0 -20
  345. package/node_modules/@playdrop/boxel-three/dist/test/fixtures/render-worker.js +0 -85
  346. package/node_modules/@playdrop/boxel-three/dist/test/glb-skinned.test.d.ts +0 -1
  347. package/node_modules/@playdrop/boxel-three/dist/test/glb-skinned.test.js +0 -104
  348. package/node_modules/@playdrop/boxel-three/dist/test/index.test.d.ts +0 -1
  349. package/node_modules/@playdrop/boxel-three/dist/test/index.test.js +0 -30
  350. package/node_modules/@playdrop/boxel-three/dist/test/instantiate.test.d.ts +0 -1
  351. package/node_modules/@playdrop/boxel-three/dist/test/instantiate.test.js +0 -88
  352. package/node_modules/@playdrop/boxel-three/dist/test/overlays.test.d.ts +0 -1
  353. package/node_modules/@playdrop/boxel-three/dist/test/overlays.test.js +0 -42
  354. package/node_modules/@playdrop/boxel-three/dist/test/scene-filter.test.d.ts +0 -1
  355. package/node_modules/@playdrop/boxel-three/dist/test/scene-filter.test.js +0 -73
  356. package/node_modules/@playdrop/boxel-three/dist/test/scene-smoke.test.d.ts +0 -1
  357. package/node_modules/@playdrop/boxel-three/dist/test/scene-smoke.test.js +0 -85
  358. package/node_modules/@playdrop/boxel-three/dist/test/skinned-mesh.test.d.ts +0 -1
  359. package/node_modules/@playdrop/boxel-three/dist/test/skinned-mesh.test.js +0 -73
  360. package/node_modules/@playdrop/boxel-three/dist/test/textured-overlay.test.d.ts +0 -1
  361. package/node_modules/@playdrop/boxel-three/dist/test/textured-overlay.test.js +0 -136
  362. package/node_modules/@playdrop/boxel-three/dist/test/voxels.test.d.ts +0 -1
  363. package/node_modules/@playdrop/boxel-three/dist/test/voxels.test.js +0 -42
  364. package/node_modules/@playdrop/boxel-three/package.json +0 -28
@@ -35,25 +35,26 @@ function storeLogin(env, data, options = {}) {
35
35
  if (!token) {
36
36
  (0, messages_1.printErrorWithHelp)("Login succeeded but no access token was returned.", ["Please try again in a moment.", "If the issue persists, contact the Playdrop team."], { command: "login" });
37
37
  process.exitCode = 1;
38
- return;
38
+ return false;
39
39
  }
40
40
  const username = typeof data.user?.username === "string" ? data.user.username.trim() : "";
41
41
  if (!username) {
42
42
  (0, messages_1.printErrorWithHelp)("Login succeeded but the account username was missing.", ["Please try again in a moment.", "If the issue persists, contact the Playdrop team."], { command: "login" });
43
43
  process.exitCode = 1;
44
- return;
44
+ return false;
45
45
  }
46
- (0, config_1.saveAccountSession)({ username, env, token });
46
+ (0, config_1.saveAccountSession)({ username, env, token, deviceApiKey: options.deviceApiKey });
47
47
  if (options.json) {
48
48
  (0, output_1.printJson)({
49
49
  status: "authenticated",
50
50
  username,
51
51
  env,
52
52
  });
53
- return;
53
+ return true;
54
54
  }
55
55
  console.log(`Logged in as ${username} on ${env}.`);
56
56
  console.log('Next: run "playdrop auth whoami" to confirm your session.');
57
+ return true;
57
58
  }
58
59
  async function storeDeviceLogin(env, baseUrl, initialLogin, options = {}) {
59
60
  const sessionToken = extractAccessToken(initialLogin);
@@ -64,17 +65,32 @@ async function storeDeviceLogin(env, baseUrl, initialLogin, options = {}) {
64
65
  if (!username) {
65
66
  throw new Error("Login response is missing the username required to save this computer token.");
66
67
  }
68
+ const sessionClient = (0, apiClient_1.createCliApiClient)({ baseUrl, token: sessionToken });
69
+ let createdDeviceTokenId = null;
67
70
  try {
68
- const sessionClient = (0, apiClient_1.createCliApiClient)({ baseUrl, token: sessionToken });
69
71
  const deviceToken = await sessionClient.createCliApiToken({
70
72
  name: buildCliLoginTokenName(),
71
73
  });
74
+ createdDeviceTokenId = deviceToken.id;
72
75
  const deviceLogin = await (0, apiClient_1.createCliApiClient)({ baseUrl }).loginWithApiKey({
73
76
  apiKey: deviceToken.apiKey,
74
77
  });
75
- storeLogin(env, deviceLogin, options);
78
+ if (!storeLogin(env, deviceLogin, { ...options, deviceApiKey: deviceToken.apiKey })) {
79
+ throw new Error("cli_device_session_store_failed");
80
+ }
76
81
  }
77
82
  catch (unknownError) {
83
+ if (createdDeviceTokenId !== null) {
84
+ try {
85
+ await sessionClient.deleteCliApiToken(createdDeviceTokenId);
86
+ }
87
+ catch (cleanupError) {
88
+ throw new Error(`cli_device_token_cleanup_failed:${createdDeviceTokenId}:${cleanupError instanceof Error ? cleanupError.message : String(cleanupError)}:original_error:${unknownError instanceof Error ? unknownError.message : String(unknownError)}`);
89
+ }
90
+ }
91
+ if (unknownError instanceof Error && unknownError.message === "cli_device_session_store_failed") {
92
+ return;
93
+ }
78
94
  if (unknownError instanceof types_1.UnsupportedClientError) {
79
95
  (0, http_1.handleUnsupportedError)(unknownError, "Login");
80
96
  return;
@@ -118,7 +134,7 @@ async function loginWithKey(env, baseUrl, apiKey, options = {}) {
118
134
  const client = (0, apiClient_1.createCliApiClient)({ baseUrl });
119
135
  try {
120
136
  const data = await client.loginWithApiKey({ apiKey });
121
- storeLogin(env, data, options);
137
+ storeLogin(env, data, { ...options, deviceApiKey: apiKey });
122
138
  }
123
139
  catch (unknownError) {
124
140
  if (unknownError instanceof types_1.UnsupportedClientError) {
@@ -1,4 +1,4 @@
1
- export declare const REVIEW_CRITERIA: readonly ["Gameplay / Core Loop", "Depth / Replayability", "Controls / Input", "UX / Usability", "First Time User Experience", "Visuals / Art Direction", "Store Listing & Metadata Accuracy", "Safety / Age Rating / Compliance", "Performance / Stability"];
1
+ export declare const REVIEW_QUALITY_DIMENSIONS: readonly ["Request Fidelity", "Core Loop", "Controls", "Presentation", "Usability", "Engagement", "Stability", "Listing", "Marketing", "Platform Integration"];
2
2
  declare const STATE_OUTCOME: {
3
3
  readonly EXCELLENT: "Excellent";
4
4
  readonly FAILED: "Blocked";
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.REQUIRED_REVIEW_EVIDENCE_FILES = exports.REVIEW_CRITERIA = void 0;
6
+ exports.REQUIRED_REVIEW_EVIDENCE_FILES = exports.REVIEW_QUALITY_DIMENSIONS = void 0;
7
7
  exports.normalizeTerminalReviewState = normalizeTerminalReviewState;
8
8
  exports.validateGameReviewResult = validateGameReviewResult;
9
9
  exports.validateReviewResultCommand = validateReviewResultCommand;
@@ -13,16 +13,26 @@ const node_path_1 = __importDefault(require("node:path"));
13
13
  const node_fs_1 = require("node:fs");
14
14
  const sharp_1 = __importDefault(require("sharp"));
15
15
  const output_1 = require("../output");
16
- exports.REVIEW_CRITERIA = [
17
- "Gameplay / Core Loop",
18
- "Depth / Replayability",
19
- "Controls / Input",
20
- "UX / Usability",
21
- "First Time User Experience",
22
- "Visuals / Art Direction",
23
- "Store Listing & Metadata Accuracy",
24
- "Safety / Age Rating / Compliance",
25
- "Performance / Stability",
16
+ exports.REVIEW_QUALITY_DIMENSIONS = [
17
+ "Request Fidelity",
18
+ "Core Loop",
19
+ "Controls",
20
+ "Presentation",
21
+ "Usability",
22
+ "Engagement",
23
+ "Stability",
24
+ "Listing",
25
+ "Marketing",
26
+ "Platform Integration",
27
+ ];
28
+ const PRIMARY_REVIEW_QUALITY_DIMENSIONS = [
29
+ "Request Fidelity",
30
+ "Core Loop",
31
+ "Controls",
32
+ "Presentation",
33
+ "Usability",
34
+ "Engagement",
35
+ "Stability",
26
36
  ];
27
37
  const STATE_OUTCOME = {
28
38
  EXCELLENT: "Excellent",
@@ -79,19 +89,16 @@ function requireLine(text, prefix) {
79
89
  }
80
90
  return line.slice(prefix.length).trim();
81
91
  }
82
- function normalizeReviewText(...values) {
83
- return values.join(" ").toLowerCase().replace(/\s+/g, " ").trim();
84
- }
85
92
  function parseScores(reviewMessage) {
86
93
  const scores = {};
87
- for (const criterion of exports.REVIEW_CRITERIA) {
88
- const escaped = criterion.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
89
- const regex = new RegExp(`^- ${escaped}: (10|[1-9])/10 \\| .+`, "m");
94
+ for (const dimension of exports.REVIEW_QUALITY_DIMENSIONS) {
95
+ const escaped = dimension.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
96
+ const regex = new RegExp(`^- ${escaped}: ([1-5])/5 \\| .+`, "m");
90
97
  const match = reviewMessage.match(regex);
91
98
  if (!match) {
92
- throw new Error(`missing_or_invalid_criterion_score:${criterion}`);
99
+ throw new Error(`missing_or_invalid_quality_score:${dimension}`);
93
100
  }
94
- scores[criterion] = Number.parseInt(match[1], 10);
101
+ scores[dimension] = Number.parseInt(match[1], 10);
95
102
  }
96
103
  return scores;
97
104
  }
@@ -99,43 +106,36 @@ function averageScore(scores) {
99
106
  const values = Object.values(scores);
100
107
  return values.reduce((sum, value) => sum + value, 0) / values.length;
101
108
  }
102
- function minimumScore(scores) {
103
- return Math.min(...Object.values(scores));
109
+ function primaryMinimumScore(scores) {
110
+ return Math.min(...PRIMARY_REVIEW_QUALITY_DIMENSIONS.map((dimension) => scores[dimension]));
104
111
  }
105
- function validateOutcomeAgainstScores(outcome, scores) {
112
+ function deriveOutcomeFromScores(scores) {
106
113
  const average = averageScore(scores);
107
- const minimum = minimumScore(scores);
108
- const gameplay = scores["Gameplay / Core Loop"];
109
- const controls = scores["Controls / Input"];
110
- const ux = scores["UX / Usability"];
111
- const ftue = scores["First Time User Experience"];
112
- const visuals = scores["Visuals / Art Direction"];
113
- const performance = scores["Performance / Stability"];
114
- const actual = `actual=average=${average.toFixed(2)},minimum=${minimum},gameplay=${gameplay},controls=${controls},ux=${ux},ftue=${ftue},visuals=${visuals},performance=${performance}`;
115
- if (outcome === "Excellent" &&
116
- (average < 8.5 ||
117
- minimum < 7 ||
118
- gameplay < 8 ||
119
- controls < 8 ||
120
- ux < 8 ||
121
- ftue < 7 ||
122
- visuals < 8 ||
123
- performance < 8)) {
124
- throw new Error(`excellent_outcome_not_supported_by_scores:requires=average>=8.5,minimum>=7,gameplay>=8,controls>=8,ux>=8,ftue>=7,visuals>=8,performance>=8:${actual}:use_good_or_lower_outcome_unless_scores_are_supported_by_evidence`);
125
- }
126
- if (outcome === "Good" &&
127
- (average < 7.5 ||
128
- minimum < 6 ||
129
- gameplay < 7 ||
130
- controls < 7 ||
131
- ux < 7 ||
132
- ftue < 6 ||
133
- visuals < 7 ||
134
- performance < 7)) {
135
- throw new Error(`good_outcome_not_supported_by_scores:requires=average>=7.5,minimum>=6,gameplay>=7,controls>=7,ux>=7,ftue>=6,visuals>=7,performance>=7:${actual}:use_passed_or_lower_outcome_unless_scores_are_supported_by_evidence`);
114
+ const primaryMinimum = primaryMinimumScore(scores);
115
+ const requestFidelity = scores["Request Fidelity"];
116
+ const coreLoop = scores["Core Loop"];
117
+ const controls = scores.Controls;
118
+ const stability = scores.Stability;
119
+ if (primaryMinimum === 1)
120
+ return "Blocked";
121
+ if (average >= 4.5 && primaryMinimum >= 4)
122
+ return "Excellent";
123
+ if (average >= 4 && primaryMinimum >= 3)
124
+ return "Good";
125
+ if (average >= 3 &&
126
+ primaryMinimum >= 2 &&
127
+ requestFidelity >= 3 &&
128
+ coreLoop >= 3 &&
129
+ controls >= 3 &&
130
+ stability >= 3) {
131
+ return "Passed";
136
132
  }
137
- if (outcome === "Passed" && (average < 6 || minimum < 4 || gameplay < 5 || controls < 5 || performance < 5)) {
138
- throw new Error(`passed_outcome_not_supported_by_scores:requires=average>=6,minimum>=4,gameplay>=5,controls>=5,performance>=5:${actual}:use_low_quality_or_failed_unless_scores_are_supported_by_evidence`);
133
+ return "Limited";
134
+ }
135
+ function validateOutcomeAgainstScores(outcome, scores) {
136
+ const expected = deriveOutcomeFromScores(scores);
137
+ if (outcome !== expected) {
138
+ throw new Error(`review_outcome_score_mismatch:expected=${expected}:actual=${outcome}:average=${averageScore(scores).toFixed(2)}:primaryMinimum=${primaryMinimumScore(scores)}`);
139
139
  }
140
140
  }
141
141
  function validateRequiredEvidenceLines(reviewMessage) {
@@ -143,7 +143,6 @@ function validateRequiredEvidenceLines(reviewMessage) {
143
143
  const primaryEvidence = requireLine(reviewMessage, "Primary interaction evidence: ");
144
144
  const challengeEvidence = requireLine(reviewMessage, "Challenge evidence: ");
145
145
  const punchline = requireLine(reviewMessage, "Punchline assessment: ");
146
- const benchmark = requireLine(reviewMessage, "Comparable benchmark: ");
147
146
  if (primaryVerb.length < 3) {
148
147
  throw new Error("primary_player_verb_too_vague");
149
148
  }
@@ -156,27 +155,6 @@ function validateRequiredEvidenceLines(reviewMessage) {
156
155
  if (punchline.length < 8 || punchline.length > 160) {
157
156
  throw new Error(`punchline_assessment_invalid_length: Punchline assessment length=${punchline.length}; expected 8..160 characters.`);
158
157
  }
159
- if (benchmark.length < 8) {
160
- throw new Error("comparable_benchmark_too_vague");
161
- }
162
- }
163
- function isNoScoreCaps(scoreCapsApplied) {
164
- return scoreCapsApplied.trim().toLowerCase() === "none";
165
- }
166
- function validateCapConsistency(input) {
167
- const normalizedText = normalizeReviewText(input.reviewMessage, input.creatorFeedback);
168
- const describesZeroChallenge = /\bzero challenge\b|\bno (?:real |meaningful )?challenge\b(?!-)|\bchallenge (?:is )?(?:absent|missing|nonexistent)\b/.test(normalizedText);
169
- const describesPrimaryMissing = /\bprimary (?:interaction|verb) (?:is )?(?:absent|missing|unavailable)\b/.test(normalizedText);
170
- if (isNoScoreCaps(input.scoreCapsApplied) && (describesZeroChallenge || describesPrimaryMissing)) {
171
- const trigger = describesZeroChallenge ? "zero_or_missing_challenge" : "primary_interaction_missing";
172
- throw new Error(`missing_required_score_cap:${trigger}:score_caps_applied_must_name_the_triggered_cap_or_adjust_the_evidence_wording`);
173
- }
174
- if (describesZeroChallenge &&
175
- (["Passed", "Good", "Excellent"].includes(input.outcome) ||
176
- input.scores["Gameplay / Core Loop"] > 3 ||
177
- input.scores["Depth / Replayability"] > 3)) {
178
- throw new Error("gameplay_challenge_absent_score_cap_required");
179
- }
180
158
  }
181
159
  async function assertPngFile(filePath) {
182
160
  const bytes = await node_fs_1.promises.readFile(filePath);
@@ -211,20 +189,15 @@ async function validateGameReviewResult(input) {
211
189
  if (!["MOBILE_PORTRAIT", "MOBILE_LANDSCAPE", "DESKTOP"].includes(primarySurface)) {
212
190
  throw new Error(`invalid_primary_reviewed_surface:${primarySurface}`);
213
191
  }
192
+ if (!/^Quality ratings:\s*$/m.test(input.reviewMessage)) {
193
+ throw new Error("missing_quality_ratings_heading");
194
+ }
214
195
  validateRequiredEvidenceLines(input.reviewMessage);
215
- const scoreCapsApplied = requireLine(input.reviewMessage, "Score caps applied: ");
216
196
  if (!creatorFeedback.includes(`Reviewed surface: ${primarySurface}`)) {
217
197
  throw new Error("creator_feedback_missing_reviewed_surface");
218
198
  }
219
199
  const scores = parseScores(input.reviewMessage);
220
200
  validateOutcomeAgainstScores(actualOutcome, scores);
221
- validateCapConsistency({
222
- creatorFeedback,
223
- outcome: actualOutcome,
224
- reviewMessage: input.reviewMessage,
225
- scoreCapsApplied,
226
- scores,
227
- });
228
201
  const evidenceDir = resolveFilePath(input.evidenceDir, "missing_evidence_dir");
229
202
  for (const filename of exports.REQUIRED_REVIEW_EVIDENCE_FILES) {
230
203
  await assertPngFile(node_path_1.default.join(evidenceDir, filename));
@@ -303,23 +276,23 @@ async function composeReviewEvidence(options) {
303
276
  function escapeXml(value) {
304
277
  return value.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;");
305
278
  }
306
- function parseCriterionRating(reviewMessage, criterion) {
307
- const escaped = criterion.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
308
- const regex = new RegExp(`^- ${escaped}: (10|[1-9])/10 \\| .+`, "m");
279
+ function parseQualityRating(reviewMessage, dimension) {
280
+ const escaped = dimension.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
281
+ const regex = new RegExp(`^- ${escaped}: ([1-5])/5 \\| .+`, "m");
309
282
  const match = reviewMessage.match(regex);
310
283
  if (!match) {
311
- throw new Error(`missing_or_invalid_criterion_score:${criterion}`);
284
+ throw new Error(`missing_or_invalid_quality_score:${dimension}`);
312
285
  }
313
286
  return Number.parseInt(match[1], 10);
314
287
  }
315
288
  function ratingColor(score) {
316
289
  if (score <= 1)
317
290
  return "#ff3b30";
318
- if (score <= 4)
291
+ if (score === 2)
319
292
  return "#ff9500";
320
- if (score <= 6)
293
+ if (score === 3)
321
294
  return "#ffd60a";
322
- if (score <= 9)
295
+ if (score === 4)
323
296
  return "#34c759";
324
297
  return "#bf5af2";
325
298
  }
@@ -341,15 +314,15 @@ async function createReviewRatingCard(options) {
341
314
  const outcome = requireLine(reviewMessage, "Outcome: ");
342
315
  const punchline = (options.punchline?.trim() || requireLine(reviewMessage, "Punchline assessment: ")).slice(0, 160);
343
316
  const title = (options.title?.trim() || "Game review ratings").slice(0, 80);
344
- const rows = exports.REVIEW_CRITERIA.map((criterion, index) => {
345
- const score = parseCriterionRating(reviewMessage, criterion);
317
+ const rows = exports.REVIEW_QUALITY_DIMENSIONS.map((dimension, index) => {
318
+ const score = parseQualityRating(reviewMessage, dimension);
346
319
  const x = index < 5 ? 56 : 628;
347
- const y = 170 + (index % 5) * 92;
320
+ const y = 158 + (index % 5) * 82;
348
321
  return `
349
322
  <rect x="${x}" y="${y}" width="516" height="70" rx="6" fill="#15151c" stroke="#333340"/>
350
323
  <rect x="${x}" y="${y}" width="8" height="70" fill="${ratingColor(score)}"/>
351
- <text x="${x + 24}" y="${y + 42}" fill="#f5f5f7" font-size="22" font-weight="700">${escapeXml(criterion)}</text>
352
- <text x="${x + 448}" y="${y + 44}" fill="${ratingColor(score)}" font-size="32" font-weight="800" text-anchor="end">${score}/10</text>
324
+ <text x="${x + 24}" y="${y + 42}" fill="#f5f5f7" font-size="22" font-weight="700">${escapeXml(dimension)}</text>
325
+ <text x="${x + 448}" y="${y + 44}" fill="${ratingColor(score)}" font-size="32" font-weight="800" text-anchor="end">${score}/5</text>
353
326
  `;
354
327
  }).join("");
355
328
  const svg = `
@@ -0,0 +1,19 @@
1
+ type SourceKind = "asset" | "pack";
2
+ type ExactSourceRef = {
3
+ kind: SourceKind;
4
+ creator: string;
5
+ name: string;
6
+ version: string;
7
+ };
8
+ export declare function parseExactSourceRef(raw: string, expectedKind: SourceKind): ExactSourceRef;
9
+ export declare function prepareDestination(path: string): string;
10
+ export declare function extractArchive(bytes: Uint8Array, destination: string): number;
11
+ export declare function showExactContentDetail(kind: SourceKind, rawRef: string, options?: {
12
+ env?: string;
13
+ json?: boolean;
14
+ }): Promise<void>;
15
+ export declare function downloadContentSource(kind: SourceKind, rawRef: string, directory: string | undefined, options?: {
16
+ env?: string;
17
+ json?: boolean;
18
+ }): Promise<void>;
19
+ export {};
@@ -0,0 +1,142 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.parseExactSourceRef = parseExactSourceRef;
4
+ exports.prepareDestination = prepareDestination;
5
+ exports.extractArchive = extractArchive;
6
+ exports.showExactContentDetail = showExactContentDetail;
7
+ exports.downloadContentSource = downloadContentSource;
8
+ const node_fs_1 = require("node:fs");
9
+ const node_path_1 = require("node:path");
10
+ const fflate_1 = require("fflate");
11
+ const commandContext_1 = require("../commandContext");
12
+ const errors_1 = require("../errors");
13
+ const output_1 = require("../output");
14
+ function parseExactSourceRef(raw, expectedKind) {
15
+ const pattern = expectedKind === "asset"
16
+ ? /^asset:([a-z0-9]+(?:-[a-z0-9]+)*)\/([a-z0-9]+(?:-[a-z0-9]+)*)@(r[1-9][0-9]*)$/
17
+ : /^pack:([a-z0-9]+(?:-[a-z0-9]+)*)\/([a-z0-9]+(?:-[a-z0-9]+)*)@(\d+\.\d+\.\d+)$/;
18
+ const match = pattern.exec(raw.trim());
19
+ if (!match) {
20
+ throw new Error(expectedKind === "asset"
21
+ ? "invalid_exact_asset_ref: expected asset:creator/name@rN"
22
+ : "invalid_exact_pack_ref: expected pack:creator/name@X.Y.Z");
23
+ }
24
+ return { kind: expectedKind, creator: match[1], name: match[2], version: match[3] };
25
+ }
26
+ function prepareDestination(path) {
27
+ const destination = (0, node_path_1.resolve)(path);
28
+ if ((0, node_fs_1.existsSync)(destination)) {
29
+ if (!(0, node_fs_1.lstatSync)(destination).isDirectory())
30
+ throw new Error(`source_destination_not_directory:${destination}`);
31
+ if ((0, node_fs_1.readdirSync)(destination).length > 0)
32
+ throw new Error(`source_destination_not_empty:${destination}`);
33
+ }
34
+ else {
35
+ (0, node_fs_1.mkdirSync)(destination, { recursive: true });
36
+ }
37
+ return destination;
38
+ }
39
+ function extractArchive(bytes, destination) {
40
+ const entries = (0, fflate_1.unzipSync)(bytes);
41
+ const files = Object.entries(entries).flatMap(([archivePath, content]) => {
42
+ const normalized = archivePath.replace(/\\/g, "/");
43
+ if (!normalized || normalized.startsWith("/") || normalized.split("/").includes("..")) {
44
+ throw new Error(`source_archive_unsafe_path:${archivePath}`);
45
+ }
46
+ if (normalized.endsWith("/"))
47
+ return [];
48
+ const outputPath = (0, node_path_1.resolve)(destination, normalized);
49
+ if (!outputPath.startsWith(`${destination}${node_path_1.sep}`))
50
+ throw new Error(`source_archive_unsafe_path:${archivePath}`);
51
+ return [{ outputPath, content }];
52
+ });
53
+ let fileCount = 0;
54
+ for (const { outputPath, content } of files) {
55
+ (0, node_fs_1.mkdirSync)((0, node_path_1.dirname)(outputPath), { recursive: true });
56
+ (0, node_fs_1.writeFileSync)(outputPath, content);
57
+ fileCount += 1;
58
+ }
59
+ return fileCount;
60
+ }
61
+ async function showExactContentDetail(kind, rawRef, options = {}) {
62
+ const command = `${kind} detail`;
63
+ await (0, commandContext_1.withPublicEnvironment)(command, async ({ client, envConfig }) => {
64
+ try {
65
+ const ref = parseExactSourceRef(rawRef, kind);
66
+ if (kind === "asset") {
67
+ const [{ asset }, { versions }] = await Promise.all([
68
+ client.fetchAssetBySlug(ref.creator, ref.name),
69
+ client.listAssetVersions(ref.creator, ref.name, { limit: 100 }),
70
+ ]);
71
+ const version = versions.find((candidate) => candidate.revisionLabel === ref.version);
72
+ if (!version)
73
+ throw new Error(`asset_revision_not_found:${rawRef}`);
74
+ const output = {
75
+ ref: rawRef,
76
+ environment: envConfig.apiBase,
77
+ asset: { ...asset, currentVersion: version },
78
+ urls: {
79
+ source: `${envConfig.apiBase}/assets/${encodeURIComponent(ref.creator)}/${encodeURIComponent(ref.name)}/versions/${version.revision}/source`,
80
+ },
81
+ };
82
+ if (options.json)
83
+ (0, output_1.printJson)(output);
84
+ else {
85
+ console.log(`${asset.displayName} (${rawRef})\n${version.format} · ${version.visibility} · ${version.license}\n${output.urls.source}`);
86
+ }
87
+ return;
88
+ }
89
+ const [{ pack }, { versions }] = await Promise.all([
90
+ client.fetchAssetPackBySlug(ref.creator, ref.name),
91
+ client.listAssetPackVersions(ref.creator, ref.name, { limit: 100 }),
92
+ ]);
93
+ const version = versions.find((candidate) => candidate.version === ref.version);
94
+ if (!version)
95
+ throw new Error(`pack_version_not_found:${rawRef}`);
96
+ const base = `${envConfig.apiBase}/asset-packs/${encodeURIComponent(ref.creator)}/${encodeURIComponent(ref.name)}/versions/${encodeURIComponent(version.version)}`;
97
+ const output = {
98
+ ref: rawRef,
99
+ environment: envConfig.apiBase,
100
+ pack: { ...pack, currentVersion: version },
101
+ urls: { source: `${base}/source`, download: `${base}/download` },
102
+ };
103
+ if (options.json)
104
+ (0, output_1.printJson)(output);
105
+ else {
106
+ console.log(`${pack.displayName} (${rawRef})\n${version.assets.length} assets · ${version.visibility} · ${version.license}\n${output.urls.source}`);
107
+ }
108
+ }
109
+ catch (error) {
110
+ if (!(0, errors_1.handleCommandFailure)(error, command, "Content detail"))
111
+ throw error;
112
+ }
113
+ }, { env: options.env });
114
+ }
115
+ async function downloadContentSource(kind, rawRef, directory, options = {}) {
116
+ const command = `${kind} source`;
117
+ await (0, commandContext_1.withPublicEnvironment)(command, async ({ client }) => {
118
+ try {
119
+ const ref = parseExactSourceRef(rawRef, kind);
120
+ const result = kind === "asset"
121
+ ? await client.downloadAssetSource(ref.creator, ref.name, ref.version)
122
+ : await client.downloadAssetPackSource(ref.creator, ref.name, ref.version);
123
+ const destination = prepareDestination(directory ?? ref.name);
124
+ const fileCount = extractArchive(new Uint8Array(await result.blob.arrayBuffer()), destination);
125
+ const output = {
126
+ ref: rawRef,
127
+ destination,
128
+ filename: result.metadata.filename,
129
+ sizeBytes: result.metadata.sizeBytes,
130
+ files: fileCount,
131
+ };
132
+ if (options.json)
133
+ (0, output_1.printJson)(output);
134
+ else
135
+ console.log(`Downloaded ${rawRef} source to ${destination} (${fileCount} files).`);
136
+ }
137
+ catch (error) {
138
+ if (!(0, errors_1.handleCommandFailure)(error, command, "Source download"))
139
+ throw error;
140
+ }
141
+ }, { env: options.env });
142
+ }
@@ -9,21 +9,15 @@ const errors_1 = require("../errors");
9
9
  const messages_1 = require("../messages");
10
10
  const output_1 = require("../output");
11
11
  function tweakApiMessage(error) {
12
- if (error.code === "creator_latest_private_version_required") {
12
+ if (error.code === "creator_latest_version_required") {
13
13
  const latestVersion = typeof error.details?.["latestVersion"] === "string" ? error.details["latestVersion"] : null;
14
14
  const latestId = typeof error.details?.["latestId"] === "string" ? error.details["latestId"] : null;
15
15
  const latestVisibility = typeof error.details?.["latestVisibility"] === "string" ? error.details["latestVisibility"] : null;
16
16
  return {
17
- problem: latestVersion && latestVisibility === "PUBLIC"
18
- ? `The latest tweak base, ${latestVersion}, is live and cannot be edited.`
19
- : latestVersion
20
- ? `Tweaks can only be changed on the latest editable version, ${latestVersion}.`
21
- : "This app has no editable tweak base version.",
22
- suggestions: latestVersion && latestVisibility === "PUBLIC"
23
- ? [`Create a new private version based on ${latestId ?? "the latest tweak state"}, then tune that version.`]
24
- : latestId
25
- ? [`Latest tweak state: ${latestId}`]
26
- : [],
17
+ problem: latestVersion
18
+ ? `Tweaks can only be changed on the latest source version, ${latestVersion}.`
19
+ : "This app has no tweak base version.",
20
+ suggestions: latestId ? [`Latest tweak state: ${latestId}${latestVisibility ? ` (${latestVisibility.toLowerCase()})` : ""}`] : [],
27
21
  };
28
22
  }
29
23
  return { problem: `PlayDrop rejected the tweak request: ${error.code ?? error.message} (HTTP ${error.status}).` };
@@ -2,7 +2,7 @@ import type { ApiClient } from "@playdrop/api-client";
2
2
  import { type AssetPackUploadedLocalAsset } from "@playdrop/types";
3
3
  import type { AssetPackTask, AssetSpecTask, AssetTask, OwnedAssetTask, PackOwnedAssetTask } from "../catalogue";
4
4
  import type { CliTask } from "../taskUtils";
5
- export type CurrentUserRole = "CREATOR" | "ADMIN" | null;
5
+ export type CurrentUserRole = "CREATOR" | "CLOUD_WORKER" | "ADMIN" | null;
6
6
  export type UploadedAssetInfo = {
7
7
  creatorUsername: string;
8
8
  name: string;
@@ -12,7 +12,6 @@ const types_1 = require("@playdrop/types");
12
12
  const node_crypto_1 = require("node:crypto");
13
13
  const node_fs_1 = require("node:fs");
14
14
  const node_path_1 = require("node:path");
15
- const model_artifacts_1 = require("../assets/model-artifacts");
16
15
  const assetSpecs_1 = require("../assetSpecs");
17
16
  const EXTENSION_TO_FORMAT = {
18
17
  ".png": "PNG",
@@ -71,6 +70,9 @@ function createListingFileFromPath(filePath, expectedMime) {
71
70
  if (expectedMime === "video/mp4" && !isMp4Signature(data)) {
72
71
  throw new Error(`Invalid listing file signature for ${filePath}. Expected video/mp4.`);
73
72
  }
73
+ if (expectedMime === "application/zip" && !(data[0] === 0x50 && data[1] === 0x4b)) {
74
+ throw new Error(`Invalid source file signature for ${filePath}. Expected application/zip.`);
75
+ }
74
76
  return new File([data], (0, node_path_1.basename)(filePath), { type: expectedMime });
75
77
  }
76
78
  function computeSha256Hex(buffer) {
@@ -94,6 +96,9 @@ function prepareUploadFile(filePath, fieldName, explicitMimeType) {
94
96
  };
95
97
  }
96
98
  function buildListingMediaRelativePath(mediaKey) {
99
+ if (mediaKey === "source") {
100
+ return "source.zip";
101
+ }
97
102
  if (mediaKey === "icon")
98
103
  return "listing/icon.png";
99
104
  if (mediaKey === "heroPortrait")
@@ -142,8 +147,8 @@ function buildPackKey(creatorUsername, name, version) {
142
147
  }
143
148
  function getTaskCreatorResult(task, defaultCreator, currentUserRole) {
144
149
  const requestedTaskOwner = "username" in task && typeof task.username === "string" ? String(task.username).trim() : "";
145
- const creatorTargetError = requestedTaskOwner && currentUserRole !== "ADMIN"
146
- ? `Task "${task.name}" sets username="${requestedTaskOwner}", but only admins can target another creator.`
150
+ const creatorTargetError = requestedTaskOwner && currentUserRole !== "ADMIN" && currentUserRole !== "CLOUD_WORKER"
151
+ ? `Task "${task.name}" sets username="${requestedTaskOwner}", but this account cannot target another creator.`
147
152
  : null;
148
153
  return {
149
154
  requestedTaskOwner,
@@ -232,9 +237,6 @@ function resolveAssetFormat(task) {
232
237
  const primaryFile = task.filePaths.primary;
233
238
  if (typeof primaryFile === "string") {
234
239
  const normalizedPrimary = primaryFile.trim().toLowerCase();
235
- if (normalizedPrimary.endsWith(".boxel.json")) {
236
- return "PLAYDROP_BOXEL_JSON";
237
- }
238
240
  if (normalizedPrimary.endsWith(".vox")) {
239
241
  return "VOX";
240
242
  }
@@ -246,10 +248,6 @@ function resolveAssetFormat(task) {
246
248
  return "GLTF";
247
249
  }
248
250
  }
249
- const boxelFile = task.filePaths.boxel;
250
- if (typeof boxelFile === "string" && boxelFile.trim().toLowerCase().endsWith(".boxel.json")) {
251
- return "PLAYDROP_BOXEL_JSON";
252
- }
253
251
  const meshFile = task.filePaths.mesh;
254
252
  if (typeof meshFile === "string") {
255
253
  const meshExtension = (0, node_path_1.extname)(meshFile).toLowerCase();
@@ -286,7 +284,10 @@ function validateAssetSubcategoryCompatibility(task, format) {
286
284
  if (!definition.formats.includes(format)) {
287
285
  throw new Error(`Asset "${task.name}" uses format "${format}" not allowed for subcategory "${subcategory}".`);
288
286
  }
289
- (0, model_artifacts_1.assertGeneratedModel3DAssetRoles)(task, format);
287
+ const missingRoles = (0, types_1.getRequiredModel3DFileRoles)(format).filter((role) => !task.filePaths[role]);
288
+ if (missingRoles.length > 0) {
289
+ throw new Error(`Asset "${task.name}" is missing required files.${missingRoles.join(" and files.")}.`);
290
+ }
290
291
  return subcategory;
291
292
  }
292
293
  async function prepareAssetTaskUploadData(task) {
@@ -311,7 +312,6 @@ async function prepareAssetTaskUploadData(task) {
311
312
  }
312
313
  const format = resolveAssetFormat(task);
313
314
  const subcategory = validateAssetSubcategoryCompatibility(task, format);
314
- await (0, model_artifacts_1.prepareModel3DAssetArtifacts)(task);
315
315
  const uploadFiles = Object.entries(task.filePaths)
316
316
  .sort(([leftRole], [rightRole]) => leftRole.localeCompare(rightRole))
317
317
  .map(([role, filePath]) => prepareUploadFile(filePath, role));
@@ -548,6 +548,9 @@ async function buildPackMembersAndExistingAssets(client, task, mutationCreatorUs
548
548
  }
549
549
  function buildPackListingUploads(task) {
550
550
  const listingUploads = [];
551
+ if (task.sourcePath) {
552
+ listingUploads.push(prepareListingMediaUpload("source", task.sourcePath, "application/zip"));
553
+ }
551
554
  if (task.listing?.iconPath) {
552
555
  listingUploads.push(prepareListingMediaUpload("icon", task.listing.iconPath, "image/png"));
553
556
  }
@@ -609,6 +612,7 @@ function buildPackInitializeRequest(task, ownedAssets, existingAssets, members,
609
612
  ownedAssets,
610
613
  existingAssets,
611
614
  members,
615
+ source: listingUploads.find((entry) => entry.mediaKey === "source")?.entry,
612
616
  listing: buildPackListingPayload(listingUploads),
613
617
  };
614
618
  }