hyperframes 0.9.28-alpha.1 → 0.9.29

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 (265) hide show
  1. package/README.md +5 -2
  2. package/dist/{add-YDZMFKR3.js → add-BRXFSBYO.js} +14 -14
  3. package/dist/{agentPromptGenerator-AUXZZCIG.js → agentPromptGenerator-NJL6ZJQA.js} +7 -7
  4. package/dist/{animatedGifPrep-2DYVIBA4.js → animatedGifPrep-AVZAMI2D.js} +7 -7
  5. package/dist/api.js +38 -39
  6. package/dist/{asset-JHM3VF72.js → asset-FEAC2U74.js} +2 -2
  7. package/dist/{assetCataloger-2OB46SVM.js → assetCataloger-WGNEAI5A.js} +8 -8
  8. package/dist/{audio-T6YSLT2D.js → audio-PBKCPYW2.js} +24 -25
  9. package/dist/{auth-YSTRUKED.js → auth-IPHKPGNV.js} +4 -4
  10. package/dist/{autoUpdate-VYRYBZG6.js → autoUpdate-4HUTYRYX.js} +3 -3
  11. package/dist/{avatars-UU53IDAK.js → avatars-U2XLC3OS.js} +15 -16
  12. package/dist/{backgroundChecks-FNACAOZD.js → backgroundChecks-4Q4R56DT.js} +4 -4
  13. package/dist/backgroundChecksWorker.js +4 -4
  14. package/dist/{batchRender-KWIPFU5Q.js → batchRender-AL6DO5IA.js} +4 -4
  15. package/dist/{beats-X2LCSMYD.js → beats-VS4P6KKZ.js} +11 -11
  16. package/dist/{benchmark-4OB6M2FR.js → benchmark-MGDPACXB.js} +11 -11
  17. package/dist/{billing-DC6ODLSG.js → billing-JLASHFQM.js} +15 -16
  18. package/dist/{browser-PUJD4WCC.js → browser-FU4TZSMT.js} +8 -8
  19. package/dist/{bundleWithLocalizedFonts-7HQEKW2H.js → bundleWithLocalizedFonts-B2XFORNZ.js} +1 -1
  20. package/dist/{capture-IGQR6HTG.js → capture-CFESIHJR.js} +22 -22
  21. package/dist/{capture-PUB5WBLQ.js → capture-LL7WE2S7.js} +3 -3
  22. package/dist/{captureCompositionFrame-JT6HGVU7.js → captureCompositionFrame-DABFEOQO.js} +14 -14
  23. package/dist/{catalog-5NC5EV6Z.js → catalog-U6CHLXTI.js} +14 -14
  24. package/dist/{catch-up-6RJNWB5I.js → catch-up-DMREF334.js} +9 -9
  25. package/dist/{check-FXZOPV3Y.js → check-ILJC6WYD.js} +45 -44
  26. package/dist/{checkAudio-VSHZXO4J.js → checkAudio-MWSP2436.js} +15 -15
  27. package/dist/{checkBrowser-EOSAXIHJ.js → checkBrowser-HC3LYH6H.js} +38 -38
  28. package/dist/{chunk-W3XARNFW.js → chunk-2YZ6GA4E.js} +1 -1
  29. package/dist/{chunk-XGRXNWDK.js → chunk-3JFV42QB.js} +3 -3
  30. package/dist/{chunk-4J2J57RS.js → chunk-42MHKDVP.js} +3 -3
  31. package/dist/{chunk-UYVQDKGC.js → chunk-47JZ2UQC.js} +1 -1
  32. package/dist/{chunk-QTDTCTGB.js → chunk-4N3UVDIJ.js} +4 -6
  33. package/dist/{chunk-R6PUBUA4.js → chunk-4TCEF2I7.js} +1 -1
  34. package/dist/{chunk-C6S2NYQ4.js → chunk-4TPTB6PY.js} +4 -4
  35. package/dist/{chunk-6UJOLK4G.js → chunk-5QGDLMU3.js} +2 -2
  36. package/dist/{chunk-QB2USW3R.js → chunk-5RLMHG3E.js} +1 -1
  37. package/dist/{chunk-ME6L6GUF.js → chunk-6FHIR4KD.js} +1 -1
  38. package/dist/{chunk-2Q3Y7CI3.js → chunk-6JAB5BHX.js} +7 -7
  39. package/dist/{chunk-BP75ZLZ5.js → chunk-6LCIO2YY.js} +2 -2
  40. package/dist/chunk-72LMHSPL.js +29 -0
  41. package/dist/{chunk-FF25S7ZC.js → chunk-74PW4UVC.js} +1 -1
  42. package/dist/{chunk-44LVKFXU.js → chunk-76MHB2H6.js} +1 -1
  43. package/dist/{chunk-GTZVTATR.js → chunk-77B6C7CU.js} +2 -2
  44. package/dist/{chunk-XHP3V4WH.js → chunk-7GJKUOPX.js} +31 -20
  45. package/dist/{chunk-3BWFZFJK.js → chunk-7TION72L.js} +18 -18
  46. package/dist/{chunk-HPR2BPFS.js → chunk-AOPNJEQC.js} +2 -2
  47. package/dist/{chunk-MEVLYDL2.js → chunk-BJYCLZBQ.js} +1 -1
  48. package/dist/{chunk-TYPFNWE6.js → chunk-BX2BIU6Z.js} +1 -1
  49. package/dist/{chunk-SXGLW3OW.js → chunk-BYJEUZNT.js} +3 -3
  50. package/dist/{chunk-W4DMQZL5.js → chunk-BZULWFMJ.js} +11 -2
  51. package/dist/{chunk-YSIDK3VE.js → chunk-C25RSEQN.js} +12 -12
  52. package/dist/{chunk-CHCMXYER.js → chunk-C5JKRCSG.js} +1 -1
  53. package/dist/{chunk-VSQ5NWCF.js → chunk-DJVSNDF3.js} +3 -3
  54. package/dist/{chunk-N5TVFPYQ.js → chunk-DYKBB5HB.js} +1 -1
  55. package/dist/{chunk-IADGTP5X.js → chunk-EIVSIGS2.js} +3 -3
  56. package/dist/{chunk-3T6BFAKZ.js → chunk-F24B2PLD.js} +1 -1
  57. package/dist/{chunk-XLX7TDCI.js → chunk-FJPHKCWU.js} +17 -17
  58. package/dist/{chunk-CE765XG3.js → chunk-FNC3JNO7.js} +1 -1
  59. package/dist/{chunk-BF6RWOUF.js → chunk-FXPDWYD7.js} +100 -50
  60. package/dist/{chunk-SCPMSSQW.js → chunk-GGDJLN5I.js} +0 -20
  61. package/dist/{chunk-GNG7XNUY.js → chunk-GISQ7VOP.js} +15 -15
  62. package/dist/{chunk-VYEPG2N6.js → chunk-GQNV4DG6.js} +1 -1
  63. package/dist/{chunk-4XGKXBYH.js → chunk-GTUTZIRR.js} +22 -4
  64. package/dist/{chunk-63PVDQ6R.js → chunk-H5BHEZ4B.js} +2 -2
  65. package/dist/{chunk-OPGYOHU6.js → chunk-HCC7XLD7.js} +2 -2
  66. package/dist/{chunk-5YDJTVOQ.js → chunk-HLRYLZFX.js} +2 -2
  67. package/dist/{chunk-AAENGP3S.js → chunk-IOPIOX5K.js} +66 -16
  68. package/dist/{chunk-WYA575QX.js → chunk-IQKMIYLG.js} +5 -7
  69. package/dist/{chunk-XFE4R6I4.js → chunk-ITWIFUDS.js} +1 -1
  70. package/dist/{chunk-HW325JBH.js → chunk-IX3K55NA.js} +4 -4
  71. package/dist/{chunk-3OKVZXTH.js → chunk-IXMO4RXK.js} +2 -2
  72. package/dist/{chunk-WIJGRX5X.js → chunk-IYYZMZD2.js} +1 -1
  73. package/dist/{chunk-NVNKKVDH.js → chunk-J7PDBGQM.js} +2 -2
  74. package/dist/{chunk-4OZVFZCO.js → chunk-JLUOG6S2.js} +1 -1
  75. package/dist/{chunk-QKAXPYTV.js → chunk-JVAD6LD7.js} +38 -21
  76. package/dist/{chunk-6ODX6SHY.js → chunk-L2GOO2UY.js} +2 -2
  77. package/dist/{chunk-OJ5HAKL6.js → chunk-L6OXEDJQ.js} +7 -7
  78. package/dist/{chunk-CG65CRMP.js → chunk-LDTJCZZ2.js} +2 -2
  79. package/dist/{chunk-AHRX3FHF.js → chunk-LMCFILEY.js} +3 -3
  80. package/dist/{chunk-FID757D3.js → chunk-LP7B3JLC.js} +0 -1
  81. package/dist/{chunk-WXEXQLVV.js → chunk-M457GQGR.js} +344 -216
  82. package/dist/{chunk-TLVXCOMV.js → chunk-MKZ34726.js} +2 -2
  83. package/dist/{chunk-O2JZ6C3S.js → chunk-MTJ46TG7.js} +7 -7
  84. package/dist/{chunk-7U2B7OF6.js → chunk-MVJ7AX6W.js} +1 -1
  85. package/dist/{chunk-3MYEF34S.js → chunk-NFUXYBOR.js} +1 -1
  86. package/dist/{chunk-RERVXE6J.js → chunk-NHJ5YUBZ.js} +2 -2
  87. package/dist/{chunk-YFDCU6X5.js → chunk-NSQLSL42.js} +6 -6
  88. package/dist/{chunk-KJ5QBEMN.js → chunk-NURN5W6M.js} +6 -8
  89. package/dist/{chunk-WCPH2JRB.js → chunk-NXFUEPWT.js} +35 -21
  90. package/dist/{chunk-ALCP5OEW.js → chunk-NZUUKNNZ.js} +1 -1
  91. package/dist/{chunk-IMSLXLUI.js → chunk-OSDNRYQJ.js} +1 -1
  92. package/dist/{chunk-36G3XDN6.js → chunk-OY4YSQBK.js} +2 -2
  93. package/dist/{chunk-XOON4QRF.js → chunk-PGZSYDLZ.js} +1 -1
  94. package/dist/{chunk-5ROYFGQT.js → chunk-PVRJKEU5.js} +1 -1
  95. package/dist/{chunk-STTUDVAI.js → chunk-Q7FX7HOX.js} +1 -1
  96. package/dist/{chunk-KCRVZA7B.js → chunk-QBRBXVCE.js} +1 -1
  97. package/dist/{chunk-NHRLZESZ.js → chunk-RYFVUPXH.js} +1 -1
  98. package/dist/{chunk-Q6TVZY36.js → chunk-RYT22J4V.js} +2 -2
  99. package/dist/{chunk-J5CDV66Q.js → chunk-RZK5ZGVX.js} +4 -4
  100. package/dist/{chunk-MPC3L6A3.js → chunk-S3S3IHCR.js} +1 -1
  101. package/dist/chunk-SBYFFP7R.js +413 -0
  102. package/dist/{chunk-WOSVLHQH.js → chunk-SCNC7YPB.js} +1 -1
  103. package/dist/{chunk-7GZ4E5ID.js → chunk-SCUKEERJ.js} +4 -4
  104. package/dist/{chunk-WFO2PDZD.js → chunk-SS7OEJGR.js} +35 -18
  105. package/dist/{chunk-TF7VWCJM.js → chunk-TCQKCUDA.js} +1 -1
  106. package/dist/{chunk-JX4BEVC3.js → chunk-TIWO5QKS.js} +66 -52
  107. package/dist/{chunk-6RHKGQRA.js → chunk-TM5H5ZY3.js} +2 -2
  108. package/dist/{chunk-AJVYQVDB.js → chunk-U5RXCKWJ.js} +1 -1
  109. package/dist/{chunk-GVBAVADJ.js → chunk-UCCD6SY7.js} +1 -1
  110. package/dist/{chunk-LSSUDIEM.js → chunk-UKAZEO7A.js} +5 -5
  111. package/dist/{chunk-MWBRY5HN.js → chunk-USOP5XTT.js} +3 -3
  112. package/dist/{chunk-7XHVHBFV.js → chunk-V4Z37HFN.js} +3 -3
  113. package/dist/{chunk-2BSPL7YE.js → chunk-V4ZFL2E2.js} +3 -3
  114. package/dist/{chunk-7D4PARGG.js → chunk-VWEELCAJ.js} +6 -6
  115. package/dist/{chunk-YJBGA3W6.js → chunk-VXWASGGT.js} +2 -2
  116. package/dist/{chunk-JHSHEJU7.js → chunk-XGGEOBH2.js} +2 -2
  117. package/dist/{chunk-FZUIGBYD.js → chunk-XKSHWUIF.js} +3 -3
  118. package/dist/{chunk-ZMQYQHZU.js → chunk-XVDXYUQJ.js} +1 -1
  119. package/dist/{chunk-4TU5M4WX.js → chunk-YXNRWPF5.js} +31 -29
  120. package/dist/{chunk-DFKD43CD.js → chunk-ZCRATF6D.js} +3 -3
  121. package/dist/{chunk-COAB2OXQ.js → chunk-ZGQZTSP2.js} +1 -1
  122. package/dist/{chunk-PSGS27VB.js → chunk-ZQXK4L4G.js} +2 -2
  123. package/dist/{chunk-3Q7LAXFJ.js → chunk-ZUXES5HA.js} +2 -2
  124. package/dist/{chunk-L666J5OJ.js → chunk-ZY3N64NC.js} +2 -2
  125. package/dist/{clean-5WXYKIWX.js → clean-YU7AM7DC.js} +23 -23
  126. package/dist/cli.js +67 -69
  127. package/dist/{cloud-TEJ6UVBU.js → cloud-QJMPTQ3N.js} +5 -6
  128. package/dist/{cloud-X2ZPQOFN.js → cloud-U7RRT2TA.js} +4 -4
  129. package/dist/{cloudrun-A7DU7DQE.js → cloudrun-T7VVPRDG.js} +7 -7
  130. package/dist/{compare-URG6E3VF.js → compare-USGR7PZL.js} +36 -36
  131. package/dist/{compiler-J43BE6LC.js → compiler-ZSIKBZBR.js} +4 -4
  132. package/dist/{component-BE2ZLBPY.js → component-RIFXLYK3.js} +3 -3
  133. package/dist/{compositions-DJPSPCYI.js → compositions-QHRNVZ2K.js} +13 -13
  134. package/dist/{curve-I6CGCMG5.js → curve-BX46Q4OW.js} +12 -12
  135. package/dist/{cuts-TRTRMTCZ.js → cuts-JRLHBLOX.js} +13 -13
  136. package/dist/{delete-UMO7XCW3.js → delete-SE7ABVTH.js} +8 -9
  137. package/dist/{deploy-T2CETGFF.js → deploy-AQUEV6ND.js} +6 -6
  138. package/dist/{describeProject-AJ2SFRCN.js → describeProject-XBT7PHZD.js} +8 -8
  139. package/dist/{deterministicFonts-UZIF5XZW.js → deterministicFonts-SKRN3TCP.js} +2 -2
  140. package/dist/{diff-KCVI66ZW.js → diff-6TZLA6KU.js} +39 -40
  141. package/dist/{dist-AUYCAQMA.js → dist-ALNMJZ7K.js} +15 -15
  142. package/dist/{dist-4JHP47NU.js → dist-EFXKPJJT.js} +2 -2
  143. package/dist/{dist-F3Y2XHZL.js → dist-QRXJMFI7.js} +3 -3
  144. package/dist/{doctor-UTIGHYSY.js → doctor-DDKKCJMO.js} +12 -12
  145. package/dist/{energy-PJUDIY2I.js → energy-HC7BNZ5E.js} +13 -13
  146. package/dist/{events-ZMFIRGW4.js → events-EETQNKK2.js} +15 -15
  147. package/dist/{events-HI2WDYGV.js → events-KNH677YB.js} +4 -4
  148. package/dist/{events-P6Q6GB6K.js → events-ZRVQOB4Y.js} +8 -8
  149. package/dist/{extract-4RYOD7LZ.js → extract-I3J3ZK55.js} +16 -16
  150. package/dist/{face-X3DR3L7V.js → face-HJUZ2OXQ.js} +14 -14
  151. package/dist/{feedback-WOE25OSG.js → feedback-M6I5AVZ5.js} +14 -15
  152. package/dist/{ffmpeg-N3LZ7XBX.js → ffmpeg-OAKTUK5S.js} +7 -7
  153. package/dist/{figma-VPG54R3O.js → figma-RFAPGGBF.js} +3 -3
  154. package/dist/fontLocalizeCli.js +13 -13
  155. package/dist/{frames-VNQ5P43E.js → frames-FOAWRBW4.js} +14 -14
  156. package/dist/{generate-ZCTFKNNW.js → generate-FLG6B7RX.js} +26 -27
  157. package/dist/{get-K374EYQS.js → get-I5JCIGPW.js} +8 -9
  158. package/dist/{gpuPolicy-SAEOR4QY.js → gpuPolicy-SLVPAQK2.js} +7 -7
  159. package/dist/{grade-compare-UHNGFSNR.js → grade-compare-R3UOE4WI.js} +38 -38
  160. package/dist/{gsapParserAcorn-5YD4N6HQ.js → gsapParserAcorn-SKGP4R4N.js} +1 -1
  161. package/dist/{heifImagePrep-R7NDS5FP.js → heifImagePrep-BOIWW7FW.js} +8 -8
  162. package/dist/{help-6DADTB2R.js → help-NVQZEN6A.js} +1 -1
  163. package/dist/{history-2K4FPC4P.js → history-AGNMVDRQ.js} +12 -12
  164. package/dist/hyperframes-player.global.js +2 -2
  165. package/dist/{info-7NZB6ZUO.js → info-EXAJSKZP.js} +15 -15
  166. package/dist/{init-UVGSTDBD.js → init-Z7FZ7U5J.js} +29 -29
  167. package/dist/{ink-3GBOCKAV.js → ink-QYCQXNUY.js} +13 -13
  168. package/dist/{inspect-XWAQWM2Y.js → inspect-ZJNHBIJI.js} +35 -35
  169. package/dist/{installer-AJESSC5Y.js → installer-VPGNKCEU.js} +5 -5
  170. package/dist/{keyframes-7C6LAP5V.js → keyframes-QYRES5IL.js} +15 -12
  171. package/dist/{lambda-Y2BEBCDQ.js → lambda-3I4IV63E.js} +13 -13
  172. package/dist/{layout-Z35EOSYQ.js → layout-J33Y6DD7.js} +35 -35
  173. package/dist/{lint-QU5JDQX3.js → lint-JT74BZWJ.js} +12 -12
  174. package/dist/{lintProject-Z6TG3Z34.js → lintProject-5CBL7VFV.js} +2 -2
  175. package/dist/{list-6KUDG4X7.js → list-NOWT754O.js} +10 -11
  176. package/dist/{localPage-SM5JBV4M.js → localPage-66UVNGQR.js} +7 -7
  177. package/dist/{login-XCR35XUC.js → login-3JR3HXS6.js} +7 -8
  178. package/dist/{logout-AHGR3X5U.js → logout-FJ444652.js} +4 -6
  179. package/dist/{look-O452Y7XO.js → look-NKCQENM7.js} +13 -13
  180. package/dist/{manager-GCFCVNYS.js → manager-ML4OLLSM.js} +8 -8
  181. package/dist/{measure-D54QYN6X.js → measure-VSZBVJJZ.js} +11 -11
  182. package/dist/{media-treatment-LPL2SZ7W.js → media-treatment-733EANTU.js} +15 -15
  183. package/dist/{media-use-VL2EL53W.js → media-use-IUN5ATZQ.js} +7 -9
  184. package/dist/{models-YFFUQ757.js → models-A6FBCVFA.js} +11 -11
  185. package/dist/{motionShot-QHWXLUJM.js → motionShot-PVWZLEMB.js} +19 -19
  186. package/dist/{normalize-audio-72PTXCD7.js → normalize-audio-XD4QE5NE.js} +11 -11
  187. package/dist/{open-BLPP4OPX.js → open-TWEEOMZA.js} +14 -14
  188. package/dist/{parakeetRunner-3A66RNGS.js → parakeetRunner-GP47AAVT.js} +13 -13
  189. package/dist/{pipeline-BFMEIMNZ.js → pipeline-5HUQFOCY.js} +10 -10
  190. package/dist/{play-KG2B7KMX.js → play-ZOZRB5OG.js} +26 -26
  191. package/dist/{preflight-YNGNNHZC.js → preflight-NTJMXUS2.js} +8 -8
  192. package/dist/{present-WGQEDRXJ.js → present-IMQS3KJ7.js} +22 -22
  193. package/dist/{preview-JM6GYVIL.js → preview-JSK5IKSR.js} +23 -23
  194. package/dist/{probe-B5H6PBIG.js → probe-ZLRD2TRZ.js} +13 -13
  195. package/dist/{producer-QIHOQ53I.js → producer-ZZROH3WZ.js} +1 -1
  196. package/dist/{projectConfig-GJL2ZGOU.js → projectConfig-UHYPGWD5.js} +7 -7
  197. package/dist/{publication-BLLVTVD6.js → publication-5KOANEHK.js} +3 -3
  198. package/dist/{publish-CYPJA7T7.js → publish-C3ARXH6D.js} +23 -83
  199. package/dist/{refresh-TB4TNH7R.js → refresh-YY4K2RWR.js} +3 -4
  200. package/dist/{remove-background-MHKW4EBR.js → remove-background-VDTWA7BL.js} +11 -11
  201. package/dist/{render-F35USXZA.js → render-P27DEH4H.js} +44 -45
  202. package/dist/{render-RUEXLOWE.js → render-TSV3XTQV.js} +6 -6
  203. package/dist/{render-RTPE3OBI.js → render-UF5XKGO5.js} +939 -317
  204. package/dist/{render-batch-QFGQD5FM.js → render-batch-ISMXAG7F.js} +6 -6
  205. package/dist/renderSetupWorker.js +2 -2
  206. package/dist/{resolver-HQIDF3TF.js → resolver-ZWNLOG6O.js} +5 -5
  207. package/dist/{reverse-BEQHRYSZ.js → reverse-J4CLVRPY.js} +1 -1
  208. package/dist/{run-EVZGKUEX.js → run-UPKPPRV7.js} +4 -5
  209. package/dist/{screenshotCapture-4NDEWYCU.js → screenshotCapture-ZZE3GMOF.js} +8 -8
  210. package/dist/{sherpa-MNU3ORFR.js → sherpa-7ISRANWA.js} +12 -12
  211. package/dist/skills/hyperframes-cli/SKILL.md +3 -3
  212. package/dist/skills/hyperframes-cli/references/preview-render.md +0 -20
  213. package/dist/skills/media-use/SKILL.md +1 -1
  214. package/dist/skills/media-use/references/heygen.md +2 -2
  215. package/dist/{skills-3R6EC5PV.js → skills-AAETAWZH.js} +11 -11
  216. package/dist/{skillsUpdateCheck-TRRXLL46.js → skillsUpdateCheck-KCP2EYKX.js} +4 -4
  217. package/dist/{snapshot-BYNK523M.js → snapshot-5PMHOVPR.js} +51 -49
  218. package/dist/{src-EZMBCQBY.js → src-CHPZUZZ3.js} +12 -12
  219. package/dist/{src-FZ4EJHOK.js → src-NIMSUB4P.js} +6 -6
  220. package/dist/{start-FRPRXMEN.js → start-6D25MEIJ.js} +24 -25
  221. package/dist/{staticProjectServer-FF6IBUD6.js → staticProjectServer-LM3YLJ6K.js} +20 -20
  222. package/dist/{status-QZ7PKGAJ.js → status-22TRM6DI.js} +18 -20
  223. package/dist/studio/assets/{codec-DqodFzhT.js → codec-D84nARi6.js} +1 -1
  224. package/dist/studio/assets/{hyperframes-player-D03oERxc.js → hyperframes-player-C2-hh0bR.js} +2 -2
  225. package/dist/studio/assets/{index-9kcxLnm3.js → index-B0rj7KmJ.js} +1 -1
  226. package/dist/studio/assets/{index-DuOvEv27.js → index-D3lR9-ik.js} +184 -184
  227. package/dist/studio/assets/{index-Cq2w6U13.css → index-dsfjBidg.css} +1 -1
  228. package/dist/studio/assets/{pausedVideoDecoder-pYFINB0c.js → pausedVideoDecoder-D8vnt-Wd.js} +1 -1
  229. package/dist/studio/index.html +2 -2
  230. package/dist/{studio-api-RBURPKYX.js → studio-api-LSWAJEK4.js} +15 -15
  231. package/dist/{studioServer-YZDNK3AO.js → studioServer-MC57HJAV.js} +84 -435
  232. package/dist/{sync-6MHJVU4M.js → sync-SEN3M7GA.js} +13 -13
  233. package/dist/{telemetry-CLB2O4ZK.js → telemetry-NP2FXZQL.js} +8 -8
  234. package/dist/{templates-HFQXIAO2.js → templates-QN7ZUHHZ.js} +18 -19
  235. package/dist/{timeline-ORRCS7NO.js → timeline-V43AACFE.js} +22 -22
  236. package/dist/{tokens-OTBA5VQ3.js → tokens-NOFZVX4P.js} +2 -2
  237. package/dist/{transcribe-EMXH7CGF.js → transcribe-FGVGCTEU.js} +10 -10
  238. package/dist/{transcribe-PJIFWND6.js → transcribe-IVZ4OASF.js} +28 -29
  239. package/dist/{tts-NANTORLP.js → tts-HOZ6X3MD.js} +1 -1
  240. package/dist/{update-RT6R53XR.js → update-LML5YVLT.js} +12 -12
  241. package/dist/{updateCheck-LSLLTUFX.js → updateCheck-FFHCGLRU.js} +3 -3
  242. package/dist/{upgrade-SSPKJYOW.js → upgrade-UWT2FB5Y.js} +4 -4
  243. package/dist/{urlDownloader-FTYUJP2D.js → urlDownloader-4RWM3UH2.js} +6 -6
  244. package/dist/{validate-SN2JDYNN.js → validate-ZNK2THUV.js} +29 -29
  245. package/dist/{video-Z522PCEM.js → video-QXVXG7PW.js} +8 -8
  246. package/dist/{voices-AQWUK6GK.js → voices-JI7QOSLT.js} +23 -24
  247. package/dist/warmCheck.js +45 -44
  248. package/package.json +1 -2
  249. package/dist/chunk-37RCPDCR.js +0 -173
  250. package/dist/chunk-4UBGQTAT.js +0 -387
  251. package/dist/chunk-DGXKMYIX.js +0 -343
  252. package/dist/chunk-JE2YBPC5.js +0 -152
  253. package/dist/chunk-OUOZGJJF.js +0 -538
  254. package/dist/chunk-Q5JJDC2L.js +0 -51
  255. package/dist/chunk-QABQKJPY.js +0 -3761
  256. package/dist/contract/LICENSE-Unicode.txt +0 -39
  257. package/dist/contract/path-policy.json +0 -311
  258. package/dist/contract/unicode-15.1.0.json +0 -6179
  259. package/dist/execute-AUPUAYPW.js +0 -109
  260. package/dist/oauth-KUPQUH6E.js +0 -40
  261. package/dist/plan-2MKSJEUW.js +0 -88
  262. package/dist/service-XCT7W4PQ.js +0 -68
  263. package/dist/share-KRKP6VYV.js +0 -241
  264. package/dist/{destroy-IWHFUGJL.js → destroy-YAMTVR2W.js} +4 -4
  265. package/dist/{synthesize-NJKCIPKW.js → synthesize-MDW4ZWTN.js} +5 -5
