hyperframes 0.9.55 → 0.9.58

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 (410) hide show
  1. package/dist/{add-2LZ5XA27.js → add-JQUKPSEZ.js} +30 -28
  2. package/dist/{agentPromptGenerator-RSFEFNFL.js → agentPromptGenerator-3NEY7FPP.js} +16 -15
  3. package/dist/{animatedGifPrep-AX4MK2QD.js → animatedGifPrep-VMUZ6IVJ.js} +18 -16
  4. package/dist/api.js +61 -59
  5. package/dist/{appHistory-T3ZLA7QN.js → appHistory-JNI6IOR6.js} +7 -4
  6. package/dist/{asset-XYQJVHR2.js → asset-ZT3VXZ67.js} +3 -2
  7. package/dist/{assetCataloger-WTFR2Z5Q.js → assetCataloger-D2DV65BA.js} +17 -16
  8. package/dist/{audio-U2OIHTUI.js → audio-LD5H2R5V.js} +40 -39
  9. package/dist/{auth-DXESNULL.js → auth-4FPYYMSH.js} +4 -4
  10. package/dist/{autoUpdate-DWT4YYU2.js → autoUpdate-5ZKSFCG4.js} +5 -5
  11. package/dist/{avatars-EL5RBI4P.js → avatars-DCLFE7VG.js} +26 -24
  12. package/dist/{backgroundChecks-T2DL425O.js → backgroundChecks-UZA3F46H.js} +6 -6
  13. package/dist/backgroundChecksWorker.js +6 -6
  14. package/dist/{batchRender-CMG4SVBX.js → batchRender-TAUW3CT2.js} +14 -9
  15. package/dist/{beats-HU756KUO.js → beats-X3LCR6OG.js} +16 -15
  16. package/dist/{benchmark-HBNCPXH5.js → benchmark-DNZQT3YQ.js} +23 -22
  17. package/dist/{billing-LGHM3LC7.js → billing-4BFUAHWX.js} +44 -29
  18. package/dist/{browser-XIFUT5OB.js → browser-5J2MTDB6.js} +14 -13
  19. package/dist/{bundleWithLocalizedFonts-JPPBCCVV.js → bundleWithLocalizedFonts-XWK47ZVF.js} +1 -1
  20. package/dist/{capture-ZY7G3QSM.js → capture-2YSVFKWV.js} +40 -39
  21. package/dist/{capture-B6DSZD2P.js → capture-TVYTKWTG.js} +4 -4
  22. package/dist/{captureCompositionFrame-2WRG6SNW.js → captureCompositionFrame-L765HLCT.js} +22 -21
  23. package/dist/{captureFile-LXMDM5TD.js → captureFile-DOCK42K3.js} +4 -3
  24. package/dist/{catalog-CUEOQ4PJ.js → catalog-CHGGRRQX.js} +30 -28
  25. package/dist/catalog-artifact/media-vectors.json +205 -0
  26. package/dist/{catch-up-BAYJTXAL.js → catch-up-OCFU6ZR3.js} +18 -17
  27. package/dist/{check-KGXBQPRZ.js → check-LWK4Z7FI.js} +66 -63
  28. package/dist/{checkAudio-6PI7DJLP.js → checkAudio-R5ORBXBO.js} +27 -24
  29. package/dist/{checkBrowser-4SGXUL27.js → checkBrowser-6SH73T47.js} +56 -55
  30. package/dist/{chunk-VK3MQSA2.js → chunk-23SG3B6M.js} +5 -2
  31. package/dist/{chunk-EXXIFMUX.js → chunk-2GRCLLKU.js} +13 -5
  32. package/dist/chunk-2RUCE54M.js +5083 -0
  33. package/dist/{chunk-PLFOZIEH.js → chunk-2SJNGWSY.js} +1 -1
  34. package/dist/{chunk-FPRHOB5W.js → chunk-2WA62M3B.js} +3 -3
  35. package/dist/{chunk-E2DHBP6C.js → chunk-37VS6QY6.js} +1 -1
  36. package/dist/{chunk-KG24ATFM.js → chunk-37Y334MN.js} +13 -11
  37. package/dist/{chunk-ER22SVLT.js → chunk-3GKGBYW3.js} +7 -27
  38. package/dist/{chunk-SDFGDNWV.js → chunk-3VMZQQUI.js} +1 -1
  39. package/dist/{chunk-NUGAYGT3.js → chunk-4LZSNWFJ.js} +2 -2
  40. package/dist/{chunk-JVA3SAGB.js → chunk-4N3WOFP3.js} +30 -37
  41. package/dist/{chunk-W2GXQ3CR.js → chunk-4NNYYCJN.js} +15 -15
  42. package/dist/{chunk-TMLKMCZK.js → chunk-4QPT3IEL.js} +5 -5
  43. package/dist/{chunk-3L2POG2J.js → chunk-5IE5ZI66.js} +37 -8
  44. package/dist/{chunk-4IUOWNDS.js → chunk-5IUVWP3A.js} +2 -2
  45. package/dist/{chunk-3USMIMBB.js → chunk-5SGGOZNL.js} +464 -140
  46. package/dist/chunk-677JGYQL.js +91 -0
  47. package/dist/{chunk-LEIR7IDJ.js → chunk-6LU6JICP.js} +80 -1
  48. package/dist/{chunk-QWBJABCA.js → chunk-7ECPFKQV.js} +4 -4
  49. package/dist/{chunk-BZULWFMJ.js → chunk-7FIJRDUG.js} +45 -10
  50. package/dist/{chunk-VCKUDUPN.js → chunk-7IMHPBSH.js} +248 -32
  51. package/dist/{chunk-OM2WIZOR.js → chunk-7WAWUQDQ.js} +3 -3
  52. package/dist/{chunk-F7B2YDPM.js → chunk-7WYJXKIG.js} +19 -11
  53. package/dist/{chunk-OWQWMQTY.js → chunk-7ZHBY7T5.js} +1 -1
  54. package/dist/{chunk-GKOF2RS3.js → chunk-A4L7G74T.js} +1 -1
  55. package/dist/{chunk-NHNFBLBM.js → chunk-A4YRESMH.js} +6 -3
  56. package/dist/{chunk-MDRLJ737.js → chunk-AJ7YRQS4.js} +1 -1
  57. package/dist/{chunk-WPD7JH6F.js → chunk-ALD7JBPV.js} +2 -2
  58. package/dist/{chunk-5HJZGP54.js → chunk-AM4Y3XMR.js} +2 -2
  59. package/dist/{chunk-7DJCG5ED.js → chunk-AM6UYKVR.js} +10 -10
  60. package/dist/{chunk-FOKS5HQ2.js → chunk-AMS7Q7P7.js} +4 -4
  61. package/dist/{chunk-EKZ5FGV7.js → chunk-BSDUTNFX.js} +1 -1
  62. package/dist/{chunk-6BGTTCKN.js → chunk-BSFTB6AM.js} +5 -5
  63. package/dist/{chunk-NCSBBZQ5.js → chunk-CGJIMWNU.js} +5 -2
  64. package/dist/{chunk-TULCSCC4.js → chunk-CGODFJZ7.js} +9 -9
  65. package/dist/{chunk-JS7UI73E.js → chunk-CPDPSNSB.js} +8 -8
  66. package/dist/{chunk-NMQCIUBE.js → chunk-CRPLPK6J.js} +10 -8
  67. package/dist/{chunk-PPLFDG7N.js → chunk-CVTIGS5K.js} +3 -3
  68. package/dist/{chunk-NKAW4RVE.js → chunk-D2LSYXLW.js} +1 -1
  69. package/dist/{chunk-CHQWDBUM.js → chunk-D3M5VOC5.js} +9 -14
  70. package/dist/{chunk-TPLO6NJI.js → chunk-DH3M5X3Y.js} +4 -4
  71. package/dist/{chunk-WQGQCSRY.js → chunk-DHVRVI7F.js} +5 -5
  72. package/dist/{chunk-KCF6Q54R.js → chunk-DL6PEJWH.js} +5 -2
  73. package/dist/{chunk-LGYCWN3Q.js → chunk-DWFWF6IR.js} +30 -22
  74. package/dist/{chunk-KVYHRUZX.js → chunk-DX5Y3L5B.js} +3 -3
  75. package/dist/{chunk-T5S7U5C6.js → chunk-E26Z73S3.js} +1 -1
  76. package/dist/{chunk-OTWFSHYH.js → chunk-E4IR34CF.js} +434 -306
  77. package/dist/{chunk-32IRBM3V.js → chunk-ELRE6LVJ.js} +3 -3
  78. package/dist/{chunk-EUJSQHIL.js → chunk-EOXNEA4Z.js} +2 -2
  79. package/dist/{chunk-QGQYMSYM.js → chunk-ERDQIRUL.js} +4 -4
  80. package/dist/{chunk-ATKA5KHE.js → chunk-EWKJDXH6.js} +3 -3
  81. package/dist/{chunk-FLHL32SV.js → chunk-EZJHKHWU.js} +36 -8
  82. package/dist/{chunk-QQLVSUO7.js → chunk-FFOFGL2O.js} +2 -2
  83. package/dist/{chunk-UHVKV5IF.js → chunk-FNXU56VT.js} +1 -1
  84. package/dist/{chunk-BMJGWQ5X.js → chunk-G3U5CUF3.js} +1 -1
  85. package/dist/{chunk-ON3CGL3V.js → chunk-GDIBE57N.js} +2 -2
  86. package/dist/{chunk-MWTOYGIJ.js → chunk-GEOJA37C.js} +3 -3
  87. package/dist/{chunk-MO5NTFSC.js → chunk-GIVMQDSK.js} +2 -2
  88. package/dist/{chunk-UCLUH5AG.js → chunk-GRSZAGJB.js} +2 -2
  89. package/dist/{chunk-AGTBMLNM.js → chunk-GVIJFPZV.js} +2 -2
  90. package/dist/{chunk-YVCPUVHV.js → chunk-H3LEOZVK.js} +1 -1
  91. package/dist/{chunk-OAV5ESA6.js → chunk-H7DTMLAR.js} +9 -9
  92. package/dist/{chunk-OYEGPK3Q.js → chunk-HFIVZJJD.js} +1 -1
  93. package/dist/{chunk-RBOKZ5ED.js → chunk-HFUI6LVF.js} +1 -1
  94. package/dist/chunk-HOIEN7O4.js +31 -0
  95. package/dist/{chunk-UHE44FC4.js → chunk-HTGJOOXE.js} +12 -4
  96. package/dist/{chunk-GWSMTN55.js → chunk-IE6BIB3L.js} +53 -1
  97. package/dist/{chunk-UHVB2TVW.js → chunk-IGZQYMZA.js} +7768 -7561
  98. package/dist/{chunk-CAYQATCT.js → chunk-J6VYWZSO.js} +1 -1
  99. package/dist/{chunk-OZDELWQP.js → chunk-JKLWQUSV.js} +1 -1
  100. package/dist/{chunk-27YDEBOP.js → chunk-JOOKM2NC.js} +2 -2
  101. package/dist/{chunk-XFSZ3IXC.js → chunk-JQZ5WP7L.js} +1 -1
  102. package/dist/{chunk-XLQUCTC2.js → chunk-JZVI2TMX.js} +3 -3
  103. package/dist/{chunk-NFNYYBD6.js → chunk-K2EJQ44S.js} +1 -1
  104. package/dist/{chunk-N4CJSWTO.js → chunk-KYKQO4VN.js} +2 -2
  105. package/dist/{chunk-2XZ76TF4.js → chunk-LO5USUM4.js} +1 -1
  106. package/dist/{chunk-TEA4ZEHB.js → chunk-M3IHARIW.js} +15 -15
  107. package/dist/{chunk-N7M2SNAF.js → chunk-M5TTYUZM.js} +2 -2
  108. package/dist/{chunk-IJYIIHGK.js → chunk-MK23FXLH.js} +1 -1
  109. package/dist/{chunk-AYESPEPQ.js → chunk-MPC3OODR.js} +40 -4
  110. package/dist/{chunk-K2VFTUAA.js → chunk-MSC5KBCE.js} +1 -1
  111. package/dist/{chunk-VPX4GVGQ.js → chunk-N6PAWR5C.js} +3 -3
  112. package/dist/{chunk-26RTKW2U.js → chunk-NJPLH762.js} +2 -2
  113. package/dist/{chunk-DQHFS4AE.js → chunk-NLVIE7VN.js} +4 -4
  114. package/dist/{chunk-3WG7IC5Z.js → chunk-O2BLY7PO.js} +1 -1
  115. package/dist/{chunk-SEC76O65.js → chunk-O2INZCGB.js} +1 -1
  116. package/dist/{chunk-2PASB3PC.js → chunk-O4K22EFS.js} +5 -5
  117. package/dist/{chunk-L27Z3PZT.js → chunk-O5U3Y5DX.js} +1 -1
  118. package/dist/{chunk-KD33HZPP.js → chunk-OD7XWF5T.js} +2 -2
  119. package/dist/{chunk-7QFFS657.js → chunk-OEGWTN6N.js} +1 -1
  120. package/dist/{chunk-Q42L7V5T.js → chunk-OL7RHRNJ.js} +1 -1
  121. package/dist/{chunk-AU4ZBCR3.js → chunk-OMZSPAK5.js} +1 -1
  122. package/dist/{chunk-3ANC4SO2.js → chunk-OPSGEOCO.js} +27 -19
  123. package/dist/{chunk-YU5LSWA2.js → chunk-PGITR2WX.js} +7 -4
  124. package/dist/{chunk-RIAH7WEL.js → chunk-PS7WBIPK.js} +10 -10
  125. package/dist/{chunk-TN3WGE3L.js → chunk-PYTF6VHF.js} +6 -4
  126. package/dist/{chunk-OIO7YMBP.js → chunk-QGQCWG7F.js} +1 -1
  127. package/dist/{chunk-TFVIXR6V.js → chunk-ROESFEBP.js} +79 -70
  128. package/dist/{chunk-YY7ZJHL3.js → chunk-RV3HR3BZ.js} +5 -5
  129. package/dist/{chunk-KWTTELUY.js → chunk-SALNTRJA.js} +47 -3
  130. package/dist/{chunk-LKWWY6WN.js → chunk-SE4NOUB6.js} +1 -1
  131. package/dist/{chunk-BOEEHWDX.js → chunk-SM5PNCDI.js} +1 -1
  132. package/dist/{chunk-ZLG2E7GC.js → chunk-SNKBI4YB.js} +2 -2
  133. package/dist/{chunk-EXEX7TSU.js → chunk-SV72WLBE.js} +13 -14
  134. package/dist/{chunk-PXLGDX2S.js → chunk-SYKUNH25.js} +39 -24
  135. package/dist/{chunk-MDOMSEK2.js → chunk-TAXMLPTE.js} +2 -2
  136. package/dist/{chunk-5BWIBP2F.js → chunk-TLDIP7Y3.js} +16 -12
  137. package/dist/{chunk-HLDUHLYO.js → chunk-TLGQQ324.js} +4 -4
  138. package/dist/{chunk-5LSMAWK5.js → chunk-U5MILT4G.js} +1 -1
  139. package/dist/{chunk-UV3I2TND.js → chunk-UDLWVQ74.js} +33 -40
  140. package/dist/{chunk-AHXRYOTC.js → chunk-UGKUGYHD.js} +1 -1
  141. package/dist/{chunk-EUP7ODOV.js → chunk-UJTLTFB6.js} +1 -1
  142. package/dist/{chunk-J424KJXV.js → chunk-V3O4AFO3.js} +9 -9
  143. package/dist/{chunk-FMYXLRJN.js → chunk-VBEDZGBW.js} +3 -3
  144. package/dist/{chunk-NRGNEP3R.js → chunk-VI2LLFW6.js} +2 -2
  145. package/dist/{chunk-PCNNMAUX.js → chunk-VLFBOKZX.js} +1645 -1461
  146. package/dist/{chunk-YSN6HPD3.js → chunk-VSM7OIG2.js} +2 -2
  147. package/dist/{chunk-4RPIEGL3.js → chunk-VXE46PXX.js} +1 -1
  148. package/dist/{chunk-B5HSHXE2.js → chunk-W2OXNTHG.js} +12 -7
  149. package/dist/{chunk-ND5SQJAB.js → chunk-WEU6WLVT.js} +2 -2
  150. package/dist/{chunk-E7GHBT2M.js → chunk-WGHJUGNU.js} +11 -9
  151. package/dist/{chunk-OOWZ6M75.js → chunk-WJIWXHXK.js} +8 -4
  152. package/dist/{chunk-NISP57R3.js → chunk-WLNHZ2OM.js} +56 -33
  153. package/dist/{chunk-X4KIL5BW.js → chunk-WQZQMADW.js} +14 -14
  154. package/dist/{chunk-DY7PQLIE.js → chunk-WTJZ5QFR.js} +42 -5
  155. package/dist/{chunk-O7TIBLSJ.js → chunk-X3IVUSOX.js} +80 -15
  156. package/dist/{chunk-2LQJHVI7.js → chunk-X3UXEB2U.js} +2 -2
  157. package/dist/{chunk-NFLH3TQ5.js → chunk-XMT4MG6W.js} +13 -10
  158. package/dist/{chunk-KHEOHL5O.js → chunk-XYP4T6TQ.js} +1 -1
  159. package/dist/{chunk-4S53OP2C.js → chunk-Y6CZFX5X.js} +65 -20
  160. package/dist/{chunk-QX4TZ2RK.js → chunk-Z642P33A.js} +72 -54
  161. package/dist/{chunk-6EG3W5AD.js → chunk-ZAWQJOTW.js} +8 -8
  162. package/dist/{chunk-FLQT2FVH.js → chunk-ZCLC3KVY.js} +1 -1
  163. package/dist/{chunk-CRRVULYR.js → chunk-ZFOV3R2L.js} +15 -3
  164. package/dist/{chunk-JAAIW4JR.js → chunk-ZO5NHAF3.js} +1 -1
  165. package/dist/{chunk-4ZQG3Z3J.js → chunk-ZYNNZ5DE.js} +2 -2
  166. package/dist/{clean-SXRW77YG.js → clean-6ODSABBF.js} +35 -33
  167. package/dist/cli.js +70 -70
  168. package/dist/{cloud-PUCWVAS2.js → cloud-IMYQB5RC.js} +4 -4
  169. package/dist/{cloud-LU4FVT33.js → cloud-NTKLXMBS.js} +9 -8
  170. package/dist/{cloudrun-SXXONVD6.js → cloudrun-JNLDP33J.js} +16 -13
  171. package/dist/{compare-K65FNAEA.js → compare-VLYZ6ZS4.js} +55 -53
  172. package/dist/{compiler-QISQISFV.js → compiler-7M2UCEWG.js} +7 -6
  173. package/dist/{component-YYCDOLP2.js → component-KMUHKZ4R.js} +4 -3
  174. package/dist/{compositions-LCQTIYIU.js → compositions-ESLWNOMS.js} +30 -29
  175. package/dist/{contactSheet-CCHQAZLA.js → contactSheet-4YF7U6U7.js} +5 -4
  176. package/dist/contract/path-policy.json +12 -2
  177. package/dist/{curve-T7JAY3EM.js → curve-7RPSNRPE.js} +22 -20
  178. package/dist/{cuts-E54SOAWH.js → cuts-KBAAZSPS.js} +23 -21
  179. package/dist/{delete-GLQNSOWH.js → delete-EP5Z7HKF.js} +14 -13
  180. package/dist/{deploy-SPMSEG67.js → deploy-MVR63JLD.js} +14 -11
  181. package/dist/{describeProject-YPTJWL3O.js → describeProject-NBVZT5EN.js} +16 -15
  182. package/dist/{destroy-FMAAH4KQ.js → destroy-DQKIT574.js} +13 -10
  183. package/dist/{deterministicFonts-OXGNMVJE.js → deterministicFonts-LYBMXXBW.js} +5 -4
  184. package/dist/{diff-OT5SHVFD.js → diff-RI3FTMOZ.js} +73 -67
  185. package/dist/{dist-T62DJJZX.js → dist-G7VFX23I.js} +8 -4
  186. package/dist/{dist-RYTNYHMF.js → dist-LRGTXDSM.js} +3 -3
  187. package/dist/{dist-EO7BILWH.js → dist-TOOMD57O.js} +21 -17
  188. package/dist/{doctor-L4SNKUBM.js → doctor-43YNRCRB.js} +25 -24
  189. package/dist/{energy-AXQGYZF6.js → energy-YCH36KCC.js} +23 -21
  190. package/dist/{events-7QP5H6PW.js → events-6RJBITYN.js} +28 -25
  191. package/dist/{events-5T25R4EH.js → events-JCPYG3CD.js} +6 -6
  192. package/dist/{events-EBA6KHJV.js → events-VUR27EF6.js} +12 -11
  193. package/dist/{execute-PTHC7Y5Q.js → execute-OXMKWIFI.js} +45 -44
  194. package/dist/{extract-76UPXPJC.js → extract-XGD2RDEX.js} +25 -23
  195. package/dist/{face-YZON2N2E.js → face-XCNWNTGN.js} +24 -22
  196. package/dist/{feedback-KAYKPPHI.js → feedback-JNFDVBFV.js} +27 -26
  197. package/dist/{ffmpeg-T3KK5XKT.js → ffmpeg-YQLAJUEA.js} +15 -14
  198. package/dist/{figma-NJ6CAJGV.js → figma-XXGHYEB3.js} +3 -3
  199. package/dist/fontLocalizeCli.js +23 -21
  200. package/dist/{frames-KNR4CSB4.js → frames-PEMWFRRY.js} +25 -23
  201. package/dist/{generate-ISCPAKHT.js → generate-H5M4QSJR.js} +42 -40
  202. package/dist/{get-X7QNC3PE.js → get-R6Y2OE5P.js} +14 -13
  203. package/dist/{gpuPolicy-ZXN5S3HE.js → gpuPolicy-2WVDQYZA.js} +15 -14
  204. package/dist/{grade-compare-XD3IONCL.js → grade-compare-KFXPZFDL.js} +58 -54
  205. package/dist/{gsapParserAcorn-SKGP4R4N.js → gsapParserAcorn-RODCGO2L.js} +1 -1
  206. package/dist/hangReport.js +2 -2
  207. package/dist/{heifImagePrep-EFBHDH4Z.js → heifImagePrep-VLKYA5QZ.js} +19 -17
  208. package/dist/{help-VUFIY5X4.js → help-T3XUX5RI.js} +2 -2
  209. package/dist/{history-OM3MHRB2.js → history-QJPUCUUC.js} +26 -21
  210. package/dist/hyperframe.manifest.json +1 -1
  211. package/dist/hyperframe.runtime.iife.js +76 -76
  212. package/dist/hyperframes-player.global.js +1 -1
  213. package/dist/{index-gen-OPMQ5WSN.js → index-gen-3DWPA4FO.js} +14 -12
  214. package/dist/{info-G64344ST.js → info-556DHJHJ.js} +26 -26
  215. package/dist/{init-2N6SDLZB.js → init-P62TPWR3.js} +61 -56
  216. package/dist/{ink-T5BJE4D2.js → ink-SRN65OZH.js} +23 -21
  217. package/dist/{inspect-6I4YSARX.js → inspect-U5FWQQFB.js} +54 -53
  218. package/dist/{installer-JNQKFCTN.js → installer-3TNMANQV.js} +9 -8
  219. package/dist/{keyframes-PT3H7WHD.js → keyframes-FPGEFGCH.js} +63 -28
  220. package/dist/{lambda-NEQXIHUM.js → lambda-YJY2MYWL.js} +25 -24
  221. package/dist/{layout-FRWUKOGX.js → layout-QIKSVA44.js} +54 -53
  222. package/dist/{lint-GXPONOPU.js → lint-RD33ESM5.js} +20 -20
  223. package/dist/{lintProject-J4YTLKPW.js → lintProject-ZWLXB3A2.js} +3 -3
  224. package/dist/{list-JO7WSM6Y.js → list-FFO3WOB2.js} +14 -13
  225. package/dist/{localPage-XDWFSE4K.js → localPage-DHIBMNJH.js} +16 -15
  226. package/dist/{login-XMFEIEXG.js → login-IMFRQOEQ.js} +8 -8
  227. package/dist/{logout-CCATTNTL.js → logout-SLBKP67J.js} +4 -4
  228. package/dist/{look-U77ADJ4V.js → look-ZZHJYSPC.js} +23 -21
  229. package/dist/{manager-ZRETV4LQ.js → manager-U4WEPCLV.js} +5 -5
  230. package/dist/{manager-RNMX2WTR.js → manager-V4LGD4HB.js} +16 -15
  231. package/dist/{manifest-QSJYVERU.js → manifest-TSKRUXZ5.js} +5 -1
  232. package/dist/{measure-JNJAPVVN.js → measure-ZRBVN45B.js} +11 -11
  233. package/dist/{media-treatment-MFNKKPM7.js → media-treatment-3I2CMQJZ.js} +30 -25
  234. package/dist/{media-use-ZKHL2IN2.js → media-use-2OYJ3CCN.js} +8 -8
  235. package/dist/{models-PGO2ERAU.js → models-PRW7EWSV.js} +20 -19
  236. package/dist/{motionShot-AG4LR5Q5.js → motionShot-VWILMLHQ.js} +39 -30
  237. package/dist/{normalize-audio-FO3JCPD3.js → normalize-audio-42XMF35K.js} +19 -17
  238. package/dist/{oauth-SAVP2YM4.js → oauth-V3HSFZRE.js} +2 -2
  239. package/dist/{open-ZI6KK3GM.js → open-D52MJZQA.js} +31 -28
  240. package/dist/{parakeetRunner-CBO3HRL6.js → parakeetRunner-ZR2JWQZH.js} +23 -22
  241. package/dist/{pipeline-VWVNH5ZC.js → pipeline-W3H4JA6H.js} +18 -17
  242. package/dist/{plan-UHZYW3K2.js → plan-2HQOFJO7.js} +34 -33
  243. package/dist/{play-IVTXE4JW.js → play-G5XDRDIZ.js} +49 -41
  244. package/dist/{preflight-QJNKKMPE.js → preflight-W2JDYF3T.js} +18 -17
  245. package/dist/{present-NB6DAJ6K.js → present-CYMTHQFM.js} +68 -51
  246. package/dist/{preview-FIWAZ5PX.js → preview-DTQPQZTK.js} +51 -49
  247. package/dist/{probe-VQJOUG65.js → probe-WZJK3YQI.js} +23 -21
  248. package/dist/{producer-NP6X5UBL.js → producer-2BSMSO6I.js} +1 -1
  249. package/dist/{progress-IY6U35WH.js → progress-KRDVC24C.js} +4 -1
  250. package/dist/{projectConfig-UVA26HJW.js → projectConfig-BYRVYLCC.js} +12 -11
  251. package/dist/{publication-LYPU7NTZ.js → publication-UCFJLELD.js} +7 -6
  252. package/dist/{publish-MRQ2K62E.js → publish-KXVPSWCO.js} +36 -35
  253. package/dist/{refresh-X5ZLKQO5.js → refresh-2GVNKDQE.js} +4 -4
  254. package/dist/{remove-background-RG6DCWOW.js → remove-background-O7BZNS3X.js} +19 -18
  255. package/dist/{render-XWBMMSC5.js → render-DGAP4Q2Z.js} +81 -67
  256. package/dist/{render-6B7YPN7H.js → render-QOWXGWQZ.js} +55 -54
  257. package/dist/{render-CM4MCNVA.js → render-TYS3LCIQ.js} +10 -8
  258. package/dist/{render-batch-Y3RRNDNJ.js → render-batch-TEQRGAUC.js} +10 -8
  259. package/dist/renderSetupWorker.js +8 -8
  260. package/dist/{resolver-K6VAEZVH.js → resolver-RN2JGGQL.js} +9 -8
  261. package/dist/{reverse-5RDRLKAP.js → reverse-FUARFEG2.js} +1 -1
  262. package/dist/{run-OQK3QU4I.js → run-V722HMUG.js} +12 -11
  263. package/dist/{sam-A4NXDWSU.js → sam-KHLM2DJA.js} +4 -4
  264. package/dist/{screenshotCapture-VDITRAK2.js → screenshotCapture-4BB4LUMX.js} +18 -17
  265. package/dist/{service-C3UT4LYP.js → service-ZPCHJY6B.js} +24 -23
  266. package/dist/{share-JU3IDHUV.js → share-PXUN7AH7.js} +29 -28
  267. package/dist/{sherpa-Z2Z4XLXV.js → sherpa-LT6Y7IGM.js} +22 -21
  268. package/dist/sherpaWorker.js +6 -3
  269. package/dist/{sites-QK3F4AUS.js → sites-WWCABDSX.js} +4 -1
  270. package/dist/skills/hyperframes/SKILL.md +2 -2
  271. package/dist/skills/hyperframes/references/format.md +11 -2
  272. package/dist/skills/hyperframes/references/overlays.md +1 -1
  273. package/dist/skills/hyperframes/references/plugin-installation.md +45 -22
  274. package/dist/skills/hyperframes/references/sound.md +1 -0
  275. package/dist/skills/hyperframes/scripts/plugin-cli.mjs +61 -18
  276. package/dist/skills/hyperframes-cli/SKILL.md +2 -2
  277. package/dist/skills/media-use/SKILL.md +1 -1
  278. package/dist/skills/media-use/audio/scripts/audio.mjs +24 -7
  279. package/dist/skills/media-use/audio/scripts/carve.mjs +10 -82
  280. package/dist/skills/media-use/audio/scripts/lib/audio-carve.mjs +4 -0
  281. package/dist/skills/media-use/audio/scripts/lib/bgm.mjs +4 -1
  282. package/dist/skills/media-use/audio/scripts/lib/media-record.mjs +25 -7
  283. package/dist/skills/media-use/audio/scripts/lib/project-path.mjs +56 -0
  284. package/dist/skills/media-use/audio/scripts/lib/python.mjs +9 -1
  285. package/dist/skills/media-use/audio/scripts/lib/recording.mjs +66 -3
  286. package/dist/skills/media-use/audio/scripts/wait-bgm.mjs +12 -7
  287. package/dist/skills/media-use/references/audio.md +2 -2
  288. package/dist/skills/media-use/references/mixing.md +1 -1
  289. package/dist/skills/media-use/scripts/lib/bundled-sfx-provider.mjs +27 -2
  290. package/dist/skills/media-use/scripts/lib/index-gen.mjs +13 -11
  291. package/dist/skills/media-use/scripts/lib/local-media-search.mjs +52 -23
  292. package/dist/skills/media-use/scripts/lib/ltx-video-provider.mjs +3 -1
  293. package/dist/skills/media-use/scripts/lib/manifest.mjs +51 -4
  294. package/dist/skills/media-use/scripts/resolve.mjs +4 -14
  295. package/dist/skills/media-use/scripts/transcribe.mjs +19 -3
  296. package/dist/{skills-24YEOJGP.js → skills-G63W5GD5.js} +17 -16
  297. package/dist/{skillsUpdateCheck-5R4JJ27G.js → skillsUpdateCheck-2T3JVDAA.js} +6 -6
  298. package/dist/{snapshot-T4REEKFX.js → snapshot-EVSKTVDG.js} +90 -77
  299. package/dist/{src-RMJVAEKT.js → src-K5FSMLTB.js} +23 -21
  300. package/dist/{src-EKGFNTTY.js → src-R57EQQSI.js} +29 -20
  301. package/dist/{start-E5RIH3KS.js → start-XBCYKGBV.js} +41 -39
  302. package/dist/{state-7OIPR4BG.js → state-FO64CPYE.js} +4 -1
  303. package/dist/{staticProjectServer-LEM5W3S5.js → staticProjectServer-Q6VR7CXT.js} +33 -31
  304. package/dist/{status-CSHJWWOP.js → status-E5XIWRCQ.js} +37 -34
  305. package/dist/studio/assets/{hyperframes-player-BroIQA4E.js → hyperframes-player-B78JDyI_.js} +1 -1
  306. package/dist/studio/assets/{index-Be7DZynj.js → index-D7ICtobF.js} +190 -190
  307. package/dist/studio/assets/{index-CiF0D62S.js → index-ww7-RmuM.js} +1 -1
  308. package/dist/studio/assets/{pausedVideoDecoder-RXcvblHS.js → pausedVideoDecoder-Dbe8Cmab.js} +1 -1
  309. package/dist/studio/index.html +1 -1
  310. package/dist/{studio-api-COJYCMRI.js → studio-api-GMJVYGET.js} +21 -17
  311. package/dist/{studioSelectionClient-W2S3H2VO.js → studioSelectionClient-S46TNAAZ.js} +2 -1
  312. package/dist/{studioServer-62ZTBLFM.js → studioServer-MIQCMK6U.js} +130 -102
  313. package/dist/subCompositionWorker.js +1162 -0
  314. package/dist/{sync-CLRYHWYE.js → sync-WJOFN6VN.js} +23 -21
  315. package/dist/{synthesize-Z2H32QPU.js → synthesize-FXM7ZD6J.js} +6 -5
  316. package/dist/{system-2YOII5LZ.js → system-DBUN5UDD.js} +3 -3
  317. package/dist/{telemetry-DWA36DFX.js → telemetry-HZ4P4DMC.js} +12 -11
  318. package/dist/{templates-LXMQR35F.js → templates-KFZZSSKW.js} +139 -46
  319. package/dist/{timeline-LMKTDKRT.js → timeline-5M6DPCXF.js} +38 -36
  320. package/dist/{tokens-VJ765KFG.js → tokens-H4NPNRFR.js} +3 -2
  321. package/dist/{transcribe-TICRK4IY.js → transcribe-6STI2ALX.js} +48 -46
  322. package/dist/{transcribe-3WASFP7Z.js → transcribe-7PE5UH7J.js} +19 -18
  323. package/dist/{tts-5YJV6UXX.js → tts-D7CLD3AD.js} +1 -1
  324. package/dist/{update-Q26QGCBW.js → update-H3T3AVVG.js} +19 -18
  325. package/dist/{updateCheck-7R4S46TT.js → updateCheck-TLCXUNBV.js} +5 -5
  326. package/dist/{upgrade-76TFHAGI.js → upgrade-BZVTMCQU.js} +9 -8
  327. package/dist/{urlDownloader-AE4UQI5A.js → urlDownloader-FJXNC3IM.js} +14 -13
  328. package/dist/{validate-BEYREWEL.js → validate-WTRVCEL5.js} +40 -38
  329. package/dist/{video-47AVLNWM.js → video-TVO2U5F2.js} +18 -17
  330. package/dist/{voices-5O6OAL6H.js → voices-F3EW43LX.js} +40 -38
  331. package/dist/warmCheck.js +66 -63
  332. package/dist/warmCheckClient.js +2 -2
  333. package/package.json +2 -1
  334. package/dist/chunk-XGEJPKRY.js +0 -5069
  335. package/dist/skills/hyperframes/scripts/lib/main-module.test.mjs +0 -46
  336. package/dist/skills/hyperframes/scripts/lib/windows-exe-search.test.mjs +0 -149
  337. package/dist/skills/hyperframes/scripts/plugin-cli.test.mjs +0 -207
  338. package/dist/skills/media-use/audio/scripts/audio.test.mjs +0 -166
  339. package/dist/skills/media-use/audio/scripts/carve.test.mjs +0 -254
  340. package/dist/skills/media-use/audio/scripts/gemini-pipeline.test.mjs +0 -131
  341. package/dist/skills/media-use/audio/scripts/heygen-tts.test.mjs +0 -38
  342. package/dist/skills/media-use/audio/scripts/heygen-voice.test.mjs +0 -233
  343. package/dist/skills/media-use/audio/scripts/lib/audio-meta.test.mjs +0 -136
  344. package/dist/skills/media-use/audio/scripts/lib/bgm.test.mjs +0 -74
  345. package/dist/skills/media-use/audio/scripts/lib/concurrency.test.mjs +0 -41
  346. package/dist/skills/media-use/audio/scripts/lib/gemini-auth.test.mjs +0 -86
  347. package/dist/skills/media-use/audio/scripts/lib/gemini-tts.test.mjs +0 -253
  348. package/dist/skills/media-use/audio/scripts/lib/heygen.test.mjs +0 -627
  349. package/dist/skills/media-use/audio/scripts/lib/media-record.test.mjs +0 -239
  350. package/dist/skills/media-use/audio/scripts/lib/python.test.mjs +0 -182
  351. package/dist/skills/media-use/audio/scripts/lib/sfx.test.mjs +0 -331
  352. package/dist/skills/media-use/audio/scripts/lib/tts.cleanup.test.mjs +0 -181
  353. package/dist/skills/media-use/audio/scripts/lib/tts.spawn.test.mjs +0 -183
  354. package/dist/skills/media-use/audio/scripts/lib/tts.test.mjs +0 -280
  355. package/dist/skills/media-use/audio/scripts/lib/voice-credit.test.mjs +0 -21
  356. package/dist/skills/media-use/audio/scripts/recording.test.mjs +0 -139
  357. package/dist/skills/media-use/audio/scripts/trusted-program.test.mjs +0 -106
  358. package/dist/skills/media-use/audio/scripts/wait-bgm.test.mjs +0 -108
  359. package/dist/skills/media-use/scripts/compatibility.test.mjs +0 -41
  360. package/dist/skills/media-use/scripts/dither.test.mjs +0 -176
  361. package/dist/skills/media-use/scripts/lib/adopt.test.mjs +0 -143
  362. package/dist/skills/media-use/scripts/lib/bundled-sfx-provider.test.mjs +0 -139
  363. package/dist/skills/media-use/scripts/lib/cache.test.mjs +0 -110
  364. package/dist/skills/media-use/scripts/lib/candidates.test.mjs +0 -155
  365. package/dist/skills/media-use/scripts/lib/codex-provider.test.mjs +0 -34
  366. package/dist/skills/media-use/scripts/lib/config-lock.test.mjs +0 -79
  367. package/dist/skills/media-use/scripts/lib/coverage.test.mjs +0 -136
  368. package/dist/skills/media-use/scripts/lib/credit-limit.test.mjs +0 -39
  369. package/dist/skills/media-use/scripts/lib/cube-build.test.mjs +0 -80
  370. package/dist/skills/media-use/scripts/lib/cube-validate.test.mjs +0 -130
  371. package/dist/skills/media-use/scripts/lib/cutlist.test.mjs +0 -174
  372. package/dist/skills/media-use/scripts/lib/duck.test.mjs +0 -319
  373. package/dist/skills/media-use/scripts/lib/error-diffusion.test.mjs +0 -102
  374. package/dist/skills/media-use/scripts/lib/freeze.test.mjs +0 -138
  375. package/dist/skills/media-use/scripts/lib/grade-analyzer.test.mjs +0 -285
  376. package/dist/skills/media-use/scripts/lib/heygen-cli.test.mjs +0 -315
  377. package/dist/skills/media-use/scripts/lib/heygen-search.test.mjs +0 -49
  378. package/dist/skills/media-use/scripts/lib/heygen-video-provider.test.mjs +0 -435
  379. package/dist/skills/media-use/scripts/lib/local-media-search.test.mjs +0 -23
  380. package/dist/skills/media-use/scripts/lib/local-models.test.mjs +0 -220
  381. package/dist/skills/media-use/scripts/lib/local-run.test.mjs +0 -121
  382. package/dist/skills/media-use/scripts/lib/logo-provider.test.mjs +0 -312
  383. package/dist/skills/media-use/scripts/lib/ltx-video-provider.test.mjs +0 -316
  384. package/dist/skills/media-use/scripts/lib/lut-preset-provider.test.mjs +0 -199
  385. package/dist/skills/media-use/scripts/lib/manifest.test.mjs +0 -397
  386. package/dist/skills/media-use/scripts/lib/media-fetch.test.mjs +0 -197
  387. package/dist/skills/media-use/scripts/lib/media-home.test.mjs +0 -61
  388. package/dist/skills/media-use/scripts/lib/mflux-provider.test.mjs +0 -174
  389. package/dist/skills/media-use/scripts/lib/misses.test.mjs +0 -89
  390. package/dist/skills/media-use/scripts/lib/npx-sync.test.mjs +0 -41
  391. package/dist/skills/media-use/scripts/lib/openverse.test.mjs +0 -219
  392. package/dist/skills/media-use/scripts/lib/parakeet-words.test.mjs +0 -44
  393. package/dist/skills/media-use/scripts/lib/prefs-store.concurrent.test.mjs +0 -173
  394. package/dist/skills/media-use/scripts/lib/prefs-store.test.mjs +0 -245
  395. package/dist/skills/media-use/scripts/lib/probe.test.mjs +0 -221
  396. package/dist/skills/media-use/scripts/lib/recipe-store.test.mjs +0 -391
  397. package/dist/skills/media-use/scripts/lib/registry.test.mjs +0 -261
  398. package/dist/skills/media-use/scripts/lib/search.test.mjs +0 -32
  399. package/dist/skills/media-use/scripts/lib/specs.test.mjs +0 -157
  400. package/dist/skills/media-use/scripts/lib/stats.test.mjs +0 -165
  401. package/dist/skills/media-use/scripts/lib/telemetry.test.mjs +0 -550
  402. package/dist/skills/media-use/scripts/lib/test-home.test.mjs +0 -10
  403. package/dist/skills/media-use/scripts/lib/transcriptCutFade.test.mjs +0 -33
  404. package/dist/skills/media-use/scripts/lib/tts-local-provider.test.mjs +0 -59
  405. package/dist/skills/media-use/scripts/lib/usage.test.mjs +0 -54
  406. package/dist/skills/media-use/scripts/lib/voice-provider.test.mjs +0 -46
  407. package/dist/skills/media-use/scripts/resolve-plugin.test.mjs +0 -86
  408. package/dist/skills/media-use/scripts/transcribe.test.mjs +0 -155
  409. package/dist/skills/media-use/scripts/transcript-cut.test.mjs +0 -341
  410. package/dist/{chunk-BAWGEGKD.js → chunk-XMAU5ZQX.js} +3 -3
