hyperframes 0.8.217 → 0.8.220

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 (213) hide show
  1. package/dist/{add-AXTSRFNT.js → add-7BJGQPZT.js} +12 -12
  2. package/dist/{agentPromptGenerator-52346WSZ.js → agentPromptGenerator-NFN3AYLJ.js} +7 -7
  3. package/dist/{animatedGifPrep-WZHO7ZUA.js → animatedGifPrep-HC45HF7H.js} +7 -7
  4. package/dist/api.js +18 -18
  5. package/dist/{asset-T2CE34TV.js → asset-TSP3CMU4.js} +2 -2
  6. package/dist/{assetCataloger-2KABZLU3.js → assetCataloger-KIN2UKI7.js} +8 -8
  7. package/dist/{audio-6I2AK3TZ.js → audio-NEJOZZXG.js} +17 -17
  8. package/dist/{auth-B3LLOMAG.js → auth-7EEBDTBK.js} +8 -7
  9. package/dist/{autoUpdate-TTY4BTMM.js → autoUpdate-67ZMQDED.js} +2 -2
  10. package/dist/{backgroundChecks-WKW5CTCV.js → backgroundChecks-YN424YG5.js} +3 -3
  11. package/dist/backgroundChecksWorker.js +3 -3
  12. package/dist/{batchRender-ESAPNTE3.js → batchRender-I2GRQUPY.js} +3 -3
  13. package/dist/{beats-5WAAC5HT.js → beats-VVY6JZEU.js} +11 -11
  14. package/dist/{benchmark-KFYDNWZ7.js → benchmark-BJJVW6RH.js} +9 -9
  15. package/dist/{browser-LK4FYQXO.js → browser-IOP3IU24.js} +5 -5
  16. package/dist/{bundleWithLocalizedFonts-NRY45OIW.js → bundleWithLocalizedFonts-TLEZEZXN.js} +2 -2
  17. package/dist/{capture-DXRZI2WW.js → capture-4Z3KBJNP.js} +13 -13
  18. package/dist/{capture-SCXKM2WO.js → capture-HVIWNBQA.js} +3 -3
  19. package/dist/{captureCompositionFrame-NDQEZBHR.js → captureCompositionFrame-J3OOHGC2.js} +12 -12
  20. package/dist/{catalog-7WRGMHVI.js → catalog-G65QCBXG.js} +12 -12
  21. package/dist/{catch-up-6QEJHTFF.js → catch-up-VHTDAQYM.js} +5 -5
  22. package/dist/{check-HNONMHQD.js → check-W7TCUAXY.js} +38 -38
  23. package/dist/{checkAudio-OLNSZWWX.js → checkAudio-AV7R24FD.js} +11 -11
  24. package/dist/{checkBrowser-L2L2EEJD.js → checkBrowser-QTMNRNPF.js} +32 -32
  25. package/dist/{chunk-6YGTOBXW.js → chunk-22U7OCYM.js} +1 -1
  26. package/dist/{chunk-UZPWLXO6.js → chunk-2L645DAG.js} +1 -1
  27. package/dist/{chunk-XN22HGE7.js → chunk-2MDFNL2E.js} +1 -1
  28. package/dist/{chunk-4I7KQWZS.js → chunk-2Q7XV4F6.js} +1 -1
  29. package/dist/{chunk-UGQFQDSV.js → chunk-35JKCWYI.js} +1 -1
  30. package/dist/{chunk-5SZ2HRCW.js → chunk-3F6EGZ6C.js} +2 -2
  31. package/dist/{chunk-KH5XMMSM.js → chunk-5RGVBSDS.js} +2 -2
  32. package/dist/{chunk-4JHZBIBW.js → chunk-5XOOBNU2.js} +1 -1
  33. package/dist/{chunk-K2666FKT.js → chunk-6A7DOGSP.js} +1 -1
  34. package/dist/{chunk-62ER6HGC.js → chunk-6CWSMSOC.js} +3 -3
  35. package/dist/{chunk-VS7G457O.js → chunk-6MHKL2TB.js} +1 -1
  36. package/dist/{chunk-BRYOYBO5.js → chunk-6OXVMHTB.js} +1 -1
  37. package/dist/{chunk-OQRO2MEK.js → chunk-6YIBMA6Y.js} +5 -5
  38. package/dist/{chunk-ST5EBZTO.js → chunk-A32ZEFZT.js} +9 -3
  39. package/dist/{chunk-HPRR3WD7.js → chunk-AGFHQTZD.js} +17 -13
  40. package/dist/{chunk-W2LKSBX5.js → chunk-ARZGHKST.js} +24 -17
  41. package/dist/{chunk-LJB2PF6K.js → chunk-AUGHXWJC.js} +1 -1
  42. package/dist/{chunk-YQY4KVP4.js → chunk-BASBBBNB.js} +1 -1
  43. package/dist/{chunk-VAS6HQX3.js → chunk-BIROA7JM.js} +32 -3
  44. package/dist/{chunk-64TWYU4M.js → chunk-CIUEQLWL.js} +7 -7
  45. package/dist/{chunk-WGHUHNXI.js → chunk-CMI2POHT.js} +9 -9
  46. package/dist/{chunk-YATFRFNH.js → chunk-D5TOH3QI.js} +1 -1
  47. package/dist/{chunk-AU7VGKCP.js → chunk-DA6GOIIA.js} +1 -1
  48. package/dist/{chunk-CH4RRRGC.js → chunk-DB6OJRZB.js} +5 -5
  49. package/dist/{chunk-42K4JLQO.js → chunk-DBT7CRK4.js} +1 -1
  50. package/dist/{chunk-JY27IRDR.js → chunk-DEXGPHAZ.js} +1 -1
  51. package/dist/{chunk-VTLIN7XN.js → chunk-DJWAL7AW.js} +2 -2
  52. package/dist/{chunk-DOZGTBDV.js → chunk-EUZYVUUS.js} +2 -2
  53. package/dist/{chunk-OV6MUGZI.js → chunk-FGGZKCOT.js} +2 -2
  54. package/dist/{chunk-NWD2KKM5.js → chunk-FK5TW3IM.js} +1 -1
  55. package/dist/{chunk-QRIC4WOO.js → chunk-FKPJP7KG.js} +11 -5
  56. package/dist/{chunk-3MUFCWGK.js → chunk-IMVM6E65.js} +3 -3
  57. package/dist/{chunk-PNBH4ZY7.js → chunk-IZBJZBBF.js} +2 -2
  58. package/dist/{chunk-5ETJX6WM.js → chunk-J3OVTOVC.js} +18 -14
  59. package/dist/{chunk-7VZEOCUY.js → chunk-J74ZUXVU.js} +1 -1
  60. package/dist/{chunk-3YCAGPZK.js → chunk-JIGD5ZXE.js} +21 -21
  61. package/dist/{chunk-KLGJ2R4V.js → chunk-K7APBNPW.js} +2 -2
  62. package/dist/{chunk-2Q4CL6AB.js → chunk-KGM6VQ6D.js} +5 -2
  63. package/dist/{chunk-K5GGTJJV.js → chunk-KJ2ORDQZ.js} +1 -1
  64. package/dist/{chunk-WKNWKORX.js → chunk-LZPNAI7P.js} +3 -3
  65. package/dist/{chunk-UVXIJYZY.js → chunk-MESSJFK3.js} +249 -298
  66. package/dist/{chunk-JF3RF6GS.js → chunk-MHZB6QSC.js} +1 -1
  67. package/dist/{chunk-5XDKFCEI.js → chunk-MS2SDIPC.js} +9 -9
  68. package/dist/{chunk-QY7RG6K3.js → chunk-NEVX7YHH.js} +1 -1
  69. package/dist/{chunk-CBCZBHGK.js → chunk-NHXGFQWQ.js} +2 -2
  70. package/dist/{chunk-DEWCAOOL.js → chunk-NKNKRN7G.js} +2 -2
  71. package/dist/{chunk-P42DLWIY.js → chunk-NQP44XMF.js} +3 -3
  72. package/dist/{chunk-GHWV6PIS.js → chunk-NSJPSQZ3.js} +1 -1
  73. package/dist/{chunk-RYBFHEMZ.js → chunk-NSKIGECI.js} +1 -1
  74. package/dist/{chunk-R7EB4M5P.js → chunk-NYSB3CWY.js} +10 -10
  75. package/dist/{chunk-ESZ6YPQM.js → chunk-O332YWQV.js} +2 -2
  76. package/dist/{chunk-H47FQDFU.js → chunk-OURH3TLX.js} +1 -1
  77. package/dist/{chunk-URKDBFZV.js → chunk-P3XF3ZZF.js} +3 -3
  78. package/dist/{chunk-G35NVFZF.js → chunk-PCKWLYKA.js} +4 -4
  79. package/dist/{chunk-LPJMACTI.js → chunk-PIKANFFV.js} +4 -4
  80. package/dist/{chunk-O44FYXH5.js → chunk-RECS6EGQ.js} +3 -3
  81. package/dist/{chunk-3C6O5HV2.js → chunk-RF5LOY22.js} +14 -14
  82. package/dist/{chunk-RLT45AWC.js → chunk-RHEQ7RXZ.js} +1 -1
  83. package/dist/{chunk-TCVI4ZGS.js → chunk-RIG7XBHW.js} +1 -1
  84. package/dist/{chunk-5CXGDO74.js → chunk-RIYARQ2O.js} +2 -2
  85. package/dist/{chunk-2JUNPJUM.js → chunk-RK3LW7NO.js} +2 -2
  86. package/dist/{chunk-Z27A7NUB.js → chunk-SHOE3UR6.js} +1 -1
  87. package/dist/{chunk-UWV753SJ.js → chunk-SUQ77SEY.js} +1 -1
  88. package/dist/{chunk-L4BRJVGC.js → chunk-SW5XTDRD.js} +7 -7
  89. package/dist/{chunk-EAUUGY4R.js → chunk-TQ3W64VT.js} +3 -3
  90. package/dist/{chunk-5HGUY24Y.js → chunk-UOIVSNPI.js} +1 -1
  91. package/dist/{chunk-Z3HHAFEP.js → chunk-VJGQLC2A.js} +7 -7
  92. package/dist/chunk-VLA6UJGH.js +139 -0
  93. package/dist/{chunk-V4AS2BNU.js → chunk-VZVRF3JX.js} +3 -3
  94. package/dist/{chunk-MK4R3APQ.js → chunk-WQYLRTVT.js} +2 -2
  95. package/dist/{chunk-JMGMOK4Z.js → chunk-X2YBRPCM.js} +13 -6
  96. package/dist/{chunk-MGZKDR6R.js → chunk-XPV5K5MD.js} +1 -1
  97. package/dist/{chunk-TDNZIFJ2.js → chunk-YMKTEQIA.js} +48 -15
  98. package/dist/{chunk-PPMLF76Z.js → chunk-YSTBSLWY.js} +1 -1
  99. package/dist/{chunk-UQSBVZ3H.js → chunk-ZS5PARPI.js} +8 -5
  100. package/dist/{clean-2CK4S5ES.js → clean-AYZ2RAMN.js} +20 -20
  101. package/dist/cli.js +55 -55
  102. package/dist/{cloud-QRSJMVGW.js → cloud-A53ZNOO6.js} +4 -4
  103. package/dist/{cloudrun-5XEDIP77.js → cloudrun-USB736UD.js} +4 -4
  104. package/dist/commands/layout-audit.browser.js +49 -1
  105. package/dist/{compare-ASV5QBD2.js → compare-42CWJXBR.js} +29 -29
  106. package/dist/{compiler-CG2EXM75.js → compiler-SV2WYWTI.js} +4 -4
  107. package/dist/{component-24XLTKUQ.js → component-7JC7NQGM.js} +3 -3
  108. package/dist/{compositions-AN7ETEKG.js → compositions-6F6743GP.js} +12 -12
  109. package/dist/{delete-OMKQ3XTL.js → delete-7TRRZI5M.js} +6 -6
  110. package/dist/{deploy-3M6QRT2H.js → deploy-6SSC2FBD.js} +1 -1
  111. package/dist/{dist-VNOJCTQR.js → dist-KP2GVAQU.js} +2 -2
  112. package/dist/{dist-KXFW5H5Q.js → dist-XXBCSQYF.js} +2 -2
  113. package/dist/{doctor-ABYFP2LY.js → doctor-XEG3GZAA.js} +14 -14
  114. package/dist/{events-P5AFL2VZ.js → events-33HQE43K.js} +4 -4
  115. package/dist/{events-64QVWKTU.js → events-I7F24HFX.js} +3 -3
  116. package/dist/{feedback-LQ2TT4XL.js → feedback-XDTUBZX3.js} +11 -11
  117. package/dist/{ffmpeg-Y6NMFQ5J.js → ffmpeg-ABXU2TYH.js} +7 -7
  118. package/dist/{figma-R75KTFW4.js → figma-4JKNWEKN.js} +3 -3
  119. package/dist/fontLocalizeCli.js +10 -10
  120. package/dist/{get-KB67C2T7.js → get-EX2INNLN.js} +6 -6
  121. package/dist/{gpuPolicy-4ERRTA5U.js → gpuPolicy-7TSXQHK4.js} +7 -7
  122. package/dist/{grade-compare-NPVETP7T.js → grade-compare-TLUTRM2K.js} +30 -30
  123. package/dist/{heifImagePrep-ABLYQMTO.js → heifImagePrep-UOBBQFA2.js} +8 -8
  124. package/dist/{help-ZNJG5OJO.js → help-BB4FPW2K.js} +1 -1
  125. package/dist/{history-HUBQPMLX.js → history-JNETCPLB.js} +7 -7
  126. package/dist/hyperframe.manifest.json +1 -1
  127. package/dist/hyperframe.runtime.iife.js +47 -47
  128. package/dist/hyperframes-player.global.js +1 -1
  129. package/dist/{info-KDSQGWE5.js → info-7LBANHQG.js} +8 -8
  130. package/dist/{init-QEPNUQB2.js → init-GZ36UP5K.js} +29 -29
  131. package/dist/{inspect-27GJ5ZUI.js → inspect-OD54TEQN.js} +30 -30
  132. package/dist/{installer-OFIDWMYR.js → installer-4KJ7T3KB.js} +4 -4
  133. package/dist/{keyframes-E2NNHMNK.js → keyframes-KLBNYGYC.js} +7 -7
  134. package/dist/{lambda-QQ2VVPRQ.js → lambda-554LSIHM.js} +11 -11
  135. package/dist/{layout-NQQZ5KR7.js → layout-EQAJKTIW.js} +30 -30
  136. package/dist/{lint-DUYKX36O.js → lint-ZMSIAVMI.js} +9 -9
  137. package/dist/{lintProject-SZIPPOJR.js → lintProject-I4XPWIQZ.js} +2 -2
  138. package/dist/{list-HIZY6RSP.js → list-KUZLCZUK.js} +6 -6
  139. package/dist/{localPage-U2RMKIMN.js → localPage-MQJZAR7Z.js} +7 -7
  140. package/dist/{login-CLP2ZTEW.js → login-644VKQTJ.js} +9 -8
  141. package/dist/{logout-CXGSSQ4Q.js → logout-6VFJ7WMW.js} +4 -4
  142. package/dist/{manager-CXRLWAKH.js → manager-3C33QHJB.js} +8 -8
  143. package/dist/{manager-LXWVBDLM.js → manager-ENFYM32B.js} +1 -1
  144. package/dist/{media-treatment-GSWIAGS4.js → media-treatment-XYS2O3JD.js} +14 -14
  145. package/dist/{media-use-ZRHFRO46.js → media-use-ZNTB7W6N.js} +85 -10
  146. package/dist/{models-TPHYQXOL.js → models-KOTMJX4Z.js} +11 -11
  147. package/dist/{motionShot-7UX4TKHZ.js → motionShot-YOSDJ26I.js} +16 -16
  148. package/dist/{normalize-audio-WBTJDFS7.js → normalize-audio-FNT6Y4MC.js} +18 -12
  149. package/dist/{open-P7Z2PIPR.js → open-COIGEQCX.js} +12 -12
  150. package/dist/{parakeetRunner-F2OX525D.js → parakeetRunner-BBXLGDZW.js} +13 -13
  151. package/dist/{pipeline-2ZDZGL4J.js → pipeline-23GAJEQO.js} +10 -10
  152. package/dist/{play-YCH7MRNX.js → play-GOCWJH7Z.js} +21 -21
  153. package/dist/{preflight-MTMSPVCR.js → preflight-7IWI3INL.js} +9 -9
  154. package/dist/{present-L4HNZ2HU.js → present-VN2RAATE.js} +17 -17
  155. package/dist/{preview-RWX74O5J.js → preview-MD7W5T56.js} +19 -19
  156. package/dist/{producer-UI4FXLPQ.js → producer-IRENEI2Y.js} +1 -1
  157. package/dist/{projectConfig-I6QNMRVV.js → projectConfig-3IXWY6VF.js} +6 -6
  158. package/dist/{publication-JET7ZBWG.js → publication-MCDU4VIJ.js} +2 -2
  159. package/dist/{publish-T56AYTZU.js → publish-5477WXAK.js} +15 -15
  160. package/dist/{refresh-VJ4FQVH2.js → refresh-I6ITGHKL.js} +5 -4
  161. package/dist/{remove-background-4Y56FLXV.js → remove-background-XYO5ENFU.js} +11 -11
  162. package/dist/{render-33TSTTN7.js → render-34GMNN2B.js} +5 -5
  163. package/dist/{render-UBDIHGEG.js → render-54SCVHMS.js} +21 -21
  164. package/dist/{render-IJ7L24RF.js → render-L66MXLV2.js} +37 -37
  165. package/dist/{render-batch-SDDZ3LM7.js → render-batch-DOCRB7KQ.js} +5 -5
  166. package/dist/renderSetupWorker.js +3 -3
  167. package/dist/{resolver-VLOUQ7I6.js → resolver-Q5XTMECS.js} +4 -4
  168. package/dist/{sherpa-6GOUBSP2.js → sherpa-E7C2ZGKD.js} +12 -12
  169. package/dist/skills/hyperframes-cli/references/cloud.md +4 -4
  170. package/dist/skills/media-use/SKILL.md +3 -1
  171. package/dist/skills/media-use/audio/references/bgm.md +1 -1
  172. package/dist/skills/media-use/audio/references/requirements.md +9 -9
  173. package/dist/skills/media-use/audio/references/tts.md +11 -11
  174. package/dist/skills/media-use/audio/scripts/gemini-pipeline.test.mjs +1 -1
  175. package/dist/skills/media-use/audio/scripts/heygen-tts.mjs +1 -1
  176. package/dist/skills/media-use/audio/scripts/lib/audio-meta.test.mjs +1 -1
  177. package/dist/skills/media-use/audio/scripts/lib/heygen.mjs +23 -7
  178. package/dist/skills/media-use/audio/scripts/lib/heygen.test.mjs +68 -10
  179. package/dist/skills/media-use/audio/scripts/lib/tts.mjs +1 -1
  180. package/dist/skills/media-use/audio/scripts/lib/tts.test.mjs +2 -2
  181. package/dist/skills/media-use/references/operations.md +11 -9
  182. package/dist/skills/media-use/references/setup-providers.md +30 -30
  183. package/dist/skills/media-use/scripts/lib/heygen-cli.mjs +2 -2
  184. package/dist/skills/media-use/scripts/lib/telemetry.mjs +2 -1
  185. package/dist/skills/media-use/scripts/lib/telemetry.test.mjs +49 -4
  186. package/dist/{skills-MAJGGJKJ.js → skills-DDZCYTVS.js} +6 -6
  187. package/dist/{skillsUpdateCheck-X6AIBUUG.js → skillsUpdateCheck-4XX7YYZA.js} +3 -3
  188. package/dist/{snapshot-JKKWQSMQ.js → snapshot-PTLZ25S3.js} +34 -34
  189. package/dist/{src-RIL5PHI6.js → src-KT325UQS.js} +9 -9
  190. package/dist/{src-LAO5IGRI.js → src-RDWYM4KF.js} +6 -6
  191. package/dist/{staticProjectServer-YF5AZXGR.js → staticProjectServer-JCGTNF4E.js} +18 -18
  192. package/dist/{status-TJFZFDGS.js → status-4AAPTTRW.js} +42 -13
  193. package/dist/studio/assets/{hyperframes-player-Cf9gtxqa.js → hyperframes-player-CC1Ue2mg.js} +1 -1
  194. package/dist/studio/assets/{index-zVoFhoyD.js → index-BgjuGqZk.js} +6 -6
  195. package/dist/studio/assets/{index-CW5fPxU8.js → index-hc5Ru1gB.js} +1 -1
  196. package/dist/studio/index.html +1 -1
  197. package/dist/{studio-api-Q2U6752S.js → studio-api-GTN767PW.js} +10 -10
  198. package/dist/{studioServer-SPU4MINT.js → studioServer-X6O4WB7E.js} +51 -51
  199. package/dist/{synthesize-IKSZPKFJ.js → synthesize-4JC74JW5.js} +13 -9
  200. package/dist/{telemetry-W7CBBWIN.js → telemetry-OY2PKIWO.js} +4 -4
  201. package/dist/{timeline-L26OBLW2.js → timeline-IZZRAXKP.js} +19 -19
  202. package/dist/{tokens-PNNCTOYV.js → tokens-JHIYKROF.js} +2 -2
  203. package/dist/{transcribe-PPZFOWMB.js → transcribe-2MPZHRG5.js} +11 -11
  204. package/dist/{transcribe-XZCZTOPU.js → transcribe-WJ2DIE3W.js} +18 -18
  205. package/dist/{tts-MQNOBHLH.js → tts-BVTJEP72.js} +1 -1
  206. package/dist/{updateCheck-SNRZKRO2.js → updateCheck-6XMEFB74.js} +2 -2
  207. package/dist/{upgrade-WEU5MYWF.js → upgrade-MSNQIWR7.js} +2 -2
  208. package/dist/{urlDownloader-55NQFDIH.js → urlDownloader-CD6NVJE5.js} +6 -6
  209. package/dist/{validate-4QEMOBFD.js → validate-7L5LJFTK.js} +24 -24
  210. package/dist/{video-VYOWJDYM.js → video-HFIDOIQI.js} +8 -8
  211. package/dist/warmCheck.js +38 -38
  212. package/package.json +1 -1
  213. package/dist/chunk-4WEWHZZO.js +0 -24
