hyperframes 0.9.20 → 0.9.22

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 (247) hide show
  1. package/dist/{add-6U3Y7DEN.js → add-P5EPMJ5Q.js} +11 -11
  2. package/dist/{agentPromptGenerator-2U62YSRT.js → agentPromptGenerator-MEUCOVJI.js} +6 -6
  3. package/dist/{animatedGifPrep-RC6CYTRI.js → animatedGifPrep-AOFUPYBU.js} +6 -6
  4. package/dist/api.js +29 -29
  5. package/dist/{asset-ER2CUS6B.js → asset-RH3JROBG.js} +2 -2
  6. package/dist/{assetCataloger-425SRTPW.js → assetCataloger-64MQJFOZ.js} +7 -7
  7. package/dist/{audio-JUAMPMWA.js → audio-BQNS5FYY.js} +15 -15
  8. package/dist/{auth-DQ52RE6K.js → auth-QWQ42CNZ.js} +2 -2
  9. package/dist/{autoUpdate-YUZGZ5ZI.js → autoUpdate-J26RSYB3.js} +2 -2
  10. package/dist/{avatars-F4HNQISE.js → avatars-OI5NDVRA.js} +10 -10
  11. package/dist/{backgroundChecks-MSOJBGL7.js → backgroundChecks-GA5TOAT7.js} +3 -3
  12. package/dist/backgroundChecksWorker.js +3 -3
  13. package/dist/{batchRender-33AZEDWV.js → batchRender-FQPTPD5C.js} +3 -3
  14. package/dist/{beats-WI3UU5KD.js → beats-3PKJQEVM.js} +8 -8
  15. package/dist/{benchmark-ZE5Y75YM.js → benchmark-UXWF7XLU.js} +8 -8
  16. package/dist/{billing-N4BCUG7R.js → billing-A6GCRCBD.js} +10 -10
  17. package/dist/{browser-HUOPVD2U.js → browser-GT7GX3OU.js} +5 -5
  18. package/dist/{bundleWithLocalizedFonts-PRR3UAJT.js → bundleWithLocalizedFonts-FW5W6YB3.js} +1 -1
  19. package/dist/{capture-2QNE2DEY.js → capture-EFW47UGO.js} +3 -3
  20. package/dist/{capture-UWQ2GBML.js → capture-RIKBIXAD.js} +13 -13
  21. package/dist/{captureCompositionFrame-S2A5KJUT.js → captureCompositionFrame-ZRYVO54J.js} +12 -12
  22. package/dist/{catalog-BQZ55PQP.js → catalog-ZV33ASKR.js} +11 -11
  23. package/dist/{catch-up-JFII6DVC.js → catch-up-SXGWPMIJ.js} +6 -6
  24. package/dist/{check-KPFCL46S.js → check-P4SYKGRB.js} +37 -37
  25. package/dist/{checkAudio-NTES344V.js → checkAudio-MNVMXEDK.js} +9 -9
  26. package/dist/{checkBrowser-WQWRQO2X.js → checkBrowser-A4HK7M5F.js} +31 -31
  27. package/dist/{chunk-WMZHESNZ.js → chunk-2PRAPMMF.js} +2 -2
  28. package/dist/{chunk-UXEUKILH.js → chunk-2ZLUFEPP.js} +1 -1
  29. package/dist/{chunk-A457YCWN.js → chunk-3H547JQP.js} +2 -2
  30. package/dist/{chunk-KPCCWI5Q.js → chunk-4FNJ2QNP.js} +2 -2
  31. package/dist/{chunk-YVFJWUSI.js → chunk-4YF5DHN5.js} +1 -1
  32. package/dist/{chunk-4EUUYYB3.js → chunk-5H5DZTVW.js} +2 -2
  33. package/dist/{chunk-ZNUMTYBZ.js → chunk-5HEUGZ7C.js} +3 -3
  34. package/dist/{chunk-JXGFZG73.js → chunk-5UF4Z3KI.js} +1 -1
  35. package/dist/{chunk-FXPBFARU.js → chunk-5V6NEPTW.js} +1 -1
  36. package/dist/{chunk-LNHMJ555.js → chunk-5YQCUH6I.js} +1 -1
  37. package/dist/{chunk-PWP4W2PF.js → chunk-5YVA7VYC.js} +1 -1
  38. package/dist/{chunk-HCUEMQB4.js → chunk-6OWZRBUW.js} +1 -1
  39. package/dist/{chunk-5V3R5ZMY.js → chunk-7GX3DFQZ.js} +7 -7
  40. package/dist/{chunk-LDV6P3DG.js → chunk-7IBVRNW2.js} +1 -1
  41. package/dist/{chunk-QUYTXJLE.js → chunk-AOMZDUV2.js} +1 -1
  42. package/dist/{chunk-7DGAJ7RY.js → chunk-B2XUJ5Q5.js} +1 -1
  43. package/dist/{chunk-7PG57ERE.js → chunk-C2I3BLHP.js} +1 -1
  44. package/dist/{chunk-XID37ELP.js → chunk-CNNU335R.js} +2 -2
  45. package/dist/{chunk-KKNAM57Z.js → chunk-D3CD6TQ3.js} +1 -1
  46. package/dist/{chunk-3XJM7XZN.js → chunk-D3NWGOXW.js} +30 -0
  47. package/dist/{chunk-UECTSXVZ.js → chunk-DCTVIIIY.js} +1 -1
  48. package/dist/{chunk-BA3FUJOU.js → chunk-DMEHR64W.js} +38 -4
  49. package/dist/{chunk-G2C7OTXI.js → chunk-ELYZGVJQ.js} +1 -1
  50. package/dist/{chunk-FY2QFPEK.js → chunk-EXZA6WBB.js} +1 -1
  51. package/dist/chunk-FRBQYFUV.js +481 -0
  52. package/dist/{chunk-MQFX4OD3.js → chunk-G4UQV75W.js} +1 -1
  53. package/dist/{chunk-D3ZYDQMH.js → chunk-G7DS5B4U.js} +2 -2
  54. package/dist/{chunk-LEVO6XYF.js → chunk-GNUTRVGG.js} +33 -22
  55. package/dist/{chunk-GNY2WZKA.js → chunk-GQR6KIVQ.js} +3 -3
  56. package/dist/{chunk-S45SR3TL.js → chunk-H2IA6JUW.js} +2 -2
  57. package/dist/chunk-H2PVMZ2M.js +5035 -0
  58. package/dist/{chunk-N2I2YUL7.js → chunk-H5L6ZLWW.js} +7 -7
  59. package/dist/{chunk-MHW4MMV4.js → chunk-IGWGLKKL.js} +10 -10
  60. package/dist/{chunk-P2DAWEPF.js → chunk-IPW3FPE3.js} +2 -2
  61. package/dist/{chunk-Q6DA3X34.js → chunk-ITABEOC6.js} +3 -3
  62. package/dist/{chunk-5KJWA22L.js → chunk-JAA4EBWV.js} +5 -5
  63. package/dist/{chunk-QYWOP6MH.js → chunk-JIICYVRY.js} +3 -3
  64. package/dist/{chunk-C2PQTWAH.js → chunk-KA5IELN4.js} +1 -1
  65. package/dist/{chunk-RPSR5YSD.js → chunk-KES2XW4I.js} +4 -4
  66. package/dist/{chunk-L6XUDQW6.js → chunk-KEUNBZWA.js} +18 -7
  67. package/dist/{chunk-BQ2U65ZF.js → chunk-KZWYAZZH.js} +115 -21
  68. package/dist/{chunk-SH6P5CMQ.js → chunk-L7ED3RE6.js} +1 -1
  69. package/dist/{chunk-Z745SNN4.js → chunk-LC3UH6GM.js} +19 -8
  70. package/dist/{chunk-4J2Y6G2X.js → chunk-LLLOEJPL.js} +1 -1
  71. package/dist/{chunk-5WKW4P6P.js → chunk-LLUKDUVS.js} +28 -15
  72. package/dist/{chunk-S6MXHF7C.js → chunk-LNE3SUVH.js} +1 -1
  73. package/dist/{chunk-OAQTFIWB.js → chunk-LWF7T7Y3.js} +3 -3
  74. package/dist/{chunk-TGSBNJYV.js → chunk-MD3DZRKM.js} +2 -2
  75. package/dist/{chunk-JWORQ5WQ.js → chunk-MFDNMTOP.js} +1 -1
  76. package/dist/{chunk-POKB2QVF.js → chunk-NJD7YMBD.js} +2 -2
  77. package/dist/{chunk-FPM6B5X5.js → chunk-NOTTJWVZ.js} +2 -2
  78. package/dist/{chunk-UH6JF4TY.js → chunk-NPBMNB7S.js} +4 -4
  79. package/dist/{chunk-GH4QTKBM.js → chunk-NZ24SOAQ.js} +7 -7
  80. package/dist/{chunk-4HWNUBW2.js → chunk-O3ES5O4T.js} +3 -3
  81. package/dist/{chunk-35APUSDP.js → chunk-O75PHTJC.js} +1 -1
  82. package/dist/{chunk-OWBXXAYQ.js → chunk-OHHYRXX7.js} +2 -2
  83. package/dist/{chunk-USRF4NA6.js → chunk-OUAMAOQS.js} +10 -10
  84. package/dist/{chunk-IBXWPFGK.js → chunk-P3VIGBOY.js} +2 -2
  85. package/dist/{chunk-XACDCHJF.js → chunk-P7GVEHVM.js} +1 -1
  86. package/dist/{chunk-TKHWUM6J.js → chunk-PE3QPW77.js} +2 -2
  87. package/dist/{chunk-7ISXVZHB.js → chunk-PHA3H4JX.js} +4 -4
  88. package/dist/{chunk-6FI5JRM3.js → chunk-PJNDSYJV.js} +301 -97
  89. package/dist/{chunk-M5CDC3VO.js → chunk-PPOJMJR5.js} +25 -15
  90. package/dist/{chunk-5ECZJECP.js → chunk-PZSPEUI5.js} +1 -1
  91. package/dist/{chunk-76IGIELW.js → chunk-QMD3FTBL.js} +2 -2
  92. package/dist/{chunk-XU5LAY46.js → chunk-QMYMXTRT.js} +1 -1
  93. package/dist/{chunk-3WLJMGCI.js → chunk-QYWBLJ2X.js} +1 -1
  94. package/dist/{chunk-4XOQILDV.js → chunk-S6M6TIEI.js} +15 -4
  95. package/dist/{chunk-X254MPK3.js → chunk-SCTDZ5C7.js} +1 -1
  96. package/dist/{chunk-PAFAOFZZ.js → chunk-SMRSQ5CF.js} +1 -1
  97. package/dist/{chunk-WNPIJ7UG.js → chunk-TIDNGNPA.js} +1 -1
  98. package/dist/{chunk-VM6PDH32.js → chunk-TRHWNVOY.js} +1 -1
  99. package/dist/{chunk-NZ6JYCGU.js → chunk-UQVRQ2SL.js} +3 -3
  100. package/dist/{chunk-RFG4XUMQ.js → chunk-US24WEIH.js} +1 -1
  101. package/dist/{chunk-TCW3ALLF.js → chunk-UTCYYAGP.js} +2 -2
  102. package/dist/{chunk-Y5ZW3BRK.js → chunk-V43H4NSJ.js} +3 -3
  103. package/dist/{chunk-76HDNQDL.js → chunk-VBSTLL2I.js} +2 -2
  104. package/dist/{chunk-QSOIL3EE.js → chunk-VIVMNHG7.js} +3 -3
  105. package/dist/{chunk-DNWZ66ND.js → chunk-VLW6AHXZ.js} +1 -1
  106. package/dist/{chunk-PGNE33QK.js → chunk-WD6Q4UXG.js} +33 -15
  107. package/dist/{chunk-NSNT4DNY.js → chunk-WIMLEJLH.js} +3 -3
  108. package/dist/{chunk-HIT72LVX.js → chunk-X2WUBMVK.js} +7 -7
  109. package/dist/{chunk-CKZQQ2DO.js → chunk-XVFUUT57.js} +1 -1
  110. package/dist/{chunk-3KJW4NNP.js → chunk-XWXZFUFZ.js} +12 -14
  111. package/dist/{chunk-NHV3G6JH.js → chunk-YAC7QLYC.js} +1 -1
  112. package/dist/{chunk-7CGSZ3OR.js → chunk-YE64DXEB.js} +13 -13
  113. package/dist/{chunk-IY4I7TV4.js → chunk-YSKP5MCC.js} +2 -2
  114. package/dist/{chunk-RONKIDIW.js → chunk-YYQO5K45.js} +5 -5
  115. package/dist/{chunk-SVOUYNKZ.js → chunk-Z6AR7JQZ.js} +37 -20
  116. package/dist/{chunk-P2GR4V7S.js → chunk-ZNFYQMFN.js} +1 -1
  117. package/dist/{clean-5FFXB5MF.js → clean-DXVKCD35.js} +16 -16
  118. package/dist/cli.js +60 -60
  119. package/dist/{cloud-XC5OSAE2.js → cloud-5ZJIOZEM.js} +4 -4
  120. package/dist/{cloud-CINLC3NP.js → cloud-D7DFYONW.js} +2 -2
  121. package/dist/{cloudrun-VVU4XERK.js → cloudrun-QGCPCLS7.js} +4 -4
  122. package/dist/commands/layout-audit.browser.js +287 -23
  123. package/dist/{compare-6ZVA7JDY.js → compare-CG7ZLORR.js} +28 -28
  124. package/dist/{compiler-4WKTHUPH.js → compiler-5ZKASKDC.js} +3 -3
  125. package/dist/{component-CYXNZPHM.js → component-B4KAGJ6J.js} +3 -3
  126. package/dist/{compositions-Z53CMRFQ.js → compositions-U4KYWKZJ.js} +10 -10
  127. package/dist/{curve-ZLVHONKG.js → curve-VT2COPVD.js} +10 -10
  128. package/dist/{cuts-JGHDX4ND.js → cuts-6VEK5M4B.js} +11 -11
  129. package/dist/{delete-C6KCUXEV.js → delete-7C2IRPUB.js} +5 -5
  130. package/dist/{deploy-3W4FAFBU.js → deploy-3ICL7ZKT.js} +1 -1
  131. package/dist/{describeProject-NB7JQQRZ.js → describeProject-AYSN54IN.js} +7 -7
  132. package/dist/{diff-77IF7ZGC.js → diff-W4PY7MNM.js} +29 -29
  133. package/dist/{dist-LPVHFSCW.js → dist-5ITUK4AA.js} +5 -3
  134. package/dist/{dist-2MTQQEZT.js → dist-JSAOJXV4.js} +2 -2
  135. package/dist/{dist-PVM257OR.js → dist-KTTPEXT3.js} +9 -9
  136. package/dist/{doctor-7ARBZ2FZ.js → doctor-AWJLVONI.js} +10 -10
  137. package/dist/{energy-2I6O5IQY.js → energy-FEAXXITP.js} +11 -11
  138. package/dist/{events-MCXWDE3G.js → events-BEECDETU.js} +2 -2
  139. package/dist/{events-CG6ZFBPQ.js → events-PQ5Q44FC.js} +5 -5
  140. package/dist/{events-CXZTEW5W.js → events-UBP3QVVZ.js} +13 -13
  141. package/dist/{extract-NSSKZ7EO.js → extract-P3RDDMAN.js} +11 -11
  142. package/dist/{face-CZBXJIJD.js → face-CFGKOSS3.js} +11 -11
  143. package/dist/{feedback-3ZZQHXQA.js → feedback-BQONI5Z3.js} +8 -8
  144. package/dist/{ffmpeg-KOJQXOMH.js → ffmpeg-ZZ7LIQ5Z.js} +6 -6
  145. package/dist/{figma-T77MIMMN.js → figma-MCD4A356.js} +3 -3
  146. package/dist/fontLocalizeCli.js +9 -9
  147. package/dist/{frames-GMXMQ7DQ.js → frames-AZR3TRLH.js} +12 -12
  148. package/dist/{generate-PN2N6MQV.js → generate-K4EQAVJW.js} +21 -21
  149. package/dist/{get-AMP7GO2J.js → get-WJ3ELK7A.js} +5 -5
  150. package/dist/{gpuPolicy-336CZTOI.js → gpuPolicy-PUE7IADC.js} +6 -6
  151. package/dist/{grade-compare-XHR7XCIJ.js → grade-compare-GCFG242J.js} +29 -29
  152. package/dist/{heifImagePrep-GAATPFZJ.js → heifImagePrep-QXOU7MLY.js} +7 -7
  153. package/dist/{help-QLT7Q5CF.js → help-GT6ZDVJG.js} +1 -1
  154. package/dist/{history-IBK4ICX6.js → history-5IYTGJEF.js} +8 -8
  155. package/dist/hyperframe.manifest.json +1 -1
  156. package/dist/hyperframe.runtime.iife.js +74 -74
  157. package/dist/hyperframes-player.global.js +3 -3
  158. package/dist/{info-IF6TAH4N.js → info-5AJYESSM.js} +12 -12
  159. package/dist/{init-7TY3OJ6O.js → init-D6KHCFJY.js} +26 -26
  160. package/dist/{ink-PGZ7QSBH.js → ink-VIUT4ZGK.js} +11 -11
  161. package/dist/{inspect-LHLSKDYO.js → inspect-AOA5QC2L.js} +29 -29
  162. package/dist/{installer-DBTP7YGS.js → installer-OOGT5H33.js} +4 -4
  163. package/dist/{keyframes-4M4776JR.js → keyframes-RFOY5TRI.js} +8 -8
  164. package/dist/{lambda-FFMB6Y76.js → lambda-JR66KCP6.js} +10 -10
  165. package/dist/{layout-LJHS7HFD.js → layout-O22LQNQJ.js} +29 -29
  166. package/dist/{lint-2J5AVK6D.js → lint-FVSXPEHO.js} +22 -12
  167. package/dist/{lintProject-2OD4CDTW.js → lintProject-BC5ISNKQ.js} +1 -1
  168. package/dist/{list-MAYBNZEL.js → list-L4QR4ECB.js} +5 -5
  169. package/dist/{localPage-EKPNDJ27.js → localPage-LX46Y2RP.js} +6 -6
  170. package/dist/{login-CEU43XKU.js → login-YRUEKLVU.js} +4 -4
  171. package/dist/{look-IYTF5GLD.js → look-4KCFSE7J.js} +11 -11
  172. package/dist/{manager-DILAI3UF.js → manager-HTG3C2WE.js} +7 -7
  173. package/dist/{measure-2WZGYPYI.js → measure-Y2KDNWOG.js} +11 -11
  174. package/dist/{media-treatment-NEY3KFIE.js → media-treatment-2J5REU6B.js} +12 -12
  175. package/dist/{media-use-3RF5K7J2.js → media-use-7EN3JP2H.js} +3 -3
  176. package/dist/{models-JG3K3WHB.js → models-3IFIWCKT.js} +10 -10
  177. package/dist/{motionShot-BXTTHXNC.js → motionShot-RI2JVXVU.js} +15 -15
  178. package/dist/{normalize-audio-V42ORWPJ.js → normalize-audio-XTDN6XW6.js} +8 -8
  179. package/dist/{open-TIGOP4UL.js → open-ARUHNAB7.js} +66 -15
  180. package/dist/{parakeetRunner-ECBLSKPA.js → parakeetRunner-MSM7RDKF.js} +11 -11
  181. package/dist/{pipeline-NAQKFYVO.js → pipeline-VKX2BFB6.js} +9 -9
  182. package/dist/{play-OCUIRYGT.js → play-PJNNPV7X.js} +19 -19
  183. package/dist/{preflight-FXN2DIKX.js → preflight-MUXQH6H6.js} +7 -7
  184. package/dist/{present-EIPGUFX2.js → present-AN6MCW3Y.js} +15 -15
  185. package/dist/{preview-D3DGM36N.js → preview-DEHP2TG5.js} +53 -499
  186. package/dist/{probe-LHGNRPYJ.js → probe-5RG744XA.js} +11 -11
  187. package/dist/{producer-MUSGQJB5.js → producer-7VK2ZJDE.js} +1 -1
  188. package/dist/{projectConfig-5XHCXAR2.js → projectConfig-6DMINA23.js} +6 -6
  189. package/dist/{publication-YHI2M2PN.js → publication-6MWJAFT7.js} +2 -2
  190. package/dist/{publish-DD4ZAHEH.js → publish-KBNVXXGC.js} +10 -10
  191. package/dist/{remove-background-AJBLAXSV.js → remove-background-JEWUHSSD.js} +10 -10
  192. package/dist/{render-LCH7X3UA.js → render-35DBJ2WO.js} +31 -31
  193. package/dist/{render-AKGMPEQ4.js → render-W2U6ZT5X.js} +26 -26
  194. package/dist/{render-32BRUXZK.js → render-WH22EDR5.js} +5 -5
  195. package/dist/{render-batch-BGZ4XDDA.js → render-batch-XJOSN2BG.js} +5 -5
  196. package/dist/renderSetupWorker.js +1 -1
  197. package/dist/{resolver-M64IRWRP.js → resolver-5YYQABSN.js} +4 -4
  198. package/dist/{reverse-HLLQAI77.js → reverse-FRUVNAQG.js} +1 -1
  199. package/dist/{run-Q4IUMQIY.js → run-IQLZHH6D.js} +3 -3
  200. package/dist/{screenshotCapture-INHISXPC.js → screenshotCapture-Y6WBZRXS.js} +7 -7
  201. package/dist/{sherpa-MQLZFNTX.js → sherpa-LRHHYRRD.js} +10 -10
  202. package/dist/skills/hyperframes-cli/references/preview-render.md +1 -1
  203. package/dist/skills/media-use/audio/scripts/audio.mjs +56 -26
  204. package/dist/skills/media-use/audio/scripts/lib/media-record.mjs +3 -3
  205. package/dist/skills/media-use/audio/scripts/lib/media-record.test.mjs +16 -1
  206. package/dist/skills/media-use/audio/scripts/lib/recording.mjs +53 -0
  207. package/dist/skills/media-use/audio/scripts/lib/voice-credit.mjs +17 -0
  208. package/dist/skills/media-use/audio/scripts/lib/voice-credit.test.mjs +21 -0
  209. package/dist/skills/media-use/audio/scripts/recording.test.mjs +139 -0
  210. package/dist/skills/media-use/references/audio.md +2 -1
  211. package/dist/{skills-W4F5AJ2K.js → skills-NFCZFIGR.js} +8 -8
  212. package/dist/{skillsUpdateCheck-GVFHBX3G.js → skillsUpdateCheck-PUQNRKJ2.js} +3 -3
  213. package/dist/{snapshot-34FUMOEG.js → snapshot-EQRQLPXQ.js} +36 -36
  214. package/dist/{src-VL6XKFAA.js → src-HZHRJJAS.js} +5 -5
  215. package/dist/{src-M3NYEBA7.js → src-YNWNREO3.js} +8 -8
  216. package/dist/{start-A3YWCGDG.js → start-OP4X6HKK.js} +18 -18
  217. package/dist/{staticProjectServer-6NQWZP3Q.js → staticProjectServer-6LCOTXMA.js} +17 -17
  218. package/dist/{status-ZBUL7MPB.js → status-OWK4PE7Y.js} +10 -10
  219. package/dist/studio/assets/codec-DLDwVbqW.js +314 -0
  220. package/dist/studio/assets/{hyperframes-player-ZQZslutT.js → hyperframes-player-C5DA6O5u.js} +3 -3
  221. package/dist/studio/assets/index-B6RxZt-8.js +150 -0
  222. package/dist/studio/assets/{index-Bz2pYyGM.js → index-Buvugo_O.js} +120 -119
  223. package/dist/studio/assets/pausedVideoDecoder-BGKlQc66.js +1 -0
  224. package/dist/studio/index.html +1 -1
  225. package/dist/{studio-api-CIDVEQUP.js → studio-api-6BPBBFAW.js} +9 -9
  226. package/dist/{studioServer-4FEM4AAL.js → studioServer-74DN3L3H.js} +48 -48
  227. package/dist/{sync-PXQD6JNH.js → sync-F5W4JZJN.js} +11 -11
  228. package/dist/{telemetry-W7PZ4E2A.js → telemetry-WLMC4CPL.js} +5 -5
  229. package/dist/templates/_shared/AGENTS.md +3 -1
  230. package/dist/templates/_shared/CLAUDE.md +3 -1
  231. package/dist/{templates-ELZU33UU.js → templates-X5NWCSPC.js} +10 -10
  232. package/dist/{timeline-O7BR3IKC.js → timeline-RPV3BPTU.js} +17 -17
  233. package/dist/{tokens-RNFI6LFF.js → tokens-I5HMG733.js} +2 -2
  234. package/dist/{transcribe-GUUUSHHL.js → transcribe-37LMXM4R.js} +23 -23
  235. package/dist/{transcribe-XQOGYK6P.js → transcribe-JHJCPGIZ.js} +9 -9
  236. package/dist/{update-J37ZLNH7.js → update-Z4PHNKUH.js} +9 -9
  237. package/dist/{updateCheck-ALBUZ6YM.js → updateCheck-KROYCMVT.js} +2 -2
  238. package/dist/{upgrade-NVG73VIE.js → upgrade-RW57MLYT.js} +3 -3
  239. package/dist/{upload-HBALN6HE.js → upload-PEY7EYFV.js} +3 -2
  240. package/dist/{urlDownloader-TKEHDA5W.js → urlDownloader-HFKG567O.js} +5 -5
  241. package/dist/{validate-3TFHU3MJ.js → validate-PNLZ57YG.js} +23 -23
  242. package/dist/{video-PBNQGPQO.js → video-Y23QOZP7.js} +7 -7
  243. package/dist/{voices-PF7EV4O4.js → voices-TIGQHHMA.js} +19 -19
  244. package/dist/warmCheck.js +37 -37
  245. package/package.json +1 -1
  246. package/dist/chunk-7DS3STTY.js +0 -5035
  247. package/dist/studio/assets/index-Bn5atbhb.js +0 -531
