allyhub 0.9.0 → 0.11.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 (582) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/dist/commands/auth.js +4 -4
  3. package/dist/commands/cloud-tools.js +11 -11
  4. package/dist/commands/dev.js +2 -2
  5. package/dist/commands/frames/compare.js +2 -2
  6. package/dist/commands/frames/piece.js +1 -1
  7. package/dist/commands/frames/report.js +2 -0
  8. package/dist/commands/frames.js +11 -9
  9. package/dist/commands/index.js +1 -1
  10. package/dist/commands/inspect/common.js +4 -2
  11. package/dist/commands/inspect/facts.js +3 -3
  12. package/dist/commands/inspect/layout.js +1 -1
  13. package/dist/commands/orgs.js +2 -2
  14. package/dist/commands/render.js +2 -2
  15. package/dist/help.js +4 -4
  16. package/dist/main.js +8 -7
  17. package/dist/node_modules/@allyhub/3d-extension/dist/stage-routes.js +1 -1
  18. package/dist/node_modules/@allyhub/3d-extension/package.json +34 -2
  19. package/dist/node_modules/@allyhub/audio/package.json +1 -1
  20. package/dist/node_modules/@allyhub/browser/dist/emoji.d.ts +29 -0
  21. package/dist/node_modules/@allyhub/browser/dist/emoji.js +57 -0
  22. package/dist/node_modules/@allyhub/browser/dist/picture.d.ts +18 -0
  23. package/dist/node_modules/@allyhub/browser/dist/picture.js +2 -0
  24. package/dist/node_modules/@allyhub/browser/package.json +9 -1
  25. package/dist/node_modules/@allyhub/build/dist/index.d.ts +1 -0
  26. package/dist/node_modules/@allyhub/build/dist/index.js +1 -1
  27. package/dist/node_modules/@allyhub/build/dist/kind-build.d.ts +7 -0
  28. package/dist/node_modules/@allyhub/build/dist/made-notes.d.ts +9 -0
  29. package/dist/node_modules/@allyhub/build/dist/made-notes.js +2 -0
  30. package/dist/node_modules/@allyhub/build/dist/project-tool.d.ts +17 -0
  31. package/dist/node_modules/@allyhub/build/dist/stage-route.d.ts +7 -0
  32. package/dist/node_modules/@allyhub/build/package.json +1 -1
  33. package/dist/node_modules/@allyhub/canvas-extension/package.json +2 -1
  34. package/dist/node_modules/@allyhub/canvas-extension/skills/allyhub/references/canvas.md +4 -24
  35. package/dist/node_modules/@allyhub/canvas-model/package.json +1 -1
  36. package/dist/node_modules/@allyhub/chart/dist/chart-xml.js +2 -2
  37. package/dist/node_modules/@allyhub/chart/dist/chart.js +1 -1
  38. package/dist/node_modules/@allyhub/chart/package.json +1 -1
  39. package/dist/node_modules/@allyhub/check/package.json +1 -1
  40. package/dist/node_modules/@allyhub/cloud/dist/client.d.ts +10 -0
  41. package/dist/node_modules/@allyhub/cloud/dist/client.js +1 -1
  42. package/dist/node_modules/@allyhub/cloud/dist/config.d.ts +9 -0
  43. package/dist/node_modules/@allyhub/cloud/dist/config.js +1 -1
  44. package/dist/node_modules/@allyhub/cloud/dist/credentials.d.ts +4 -4
  45. package/dist/node_modules/@allyhub/cloud/dist/credentials.js +2 -2
  46. package/dist/node_modules/@allyhub/cloud/dist/device.d.ts +12 -0
  47. package/dist/node_modules/@allyhub/cloud/dist/device.js +2 -0
  48. package/dist/node_modules/@allyhub/cloud/package.json +1 -1
  49. package/dist/node_modules/@allyhub/components/package.json +1 -1
  50. package/dist/node_modules/@allyhub/components/r/callout.json +1 -1
  51. package/dist/node_modules/@allyhub/components/src/callout.ts +98 -13
  52. package/dist/node_modules/@allyhub/dev-server/dist/exports.js +1 -1
  53. package/dist/node_modules/@allyhub/dev-server/dist/index.js +1 -1
  54. package/dist/node_modules/@allyhub/dev-server/dist/inputs.js +2 -0
  55. package/dist/node_modules/@allyhub/dev-server/dist/live.js +1 -1
  56. package/dist/node_modules/@allyhub/dev-server/dist/pages.js +2 -0
  57. package/dist/node_modules/@allyhub/dev-server/dist/ports.js +2 -0
  58. package/dist/node_modules/@allyhub/dev-server/dist/project.js +1 -1
  59. package/dist/node_modules/@allyhub/dev-server/dist/record.js +1 -1
  60. package/dist/node_modules/@allyhub/dev-server/dist/respond.js +2 -0
  61. package/dist/node_modules/@allyhub/dev-server/dist/reveal.js +1 -1
  62. package/dist/node_modules/@allyhub/dev-server/dist/routes.js +1 -1
  63. package/dist/node_modules/@allyhub/dev-server/dist/server.js +2 -2
  64. package/dist/node_modules/@allyhub/dev-server/dist/tools.js +1 -1
  65. package/dist/node_modules/@allyhub/dev-server/dist/watcher.js +1 -1
  66. package/dist/node_modules/@allyhub/dev-server/package.json +1 -1
  67. package/dist/node_modules/@allyhub/diagnostics/dist/problem.d.ts +7 -0
  68. package/dist/node_modules/@allyhub/diagnostics/package.json +1 -1
  69. package/dist/node_modules/@allyhub/doc/dist/captions.js +1 -1
  70. package/dist/node_modules/@allyhub/doc/dist/docx.js +4 -4
  71. package/dist/node_modules/@allyhub/doc/dist/html.js +51 -92
  72. package/dist/node_modules/@allyhub/doc/dist/model.js +1 -1
  73. package/dist/node_modules/@allyhub/doc/dist/page.js +1 -1
  74. package/dist/node_modules/@allyhub/doc/dist/paper.js +1 -1
  75. package/dist/node_modules/@allyhub/doc/dist/table.js +1 -1
  76. package/dist/node_modules/@allyhub/doc/dist/write.js +22 -22
  77. package/dist/node_modules/@allyhub/doc/package.json +1 -1
  78. package/dist/node_modules/@allyhub/doc-extension/dist/export.js +1 -1
  79. package/dist/node_modules/@allyhub/doc-extension/package.json +19 -6
  80. package/dist/node_modules/@allyhub/doc-print/dist/pages.js +5 -5
  81. package/dist/node_modules/@allyhub/doc-print/dist/print.js +10 -10
  82. package/dist/node_modules/@allyhub/doc-print/package.json +1 -1
  83. package/dist/node_modules/@allyhub/export/dist/export.js +1 -1
  84. package/dist/node_modules/@allyhub/export/package.json +1 -1
  85. package/dist/node_modules/@allyhub/extension-api/package.json +1 -1
  86. package/dist/node_modules/@allyhub/extension-host/dist/points.js +1 -1
  87. package/dist/node_modules/@allyhub/extension-host/package.json +1 -1
  88. package/dist/node_modules/@allyhub/formats/dist/data/faces.d.ts +1 -1
  89. package/dist/node_modules/@allyhub/formats/dist/data/sheet.d.ts +87 -1
  90. package/dist/node_modules/@allyhub/formats/dist/data/sheet.js +1 -1
  91. package/dist/node_modules/@allyhub/formats/dist/data/slides.d.ts +89 -0
  92. package/dist/node_modules/@allyhub/formats/dist/data/slides.js +1 -1
  93. package/dist/node_modules/@allyhub/formats/dist/note-shape.d.ts +20 -0
  94. package/dist/node_modules/@allyhub/formats/dist/note-shape.js +1 -1
  95. package/dist/node_modules/@allyhub/formats/dist/schemas.d.ts +50 -0
  96. package/dist/node_modules/@allyhub/formats/package.json +1 -1
  97. package/dist/node_modules/@allyhub/i18n/package.json +1 -1
  98. package/dist/node_modules/@allyhub/image-draw/package.json +1 -1
  99. package/dist/node_modules/@allyhub/image-extension/dist/export.js +4 -1
  100. package/dist/node_modules/@allyhub/image-extension/package.json +16 -6
  101. package/dist/node_modules/@allyhub/image-extension/skills/allyhub/references/images.md +7 -39
  102. package/dist/node_modules/@allyhub/image-measure/package.json +1 -1
  103. package/dist/node_modules/@allyhub/image-psd/package.json +1 -1
  104. package/dist/node_modules/@allyhub/image-render/package.json +1 -1
  105. package/dist/node_modules/@allyhub/image-runtime/package.json +1 -1
  106. package/dist/node_modules/@allyhub/image-sdk/package.json +1 -1
  107. package/dist/node_modules/@allyhub/jobs/package.json +1 -1
  108. package/dist/node_modules/@allyhub/linkedin-extension/LICENSE +241 -0
  109. package/dist/node_modules/@allyhub/linkedin-extension/dist/article-build.js +2 -0
  110. package/dist/node_modules/@allyhub/linkedin-extension/dist/article-kind.js +2 -0
  111. package/dist/node_modules/@allyhub/linkedin-extension/dist/build-plugins.js +2 -0
  112. package/dist/node_modules/@allyhub/linkedin-extension/dist/build.js +5 -0
  113. package/dist/node_modules/@allyhub/linkedin-extension/dist/media.js +2 -0
  114. package/dist/node_modules/@allyhub/linkedin-extension/dist/stage-module.js +82 -0
  115. package/dist/node_modules/@allyhub/linkedin-extension/dist/stage.js +2 -0
  116. package/dist/node_modules/@allyhub/linkedin-extension/dist/workspace.js +2 -0
  117. package/dist/node_modules/@allyhub/linkedin-extension/package.json +287 -0
  118. package/dist/node_modules/@allyhub/linkedin-extension/skills/allyhub/references/linkedin.md +12 -0
  119. package/dist/node_modules/@allyhub/linkedin-model/LICENSE +241 -0
  120. package/dist/node_modules/@allyhub/linkedin-model/dist/article-check.js +5 -0
  121. package/dist/node_modules/@allyhub/linkedin-model/dist/article.js +3 -0
  122. package/dist/node_modules/@allyhub/linkedin-model/dist/check.js +2 -0
  123. package/dist/node_modules/@allyhub/linkedin-model/dist/count.js +3 -0
  124. package/dist/node_modules/@allyhub/linkedin-model/dist/edit.js +3 -0
  125. package/dist/node_modules/@allyhub/linkedin-model/dist/html.js +19 -0
  126. package/dist/node_modules/@allyhub/linkedin-model/dist/index.js +2 -0
  127. package/dist/node_modules/@allyhub/linkedin-model/dist/limits.js +2 -0
  128. package/dist/node_modules/@allyhub/linkedin-model/dist/little.js +2 -0
  129. package/dist/node_modules/@allyhub/linkedin-model/dist/post.js +2 -0
  130. package/dist/node_modules/@allyhub/linkedin-model/dist/requests.js +2 -0
  131. package/dist/node_modules/@allyhub/linkedin-model/package.json +14 -0
  132. package/dist/node_modules/@allyhub/linkedin-view/LICENSE +241 -0
  133. package/dist/node_modules/@allyhub/linkedin-view/dist/article.js +2 -0
  134. package/dist/node_modules/@allyhub/linkedin-view/dist/fold.js +3 -0
  135. package/dist/node_modules/@allyhub/linkedin-view/dist/index.js +2 -0
  136. package/dist/node_modules/@allyhub/linkedin-view/dist/post.js +2 -0
  137. package/dist/node_modules/@allyhub/linkedin-view/dist/stage.js +2 -0
  138. package/dist/node_modules/@allyhub/linkedin-view/dist/text.js +2 -0
  139. package/dist/node_modules/@allyhub/linkedin-view/package.json +21 -0
  140. package/dist/node_modules/@allyhub/linkedin-view/src/style.css +600 -0
  141. package/dist/node_modules/@allyhub/measure/package.json +1 -1
  142. package/dist/node_modules/@allyhub/media/package.json +1 -1
  143. package/dist/node_modules/@allyhub/media-extension/dist/vision/faces.js +1 -1
  144. package/dist/node_modules/@allyhub/media-extension/package.json +7 -4
  145. package/dist/node_modules/@allyhub/model/package.json +1 -1
  146. package/dist/node_modules/@allyhub/ooxml/dist/geometry/index.js +1 -1
  147. package/dist/node_modules/@allyhub/ooxml/package.json +1 -1
  148. package/dist/node_modules/@allyhub/piece/dist/layer.d.ts +2 -0
  149. package/dist/node_modules/@allyhub/piece/dist/layout.d.ts +16 -0
  150. package/dist/node_modules/@allyhub/piece/dist/page/index.d.ts +1 -1
  151. package/dist/node_modules/@allyhub/piece/dist/page/index.js +1 -1
  152. package/dist/node_modules/@allyhub/piece/dist/page/locate.d.ts +14 -1
  153. package/dist/node_modules/@allyhub/piece/dist/page/locate.js +1 -1
  154. package/dist/node_modules/@allyhub/piece/dist/stage.d.ts +18 -0
  155. package/dist/node_modules/@allyhub/piece/package.json +1 -1
  156. package/dist/node_modules/@allyhub/project/dist/version.js +1 -1
  157. package/dist/node_modules/@allyhub/project/package.json +1 -1
  158. package/dist/node_modules/@allyhub/protocol/dist/account.d.ts +140 -0
  159. package/dist/node_modules/@allyhub/protocol/dist/account.js +1 -1
  160. package/dist/node_modules/@allyhub/protocol/dist/auth.d.ts +19 -1
  161. package/dist/node_modules/@allyhub/protocol/dist/auth.js +1 -1
  162. package/dist/node_modules/@allyhub/protocol/dist/cloud.d.ts +157 -0
  163. package/dist/node_modules/@allyhub/protocol/dist/cloud.js +1 -1
  164. package/dist/node_modules/@allyhub/protocol/dist/editor.d.ts +10 -2
  165. package/dist/node_modules/@allyhub/protocol/dist/editor.js +1 -1
  166. package/dist/node_modules/@allyhub/protocol/dist/frame.d.ts +101 -186
  167. package/dist/node_modules/@allyhub/protocol/dist/frame.js +1 -1
  168. package/dist/node_modules/@allyhub/protocol/dist/mail.d.ts +1 -0
  169. package/dist/node_modules/@allyhub/protocol/dist/mail.js +1 -1
  170. package/dist/node_modules/@allyhub/protocol/dist/notes.d.ts +92 -94
  171. package/dist/node_modules/@allyhub/protocol/dist/notes.js +1 -1
  172. package/dist/node_modules/@allyhub/protocol/dist/snapshots.d.ts +17 -0
  173. package/dist/node_modules/@allyhub/protocol/dist/snapshots.js +1 -1
  174. package/dist/node_modules/@allyhub/protocol/dist/teams.d.ts +7 -0
  175. package/dist/node_modules/@allyhub/protocol/dist/teams.js +1 -1
  176. package/dist/node_modules/@allyhub/protocol/dist/tools.d.ts +15 -3
  177. package/dist/node_modules/@allyhub/protocol/dist/tools.js +1 -1
  178. package/dist/node_modules/@allyhub/protocol/package.json +1 -1
  179. package/dist/node_modules/@allyhub/registry/package.json +1 -1
  180. package/dist/node_modules/@allyhub/render/dist/encode.js +1 -1
  181. package/dist/node_modules/@allyhub/render/dist/index.js +1 -1
  182. package/dist/node_modules/@allyhub/render/dist/look.js +1 -1
  183. package/dist/node_modules/@allyhub/render/dist/render.js +2 -2
  184. package/dist/node_modules/@allyhub/render/package.json +1 -1
  185. package/dist/node_modules/@allyhub/report-extension/LICENSE +241 -0
  186. package/dist/node_modules/@allyhub/report-extension/dist/build.js +2 -0
  187. package/dist/node_modules/@allyhub/report-extension/dist/check.js +3 -0
  188. package/dist/node_modules/@allyhub/report-extension/dist/cli/find.js +2 -0
  189. package/dist/node_modules/@allyhub/report-extension/dist/cli/index.js +5 -0
  190. package/dist/node_modules/@allyhub/report-extension/dist/cli/picture.js +2 -0
  191. package/dist/node_modules/@allyhub/report-extension/dist/export.js +2 -0
  192. package/dist/node_modules/@allyhub/report-extension/dist/inline.js +58 -0
  193. package/dist/node_modules/@allyhub/report-extension/dist/page.js +21 -0
  194. package/dist/node_modules/@allyhub/report-extension/dist/project-tools.js +21 -0
  195. package/dist/node_modules/@allyhub/report-extension/dist/styles.js +5 -0
  196. package/dist/node_modules/@allyhub/report-extension/dist/theme.js +2 -0
  197. package/dist/node_modules/@allyhub/report-extension/dist/tools.js +2 -0
  198. package/dist/node_modules/@allyhub/report-extension/dist/workspace.js +2 -0
  199. package/dist/node_modules/@allyhub/report-extension/package.json +182 -0
  200. package/dist/node_modules/@allyhub/report-extension/styles/allyhub/STYLE.md +132 -0
  201. package/dist/node_modules/@allyhub/report-extension/styles/allyhub/style.css +105 -0
  202. package/dist/node_modules/@allyhub/report-extension/styles/allyhub/style.json +17 -0
  203. package/dist/node_modules/@allyhub/report-extension/styles/allyhub/tokens.js +38 -0
  204. package/dist/node_modules/@allyhub/runtime/dist/compose.js +1 -1
  205. package/dist/node_modules/@allyhub/runtime/dist/embed.js +1 -1
  206. package/dist/node_modules/@allyhub/runtime/dist/player/clips.js +1 -1
  207. package/dist/node_modules/@allyhub/runtime/dist/player/player.js +1 -1
  208. package/dist/node_modules/@allyhub/runtime/package.json +1 -1
  209. package/dist/node_modules/@allyhub/runtimes/package.json +1 -1
  210. package/dist/node_modules/@allyhub/scaffold/package.json +1 -1
  211. package/dist/node_modules/@allyhub/scenery/dist/index.d.ts +2 -2
  212. package/dist/node_modules/@allyhub/scenery/dist/index.js +1 -1
  213. package/dist/node_modules/@allyhub/scenery/dist/moire.d.ts +45 -5
  214. package/dist/node_modules/@allyhub/scenery/dist/moire.js +2 -2
  215. package/dist/node_modules/@allyhub/scenery/dist/phone.d.ts +4 -3
  216. package/dist/node_modules/@allyhub/scenery/dist/phone.js +1 -1
  217. package/dist/node_modules/@allyhub/scenery/package.json +1 -1
  218. package/dist/node_modules/@allyhub/scenery-host/dist/layer/grade.d.ts +7 -0
  219. package/dist/node_modules/@allyhub/scenery-host/dist/layer/grade.js +2 -0
  220. package/dist/node_modules/@allyhub/scenery-host/dist/layer/index.d.ts +4 -3
  221. package/dist/node_modules/@allyhub/scenery-host/dist/layer/index.js +1 -1
  222. package/dist/node_modules/@allyhub/scenery-host/dist/layer/screens.d.ts +1 -1
  223. package/dist/node_modules/@allyhub/scenery-host/dist/layer/screens.js +1 -1
  224. package/dist/node_modules/@allyhub/scenery-host/dist/measure/facts.js +1 -1
  225. package/dist/node_modules/@allyhub/scenery-host/dist/page/screens.d.ts +8 -0
  226. package/dist/node_modules/@allyhub/scenery-host/dist/page/screens.js +1 -1
  227. package/dist/node_modules/@allyhub/scenery-host/dist/viewer.d.ts +6 -0
  228. package/dist/node_modules/@allyhub/scenery-host/dist/viewer.js +1 -1
  229. package/dist/node_modules/@allyhub/scenery-host/package.json +1 -1
  230. package/dist/node_modules/@allyhub/sheet/dist/calc/coerce.js +1 -1
  231. package/dist/node_modules/@allyhub/sheet/dist/calc/engine.js +1 -1
  232. package/dist/node_modules/@allyhub/sheet/dist/calc/functions/criteria.js +1 -1
  233. package/dist/node_modules/@allyhub/sheet/dist/calc/functions/date.js +1 -1
  234. package/dist/node_modules/@allyhub/sheet/dist/calc/functions/define.js +1 -1
  235. package/dist/node_modules/@allyhub/sheet/dist/calc/functions/info.js +1 -1
  236. package/dist/node_modules/@allyhub/sheet/dist/calc/functions/kernels.js +1 -1
  237. package/dist/node_modules/@allyhub/sheet/dist/calc/functions/lookup.js +1 -1
  238. package/dist/node_modules/@allyhub/sheet/dist/calc/functions/maths.js +1 -1
  239. package/dist/node_modules/@allyhub/sheet/dist/calc/functions/text.js +1 -1
  240. package/dist/node_modules/@allyhub/sheet/dist/calc/indexes.js +1 -1
  241. package/dist/node_modules/@allyhub/sheet/dist/calc/types.js +1 -1
  242. package/dist/node_modules/@allyhub/sheet/dist/chart.js +1 -1
  243. package/dist/node_modules/@allyhub/sheet/dist/export.js +2 -4
  244. package/dist/node_modules/@allyhub/sheet/dist/formula/move.js +1 -1
  245. package/dist/node_modules/@allyhub/sheet/dist/formula/parse.js +1 -1
  246. package/dist/node_modules/@allyhub/sheet/dist/formula/print.js +1 -1
  247. package/dist/node_modules/@allyhub/sheet/dist/index.js +1 -1
  248. package/dist/node_modules/@allyhub/sheet/dist/inspect.js +1 -1
  249. package/dist/node_modules/@allyhub/sheet/dist/printed.js +2 -0
  250. package/dist/node_modules/@allyhub/sheet/dist/values.js +1 -1
  251. package/dist/node_modules/@allyhub/sheet/dist/workbook.js +1 -1
  252. package/dist/node_modules/@allyhub/sheet/dist/write.js +15 -15
  253. package/dist/node_modules/@allyhub/sheet/dist/xlsx/charts.js +1 -1
  254. package/dist/node_modules/@allyhub/sheet/dist/xlsx/formula.js +2 -2
  255. package/dist/node_modules/@allyhub/sheet/dist/xlsx/import.js +1 -1
  256. package/dist/node_modules/@allyhub/sheet/dist/xlsx/read.js +2 -2
  257. package/dist/node_modules/@allyhub/sheet/dist/xlsx/sax.js +3 -1
  258. package/dist/node_modules/@allyhub/sheet/dist/xlsx/styles.js +1 -1
  259. package/dist/node_modules/@allyhub/sheet/dist/xlsx/write.js +1 -1
  260. package/dist/node_modules/@allyhub/sheet/dist/xlsx/xml.js +3 -2
  261. package/dist/node_modules/@allyhub/sheet/package.json +1 -1
  262. package/dist/node_modules/@allyhub/sheet-extension/dist/export.js +2 -6
  263. package/dist/node_modules/@allyhub/sheet-extension/package.json +24 -9
  264. package/dist/node_modules/@allyhub/slides-core/dist/api.js +2 -2
  265. package/dist/node_modules/@allyhub/slides-core/dist/capabilities.js +1 -1
  266. package/dist/node_modules/@allyhub/slides-core/dist/enums.js +1 -1
  267. package/dist/node_modules/@allyhub/slides-core/dist/measure.js +1 -1
  268. package/dist/node_modules/@allyhub/slides-core/dist/resolve.js +1 -1
  269. package/dist/node_modules/@allyhub/slides-core/dist/sdk.js +1 -1
  270. package/dist/node_modules/@allyhub/slides-core/package.json +1 -1
  271. package/dist/node_modules/@allyhub/slides-extension/dist/export.js +1 -1
  272. package/dist/node_modules/@allyhub/slides-extension/package.json +22 -16
  273. package/dist/node_modules/@allyhub/slides-pptx/dist/import/code.js +2 -2
  274. package/dist/node_modules/@allyhub/slides-pptx/dist/import/index.js +2 -2
  275. package/dist/node_modules/@allyhub/slides-pptx/dist/read/common.js +1 -1
  276. package/dist/node_modules/@allyhub/slides-pptx/dist/read/shapes.js +1 -1
  277. package/dist/node_modules/@allyhub/slides-pptx/dist/read/text.js +1 -1
  278. package/dist/node_modules/@allyhub/slides-pptx/dist/shapes.js +1 -1
  279. package/dist/node_modules/@allyhub/slides-pptx/dist/text.js +1 -1
  280. package/dist/node_modules/@allyhub/slides-pptx/dist/write.js +2 -2
  281. package/dist/node_modules/@allyhub/slides-pptx/dist/xml.js +1 -1
  282. package/dist/node_modules/@allyhub/slides-pptx/package.json +1 -1
  283. package/dist/node_modules/@allyhub/slides-runtime/dist/draw.js +2 -2
  284. package/dist/node_modules/@allyhub/slides-runtime/dist/load.js +5 -5
  285. package/dist/node_modules/@allyhub/slides-runtime/package.json +1 -1
  286. package/dist/node_modules/@allyhub/stage/package.json +1 -1
  287. package/dist/node_modules/@allyhub/stage-page/dist/fonts/caladea/400-italic.css +19 -0
  288. package/dist/node_modules/@allyhub/stage-page/dist/fonts/caladea/400.css +19 -0
  289. package/dist/node_modules/@allyhub/stage-page/dist/fonts/caladea/700-italic.css +19 -0
  290. package/dist/node_modules/@allyhub/stage-page/dist/fonts/caladea/700.css +19 -0
  291. package/dist/node_modules/@allyhub/stage-page/dist/fonts/caladea/LICENSE +93 -0
  292. package/dist/node_modules/@allyhub/stage-page/dist/fonts/caladea/cambria.css +76 -0
  293. package/dist/node_modules/@allyhub/stage-page/dist/fonts/caladea/files/caladea-latin-400-italic.woff2 +0 -0
  294. package/dist/node_modules/@allyhub/stage-page/dist/fonts/caladea/files/caladea-latin-400-normal.woff2 +0 -0
  295. package/dist/node_modules/@allyhub/stage-page/dist/fonts/caladea/files/caladea-latin-700-italic.woff2 +0 -0
  296. package/dist/node_modules/@allyhub/stage-page/dist/fonts/caladea/files/caladea-latin-700-normal.woff2 +0 -0
  297. package/dist/node_modules/@allyhub/stage-page/dist/fonts/caladea/files/caladea-latin-ext-400-italic.woff2 +0 -0
  298. package/dist/node_modules/@allyhub/stage-page/dist/fonts/caladea/files/caladea-latin-ext-400-normal.woff2 +0 -0
  299. package/dist/node_modules/@allyhub/stage-page/dist/fonts/caladea/files/caladea-latin-ext-700-italic.woff2 +0 -0
  300. package/dist/node_modules/@allyhub/stage-page/dist/fonts/caladea/files/caladea-latin-ext-700-normal.woff2 +0 -0
  301. package/dist/node_modules/@allyhub/stage-page/dist/fonts/cousine/400-italic.css +79 -0
  302. package/dist/node_modules/@allyhub/stage-page/dist/fonts/cousine/400.css +79 -0
  303. package/dist/node_modules/@allyhub/stage-page/dist/fonts/cousine/700-italic.css +79 -0
  304. package/dist/node_modules/@allyhub/stage-page/dist/fonts/cousine/700.css +79 -0
  305. package/dist/node_modules/@allyhub/stage-page/dist/fonts/cousine/LICENSE +93 -0
  306. package/dist/node_modules/@allyhub/stage-page/dist/fonts/cousine/courier-new.css +316 -0
  307. package/dist/node_modules/@allyhub/stage-page/dist/fonts/cousine/files/cousine-cyrillic-400-italic.woff2 +0 -0
  308. package/dist/node_modules/@allyhub/stage-page/dist/fonts/cousine/files/cousine-cyrillic-400-normal.woff2 +0 -0
  309. package/dist/node_modules/@allyhub/stage-page/dist/fonts/cousine/files/cousine-cyrillic-700-italic.woff2 +0 -0
  310. package/dist/node_modules/@allyhub/stage-page/dist/fonts/cousine/files/cousine-cyrillic-700-normal.woff2 +0 -0
  311. package/dist/node_modules/@allyhub/stage-page/dist/fonts/cousine/files/cousine-cyrillic-ext-400-italic.woff2 +0 -0
  312. package/dist/node_modules/@allyhub/stage-page/dist/fonts/cousine/files/cousine-cyrillic-ext-400-normal.woff2 +0 -0
  313. package/dist/node_modules/@allyhub/stage-page/dist/fonts/cousine/files/cousine-cyrillic-ext-700-italic.woff2 +0 -0
  314. package/dist/node_modules/@allyhub/stage-page/dist/fonts/cousine/files/cousine-cyrillic-ext-700-normal.woff2 +0 -0
  315. package/dist/node_modules/@allyhub/stage-page/dist/fonts/cousine/files/cousine-greek-400-italic.woff2 +0 -0
  316. package/dist/node_modules/@allyhub/stage-page/dist/fonts/cousine/files/cousine-greek-400-normal.woff2 +0 -0
  317. package/dist/node_modules/@allyhub/stage-page/dist/fonts/cousine/files/cousine-greek-700-italic.woff2 +0 -0
  318. package/dist/node_modules/@allyhub/stage-page/dist/fonts/cousine/files/cousine-greek-700-normal.woff2 +0 -0
  319. package/dist/node_modules/@allyhub/stage-page/dist/fonts/cousine/files/cousine-greek-ext-400-italic.woff2 +0 -0
  320. package/dist/node_modules/@allyhub/stage-page/dist/fonts/cousine/files/cousine-greek-ext-400-normal.woff2 +0 -0
  321. package/dist/node_modules/@allyhub/stage-page/dist/fonts/cousine/files/cousine-greek-ext-700-italic.woff2 +0 -0
  322. package/dist/node_modules/@allyhub/stage-page/dist/fonts/cousine/files/cousine-greek-ext-700-normal.woff2 +0 -0
  323. package/dist/node_modules/@allyhub/stage-page/dist/fonts/cousine/files/cousine-hebrew-400-italic.woff2 +0 -0
  324. package/dist/node_modules/@allyhub/stage-page/dist/fonts/cousine/files/cousine-hebrew-400-normal.woff2 +0 -0
  325. package/dist/node_modules/@allyhub/stage-page/dist/fonts/cousine/files/cousine-hebrew-700-italic.woff2 +0 -0
  326. package/dist/node_modules/@allyhub/stage-page/dist/fonts/cousine/files/cousine-hebrew-700-normal.woff2 +0 -0
  327. package/dist/node_modules/@allyhub/stage-page/dist/fonts/cousine/files/cousine-latin-400-italic.woff2 +0 -0
  328. package/dist/node_modules/@allyhub/stage-page/dist/fonts/cousine/files/cousine-latin-400-normal.woff2 +0 -0
  329. package/dist/node_modules/@allyhub/stage-page/dist/fonts/cousine/files/cousine-latin-700-italic.woff2 +0 -0
  330. package/dist/node_modules/@allyhub/stage-page/dist/fonts/cousine/files/cousine-latin-700-normal.woff2 +0 -0
  331. package/dist/node_modules/@allyhub/stage-page/dist/fonts/cousine/files/cousine-latin-ext-400-italic.woff2 +0 -0
  332. package/dist/node_modules/@allyhub/stage-page/dist/fonts/cousine/files/cousine-latin-ext-400-normal.woff2 +0 -0
  333. package/dist/node_modules/@allyhub/stage-page/dist/fonts/cousine/files/cousine-latin-ext-700-italic.woff2 +0 -0
  334. package/dist/node_modules/@allyhub/stage-page/dist/fonts/cousine/files/cousine-latin-ext-700-normal.woff2 +0 -0
  335. package/dist/node_modules/@allyhub/stage-page/dist/fonts/cousine/files/cousine-vietnamese-400-italic.woff2 +0 -0
  336. package/dist/node_modules/@allyhub/stage-page/dist/fonts/cousine/files/cousine-vietnamese-400-normal.woff2 +0 -0
  337. package/dist/node_modules/@allyhub/stage-page/dist/fonts/cousine/files/cousine-vietnamese-700-italic.woff2 +0 -0
  338. package/dist/node_modules/@allyhub/stage-page/dist/fonts/cousine/files/cousine-vietnamese-700-normal.woff2 +0 -0
  339. package/dist/node_modules/@allyhub/stage-page/dist/fonts/tinos/400-italic.css +79 -0
  340. package/dist/node_modules/@allyhub/stage-page/dist/fonts/tinos/400.css +79 -0
  341. package/dist/node_modules/@allyhub/stage-page/dist/fonts/tinos/700-italic.css +79 -0
  342. package/dist/node_modules/@allyhub/stage-page/dist/fonts/tinos/700.css +79 -0
  343. package/dist/node_modules/@allyhub/stage-page/dist/fonts/tinos/LICENSE +93 -0
  344. package/dist/node_modules/@allyhub/stage-page/dist/fonts/tinos/files/tinos-cyrillic-400-italic.woff2 +0 -0
  345. package/dist/node_modules/@allyhub/stage-page/dist/fonts/tinos/files/tinos-cyrillic-400-normal.woff2 +0 -0
  346. package/dist/node_modules/@allyhub/stage-page/dist/fonts/tinos/files/tinos-cyrillic-700-italic.woff2 +0 -0
  347. package/dist/node_modules/@allyhub/stage-page/dist/fonts/tinos/files/tinos-cyrillic-700-normal.woff2 +0 -0
  348. package/dist/node_modules/@allyhub/stage-page/dist/fonts/tinos/files/tinos-cyrillic-ext-400-italic.woff2 +0 -0
  349. package/dist/node_modules/@allyhub/stage-page/dist/fonts/tinos/files/tinos-cyrillic-ext-400-normal.woff2 +0 -0
  350. package/dist/node_modules/@allyhub/stage-page/dist/fonts/tinos/files/tinos-cyrillic-ext-700-italic.woff2 +0 -0
  351. package/dist/node_modules/@allyhub/stage-page/dist/fonts/tinos/files/tinos-cyrillic-ext-700-normal.woff2 +0 -0
  352. package/dist/node_modules/@allyhub/stage-page/dist/fonts/tinos/files/tinos-greek-400-italic.woff2 +0 -0
  353. package/dist/node_modules/@allyhub/stage-page/dist/fonts/tinos/files/tinos-greek-400-normal.woff2 +0 -0
  354. package/dist/node_modules/@allyhub/stage-page/dist/fonts/tinos/files/tinos-greek-700-italic.woff2 +0 -0
  355. package/dist/node_modules/@allyhub/stage-page/dist/fonts/tinos/files/tinos-greek-700-normal.woff2 +0 -0
  356. package/dist/node_modules/@allyhub/stage-page/dist/fonts/tinos/files/tinos-greek-ext-400-italic.woff2 +0 -0
  357. package/dist/node_modules/@allyhub/stage-page/dist/fonts/tinos/files/tinos-greek-ext-400-normal.woff2 +0 -0
  358. package/dist/node_modules/@allyhub/stage-page/dist/fonts/tinos/files/tinos-greek-ext-700-italic.woff2 +0 -0
  359. package/dist/node_modules/@allyhub/stage-page/dist/fonts/tinos/files/tinos-greek-ext-700-normal.woff2 +0 -0
  360. package/dist/node_modules/@allyhub/stage-page/dist/fonts/tinos/files/tinos-hebrew-400-italic.woff2 +0 -0
  361. package/dist/node_modules/@allyhub/stage-page/dist/fonts/tinos/files/tinos-hebrew-400-normal.woff2 +0 -0
  362. package/dist/node_modules/@allyhub/stage-page/dist/fonts/tinos/files/tinos-hebrew-700-italic.woff2 +0 -0
  363. package/dist/node_modules/@allyhub/stage-page/dist/fonts/tinos/files/tinos-hebrew-700-normal.woff2 +0 -0
  364. package/dist/node_modules/@allyhub/stage-page/dist/fonts/tinos/files/tinos-latin-400-italic.woff2 +0 -0
  365. package/dist/node_modules/@allyhub/stage-page/dist/fonts/tinos/files/tinos-latin-400-normal.woff2 +0 -0
  366. package/dist/node_modules/@allyhub/stage-page/dist/fonts/tinos/files/tinos-latin-700-italic.woff2 +0 -0
  367. package/dist/node_modules/@allyhub/stage-page/dist/fonts/tinos/files/tinos-latin-700-normal.woff2 +0 -0
  368. package/dist/node_modules/@allyhub/stage-page/dist/fonts/tinos/files/tinos-latin-ext-400-italic.woff2 +0 -0
  369. package/dist/node_modules/@allyhub/stage-page/dist/fonts/tinos/files/tinos-latin-ext-400-normal.woff2 +0 -0
  370. package/dist/node_modules/@allyhub/stage-page/dist/fonts/tinos/files/tinos-latin-ext-700-italic.woff2 +0 -0
  371. package/dist/node_modules/@allyhub/stage-page/dist/fonts/tinos/files/tinos-latin-ext-700-normal.woff2 +0 -0
  372. package/dist/node_modules/@allyhub/stage-page/dist/fonts/tinos/files/tinos-vietnamese-400-italic.woff2 +0 -0
  373. package/dist/node_modules/@allyhub/stage-page/dist/fonts/tinos/files/tinos-vietnamese-400-normal.woff2 +0 -0
  374. package/dist/node_modules/@allyhub/stage-page/dist/fonts/tinos/files/tinos-vietnamese-700-italic.woff2 +0 -0
  375. package/dist/node_modules/@allyhub/stage-page/dist/fonts/tinos/files/tinos-vietnamese-700-normal.woff2 +0 -0
  376. package/dist/node_modules/@allyhub/stage-page/dist/fonts/tinos/times-new-roman.css +316 -0
  377. package/dist/node_modules/@allyhub/stage-page/dist/host.js +1 -1
  378. package/dist/node_modules/@allyhub/stage-page/dist/install.js +1 -1
  379. package/dist/node_modules/@allyhub/stage-page/dist/runtime/stage.html +3 -0
  380. package/dist/node_modules/@allyhub/stage-page/dist/runtime/stage.js +1 -1
  381. package/dist/node_modules/@allyhub/stage-page/package.json +1 -1
  382. package/dist/node_modules/@allyhub/stage-runtime/dist/runtime.js +18 -18
  383. package/dist/node_modules/@allyhub/stage-runtime/package.json +1 -1
  384. package/dist/node_modules/@allyhub/video-core/dist/schema.js +1 -1
  385. package/dist/node_modules/@allyhub/video-core/package.json +1 -1
  386. package/dist/node_modules/@allyhub/video-extension/dist/export.js +1 -1
  387. package/dist/node_modules/@allyhub/video-extension/package.json +17 -4
  388. package/dist/node_modules/@allyhub/video-measure/dist/version.js +1 -1
  389. package/dist/node_modules/@allyhub/video-measure/package.json +1 -1
  390. package/dist/node_modules/@allyhub/video-sdk/dist/phone.js +1 -1
  391. package/dist/node_modules/@allyhub/video-sdk/package.json +1 -1
  392. package/dist/node_modules/@allyhub/website/package.json +1 -1
  393. package/dist/node_modules/@allyhub/website-extension/dist/held.js +2 -0
  394. package/dist/node_modules/@allyhub/website-extension/dist/preview.js +5 -5
  395. package/dist/node_modules/@allyhub/website-extension/dist/project-tools.js +24 -1
  396. package/dist/node_modules/@allyhub/website-extension/dist/tools.js +1 -1
  397. package/dist/node_modules/@allyhub/website-extension/package.json +49 -2
  398. package/dist/node_modules/@allyhub/x-extension/dist/build.js +4 -3
  399. package/dist/node_modules/@allyhub/x-extension/package.json +43 -15
  400. package/dist/node_modules/@allyhub/x-extension/skills/allyhub/references/x.md +7 -62
  401. package/dist/node_modules/@allyhub/x-model/package.json +1 -1
  402. package/dist/node_modules/@allyhub/x-view/dist/article.js +1 -1
  403. package/dist/node_modules/@allyhub/x-view/dist/index.js +1 -1
  404. package/dist/node_modules/@allyhub/x-view/dist/post.js +2 -2
  405. package/dist/node_modules/@allyhub/x-view/package.json +1 -1
  406. package/dist/package.json +12 -10
  407. package/dist/text/facts-text.js +5 -5
  408. package/dist/text/index.js +1 -1
  409. package/dist/text/long-text.js +4 -0
  410. package/dist/works.js +1 -1
  411. package/editor-web/assets/{abnfDiagram-WEYOIA3C-CN5PiJYY.js → abnfDiagram-WEYOIA3C-BKmMA6gn.js} +1 -1
  412. package/editor-web/assets/{architecture-WOLXFQ4H-BnvZtQYk.js → architecture-WOLXFQ4H-BEFBgb4k.js} +1 -1
  413. package/editor-web/assets/{architectureDiagram-ZHVYKT53-tkcEcFQ8.js → architectureDiagram-ZHVYKT53-_u5YfCjY.js} +1 -1
  414. package/editor-web/assets/{arrow-up-DTP2yVSU.js → arrow-up-B5rJbBv0.js} +1 -1
  415. package/editor-web/assets/article-BUmD3xtR.js +8 -0
  416. package/editor-web/assets/article-DNioBb3p.js +7 -0
  417. package/editor-web/assets/{audio-lines-Ti8-m7H2.js → audio-lines-CzuzsGjI.js} +1 -1
  418. package/editor-web/assets/{blockDiagram-RJAE7QA3-DhqEIpie.js → blockDiagram-RJAE7QA3-DybfaO3Z.js} +1 -1
  419. package/editor-web/assets/bookmark-Dsd3kHJJ.js +1 -0
  420. package/editor-web/assets/button-eGxLxbv9.js +41 -0
  421. package/editor-web/assets/{c4Diagram-XDPPPE54-Bg9G95tl.js → c4Diagram-XDPPPE54-BfqLHB5i.js} +1 -1
  422. package/editor-web/assets/calc-worker-D2pGis6e.js +45 -0
  423. package/editor-web/assets/channel-TNPgFDrw.js +1 -0
  424. package/editor-web/assets/chart-C37xvZT2.js +1 -0
  425. package/editor-web/assets/chart-no-axes-column-BVkeF_Mr.js +1 -0
  426. package/editor-web/assets/{chunk-2E7WHVMD-C8Ve9lAa.js → chunk-2E7WHVMD-BVp1I_d0.js} +1 -1
  427. package/editor-web/assets/{chunk-4EMNKR2T-BDWwPUnT.js → chunk-4EMNKR2T-CTdgWEMr.js} +1 -1
  428. package/editor-web/assets/{chunk-55XCU76K-BQiNPKgx.js → chunk-55XCU76K-7pnsxeaP.js} +1 -1
  429. package/editor-web/assets/{chunk-7S6XSTFO-QoEt-6jf.js → chunk-7S6XSTFO-Dc0Dvkq7.js} +1 -1
  430. package/editor-web/assets/{chunk-AQDTSKZB-BeuwIv0-.js → chunk-AQDTSKZB-VAILIsfx.js} +1 -1
  431. package/editor-web/assets/{chunk-DSNLSHJZ-BHW7sLAz.js → chunk-DSNLSHJZ-CUDx1Rv5.js} +1 -1
  432. package/editor-web/assets/{chunk-HAGFOTED-bbGED0hu.js → chunk-HAGFOTED-DAoEe-dJ.js} +1 -1
  433. package/editor-web/assets/{chunk-HNE4Q36P-FltWp8yo.js → chunk-HNE4Q36P-g0akya12.js} +1 -1
  434. package/editor-web/assets/{chunk-NQOKRVIF-NeQzr6kH.js → chunk-NQOKRVIF-hTGjzXdJ.js} +1 -1
  435. package/editor-web/assets/{chunk-UHW7PFBP-eA4-WUhn.js → chunk-UHW7PFBP-BgLV8BIJ.js} +1 -1
  436. package/editor-web/assets/{chunk-VQ5W62QI-BPPv325z.js → chunk-VQ5W62QI-Bw19OOSD.js} +1 -1
  437. package/editor-web/assets/{chunk-WQQL4CDK-DOCIz7Te.js → chunk-WQQL4CDK-CMST9dyE.js} +1 -1
  438. package/editor-web/assets/{chunk-YZO67HFG-Dc_ihQJi.js → chunk-YZO67HFG-Bbpu36XF.js} +1 -1
  439. package/editor-web/assets/{chunk-ZAUX2LTX-CoqwCPSm.js → chunk-ZAUX2LTX-C48Ri0Gs.js} +1 -1
  440. package/editor-web/assets/{chunk-ZCHMQSOR-CZUQPkJx.js → chunk-ZCHMQSOR-DN1g01Oe.js} +1 -1
  441. package/editor-web/assets/{classDiagram-v2-4MYWR3UA-DUh9c50k.js → classDiagram-v2-4MYWR3UA-U6jbPr2d.js} +1 -1
  442. package/editor-web/assets/collaborator-B1u2td9m.js +1 -0
  443. package/editor-web/assets/createLucideIcon-GFZ_fxLc.js +1 -0
  444. package/editor-web/assets/{cynefin-EF2NZ3EQ-DUTZiog0.js → cynefin-EF2NZ3EQ-gzkai_7-.js} +1 -1
  445. package/editor-web/assets/{cynefinDiagram-WF24UDRP-oAjpfbrU.js → cynefinDiagram-WF24UDRP-DtSekSr6.js} +1 -1
  446. package/editor-web/assets/{dagre-NK4GIZVX-BrKvKCvb.js → dagre-NK4GIZVX-CiUwYVT6.js} +1 -1
  447. package/editor-web/assets/{diagram-CBK3MWTC-GekVRnmm.js → diagram-CBK3MWTC-r9XHCV-k.js} +1 -1
  448. package/editor-web/assets/{diagram-I5XIIV2D-CDd1VFRT.js → diagram-I5XIIV2D-DxVsDZ34.js} +1 -1
  449. package/editor-web/assets/{diagram-ODIL2UCW-535RISTn.js → diagram-ODIL2UCW-B0eNQoHV.js} +1 -1
  450. package/editor-web/assets/{diagram-PFBEJUXE-MXzzKCGG.js → diagram-PFBEJUXE-C7f2MfJT.js} +1 -1
  451. package/editor-web/assets/{diagram-RJA3I4VV-vKVwkQxY.js → diagram-RJA3I4VV-CSXcnvct.js} +1 -1
  452. package/editor-web/assets/{diagram-TYUNFSNR-UwGAiQLx.js → diagram-TYUNFSNR-DXzOD_ii.js} +1 -1
  453. package/editor-web/assets/dist-BGRwhCQO.js +1 -0
  454. package/editor-web/assets/{dist-9ymlIMhr.js → dist-BW4X7BrF.js} +1 -1
  455. package/editor-web/assets/dist-BgDRE85b.js +2 -0
  456. package/editor-web/assets/dist-Blq5nJnU.js +24 -0
  457. package/editor-web/assets/dist-BuWaZ3Y4.js +274 -0
  458. package/editor-web/assets/dist-C1emZ9wX.js +37 -0
  459. package/editor-web/assets/dist-CC7OeU1e.js +6 -0
  460. package/editor-web/assets/dist-CX-fiPSn.js +38 -0
  461. package/editor-web/assets/dist-C_VvG-_9.js +5 -0
  462. package/editor-web/assets/dist-Ce7HrBxv.js +3 -0
  463. package/editor-web/assets/dist-D2k6w-_a.js +1 -0
  464. package/editor-web/assets/dist-DDv_SbKw.js +84 -0
  465. package/editor-web/assets/dist-DEoEO4zs.js +1 -0
  466. package/editor-web/assets/dist-DlDxxPIP.js +16 -0
  467. package/editor-web/assets/dist-Gz6NDS0J.js +4 -0
  468. package/editor-web/assets/{ebnfDiagram-V4P3TTPT-73yGokYa.js → ebnfDiagram-V4P3TTPT-Cs4YRvDD.js} +1 -1
  469. package/editor-web/assets/{elk-QONTBCTQ-BW6V9y6a.js → elk-QONTBCTQ-Bh3LZ9WI.js} +1 -1
  470. package/editor-web/assets/{erDiagram-KYQIGQAA-BPqIJ22h.js → erDiagram-KYQIGQAA-C4vYTYXp.js} +1 -1
  471. package/editor-web/assets/{eventmodeling-K75KTNOO-_VZ8jvuy.js → eventmodeling-K75KTNOO-BN1kkHWS.js} +1 -1
  472. package/editor-web/assets/flowDiagram-IUGLLWBU-B04NGsyi.js +1 -0
  473. package/editor-web/assets/{ganttDiagram-R7GPNTJY-DZ157JN2.js → ganttDiagram-R7GPNTJY-CA1LkkC5.js} +1 -1
  474. package/editor-web/assets/{gitGraph-VSP46ZUC-fmcNL9bq.js → gitGraph-VSP46ZUC-Dy5tA7dG.js} +1 -1
  475. package/editor-web/assets/{gitGraphDiagram-PDYL7XHY-DiZDyksR.js → gitGraphDiagram-PDYL7XHY-hJIB8EkH.js} +1 -1
  476. package/editor-web/assets/hint-B8JpEypy.js +1 -0
  477. package/editor-web/assets/index-CgB5osVc.js +28 -0
  478. package/editor-web/assets/index-Daytem9N.css +2 -0
  479. package/editor-web/assets/{info-OHQRW6UA-V06620kN.js → info-OHQRW6UA-DvzSf7rQ.js} +1 -1
  480. package/editor-web/assets/{infoDiagram-MVDRKAX5-CbIgheWX.js → infoDiagram-MVDRKAX5-BjIMm4Af.js} +1 -1
  481. package/editor-web/assets/{ishikawaDiagram-HPEHV2GE-D5oJQPkG.js → ishikawaDiagram-HPEHV2GE-Bpz71S40.js} +1 -1
  482. package/editor-web/assets/{italic-CDhZKo_q.js → italic-D10w8n6C.js} +1 -1
  483. package/editor-web/assets/{journeyDiagram-BOSHW7O7-BZEv6JI4.js → journeyDiagram-BOSHW7O7-DAB-pZjD.js} +1 -1
  484. package/editor-web/assets/{kanban-definition-FNSA4HC5-CLG1R8y_.js → kanban-definition-FNSA4HC5-cYeyh3P6.js} +1 -1
  485. package/editor-web/assets/katex-5Z2zF-9g.js +257 -0
  486. package/editor-web/assets/link-BC5xK1-1.js +1 -0
  487. package/editor-web/assets/{mermaid-parser.core-DxDwXM7z.js → mermaid-parser.core-req5LE0X.js} +3 -3
  488. package/editor-web/assets/{mermaid.core-tU55ZwVG.js → mermaid.core-zFwZug4C.js} +4 -4
  489. package/editor-web/assets/{mindmap-definition-6OY57UG3-CYf4zzAh.js → mindmap-definition-6OY57UG3-TStWb7DG.js} +1 -1
  490. package/editor-web/assets/minus-DaWs5i8B.js +1 -0
  491. package/editor-web/assets/{packet-JDAUHWVQ-DsHeKYNL.js → packet-JDAUHWVQ-smFhVKcB.js} +1 -1
  492. package/editor-web/assets/palette-BIOudGkm.js +1 -0
  493. package/editor-web/assets/{pegDiagram-ECIUJNBX-CQyh6TTa.js → pegDiagram-ECIUJNBX-DvSNRv0-.js} +1 -1
  494. package/editor-web/assets/{pie-XZMESJXO-3vCIvpNB.js → pie-XZMESJXO-qjaGsBZG.js} +1 -1
  495. package/editor-web/assets/{pieDiagram-GNMPY74T-DF5yGBLn.js → pieDiagram-GNMPY74T-Dd9P-Pdc.js} +1 -1
  496. package/editor-web/assets/play-CrMmPghG.js +1 -0
  497. package/editor-web/assets/progress-DE4C5_3x.js +6 -0
  498. package/editor-web/assets/props-form-CsmDBqzy.js +1 -0
  499. package/editor-web/assets/{quadrantDiagram-D57K4MC3-B7pxlDYP.js → quadrantDiagram-D57K4MC3-h2IIKUUA.js} +1 -1
  500. package/editor-web/assets/{radar-ABXABTNO-cpEA41mL.js → radar-ABXABTNO-DlVrSA1d.js} +1 -1
  501. package/editor-web/assets/{railroad-I3PHUGI6-BLyy5R2c.js → railroad-I3PHUGI6-nFbuLAtc.js} +1 -1
  502. package/editor-web/assets/{railroad-abnf-LNEFI6M7-Y-oyol19.js → railroad-abnf-LNEFI6M7-Daj8h2iV.js} +1 -1
  503. package/editor-web/assets/{railroad-ebnf-DWYD2UWJ-o58wHZsr.js → railroad-ebnf-DWYD2UWJ-eYJyl5PH.js} +1 -1
  504. package/editor-web/assets/{railroad-peg-JR7BVNR7-CcD3PXZ8.js → railroad-peg-JR7BVNR7-BTRhKZQq.js} +1 -1
  505. package/editor-web/assets/{railroadDiagram-Y72NRBL7-BuCC4eyy.js → railroadDiagram-Y72NRBL7-CeLGUjdp.js} +1 -1
  506. package/editor-web/assets/react-WA6wlt8S.js +1 -0
  507. package/editor-web/assets/{repeat-2-C5PCbNsg.js → repeat-2-VQP1EVOZ.js} +1 -1
  508. package/editor-web/assets/{requirementDiagram-EQYSW5RA-Dp-JFGn4.js → requirementDiagram-EQYSW5RA-Dmk9XRM5.js} +1 -1
  509. package/editor-web/assets/row-BRlEWRrK.js +1 -0
  510. package/editor-web/assets/{sankeyDiagram-SY24JHO5-rYuCqEvw.js → sankeyDiagram-SY24JHO5-Yn4zlrAM.js} +1 -1
  511. package/editor-web/assets/schemas-VikZYZIK.js +1 -0
  512. package/editor-web/assets/{sequenceDiagram-BLEHNHQU-DryW8x6d.js → sequenceDiagram-BLEHNHQU-BTRnp_PW.js} +1 -1
  513. package/editor-web/assets/session-Do9AqS38.js +1 -0
  514. package/editor-web/assets/slides-diTEQ3C5.js +1 -0
  515. package/editor-web/assets/snapshots-BUGlKQIB.js +56 -0
  516. package/editor-web/assets/sound-Bj3o9_Fa.js +1 -0
  517. package/editor-web/assets/split-CNU1RHcX.js +3 -0
  518. package/editor-web/assets/{stateDiagram-v2-A6IESKWZ-Bnp0XfpT.js → stateDiagram-v2-A6IESKWZ-kstrRKv2.js} +1 -1
  519. package/editor-web/assets/{strikethrough-DJckA35o.js → strikethrough-CfXx6IYH.js} +1 -1
  520. package/editor-web/assets/{svg-BjM9RazX.js → svg-Cx50MpxK.js} +1 -1
  521. package/editor-web/assets/swatch-WeJD41aW.js +1 -0
  522. package/editor-web/assets/{swimlanes-B3ENRKFQ-BiRRhhbd.js → swimlanes-B3ENRKFQ-DaZsZkeP.js} +1 -1
  523. package/editor-web/assets/swimlanesDiagram-AYQRV4AK-CBZAujYY.js +8 -0
  524. package/editor-web/assets/switch-N0G_sbqt.js +1 -0
  525. package/editor-web/assets/syntax-BVsgRJ4I.js +66 -0
  526. package/editor-web/assets/syntax-oWsKBWFw.js +1 -0
  527. package/editor-web/assets/table-B6hVZAMi.js +1 -0
  528. package/editor-web/assets/tabs-DIFDqj-l.js +1 -0
  529. package/editor-web/assets/{textarea-BGtPqZdB.js → textarea-tEWvBY9p.js} +1 -1
  530. package/editor-web/assets/{timeline-definition-JXYKGLGB-D-Q5ZtDF.js → timeline-definition-JXYKGLGB-CLCvY-Yf.js} +1 -1
  531. package/editor-web/assets/{trash-2-Bjj6cWzP.js → trash-2-BP6nqpg2.js} +1 -1
  532. package/editor-web/assets/{treeView-D4JQ5SDB-B6DDatXq.js → treeView-D4JQ5SDB-BmN0gwdC.js} +1 -1
  533. package/editor-web/assets/{treemap-SAJKECNS-D7j5ZhiI.js → treemap-SAJKECNS-DN29G_E_.js} +1 -1
  534. package/editor-web/assets/{undo-2-yOSG766T.js → undo-2-CHR0nvWL.js} +1 -1
  535. package/editor-web/assets/{usecaseDiagram-WPOLBNNX-tkrdKUJB.js → usecaseDiagram-WPOLBNNX-DTRS54cB.js} +1 -1
  536. package/editor-web/assets/{vennDiagram-Q3Y3IDCW-Ch4XbSnD.js → vennDiagram-Q3Y3IDCW-DAAc11Hx.js} +1 -1
  537. package/editor-web/assets/video-BlvmR8BK.js +1 -0
  538. package/editor-web/assets/{wardley-7MLQ67FV-Bynt7qNQ.js → wardley-7MLQ67FV-B-UYkmdB.js} +1 -1
  539. package/editor-web/assets/{wardleyDiagram-IVAIDKWA-DRuSgm_L.js → wardleyDiagram-IVAIDKWA-BmbwCaky.js} +1 -1
  540. package/editor-web/assets/words-D_4T9Adq.js +3 -0
  541. package/editor-web/assets/words-WgdEQdYP.js +2 -0
  542. package/editor-web/assets/{xychartDiagram-4URNHDU4-DctpvfkL.js → xychartDiagram-4URNHDU4-ChAfAq1U.js} +1 -1
  543. package/editor-web/index.html +6 -5
  544. package/package.json +8 -2
  545. package/editor-web/assets/alt-BOVao_9S.js +0 -4
  546. package/editor-web/assets/article-B6YCzhj8.js +0 -73
  547. package/editor-web/assets/calc-worker-B5-fDWnb.js +0 -45
  548. package/editor-web/assets/channel-C26aBI4o.js +0 -1
  549. package/editor-web/assets/chart-BOnxneyw.js +0 -1
  550. package/editor-web/assets/choice-O5nwc2N0.js +0 -1
  551. package/editor-web/assets/collaborator-BJU5qwHd.js +0 -1
  552. package/editor-web/assets/createLucideIcon-B3B95oX5.js +0 -1
  553. package/editor-web/assets/dist-C6NqUEG4.js +0 -16
  554. package/editor-web/assets/dist-C9UGmCG9.js +0 -6
  555. package/editor-web/assets/dist-CAk5bjBm.js +0 -1
  556. package/editor-web/assets/dist-CKyfo5RM.js +0 -340
  557. package/editor-web/assets/dist-CRaWqNwq.js +0 -37
  558. package/editor-web/assets/dist-CwIBc7HQ.js +0 -1
  559. package/editor-web/assets/dist-DXRmkezB.js +0 -38
  560. package/editor-web/assets/dist-EKK5i0dG.js +0 -219
  561. package/editor-web/assets/dist-hHJlpLWo.js +0 -5
  562. package/editor-web/assets/dist-oYKcwWUj.js +0 -4
  563. package/editor-web/assets/dist-shKo7XVN.js +0 -2
  564. package/editor-web/assets/dist-wrKxBrVu.js +0 -24
  565. package/editor-web/assets/flowDiagram-IUGLLWBU-ouDQYiTr.js +0 -1
  566. package/editor-web/assets/hint-_AQWCDMj.js +0 -1
  567. package/editor-web/assets/index-BsstP-cI.js +0 -28
  568. package/editor-web/assets/index-DQRcmxBO.css +0 -2
  569. package/editor-web/assets/minus-Cgmm6ncD.js +0 -1
  570. package/editor-web/assets/progress-0B_TVsPi.js +0 -6
  571. package/editor-web/assets/react-BP46yLMB.js +0 -1
  572. package/editor-web/assets/react-pgBZqVxJ.js +0 -96
  573. package/editor-web/assets/schemas-Ewwjtbf4.js +0 -1
  574. package/editor-web/assets/session-DiI9KYRI.js +0 -1
  575. package/editor-web/assets/slides-CCwgBcGH.js +0 -1
  576. package/editor-web/assets/sound-CqryteNl.js +0 -1
  577. package/editor-web/assets/swatch-DL3HqIjW.js +0 -1
  578. package/editor-web/assets/swimlanesDiagram-AYQRV4AK-BkOls8Tv.js +0 -8
  579. package/editor-web/assets/switch-DltnKqN-.js +0 -1
  580. package/editor-web/assets/syntax-CC6QYhCz.js +0 -1
  581. package/editor-web/assets/tabs-C-re0Kxn.js +0 -1
  582. package/editor-web/assets/video-DXFiCNGc.js +0 -1