@@ -17,7 +17,10 @@ const HEYGEN_ENV = [
17
17
  "HEYGEN_ACCESS_TOKEN",
18
18
  "HEYGEN_API_KEY",
19
19
  "HYPERFRAMES_API_KEY",
20
- "HEYGEN_CONFIG_DIR",
20
+ "HYPERFRAMES_CONFIG_DIR",
21
+ "HYPERFRAMES_ENV",
22
+ "HYPERFRAMES_OAUTH_CLIENT_ID",
23
+ "HYPERFRAMES_OAUTH_TOKEN_URL",
21
24
  "HEYGEN_API_BASE",
22
25
  "HEYGEN_ALLOW_HTTP",
23
26
  ];
@@ -61,11 +64,13 @@ test("heygenAuthHeaders tags OAuth requests as CLI traffic and with the media-us
61
64
  withCleanHeygenEnv(() => {
62
65
  const dir = mkdtempSync(join(tmpdir(), "heygen-cred-"));
63
66
  try {
64
- process.env.HEYGEN_CONFIG_DIR = dir;
67
+ process.env.HYPERFRAMES_CONFIG_DIR = dir;
65
68
  writeFileSync(
66
69
  join(dir, "credentials"),
67
70
  JSON.stringify({
68
71
  oauth: {
72
+ client_id: "Zg3LF4FCLoeJoGs2YqMtZ17g",
73
+ token_endpoint: "https://api2.heygen.com/v1/oauth/token",
69
74
  access_token: "at_test",
70
75
  expires_at: "2099-01-01T00:00:00Z",
71
76
  },
@@ -82,6 +87,31 @@ test("heygenAuthHeaders tags OAuth requests as CLI traffic and with the media-us
82
87
  });
83
88
  });
84
89
 
90
+ test("development audio uses the development client and isolated store", () => {
91
+ withCleanHeygenEnv(() => {
92
+ const dir = mkdtempSync(join(tmpdir(), "hf-dev-cred-"));
93
+ try {
94
+ process.env.HYPERFRAMES_CONFIG_DIR = dir;
95
+ process.env.HYPERFRAMES_ENV = "dev";
96
+ mkdirSync(join(dir, "dev"));
97
+ writeFileSync(
98
+ join(dir, "dev", "credentials"),
99
+ JSON.stringify({
100
+ oauth: {
101
+ access_token: "dev-at",
102
+ client_id: "9QoaiwCZov9O0cAkC4OZbR4p",
103
+ token_endpoint: "https://api2.dev.heygen.com/v1/oauth/token",
104
+ },
105
+ }),
106
+ );
107
+ assert.equal(heygenBase(), "https://api.dev.heygen.com/v3");
108
+ assert.equal(heygenAuthHeaders().Authorization, "Bearer dev-at");
109
+ } finally {
110
+ rmSync(dir, { recursive: true, force: true });
111
+ }
112
+ });
113
+ });
114
+
85
115
  test("a host-injected HEYGEN_ACCESS_TOKEN wins over an API key and is treated as OAuth", () => {
86
116
  withCleanHeygenEnv(() => {
87
117
  process.env.HEYGEN_ACCESS_TOKEN = "at_host";
@@ -106,11 +136,13 @@ test("heygenAuthMethod returns oauth for a live OAuth credential", () => {
106
136
  withCleanHeygenEnv(() => {
107
137
  const dir = mkdtempSync(join(tmpdir(), "heygen-cred-"));
108
138
  try {
109
- process.env.HEYGEN_CONFIG_DIR = dir;
139
+ process.env.HYPERFRAMES_CONFIG_DIR = dir;
110
140
  writeFileSync(
111
141
  join(dir, "credentials"),
112
142
  JSON.stringify({
113
143
  oauth: {
144
+ client_id: "Zg3LF4FCLoeJoGs2YqMtZ17g",
145
+ token_endpoint: "https://api2.heygen.com/v1/oauth/token",
114
146
  access_token: "at_test",
115
147
  expires_at: "2099-01-01T00:00:00Z",
116
148
  },
@@ -127,7 +159,7 @@ test("heygenAuthMethod returns null with no credential at all", () => {
127
159
  withCleanHeygenEnv(() => {
128
160
  const dir = mkdtempSync(join(tmpdir(), "heygen-cred-"));
129
161
  try {
130
- process.env.HEYGEN_CONFIG_DIR = dir; // no credentials file written
162
+ process.env.HYPERFRAMES_CONFIG_DIR = dir; // no credentials file written
131
163
  assert.equal(heygenAuthMethod(), null);
132
164
  } finally {
133
165
  rmSync(dir, { recursive: true, force: true });
@@ -135,6 +167,32 @@ test("heygenAuthMethod returns null with no credential at all", () => {
135
167
  });
136
168
  });
137
169
 
170
+ test("an expired or foreign OAuth login never falls back to a saved API wallet", () => {
171
+ withCleanHeygenEnv(() => {
172
+ const dir = mkdtempSync(join(tmpdir(), "hf-auth-payer-"));
173
+ try {
174
+ process.env.HYPERFRAMES_CONFIG_DIR = dir;
175
+ const credential = {
176
+ api_key: "other-wallet",
177
+ oauth: {
178
+ client_id: "Zg3LF4FCLoeJoGs2YqMtZ17g",
179
+ token_endpoint: "https://api2.heygen.com/v1/oauth/token",
180
+ access_token: "expired",
181
+ expires_at: "2000-01-01T00:00:00Z",
182
+ },
183
+ };
184
+ writeFileSync(join(dir, "credentials"), JSON.stringify(credential));
185
+ assert.deepEqual(heygenCredential(), { expired: true });
186
+ credential.oauth.expires_at = "2099-01-01T00:00:00Z";
187
+ credential.oauth.client_id = "shared-heygen-client";
188
+ writeFileSync(join(dir, "credentials"), JSON.stringify(credential));
189
+ assert.deepEqual(heygenCredential(), { expired: true });
190
+ } finally {
191
+ rmSync(dir, { recursive: true, force: true });
192
+ }
193
+ });
194
+ });
195
+
138
196
  test("loadEnvFromDir skips a .env folder and loads the .env file above it", () => {
139
197
  const root = mkdtempSync(join(tmpdir(), "heygen-env-"));
140
198
  const project = join(root, "project");
@@ -175,7 +233,7 @@ test("heygenAuthMethod returns null when the credentials path is a folder", () =
175
233
  const dir = mkdtempSync(join(tmpdir(), "heygen-cred-"));
176
234
  try {
177
235
  mkdirSync(join(dir, "credentials"));
178
- process.env.HEYGEN_CONFIG_DIR = dir;
236
+ process.env.HYPERFRAMES_CONFIG_DIR = dir;
179
237
  assert.equal(heygenAuthMethod(), null);
180
238
  } finally {
181
239
  rmSync(dir, { recursive: true, force: true });
@@ -188,7 +246,7 @@ test("heygenAuthMethod returns null when the credentials path is a symlink loop"
188
246
  const dir = mkdtempSync(join(tmpdir(), "heygen-cred-"));
189
247
  try {
190
248
  symlinkSync(join(dir, "credentials"), join(dir, "credentials"));
191
- process.env.HEYGEN_CONFIG_DIR = dir;
249
+ process.env.HYPERFRAMES_CONFIG_DIR = dir;
192
250
  assert.equal(heygenAuthMethod(), null);
193
251
  } finally {
194
252
  rmSync(dir, { recursive: true, force: true });
@@ -200,8 +258,8 @@ test("heygenAuthHeaders says to fix an unreadable credentials path, and to log i
200
258
  withCleanHeygenEnv(() => {
201
259
  const dir = mkdtempSync(join(tmpdir(), "heygen-cred-"));
202
260
  try {
203
- process.env.HEYGEN_CONFIG_DIR = dir;
204
- assert.throws(() => heygenAuthHeaders(), /no HeyGen credentials/);
261
+ process.env.HYPERFRAMES_CONFIG_DIR = dir;
262
+ assert.throws(() => heygenAuthHeaders(), /no HyperFrames credentials/);
205
263
  mkdirSync(join(dir, "credentials"));
206
264
  assert.equal(heygenCredential(), null);
207
265
  assert.throws(
@@ -276,12 +334,12 @@ test("a base that isn't HeyGen's gets no stored or host OAuth credential, only a
276
334
  withCleanHeygenEnv(() => {
277
335
  const dir = mkdtempSync(join(tmpdir(), "heygen-cred-"));
278
336
  try {
279
- process.env.HEYGEN_CONFIG_DIR = dir;
337
+ process.env.HYPERFRAMES_CONFIG_DIR = dir;
280
338
  writeFileSync(join(dir, "credentials"), JSON.stringify({ api_key: "hg_stored" }));
281
339
  process.env.HEYGEN_ACCESS_TOKEN = "at_host";
282
340
  process.env.HEYGEN_API_BASE = "https://proxy.example.com";
283
341
  assert.equal(heygenCredential(), null);
284
- assert.throws(() => heygenAuthHeaders(), /no HeyGen credentials/);
342
+ assert.throws(() => heygenAuthHeaders(), /no HyperFrames credentials/);
285
343
  // HeyGen's own hosts keep every credential source.
286
344
  process.env.HEYGEN_API_BASE = "https://api-canary.heygen.com";
287
345
  assert.equal(heygenAuthMethod(), "oauth");
@@ -2,7 +2,7 @@ import { fetchMedia } from "../../../scripts/lib/media-fetch.mjs";
2
2
  // tts.mjs — multi-provider TTS for the media audio engine. The provider chain,
3
3
  // auto-detected from env, is the one documented in ../SKILL.md:
4
4
  //
5
- // 1. HeyGen (Starfish) — $HEYGEN_API_KEY / $HYPERFRAMES_API_KEY / ~/.heygen.
5
+ // 1. HeyGen (Starfish) — $HEYGEN_API_KEY / $HYPERFRAMES_API_KEY / ~/.hyperframes.
6
6
  // Direct v3 REST (NOT `hyperframes tts`, which in the published build is
7
7
  // Kokoro-only and silently ignores a HeyGen key). Returns word_timestamps
8
8
  // in the same call, so no separate transcribe pass.
@@ -209,7 +209,7 @@ test(
209
209
  );
210
210
 
211
211
  test("pickProvider heygen with an unreadable credentials path says to fix that path", () => {
212
- const saved = ["HEYGEN_API_KEY", "HYPERFRAMES_API_KEY", "HEYGEN_CONFIG_DIR"].map((k) => [
212
+ const saved = ["HEYGEN_API_KEY", "HYPERFRAMES_API_KEY", "HYPERFRAMES_CONFIG_DIR"].map((k) => [
213
213
  k,
214
214
  process.env[k],
215
215
  ]);
@@ -217,7 +217,7 @@ test("pickProvider heygen with an unreadable credentials path says to fix that p
217
217
  try {
218
218
  delete process.env.HEYGEN_API_KEY;
219
219
  delete process.env.HYPERFRAMES_API_KEY;
220
- process.env.HEYGEN_CONFIG_DIR = dir;
220
+ process.env.HYPERFRAMES_CONFIG_DIR = dir;
221
221
  mkdirSync(join(dir, "credentials"));
222
222
  assert.throws(() => pickProvider("heygen"), /fix or remove that path/);
223
223
  } finally {
@@ -6,8 +6,11 @@ command. Instead it points you at the right local tool (decision OP1). Run the
6
6
  tool, then register the output with `resolve --from <output> --type <type>` so the
7
7
  result lands in the ledger and the global cache like any other asset.
8
8
 
9
- All tools below are local and free. ffmpeg is assumed present (it backs the
10
- engine already).
9
+ The ffmpeg and local-model operations below run locally. Direct `heygen` recipes
10
+ use the HeyGen CLI's own login and HeyGen/API billing; they do not inherit a
11
+ HyperFrames subscription. Use those recipes only when that separate payer was
12
+ selected. `hyperframes media-use resolve` uses the HyperFrames-selected credential.
13
+ ffmpeg is assumed present (it backs the engine already).
11
14
 
12
15
  ## Cut / trim: keep a slice
13
16
 
@@ -238,21 +241,19 @@ GENERATES. Two paths, best-for-the-machine picked automatically:
238
241
  ## Generate: video (`resolve --type video`, HeyGen avatar first)
239
242
 
240
243
  `resolve --type video "<intent>"` is the default path. It generates a
241
- script-driven HeyGen avatar video first (the free-usage allowance — OAuth
242
- sessions ride the web-plan free avatar-video quota where eligible, API keys
243
- follow normal API billing), falling back to local generative LTX only when
244
+ script-driven HeyGen avatar video first using the HyperFrames-selected credential
245
+ (the server decides eligibility and charges; explicit API keys use API billing), falling back to local generative LTX only when
244
246
  HeyGen is unavailable, uncredentialed, or `--local-only` is passed. The two
245
247
  are non-substitutable outputs (a real presenter vs. a generic generative
246
248
  clip), so treat the fallback as "HeyGen wasn't reachable," not "upgrade the
247
249
  quality":
248
250
 
249
- - **HeyGen avatar video (default, free for new API users):**
251
+ - **HeyGen avatar video (default):**
250
252
  The CLI-bundled provider shells the
251
253
  `heygen` CLI — never the raw API — auto-picking a public avatar and a
252
254
  starfish voice (override with `--avatar-id`/`--voice-id`, threaded through
253
255
  as `ctx.avatarId`/`ctx.voiceId`). If the CLI reports `not_authenticated`,
254
- the provider prints an onboarding recommendation (avatar video is free for
255
- new API users — sign in) to stderr and falls through to LTX instead of
256
+ the provider prints a HyperFrames sign-in recommendation to stderr and falls through to LTX instead of
256
257
  hard-failing.
257
258
  - **Local fallback: LTX 2.3 on MLX** via `dgrauet/ltx-2-mlx`, the `videogen`
258
259
  ladder bundled in the HyperFrames CLI. Generative clips
@@ -268,7 +269,8 @@ Read-only discovery (`avatar list`, `voice list`) doesn't need it.
268
269
  For structured bodies `resolve --type video` doesn't expose yet (a specific
269
270
  `avatar_id`/`voice_id` combination beyond the ctx overrides, or a
270
271
  pre-recorded `audio_url` instead of a script), the raw `heygen video create`
271
- recipe below remains the escape hatch:
272
+ recipe below remains the escape hatch. This direct command uses the separate
273
+ HeyGen CLI credential and HeyGen/API billing, not the HyperFrames subscription:
272
274
 
273
275
  ```bash
274
276
  # discover an avatar + a starfish voice, then create + wait
@@ -1,15 +1,15 @@
1
1
  # Setup and providers — install, auth, RAM ladders, forcing a provider
2
2
 
3
- ## Setup — install heygen first (free-usage path)
3
+ ## Setup — install the helper and sign in to HyperFrames
4
4
 
5
5
  Install the HeyGen CLI through its [verified release instructions](https://developers.heygen.com/cli), then run:
6
6
 
7
7
  ```bash
8
- heygen update # free usage needs the OAuth-capable CLI (v0.3.0+)
9
- heygen auth login --oauth # OAuth = free subscription credits; --api-key bills API credits
8
+ heygen update # requires v0.3.0+
9
+ npx hyperframes auth login # dedicated HyperFrames OAuth session
10
10
  ```
11
11
 
12
- This unlocks the FREE path for bgm/image/icon catalog search, TTS (voice), and avatar videos. Sign in with `--oauth` — the free allowance rides on the OAuth session (an API key bills API credits instead). **media-use requires heygen >= v0.3.0 uniformly** (the OAuth free-usage path needs it), so `--doctor` nudges older CLIs to update even for API-key-only use. Before resolving anything, verify setup with:
12
+ HyperFrames owns the OAuth session in `~/.hyperframes/credentials` and supplies an access-only temporary credential to the HeyGen helper. Signing into `heygen` separately does not configure this path. The server decides subscription eligibility, free allowances and charges; an explicit API key uses API billing. **media-use requires heygen >= v0.3.0 uniformly.** Verify setup with:
13
13
 
14
14
  ```bash
15
15
  npx hyperframes media-use resolve --doctor
@@ -30,25 +30,25 @@ message (for example "add a key in Settings > Account") as written.
30
30
 
31
31
  ## Providers
32
32
 
33
- media-use holds no keys; every external tool owns its auth. Generation is
34
- centered on the HeyGen CLI free-usage path. Install and authenticate `heygen`
35
- before resolving bgm/sfx/image/icon/voice/avatar-video; music and sound effects from
33
+ HyperFrames selects the credential for its HeyGen media helpers. Install
34
+ `heygen` and sign in with `hyperframes auth login` before resolving
35
+ bgm/sfx/image/icon/voice/avatar-video; music and sound effects from
36
36
  a host app's own tools need none of it. Local tools are opt-in
37
37
  alternatives where they exist: mflux for image, Kokoro for voice, Parakeet for
38
38
  transcription, and LTX for local video generation. `resolve` spec-checks
39
39
  AVAILABLE RAM for those local ladders inside the CLI (the image tiers are listed
40
40
  in `references/operations.md`).
41
41
 
42
- | Type | Provider / path |
43
- | --------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
44
- | bgm | heygen catalog free-usage path; a host app's own music tools come first |
45
- | sfx | Openverse (CC0 / CC BY, no account), bundled library offline; a host app's own sound tools come first |
46
- | image | heygen search free-usage path; optional local mflux; codex `image_gen` upsell |
47
- | voice | heygen tts free-usage path; optional local **Kokoro** (free, on-device) |
48
- | icon | heygen asset search free-usage path |
49
- | logo | theSVG (thesvg.org), then GitHub org avatar, then domain favicon (all free) |
50
- | grade/lut | local core-preset map, params/CDN look index, deterministic `buildCube` fallback |
51
- | video | heygen avatar video free-usage path (sign-in nudge on auth failure); optional local LTX (`videogen` ladder). Image-to-video / photo-avatar / dub stay manual `heygen` recipes |
42
+ | Type | Provider / path |
43
+ | --------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
44
+ | bgm | heygen catalog HyperFrames-authenticated path; a host app's own music tools come first |
45
+ | sfx | Openverse (CC0 / CC BY, no account), bundled library offline; a host app's own sound tools come first |
46
+ | image | heygen search HyperFrames-authenticated path; optional local mflux; codex `image_gen` upsell |
47
+ | voice | heygen tts HyperFrames-authenticated path; optional local **Kokoro** (free, on-device) |
48
+ | icon | heygen asset search HyperFrames-authenticated path |
49
+ | logo | theSVG (thesvg.org), then GitHub org avatar, then domain favicon (all free) |
50
+ | grade/lut | local core-preset map, params/CDN look index, deterministic `buildCube` fallback |
51
+ | video | heygen avatar video HyperFrames-authenticated path (sign-in nudge on auth failure); optional local LTX (`videogen` ladder). Image-to-video / photo-avatar / dub stay manual `heygen` recipes |
52
52
 
53
53
  Local Kokoro (voice), mflux (image), and LTX (video) run on-device (free,
54
54
  private, offline once cached). The `codex` CLI remains the ChatGPT-sub image
@@ -58,31 +58,31 @@ allowance) so an agent-initiated `resolve --type video` confirms first.
58
58
 
59
59
  To force a specific generator (e.g. a user says "make this image with codex"),
60
60
  pass `--provider codex`: it pins resolution to that provider and skips the
61
- free-usage default. See `references/operations.md` for the RAM ladders and
61
+ default provider. See `references/operations.md` for the RAM ladders and
62
62
  provider recipes.
63
63
 
64
- `--local-only` skips every network provider, including the free HeyGen ones,
64
+ `--local-only` skips every network provider, including HeyGen,
65
65
  leaving the project + global cache and any installed local provider. For
66
66
  HeyGen-only types, that means no fresh resolve.
67
67
 
68
68
  ## CLI tools used (what to run, and how to enable each)
69
69
 
70
70
  `resolve` auto-cascades; each provider shells one CLI. HeyGen is the
71
- free-usage path for bgm/image/icon catalog search, TTS (voice), and avatar
72
- video, so those capabilities need `heygen` installed and authenticated. Local
71
+ HyperFrames-authenticated path for bgm/image/icon catalog search, TTS (voice), and avatar
72
+ video, so those capabilities need `heygen` installed and a HyperFrames login. Local
73
73
  tools are OPT-IN alternatives where they exist; install one to unlock its free,
74
74
  private, on-device path instead of or ahead of HeyGen for that type. Only
75
75
  `ffmpeg`/`ffprobe` are strictly required for the tool to run at all.
76
76
 
77
- | Tool | Serves | Install |
78
- | ------------------ | --------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
79
- | `ffmpeg`/`ffprobe` | adopt probing, smart-grade signalstats, cut, duck bake, loudnorm | system package (`brew install ffmpeg`) |
80
- | `heygen` | catalog (bgm/image/icon) + TTS (voice) + avatar video — the free-usage path | install through [verified HeyGen release instructions](https://developers.heygen.com/cli), then `heygen auth login --oauth` (needs >= v0.3.0) |
81
- | `mflux-generate` | local image gen (FLUX), best-for-RAM | `uv venv ~/.venvs/mflux && VIRTUAL_ENV=~/.venvs/mflux uv pip install mflux==0.9.6` |
82
- | `codex` | image gen upsell (ChatGPT sub) | Codex CLI, logged in via ChatGPT (owns its own auth) |
83
- | `parakeet-mlx` | local transcription (default ASR, best) on Apple Silicon | `uv venv ~/.venvs/parakeet && VIRTUAL_ENV=~/.venvs/parakeet uv pip install parakeet-mlx` |
84
- | `ltx-2-mlx` | local video gen | `git clone https://github.com/dgrauet/ltx-2-mlx && cd ltx-2-mlx && uv sync --all-extras` |
85
- | `npx hyperframes` | Kokoro TTS (voice), Parakeet or whisper.cpp (transcribe), remove-background | via the hyperframes CLI; Parakeet on macOS, Windows and glibc 2.32+ Linux: `npx hyperframes models install parakeet`; whisper.cpp is built on first use (Homebrew on macOS, else git+cmake) |
77
+ | Tool | Serves | Install |
78
+ | ------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
79
+ | `ffmpeg`/`ffprobe` | adopt probing, smart-grade signalstats, cut, duck bake, loudnorm | system package (`brew install ffmpeg`) |
80
+ | `heygen` | catalog (bgm/image/icon) + TTS (voice) + avatar video — the HyperFrames-authenticated path | install through [verified HeyGen release instructions](https://developers.heygen.com/cli), then `npx hyperframes auth login` (helper needs >= v0.3.0) |
81
+ | `mflux-generate` | local image gen (FLUX), best-for-RAM | `uv venv ~/.venvs/mflux && VIRTUAL_ENV=~/.venvs/mflux uv pip install mflux==0.9.6` |
82
+ | `codex` | image gen upsell (ChatGPT sub) | Codex CLI, logged in via ChatGPT (owns its own auth) |
83
+ | `parakeet-mlx` | local transcription (default ASR, best) on Apple Silicon | `uv venv ~/.venvs/parakeet && VIRTUAL_ENV=~/.venvs/parakeet uv pip install parakeet-mlx` |
84
+ | `ltx-2-mlx` | local video gen | `git clone https://github.com/dgrauet/ltx-2-mlx && cd ltx-2-mlx && uv sync --all-extras` |
85
+ | `npx hyperframes` | Kokoro TTS (voice), Parakeet or whisper.cpp (transcribe), remove-background | via the hyperframes CLI; Parakeet on macOS, Windows and glibc 2.32+ Linux: `npx hyperframes models install parakeet`; whisper.cpp is built on first use (Homebrew on macOS, else git+cmake) |
86
86
 
87
87
  The RAM-graded local-model shortlist + exact per-tier install/invoke lives in
88
88
  the CLI's bundled media-use engine, not in the standalone skill. Without a tool on PATH, its provider
@@ -10,8 +10,8 @@ export const HEYGEN_MIN_VERSION = "0.3.0";
10
10
  // installer text out of the runtime module; the docs are the safer source of
11
11
  // truth for platform-specific setup.
12
12
  export const HEYGEN_INSTALL_COMMAND =
13
- "Install the CLI from https://developers.heygen.com/cli, then run: heygen auth login --oauth";
14
- export const HEYGEN_AUTH_COMMAND = "heygen auth login --oauth";
13
+ "Install the CLI from https://developers.heygen.com/cli, then run: hyperframes auth login";
14
+ export const HEYGEN_AUTH_COMMAND = "hyperframes auth login";
15
15
  export const HEYGEN_UPDATE_COMMAND = "heygen update";
16
16
  export const HEYGEN_CLIENT_SOURCE_ARGV = ["--headers", "X-HeyGen-Client-Source: media-use"];
17
17
 
@@ -143,7 +143,8 @@ export function heygenUserId(username) {
143
143
  // casing never splits one person). `heygen_username` is the cross-project join
144
144
  // column for the Snowflake event table.
145
145
  function heygenAccount() {
146
- const file = join(process.env.HEYGEN_CONFIG_DIR || join(homedir(), ".heygen"), "credentials");
146
+ const root = process.env.HYPERFRAMES_CONFIG_DIR || join(homedir(), ".hyperframes");
147
+ const file = join(root, ...(process.env.HYPERFRAMES_ENV === "dev" ? ["dev"] : []), "credentials");
147
148
  try {
148
149
  if (!existsSync(file)) return null;
149
150
  const raw = readFileSync(file, "utf8").trim();
@@ -19,6 +19,8 @@ function sandbox() {
19
19
  const home = join(root, "home");
20
20
  mkdirSync(home, { recursive: true });
21
21
  process.env.HOME = home;
22
+ delete process.env.HYPERFRAMES_CONFIG_DIR;
23
+ delete process.env.HYPERFRAMES_ENV;
22
24
  process.env.HYPERFRAMES_MEDIA_HOME = home;
23
25
  return { root, home };
24
26
  }
@@ -181,9 +183,9 @@ test("track identifies a signed-in HeyGen account once and still sends events",
181
183
  join(home, ".hyperframes/config.json"),
182
184
  JSON.stringify({ anonymousId: "anon-1" }),
183
185
  );
184
- mkdirSync(join(home, ".heygen"), { recursive: true });
186
+ mkdirSync(join(home, ".hyperframes"), { recursive: true });
185
187
  writeFileSync(
186
- join(home, ".heygen/credentials"),
188
+ join(home, ".hyperframes/credentials"),
187
189
  JSON.stringify({
188
190
  api_key: "hg_test",
189
191
  user: { email: "alice@example.com", username: "alice" },
@@ -217,6 +219,49 @@ test("track identifies a signed-in HeyGen account once and still sends events",
217
219
  }
218
220
  });
219
221
 
222
+ test("track uses the selected dev HyperFrames account instead of a HeyGen or production login", async () => {
223
+ const savedEnv = { ...process.env };
224
+ const originalFetch = globalThis.fetch;
225
+ const { root, home } = sandbox();
226
+ const calls = [];
227
+ globalThis.fetch = async (url, options) => {
228
+ calls.push({ url, options });
229
+ return { ok: true };
230
+ };
231
+ try {
232
+ withoutTelemetryOptOut();
233
+ process.env.HYPERFRAMES_CONFIG_DIR = join(home, "hf-auth");
234
+ process.env.HYPERFRAMES_ENV = "dev";
235
+ process.env.HEYGEN_CONFIG_DIR = join(home, "heygen");
236
+ for (const [dir, email] of [
237
+ [process.env.HEYGEN_CONFIG_DIR, "other@example.com"],
238
+ [process.env.HYPERFRAMES_CONFIG_DIR, "prod@example.com"],
239
+ [join(process.env.HYPERFRAMES_CONFIG_DIR, "dev"), "dev@example.com"],
240
+ ]) {
241
+ mkdirSync(dir, { recursive: true });
242
+ writeFileSync(
243
+ join(dir, "credentials"),
244
+ JSON.stringify({
245
+ oauth: { access_token: "test-access" },
246
+ user: { email, username: email },
247
+ }),
248
+ );
249
+ }
250
+ await track("media_use_resolve", { type: "voice" });
251
+ const identify = parseFetchBodies(calls).filter((item) => item.event === "$identify");
252
+ assert.equal(identify.length, 1);
253
+ assert.equal(identify[0].properties.$set.heygen_username, "dev@example.com");
254
+ const event = parseFetchBodies(calls).find((item) => item.event === "media_use_resolve");
255
+ assert.equal(event.properties.heygen_username, "dev@example.com");
256
+ assert.equal(event.distinct_id, identify[0].distinct_id);
257
+ } finally {
258
+ globalThis.fetch = originalFetch;
259
+ restoreEnv(savedEnv);
260
+ rmSync(root, { recursive: true, force: true });
261
+ __resetTelemetryForTest();
262
+ }
263
+ });
264
+
220
265
  test("track falls back to a lowercased email when the account has no username", async () => {
221
266
  const savedEnv = { ...process.env };
222
267
  const originalFetch = globalThis.fetch;
@@ -233,9 +278,9 @@ test("track falls back to a lowercased email when the account has no username",
233
278
  join(home, ".hyperframes/config.json"),
234
279
  JSON.stringify({ anonymousId: "anon-3" }),
235
280
  );
236
- mkdirSync(join(home, ".heygen"), { recursive: true });
281
+ mkdirSync(join(home, ".hyperframes"), { recursive: true });
237
282
  writeFileSync(
238
- join(home, ".heygen/credentials"),
283
+ join(home, ".hyperframes/credentials"),
239
284
  JSON.stringify({ api_key: "hg_test", user: { email: "Alice@Example.com" } }),
240
285
  );
241
286
 
@@ -15,13 +15,13 @@ import {
15
15
  } from "./chunk-6BEFEWFB.js";
16
16
  import {
17
17
  trackSkillsInstallSkipped
18
- } from "./chunk-QY7RG6K3.js";
19
- import "./chunk-KLGJ2R4V.js";
18
+ } from "./chunk-NEVX7YHH.js";
19
+ import "./chunk-K7APBNPW.js";
20
20
  import "./chunk-PXVQOMKL.js";
21
21
  import {
22
22
  diag
23
23
  } from "./chunk-EQGKUPBJ.js";
24
- import "./chunk-4WEWHZZO.js";
24
+ import "./chunk-VLA6UJGH.js";
25
25
  import {
26
26
  defineCommand
27
27
  } from "./chunk-DL4OD7IA.js";
@@ -43,10 +43,10 @@ import {
43
43
  isCoreSkill,
44
44
  presentSkills,
45
45
  retiredSkillNotice
46
- } from "./chunk-4JHZBIBW.js";
46
+ } from "./chunk-5XOOBNU2.js";
47
47
  import {
48
48
  withMeta
49
- } from "./chunk-H47FQDFU.js";
49
+ } from "./chunk-OURH3TLX.js";
50
50
  import "./chunk-BR2JQQC5.js";
51
51
  import "./chunk-BLBMPEBX.js";
52
52
  import "./chunk-ISN5GRYI.js";
@@ -60,7 +60,7 @@ import {
60
60
  } from "./chunk-DP5LF7GF.js";
61
61
  import "./chunk-J3RXEDR2.js";
62
62
  import "./chunk-QBXDU24O.js";
63
- import "./chunk-OV6MUGZI.js";
63
+ import "./chunk-FGGZKCOT.js";
64
64
  import "./chunk-E63BDV4Z.js";
65
65
  import "./chunk-G7VEYUZ2.js";
66
66
  import "./chunk-XT6MXC7A.js";
@@ -9,8 +9,8 @@ import {
9
9
  printSkillsUpdateNotice,
10
10
  refreshSkillsCache,
11
11
  skillsCheckDue
12
- } from "./chunk-4JHZBIBW.js";
13
- import "./chunk-H47FQDFU.js";
12
+ } from "./chunk-5XOOBNU2.js";
13
+ import "./chunk-OURH3TLX.js";
14
14
  import "./chunk-BR2JQQC5.js";
15
15
  import "./chunk-BLBMPEBX.js";
16
16
  import "./chunk-ISN5GRYI.js";
@@ -18,7 +18,7 @@ import "./chunk-SJGE5I5F.js";
18
18
  import "./chunk-DP5LF7GF.js";
19
19
  import "./chunk-J3RXEDR2.js";
20
20
  import "./chunk-QBXDU24O.js";
21
- import "./chunk-OV6MUGZI.js";
21
+ import "./chunk-FGGZKCOT.js";
22
22
  import "./chunk-E63BDV4Z.js";
23
23
  import "./chunk-G7VEYUZ2.js";
24
24
  import "./chunk-XT6MXC7A.js";