allyhub 0.20.0 → 0.21.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 (287) hide show
  1. package/dist/commands/cloud-tools.js +5 -5
  2. package/dist/commands/frames.js +8 -8
  3. package/dist/commands.json +1 -1
  4. package/dist/help.js +3 -3
  5. package/dist/node_modules/@allyhub/3d-extension/package.json +1 -1
  6. package/dist/node_modules/@allyhub/audio/package.json +1 -1
  7. package/dist/node_modules/@allyhub/blocks/dist/elements.js +1 -1
  8. package/dist/node_modules/@allyhub/blocks/dist/layout.js +1 -1
  9. package/dist/node_modules/@allyhub/blocks/dist/palette.js +1 -1
  10. package/dist/node_modules/@allyhub/blocks/dist/resolve.js +1 -1
  11. package/dist/node_modules/@allyhub/blocks/package.json +1 -1
  12. package/dist/node_modules/@allyhub/browser/package.json +1 -1
  13. package/dist/node_modules/@allyhub/build/package.json +1 -1
  14. package/dist/node_modules/@allyhub/canvas-extension/package.json +1 -1
  15. package/dist/node_modules/@allyhub/canvas-model/package.json +1 -1
  16. package/dist/node_modules/@allyhub/chart/package.json +1 -1
  17. package/dist/node_modules/@allyhub/check/package.json +1 -1
  18. package/dist/node_modules/@allyhub/cloud/dist/call.js +2 -2
  19. package/dist/node_modules/@allyhub/cloud/package.json +1 -1
  20. package/dist/node_modules/@allyhub/components/package.json +1 -1
  21. package/dist/node_modules/@allyhub/dev-server/package.json +1 -1
  22. package/dist/node_modules/@allyhub/diagnostics/package.json +1 -1
  23. package/dist/node_modules/@allyhub/doc/dist/block-shapes.js +2 -0
  24. package/dist/node_modules/@allyhub/doc/dist/blocks.js +1 -1
  25. package/dist/node_modules/@allyhub/doc/dist/docx.js +5 -5
  26. package/dist/node_modules/@allyhub/doc/dist/shapes.js +2 -2
  27. package/dist/node_modules/@allyhub/doc/package.json +1 -1
  28. package/dist/node_modules/@allyhub/doc-extension/dist/cli/import.js +1 -1
  29. package/dist/node_modules/@allyhub/doc-extension/dist/export.js +1 -1
  30. package/dist/node_modules/@allyhub/doc-extension/package.json +1 -1
  31. package/dist/node_modules/@allyhub/doc-print/package.json +1 -1
  32. package/dist/node_modules/@allyhub/export/package.json +1 -1
  33. package/dist/node_modules/@allyhub/extension-api/package.json +1 -1
  34. package/dist/node_modules/@allyhub/extension-host/package.json +1 -1
  35. package/dist/node_modules/@allyhub/formats/dist/data/page-data.d.ts +9 -1
  36. package/dist/node_modules/@allyhub/formats/dist/data/page-data.js +1 -1
  37. package/dist/node_modules/@allyhub/formats/package.json +1 -1
  38. package/dist/node_modules/@allyhub/html-extension/package.json +1 -1
  39. package/dist/node_modules/@allyhub/i18n/package.json +1 -1
  40. package/dist/node_modules/@allyhub/image-draw/package.json +1 -1
  41. package/dist/node_modules/@allyhub/image-extension/package.json +1 -1
  42. package/dist/node_modules/@allyhub/image-extension/skills/allyhub/references/images.md +1 -1
  43. package/dist/node_modules/@allyhub/image-measure/package.json +1 -1
  44. package/dist/node_modules/@allyhub/image-psd/package.json +1 -1
  45. package/dist/node_modules/@allyhub/image-render/package.json +1 -1
  46. package/dist/node_modules/@allyhub/image-runtime/package.json +1 -1
  47. package/dist/node_modules/@allyhub/image-sdk/package.json +1 -1
  48. package/dist/node_modules/@allyhub/jobs/package.json +1 -1
  49. package/dist/node_modules/@allyhub/linkedin-extension/package.json +1 -1
  50. package/dist/node_modules/@allyhub/linkedin-model/package.json +1 -1
  51. package/dist/node_modules/@allyhub/linkedin-view/package.json +1 -1
  52. package/dist/node_modules/@allyhub/linkedin-view/src/style.css +1 -1
  53. package/dist/node_modules/@allyhub/measure/package.json +1 -1
  54. package/dist/node_modules/@allyhub/media/package.json +1 -1
  55. package/dist/node_modules/@allyhub/media-extension/package.json +1 -1
  56. package/dist/node_modules/@allyhub/model/package.json +1 -1
  57. package/dist/node_modules/@allyhub/office-extension/package.json +1 -1
  58. package/dist/node_modules/@allyhub/ooxml/package.json +1 -1
  59. package/dist/node_modules/@allyhub/piece/package.json +1 -1
  60. package/dist/node_modules/@allyhub/project/package.json +1 -1
  61. package/dist/node_modules/@allyhub/protocol/dist/cloud.js +1 -1
  62. package/dist/node_modules/@allyhub/protocol/package.json +1 -1
  63. package/dist/node_modules/@allyhub/registry/package.json +1 -1
  64. package/dist/node_modules/@allyhub/render/package.json +1 -1
  65. package/dist/node_modules/@allyhub/report-extension/LICENSE +241 -0
  66. package/dist/node_modules/@allyhub/report-extension/dist/build.js +3 -0
  67. package/dist/node_modules/@allyhub/report-extension/dist/check.js +37 -0
  68. package/dist/node_modules/@allyhub/report-extension/dist/cli/index.js +4 -0
  69. package/dist/node_modules/@allyhub/report-extension/dist/export.js +2 -0
  70. package/dist/node_modules/@allyhub/report-extension/dist/inline.js +58 -0
  71. package/dist/node_modules/@allyhub/report-extension/dist/page.js +23 -0
  72. package/dist/node_modules/@allyhub/report-extension/dist/project-tools.js +33 -0
  73. package/dist/node_modules/@allyhub/report-extension/dist/styles.js +2 -0
  74. package/dist/node_modules/@allyhub/report-extension/dist/theme.js +2 -0
  75. package/dist/node_modules/@allyhub/report-extension/dist/tools.js +2 -0
  76. package/dist/node_modules/@allyhub/report-extension/dist/workspace.js +2 -0
  77. package/dist/node_modules/@allyhub/report-extension/package.json +185 -0
  78. package/dist/node_modules/@allyhub/report-extension/styles/allyhub/STYLE.md +180 -0
  79. package/dist/node_modules/@allyhub/report-extension/styles/allyhub/style.json +15 -0
  80. package/dist/node_modules/@allyhub/runtime/package.json +1 -1
  81. package/dist/node_modules/@allyhub/runtimes/package.json +1 -1
  82. package/dist/node_modules/@allyhub/scaffold/dist/index.js +5 -5
  83. package/dist/node_modules/@allyhub/scaffold/package.json +1 -1
  84. package/dist/node_modules/@allyhub/scenery/package.json +1 -1
  85. package/dist/node_modules/@allyhub/scenery-host/package.json +1 -1
  86. package/dist/node_modules/@allyhub/sheet/dist/html.js +10 -10
  87. package/dist/node_modules/@allyhub/sheet/dist/index.js +1 -1
  88. package/dist/node_modules/@allyhub/sheet/dist/table-style.js +1 -1
  89. package/dist/node_modules/@allyhub/sheet/dist/theme.js +1 -1
  90. package/dist/node_modules/@allyhub/sheet/dist/tiles.js +1 -1
  91. package/dist/node_modules/@allyhub/sheet/dist/xlsx/charts.js +1 -1
  92. package/dist/node_modules/@allyhub/sheet/dist/xlsx/tile-shapes.js +2 -0
  93. package/dist/node_modules/@allyhub/sheet/dist/xlsx/write.js +1 -1
  94. package/dist/node_modules/@allyhub/sheet/package.json +1 -1
  95. package/dist/node_modules/@allyhub/sheet-extension/dist/cli/sheet.js +1 -1
  96. package/dist/node_modules/@allyhub/sheet-extension/package.json +1 -1
  97. package/dist/node_modules/@allyhub/slides-core/dist/capabilities.js +1 -1
  98. package/dist/node_modules/@allyhub/slides-core/package.json +1 -1
  99. package/dist/node_modules/@allyhub/slides-extension/dist/cli/slides.js +1 -1
  100. package/dist/node_modules/@allyhub/slides-extension/package.json +1 -1
  101. package/dist/node_modules/@allyhub/slides-pptx/package.json +1 -1
  102. package/dist/node_modules/@allyhub/slides-runtime/package.json +1 -1
  103. package/dist/node_modules/@allyhub/stage/package.json +1 -1
  104. package/dist/node_modules/@allyhub/stage-page/package.json +1 -1
  105. package/dist/node_modules/@allyhub/stage-runtime/dist/runtime.js +2 -2
  106. package/dist/node_modules/@allyhub/stage-runtime/package.json +1 -1
  107. package/dist/node_modules/@allyhub/telemetry/package.json +1 -1
  108. package/dist/node_modules/@allyhub/text-extension/package.json +1 -1
  109. package/dist/node_modules/@allyhub/video-core/package.json +1 -1
  110. package/dist/node_modules/@allyhub/video-extension/package.json +1 -1
  111. package/dist/node_modules/@allyhub/video-measure/package.json +1 -1
  112. package/dist/node_modules/@allyhub/video-sdk/package.json +1 -1
  113. package/dist/node_modules/@allyhub/website/package.json +1 -1
  114. package/dist/node_modules/@allyhub/website-extension/package.json +1 -1
  115. package/dist/node_modules/@allyhub/x-extension/package.json +1 -1
  116. package/dist/node_modules/@allyhub/x-model/package.json +1 -1
  117. package/dist/node_modules/@allyhub/x-view/package.json +1 -1
  118. package/dist/package.json +15 -14
  119. package/dist/works.js +1 -1
  120. package/editor-web/assets/{abnfDiagram-WEYOIA3C-BkVJMd53.js → abnfDiagram-WEYOIA3C-B4tvwU6C.js} +1 -1
  121. package/editor-web/assets/{architecture-WOLXFQ4H-C6rnaynZ.js → architecture-WOLXFQ4H-V2fA0vY2.js} +1 -1
  122. package/editor-web/assets/{architectureDiagram-ZHVYKT53-D3vrh8LK.js → architectureDiagram-ZHVYKT53-B6B7XN0M.js} +1 -1
  123. package/editor-web/assets/article-DW4eD_8K.js +3 -0
  124. package/editor-web/assets/article-Dm2dIEwc.js +7 -0
  125. package/editor-web/assets/bar-button-CJmpgNg4.js +1 -0
  126. package/editor-web/assets/{blockDiagram-RJAE7QA3-BKngt8H7.js → blockDiagram-RJAE7QA3-BizcUGOM.js} +1 -1
  127. package/editor-web/assets/{c4Diagram-XDPPPE54-j7sUELqF.js → c4Diagram-XDPPPE54-CBHS0dQ0.js} +1 -1
  128. package/editor-web/assets/channel-dyUtlVPg.js +1 -0
  129. package/editor-web/assets/chip-BdQRH3FL.js +1 -0
  130. package/editor-web/assets/{chunk-2E7WHVMD-BXa-uRSi.js → chunk-2E7WHVMD-CMPBck_Q.js} +1 -1
  131. package/editor-web/assets/{chunk-4EMNKR2T-B3ntcsZN.js → chunk-4EMNKR2T-Df22Adpt.js} +1 -1
  132. package/editor-web/assets/{chunk-55XCU76K-AMvnFwUg.js → chunk-55XCU76K-CYrZ6_Q7.js} +1 -1
  133. package/editor-web/assets/{chunk-7S6XSTFO-BA6esfFu.js → chunk-7S6XSTFO-BfdG9NNW.js} +1 -1
  134. package/editor-web/assets/{chunk-AQDTSKZB-BT_vANXs.js → chunk-AQDTSKZB-BCzZMoTJ.js} +1 -1
  135. package/editor-web/assets/{chunk-DSNLSHJZ-DoUgmzGB.js → chunk-DSNLSHJZ-DT0xT8Wf.js} +1 -1
  136. package/editor-web/assets/{chunk-HAGFOTED-DtnIrCZb.js → chunk-HAGFOTED-Bg3-EotU.js} +1 -1
  137. package/editor-web/assets/{chunk-HNE4Q36P-BlPwQx3_.js → chunk-HNE4Q36P-BrSym24V.js} +1 -1
  138. package/editor-web/assets/{chunk-NQOKRVIF-D2r7jp2r.js → chunk-NQOKRVIF-CMxgkJWF.js} +1 -1
  139. package/editor-web/assets/{chunk-UHW7PFBP-Cmc0_F5o.js → chunk-UHW7PFBP-DWEwoyPy.js} +1 -1
  140. package/editor-web/assets/{chunk-VQ5W62QI-nJSMqAr0.js → chunk-VQ5W62QI-eTFh5_T9.js} +1 -1
  141. package/editor-web/assets/{chunk-WQQL4CDK-Btq2nbF6.js → chunk-WQQL4CDK-4PTupr9T.js} +1 -1
  142. package/editor-web/assets/{chunk-YZO67HFG-DTbcCoGt.js → chunk-YZO67HFG-D5XAAFWm.js} +1 -1
  143. package/editor-web/assets/{chunk-ZAUX2LTX-DVwkg-2N.js → chunk-ZAUX2LTX-CPsdaisO.js} +1 -1
  144. package/editor-web/assets/{chunk-ZCHMQSOR-BV39jOOE.js → chunk-ZCHMQSOR-ClnuUyfy.js} +1 -1
  145. package/editor-web/assets/{classDiagram-v2-4MYWR3UA-Cj74-fhM.js → classDiagram-v2-4MYWR3UA-CM21waNF.js} +1 -1
  146. package/editor-web/assets/collaborator-CbTacvkB.js +1 -0
  147. package/editor-web/assets/color-picker-BmKFn2ww.js +1 -0
  148. package/editor-web/assets/{cynefin-EF2NZ3EQ-C0CkiipV.js → cynefin-EF2NZ3EQ-CJUHTgee.js} +1 -1
  149. package/editor-web/assets/{cynefinDiagram-WF24UDRP-hdsnJ4cI.js → cynefinDiagram-WF24UDRP-C9RIfuIV.js} +1 -1
  150. package/editor-web/assets/{dagre-NK4GIZVX-CC7WSgaK.js → dagre-NK4GIZVX-g-01KdpO.js} +1 -1
  151. package/editor-web/assets/deck-C0VxrlzX.js +1 -0
  152. package/editor-web/assets/{diagram-CBK3MWTC-DmaVm13J.js → diagram-CBK3MWTC-CbOjWUu-.js} +1 -1
  153. package/editor-web/assets/{diagram-I5XIIV2D-De8jqp7b.js → diagram-I5XIIV2D-C6psNS8J.js} +1 -1
  154. package/editor-web/assets/{diagram-ODIL2UCW-B5pBTulX.js → diagram-ODIL2UCW-C9PUE46P.js} +1 -1
  155. package/editor-web/assets/{diagram-PFBEJUXE-BYsXg5_w.js → diagram-PFBEJUXE-vJ_pnB33.js} +1 -1
  156. package/editor-web/assets/{diagram-RJA3I4VV-DZ8f6bYe.js → diagram-RJA3I4VV-FwYlEfJ-.js} +1 -1
  157. package/editor-web/assets/{diagram-TYUNFSNR-qXHUsauD.js → diagram-TYUNFSNR-FKpIxeUc.js} +1 -1
  158. package/editor-web/assets/{dist-DAhe-kFC.js → dist-B8_6sJ_V.js} +1 -1
  159. package/editor-web/assets/dist-BI_BaYhO.js +19 -0
  160. package/editor-web/assets/dist-BaWFMuvr.js +1 -0
  161. package/editor-web/assets/dist-BdmMT8fP.js +5 -0
  162. package/editor-web/assets/dist-BgKyM9U6.js +3 -0
  163. package/editor-web/assets/dist-BqijryYd.js +1 -0
  164. package/editor-web/assets/dist-ByguWp3a.js +16 -0
  165. package/editor-web/assets/{dist-9kuRjUTN.js → dist-CB-_0-X4.js} +6 -6
  166. package/editor-web/assets/dist-CCP24Lel.js +19 -0
  167. package/editor-web/assets/{dist-B3rd02Cg.js → dist-Cg0Z26Kv.js} +6 -6
  168. package/editor-web/assets/dist-CtYjYJdv.js +1 -0
  169. package/editor-web/assets/dist-D07Kj8GR.js +1 -0
  170. package/editor-web/assets/dist-D2rGVz9C.js +1 -0
  171. package/editor-web/assets/dist-D3DwRF1k.js +547 -0
  172. package/editor-web/assets/dist-DCI21ljp.js +6 -0
  173. package/editor-web/assets/dist-DH8oJJw9.js +35 -0
  174. package/editor-web/assets/dist-DJvfQvM7.js +24 -0
  175. package/editor-web/assets/dist-DmCDcb2_.js +4 -0
  176. package/editor-web/assets/dist-H0z_DXDz.js +19 -0
  177. package/editor-web/assets/{dist-DA72-4WB.js → dist-QLXI7XGS.js} +1 -1
  178. package/editor-web/assets/{docx-draw-L54blreB.js → docx-draw-Dxb67W2d.js} +1 -1
  179. package/editor-web/assets/{ebnfDiagram-V4P3TTPT-B7-IfVI-.js → ebnfDiagram-V4P3TTPT-DBymUM-F.js} +1 -1
  180. package/editor-web/assets/{elk-QONTBCTQ-Gj_WaeBn.js → elk-QONTBCTQ-BNYR3OlS.js} +1 -1
  181. package/editor-web/assets/{erDiagram-KYQIGQAA-BDF6Qoqx.js → erDiagram-KYQIGQAA-cTNyOqW6.js} +1 -1
  182. package/editor-web/assets/esm-Cl3GKSDd.js +21 -0
  183. package/editor-web/assets/{eventmodeling-K75KTNOO-elxVXXEe.js → eventmodeling-K75KTNOO-C6FUZeXP.js} +1 -1
  184. package/editor-web/assets/eye-DwfE1USj.js +1 -0
  185. package/editor-web/assets/flowDiagram-IUGLLWBU-ukTovy07.js +1 -0
  186. package/editor-web/assets/{ganttDiagram-R7GPNTJY-CEogW3jW.js → ganttDiagram-R7GPNTJY-LD9mqQ1x.js} +1 -1
  187. package/editor-web/assets/{gitGraph-VSP46ZUC-Bh9cRWFa.js → gitGraph-VSP46ZUC-CtCBcQFl.js} +1 -1
  188. package/editor-web/assets/{gitGraphDiagram-PDYL7XHY-BQAvdM_V.js → gitGraphDiagram-PDYL7XHY-DYQpOozz.js} +1 -1
  189. package/editor-web/assets/hint-F4fIBnVU.js +1 -0
  190. package/editor-web/assets/index-Cah2zchD.css +2 -0
  191. package/editor-web/assets/index-omhSywJb.js +28 -0
  192. package/editor-web/assets/{info-OHQRW6UA-CdPrqere.js → info-OHQRW6UA-IXInKPRO.js} +1 -1
  193. package/editor-web/assets/{infoDiagram-MVDRKAX5-uwIMeP44.js → infoDiagram-MVDRKAX5-Ds7Cei7T.js} +1 -1
  194. package/editor-web/assets/{ishikawaDiagram-HPEHV2GE-rtfvqK7E.js → ishikawaDiagram-HPEHV2GE-DWs3qtAX.js} +1 -1
  195. package/editor-web/assets/{journeyDiagram-BOSHW7O7-mmhfIyVG.js → journeyDiagram-BOSHW7O7-BkNKVYBA.js} +1 -1
  196. package/editor-web/assets/{kanban-definition-FNSA4HC5-Fe7jBsi-.js → kanban-definition-FNSA4HC5-D3dMswnI.js} +1 -1
  197. package/editor-web/assets/{mermaid-parser.core-BxOSjBH9.js → mermaid-parser.core-D_W_0X0N.js} +3 -3
  198. package/editor-web/assets/{mermaid.core-BOln9YdH.js → mermaid.core-Bkirj-s5.js} +4 -4
  199. package/editor-web/assets/{mindmap-definition-6OY57UG3-M3Q1LOtO.js → mindmap-definition-6OY57UG3-CMKkAAvI.js} +1 -1
  200. package/editor-web/assets/{packet-JDAUHWVQ-Dbb0TUG6.js → packet-JDAUHWVQ-CzCkgCfg.js} +1 -1
  201. package/editor-web/assets/palette-DchDLJj6.js +1 -0
  202. package/editor-web/assets/panes-BexRuZd2.js +3 -0
  203. package/editor-web/assets/{pegDiagram-ECIUJNBX-BZMRpSFC.js → pegDiagram-ECIUJNBX-C8qHkx7M.js} +1 -1
  204. package/editor-web/assets/{pie-XZMESJXO-Ctm9XdKp.js → pie-XZMESJXO-BJqgxMrD.js} +1 -1
  205. package/editor-web/assets/{pieDiagram-GNMPY74T-cGbs5ZTl.js → pieDiagram-GNMPY74T-DyNntV5y.js} +1 -1
  206. package/editor-web/assets/progress-D1Uv3d1b.js +6 -0
  207. package/editor-web/assets/{quadrantDiagram-D57K4MC3-BUe_zsxT.js → quadrantDiagram-D57K4MC3-BHa-69ir.js} +1 -1
  208. package/editor-web/assets/{radar-ABXABTNO-CCmKtqLs.js → radar-ABXABTNO-BeRPjBBR.js} +1 -1
  209. package/editor-web/assets/{railroad-I3PHUGI6-k-yhjhjA.js → railroad-I3PHUGI6-BaRQqRsK.js} +1 -1
  210. package/editor-web/assets/{railroad-abnf-LNEFI6M7-B-PvntB3.js → railroad-abnf-LNEFI6M7-BZfwomxZ.js} +1 -1
  211. package/editor-web/assets/{railroad-ebnf-DWYD2UWJ-Ds2rua1h.js → railroad-ebnf-DWYD2UWJ-DbgqpEF5.js} +1 -1
  212. package/editor-web/assets/{railroad-peg-JR7BVNR7-jNZ2wEp2.js → railroad-peg-JR7BVNR7-BYOf3PsQ.js} +1 -1
  213. package/editor-web/assets/{railroadDiagram-Y72NRBL7-CTqSQ15w.js → railroadDiagram-Y72NRBL7-B5OAzOsD.js} +1 -1
  214. package/editor-web/assets/{requirementDiagram-EQYSW5RA-CUblhR5M.js → requirementDiagram-EQYSW5RA-wqYNoqO0.js} +1 -1
  215. package/editor-web/assets/ribbon-tabs-B3IC9WOt.js +1 -0
  216. package/editor-web/assets/row-DqS4-5b1.js +1 -0
  217. package/editor-web/assets/{sankeyDiagram-SY24JHO5-nSz6zDX3.js → sankeyDiagram-SY24JHO5-Crf6GRsa.js} +1 -1
  218. package/editor-web/assets/{sequenceDiagram-BLEHNHQU-DxTpOYuo.js → sequenceDiagram-BLEHNHQU-DUcHz4_d.js} +1 -1
  219. package/editor-web/assets/{session-BhClkDyr.js → session--OJYv_B7.js} +1 -1
  220. package/editor-web/assets/{snapshots-DwGHDN3t.js → snapshots-DYooVfOx.js} +1 -1
  221. package/editor-web/assets/{stateDiagram-v2-A6IESKWZ-C3e14iHY.js → stateDiagram-v2-A6IESKWZ-DbeLdnpS.js} +1 -1
  222. package/editor-web/assets/surface-BUoi7cmR.js +1 -0
  223. package/editor-web/assets/swatch-DCmD1gZl.js +1 -0
  224. package/editor-web/assets/{swimlanes-B3ENRKFQ-DPPdzNzu.js → swimlanes-B3ENRKFQ-BDi6AeJI.js} +1 -1
  225. package/editor-web/assets/swimlanesDiagram-AYQRV4AK-2wwOmxbv.js +8 -0
  226. package/editor-web/assets/switch-b6GCy_ix.js +1 -0
  227. package/editor-web/assets/syntax-Bqyhj0dw.js +1 -0
  228. package/editor-web/assets/tablet-C6oePHEW.js +1 -0
  229. package/editor-web/assets/textarea-Bu6uPEqT.js +1 -0
  230. package/editor-web/assets/{timeline-definition-JXYKGLGB-DRTJ1_Er.js → timeline-definition-JXYKGLGB-B0awa2hh.js} +1 -1
  231. package/editor-web/assets/trash-2-SFReAxVM.js +1 -0
  232. package/editor-web/assets/{treeView-D4JQ5SDB-BYJ_m-i5.js → treeView-D4JQ5SDB-C91G0IGm.js} +1 -1
  233. package/editor-web/assets/{treemap-SAJKECNS-BcU6I6Rg.js → treemap-SAJKECNS-CiOWiwl2.js} +1 -1
  234. package/editor-web/assets/updating-D0GEtwnJ.js +1 -0
  235. package/editor-web/assets/{usecaseDiagram-WPOLBNNX-YV92pS4o.js → usecaseDiagram-WPOLBNNX-DMYM1MRe.js} +1 -1
  236. package/editor-web/assets/{vennDiagram-Q3Y3IDCW-oAvfHZtf.js → vennDiagram-Q3Y3IDCW-DQIJ5vvN.js} +1 -1
  237. package/editor-web/assets/{video-SJvDRCJK.js → video-mMOFXHYK.js} +1 -1
  238. package/editor-web/assets/{wardley-7MLQ67FV-BLNiqxtt.js → wardley-7MLQ67FV-C3H9HG8r.js} +1 -1
  239. package/editor-web/assets/{wardleyDiagram-IVAIDKWA-SppgC6xW.js → wardleyDiagram-IVAIDKWA-DgsjqY1Y.js} +1 -1
  240. package/editor-web/assets/{words-BUlNNuH2.js → words-B2jQwWpp.js} +1 -1
  241. package/editor-web/assets/{words-zMedmPWc.js → words-DgMuEmDO.js} +1 -1
  242. package/editor-web/assets/workbook-NtMEyLgf.js +41 -0
  243. package/editor-web/assets/x-BAJilkKD.js +41 -0
  244. package/editor-web/assets/{xychartDiagram-4URNHDU4-BHMn_jwJ.js → xychartDiagram-4URNHDU4-DzsGI527.js} +1 -1
  245. package/editor-web/index.html +5 -6
  246. package/package.json +5 -2
  247. package/editor-web/assets/article-DHf6mOY_.js +0 -7
  248. package/editor-web/assets/article-Dns1-Xh-.js +0 -3
  249. package/editor-web/assets/bar-button-CKPfx2AB.js +0 -1
  250. package/editor-web/assets/channel-CVWSV3su.js +0 -1
  251. package/editor-web/assets/chip-Bn_9JRRG.js +0 -1
  252. package/editor-web/assets/collaborator-XiHOxwGM.js +0 -1
  253. package/editor-web/assets/deck-DQpNIS2p.js +0 -1
  254. package/editor-web/assets/dist--z0ZHp4T.js +0 -16
  255. package/editor-web/assets/dist-B5GOGGEe.js +0 -1
  256. package/editor-web/assets/dist-Bx6q9kCu.js +0 -1
  257. package/editor-web/assets/dist-C4hHtrJr.js +0 -1
  258. package/editor-web/assets/dist-CCXJewsi.js +0 -19
  259. package/editor-web/assets/dist-CfK2BLl8.js +0 -4
  260. package/editor-web/assets/dist-Cmux3oJ_.js +0 -1
  261. package/editor-web/assets/dist-Cspf85KV.js +0 -6
  262. package/editor-web/assets/dist-DOrGo1GD.js +0 -19
  263. package/editor-web/assets/dist-DjiCHlSu.js +0 -35
  264. package/editor-web/assets/dist-Do4a40Wn.js +0 -19
  265. package/editor-web/assets/dist-FKEWS3Co.js +0 -547
  266. package/editor-web/assets/dist-QKd2i6kG.js +0 -5
  267. package/editor-web/assets/dist-SGnOfLhx.js +0 -24
  268. package/editor-web/assets/dist-VmVB7tl4.js +0 -3
  269. package/editor-web/assets/esm-PQD5Pn8a.js +0 -21
  270. package/editor-web/assets/flowDiagram-IUGLLWBU-B-25n8zE.js +0 -1
  271. package/editor-web/assets/hint-CbwoSBMw.js +0 -1
  272. package/editor-web/assets/index-CXisi0Cj.css +0 -2
  273. package/editor-web/assets/index-wMlfx8aT.js +0 -28
  274. package/editor-web/assets/layout-SWqqA0yV.js +0 -1
  275. package/editor-web/assets/progress-DZQTiRLv.js +0 -6
  276. package/editor-web/assets/ribbon-DajdQ_Ya.js +0 -1
  277. package/editor-web/assets/row-Bei9HNEe.js +0 -1
  278. package/editor-web/assets/split-DBAbwPZ5.js +0 -3
  279. package/editor-web/assets/surface-CIF0Ae0z.js +0 -1
  280. package/editor-web/assets/swatch-BUzr_XmH.js +0 -1
  281. package/editor-web/assets/swimlanesDiagram-AYQRV4AK-B8n3zOw_.js +0 -8
  282. package/editor-web/assets/switch-DrZxoPQS.js +0 -1
  283. package/editor-web/assets/syntax-emXV4DnN.js +0 -1
  284. package/editor-web/assets/tabs-BwU2E7bU.js +0 -1
  285. package/editor-web/assets/textarea-BX_ax3X8.js +0 -1
  286. package/editor-web/assets/type-CvZ0HZsV.js +0 -41
  287. package/editor-web/assets/workbook-BZKYx4WB.js +0 -41
