@playdrop/playdrop-cli 0.16.16 → 0.17.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (363) hide show
  1. package/config/client-meta.json +4 -4
  2. package/dist/apiClient.d.ts +1 -2
  3. package/dist/apiClient.js +1 -16
  4. package/dist/appUrls.js +4 -0
  5. package/dist/apps/build.d.ts +12 -4
  6. package/dist/apps/build.js +55 -22
  7. package/dist/apps/index.d.ts +2 -1
  8. package/dist/apps/index.js +4 -1
  9. package/dist/apps/loadCheck.d.ts +5 -1
  10. package/dist/apps/loadCheck.js +52 -18
  11. package/dist/apps/serverBuild.d.ts +17 -0
  12. package/dist/apps/serverBuild.js +155 -0
  13. package/dist/apps/staticHtml.d.ts +1 -0
  14. package/dist/apps/staticHtml.js +19 -10
  15. package/dist/apps/upload.d.ts +12 -2
  16. package/dist/apps/upload.js +127 -46
  17. package/dist/catalogue.d.ts +23 -1
  18. package/dist/catalogue.js +126 -100
  19. package/dist/commandContext.d.ts +6 -3
  20. package/dist/commandContext.js +108 -18
  21. package/dist/commands/build.js +0 -7
  22. package/dist/commands/captureListing.d.ts +3 -0
  23. package/dist/commands/captureListing.js +48 -4
  24. package/dist/commands/chat.d.ts +4 -0
  25. package/dist/commands/chat.js +133 -8
  26. package/dist/commands/check.js +34 -1
  27. package/dist/commands/create.js +30 -263
  28. package/dist/commands/dev.js +37 -3
  29. package/dist/commands/devBrowser.js +2 -2
  30. package/dist/commands/devGameServer.d.ts +16 -0
  31. package/dist/commands/devGameServer.js +237 -0
  32. package/dist/commands/devRuntimeAssets.d.ts +1 -0
  33. package/dist/commands/devRuntimeAssets.js +2 -0
  34. package/dist/commands/devServer.d.ts +3 -0
  35. package/dist/commands/devServer.js +111 -5
  36. package/dist/commands/generation.d.ts +33 -4
  37. package/dist/commands/generation.js +304 -115
  38. package/dist/commands/login.js +23 -7
  39. package/dist/commands/review.d.ts +1 -1
  40. package/dist/commands/review.js +68 -95
  41. package/dist/commands/source.d.ts +19 -0
  42. package/dist/commands/source.js +142 -0
  43. package/dist/commands/tweaks.js +5 -11
  44. package/dist/commands/upload-content.d.ts +1 -1
  45. package/dist/commands/upload-content.js +16 -12
  46. package/dist/commands/upload.d.ts +17 -1
  47. package/dist/commands/upload.js +47 -10
  48. package/dist/commands/worker/archive-staging.d.ts +1 -0
  49. package/dist/commands/worker/archive-staging.js +13 -2
  50. package/dist/commands/worker/e2e-fixtures.d.ts +32 -0
  51. package/dist/commands/worker/e2e-fixtures.js +466 -0
  52. package/dist/commands/worker/game-server-infra.d.ts +80 -0
  53. package/dist/commands/worker/game-server-infra.js +595 -0
  54. package/dist/commands/worker/game-source-git.d.ts +126 -0
  55. package/dist/commands/worker/game-source-git.js +780 -0
  56. package/dist/commands/worker/generation.d.ts +94 -0
  57. package/dist/commands/worker/generation.js +1458 -0
  58. package/dist/commands/worker/runtime.d.ts +8 -10
  59. package/dist/commands/worker/runtime.js +51 -45
  60. package/dist/commands/worker.d.ts +79 -19
  61. package/dist/commands/worker.js +1796 -419
  62. package/dist/config.d.ts +2 -0
  63. package/dist/config.js +16 -3
  64. package/dist/environment.d.ts +0 -1
  65. package/dist/environment.js +0 -8
  66. package/dist/index.js +92 -13
  67. package/dist/workerAppProject.d.ts +1 -1
  68. package/dist/workerAppProject.js +15 -2
  69. package/node_modules/@playdrop/api-client/dist/client.d.ts +72 -25
  70. package/node_modules/@playdrop/api-client/dist/client.d.ts.map +1 -1
  71. package/node_modules/@playdrop/api-client/dist/client.js +33 -0
  72. package/node_modules/@playdrop/api-client/dist/core/request.d.ts +1 -0
  73. package/node_modules/@playdrop/api-client/dist/core/request.d.ts.map +1 -1
  74. package/node_modules/@playdrop/api-client/dist/core/request.js +17 -11
  75. package/node_modules/@playdrop/api-client/dist/domains/agent-tasks.d.ts +51 -6
  76. package/node_modules/@playdrop/api-client/dist/domains/agent-tasks.d.ts.map +1 -1
  77. package/node_modules/@playdrop/api-client/dist/domains/agent-tasks.js +338 -41
  78. package/node_modules/@playdrop/api-client/dist/domains/ai.d.ts +24 -1
  79. package/node_modules/@playdrop/api-client/dist/domains/ai.d.ts.map +1 -1
  80. package/node_modules/@playdrop/api-client/dist/domains/ai.js +20 -0
  81. package/node_modules/@playdrop/api-client/dist/domains/apps.d.ts +13 -8
  82. package/node_modules/@playdrop/api-client/dist/domains/apps.d.ts.map +1 -1
  83. package/node_modules/@playdrop/api-client/dist/domains/apps.js +158 -90
  84. package/node_modules/@playdrop/api-client/dist/domains/assets.d.ts +4 -0
  85. package/node_modules/@playdrop/api-client/dist/domains/assets.d.ts.map +1 -1
  86. package/node_modules/@playdrop/api-client/dist/domains/assets.js +27 -0
  87. package/node_modules/@playdrop/api-client/dist/domains/chat.d.ts +35 -3
  88. package/node_modules/@playdrop/api-client/dist/domains/chat.d.ts.map +1 -1
  89. package/node_modules/@playdrop/api-client/dist/domains/chat.js +89 -7
  90. package/node_modules/@playdrop/api-client/dist/domains/player-meta.d.ts +2 -1
  91. package/node_modules/@playdrop/api-client/dist/domains/player-meta.d.ts.map +1 -1
  92. package/node_modules/@playdrop/api-client/dist/domains/player-meta.js +9 -0
  93. package/node_modules/@playdrop/api-client/dist/domains/playtrade.d.ts +1 -2
  94. package/node_modules/@playdrop/api-client/dist/domains/playtrade.d.ts.map +1 -1
  95. package/node_modules/@playdrop/api-client/dist/domains/playtrade.js +0 -11
  96. package/node_modules/@playdrop/api-client/dist/domains/social.d.ts +29 -0
  97. package/node_modules/@playdrop/api-client/dist/domains/social.d.ts.map +1 -0
  98. package/node_modules/@playdrop/api-client/dist/domains/social.js +79 -0
  99. package/node_modules/@playdrop/api-client/dist/index.d.ts +80 -29
  100. package/node_modules/@playdrop/api-client/dist/index.d.ts.map +1 -1
  101. package/node_modules/@playdrop/api-client/dist/index.js +217 -56
  102. package/node_modules/@playdrop/api-client/dist/runtime.d.ts +18 -0
  103. package/node_modules/@playdrop/api-client/dist/runtime.d.ts.map +1 -0
  104. package/node_modules/@playdrop/api-client/dist/runtime.js +54 -0
  105. package/node_modules/@playdrop/api-client/package.json +7 -0
  106. package/node_modules/@playdrop/config/client-meta.json +4 -4
  107. package/node_modules/@playdrop/config/dist/src/creator-plans.d.ts +11 -0
  108. package/node_modules/@playdrop/config/dist/src/creator-plans.d.ts.map +1 -1
  109. package/node_modules/@playdrop/config/dist/src/creator-plans.js +13 -1
  110. package/node_modules/@playdrop/config/dist/src/deployment.d.ts +0 -1
  111. package/node_modules/@playdrop/config/dist/src/deployment.d.ts.map +1 -1
  112. package/node_modules/@playdrop/config/dist/src/deployment.js +0 -8
  113. package/node_modules/@playdrop/config/dist/src/public-deployment.d.ts +0 -1
  114. package/node_modules/@playdrop/config/dist/src/public-deployment.d.ts.map +1 -1
  115. package/node_modules/@playdrop/config/dist/src/public-deployment.js +0 -8
  116. package/node_modules/@playdrop/config/dist/src/runtime-service-origins.d.ts +1 -1
  117. package/node_modules/@playdrop/config/dist/src/runtime-service-origins.js +2 -2
  118. package/node_modules/@playdrop/config/dist/src/server/logging.d.ts.map +1 -1
  119. package/node_modules/@playdrop/config/dist/src/server/logging.js +31 -2
  120. package/node_modules/@playdrop/config/dist/test/creator-plans.test.js +10 -0
  121. package/node_modules/@playdrop/config/dist/test/deployment.test.js +0 -4
  122. package/node_modules/@playdrop/config/dist/test/runtime-service-origins.test.js +2 -0
  123. package/node_modules/@playdrop/config/dist/tsconfig.tsbuildinfo +1 -1
  124. package/node_modules/@playdrop/config/package.json +6 -0
  125. package/node_modules/@playdrop/game-source-git/dist/src/archive.d.ts +9 -0
  126. package/node_modules/@playdrop/game-source-git/dist/src/archive.d.ts.map +1 -0
  127. package/node_modules/@playdrop/game-source-git/dist/src/archive.js +107 -0
  128. package/node_modules/@playdrop/game-source-git/dist/src/bundle-storage.d.ts +29 -0
  129. package/node_modules/@playdrop/game-source-git/dist/src/bundle-storage.d.ts.map +1 -0
  130. package/node_modules/@playdrop/game-source-git/dist/src/bundle-storage.js +64 -0
  131. package/node_modules/@playdrop/game-source-git/dist/src/export.d.ts +8 -0
  132. package/node_modules/@playdrop/game-source-git/dist/src/export.d.ts.map +1 -0
  133. package/node_modules/@playdrop/game-source-git/dist/src/export.js +25 -0
  134. package/node_modules/@playdrop/game-source-git/dist/src/git.d.ts +39 -0
  135. package/node_modules/@playdrop/game-source-git/dist/src/git.d.ts.map +1 -0
  136. package/node_modules/@playdrop/game-source-git/dist/src/git.js +195 -0
  137. package/node_modules/@playdrop/game-source-git/dist/src/ignore.d.ts +6 -0
  138. package/node_modules/@playdrop/game-source-git/dist/src/ignore.d.ts.map +1 -0
  139. package/node_modules/@playdrop/game-source-git/dist/src/ignore.js +51 -0
  140. package/node_modules/@playdrop/game-source-git/dist/src/index.d.ts +10 -0
  141. package/node_modules/@playdrop/game-source-git/dist/src/index.d.ts.map +1 -0
  142. package/node_modules/@playdrop/{boxel-core/dist/src/humanoid/r15 → game-source-git/dist/src}/index.js +9 -4
  143. package/node_modules/@playdrop/game-source-git/dist/src/lock.d.ts +17 -0
  144. package/node_modules/@playdrop/game-source-git/dist/src/lock.d.ts.map +1 -0
  145. package/node_modules/@playdrop/game-source-git/dist/src/lock.js +72 -0
  146. package/node_modules/@playdrop/game-source-git/dist/src/materialize.d.ts +10 -0
  147. package/node_modules/@playdrop/game-source-git/dist/src/materialize.d.ts.map +1 -0
  148. package/node_modules/@playdrop/game-source-git/dist/src/materialize.js +99 -0
  149. package/node_modules/@playdrop/game-source-git/dist/src/paths.d.ts +24 -0
  150. package/node_modules/@playdrop/game-source-git/dist/src/paths.d.ts.map +1 -0
  151. package/node_modules/@playdrop/game-source-git/dist/src/paths.js +207 -0
  152. package/node_modules/@playdrop/game-source-git/dist/src/repository.d.ts +66 -0
  153. package/node_modules/@playdrop/game-source-git/dist/src/repository.d.ts.map +1 -0
  154. package/node_modules/@playdrop/game-source-git/dist/src/repository.js +213 -0
  155. package/node_modules/@playdrop/game-source-git/dist/test/core.test.d.ts +2 -0
  156. package/node_modules/@playdrop/game-source-git/dist/test/core.test.d.ts.map +1 -0
  157. package/node_modules/@playdrop/game-source-git/dist/test/core.test.js +441 -0
  158. package/node_modules/@playdrop/game-source-git/dist/tsconfig.tsbuildinfo +1 -0
  159. package/node_modules/@playdrop/game-source-git/package.json +28 -0
  160. package/node_modules/@playdrop/types/dist/agent-task-terminal.d.ts +2 -2
  161. package/node_modules/@playdrop/types/dist/agent-task-terminal.d.ts.map +1 -1
  162. package/node_modules/@playdrop/types/dist/agent-task-terminal.js +15 -9
  163. package/node_modules/@playdrop/types/dist/api.d.ts +728 -164
  164. package/node_modules/@playdrop/types/dist/api.d.ts.map +1 -1
  165. package/node_modules/@playdrop/types/dist/api.js +60 -11
  166. package/node_modules/@playdrop/types/dist/asset-pack.d.ts +2 -0
  167. package/node_modules/@playdrop/types/dist/asset-pack.d.ts.map +1 -1
  168. package/node_modules/@playdrop/types/dist/asset.d.ts +22 -8
  169. package/node_modules/@playdrop/types/dist/asset.d.ts.map +1 -1
  170. package/node_modules/@playdrop/types/dist/asset.js +26 -26
  171. package/node_modules/@playdrop/types/dist/chat.d.ts +107 -3
  172. package/node_modules/@playdrop/types/dist/chat.d.ts.map +1 -1
  173. package/node_modules/@playdrop/types/dist/chat.js +33 -4
  174. package/node_modules/@playdrop/types/dist/index.d.ts +3 -0
  175. package/node_modules/@playdrop/types/dist/index.d.ts.map +1 -1
  176. package/node_modules/@playdrop/types/dist/index.js +7 -1
  177. package/node_modules/@playdrop/types/dist/public-cache-tags.d.ts +11 -0
  178. package/node_modules/@playdrop/types/dist/public-cache-tags.d.ts.map +1 -0
  179. package/node_modules/@playdrop/types/dist/public-cache-tags.js +78 -0
  180. package/node_modules/@playdrop/types/dist/realtime.d.ts +3 -15
  181. package/node_modules/@playdrop/types/dist/realtime.d.ts.map +1 -1
  182. package/node_modules/@playdrop/types/dist/social.d.ts +64 -0
  183. package/node_modules/@playdrop/types/dist/social.d.ts.map +1 -0
  184. package/node_modules/@playdrop/{boxel-three/dist/src/types.js → types/dist/social.js} +14 -2
  185. package/node_modules/@playdrop/types/dist/spritesheet.d.ts +51 -0
  186. package/node_modules/@playdrop/types/dist/spritesheet.d.ts.map +1 -0
  187. package/node_modules/@playdrop/types/dist/spritesheet.js +73 -0
  188. package/node_modules/@playdrop/types/dist/version.d.ts +86 -58
  189. package/node_modules/@playdrop/types/dist/version.d.ts.map +1 -1
  190. package/node_modules/@playdrop/types/dist/version.js +111 -0
  191. package/node_modules/@playdrop/types/package.json +14 -0
  192. package/node_modules/@playdrop/vox-three/dist/src/index.d.ts +1 -1
  193. package/node_modules/@playdrop/vox-three/dist/src/index.js +1 -1
  194. package/node_modules/@playdrop/vox-three/dist/src/index.js.map +1 -1
  195. package/node_modules/@playdrop/vox-three/dist/src/vox.d.ts +0 -3
  196. package/node_modules/@playdrop/vox-three/dist/src/vox.js +0 -110
  197. package/node_modules/@playdrop/vox-three/dist/src/vox.js.map +1 -1
  198. package/node_modules/@playdrop/vox-three/dist/test/vox.test.js +0 -18
  199. package/node_modules/@playdrop/vox-three/dist/test/vox.test.js.map +1 -1
  200. package/node_modules/@playdrop/vox-three/package.json +8 -4
  201. package/package.json +9 -11
  202. package/dist/assets/model-artifacts.d.ts +0 -8
  203. package/dist/assets/model-artifacts.js +0 -382
  204. package/dist/assets/model-worker.d.ts +0 -22
  205. package/dist/assets/model-worker.js +0 -123
  206. package/node_modules/@playdrop/ai-client/dist/index.d.ts +0 -441
  207. package/node_modules/@playdrop/ai-client/dist/index.d.ts.map +0 -1
  208. package/node_modules/@playdrop/ai-client/dist/index.js +0 -499
  209. package/node_modules/@playdrop/ai-client/package.json +0 -22
  210. package/node_modules/@playdrop/boxel-core/dist/src/entity-cleaner.d.ts +0 -13
  211. package/node_modules/@playdrop/boxel-core/dist/src/entity-cleaner.js +0 -141
  212. package/node_modules/@playdrop/boxel-core/dist/src/entity-cleaner.js.map +0 -1
  213. package/node_modules/@playdrop/boxel-core/dist/src/entity-utils.d.ts +0 -47
  214. package/node_modules/@playdrop/boxel-core/dist/src/entity-utils.js +0 -313
  215. package/node_modules/@playdrop/boxel-core/dist/src/entity-utils.js.map +0 -1
  216. package/node_modules/@playdrop/boxel-core/dist/src/format-utils.d.ts +0 -3
  217. package/node_modules/@playdrop/boxel-core/dist/src/format-utils.js +0 -36
  218. package/node_modules/@playdrop/boxel-core/dist/src/format-utils.js.map +0 -1
  219. package/node_modules/@playdrop/boxel-core/dist/src/humanoid/geometry.d.ts +0 -23
  220. package/node_modules/@playdrop/boxel-core/dist/src/humanoid/geometry.js +0 -11
  221. package/node_modules/@playdrop/boxel-core/dist/src/humanoid/geometry.js.map +0 -1
  222. package/node_modules/@playdrop/boxel-core/dist/src/humanoid/index.d.ts +0 -4
  223. package/node_modules/@playdrop/boxel-core/dist/src/humanoid/index.js +0 -21
  224. package/node_modules/@playdrop/boxel-core/dist/src/humanoid/index.js.map +0 -1
  225. package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r15/common.d.ts +0 -4
  226. package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r15/common.js +0 -24
  227. package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r15/common.js.map +0 -1
  228. package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r15/index.d.ts +0 -3
  229. package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r15/index.js.map +0 -1
  230. package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r15/textured-builder.d.ts +0 -3
  231. package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r15/textured-builder.js +0 -387
  232. package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r15/textured-builder.js.map +0 -1
  233. package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r15/types.d.ts +0 -6
  234. package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r15/types.js +0 -3
  235. package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r15/types.js.map +0 -1
  236. package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r15/voxel-builder.d.ts +0 -3
  237. package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r15/voxel-builder.js +0 -373
  238. package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r15/voxel-builder.js.map +0 -1
  239. package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r6/builder.d.ts +0 -12
  240. package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r6/builder.js +0 -215
  241. package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r6/builder.js.map +0 -1
  242. package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r6/index.d.ts +0 -4
  243. package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r6/index.js +0 -18
  244. package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r6/index.js.map +0 -1
  245. package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r6/scanner.d.ts +0 -42
  246. package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r6/scanner.js +0 -145
  247. package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r6/scanner.js.map +0 -1
  248. package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r6/textures/artifacts.d.ts +0 -26
  249. package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r6/textures/artifacts.js +0 -65
  250. package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r6/textures/artifacts.js.map +0 -1
  251. package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r6/textures/face-map.d.ts +0 -33
  252. package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r6/textures/face-map.js +0 -175
  253. package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r6/textures/face-map.js.map +0 -1
  254. package/node_modules/@playdrop/boxel-core/dist/src/humanoid/templates/humanoid_r15.json +0 -1517
  255. package/node_modules/@playdrop/boxel-core/dist/src/humanoid/templates/humanoid_r6.json +0 -61
  256. package/node_modules/@playdrop/boxel-core/dist/src/humanoid/templates/index.d.ts +0 -10
  257. package/node_modules/@playdrop/boxel-core/dist/src/humanoid/templates/index.js +0 -23
  258. package/node_modules/@playdrop/boxel-core/dist/src/humanoid/templates/index.js.map +0 -1
  259. package/node_modules/@playdrop/boxel-core/dist/src/index.d.ts +0 -19
  260. package/node_modules/@playdrop/boxel-core/dist/src/index.js +0 -36
  261. package/node_modules/@playdrop/boxel-core/dist/src/index.js.map +0 -1
  262. package/node_modules/@playdrop/boxel-core/dist/src/materials.d.ts +0 -26
  263. package/node_modules/@playdrop/boxel-core/dist/src/materials.js +0 -184
  264. package/node_modules/@playdrop/boxel-core/dist/src/materials.js.map +0 -1
  265. package/node_modules/@playdrop/boxel-core/dist/src/palette_tools.d.ts +0 -68
  266. package/node_modules/@playdrop/boxel-core/dist/src/palette_tools.js +0 -488
  267. package/node_modules/@playdrop/boxel-core/dist/src/palette_tools.js.map +0 -1
  268. package/node_modules/@playdrop/boxel-core/dist/src/serialization.d.ts +0 -4
  269. package/node_modules/@playdrop/boxel-core/dist/src/serialization.js +0 -380
  270. package/node_modules/@playdrop/boxel-core/dist/src/serialization.js.map +0 -1
  271. package/node_modules/@playdrop/boxel-core/dist/src/textures.d.ts +0 -29
  272. package/node_modules/@playdrop/boxel-core/dist/src/textures.js +0 -208
  273. package/node_modules/@playdrop/boxel-core/dist/src/textures.js.map +0 -1
  274. package/node_modules/@playdrop/boxel-core/dist/src/transforms/textured-boxes/infer-face.d.ts +0 -9
  275. package/node_modules/@playdrop/boxel-core/dist/src/transforms/textured-boxes/infer-face.js +0 -312
  276. package/node_modules/@playdrop/boxel-core/dist/src/transforms/textured-boxes/infer-face.js.map +0 -1
  277. package/node_modules/@playdrop/boxel-core/dist/src/transforms/textured-boxes/layer-mode.d.ts +0 -9
  278. package/node_modules/@playdrop/boxel-core/dist/src/transforms/textured-boxes/layer-mode.js +0 -154
  279. package/node_modules/@playdrop/boxel-core/dist/src/transforms/textured-boxes/layer-mode.js.map +0 -1
  280. package/node_modules/@playdrop/boxel-core/dist/src/transforms/textured-boxes/merge-overlay.d.ts +0 -2
  281. package/node_modules/@playdrop/boxel-core/dist/src/transforms/textured-boxes/merge-overlay.js +0 -121
  282. package/node_modules/@playdrop/boxel-core/dist/src/transforms/textured-boxes/merge-overlay.js.map +0 -1
  283. package/node_modules/@playdrop/boxel-core/dist/src/transforms/textured-boxes/slice.d.ts +0 -20
  284. package/node_modules/@playdrop/boxel-core/dist/src/transforms/textured-boxes/slice.js +0 -389
  285. package/node_modules/@playdrop/boxel-core/dist/src/transforms/textured-boxes/slice.js.map +0 -1
  286. package/node_modules/@playdrop/boxel-core/dist/src/transforms/upscale.d.ts +0 -3
  287. package/node_modules/@playdrop/boxel-core/dist/src/transforms/upscale.js +0 -206
  288. package/node_modules/@playdrop/boxel-core/dist/src/transforms/upscale.js.map +0 -1
  289. package/node_modules/@playdrop/boxel-core/dist/src/transforms/voxels/slice.d.ts +0 -12
  290. package/node_modules/@playdrop/boxel-core/dist/src/transforms/voxels/slice.js +0 -81
  291. package/node_modules/@playdrop/boxel-core/dist/src/transforms/voxels/slice.js.map +0 -1
  292. package/node_modules/@playdrop/boxel-core/dist/src/transforms/voxels/textured-to-voxel.d.ts +0 -12
  293. package/node_modules/@playdrop/boxel-core/dist/src/transforms/voxels/textured-to-voxel.js +0 -318
  294. package/node_modules/@playdrop/boxel-core/dist/src/transforms/voxels/textured-to-voxel.js.map +0 -1
  295. package/node_modules/@playdrop/boxel-core/dist/src/types.d.ts +0 -168
  296. package/node_modules/@playdrop/boxel-core/dist/src/types.js +0 -3
  297. package/node_modules/@playdrop/boxel-core/dist/src/types.js.map +0 -1
  298. package/node_modules/@playdrop/boxel-core/dist/src/validation.d.ts +0 -24
  299. package/node_modules/@playdrop/boxel-core/dist/src/validation.js +0 -620
  300. package/node_modules/@playdrop/boxel-core/dist/src/validation.js.map +0 -1
  301. package/node_modules/@playdrop/boxel-core/dist/src/voxels/greedy-mesher.d.ts +0 -11
  302. package/node_modules/@playdrop/boxel-core/dist/src/voxels/greedy-mesher.js +0 -135
  303. package/node_modules/@playdrop/boxel-core/dist/src/voxels/greedy-mesher.js.map +0 -1
  304. package/node_modules/@playdrop/boxel-core/dist/src/voxels.d.ts +0 -23
  305. package/node_modules/@playdrop/boxel-core/dist/src/voxels.js +0 -52
  306. package/node_modules/@playdrop/boxel-core/dist/src/voxels.js.map +0 -1
  307. package/node_modules/@playdrop/boxel-core/package.json +0 -19
  308. package/node_modules/@playdrop/boxel-three/dist/src/animations.d.ts +0 -4
  309. package/node_modules/@playdrop/boxel-three/dist/src/animations.js +0 -92
  310. package/node_modules/@playdrop/boxel-three/dist/src/builders.d.ts +0 -8
  311. package/node_modules/@playdrop/boxel-three/dist/src/builders.js +0 -363
  312. package/node_modules/@playdrop/boxel-three/dist/src/context.d.ts +0 -24
  313. package/node_modules/@playdrop/boxel-three/dist/src/context.js +0 -58
  314. package/node_modules/@playdrop/boxel-three/dist/src/exporters/glb.d.ts +0 -100
  315. package/node_modules/@playdrop/boxel-three/dist/src/exporters/glb.js +0 -927
  316. package/node_modules/@playdrop/boxel-three/dist/src/exporters/image.d.ts +0 -18
  317. package/node_modules/@playdrop/boxel-three/dist/src/exporters/image.js +0 -294
  318. package/node_modules/@playdrop/boxel-three/dist/src/index.d.ts +0 -17
  319. package/node_modules/@playdrop/boxel-three/dist/src/index.js +0 -64
  320. package/node_modules/@playdrop/boxel-three/dist/src/instantiate.d.ts +0 -40
  321. package/node_modules/@playdrop/boxel-three/dist/src/instantiate.js +0 -96
  322. package/node_modules/@playdrop/boxel-three/dist/src/nodes.d.ts +0 -8
  323. package/node_modules/@playdrop/boxel-three/dist/src/nodes.js +0 -88
  324. package/node_modules/@playdrop/boxel-three/dist/src/overlays.d.ts +0 -7
  325. package/node_modules/@playdrop/boxel-three/dist/src/overlays.js +0 -123
  326. package/node_modules/@playdrop/boxel-three/dist/src/primitives.d.ts +0 -4
  327. package/node_modules/@playdrop/boxel-three/dist/src/primitives.js +0 -48
  328. package/node_modules/@playdrop/boxel-three/dist/src/scene.d.ts +0 -3
  329. package/node_modules/@playdrop/boxel-three/dist/src/scene.js +0 -168
  330. package/node_modules/@playdrop/boxel-three/dist/src/skinned-mesh.d.ts +0 -29
  331. package/node_modules/@playdrop/boxel-three/dist/src/skinned-mesh.js +0 -623
  332. package/node_modules/@playdrop/boxel-three/dist/src/texture-atlas.d.ts +0 -13
  333. package/node_modules/@playdrop/boxel-three/dist/src/texture-atlas.js +0 -133
  334. package/node_modules/@playdrop/boxel-three/dist/src/textures.d.ts +0 -17
  335. package/node_modules/@playdrop/boxel-three/dist/src/textures.js +0 -216
  336. package/node_modules/@playdrop/boxel-three/dist/src/types.d.ts +0 -112
  337. package/node_modules/@playdrop/boxel-three/dist/src/voxels/faces.d.ts +0 -28
  338. package/node_modules/@playdrop/boxel-three/dist/src/voxels/faces.js +0 -344
  339. package/node_modules/@playdrop/boxel-three/dist/src/voxels/mesher.d.ts +0 -24
  340. package/node_modules/@playdrop/boxel-three/dist/src/voxels/mesher.js +0 -113
  341. package/node_modules/@playdrop/boxel-three/dist/test/export-image.playwright.test.d.ts +0 -1
  342. package/node_modules/@playdrop/boxel-three/dist/test/export-image.playwright.test.js +0 -137
  343. package/node_modules/@playdrop/boxel-three/dist/test/fixtures/render-worker.d.ts +0 -20
  344. package/node_modules/@playdrop/boxel-three/dist/test/fixtures/render-worker.js +0 -85
  345. package/node_modules/@playdrop/boxel-three/dist/test/glb-skinned.test.d.ts +0 -1
  346. package/node_modules/@playdrop/boxel-three/dist/test/glb-skinned.test.js +0 -104
  347. package/node_modules/@playdrop/boxel-three/dist/test/index.test.d.ts +0 -1
  348. package/node_modules/@playdrop/boxel-three/dist/test/index.test.js +0 -30
  349. package/node_modules/@playdrop/boxel-three/dist/test/instantiate.test.d.ts +0 -1
  350. package/node_modules/@playdrop/boxel-three/dist/test/instantiate.test.js +0 -88
  351. package/node_modules/@playdrop/boxel-three/dist/test/overlays.test.d.ts +0 -1
  352. package/node_modules/@playdrop/boxel-three/dist/test/overlays.test.js +0 -42
  353. package/node_modules/@playdrop/boxel-three/dist/test/scene-filter.test.d.ts +0 -1
  354. package/node_modules/@playdrop/boxel-three/dist/test/scene-filter.test.js +0 -73
  355. package/node_modules/@playdrop/boxel-three/dist/test/scene-smoke.test.d.ts +0 -1
  356. package/node_modules/@playdrop/boxel-three/dist/test/scene-smoke.test.js +0 -85
  357. package/node_modules/@playdrop/boxel-three/dist/test/skinned-mesh.test.d.ts +0 -1
  358. package/node_modules/@playdrop/boxel-three/dist/test/skinned-mesh.test.js +0 -73
  359. package/node_modules/@playdrop/boxel-three/dist/test/textured-overlay.test.d.ts +0 -1
  360. package/node_modules/@playdrop/boxel-three/dist/test/textured-overlay.test.js +0 -136
  361. package/node_modules/@playdrop/boxel-three/dist/test/voxels.test.d.ts +0 -1
  362. package/node_modules/@playdrop/boxel-three/dist/test/voxels.test.js +0 -42
  363. package/node_modules/@playdrop/boxel-three/package.json +0 -28