@@ -13,13 +13,18 @@ import {
13
13
  import {
14
14
  formatLintStartupMessage
15
15
  } from "./chunk-B2RMMRJB.js";
16
+ import {
17
+ PreviewPortUnavailableError,
18
+ listBackgroundPreviewStatuses,
19
+ readBackgroundPreviewStatus,
20
+ startBackgroundPreview,
21
+ stopBackgroundPreview
22
+ } from "./chunk-FRBQYFUV.js";
16
23
  import {
17
24
  desktopHint,
18
25
  insideHostApp
19
- } from "./chunk-L6XUDQW6.js";
20
- import {
21
- windowsLocalAppData
22
- } from "./chunk-CXUT4XVT.js";
26
+ } from "./chunk-KEUNBZWA.js";
27
+ import "./chunk-CXUT4XVT.js";
23
28
  import {
24
29
  R,
25
30
  ge,
@@ -31,9 +36,8 @@ import {
31
36
  import {
32
37
  resolveProject,
33
38
  resolveProjectOrThrow
34
- } from "./chunk-XACDCHJF.js";
39
+ } from "./chunk-P7GVEHVM.js";
35
40
  import {
36
- MAX_PORT_SCAN,
37
41
  PreviewServerPortMismatchError,
38
42
  activeServerOnPort,
39
43
  closeServer,
@@ -44,24 +48,24 @@ import {
44
48
  import "./chunk-M3JU24AI.js";
45
49
  import {
46
50
  resolveLocalBrowserGpuMode
47
- } from "./chunk-76HDNQDL.js";
51
+ } from "./chunk-VBSTLL2I.js";
48
52
  import {
49
53
  resolveAutoProxy
50
- } from "./chunk-HCUEMQB4.js";
54
+ } from "./chunk-6OWZRBUW.js";
51
55
  import "./chunk-XT7X6QCP.js";
52
56
  import "./chunk-5YPMCCCA.js";
53
57
  import "./chunk-A4ZTSQLW.js";
54
58
  import "./chunk-HVW7ABXD.js";
55
- import "./chunk-YVFJWUSI.js";
59
+ import "./chunk-4YF5DHN5.js";
56
60
  import "./chunk-JHOCK3DG.js";
57
- import "./chunk-D3ZYDQMH.js";
58
- import "./chunk-S6MXHF7C.js";
61
+ import "./chunk-G7DS5B4U.js";
62
+ import "./chunk-LNE3SUVH.js";
59
63
  import "./chunk-AWDFDFI3.js";
60
64
  import "./chunk-P6LJ4Y32.js";
61
65
  import "./chunk-D3UCUI7G.js";
62
66
  import "./chunk-T2WJO4XM.js";
63
- import "./chunk-4EUUYYB3.js";
64
- import "./chunk-7DGAJ7RY.js";
67
+ import "./chunk-5H5DZTVW.js";
68
+ import "./chunk-B2XUJ5Q5.js";
65
69
  import "./chunk-PXVQOMKL.js";
66
70
  import "./chunk-MCDNAIFF.js";
67
71
  import "./chunk-LP7B3JLC.js";
@@ -74,35 +78,31 @@ import "./chunk-54HJ63Q2.js";
74
78
  import {
75
79
  c
76
80
  } from "./chunk-HOCC4J5C.js";
77
- import "./chunk-PGNE33QK.js";
81
+ import "./chunk-WD6Q4UXG.js";
78
82
  import "./chunk-Z5J67X44.js";
79
83
  import "./chunk-5S7W3TUO.js";
80
84
  import "./chunk-D3MUHMFG.js";
81
- import "./chunk-76IGIELW.js";
85
+ import "./chunk-QMD3FTBL.js";
82
86
  import "./chunk-YWRUQ7XZ.js";
83
87
  import "./chunk-3GXQPCJC.js";
84
- import "./chunk-SH6P5CMQ.js";
88
+ import "./chunk-L7ED3RE6.js";
85
89
  import "./chunk-FXMKHHPO.js";
86
- import "./chunk-7DS3STTY.js";
90
+ import "./chunk-H2PVMZ2M.js";
87
91
  import "./chunk-VC76R6W2.js";
88
92
  import "./chunk-OFQWTKPW.js";
89
93
  import "./chunk-RQVDTPGD.js";
90
94
  import {
91
- isProcessDescendant,
92
95
  killOrphanedProcesses,
93
- killProcessTree,
94
- processIdentity
96
+ killProcessTree
95
97
  } from "./chunk-PV4XID2A.js";
96
98
  import {
97
99
  runRenderSetupWorker
98
100
  } from "./chunk-X6JUUQCM.js";
99
- import {
100
- terminateProcessTree
101
- } from "./chunk-KGPLIH7B.js";
101
+ import "./chunk-KGPLIH7B.js";
102
102
  import "./chunk-LAGZGKKN.js";
103
103
  import "./chunk-K4MJX7SR.js";
104
104
  import "./chunk-WE42NVH7.js";
105
- import "./chunk-5WKW4P6P.js";
105
+ import "./chunk-LLUKDUVS.js";
106
106
  import "./chunk-WVRAFHJU.js";
107
107
  import "./chunk-HYRPH6LL.js";
108
108
  import "./chunk-FBN2M2HK.js";
@@ -114,9 +114,7 @@ import "./chunk-GWTIFRF5.js";
114
114
  import "./chunk-2RY2LWAA.js";
115
115
  import "./chunk-WC4MTXGN.js";
116
116
  import "./chunk-EPQC3FGZ.js";
117
- import {
118
- namedCacheDir
119
- } from "./chunk-JOQR4AP6.js";
117
+ import "./chunk-JOQR4AP6.js";
120
118
  import "./chunk-BR2JQQC5.js";
121
119
  import "./chunk-CMQZP52Y.js";
122
120
  import {
@@ -130,7 +128,7 @@ import {
130
128
  } from "./chunk-66W5IWLO.js";
131
129
  import "./chunk-FYZFURBN.js";
132
130
  import "./chunk-QBXDU24O.js";
133
- import "./chunk-XID37ELP.js";
131
+ import "./chunk-CNNU335R.js";
134
132
  import {
135
133
  normalizeErrorMessage
136
134
  } from "./chunk-E63BDV4Z.js";
@@ -141,8 +139,8 @@ import "./chunk-M2WBOQ2Q.js";
141
139
 
142
140
  // src/commands/preview.ts
143
141
  import { spawn } from "child_process";
144
- import { existsSync as existsSync2, lstatSync, mkdirSync as mkdirSync2, readlinkSync, symlinkSync, unlinkSync } from "fs";
145
- import { resolve as resolve2, dirname as dirname2, basename, join as join2 } from "path";
142
+ import { existsSync, lstatSync, mkdirSync, readlinkSync, symlinkSync, unlinkSync } from "fs";
143
+ import { resolve, dirname, basename, join } from "path";
146
144
  import { fileURLToPath } from "url";
147
145
  import { createRequire } from "module";
148
146
 
@@ -159,454 +157,6 @@ function studioProxyEnv(autoProxy, baseEnv = process.env, preview) {
159
157
  };
160
158
  }
161
159
 
162
- // src/commands/previewLifecycle.ts
163
- import { spawn as nodeSpawn } from "child_process";
164
- import { createHash } from "crypto";
165
- import {
166
- closeSync,
167
- existsSync,
168
- mkdirSync,
169
- openSync,
170
- readFileSync,
171
- readdirSync,
172
- renameSync,
173
- rmSync,
174
- writeFileSync
175
- } from "fs";
176
- import { devNull, homedir } from "os";
177
- import { dirname, join, resolve } from "path";
178
- import { stripVTControlCharacters } from "util";
179
- var PreviewPortUnavailableError = class extends Error {
180
- requestedPort;
181
- boundPort;
182
- constructor(requestedPort, boundPort) {
183
- super(
184
- `Port ${requestedPort} is already in use; the background preview would have started on port ${boundPort} instead. Free port ${requestedPort}, pick another --port, or omit --port to accept the next free port.`
185
- );
186
- this.name = "PreviewPortUnavailableError";
187
- this.requestedPort = requestedPort;
188
- this.boundPort = boundPort;
189
- }
190
- };
191
- function defaultStateHome() {
192
- return namedCacheDir("state") || process.env.XDG_STATE_HOME || windowsLocalAppData() || join(homedir(), ".local", "state");
193
- }
194
- function normalized(path) {
195
- const resolved = resolve(path).replace(/\\/g, "/");
196
- return process.platform === "win32" ? resolved.toLowerCase() : resolved;
197
- }
198
- function sessionDirectory(stateHome = defaultStateHome()) {
199
- return join(stateHome, "hyperframes", "previews");
200
- }
201
- function previewSessionPath(projectDir, stateHome = defaultStateHome()) {
202
- const key = createHash("sha256").update(normalized(projectDir)).digest("hex").slice(0, 16);
203
- return join(sessionDirectory(stateHome), `${key}.json`);
204
- }
205
- function previewLogPath(projectDir, stateHome = defaultStateHome()) {
206
- return previewSessionPath(projectDir, stateHome).replace(/\.json$/, ".log");
207
- }
208
- function writePreviewSession(session, stateHome = defaultStateHome()) {
209
- const path = previewSessionPath(session.projectDir, stateHome);
210
- mkdirSync(dirname(path), { recursive: true });
211
- const temporary = `${path}.${process.pid}.tmp`;
212
- try {
213
- writeFileSync(temporary, `${JSON.stringify(session, null, 2)}
214
- `, { mode: 384 });
215
- renameSync(temporary, path);
216
- } finally {
217
- rmSync(temporary, { force: true });
218
- }
219
- }
220
- function readPreviewSession(projectDir, stateHome = defaultStateHome()) {
221
- const path = previewSessionPath(projectDir, stateHome);
222
- if (!existsSync(path)) return null;
223
- try {
224
- const parsed = JSON.parse(readFileSync(path, "utf8"));
225
- if (!Number.isInteger(parsed.pid) || parsed.pid <= 0 || normalized(parsed.projectDir) !== normalized(projectDir)) {
226
- throw new Error("invalid preview session");
227
- }
228
- return parsed;
229
- } catch {
230
- rmSync(path, { force: true });
231
- return null;
232
- }
233
- }
234
- function hasValidPreviewProcess(session) {
235
- return Number.isInteger(session.pid) && session.pid > 0;
236
- }
237
- function hasValidPreviewEndpoint(session) {
238
- return Number.isInteger(session.port) && session.port > 0 && session.port <= 65535;
239
- }
240
- function matchesPreviewSessionFile(session, path, stateHome) {
241
- return typeof session.projectDir === "string" && typeof session.logPath === "string" && previewSessionPath(session.projectDir, stateHome) === path;
242
- }
243
- function readPreviewSessionFile(path, stateHome) {
244
- try {
245
- const parsed = JSON.parse(readFileSync(path, "utf8"));
246
- if (!hasValidPreviewProcess(parsed) || !hasValidPreviewEndpoint(parsed) || !matchesPreviewSessionFile(parsed, path, stateHome)) {
247
- throw new Error("invalid preview session");
248
- }
249
- return parsed;
250
- } catch {
251
- rmSync(path, { force: true });
252
- return null;
253
- }
254
- }
255
- function removePreviewSession(projectDir, stateHome = defaultStateHome()) {
256
- rmSync(previewSessionPath(projectDir, stateHome), { force: true });
257
- }
258
- function matchingServer(servers, projectDir, browserGpuMode) {
259
- return policyMatchingServers(servers, projectDir, browserGpuMode)[0] ?? null;
260
- }
261
- function policyMatchingServers(servers, projectDir, browserGpuMode) {
262
- return sameProjectServers(servers, projectDir).filter(
263
- (server) => browserGpuMode === void 0 || server.browserGpuMode === browserGpuMode
264
- );
265
- }
266
- function matchingServerAtPort(servers, projectDir, port) {
267
- return matchingServer(
268
- servers.filter((server) => server.port === port),
269
- projectDir
270
- );
271
- }
272
- function sameProjectServers(servers, projectDir) {
273
- const project = normalized(projectDir);
274
- return servers.filter((server) => normalized(server.projectDir) === project);
275
- }
276
- function sameProjectPorts(servers, projectDir) {
277
- return new Set(sameProjectServers(servers, projectDir).map((server) => server.port));
278
- }
279
- async function stopProcess(pid) {
280
- await terminateProcessTree(pid);
281
- }
282
- var delay = (ms) => new Promise((done) => setTimeout(done, ms));
283
- function openLog(logPath) {
284
- try {
285
- mkdirSync(dirname(logPath), { recursive: true });
286
- return openSync(logPath, "a", 384);
287
- } catch (error) {
288
- console.warn(
289
- `[hyperframes] background preview log not written: cannot open ${logPath} (${error})`
290
- );
291
- return openSync(devNull, "a");
292
- }
293
- }
294
- function spawnDetachedPreview(projectDir, stateHome, dependencies) {
295
- const logPath = previewLogPath(projectDir, stateHome);
296
- const logFd = openLog(logPath);
297
- const spawn2 = dependencies.spawn ?? nodeSpawn;
298
- let child;
299
- try {
300
- child = spawn2(
301
- dependencies.execPath ?? process.execPath,
302
- buildBackgroundPreviewArgs(dependencies.argv ?? process.argv.slice(1)),
303
- {
304
- detached: true,
305
- windowsHide: true,
306
- stdio: ["ignore", logFd, logFd],
307
- env: process.env
308
- }
309
- );
310
- } finally {
311
- closeSync(logFd);
312
- }
313
- if (!child.pid) throw new Error("background preview child did not report a PID");
314
- let exit = null;
315
- child.once?.("exit", (code, signal) => {
316
- exit = signal ? `signal ${signal}` : `exit code ${code}`;
317
- });
318
- child.unref();
319
- return {
320
- pid: child.pid,
321
- wrapperIdentity: (dependencies.identity ?? processIdentity)(child.pid) ?? void 0,
322
- logPath,
323
- exitedWith: () => exit
324
- };
325
- }
326
- function startedServer(servers, projectDir, preLaunchPorts, launchedPid, dependencies) {
327
- const isDescendant = dependencies.isDescendant ?? isProcessDescendant;
328
- const ours = (server) => {
329
- const pid = Number(server.pid);
330
- return pid === launchedPid || isDescendant(pid, launchedPid);
331
- };
332
- const candidates = servers.filter((server) => !preLaunchPorts.has(server.port) && ours(server));
333
- return matchingServer(candidates, projectDir, dependencies.browserGpuMode);
334
- }
335
- function buildBackgroundPreviewArgs(argv) {
336
- const filtered = argv.filter(
337
- (arg) => arg !== "--background" && !arg.startsWith("--background=") && arg !== "--foreground" && !arg.startsWith("--foreground=") && arg !== "--open" && arg !== "--no-open" && arg !== "--force-new" && arg !== "--json"
338
- );
339
- return [...filtered, "--foreground", "--no-open", "--force-new"];
340
- }
341
- function statusServer(servers, projectDir, saved, preferredPort) {
342
- const candidates = sameProjectServers(servers, projectDir);
343
- return candidates.find((server) => server.port === preferredPort) ?? candidates.find((server) => server.port === saved?.port) ?? candidates[0] ?? null;
344
- }
345
- function isCurrentPreviewWrapper(saved, dependencies) {
346
- return !!saved.wrapperIdentity && (dependencies.identity ?? processIdentity)(saved.pid) === saved.wrapperIdentity;
347
- }
348
- function managedStatusLogPath(server, saved, pid, dependencies) {
349
- if (!saved || saved.port !== server.port || server.pidSource !== "os") {
350
- return void 0;
351
- }
352
- if (!isCurrentPreviewWrapper(saved, dependencies)) {
353
- return void 0;
354
- }
355
- const isDescendant = dependencies.isDescendant ?? isProcessDescendant;
356
- return pid === saved.pid || isDescendant(pid, saved.pid) ? saved.logPath : void 0;
357
- }
358
- async function readBackgroundPreviewStatus(projectDir, startPort, dependencies = {}) {
359
- const { stateHome, saved, scanned } = await readPreviewLifecycleState(
360
- projectDir,
361
- startPort,
362
- dependencies
363
- );
364
- const server = statusServer(scanned, projectDir, saved, dependencies.preferredPort);
365
- if (server) {
366
- const listenerPid = Number(server.pid);
367
- const pid = Number.isInteger(listenerPid) && listenerPid > 0 ? listenerPid : null;
368
- const logPath = pid === null ? void 0 : managedStatusLogPath(server, saved, pid, dependencies);
369
- return {
370
- pid,
371
- port: server.port,
372
- projectDir: resolve(projectDir),
373
- ...logPath ? { logPath } : {}
374
- };
375
- }
376
- if (saved && wrapperProcessIsAlive(saved, dependencies)) return null;
377
- removePreviewSession(projectDir, stateHome);
378
- return null;
379
- }
380
- function processIsSignalable(pid) {
381
- try {
382
- process.kill(pid, 0);
383
- return true;
384
- } catch (error) {
385
- return error?.code === "EPERM";
386
- }
387
- }
388
- function wrapperProcessIsAlive(saved, dependencies) {
389
- if (!saved.wrapperIdentity) return false;
390
- const signalable = dependencies.isSignalable ?? processIsSignalable;
391
- if (!signalable(saved.pid)) return false;
392
- const identity = (dependencies.identity ?? processIdentity)(saved.pid);
393
- if (identity === null) return true;
394
- return identity === saved.wrapperIdentity;
395
- }
396
- async function listBackgroundPreviewStatuses(dependencies = {}) {
397
- const stateHome = dependencies.stateHome ?? defaultStateHome();
398
- const directory = sessionDirectory(stateHome);
399
- let files;
400
- try {
401
- files = readdirSync(directory).filter((name) => name.endsWith(".json")).map((name) => join(directory, name));
402
- } catch {
403
- return [];
404
- }
405
- const saved = files.map((path) => readPreviewSessionFile(path, stateHome)).filter((session) => session !== null);
406
- const statuses = await Promise.all(
407
- saved.map(
408
- (session) => readBackgroundPreviewStatus(session.projectDir, session.port, {
409
- ...dependencies,
410
- stateHome
411
- })
412
- )
413
- );
414
- return statuses.filter((status) => status !== null);
415
- }
416
- function readyPreviewSession(server, pid, wrapperIdentity, projectDir, logPath, dependencies) {
417
- const identity = wrapperIdentity ?? (dependencies.identity ?? processIdentity)(pid) ?? void 0;
418
- const liveServerPid = Number(server.pid);
419
- return {
420
- session: {
421
- pid,
422
- wrapperIdentity: identity,
423
- port: server.port,
424
- projectDir: resolve(projectDir),
425
- logPath
426
- },
427
- publicPid: Number.isInteger(liveServerPid) && liveServerPid > 0 ? liveServerPid : pid
428
- };
429
- }
430
- function ownedStopTargetPid(saved, liveServerPid, dependencies) {
431
- if (!saved?.wrapperIdentity) return liveServerPid;
432
- const identity = dependencies.identity ?? processIdentity;
433
- if (identity(saved.pid) !== saved.wrapperIdentity) return liveServerPid;
434
- if (saved.pid === liveServerPid) return saved.pid;
435
- const isDescendant = dependencies.isDescendant ?? isProcessDescendant;
436
- return isDescendant(liveServerPid, saved.pid) ? saved.pid : liveServerPid;
437
- }
438
- async function stopOwnedPreviewBeforeReplacement(owned, projectDir, dependencies) {
439
- if (!owned) return;
440
- await stopBackgroundPreview(projectDir, owned.port, dependencies);
441
- }
442
- function savedOwnedPreview(servers, saved, projectDir) {
443
- if (!saved) return null;
444
- const savedPortServers = servers.filter((server) => server.port === saved.port);
445
- return matchingServer(savedPortServers, projectDir);
446
- }
447
- function isPortInScanRange(port, scanStart) {
448
- return port >= scanStart && port < scanStart + MAX_PORT_SCAN;
449
- }
450
- async function addSavedPortServer(scanned, savedPort, scanStart, dependencies) {
451
- if (savedPort === void 0 || isPortInScanRange(savedPort, scanStart)) return;
452
- const server = await (dependencies.probe ?? activeServerOnPort)(savedPort);
453
- if (server) scanned.push(server);
454
- }
455
- async function readPreviewLifecycleState(projectDir, startPort, dependencies) {
456
- const scan = dependencies.scan ?? scanActiveServers;
457
- const stateHome = dependencies.stateHome ?? defaultStateHome();
458
- const saved = readPreviewSession(projectDir, stateHome);
459
- const scanStart = dependencies.preferredPort ?? saved?.port ?? startPort;
460
- const scanned = await scan(scanStart);
461
- await addSavedPortServer(scanned, saved?.port, scanStart, dependencies);
462
- return { scan, stateHome, saved, scanned };
463
- }
464
- function unmetPreferredPort(port, preferredPort) {
465
- return preferredPort !== void 0 && port !== preferredPort ? preferredPort : void 0;
466
- }
467
- function reuseExistingPreview(reusableExisting, candidates, dependencies) {
468
- if (!reusableExisting || dependencies.forceNew) return null;
469
- const unmet = unmetPreferredPort(reusableExisting.port, dependencies.preferredPort);
470
- if (unmet !== void 0) {
471
- throw new PreviewServerPortMismatchError(
472
- unmet,
473
- candidates,
474
- ` To start one on port ${unmet} instead, add --force-new or run --stop first.`
475
- );
476
- }
477
- return {
478
- type: "reused",
479
- port: reusableExisting.port,
480
- pid: reusableExisting.pid ? Number(reusableExisting.pid) : null,
481
- logPath: null
482
- };
483
- }
484
- async function startBackgroundPreview(projectDir, startPort, dependencies = {}) {
485
- const launchStart = dependencies.preferredPort ?? startPort;
486
- const { scan, stateHome, saved, scanned } = await readPreviewLifecycleState(
487
- projectDir,
488
- startPort,
489
- dependencies
490
- );
491
- const candidates = policyMatchingServers(scanned, projectDir, dependencies.browserGpuMode);
492
- const onPreferredPort = candidates.find((server2) => server2.port === dependencies.preferredPort) ?? null;
493
- const requestedExisting = candidates[0] ?? null;
494
- const ownedExisting = savedOwnedPreview(scanned, saved, projectDir);
495
- const reusableOwned = ownedExisting ? matchingServer([ownedExisting], projectDir, dependencies.browserGpuMode) : null;
496
- const reusableExisting = onPreferredPort ?? reusableOwned ?? (ownedExisting ? null : requestedExisting);
497
- const reused = reuseExistingPreview(reusableExisting, candidates, dependencies);
498
- if (reused) return reused;
499
- await stopOwnedPreviewBeforeReplacement(ownedExisting, projectDir, dependencies);
500
- const preLaunchPorts = sameProjectPorts(await scan(launchStart), projectDir);
501
- const { pid, wrapperIdentity, logPath, exitedWith } = spawnDetachedPreview(
502
- projectDir,
503
- stateHome,
504
- dependencies
505
- );
506
- const kill = dependencies.kill ?? stopProcess;
507
- const server = await awaitStartedServer(
508
- projectDir,
509
- launchStart,
510
- preLaunchPorts,
511
- pid,
512
- exitedWith,
513
- dependencies
514
- );
515
- if (!server) {
516
- const exit = exitedWith();
517
- if (exit) {
518
- throw new Error(
519
- `background preview exited (${exit}) before it was ready; see ${logPath}${logTail(logPath)}`
520
- );
521
- }
522
- await kill(pid);
523
- throw new Error(`background preview did not become ready; see ${logPath}`);
524
- }
525
- const unmet = unmetPreferredPort(server.port, dependencies.preferredPort);
526
- if (unmet !== void 0) {
527
- await kill(pid);
528
- if (!await awaitServerGone(projectDir, server.port, dependencies)) {
529
- throw new Error(
530
- `background preview on port ${server.port} did not stop after failing to bind port ${unmet}; see ${logPath}`
531
- );
532
- }
533
- throw new PreviewPortUnavailableError(unmet, server.port);
534
- }
535
- const ready = readyPreviewSession(
536
- server,
537
- pid,
538
- wrapperIdentity,
539
- projectDir,
540
- logPath,
541
- dependencies
542
- );
543
- writePreviewSession(ready.session, stateHome);
544
- return {
545
- type: "started",
546
- ...ready.session,
547
- pid: ready.publicPid
548
- };
549
- }
550
- function logTail(logPath) {
551
- try {
552
- const text = stripVTControlCharacters(readFileSync(logPath, "utf8"));
553
- const lines = text.trimEnd().split("\n").slice(-5);
554
- return lines.join("").trim() ? `
555
- ${lines.join("\n")}` : "";
556
- } catch {
557
- return "";
558
- }
559
- }
560
- async function awaitStartedServer(projectDir, startPort, preLaunchPorts, launchedPid, exitedWith, dependencies) {
561
- const scan = dependencies.scan ?? scanActiveServers;
562
- const sleep = dependencies.sleep ?? delay;
563
- for (let attempt = 0; attempt < 50 && !exitedWith(); attempt++) {
564
- const server = startedServer(
565
- await scan(startPort),
566
- projectDir,
567
- preLaunchPorts,
568
- launchedPid,
569
- dependencies
570
- );
571
- if (server) return server;
572
- await sleep(200);
573
- }
574
- return null;
575
- }
576
- async function stopBackgroundPreview(projectDir, startPort, dependencies = {}) {
577
- const stateHome = dependencies.stateHome ?? defaultStateHome();
578
- const saved = readPreviewSession(projectDir, stateHome);
579
- const scan = dependencies.scan ?? scanActiveServers;
580
- const server = saved ? await probeMatchingServerAtPort(projectDir, saved.port, dependencies) : matchingServer(await scan(dependencies.preferredPort ?? startPort), projectDir);
581
- if (!server) {
582
- removePreviewSession(projectDir, stateHome);
583
- return false;
584
- }
585
- const pid = Number(server.pid);
586
- if (!Number.isInteger(pid) || pid <= 0) {
587
- throw new Error(`preview ownership could not be proven for ${resolve(projectDir)}`);
588
- }
589
- const kill = dependencies.kill ?? stopProcess;
590
- await kill(ownedStopTargetPid(saved, pid, dependencies));
591
- if (!await awaitServerGone(projectDir, server.port, dependencies)) {
592
- throw new Error(`background preview did not stop for ${resolve(projectDir)}`);
593
- }
594
- removePreviewSession(projectDir, stateHome);
595
- return true;
596
- }
597
- async function probeMatchingServerAtPort(projectDir, port, dependencies) {
598
- const server = await (dependencies.probe ?? activeServerOnPort)(port);
599
- return matchingServerAtPort(server ? [server] : [], projectDir, port);
600
- }
601
- async function awaitServerGone(projectDir, port, dependencies) {
602
- const sleep = dependencies.sleep ?? delay;
603
- for (let attempt = 0; attempt < 25; attempt++) {
604
- if (!await probeMatchingServerAtPort(projectDir, port, dependencies)) return true;
605
- await sleep(100);
606
- }
607
- return false;
608
- }
609
-
610
160
  // src/commands/previewLifecycleOutput.ts
611
161
  function lifecyclePayload(operation, result) {
612
162
  return { schemaVersion: 1, operation, ok: true, result };
@@ -869,6 +419,7 @@ var preview_default = defineCommand({
869
419
  return;
870
420
  }
871
421
  printStudioSummary(project2.name, previewBaseUrl(status.port), project2.dir, {
422
+ preview: status.logPath ? "background" : "foreground",
872
423
  details: [
873
424
  `${status.logPath ? "Background preview" : "Preview"} running${status.pid === null ? "" : ` (PID ${status.pid})`}.`,
874
425
  ...status.logPath ? [`Log: ${status.logPath}`] : []
@@ -1029,6 +580,7 @@ var preview_default = defineCommand({
1029
580
  } else {
1030
581
  ge(c.bold("hyperframes preview"));
1031
582
  printStudioSummary(projectName, url, dir, {
583
+ preview: "background",
1032
584
  details: [
1033
585
  background.type === "reused" ? "Reusing the background server already running for this project." : `Running in the background. Log: ${background.logPath}`,
1034
586
  "Changes reload automatically in the studio."
@@ -1158,11 +710,11 @@ async function handlePreviewList(startPort, json, dependencies = {}) {
1158
710
  ]);
1159
711
  const listedSessions = managedSessions.filter(
1160
712
  (session) => session.pid !== null || !scannedServers.some(
1161
- (server) => publicPreviewPid(server.pid, null) !== null && server.port === session.port && resolve2(server.projectDir) === resolve2(session.projectDir)
713
+ (server) => publicPreviewPid(server.pid, null) !== null && server.port === session.port && resolve(server.projectDir) === resolve(session.projectDir)
1162
714
  )
1163
715
  );
1164
716
  const managedKeys = new Set(
1165
- listedSessions.map((session) => `${resolve2(session.projectDir)}\0${session.port}`)
717
+ listedSessions.map((session) => `${resolve(session.projectDir)}\0${session.port}`)
1166
718
  );
1167
719
  const servers = [
1168
720
  ...listedSessions.map((session) => ({
@@ -1174,7 +726,7 @@ async function handlePreviewList(startPort, json, dependencies = {}) {
1174
726
  pid: session.pid === null ? null : String(session.pid)
1175
727
  })),
1176
728
  ...scannedServers.filter(
1177
- (server) => !managedKeys.has(`${resolve2(server.projectDir)}\0${server.port}`)
729
+ (server) => !managedKeys.has(`${resolve(server.projectDir)}\0${server.port}`)
1178
730
  )
1179
731
  ];
1180
732
  if (json) {
@@ -1620,7 +1172,7 @@ function printStudioSummary(projectName, serverUrl, projectDir, opts = {}) {
1620
1172
  console.log(` ${c.dim("Project")} ${c.accent(projectName)}`);
1621
1173
  console.log(` ${c.dim("Studio")} ${c.accent(urls.studioUrl)}`);
1622
1174
  console.log(` ${c.dim("Server")} ${c.accent(urls.serverUrl)}`);
1623
- const hint = desktopHint(projectDir);
1175
+ const hint = desktopHint(projectDir, { preview: opts.preview });
1624
1176
  if (hint) console.log(` ${c.dim("Desktop")} ${hint}`);
1625
1177
  console.log();
1626
1178
  for (const detail of opts.details ?? []) {
@@ -1631,20 +1183,20 @@ function printStudioSummary(projectName, serverUrl, projectDir, opts = {}) {
1631
1183
  console.log();
1632
1184
  }
1633
1185
  function linkProjectIntoStudioData(dir, projectsDir, projectName) {
1634
- const symlinkPath = join2(projectsDir, projectName);
1635
- mkdirSync2(projectsDir, { recursive: true });
1186
+ const symlinkPath = join(projectsDir, projectName);
1187
+ mkdirSync(projectsDir, { recursive: true });
1636
1188
  let createdSymlink = false;
1637
1189
  if (dir !== symlinkPath) {
1638
- if (existsSync2(symlinkPath)) {
1190
+ if (existsSync(symlinkPath)) {
1639
1191
  try {
1640
1192
  const stat = lstatSync(symlinkPath);
1641
- if (stat.isSymbolicLink() && resolve2(readlinkSync(symlinkPath)) !== resolve2(dir)) {
1193
+ if (stat.isSymbolicLink() && resolve(readlinkSync(symlinkPath)) !== resolve(dir)) {
1642
1194
  unlinkSync(symlinkPath);
1643
1195
  }
1644
1196
  } catch {
1645
1197
  }
1646
1198
  }
1647
- if (!existsSync2(symlinkPath)) {
1199
+ if (!existsSync(symlinkPath)) {
1648
1200
  symlinkSync(dir, symlinkPath, process.platform === "win32" ? "junction" : "dir");
1649
1201
  createdSymlink = true;
1650
1202
  }
@@ -1655,7 +1207,7 @@ function removeSymlinkOnExit(createdSymlink, symlinkPath) {
1655
1207
  if (!createdSymlink) return;
1656
1208
  process.on("exit", () => {
1657
1209
  try {
1658
- if (existsSync2(symlinkPath)) unlinkSync(symlinkPath);
1210
+ if (existsSync(symlinkPath)) unlinkSync(symlinkPath);
1659
1211
  } catch {
1660
1212
  }
1661
1213
  });
@@ -1692,6 +1244,7 @@ function attachStudioReadyHandler(child, spinner2, projectName, projectDir, opti
1692
1244
  } else {
1693
1245
  spinner2.stop(c.success("Studio running"));
1694
1246
  printStudioSummary(projectName, url, projectDir, {
1247
+ preview: "foreground",
1695
1248
  footer: "Press Ctrl+C to stop"
1696
1249
  });
1697
1250
  }
@@ -1721,14 +1274,14 @@ function reportPreviewShutdown(json) {
1721
1274
  }
1722
1275
  async function runDevMode(dir, options) {
1723
1276
  const thisFile = fileURLToPath(import.meta.url);
1724
- const repoRoot = resolve2(dirname2(thisFile), "..", "..", "..", "..");
1725
- const projectsDir = join2(repoRoot, "packages", "studio", "data", "projects");
1277
+ const repoRoot = resolve(dirname(thisFile), "..", "..", "..", "..");
1278
+ const projectsDir = join(repoRoot, "packages", "studio", "data", "projects");
1726
1279
  const pName = options?.projectName ?? basename(dir);
1727
1280
  const { symlinkPath, createdSymlink } = linkProjectIntoStudioData(dir, projectsDir, pName);
1728
1281
  if (!options?.json) ge(c.bold("hyperframes preview"));
1729
1282
  const s = spinner();
1730
1283
  if (!options?.json) s.start("Starting studio...");
1731
- const studioPkgDir = join2(repoRoot, "packages", "studio");
1284
+ const studioPkgDir = join(repoRoot, "packages", "studio");
1732
1285
  const child = spawn("bun", ["run", "dev", "--", ...previewViteArgs(options?.port)], {
1733
1286
  cwd: studioPkgDir,
1734
1287
  stdio: ["ignore", "pipe", "pipe"],
@@ -1745,18 +1298,18 @@ async function runDevMode(dir, options) {
1745
1298
  }
1746
1299
  function hasLocalStudio(dir) {
1747
1300
  try {
1748
- const req = createRequire(join2(dir, "package.json"));
1749
- const studioPkgPath = dirname2(req.resolve("@hyperframes/studio/package.json"));
1750
- return existsSync2(join2(studioPkgPath, "vite.config.ts"));
1301
+ const req = createRequire(join(dir, "package.json"));
1302
+ const studioPkgPath = dirname(req.resolve("@hyperframes/studio/package.json"));
1303
+ return existsSync(join(studioPkgPath, "vite.config.ts"));
1751
1304
  } catch {
1752
1305
  return false;
1753
1306
  }
1754
1307
  }
1755
1308
  async function runLocalStudioMode(dir, options) {
1756
- const req = createRequire(join2(dir, "package.json"));
1757
- const studioPkgPath = dirname2(req.resolve("@hyperframes/studio/package.json"));
1309
+ const req = createRequire(join(dir, "package.json"));
1310
+ const studioPkgPath = dirname(req.resolve("@hyperframes/studio/package.json"));
1758
1311
  const pName = options?.projectName ?? basename(dir);
1759
- const projectsDir = join2(studioPkgPath, "data", "projects");
1312
+ const projectsDir = join(studioPkgPath, "data", "projects");
1760
1313
  const { symlinkPath, createdSymlink } = linkProjectIntoStudioData(dir, projectsDir, pName);
1761
1314
  if (!options?.json) ge(c.bold("hyperframes preview") + c.dim(" (local studio)"));
1762
1315
  const s = spinner();
@@ -1777,7 +1330,7 @@ async function runLocalStudioMode(dir, options) {
1777
1330
  return waitForStudioChildClose(child);
1778
1331
  }
1779
1332
  async function runEmbeddedMode(dir, startPort, options) {
1780
- const { createStudioServer, loadPreviewServerBuildSignature, resolveStudioBundle } = await import("./studioServer-4FEM4AAL.js");
1333
+ const { createStudioServer, loadPreviewServerBuildSignature, resolveStudioBundle } = await import("./studioServer-74DN3L3H.js");
1781
1334
  const pName = options?.projectName ?? basename(dir);
1782
1335
  const studioBundle = resolveStudioBundle();
1783
1336
  if (!options?.json) ge(c.bold("hyperframes preview"));
@@ -1874,6 +1427,7 @@ async function runEmbeddedMode(dir, startPort, options) {
1874
1427
  console.log();
1875
1428
  }
1876
1429
  printStudioSummary(pName, url, dir, {
1430
+ preview: "foreground",
1877
1431
  details: [
1878
1432
  "Edit with your AI agent \u2014 it has HyperFrames skills installed.",
1879
1433
  "Changes reload automatically in the studio."
@@ -1910,7 +1464,7 @@ async function runEmbeddedMode(dir, startPort, options) {
1910
1464
  };
1911
1465
  process.on("SIGINT", shutdown);
1912
1466
  process.on("SIGTERM", shutdown);
1913
- import("./src-VL6XKFAA.js").then(({ killTrackedProcesses }) => {
1467
+ import("./src-HZHRJJAS.js").then(({ killTrackedProcesses }) => {
1914
1468
  process.once("exit", () => {
1915
1469
  if (!shuttingDown) killTrackedProcesses();
1916
1470
  });