@@ -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 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/tools";import{WORK_DIR as U}from"@allyhub/formats/layout";import{EXIT as m}from"@allyhub/protocol/cli";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`[
2
+ import{readFile as I}from"node:fs/promises";import{join as D,resolve as L}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/tools";import{WORK_DIR as U}from"@allyhub/formats/layout";import{EXIT as m}from"@allyhub/protocol/cli";import{CommandError as g,defineCommand as W}from"../command.js";import{optionName as _}from"../args.js";import{requiredMissing as q,toolInput as B,toolOptions as K,exampleArgs as G,fieldLines as C}from"../tool-options.js";import{cloudOf as f,cloudWork as w,placeFrom as z,plural as $}from"./cloud.js";const j=e=>e!==null&&typeof e=="object"&&!Array.isArray(e),X=8e3,p={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 W({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(f(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 F=(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
4
  ${e.map(r=>o+readableJson(r,o)).join(`,
5
5
  `)}
6
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
7
  ${o.map(([t,l])=>`${i}${JSON.stringify(t)}: ${readableJson(l,i)}`).join(`,
8
8
  `)}
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(`
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 R(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
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 24 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}
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)}${e.creditsLeft===void 0?"":` · Credits left: ${String(e.creditsLeft)}`}`].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 I(L(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(p)),o=s.strictObject({...n.shape,...p,input:p.input.describe(n.inputOnly.length?`${p.input.description??""}. Fields only it gives: ${n.inputOnly.join(", ")}`:p.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(),creditsLeft: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)."]:[],...F("In --input",C(e.input,{only:i,required:!0})),...F("Output",C(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=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,v,E)=>{c.progress(`${e.name}: ${v.message}; reading call ${d} again in ${String(E)} 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:R(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:L(c.cwd,u.file)},force:u.force,wait:u.wait});return{value:{...x},text:R(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(f(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(f(a)).catch(i),l=t?.works.find(u=>u.id===n);if(l||(t=await h(f(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=W({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 24 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(f(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
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
16
  `),...i?{exit:i.error.exit,code:i.error.code}:{}}}));
@@ -1,10 +1,10 @@
1
1
  /*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
2
- import{relative as G,sep as N}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 U}from"@allyhub/measure";import{CUT_REVIEW_DEFAULTS as J,cutLine as V,dbText as A,silenceText as q}from"@allyhub/video-measure/cut-sheet";import{consoleJson as C}from"@allyhub/project";import{PAGE_CAPTURE_DEFAULTS as F}from"@allyhub/browser";import{itemIdOf as X}from"@allyhub/formats";import{EXIT as D}from"@allyhub/protocol";import{defineCommand as v}from"../command.js";import{dir as P}from"../fields.js";import{parameters as z}from"../parameters.js";import{tellPresence as W}from"../presence.js";import{projectRoot as S}from"../project.js";import{VERSION_FIELDS as O,commandError as M,withVersion as x}from"../version.js";import{isPicture as T,isVideo as I,usage as g}from"./frames/common.js";import{findDoc as K}from"@allyhub/doc-extension/cli";import{findSheet as L}from"@allyhub/sheet-extension/cli";function j(e){return[...e.problems.filter(a=>a.level==="error").map(B),...R(C(e.console))]}const k=e=>({problems:e.problems,...C(e.console)}),E=(e,n)=>S(e,n),Q=t.strictObject({...O,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 every sheet, a picture each, 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 four to a picture. Without it, --part's still, or every part's still, four to a picture."),part:t.string().optional().describe("A part by its key (a deck's slide, an image's board): the one --at, --from and --to count from; alone, its still at its own size. A cover's key (video({ covers })): the cover"),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 Y(e){const n=[["--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(n.length>0)throw g("bad-option",`${n.join(" and ")} ${n.length===1?"is":"are"} a piece's: a video file has no combos or parts.`)}function Z(e){const n=[["--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(n.length>0)throw g("bad-option",`${n.join(" and ")} ${n.length===1?"is":"are"} not a doc's: a doc has pages (--page), not moments.`)}export const frames=v({name:"frames",summary:"Pictures of a piece over time, drawn as its exported files are: 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:Q,positional:["item"],output:t.looseObject({mode:t.enum(["sheet","frame","grid","clip","cover"])}),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"]},async(e,n)=>{const a=n.cwd;if(e.item!==void 0&&I(e.item)){Y(e);const{fileFrames:i}=await import("./frames/file.js"),o=await i({cwd:a,root:await E(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(h=>{throw M(h)}),s=o.video,f=`${o.file} · ${s.duration.toFixed(2)} s · ${String(s.width)}×${String(s.height)} · ${String(s.fps)} fps`,m="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:[f,..."out"in o?[`${o.out}${"tiles"in o?` (${String(o.tiles.length)} moments in ${String(o.cols)} columns)`:""}`]:[],...m?[m]:[]].join(`
3
- `)}}if(e.grid!==void 0)throw g("bad-option","--grid draws a video file's frame at its own size: give the file.");const d=await S(a,e.dir);if(e.item!==void 0&&await L(d,a,e.item)!==void 0){const{sheetPicture:i}=await import("./frames/sheet.js"),o=await i({cwd:a,root:d,item:e.item,range:e.range,out:e.out}),s=await L(d,a,e.item);return s!==void 0&&Object.keys(o.at).length>0&&await W(d,{doing:"looking",item:X(G(d,s).split(N).join("/")),place:o.at}),{value:o,text:[...o.outs,...o.cut].join(`
4
- `)}}const u=e.item===void 0?void 0:await K(d,a,e.item);if(u!==void 0){Z(e);const{docPicture:i}=await import("./frames/doc.js"),o=await i({cwd:a,root:d,file:u,page:e.page,out:e.out,progress:f=>{n.progress(f)}}),s=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; ${s} drawn`].join(`
5
- `)}}if(e.page!==void 0)throw g("bad-option","--page is a doc's: name the doc.");if(e.range!==void 0)throw g("bad-option","--range is a sheet's: name the sheet.");const c=e.at!==void 0||e.part!==void 0||e.from!==void 0||e.to!==void 0;if(!c&&(e.clip!==void 0||e.beside!==void 0))throw g("bad-option","--clip and --beside draw moments: give --at, --part, or --from and --to.");const{pieceMoments:l,stillsSheet:y}=await import("./frames/piece.js");if(!c&&!e.overlay){const{result:i,...o}=await x(e,n,"render",m=>y(m,{cwd:a,root:d,out:e.out})),{unit:s,...f}=i;return{value:{...f,...k(o)},text:[`${i.out} (${i.piece} · ${i.format} · ${String(i.parts.length)} ${i.parts.length===1?s.noun:s.plural}${"scale"in i?` · ${String(i.scale)}×`:""})`,..."outs"in i?i.outs.slice(1):[],...j(o)].join(`
6
- `)}}const b=!c&&e.overlay,{result:r,...w}=await x(e,n,"render",async i=>{const o=await l(i,{cwd:a,root:d,at:b?i.timeline.parts.map(h=>String(h.still)):e.at,part:e.part,from:e.from,to:e.to,clip:e.clip,out:e.out,overlay:e.overlay,beside:e.beside});if(o.mode==="cover")return o;const s="tiles"in o?o.tiles[0]:void 0,f=o.mode==="frame"?o.t:o.stretch?.from??s?.t,m=o.mode==="frame"?o.part:s?.part;return f!==void 0&&!b&&await W(d,{doing:"looking",item:i.piece.place,place:{t:f,...m===void 0?{}:{part:m}}}),o}),p=[];if(r.mode==="cover"&&p.push(`${r.out} (${r.piece} · ${r.format} · ${r.cover})`),r.mode==="frame"&&p.push(`${r.out} (${r.piece} · ${r.format} · ${r.part}${r.timed?` · ${r.t.toFixed(2)} s`:""})`),r.mode==="grid"){("outs"in r&&Array.isArray(r.outs)?r.outs.filter(s=>typeof s=="string"):[r.out]).forEach((s,f)=>{const m=r.tiles.filter(h=>("picture"in h?h.picture:0)===f);p.push(`${s} (${r.piece} · ${String(m.length)} moments in ${String(Math.min(r.cols,m.length))} columns · ${String(r.scale)}×)`,` ${m.map(h=>`${h.t.toFixed(r.stretch?3:2)} ${h.part}`).join(" · ")}`)});const o=[...new Set(r.tiles.flatMap(s=>s.overlay?.missing??[]))];o.length>0&&p.push(` Not measured: ${o.join(", ")}.`)}const $=r.mode==="cover"?void 0:r.stretch;return $&&p.push(` Stretch ${$.from.toFixed(3)}–${$.to.toFixed(3)} s, one frame in ${String($.every)}: ${String($.frames)} frames.`),"clip"in r&&r.clip&&p.push(`${r.clip.out} (${r.clip.type}, ${String(r.clip.frames)} frames at ${String(r.clip.fps)} fps, no sound)`),{value:{...r,...k(w)},text:[...p,...j(w)].join(`
7
- `)}}),framesCuts=v({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({...O,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:z({span:t.number().positive().max(10).default(J.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,n)=>{const a=n.cwd,d=await S(a,e.dir),{cutSheets:u}=await import("./frames/cuts.js"),{result:c,...l}=await x(e,n,"render",r=>u(r,{cwd:a,root:d,part:e.part,out:e.out,review:{span:e.params.span}})),y=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)`,b=[`${c.piece} · ${c.format} · ${y}; silence is sound under ${String(c.threshold)} dBFS`];for(const r of c.cuts){const w=r.sound?`level ${A(r.sound.levelDb)} / around ${A(r.sound.aroundDb)} dBFS, peak ${A(r.sound.peakDb)}, step ${r.sound.jumpDb<0?"−":"+"}${Math.abs(r.sound.jumpDb).toFixed(1)} dB`:"no sound";b.push(`${String(r.index).padStart(3)} ${r.t.toFixed(3).padStart(7)} s ${r.kind.padEnd(6)} ${V(r)}`,` silence at the cut: ${q(r.silence)} · ${w}`,` “${r.said.before}” | “${r.said.after}”${r.across?` · across the cut: “${r.across}”`:""}`,` ${r.sheet}`)}return{value:{...c,...k(l)},text:[...b,...j(l)].join(`
8
- `)}});const _=U;export const framesCompare=v({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:O.combo,dir:P,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:z({resize:t.enum(["stretch","width","none"]).default(_.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(_.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,n)=>{const a=n.cwd,d=e.params;if(!T(e.reference))throw g("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&&T(e.candidate)?e.candidate:"reference.png"} ${e.reference}`);const u=e.candidate!==void 0&&(T(e.candidate)||I(e.candidate))?e.candidate:void 0,{compareText:c,comparePictures:l}=await import("./frames/compare.js"),y=p=>({cwd:a,root:p,reference:e.reference,file:u,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(u!==void 0){if(e.combo!==void 0||e.part!==void 0)throw g("bad-option","--combo and --part are a piece's: the candidate is a file.");const p=await l(y(await E(a,e.dir)),void 0).catch($=>{throw M($)});return{value:p,text:c(p)}}const b=await S(a,e.dir),{result:r,...w}=await x({...e,item:e.candidate},n,"render",p=>l(y(b),p));return{value:{...r,...k(w)},text:[c(r),...j(w)].join(`
9
- `)}}),framesWeb=v({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:P,size:t.string().default(`${String(F.width)}x${String(F.height)}`).describe("The viewport, WIDTHxHEIGHT in CSS pixels"),scale:t.number().min(1).max(4).default(F.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,n)=>{const a=n.cwd,[d,u]=H(e.size),{pageShot:c}=await import("./frames/page.js"),l=await c({cwd:a,root:await E(a,e.dir),url:e.url,out:e.out,el:e.el,click:e.click,width:d,height:u,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(`
2
+ import{relative as G,sep as N}from"node:path";import{z as t}from"zod";import{formatConsole as R,formatProblem as U}from"../text/index.js";import{sizeOf as B}from"@allyhub/build";import{COMPARE_DEFAULTS as H}from"@allyhub/measure";import{CUT_REVIEW_DEFAULTS as J,cutLine as V,dbText as A,silenceText as q}from"@allyhub/video-measure/cut-sheet";import{consoleJson as C}from"@allyhub/project";import{PAGE_CAPTURE_DEFAULTS as F}from"@allyhub/browser";import{itemIdOf as X}from"@allyhub/formats";import{EXIT as D}from"@allyhub/protocol";import{defineCommand as v}from"../command.js";import{dir as P}from"../fields.js";import{parameters as z}from"../parameters.js";import{tellPresence as W}from"../presence.js";import{projectRoot as S}from"../project.js";import{VERSION_FIELDS as O,commandError as M,withVersion as x}from"../version.js";import{isPicture as T,isVideo as I,usage as g}from"./frames/common.js";import{findDoc as K}from"@allyhub/doc-extension/cli";import{findSheet as L}from"@allyhub/sheet-extension/cli";function j(e){return[...e.problems.filter(a=>a.level==="error").map(U),...R(C(e.console))]}const k=e=>({problems:e.problems,...C(e.console)}),E=(e,n)=>S(e,n),Q=t.strictObject({...O,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 every sheet, a picture each, 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 four to a picture. Without it, --part's still, or every part's still, four to a picture."),part:t.string().optional().describe("A part by its key (a deck's slide, an image's board): the one --at, --from and --to count from; alone, its still at its own size. A cover's key (video({ covers })): the cover"),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 Y(e){const n=[["--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(n.length>0)throw g("bad-option",`${n.join(" and ")} ${n.length===1?"is":"are"} a piece's: a video file has no combos or parts.`)}function Z(e){const n=[["--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(n.length>0)throw g("bad-option",`${n.join(" and ")} ${n.length===1?"is":"are"} not a doc's: a doc has pages (--page), not moments.`)}export const frames=v({name:"frames",summary:"Pictures of a piece over time, drawn as its exported files are: 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. Sheet and doc do not need frames to check. Use it only when the person asks",input:Q,positional:["item"],output:t.looseObject({mode:t.enum(["sheet","frame","grid","clip","cover"])}),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"]},async(e,n)=>{const a=n.cwd;if(e.item!==void 0&&I(e.item)){Y(e);const{fileFrames:i}=await import("./frames/file.js"),r=await i({cwd:a,root:await E(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(h=>{throw M(h)}),s=r.video,f=`${r.file} · ${s.duration.toFixed(2)} s · ${String(s.width)}×${String(s.height)} · ${String(s.fps)} fps`,m="clip"in r&&r.clip?`${r.clip.out} (${r.clip.type}, ${String(r.clip.frames)} frames at ${String(r.clip.fps)} fps, no sound)`:void 0;return{value:r,text:[f,..."out"in r?[`${r.out}${"tiles"in r?` (${String(r.tiles.length)} moments in ${String(r.cols)} columns)`:""}`]:[],...m?[m]:[]].join(`
3
+ `)}}if(e.grid!==void 0)throw g("bad-option","--grid draws a video file's frame at its own size: give the file.");const d=await S(a,e.dir);if(e.item!==void 0&&await L(d,a,e.item)!==void 0){const{sheetPicture:i}=await import("./frames/sheet.js"),r=await i({cwd:a,root:d,item:e.item,range:e.range,out:e.out}),s=await L(d,a,e.item);return s!==void 0&&Object.keys(r.at).length>0&&await W(d,{doing:"looking",item:X(G(d,s).split(N).join("/")),place:r.at}),{value:r,text:[...r.outs,...r.cut].join(`
4
+ `)}}const u=e.item===void 0?void 0:await K(d,a,e.item);if(u!==void 0){Z(e);const{docPicture:i}=await import("./frames/doc.js"),r=await i({cwd:a,root:d,file:u,page:e.page,out:e.out,progress:f=>{n.progress(f)}}),s=r.drawn.length===r.pages?"every page":`page${r.drawn.length===1?"":"s"} ${r.drawn.join(", ")}`;return{value:r,text:[r.out,`${r.doc}: ${String(r.pages)} page${r.pages===1?"":"s"} on ${String(r.paper.width)} × ${String(r.paper.height)} mm paper; ${s} drawn`].join(`
5
+ `)}}if(e.page!==void 0)throw g("bad-option","--page is a doc's: name the doc.");if(e.range!==void 0)throw g("bad-option","--range is a sheet's: name the sheet.");const c=e.at!==void 0||e.part!==void 0||e.from!==void 0||e.to!==void 0;if(!c&&(e.clip!==void 0||e.beside!==void 0))throw g("bad-option","--clip and --beside draw moments: give --at, --part, or --from and --to.");const{pieceMoments:l,stillsSheet:y}=await import("./frames/piece.js");if(!c&&!e.overlay){const{result:i,...r}=await x(e,n,"render",m=>y(m,{cwd:a,root:d,out:e.out})),{unit:s,...f}=i;return{value:{...f,...k(r)},text:[`${i.out} (${i.piece} · ${i.format} · ${String(i.parts.length)} ${i.parts.length===1?s.noun:s.plural}${"scale"in i?` · ${String(i.scale)}×`:""})`,..."outs"in i?i.outs.slice(1):[],...j(r)].join(`
6
+ `)}}const b=!c&&e.overlay,{result:o,...w}=await x(e,n,"render",async i=>{const r=await l(i,{cwd:a,root:d,at:b?i.timeline.parts.map(h=>String(h.still)):e.at,part:e.part,from:e.from,to:e.to,clip:e.clip,out:e.out,overlay:e.overlay,beside:e.beside});if(r.mode==="cover")return r;const s="tiles"in r?r.tiles[0]:void 0,f=r.mode==="frame"?r.t:r.stretch?.from??s?.t,m=r.mode==="frame"?r.part:s?.part;return f!==void 0&&!b&&await W(d,{doing:"looking",item:i.piece.place,place:{t:f,...m===void 0?{}:{part:m}}}),r}),p=[];if(o.mode==="cover"&&p.push(`${o.out} (${o.piece} · ${o.format} · ${o.cover})`),o.mode==="frame"&&p.push(`${o.out} (${o.piece} · ${o.format} · ${o.part}${o.timed?` · ${o.t.toFixed(2)} s`:""})`),o.mode==="grid"){("outs"in o&&Array.isArray(o.outs)?o.outs.filter(s=>typeof s=="string"):[o.out]).forEach((s,f)=>{const m=o.tiles.filter(h=>("picture"in h?h.picture:0)===f);p.push(`${s} (${o.piece} · ${String(m.length)} moments in ${String(Math.min(o.cols,m.length))} columns · ${String(o.scale)}×)`,` ${m.map(h=>`${h.t.toFixed(o.stretch?3:2)} ${h.part}`).join(" · ")}`)});const r=[...new Set(o.tiles.flatMap(s=>s.overlay?.missing??[]))];r.length>0&&p.push(` Not measured: ${r.join(", ")}.`)}const $=o.mode==="cover"?void 0:o.stretch;return $&&p.push(` Stretch ${$.from.toFixed(3)}–${$.to.toFixed(3)} s, one frame in ${String($.every)}: ${String($.frames)} frames.`),"clip"in o&&o.clip&&p.push(`${o.clip.out} (${o.clip.type}, ${String(o.clip.frames)} frames at ${String(o.clip.fps)} fps, no sound)`),{value:{...o,...k(w)},text:[...p,...j(w)].join(`
7
+ `)}}),framesCuts=v({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({...O,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:z({span:t.number().positive().max(10).default(J.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,n)=>{const a=n.cwd,d=await S(a,e.dir),{cutSheets:u}=await import("./frames/cuts.js"),{result:c,...l}=await x(e,n,"render",o=>u(o,{cwd:a,root:d,part:e.part,out:e.out,review:{span:e.params.span}})),y=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)`,b=[`${c.piece} · ${c.format} · ${y}; silence is sound under ${String(c.threshold)} dBFS`];for(const o of c.cuts){const w=o.sound?`level ${A(o.sound.levelDb)} / around ${A(o.sound.aroundDb)} dBFS, peak ${A(o.sound.peakDb)}, step ${o.sound.jumpDb<0?"−":"+"}${Math.abs(o.sound.jumpDb).toFixed(1)} dB`:"no sound";b.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)} · ${w}`,` “${o.said.before}” | “${o.said.after}”${o.across?` · across the cut: “${o.across}”`:""}`,` ${o.sheet}`)}return{value:{...c,...k(l)},text:[...b,...j(l)].join(`
8
+ `)}});const _=H;export const framesCompare=v({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:O.combo,dir:P,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:z({resize:t.enum(["stretch","width","none"]).default(_.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(_.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,n)=>{const a=n.cwd,d=e.params;if(!T(e.reference))throw g("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&&T(e.candidate)?e.candidate:"reference.png"} ${e.reference}`);const u=e.candidate!==void 0&&(T(e.candidate)||I(e.candidate))?e.candidate:void 0,{compareText:c,comparePictures:l}=await import("./frames/compare.js"),y=p=>({cwd:a,root:p,reference:e.reference,file:u,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(u!==void 0){if(e.combo!==void 0||e.part!==void 0)throw g("bad-option","--combo and --part are a piece's: the candidate is a file.");const p=await l(y(await E(a,e.dir)),void 0).catch($=>{throw M($)});return{value:p,text:c(p)}}const b=await S(a,e.dir),{result:o,...w}=await x({...e,item:e.candidate},n,"render",p=>l(y(b),p));return{value:{...o,...k(w)},text:[c(o),...j(w)].join(`
9
+ `)}}),framesWeb=v({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:P,size:t.string().default(`${String(F.width)}x${String(F.height)}`).describe("The viewport, WIDTHxHEIGHT in CSS pixels"),scale:t.number().min(1).max(4).default(F.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,n)=>{const a=n.cwd,[d,u]=B(e.size),{pageShot:c}=await import("./frames/page.js"),l=await c({cwd:a,root:await E(a,e.dir),url:e.url,out:e.out,el:e.el,click:e.click,width:d,height:u,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
10
  `),exit:l.missing.length>0?D.failed:D.ok}}),FRAMES_COMMANDS=[frames,framesCuts,framesCompare,framesWeb];