hyperframes 0.8.217 → 0.8.219
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.
- package/dist/{add-AXTSRFNT.js → add-2MXC4QCY.js} +6 -6
- package/dist/{agentPromptGenerator-52346WSZ.js → agentPromptGenerator-FIT75HWJ.js} +5 -5
- package/dist/{animatedGifPrep-WZHO7ZUA.js → animatedGifPrep-MFUNECD3.js} +5 -5
- package/dist/api.js +16 -16
- package/dist/{asset-T2CE34TV.js → asset-T6BI53SJ.js} +2 -2
- package/dist/{assetCataloger-2KABZLU3.js → assetCataloger-DP4SHXWI.js} +6 -6
- package/dist/{audio-6I2AK3TZ.js → audio-SRQLO7BP.js} +14 -14
- package/dist/{auth-B3LLOMAG.js → auth-JONDB26P.js} +8 -7
- package/dist/{autoUpdate-TTY4BTMM.js → autoUpdate-YKJOOXCI.js} +2 -2
- package/dist/{backgroundChecks-WKW5CTCV.js → backgroundChecks-GSTIIVNR.js} +3 -3
- package/dist/backgroundChecksWorker.js +3 -3
- package/dist/{beats-5WAAC5HT.js → beats-OOVMTM4B.js} +9 -9
- package/dist/{benchmark-KFYDNWZ7.js → benchmark-WBFYHOSI.js} +7 -7
- package/dist/{browser-LK4FYQXO.js → browser-AZZAO24H.js} +5 -5
- package/dist/{bundleWithLocalizedFonts-NRY45OIW.js → bundleWithLocalizedFonts-GP4MD6DJ.js} +2 -2
- package/dist/{capture-DXRZI2WW.js → capture-MGRV5VWE.js} +11 -11
- package/dist/{capture-SCXKM2WO.js → capture-PN7GEEAB.js} +3 -3
- package/dist/{captureCompositionFrame-NDQEZBHR.js → captureCompositionFrame-JYGGPKFZ.js} +8 -8
- package/dist/{catalog-7WRGMHVI.js → catalog-D42NLFZT.js} +6 -6
- package/dist/{catch-up-6QEJHTFF.js → catch-up-TUL26VOB.js} +5 -5
- package/dist/{check-HNONMHQD.js → check-DBBH7DI3.js} +30 -30
- package/dist/{checkAudio-OLNSZWWX.js → checkAudio-UJ7XTDRD.js} +8 -8
- package/dist/{checkBrowser-L2L2EEJD.js → checkBrowser-3YIZYXIR.js} +24 -24
- package/dist/{chunk-6YGTOBXW.js → chunk-2UT32TJS.js} +1 -1
- package/dist/{chunk-4JHZBIBW.js → chunk-33XQUQKN.js} +1 -1
- package/dist/{chunk-UGQFQDSV.js → chunk-35JKCWYI.js} +1 -1
- package/dist/{chunk-2Q4CL6AB.js → chunk-3KDODK5M.js} +4 -1
- package/dist/{chunk-OQRO2MEK.js → chunk-3MTNYVWM.js} +2 -2
- package/dist/{chunk-YQY4KVP4.js → chunk-3VIICMJF.js} +1 -1
- package/dist/{chunk-PNBH4ZY7.js → chunk-473HMKSC.js} +2 -2
- package/dist/{chunk-CH4RRRGC.js → chunk-4OWVRHSV.js} +5 -5
- package/dist/{chunk-K2666FKT.js → chunk-542VETC5.js} +1 -1
- package/dist/{chunk-2JUNPJUM.js → chunk-576ATOOU.js} +2 -2
- package/dist/{chunk-UQSBVZ3H.js → chunk-5UIODBMI.js} +7 -4
- package/dist/{chunk-VS7G457O.js → chunk-64MFJSGZ.js} +1 -1
- package/dist/{chunk-H47FQDFU.js → chunk-7ZRXSZF6.js} +1 -1
- package/dist/{chunk-VAS6HQX3.js → chunk-BIROA7JM.js} +32 -3
- package/dist/{chunk-ESZ6YPQM.js → chunk-BKHRAHV6.js} +2 -2
- package/dist/{chunk-DEWCAOOL.js → chunk-BRU66Q24.js} +2 -2
- package/dist/{chunk-KH5XMMSM.js → chunk-BT5UT4XT.js} +2 -2
- package/dist/{chunk-XN22HGE7.js → chunk-C2G23WQQ.js} +1 -1
- package/dist/{chunk-3MUFCWGK.js → chunk-CBZN5JIK.js} +3 -3
- package/dist/{chunk-3C6O5HV2.js → chunk-CPKBAMI3.js} +12 -12
- package/dist/{chunk-OV6MUGZI.js → chunk-DMUDI5IH.js} +2 -2
- package/dist/{chunk-5HGUY24Y.js → chunk-DWMI7CKI.js} +1 -1
- package/dist/{chunk-JY27IRDR.js → chunk-FAIFPYRO.js} +1 -1
- package/dist/{chunk-3YCAGPZK.js → chunk-FC7QIE5X.js} +21 -21
- package/dist/{chunk-NWD2KKM5.js → chunk-FWWJRJB5.js} +1 -1
- package/dist/{chunk-WKNWKORX.js → chunk-G2E2DHH2.js} +3 -3
- package/dist/{chunk-QRIC4WOO.js → chunk-G7ZTD2KJ.js} +9 -3
- package/dist/{chunk-R7EB4M5P.js → chunk-GGDVZ7O4.js} +9 -9
- package/dist/{chunk-QY7RG6K3.js → chunk-GP5X7V6U.js} +1 -1
- package/dist/{chunk-L4BRJVGC.js → chunk-IGZHC55Z.js} +2 -2
- package/dist/{chunk-62ER6HGC.js → chunk-ILCIWNPQ.js} +1 -1
- package/dist/{chunk-7VZEOCUY.js → chunk-J74ZUXVU.js} +1 -1
- package/dist/{chunk-5SZ2HRCW.js → chunk-JH2AO4ZW.js} +1 -1
- package/dist/{chunk-5CXGDO74.js → chunk-KENUKJRG.js} +2 -2
- package/dist/{chunk-P42DLWIY.js → chunk-KK5MZQXG.js} +2 -2
- package/dist/{chunk-URKDBFZV.js → chunk-KUQOUWJ4.js} +2 -2
- package/dist/{chunk-ST5EBZTO.js → chunk-LGMRZWJS.js} +9 -3
- package/dist/{chunk-O44FYXH5.js → chunk-LIWBGRPD.js} +2 -2
- package/dist/{chunk-Z3HHAFEP.js → chunk-LJUFR7G5.js} +4 -4
- package/dist/{chunk-UVXIJYZY.js → chunk-MESSJFK3.js} +249 -298
- package/dist/{chunk-JF3RF6GS.js → chunk-MHZB6QSC.js} +1 -1
- package/dist/{chunk-CBCZBHGK.js → chunk-NHXGFQWQ.js} +2 -2
- package/dist/{chunk-WGHUHNXI.js → chunk-NP2QEAEW.js} +7 -7
- package/dist/{chunk-JMGMOK4Z.js → chunk-O7YOS36L.js} +12 -5
- package/dist/{chunk-W2LKSBX5.js → chunk-QE5JXNSW.js} +24 -17
- package/dist/{chunk-KLGJ2R4V.js → chunk-QEKP7XCN.js} +2 -2
- package/dist/{chunk-TCVI4ZGS.js → chunk-TCV7N2UY.js} +1 -1
- package/dist/{chunk-5XDKFCEI.js → chunk-TNQ4SSTR.js} +6 -6
- package/dist/{chunk-G35NVFZF.js → chunk-U2EUCTYQ.js} +4 -4
- package/dist/{chunk-RLT45AWC.js → chunk-UDBW6TK4.js} +1 -1
- package/dist/{chunk-V4AS2BNU.js → chunk-UGDLT4LZ.js} +3 -3
- package/dist/{chunk-HPRR3WD7.js → chunk-UR6L2DXM.js} +14 -10
- package/dist/chunk-VLA6UJGH.js +139 -0
- package/dist/{chunk-64TWYU4M.js → chunk-VO7IEWOH.js} +5 -5
- package/dist/{chunk-MK4R3APQ.js → chunk-VP5KECBU.js} +1 -1
- package/dist/{chunk-UZPWLXO6.js → chunk-WUABYDXU.js} +1 -1
- package/dist/{chunk-MGZKDR6R.js → chunk-XUOLKUE7.js} +1 -1
- package/dist/{chunk-EAUUGY4R.js → chunk-XUTPVELE.js} +3 -3
- package/dist/{chunk-42K4JLQO.js → chunk-XXLG7GCA.js} +1 -1
- package/dist/{chunk-PPMLF76Z.js → chunk-YSTBSLWY.js} +1 -1
- package/dist/{chunk-TDNZIFJ2.js → chunk-YXZ56JUN.js} +2 -2
- package/dist/{chunk-LPJMACTI.js → chunk-Z537IJJH.js} +4 -4
- package/dist/{clean-2CK4S5ES.js → clean-YERX334S.js} +16 -16
- package/dist/cli.js +53 -53
- package/dist/{cloud-QRSJMVGW.js → cloud-5XFWROJK.js} +4 -4
- package/dist/commands/layout-audit.browser.js +25 -1
- package/dist/{compare-ASV5QBD2.js → compare-THYM62NL.js} +21 -21
- package/dist/{compiler-CG2EXM75.js → compiler-SLKHXYCO.js} +3 -3
- package/dist/{component-24XLTKUQ.js → component-N4FFNYA5.js} +3 -3
- package/dist/{compositions-AN7ETEKG.js → compositions-XCM3Z65K.js} +10 -10
- package/dist/{delete-OMKQ3XTL.js → delete-6PIKDOKV.js} +6 -6
- package/dist/{deploy-3M6QRT2H.js → deploy-PT77AP6G.js} +1 -1
- package/dist/{dist-KXFW5H5Q.js → dist-XXBCSQYF.js} +2 -2
- package/dist/{doctor-ABYFP2LY.js → doctor-KLDSXKUM.js} +10 -10
- package/dist/{events-P5AFL2VZ.js → events-KEJFQQDQ.js} +4 -4
- package/dist/{events-64QVWKTU.js → events-OHISH3KL.js} +3 -3
- package/dist/{feedback-LQ2TT4XL.js → feedback-VTLWYGLQ.js} +9 -9
- package/dist/{ffmpeg-Y6NMFQ5J.js → ffmpeg-SG3AYA6M.js} +5 -5
- package/dist/{figma-R75KTFW4.js → figma-5AHFOYPG.js} +3 -3
- package/dist/fontLocalizeCli.js +8 -8
- package/dist/{get-KB67C2T7.js → get-5VTBUZIR.js} +6 -6
- package/dist/{gpuPolicy-4ERRTA5U.js → gpuPolicy-ODODH5JV.js} +5 -5
- package/dist/{grade-compare-NPVETP7T.js → grade-compare-25HQJORH.js} +22 -22
- package/dist/{heifImagePrep-ABLYQMTO.js → heifImagePrep-SPBGWX2L.js} +6 -6
- package/dist/{help-ZNJG5OJO.js → help-3AZ4ZSWZ.js} +1 -1
- package/dist/{history-HUBQPMLX.js → history-KZFZ2MJI.js} +7 -7
- package/dist/hyperframes-player.global.js +1 -1
- package/dist/{info-KDSQGWE5.js → info-XNYSD2SN.js} +6 -6
- package/dist/{init-QEPNUQB2.js → init-C76MX2UE.js} +23 -23
- package/dist/{inspect-27GJ5ZUI.js → inspect-OWDJTC64.js} +22 -22
- package/dist/{keyframes-E2NNHMNK.js → keyframes-ZBIWACNT.js} +7 -7
- package/dist/{lambda-QQ2VVPRQ.js → lambda-XS3E4XSL.js} +6 -6
- package/dist/{layout-NQQZ5KR7.js → layout-HLU3IVDX.js} +22 -22
- package/dist/{lint-DUYKX36O.js → lint-DUJ5PM56.js} +9 -9
- package/dist/{lintProject-SZIPPOJR.js → lintProject-I4XPWIQZ.js} +2 -2
- package/dist/{list-HIZY6RSP.js → list-KRDQLHDH.js} +6 -6
- package/dist/{localPage-U2RMKIMN.js → localPage-KXNSCQIQ.js} +5 -5
- package/dist/{login-CLP2ZTEW.js → login-4P7LCOB5.js} +9 -8
- package/dist/{logout-CXGSSQ4Q.js → logout-6VFJ7WMW.js} +4 -4
- package/dist/{manager-LXWVBDLM.js → manager-I4ROBMYK.js} +1 -1
- package/dist/{manager-CXRLWAKH.js → manager-USFB6SE2.js} +6 -6
- package/dist/{media-treatment-GSWIAGS4.js → media-treatment-JOZB3MTT.js} +12 -12
- package/dist/{media-use-ZRHFRO46.js → media-use-ZNTB7W6N.js} +85 -10
- package/dist/{models-TPHYQXOL.js → models-RZRXHIER.js} +9 -9
- package/dist/{motionShot-7UX4TKHZ.js → motionShot-3SHLRT3L.js} +12 -12
- package/dist/{normalize-audio-WBTJDFS7.js → normalize-audio-SL2ATLJM.js} +16 -10
- package/dist/{open-P7Z2PIPR.js → open-TCGY4NB2.js} +5 -5
- package/dist/{parakeetRunner-F2OX525D.js → parakeetRunner-ZBO4LR7M.js} +11 -11
- package/dist/{pipeline-2ZDZGL4J.js → pipeline-7D36B3FW.js} +8 -8
- package/dist/{play-YCH7MRNX.js → play-CTBPJFBX.js} +15 -15
- package/dist/{preflight-MTMSPVCR.js → preflight-GFWIOUO3.js} +7 -7
- package/dist/{present-L4HNZ2HU.js → present-GXOHUNFP.js} +15 -15
- package/dist/{preview-RWX74O5J.js → preview-BWCEXEII.js} +12 -12
- package/dist/{producer-UI4FXLPQ.js → producer-UME4Q4HH.js} +1 -1
- package/dist/{publish-T56AYTZU.js → publish-ZGW46SKV.js} +9 -9
- package/dist/{refresh-VJ4FQVH2.js → refresh-I6ITGHKL.js} +5 -4
- package/dist/{remove-background-4Y56FLXV.js → remove-background-YSJ7XFPQ.js} +9 -9
- package/dist/{render-IJ7L24RF.js → render-Q2VLJGFV.js} +27 -27
- package/dist/{render-UBDIHGEG.js → render-QFIWTDK3.js} +18 -18
- package/dist/renderSetupWorker.js +3 -3
- package/dist/{sherpa-6GOUBSP2.js → sherpa-YKK3LRSI.js} +10 -10
- package/dist/skills/hyperframes-cli/references/cloud.md +4 -4
- package/dist/skills/media-use/SKILL.md +3 -1
- package/dist/skills/media-use/audio/references/bgm.md +1 -1
- package/dist/skills/media-use/audio/references/requirements.md +9 -9
- package/dist/skills/media-use/audio/references/tts.md +11 -11
- package/dist/skills/media-use/audio/scripts/gemini-pipeline.test.mjs +1 -1
- package/dist/skills/media-use/audio/scripts/heygen-tts.mjs +1 -1
- package/dist/skills/media-use/audio/scripts/lib/audio-meta.test.mjs +1 -1
- package/dist/skills/media-use/audio/scripts/lib/heygen.mjs +23 -7
- package/dist/skills/media-use/audio/scripts/lib/heygen.test.mjs +68 -10
- package/dist/skills/media-use/audio/scripts/lib/tts.mjs +1 -1
- package/dist/skills/media-use/audio/scripts/lib/tts.test.mjs +2 -2
- package/dist/skills/media-use/references/operations.md +11 -9
- package/dist/skills/media-use/references/setup-providers.md +30 -30
- package/dist/skills/media-use/scripts/lib/heygen-cli.mjs +2 -2
- package/dist/skills/media-use/scripts/lib/telemetry.mjs +2 -1
- package/dist/skills/media-use/scripts/lib/telemetry.test.mjs +49 -4
- package/dist/{skills-MAJGGJKJ.js → skills-5ENIWSB2.js} +6 -6
- package/dist/{skillsUpdateCheck-X6AIBUUG.js → skillsUpdateCheck-7GDJNW5A.js} +3 -3
- package/dist/{snapshot-JKKWQSMQ.js → snapshot-O3JXB3VM.js} +26 -26
- package/dist/{src-LAO5IGRI.js → src-6T5KES5G.js} +4 -4
- package/dist/{src-RIL5PHI6.js → src-MT7UQJT5.js} +7 -7
- package/dist/{staticProjectServer-YF5AZXGR.js → staticProjectServer-UP22EGMU.js} +11 -11
- package/dist/{status-TJFZFDGS.js → status-63BKLDVW.js} +40 -11
- package/dist/studio/assets/{hyperframes-player-Cf9gtxqa.js → hyperframes-player-B83GGznX.js} +1 -1
- package/dist/studio/assets/{index-zVoFhoyD.js → index-B9gVTopE.js} +4 -4
- package/dist/studio/assets/{index-CW5fPxU8.js → index-Ca_tSAqR.js} +1 -1
- package/dist/studio/index.html +1 -1
- package/dist/{studio-api-Q2U6752S.js → studio-api-Q6KSNU77.js} +8 -8
- package/dist/{studioServer-SPU4MINT.js → studioServer-44OR56TK.js} +36 -36
- package/dist/{telemetry-W7CBBWIN.js → telemetry-2N7DLYCQ.js} +4 -4
- package/dist/{timeline-L26OBLW2.js → timeline-MT56A3HB.js} +16 -16
- package/dist/{tokens-PNNCTOYV.js → tokens-V6O4I5IX.js} +2 -2
- package/dist/{transcribe-PPZFOWMB.js → transcribe-GGV4YEF3.js} +9 -9
- package/dist/{transcribe-XZCZTOPU.js → transcribe-ZCJ6WB6R.js} +16 -16
- package/dist/{updateCheck-SNRZKRO2.js → updateCheck-ZBBUGX3A.js} +2 -2
- package/dist/{upgrade-WEU5MYWF.js → upgrade-L7SM3TPB.js} +2 -2
- package/dist/{urlDownloader-55NQFDIH.js → urlDownloader-HTBT6K5N.js} +4 -4
- package/dist/{validate-4QEMOBFD.js → validate-WXKYRV2E.js} +20 -20
- package/dist/{video-VYOWJDYM.js → video-JH5WQC2I.js} +6 -6
- package/dist/warmCheck.js +30 -30
- package/package.json +1 -1
- package/dist/chunk-4WEWHZZO.js +0 -24
|
@@ -3,8 +3,8 @@ import { fetchMedia } from "../../../scripts/lib/media-fetch.mjs";
|
|
|
3
3
|
// pipeline. The credential resolver matches the hyperframes CLI auth: first
|
|
4
4
|
// usable source wins — a host gateway ($HEYGEN_API_BASE with its own
|
|
5
5
|
// $HEYGEN_API_KEY) → a host-injected OAuth $HEYGEN_ACCESS_TOKEN (Bearer) →
|
|
6
|
-
// $HEYGEN_API_KEY / $HYPERFRAMES_API_KEY → a nearby .env → ~/.
|
|
7
|
-
// credentials (
|
|
6
|
+
// $HEYGEN_API_KEY / $HYPERFRAMES_API_KEY → a nearby .env → ~/.hyperframes/
|
|
7
|
+
// credentials (OAuth never falls back to an API key; $HYPERFRAMES_CONFIG_DIR
|
|
8
8
|
// overrides the dir). $HEYGEN_API_BASE moves every request to that host, as it
|
|
9
9
|
// does for the heygen CLI; plain HTTP needs $HEYGEN_ALLOW_HTTP=1, as there.
|
|
10
10
|
// Vendored so the skill ships standalone. Pure node.
|
|
@@ -20,7 +20,8 @@ export const HEYGEN_BASE = "https://api.heygen.com/v3";
|
|
|
20
20
|
// in the clear, so it needs $HEYGEN_ALLOW_HTTP=1, the heygen CLI's own rule.
|
|
21
21
|
export function heygenBase() {
|
|
22
22
|
const host = process.env.HEYGEN_API_BASE?.trim().replace(/\/+$/, "");
|
|
23
|
-
if (!host)
|
|
23
|
+
if (!host)
|
|
24
|
+
return process.env.HYPERFRAMES_ENV === "dev" ? "https://api.dev.heygen.com/v3" : HEYGEN_BASE;
|
|
24
25
|
if (host.startsWith("http://") && process.env.HEYGEN_ALLOW_HTTP !== "1")
|
|
25
26
|
throw new Error(
|
|
26
27
|
`HEYGEN_API_BASE (${host}) uses HTTP, which sends the key in plaintext. Set HEYGEN_ALLOW_HTTP=1 to allow it.`,
|
|
@@ -104,7 +105,7 @@ export function heygenCredential() {
|
|
|
104
105
|
}
|
|
105
106
|
|
|
106
107
|
// heygenCredential's answer, or { unreadable: { file, code } } when the credentials path exists but cannot be read
|
|
107
|
-
// (a folder, a locked ~/.
|
|
108
|
+
// (a folder, a locked ~/.hyperframes), so heygenAuthHeaders can say to fix that path: logging in again would fail there too.
|
|
108
109
|
// Read without checking first, so the file cannot change between a check and the read.
|
|
109
110
|
function resolveCredential() {
|
|
110
111
|
const gatewayKey = hostGatewayKey();
|
|
@@ -116,7 +117,8 @@ function resolveCredential() {
|
|
|
116
117
|
const envKey = process.env.HEYGEN_API_KEY || process.env.HYPERFRAMES_API_KEY;
|
|
117
118
|
if (envKey) return { headers: { "X-Api-Key": envKey } };
|
|
118
119
|
|
|
119
|
-
const
|
|
120
|
+
const root = process.env.HYPERFRAMES_CONFIG_DIR || join(homedir(), ".hyperframes");
|
|
121
|
+
const file = join(root, ...(process.env.HYPERFRAMES_ENV === "dev" ? ["dev"] : []), "credentials");
|
|
120
122
|
let raw;
|
|
121
123
|
try {
|
|
122
124
|
raw = readFileSync(file, "utf8").trim();
|
|
@@ -136,9 +138,23 @@ function resolveCredential() {
|
|
|
136
138
|
}
|
|
137
139
|
const oauth = cred.oauth;
|
|
138
140
|
if (oauth?.access_token) {
|
|
141
|
+
const expectedClient =
|
|
142
|
+
process.env.HYPERFRAMES_OAUTH_CLIENT_ID ||
|
|
143
|
+
(process.env.HYPERFRAMES_ENV === "dev"
|
|
144
|
+
? "9QoaiwCZov9O0cAkC4OZbR4p"
|
|
145
|
+
: "Zg3LF4FCLoeJoGs2YqMtZ17g");
|
|
146
|
+
const expectedTokenEndpoint =
|
|
147
|
+
process.env.HYPERFRAMES_OAUTH_TOKEN_URL ||
|
|
148
|
+
`https://api2.${process.env.HYPERFRAMES_ENV === "dev" ? "dev." : ""}heygen.com/v1/oauth/token`;
|
|
149
|
+
if (
|
|
150
|
+
!expectedClient ||
|
|
151
|
+
oauth.client_id !== expectedClient ||
|
|
152
|
+
oauth.token_endpoint !== expectedTokenEndpoint
|
|
153
|
+
)
|
|
154
|
+
return { expired: true };
|
|
139
155
|
const expired = oauth.expires_at && new Date(oauth.expires_at).getTime() - 60_000 < Date.now();
|
|
140
156
|
if (!expired) return { headers: { Authorization: `Bearer ${oauth.access_token}` } };
|
|
141
|
-
|
|
157
|
+
return { expired: true };
|
|
142
158
|
}
|
|
143
159
|
if (cred.api_key) return { headers: { "X-Api-Key": cred.api_key } };
|
|
144
160
|
return null;
|
|
@@ -176,7 +192,7 @@ export function heygenAuthHeaders() {
|
|
|
176
192
|
"HeyGen OAuth token expired — run `npx hyperframes auth refresh` (or `npx hyperframes auth login`)",
|
|
177
193
|
);
|
|
178
194
|
throw new Error(
|
|
179
|
-
"no
|
|
195
|
+
"no HyperFrames credentials — set $HEYGEN_API_KEY, or run `npx hyperframes auth login` (writes ~/.hyperframes/credentials)",
|
|
180
196
|
);
|
|
181
197
|
}
|
|
182
198
|
|
|
@@ -17,7 +17,10 @@ const HEYGEN_ENV = [
|
|
|
17
17
|
"HEYGEN_ACCESS_TOKEN",
|
|
18
18
|
"HEYGEN_API_KEY",
|
|
19
19
|
"HYPERFRAMES_API_KEY",
|
|
20
|
-
"
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
204
|
-
assert.throws(() => heygenAuthHeaders(), /no
|
|
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.
|
|
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
|
|
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 / ~/.
|
|
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", "
|
|
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.
|
|
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
|
-
|
|
10
|
-
|
|
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
|
|
242
|
-
|
|
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
|
|
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
|
|
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
|
|
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
|
|
9
|
-
|
|
8
|
+
heygen update # requires v0.3.0+
|
|
9
|
+
npx hyperframes auth login # dedicated HyperFrames OAuth session
|
|
10
10
|
```
|
|
11
11
|
|
|
12
|
-
|
|
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
|
-
|
|
34
|
-
|
|
35
|
-
|
|
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
|
|
45
|
-
| sfx | Openverse (CC0 / CC BY, no account), bundled library offline; a host app's own sound tools come first
|
|
46
|
-
| image | heygen search
|
|
47
|
-
| voice | heygen tts
|
|
48
|
-
| icon | heygen asset search
|
|
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
|
|
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
|
-
|
|
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
|
|
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
|
-
|
|
72
|
-
video, so those capabilities need `heygen` installed and
|
|
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
|
|
78
|
-
| ------------------ |
|
|
79
|
-
| `ffmpeg`/`ffprobe` | adopt probing, smart-grade signalstats, cut, duck bake, loudnorm
|
|
80
|
-
| `heygen` | catalog (bgm/image/icon) + TTS (voice) + avatar video — the
|
|
81
|
-
| `mflux-generate` | local image gen (FLUX), best-for-RAM
|
|
82
|
-
| `codex` | image gen upsell (ChatGPT sub)
|
|
83
|
-
| `parakeet-mlx` | local transcription (default ASR, best) on Apple Silicon
|
|
84
|
-
| `ltx-2-mlx` | local video gen
|
|
85
|
-
| `npx hyperframes` | Kokoro TTS (voice), Parakeet or whisper.cpp (transcribe), remove-background
|
|
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:
|
|
14
|
-
export const HEYGEN_AUTH_COMMAND = "
|
|
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
|
|
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, ".
|
|
186
|
+
mkdirSync(join(home, ".hyperframes"), { recursive: true });
|
|
185
187
|
writeFileSync(
|
|
186
|
-
join(home, ".
|
|
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, ".
|
|
281
|
+
mkdirSync(join(home, ".hyperframes"), { recursive: true });
|
|
237
282
|
writeFileSync(
|
|
238
|
-
join(home, ".
|
|
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-
|
|
19
|
-
import "./chunk-
|
|
18
|
+
} from "./chunk-GP5X7V6U.js";
|
|
19
|
+
import "./chunk-QEKP7XCN.js";
|
|
20
20
|
import "./chunk-PXVQOMKL.js";
|
|
21
21
|
import {
|
|
22
22
|
diag
|
|
23
23
|
} from "./chunk-EQGKUPBJ.js";
|
|
24
|
-
import "./chunk-
|
|
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-
|
|
46
|
+
} from "./chunk-33XQUQKN.js";
|
|
47
47
|
import {
|
|
48
48
|
withMeta
|
|
49
|
-
} from "./chunk-
|
|
49
|
+
} from "./chunk-7ZRXSZF6.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-
|
|
63
|
+
import "./chunk-DMUDI5IH.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-
|
|
13
|
-
import "./chunk-
|
|
12
|
+
} from "./chunk-33XQUQKN.js";
|
|
13
|
+
import "./chunk-7ZRXSZF6.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-
|
|
21
|
+
import "./chunk-DMUDI5IH.js";
|
|
22
22
|
import "./chunk-E63BDV4Z.js";
|
|
23
23
|
import "./chunk-G7VEYUZ2.js";
|
|
24
24
|
import "./chunk-XT6MXC7A.js";
|