@playdrop/playdrop-cli 0.16.5 → 0.16.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (383) hide show
  1. package/bin/playdrop +1 -2
  2. package/config/client-meta.json +4 -4
  3. package/dist/apiClient.d.ts +2 -2
  4. package/dist/apiClient.js +16 -20
  5. package/dist/appUrls.d.ts +2 -2
  6. package/dist/appUrls.js +31 -33
  7. package/dist/apps/build.d.ts +2 -2
  8. package/dist/apps/build.js +83 -83
  9. package/dist/apps/index.d.ts +7 -7
  10. package/dist/apps/index.js +8 -8
  11. package/dist/apps/loadCheck.d.ts +28 -16
  12. package/dist/apps/loadCheck.js +411 -279
  13. package/dist/apps/registration.d.ts +3 -3
  14. package/dist/apps/registration.js +1 -1
  15. package/dist/apps/staticHtml.d.ts +3 -3
  16. package/dist/apps/staticHtml.js +90 -91
  17. package/dist/apps/surfaceProfiles.d.ts +2 -2
  18. package/dist/apps/surfaceProfiles.js +6 -6
  19. package/dist/apps/upload.d.ts +5 -5
  20. package/dist/apps/upload.js +75 -81
  21. package/dist/apps/validate.d.ts +2 -2
  22. package/dist/apps/validate.js +18 -22
  23. package/dist/assetSpecs.d.ts +2 -2
  24. package/dist/assetSpecs.js +35 -35
  25. package/dist/assets/model-artifacts.d.ts +1 -1
  26. package/dist/assets/model-artifacts.js +81 -77
  27. package/dist/assets/model-worker.d.ts +1 -1
  28. package/dist/assets/model-worker.js +6 -6
  29. package/dist/browser.js +9 -9
  30. package/dist/catalogue-utils.d.ts +1 -1
  31. package/dist/catalogue-utils.js +26 -26
  32. package/dist/catalogue.d.ts +21 -16
  33. package/dist/catalogue.js +509 -413
  34. package/dist/clientInfo.d.ts +1 -1
  35. package/dist/clientInfo.js +28 -28
  36. package/dist/commandContext.d.ts +5 -5
  37. package/dist/commandContext.js +19 -23
  38. package/dist/commands/accounts.js +6 -6
  39. package/dist/commands/ads.js +16 -16
  40. package/dist/commands/agents.d.ts +2 -2
  41. package/dist/commands/agents.js +131 -127
  42. package/dist/commands/boosts.js +41 -31
  43. package/dist/commands/browse.d.ts +2 -2
  44. package/dist/commands/browse.js +168 -128
  45. package/dist/commands/build.js +9 -9
  46. package/dist/commands/captureListing.d.ts +8 -8
  47. package/dist/commands/captureListing.js +292 -332
  48. package/dist/commands/changelog.js +1 -1
  49. package/dist/commands/chat.js +51 -53
  50. package/dist/commands/check.d.ts +1 -1
  51. package/dist/commands/check.js +44 -44
  52. package/dist/commands/clients.d.ts +3 -3
  53. package/dist/commands/clients.js +67 -64
  54. package/dist/commands/comments.js +36 -29
  55. package/dist/commands/create.js +305 -312
  56. package/dist/commands/createRemixContent.d.ts +1 -1
  57. package/dist/commands/createRemixContent.js +65 -60
  58. package/dist/commands/creations.js +205 -135
  59. package/dist/commands/credits.js +37 -27
  60. package/dist/commands/detail.js +40 -34
  61. package/dist/commands/dev.js +103 -126
  62. package/dist/commands/devBrowser.js +74 -65
  63. package/dist/commands/devRuntimeAssets.d.ts +4 -4
  64. package/dist/commands/devRuntimeAssets.js +38 -40
  65. package/dist/commands/devServer.d.ts +4 -4
  66. package/dist/commands/devServer.js +183 -174
  67. package/dist/commands/devShared.d.ts +3 -3
  68. package/dist/commands/devShared.js +31 -31
  69. package/dist/commands/doctor.d.ts +5 -5
  70. package/dist/commands/doctor.js +63 -57
  71. package/dist/commands/documentation.js +42 -32
  72. package/dist/commands/feedback.js +59 -42
  73. package/dist/commands/format.js +9 -9
  74. package/dist/commands/generation.d.ts +2 -2
  75. package/dist/commands/generation.js +344 -326
  76. package/dist/commands/init.d.ts +4 -4
  77. package/dist/commands/init.js +64 -61
  78. package/dist/commands/login.d.ts +2 -2
  79. package/dist/commands/login.js +42 -62
  80. package/dist/commands/logout.js +4 -4
  81. package/dist/commands/marketing.d.ts +8 -8
  82. package/dist/commands/marketing.js +246 -297
  83. package/dist/commands/notes.js +19 -19
  84. package/dist/commands/notifications.js +34 -22
  85. package/dist/commands/npmProcess.js +3 -3
  86. package/dist/commands/ownedRuntimeImageValidation.d.ts +1 -1
  87. package/dist/commands/ownedRuntimeImageValidation.js +19 -17
  88. package/dist/commands/play.js +12 -21
  89. package/dist/commands/publicPages.js +8 -4
  90. package/dist/commands/review.js +123 -110
  91. package/dist/commands/search.js +107 -88
  92. package/dist/commands/tags.js +10 -12
  93. package/dist/commands/taskCaptureSession.d.ts +3 -3
  94. package/dist/commands/taskCaptureSession.js +3 -3
  95. package/dist/commands/tweaks.js +25 -23
  96. package/dist/commands/upgrade.js +40 -31
  97. package/dist/commands/upload-content.d.ts +5 -5
  98. package/dist/commands/upload-content.js +130 -122
  99. package/dist/commands/upload-graph.d.ts +1 -1
  100. package/dist/commands/upload-graph.js +7 -11
  101. package/dist/commands/upload.d.ts +7 -7
  102. package/dist/commands/upload.js +196 -217
  103. package/dist/commands/validate.js +33 -32
  104. package/dist/commands/versionsBrowse.js +61 -51
  105. package/dist/commands/whoami.js +11 -14
  106. package/dist/commands/worker/archive-staging.d.ts +9 -0
  107. package/dist/commands/worker/archive-staging.js +257 -0
  108. package/dist/commands/worker/instrument-evidence.d.ts +1 -1
  109. package/dist/commands/worker/instrument-evidence.js +41 -43
  110. package/dist/commands/worker/provider-telemetry.d.ts +2 -1
  111. package/dist/commands/worker/provider-telemetry.js +181 -64
  112. package/dist/commands/worker/runtime.d.ts +18 -3
  113. package/dist/commands/worker/runtime.js +291 -239
  114. package/dist/commands/worker.d.ts +83 -22
  115. package/dist/commands/worker.js +1980 -1411
  116. package/dist/commands/workspaces.d.ts +2 -2
  117. package/dist/commands/workspaces.js +57 -57
  118. package/dist/config.js +23 -20
  119. package/dist/devAuth.d.ts +3 -3
  120. package/dist/devAuth.js +20 -17
  121. package/dist/environment.d.ts +1 -1
  122. package/dist/environment.js +34 -34
  123. package/dist/errors.d.ts +1 -1
  124. package/dist/errors.js +7 -7
  125. package/dist/externalAssetPackValidation.d.ts +1 -1
  126. package/dist/externalAssetPackValidation.js +9 -9
  127. package/dist/http.d.ts +1 -1
  128. package/dist/http.js +9 -9
  129. package/dist/index.js +657 -664
  130. package/dist/listingCaptureLease.js +23 -23
  131. package/dist/listingPreflight.d.ts +2 -2
  132. package/dist/listingPreflight.js +33 -33
  133. package/dist/messages.js +6 -14
  134. package/dist/output.js +9 -9
  135. package/dist/playwright.d.ts +1 -1
  136. package/dist/playwright.js +35 -40
  137. package/dist/proxyFetch.js +30 -27
  138. package/dist/recorderRelease.js +8 -8
  139. package/dist/refs.d.ts +5 -5
  140. package/dist/refs.js +40 -37
  141. package/dist/sessionCookie.js +15 -21
  142. package/dist/shellProbe.js +5 -5
  143. package/dist/taskSelection.d.ts +3 -3
  144. package/dist/taskSelection.js +67 -62
  145. package/dist/taskUtils.d.ts +1 -1
  146. package/dist/taskUtils.js +4 -4
  147. package/dist/tweakStaleness.d.ts +3 -3
  148. package/dist/tweakStaleness.js +8 -8
  149. package/dist/uploadLog.d.ts +3 -3
  150. package/dist/uploadLog.js +51 -51
  151. package/dist/versionCompare.js +3 -3
  152. package/dist/workerAppProject.d.ts +1 -1
  153. package/dist/workerAppProject.js +10 -17
  154. package/dist/workspaceAuth.d.ts +1 -1
  155. package/dist/workspaceAuth.js +28 -22
  156. package/node_modules/@playdrop/ai-client/dist/index.d.ts +35 -35
  157. package/node_modules/@playdrop/ai-client/dist/index.d.ts.map +1 -1
  158. package/node_modules/@playdrop/api-client/dist/client.d.ts +34 -33
  159. package/node_modules/@playdrop/api-client/dist/client.d.ts.map +1 -1
  160. package/node_modules/@playdrop/api-client/dist/core/errors.d.ts +1 -1
  161. package/node_modules/@playdrop/api-client/dist/core/errors.d.ts.map +1 -1
  162. package/node_modules/@playdrop/api-client/dist/core/request.d.ts +2 -2
  163. package/node_modules/@playdrop/api-client/dist/core/request.d.ts.map +1 -1
  164. package/node_modules/@playdrop/api-client/dist/domains/admin.d.ts +2 -2
  165. package/node_modules/@playdrop/api-client/dist/domains/admin.d.ts.map +1 -1
  166. package/node_modules/@playdrop/api-client/dist/domains/admin.js +4 -1
  167. package/node_modules/@playdrop/api-client/dist/domains/agent-tasks.d.ts +4 -3
  168. package/node_modules/@playdrop/api-client/dist/domains/agent-tasks.d.ts.map +1 -1
  169. package/node_modules/@playdrop/api-client/dist/domains/agent-tasks.js +12 -0
  170. package/node_modules/@playdrop/api-client/dist/domains/ai.d.ts +2 -2
  171. package/node_modules/@playdrop/api-client/dist/domains/ai.d.ts.map +1 -1
  172. package/node_modules/@playdrop/api-client/dist/domains/apps.d.ts +4 -4
  173. package/node_modules/@playdrop/api-client/dist/domains/apps.d.ts.map +1 -1
  174. package/node_modules/@playdrop/api-client/dist/domains/asset-packs.d.ts +4 -4
  175. package/node_modules/@playdrop/api-client/dist/domains/asset-packs.d.ts.map +1 -1
  176. package/node_modules/@playdrop/api-client/dist/domains/assets.d.ts +4 -4
  177. package/node_modules/@playdrop/api-client/dist/domains/assets.d.ts.map +1 -1
  178. package/node_modules/@playdrop/api-client/dist/domains/auth.d.ts +2 -2
  179. package/node_modules/@playdrop/api-client/dist/domains/auth.d.ts.map +1 -1
  180. package/node_modules/@playdrop/api-client/dist/domains/chat.d.ts +2 -2
  181. package/node_modules/@playdrop/api-client/dist/domains/chat.d.ts.map +1 -1
  182. package/node_modules/@playdrop/api-client/dist/domains/comments.d.ts +3 -3
  183. package/node_modules/@playdrop/api-client/dist/domains/comments.d.ts.map +1 -1
  184. package/node_modules/@playdrop/api-client/dist/domains/free-credits.d.ts +2 -2
  185. package/node_modules/@playdrop/api-client/dist/domains/free-credits.d.ts.map +1 -1
  186. package/node_modules/@playdrop/api-client/dist/domains/me.d.ts +2 -2
  187. package/node_modules/@playdrop/api-client/dist/domains/me.d.ts.map +1 -1
  188. package/node_modules/@playdrop/api-client/dist/domains/payments.d.ts +2 -2
  189. package/node_modules/@playdrop/api-client/dist/domains/payments.d.ts.map +1 -1
  190. package/node_modules/@playdrop/api-client/dist/domains/player-meta.d.ts +2 -2
  191. package/node_modules/@playdrop/api-client/dist/domains/player-meta.d.ts.map +1 -1
  192. package/node_modules/@playdrop/api-client/dist/domains/playtrade.d.ts +3 -3
  193. package/node_modules/@playdrop/api-client/dist/domains/playtrade.d.ts.map +1 -1
  194. package/node_modules/@playdrop/api-client/dist/domains/playtrade.js +2 -2
  195. package/node_modules/@playdrop/api-client/dist/domains/search.d.ts +2 -2
  196. package/node_modules/@playdrop/api-client/dist/domains/search.d.ts.map +1 -1
  197. package/node_modules/@playdrop/api-client/dist/domains/tags.d.ts +2 -2
  198. package/node_modules/@playdrop/api-client/dist/domains/tags.d.ts.map +1 -1
  199. package/node_modules/@playdrop/api-client/dist/index.d.ts +19 -18
  200. package/node_modules/@playdrop/api-client/dist/index.d.ts.map +1 -1
  201. package/node_modules/@playdrop/api-client/dist/index.js +7 -2
  202. package/node_modules/@playdrop/boxel-core/dist/src/entity-cleaner.d.ts +1 -1
  203. package/node_modules/@playdrop/boxel-core/dist/src/entity-cleaner.js +47 -47
  204. package/node_modules/@playdrop/boxel-core/dist/src/entity-cleaner.js.map +1 -1
  205. package/node_modules/@playdrop/boxel-core/dist/src/entity-utils.d.ts +3 -3
  206. package/node_modules/@playdrop/boxel-core/dist/src/entity-utils.js +32 -47
  207. package/node_modules/@playdrop/boxel-core/dist/src/entity-utils.js.map +1 -1
  208. package/node_modules/@playdrop/boxel-core/dist/src/format-utils.js +16 -18
  209. package/node_modules/@playdrop/boxel-core/dist/src/format-utils.js.map +1 -1
  210. package/node_modules/@playdrop/boxel-core/dist/src/humanoid/geometry.d.ts +2 -2
  211. package/node_modules/@playdrop/boxel-core/dist/src/humanoid/index.d.ts +4 -4
  212. package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r15/common.d.ts +1 -1
  213. package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r15/index.d.ts +3 -3
  214. package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r15/textured-builder.d.ts +2 -2
  215. package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r15/textured-builder.js +44 -45
  216. package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r15/textured-builder.js.map +1 -1
  217. package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r15/types.d.ts +1 -1
  218. package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r15/voxel-builder.d.ts +2 -2
  219. package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r15/voxel-builder.js +40 -44
  220. package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r15/voxel-builder.js.map +1 -1
  221. package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r6/builder.d.ts +2 -2
  222. package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r6/builder.js +30 -34
  223. package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r6/builder.js.map +1 -1
  224. package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r6/index.d.ts +4 -4
  225. package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r6/index.js.map +1 -1
  226. package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r6/scanner.d.ts +3 -3
  227. package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r6/scanner.js +23 -20
  228. package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r6/scanner.js.map +1 -1
  229. package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r6/textures/artifacts.d.ts +3 -3
  230. package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r6/textures/artifacts.js +3 -3
  231. package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r6/textures/face-map.d.ts +1 -1
  232. package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r6/textures/face-map.js +21 -21
  233. package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r6/textures/face-map.js.map +1 -1
  234. package/node_modules/@playdrop/boxel-core/dist/src/humanoid/templates/index.d.ts +1 -1
  235. package/node_modules/@playdrop/boxel-core/dist/src/humanoid/templates/index.js +2 -2
  236. package/node_modules/@playdrop/boxel-core/dist/src/index.d.ts +19 -19
  237. package/node_modules/@playdrop/boxel-core/dist/src/materials.d.ts +1 -1
  238. package/node_modules/@playdrop/boxel-core/dist/src/materials.js +12 -16
  239. package/node_modules/@playdrop/boxel-core/dist/src/materials.js.map +1 -1
  240. package/node_modules/@playdrop/boxel-core/dist/src/palette_tools.d.ts +1 -1
  241. package/node_modules/@playdrop/boxel-core/dist/src/palette_tools.js +38 -41
  242. package/node_modules/@playdrop/boxel-core/dist/src/palette_tools.js.map +1 -1
  243. package/node_modules/@playdrop/boxel-core/dist/src/serialization.d.ts +1 -1
  244. package/node_modules/@playdrop/boxel-core/dist/src/serialization.js +54 -56
  245. package/node_modules/@playdrop/boxel-core/dist/src/serialization.js.map +1 -1
  246. package/node_modules/@playdrop/boxel-core/dist/src/textures.d.ts +3 -3
  247. package/node_modules/@playdrop/boxel-core/dist/src/textures.js +39 -45
  248. package/node_modules/@playdrop/boxel-core/dist/src/textures.js.map +1 -1
  249. package/node_modules/@playdrop/boxel-core/dist/src/transforms/textured-boxes/infer-face.d.ts +2 -2
  250. package/node_modules/@playdrop/boxel-core/dist/src/transforms/textured-boxes/infer-face.js +39 -43
  251. package/node_modules/@playdrop/boxel-core/dist/src/transforms/textured-boxes/infer-face.js.map +1 -1
  252. package/node_modules/@playdrop/boxel-core/dist/src/transforms/textured-boxes/layer-mode.d.ts +3 -3
  253. package/node_modules/@playdrop/boxel-core/dist/src/transforms/textured-boxes/layer-mode.js +35 -35
  254. package/node_modules/@playdrop/boxel-core/dist/src/transforms/textured-boxes/layer-mode.js.map +1 -1
  255. package/node_modules/@playdrop/boxel-core/dist/src/transforms/textured-boxes/merge-overlay.d.ts +1 -1
  256. package/node_modules/@playdrop/boxel-core/dist/src/transforms/textured-boxes/merge-overlay.js +18 -18
  257. package/node_modules/@playdrop/boxel-core/dist/src/transforms/textured-boxes/merge-overlay.js.map +1 -1
  258. package/node_modules/@playdrop/boxel-core/dist/src/transforms/textured-boxes/slice.d.ts +3 -3
  259. package/node_modules/@playdrop/boxel-core/dist/src/transforms/textured-boxes/slice.js +50 -48
  260. package/node_modules/@playdrop/boxel-core/dist/src/transforms/textured-boxes/slice.js.map +1 -1
  261. package/node_modules/@playdrop/boxel-core/dist/src/transforms/upscale.d.ts +1 -1
  262. package/node_modules/@playdrop/boxel-core/dist/src/transforms/upscale.js +22 -26
  263. package/node_modules/@playdrop/boxel-core/dist/src/transforms/upscale.js.map +1 -1
  264. package/node_modules/@playdrop/boxel-core/dist/src/transforms/voxels/slice.d.ts +2 -2
  265. package/node_modules/@playdrop/boxel-core/dist/src/transforms/voxels/slice.js +8 -8
  266. package/node_modules/@playdrop/boxel-core/dist/src/transforms/voxels/slice.js.map +1 -1
  267. package/node_modules/@playdrop/boxel-core/dist/src/transforms/voxels/textured-to-voxel.d.ts +2 -2
  268. package/node_modules/@playdrop/boxel-core/dist/src/transforms/voxels/textured-to-voxel.js +23 -28
  269. package/node_modules/@playdrop/boxel-core/dist/src/transforms/voxels/textured-to-voxel.js.map +1 -1
  270. package/node_modules/@playdrop/boxel-core/dist/src/types.d.ts +8 -8
  271. package/node_modules/@playdrop/boxel-core/dist/src/validation.d.ts +1 -1
  272. package/node_modules/@playdrop/boxel-core/dist/src/validation.js +93 -95
  273. package/node_modules/@playdrop/boxel-core/dist/src/validation.js.map +1 -1
  274. package/node_modules/@playdrop/boxel-core/dist/src/voxels/greedy-mesher.d.ts +1 -1
  275. package/node_modules/@playdrop/boxel-core/dist/src/voxels/greedy-mesher.js +2 -2
  276. package/node_modules/@playdrop/boxel-core/dist/src/voxels/greedy-mesher.js.map +1 -1
  277. package/node_modules/@playdrop/boxel-core/dist/src/voxels.d.ts +1 -1
  278. package/node_modules/@playdrop/boxel-core/dist/src/voxels.js +2 -7
  279. package/node_modules/@playdrop/boxel-core/dist/src/voxels.js.map +1 -1
  280. package/node_modules/@playdrop/boxel-three/dist/src/animations.d.ts +3 -3
  281. package/node_modules/@playdrop/boxel-three/dist/src/builders.d.ts +4 -4
  282. package/node_modules/@playdrop/boxel-three/dist/src/context.d.ts +3 -3
  283. package/node_modules/@playdrop/boxel-three/dist/src/exporters/glb.d.ts +6 -6
  284. package/node_modules/@playdrop/boxel-three/dist/src/exporters/glb.js +9 -1
  285. package/node_modules/@playdrop/boxel-three/dist/src/exporters/image.d.ts +3 -3
  286. package/node_modules/@playdrop/boxel-three/dist/src/index.d.ts +17 -17
  287. package/node_modules/@playdrop/boxel-three/dist/src/instantiate.d.ts +9 -9
  288. package/node_modules/@playdrop/boxel-three/dist/src/nodes.d.ts +3 -3
  289. package/node_modules/@playdrop/boxel-three/dist/src/nodes.js +1 -1
  290. package/node_modules/@playdrop/boxel-three/dist/src/overlays.d.ts +2 -2
  291. package/node_modules/@playdrop/boxel-three/dist/src/primitives.d.ts +1 -1
  292. package/node_modules/@playdrop/boxel-three/dist/src/scene.d.ts +1 -1
  293. package/node_modules/@playdrop/boxel-three/dist/src/skinned-mesh.d.ts +2 -2
  294. package/node_modules/@playdrop/boxel-three/dist/src/texture-atlas.d.ts +1 -1
  295. package/node_modules/@playdrop/boxel-three/dist/src/textures.d.ts +3 -3
  296. package/node_modules/@playdrop/boxel-three/dist/src/types.d.ts +4 -4
  297. package/node_modules/@playdrop/boxel-three/dist/src/voxels/faces.d.ts +2 -2
  298. package/node_modules/@playdrop/boxel-three/dist/src/voxels/mesher.d.ts +1 -1
  299. package/node_modules/@playdrop/boxel-three/dist/test/fixtures/render-worker.d.ts +1 -1
  300. package/node_modules/@playdrop/config/client-meta.json +4 -4
  301. package/node_modules/@playdrop/config/dist/src/client-meta.d.ts +1 -1
  302. package/node_modules/@playdrop/config/dist/src/client-meta.d.ts.map +1 -1
  303. package/node_modules/@playdrop/config/dist/src/client-meta.js +10 -10
  304. package/node_modules/@playdrop/config/dist/src/constants.js +10 -10
  305. package/node_modules/@playdrop/config/dist/src/creator-plans.d.ts +1 -1
  306. package/node_modules/@playdrop/config/dist/src/creator-plans.d.ts.map +1 -1
  307. package/node_modules/@playdrop/config/dist/src/creator-plans.js +27 -28
  308. package/node_modules/@playdrop/config/dist/src/deployment.d.ts +4 -4
  309. package/node_modules/@playdrop/config/dist/src/deployment.d.ts.map +1 -1
  310. package/node_modules/@playdrop/config/dist/src/deployment.js +42 -41
  311. package/node_modules/@playdrop/config/dist/src/game-arena.js +12 -12
  312. package/node_modules/@playdrop/config/dist/src/index.d.ts +9 -9
  313. package/node_modules/@playdrop/config/dist/src/index.d.ts.map +1 -1
  314. package/node_modules/@playdrop/config/dist/src/index.js +24 -25
  315. package/node_modules/@playdrop/config/dist/src/public-deployment.d.ts +4 -4
  316. package/node_modules/@playdrop/config/dist/src/public-deployment.d.ts.map +1 -1
  317. package/node_modules/@playdrop/config/dist/src/public-deployment.js +41 -39
  318. package/node_modules/@playdrop/config/dist/src/runtime-client-meta.js +1 -3
  319. package/node_modules/@playdrop/config/dist/src/runtime-service-origins.d.ts.map +1 -1
  320. package/node_modules/@playdrop/config/dist/src/runtime-service-origins.js +23 -25
  321. package/node_modules/@playdrop/config/dist/src/server/fastify.d.ts +5 -5
  322. package/node_modules/@playdrop/config/dist/src/server/fastify.d.ts.map +1 -1
  323. package/node_modules/@playdrop/config/dist/src/server/fastify.js +44 -46
  324. package/node_modules/@playdrop/config/dist/src/server/logging.d.ts +1 -1
  325. package/node_modules/@playdrop/config/dist/src/server/logging.d.ts.map +1 -1
  326. package/node_modules/@playdrop/config/dist/src/server/logging.js +6 -8
  327. package/node_modules/@playdrop/config/dist/src/types.d.ts +2 -2
  328. package/node_modules/@playdrop/config/dist/test/creator-plans.test.js +12 -12
  329. package/node_modules/@playdrop/config/dist/test/deployment.test.js +59 -59
  330. package/node_modules/@playdrop/config/dist/test/fastify.test.js +4 -4
  331. package/node_modules/@playdrop/config/dist/test/game-arena.test.js +8 -8
  332. package/node_modules/@playdrop/config/dist/test/logging.test.js +6 -6
  333. package/node_modules/@playdrop/config/dist/test/validateClientEnvironment.test.js +57 -57
  334. package/node_modules/@playdrop/config/dist/tsconfig.tsbuildinfo +1 -1
  335. package/node_modules/@playdrop/types/dist/agent-task-playtest.d.ts.map +1 -1
  336. package/node_modules/@playdrop/types/dist/agent-task-terminal.d.ts +2 -2
  337. package/node_modules/@playdrop/types/dist/agent-task-terminal.d.ts.map +1 -1
  338. package/node_modules/@playdrop/types/dist/api.d.ts +314 -250
  339. package/node_modules/@playdrop/types/dist/api.d.ts.map +1 -1
  340. package/node_modules/@playdrop/types/dist/api.js +40 -59
  341. package/node_modules/@playdrop/types/dist/app-capability-filters.d.ts +2 -2
  342. package/node_modules/@playdrop/types/dist/app-playtest-tape.d.ts +6 -6
  343. package/node_modules/@playdrop/types/dist/app-playtest-tape.d.ts.map +1 -1
  344. package/node_modules/@playdrop/types/dist/app-review.d.ts +2 -2
  345. package/node_modules/@playdrop/types/dist/app-review.d.ts.map +1 -1
  346. package/node_modules/@playdrop/types/dist/app-review.js +1 -6
  347. package/node_modules/@playdrop/types/dist/app.d.ts.map +1 -1
  348. package/node_modules/@playdrop/types/dist/asset-pack.d.ts +5 -5
  349. package/node_modules/@playdrop/types/dist/asset-spec.d.ts +4 -4
  350. package/node_modules/@playdrop/types/dist/asset.d.ts +11 -11
  351. package/node_modules/@playdrop/types/dist/attachment-policy.d.ts.map +1 -1
  352. package/node_modules/@playdrop/types/dist/chat.d.ts +3 -3
  353. package/node_modules/@playdrop/types/dist/creator-public-image.d.ts.map +1 -1
  354. package/node_modules/@playdrop/types/dist/graph.d.ts +4 -4
  355. package/node_modules/@playdrop/types/dist/index.d.ts +25 -25
  356. package/node_modules/@playdrop/types/dist/instrument-evidence.d.ts +2 -2
  357. package/node_modules/@playdrop/types/dist/instrument-evidence.d.ts.map +1 -1
  358. package/node_modules/@playdrop/types/dist/instrument-evidence.js +2 -11
  359. package/node_modules/@playdrop/types/dist/locale.d.ts +2 -2
  360. package/node_modules/@playdrop/types/dist/locale.d.ts.map +1 -1
  361. package/node_modules/@playdrop/types/dist/locale.js +2 -17
  362. package/node_modules/@playdrop/types/dist/owned-assets.d.ts +2 -2
  363. package/node_modules/@playdrop/types/dist/owned-assets.d.ts.map +1 -1
  364. package/node_modules/@playdrop/types/dist/player-meta.d.ts +3 -3
  365. package/node_modules/@playdrop/types/dist/player-meta.d.ts.map +1 -1
  366. package/node_modules/@playdrop/types/dist/playtest-notes.d.ts +11 -11
  367. package/node_modules/@playdrop/types/dist/playtest-notes.d.ts.map +1 -1
  368. package/node_modules/@playdrop/types/dist/playtrade.d.ts +8 -5
  369. package/node_modules/@playdrop/types/dist/playtrade.d.ts.map +1 -1
  370. package/node_modules/@playdrop/types/dist/realtime.d.ts +1 -1
  371. package/node_modules/@playdrop/types/dist/tweaks.d.ts +4 -4
  372. package/node_modules/@playdrop/types/dist/tweaks.d.ts.map +1 -1
  373. package/node_modules/@playdrop/types/dist/tweaks.js +12 -2
  374. package/node_modules/@playdrop/types/dist/version.d.ts +14 -14
  375. package/node_modules/@playdrop/types/dist/version.d.ts.map +1 -1
  376. package/node_modules/@playdrop/types/dist/version.js +4 -1
  377. package/node_modules/@playdrop/vox-three/dist/src/index.d.ts +1 -1
  378. package/node_modules/@playdrop/vox-three/dist/src/vox.d.ts +2 -2
  379. package/node_modules/@playdrop/vox-three/dist/src/vox.js +20 -18
  380. package/node_modules/@playdrop/vox-three/dist/src/vox.js.map +1 -1
  381. package/node_modules/@playdrop/vox-three/dist/test/vox.test.js +11 -14
  382. package/node_modules/@playdrop/vox-three/dist/test/vox.test.js.map +1 -1
  383. package/package.json +1 -1