package/CHANGELOG.md CHANGED
@@ -2,6 +2,22 @@
2
2
 
3
3
  Feature highlights from each AllyHub release.
4
4
 
5
+ ## 0.11.0
6
+
7
+ - **Reports.** A page written freely in HTML, CSS and JavaScript, read on a screen and sent as a link; rendered as one self-contained HTML file, a PDF or one long PNG, with report styles to start from (`allyhub report style`).
8
+ - **LinkedIn posts, carousels and articles**, written beside LinkedIn's look and checked against its limits; a post shows where LinkedIn folds it at "… more", and an article copies as LinkedIn's editor takes it.
9
+ - **Exports go to your Downloads.** An export from an editor lands in one folder, Downloads unless you choose another (`allyhub dev --exports`), and never overwrites a file there.
10
+ - **Mark up a thing by picking it.** Select marks what is under the pointer, and Mark up from a selection starts with it marked, so the agent is told exactly what you mean.
11
+ - **Present a deck on two screens as in PowerPoint**, each full screen, with Swap and Duplicate Slide Show.
12
+
13
+ ## 0.10.0
14
+
15
+ - **Word, Excel and PowerPoint files that hold up in Office.** A deck's file holds what its preview shows; a workbook keeps iterative calculation, data tables and combination charts; a chart over dates shows dates.
16
+ - **Docs for professional work.** Figures and tables numbered, table heads and columns that never break a word, memo and business-letter pages; `allyhub render` says how a doc's pages printed.
17
+ - **`allyhub inspect` shows the important part first.** The most notable findings of each kind, with `--kind` and `--all` for the rest; a long answer is kept whole in a file.
18
+ - **A screen filmed by a phone looks filmed by default**, its colours following what fills the frame, and renders several times faster.
19
+ - **Mark up anywhere.** Mark up on a picture, an animation as it plays and an app in the conversation; a project's page shows its work as cards.
20
+
5
21
  ## 0.9.0