@@ -36,6 +36,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
36
36
  return (mod && mod.__esModule) ? mod : { "default": mod };
37
37
  };
38
38
  Object.defineProperty(exports, "__esModule", { value: true });
39
+ exports.resolveCaptureSurfaces = resolveCaptureSurfaces;
39
40
  exports.resolveListingCaptureRouteSegment = resolveListingCaptureRouteSegment;
40
41
  exports.resolveCaptureListingDevRouterPort = resolveCaptureListingDevRouterPort;
41
42
  exports.resolveListingCaptureLocalDevPort = resolveListingCaptureLocalDevPort;
@@ -111,6 +112,28 @@ const SURFACE_OUTPUT_SLUG = {
111
112
  MOBILE_LANDSCAPE: "mobile-landscape",
112
113
  MOBILE_PORTRAIT: "mobile-portrait",
113
114
  };
115
+ const CAPTURE_SURFACE_BY_INPUT = {
116
+ desktop: "DESKTOP",
117
+ "mobile-landscape": "MOBILE_LANDSCAPE",
118
+ "mobile-portrait": "MOBILE_PORTRAIT",
119
+ };
120
+ function parseCaptureSurface(value) {
121
+ const normalized = value?.trim().toLowerCase().replace(/_/g, "-") ?? "";
122
+ if (!normalized)
123
+ return null;
124
+ const surface = CAPTURE_SURFACE_BY_INPUT[normalized];
125
+ if (!surface)
126
+ throw new Error("surface_invalid");
127
+ return surface;
128
+ }
129
+ function resolveCaptureSurfaces(declared, selected) {
130
+ if (!selected)
131
+ return [...declared];
132
+ if (!declared.includes(selected)) {
133
+ throw new Error(`surface_not_declared:${selected}`);
134
+ }
135
+ return [selected];
136
+ }
114
137
  function resolveListingCaptureRouteSegment(previewable) {
115
138
  if (!previewable) {
116
139
  throw new Error("listing_preview_support_missing");
@@ -169,6 +192,10 @@ function parseCaptureListingOptions(targetArg, options = {}) {
169
192
  maximum: MAX_DIMENSION,
170
193
  integer: true,
171
194
  });
195
+ if (width % 2 !== 0)
196
+ throw new Error("width_must_be_even");
197
+ if (height % 2 !== 0)
198
+ throw new Error("height_must_be_even");
172
199
  const fps = parsePositiveNumber(options.fps, DEFAULT_FPS, "fps", {
173
200
  minimum: 1,
174
201
  maximum: MAX_FPS,
@@ -183,6 +210,7 @@ function parseCaptureListingOptions(targetArg, options = {}) {
183
210
  return {
184
211
  targetArg,
185
212
  appName: options.app?.trim() || undefined,
213
+ surface: parseCaptureSurface(options.surface),
186
214
  durationSeconds,
187
215
  width,
188
216
  height,
@@ -322,6 +350,10 @@ async function launchListingBrowser(initialViewport, automationOrigin, contextOp
322
350
  const context = await browser.newContext(contextOptions);
323
351
  await grantListingBrowserLocalNetworkAccess(context, automationOrigin);
324
352
  const page = await context.newPage();
353
+ const cdpSession = await context.newCDPSession(page);
354
+ await cdpSession.send("Emulation.setSafeAreaInsetsOverride", {
355
+ insets: { top: 0, right: 0, bottom: 0, left: 0 },
356
+ });
325
357
  return {
326
358
  browser,
327
359
  context,
@@ -898,7 +930,7 @@ function formatCommandError(error) {
898
930
  suggestions: [],
899
931
  };
900
932
  }
901
- async function encodeListingVideo(rawVideoPath, finalVideoPath, posterPath, crop, width, height, fps, posterAtSeconds, deadlineAt) {
933
+ async function encodeListingVideo(rawVideoPath, finalVideoPath, posterPath, crop, width, height, fps, durationSeconds, posterAtSeconds, deadlineAt) {
902
934
  const filter = `crop=${crop.width}:${crop.height}:${crop.x}:${crop.y},scale=${width}:${height}:flags=lanczos,fps=${fps}`;
903
935
  runTool("ffmpeg", [
904
936
  "-y",
@@ -912,6 +944,8 @@ async function encodeListingVideo(rawVideoPath, finalVideoPath, posterPath, crop
912
944
  "yuv420p",
913
945
  "-c:a",
914
946
  "aac",
947
+ "-t",
948
+ String(durationSeconds),
915
949
  finalVideoPath,
916
950
  ], "ffmpeg_failed", deadlineAt);
917
951
  runTool("ffmpeg", ["-y", "-ss", String(posterAtSeconds), "-i", finalVideoPath, "-frames:v", "1", posterPath], "ffmpeg_failed", deadlineAt);
@@ -1081,6 +1115,16 @@ async function captureListing(targetArg, options = {}) {
1081
1115
  if (!resolvedTarget) {
1082
1116
  return;
1083
1117
  }
1118
+ let requestedSurfaces;
1119
+ try {
1120
+ requestedSurfaces = resolveCaptureSurfaces(resolvedTarget.surfaceTargets.list, parsedOptions.surface);
1121
+ }
1122
+ catch (error) {
1123
+ const detail = formatCommandError(error instanceof Error ? error : new Error(String(error)));
1124
+ (0, messages_1.printErrorWithHelp)(detail.message, detail.suggestions, { command: "project capture" });
1125
+ process.exitCode = 1;
1126
+ return;
1127
+ }
1084
1128
  let appName = resolvedTarget.appName;
1085
1129
  let appTypeSlug = (0, appUrls_1.getAppTypeSlug)(null);
1086
1130
  let declaresPreviewSupport = false;
@@ -1213,7 +1257,7 @@ async function captureListing(targetArg, options = {}) {
1213
1257
  outputPaths,
1214
1258
  parsedOptions,
1215
1259
  runtimeBundleHash,
1216
- surfaces: resolvedTarget.surfaceTargets.list,
1260
+ surfaces: requestedSurfaces,
1217
1261
  deadlineAt: captureDeadlineAt,
1218
1262
  });
1219
1263
  if (reused) {
@@ -1321,7 +1365,7 @@ async function captureListing(targetArg, options = {}) {
1321
1365
  const reportFrameUrl = (0, appUrls_1.redactTaskCaptureSession)(frameUrl);
1322
1366
  console.log(`[listing] Opening ${reportFrameUrl}`);
1323
1367
  const shouldExportPreviewAudio = parsedOptions.audio && routeSegment === "dev-preview";
1324
- const surfaces = resolvedTarget.surfaceTargets.list;
1368
+ const surfaces = requestedSurfaces;
1325
1369
  const useSurfacePrefix = surfaces.length > 1;
1326
1370
  const captures = [];
1327
1371
  const artifactHashes = {};
@@ -1379,7 +1423,7 @@ async function captureListing(targetArg, options = {}) {
1379
1423
  const rawAudioTrackCount = countAudioStreams(rawProbe);
1380
1424
  const crop = computeRecordedCrop(measurement, recorderMetadata, rawVideoStream.width, rawVideoStream.height);
1381
1425
  console.log(`[listing] Cropping raw capture to gameplay at ${crop.width}x${crop.height}+${crop.x}+${crop.y}.`);
1382
- await encodeListingVideo(surfaceOutputPaths.rawVideoPath, surfaceOutputPaths.finalVideoPath, surfaceOutputPaths.posterPath, crop, dimensions.width, dimensions.height, parsedOptions.fps, parsedOptions.posterAtSeconds, captureDeadlineAt);
1426
+ await encodeListingVideo(surfaceOutputPaths.rawVideoPath, surfaceOutputPaths.finalVideoPath, surfaceOutputPaths.posterPath, crop, dimensions.width, dimensions.height, parsedOptions.fps, parsedOptions.durationSeconds, parsedOptions.posterAtSeconds, captureDeadlineAt);
1383
1427
  if (exportedAudioPath) {
1384
1428
  await muxListingAudio(surfaceOutputPaths.finalVideoPath, exportedAudioPath, captureDeadlineAt);
1385
1429
  }
@@ -9,12 +9,16 @@ export type ChatWriteCommandOptions = ChatCommonOptions & {
9
9
  eventType?: string;
10
10
  eventDataFile?: string;
11
11
  asSystem?: boolean;
12
+ attachment?: string[];
12
13
  };
13
14
  export declare function listChatChannels(options?: ChatCommonOptions): Promise<void>;
14
15
  export declare function readChatChannel(channel: string, options?: ChatCommonOptions): Promise<void>;
15
16
  export declare function readChatThread(rawMessageId: string, options?: ChatCommonOptions): Promise<void>;
17
+ export declare function listChatInbox(options?: ChatCommonOptions): Promise<void>;
18
+ export declare function readChatConversation(rawConversationId: string, options?: ChatCommonOptions): Promise<void>;
16
19
  export declare function sendChatMessage(channel: string, options: ChatWriteCommandOptions): Promise<void>;
17
20
  export declare function replyChatMessage(rawMessageId: string, options: ChatWriteCommandOptions): Promise<void>;
21
+ export declare function sendChatDirectMessage(username: string, options: ChatWriteCommandOptions): Promise<void>;
18
22
  export declare function editChatMessage(rawMessageId: string, options: ChatWriteCommandOptions): Promise<void>;
19
23
  export declare function reactChatMessage(rawMessageId: string, emoji: string, options?: ChatCommonOptions): Promise<void>;
20
24
  export declare function unreactChatMessage(rawMessageId: string, emoji: string, options?: ChatCommonOptions): Promise<void>;
@@ -6,18 +6,37 @@ Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.listChatChannels = listChatChannels;
7
7
  exports.readChatChannel = readChatChannel;
8
8
  exports.readChatThread = readChatThread;
9
+ exports.listChatInbox = listChatInbox;
10
+ exports.readChatConversation = readChatConversation;
9
11
  exports.sendChatMessage = sendChatMessage;
10
12
  exports.replyChatMessage = replyChatMessage;
13
+ exports.sendChatDirectMessage = sendChatDirectMessage;
11
14
  exports.editChatMessage = editChatMessage;
12
15
  exports.reactChatMessage = reactChatMessage;
13
16
  exports.unreactChatMessage = unreactChatMessage;
14
17
  const node_crypto_1 = require("node:crypto");
15
18
  const node_fs_1 = require("node:fs");
16
19
  const node_path_1 = __importDefault(require("node:path"));
20
+ const types_1 = require("@playdrop/types");
17
21
  const commandContext_1 = require("../commandContext");
18
22
  const errors_1 = require("../errors");
19
23
  const messages_1 = require("../messages");
20
24
  const output_1 = require("../output");
25
+ const CHAT_ATTACHMENT_MAX_COUNT = 10;
26
+ const CHAT_ATTACHMENT_CONTENT_TYPE_BY_EXTENSION = {
27
+ ".gif": "image/gif",
28
+ ".jpg": "image/jpeg",
29
+ ".jpeg": "image/jpeg",
30
+ ".png": "image/png",
31
+ ".webp": "image/webp",
32
+ ".mp4": "video/mp4",
33
+ ".mov": "video/quicktime",
34
+ ".webm": "video/webm",
35
+ ".txt": "text/plain",
36
+ ".md": "text/markdown",
37
+ ".markdown": "text/markdown",
38
+ ".json": "application/json",
39
+ };
21
40
  function positiveId(raw, command) {
22
41
  try {
23
42
  if (BigInt(raw) > 0n)
@@ -47,6 +66,42 @@ async function readWriteOptions(options) {
47
66
  ...(options.asSystem !== undefined ? { asSystem: options.asSystem } : {}),
48
67
  };
49
68
  }
69
+ async function uploadAttachmentFiles(client, conversationId, attachmentPaths = []) {
70
+ if (attachmentPaths.length > CHAT_ATTACHMENT_MAX_COUNT)
71
+ throw new Error("chat_attachment_limit_exceeded");
72
+ const files = await Promise.all(attachmentPaths.map(async (inputPath) => {
73
+ const filePath = node_path_1.default.resolve(inputPath);
74
+ const contentType = CHAT_ATTACHMENT_CONTENT_TYPE_BY_EXTENSION[node_path_1.default.extname(filePath).toLowerCase()];
75
+ if (!contentType)
76
+ throw new Error(`chat_invalid_attachment_content_type:${inputPath}`);
77
+ const stats = await node_fs_1.promises.stat(filePath);
78
+ if (!stats.isFile())
79
+ throw new Error(`chat_attachment_not_file:${inputPath}`);
80
+ if (stats.size <= 0 || stats.size > (0, types_1.maxMessageAttachmentBytes)(contentType)) {
81
+ throw new Error(`chat_invalid_attachment_size:${inputPath}`);
82
+ }
83
+ return {
84
+ fileName: node_path_1.default.basename(filePath),
85
+ contentType,
86
+ sizeBytes: stats.size,
87
+ bytes: await node_fs_1.promises.readFile(filePath),
88
+ };
89
+ }));
90
+ const createdSessionIds = [];
91
+ const results = await Promise.allSettled(files.map(async (file) => {
92
+ const session = await client.createChatAttachmentUploadSession(conversationId, file);
93
+ createdSessionIds.push(session.id);
94
+ await client.uploadChatAttachment(session, new Blob([new Uint8Array(file.bytes)], { type: file.contentType }));
95
+ await client.completeChatAttachmentUploadSession(session.id);
96
+ return session.id;
97
+ }));
98
+ const failed = results.find((result) => result.status === "rejected");
99
+ if (failed) {
100
+ await Promise.allSettled(createdSessionIds.map((id) => client.abortChatAttachmentUploadSession(id)));
101
+ throw failed.reason;
102
+ }
103
+ return results.map((result) => result.value);
104
+ }
50
105
  function printMessage(message, indent = "") {
51
106
  const edited = message.editedAt ? " edited" : "";
52
107
  const author = message.author
@@ -108,9 +163,43 @@ async function readChatThread(rawMessageId, options = {}) {
108
163
  response.messages.forEach((message) => printMessage(message, " "));
109
164
  });
110
165
  }
166
+ async function listChatInbox(options = {}) {
167
+ await runChatCommand("chat inbox", options, async (client) => {
168
+ const response = await client.fetchChatConversations({ limit: 100 });
169
+ if (options.json)
170
+ return (0, output_1.printJson)(response);
171
+ if (response.conversations.length === 0)
172
+ return console.log("Chat inbox is empty.");
173
+ for (const conversation of response.conversations) {
174
+ const label = conversation.channel?.displayName ?? conversation.peer?.displayName ?? "Conversation";
175
+ console.log(`${conversation.id}\t${label}\t${conversation.type}\t${conversation.unreadCount > 0 ? `${conversation.unreadCount} unread` : "read"}`);
176
+ }
177
+ });
178
+ }
179
+ async function readChatConversation(rawConversationId, options = {}) {
180
+ const conversationId = positiveId(rawConversationId, "chat conversation");
181
+ if (!conversationId)
182
+ return;
183
+ await runChatCommand("chat conversation", options, async (client) => {
184
+ const [conversation, messages] = await Promise.all([
185
+ client.fetchChatConversation(conversationId),
186
+ client.fetchConversationMessages(conversationId, { limit: 100 }),
187
+ ]);
188
+ if (options.json)
189
+ return (0, output_1.printJson)({ ...conversation, ...messages });
190
+ const label = conversation.conversation.channel?.displayName ?? conversation.conversation.peer?.displayName ?? conversationId;
191
+ console.log(`${label} (#${conversationId})`);
192
+ if (messages.messages.length === 0)
193
+ return console.log("No messages.");
194
+ messages.messages.forEach((message) => printMessage(message));
195
+ });
196
+ }
111
197
  async function sendChatMessage(channel, options) {
112
198
  await runChatCommand("chat send", options, async (client) => {
113
199
  const write = await readWriteOptions(options);
200
+ if (write.asSystem && (options.attachment?.length ?? 0) > 0) {
201
+ throw new Error("chat_system_attachments_not_supported");
202
+ }
114
203
  const response = write.asSystem
115
204
  ? await client.sendSystemChatMessage(channel, {
116
205
  body: write.body,
@@ -118,10 +207,17 @@ async function sendChatMessage(channel, options) {
118
207
  eventType: write.eventType,
119
208
  eventData: write.eventData,
120
209
  })
121
- : await client.sendChatMessage(channel, {
122
- clientMessageId: write.clientMessageId,
123
- body: write.body,
124
- });
210
+ : await (async () => {
211
+ const channelRecord = (await client.fetchChatChannels()).channels.find((candidate) => candidate.slug === channel);
212
+ if (!channelRecord)
213
+ throw new Error("chat_channel_not_found");
214
+ const attachmentUploadIds = await uploadAttachmentFiles(client, channelRecord.id, options.attachment);
215
+ return await client.sendConversationMessage(channelRecord.id, {
216
+ clientMessageId: write.clientMessageId,
217
+ body: write.body,
218
+ ...(attachmentUploadIds.length > 0 ? { attachmentUploadIds } : {}),
219
+ });
220
+ })();
125
221
  if (options.json)
126
222
  return (0, output_1.printJson)(response);
127
223
  (0, output_1.printSuccess)(`Message #${response.message.id} sent to ${channel}.`);
@@ -133,6 +229,9 @@ async function replyChatMessage(rawMessageId, options) {
133
229
  return;
134
230
  await runChatCommand("chat reply", options, async (client) => {
135
231
  const write = await readWriteOptions(options);
232
+ if (write.asSystem && (options.attachment?.length ?? 0) > 0) {
233
+ throw new Error("chat_system_attachments_not_supported");
234
+ }
136
235
  const response = write.asSystem
137
236
  ? await client.replySystemChatMessage(messageId, {
138
237
  body: write.body,
@@ -140,15 +239,41 @@ async function replyChatMessage(rawMessageId, options) {
140
239
  eventType: write.eventType,
141
240
  eventData: write.eventData,
142
241
  })
143
- : await client.replyChatMessage(messageId, {
144
- clientMessageId: write.clientMessageId,
145
- body: write.body,
146
- });
242
+ : await (async () => {
243
+ const context = await client.fetchChatThread(messageId, { limit: 1 });
244
+ if (!context.conversationId)
245
+ throw new Error("chat_message_context_missing");
246
+ const attachmentUploadIds = await uploadAttachmentFiles(client, context.conversationId, options.attachment);
247
+ return await client.sendConversationMessage(context.conversationId, {
248
+ clientMessageId: write.clientMessageId,
249
+ body: write.body,
250
+ ...(attachmentUploadIds.length > 0 ? { attachmentUploadIds } : {}),
251
+ replyToMessageId: messageId,
252
+ ...(context.threadingAvailable ? { threadRootMessageId: messageId } : {}),
253
+ });
254
+ })();
147
255
  if (options.json)
148
256
  return (0, output_1.printJson)(response);
149
257
  (0, output_1.printSuccess)(`Reply #${response.message.id} sent.`);
150
258
  });
151
259
  }
260
+ async function sendChatDirectMessage(username, options) {
261
+ await runChatCommand("chat dm", options, async (client) => {
262
+ if (options.asSystem)
263
+ throw new Error("chat_dm_system_not_supported");
264
+ const write = await readWriteOptions(options);
265
+ const direct = await client.createDirectChatConversation(username.trim().toLowerCase());
266
+ const attachmentUploadIds = await uploadAttachmentFiles(client, direct.conversation.id, options.attachment);
267
+ const response = await client.sendConversationMessage(direct.conversation.id, {
268
+ clientMessageId: write.clientMessageId,
269
+ body: write.body,
270
+ ...(attachmentUploadIds.length > 0 ? { attachmentUploadIds } : {}),
271
+ });
272
+ if (options.json)
273
+ return (0, output_1.printJson)(response);
274
+ (0, output_1.printSuccess)(`Direct message #${response.message.id} sent to ${username}.`);
275
+ });
276
+ }
152
277
  async function editChatMessage(rawMessageId, options) {
153
278
  const messageId = positiveId(rawMessageId, "chat edit");
154
279
  if (!messageId)
@@ -13,6 +13,7 @@ const messages_1 = require("../messages");
13
13
  const loadCheck_1 = require("../apps/loadCheck");
14
14
  const devShared_1 = require("./devShared");
15
15
  const taskCaptureSession_1 = require("./taskCaptureSession");
16
+ const serverBuild_1 = require("../apps/serverBuild");
16
17
  function resolveProjectCheckTarget(targetArg, appOption) {
17
18
  try {
18
19
  return (0, devShared_1.resolveDevTarget)(targetArg, appOption);
@@ -32,7 +33,7 @@ function resolveProjectCheckTarget(targetArg, appOption) {
32
33
  }
33
34
  function parseProjectCheckTimeoutMs(value) {
34
35
  if (value === undefined || value === null || value === "") {
35
- return 15000;
36
+ return loadCheck_1.DEFAULT_HOSTED_LAUNCH_DEADLINE_MS;
36
37
  }
37
38
  const numeric = typeof value === "number" ? value : Number(value);
38
39
  if (!Number.isFinite(numeric) || numeric <= 0) {
@@ -89,6 +90,19 @@ async function check(targetArg, options = {}) {
89
90
  process.exitCode = 1;
90
91
  return;
91
92
  }
93
+ if (taskLookup.task.server) {
94
+ try {
95
+ const serverBuild = await (0, serverBuild_1.buildGameServer)(taskLookup.task);
96
+ if (!serverBuild)
97
+ throw new Error("server_build_missing");
98
+ console.log(`[check] Server contract passed: ${serverBuild.manifest.rooms.join(", ")} -> ${(0, serverBuild_1.formatServerBuildPath)(taskLookup.task, serverBuild.bundlePath)} (${serverBuild.manifest.size} bytes)`);
99
+ }
100
+ catch (error) {
101
+ (0, messages_1.printErrorWithHelp)(error instanceof Error ? error.message : "Server validation failed.", ["Fix the server declaration, frozen dependencies, imports, authentication, or bundle output."], { command: "project check" });
102
+ process.exitCode = 1;
103
+ return;
104
+ }
105
+ }
92
106
  let tapeSurface = null;
93
107
  let playtestTape = null;
94
108
  if (options.tape) {
@@ -183,6 +197,24 @@ async function check(targetArg, options = {}) {
183
197
  process.exitCode = 1;
184
198
  return;
185
199
  }
200
+ let gameServerCredential = null;
201
+ if (taskLookup.task?.server) {
202
+ if (!taskLookup.task.version || typeof registeredApp.id !== "number") {
203
+ (0, messages_1.printErrorWithHelp)("A registered app and exact catalogue version are required for local game-server authentication.", ["Register the app and set its version in catalogue.json."], { command: "project check" });
204
+ process.exitCode = 1;
205
+ return;
206
+ }
207
+ try {
208
+ gameServerCredential = await client.requestDevGameServerCredential(registeredApp.id, {
209
+ version: taskLookup.task.version,
210
+ });
211
+ }
212
+ catch (error) {
213
+ (0, messages_1.printErrorWithHelp)(error instanceof Error ? error.message : "Failed to request the local game-server credential.", ["Confirm the logged-in creator owns this registered app and the catalogue version exists."], { command: "project check" });
214
+ process.exitCode = 1;
215
+ return;
216
+ }
217
+ }
186
218
  const runCheck = async (input) => await (0, loadCheck_1.runLocalHostedLoadCheck)({
187
219
  client,
188
220
  apiBase: envConfig.apiBase,
@@ -197,6 +229,7 @@ async function check(targetArg, options = {}) {
197
229
  surface: input.surface,
198
230
  playtestTape: input.tape,
199
231
  postReadyWaitMs: input.postReadyWaitMs,
232
+ gameServerCredential,
200
233
  });
201
234
  if (tapeSurface && playtestTape) {
202
235
  const idleScreenshotPath = buildComparisonScreenshotPath(screenshotPath, "idle");