@@ -5,11 +5,13 @@ var require = __hf_createRequire(import.meta.url);
5
5
  var __filename = __hf_fileURLToPath(import.meta.url);
6
6
  var __dirname = __hf_dirname(__filename);
7
7
  import {
8
- isProjectIgnoredDir,
9
8
  mkdirOwnedWithinProject,
10
9
  pinProjectRecord,
11
10
  realFilePath
12
- } from "./chunk-ER22SVLT.js";
11
+ } from "./chunk-3GKGBYW3.js";
12
+ import {
13
+ isProjectIgnoredDir
14
+ } from "./chunk-HOIEN7O4.js";
13
15
  import {
14
16
  atomicTempPath,
15
17
  cannotHardLink,
@@ -18,33 +20,22 @@ import {
18
20
  refuseReadOnly,
19
21
  renameWithRetryAsync,
20
22
  replaceFileAtomically
21
- } from "./chunk-KCF6Q54R.js";
23
+ } from "./chunk-DL6PEJWH.js";
24
+ import {
25
+ isSafePath,
26
+ realProjectRoot,
27
+ realpath
28
+ } from "./chunk-SALNTRJA.js";
22
29
  import {
23
- isSafePath
24
- } from "./chunk-KWTTELUY.js";
30
+ namesAnotherNetworkRoot
31
+ } from "./chunk-6EMFSRTW.js";
25
32
  import {
26
33
  hyperframesCacheDir
27
34
  } from "./chunk-JOQR4AP6.js";