6
22
 
7
23
  - **A project lists its work.** `allyhub.yaml` names each piece's file, which can have any name in any folder. A project made before this version needs one for Studio to show its work.
@@ -1,6 +1,6 @@
1
1
  /*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
2
- import{z as e}from"zod";import{billingSummary as f,hostsText as w,openBrowser as p,readCredentials as b,signIn as y,signInDevice as $,signInInBackground as v,signedInAs as I,SIGN_IN_WAIT_MS as d}from"@allyhub/cloud";import{API_KEY_ENV as S,EXIT as _}from"@allyhub/protocol";import{defineCommand as h}from"../command.js";import{cloudOf as g,cloudWork as m}from"./cloud.js";const k=e.looseObject({url:e.string()});export const authLogin=h({name:"auth login",summary:"Sign this computer in to AllyHub, for the cloud tools; once per computer, shared with AllyHub Studio",input:e.strictObject({wait:e.boolean().optional().describe(`Wait here for the browser (default in a terminal); --no-wait waits ${String(d/6e4)} minutes in the background and returns at once (default for an agent), then allyhub auth status says when it is done`),browser:e.boolean().default(!0).describe("Open the browser; --no-browser only prints the address"),device:e.boolean().default(!1).describe("Sign in with a code entered in a browser elsewhere (RFC 8628's device flow), for a computer with no browser of its own")}),output:e.looseObject({status:e.enum(["signed-in","waiting"]),email:e.string().optional(),url:e.string().optional(),hosts:k}),examples:["allyhub auth login","allyhub auth login --no-wait --no-browser","allyhub auth login --device"]},(u,s)=>m(async()=>{const n=g(s),o={url:n.url,from:n.config.from},r=`Signing in to AllyHub: ${w(n.config)}.`,i=await I(n);if(i)return{value:{status:"signed-in",email:i.email,hosts:o},text:`This computer is signed in to AllyHub as ${i.email}.`};if(u.device){const t=await $(n,c=>{s.progress(`${r}
3
- On any computer, open ${c.verification_uri} and enter ${c.user_code}${c.verification_uri_complete===void 0?"":` (or open ${c.verification_uri_complete})`}.`)});return{value:{status:"signed-in",email:t.email,hosts:o},text:`Signed in as ${t.email}.`}}const a=t=>{u.browser&&p(t,s.env)};if(u.wait===!1||u.wait===void 0&&!process.stdout.isTTY){const t=await v(n,s.env);return a(t),{value:{status:"waiting",url:t,hosts:o},text:[r,"Sign in in the browser (opened, or open this address):",` ${t}`,`It waits ${String(d/6e4)} minutes in the background; allyhub auth status says when it is done.`].join(`
4
- `)}}const l=await y(n,t=>{s.progress(`${r}
2
+ import{z as e}from"zod";import{billingSummary as b,hostsText as y,openBrowser as $,organizations as v,readCredentials as I,signIn as S,signInDevice as k,signInInBackground as _,signedInAs as A,SIGN_IN_WAIT_MS as m}from"@allyhub/cloud";import{API_KEY_ENV as x,EXIT as z}from"@allyhub/protocol";import{defineCommand as f}from"../command.js";import{cloudOf as w,cloudWork as p}from"./cloud.js";const O=e.looseObject({url:e.string()});export const authLogin=f({name:"auth login",summary:"Sign this computer in to AllyHub, for the cloud tools; once per computer, shared with AllyHub Studio",input:e.strictObject({wait:e.boolean().optional().describe(`Wait here for the browser (default in a terminal); --no-wait waits ${String(m/6e4)} minutes in the background and returns at once (default for an agent), then allyhub auth status says when it is done`),browser:e.boolean().default(!0).describe("Open the browser; --no-browser only prints the address"),device:e.boolean().default(!1).describe("Sign in with a code entered in a browser elsewhere (RFC 8628's device flow), for a computer with no browser of its own")}),output:e.looseObject({status:e.enum(["signed-in","waiting"]),email:e.string().optional(),url:e.string().optional(),hosts:O}),examples:["allyhub auth login","allyhub auth login --no-wait --no-browser","allyhub auth login --device"]},(d,u)=>p(async()=>{const n=w(u),t={url:n.url,from:n.config.from},l=`Signing in to AllyHub: ${y(n.config)}.`,o=await A(n);if(o)return{value:{status:"signed-in",email:o.email,hosts:t},text:`This computer is signed in to AllyHub as ${o.email}.`};if(d.device){const i=await k(n,s=>{u.progress(`${l}
3
+ On any computer, open ${s.verification_uri} and enter ${s.user_code}${s.verification_uri_complete===void 0?"":` (or open ${s.verification_uri_complete})`}.`)});return{value:{status:"signed-in",email:i.email,hosts:t},text:`Signed in as ${i.email}.`}}const a=i=>{d.browser&&$(i,u.env)};if(d.wait===!1||d.wait===void 0&&!process.stdout.isTTY){const i=await _(n,u.env);return a(i),{value:{status:"waiting",url:i,hosts:t},text:[l,"Sign in in the browser (opened, or open this address):",` ${i}`,`It waits ${String(m/6e4)} minutes in the background; allyhub auth status says when it is done.`].join(`
4
+ `)}}const r=await S(n,i=>{u.progress(`${l}
5
5
  Sign in in your browser. If it did not open:
6
- ${t}`),a(t)});return{value:{status:"signed-in",email:l.email,hosts:o},text:`Signed in as ${l.email}. AllyHub Studio on this computer is signed in too.`}})),authStatus=h({name:"auth status",summary:"Whether this computer is signed in to AllyHub, as whom, and the account's credits; exits 4 when it is not",input:e.strictObject({}),output:e.looseObject({signedIn:e.boolean(),source:e.enum(["env","oauth"]).optional(),organization:e.string().optional(),email:e.string().optional(),url:e.string(),credits:e.number().optional()})},(u,s)=>m(async()=>{const n=g(s),o=await n.key();if(!o)return{value:{signedIn:!1,url:n.url},text:"Not signed in. Run allyhub auth login.",exit:_.auth};const r=await f(n),i=o.source==="oauth"?await b(n.config):void 0,a=i?.account.organization,l=o.source==="env"?`with the key in ${S}`:`as ${i?.account.email??"this computer's account"}${a===void 0?"":` in ${a.name||"their own organization"}`}`,t=i===void 0?void 0:i.keychain!==void 0&&n.config.keychain?n.config.keychain.name:n.config.credentialsFile;return{value:{signedIn:!0,source:o.source,...i?{email:i.account.email}:{},...a===void 0?{}:{organization:a.id},url:n.url,credits:r.credits,...t===void 0?{}:{tokensIn:t}},text:`Signed in ${l} at ${n.url}. Credits: ${String(r.credits)}.${t===void 0?"":` Tokens kept in ${t}.`}`}}));
6
+ ${i}`),a(i)});return{value:{status:"signed-in",email:r.email,hosts:t},text:`Signed in as ${r.email}. AllyHub Studio on this computer is signed in too.`}})),authStatus=f({name:"auth status",summary:"Whether this computer is signed in to AllyHub, as whom, and the account's credits; exits 4 when it is not",input:e.strictObject({}),output:e.looseObject({signedIn:e.boolean(),source:e.enum(["env","oauth"]).optional(),organization:e.string().optional(),organizationName:e.string().optional(),email:e.string().optional(),url:e.string(),credits:e.number().optional()})},(d,u)=>p(async()=>{const n=w(u),t=await n.key();if(!t)return{value:{signedIn:!1,url:n.url},text:"Not signed in. Run allyhub auth login.",exit:z.auth};const l=await b(n),o=t.source==="oauth"?await I(n.config):void 0,a=o?.account.organization,r=t.source==="env"?void 0:a!==void 0&&a.name!==""?a:await v(n).then(h=>{const c=h.find(g=>g.id===a?.id)??h.find(g=>g.dissolvedAt===null);return c===void 0?void 0:{id:c.id,name:c.name}}).catch(()=>a),i=t.source==="env"?`with the key in ${x}`:`as ${o?.account.email??"this computer's account"}${r===void 0?"":`, working in ${r.name||"their own organization"} (allyhub orgs use changes it)`}`,s=o===void 0?void 0:o.keychain!==void 0&&n.config.keychain?n.config.keychain.name:n.config.credentialsFile;return{value:{signedIn:!0,source:t.source,...o?{email:o.account.email}:{},...r===void 0?{}:{organization:r.id,organizationName:r.name},url:n.url,credits:l.credits,...s===void 0?{}:{tokensIn:s}},text:`Signed in ${i} at ${n.url}. Credits: ${String(l.credits)}.${s===void 0?"":` Tokens kept in ${s}.`}`}}));
@@ -1,16 +1,16 @@
1
1
  /*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
2
- import{readFile as D}from"node:fs/promises";import{join as L,resolve as W}from"node:path";import{z as r}from"zod";import{callTool as M,loadCatalog as h,resumeJob as T,uploadFiles as U}from"@allyhub/cloud";import{WORK_DIR as H}from"@allyhub/formats";import{EXIT as m}from"@allyhub/protocol";import{CommandError as g,defineCommand as F}from"../command.js";import{optionName as _}from"../args.js";import{requiredMissing as q,toolInput as B,toolOptions as K,exampleArgs as G,fieldLines as R}from"../tool-options.js";import{cloudOf as f,cloudWork as $,placeFrom as z,plural as w}from"./cloud.js";const j=e=>e!==null&&typeof e=="object"&&!Array.isArray(e),X=8e3,p={input:r.string().optional().describe("The input as JSON, or a file of it: the whole of it, or the fields no option gives; an option given beside it wins"),file:r.string().optional().describe("The path of the file it makes, or for a tool that returns data, of its output as JSON (without an extension it takes the result's, or .json); the same call with the same input then keeps it, calling nothing, and while its call works waits for that call; default a folder under .allyhub/work/"),force:r.boolean().default(!1).describe("With --file: call even when the file was made from this input, and replace a file that has no record"),wait:r.boolean().default(!0).describe("Wait for a long tool (an audit, a video model); --no-wait returns its call at once"),resume:r.string().optional().describe("Wait for a call of this tool this computer made (from --no-wait, or a call that stopped waiting), and download its file")},k=(e,o)=>new g("usage",e,{exit:m.usage,...o===void 0?{}:{hint:o}}),P=e=>{const o=e.reduce((n,i)=>i.map((s,a)=>Math.max(n[a]??0,s.length)),[]);return e.map(n=>` ${n.map((i,s)=>s===n.length-1?i:i.padEnd(o[s]??0)).join(" ")}`.trimEnd())};function Q(e){return F({name:e.id,summary:`${e.title}: ${e.description} Lists the tools, each a command`,input:r.strictObject({fresh:r.boolean().default(!1).describe("Read the catalog from AllyHub again, not the copy kept an hour")}),output:r.looseObject({work:r.string(),tools:r.array(r.looseObject({name:r.string()}))}),examples:[`allyhub ${e.id}`,`allyhub ${e.id} --json`]},(o,n)=>$(async()=>{const s=(await h(f(n),{refresh:o.fresh})).tools.filter(a=>a.work===e.id).sort((a,t)=>a.name.localeCompare(t.name));return{value:{work:e.id,title:e.title,tools:s.map(a=>({name:a.name,title:a.title,description:a.description,long:a.long}))},text:[`${e.title} (${w(s.length,"tool")}):`,...P(s.map(a=>[a.name,a.title])),"",`Each costs credits when it worked; a failed call is free. allyhub help ${e.id} <tool> shows a tool's options and how its credits are counted.`].join(`
3
- `)}}))}const v=(e,o)=>o.length>0?["",`${e}:`,...o]:[],V=100;export function readableJson(e,o=""){const n=i=>i===null||typeof i!="object";if(Array.isArray(e)){if(e.length===0)return"[]";if(e.every(n))return`[${e.map(s=>JSON.stringify(s)).join(", ")}]`;const i=`${o} `;return`[
4
- ${e.map(s=>i+readableJson(s,i)).join(`,
2
+ import{readFile as L}from"node:fs/promises";import{join as D,resolve as W}from"node:path";import{z as s}from"zod";import{callTool as M,loadCatalog as h,resumeJob as H,uploadFiles as T}from"@allyhub/cloud";import{WORK_DIR as U}from"@allyhub/formats";import{EXIT as m}from"@allyhub/protocol";import{CommandError as g,defineCommand as F}from"../command.js";import{optionName as _}from"../args.js";import{requiredMissing as q,toolInput as B,toolOptions as K,exampleArgs as G,fieldLines as R}from"../tool-options.js";import{cloudOf as p,cloudWork as w,placeFrom as z,plural as $}from"./cloud.js";const j=e=>e!==null&&typeof e=="object"&&!Array.isArray(e),X=8e3,f={input:s.string().optional().describe("The input as JSON, or a file of it: the whole of it, or the fields no option gives; an option given beside it wins"),file:s.string().optional().describe("The path of the file it makes, or for a tool that returns data, of its output as JSON (without an extension it takes the result's, or .json); the same call with the same input then keeps it, calling nothing, and while its call works waits for that call; default a folder under .allyhub/work/"),force:s.boolean().default(!1).describe("With --file: call even when the file was made from this input, and replace a file that has no record"),wait:s.boolean().default(!0).describe("Wait for a long tool (an audit, a video model); --no-wait returns its call at once"),resume:s.string().optional().describe("Wait for a call of this tool this computer made (from --no-wait, or a call that stopped waiting), and download its file")},k=(e,a)=>new g("usage",e,{exit:m.usage,...a===void 0?{}:{hint:a}}),P=e=>{const a=e.reduce((n,o)=>o.map((r,i)=>Math.max(n[i]??0,r.length)),[]);return e.map(n=>` ${n.map((o,r)=>r===n.length-1?o:o.padEnd(a[r]??0)).join(" ")}`.trimEnd())};export const wordOf=e=>e.toLowerCase().replace(/[^\p{L}\p{N}]+/gu,"-").replace(/^-|-$/g,"");function Q(e){return F({name:e.id,summary:`${e.title}: ${e.description} Lists the tools, each a command`,input:s.strictObject({fresh:s.boolean().default(!1).describe("Read the catalog from AllyHub again, not the copy kept an hour")}),output:s.looseObject({work:s.string(),tools:s.array(s.looseObject({name:s.string()}))}),examples:[`allyhub ${e.id}`,`allyhub ${e.id} --json`]},(a,n)=>w(async()=>{const r=(await h(p(n),{refresh:a.fresh})).tools.filter(i=>i.work===e.id).sort((i,t)=>i.name.localeCompare(t.name));return{value:{work:e.id,title:e.title,tools:r.map(i=>({name:i.name,title:i.title,...i.shown?{shown:i.shown.name}:{},description:i.description,long:i.long}))},text:[`${e.title} (${$(r.length,"tool")}):`,...P(r.map(i=>[i.name,i.shown?`${i.title} (${i.shown.name} in AllyHub)`:i.title])),"",`Each costs credits when it worked; a failed call is free. allyhub help ${e.id} <tool> shows a tool's options and how its credits are counted.`].join(`
3
+ `)}}))}const v=(e,a)=>a.length>0?["",`${e}:`,...a]:[],V=100;export function readableJson(e,a=""){const n=o=>o===null||typeof o!="object";if(Array.isArray(e)){if(e.length===0)return"[]";if(e.every(n))return`[${e.map(r=>JSON.stringify(r)).join(", ")}]`;const o=`${a} `;return`[
4
+ ${e.map(r=>o+readableJson(r,o)).join(`,
5
5
  `)}
6
- ${o}]`}if(j(e)){const i=Object.entries(e).filter(([,t])=>t!==void 0);if(i.length===0)return"{}";const s=`{${i.map(([t,l])=>`${JSON.stringify(t)}: ${JSON.stringify(l)}`).join(", ")}}`;if(i.every(([,t])=>n(t))&&s.length<=V)return s;const a=`${o} `;return`{
7
- ${i.map(([t,l])=>`${a}${JSON.stringify(t)}: ${readableJson(l,a)}`).join(`,
6
+ ${a}]`}if(j(e)){const o=Object.entries(e).filter(([,t])=>t!==void 0);if(o.length===0)return"{}";const r=`{${o.map(([t,l])=>`${JSON.stringify(t)}: ${JSON.stringify(l)}`).join(", ")}}`;if(o.every(([,t])=>n(t))&&r.length<=V)return r;const i=`${a} `;return`{
7
+ ${o.map(([t,l])=>`${i}${JSON.stringify(t)}: ${readableJson(l,i)}`).join(`,
8
8
  `)}
9
- ${o}}`}return JSON.stringify(e)}function Y(e,o=5,n=160){const i=a=>{const t=a===void 0?"undefined":JSON.stringify(a);return t.length>n?`${t.slice(0,n-1)}…`:t},s=(a,t)=>[`${a?`${a}: `:""}${w(t.length,"item")}${t.length>o?`, the first ${String(o)}:`:":"}`,...t.slice(0,o).map((l,c)=>` [${String(c)}] ${i(l)}`)];return Array.isArray(e)?s("",e):typeof e!="object"||e===null?[i(e)]:Object.entries(e).flatMap(([a,t])=>Array.isArray(t)?s(a,t):[`${a}: ${i(t)}`])}function E(e,o){if("jobId"in e)return[`${e.tool} is still working (call ${e.jobId}).`,`Wait for it: allyhub ${o} --resume ${e.jobId}${e.file===void 0?"":" (or the same command again: it waits for this call)"}`].join(`
9
+ ${a}}`}return JSON.stringify(e)}function Y(e,a=5,n=160){const o=i=>{const t=i===void 0?"undefined":JSON.stringify(i);return t.length>n?`${t.slice(0,n-1)}…`:t},r=(i,t)=>[`${i?`${i}: `:""}${$(t.length,"item")}${t.length>a?`, the first ${String(a)}:`:":"}`,...t.slice(0,a).map((l,c)=>` [${String(c)}] ${o(l)}`)];return Array.isArray(e)?r("",e):typeof e!="object"||e===null?[o(e)]:Object.entries(e).flatMap(([i,t])=>Array.isArray(t)?r(i,t):[`${i}: ${o(t)}`])}function C(e,a){if("jobId"in e)return[`${e.tool} is still working (call ${e.jobId}).`,`Wait for it: allyhub ${a} --resume ${e.jobId}${e.file===void 0?"":" (or the same command again: it waits for this call)"}`].join(`
10
10
  `);if(e.kept)return[`Kept ${e.file??""}: ${e.tool} made it from this same input on ${e.kept.at} (${e.gen??""}).`,"Nothing was called or charged. --force makes it again."].join(`
11
- `);const n=readableJson(e.output),i=n.length<=X;return[i?n:[`Output: ${String(Math.round(Buffer.byteLength(n)/1024))} KB of JSON, in short:`,...Y(e.output)].join(`
12
- `),...!i&&e.outputFile&&e.outputFile!==e.file?[`Whole output: ${e.outputFile}`]:[],...e.file?[`File: ${e.file}${e.replaced?" (replaced: it was made from another input)":""}`]:[],...e.more?Object.entries(e.more).map(([s,a])=>`Also: ${a} (${s} in the output)`):[],...e.words?[`Words: ${e.words} (when each word is said: a part can say a stretch of the file)`]:[],...e.gen?[`Record: ${e.gen} (move it with the file)`]:[],`Credits used: ${e.credits===void 0?"not reported":String(e.credits)}`].join(`
13
- `)}const Z=e=>{const o=Math.max(0,Math.round(e));return`${String(Math.floor(o/60))}:${String(o%60).padStart(2,"0")}`};async function ee(e,o){const n=e.trim().startsWith("{"),i=n?e:await D(W(o.cwd,e),"utf8").catch(a=>{throw new g("not-found",`--input: cannot read ${e}: ${a.message}`,{exit:m.notFound,hint:"Give a JSON object, or a file of one."})});let s;try{s=JSON.parse(i)}catch{s=void 0}if(!j(s))throw k(`--input: ${n?"the text":e} is not a JSON object.`,`Give '{"field": …}', or a file of it.`);return s}export function toolCommand(e){const o=`${e.work} ${e.name}`,n=K(e.input,Object.keys(p)),i=r.strictObject({...n.shape,...p,input:p.input.describe(n.inputOnly.length?`${p.input.description??""}. Fields only it gives: ${n.inputOnly.join(", ")}`:p.input.description??"")}),s=new Set(n.fields.values()),a=Object.keys(j(e.input.properties)?e.input.properties:{}).filter(l=>!s.has(l)),t=[...n.fields].filter(([,l])=>n.required.includes(l)).map(([l,c])=>`--${_(l)} <${c}>`);return{spec:{name:o,summary:e.description,input:i,output:r.looseObject({tool:r.string(),output:r.record(r.string(),r.unknown()).optional(),outputFile:r.string().optional(),credits:r.number().optional(),file:r.string().optional(),gen:r.string().optional(),more:r.record(r.string(),r.string()).optional(),words:r.string().optional(),jobId:r.string().optional()}),examples:[`allyhub ${[o,...e.example?G(n,e.example):t].join(" ")}`]},about:{lines:[e.title,"","A call is charged once, when it worked, as the description says; a failed call is free.",...e.long?["A long tool: the command waits for it (--no-wait returns its call, --resume waits again)."]:[],...v("In --input",R(e.input,{only:a,required:!0})),...v("Output",R(e.output,{depth:3}))],value:{work:e.work,title:e.title,long:e.long,inputSchema:e.input,outputSchema:e.output}},run:(l,c)=>$(async()=>{const u=l,b=l,O=f(c),S=await z(c),y=B(n,b,u.input===void 0?{}:await ee(u.input,c));let A=0;const N={base:S,signal:c.signal,onRunning:d=>{Date.now()-A<3e4||(A=Date.now(),c.progress(`${e.name}: working · ${Z((Date.now()-Date.parse(d.createdAt))/1e3)} (call ${d.id})`))},onRetry:(d,I,C)=>{c.progress(`${e.name}: ${I.message}; reading call ${d} again in ${String(C)} s`)}};if(u.resume!==void 0){if(Object.keys(y).length>0||u.file!==void 0)throw k("--resume waits for a call as it was made: give it no input or --file.");const d=await T(O,u.resume,{...N,tool:e.name});return{value:{...d},text:E(d,o)}}const J=q(n,y);if(J.length>0)throw k(`${e.name} needs ${J.join(", ")}.`,`allyhub help ${o} shows its options.`);const x=await M(O,e.name,y,{...N,outDir:L(S,H,e.work,e.name),...u.file===void 0?{}:{file:W(c.cwd,u.file)},force:u.force,wait:u.wait});return{value:{...x},text:E(x,o)}})}}export const CLOUD_SOURCE={entries:[{name:"<work>",summary:"List a work's cloud tools (AllyHub's catalog), a line each; allyhub help lists the works"},{name:"<work> <tool>",summary:"Run a cloud tool with the account's credits, its input as options (allyhub help <work> <tool>, which says how its credits are counted)"}],async nouns(e){return(await h(f(e))).works.map(n=>({name:n.id,summary:`${n.title}: ${n.description}`}))},resolve:(e,o)=>$(async()=>{const[n,i]=e;if(n===void 0||n.startsWith("-"))return;let s;const a=(u,b)=>(s=u,b);let t=await h(f(o)).catch(a),l=t?.works.find(u=>u.id===n);if(l||(t=await h(f(o),{refresh:!0}).catch(u=>a(u,t)),l=t?.works.find(u=>u.id===n)),!t)throw new g("catalog-unreachable",`"${n}" is none of allyhub's own commands, and its cloud tools could not be read: ${s instanceof Error?s.message:String(s)}.`,{exit:m.failed,hint:"They need the network: run allyhub outside a sandbox that blocks it."});if(!l)return;if(i===void 0||i.startsWith("-"))return{command:Q(l),rest:e.slice(1),list:!0};const c=t.tools.find(u=>u.name===i);if(c?.work!==l.id)throw new g("unknown-tool",c?`${i} is not a ${l.id} tool: it is in allyhub ${c.work}.`:`No ${l.id} tool ${i}.`,{exit:m.notFound,hint:c?`allyhub ${c.work} ${i}`:`allyhub ${l.id} lists its tools.`});return{command:toolCommand(c),rest:e.slice(2),list:!1}})},upload=F({name:"upload",summary:"Upload files from this computer for a cloud tool whose input takes a URL (a presenter photo, speech audio, a reference clip), and print a signed URL for each, which works for a few hours",input:r.strictObject({files:r.array(r.string()).min(1).describe("The files: images (.jpg, .png, .webp, .gif), sound (.mp3, .wav, .m4a, .aac, .ogg, .flac) or video (.mp4, .mov, .webm), 50 MB at most")}),positional:["files"],output:r.looseObject({files:r.array(r.looseObject({file:r.string(),ok:r.boolean(),url:r.string().optional()}))}),examples:["allyhub upload assets/media/presenter.jpg"]},(e,o)=>$(async()=>{const n=await U(f(o),e.files,{base:o.cwd}),i=n.filter(t=>!t.ok),s=n.map(t=>t.ok?`${t.file}
11
+ `);const n=readableJson(e.output),o=n.length<=X;return[o?n:[`Output: ${String(Math.round(Buffer.byteLength(n)/1024))} KB of JSON, in short:`,...Y(e.output)].join(`
12
+ `),...!o&&e.outputFile&&e.outputFile!==e.file?[`Whole output: ${e.outputFile}`]:[],...e.file?[`File: ${e.file}${e.replaced?" (replaced: it was made from another input)":""}`]:[],...e.more?Object.entries(e.more).map(([r,i])=>`Also: ${i} (${r} in the output)`):[],...e.words?[`Words: ${e.words} (when each word is said: a part can say a stretch of the file)`]:[],...e.gen?[`Record: ${e.gen} (move it with the file)`]:[],`Credits used: ${e.credits===void 0?"not reported":String(e.credits)}`].join(`
13
+ `)}const Z=e=>{const a=Math.max(0,Math.round(e));return`${String(Math.floor(a/60))}:${String(a%60).padStart(2,"0")}`};async function ee(e,a){const n=e.trim().startsWith("{"),o=n?e:await L(W(a.cwd,e),"utf8").catch(i=>{throw new g("not-found",`--input: cannot read ${e}: ${i.message}`,{exit:m.notFound,hint:"Give a JSON object, or a file of one."})});let r;try{r=JSON.parse(o)}catch{r=void 0}if(!j(r))throw k(`--input: ${n?"the text":e} is not a JSON object.`,`Give '{"field": …}', or a file of it.`);return r}export function toolCommand(e){const a=`${e.work} ${e.name}`,n=K(e.input,Object.keys(f)),o=s.strictObject({...n.shape,...f,input:f.input.describe(n.inputOnly.length?`${f.input.description??""}. Fields only it gives: ${n.inputOnly.join(", ")}`:f.input.description??"")}),r=new Set(n.fields.values()),i=Object.keys(j(e.input.properties)?e.input.properties:{}).filter(l=>!r.has(l)),t=[...n.fields].filter(([,l])=>n.required.includes(l)).map(([l,c])=>`--${_(l)} <${c}>`);return{spec:{name:a,summary:e.description,input:o,output:s.looseObject({tool:s.string(),output:s.record(s.string(),s.unknown()).optional(),outputFile:s.string().optional(),credits:s.number().optional(),file:s.string().optional(),gen:s.string().optional(),more:s.record(s.string(),s.string()).optional(),words:s.string().optional(),jobId:s.string().optional()}),examples:[`allyhub ${[a,...e.example?G(n,e.example):t].join(" ")}`]},about:{lines:[e.title,...e.shown?[wordOf(e.shown.name)===e.name?`Shown to people in AllyHub as "${e.shown.name}".`:`Shown to people in AllyHub as "${e.shown.name}": allyhub ${e.work} ${wordOf(e.shown.name)} finds it too.`]:[],"","A call is charged once, when it worked, as the description says; a failed call is free.",...e.long?["A long tool: the command waits for it (--no-wait returns its call, --resume waits again)."]:[],...v("In --input",R(e.input,{only:i,required:!0})),...v("Output",R(e.output,{depth:3}))],value:{work:e.work,title:e.title,...e.shown?{shown:e.shown.name}:{},long:e.long,inputSchema:e.input,outputSchema:e.output}},run:(l,c)=>w(async()=>{const u=l,b=l,O=p(c),S=await z(c),y=B(n,b,u.input===void 0?{}:await ee(u.input,c));let A=0;const N={base:S,signal:c.signal,onRunning:d=>{Date.now()-A<3e4||(A=Date.now(),c.progress(`${e.name}: working · ${Z((Date.now()-Date.parse(d.createdAt))/1e3)} (call ${d.id})`))},onRetry:(d,E,I)=>{c.progress(`${e.name}: ${E.message}; reading call ${d} again in ${String(I)} s`)}};if(u.resume!==void 0){if(Object.keys(y).length>0||u.file!==void 0)throw k("--resume waits for a call as it was made: give it no input or --file.");const d=await H(O,u.resume,{...N,tool:e.name});return{value:{...d},text:C(d,a)}}const J=q(n,y);if(J.length>0)throw k(`${e.name} needs ${J.join(", ")}.`,`allyhub help ${a} shows its options.`);const x=await M(O,e.name,y,{...N,outDir:D(S,U,e.work,e.name),...u.file===void 0?{}:{file:W(c.cwd,u.file)},force:u.force,wait:u.wait});return{value:{...x},text:C(x,a)}})}}export const CLOUD_SOURCE={entries:[{name:"<work>",summary:"List a work's cloud tools (AllyHub's catalog), a line each; allyhub help lists the works"},{name:"<work> <tool>",summary:"Run a cloud tool with the account's credits, its input as options (allyhub help <work> <tool>, which says how its credits are counted)"}],async nouns(e){return(await h(p(e))).works.map(n=>({name:n.id,summary:`${n.title}: ${n.description}`}))},resolve:(e,a)=>w(async()=>{const[n,o]=e;if(n===void 0||n.startsWith("-"))return;let r;const i=(u,b)=>(r=u,b);let t=await h(p(a)).catch(i),l=t?.works.find(u=>u.id===n);if(l||(t=await h(p(a),{refresh:!0}).catch(u=>i(u,t)),l=t?.works.find(u=>u.id===n)),!t)throw new g("catalog-unreachable",`"${n}" is none of allyhub's own commands, and its cloud tools could not be read: ${r instanceof Error?r.message:String(r)}.`,{exit:m.failed,hint:"They need the network: run allyhub outside a sandbox that blocks it."});if(!l)return;if(o===void 0||o.startsWith("-"))return{command:Q(l),rest:e.slice(1),list:!0};const c=t.tools.find(u=>u.name===o)??t.tools.find(u=>u.work===l.id&&u.shown!==void 0&&wordOf(u.shown.name)===wordOf(o));if(c?.work!==l.id)throw new g("unknown-tool",c?`${o} is not a ${l.id} tool: it is in allyhub ${c.work}.`:`No ${l.id} tool ${o}.`,{exit:m.notFound,hint:c?`allyhub ${c.work} ${o}`:`allyhub ${l.id} lists its tools.`});return{command:toolCommand(c),rest:e.slice(2),list:!1}})},upload=F({name:"upload",summary:"Upload files from this computer for a cloud tool whose input takes a URL (a presenter photo, speech audio, a reference clip), and print a signed URL for each, which works for a few hours",input:s.strictObject({files:s.array(s.string()).min(1).describe("The files: images (.jpg, .png, .webp, .gif), sound (.mp3, .wav, .m4a, .aac, .ogg, .flac) or video (.mp4, .mov, .webm), 50 MB at most")}),positional:["files"],output:s.looseObject({files:s.array(s.looseObject({file:s.string(),ok:s.boolean(),url:s.string().optional()}))}),examples:["allyhub upload assets/media/presenter.jpg"]},(e,a)=>w(async()=>{const n=await T(p(a),e.files,{base:a.cwd}),o=n.filter(t=>!t.ok),r=n.map(t=>t.ok?`${t.file}
14
14
  ${t.url}${t.expiresAt===void 0?"":` (works until ${t.expiresAt})`}`:`${t.file}
15
- failed: ${t.error.message}${t.error.hint?` ${t.error.hint}`:""}`);n.length>1&&s.push(i.length===0?`${w(n.length,"file")} uploaded.`:`${String(n.length-i.length)} of ${w(n.length,"file")} uploaded; ${String(i.length)} failed.`);const a=i[0];return{value:{files:n.map(t=>t.ok?{...t}:{file:t.file,ok:!1,error:{code:t.error.code,message:t.error.message,...t.error.hint?{hint:t.error.hint}:{}}})},text:s.join(`
16
- `),...a?{exit:a.error.exit}:{}}}));
15
+ failed: ${t.error.message}${t.error.hint?` ${t.error.hint}`:""}`);n.length>1&&r.push(o.length===0?`${$(n.length,"file")} uploaded.`:`${String(n.length-o.length)} of ${$(n.length,"file")} uploaded; ${String(o.length)} failed.`);const i=o[0];return{value:{files:n.map(t=>t.ok?{...t}:{file:t.file,ok:!1,error:{code:t.error.code,message:t.error.message,...t.error.hint?{hint:t.error.hint}:{}}})},text:r.join(`
16
+ `),...i?{exit:i.error.exit}:{}}}));
@@ -1,3 +1,3 @@
1
1
  /*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
2
- import{mkdir as y,readFile as f,rm as E,writeFile as S}from"node:fs/promises";import{dirname as c,join as p}from"node:path";import{fileURLToPath as R}from"node:url";import{z as a}from"zod";import{projectItems as T}from"@allyhub/build";import{openBrowser as h}from"@allyhub/cloud";import{startDevServer as l}from"@allyhub/dev-server";import{DEV_FILE as w}from"@allyhub/formats";import{EXIT as I}from"@allyhub/protocol";import{CommandError as g,defineCommand as j}from"../command.js";import{dir as O,indexing as $}from"../fields.js";import{itemNamed as k,projectRoot as D}from"../project.js";import{extensionsAt as P,fileEditorsAt as A,kindsAt as v}from"./extensions.js";export const PAGE=p(c(R(import.meta.url)),"../../editor-web");const u=4340,C=20;export async function start(t,e,r){const n={root:t,kinds:v(t),extensions:P(t),ui:PAGE,index:r};if(e!==void 0)return l({...n,port:e}).catch(i=>{throw i.code==="EADDRINUSE"?new g("port-in-use",`Port ${String(e)} is in use.`,{hint:"Choose another with --port, or leave it out."}):i});for(let i=u;i<u+C;i++)try{return await l({...n,port:i})}catch(o){if(o.code!=="EADDRINUSE")throw o}return l(n)}async function F(t){try{const e=JSON.parse(await f(p(t,w),"utf8"));return typeof e.url!="string"||typeof e.pid!="number"?void 0:(process.kill(e.pid,0),(await fetch(e.url,{signal:AbortSignal.timeout(2e3)})).ok?e.url:void 0)}catch{return}}async function b(t,e,r,n){if(n===void 0)return r;const{listed:i}=await T(t,v(t),void 0,A(t)),o=k(i,t,e,n);if(!o)throw new g("not-found",`There is no item ${n} in the project's list.`,{exit:I.notFound,hint:`Its items: ${i.map(s=>s.id).join(", ")||"none"} (allyhub.yaml lists them).`});return`${r}?${new URLSearchParams({item:o.id}).toString()}`}export const dev=j({name:"dev",summary:"The project's items in the browser, each in its editor (docs, sheets, videos, 3D sceneries; websites listed), as their files change; runs until stopped, and run again while it runs, opens its page and ends",input:a.strictObject({item:a.string().optional().describe("Open the page on this item: its id (its file without its extension) or its file; or on a file the list names with no kind, which an editor opens by its name (a canvas)"),dir:O,port:a.number().int().min(1).max(65535).optional().describe(`The port; default the first free one from ${String(u)}`),open:a.boolean().default(!0).describe("Open the page in the browser; --no-open only prints it")}),positional:["item"],output:a.strictObject({url:a.string()}),examples:["allyhub dev","allyhub dev launch/plan","allyhub dev --port 4400 --no-open"]},async(t,e)=>{const r=await D(e.cwd,t.dir),n=t.port===void 0?await F(r):void 0;if(n!==void 0){const s=await b(r,e.cwd,n,t.item);return e.progress(`allyhub dev is already running at ${s}`),t.open&&h(s,e.env),{value:{url:s},text:""}}const i=await start(r,t.port,$(e.env)),o=p(r,w);try{const s=await b(r,e.cwd,i.url,t.item);return await y(c(o),{recursive:!0}),await S(o,JSON.stringify({url:i.url,pid:process.pid,token:i.token})),e.progress(`allyhub dev is at ${s}
3
- Press Ctrl+C to stop.`),t.open&&h(s,e.env),await new Promise(m=>{const d=()=>{process.off("SIGTERM",d),e.signal.removeEventListener("abort",d),m()};e.signal.aborted&&m(),e.signal.addEventListener("abort",d),process.once("SIGTERM",d)}),{value:{url:s},text:""}}finally{(await f(o,"utf8").catch(()=>"")).includes(`"pid":${String(process.pid)}`)&&await E(o,{force:!0}),await i.close(),await i.project.extensions?.deactivate()}});
2
+ import{mkdir as y,readFile as m,rm as E,writeFile as S}from"node:fs/promises";import{dirname as c,join as l,resolve as T}from"node:path";import{fileURLToPath as R}from"node:url";import{z as a}from"zod";import{projectItems as I}from"@allyhub/build";import{openBrowser as h}from"@allyhub/cloud";import{startDevServer as p}from"@allyhub/dev-server";import{DEV_FILE as w}from"@allyhub/formats";import{EXIT as j}from"@allyhub/protocol";import{CommandError as g,defineCommand as D}from"../command.js";import{dir as O,indexing as $}from"../fields.js";import{itemNamed as k,projectRoot as P}from"../project.js";import{extensionsAt as A,fileEditorsAt as x,kindsAt as v}from"./extensions.js";export const PAGE=l(c(R(import.meta.url)),"../../editor-web");const u=4340,C=20;export async function start(t,e,o,s){const n={root:t,kinds:v(t),extensions:A(t),ui:PAGE,...s===void 0?{}:{exportsTo:()=>s},index:o};if(e!==void 0)return p({...n,port:e}).catch(i=>{throw i.code==="EADDRINUSE"?new g("port-in-use",`Port ${String(e)} is in use.`,{hint:"Choose another with --port, or leave it out."}):i});for(let i=u;i<u+C;i++)try{return await p({...n,port:i})}catch(r){if(r.code!=="EADDRINUSE")throw r}return p(n)}async function F(t){try{const e=JSON.parse(await m(l(t,w),"utf8"));return typeof e.url!="string"||typeof e.pid!="number"?void 0:(process.kill(e.pid,0),(await fetch(e.url,{signal:AbortSignal.timeout(2e3)})).ok?e.url:void 0)}catch{return}}async function b(t,e,o,s){if(s===void 0)return o;const{listed:n}=await I(t,v(t),void 0,x(t)),i=k(n,t,e,s);if(!i)throw new g("not-found",`There is no item ${s} in the project's list.`,{exit:j.notFound,hint:`Its items: ${n.map(r=>r.id).join(", ")||"none"} (allyhub.yaml lists them).`});return`${o}?${new URLSearchParams({item:i.id}).toString()}`}export const dev=D({name:"dev",summary:"The project's items in the browser, each in its editor (docs, sheets, videos, 3D sceneries; websites listed), as their files change; runs until stopped, and run again while it runs, opens its page and ends",input:a.strictObject({item:a.string().optional().describe("Open the page on this item: its id (its file without its extension) or its file; or on a file the list names with no kind, which an editor opens by its name (a canvas)"),dir:O,port:a.number().int().min(1).max(65535).optional().describe(`The port; default the first free one from ${String(u)}`),open:a.boolean().default(!0).describe("Open the page in the browser; --no-open only prints it"),exports:a.string().min(1).optional().describe("The folder an export from the page is saved in; default ~/Downloads (each file is made in .allyhub/out/ first)")}),positional:["item"],output:a.strictObject({url:a.string()}),examples:["allyhub dev","allyhub dev launch/plan","allyhub dev --port 4400 --no-open"]},async(t,e)=>{const o=await P(e.cwd,t.dir),s=t.port===void 0?await F(o):void 0;if(s!==void 0){const r=await b(o,e.cwd,s,t.item);return e.progress(`allyhub dev is already running at ${r}`),t.open&&h(r,e.env),{value:{url:r},text:""}}const n=await start(o,t.port,$(e.env),t.exports===void 0?void 0:T(e.cwd,t.exports)),i=l(o,w);try{const r=await b(o,e.cwd,n.url,t.item);return await y(c(i),{recursive:!0}),await S(i,JSON.stringify({url:n.url,pid:process.pid,token:n.token})),e.progress(`allyhub dev is at ${r}
3
+ Press Ctrl+C to stop.`),t.open&&h(r,e.env),await new Promise(f=>{const d=()=>{process.off("SIGTERM",d),e.signal.removeEventListener("abort",d),f()};e.signal.aborted&&f(),e.signal.addEventListener("abort",d),process.once("SIGTERM",d)}),{value:{url:r},text:""}}finally{(await m(i,"utf8").catch(()=>"")).includes(`"pid":${String(process.pid)}`)&&await E(i,{force:!0}),await n.close(),await n.project.extensions?.deactivate()}});
@@ -1,4 +1,4 @@
1
1
  /*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
2
- import{readFile as B}from"node:fs/promises";import{basename as P,dirname as J,extname as j,join as V,resolve as k}from"node:path";import{compareImages as W}from"@allyhub/measure";import{filmTimes as _,partOf as q}from"@allyhub/video-measure";import{probeVideo as X}from"@allyhub/media";import{EXIT as T}from"@allyhub/protocol";import{DELIVERY_LEAD as w,cropImage as Y,parseEncode as H,readPng as z,throughEncode as C,videoFrame as K,writePng as x}from"@allyhub/render";import{webp as v,webpPath as y}from"@allyhub/image-render/webp";import{CommandError as D}from"../../command.js";import{isPicture as Q,momentOf as U,readPicture as I,save as b,secondsOf as Z,usage as p,workPath as ee}from"./common.js";function F(e){const n=e.split(",").map(t=>Number(t.trim()));return n.length===4&&n.every(t=>Number.isFinite(t))&&(n[2]??0)>0&&(n[3]??0)>0?n:void 0}async function ne(e,n){const i=[`${e.slice(0,e.length-j(e).length)}.elements.json`,V(J(e),"elements.json")];for(const a of i){let o;try{o=await B(a,"utf8")}catch{continue}const s=JSON.parse(o),d=s[n];if(!d)throw new D("no-element",`${a} has no element ${n}.`,{exit:T.notFound,hint:`Elements: ${Object.keys(s).join(", ")||"none"}.`});return d}throw new D("no-element",`${n} is not a box (x,y,w,h), and there is no elements file beside ${e}.`,{exit:T.notFound,hint:`An element's name is read from ${i.join(" or ")}.`})}const L=(e,n,t)=>{const i=Y(e,n);if(!i)throw p("bad-crop",`The box ${n.join(",")} is outside ${t} (${String(e.width)}×${String(e.height)}).`);return i},M=10,G=e=>Math.round(e*1e3)/1e3;async function te(e,n,t){if((e.at?.length??0)>1)throw p("bad-time","A comparison takes one moment.");if(t){const r=t.timeline,m=e.part===void 0?void 0:q(r,e.part),g=e.at?.[0];if(g===void 0&&!m)throw p("missing-moment","Which moment of the piece? Give --at or --part.");const c=g===void 0?m?.still??0:_([U(g)],r.parts,m)[0]??0;if(c<0||c>r.duration)throw p("bad-time",`${c.toFixed(2)} s is outside ${t.target.piece}, which is ${r.duration.toFixed(2)} s long.`);let f=await t.still(c),$;if(n){const h=Math.round(c*r.fps),l=Math.max(0,h-Math.round(w*r.fps)),S=[];for(let E=l;E<h;E++)S.push(await t.still(E/r.fps));S.push(f),f=await C(S,r.fps,n),$={...n,lead:w,frames:S.length}}return{img:z(f),label:`${t.target.piece}-${c.toFixed(2)}s`,what:{piece:t.target.piece,combo:t.target.combo,format:t.target.format,t:G(c)},...$?{encoded:$}:{}}}const i=k(e.cwd,e.file??"");let a,o=30,s;if(Q(i)){if(e.at!==void 0)throw p("bad-option",`${e.file??""} is a picture: it has no moments.`);a=x(await I(i))}else{const r=await X(i);o=r.fps,s=Z(e.at??["0"])[0]??0;const m=Math.min(Math.round(s*o),Math.max(0,Math.round(r.duration*o)-1));a=await K(i,m,o)}let d;if(n){const r=Array.from({length:Math.round(w*o)+1},()=>a);a=await C(r,o,n),d={...n,lead:w,frames:r.length}}const u=P(i,j(i));return{img:z(a),label:s===void 0?u:`${u}-${s.toFixed(2)}s`,what:{file:i,...s===void 0?{}:{t:G(s)}},...d?{encoded:d}:{}}}export async function comparePictures(e,n){const t=k(e.cwd,e.reference);let i=await I(t);const a={};e.refCrop!==void 0&&(a.reference=F(e.refCrop)??await ne(t,e.refCrop),i=L(i,a.reference,e.reference));const o=e.encode===void 0?void 0:H(e.encode);if(e.encode!==void 0&&!o)throw p("bad-encode",`--encode takes a codec and a bitrate in kbps, h264:<kbps> or hevc:<kbps>, not ${e.encode}.`,"For example --encode hevc:618.");const s=await te(e,o,n);let d=s.img;if(e.crop!==void 0){const l=F(e.crop);if(!l)throw p("bad-crop",`Cannot read --crop ${e.crop}.`,"Write it as x,y,width,height in the candidate's pixels.");a.candidate=l,d=L(d,l,"the candidate")}const{result:u,heatmap:r,side:m,aligned:g}=W(i,d,e.options),c=l=>P(l,j(l)),f=e.out!==void 0?k(e.cwd,e.out):ee(e.root,"compare",`${c(t)}${a.reference&&F(e.refCrop??"")===void 0?`-${e.refCrop??""}`:""}-vs-${s.label}`),$={heatmap:await b(y(`${f}.heatmap.png`),await v(x(r))),side:await b(y(`${f}.side.png`),await v(x(m))),candidate:await b(y(`${f}.candidate.png`),await v(x(g))),json:`${f}.json`},h={reference:t,candidate:s.what,crops:a,...s.encoded?{encode:s.encoded}:{},result:u,files:$};return await b($.json,`${JSON.stringify(h,null,2)}
3
- `),h}const N=e=>Math.round(e*10)/10,O=(e,n=!1)=>{const t=i=>n&&i>0?`+${String(N(i))}`:String(N(i));return`luma ${t(e.luma.mean)} (p5 ${t(e.luma.p5)}, p50 ${t(e.luma.p50)}, p95 ${t(e.luma.p95)}), RGB ${e.rgb.map(t).join("/")}, L*a*b* ${e.lab.map(t).join("/")}`},R=e=>e===void 0?"no flat block":`sd ${String(e.sd)} levels (amount ${String(e.amount)}), neighbours ${String(e.correlation)} alike (size ${String(e.size)}), ${String(e.blocks)} of ${String(e.of)} blocks`,A=e=>e.p25===void 0?"no edges":`p25 ${String(e.p25)} px, median ${String(e.median)} px (${String(e.edges)} edges)`;export function compareText(e){const n=e.result,t=e.candidate,i=`${t.piece??t.file??""}${t.t===void 0?"":` at ${t.t.toFixed(2)} s`}`;return[`${e.reference}${e.crops.reference?` [${e.crops.reference.join(",")}]`:""} vs ${i}${e.crops.candidate?` [${e.crops.candidate.join(",")}]`:""}${e.encode?`, through ${e.encode.codec} at ${String(e.encode.kbps)} kbps (${String(e.encode.frames)} frames)`:""}`,`Reference ${String(n.reference.width)}×${String(n.reference.height)}, candidate ${String(n.candidate.width)}×${String(n.candidate.height)}${n.resized?`, resized (${n.resized.mode}) to ${n.resized.to.join("×")}, scale ${n.resized.scale.join(" × ")}`:""}; compared ${String(n.compared[2])}×${String(n.compared[3])} at offset ${String(n.offset.x)},${String(n.offset.y)}.`,...n.search?[`Offset search ±${String(n.search.range)} px: mean ΔE ${String(n.search.unshifted)} unshifted, ${String(n.search.best.meanDeltaE)} at ${String(n.search.best.x)},${String(n.search.best.y)}.`]:[],`Differing (ΔE > ${String(n.tolerance)}): ${String(n.differing)} of ${String(n.pixels)} pixels, ${n.pixels?(n.differing/n.pixels*100).toPrecision(3):"0"} %.`,`ΔE*ab mean ${String(n.deltaE.mean)}, p95 ${String(n.deltaE.p95)}, max ${String(n.deltaE.max)}; channels mean/max R ${String(n.channels.r.mean)}/${String(n.channels.r.max)} G ${String(n.channels.g.mean)}/${String(n.channels.g.max)} B ${String(n.channels.b.mean)}/${String(n.channels.b.max)} alpha ${String(n.channels.alpha.mean)}/${String(n.channels.alpha.max)}; SSIM ${String(n.ssim)}.`,`Levels (0–255 as encoded; L*a*b*): reference ${O(n.levels.reference)}; candidate ${O(n.levels.candidate)}; candidate less reference ${O(n.levels.difference,!0)}.`,`Grain where flat (${String(n.grain.share*100)} % of ${String(n.grain.block)} px blocks): reference ${R(n.grain.reference)}; candidate ${R(n.grain.candidate)}${n.grain.amount!==void 0?`; capture.grain.amount ${String(n.grain.amount)} added to the candidate's gives the reference's`:""}.`,`Edges (10–90 % rise of steps over ${String(n.edges.step)} levels within ${String(n.edges.span)} px): reference ${A(n.edges.reference)}, candidate ${A(n.edges.candidate)}${n.edges.soften!==void 0?`; capture.soften ${String(n.edges.soften)} (at 1080 lines) widens the candidate's sharper quarter to the reference's`:""}.`,`${String(n.regions.length)} region${n.regions.length===1?"":"s"}${n.regions.length>M?` (the ${String(M)} largest; --json has every one)`:""}:`,...n.regions.slice(0,M).map(a=>` ${a.box.join(",")} ${String(a.pixels)} px, ΔE mean ${String(a.meanDeltaE)}, max ${String(a.maxDeltaE)}`),e.files.side,e.files.heatmap].join(`
2
+ import{readFile as V}from"node:fs/promises";import{basename as T,dirname as W,extname as k,join as _,resolve as y}from"node:path";import{compareImages as q}from"@allyhub/measure";import{filmTimes as X,partOf as Y}from"@allyhub/video-measure";import{probeVideo as H}from"@allyhub/media";import{EXIT as z}from"@allyhub/protocol";import{DELIVERY_LEAD as x,cropImage as K,parseEncode as Q,readPng as C,throughEncode as D,videoFrame as U,writePng as b}from"@allyhub/render";import{webp as v,webpPath as F}from"@allyhub/image-render/webp";import{CommandError as I}from"../../command.js";import{isPicture as Z,momentOf as ee,readPicture as L,save as E,secondsOf as ne,usage as p,workPath as te}from"./common.js";function M(e){const n=e.split(",").map(t=>Number(t.trim()));return n.length===4&&n.every(t=>Number.isFinite(t))&&(n[2]??0)>0&&(n[3]??0)>0?n:void 0}async function ie(e,n){const i=[`${e.slice(0,e.length-k(e).length)}.elements.json`,_(W(e),"elements.json")];for(const a of i){let o;try{o=await V(a,"utf8")}catch{continue}const s=JSON.parse(o),c=s[n];if(!c)throw new I("no-element",`${a} has no element ${n}.`,{exit:z.notFound,hint:`Elements: ${Object.keys(s).join(", ")||"none"}.`});return c}throw new I("no-element",`${n} is not a box (x,y,w,h), and there is no elements file beside ${e}.`,{exit:z.notFound,hint:`An element's name is read from ${i.join(" or ")}.`})}const A=(e,n,t)=>{const i=K(e,n);if(!i)throw p("bad-crop",`The box ${n.join(",")} is outside ${t} (${String(e.width)}×${String(e.height)}).`);return i},O=10,G=e=>Math.round(e*1e3)/1e3;async function ae(e,n,t){if((e.at?.length??0)>1)throw p("bad-time","A comparison takes one moment.");if(t){const r=t.timeline,h=r.parts.length===1?r.parts[0]:void 0,l=e.part===void 0?h:Y(r,e.part),m=e.at?.[0];if(m===void 0&&!l)throw p("missing-moment",`Which moment of the piece? Give --at, or --part: ${r.parts.map(S=>S.key).join(", ")}.`);const d=m===void 0?l?.still??0:X([ee(m)],r.parts,l)[0]??0;if(d<0||d>r.duration)throw p("bad-time",`${d.toFixed(2)} s is outside ${t.target.piece}, which is ${r.duration.toFixed(2)} s long.`);let $=await t.still(d),g;if(n){const S=Math.round(d*r.fps),J=Math.max(0,S-Math.round(x*r.fps)),w=[];for(let j=J;j<S;j++)w.push(await t.still(j/r.fps));w.push($),$=await D(w,r.fps,n),g={...n,lead:x,frames:w.length}}const f=m===void 0&&l?l.key:void 0;return{img:C($),label:`${t.target.piece}-${f?.replaceAll("/","-")??`${d.toFixed(2)}s`}`,what:{piece:t.target.piece,combo:t.target.combo,format:t.target.format,...f===void 0?{}:{part:f},t:G(d)},...g?{encoded:g}:{}}}const i=y(e.cwd,e.file??"");let a,o=30,s;if(Z(i)){if(e.at!==void 0)throw p("bad-option",`${e.file??""} is a picture: it has no moments.`);a=b(await L(i))}else{const r=await H(i);o=r.fps,s=ne(e.at??["0"])[0]??0;const h=Math.min(Math.round(s*o),Math.max(0,Math.round(r.duration*o)-1));a=await U(i,h,o)}let c;if(n){const r=Array.from({length:Math.round(x*o)+1},()=>a);a=await D(r,o,n),c={...n,lead:x,frames:r.length}}const u=T(i,k(i));return{img:C(a),label:s===void 0?u:`${u}-${s.toFixed(2)}s`,what:{file:i,...s===void 0?{}:{t:G(s)}},...c?{encoded:c}:{}}}export async function comparePictures(e,n){const t=y(e.cwd,e.reference);let i=await L(t);const a={};e.refCrop!==void 0&&(a.reference=M(e.refCrop)??await ie(t,e.refCrop),i=A(i,a.reference,e.reference));const o=e.encode===void 0?void 0:Q(e.encode);if(e.encode!==void 0&&!o)throw p("bad-encode",`--encode takes a codec and a bitrate in kbps, h264:<kbps> or hevc:<kbps>, not ${e.encode}.`,"For example --encode hevc:618.");const s=await ae(e,o,n);let c=s.img;if(e.crop!==void 0){const f=M(e.crop);if(!f)throw p("bad-crop",`Cannot read --crop ${e.crop}.`,"Write it as x,y,width,height in the candidate's pixels.");a.candidate=f,c=A(c,f,"the candidate")}const{result:u,heatmap:r,side:h,aligned:l}=q(i,c,e.options),m=f=>T(f,k(f)),d=e.out!==void 0?y(e.cwd,e.out):te(e.root,"compare",`${m(t)}${a.reference&&M(e.refCrop??"")===void 0?`-${e.refCrop??""}`:""}-vs-${s.label}`),$={heatmap:await E(F(`${d}.heatmap.png`),await v(b(r))),side:await E(F(`${d}.side.png`),await v(b(h))),candidate:await E(F(`${d}.candidate.png`),await v(b(l))),json:`${d}.json`},g={reference:t,candidate:s.what,crops:a,...s.encoded?{encode:s.encoded}:{},result:u,files:$};return await E($.json,`${JSON.stringify(g,null,2)}
3
+ `),g}const N=e=>Math.round(e*10)/10,P=(e,n=!1)=>{const t=i=>n&&i>0?`+${String(N(i))}`:String(N(i));return`luma ${t(e.luma.mean)} (p5 ${t(e.luma.p5)}, p50 ${t(e.luma.p50)}, p95 ${t(e.luma.p95)}), RGB ${e.rgb.map(t).join("/")}, L*a*b* ${e.lab.map(t).join("/")}`},R=e=>e===void 0?"no flat block":`sd ${String(e.sd)} levels (amount ${String(e.amount)}), neighbours ${String(e.correlation)} alike (size ${String(e.size)}), ${String(e.blocks)} of ${String(e.of)} blocks`,B=e=>e.p25===void 0?"no edges":`p25 ${String(e.p25)} px, median ${String(e.median)} px (${String(e.edges)} edges)`;export function compareText(e){const n=e.result,t=e.candidate,i=`${t.piece??t.file??""}${t.part!==void 0?`, part ${t.part}`:t.t===void 0?"":` at ${t.t.toFixed(2)} s`}`;return[`${e.reference}${e.crops.reference?` [${e.crops.reference.join(",")}]`:""} vs ${i}${e.crops.candidate?` [${e.crops.candidate.join(",")}]`:""}${e.encode?`, through ${e.encode.codec} at ${String(e.encode.kbps)} kbps (${String(e.encode.frames)} frames)`:""}`,`Reference ${String(n.reference.width)}×${String(n.reference.height)}, candidate ${String(n.candidate.width)}×${String(n.candidate.height)}${n.resized?`, resized (${n.resized.mode}) to ${n.resized.to.join("×")}, scale ${n.resized.scale.join(" × ")}`:""}; compared ${String(n.compared[2])}×${String(n.compared[3])} at offset ${String(n.offset.x)},${String(n.offset.y)}.`,...n.search?[`Offset search ±${String(n.search.range)} px: mean ΔE ${String(n.search.unshifted)} unshifted, ${String(n.search.best.meanDeltaE)} at ${String(n.search.best.x)},${String(n.search.best.y)}.`]:[],`Differing (ΔE > ${String(n.tolerance)}): ${String(n.differing)} of ${String(n.pixels)} pixels, ${n.pixels?(n.differing/n.pixels*100).toPrecision(3):"0"} %.`,`ΔE*ab mean ${String(n.deltaE.mean)}, p95 ${String(n.deltaE.p95)}, max ${String(n.deltaE.max)}; channels mean/max R ${String(n.channels.r.mean)}/${String(n.channels.r.max)} G ${String(n.channels.g.mean)}/${String(n.channels.g.max)} B ${String(n.channels.b.mean)}/${String(n.channels.b.max)} alpha ${String(n.channels.alpha.mean)}/${String(n.channels.alpha.max)}; SSIM ${String(n.ssim)}.`,`Levels (0–255 as encoded; L*a*b*): reference ${P(n.levels.reference)}; candidate ${P(n.levels.candidate)}; candidate less reference ${P(n.levels.difference,!0)}.`,`Grain where flat (${String(n.grain.share*100)} % of ${String(n.grain.block)} px blocks): reference ${R(n.grain.reference)}; candidate ${R(n.grain.candidate)}${n.grain.amount!==void 0?`; capture.grain.amount ${String(n.grain.amount)} added to the candidate's gives the reference's`:""}.`,`Edges (10–90 % rise of steps over ${String(n.edges.step)} levels within ${String(n.edges.span)} px): reference ${B(n.edges.reference)}, candidate ${B(n.edges.candidate)}${n.edges.soften!==void 0?`; capture.soften ${String(n.edges.soften)} (at 1080 lines) widens the candidate's sharper quarter to the reference's`:""}.`,`${String(n.regions.length)} region${n.regions.length===1?"":"s"}${n.regions.length>O?` (the ${String(O)} largest; --json has every one)`:""}:`,...n.regions.slice(0,O).map(a=>` ${a.box.join(",")} ${String(a.pixels)} px, ΔE mean ${String(a.meanDeltaE)}, max ${String(a.maxDeltaE)}`),e.files.side,e.files.heatmap].join(`
4
4
  `)}
@@ -1,2 +1,2 @@
1
1
  /*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
2
- import{basename as J,resolve as S}from"node:path";import{DECK_OVERLAY_KEY as Q,OVERLAY_KEY as Z,frameOverlay as v,overlaySvg as tt}from"./overlay.js";import{Mattes as et}from"@allyhub/video-measure";import{filmTimes as it,partOf as nt}from"@allyhub/video-measure";import{GRID_WIDTH as st,MAX_TILES as W,defaultCols as ot,gridHtml as rt,gridLayout as at,labelSize as dt,probeVideo as ct,sheetHtml as pt,sheetTile as ft,stretchFrames as lt}from"@allyhub/media";import{clipTypeOf as ht,ffmpegOf as mt,hasFinalLook as ut,videoFrame as wt,writeClip as gt}from"@allyhub/render";import{inTime as K}from"@allyhub/build";import{EXIT as $t}from"@allyhub/protocol";import{CommandError as yt}from"../../command.js";import{drawPage as j,gridError as z,isFile as bt,looks as kt,momentOf as xt,pictureUrl as G,picturePath as P,save as Y,secondsName as D,usage as M,withCombo as H,workPath as Ft}from"./common.js";const A=t=>Math.round(t*1e3)/1e3,X=t=>({source:"piece",piece:t.target.piece,combo:t.target.combo,...t.target.id===void 0?{}:{id:t.target.id},format:t.target.format}),R=(t,e)=>Ft(e,"frames",t.target.piece);function L(t,e){const i=t.at(-1);return t.find(r=>e>=r.start&&e<r.end)??(i&&e>=i.end?i:void 0)}export async function stillsSheet(t,e){const i=t.timeline,r=t.version.summary?.text??[],h=i.parts.flatMap((n,a)=>{const y=n.steps??[n.still];return y.map((m,x)=>({p:n,t:m,slide:a,step:x,of:y.length}))}),p=i.parts.flatMap(n=>n.frame?[n.frame]:[]),u=p.length>0,E=new Set(p.map(n=>(n.width/n.height).toFixed(3))),d=u&&p[0]?E.size===1?p[0].width/p[0].height:1:i.width/i.height,w=d<1?4:3,o=d<1?1320:1600,g=!K(t.piece,t.prepared.kinds),$=t.prepared.kinds.find(n=>n.id===t.piece.kind)?.part??{noun:"part",plural:"parts"},C=[];if(g||u){const n=ft({width:o,cols:w});C.push(...await t.partStills(h.map(a=>({part:a.p.key,step:a.step,width:n,format:"webp"}))))}else for(const n of h)C.push(await t.still(n.t));const k=[];for(let n=0;n<h.length;n+=w)k.push({cells:h.slice(n,n+w).map(({p:a,slide:y,step:m,of:x},_)=>{const b=r.find(I=>I.key===a.key);return{image:C[n+_]??Buffer.alloc(0),label:g?`${String(y+1)}${x>1?`.${String(m)}`:""} · ${a.key}${a.hidden?" · hidden":""}`:a.frame?`${a.key} · ${String(a.frame.width)}×${String(a.frame.height)}`:`${a.key} · ${a.still.toFixed(2)} s`,text:b?.notes??b?.spoken??b?.onScreen.join(" · ")??""}})});const T=await j(t.opened.session.browser,{html:pt({title:g?`${t.target.piece} · ${i.parts.length===1?"1 slide":`${String(i.parts.length)} slides`}`:`${t.target.piece} · ${i.parts.length===1?`1 ${$.noun}`:`${String(i.parts.length)} ${$.plural}`}${u?"":` · ${i.duration.toFixed(2)} s`}`,rows:k,cols:w,width:o,aspect:d}),width:o}),O=await Y(P(e.cwd,e.out,S(R(t,e.root),`${H("sheet",t.target)}.png`)),T);return{mode:"sheet",...g?{slides:!0}:{},unit:$,...X(t),out:O,parts:i.parts.map(n=>({key:n.key,t:A(n.still)}))}}export function clipKind(t){const e=ht(t);if(!e)throw M("bad-clip",`Cannot tell what kind of video ${t} is.`,"End --clip with .gif, .mp4 or .webm.");return e}async function St(t,e){if(!await bt(t))throw new yt("not-found",`There is no file ${t} (--beside).`,{exit:$t.notFound});const i=await ct(t),r=Math.max(1,Math.round(i.duration*i.fps)),h=[];for(const p of e){const u=Math.round(p*i.fps);h.push(p<0||u>r-1?void 0:await wt(t,u,i.fps))}return{info:i,shots:h}}export async function pieceMoments(t,e){const i=t.timeline,r=e.part===void 0?void 0:nt(i,e.part),h=r?.start??0,p=e.from!==void 0||e.to!==void 0;if(p&&e.at!==void 0)throw M("bad-option","Give --at or --from and --to, not both.");if(p&&(e.from===void 0||e.to===void 0))throw M("bad-option","A stretch needs --from and --to.");if(e.clip!==void 0&&!p)throw M("bad-option","--clip needs --from and --to.","For example --from 3.2 --to 4.4 --clip move.gif.");const u=e.clip===void 0?void 0:clipKind(e.clip),E=e.clip===void 0||e.out!==void 0;let d;try{d=e.from!==void 0&&e.to!==void 0?lt({from:h+e.from,to:h+e.to},{fps:i.fps,duration:i.duration,grid:E}):void 0}catch(s){throw z(s)}const w=(e.at??[]).map(xt),o=d?d.times:w.length===0&&r?[r.still]:it(w,i.parts,r);if(o.length>W&&E)throw M("bad-time",`${String(o.length)} moments; one picture holds at most ${String(W)}.`);for(const s of o)if(s<0||s>i.duration+1/i.fps)throw M("bad-time",`${s.toFixed(2)} s is outside ${t.target.piece}, which is ${i.duration.toFixed(2)} s long.`,r?`With --part, --at counts from the part's start; ${r.key} runs ${r.start.toFixed(2)}–${r.end.toFixed(2)} s.`:`Parts: ${i.parts.map(c=>`${c.key} ${c.start.toFixed(2)}–${c.end.toFixed(2)}`).join(", ")}.`);const g=s=>Math.min(s,i.duration),$={...X(t),final:ut(t.look,i),...d?{stretch:{from:d.from,to:d.to,every:d.every,frames:d.times.length}}:{}};if(o.length===1&&!d&&!e.overlay&&e.beside===void 0){const s=o[0]??0,c=r??L(i.parts,s),f=c?.key??"",l=c?.frame??{width:i.width,height:i.height},F=await Y(P(e.cwd,e.out,S(R(t,e.root),`${H(e.at===void 0&&r?r.key:D(s),t.target)}.png`)),await t.still(g(s),{format:kt()}));return{mode:"frame",...$,out:F,t:A(s),part:f,width:l.width,height:l.height}}const k=[];for(const s of o)k.push(await t.still(g(s)));const T=e.clip!==void 0&&u?await gt(k,{file:S(e.cwd,e.clip),type:u,fps:i.fps/(d?.every??1)}):void 0;if(!E)return{mode:"clip",...$,clip:T};const O=[];if(e.overlay){const s=i.duration-1/i.fps,c=await t.version.measure(o.map(l=>Math.min(l,s))),f=new et({root:t.prepared.root,media:t.prepared.media,ffmpeg:await mt()});for(const l of o)O.push(await v(Math.min(l,s),i,c,t.prepared.media,f))}const n=e.beside===void 0?void 0:await St(S(e.cwd,e.beside),o),a=n?2:1,y=i.width/i.height;let m;try{m=at({count:o.length,cols:ot(o.length,y*a),width:st,aspect:y*a})}catch(s){throw z(s)}const x=(m.tiles[0]?.width??i.width)/a,_=Math.max(11,dt(x)-4),b=[...k],I=n?J(e.beside??""):"",B=o.map((s,c)=>{const f=O[c],l={src:G(c),label:K(t.piece,t.prepared.kinds)?`${s.toFixed(d?3:2)} s · ${L(i.parts,s)?.key??""}`:L(i.parts,s)?.key??"",...f?{over:tt(f,i.width,i.height,x/i.width,_)}:{}};if(!n)return{pictures:[l]};const F=n.shots[c];return F&&b.push(F),{pictures:[{src:F?G(b.length-1):void 0,label:`${I} · ${s.toFixed(2)} s${F?"":" · past its end"}`},l]}}),N=await j(t.opened.session.browser,{html:rt({layout:m,cells:B,...e.overlay?{legend:K(t.piece,t.prepared.kinds)?Z:Q}:{}}),width:m.width,pictures:b}),V=o[0]??0,U=o.at(-1)??V,q=await Y(P(e.cwd,e.out,S(R(t,e.root),`${H(`${d?"stretch":"moments"}-${D(V)}-${D(U)}`,t.target)}.png`)),N);return{mode:"grid",...$,out:q,cols:m.cols,tiles:o.map((s,c)=>{const f=m.tiles[c],l=O[c];return{t:A(s),part:L(i.parts,s)?.key??"",...f?{box:[f.x,f.y,f.width,f.height]}:{},...l?{overlay:l}:{},...n?{beside:{t:A(s),shown:n.shots[c]!==void 0}}:{}}}),...n?{beside:{file:S(e.cwd,e.beside??""),video:{duration:n.info.duration,width:n.info.width,height:n.info.height,fps:n.info.fps}}}:{},...T?{clip:T}:{}}}
2
+ import{basename as J,resolve as S}from"node:path";import{DECK_OVERLAY_KEY as Q,OVERLAY_KEY as Z,frameOverlay as v,overlaySvg as tt}from"./overlay.js";import{Mattes as et}from"@allyhub/video-measure";import{filmTimes as it,partOf as nt}from"@allyhub/video-measure";import{GRID_WIDTH as st,MAX_TILES as W,defaultCols as ot,gridHtml as rt,gridLayout as at,labelSize as dt,probeVideo as ct,sheetHtml as pt,sheetTile as ft,stretchFrames as lt}from"@allyhub/media";import{clipTypeOf as ht,ffmpegOf as mt,hasFinalLook as ut,videoFrame as wt,writeClip as gt}from"@allyhub/render";import{inTime as K}from"@allyhub/build";import{EXIT as $t}from"@allyhub/protocol";import{CommandError as yt}from"../../command.js";import{drawPage as j,gridError as z,isFile as bt,looks as kt,momentOf as xt,pictureUrl as G,picturePath as P,save as Y,secondsName as D,usage as M,withCombo as H,workPath as Ft}from"./common.js";const A=t=>Math.round(t*1e3)/1e3,X=t=>({source:"piece",piece:t.target.piece,combo:t.target.combo,...t.target.id===void 0?{}:{id:t.target.id},format:t.target.format}),R=(t,e)=>Ft(e,"frames",t.target.piece);function L(t,e){const i=t.at(-1);return t.find(r=>e>=r.start&&e<r.end)??(i&&e>=i.end?i:void 0)}export async function stillsSheet(t,e){const i=t.timeline,r=t.version.summary?.text??[],h=i.parts.flatMap((n,a)=>{const y=n.steps??[n.still];return y.map((m,x)=>({p:n,t:m,slide:a,step:x,of:y.length}))}),p=i.parts.flatMap(n=>n.frame?[n.frame]:[]),u=p.length>0,E=new Set(p.map(n=>(n.width/n.height).toFixed(3))),d=u&&p[0]?E.size===1?p[0].width/p[0].height:1:i.width/i.height,w=h.length===1?1:d<1?4:3,o=d<1?1320:1600,g=!K(t.piece,t.prepared.kinds),$=t.prepared.kinds.find(n=>n.id===t.piece.kind)?.part??{noun:"part",plural:"parts"},C=[];if(g||u){const n=ft({width:o,cols:w});C.push(...await t.partStills(h.map(a=>({part:a.p.key,step:a.step,width:n,format:"webp"}))))}else for(const n of h)C.push(await t.still(n.t));const k=[];for(let n=0;n<h.length;n+=w)k.push({cells:h.slice(n,n+w).map(({p:a,slide:y,step:m,of:x},_)=>{const b=r.find(I=>I.key===a.key);return{image:C[n+_]??Buffer.alloc(0),label:g?`${String(y+1)}${x>1?`.${String(m)}`:""} · ${a.key}${a.hidden?" · hidden":""}`:a.frame?`${a.key} · ${String(a.frame.width)}×${String(a.frame.height)}`:`${a.key} · ${a.still.toFixed(2)} s`,text:b?.notes??b?.spoken??b?.onScreen.join(" · ")??""}})});const T=await j(t.opened.session.browser,{html:pt({title:g?`${t.target.piece} · ${i.parts.length===1?"1 slide":`${String(i.parts.length)} slides`}`:`${t.target.piece} · ${i.parts.length===1?`1 ${$.noun}`:`${String(i.parts.length)} ${$.plural}`}${u?"":` · ${i.duration.toFixed(2)} s`}`,rows:k,cols:w,width:o,aspect:d}),width:o}),O=await Y(P(e.cwd,e.out,S(R(t,e.root),`${H("sheet",t.target)}.png`)),T);return{mode:"sheet",...g?{slides:!0}:{},unit:$,...X(t),out:O,parts:i.parts.map(n=>({key:n.key,t:A(n.still)}))}}export function clipKind(t){const e=ht(t);if(!e)throw M("bad-clip",`Cannot tell what kind of video ${t} is.`,"End --clip with .gif, .mp4 or .webm.");return e}async function St(t,e){if(!await bt(t))throw new yt("not-found",`There is no file ${t} (--beside).`,{exit:$t.notFound});const i=await ct(t),r=Math.max(1,Math.round(i.duration*i.fps)),h=[];for(const p of e){const u=Math.round(p*i.fps);h.push(p<0||u>r-1?void 0:await wt(t,u,i.fps))}return{info:i,shots:h}}export async function pieceMoments(t,e){const i=t.timeline,r=e.part===void 0?void 0:nt(i,e.part),h=r?.start??0,p=e.from!==void 0||e.to!==void 0;if(p&&e.at!==void 0)throw M("bad-option","Give --at or --from and --to, not both.");if(p&&(e.from===void 0||e.to===void 0))throw M("bad-option","A stretch needs --from and --to.");if(e.clip!==void 0&&!p)throw M("bad-option","--clip needs --from and --to.","For example --from 3.2 --to 4.4 --clip move.gif.");const u=e.clip===void 0?void 0:clipKind(e.clip),E=e.clip===void 0||e.out!==void 0;let d;try{d=e.from!==void 0&&e.to!==void 0?lt({from:h+e.from,to:h+e.to},{fps:i.fps,duration:i.duration,grid:E}):void 0}catch(s){throw z(s)}const w=(e.at??[]).map(xt),o=d?d.times:w.length===0&&r?[r.still]:it(w,i.parts,r);if(o.length>W&&E)throw M("bad-time",`${String(o.length)} moments; one picture holds at most ${String(W)}.`);for(const s of o)if(s<0||s>i.duration+1/i.fps)throw M("bad-time",`${s.toFixed(2)} s is outside ${t.target.piece}, which is ${i.duration.toFixed(2)} s long.`,r?`With --part, --at counts from the part's start; ${r.key} runs ${r.start.toFixed(2)}–${r.end.toFixed(2)} s.`:`Parts: ${i.parts.map(c=>`${c.key} ${c.start.toFixed(2)}–${c.end.toFixed(2)}`).join(", ")}.`);const g=s=>Math.min(s,i.duration),$={...X(t),final:ut(t.look,i),...d?{stretch:{from:d.from,to:d.to,every:d.every,frames:d.times.length}}:{}};if(o.length===1&&!d&&!e.overlay&&e.beside===void 0){const s=o[0]??0,c=r??L(i.parts,s),f=c?.key??"",l=c?.frame??{width:i.width,height:i.height},F=await Y(P(e.cwd,e.out,S(R(t,e.root),`${H(e.at===void 0&&r?r.key:D(s),t.target)}.png`)),await t.still(g(s),{format:kt()}));return{mode:"frame",...$,out:F,t:A(s),part:f,width:l.width,height:l.height}}const k=[];for(const s of o)k.push(await t.still(g(s)));const T=e.clip!==void 0&&u?await gt(k,{file:S(e.cwd,e.clip),type:u,fps:i.fps/(d?.every??1)}):void 0;if(!E)return{mode:"clip",...$,clip:T};const O=[];if(e.overlay){const s=i.duration-1/i.fps,c=await t.version.measure(o.map(l=>Math.min(l,s))),f=new et({root:t.prepared.root,media:t.prepared.media,ffmpeg:await mt()});for(const l of o)O.push(await v(Math.min(l,s),i,c,t.prepared.media,f))}const n=e.beside===void 0?void 0:await St(S(e.cwd,e.beside),o),a=n?2:1,y=i.width/i.height;let m;try{m=at({count:o.length,cols:ot(o.length,y*a),width:st,aspect:y*a})}catch(s){throw z(s)}const x=(m.tiles[0]?.width??i.width)/a,_=Math.max(11,dt(x)-4),b=[...k],I=n?J(e.beside??""):"",B=o.map((s,c)=>{const f=O[c],l={src:G(c),label:K(t.piece,t.prepared.kinds)?`${s.toFixed(d?3:2)} s · ${L(i.parts,s)?.key??""}`:L(i.parts,s)?.key??"",...f?{over:tt(f,i.width,i.height,x/i.width,_)}:{}};if(!n)return{pictures:[l]};const F=n.shots[c];return F&&b.push(F),{pictures:[{src:F?G(b.length-1):void 0,label:`${I} · ${s.toFixed(2)} s${F?"":" · past its end"}`},l]}}),N=await j(t.opened.session.browser,{html:rt({layout:m,cells:B,...e.overlay?{legend:K(t.piece,t.prepared.kinds)?Z:Q}:{}}),width:m.width,pictures:b}),V=o[0]??0,U=o.at(-1)??V,q=await Y(P(e.cwd,e.out,S(R(t,e.root),`${H(`${d?"stretch":"moments"}-${D(V)}-${D(U)}`,t.target)}.png`)),N);return{mode:"grid",...$,out:q,cols:m.cols,tiles:o.map((s,c)=>{const f=m.tiles[c],l=O[c];return{t:A(s),part:L(i.parts,s)?.key??"",...f?{box:[f.x,f.y,f.width,f.height]}:{},...l?{overlay:l}:{},...n?{beside:{t:A(s),shown:n.shots[c]!==void 0}}:{}}}),...n?{beside:{file:S(e.cwd,e.beside??""),video:{duration:n.info.duration,width:n.info.width,height:n.info.height,fps:n.info.fps}}}:{},...T?{clip:T}:{}}}
@@ -0,0 +1,2 @@
1
+ /*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
2
+ import{createHash as d}from"node:crypto";import{dirname as m,join as c,relative as a}from"node:path";import{REPORT_DEFAULTS as f,reportPicture as u}from"@allyhub/report-extension/cli";import{webp as h}from"@allyhub/image-render/webp";import{EXIT as l}from"@allyhub/protocol";import{CommandError as w}from"../../command.js";import{picturePath as g,save as E,workPath as $}from"./common.js";export function selectorName(t){const r=t.replace(/[^\p{L}\p{N}]+/gu,"-").replace(/^-+|-+$/gu,"").slice(0,40),e=d("sha256").update(t).digest("hex").slice(0,6);return r===""?e:`${r}-${e}`}export async function reportFrames(t){const r=a(t.root,m(t.file)),e=t.width??f.width;let i;try{i=await u({root:t.root,file:a(t.root,t.file).split("\\").join("/"),width:e,dark:t.dark,print:t.print,at:t.at})}catch(o){throw o instanceof Error&&o.name==="ReportPictureError"?new w("no-element",o.message,{exit:l.notFound,hint:"Write --at as a CSS selector of an element the page draws."}):o}const s=[`w${String(e)}`,...t.dark?["dark"]:[],...t.print?["print"]:[],...t.at===void 0?[]:[`at-${selectorName(t.at)}`]].join("-"),p=await E(g(t.cwd,t.out,c($(t.root,"frames",r),`${s}.png`)),await h(i.png,90)),n=i.findings;return{mode:"frame",source:"report",report:r,out:p,width:e,pageHeight:i.pageHeight,bands:i.bands,missing:n.missing,outside:n.outside,thrown:n.thrown,...n.unsettled===void 0?{}:{unsettled:n.unsettled}}}
@@ -1,10 +1,12 @@
1
1
  /*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
2
- import{relative as L,sep as _}from"node:path";import{z as t}from"zod";import{formatConsole as R,formatProblem as B}from"../text/index.js";import{sizeOf as H}from"@allyhub/build";import{COMPARE_DEFAULTS as N}from"@allyhub/measure";import{CUT_REVIEW_DEFAULTS as U,cutLine as G,dbText as S,silenceText as V}from"@allyhub/video-measure";import{consoleJson as T}from"@allyhub/project";import{PAGE_CAPTURE_DEFAULTS as x}from"@allyhub/browser";import{itemIdOf as J}from"@allyhub/formats";import{EXIT as A}from"@allyhub/protocol";import{defineCommand as b}from"../command.js";import{dir as F}from"../fields.js";import{parameters as O}from"../parameters.js";import{tellPresence as C}from"../presence.js";import{projectRoot as w}from"../project.js";import{VERSION_FIELDS as j,commandError as D,withVersion as $}from"../version.js";import{compareText as E,comparePictures as P}from"./frames/compare.js";import{isPicture as q,isVideo as z,usage as u}from"./frames/common.js";import{cutSheets as X}from"./frames/cuts.js";import{fileFrames as K}from"./frames/file.js";import{pageShot as Q}from"./frames/page.js";import{pieceMoments as Y,stillsSheet as Z}from"./frames/piece.js";import{docPicture as ee}from"./frames/doc.js";import{findDoc as te}from"@allyhub/doc-extension/cli";import{sheetPicture as oe}from"./frames/sheet.js";import{findSheet as W}from"@allyhub/sheet-extension/cli";function y(e){return[...e.problems.filter(a=>a.level==="error").map(B),...R(T(e.console))]}const v=e=>({problems:e.problems,...T(e.console)}),k=(e,i)=>w(e,i),re=t.strictObject({...j,item:t.string().optional().describe("The piece (its id, its file without its extension, or its file; default the project's only one), a sheet, a doc, or a video file: a path ending in .mp4, .mov, .webm, .m4v, .qt, .mkv or .avi is a file"),range:t.string().optional().describe("A sheet's: what to draw, a sheet (Summary), a range (Summary!B3:D9, or B3:D9 on the first sheet), columns (A:C) or rows (1:20); default its sheets, from A1"),page:t.string().optional().describe("A doc's: the pages to draw large, counted from 1 (2, 2-4, 1,5); default every page, small, tiled"),at:t.array(t.string()).optional().describe("Moments: seconds (from the start of --part when given) or anchors (@press, @/map a stretch's end, @press+0.2); a video file's are seconds. One is written as the frame itself, several are tiled. Without it, --part's still, or every part's still on one sheet"),part:t.string().optional().describe("The part --at, --from and --to count from; alone, its still"),from:t.number().optional().describe("A stretch of consecutive frames from this second (with --to), instead of --at"),to:t.number().optional().describe("The stretch's last second"),clip:t.string().optional().describe("Write the stretch as a small silent video, .gif, .mp4 or .webm by its extension; with --out, the grid too"),overlay:t.boolean().default(!1).describe("Draw over each tile the face boxes with ids, the person matte's outline, the covered areas and the text boxes (a deck's: each shape's box and name, and the lines nearly in line); places nothing. Alone, over every part's still"),beside:t.string().optional().describe("Another video file (a reference) whose frame at the same time goes on each tile's left"),grid:t.number().int().min(4).optional().describe("A video file at one --at: the frame at its own size with numbered lines every this many pixels"),out:t.string().optional().describe("Where the picture goes, always a WebP whatever the extension; default under .allyhub/work/frames/")});function ae(e){const i=[["--combo",e.combo!==void 0],["--part",e.part!==void 0],["--beside",e.beside!==void 0],["--overlay",e.overlay]].filter(([,a])=>a).map(([a])=>a);if(i.length>0)throw u("bad-option",`${i.join(" and ")} ${i.length===1?"is":"are"} a piece's: a video file has no combos or parts.`)}function ne(e){const i=[["--at",e.at!==void 0],["--part",e.part!==void 0],["--from",e.from!==void 0],["--to",e.to!==void 0],["--clip",e.clip!==void 0],["--overlay",e.overlay],["--beside",e.beside!==void 0],["--range",e.range!==void 0],["--combo",e.combo!==void 0]].filter(([,a])=>a).map(([a])=>a);if(i.length>0)throw u("bad-option",`${i.join(" and ")} ${i.length===1?"is":"are"} not a doc's: a doc has pages (--page), not moments.`)}export const frames=b({name:"frames",summary:"Pictures of a piece over time, drawn as the render draws them: every part's still on a sheet (default), a moment, a stretch tiled or as a clip, overlays; a sheet's cells, or a range of them; a doc's pages as they print, with how many; or any video file's frames",input:re,positional:["item"],output:t.looseObject({mode:t.enum(["sheet","frame","grid","clip"])}),examples:["allyhub frames launch/film","allyhub frames launch/film --at 2.5","allyhub frames launch/film --part hook --from 0 --to 1 --clip hook.gif","allyhub frames launch/film --at 1,2,3 --overlay","allyhub frames reference.mp4 --at 0,1,2","allyhub frames reference.mp4 --at 3 --grid 50","allyhub frames finance/budget --range 'Summary!A1:F20'","allyhub frames launch/plan","allyhub frames launch/plan --page 2-3"]},async(e,i)=>{const a=i.cwd;if(e.item!==void 0&&z(e.item)){ae(e);const o=await K({cwd:a,root:await k(a,e.dir),file:e.item,at:e.at,from:e.from,to:e.to,clip:e.clip,out:e.out,grid:e.grid}).catch(g=>{throw D(g)}),n=o.video,p=`${o.file} · ${n.duration.toFixed(2)} s · ${String(n.width)}×${String(n.height)} · ${String(n.fps)} fps`,f="clip"in o&&o.clip?`${o.clip.out} (${o.clip.type}, ${String(o.clip.frames)} frames at ${String(o.clip.fps)} fps, no sound)`:void 0;return{value:o,text:[p,..."out"in o?[`${o.out}${"tiles"in o?` (${String(o.tiles.length)} moments in ${String(o.cols)} columns)`:""}`]:[],...f?[f]:[]].join(`
3
- `)}}if(e.grid!==void 0)throw u("bad-option","--grid draws a video file's frame at its own size: give the file.");const d=await w(a,e.dir);if(e.item!==void 0&&await W(d,a,e.item)!==void 0){const o=await oe({cwd:a,root:d,item:e.item,range:e.range,out:e.out}),n=await W(d,a,e.item);return n!==void 0&&Object.keys(o.at).length>0&&await C(d,{doing:"looking",item:J(L(d,n).split(_).join("/")),place:o.at}),{value:o,text:[o.out,...o.cut].join(`
4
- `)}}const c=e.item===void 0?void 0:await te(d,a,e.item);if(c!==void 0){ne(e);const o=await ee({cwd:a,root:d,file:c,page:e.page,out:e.out,progress:p=>{i.progress(p)}}),n=o.drawn.length===o.pages?"every page":`page${o.drawn.length===1?"":"s"} ${o.drawn.join(", ")}`;return{value:o,text:[o.out,`${o.doc}: ${String(o.pages)} page${o.pages===1?"":"s"} on ${String(o.paper.width)} × ${String(o.paper.height)} mm paper; ${n} drawn`].join(`
5
- `)}}if(e.page!==void 0)throw u("bad-option","--page is a doc's: name the doc.");if(e.range!==void 0)throw u("bad-option","--range is a sheet's: name the sheet.");const l=e.at!==void 0||e.part!==void 0||e.from!==void 0||e.to!==void 0;if(!l&&(e.clip!==void 0||e.beside!==void 0))throw u("bad-option","--clip and --beside draw moments: give --at, --part, or --from and --to.");if(!l&&!e.overlay){const{result:o,...n}=await $(e,i,"render",g=>Z(g,{cwd:a,root:d,out:e.out})),{unit:p,...f}=o;return{value:{...f,...v(n)},text:[`${o.out} (${o.piece} · ${o.format} · ${String(o.parts.length)} ${o.parts.length===1?p.noun:p.plural})`,...y(n)].join(`
6
- `)}}const h=!l&&e.overlay,{result:r,...s}=await $(e,i,"render",async o=>{const n=await Y(o,{cwd:a,root:d,at:h?o.timeline.parts.map(I=>String(I.still)):e.at,part:e.part,from:e.from,to:e.to,clip:e.clip,out:e.out,overlay:e.overlay,beside:e.beside}),p="tiles"in n?n.tiles[0]:void 0,f=n.mode==="frame"?n.t:n.stretch?.from??p?.t,g=n.mode==="frame"?n.part:p?.part;return f!==void 0&&!h&&await C(d,{doing:"looking",item:o.piece.place,place:{t:f,...g===void 0?{}:{part:g}}}),n}),m=[];if(r.mode==="frame"&&m.push(`${r.out} (${r.piece} · ${r.format} · ${r.part} · ${r.t.toFixed(2)} s)`),r.mode==="grid"){m.push(`${r.out} (${r.piece} · ${String(r.tiles.length)} moments in ${String(r.cols)} columns)`,` ${r.tiles.map(n=>`${n.t.toFixed(r.stretch?3:2)} ${n.part}`).join(" · ")}`);const o=[...new Set(r.tiles.flatMap(n=>n.overlay?.missing??[]))];o.length>0&&m.push(` Not measured: ${o.join(", ")}.`)}return r.stretch&&m.push(` Stretch ${r.stretch.from.toFixed(3)}–${r.stretch.to.toFixed(3)} s, one frame in ${String(r.stretch.every)}: ${String(r.stretch.frames)} frames.`),"clip"in r&&r.clip&&m.push(`${r.clip.out} (${r.clip.type}, ${String(r.clip.frames)} frames at ${String(r.clip.fps)} fps, no sound)`),{value:{...r,...v(s)},text:[...m,...y(s)].join(`
7
- `)}}),framesCuts=b({name:"frames cuts",summary:"A review sheet per cut of a video (a cut take's jumps, part joins, a scenery camera's cuts): frames around it, waveform and level, the words each side, the sound at it",input:t.strictObject({...j,part:t.string().optional().describe("Only this part's cuts and its joins"),out:t.string().optional().describe("The folder the sheets go in; default .allyhub/work/cuts/"),params:O({span:t.number().positive().max(10).default(U.span).describe("Seconds shown on each side of a cut")})}),positional:["item"],output:t.looseObject({out:t.string(),cuts:t.array(t.looseObject({sheet:t.string()}))}),examples:["allyhub frames cuts launch/film","allyhub frames cuts launch/film --part hook"]},async(e,i)=>{const a=i.cwd,d=await w(a,e.dir),{result:c,...l}=await $(e,i,"render",s=>X(s,{cwd:a,root:d,part:e.part,out:e.out,review:{span:e.params.span}})),h=c.part===void 0?`${String(c.cuts.length)} cut${c.cuts.length===1?"":"s"}`:`${String(c.cuts.length)} of ${String(c.total)} cuts (part ${c.part} and its joins)`,r=[`${c.piece} · ${c.format} · ${h}; silence is sound under ${String(c.threshold)} dBFS`];for(const s of c.cuts){const m=s.sound?`level ${S(s.sound.levelDb)} / around ${S(s.sound.aroundDb)} dBFS, peak ${S(s.sound.peakDb)}, step ${s.sound.jumpDb<0?"−":"+"}${Math.abs(s.sound.jumpDb).toFixed(1)} dB`:"no sound";r.push(`${String(s.index).padStart(3)} ${s.t.toFixed(3).padStart(7)} s ${s.kind.padEnd(6)} ${G(s)}`,` silence at the cut: ${V(s.silence)} · ${m}`,` “${s.said.before}” | “${s.said.after}”${s.across?` · across the cut: “${s.across}”`:""}`,` ${s.sheet}`)}return{value:{...c,...v(l)},text:[...r,...y(l)].join(`
8
- `)}});const M=N;export const framesCompare=b({name:"frames compare",summary:"How a candidate picture differs from a reference, as numbers (ΔE, channels, SSIM, levels, grain, edges, regions) with a heatmap and a side-by-side: a piece's moment, a picture file or a video file's frame",input:t.strictObject({reference:t.string().describe("The reference picture (PNG, WebP, JPEG…)"),candidate:t.string().optional().describe("A piece (its id, its file without its extension, or its file; default the project's only one) at --at or --part's still; or a file by its extension: a picture (.png, .jpg, .webp…), or a video file's frame at --at (.mp4, .mov, .webm…)"),combo:j.combo,dir:F,at:t.string().optional().describe("The moment: seconds (from the start of --part when given) or an anchor of the piece; a video file's are seconds (default 0)"),part:t.string().optional().describe("The piece's part --at counts from; alone, its still"),refCrop:t.string().optional().describe("Cut the reference to x,y,width,height, or to an element of the elements.json beside it (frames web writes one)"),crop:t.string().optional().describe("Cut the candidate to x,y,width,height before any resize"),encode:t.string().optional().describe("Draw the candidate through this encode first, as a platform serves it: codec:kbps, h264 or hevc (hevc:618)"),out:t.string().optional().describe("Where its files go, a path without extension; default under .allyhub/work/compare/"),params:O({resize:t.enum(["stretch","width","none"]).default(M.resize).describe("When sizes differ: stretch the candidate to the reference, scale it to its width, or compare the common area"),shift:t.number().int().min(0).max(32).default(M.shift).describe("Search the best offset within this many pixels each way")})}),positional:["reference","candidate"],output:t.looseObject({reference:t.string(),files:t.looseObject({side:t.string(),heatmap:t.string()})}),examples:["allyhub frames compare reference.png launch/film --at 2.5 --encode hevc:618","allyhub frames compare reference.png shot.webp --ref-crop cta","allyhub frames compare reference.png theirs.mp4 --at 3"]},async(e,i)=>{const a=i.cwd,d=e.params,c=e.candidate!==void 0&&(q(e.candidate)||z(e.candidate))?e.candidate:void 0,l=m=>({cwd:a,root:m,reference:e.reference,file:c,at:e.at===void 0?void 0:[e.at],part:e.part,refCrop:e.refCrop,crop:e.crop,encode:e.encode,out:e.out,options:{shift:d.shift,resize:d.resize}});if(c!==void 0){if(e.combo!==void 0||e.part!==void 0)throw u("bad-option","--combo and --part are a piece's: the candidate is a file.");const m=await P(l(await k(a,e.dir)),void 0).catch(o=>{throw D(o)});return{value:m,text:E(m)}}const h=await w(a,e.dir),{result:r,...s}=await $({...e,item:e.candidate},i,"render",m=>P(l(h),m));return{value:{...r,...v(s)},text:[E(r),...y(s)].join(`
9
- `)}}),framesWeb=b({name:"frames web",summary:"A web page's screenshot with its named elements' boxes in the image's pixels, for a screen demo",input:t.strictObject({url:t.string().describe("The page: an address, or an HTML file on this computer"),el:t.array(t.string()).optional().describe("An element to locate, name=selector (CSS, or text=<words>); [data-el] elements are found too"),click:t.array(t.string()).optional().describe("Selectors clicked in order before the shot (close a banner, open a dialog)"),full:t.boolean().default(!1).describe("The whole page, not one viewport"),out:t.string().optional().describe("Where the picture goes (a WebP), its boxes in <out>.elements.json beside it; default under .allyhub/work/pages/"),dir:F,size:t.string().default(`${String(x.width)}x${String(x.height)}`).describe("The viewport, WIDTHxHEIGHT in CSS pixels"),scale:t.number().min(1).max(4).default(x.scale).describe("Image pixels per CSS pixel; 2 draws a high-density screen, sharp when a camera goes in"),wait:t.number().int().min(0).optional().describe("Milliseconds to wait after loading and clicking")}),positional:["url"],output:t.looseObject({out:t.string(),elementsFile:t.string()}),examples:["allyhub frames web https://example.com --el cta=text=Sign\\ up --scale 2 --out assets/media/home","allyhub frames web page.html --click '#accept' --full"]},async(e,i)=>{const a=i.cwd,[d,c]=H(e.size),l=await Q({cwd:a,root:await k(a,e.dir),url:e.url,out:e.out,el:e.el,click:e.click,width:d,height:c,scale:e.scale,full:e.full,wait:e.wait});return{value:l,text:[`${l.out}: ${String(l.width)}×${String(l.height)}${l.scale===1?"":` (${String(l.scale)} image pixels per CSS pixel)`}, ${String(Object.keys(l.elements).length)} elements (${Object.keys(l.elements).join(", ")||"none"}) in ${l.elementsFile}`,...l.missing.length>0?[`Not found: ${l.missing.join(", ")} (the selector is wrong, or something must be opened with --click first).`]:[]].join(`
10
- `),exit:l.missing.length>0?A.failed:A.ok}}),FRAMES_COMMANDS=[frames,framesCuts,framesCompare,framesWeb];
2
+ import{relative as _,sep as G}from"node:path";import{z as r}from"zod";import{formatConsole as H,formatProblem as N}from"../text/index.js";import{sizeOf as B}from"@allyhub/build";import{COMPARE_DEFAULTS as U}from"@allyhub/measure";import{CUT_REVIEW_DEFAULTS as J,cutLine as V,dbText as x,silenceText as q}from"@allyhub/video-measure";import{consoleJson as T}from"@allyhub/project";import{PAGE_CAPTURE_DEFAULTS as j}from"@allyhub/browser";import{itemIdOf as X}from"@allyhub/formats";import{EXIT as O}from"@allyhub/protocol";import{defineCommand as w}from"../command.js";import{dir as C}from"../fields.js";import{parameters as D}from"../parameters.js";import{tellPresence as E}from"../presence.js";import{projectRoot as $}from"../project.js";import{VERSION_FIELDS as k,commandError as P,withVersion as y}from"../version.js";import{compareText as W,comparePictures as z}from"./frames/compare.js";import{isPicture as A,isVideo as M,usage as m}from"./frames/common.js";import{cutSheets as K}from"./frames/cuts.js";import{fileFrames as Q}from"./frames/file.js";import{pageShot as Y}from"./frames/page.js";import{pieceMoments as Z,stillsSheet as ee}from"./frames/piece.js";import{docPicture as te}from"./frames/doc.js";import{findDoc as re}from"@allyhub/doc-extension/cli";import{sheetPicture as oe}from"./frames/sheet.js";import{findSheet as I}from"@allyhub/sheet-extension/cli";import{reportFrames as ae}from"./frames/report.js";import{findReport as ne}from"@allyhub/report-extension/cli";function v(e){return[...e.problems.filter(a=>a.level==="error").map(N),...H(T(e.console))]}const S=e=>({problems:e.problems,...T(e.console)}),F=(e,i)=>$(e,i),ie=r.strictObject({...k,item:r.string().optional().describe("The piece (its id, its file without its extension, or its file; default the project's only one), a sheet, a doc, a report, or a video file: a path ending in .mp4, .mov, .webm, .m4v, .qt, .mkv or .avi is a file"),range:r.string().optional().describe("A sheet's: what to draw, a sheet (Summary), a range (Summary!B3:D9, or B3:D9 on the first sheet), columns (A:C) or rows (1:20); default its sheets, from A1"),page:r.string().optional().describe("A doc's: the pages to draw large, counted from 1 (2, 2-4, 1,5); default every page, small, tiled"),at:r.array(r.string()).optional().describe("Moments: seconds (from the start of --part when given) or anchors (@press, @/map a stretch's end, @press+0.2); a video file's are seconds. One is written as the frame itself, several are tiled. Without it, --part's still, or every part's still on one sheet. A report's: a CSS selector, that element alone"),width:r.number().int().min(200).max(3840).optional().describe("A report's: the page's width, CSS pixels (default 1440; 375 a phone's)"),dark:r.boolean().default(!1).describe("A report's: drawn as a reader who asks for dark sees it"),print:r.boolean().default(!1).describe("A report's: laid out for paper (@media print) at the width given, as one long picture"),part:r.string().optional().describe("The part --at, --from and --to count from; alone, its still"),from:r.number().optional().describe("A stretch of consecutive frames from this second (with --to), instead of --at"),to:r.number().optional().describe("The stretch's last second"),clip:r.string().optional().describe("Write the stretch as a small silent video, .gif, .mp4 or .webm by its extension; with --out, the grid too"),overlay:r.boolean().default(!1).describe("Draw over each tile the face boxes with ids, the person matte's outline, the covered areas and the text boxes (a deck's: each shape's box and name, and the lines nearly in line); places nothing. Alone, over every part's still"),beside:r.string().optional().describe("Another video file (a reference) whose frame at the same time goes on each tile's left"),grid:r.number().int().min(4).optional().describe("A video file at one --at: the frame at its own size with numbered lines every this many pixels"),out:r.string().optional().describe("Where the picture goes, always a WebP whatever the extension; default under .allyhub/work/frames/")});function se(e){const i=[["--combo",e.combo!==void 0],["--part",e.part!==void 0],["--beside",e.beside!==void 0],["--overlay",e.overlay]].filter(([,a])=>a).map(([a])=>a);if(i.length>0)throw m("bad-option",`${i.join(" and ")} ${i.length===1?"is":"are"} a piece's: a video file has no combos or parts.`)}function de(e){const i=[["--at",e.at!==void 0],["--part",e.part!==void 0],["--from",e.from!==void 0],["--to",e.to!==void 0],["--clip",e.clip!==void 0],["--overlay",e.overlay],["--beside",e.beside!==void 0],["--range",e.range!==void 0],["--combo",e.combo!==void 0]].filter(([,a])=>a).map(([a])=>a);if(i.length>0)throw m("bad-option",`${i.join(" and ")} ${i.length===1?"is":"are"} not a doc's: a doc has pages (--page), not moments.`)}function le(e){const i=[["--part",e.part!==void 0],["--from",e.from!==void 0],["--to",e.to!==void 0],["--clip",e.clip!==void 0],["--overlay",e.overlay],["--beside",e.beside!==void 0],["--range",e.range!==void 0],["--page",e.page!==void 0],["--combo",e.combo!==void 0],["--at with more than one selector",(e.at?.length??0)>1]].filter(([,a])=>a).map(([a])=>a);if(i.length>0)throw m("bad-option",`${i.join(" and ")} ${i.length===1?"is":"are"} not a report's: a report is one page (--width, --dark, --print, --at <selector>).`)}export const frames=w({name:"frames",summary:"Pictures of a piece over time, drawn as the render draws them: every part's still on a sheet (default), a moment, a stretch tiled or as a clip, overlays; a sheet's cells, or a range of them; a doc's pages as they print, with how many; a report's page at a width, light or dark, or laid out for print; or any video file's frames",input:ie,positional:["item"],output:r.looseObject({mode:r.enum(["sheet","frame","grid","clip"])}),examples:["allyhub frames launch/film","allyhub frames launch/film --at 2.5","allyhub frames launch/film --part hook --from 0 --to 1 --clip hook.gif","allyhub frames launch/film --at 1,2,3 --overlay","allyhub frames reference.mp4 --at 0,1,2","allyhub frames reference.mp4 --at 3 --grid 50","allyhub frames finance/budget --range 'Summary!A1:F20'","allyhub frames launch/plan","allyhub frames launch/plan --page 2-3","allyhub frames research/channels/channels --width 375","allyhub frames research/channels/channels --at '#tiers'"]},async(e,i)=>{const a=i.cwd;if(e.item!==void 0&&M(e.item)){se(e);const t=await Q({cwd:a,root:await F(a,e.dir),file:e.item,at:e.at,from:e.from,to:e.to,clip:e.clip,out:e.out,grid:e.grid}).catch(b=>{throw P(b)}),n=t.video,c=`${t.file} · ${n.duration.toFixed(2)} s · ${String(n.width)}×${String(n.height)} · ${String(n.fps)} fps`,g="clip"in t&&t.clip?`${t.clip.out} (${t.clip.type}, ${String(t.clip.frames)} frames at ${String(t.clip.fps)} fps, no sound)`:void 0;return{value:t,text:[c,..."out"in t?[`${t.out}${"tiles"in t?` (${String(t.tiles.length)} moments in ${String(t.cols)} columns)`:""}`]:[],...g?[g]:[]].join(`
3
+ `)}}if(e.grid!==void 0)throw m("bad-option","--grid draws a video file's frame at its own size: give the file.");const d=await $(a,e.dir);if(e.item!==void 0&&await I(d,a,e.item)!==void 0){const t=await oe({cwd:a,root:d,item:e.item,range:e.range,out:e.out}),n=await I(d,a,e.item);return n!==void 0&&Object.keys(t.at).length>0&&await E(d,{doing:"looking",item:X(_(d,n).split(G).join("/")),place:t.at}),{value:t,text:[t.out,...t.cut].join(`
4
+ `)}}const l=e.item===void 0?void 0:await ne(d,a,e.item);if(l!==void 0){le(e);const t=await ae({cwd:a,root:d,file:l,width:e.width,dark:e.dark,print:e.print,at:e.at?.[0],out:e.out}),n=[...t.missing.map(c=>`asks for ${c.path}, not in the project`),...t.outside.map(c=>`asks for ${c}, outside the project: refused`),...t.thrown.map(c=>`threw ${c.text.split(`
5
+ `)[0]??""}`),...t.unsettled===void 0?[]:[t.unsettled]];return{value:t,text:[t.out,`${t.report}: ${String(t.width)} px wide, ${String(t.pageHeight)} px tall${t.bands>1?`, in ${String(t.bands)} bands side by side`:""}`,...n.map(c=>`${t.report}: ${c}`)].join(`
6
+ `)}}if(e.width!==void 0||e.dark||e.print)throw m("bad-option","--width, --dark and --print are a report's: name the report.");const s=e.item===void 0?void 0:await re(d,a,e.item);if(s!==void 0){de(e);const t=await te({cwd:a,root:d,file:s,page:e.page,out:e.out,progress:c=>{i.progress(c)}}),n=t.drawn.length===t.pages?"every page":`page${t.drawn.length===1?"":"s"} ${t.drawn.join(", ")}`;return{value:t,text:[t.out,`${t.doc}: ${String(t.pages)} page${t.pages===1?"":"s"} on ${String(t.paper.width)} × ${String(t.paper.height)} mm paper; ${n} drawn`].join(`
7
+ `)}}if(e.page!==void 0)throw m("bad-option","--page is a doc's: name the doc.");if(e.range!==void 0)throw m("bad-option","--range is a sheet's: name the sheet.");const h=e.at!==void 0||e.part!==void 0||e.from!==void 0||e.to!==void 0;if(!h&&(e.clip!==void 0||e.beside!==void 0))throw m("bad-option","--clip and --beside draw moments: give --at, --part, or --from and --to.");if(!h&&!e.overlay){const{result:t,...n}=await y(e,i,"render",b=>ee(b,{cwd:a,root:d,out:e.out})),{unit:c,...g}=t;return{value:{...g,...S(n)},text:[`${t.out} (${t.piece} · ${t.format} · ${String(t.parts.length)} ${t.parts.length===1?c.noun:c.plural})`,...v(n)].join(`
8
+ `)}}const f=!h&&e.overlay,{result:o,...p}=await y(e,i,"render",async t=>{const n=await Z(t,{cwd:a,root:d,at:f?t.timeline.parts.map(L=>String(L.still)):e.at,part:e.part,from:e.from,to:e.to,clip:e.clip,out:e.out,overlay:e.overlay,beside:e.beside}),c="tiles"in n?n.tiles[0]:void 0,g=n.mode==="frame"?n.t:n.stretch?.from??c?.t,b=n.mode==="frame"?n.part:c?.part;return g!==void 0&&!f&&await E(d,{doing:"looking",item:t.piece.place,place:{t:g,...b===void 0?{}:{part:b}}}),n}),u=[];if(o.mode==="frame"&&u.push(`${o.out} (${o.piece} · ${o.format} · ${o.part} · ${o.t.toFixed(2)} s)`),o.mode==="grid"){u.push(`${o.out} (${o.piece} · ${String(o.tiles.length)} moments in ${String(o.cols)} columns)`,` ${o.tiles.map(n=>`${n.t.toFixed(o.stretch?3:2)} ${n.part}`).join(" · ")}`);const t=[...new Set(o.tiles.flatMap(n=>n.overlay?.missing??[]))];t.length>0&&u.push(` Not measured: ${t.join(", ")}.`)}return o.stretch&&u.push(` Stretch ${o.stretch.from.toFixed(3)}–${o.stretch.to.toFixed(3)} s, one frame in ${String(o.stretch.every)}: ${String(o.stretch.frames)} frames.`),"clip"in o&&o.clip&&u.push(`${o.clip.out} (${o.clip.type}, ${String(o.clip.frames)} frames at ${String(o.clip.fps)} fps, no sound)`),{value:{...o,...S(p)},text:[...u,...v(p)].join(`
9
+ `)}}),framesCuts=w({name:"frames cuts",summary:"A review sheet per cut of a video (a cut take's jumps, part joins, a scenery camera's cuts): frames around it, waveform and level, the words each side, the sound at it",input:r.strictObject({...k,part:r.string().optional().describe("Only this part's cuts and its joins"),out:r.string().optional().describe("The folder the sheets go in; default .allyhub/work/cuts/"),params:D({span:r.number().positive().max(10).default(J.span).describe("Seconds shown on each side of a cut")})}),positional:["item"],output:r.looseObject({out:r.string(),cuts:r.array(r.looseObject({sheet:r.string()}))}),examples:["allyhub frames cuts launch/film","allyhub frames cuts launch/film --part hook"]},async(e,i)=>{const a=i.cwd,d=await $(a,e.dir),{result:l,...s}=await y(e,i,"render",o=>K(o,{cwd:a,root:d,part:e.part,out:e.out,review:{span:e.params.span}})),h=l.part===void 0?`${String(l.cuts.length)} cut${l.cuts.length===1?"":"s"}`:`${String(l.cuts.length)} of ${String(l.total)} cuts (part ${l.part} and its joins)`,f=[`${l.piece} · ${l.format} · ${h}; silence is sound under ${String(l.threshold)} dBFS`];for(const o of l.cuts){const p=o.sound?`level ${x(o.sound.levelDb)} / around ${x(o.sound.aroundDb)} dBFS, peak ${x(o.sound.peakDb)}, step ${o.sound.jumpDb<0?"−":"+"}${Math.abs(o.sound.jumpDb).toFixed(1)} dB`:"no sound";f.push(`${String(o.index).padStart(3)} ${o.t.toFixed(3).padStart(7)} s ${o.kind.padEnd(6)} ${V(o)}`,` silence at the cut: ${q(o.silence)} · ${p}`,` “${o.said.before}” | “${o.said.after}”${o.across?` · across the cut: “${o.across}”`:""}`,` ${o.sheet}`)}return{value:{...l,...S(s)},text:[...f,...v(s)].join(`
10
+ `)}});const R=U;export const framesCompare=w({name:"frames compare",summary:"How a candidate picture differs from a reference, as numbers (ΔE, channels, SSIM, levels, grain, edges, regions) with a heatmap and a side-by-side: a piece's moment, a picture file or a video file's frame",input:r.strictObject({reference:r.string().describe("The reference picture (PNG, WebP, JPEG…)"),candidate:r.string().optional().describe("A piece (its id, its file without its extension, or its file; default the project's only one) at --at or --part's still; or a file by its extension: a picture (.png, .jpg, .webp…), or a video file's frame at --at (.mp4, .mov, .webm…)"),combo:k.combo,dir:C,at:r.string().optional().describe("The moment: seconds (from the start of --part when given) or an anchor of the piece; a video file's are seconds (default 0)"),part:r.string().optional().describe("The piece's part --at counts from; alone, its still"),refCrop:r.string().optional().describe("Cut the reference to x,y,width,height, or to an element of the elements.json beside it (frames web writes one)"),crop:r.string().optional().describe("Cut the candidate to x,y,width,height before any resize"),encode:r.string().optional().describe("Draw the candidate through this encode first, as a platform serves it: codec:kbps, h264 or hevc (hevc:618)"),out:r.string().optional().describe("Where its files go, a path without extension; default under .allyhub/work/compare/"),params:D({resize:r.enum(["stretch","width","none"]).default(R.resize).describe("When sizes differ: stretch the candidate to the reference, scale it to its width, or compare the common area"),shift:r.number().int().min(0).max(32).default(R.shift).describe("Search the best offset within this many pixels each way")})}),positional:["reference","candidate"],output:r.looseObject({reference:r.string(),files:r.looseObject({side:r.string(),heatmap:r.string()})}),examples:["allyhub frames compare reference.png launch/film --at 2.5 --encode hevc:618","allyhub frames compare reference.png shot.webp --ref-crop cta","allyhub frames compare reference.png theirs.mp4 --at 3"]},async(e,i)=>{const a=i.cwd,d=e.params;if(!A(e.reference))throw m("bad-reference",`${e.reference} is not a picture: the reference comes first, a picture file (PNG, WebP, JPEG…), then the piece or file to compare with it.`,`For example: allyhub frames compare ${e.candidate!==void 0&&A(e.candidate)?e.candidate:"reference.png"} ${e.reference}`);const l=e.candidate!==void 0&&(A(e.candidate)||M(e.candidate))?e.candidate:void 0,s=p=>({cwd:a,root:p,reference:e.reference,file:l,at:e.at===void 0?void 0:[e.at],part:e.part,refCrop:e.refCrop,crop:e.crop,encode:e.encode,out:e.out,options:{shift:d.shift,resize:d.resize}});if(l!==void 0){if(e.combo!==void 0||e.part!==void 0)throw m("bad-option","--combo and --part are a piece's: the candidate is a file.");const p=await z(s(await F(a,e.dir)),void 0).catch(u=>{throw P(u)});return{value:p,text:W(p)}}const h=await $(a,e.dir),{result:f,...o}=await y({...e,item:e.candidate},i,"render",p=>z(s(h),p));return{value:{...f,...S(o)},text:[W(f),...v(o)].join(`
11
+ `)}}),framesWeb=w({name:"frames web",summary:"A web page's screenshot with its named elements' boxes in the image's pixels, for a screen demo",input:r.strictObject({url:r.string().describe("The page: an address, or an HTML file on this computer"),el:r.array(r.string()).optional().describe("An element to locate, name=selector (CSS, or text=<words>); [data-el] elements are found too"),click:r.array(r.string()).optional().describe("Selectors clicked in order before the shot (close a banner, open a dialog)"),full:r.boolean().default(!1).describe("The whole page, not one viewport"),out:r.string().optional().describe("Where the picture goes (a WebP), its boxes in <out>.elements.json beside it; default under .allyhub/work/pages/"),dir:C,size:r.string().default(`${String(j.width)}x${String(j.height)}`).describe("The viewport, WIDTHxHEIGHT in CSS pixels"),scale:r.number().min(1).max(4).default(j.scale).describe("Image pixels per CSS pixel; 2 draws a high-density screen, sharp when a camera goes in"),wait:r.number().int().min(0).optional().describe("Milliseconds to wait after loading and clicking")}),positional:["url"],output:r.looseObject({out:r.string(),elementsFile:r.string()}),examples:["allyhub frames web https://example.com --el cta=text=Sign\\ up --scale 2 --out assets/media/home","allyhub frames web page.html --click '#accept' --full"]},async(e,i)=>{const a=i.cwd,[d,l]=B(e.size),s=await Y({cwd:a,root:await F(a,e.dir),url:e.url,out:e.out,el:e.el,click:e.click,width:d,height:l,scale:e.scale,full:e.full,wait:e.wait});return{value:s,text:[`${s.out}: ${String(s.width)}×${String(s.height)}${s.scale===1?"":` (${String(s.scale)} image pixels per CSS pixel)`}, ${String(Object.keys(s.elements).length)} elements (${Object.keys(s.elements).join(", ")||"none"}) in ${s.elementsFile}`,...s.missing.length>0?[`Not found: ${s.missing.join(", ")} (the selector is wrong, or something must be opened with --click first).`]:[]].join(`
12
+ `),exit:s.missing.length>0?O.failed:O.ok}}),FRAMES_COMMANDS=[frames,framesCuts,framesCompare,framesWeb];
@@ -1,2 +1,2 @@
1
1
  /*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
2
- import{add as n,addSearch as p}from"./add.js";import{align as e}from"./align.js";import{authLogin as s,authStatus as f}from"./auth.js";import{orgsList as l}from"./orgs.js";import{MAIL_COMMANDS as S}from"./mail.js";import{check as a}from"./check.js";import{dev as C}from"./dev.js";import{doctor as d}from"./doctor.js";import{EXTENSIONS_SOURCE as c,builtInCommands as M}from"./contributed.js";import{doctorExtensions as O}from"./extensions.js";import{FRAMES_COMMANDS as E}from"./frames.js";import{INSPECT_COMMANDS as o,VIEWS_SOURCE as u,inspectCommands as N}from"./inspect/index.js";import{render as h}from"./render.js";import{skills as A,skillsShow as _}from"./skills.js";import{CLOUD_SOURCE as D,upload as x}from"./cloud-tools.js";export const COMMANDS=[a,...o,h,...E,C,n,p,A,_,e,s,f,l,x,...S,d,O],COMMAND_SOURCES=[D,c,u];let t;export function allCommands(){return t??=Promise.all([N(),M()]).then(([m,i])=>{const r=COMMANDS.indexOf(o[0]);return[...COMMANDS.slice(0,r),...m,...COMMANDS.slice(r+o.length),...i]}),t}
2
+ import{add as s,addSearch as e}from"./add.js";import{align as n}from"./align.js";import{authLogin as p,authStatus as f}from"./auth.js";import{orgsList as l,orgsUse as S}from"./orgs.js";import{MAIL_COMMANDS as a}from"./mail.js";import{check as C}from"./check.js";import{dev as d}from"./dev.js";import{doctor as c}from"./doctor.js";import{EXTENSIONS_SOURCE as M,builtInCommands as O}from"./contributed.js";import{doctorExtensions as E}from"./extensions.js";import{FRAMES_COMMANDS as u}from"./frames.js";import{INSPECT_COMMANDS as o,VIEWS_SOURCE as N,inspectCommands as h}from"./inspect/index.js";import{render as A}from"./render.js";import{skills as _,skillsShow as D}from"./skills.js";import{CLOUD_SOURCE as U,upload as g}from"./cloud-tools.js";export const COMMANDS=[C,...o,A,...u,d,s,e,_,D,n,p,f,l,S,g,...a,c,E],COMMAND_SOURCES=[U,M,N];let t;export function allCommands(){return t??=Promise.all([h(),O()]).then(([m,i])=>{const r=COMMANDS.indexOf(o[0]);return[...COMMANDS.slice(0,r),...m,...COMMANDS.slice(r+o.length),...i]}),t}
@@ -1,3 +1,5 @@
1
1
  /*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
2
- import{z as s}from"zod";import{FACTS_HEAD as c,MOMENTS as d,STRETCH as x,allFindings as g}from"@allyhub/build";import{consoleJson as m}from"@allyhub/project";import{momentsIn as h}from"@allyhub/video-measure";import{EXIT as f}from"@allyhub/protocol";import{countFacts as b}from"@allyhub/diagnostics";import{CommandError as a}from"../../command.js";import{builtInExtensions as $,extensionsAt as p,factKindsOf as l,factOwner as w}from"../extensions.js";import{formatConsole as y,formatFacts as k,formatProblem as v}from"../../text/index.js";import{known as E}from"../../version.js";export const plural=(e,t)=>`${String(e)} ${t}${e===1?"":"s"}`,sec=e=>e.toFixed(2),boxText=e=>`[${e.join(",")}]`,HEAD=c;export{d as MOMENTS,x as STRETCH};export const kind=s.array(s.string()).optional().describe(`Only facts of these kinds: ${l($()).map(e=>e.kind).join(", ")}`),all=g;export function kindsOf(e,t){if(e===void 0)return;const n=l(p(t)).map(o=>o.kind);return e.map(o=>{if(!n.includes(o))throw new a("bad-kind",`There is no kind of fact ${o}.`,{exit:f.usage,hint:`Kinds: ${n.join(", ")}.`});return o})}export function momentsOf(e,t){if(e.at!==void 0&&e.every!==void 0)throw new a("bad-option","--at and --every do not go together.",{exit:f.usage});const n=e.at?.map(o=>{const r=Number(o.replace(/s$/u,""));return o.trim().startsWith("@")||!Number.isFinite(r)?o:r});return E(()=>h(t.timeline,{...n===void 0?{}:{at:n},...e.every===void 0?{}:{every:e.every},part:e.part,from:e.from,to:e.to},t.target))}export function pageLines(e){const t=e.problems.filter(n=>n.level==="error");return[...t.length>0?["Must fix (facts may be missing where they are):",...t.map(v)]:[],...y(m(e.console))]}export const pageJson=e=>({problems:e.problems.filter(t=>t.level==="error"),...m(e.console)});export function factsResult(e,t,n,o=[]){return{value:{facts:e,counts:b(e),total:n.total??e.length,...n.extra,...pageJson(t)},text:[`${plural(e.length,"fact")} measured now: ${HEAD}`,...k(e,{all:n.all}),...o,...pageLines(t)].join(`
3
- `)}}export function unseenKinds(e,t,n){const o=p(n);return(e??[]).flatMap(r=>{if(t.some(u=>u.kind===r))return[];const i=w(o,r);return i?[{kind:r,...i}]:[]})}export const unseenLines=e=>e.map(t=>`No ${t.kind} facts here. It is ${t.extension}'s: ${t.about}`);
2
+ import{mkdirSync as d,writeFileSync as x}from"node:fs";import{dirname as g,join as h}from"node:path";import{z as s}from"zod";import{FACTS_HEAD as $,MOMENTS as b,STRETCH as y,allFindings as w}from"@allyhub/build";import{consoleJson as m}from"@allyhub/project";import{momentsIn as k}from"@allyhub/video-measure";import{EXIT as f}from"@allyhub/protocol";import{WORK_DIR as v}from"@allyhub/formats";import{countFacts as E}from"@allyhub/diagnostics";import{CommandError as p}from"../../command.js";import{builtInExtensions as F,extensionsAt as u,factKindsOf as c,factOwner as O}from"../extensions.js";import{formatConsole as T,formatFacts as a,formatProblem as j}from"../../text/index.js";import{known as S}from"../../version.js";export const plural=(e,t)=>`${String(e)} ${t}${e===1?"":"s"}`,sec=e=>e.toFixed(2),boxText=e=>`[${e.join(",")}]`,HEAD=$;export{b as MOMENTS,y as STRETCH};export const kind=s.array(s.string()).optional().describe(`Only facts of these kinds: ${c(F()).map(e=>e.kind).join(", ")}`),all=w;export function kindsOf(e,t){if(e===void 0)return;const n=c(u(t)).map(o=>o.kind);return e.map(o=>{if(!n.includes(o))throw new p("bad-kind",`There is no kind of fact ${o}.`,{exit:f.usage,hint:`Kinds: ${n.join(", ")}.`});return o})}export function momentsOf(e,t){if(e.at!==void 0&&e.every!==void 0)throw new p("bad-option","--at and --every do not go together.",{exit:f.usage});const n=e.at?.map(o=>{const r=Number(o.replace(/s$/u,""));return o.trim().startsWith("@")||!Number.isFinite(r)?o:r});return S(()=>k(t.timeline,{...n===void 0?{}:{at:n},...e.every===void 0?{}:{every:e.every},part:e.part,from:e.from,to:e.to},t.target))}export function pageLines(e){const t=e.problems.filter(n=>n.level==="error");return[...t.length>0?["Must fix (facts may be missing where they are):",...t.map(j)]:[],...T(m(e.console))]}export const pageJson=e=>({problems:e.problems.filter(t=>t.level==="error"),...m(e.console)});export function factLines(e,t,n){const o=a(e,{all:t});if(t||n===void 0)return o;const r=a(e,{all:!0});return o.some(i=>/^ {4}… \d+ more \(/u.test(i))?(d(g(n),{recursive:!0}),x(n,`${r.join(`
3
+ `)}
4
+ `),[...o,`Every finding, a line each: ${n}`]):o}export const factsFile=(e,t)=>h(e,v,"inspect",`${t.replace(/[^\w.-]+/gu,"-")}.txt`);export function factsResult(e,t,n,o=[]){return{value:{facts:e,counts:E(e),total:n.total??e.length,...n.extra,...pageJson(t)},text:[`${plural(e.length,"fact")} measured now: ${HEAD}`,...factLines(e,n.all,n.save),...o,...pageLines(t)].join(`
5
+ `)}}export function unseenKinds(e,t,n){const o=u(n);return(e??[]).flatMap(r=>{if(t.some(l=>l.kind===r))return[];const i=O(o,r);return i?[{kind:r,...i}]:[]})}export const unseenLines=e=>e.map(t=>`No ${t.kind} facts here. It is ${t.extension}'s: ${t.about}`);
@@ -1,4 +1,4 @@
1
1
  /*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
2
- import{z as f}from"zod";import{itemKindBuild as S,projectItems as g}from"@allyhub/build";import{NEVER_CANCELLED as C}from"@allyhub/extension-api";import{consoleJson as L}from"@allyhub/project";import{countFacts as k,filterFacts as y}from"@allyhub/diagnostics";import{defineCommand as A}from"../../command.js";import{dir as F}from"../../fields.js";import{itemNamed as N,projectRoot as I}from"../../project.js";import{formatFacts as j}from"../../text/index.js";import{checkIndexed as K,combosOf as R,commandError as T}from"../../version.js";import{HEAD as O,STRETCH as z,all as D,kind as H,kindsOf as P,pageLines as B,plural as h,unseenKinds as v,unseenLines as E}from"./common.js";import{extensionsAt as J,factKindsOf as V,kindsAt as x}from"../extensions.js";async function w(t,i,n){const e=J(t),o=await e.kindProvider(i.kind);if(!o?.facts)return;const r=new Set(V(e).map(s=>s.kind));return(await o.facts(i,{root:t,tool:s=>Promise.reject(new Error(`No project tool ${s} in the CLI.`))},n,C)??[]).filter(s=>r.has(s.kind))}async function _(t,i){const{items:n}=await g(t,x(t)),e=[];for(const o of n)e.push(...await w(t,o,i)??[]);return e}async function q(t,i,n){const e=x(t),{items:o}=await g(t,e),r=N(o,t,i,n);if(!r)return;const a=await S(e,r);return{item:r,onStage:a?.onStage===!0}}export const inspect=A({name:"inspect",summary:"The check's facts, for you to judge, never problems: by kind, part and time",input:f.strictObject({item:f.string().optional().describe("Only this item: its id (its file without its extension) or its file, or a folder of items"),combo:f.array(f.string()).optional().describe("Only combos matching name=value pairs joined with commas (lang=zh-cn,hook=b), or a combo's id (c03)"),kind:H,...z,all:D(),dir:F}),positional:["item"],output:f.looseObject({}),examples:["allyhub inspect","allyhub inspect launch/film --kind text-time,text-covered","allyhub inspect launch/film --part hook --all"]},async(t,i)=>{try{const n=await I(i.cwd,t.dir),e=P(t.kind,n),o=t.item===void 0?void 0:await q(n,i.cwd,t.item),r=o?.onStage===!1?o.item:void 0,a=r&&await w(n,r,{all:t.all});if(a){const d=a,m=y(d,{kinds:e}),p=v(e,m,n);return{value:{facts:m,counts:k(m),total:d.length,problems:[],...p.length>0?{unseen:p}:{}},text:[`${h(m.length,"fact")}: ${O}`,...j(m,{all:t.all}),...E(p)].join(`
3
- `)}}const s=await K({dir:n,...t.item===void 0?{}:{piece:t.item},combos:R(t)},i),l=[...s.facts,...t.item===void 0?await _(n,{all:t.all}):o===void 0?[]:await w(n,o.item,{all:t.all})??[]],c=y(l,{kinds:e,part:t.part,from:t.from,to:t.to}),b=s.problems.filter(d=>d.level==="error"),u=v(e,c,n),$=c.length===l.length?h(l.length,"fact"):`${h(c.length,"fact")} of ${String(l.length)}`;return{value:{facts:c,counts:k(c),total:l.length,problems:b,...u.length>0?{unseen:u}:{},...L(s.console)},text:[`${$}: ${O}`,...j(c,{all:t.all}),...E(u),...B({problems:b,console:s.console})].join(`
4
- `)}}catch(n){throw T(n)}});
2
+ import{z as f}from"zod";import{itemKindBuild as S,projectItems as b}from"@allyhub/build";import{NEVER_CANCELLED as C}from"@allyhub/extension-api";import{consoleJson as A}from"@allyhub/project";import{countFacts as g,filterFacts as j}from"@allyhub/diagnostics";import{defineCommand as F}from"../../command.js";import{dir as N}from"../../fields.js";import{itemNamed as I,projectRoot as K}from"../../project.js";import{checkIndexed as R,combosOf as T,commandError as z}from"../../version.js";import{factLines as y,factsFile as $,HEAD as O,STRETCH as D,all as H,kind as P,kindsOf as B,pageLines as J,plural as h,unseenKinds as v,unseenLines as E}from"./common.js";import{extensionsAt as V,factKindsOf as _,kindsAt as x}from"../extensions.js";async function w(t,i,n){const e=V(t),o=await e.kindProvider(i.kind);if(!o?.facts)return;const r=new Set(_(e).map(s=>s.kind));return(await o.facts(i,{root:t,tool:s=>Promise.reject(new Error(`No project tool ${s} in the CLI.`))},n,C)??[]).filter(s=>r.has(s.kind))}async function q(t,i){const{items:n}=await b(t,x(t)),e=[];for(const o of n)e.push(...await w(t,o,i)??[]);return e}async function G(t,i,n){const e=x(t),{items:o}=await b(t,e),r=I(o,t,i,n);if(!r)return;const l=await S(e,r);return{item:r,onStage:l?.onStage===!0}}export const inspect=F({name:"inspect",summary:"The check's facts, for you to judge, never problems: by kind, part and time",input:f.strictObject({item:f.string().optional().describe("Only this item: its id (its file without its extension) or its file, or a folder of items"),combo:f.array(f.string()).optional().describe("Only combos matching name=value pairs joined with commas (lang=zh-cn,hook=b), or a combo's id (c03)"),kind:P,...D,all:H(),dir:N}),positional:["item"],output:f.looseObject({}),examples:["allyhub inspect","allyhub inspect launch/film --kind text-time,text-covered","allyhub inspect launch/film --part hook --all"]},async(t,i)=>{try{const n=await K(i.cwd,t.dir),e=B(t.kind,n),o=t.item===void 0?void 0:await G(n,i.cwd,t.item),r=o?.onStage===!1?o.item:void 0,l=r&&await w(n,r,{all:t.all});if(l){const d=l,m=j(d,{kinds:e}),p=v(e,m,n);return{value:{facts:m,counts:g(m),total:d.length,problems:[],...p.length>0?{unseen:p}:{}},text:[`${h(m.length,"fact")}: ${O}`,...y(m,t.all,$(n,`${t.item??"project"}.facts${t.kind?`.${t.kind.join("+")}`:""}`)),...E(p)].join(`
3
+ `)}}const s=await R({dir:n,...t.item===void 0?{}:{piece:t.item},combos:T(t)},i),a=[...s.facts,...t.item===void 0?await q(n,{all:t.all}):o===void 0?[]:await w(n,o.item,{all:t.all})??[]],c=j(a,{kinds:e,part:t.part,from:t.from,to:t.to}),k=s.problems.filter(d=>d.level==="error"),u=v(e,c,n),L=c.length===a.length?h(a.length,"fact"):`${h(c.length,"fact")} of ${String(a.length)}`;return{value:{facts:c,counts:g(c),total:a.length,problems:k,...u.length>0?{unseen:u}:{},...A(s.console)},text:[`${L}: ${O}`,...y(c,t.all,$(n,`${t.item??"project"}.facts${t.kind?`.${t.kind.join("+")}`:""}`)),...E(u),...J({problems:k,console:s.console})].join(`
4
+ `)}}catch(n){throw z(n)}});
@@ -1,2 +1,2 @@
1
1
  /*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
2
- import{z as r}from"zod";import{measuredFacts as u}from"@allyhub/video-measure";import{DECK_FACT_DEFAULTS as c,deckFacts as h}from"@allyhub/slides-core";import{stretchOf as y}from"@allyhub/video-measure";import{ffmpegOf as b}from"@allyhub/render";import{filterFacts as k}from"@allyhub/diagnostics";import{defineCommand as w}from"../../command.js";import{textOnScreen as g}from"../../text/index.js";import{VERSION_FIELDS as x,known as v,withVersion as O}from"../../version.js";import{MOMENTS as S,STRETCH as $,all as A,boxText as E,factsResult as F,kind as T,kindsOf as C,momentsOf as L,sec as N}from"./common.js";export const inspectLayout=w({name:"inspect layout",summary:"One version's layout measured now, at its measured moments or at --at / --every; --texts lists every text block with its fonts",input:r.strictObject({...x,...S,...$,texts:r.boolean().default(!1).describe("List every text block at every moment, with its box and fonts"),within:r.number().positive().optional().describe(`A deck: lines up to this many points apart and not in line are near-alignment (default ${String(c.within)})`),drift:r.number().nonnegative().optional().describe(`A deck: places further apart than this, in points, are placement-drift (default ${String(c.drift)})`),level:r.array(r.enum(["master","layout","slide"])).optional().describe("A deck: measure only shapes of these levels (default every one): slide leaves out what a master or a layout draws on every slide"),except:r.array(r.string()).optional().describe("A deck: leave shapes of these names out of every fact, * for any letters (tick-*)"),room:r.string().regex(/^[\d.]+,[\d.]+$/u).optional().describe("A deck's read-size: a room as its screen's width and its farthest seat, in metres (3,12); without it no room is measured"),kind:T,all:A()}),positional:["item"],output:r.looseObject({}),examples:["allyhub inspect layout launch/film --at 1.5,@press --texts","allyhub inspect layout launch/film --every 0.5 --part hook","allyhub inspect layout launch/deck --kind near-alignment --within 10","allyhub inspect layout launch/deck --level slide --except 'tick-*'"]},async(e,d)=>{const n=await O(e,d,"render",async t=>{const s=t.timeline,{part:l}=v(()=>y(s,e)),i=await t.version.measure(L(e,t)),m=[...t.version.summary?.facts??[],...i.deck?h(i.deck,{width:i.width,height:i.height},{piece:t.target.piece,output:t.target.output,combo:t.target.combo,format:t.target.format},{...e.within===void 0?{}:{within:e.within},...e.drift===void 0?{}:{drift:e.drift},...e.level===void 0?{}:{levels:e.level},...e.except===void 0?{}:{except:e.except},...e.room===void 0?{}:{room:{screen:Number(e.room.split(",")[0]),distance:Number(e.room.split(",")[1])}}}):await u(i,s,t.target,{root:t.prepared.root,media:t.prepared.media,ffmpeg:await b()})];return{facts:k(m,{kinds:C(e.kind,t.prepared.root),part:e.part}),total:m.length,moments:e.texts?i.moments.filter(o=>!l||o.part===l.key).map(o=>({t:o.t,part:o.part,...o.face?{face:o.face}:{},texts:o.texts})):void 0}}),{facts:p,total:f,moments:a}=n.result;return F(p,n,{all:e.all,total:f,...a?{extra:{moments:a}}:{}},(a??[]).map(t=>` ${N(t.t)} ${t.part}${t.face?` face ${E(t.face)}`:""}: ${t.texts.map(g).join("; ")||"(no text)"}`))});
2
+ import{z as r}from"zod";import{measuredFacts as k}from"@allyhub/video-measure";import{DECK_FACT_DEFAULTS as d,deckFacts as b}from"@allyhub/slides-core";import{stretchOf as w}from"@allyhub/video-measure";import{ffmpegOf as g}from"@allyhub/render";import{filterFacts as x}from"@allyhub/diagnostics";import{defineCommand as $}from"../../command.js";import{textOnScreen as v}from"../../text/index.js";import{VERSION_FIELDS as O,known as S,withVersion as A}from"../../version.js";import{MOMENTS as F,STRETCH as E,all as T,boxText as j,factsFile as C,factsResult as L,kind as N,kindsOf as D,momentsOf as M,sec as R}from"./common.js";export const inspectLayout=$({name:"inspect layout",summary:"One version's layout measured now, at its measured moments or at --at / --every; --texts lists every text block with its fonts",input:r.strictObject({...O,...F,...E,texts:r.boolean().default(!1).describe("List every text block at every moment, with its box and fonts"),within:r.number().positive().optional().describe(`A deck: lines up to this many points apart and not in line are near-alignment (default ${String(d.within)})`),drift:r.number().nonnegative().optional().describe(`A deck: places further apart than this, in points, are placement-drift (default ${String(d.drift)})`),level:r.array(r.enum(["master","layout","slide"])).optional().describe("A deck: measure only shapes of these levels (default every one): slide leaves out what a master or a layout draws on every slide"),except:r.array(r.string()).optional().describe("A deck: leave shapes of these names out of every fact, * for any letters (tick-*)"),room:r.string().regex(/^[\d.]+,[\d.]+$/u).optional().describe("A deck's read-size: a room as its screen's width and its farthest seat, in metres (3,12); without it no room is measured"),kind:N,all:T()}),positional:["item"],output:r.looseObject({}),examples:["allyhub inspect layout launch/film --at 1.5,@press --texts","allyhub inspect layout launch/film --every 0.5 --part hook","allyhub inspect layout launch/deck --kind near-alignment --within 10","allyhub inspect layout launch/deck --level slide --except 'tick-*'"]},async(e,p)=>{const n=await A(e,p,"render",async t=>{const s=t.timeline,{part:l}=S(()=>w(s,e)),o=await t.version.measure(M(e,t)),m=[...t.version.summary?.facts??[],...o.deck?b(o.deck,{width:o.width,height:o.height},{piece:t.target.piece,output:t.target.output,combo:t.target.combo,format:t.target.format},{...e.within===void 0?{}:{within:e.within},...e.drift===void 0?{}:{drift:e.drift},...e.level===void 0?{}:{levels:e.level},...e.except===void 0?{}:{except:e.except},...e.room===void 0?{}:{room:{screen:Number(e.room.split(",")[0]),distance:Number(e.room.split(",")[1])}}}):await k(o,s,t.target,{root:t.prepared.root,media:t.prepared.media,ffmpeg:await g()})];return{save:C(t.prepared.root,`${t.target.piece}.layout${e.kind?`.${e.kind.join("+")}`:""}`),facts:x(m,{kinds:D(e.kind,t.prepared.root),part:e.part}),total:m.length,moments:e.texts?o.moments.filter(i=>!l||i.part===l.key).map(i=>({t:i.t,part:i.part,...i.face?{face:i.face}:{},texts:o.deck?i.texts.map(c=>({...c,box:c.box.map(y=>Math.round(y/(o.deck?.pxPerPt??1)*2)/2)})):i.texts})):void 0}}),{facts:f,total:u,moments:a,save:h}=n.result;return L(f,n,{all:e.all,total:u,save:h,...a?{extra:{moments:a}}:{}},(a??[]).map(t=>` ${R(t.t)} ${t.part}${t.face?` face ${j(t.face)}`:""}: ${t.texts.map(v).join("; ")||"(no text)"}`))});
@@ -1,3 +1,3 @@
1
1
  /*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
2
- import{z as n}from"zod";import{organizations as l,readCredentials as c}from"@allyhub/cloud";import{defineCommand as u}from"../command.js";import{cloudOf as m,cloudWork as d}from"./cloud.js";const g=n.looseObject({id:n.string(),name:n.string(),slug:n.string(),role:n.string(),current:n.boolean()});export const orgsList=u({name:"orgs list",summary:"The organizations you are in, with your role; the one this computer acts in and pays from is marked",input:n.strictObject({}),output:n.looseObject({organizations:n.array(g)})},(p,e)=>d(async()=>{const o=m(e),a=await l(o),r=(await c(o.config))?.account.organization?.id,i=a.filter(t=>t.dissolvedAt===null).map((t,s)=>({id:t.id,name:t.name,slug:t.slug,role:t.role,current:r===void 0?s===0:t.id===r}));return{value:{organizations:i},text:i.map(t=>`${t.current?"*":" "} ${t.slug} ${t.name} ${t.role}`).join(`
3
- `)}}));
2
+ import{z as o}from"zod";import{chooseOrganization as d,organizations as l,readCredentials as p}from"@allyhub/cloud";import{defineCommand as u}from"../command.js";import{cloudOf as m,cloudWork as c}from"./cloud.js";const f=o.looseObject({id:o.string(),name:o.string(),slug:o.string(),role:o.string(),current:o.boolean()});export const orgsList=u({name:"orgs list",summary:"The organizations you are in, with your role; the one this computer acts in and pays from is marked",input:o.strictObject({}),output:o.looseObject({organizations:o.array(f)})},(e,s)=>c(async()=>{const r=m(s),a=await l(r),n=(await p(r.config))?.account.organization?.id,i=a.filter(t=>t.dissolvedAt===null).map((t,g)=>({id:t.id,name:t.name,slug:t.slug,role:t.role,current:n===void 0?g===0:t.id===n}));return{value:{organizations:i},text:i.map(t=>`${t.current?"*":" "} ${t.slug} ${t.name} ${t.role}`).join(`
3
+ `)}})),orgsUse=u({name:"orgs use",summary:"Work in and pay from another of your organizations on this computer: the CLI, Studio and every agent on it",input:o.strictObject({team:o.string().describe("The organization: its slug, as allyhub orgs list shows it, or its id")}),positional:["team"],output:o.looseObject({id:o.string(),name:o.string(),slug:o.string()}),examples:["allyhub orgs use acme"]},(e,s)=>c(async()=>{const r=m(s),n=(await l(r)).filter(i=>i.dissolvedAt===null).find(i=>i.slug===e.team||i.id===e.team);if(n===void 0)throw new Error(`You are in no organization ${e.team}. allyhub orgs list shows yours.`);return await d(r.config,{id:n.id,name:n.name}),{value:{id:n.id,name:n.name,slug:n.slug},text:`This computer now works in and pays from ${n.name}.`}}));
@@ -1,3 +1,3 @@
1
1
  /*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
2
- import{join as g,resolve as w}from"node:path";import{z as a}from"zod";import{formatConsole as x,formatProblem as v}from"../text/index.js";import{exportProject as $}from"@allyhub/export";import{SHARE_ENCODE as m}from"@allyhub/render";import{consoleJson as c}from"@allyhub/project";import{OUT_DIR as k}from"@allyhub/formats";import{EXIT as h}from"@allyhub/protocol";import{defineCommand as P}from"../command.js";import{parameters as j}from"../parameters.js";import{projectRoot as A}from"../project.js";import{combosOf as O,commandError as S}from"../version.js";import{dir as D,indexing as M}from"../fields.js";import{extensionsAt as f,kindsAt as N}from"./extensions.js";const F={codec:a.enum(["h264","h265"]).default("h264").describe("The mp4's video codec; h265 is smaller"),crf:a.number().int().min(0).max(63).optional().describe(`Quality, lower is better: default ${String(m.crf)} for an mp4, ready to share, 30 for a webm`),maxBitrate:a.number().int().min(0).max(5e5).optional().describe(`An mp4's most video bitrate, kbit/s, 0 for none: default ${String(m.maxKbps)} at 1080p ${String(m.fps)} fps, scaled by the frame's pixels and the frames a second (16000 at 1080p 60, 32000 at 4K 30), so the file is ready to share`),audioBitrate:a.number().int().min(32).max(512).optional().describe("The sound's bitrate, kbit/s: default 192 (AAC in an mp4), 160 (Opus in a webm); a mov keeps PCM"),steps:a.boolean().default(!1).describe("A deck's pdf, png and pptx: a page, a file or a slide per step of each page, not only its last"),values:a.enum(["data","shown"]).optional().describe("A sheet's csv, json and md: each value as data (a date 2026-01-15, a time 09:30, a duration 36:00, a number to 15 digits; csv's and json's default) or as its format shows it (15 Jan 2026, $1,200.00; md's default)"),bom:a.boolean().default(!0).describe("A sheet's csv starts with a UTF-8 byte-order mark, by which Excel reads its letters right (é, €, 中文); false for a tool that does not expect one"),quality:a.number().int().min(0).max(100).optional().describe("An image's jpeg, webp and avif, 0–100: default 90 for a jpeg, 60 for an avif, a webp lossless"),scale:a.number().min(.25).max(4).optional().describe("An image's png, jpeg, webp, avif and zip: each board's picture this many times its size, its layout kept (type and shapes drawn sharp, a picture as many pixels as its file has); default 1"),width:a.number().int().min(1).optional().describe("An image's pictures each this many pixels wide, the height in proportion: a scale for each board"),height:a.number().int().min(1).optional().describe("An image's pictures each this many pixels high, the width in proportion: a scale for each board"),maxKb:a.number().min(1).optional().describe("An image's jpeg, webp and avif: each board's file at most this many KB, at the best quality under it (said); a png over it is not made"),psd:a.enum(["psd","psb"]).default("psd").describe("An image's psd: psd, or psb (Photoshop's large document format); a board is at most 16384 pixels a side, which a psd holds"),pptx:a.enum(["native","picture"]).default("native").describe("A deck's pptx: native, PowerPoint's own model, editable there (the deck's masters, layouts, placeholders, shapes, text, pictures, videos and notes, a component as its picture); or picture, each slide a picture of the page")},T=(s,o)=>`${String(s)} ${o}${s===1?"":"s"}`,z={approximate:"Drawn its own way by the file's application",pixels:"As pixels in the file",omitted:"Not in the file"};function C(s){const o=new Map;for(const i of s)for(const n of i.fidelity??[]){const d=`${n.how}|${n.what}`,l=o.get(d)??{how:n.how,what:n.what,layers:[]};n.layer!==void 0&&!l.layers.includes(n.layer)&&l.layers.push(n.layer),o.set(d,l)}return[...o.values()].map(i=>{const n=i.layers.length===0?"":` (${i.layers.slice(0,4).join(", ")}${i.layers.length>4?` and ${String(i.layers.length-4)} more`:""})`;return`${z[i.how]}: ${i.what}${n}`})}export const render=P({name:"render",summary:"The files: a video, its frames, subtitles, cover and mastered mix; a batch's table of ads; a deck's PDF, PPTX and PNGs; a doc's PDF and Markdown; a sheet's Excel workbook with live formulas, PDF, PNG, CSV, Markdown and JSON; an image's pictures, PDF and layered PSDs; a 3D model's GLB",input:a.strictObject({items:a.array(a.string()).optional().describe("Only these items: each an id (its file without its extension) or its file, or a folder of items; default every one"),combo:a.array(a.string()).optional().describe("Only the combos matching name=value pairs joined with commas (lang=zh-cn,hook=b), or a combo's id (c03)"),type:a.array(a.string()).optional().describe("File types: mp4, mov, webm, gif, png, srt, vtt (cues cut as the piece's captions layer cuts them, else by default), cover, wav (the mix, mastered as the render masters it: 48 kHz, 16 bits, the film's length), pdf, pptx; csv for a piece with slots, its table of ads (<piece>.ads.csv: a row per ad with its combo, picks, length, file, name and generated media); a doc's pdf, docx, png, md; a sheet's xlsx (every sheet, formulas live with their values cached), pdf, png, csv, md, json; an image's png, jpeg, webp, avif (a file a board), pdf, zip and psd (a layered Photoshop file a board: each layer of its kind, its pixels drawn by Chrome); a 3D model's glb. Default mp4 for a video, pdf for a deck and a doc, xlsx for a sheet, png for an image, glb for a model; a type an item does not have is skipped"),out:a.string().optional().describe("The folder the files go in; default .allyhub/out"),name:a.string().optional().describe("Name a video's or deck's files <name>.<ext> in its folder of the output, with what tells its versions apart before the extension when there are several (<name>.zh-cn.mp4, <name>.c03.mp4); default <output>.<combo>.<ext>"),params:j(F),dir:D}),positional:["items"],output:a.looseObject({out:a.string(),files:a.array(a.looseObject({name:a.string(),path:a.string(),type:a.string()})),failed:a.array(a.looseObject({name:a.string(),code:a.string()}))}),examples:["allyhub render","allyhub render launch/film --type mp4,srt","allyhub render launch/film --type wav","allyhub render ads/tidyform --type csv","allyhub render launch/plan --type pdf,md","allyhub render finance/budget --type xlsx,pdf","allyhub render finance/budget --type csv --param bom=false","allyhub render launch/deck --type pptx --param pptx=picture","allyhub render launch/poster --type psd","allyhub render launch/poster --type jpeg --param scale=2 --param max-kb=2000","allyhub render --combo lang=zh-cn --param crf=16","allyhub render launch/film --name launch-film --param max-bitrate=0"]},async(s,o)=>{const i=await A(o.cwd,s.dir),n=w(o.cwd,s.out??g(i,k)),d=Object.fromEntries(Object.entries(s.params).filter(([,e])=>e!==void 0));let l=0,t;try{t=await $({root:i,kinds:N(i),out:n,...s.items===void 0?{}:{items:s.items},combos:O(s),...s.type===void 0?{}:{types:s.type},...s.name===void 0?{}:{name:s.name},params:d,index:M(o.env),analyses:f(i).mediaAnalyses(),env:o.env,processors:f(i).exportProcessors(),log:e=>{o.progress(e)},onProgress:e=>{const r=Math.floor(e*10);r<=l||r>=10||(l=r,o.progress(`${String(r*10)}%`))},signal:o.signal})}catch(e){throw S(e)}const u=e=>e?` (${e.integrated.toFixed(1)} LUFS, true peak ${e.truePeak===void 0?"–":e.truePeak.toFixed(1)} dBTP)`:"",b=t.problems.filter(e=>e.level==="error"),p=t.files.flatMap(e=>e.files.length>1?e.files.map(r=>` ${r}`):[` ${e.path}${u(e.loudness)}`]),y=[`${T(p.length,"file")} in ${t.out}:`,...p,...t.failed.length>0?["Not made:",...t.failed.map(e=>` ${e.name}: ${e.message}${e.hint?` ${e.hint}`:""}`)]:[],...t.unindexed.map(e=>`Not indexed, drawn the fallback way: ${e.file} (${e.error})`),...t.files.flatMap(e=>(e.missing??[]).map(r=>`Not measured: ${r}`)),...t.files.flatMap(e=>(e.chosen??[]).map(r=>`Chosen: ${r}`)),...C(t.files),...new Set(t.files.flatMap(e=>(e.fontsLeft??[]).map(r=>`Not in the file: ${r.font} (${r.why}); PowerPoint shows another font where it is not installed.`))),...b.map(v),...x(c(t.console))];return{value:{out:t.out,files:t.files.map(e=>({...e})),failed:t.failed.map(e=>({...e})),problems:t.problems,...t.unindexed.length>0?{unindexed:t.unindexed}:{},...c(t.console)},text:y.join(`
3
- `),exit:t.failed.length>0?h.failed:h.ok}});
2
+ import{join as x,resolve as w}from"node:path";import{z as e}from"zod";import{formatConsole as v,formatProblem as k}from"../text/index.js";import{exportProject as P}from"@allyhub/export";import{GIF_ENCODE as m,SHARE_ENCODE as n}from"@allyhub/render";import{consoleJson as p}from"@allyhub/project";import{OUT_DIR as $}from"@allyhub/formats";import{EXIT as c}from"@allyhub/protocol";import{madeNotes as A}from"@allyhub/build";import{defineCommand as j}from"../command.js";import{parameters as O}from"../parameters.js";import{projectRoot as S}from"../project.js";import{combosOf as D,commandError as F}from"../version.js";import{dir as E,indexing as N}from"../fields.js";import{extensionsAt as h,kindsAt as T}from"./extensions.js";const z={codec:e.enum(["h264","h265"]).default("h264").describe("The mp4's video codec; h265 is smaller"),crf:e.number().int().min(0).max(63).optional().describe(`Quality, lower is better: default ${String(n.crf)} for an mp4, ready to share, 30 for a webm`),maxBitrate:e.number().int().min(0).max(5e5).optional().describe(`An mp4's most video bitrate, kbit/s, 0 for none: default ${String(n.maxKbps)} at 1080p ${String(n.fps)} fps, scaled by the frame's pixels and the frames a second (16000 at 1080p 60, 32000 at 4K 30), so the file is ready to share`),audioBitrate:e.number().int().min(32).max(512).optional().describe("The sound's bitrate, kbit/s: default 192 (AAC in an mp4), 160 (Opus in a webm); a mov keeps PCM"),gifWidth:e.number().int().min(0).max(16384).optional().describe(`A gif's width in pixels, its height in proportion, never more than the video's: default ${String(m.width)}; 0 for the video's own`),gifFps:e.number().min(0).max(120).optional().describe(`A gif's frames a second, never more than the video's: default ${String(m.fps)}; 0 for the video's own`),steps:e.boolean().default(!1).describe("A deck's pdf, png and pptx: a page, a file or a slide per step of each page, not only its last"),values:e.enum(["data","shown"]).optional().describe("A sheet's csv, json and md: each value as data (a date 2026-01-15, a time 09:30, a duration 36:00, a number to 15 digits; csv's and json's default) or as its format shows it (15 Jan 2026, $1,200.00; md's default)"),bom:e.boolean().default(!0).describe("A sheet's csv starts with a UTF-8 byte-order mark, by which Excel reads its letters right (é, €, 中文); false for a tool that does not expect one"),quality:e.number().int().min(0).max(100).optional().describe("An image's jpeg and webp, 0–100: default 90 for a jpeg, a webp lossless"),scale:e.number().min(.25).max(4).optional().describe("An image's png, jpeg, webp and zip: each board's picture this many times its size, its layout kept (type and shapes drawn sharp, a picture as many pixels as its file has); default 1"),width:e.number().int().min(1).optional().describe("An image's pictures each this many pixels wide, the height in proportion: a scale for each board"),height:e.number().int().min(1).optional().describe("An image's pictures each this many pixels high, the width in proportion: a scale for each board"),maxKb:e.number().min(1).optional().describe("An image's jpeg and webp: each board's file at most this many KB, at the best quality under it (said); a png over it is not made"),psd:e.enum(["psd","psb"]).default("psd").describe("An image's psd: psd, or psb (Photoshop's large document format); a board is at most 16384 pixels a side, which a psd holds"),pptx:e.enum(["native","picture"]).default("native").describe("A deck's pptx: native, PowerPoint's own model, editable there (the deck's masters, layouts, placeholders, shapes, text, pictures, videos and notes, a component as its picture); or picture, each slide a picture of the page")},C=(s,i)=>`${String(s)} ${i}${s===1?"":"s"}`;export const render=j({name:"render",summary:"The files: a video, its frames, subtitles, cover and mastered mix; a batch's table of ads; a deck's PDF, PPTX and PNGs; a doc's PDF and Markdown; a sheet's Excel workbook with live formulas, PDF, PNG, CSV, Markdown and JSON; an image's pictures, PDF and layered PSDs; a 3D model's GLB",input:e.strictObject({items:e.array(e.string()).optional().describe("Only these items: each an id (its file without its extension) or its file, or a folder of items; default every one"),combo:e.array(e.string()).optional().describe("Only the combos matching name=value pairs joined with commas (lang=zh-cn,hook=b), or a combo's id (c03)"),type:e.array(e.string()).optional().describe("File types: mp4, mov, webm, gif, png, srt, vtt (cues cut as the piece's captions layer cuts them, else by default), cover, wav (the mix, mastered as the render masters it: 48 kHz, 16 bits, the film's length); csv for a piece with slots, its table of ads (<piece>.ads.csv: a row per ad with its combo, picks, length, file, name and generated media); a doc's pdf, docx, png; a sheet's xlsx (every sheet, formulas live with their values cached), pdf, png, csv (a file a sheet); an image's png, jpeg, webp (a file a board), pdf, zip and psd (a layered Photoshop file a board: each layer of its kind, its pixels drawn by Chrome); a deck's pdf, png, pptx; a report's html (one file that runs offline), pdf, png; a LinkedIn or X post's linkedin-post or x-post (its API request, its media beside), txt (its text as written, its media and their alt text beside), png; an article's linkedin-article or x-article, png; a 3D model's glb. Default mp4 for a video, pdf for a deck and a doc, html for a report, xlsx for a sheet, png for an image, glb for a model; a type an item does not have is skipped"),out:e.string().optional().describe("The folder the files go in; default .allyhub/out"),name:e.string().optional().describe("Name a video's or deck's files <name>.<ext> in its folder of the output, with what tells its versions apart before the extension when there are several (<name>.zh-cn.mp4, <name>.c03.mp4); default <output>.<combo>.<ext>"),params:O(z),dir:E}),positional:["items"],output:e.looseObject({out:e.string(),files:e.array(e.looseObject({name:e.string(),path:e.string(),type:e.string()})),failed:e.array(e.looseObject({name:e.string(),code:e.string()}))}),examples:["allyhub render","allyhub render launch/film --type mp4,srt","allyhub render launch/film --type wav","allyhub render ads/tidyform --type csv","allyhub render launch/plan --type pdf,md","allyhub render finance/budget --type xlsx,pdf","allyhub render finance/budget --type csv --param bom=false","allyhub render launch/deck --type pptx --param pptx=picture","allyhub render launch/poster --type psd","allyhub render launch/poster --type jpeg --param scale=2 --param max-kb=2000","allyhub render --combo lang=zh-cn --param crf=16","allyhub render launch/film --name launch-film --param max-bitrate=0"]},async(s,i)=>{const o=await S(i.cwd,s.dir),f=w(i.cwd,s.out??x(o,$)),u=Object.fromEntries(Object.entries(s.params).filter(([,a])=>a!==void 0));let d=0,t;try{t=await P({root:o,kinds:T(o),out:f,...s.items===void 0?{}:{items:s.items},combos:D(s),...s.type===void 0?{}:{types:s.type},...s.name===void 0?{}:{name:s.name},params:u,index:N(i.env),analyses:h(o).mediaAnalyses(),env:i.env,processors:h(o).exportProcessors(),log:a=>{i.progress(a)},onProgress:a=>{const r=Math.floor(a*10);r<=d||r>=10||(d=r,i.progress(`${String(r*10)}%`))},signal:i.signal})}catch(a){throw F(a)}const b=a=>a?` (${a.integrated.toFixed(1)} LUFS, true peak ${a.truePeak===void 0?"–":a.truePeak.toFixed(1)} dBTP)`:"",g=t.problems.filter(a=>a.level==="error"),l=t.files.flatMap(a=>a.files.length>1?a.files.map(r=>` ${r}`):[` ${a.path}${b(a.loudness)}`]),y=[`${C(l.length,"file")} in ${t.out}:`,...l,...t.failed.length>0?["Not made:",...t.failed.map(a=>` ${a.name}: ${a.message}${a.hint?` ${a.hint}`:""}`)]:[],...t.unindexed.map(a=>`Not indexed, drawn the fallback way: ${a.file} (${a.error})`),...A(t.files),...g.map(k),...v(p(t.console))];return{value:{out:t.out,files:t.files.map(a=>({...a})),failed:t.failed.map(a=>({...a})),problems:t.problems,...t.unindexed.length>0?{unindexed:t.unindexed}:{},...p(t.console)},text:y.join(`
3
+ `),exit:t.failed.length>0?c.failed:c.ok}});