@@ -4,10 +4,10 @@ type InitOptions = {
4
4
  export type InitSummary = {
5
5
  directory: string;
6
6
  cataloguePath: string;
7
- readmeStatus: 'created' | 'updated';
8
- agentsStatus: 'created' | 'skipped';
9
- catalogueStatus: 'created' | 'skipped';
10
- gitStatus: 'initialized' | 'skipped' | 'declined';
7
+ readmeStatus: "created" | "updated";
8
+ agentsStatus: "created" | "skipped";
9
+ catalogueStatus: "created" | "skipped";
10
+ gitStatus: "initialized" | "skipped" | "declined";
11
11
  };
12
12
  export declare function init(targetPath: string, options?: InitOptions): Promise<InitSummary | null>;
13
13
  export {};
@@ -15,11 +15,11 @@ const commandContext_1 = require("../commandContext");
15
15
  const http_1 = require("../http");
16
16
  const messages_1 = require("../messages");
17
17
  const clientInfo_1 = require("../clientInfo");
18
- const DEFAULT_CATALOGUE = '{}\n';
19
- const LEGACY_CATALOGUE_VERSION_KEY = ['schema', 'Version'].join('');
20
- const ALLOWED_CATALOGUE_TOP_LEVEL_KEYS = new Set(['apps', 'assets', 'assetPacks']);
18
+ const DEFAULT_CATALOGUE = "{}\n";
19
+ const LEGACY_CATALOGUE_VERSION_KEY = ["schema", "Version"].join("");
20
+ const ALLOWED_CATALOGUE_TOP_LEVEL_KEYS = new Set(["apps", "assets", "assetPacks"]);
21
21
  function ensureTrailingNewline(content) {
22
- return content.endsWith('\n') ? content : `${content}\n`;
22
+ return content.endsWith("\n") ? content : `${content}\n`;
23
23
  }
24
24
  function renderReadmeTemplate(template, replacements) {
25
25
  let rendered = template;
@@ -35,10 +35,7 @@ async function resolveUsername(apiBase, token) {
35
35
  const data = await client.me();
36
36
  const username = data.user?.username?.trim();
37
37
  if (!username) {
38
- (0, messages_1.printErrorWithHelp)('The Playdrop API returned an unexpected response.', [
39
- 'Retry "playdrop project init" in a moment.',
40
- 'If the problem continues, contact the Playdrop team.'
41
- ], { command: 'project init' });
38
+ (0, messages_1.printErrorWithHelp)("The Playdrop API returned an unexpected response.", ['Retry "playdrop project init" in a moment.', "If the problem continues, contact the Playdrop team."], { command: "project init" });
42
39
  process.exitCode = 1;
43
40
  return null;
44
41
  }
@@ -46,7 +43,7 @@ async function resolveUsername(apiBase, token) {
46
43
  }
47
44
  catch (unknownError) {
48
45
  if (unknownError instanceof types_1.UnsupportedClientError) {
49
- (0, http_1.handleUnsupportedError)(unknownError, 'Project bootstrap');
46
+ (0, http_1.handleUnsupportedError)(unknownError, "Project bootstrap");
50
47
  return null;
51
48
  }
52
49
  if (unknownError instanceof http_1.CLIUnsupportedClientError) {
@@ -55,13 +52,15 @@ async function resolveUsername(apiBase, token) {
55
52
  if (unknownError instanceof types_1.ApiError) {
56
53
  (0, messages_1.printErrorWithHelp)(`Request failed with status ${unknownError.status}.`, [
57
54
  'Run "playdrop auth login" to refresh your credentials.',
58
- 'Use "playdrop project init" again after logging in.'
59
- ], { command: 'project init' });
55
+ 'Use "playdrop project init" again after logging in.',
56
+ ], { command: "project init" });
60
57
  process.exitCode = 1;
61
58
  return null;
62
59
  }
63
60
  const message = unknownError instanceof Error ? unknownError.message : String(unknownError);
64
- (0, messages_1.printErrorWithHelp)('Could not reach the Playdrop API to resolve your account information.', [message], { command: 'project init' });
61
+ (0, messages_1.printErrorWithHelp)("Could not reach the Playdrop API to resolve your account information.", [message], {
62
+ command: "project init",
63
+ });
65
64
  process.exitCode = 1;
66
65
  return null;
67
66
  }
@@ -76,9 +75,9 @@ async function promptGitInitialization(label) {
76
75
  return /^y(es)?$/i.test(answer.trim());
77
76
  }
78
77
  function runGitInit(directory) {
79
- const result = (0, node_child_process_1.spawnSync)('git', ['init'], {
78
+ const result = (0, node_child_process_1.spawnSync)("git", ["init"], {
80
79
  cwd: directory,
81
- stdio: 'inherit',
80
+ stdio: "inherit",
82
81
  });
83
82
  return result.status === 0;
84
83
  }
@@ -86,19 +85,19 @@ function normalizeBootstrapPayload(payload) {
86
85
  if (!payload) {
87
86
  return null;
88
87
  }
89
- const readmeUri = typeof payload.readmeUri === 'string' ? payload.readmeUri.trim() : '';
88
+ const readmeUri = typeof payload.readmeUri === "string" ? payload.readmeUri.trim() : "";
90
89
  if (!readmeUri) {
91
- (0, messages_1.printErrorWithHelp)('Bootstrap payload is missing a README URI.', ['Contact the platform team or try again shortly.'], { command: 'project init' });
90
+ (0, messages_1.printErrorWithHelp)("Bootstrap payload is missing a README URI.", ["Contact the platform team or try again shortly."], { command: "project init" });
92
91
  process.exitCode = 1;
93
92
  return null;
94
93
  }
95
- const agentsUri = typeof payload.agentsUri === 'string' ? payload.agentsUri.trim() : '';
94
+ const agentsUri = typeof payload.agentsUri === "string" ? payload.agentsUri.trim() : "";
96
95
  if (!agentsUri) {
97
- (0, messages_1.printErrorWithHelp)('Bootstrap payload is missing an AGENTS URI.', ['Contact the platform team or try again shortly.'], { command: 'project init' });
96
+ (0, messages_1.printErrorWithHelp)("Bootstrap payload is missing an AGENTS URI.", ["Contact the platform team or try again shortly."], { command: "project init" });
98
97
  process.exitCode = 1;
99
98
  return null;
100
99
  }
101
- const catalogueRaw = typeof payload.catalogue === 'string' && payload.catalogue.trim().length > 0
100
+ const catalogueRaw = typeof payload.catalogue === "string" && payload.catalogue.trim().length > 0
102
101
  ? payload.catalogue
103
102
  : DEFAULT_CATALOGUE;
104
103
  const catalogueCandidate = ensureTrailingNewline(catalogueRaw.trim() ? catalogueRaw : DEFAULT_CATALOGUE);
@@ -107,23 +106,23 @@ function normalizeBootstrapPayload(payload) {
107
106
  parsedCatalogue = JSON.parse(catalogueCandidate);
108
107
  }
109
108
  catch {
110
- (0, messages_1.printErrorWithHelp)('Bootstrap payload returned an invalid catalogue.json.', ['Contact the platform team or try again shortly.'], { command: 'project init' });
109
+ (0, messages_1.printErrorWithHelp)("Bootstrap payload returned an invalid catalogue.json.", ["Contact the platform team or try again shortly."], { command: "project init" });
111
110
  process.exitCode = 1;
112
111
  return null;
113
112
  }
114
- if (!parsedCatalogue || typeof parsedCatalogue !== 'object' || Array.isArray(parsedCatalogue)) {
115
- (0, messages_1.printErrorWithHelp)('Bootstrap payload returned an invalid catalogue.json.', ['Contact the platform team or try again shortly.'], { command: 'project init' });
113
+ if (!parsedCatalogue || typeof parsedCatalogue !== "object" || Array.isArray(parsedCatalogue)) {
114
+ (0, messages_1.printErrorWithHelp)("Bootstrap payload returned an invalid catalogue.json.", ["Contact the platform team or try again shortly."], { command: "project init" });
116
115
  process.exitCode = 1;
117
116
  return null;
118
117
  }
119
118
  if (Object.prototype.hasOwnProperty.call(parsedCatalogue, LEGACY_CATALOGUE_VERSION_KEY)) {
120
- (0, messages_1.printErrorWithHelp)('Bootstrap payload returned a legacy catalogue.json with a top-level version field.', ['Contact the platform team or try again shortly.'], { command: 'project init' });
119
+ (0, messages_1.printErrorWithHelp)("Bootstrap payload returned a legacy catalogue.json with a top-level version field.", ["Contact the platform team or try again shortly."], { command: "project init" });
121
120
  process.exitCode = 1;
122
121
  return null;
123
122
  }
124
123
  const unsupportedKey = Object.keys(parsedCatalogue).find((key) => !ALLOWED_CATALOGUE_TOP_LEVEL_KEYS.has(key));
125
124
  if (unsupportedKey) {
126
- (0, messages_1.printErrorWithHelp)(`Bootstrap payload returned catalogue.json with unsupported top-level key "${unsupportedKey}".`, ['Contact the platform team or try again shortly.'], { command: 'project init' });
125
+ (0, messages_1.printErrorWithHelp)(`Bootstrap payload returned catalogue.json with unsupported top-level key "${unsupportedKey}".`, ["Contact the platform team or try again shortly."], { command: "project init" });
127
126
  process.exitCode = 1;
128
127
  return null;
129
128
  }
@@ -133,8 +132,8 @@ function normalizeBootstrapPayload(payload) {
133
132
  async function downloadBootstrapAsset(webBase, uri, label) {
134
133
  if (!webBase) {
135
134
  (0, messages_1.printErrorWithHelp)(`Cannot download ${label} because the current environment is missing a web base URL.`, [
136
- 'Set PLAYDROP_WEB_BASE, PLAYDROP_WEB_BASE_DEV, or the appropriate environment override before running "playdrop project init".'
137
- ], { command: 'project init' });
135
+ 'Set PLAYDROP_WEB_BASE, PLAYDROP_WEB_BASE_DEV, or the appropriate environment override before running "playdrop project init".',
136
+ ], { command: "project init" });
138
137
  process.exitCode = 1;
139
138
  return null;
140
139
  }
@@ -145,12 +144,14 @@ async function downloadBootstrapAsset(webBase, uri, label) {
145
144
  }
146
145
  catch (error) {
147
146
  const message = error instanceof Error ? error.message : String(error);
148
- (0, messages_1.printErrorWithHelp)(`Failed to download ${label} from ${url}.`, [message], { command: 'project init' });
147
+ (0, messages_1.printErrorWithHelp)(`Failed to download ${label} from ${url}.`, [message], { command: "project init" });
149
148
  process.exitCode = 1;
150
149
  return null;
151
150
  }
152
151
  if (!response.ok) {
153
- (0, messages_1.printErrorWithHelp)(`Failed to download ${label} from ${url}.`, [`HTTP ${response.status} ${response.statusText}`], { command: 'project init' });
152
+ (0, messages_1.printErrorWithHelp)(`Failed to download ${label} from ${url}.`, [`HTTP ${response.status} ${response.statusText}`], {
153
+ command: "project init",
154
+ });
154
155
  process.exitCode = 1;
155
156
  return null;
156
157
  }
@@ -165,7 +166,7 @@ async function fetchBootstrap(base, token) {
165
166
  }
166
167
  catch (unknownError) {
167
168
  if (unknownError instanceof types_1.UnsupportedClientError) {
168
- (0, http_1.handleUnsupportedError)(unknownError, 'Project bootstrap');
169
+ (0, http_1.handleUnsupportedError)(unknownError, "Project bootstrap");
169
170
  return null;
170
171
  }
171
172
  if (unknownError instanceof http_1.CLIUnsupportedClientError) {
@@ -178,7 +179,7 @@ async function fetchBootstrap(base, token) {
178
179
  }
179
180
  }
180
181
  async function init(targetPath, options = {}) {
181
- const resolved = (0, node_path_1.resolve)(targetPath || '.');
182
+ const resolved = (0, node_path_1.resolve)(targetPath || ".");
182
183
  let stats = null;
183
184
  try {
184
185
  stats = (0, node_fs_1.statSync)(resolved);
@@ -188,15 +189,17 @@ async function init(targetPath, options = {}) {
188
189
  }
189
190
  if (stats && !stats.isDirectory()) {
190
191
  (0, messages_1.printErrorWithHelp)(`Cannot initialize a Playdrop project because ${resolved} is not a directory.`, [
191
- 'Choose a directory path (use "." for the current folder) or create the directory before running "playdrop project init".'
192
- ], { command: 'project init' });
192
+ 'Choose a directory path (use "." for the current folder) or create the directory before running "playdrop project init".',
193
+ ], { command: "project init" });
193
194
  process.exitCode = 1;
194
195
  return null;
195
196
  }
196
197
  (0, node_fs_1.mkdirSync)(resolved, { recursive: true });
197
- const cataloguePath = (0, node_path_1.join)(resolved, 'catalogue.json');
198
+ const cataloguePath = (0, node_path_1.join)(resolved, "catalogue.json");
198
199
  const catalogueExisted = (0, node_fs_1.existsSync)(cataloguePath);
199
- const ctx = await (0, commandContext_1.resolveAuthenticatedEnvironmentContext)('project init', 'Bootstrapping a Playdrop project', { workspacePath: resolved });
200
+ const ctx = await (0, commandContext_1.resolveAuthenticatedEnvironmentContext)("project init", "Bootstrapping a Playdrop project", {
201
+ workspacePath: resolved,
202
+ });
200
203
  if (!ctx) {
201
204
  return null;
202
205
  }
@@ -215,8 +218,8 @@ async function init(targetPath, options = {}) {
215
218
  if (!normalized) {
216
219
  return null;
217
220
  }
218
- const readmePath = (0, node_path_1.join)(resolved, 'README.md');
219
- const agentsPath = (0, node_path_1.join)(resolved, 'AGENTS.md');
221
+ const readmePath = (0, node_path_1.join)(resolved, "README.md");
222
+ const agentsPath = (0, node_path_1.join)(resolved, "AGENTS.md");
220
223
  const actions = [];
221
224
  const readmeExisted = (0, node_fs_1.existsSync)(readmePath);
222
225
  const agentsExisted = (0, node_fs_1.existsSync)(agentsPath);
@@ -233,7 +236,7 @@ async function init(targetPath, options = {}) {
233
236
  if (!username) {
234
237
  return null;
235
238
  }
236
- const readmeDownload = await downloadBootstrapAsset(envConfig.webBase, normalized.readmeUri, 'README.md');
239
+ const readmeDownload = await downloadBootstrapAsset(envConfig.webBase, normalized.readmeUri, "README.md");
237
240
  if (!readmeDownload) {
238
241
  return null;
239
242
  }
@@ -244,63 +247,63 @@ async function init(targetPath, options = {}) {
244
247
  date: new Date().toISOString().slice(0, 10),
245
248
  };
246
249
  const renderedReadme = ensureTrailingNewline(renderReadmeTemplate(readmeDownload, replacements));
247
- (0, node_fs_1.writeFileSync)(readmePath, renderedReadme, 'utf8');
248
- actions.push(readmeExisted ? 'Updated README.md' : 'Created README.md');
250
+ (0, node_fs_1.writeFileSync)(readmePath, renderedReadme, "utf8");
251
+ actions.push(readmeExisted ? "Updated README.md" : "Created README.md");
249
252
  if (agentsExisted) {
250
- actions.push('Skipped existing AGENTS.md');
253
+ actions.push("Skipped existing AGENTS.md");
251
254
  }
252
255
  else {
253
- const agentsDownload = await downloadBootstrapAsset(envConfig.webBase, normalized.agentsUri, 'AGENTS.md');
256
+ const agentsDownload = await downloadBootstrapAsset(envConfig.webBase, normalized.agentsUri, "AGENTS.md");
254
257
  if (!agentsDownload) {
255
258
  return null;
256
259
  }
257
- (0, node_fs_1.writeFileSync)(agentsPath, agentsDownload, 'utf8');
258
- actions.push('Created AGENTS.md');
260
+ (0, node_fs_1.writeFileSync)(agentsPath, agentsDownload, "utf8");
261
+ actions.push("Created AGENTS.md");
259
262
  }
260
263
  if (!catalogueExisted) {
261
- (0, node_fs_1.writeFileSync)(cataloguePath, normalized.catalogue, 'utf8');
262
- actions.push('Created catalogue.json');
264
+ (0, node_fs_1.writeFileSync)(cataloguePath, normalized.catalogue, "utf8");
265
+ actions.push("Created catalogue.json");
263
266
  }
264
267
  else {
265
- actions.push('Skipped existing catalogue.json');
268
+ actions.push("Skipped existing catalogue.json");
266
269
  }
267
- const label = (0, node_path_1.relative)(process.cwd(), resolved) || '.';
268
- const gitDirPath = (0, node_path_1.join)(resolved, '.git');
270
+ const label = (0, node_path_1.relative)(process.cwd(), resolved) || ".";
271
+ const gitDirPath = (0, node_path_1.join)(resolved, ".git");
269
272
  const hasGitRepo = (0, node_fs_1.existsSync)(gitDirPath);
270
- let gitStatus = 'skipped';
273
+ let gitStatus = "skipped";
271
274
  if (!hasGitRepo) {
272
275
  if (!options.quiet && node_process_1.stdin.isTTY && node_process_1.stdout.isTTY) {
273
276
  const consent = await promptGitInitialization(label);
274
277
  if (consent) {
275
278
  const success = runGitInit(resolved);
276
279
  if (success) {
277
- gitStatus = 'initialized';
278
- actions.push('Initialized git repository');
280
+ gitStatus = "initialized";
281
+ actions.push("Initialized git repository");
279
282
  }
280
283
  else {
281
- gitStatus = 'declined';
282
- actions.push('git init failed (install Git and retry)');
284
+ gitStatus = "declined";
285
+ actions.push("git init failed (install Git and retry)");
283
286
  process.exitCode = process.exitCode || 1;
284
287
  }
285
288
  }
286
289
  else {
287
- gitStatus = 'declined';
288
- actions.push('Skipped git init (declined)');
290
+ gitStatus = "declined";
291
+ actions.push("Skipped git init (declined)");
289
292
  }
290
293
  }
291
294
  else if (!options.quiet) {
292
- actions.push('Skipped git init (non-interactive)');
295
+ actions.push("Skipped git init (non-interactive)");
293
296
  }
294
297
  }
295
298
  else if (!options.quiet) {
296
- actions.push('Detected existing git repository');
299
+ actions.push("Detected existing git repository");
297
300
  }
298
301
  const summary = {
299
302
  directory: resolved,
300
303
  cataloguePath,
301
- readmeStatus: readmeExisted ? 'updated' : 'created',
302
- agentsStatus: agentsExisted ? 'skipped' : 'created',
303
- catalogueStatus: catalogueExisted ? 'skipped' : 'created',
304
+ readmeStatus: readmeExisted ? "updated" : "created",
305
+ agentsStatus: agentsExisted ? "skipped" : "created",
306
+ catalogueStatus: catalogueExisted ? "skipped" : "created",
304
307
  gitStatus,
305
308
  };
306
309
  if (!options.quiet) {
@@ -308,7 +311,7 @@ async function init(targetPath, options = {}) {
308
311
  for (const action of actions) {
309
312
  console.log(` - ${action}`);
310
313
  }
311
- console.log('\nNext steps:');
314
+ console.log("\nNext steps:");
312
315
  console.log(' - Run "playdrop project create app <app-name>" to scaffold your first app.');
313
316
  console.log(' - Use "playdrop project dev <app-name>" to preview locally.');
314
317
  console.log(' - Publish with "playdrop project publish ." when ready to share.');
@@ -1,5 +1,5 @@
1
- import { resetOpenBrowserForTests, setOpenBrowserForTests } from '../browser';
2
- export { resetOpenBrowserForTests, setOpenBrowserForTests, };
1
+ import { resetOpenBrowserForTests, setOpenBrowserForTests } from "../browser";
2
+ export { resetOpenBrowserForTests, setOpenBrowserForTests };
3
3
  type LoginOptions = {
4
4
  username?: string;
5
5
  password?: string;
@@ -18,42 +18,35 @@ function sleep(ms) {
18
18
  return new Promise((resolve) => setTimeout(resolve, ms));
19
19
  }
20
20
  function extractAccessToken(data) {
21
- return data.accessToken
22
- ?? (typeof data === 'object' && data !== null && 'token' in data ? data.token : undefined);
21
+ return (data.accessToken ?? (typeof data === "object" && data !== null && "token" in data ? data.token : undefined));
23
22
  }
24
23
  function isLoginResponse(data) {
25
- return typeof data === 'object' && data !== null && 'user' in data;
24
+ return typeof data === "object" && data !== null && "user" in data;
26
25
  }
27
26
  function buildCliLoginTokenName(machineHostname = (0, node_os_1.hostname)()) {
28
27
  const normalizedHostname = machineHostname.trim();
29
28
  if (!normalizedHostname) {
30
- throw new Error('cli_login_hostname_missing');
29
+ throw new Error("cli_login_hostname_missing");
31
30
  }
32
31
  return `CLI on ${normalizedHostname}`;
33
32
  }
34
33
  function storeLogin(env, data, options = {}) {
35
34
  const token = extractAccessToken(data);
36
35
  if (!token) {
37
- (0, messages_1.printErrorWithHelp)('Login succeeded but no access token was returned.', [
38
- 'Please try again in a moment.',
39
- 'If the issue persists, contact the Playdrop team.',
40
- ], { command: 'login' });
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" });
41
37
  process.exitCode = 1;
42
38
  return;
43
39
  }
44
- const username = typeof data.user?.username === 'string' ? data.user.username.trim() : '';
40
+ const username = typeof data.user?.username === "string" ? data.user.username.trim() : "";
45
41
  if (!username) {
46
- (0, messages_1.printErrorWithHelp)('Login succeeded but the account username was missing.', [
47
- 'Please try again in a moment.',
48
- 'If the issue persists, contact the Playdrop team.',
49
- ], { command: 'login' });
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" });
50
43
  process.exitCode = 1;
51
44
  return;
52
45
  }
53
46
  (0, config_1.saveAccountSession)({ username, env, token });
54
47
  if (options.json) {
55
48
  (0, output_1.printJson)({
56
- status: 'authenticated',
49
+ status: "authenticated",
57
50
  username,
58
51
  env,
59
52
  });
@@ -64,14 +57,12 @@ function storeLogin(env, data, options = {}) {
64
57
  }
65
58
  async function storeDeviceLogin(env, baseUrl, initialLogin, options = {}) {
66
59
  const sessionToken = extractAccessToken(initialLogin);
67
- const username = typeof initialLogin.user?.username === 'string'
68
- ? initialLogin.user.username.trim()
69
- : '';
60
+ const username = typeof initialLogin.user?.username === "string" ? initialLogin.user.username.trim() : "";
70
61
  if (!sessionToken) {
71
- throw new Error('Login response is missing the session token required to create this computer token.');
62
+ throw new Error("Login response is missing the session token required to create this computer token.");
72
63
  }
73
64
  if (!username) {
74
- throw new Error('Login response is missing the username required to save this computer token.');
65
+ throw new Error("Login response is missing the username required to save this computer token.");
75
66
  }
76
67
  try {
77
68
  const sessionClient = (0, apiClient_1.createCliApiClient)({ baseUrl, token: sessionToken });
@@ -85,16 +76,16 @@ async function storeDeviceLogin(env, baseUrl, initialLogin, options = {}) {
85
76
  }
86
77
  catch (unknownError) {
87
78
  if (unknownError instanceof types_1.UnsupportedClientError) {
88
- (0, http_1.handleUnsupportedError)(unknownError, 'Login');
79
+ (0, http_1.handleUnsupportedError)(unknownError, "Login");
89
80
  return;
90
81
  }
91
82
  if (unknownError instanceof types_1.ApiError) {
92
- const tokenLimitReached = unknownError.code === 'cli_api_token_limit_reached';
83
+ const tokenLimitReached = unknownError.code === "cli_api_token_limit_reached";
93
84
  (0, messages_1.printErrorWithHelp)(tokenLimitReached
94
- ? 'Login succeeded, but this account already has the maximum of 25 CLI tokens.'
85
+ ? "Login succeeded, but this account already has the maximum of 25 CLI tokens."
95
86
  : `Login succeeded, but this computer's CLI token could not be created (status ${unknownError.status}).`, tokenLimitReached
96
87
  ? ['Delete an unused CLI token in account settings, then rerun "playdrop auth login".']
97
- : ['Rerun "playdrop auth login" to try again.'], { command: 'login' });
88
+ : ['Rerun "playdrop auth login" to try again.'], { command: "login" });
98
89
  process.exitCode = 1;
99
90
  return;
100
91
  }
@@ -109,14 +100,14 @@ async function loginWithUsernamePassword(env, baseUrl, username, password, optio
109
100
  }
110
101
  catch (unknownError) {
111
102
  if (unknownError instanceof types_1.UnsupportedClientError) {
112
- (0, http_1.handleUnsupportedError)(unknownError, 'Login');
103
+ (0, http_1.handleUnsupportedError)(unknownError, "Login");
113
104
  return;
114
105
  }
115
106
  if (unknownError instanceof types_1.ApiError) {
116
107
  (0, messages_1.printErrorWithHelp)(`Login failed with status ${unknownError.status}.`, [
117
108
  'Verify your username and password, then rerun "playdrop auth login".',
118
109
  'Use "playdrop auth whoami" after logging in to confirm your status.',
119
- ], { command: 'login' });
110
+ ], { command: "login" });
120
111
  process.exitCode = 1;
121
112
  return;
122
113
  }
@@ -131,14 +122,14 @@ async function loginWithKey(env, baseUrl, apiKey, options = {}) {
131
122
  }
132
123
  catch (unknownError) {
133
124
  if (unknownError instanceof types_1.UnsupportedClientError) {
134
- (0, http_1.handleUnsupportedError)(unknownError, 'Login');
125
+ (0, http_1.handleUnsupportedError)(unknownError, "Login");
135
126
  return;
136
127
  }
137
128
  if (unknownError instanceof types_1.ApiError) {
138
129
  (0, messages_1.printErrorWithHelp)(`Login failed with status ${unknownError.status}.`, [
139
130
  'Verify your API key, then rerun "playdrop auth login --key <api-key>".',
140
131
  'Use "playdrop auth whoami" after logging in to confirm your status.',
141
- ], { command: 'login' });
132
+ ], { command: "login" });
142
133
  process.exitCode = 1;
143
134
  return;
144
135
  }
@@ -153,14 +144,14 @@ async function loginWithHandoff(env, baseUrl, handoffToken, options = {}) {
153
144
  }
154
145
  catch (unknownError) {
155
146
  if (unknownError instanceof types_1.UnsupportedClientError) {
156
- (0, http_1.handleUnsupportedError)(unknownError, 'Login');
147
+ (0, http_1.handleUnsupportedError)(unknownError, "Login");
157
148
  return;
158
149
  }
159
150
  if (unknownError instanceof types_1.ApiError) {
160
151
  (0, messages_1.printErrorWithHelp)(`Login handoff failed with status ${unknownError.status}.`, [
161
- 'Request a fresh handoff token from the PlayDrop app and retry.',
152
+ "Request a fresh handoff token from the PlayDrop app and retry.",
162
153
  'Use "playdrop auth whoami" after logging in to confirm your status.',
163
- ], { command: 'login' });
154
+ ], { command: "login" });
164
155
  process.exitCode = 1;
165
156
  return;
166
157
  }
@@ -175,14 +166,11 @@ async function loginInBrowser(env, baseUrl, options = {}) {
175
166
  }
176
167
  catch (unknownError) {
177
168
  if (unknownError instanceof types_1.UnsupportedClientError) {
178
- (0, http_1.handleUnsupportedError)(unknownError, 'Login');
169
+ (0, http_1.handleUnsupportedError)(unknownError, "Login");
179
170
  return;
180
171
  }
181
172
  if (unknownError instanceof types_1.ApiError) {
182
- (0, messages_1.printErrorWithHelp)(`Could not start browser login (status ${unknownError.status}).`, [
183
- 'Try again in a moment.',
184
- 'If the problem continues, contact the Playdrop team.',
185
- ], { command: 'login' });
173
+ (0, messages_1.printErrorWithHelp)(`Could not start browser login (status ${unknownError.status}).`, ["Try again in a moment.", "If the problem continues, contact the Playdrop team."], { command: "login" });
186
174
  process.exitCode = 1;
187
175
  return;
188
176
  }
@@ -191,15 +179,13 @@ async function loginInBrowser(env, baseUrl, options = {}) {
191
179
  console.log(`Open this URL to continue: ${flow.loginUrl}`);
192
180
  const opened = await (0, browser_1.openBrowserUrl)(flow.loginUrl).catch(() => false);
193
181
  if (opened) {
194
- console.log('Opened the login page in your browser.');
182
+ console.log("Opened the login page in your browser.");
195
183
  }
196
184
  else {
197
- console.log('Open the URL above in your browser to continue.');
185
+ console.log("Open the URL above in your browser to continue.");
198
186
  }
199
187
  const expiresAtMs = Date.parse(flow.expiresAt);
200
- const deadlineMs = Number.isFinite(expiresAtMs)
201
- ? expiresAtMs
202
- : Date.now() + 10 * 60 * 1000;
188
+ const deadlineMs = Number.isFinite(expiresAtMs) ? expiresAtMs : Date.now() + 10 * 60 * 1000;
203
189
  const intervalMs = Math.max(250, Number(flow.pollIntervalMs) || 1000);
204
190
  while (Date.now() < deadlineMs) {
205
191
  try {
@@ -216,41 +202,35 @@ async function loginInBrowser(env, baseUrl, options = {}) {
216
202
  }
217
203
  catch (unknownError) {
218
204
  if (unknownError instanceof types_1.UnsupportedClientError) {
219
- (0, http_1.handleUnsupportedError)(unknownError, 'Login');
205
+ (0, http_1.handleUnsupportedError)(unknownError, "Login");
220
206
  return;
221
207
  }
222
208
  if (unknownError instanceof types_1.ApiError) {
223
- if (unknownError.status === 410 || unknownError.code === 'cli_login_expired') {
224
- (0, messages_1.printErrorWithHelp)('Browser login expired before it was approved.', [
225
- 'Rerun "playdrop auth login" to start a new browser login request.',
226
- ], { command: 'login' });
209
+ if (unknownError.status === 410 || unknownError.code === "cli_login_expired") {
210
+ (0, messages_1.printErrorWithHelp)("Browser login expired before it was approved.", ['Rerun "playdrop auth login" to start a new browser login request.'], { command: "login" });
227
211
  process.exitCode = 1;
228
212
  return;
229
213
  }
230
- (0, messages_1.printErrorWithHelp)(`Browser login failed with status ${unknownError.status}.`, [
231
- 'Rerun "playdrop auth login" to try again.',
232
- ], { command: 'login' });
214
+ (0, messages_1.printErrorWithHelp)(`Browser login failed with status ${unknownError.status}.`, ['Rerun "playdrop auth login" to try again.'], { command: "login" });
233
215
  process.exitCode = 1;
234
216
  return;
235
217
  }
236
218
  throw unknownError;
237
219
  }
238
220
  }
239
- (0, messages_1.printErrorWithHelp)('Browser login timed out after 10 minutes.', [
240
- 'Rerun "playdrop auth login" to start a new browser login request.',
241
- ], { command: 'login' });
221
+ (0, messages_1.printErrorWithHelp)("Browser login timed out after 10 minutes.", ['Rerun "playdrop auth login" to start a new browser login request.'], { command: "login" });
242
222
  process.exitCode = 1;
243
223
  }
244
224
  async function login(env, options = {}) {
245
225
  const envConfig = (0, environment_1.resolveEnvironmentConfig)(env);
246
226
  if (!envConfig) {
247
227
  const choices = (0, environment_1.formatEnvironmentList)();
248
- (0, messages_1.printUnknownEnvironment)(env, choices, 'login');
228
+ (0, messages_1.printUnknownEnvironment)(env, choices, "login");
249
229
  process.exitCode = 1;
250
230
  return;
251
231
  }
252
232
  if (envConfig.allowInsecureRequests) {
253
- process.env.NODE_TLS_REJECT_UNAUTHORIZED = '0';
233
+ process.env.NODE_TLS_REJECT_UNAUTHORIZED = "0";
254
234
  }
255
235
  const username = options.username?.trim();
256
236
  const password = options.password;
@@ -260,17 +240,17 @@ async function login(env, options = {}) {
260
240
  const hasHandoffTokenArgument = options.handoffToken !== undefined;
261
241
  const hasDirectCredentials = Boolean(username || password);
262
242
  const explicitLoginMethods = [
263
- hasApiKeyArgument ? 'key' : null,
264
- hasDirectCredentials ? 'credentials' : null,
265
- hasHandoffTokenArgument ? 'handoff' : null,
243
+ hasApiKeyArgument ? "key" : null,
244
+ hasDirectCredentials ? "credentials" : null,
245
+ hasHandoffTokenArgument ? "handoff" : null,
266
246
  ].filter(Boolean);
267
247
  if (explicitLoginMethods.length > 1) {
268
- (0, messages_1.printErrorWithHelp)('Choose exactly one login method.', [
248
+ (0, messages_1.printErrorWithHelp)("Choose exactly one login method.", [
269
249
  'Use "playdrop auth login" for browser login.',
270
250
  'Use "--username" with "--password" for direct login.',
271
251
  'Use "--key" by itself for API key login.',
272
252
  'Use "--handoff-token" by itself for native app handoff login.',
273
- ], { command: 'login' });
253
+ ], { command: "login" });
274
254
  process.exitCode = 1;
275
255
  return;
276
256
  }
@@ -278,17 +258,17 @@ async function login(env, options = {}) {
278
258
  (0, messages_1.printErrorWithHelp)('Provide both "--username" and "--password" together.', [
279
259
  'Rerun "playdrop auth login --username <username> --password <password>".',
280
260
  'Or run "playdrop auth login" to use browser login instead.',
281
- ], { command: 'login' });
261
+ ], { command: "login" });
282
262
  process.exitCode = 1;
283
263
  return;
284
264
  }
285
265
  if (hasApiKeyArgument && !apiKey) {
286
- (0, messages_1.printErrorWithHelp)('The API key cannot be empty.', ['Provide a non-empty value to "--key".'], { command: 'login' });
266
+ (0, messages_1.printErrorWithHelp)("The API key cannot be empty.", ['Provide a non-empty value to "--key".'], { command: "login" });
287
267
  process.exitCode = 1;
288
268
  return;
289
269
  }
290
270
  if (hasHandoffTokenArgument && !argvHandoffToken) {
291
- (0, messages_1.printErrorWithHelp)('The native app handoff token cannot be empty.', ['Request a fresh handoff token from the PlayDrop app and retry.'], { command: 'login' });
271
+ (0, messages_1.printErrorWithHelp)("The native app handoff token cannot be empty.", ["Request a fresh handoff token from the PlayDrop app and retry."], { command: "login" });
292
272
  process.exitCode = 1;
293
273
  return;
294
274
  }
@@ -311,7 +291,7 @@ async function login(env, options = {}) {
311
291
  if (error instanceof http_1.CLIUnsupportedClientError) {
312
292
  return;
313
293
  }
314
- (0, messages_1.printNetworkIssue)('Could not reach the Playdrop API to log in.', 'login');
294
+ (0, messages_1.printNetworkIssue)("Could not reach the Playdrop API to log in.", "login");
315
295
  process.exitCode = 1;
316
296
  }
317
297
  }
@@ -4,8 +4,8 @@ exports.logout = logout;
4
4
  const config_1 = require("../config");
5
5
  function logout(options = {}) {
6
6
  const current = (0, config_1.getCurrentAccountSession)();
7
- const username = options.username?.trim() || current?.username || '';
8
- const env = options.env?.trim() || current?.env || '';
7
+ const username = options.username?.trim() || current?.username || "";
8
+ const env = options.env?.trim() || current?.env || "";
9
9
  const existingSession = username ? (0, config_1.findAccountSession)(username, env || undefined) : null;
10
10
  if (!existingSession) {
11
11
  if (username && env) {
@@ -15,7 +15,7 @@ function logout(options = {}) {
15
15
  console.log(`No stored session found for ${username}.`);
16
16
  }
17
17
  else {
18
- console.log('No stored session found.');
18
+ console.log("No stored session found.");
19
19
  }
20
20
  console.log('Next: run "playdrop auth login" when you need a new session.');
21
21
  return;
@@ -25,7 +25,7 @@ function logout(options = {}) {
25
25
  console.log(`Logged out ${username} on ${env}.`);
26
26
  }
27
27
  else {
28
- console.log('Logged out.');
28
+ console.log("Logged out.");
29
29
  }
30
30
  console.log('Next: run "playdrop auth login" when you need a new session.');
31
31
  }