28
35
 
29
- // ../studio-server/dist/chunk-Z5DBB25C.js
30
- import { randomUUID as randomUUID7 } from "crypto";
31
- import { mkdir as mkdir2, readdir as readdir4, rm as rm3, rmdir, stat as stat2, writeFile as writeFile2 } from "fs/promises";
32
- import {
33
- existsSync as existsSync3,
34
- lstatSync as lstatSync4,
35
- statSync as statSync5,
36
- mkdirSync as mkdirSync5,
37
- readdirSync as readdirSync4,
38
- readFileSync as readFileSync9,
39
- realpathSync,
40
- rmSync as rmSync3
41
- } from "fs";
42
- import { dirname as dirname5, isAbsolute as isAbsolute5, join as join8, relative as relative5, resolve as resolve8, sep as sep5 } from "path";
43
- import { createHash, randomUUID } from "crypto";
44
- import { readFileSync as readFileSync2 } from "fs";
45
- import { isAbsolute, relative, resolve, sep } from "path";
36
+ // ../studio-server/dist/chunk-NKYZCHYS.js
46
37
  import { spawnSync } from "child_process";
47
- import { randomUUID as randomUUID2 } from "crypto";
38
+ import { randomUUID } from "crypto";
48
39
  import {
49
40
  closeSync,
50
41
  constants,
@@ -59,145 +50,14 @@ import {
59
50
  } from "fs";
60
51
  import { uptime } from "os";
61
52
  import { join } from "path";
62
- import { createHash as createHash2 } from "crypto";
53
+ import { readFileSync as readFileSync2 } from "fs";
54
+ import { isAbsolute, relative, resolve, sep } from "path";
55
+ import { createHash } from "crypto";
63
56
  import { lstatSync, readFileSync as readFileSync3, readdirSync } from "fs";
64
57
  import { lstat, readFile, readdir } from "fs/promises";
65
58
  import { extname, isAbsolute as isAbsolute2, relative as relative2, resolve as resolve2, sep as sep2 } from "path";
66
- import { createHash as createHash3, randomUUID as randomUUID3 } from "crypto";
67
- import { constants as constants2, createReadStream, createWriteStream } from "fs";
68
- import {
69
- chmod,
70
- copyFile,
71
- mkdir,
72
- open,
73
- readdir as readdir2,
74
- readFile as readFile2,
75
- rename,
76
- rm,
77
- stat,
78
- writeFile
79
- } from "fs/promises";
80
- import { dirname, join as join2 } from "path";
81
- import { pipeline } from "stream/promises";
59
+ import { createHash as createHash2, randomUUID as randomUUID2 } from "crypto";
82
60
  import { resolve as resolve3 } from "path";
83
- import { extname as extname2 } from "path";
84
- import { randomUUID as randomUUID5 } from "crypto";
85
- import { readdirSync as readdirSync2, renameSync, statSync as statSync3 } from "fs";
86
- import { lstat as lstat2, readdir as readdir3, rm as rm2 } from "fs/promises";
87
- import { tmpdir } from "os";
88
- import { dirname as dirname2, join as join4 } from "path";
89
- import { randomUUID as randomUUID4 } from "crypto";
90
- import { existsSync, mkdirSync as mkdirSync2, readFileSync as readFileSync4, statSync as statSync2, utimesSync } from "fs";
91
- import { basename, join as join3, resolve as resolve4 } from "path";
92
- import { createHash as createHash5, randomUUID as randomUUID6 } from "crypto";
93
- import { createReadStream as createReadStream2, existsSync as existsSync2, readFileSync as readFileSync7, renameSync as renameSync2, statSync as statSync4 } from "fs";
94
- import { isAbsolute as isAbsolute4, join as join7, resolve as resolve7 } from "path";
95
- import { createHash as createHash4 } from "crypto";
96
- import {
97
- closeSync as closeSync2,
98
- constants as constants3,
99
- fstatSync as fstatSync2,
100
- lstatSync as lstatSync2,
101
- openSync as openSync2,
102
- readFileSync as readFileSync5,
103
- unlinkSync
104
- } from "fs";
105
- import { isAbsolute as isAbsolute3, join as join5, relative as relative3, resolve as resolve5, sep as sep3 } from "path";
106
- import {
107
- closeSync as closeSync3,
108
- constants as constants4,
109
- fstatSync as fstatSync3,
110
- lstatSync as lstatSync3,
111
- openSync as openSync3,
112
- mkdirSync as mkdirSync3,
113
- readFileSync as readFileSync6,
114
- readdirSync as readdirSync3,
115
- rmSync as rmSync2,
116
- ftruncateSync,
117
- writeSync,
118
- writeFileSync as writeFileSync2
119
- } from "fs";
120
- import { dirname as dirname3, join as join6, relative as relative4, resolve as resolve6, sep as sep4 } from "path";
121
- import { closeSync as closeSync4, constants as constants5, mkdirSync as mkdirSync4, openSync as openSync4, readFileSync as readFileSync8, writeSync as writeSync2 } from "fs";
122
- import { dirname as dirname4 } from "path";
123
- import { readdirSync as readdirSync5 } from "fs";
124
- import { rm as rm4, stat as stat3 } from "fs/promises";
125
- import { join as join9 } from "path";
126
- var RECEIPT_TTL_MS = 1e4;
127
- var receipts = /* @__PURE__ */ new Map();
128
- var overwriteListeners = /* @__PURE__ */ new Set();
129
- function fileContentVersion(content) {
130
- return hashVersion(createHash("sha256").update(content).digest("hex"));
131
- }
132
- var DELETED_VERSION = '"deleted"';
133
- function hashVersion(hex) {
134
- return `"sha256:${hex}"`;
135
- }
136
- function hashOfVersion(version) {
137
- return /^"sha256:([0-9a-f]{64})"$/.exec(version)?.[1];
138
- }
139
- function settledFileTag(stat4, now = Date.now()) {
140
- if (now - stat4.ctimeMs < 3e3) return null;
141
- return [stat4.ino, stat4.ctimeMs, stat4.size].map((n) => n.toString(36)).join("-");
142
- }
143
- function createWriteToken(requestToken) {
144
- const token = requestToken?.trim();
145
- return token && token.length <= 200 ? token : randomUUID();
146
- }
147
- function onFileOverwritten(listener) {
148
- overwriteListeners.add(listener);
149
- return () => overwriteListeners.delete(listener);
150
- }
151
- function recordFileWriteReceipt(filePath, {
152
- overwrote,
153
- path,
154
- version,
155
- writeToken
156
- }) {
157
- const receipt = { path, version, writeToken };
158
- const absPath = realFilePath(filePath);
159
- if (overwrote !== void 0)
160
- for (const listener of overwriteListeners) listener(absPath, receipt.version, overwrote);
161
- const now = Date.now();
162
- for (const [path2, list] of receipts) {
163
- const live = list.filter((entry) => now - entry.recordedAt < RECEIPT_TTL_MS);
164
- if (live.length > 0) receipts.set(path2, live);
165
- else receipts.delete(path2);
166
- }
167
- const from = overwrote === void 0 ? void 0 : fileContentVersion(overwrote);
168
- receipts.set(absPath, [
169
- ...receipts.get(absPath) ?? [],
170
- { ...receipt, ...from && { from }, recordedAt: now }
171
- ]);
172
- }
173
- function clearFileWriteReceipt(filePath, version, writeToken) {
174
- const absPath = realFilePath(filePath);
175
- const current = (receipts.get(absPath) ?? []).filter(
176
- (entry) => entry.version !== version || entry.writeToken !== writeToken
177
- );
178
- if (current.length > 0) receipts.set(absPath, current);
179
- else receipts.delete(absPath);
180
- }
181
- function identifyFileWrite(filePath, expectedVersion) {
182
- const receipt = newestReceipt(realFilePath(filePath), expectedVersion);
183
- if (!receipt) return null;
184
- const { path, version, writeToken, from } = receipt;
185
- return { path, version, writeToken, ...from && { from } };
186
- }
187
- function newestReceipt(absPath, expectedVersion) {
188
- const now = Date.now();
189
- const current = (receipts.get(absPath) ?? []).filter(
190
- (entry) => now - entry.recordedAt < RECEIPT_TTL_MS
191
- );
192
- if (current.length > 0) receipts.set(absPath, current);
193
- else receipts.delete(absPath);
194
- let receipt;
195
- for (let i = current.length - 1; i >= 0 && !receipt; i -= 1) {
196
- if (current[i]?.version === expectedVersion) receipt = current[i];
197
- }
198
- return receipt;
199
- }
200
- var consumeFileWriteReceipt = identifyFileWrite;
201
61
  var HistoryBusyError = class extends Error {
202
62
  constructor(pid, url) {
203
63
  super(`This project's history is open in another process (pid ${pid}).`);
@@ -303,7 +163,7 @@ function deadHolder(file, pid) {
303
163
  return !holdsLock(file, pid) && !beingTaken(file);
304
164
  }
305
165
  function claim(file) {
306
- const draft = `${file}-${process.pid}-${randomUUID2()}.tmp`;
166
+ const draft = `${file}-${process.pid}-${randomUUID()}.tmp`;
307
167
  writeFileSync(draft, String(process.pid));
308
168
  try {
309
169
  try {
@@ -574,7 +434,7 @@ async function collectProjectSignatureFilesAsync(projectDir, dir, files, outputs
574
434
  }
575
435
  }
576
436
  function createProjectFingerprint(projectDir, files) {
577
- const hash = createHash2("sha256");
437
+ const hash = createHash("sha256");
578
438
  for (const entry of files) {
579
439
  hash.update(relative2(projectDir, entry.file));
580
440
  hash.update("\0");
@@ -629,7 +489,7 @@ function planSignature(dir, collected, excluding, signedAt) {
629
489
  (entry) => !excluding.has(relative2(dir, entry.file).split(sep2).join("/"))
630
490
  );
631
491
  files.sort((a, b) => a.file.localeCompare(b.file));
632
- const cacheKey = excluding.size ? `${dir}\0${createHash2("sha256").update([...excluding].sort().join("\0")).digest("hex")}` : dir;
492
+ const cacheKey = excluding.size ? `${dir}\0${createHash("sha256").update([...excluding].sort().join("\0")).digest("hex")}` : dir;
633
493
  return { dir, files, cacheKey, fingerprint: createProjectFingerprint(dir, files), signedAt };
634
494
  }
635
495
  function hashSignatureEntry(hash, dir, entry, content) {
@@ -659,7 +519,7 @@ function createProjectSignature(projectDir, excluding = /* @__PURE__ */ new Set(
659
519
  const plan = planSignature(dir, collectProjectFiles(dir), excluding, Date.now());
660
520
  const cached = cachedSignature(plan);
661
521
  if (cached !== void 0) return cached;
662
- const hash = createHash2("sha256");
522
+ const hash = createHash("sha256");
663
523
  for (const entry of plan.files) {
664
524
  let content = null;
665
525
  if (entry.textContentEligible) {
@@ -680,7 +540,7 @@ async function createProjectSignatureAsync(projectDir, excluding = /* @__PURE__
680
540
  const plan = planSignature(dir, await collectProjectFilesAsync(dir), excluding, signedAt);
681
541
  const cached = cachedSignature(plan);
682
542
  if (cached !== void 0) return cached;
683
- const hash = createHash2("sha256");
543
+ const hash = createHash("sha256");
684
544
  for (let at = 0; at < plan.files.length; at += SIGNATURE_READ_BATCH) {
685
545
  const batch = plan.files.slice(at, at + SIGNATURE_READ_BATCH);
686
546
  const contents = await Promise.all(
@@ -692,6 +552,81 @@ async function createProjectSignatureAsync(projectDir, excluding = /* @__PURE__
692
552
  }
693
553
  return finishSignature(plan, hash);
694
554
  }
555
+ var RECEIPT_TTL_MS = 1e4;
556
+ var receipts = /* @__PURE__ */ new Map();
557
+ var overwriteListeners = /* @__PURE__ */ new Set();
558
+ function fileContentVersion(content) {
559
+ return hashVersion(createHash2("sha256").update(content).digest("hex"));
560
+ }
561
+ var DELETED_VERSION = '"deleted"';
562
+ function hashVersion(hex) {
563
+ return `"sha256:${hex}"`;
564
+ }
565
+ function hashOfVersion(version) {
566
+ return /^"sha256:([0-9a-f]{64})"$/.exec(version)?.[1];
567
+ }
568
+ function settledFileTag(stat4, now = Date.now()) {
569
+ if (now - stat4.ctimeMs < 3e3) return null;
570
+ return [stat4.ino, stat4.ctimeMs, stat4.size].map((n) => n.toString(36)).join("-");
571
+ }
572
+ function createWriteToken(requestToken) {
573
+ const token = requestToken?.trim();
574
+ return token && token.length <= 200 ? token : randomUUID2();
575
+ }
576
+ function onFileOverwritten(listener) {
577
+ overwriteListeners.add(listener);
578
+ return () => overwriteListeners.delete(listener);
579
+ }
580
+ function recordFileWriteReceipt(filePath, {
581
+ overwrote,
582
+ path,
583
+ version,
584
+ writeToken
585
+ }) {
586
+ const receipt = { path, version, writeToken };
587
+ const absPath = realFilePath(filePath);
588
+ if (overwrote !== void 0)
589
+ for (const listener of overwriteListeners) listener(absPath, receipt.version, overwrote);
590
+ const now = Date.now();
591
+ for (const [path2, list] of receipts) {
592
+ const live = list.filter((entry) => now - entry.recordedAt < RECEIPT_TTL_MS);
593
+ if (live.length > 0) receipts.set(path2, live);
594
+ else receipts.delete(path2);
595
+ }
596
+ const from = overwrote === void 0 ? void 0 : fileContentVersion(overwrote);
597
+ receipts.set(absPath, [
598
+ ...receipts.get(absPath) ?? [],
599
+ { ...receipt, ...from && { from }, recordedAt: now }
600
+ ]);
601
+ }
602
+ function clearFileWriteReceipt(filePath, version, writeToken) {
603
+ const absPath = realFilePath(filePath);
604
+ const current = (receipts.get(absPath) ?? []).filter(
605
+ (entry) => entry.version !== version || entry.writeToken !== writeToken
606
+ );
607
+ if (current.length > 0) receipts.set(absPath, current);
608
+ else receipts.delete(absPath);
609
+ }
610
+ function identifyFileWrite(filePath, expectedVersion) {
611
+ const receipt = newestReceipt(realFilePath(filePath), expectedVersion);
612
+ if (!receipt) return null;
613
+ const { path, version, writeToken, from } = receipt;
614
+ return { path, version, writeToken, ...from && { from } };
615
+ }
616
+ function newestReceipt(absPath, expectedVersion) {
617
+ const now = Date.now();
618
+ const current = (receipts.get(absPath) ?? []).filter(
619
+ (entry) => now - entry.recordedAt < RECEIPT_TTL_MS
620
+ );
621
+ if (current.length > 0) receipts.set(absPath, current);
622
+ else receipts.delete(absPath);
623
+ let receipt;
624
+ for (let i = current.length - 1; i >= 0 && !receipt; i -= 1) {
625
+ if (current[i]?.version === expectedVersion) receipt = current[i];
626
+ }
627
+ return receipt;
628
+ }
629
+ var consumeFileWriteReceipt = identifyFileWrite;
695
630
  var serving = /* @__PURE__ */ new Map();
696
631
  var keyOf = (path) => process.platform === "win32" ? resolve3(path).toLowerCase() : resolve3(path);
697
632
  function serveWhileOpen(path, stream) {
@@ -716,6 +651,163 @@ async function stopServingAndClose(path) {
716
651
  )
717
652
  );
718
653
  }
654
+
655
+ // ../studio-server/dist/chunk-RT5WAA4N.js
656
+ import { randomUUID as randomUUID5 } from "crypto";
657
+ import { mkdir as mkdir2, readdir as readdir3, rm as rm3, rmdir, stat as stat2, writeFile as writeFile2 } from "fs/promises";
658
+ import {
659
+ existsSync as existsSync4,
660
+ lstatSync as lstatSync4,
661
+ statSync as statSync4,
662
+ mkdirSync as mkdirSync5,
663
+ readdirSync as readdirSync3,
664
+ readFileSync as readFileSync6,
665
+ realpathSync,
666
+ rmSync as rmSync3
667
+ } from "fs";
668
+ import { basename as basename4, dirname as dirname6, isAbsolute as isAbsolute3, join as join8, relative as relative3, resolve as resolve5, sep as sep3 } from "path";
669
+ import { createHash as createHash3, randomUUID as randomUUID3 } from "crypto";
670
+ import { constants as constants2, createReadStream, createWriteStream } from "fs";
671
+ import {
672
+ chmod,
673
+ copyFile,
674
+ mkdir,
675
+ open,
676
+ readdir as readdir2,
677
+ readFile as readFile2,
678
+ rename,
679
+ rm,
680
+ stat,
681
+ writeFile
682
+ } from "fs/promises";
683
+ import { basename as basename2, dirname as dirname2, join as join2 } from "path";
684
+ import { pipeline } from "stream/promises";
685
+ import { lstatSync as lstatSync2, mkdirSync as mkdirSync2, renameSync, rmdirSync, rmSync as rmSync2 } from "fs";
686
+ import { basename, dirname, join as join3 } from "path";
687
+ import { extname as extname2 } from "path";
688
+ import { randomUUID as randomUUID32 } from "crypto";
689
+ import { readdirSync as readdirSync2, renameSync as renameSync2, statSync as statSync2 } from "fs";
690
+ import { lstat as lstat2, readdir as readdir22, rm as rm2 } from "fs/promises";
691
+ import { tmpdir } from "os";
692
+ import { dirname as dirname3, join as join4 } from "path";
693
+ import { randomUUID as randomUUID22 } from "crypto";
694
+ import { existsSync, mkdirSync as mkdirSync22, readFileSync as readFileSync4, statSync as statSync3, utimesSync } from "fs";
695
+ import { basename as basename3, join as join32, resolve as resolve4 } from "path";
696
+ import { createHash as createHash32, randomUUID as randomUUID4 } from "crypto";
697
+ import { createReadStream as createReadStream2, existsSync as existsSync3, readFileSync as readFileSync42, renameSync as renameSync3, statSync as statSync32 } from "fs";
698
+ import { isAbsolute as isAbsolute22, join as join7, resolve as resolve42 } from "path";
699
+ import { createHash as createHash22 } from "crypto";
700
+ import {
701
+ closeSync as closeSync2,
702
+ constants as constants22,
703
+ existsSync as existsSync2,
704
+ fstatSync as fstatSync2,
705
+ lstatSync as lstatSync22,
706
+ openSync as openSync2,
707
+ readFileSync as readFileSync22,
708
+ unlinkSync
709
+ } from "fs";
710
+ import { isAbsolute as isAbsolute4, join as join5, parse, relative as relative4, resolve as resolve22, sep as sep4 } from "path";
711
+ import {
712
+ closeSync as closeSync22,
713
+ constants as constants3,
714
+ fstatSync as fstatSync22,
715
+ lstatSync as lstatSync3,
716
+ openSync as openSync22,
717
+ mkdirSync as mkdirSync3,
718
+ readFileSync as readFileSync32,
719
+ readdirSync as readdirSync22,
720
+ rmSync as rmSync22,
721
+ ftruncateSync,
722
+ writeSync,
723
+ writeFileSync as writeFileSync2
724
+ } from "fs";
725
+ import { dirname as dirname4, join as join6, relative as relative22, resolve as resolve32, sep as sep22 } from "path";
726
+ import { closeSync as closeSync3, constants as constants4, mkdirSync as mkdirSync4, openSync as openSync3, readFileSync as readFileSync5, writeSync as writeSync2 } from "fs";
727
+ import { dirname as dirname5 } from "path";
728
+ import { readdirSync as readdirSync4 } from "fs";
729
+ import { rm as rm4, stat as stat3 } from "fs/promises";
730
+ import { join as join9 } from "path";
731
+ var DRIVE = /^[a-z]:/i;
732
+ function withoutTrailingDotsAndSpaces(name) {
733
+ let end = name.length;
734
+ while (end > 0 && (name[end - 1] === "." || name[end - 1] === " ")) end -= 1;
735
+ return name.slice(0, end);
736
+ }
737
+ var isPlainName = (name) => withoutTrailingDotsAndSpaces(name) !== "" && !DRIVE.test(name) && !(process.platform === "win32" && name.includes(":"));
738
+ function isRelativeProjectPath(path) {
739
+ return !path.includes("\\") && path.split("/").every(isPlainName);
740
+ }
741
+ var inTheWay = (at) => new Error(`${at} is in the way; move or delete it, then try again.`);
742
+ var changedWhileWriting = (folder) => new Error(`${folder} changed while history was writing to it, so it stopped.`);
743
+ function folderWithin(root, path, make) {
744
+ if (!isRelativeProjectPath(path)) throw new Error(`${path} is not a path inside the project.`);
745
+ let folder = realProjectRoot(root);
746
+ const names = path.split("/").slice(0, -1);
747
+ for (const [depth, name] of names.entries()) {
748
+ const next = join3(folder, name);
749
+ let made = false;
750
+ if (!lstatSync2(next, { throwIfNoEntry: false })) {
751
+ if (!make) return null;
752
+ made = makeFolder(next);
753
+ }
754
+ const real = lstatSync2(next, { throwIfNoEntry: false })?.isDirectory() ? realpath(next) : void 0;
755
+ if (real === void 0 || dirname(real) !== folder) {
756
+ if (made) rmdirSync(next);
757
+ throw inTheWay(names.slice(0, depth + 1).join("/"));
758
+ }
759
+ folder = real;
760
+ }
761
+ return folder;
762
+ }
763
+ function makeFolder(path) {
764
+ try {
765
+ mkdirSync2(path);
766
+ return true;
767
+ } catch (error) {
768
+ if (error.code !== "EEXIST") throw error;
769
+ return false;
770
+ }
771
+ }
772
+ function assertStillWithin(folder) {
773
+ let real;
774
+ try {
775
+ real = realpath(folder);
776
+ } catch {
777
+ real = void 0;
778
+ }
779
+ if (real !== folder) throw changedWhileWriting(folder);
780
+ }
781
+ function assertLandedIn(folder, path) {
782
+ assertStillWithin(folder);
783
+ if (dirname(path) !== folder || !lstatSync2(path, { throwIfNoEntry: false })?.isFile())
784
+ throw changedWhileWriting(folder);
785
+ }
786
+ async function removeWithin(folder, path, keep) {
787
+ const at = join3(folder, basename(path));
788
+ const standing = lstatSync2(at, { throwIfNoEntry: false });
789
+ if (!standing) return;
790
+ if (standing.isDirectory()) throw inTheWay(path);
791
+ const aside = atomicTempPath(at);
792
+ assertStillWithin(folder);
793
+ try {
794
+ renameSync(at, aside);
795
+ } catch (error) {
796
+ if (error.code === "ENOENT") return;
797
+ throw error;
798
+ }
799
+ try {
800
+ assertLandedIn(folder, aside);
801
+ await keep?.(aside);
802
+ } catch (error) {
803
+ try {
804
+ renameSync(aside, at);
805
+ } catch {
806
+ }
807
+ throw error;
808
+ }
809
+ rmSync2(aside, { force: true });
810
+ }
719
811
  var BLOB_HASH = /^[0-9a-f]{64}$/;
720
812
  var READ_ONCE_AT_MOST_BYTES = 64 * 1024;
721
813
  var READS_BEFORE_LEAVING_IT = 3;
@@ -726,7 +818,14 @@ function blobPath(dir, hash) {
726
818
  if (!BLOB_HASH.test(hash)) throw new Error("That is not a history blob.");
727
819
  return join2(dir, hash.slice(0, 2), hash);
728
820
  }
729
- var readBlob = (dir, hash) => readFile2(blobPath(dir, hash));
821
+ var sha256 = (bytes) => createHash3("sha256").update(bytes).digest("hex");
822
+ var damaged = () => new Error("History's copy of this version is damaged, so it was not used. Nothing was changed.");
823
+ async function readChecked(path, hash) {
824
+ const bytes = await readFile2(path);
825
+ if (sha256(bytes) !== hash) throw damaged();
826
+ return bytes;
827
+ }
828
+ var readBlob = (dir, hash) => readChecked(blobPath(dir, hash), hash);
730
829
  async function hashFile(path) {
731
830
  const hash = createHash3("sha256");
732
831
  for await (const chunk of createReadStream(path)) hash.update(chunk);
@@ -756,31 +855,37 @@ function onRestoredInPlace(listener) {
756
855
  inPlaceListeners.add(listener);
757
856
  return () => inPlaceListeners.delete(listener);
758
857
  }
759
- async function cloneOrCopy(from, to, hash, beforeReplace) {
858
+ async function cloneOrCopy(from, hash, root, path, beforeReplace) {
859
+ const folder = folderWithin(root, path, true);
860
+ const to = join2(folder, basename2(path));
861
+ const servedAs = join2(root, path);
760
862
  refuseReadOnly(to);
761
- await mkdir(dirname(to), { recursive: true });
762
863
  const temp = atomicTempPath(to);
763
864
  try {
764
- await copyFile(from, temp, constants2.COPYFILE_FICLONE);
765
- await stopServingAndClose(to);
865
+ await copyFile(from, temp, constants2.COPYFILE_FICLONE | constants2.COPYFILE_EXCL);
866
+ assertLandedIn(folder, temp);
867
+ if (await hashFile(temp) !== hash) throw damaged();
868
+ await stopServingAndClose(servedAs);
766
869
  try {
767
870
  await renameWithRetryAsync(temp, to, {
768
871
  rename: async (from2, to2) => {
769
872
  beforeReplace?.();
873
+ assertStillWithin(folder);
770
874
  await rename(from2, to2);
771
875
  }
772
876
  });
773
877
  } catch (error) {
774
878
  if (!isWindowsHold(error)) throw error;
775
- await writeInPlace(temp, to, hash);
879
+ await writeInPlace(temp, folder, to, servedAs, hash);
776
880
  }
777
881
  } finally {
778
882
  await rm(temp, { force: true });
779
883
  }
780
884
  }
781
- async function writeInPlace(temp, to, hash) {
885
+ async function writeInPlace(temp, folder, to, servedAs, hash) {
782
886
  let outcome = "failed";
783
887
  try {
888
+ assertLandedIn(folder, to);
784
889
  await copyFile(temp, to);
785
890
  const handle = await open(to, "r+");
786
891
  try {
@@ -790,7 +895,7 @@ async function writeInPlace(temp, to, hash) {
790
895
  }
791
896
  outcome = await hashFile(to) === hash ? "restored" : "mismatch";
792
897
  } finally {
793
- for (const listener of inPlaceListeners) listener(to, outcome);
898
+ for (const listener of inPlaceListeners) listener(servedAs, outcome);
794
899
  }
795
900
  if (outcome === "mismatch")
796
901
  throw new Error("The file was written in place, but it does not match the copy history kept.");
@@ -801,7 +906,7 @@ var listDir = (path) => readdir2(path, { withFileTypes: true }).catch((error) =>
801
906
  });
802
907
  async function openBlobStore(dir) {
803
908
  const sizes = /* @__PURE__ */ new Map();
804
- const asideDir = join2(dirname(dir), "aside");
909
+ const asideDir = join2(dirname2(dir), "aside");
805
910
  const asideSizes = /* @__PURE__ */ new Map();
806
911
  const holds = /* @__PURE__ */ new Map();
807
912
  await mkdir(dir, { recursive: true });
@@ -840,14 +945,14 @@ async function openBlobStore(dir) {
840
945
  await write();
841
946
  });
842
947
  const putBytes = async (bytes, mode) => {
843
- const hash = createHash3("sha256").update(bytes).digest("hex");
948
+ const hash = sha256(bytes);
844
949
  if (sizes.has(hash)) return hash;
845
950
  const temp = join2(dir, `incoming-${randomUUID3()}`);
846
951
  try {
847
952
  await withFolderMadeIfMissing(dir, () => writeFile(temp, bytes, { mode }));
848
953
  await chmod(temp, mode & 4095);
849
954
  const to = blobPath(dir, hash);
850
- await withFolderMadeIfMissing(dirname(to), () => renameWithRetryAsync(temp, to));
955
+ await withFolderMadeIfMissing(dirname2(to), () => renameWithRetryAsync(temp, to));
851
956
  } catch (error) {
852
957
  await rm(temp, { force: true });
853
958
  throw error;
@@ -874,7 +979,7 @@ async function openBlobStore(dir) {
874
979
  await rm(temp, { force: true });
875
980
  return hash;
876
981
  }
877
- await mkdir(dirname(blobPath(dir, hash)), { recursive: true });
982
+ await mkdir(dirname2(blobPath(dir, hash)), { recursive: true });
878
983
  const size = (await stat(temp)).size;
879
984
  await renameWithRetryAsync(temp, blobPath(dir, hash));
880
985
  file(hash, size);
@@ -890,8 +995,8 @@ async function openBlobStore(dir) {
890
995
  },
891
996
  reference: (absPath) => hashFile(absPath),
892
997
  has: (hash) => sizes.has(hash) || asideSizes.has(hash),
893
- read: (hash) => readFile2(pathOf(hash)),
894
- writeTo: async (hash, absPath, beforeReplace) => cloneOrCopy(pathOf(hash), absPath, hash, beforeReplace),
998
+ read: (hash) => readChecked(pathOf(hash), hash),
999
+ writeTo: async (hash, root, path, beforeReplace) => cloneOrCopy(pathOf(hash), hash, root, path, beforeReplace),
895
1000
  async release(held) {
896
1001
  for (const [hash, path] of held) {
897
1002
  holds.get(hash)?.delete(path);
@@ -906,7 +1011,7 @@ async function openBlobStore(dir) {
906
1011
  return;
907
1012
  }
908
1013
  const to = blobPath(asideDir, hash);
909
- await mkdir(dirname(to), { recursive: true });
1014
+ await mkdir(dirname2(to), { recursive: true });
910
1015
  const moved = remove && await renameWithRetryAsync(absPath, to).then(
911
1016
  () => true,
912
1017
  () => false
@@ -967,12 +1072,12 @@ function uncopiedOnlyHashes(log, sizeOf) {
967
1072
  }
968
1073
  return [...uncopied].filter((hash) => !copied.has(hash));
969
1074
  }
970
- var ID_PATH = join3(".hyperframes", "history-id");
1075
+ var ID_PATH = join32(".hyperframes", "history-id");
971
1076
  var ID_SHAPE = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/;
972
1077
  var isHistoryId = (name) => ID_SHAPE.test(name);
973
1078
  function readId(projectDir) {
974
1079
  try {
975
- const id = readFileSync4(join3(projectDir, ID_PATH), "utf-8").trim();
1080
+ const id = readFileSync4(join32(projectDir, ID_PATH), "utf-8").trim();
976
1081
  return ID_SHAPE.test(id) ? id : null;
977
1082
  } catch {
978
1083
  return null;
@@ -985,11 +1090,11 @@ function isRecordedFolder(historyDir, folder) {
985
1090
  return sameFolder({ ino: was.ino, birthtimeMs: was.born ?? NaN }, folder);
986
1091
  const unreadableSo0878KeptTheId = typeof was?.dir !== "string";
987
1092
  if (unreadableSo0878KeptTheId) return true;
988
- return !isCopyOf0878Folder(was.dir, basename(historyDir), folder);
1093
+ return !isCopyOf0878Folder(was.dir, basename3(historyDir), folder);
989
1094
  }
990
1095
  function readRecord(historyDir) {
991
1096
  try {
992
- return JSON.parse(readFileSync4(join3(historyDir, "project.json"), "utf-8"));
1097
+ return JSON.parse(readFileSync4(join32(historyDir, "project.json"), "utf-8"));
993
1098
  } catch {
994
1099
  return null;
995
1100
  }
@@ -997,7 +1102,7 @@ function readRecord(historyDir) {
997
1102
  function isCopyOf0878Folder(recordedDir, id, folder) {
998
1103
  let there;
999
1104
  try {
1000
- there = statSync2(recordedDir, { throwIfNoEntry: false });
1105
+ there = statSync3(recordedDir, { throwIfNoEntry: false });
1001
1106
  } catch {
1002
1107
  return false;
1003
1108
  }
@@ -1005,19 +1110,19 @@ function isCopyOf0878Folder(recordedDir, id, folder) {
1005
1110
  }
1006
1111
  function projectHistoryId(projectDir, historyRoot) {
1007
1112
  const dir = resolve4(projectDir);
1008
- const folder = statSync2(dir);
1113
+ const folder = statSync3(dir);
1009
1114
  let id = readId(dir);
1010
- if (!id && existsSync(join3(dir, ID_PATH)))
1115
+ if (!id && existsSync(join32(dir, ID_PATH)))
1011
1116
  throw new HistoryIdError(
1012
- `${join3(dir, ID_PATH)} holds no history id this version can read; move it aside to start anew.`
1117
+ `${join32(dir, ID_PATH)} holds no history id this version can read; move it aside to start anew.`
1013
1118
  );
1014
- if (!id || existsSync(join3(historyRoot, id)) && !isRecordedFolder(join3(historyRoot, id), folder)) {
1015
- id = randomUUID4();
1016
- mkdirOwnedWithinProject(dir, join3(dir, ".hyperframes"));
1017
- replaceFileAtomically(join3(dir, ID_PATH), `${id}
1119
+ if (!id || existsSync(join32(historyRoot, id)) && !isRecordedFolder(join32(historyRoot, id), folder)) {
1120
+ id = randomUUID22();
1121
+ mkdirOwnedWithinProject(dir, join32(dir, ".hyperframes"));
1122
+ replaceFileAtomically(join32(dir, ID_PATH), `${id}
1018
1123
  `);
1019
1124
  }
1020
- recordProject(join3(historyRoot, id), dir, folder);
1125
+ recordProject(join32(historyRoot, id), dir, folder);
1021
1126
  return id;
1022
1127
  }
1023
1128
  var HistoryIdError = class extends Error {
@@ -1029,7 +1134,7 @@ var HistoryIdError = class extends Error {
1029
1134
  function markUsed(historyDir) {
1030
1135
  const now = /* @__PURE__ */ new Date();
1031
1136
  try {
1032
- utimesSync(join3(historyDir, "project.json"), now, now);
1137
+ utimesSync(join32(historyDir, "project.json"), now, now);
1033
1138
  } catch {
1034
1139
  return;
1035
1140
  }
@@ -1041,8 +1146,8 @@ function recordProject(historyDir, dir, folder) {
1041
1146
  markUsed(historyDir);
1042
1147
  return;
1043
1148
  }
1044
- mkdirSync2(historyDir, { recursive: true });
1045
- replaceFileAtomically(join3(historyDir, "project.json"), JSON.stringify(record), 420);
1149
+ mkdirSync22(historyDir, { recursive: true });
1150
+ replaceFileAtomically(join32(historyDir, "project.json"), JSON.stringify(record), 420);
1046
1151
  }
1047
1152
  var DAY_MS = 24 * 60 * 60 * 1e3;
1048
1153
  var KEEP_GONE_PROJECT_HISTORY_MS = 14 * DAY_MS;
@@ -1131,8 +1236,8 @@ function recheckAndMoveAway(historyRoot, id, { now, dryRun, tempDir }) {
1131
1236
  const projectDir = abandonedProject(home, id, now, tempDir);
1132
1237
  if (projectDir === null) return null;
1133
1238
  if (dryRun) return { projectDir, trash: null };
1134
- const trash = join4(historyRoot, `${PRUNED_PREFIX}${id}-${randomUUID5()}`);
1135
- renameSync(home, trash);
1239
+ const trash = join4(historyRoot, `${PRUNED_PREFIX}${id}-${randomUUID32()}`);
1240
+ renameSync2(home, trash);
1136
1241
  return { projectDir, trash };
1137
1242
  }
1138
1243
  function abandonedProject(home, id, now, tempDir) {
@@ -1143,29 +1248,29 @@ function abandonedProject(home, id, now, tempDir) {
1143
1248
  return projectGone(dir, id, record?.dev, tempDir) ? dir : null;
1144
1249
  }
1145
1250
  function projectGone(dir, id, dev, tempDir) {
1146
- if (!statSync3(join4(dir, ID_PATH), { throwIfNoEntry: false }))
1251
+ if (!statSync2(join4(dir, ID_PATH), { throwIfNoEntry: false }))
1147
1252
  return diskStillHere(dir, dev, tempDir);
1148
1253
  const there = readId(dir);
1149
1254
  return there !== null && there !== id;
1150
1255
  }
1151
1256
  function diskStillHere(dir, dev, tempDir) {
1152
1257
  let at = dir;
1153
- let stat4 = statSync3(at, { throwIfNoEntry: false });
1258
+ let stat4 = statSync2(at, { throwIfNoEntry: false });
1154
1259
  while (!stat4) {
1155
- if (dirname2(at) === at) return false;
1156
- at = dirname2(at);
1157
- stat4 = statSync3(at, { throwIfNoEntry: false });
1260
+ if (dirname3(at) === at) return false;
1261
+ at = dirname3(at);
1262
+ stat4 = statSync2(at, { throwIfNoEntry: false });
1158
1263
  }
1159
1264
  if (typeof dev === "number") return stat4.dev === dev;
1160
1265
  return at === dir || isSafePath(tempDir, at);
1161
1266
  }
1162
1267
  function lastUsed(home) {
1163
- const mtime = (file) => statSync3(join4(home, file), { throwIfNoEntry: false })?.mtimeMs ?? 0;
1268
+ const mtime = (file) => statSync2(join4(home, file), { throwIfNoEntry: false })?.mtimeMs ?? 0;
1164
1269
  return Math.max(mtime("project.json"), mtime("log.jsonl"));
1165
1270
  }
1166
1271
  async function bytesIn(dir) {
1167
1272
  let total = 0;
1168
- for (const entry of await readdir3(dir, { withFileTypes: true })) {
1273
+ for (const entry of await readdir22(dir, { withFileTypes: true })) {
1169
1274
  const path = join4(dir, entry.name);
1170
1275
  total += entry.isDirectory() ? await bytesIn(path) : (await lstat2(path)).size;
1171
1276
  }
@@ -1194,12 +1299,24 @@ var records = (state, kind) => [
1194
1299
  ...state[kind].unversioned
1195
1300
  ];
1196
1301
  var protectedRevisions = (state) => /* @__PURE__ */ new Set([state.currentRevision, ...state.renders?.retainedRevisions ?? []]);
1302
+ var canonicalUnlessOnAnotherShare = (projectDir, path) => namesAnotherNetworkRoot(projectDir, path) ? resolve22(path) : realFilePath(path);
1303
+ var recordedFileGone = (projectDir, path) => namesAnotherNetworkRoot(projectDir, path) || !existsSync2(path);
1304
+ function spelledInsideArtifactsFolder(projectDir, path, kind) {
1305
+ if (!isAbsolute4(path) || namesAnotherNetworkRoot(projectDir, path)) return false;
1306
+ if (parse(resolve22(path)).root.toLowerCase() !== parse(resolve22(projectDir)).root.toLowerCase())
1307
+ return false;
1308
+ const parts = resolve22(path).split(sep4).map((part) => part.toLowerCase());
1309
+ return parts.some(
1310
+ (part, i) => part === ".hyperframes" && parts[i + 1] === "artifacts" && parts[i + 2] === kind && i + 3 < parts.length
1311
+ );
1312
+ }
1197
1313
  function managedPath(projectDir, path, kind) {
1198
- const canonicalProject = realFilePath(resolve5(projectDir));
1314
+ if (!spelledInsideArtifactsFolder(projectDir, path, kind)) return false;
1315
+ const canonicalProject = realFilePath(resolve22(projectDir));
1199
1316
  const canonicalPath = realFilePath(path);
1200
1317
  const root = join5(canonicalProject, ".hyperframes", "artifacts", kind);
1201
- const rel = relative3(root, canonicalPath);
1202
- return isAbsolute3(path) && rel !== "" && rel !== ".." && !rel.startsWith(`..${sep3}`) && !isAbsolute3(rel) && pinProjectRecord(canonicalProject, relative3(canonicalProject, canonicalPath)) === canonicalPath;
1318
+ const rel = relative4(root, canonicalPath);
1319
+ return isAbsolute4(path) && rel !== "" && rel !== ".." && !rel.startsWith(`..${sep4}`) && !isAbsolute4(rel) && pinProjectRecord(canonicalProject, relative4(canonicalProject, canonicalPath)) === canonicalPath;
1203
1320
  }
1204
1321
  function updateLatest(state) {
1205
1322
  for (const kind of kinds) {
@@ -1222,7 +1339,7 @@ function planArtifactCleanup(projectDir, state, render) {
1222
1339
  const path = record.image ?? record.report;
1223
1340
  if (!path || record.status === "cleaned") continue;
1224
1341
  if (removable(record, path, kind)) candidates.push({ kind, record, path });
1225
- else keepPaths.add(realFilePath(path));
1342
+ else keepPaths.add(canonicalUnlessOnAnotherShare(projectDir, path));
1226
1343
  }
1227
1344
  }
1228
1345
  for (const { kind, record, path } of candidates) {
@@ -1256,12 +1373,12 @@ function restoreCleaned(state, item) {
1256
1373
  function stillPendingAfterUnlink(item) {
1257
1374
  let descriptor;
1258
1375
  try {
1259
- descriptor = openSync2(item.path, constants3.O_RDONLY | constants3.O_NOFOLLOW);
1376
+ descriptor = openSync2(item.path, constants22.O_RDONLY | constants22.O_NOFOLLOW);
1260
1377
  const stat4 = fstatSync2(descriptor);
1261
1378
  if (!stat4.isFile() || stat4.isSymbolicLink()) return false;
1262
- const hash = createHash4("sha256").update(readFileSync5(descriptor)).digest("hex");
1379
+ const hash = createHash22("sha256").update(readFileSync22(descriptor)).digest("hex");
1263
1380
  if (hash !== item.hash) return false;
1264
- const current = lstatSync2(item.path);
1381
+ const current = lstatSync22(item.path);
1265
1382
  if (current.dev !== stat4.dev || current.ino !== stat4.ino) return false;
1266
1383
  unlinkSync(item.path);
1267
1384
  return false;
@@ -1275,7 +1392,7 @@ function finishArtifactCleanup(projectDir, state) {
1275
1392
  const protectedIds = protectedRevisions(state);
1276
1393
  const referenced = new Set(
1277
1394
  kinds.flatMap(
1278
- (kind) => records(state, kind).flatMap((record) => record.image ?? record.report ?? []).map(realFilePath)
1395
+ (kind) => records(state, kind).flatMap((record) => record.image ?? record.report ?? []).map((path) => canonicalUnlessOnAnotherShare(projectDir, path))
1279
1396
  )
1280
1397
  );
1281
1398
  state.pendingArtifactCleanup = (state.pendingArtifactCleanup ?? []).filter((item) => {
@@ -1296,13 +1413,13 @@ var SNAPSHOT_GRACE_MS = 24 * 60 * 60 * 1e3;
1296
1413
  var OWNER = ".capture-owner.json";
1297
1414
  var ownedMarkers = /* @__PURE__ */ new Map();
1298
1415
  var UUID = /^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/i;
1299
- var rootOf = (project) => join6(resolve6(project), ".hyperframes", "artifacts", "snapshots");
1416
+ var rootOf = (project) => join6(resolve32(project), ".hyperframes", "artifacts", "snapshots");
1300
1417
  function ordinaryPath(project, path) {
1301
- const root = resolve6(project);
1302
- const rel = relative4(root, path);
1303
- if (rel === ".." || rel.startsWith(`..${sep4}`)) return false;
1418
+ const root = resolve32(project);
1419
+ const rel = relative22(root, path);
1420
+ if (rel === ".." || rel.startsWith(`..${sep22}`)) return false;
1304
1421
  let current = root;
1305
- for (const part of rel.split(sep4).filter(Boolean)) {
1422
+ for (const part of rel.split(sep22).filter(Boolean)) {
1306
1423
  current = join6(current, part);
1307
1424
  try {
1308
1425
  if (lstatSync3(current).isSymbolicLink()) return false;
@@ -1313,8 +1430,8 @@ function ordinaryPath(project, path) {
1313
1430
  return true;
1314
1431
  }
1315
1432
  function createSnapshotParents(project, path) {
1316
- let parent = resolve6(project);
1317
- for (const part of relative4(parent, path).split(sep4).filter(Boolean)) {
1433
+ let parent = resolve32(project);
1434
+ for (const part of relative22(parent, path).split(sep22).filter(Boolean)) {
1318
1435
  parent = join6(parent, part);
1319
1436
  try {
1320
1437
  mkdirSync3(parent);
@@ -1326,16 +1443,16 @@ function createSnapshotParents(project, path) {
1326
1443
  }
1327
1444
  function ownSnapshotRun(project, path) {
1328
1445
  const root = rootOf(project);
1329
- if (dirname3(path) !== root || !UUID.test(path.slice(root.length + 1))) return;
1446
+ if (dirname4(path) !== root || !UUID.test(path.slice(root.length + 1))) return;
1330
1447
  createSnapshotParents(project, root);
1331
1448
  mkdirSync3(path);
1332
1449
  const marker = join6(path, OWNER);
1333
- const fd = openSync3(marker, "wx");
1450
+ const fd = openSync22(marker, "wx");
1334
1451
  try {
1335
1452
  writeFileSync2(fd, JSON.stringify({ version: 1, pid: process.pid }));
1336
- ownedMarkers.set(marker, fstatSync3(fd));
1453
+ ownedMarkers.set(marker, fstatSync22(fd));
1337
1454
  } finally {
1338
- closeSync3(fd);
1455
+ closeSync22(fd);
1339
1456
  }
1340
1457
  }
1341
1458
  function missingFile(error) {
@@ -1369,24 +1486,24 @@ function sameOwnerFile(before, current) {
1369
1486
  return current.dev === before.dev && current.ino === before.ino;
1370
1487
  }
1371
1488
  function openOwner(marker, access) {
1372
- const fd = openSync3(marker, access | (constants4.O_NOFOLLOW ?? 0) | (constants4.O_NONBLOCK ?? 0));
1489
+ const fd = openSync22(marker, access | (constants3.O_NOFOLLOW ?? 0) | (constants3.O_NONBLOCK ?? 0));
1373
1490
  try {
1374
- const current = fstatSync3(fd);
1491
+ const current = fstatSync22(fd);
1375
1492
  const named = lstatSync3(marker);
1376
1493
  if (!ordinaryOwner(current) || !ordinaryOwner(named) || !sameOwnerFile(named, current))
1377
1494
  throw new Error("Snapshot owner changed while opening.");
1378
1495
  return fd;
1379
1496
  } catch (error) {
1380
- closeSync3(fd);
1497
+ closeSync22(fd);
1381
1498
  throw error;
1382
1499
  }
1383
1500
  }
1384
1501
  function readOwner(marker) {
1385
- const fd = openOwner(marker, constants4.O_RDONLY);
1502
+ const fd = openOwner(marker, constants3.O_RDONLY);
1386
1503
  try {
1387
- return JSON.parse(readFileSync6(fd, "utf8"));
1504
+ return JSON.parse(readFileSync32(fd, "utf8"));
1388
1505
  } finally {
1389
- closeSync3(fd);
1506
+ closeSync22(fd);
1390
1507
  }
1391
1508
  }
1392
1509
  function releasedOwner(owner) {
@@ -1409,7 +1526,7 @@ function recordsOf(state) {
1409
1526
  }
1410
1527
  function containingRun(root, path) {
1411
1528
  if (!path) return null;
1412
- const name = relative4(root, resolve6(path)).split(sep4)[0];
1529
+ const name = relative22(root, resolve32(path)).split(sep22)[0];
1413
1530
  return name && UUID.test(name) ? join6(root, name) : null;
1414
1531
  }
1415
1532
  function keepContainingRun(keep, root, path) {
@@ -1430,7 +1547,7 @@ function protectedRuns(root, state, records2) {
1430
1547
  function runsOnDisk(root) {
1431
1548
  let entries;
1432
1549
  try {
1433
- entries = readdirSync3(root, { withFileTypes: true });
1550
+ entries = readdirSync22(root, { withFileTypes: true });
1434
1551
  } catch {
1435
1552
  return [];
1436
1553
  }
@@ -1480,7 +1597,7 @@ function finishSnapshotCleanup(project, runs) {
1480
1597
  for (const run of runs) {
1481
1598
  try {
1482
1599
  if (!unchangedRun(project, run) || liveOwner(run.path)) continue;
1483
- rmSync2(run.path, { recursive: true });
1600
+ rmSync22(run.path, { recursive: true });
1484
1601
  } catch {
1485
1602
  }
1486
1603
  }
@@ -1490,16 +1607,16 @@ function releaseSnapshotRun(project, path) {
1490
1607
  const expected = ownedMarkers.get(marker);
1491
1608
  if (!expected) return;
1492
1609
  try {
1493
- if (dirname3(path) !== rootOf(project) || !ordinaryPath(project, path)) return;
1494
- const fd = openOwner(marker, constants4.O_RDWR);
1610
+ if (dirname4(path) !== rootOf(project) || !ordinaryPath(project, path)) return;
1611
+ const fd = openOwner(marker, constants3.O_RDWR);
1495
1612
  try {
1496
- if (!sameOwnerFile(expected, fstatSync3(fd))) return;
1497
- const owner = JSON.parse(readFileSync6(fd, "utf8"));
1613
+ if (!sameOwnerFile(expected, fstatSync22(fd))) return;
1614
+ const owner = JSON.parse(readFileSync32(fd, "utf8"));
1498
1615
  if (ownerPid(owner) !== process.pid) return;
1499
1616
  ftruncateSync(fd, 0);
1500
1617
  writeSync(fd, JSON.stringify({ version: 1, pid: process.pid, released: true }), 0, "utf8");
1501
1618
  } finally {
1502
- closeSync3(fd);
1619
+ closeSync22(fd);
1503
1620
  }
1504
1621
  } catch {
1505
1622
  } finally {
@@ -1510,7 +1627,7 @@ function retainSnapshotOutput(project, path) {
1510
1627
  const root = rootOf(project);
1511
1628
  const run = containingRun(root, path);
1512
1629
  if (!run) return;
1513
- createSnapshotParents(project, resolve6(path));
1630
+ createSnapshotParents(project, resolve32(path));
1514
1631
  try {
1515
1632
  writeFileSync2(
1516
1633
  join6(run, ".user-output"),
@@ -1538,8 +1655,8 @@ var emptyState = () => ({
1538
1655
  snapshots: collection()
1539
1656
  });
1540
1657
  function readState(dir) {
1541
- if (!existsSync2(statePath(dir))) return emptyState();
1542
- const state = JSON.parse(readFileSync7(statePath(dir), "utf8"));
1658
+ if (!existsSync3(statePath(dir))) return emptyState();
1659
+ const state = JSON.parse(readFileSync42(statePath(dir), "utf8"));
1543
1660
  if (state.version !== 1 || !state.checks || !state.snapshots || !state.revisions || !state.files)
1544
1661
  throw new Error("Unsupported video-state schema.");
1545
1662
  return state;
@@ -1554,7 +1671,7 @@ async function updateState(dir, update) {
1554
1671
  state = readState(dir);
1555
1672
  } catch (error) {
1556
1673
  if (!(error instanceof SyntaxError)) throw error;
1557
- renameSync2(statePath(dir), `${statePath(dir)}.invalid-${randomUUID6()}`);
1674
+ renameSync3(statePath(dir), `${statePath(dir)}.invalid-${randomUUID4()}`);
1558
1675
  state = emptyState();
1559
1676
  }
1560
1677
  update(state);
@@ -1564,7 +1681,7 @@ async function updateState(dir, update) {
1564
1681
  }
1565
1682
  }
1566
1683
  async function writeHistoryState(projectDir, historyId, historyDirectory, entries, currentFiles, committedFiles) {
1567
- const blob = (hash) => hash === null ? null : resolve7(historyDirectory, "blobs", hash.slice(0, 2), hash);
1684
+ const blob = (hash) => hash === null ? null : resolve42(historyDirectory, "blobs", hash.slice(0, 2), hash);
1568
1685
  await updateState(projectDir, (state) => {
1569
1686
  if (state.historyId && state.historyId !== historyId) {
1570
1687
  state.checks = collection();
@@ -1617,7 +1734,7 @@ async function fileHashes(dir) {
1617
1734
  for (const { path } of (await listProjectFilesAsync(dir)).sort(
1618
1735
  (a, b) => a.path.localeCompare(b.path)
1619
1736
  )) {
1620
- const hash = createHash5("sha256");
1737
+ const hash = createHash32("sha256");
1621
1738
  for await (const chunk of createReadStream2(join7(dir, path))) hash.update(chunk);
1622
1739
  files[path] = hash.digest("hex");
1623
1740
  }
@@ -1629,7 +1746,7 @@ async function beginArtifactCapture(projectDir) {
1629
1746
  const matches = state.historyId !== null && readId(projectDir) === state.historyId && !state.pendingChanges && Object.entries(state.files).every(([path, file]) => files[path] === file.hash) && Object.keys(files).filter((path) => !path.split("/").some((part) => part.startsWith("."))).every((path) => state.files[path]?.hash === files[path]);
1630
1747
  return {
1631
1748
  revision: matches ? state.currentRevision : null,
1632
- fingerprint: createHash5("sha256").update(JSON.stringify(files)).digest("hex")
1749
+ fingerprint: createHash32("sha256").update(JSON.stringify(files)).digest("hex")
1633
1750
  };
1634
1751
  }
1635
1752
  async function recordArtifact(projectDir, capture, artifact) {
@@ -1640,8 +1757,8 @@ async function recordArtifacts(projectDir, capture, artifactsToRecord) {
1640
1757
  const hashes = /* @__PURE__ */ new Map();
1641
1758
  for (const artifact of artifactsToRecord) {
1642
1759
  const path = artifact.kind === "check" ? artifact.report : artifact.image;
1643
- if (!path || !isAbsolute4(path)) throw new Error("Artifact needs an absolute output path.");
1644
- hashes.set(artifact.id, createHash5("sha256").update(readFileSync7(path)).digest("hex"));
1760
+ if (!path || !isAbsolute22(path)) throw new Error("Artifact needs an absolute output path.");
1761
+ hashes.set(artifact.id, createHash32("sha256").update(readFileSync42(path)).digest("hex"));
1645
1762
  }
1646
1763
  const after = await beginArtifactCapture(projectDir);
1647
1764
  const unchanged2 = after.fingerprint === capture.fingerprint;
@@ -1661,7 +1778,7 @@ async function recordArtifacts(projectDir, capture, artifactsToRecord) {
1661
1778
  attribution
1662
1779
  };
1663
1780
  const artifacts = kind === "check" ? state.checks : state.snapshots;
1664
- dropSupersededArtifacts(artifacts, artifact);
1781
+ dropSupersededArtifacts(projectDir, artifacts, artifact);
1665
1782
  const list = revision ? artifacts.revisions[revision] ??= [] : artifacts.unversioned;
1666
1783
  list.push(record);
1667
1784
  records2.push(record);
@@ -1679,17 +1796,17 @@ function attributionOf(unchanged2, revision) {
1679
1796
  if (!unchanged2) return "inputs-changed";
1680
1797
  return revision ? "recorded-revision" : "unversioned";
1681
1798
  }
1682
- function supersedes(artifact, previous) {
1683
- if (previous.status !== "cleaned" && !existsSync2(previous.image ?? previous.report ?? ""))
1684
- return true;
1799
+ function supersedes(projectDir, artifact, previous) {
1800
+ const path = previous.image ?? previous.report ?? "";
1801
+ if (previous.status !== "cleaned" && recordedFileGone(projectDir, path)) return true;
1685
1802
  if (previous.id === artifact.id) return true;
1686
1803
  if (artifact.image && previous.image === artifact.image) return true;
1687
1804
  return Boolean(artifact.report && previous.report === artifact.report);
1688
1805
  }
1689
- function dropSupersededArtifacts(artifacts, artifact) {
1806
+ function dropSupersededArtifacts(projectDir, artifacts, artifact) {
1690
1807
  for (const list of [...Object.values(artifacts.revisions), artifacts.unversioned]) {
1691
1808
  for (let i = list.length - 1; i >= 0; i--) {
1692
- if (supersedes(artifact, list[i])) list.splice(i, 1);
1809
+ if (supersedes(projectDir, artifact, list[i])) list.splice(i, 1);
1693
1810
  }
1694
1811
  }
1695
1812
  }
@@ -1697,7 +1814,7 @@ function listsOf(artifacts) {
1697
1814
  return [...Object.values(artifacts.revisions), artifacts.unversioned];
1698
1815
  }
1699
1816
  async function forgetRecordedArtifacts(projectDir, paths) {
1700
- const gone = new Set(paths.map((path) => resolve7(path)));
1817
+ const gone = new Set(paths.map((path) => resolve42(path)));
1701
1818
  if (gone.size === 0) return;
1702
1819
  await updateState(projectDir, (state) => {
1703
1820
  for (const artifacts of [state.checks, state.snapshots]) {
@@ -1705,7 +1822,7 @@ async function forgetRecordedArtifacts(projectDir, paths) {
1705
1822
  for (let i = list.length - 1; i >= 0; i--) {
1706
1823
  const record = list[i];
1707
1824
  const path = record.image ?? record.report;
1708
- if (path && gone.has(resolve7(path))) list.splice(i, 1);
1825
+ if (path && gone.has(resolve42(path))) list.splice(i, 1);
1709
1826
  }
1710
1827
  }
1711
1828
  if (artifacts.latest && !listsOf(artifacts).some(
@@ -1717,7 +1834,7 @@ async function forgetRecordedArtifacts(projectDir, paths) {
1717
1834
  });
1718
1835
  }
1719
1836
  function artifactDirectory(projectDir, kind) {
1720
- const path = join7(resolve7(projectDir), ".hyperframes", "artifacts", kind, randomUUID6());
1837
+ const path = join7(resolve42(projectDir), ".hyperframes", "artifacts", kind, randomUUID4());
1721
1838
  if (kind === "snapshots") ownSnapshotRun(projectDir, path);
1722
1839
  return path;
1723
1840
  }
@@ -1726,14 +1843,14 @@ function retainRevision(retained, revision) {
1726
1843
  return [revision, ...retained.filter((id) => id !== revision)].slice(0, 2);
1727
1844
  }
1728
1845
  async function recordRenderSuccess(projectDir, output, status = "completed", capture) {
1729
- const outputFile = statSync4(output);
1846
+ const outputFile = statSync32(output);
1730
1847
  if (!outputFile.isFile() && !outputFile.isDirectory() || outputFile.isFile() && outputFile.size === 0)
1731
1848
  throw new Error("Render output is missing or empty.");
1732
1849
  const after = capture ? await beginArtifactCapture(projectDir) : null;
1733
1850
  const record = {
1734
- id: randomUUID6(),
1851
+ id: randomUUID4(),
1735
1852
  completedAt: Date.now(),
1736
- output: resolve7(output),
1853
+ output: resolve42(output),
1737
1854
  status
1738
1855
  };
1739
1856
  const unchanged2 = Boolean(capture && after?.fingerprint === capture.fingerprint);
@@ -1770,7 +1887,7 @@ function parseRecord(line) {
1770
1887
  function readLog(file, onUnreadable) {
1771
1888
  let text;
1772
1889
  try {
1773
- text = readFileSync8(file, "utf-8");
1890
+ text = readFileSync5(file, "utf-8");
1774
1891
  } catch {
1775
1892
  return null;
1776
1893
  }
@@ -1794,7 +1911,7 @@ function applyRecord(log, record) {
1794
1911
  function saveRecord(file, log, record) {
1795
1912
  let fd;
1796
1913
  try {
1797
- fd = openSync4(file, constants5.O_WRONLY | constants5.O_APPEND);
1914
+ fd = openSync3(file, constants4.O_WRONLY | constants4.O_APPEND);
1798
1915
  } catch (error) {
1799
1916
  if (error.code !== "ENOENT") throw error;
1800
1917
  return writeLog(file, log);
@@ -1803,7 +1920,7 @@ function saveRecord(file, log, record) {
1803
1920
  writeSync2(fd, `${JSON.stringify(record)}
1804
1921
  `);
1805
1922
  } finally {
1806
- closeSync4(fd);
1923
+ closeSync3(fd);
1807
1924
  }
1808
1925
  }
1809
1926
  function baselineRecord(log) {
@@ -1819,7 +1936,7 @@ function writeLog(file, log) {
1819
1936
  ...log.entries.map((entry) => ({ type: "entry", entry })),
1820
1937
  ...[...log.pins].map((id) => ({ type: "pin", id, pinned: true }))
1821
1938
  ];
1822
- mkdirSync4(dirname4(file), { recursive: true });
1939
+ mkdirSync4(dirname5(file), { recursive: true });
1823
1940
  replaceFileAtomically(file, records2.map((r) => `${JSON.stringify(r)}
1824
1941
  `).join(""), 420);
1825
1942
  }
@@ -1915,6 +2032,7 @@ async function inFirstCopySlot(copy) {
1915
2032
  var MEDIA_LEDGER = ".media/manifest.jsonl";
1916
2033
  var KEPT_HIDDEN_PATHS = /* @__PURE__ */ new Set([...STUDIO_SIGNATURE_MANIFEST_PATHS, MEDIA_LEDGER]);
1917
2034
  function isHistoryPath(path) {
2035
+ if (!isRelativeProjectPath(path)) return false;
1918
2036
  if (KEPT_HIDDEN_PATHS.has(path)) return true;
1919
2037
  return !path.split("/").some((segment) => segment.startsWith("."));
1920
2038
  }
@@ -1952,17 +2070,18 @@ var isMissingFolder = (error) => ["ENOENT", "ENOTDIR"].includes(error.code ?? ""
1952
2070
  async function removeEmptyFolders(dir) {
1953
2071
  let entries;
1954
2072
  try {
1955
- entries = await readdir4(dir, { withFileTypes: true });
2073
+ entries = await readdir3(dir, { withFileTypes: true });
1956
2074
  } catch (error) {
1957
2075
  if (isMissingFolder(error)) return;
1958
2076
  throw error;
1959
2077
  }
1960
2078
  for (const entry of entries)
1961
2079
  if (entry.isDirectory()) await removeEmptyFolders(join8(dir, entry.name));
2080
+ assertStillWithin(dirname6(dir));
1962
2081
  await rmdir(dir);
1963
2082
  }
1964
2083
  function fileLeftIn(dir, at, deleted) {
1965
- for (const entry of readdirSync4(dir, { withFileTypes: true })) {
2084
+ for (const entry of readdirSync3(dir, { withFileTypes: true })) {
1966
2085
  const path = `${at}/${entry.name}`;
1967
2086
  const left = entry.isDirectory() ? fileLeftIn(join8(dir, entry.name), path, deleted) : deleted.has(path) ? void 0 : path;
1968
2087
  if (left) return left;
@@ -1970,8 +2089,8 @@ function fileLeftIn(dir, at, deleted) {
1970
2089
  return void 0;
1971
2090
  }
1972
2091
  function ignoresCase(dir) {
1973
- const self = statSync5(join8(dir, ID_PATH), { throwIfNoEntry: false });
1974
- const other = statSync5(join8(dir, ID_PATH.toUpperCase()), { throwIfNoEntry: false });
2092
+ const self = statSync4(join8(dir, ID_PATH), { throwIfNoEntry: false });
2093
+ const other = statSync4(join8(dir, ID_PATH.toUpperCase()), { throwIfNoEntry: false });
1975
2094
  return self !== void 0 && other?.ino === self.ino && other.dev === self.dev;
1976
2095
  }
1977
2096
  var blocks = (removed, added) => added.startsWith(`${removed}/`) || removed.startsWith(`${added}/`);
@@ -2023,10 +2142,10 @@ var Engine = class {
2023
2142
  this.options = options;
2024
2143
  this.projectId = projectId;
2025
2144
  this.blobs = blobs;
2026
- this.dir = resolve8(options.projectDir);
2145
+ this.dir = resolve5(options.projectDir);
2027
2146
  this.home = join8(options.historyRoot, projectId);
2028
2147
  this.foldsCase = ignoresCase(this.dir);
2029
- const folder = statSync5(this.dir, { throwIfNoEntry: false });
2148
+ const folder = statSync4(this.dir, { throwIfNoEntry: false });
2030
2149
  if (!folder || readId(this.dir) !== projectId || !isRecordedFolder(this.home, folder))
2031
2150
  throw this.replaced();
2032
2151
  this.folder = { dev: folder.dev, ino: folder.ino, birthtimeMs: folder.birthtimeMs };
@@ -2096,7 +2215,7 @@ var Engine = class {
2096
2215
  }
2097
2216
  /** Another project if the folder or its id changed, or the id is gone: a recreated folder may reuse the inode. */
2098
2217
  whereFolder() {
2099
- const now = statSync5(this.dir, { throwIfNoEntry: false });
2218
+ const now = statSync4(this.dir, { throwIfNoEntry: false });
2100
2219
  if (!now) return "gone";
2101
2220
  const same = now.dev === this.folder.dev && sameFolder(now, this.folder);
2102
2221
  return same && readId(this.dir) === this.projectId ? "here" : "replaced";
@@ -2110,7 +2229,7 @@ var Engine = class {
2110
2229
  this.owesVideoState = true;
2111
2230
  if (record) saveRecord(this.logFile, this.log, record);
2112
2231
  else writeLog(this.logFile, this.log);
2113
- if (!existsSync3(join8(this.home, "project.json")))
2232
+ if (!existsSync4(join8(this.home, "project.json")))
2114
2233
  recordProject(this.home, this.dir, this.folder);
2115
2234
  }
2116
2235
  replaced() {
@@ -2154,7 +2273,7 @@ var Engine = class {
2154
2273
  if (!after || !affectsProjectSignature(realDir, absPath)) return;
2155
2274
  const replaced = hashOfVersion(fileContentVersion(bytes));
2156
2275
  if (!replaced || replaced === after) return;
2157
- const path = relative5(realDir, absPath).split(sep5).join("/");
2276
+ const path = relative3(realDir, absPath).split(sep3).join("/");
2158
2277
  if (!isHistoryPath(path)) return;
2159
2278
  this.overwritten.set(
2160
2279
  path,
@@ -2167,7 +2286,7 @@ var Engine = class {
2167
2286
  });
2168
2287
  }
2169
2288
  async storeBytes(bytes) {
2170
- const staged = join8(this.home, `overwrote-${randomUUID7()}`);
2289
+ const staged = join8(this.home, `overwrote-${randomUUID5()}`);
2171
2290
  await mkdir2(this.home, { recursive: true });
2172
2291
  await writeFile2(staged, bytes);
2173
2292
  try {
@@ -2309,7 +2428,7 @@ var Engine = class {
2309
2428
  }
2310
2429
  readStatCache() {
2311
2430
  try {
2312
- const files = JSON.parse(readFileSync9(join8(this.home, "stat.json"), "utf-8"));
2431
+ const files = JSON.parse(readFileSync6(join8(this.home, "stat.json"), "utf-8"));
2313
2432
  return new Map(Object.entries(files));
2314
2433
  } catch {
2315
2434
  return /* @__PURE__ */ new Map();
@@ -2318,7 +2437,7 @@ var Engine = class {
2318
2437
  readAdopting() {
2319
2438
  try {
2320
2439
  return new Set(
2321
- JSON.parse(readFileSync9(join8(this.home, "adopting.json"), "utf-8"))
2440
+ JSON.parse(readFileSync6(join8(this.home, "adopting.json"), "utf-8"))
2322
2441
  );
2323
2442
  } catch {
2324
2443
  return /* @__PURE__ */ new Set();
@@ -2455,7 +2574,7 @@ var Engine = class {
2455
2574
  return group && taken.every((change) => after(change.path, change.before) === change.before) && [...group.changes.values()].every(untouched) ? group : null;
2456
2575
  }
2457
2576
  logPath(path) {
2458
- return relative5(this.dir, resolve8(this.dir, path)).split(sep5).join("/");
2577
+ return relative3(this.dir, resolve5(this.dir, path)).split(sep3).join("/");
2459
2578
  }
2460
2579
  /** Takes `paths`' uncommitted changes from others, cut at what `who` overwrote. */
2461
2580
  async takeClaimed(who, paths, overwrote) {
@@ -2546,7 +2665,7 @@ var Engine = class {
2546
2665
  return this.outside;
2547
2666
  }
2548
2667
  newGroup(who, label) {
2549
- return { id: randomUUID7(), who, label, startedAt: this.now(), changes: /* @__PURE__ */ new Map() };
2668
+ return { id: randomUUID5(), who, label, startedAt: this.now(), changes: /* @__PURE__ */ new Map() };
2550
2669
  }
2551
2670
  async commitOutside() {
2552
2671
  if (this.outside?.changes.size) await this.commitClaim();
@@ -2616,9 +2735,9 @@ var Engine = class {
2616
2735
  }
2617
2736
  /** A watcher saw a write: one sweep per burst takes it in (a deleted folder is reported by its name alone). */
2618
2737
  noteChange(path) {
2619
- const absolute = resolve8(this.dir, path);
2738
+ const absolute = resolve5(this.dir, path);
2620
2739
  if (this.notedTimer || !affectsProjectSignature(this.dir, absolute)) return;
2621
- if (!isHistoryPath(relative5(this.dir, absolute).split(sep5).join("/"))) return;
2740
+ if (!isHistoryPath(relative3(this.dir, absolute).split(sep3).join("/"))) return;
2622
2741
  this.sweepIn(20);
2623
2742
  }
2624
2743
  sweepIn(ms) {
@@ -2711,7 +2830,7 @@ var Engine = class {
2711
2830
  if (standing.stat.isSymbolicLink()) return standing.at;
2712
2831
  if (standing.at === path && !standing.stat.isDirectory()) return void 0;
2713
2832
  const real = realpathSync.native(join8(this.dir, standing.at));
2714
- const at = relative5(realpathSync.native(this.dir), real).split(sep5).join("/");
2833
+ const at = relative3(realpathSync.native(this.dir), real).split(sep3).join("/");
2715
2834
  if (standing.at !== path) return deleted.has(at) ? void 0 : at;
2716
2835
  return fileLeftIn(real, at, deleted);
2717
2836
  }
@@ -2754,16 +2873,23 @@ var Engine = class {
2754
2873
  const version = hash === null ? DELETED_VERSION : hashVersion(hash);
2755
2874
  recordFileWriteReceipt(absPath, { path, version, writeToken });
2756
2875
  }
2757
- const standing = lstatSync4(absPath, { throwIfNoEntry: false });
2758
- if (standing?.isFile() && isUncopied(path, standing.size))
2759
- await this.blobs.keep(path, absPath, hash === null);
2876
+ const folder = folderWithin(this.dir, path, hash !== null);
2877
+ if (!folder) return;
2878
+ const at = join8(folder, basename4(path));
2879
+ const standing = lstatSync4(at, { throwIfNoEntry: false });
2880
+ const uncopied = standing?.isFile() === true && isUncopied(path, standing.size);
2760
2881
  if (hash === null) {
2761
2882
  this.assertWritable();
2762
- rmSync3(absPath, { force: true });
2763
- } else {
2764
- await removeEmptyFolders(absPath);
2765
- await this.blobs.writeTo(hash, absPath, () => this.assertWritable());
2883
+ await removeWithin(
2884
+ folder,
2885
+ path,
2886
+ uncopied ? (aside) => this.blobs.keep(path, aside, true) : void 0
2887
+ );
2888
+ return;
2766
2889
  }
2890
+ if (uncopied) await this.blobs.keep(path, at, false);
2891
+ await removeEmptyFolders(at);
2892
+ await this.blobs.writeTo(hash, this.dir, path, () => this.assertWritable());
2767
2893
  }
2768
2894
  entry(id) {
2769
2895
  const entry = this.log.entries.find((candidate) => candidate.id === id);
@@ -2906,20 +3032,21 @@ var Engine = class {
2906
3032
  },
2907
3033
  checkout: (entryId, side, emptyDir) => this.queue(async () => {
2908
3034
  this.entry(entryId);
2909
- if (!existsSync3(this.dir)) throw new Error(`The project folder is gone: ${this.dir}`);
2910
- const dest = resolve8(emptyDir);
3035
+ if (!existsSync4(this.dir)) throw new Error(`The project folder is gone: ${this.dir}`);
3036
+ const dest = resolve5(emptyDir);
2911
3037
  if (isWithin(this.dir, dest))
2912
3038
  throw new Error(`Checkout writes outside the project only: ${dest}`);
2913
- if ((await readdir4(dest).catch(missingIsEmpty)).length > 0)
3039
+ if ((await readdir3(dest).catch(missingIsEmpty)).length > 0)
2914
3040
  throw new Error(`Checkout writes into an empty folder only: ${dest}`);
2915
3041
  const files = manifestAround(this.log, entryId, side);
2916
3042
  for (const [path, hash] of files)
2917
3043
  if (!this.blobs.has(hash))
2918
3044
  throw new Error(`The version of ${path} from then is not kept.`);
2919
3045
  try {
2920
- for (const [path, hash] of files) await this.blobs.writeTo(hash, join8(dest, path));
3046
+ await mkdir2(dest, { recursive: true });
3047
+ for (const [path, hash] of files) await this.blobs.writeTo(hash, dest, path);
2921
3048
  } catch (error) {
2922
- for (const name of await readdir4(dest).catch(() => []))
3049
+ for (const name of await readdir3(dest).catch(() => []))
2923
3050
  await rm3(join8(dest, name), { recursive: true, force: true });
2924
3051
  throw error;
2925
3052
  }
@@ -2960,10 +3087,10 @@ var Engine = class {
2960
3087
  }
2961
3088
  };
2962
3089
  function isWithin(dir, path) {
2963
- let probe = resolve8(path);
2964
- while (!existsSync3(probe) && dirname5(probe) !== probe) probe = dirname5(probe);
2965
- const rel = relative5(realpathSync.native(dir), realpathSync.native(probe));
2966
- return rel === "" || rel !== ".." && !rel.startsWith(`..${sep5}`) && !isAbsolute5(rel);
3090
+ let probe = resolve5(path);
3091
+ while (!existsSync4(probe) && dirname6(probe) !== probe) probe = dirname6(probe);
3092
+ const rel = relative3(realpathSync.native(dir), realpathSync.native(probe));
3093
+ return rel === "" || rel !== ".." && !rel.startsWith(`..${sep3}`) && !isAbsolute3(rel);
2967
3094
  }
2968
3095
  function missingIsEmpty(error) {
2969
3096
  if (error.code === "ENOENT") return [];
@@ -2982,7 +3109,7 @@ var HistoryRefusedError = class extends Error {
2982
3109
  }
2983
3110
  };
2984
3111
  async function openProjectHistory(options) {
2985
- if (!existsSync3(options.projectDir))
3112
+ if (!existsSync4(options.projectDir))
2986
3113
  throw new HistoryClosedError(`${options.projectDir} is gone or now another project.`);
2987
3114
  const projectId = projectHistoryId(options.projectDir, options.historyRoot);
2988
3115
  const release = await takeHistoryOwnership(
@@ -3013,9 +3140,9 @@ async function openProjectHistory(options) {
3013
3140
  }
3014
3141
  }
3015
3142
  function readProjectHistory(options) {
3016
- const dir = resolve8(options.projectDir);
3143
+ const dir = resolve5(options.projectDir);
3017
3144
  const id = readId(dir);
3018
- const home = id && isRecordedFolder(join8(options.historyRoot, id), statSync5(dir)) ? join8(options.historyRoot, id) : null;
3145
+ const home = id && isRecordedFolder(join8(options.historyRoot, id), statSync4(dir)) ? join8(options.historyRoot, id) : null;
3019
3146
  const read = home && readLog(logFileIn(home), () => {
3020
3147
  });
3021
3148
  const log = withoutHiddenPaths(read || { baseline: /* @__PURE__ */ new Map(), entries: [], pins: /* @__PURE__ */ new Set() });
@@ -3030,7 +3157,7 @@ function readProjectHistory(options) {
3030
3157
  }
3031
3158
  function historyIds(historyRoot) {
3032
3159
  try {
3033
- return readdirSync5(historyRoot).filter(isHistoryId);
3160
+ return readdirSync4(historyRoot).filter(isHistoryId);
3034
3161
  } catch {
3035
3162
  return [];
3036
3163
  }
@@ -3107,14 +3234,6 @@ function historyCache(open2) {
3107
3234
  }
3108
3235
 
3109
3236
  export {
3110
- fileContentVersion,
3111
- DELETED_VERSION,
3112
- settledFileTag,
3113
- createWriteToken,
3114
- recordFileWriteReceipt,
3115
- clearFileWriteReceipt,
3116
- identifyFileWrite,
3117
- consumeFileWriteReceipt,
3118
3237
  HistoryBusyError,
3119
3238
  registerRenderOutput,
3120
3239
  STUDIO_SIGNATURE_MANIFEST_PATHS,
@@ -3123,9 +3242,18 @@ export {
3123
3242
  resolveProjectAndSignature,
3124
3243
  createProjectSignature,
3125
3244
  createProjectSignatureAsync,
3245
+ fileContentVersion,
3246
+ DELETED_VERSION,
3247
+ settledFileTag,
3248
+ createWriteToken,
3249
+ recordFileWriteReceipt,
3250
+ clearFileWriteReceipt,
3251
+ identifyFileWrite,
3252
+ consumeFileWriteReceipt,
3126
3253
  serveWhileOpen,
3127
3254
  onRestoredInPlace,
3128
3255
  isUncopiedMedia,
3256
+ isHistoryId,
3129
3257
  HistoryIdError,
3130
3258
  listProjectHistories,
3131
3259
  pruneGoneProjectHistories,