@@ -12,6 +12,8 @@ import {
12
12
  ErrDeviceAuthFailed,
13
13
  ErrInvalidStore,
14
14
  ErrLoginChanged,
15
+ ErrLoginExpired,
16
+ ErrNotConfigured,
15
17
  ErrRefreshFailed,
16
18
  ErrUnauthenticated,
17
19
  assertOAuthIdentity,
@@ -23,7 +25,7 @@ import {
23
25
  resolveClientId,
24
26
  revokeEndpoint,
25
27
  tokenEndpoint
26
- } from "./chunk-FID757D3.js";
28
+ } from "./chunk-LP7B3JLC.js";
27
29
  import {
28
30
  c
29
31
  } from "./chunk-VU4EPKFI.js";
@@ -34,215 +36,6 @@ import {
34
36
  normalizeErrorMessage
35
37
  } from "./chunk-E63BDV4Z.js";
36
38
 
37
- // src/auth/pkce.ts
38
- import { createHash, randomBytes } from "crypto";
39
- var VERIFIER_BYTES = 64;
40
- function generatePkcePair() {
41
- const verifier = base64UrlEncode(randomBytes(VERIFIER_BYTES));
42
- const challenge = base64UrlEncode(createHash("sha256").update(verifier).digest());
43
- return { verifier, challenge, method: "S256" };
44
- }
45
- function generateState() {
46
- return base64UrlEncode(randomBytes(32));
47
- }
48
- function base64UrlEncode(buf) {
49
- return buf.toString("base64").replace(/\+/g, "-").replace(/\//g, "_").replace(/=+$/, "");
50
- }
51
-
52
- // src/auth/loopback.ts
53
- import { timingSafeEqual } from "crypto";
54
- import { createServer } from "http";
55
-
56
- // src/auth/callbackPage.ts
57
- var MARK_A = "M10.1851 57.8021L33.1145 73.8313C36.2202 75.9978 41.5173 73.5433 42.4816 69.4984L51.7611 30.4271C52.7253 26.3822 48.5802 23.9277 44.4602 26.0942L13.917 42.1235C6.96677 45.7676 4.97564 54.1579 10.1851 57.8021Z";
58
- var MARK_B = "M87.5129 57.5141L56.9696 73.5433C52.8371 75.7098 48.7046 73.2553 49.6688 69.2104L58.9483 30.1391C59.9125 26.0942 65.2097 23.6397 68.3154 25.8062L91.2447 41.8354C96.4668 45.4796 94.4631 53.8699 87.5129 57.5141Z";
59
- var STYLE = `:root{color-scheme:light dark;--bg:#f2f0ed;--ink:#1d1b18;--ink2:#5d5a55;--tile:#dff3ea;--tile-ink:#087a54;--bad:#fbe6e1;--bad-ink:#b3402e;--btn:#1d1b18;--btn-ink:#f2f0ed;--panel:#0c0c0e;--panel-ink:#f4f1ec}
60
- @media(prefers-color-scheme:dark){:root{--bg:#201e1b;--ink:#f6f4f1;--ink2:#b5b1aa;--tile:#1f3a2f;--tile-ink:#37de91;--bad:#3a2420;--bad-ink:#f08a78;--btn:#f6f4f1;--btn-ink:#201e1b}}
61
- *{box-sizing:border-box}html,body{height:100%;margin:0}
62
- body{background:var(--bg);color:var(--ink);font:400 15px/1.45 "TT Norms",system-ui,-apple-system,"Segoe UI",sans-serif;-webkit-font-smoothing:antialiased;display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.25fr)}
63
- .col{position:relative;display:flex;flex-direction:column;justify-content:center;padding:48px 32px 48px max(32px,min(7vw,96px))}
64
- .brand{position:absolute;top:28px;left:32px;display:flex;align-items:center;gap:10px;font-weight:600;font-size:20px;letter-spacing:-.01em}
65
- .tile{display:grid;place-items:center;width:44px;height:44px;border-radius:12px;background:var(--tile);color:var(--tile-ink);margin-bottom:20px}
66
- .bad .tile{background:var(--bad);color:var(--bad-ink)}
67
- h1{margin:0;font-size:30px;line-height:1.1;font-weight:600;letter-spacing:-.02em;text-wrap:balance}
68
- p{margin:10px 0 0;color:var(--ink2);max-width:360px;text-wrap:pretty}
69
- code{font:500 13px ui-monospace,SFMono-Regular,Menlo,monospace;color:var(--ink2)}
70
- .panel{margin:14px;border-radius:24px;background:var(--panel);color:var(--panel-ink);display:flex;flex-direction:column;align-items:center;justify-content:center;gap:18px}
71
- .panel b{font-size:26px;font-weight:600;letter-spacing:-.01em}
72
- .panel small{color:rgb(244 241 236/.58);font-size:14px;margin-top:-10px}
73
- .badge{position:relative}
74
- .chk{display:none;position:absolute;right:-8px;bottom:-4px;width:22px;height:22px;border-radius:50%;background:#37de91;place-items:center}
75
- .ok .chk{display:grid}
76
- @media(max-width:760px){body{grid-template-columns:1fr;grid-template-rows:auto auto}.col{padding:84px 24px 32px}.brand{left:24px}.panel{min-height:300px;margin:12px}}`;
77
- var CHECK = '<svg width="22" height="22" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.2" stroke-linecap="round" stroke-linejoin="round"><path d="m5.5 12.5 4.2 4.2 8.8-9.4"/></svg>';
78
- var CROSS = '<svg width="22" height="22" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.2" stroke-linecap="round"><path d="M6.5 6.5l11 11M17.5 6.5l-11 11"/></svg>';
79
- var CHK = '<span class="chk"><svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="#0e1a14" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"><path d="m6 12.5 4 4 8-9"/></svg></span>';
80
- function mark(width, height, id) {
81
- const gradient = (suffix, x1, y1, x2, y2) => `<linearGradient id="${suffix}${id}" gradientUnits="userSpaceOnUse" x1="${x1}" y1="${y1}" x2="${x2}" y2="${y2}"><stop offset="0" stop-color="#06E3FA"/><stop offset="1" stop-color="#4FDB5E"/></linearGradient>`;
82
- return `<svg viewBox="4 22 92 56" width="${width}" height="${height}" aria-hidden="true"><defs>${gradient("a", "48.57", "25", "44.78", "71.94")}${gradient("b", "54.83", "73.84", "72.1", "32.89")}</defs><path fill="url(#a${id})" d="${MARK_A}"/><path fill="url(#b${id})" d="${MARK_B}"/></svg>`;
83
- }
84
- function escapeHtml(s) {
85
- return s.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;").replace(/'/g, "&#39;");
86
- }
87
- function page(args) {
88
- const detail = args.detail ? `<p><code>${escapeHtml(args.detail)}</code></p>` : "";
89
- return `<!doctype html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1"><title>${escapeHtml(args.title)}</title><style>${STYLE}</style></head><body class="${args.ok ? "ok" : "bad"}"><main class="col"><div class="brand">${mark(38, 23, "c")}<span>HyperFrames</span></div><div class="tile">${args.ok ? CHECK : CROSS}</div><h1>${escapeHtml(args.title)}</h1><p>${escapeHtml(args.text)}</p>${detail}</main><aside class="panel"><div class="badge">${mark(96, 58, "p")}${CHK}</div><b>HyperFrames</b><small>by HeyGen</small></aside></body></html>`;
90
- }
91
- function connectedPage() {
92
- return page({
93
- ok: true,
94
- title: "You're connected",
95
- text: "Return to your terminal. You can close this tab."
96
- });
97
- }
98
- function failurePage(code, description) {
99
- if (code === "access_denied") {
100
- return page({
101
- ok: false,
102
- title: "Not authorized",
103
- text: "Nothing was connected. Run the login again from your terminal."
104
- });
105
- }
106
- return page({
107
- ok: false,
108
- title: "Couldn't connect",
109
- text: description || "Something went wrong on the way back. Run the login again from your terminal.",
110
- detail: code
111
- });
112
- }
113
-
114
- // src/auth/loopback.ts
115
- var CALLBACK_PATH = "/oauth/callback";
116
- var SIGN_IN_WITH_CHECKOUT_TIMEOUT_MS = 60 * 60 * 1e3;
117
- async function startLoopback(opts) {
118
- const timeoutMs = opts.timeoutMs ?? SIGN_IN_WITH_CHECKOUT_TIMEOUT_MS;
119
- const timeoutLabel = `${timeoutMs / 6e4} minutes`;
120
- let resolveResult;
121
- let rejectResult;
122
- const result = new Promise((resolve, reject) => {
123
- resolveResult = resolve;
124
- rejectResult = reject;
125
- });
126
- let redirectUri = "";
127
- const server = createServer(
128
- (req, res) => handleRequest(req, res, opts.state, redirectUri, resolveResult, rejectResult)
129
- );
130
- await listen(server, opts.port ?? 0);
131
- const address = server.address();
132
- redirectUri = `http://127.0.0.1:${address.port}${CALLBACK_PATH}`;
133
- let closed = false;
134
- const close = async () => {
135
- if (closed) return;
136
- closed = true;
137
- clearTimeout(timer);
138
- server.closeAllConnections?.();
139
- await new Promise((resolve) => server.close(() => resolve()));
140
- };
141
- const timer = setTimeout(() => {
142
- rejectResult(new Error(`OAuth callback timed out after ${timeoutLabel}`));
143
- void close();
144
- }, timeoutMs);
145
- result.finally(close).catch(() => {
146
- });
147
- return { result, redirectUri, timeoutLabel, close };
148
- }
149
- async function listen(server, port) {
150
- await new Promise((resolve, reject) => {
151
- server.once("error", reject);
152
- server.listen(port, "127.0.0.1", () => {
153
- server.off("error", reject);
154
- resolve();
155
- });
156
- });
157
- }
158
- function handleRequest(req, res, expectedState, redirectUri, resolveResult, rejectResult) {
159
- if (req.method !== "GET") {
160
- res.writeHead(405, { "content-type": "text/plain" }).end("Method Not Allowed");
161
- return;
162
- }
163
- const url = new URL(req.url ?? "/", "http://127.0.0.1");
164
- if (url.pathname !== CALLBACK_PATH) {
165
- res.writeHead(404, { "content-type": "text/plain" }).end("Not Found");
166
- return;
167
- }
168
- const params = url.searchParams;
169
- const error = params.get("error");
170
- if (error) {
171
- const desc = params.get("error_description") ?? "";
172
- respond(res, 400, failurePage(error, desc));
173
- rejectResult(new Error(`OAuth authorize returned error: ${error}${desc ? ` \u2014 ${desc}` : ""}`));
174
- return;
175
- }
176
- const state = params.get("state");
177
- if (!state || !stateMatches(state, expectedState)) {
178
- respond(res, 400, failurePage("invalid_state", "State parameter did not match."));
179
- rejectResult(new Error("OAuth state mismatch \u2014 possible CSRF, aborting."));
180
- return;
181
- }
182
- const code = params.get("code");
183
- if (!code) {
184
- respond(
185
- res,
186
- 400,
187
- failurePage("missing_code", "Authorization code is missing from the redirect.")
188
- );
189
- rejectResult(new Error("OAuth redirect did not include `code`."));
190
- return;
191
- }
192
- respond(res, 200, connectedPage());
193
- resolveResult({ code, redirectUri });
194
- }
195
- function stateMatches(actual, expected) {
196
- const a = Buffer.from(actual, "utf8");
197
- const b = Buffer.from(expected, "utf8");
198
- if (a.length !== b.length) return false;
199
- return timingSafeEqual(a, b);
200
- }
201
- function respond(res, status, body) {
202
- res.writeHead(status, {
203
- "content-type": "text/html; charset=utf-8",
204
- "cache-control": "no-store",
205
- // Tell the browser not to keep the TCP socket alive — otherwise
206
- // `server.close()` blocks on the idle keep-alive timeout
207
- // (Chrome ~5min). Combined with `server.closeAllConnections()`
208
- // in `close()` this guarantees the CLI exits promptly after the
209
- // user sees the success page.
210
- connection: "close"
211
- }).end(body);
212
- }
213
-
214
- // src/auth/browser.ts
215
- import { appendFileSync } from "fs";
216
- async function openBrowser(url) {
217
- const log = process.env["HF_BROWSER_LOG"];
218
- if (log) {
219
- appendFileSync(log, `${url}
220
- `);
221
- return { opened: true };
222
- }
223
- if (process.env["BROWSER"] === "none" || process.env["HF_NO_BROWSER"] === "1") {
224
- printManualInstructions(url);
225
- return { opened: false };
226
- }
227
- try {
228
- const open = (await import("open")).default;
229
- await open(url);
230
- return { opened: true };
231
- } catch (err) {
232
- printManualInstructions(url, normalizeErrorMessage(err));
233
- return { opened: false };
234
- }
235
- }
236
- function printManualInstructions(url, detail) {
237
- if (detail) {
238
- console.error(c.warn(`Could not open browser automatically (${detail}).`));
239
- } else {
240
- console.error(c.warn("Browser auto-open is disabled."));
241
- }
242
- console.error(`Open this URL manually to continue:
243
- ${c.accent(url)}`);
244
- }
245
-
246
39
  // src/auth/scrub.ts
247
40
  var HEYGEN_KEY = /\b(hg|sk)_[A-Za-z0-9_-]{4,}/g;
248
41
  var HEADER_LINE = /(authorization|x-api-key)[ \t]*[:=][ \t]*[^\r\n]+/gi;
@@ -384,6 +177,38 @@ function pickObject(obj, key) {
384
177
  return v && typeof v === "object" && !Array.isArray(v) ? v : void 0;
385
178
  }
386
179
 
180
+ // src/auth/browser.ts
181
+ import { appendFileSync } from "fs";
182
+ async function openBrowser(url) {
183
+ const log = process.env["HF_BROWSER_LOG"];
184
+ if (log) {
185
+ appendFileSync(log, `${url}
186
+ `);
187
+ return { opened: true };
188
+ }
189
+ if (process.env["BROWSER"] === "none" || process.env["HF_NO_BROWSER"] === "1") {
190
+ printManualInstructions(url);
191
+ return { opened: false };
192
+ }
193
+ try {
194
+ const open = (await import("open")).default;
195
+ await open(url);
196
+ return { opened: true };
197
+ } catch (err) {
198
+ printManualInstructions(url, normalizeErrorMessage(err));
199
+ return { opened: false };
200
+ }
201
+ }
202
+ function printManualInstructions(url, detail) {
203
+ if (detail) {
204
+ console.error(c.warn(`Could not open browser automatically (${detail}).`));
205
+ } else {
206
+ console.error(c.warn("Browser auto-open is disabled."));
207
+ }
208
+ console.error(`Open this URL manually to continue:
209
+ ${c.accent(url)}`);
210
+ }
211
+
387
212
  // src/auth/store.ts
388
213
  import { promises as fs } from "fs";
389
214
  import { dirname } from "path";
@@ -622,6 +447,183 @@ function looksLikeApiKey(s) {
622
447
  return /^[!-~]+$/.test(s);
623
448
  }
624
449
 
450
+ // src/auth/pkce.ts
451
+ import { createHash, randomBytes } from "crypto";
452
+ var VERIFIER_BYTES = 64;
453
+ function generatePkcePair() {
454
+ const verifier = base64UrlEncode(randomBytes(VERIFIER_BYTES));
455
+ const challenge = base64UrlEncode(createHash("sha256").update(verifier).digest());
456
+ return { verifier, challenge, method: "S256" };
457
+ }
458
+ function generateState() {
459
+ return base64UrlEncode(randomBytes(32));
460
+ }
461
+ function base64UrlEncode(buf) {
462
+ return buf.toString("base64").replace(/\+/g, "-").replace(/\//g, "_").replace(/=+$/, "");
463
+ }
464
+
465
+ // src/auth/loopback.ts
466
+ import { timingSafeEqual } from "crypto";
467
+ import { createServer } from "http";
468
+
469
+ // src/auth/callbackPage.ts
470
+ var MARK_A = "M10.1851 57.8021L33.1145 73.8313C36.2202 75.9978 41.5173 73.5433 42.4816 69.4984L51.7611 30.4271C52.7253 26.3822 48.5802 23.9277 44.4602 26.0942L13.917 42.1235C6.96677 45.7676 4.97564 54.1579 10.1851 57.8021Z";
471
+ var MARK_B = "M87.5129 57.5141L56.9696 73.5433C52.8371 75.7098 48.7046 73.2553 49.6688 69.2104L58.9483 30.1391C59.9125 26.0942 65.2097 23.6397 68.3154 25.8062L91.2447 41.8354C96.4668 45.4796 94.4631 53.8699 87.5129 57.5141Z";
472
+ var STYLE = `:root{color-scheme:light dark;--bg:#f2f0ed;--ink:#1d1b18;--ink2:#5d5a55;--tile:#dff3ea;--tile-ink:#087a54;--bad:#fbe6e1;--bad-ink:#b3402e;--btn:#1d1b18;--btn-ink:#f2f0ed;--panel:#0c0c0e;--panel-ink:#f4f1ec}
473
+ @media(prefers-color-scheme:dark){:root{--bg:#201e1b;--ink:#f6f4f1;--ink2:#b5b1aa;--tile:#1f3a2f;--tile-ink:#37de91;--bad:#3a2420;--bad-ink:#f08a78;--btn:#f6f4f1;--btn-ink:#201e1b}}
474
+ *{box-sizing:border-box}html,body{height:100%;margin:0}
475
+ body{background:var(--bg);color:var(--ink);font:400 15px/1.45 "TT Norms",system-ui,-apple-system,"Segoe UI",sans-serif;-webkit-font-smoothing:antialiased;display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.25fr)}
476
+ .col{position:relative;display:flex;flex-direction:column;justify-content:center;padding:48px 32px 48px max(32px,min(7vw,96px))}
477
+ .brand{position:absolute;top:28px;left:32px;display:flex;align-items:center;gap:10px;font-weight:600;font-size:20px;letter-spacing:-.01em}
478
+ .tile{display:grid;place-items:center;width:44px;height:44px;border-radius:12px;background:var(--tile);color:var(--tile-ink);margin-bottom:20px}
479
+ .bad .tile{background:var(--bad);color:var(--bad-ink)}
480
+ h1{margin:0;font-size:30px;line-height:1.1;font-weight:600;letter-spacing:-.02em;text-wrap:balance}
481
+ p{margin:10px 0 0;color:var(--ink2);max-width:360px;text-wrap:pretty}
482
+ code{font:500 13px ui-monospace,SFMono-Regular,Menlo,monospace;color:var(--ink2)}
483
+ .panel{margin:14px;border-radius:24px;background:var(--panel);color:var(--panel-ink);display:flex;flex-direction:column;align-items:center;justify-content:center;gap:18px}
484
+ .panel b{font-size:26px;font-weight:600;letter-spacing:-.01em}
485
+ .panel small{color:rgb(244 241 236/.58);font-size:14px;margin-top:-10px}
486
+ .badge{position:relative}
487
+ .chk{display:none;position:absolute;right:-8px;bottom:-4px;width:22px;height:22px;border-radius:50%;background:#37de91;place-items:center}
488
+ .ok .chk{display:grid}
489
+ @media(max-width:760px){body{grid-template-columns:1fr;grid-template-rows:auto auto}.col{padding:84px 24px 32px}.brand{left:24px}.panel{min-height:300px;margin:12px}}`;
490
+ var CHECK = '<svg width="22" height="22" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.2" stroke-linecap="round" stroke-linejoin="round"><path d="m5.5 12.5 4.2 4.2 8.8-9.4"/></svg>';
491
+ var CROSS = '<svg width="22" height="22" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.2" stroke-linecap="round"><path d="M6.5 6.5l11 11M17.5 6.5l-11 11"/></svg>';
492
+ var CHK = '<span class="chk"><svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="#0e1a14" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"><path d="m6 12.5 4 4 8-9"/></svg></span>';
493
+ function mark(width, height, id) {
494
+ const gradient = (suffix, x1, y1, x2, y2) => `<linearGradient id="${suffix}${id}" gradientUnits="userSpaceOnUse" x1="${x1}" y1="${y1}" x2="${x2}" y2="${y2}"><stop offset="0" stop-color="#06E3FA"/><stop offset="1" stop-color="#4FDB5E"/></linearGradient>`;
495
+ return `<svg viewBox="4 22 92 56" width="${width}" height="${height}" aria-hidden="true"><defs>${gradient("a", "48.57", "25", "44.78", "71.94")}${gradient("b", "54.83", "73.84", "72.1", "32.89")}</defs><path fill="url(#a${id})" d="${MARK_A}"/><path fill="url(#b${id})" d="${MARK_B}"/></svg>`;
496
+ }
497
+ function escapeHtml(s) {
498
+ return s.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;").replace(/'/g, "&#39;");
499
+ }
500
+ function page(args) {
501
+ const detail = args.detail ? `<p><code>${escapeHtml(args.detail)}</code></p>` : "";
502
+ return `<!doctype html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1"><title>${escapeHtml(args.title)}</title><style>${STYLE}</style></head><body class="${args.ok ? "ok" : "bad"}"><main class="col"><div class="brand">${mark(38, 23, "c")}<span>HyperFrames</span></div><div class="tile">${args.ok ? CHECK : CROSS}</div><h1>${escapeHtml(args.title)}</h1><p>${escapeHtml(args.text)}</p>${detail}</main><aside class="panel"><div class="badge">${mark(96, 58, "p")}${CHK}</div><b>HyperFrames</b><small>by HeyGen</small></aside></body></html>`;
503
+ }
504
+ function connectedPage() {
505
+ return page({
506
+ ok: true,
507
+ title: "You're connected",
508
+ text: "Return to your terminal. You can close this tab."
509
+ });
510
+ }
511
+ function failurePage(code, description) {
512
+ if (code === "access_denied") {
513
+ return page({
514
+ ok: false,
515
+ title: "Not authorized",
516
+ text: "Nothing was connected. Run the login again from your terminal."
517
+ });
518
+ }
519
+ return page({
520
+ ok: false,
521
+ title: "Couldn't connect",
522
+ text: description || "Something went wrong on the way back. Run the login again from your terminal.",
523
+ detail: code
524
+ });
525
+ }
526
+
527
+ // src/auth/loopback.ts
528
+ var CALLBACK_PATH = "/oauth/callback";
529
+ var SIGN_IN_WITH_CHECKOUT_TIMEOUT_MS = 60 * 60 * 1e3;
530
+ async function startLoopback(opts) {
531
+ const timeoutMs = opts.timeoutMs ?? SIGN_IN_WITH_CHECKOUT_TIMEOUT_MS;
532
+ const timeoutLabel = `${timeoutMs / 6e4} minutes`;
533
+ let resolveResult;
534
+ let rejectResult;
535
+ const result = new Promise((resolve, reject) => {
536
+ resolveResult = resolve;
537
+ rejectResult = reject;
538
+ });
539
+ let redirectUri = "";
540
+ const server = createServer(
541
+ (req, res) => handleRequest(req, res, opts.state, redirectUri, resolveResult, rejectResult)
542
+ );
543
+ await listen(server, opts.port ?? 0);
544
+ const address = server.address();
545
+ redirectUri = `http://127.0.0.1:${address.port}${CALLBACK_PATH}`;
546
+ let closed = false;
547
+ const close = async () => {
548
+ if (closed) return;
549
+ closed = true;
550
+ clearTimeout(timer);
551
+ server.closeAllConnections?.();
552
+ await new Promise((resolve) => server.close(() => resolve()));
553
+ };
554
+ const timer = setTimeout(() => {
555
+ rejectResult(new Error(`OAuth callback timed out after ${timeoutLabel}`));
556
+ void close();
557
+ }, timeoutMs);
558
+ result.finally(close).catch(() => {
559
+ });
560
+ return { result, redirectUri, timeoutLabel, close };
561
+ }
562
+ async function listen(server, port) {
563
+ await new Promise((resolve, reject) => {
564
+ server.once("error", reject);
565
+ server.listen(port, "127.0.0.1", () => {
566
+ server.off("error", reject);
567
+ resolve();
568
+ });
569
+ });
570
+ }
571
+ function handleRequest(req, res, expectedState, redirectUri, resolveResult, rejectResult) {
572
+ if (req.method !== "GET") {
573
+ res.writeHead(405, { "content-type": "text/plain" }).end("Method Not Allowed");
574
+ return;
575
+ }
576
+ const url = new URL(req.url ?? "/", "http://127.0.0.1");
577
+ if (url.pathname !== CALLBACK_PATH) {
578
+ res.writeHead(404, { "content-type": "text/plain" }).end("Not Found");
579
+ return;
580
+ }
581
+ const params = url.searchParams;
582
+ const error = params.get("error");
583
+ if (error) {
584
+ const desc = params.get("error_description") ?? "";
585
+ respond(res, 400, failurePage(error, desc));
586
+ rejectResult(new Error(`OAuth authorize returned error: ${error}${desc ? ` \u2014 ${desc}` : ""}`));
587
+ return;
588
+ }
589
+ const state = params.get("state");
590
+ if (!state || !stateMatches(state, expectedState)) {
591
+ respond(res, 400, failurePage("invalid_state", "State parameter did not match."));
592
+ rejectResult(new Error("OAuth state mismatch \u2014 possible CSRF, aborting."));
593
+ return;
594
+ }
595
+ const code = params.get("code");
596
+ if (!code) {
597
+ respond(
598
+ res,
599
+ 400,
600
+ failurePage("missing_code", "Authorization code is missing from the redirect.")
601
+ );
602
+ rejectResult(new Error("OAuth redirect did not include `code`."));
603
+ return;
604
+ }
605
+ respond(res, 200, connectedPage());
606
+ resolveResult({ code, redirectUri });
607
+ }
608
+ function stateMatches(actual, expected) {
609
+ const a = Buffer.from(actual, "utf8");
610
+ const b = Buffer.from(expected, "utf8");
611
+ if (a.length !== b.length) return false;
612
+ return timingSafeEqual(a, b);
613
+ }
614
+ function respond(res, status, body) {
615
+ res.writeHead(status, {
616
+ "content-type": "text/html; charset=utf-8",
617
+ "cache-control": "no-store",
618
+ // Tell the browser not to keep the TCP socket alive — otherwise
619
+ // `server.close()` blocks on the idle keep-alive timeout
620
+ // (Chrome ~5min). Combined with `server.closeAllConnections()`
621
+ // in `close()` this guarantees the CLI exits promptly after the
622
+ // user sees the success page.
623
+ connection: "close"
624
+ }).end(body);
625
+ }
626
+
625
627
  // src/auth/oauth.ts
626
628
  var REVOKE_TIMEOUT_MS = 5e3;
627
629
  var MIN_EXPIRES_IN_SECONDS = 30;
@@ -982,9 +984,6 @@ async function persistOAuth(tokens, opts = {}) {
982
984
  const oauth = opts.refreshed !== void 0 ? { ...existing.oauth, ...tokens, ...oauthIdentity() } : { ...tokens, ...oauthIdentity() };
983
985
  await writeStore({ ...existing, oauth });
984
986
  }
985
- async function persistFreshOAuth(tokens) {
986
- await persistOAuth(tokens);
987
- }
988
987
  async function persistVerifiedOAuthSession(tokens, user) {
989
988
  let credentials = {};
990
989
  try {
@@ -1140,6 +1139,131 @@ async function safeText2(res) {
1140
1139
  }
1141
1140
  }
1142
1141
 
1142
+ // src/auth/resolver.ts
1143
+ var ENV_CREDENTIAL_VAR = {
1144
+ env: "HEYGEN_API_KEY",
1145
+ env_alias: "HYPERFRAMES_API_KEY",
1146
+ env_oauth: "HEYGEN_ACCESS_TOKEN"
1147
+ };
1148
+ var envCredentialVar = (source) => source in ENV_CREDENTIAL_VAR ? ENV_CREDENTIAL_VAR[source] : void 0;
1149
+ var EXPIRY_SKEW_MS = 60 * 1e3;
1150
+ async function resolveCredential(opts = {}) {
1151
+ const now = (opts.now ?? (() => /* @__PURE__ */ new Date()))();
1152
+ const envKey = envApiKey();
1153
+ if (envKey && !heygenApiHost()) return envKey;
1154
+ const accessToken = headerSafeEnv(ENV_CREDENTIAL_VAR.env_oauth);
1155
+ if (accessToken) {
1156
+ return { type: "oauth", access_token: accessToken, source: "env_oauth", refreshable: false };
1157
+ }
1158
+ if (envKey && loginRefreshFailed) return envKey;
1159
+ return await fromStore(now, envKey);
1160
+ }
1161
+ async function fromStore(now, envKey) {
1162
+ const store = await readStore().catch((err) => {
1163
+ if (envKey) return null;
1164
+ throw err;
1165
+ });
1166
+ if (!store || store.source === "absent") {
1167
+ if (envKey) return envKey;
1168
+ throw ErrNotConfigured();
1169
+ }
1170
+ const { credentials, source } = store;
1171
+ const fileSource = source === "file_legacy" ? "file_legacy" : "file_json";
1172
+ const login = credentials.oauth && boundToThisClient(credentials.oauth) ? pickOAuth(credentials.oauth, now, fileSource) : null;
1173
+ return login ?? envKey ?? storedApiKey(credentials, fileSource);
1174
+ }
1175
+ function storedApiKey(credentials, source) {
1176
+ if (credentials.oauth) {
1177
+ assertOAuthIdentity(credentials.oauth);
1178
+ throw ErrLoginExpired();
1179
+ }
1180
+ if (credentials.api_key) return { type: "api_key", key: credentials.api_key, source };
1181
+ throw ErrNotConfigured();
1182
+ }
1183
+ function envApiKey() {
1184
+ const heygenEnv = headerSafeEnv(ENV_CREDENTIAL_VAR.env);
1185
+ if (heygenEnv) return { type: "api_key", key: heygenEnv, source: "env" };
1186
+ const hfEnv = headerSafeEnv(ENV_CREDENTIAL_VAR.env_alias);
1187
+ if (hfEnv) return { type: "api_key", key: hfEnv, source: "env_alias" };
1188
+ return void 0;
1189
+ }
1190
+ function heygenApiHost() {
1191
+ const mediaBase = process.env["HEYGEN_API_BASE"]?.trim();
1192
+ return [apiBaseUrl(), ...mediaBase ? [mediaBase] : []].every((base) => {
1193
+ try {
1194
+ const host = new URL(base).hostname;
1195
+ return host === "heygen.com" || host.endsWith(".heygen.com");
1196
+ } catch {
1197
+ return false;
1198
+ }
1199
+ });
1200
+ }
1201
+ function boundToThisClient(tokens) {
1202
+ try {
1203
+ assertOAuthIdentity(tokens);
1204
+ return true;
1205
+ } catch {
1206
+ return false;
1207
+ }
1208
+ }
1209
+ var loginRefreshFailed = false;
1210
+ async function afterRefreshFailure(err, refreshToken) {
1211
+ if (!isAuthError(err)) throw err;
1212
+ if (err.code === "LOGIN_CHANGED" || err.code === "REFRESH_FAILED") {
1213
+ const stored = await readStore().catch(() => null);
1214
+ const current = stored?.credentials.oauth?.refresh_token;
1215
+ if (current && current !== refreshToken) {
1216
+ const next = await resolveCredential();
1217
+ if (next.type !== "oauth" || !next.refreshable) return next;
1218
+ }
1219
+ }
1220
+ if (!err.refused && err.code !== "LOGIN_EXPIRED") throw err;
1221
+ const key = envApiKey();
1222
+ if (!key) throw err;
1223
+ loginRefreshFailed = true;
1224
+ return key;
1225
+ }
1226
+ function headerSafeEnv(name) {
1227
+ const value = process.env[name];
1228
+ if (value && !isHeaderSafe(value)) {
1229
+ throw ErrInvalidStore(`${name} contains control characters`);
1230
+ }
1231
+ return value;
1232
+ }
1233
+ async function tryResolveCredential(opts = {}) {
1234
+ try {
1235
+ return await resolveCredential(opts);
1236
+ } catch (err) {
1237
+ if (isAuthError(err) && err.code === "NOT_CONFIGURED") {
1238
+ return null;
1239
+ }
1240
+ throw err;
1241
+ }
1242
+ }
1243
+ function pickOAuth(tokens, now, source) {
1244
+ const expiresAt = parseDate(tokens.expires_at);
1245
+ const expired = isTokenExpired(expiresAt, now);
1246
+ if (expired && !tokens.refresh_token) return null;
1247
+ const out = {
1248
+ type: "oauth",
1249
+ access_token: tokens.access_token,
1250
+ source,
1251
+ refreshable: expired && tokens.refresh_token !== void 0
1252
+ };
1253
+ if (tokens.refresh_token) out.refresh_token = tokens.refresh_token;
1254
+ if (expiresAt) out.expires_at = expiresAt;
1255
+ if (tokens.scope) out.scope = tokens.scope;
1256
+ return out;
1257
+ }
1258
+ function isTokenExpired(expiresAt, now) {
1259
+ return expiresAt !== void 0 && expiresAt.getTime() - EXPIRY_SKEW_MS < now.getTime();
1260
+ }
1261
+ function parseDate(s) {
1262
+ if (!s) return void 0;
1263
+ const d = new Date(s);
1264
+ return Number.isNaN(d.getTime()) ? void 0 : d;
1265
+ }
1266
+
1143
1267
  export {
1144
1268
  apiBaseUrl,
1145
1269
  AuthClient,
@@ -1156,7 +1280,11 @@ export {
1156
1280
  startDeviceAuthorizationFlow,
1157
1281
  refreshTokens,
1158
1282
  revokeTokens,
1159
- parseTokenResponse,
1160
- persistFreshOAuth,
1161
- persistVerifiedOAuthSession
1283
+ persistVerifiedOAuthSession,
1284
+ ENV_CREDENTIAL_VAR,
1285
+ envCredentialVar,
1286
+ resolveCredential,
1287
+ afterRefreshFailure,
1288
+ tryResolveCredential,
1289
+ isTokenExpired
1162
1290
  };
@@ -6,14 +6,14 @@ var __filename = __hf_fileURLToPath(import.meta.url);
6
6
  var __dirname = __hf_dirname(__filename);
7
7
  import {
8
8
  findCuts
9
- } from "./chunk-5ROYFGQT.js";
9
+ } from "./chunk-PVRJKEU5.js";
10
10
  import {
11
11
  grey,
12
12
  readClip,
13
13
  round,
14
14
  videoClip,
15
15
  writeImage
16
- } from "./chunk-W3XARNFW.js";
16
+ } from "./chunk-2YZ6GA4E.js";
17
17
 
18
18
  // src/measure/events.ts
19
19
  var EVENT_W = 160;
@@ -6,11 +6,11 @@ var __filename = __hf_fileURLToPath(import.meta.url);
6
6
  var __dirname = __hf_dirname(__filename);
7
7
  import {
8
8
  findStageProxyBox
9
- } from "./chunk-MEVLYDL2.js";
9
+ } from "./chunk-BJYCLZBQ.js";
10
10
  import {
11
11
  getMimeType,
12
12
  injectMediaCodecMapIntoHtml
13
- } from "./chunk-JX4BEVC3.js";
13
+ } from "./chunk-TIWO5QKS.js";
14
14
  import {
15
15
  PROXY_VARIANT_CONFIG,
16
16
  ProxyCapacityError,
@@ -21,23 +21,23 @@ import {
21
21
  recordProxyRequest,
22
22
  resolveProxy,
23
23
  resolveProxyVariantRequest
24
- } from "./chunk-7XHVHBFV.js";
24
+ } from "./chunk-V4Z37HFN.js";
25
25
  import {
26
26
  resolveAutoProxy
27
- } from "./chunk-WIJGRX5X.js";
27
+ } from "./chunk-IYYZMZD2.js";
28
28
  import {
29
29
  openRangeEnd
30
30
  } from "./chunk-VEIGTKYZ.js";
31
31
  import {
32
32
  listenOnBrowserSafePort
33
- } from "./chunk-XHP3V4WH.js";
33
+ } from "./chunk-7GJKUOPX.js";
34
34
  import {
35
35
  stripSdrPngColourTags
36
- } from "./chunk-RERVXE6J.js";
36
+ } from "./chunk-NHJ5YUBZ.js";
37
37
  import {
38
38
  PREVIEW_PROXY_BOX_PARAM,
39
39
  parsePreviewProxyBox
40
- } from "./chunk-Q6TVZY36.js";
40
+ } from "./chunk-RYT22J4V.js";
41
41
  import {
42
42
  decodeWellFormedEscapes
43
43
  } from "./chunk-6MKM2RVL.js";
@@ -30,7 +30,7 @@ import {
30
30
  } from "./chunk-F2GWIWHN.js";
31
31
  import {
32
32
  ITEM_TYPE_DIRS
33
- } from "./chunk-Q6TVZY36.js";
33
+ } from "./chunk-RYT22J4V.js";
34
34
  import {
35
35
  realProjectRoot
36
36
  } from "./chunk-OFQWTKPW.js";