hyperframes 0.9.10 → 0.9.12

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 (194) hide show
  1. package/README.md +9 -0
  2. package/dist/{add-AFD3HNXB.js → add-NLR4EVAF.js} +6 -6
  3. package/dist/{agentPromptGenerator-XNGPKVEX.js → agentPromptGenerator-S3GWYMVC.js} +1 -1
  4. package/dist/{animatedGifPrep-E3PYKFJ3.js → animatedGifPrep-YU7IOD5D.js} +1 -1
  5. package/dist/api.js +13 -12
  6. package/dist/{asset-P6SF46UX.js → asset-7NPBAXDA.js} +2 -2
  7. package/dist/{assetCataloger-SDFP4DWL.js → assetCataloger-VKJIQCYP.js} +1 -1
  8. package/dist/{audio-DFQXEAEE.js → audio-ZNVUZH44.js} +12 -11
  9. package/dist/{auth-T62ANGDQ.js → auth-PTVZNLE6.js} +1 -1
  10. package/dist/{autoUpdate-3IT56KGL.js → autoUpdate-QJPCV7FB.js} +3 -3
  11. package/dist/{backgroundChecks-UKBVUYML.js → backgroundChecks-UA6LCZAG.js} +4 -4
  12. package/dist/backgroundChecksWorker.js +4 -4
  13. package/dist/{batchRender-ZDL65J7N.js → batchRender-W4RXBUNE.js} +6 -3
  14. package/dist/{beats-7UFMDXBY.js → beats-IG7C72YF.js} +6 -6
  15. package/dist/{benchmark-LCSHBJJF.js → benchmark-YUD3XIT2.js} +7 -7
  16. package/dist/{browser-5DZHA4EW.js → browser-TZILXH5J.js} +4 -4
  17. package/dist/{bundleWithLocalizedFonts-TJL2JWRD.js → bundleWithLocalizedFonts-BOIW3CIU.js} +2 -2
  18. package/dist/{capture-UKWY3SZQ.js → capture-MICLAF6V.js} +13 -13
  19. package/dist/{capture-HLC6I4RE.js → capture-R77HOGLQ.js} +3 -3
  20. package/dist/{captureCompositionFrame-YMB3CKSP.js → captureCompositionFrame-WBMFZHEF.js} +4 -4
  21. package/dist/{catalog-F2XB4VPP.js → catalog-AMPL57XF.js} +6 -6
  22. package/dist/{catch-up-HCBA3MIP.js → catch-up-WQ7ZRRFT.js} +5 -5
  23. package/dist/{check-E2RQCELF.js → check-ZPBF3X5D.js} +23 -23
  24. package/dist/{checkAudio-R4DRK3VG.js → checkAudio-IG3BOW2G.js} +3 -3
  25. package/dist/{checkBrowser-NGY225IO.js → checkBrowser-AIUIKFMJ.js} +17 -17
  26. package/dist/{chunk-BYC4C4YY.js → chunk-2VYAX3ZD.js} +2 -2
  27. package/dist/{chunk-GIYZMGYT.js → chunk-2VZVMCV6.js} +1 -1
  28. package/dist/{chunk-YTNHZT47.js → chunk-3IKLV3D4.js} +1 -1
  29. package/dist/chunk-3S27CPV7.js +17 -0
  30. package/dist/{chunk-NCP3JQ6S.js → chunk-4J4EGANW.js} +2 -2
  31. package/dist/{chunk-2CKL2FUJ.js → chunk-4XGASFTP.js} +2 -2
  32. package/dist/{chunk-XTYNW745.js → chunk-5WHGO5XU.js} +1 -1
  33. package/dist/{chunk-7VOLQUA2.js → chunk-64ZWPFAX.js} +1 -1
  34. package/dist/{upgrade-2FS4AMCA.js → chunk-6IFY3ZQC.js} +65 -27
  35. package/dist/{chunk-ZMXFRRQR.js → chunk-6NKEEHFR.js} +10 -15
  36. package/dist/{chunk-6HO6QKYG.js → chunk-6R2PED3X.js} +6 -6
  37. package/dist/{chunk-WWPOGMNX.js → chunk-73EXHUMD.js} +1 -1
  38. package/dist/{chunk-QPEDM2ZR.js → chunk-7XKWBMBL.js} +5 -3
  39. package/dist/{chunk-CDSTLOB7.js → chunk-B3IE7CN2.js} +8 -8
  40. package/dist/{chunk-BLBMPEBX.js → chunk-BONBJJ35.js} +1 -0
  41. package/dist/{chunk-Q3W7TDQX.js → chunk-BW2RIJKV.js} +238 -195
  42. package/dist/{chunk-B5GWDPUO.js → chunk-EPCVE3OX.js} +2 -2
  43. package/dist/{chunk-6UZLHLFP.js → chunk-FC4WF2VQ.js} +1 -1
  44. package/dist/{chunk-P4WYY52Y.js → chunk-FFUBISTD.js} +1 -1
  45. package/dist/{chunk-DKROJ3GJ.js → chunk-H7H7XNYY.js} +80 -20
  46. package/dist/{chunk-JZPUXDQE.js → chunk-HY64QA63.js} +1 -1
  47. package/dist/{chunk-RZFW7FBA.js → chunk-JKSASCBT.js} +2 -2
  48. package/dist/{chunk-PPMCILED.js → chunk-JS6ZTPYC.js} +4 -4
  49. package/dist/{chunk-7VU4RBHC.js → chunk-KDOJX2HU.js} +9 -9
  50. package/dist/{chunk-NBWYATVA.js → chunk-KT4KPBI7.js} +194 -17
  51. package/dist/{chunk-CBTBVRXB.js → chunk-LIN633KG.js} +4 -4
  52. package/dist/{chunk-WP5QHNXN.js → chunk-LO3EX3YP.js} +17 -5
  53. package/dist/{chunk-EN6MPNZT.js → chunk-NQYW4IYN.js} +2 -2
  54. package/dist/{chunk-NVYVI4FR.js → chunk-NTHJJ6JT.js} +3 -3
  55. package/dist/{chunk-QUBVGS27.js → chunk-OQKAP6X4.js} +4 -4
  56. package/dist/{chunk-QBPZHOEJ.js → chunk-P3KBDUNS.js} +1 -1
  57. package/dist/{chunk-CUYVIDGF.js → chunk-P7Y2YCOF.js} +1 -1
  58. package/dist/{chunk-BHL4KN3H.js → chunk-PKLZ5PV2.js} +1 -1
  59. package/dist/{chunk-6VKYITOR.js → chunk-Q225NLQL.js} +1 -1
  60. package/dist/{chunk-5CDTGHED.js → chunk-QFZ3ZSXI.js} +2 -2
  61. package/dist/{chunk-W4Q6VYPZ.js → chunk-RFTLWXEX.js} +2 -2
  62. package/dist/{chunk-G3ERWPNV.js → chunk-TNTQ7H24.js} +15 -1
  63. package/dist/{chunk-PO7LSMN5.js → chunk-UH62KSYV.js} +2 -2
  64. package/dist/{chunk-UDBNPVUR.js → chunk-URJ7T6T6.js} +1 -1
  65. package/dist/{chunk-MHZ7NSL5.js → chunk-VECINIPA.js} +1 -1
  66. package/dist/{chunk-2WNIF4YT.js → chunk-VUMGJLRB.js} +1 -1
  67. package/dist/{chunk-PYUS627M.js → chunk-VWQY3A64.js} +2 -2
  68. package/dist/{chunk-7VGM5TLZ.js → chunk-WQ4SMZDF.js} +2 -2
  69. package/dist/{chunk-WCETVN3N.js → chunk-WTGG734B.js} +24 -38
  70. package/dist/{chunk-YXSM33UC.js → chunk-X6XIY4JY.js} +9 -9
  71. package/dist/{skills-T5XCP3RC.js → chunk-XJG65BB2.js} +25 -32
  72. package/dist/{chunk-SRVAYGTN.js → chunk-XZP5OW5V.js} +5 -4
  73. package/dist/{chunk-GRUI2S2F.js → chunk-YEBIOQRI.js} +1 -1
  74. package/dist/{chunk-3XHWHH5A.js → chunk-Z2DJSEQC.js} +23 -23
  75. package/dist/{chunk-NO6F7CLR.js → chunk-Z4GE5BXC.js} +5 -2
  76. package/dist/{clean-BXHJEVVO.js → clean-343XOJT3.js} +8 -8
  77. package/dist/cli.js +60 -59
  78. package/dist/{cloud-ISWLTHGP.js → cloud-2YS272KD.js} +4 -4
  79. package/dist/{cloud-Z3FNCC4T.js → cloud-B6SGMECY.js} +3 -2
  80. package/dist/{compare-MLZYDSZD.js → compare-KXCTMXFX.js} +19 -16
  81. package/dist/{compiler-NAIDMQFU.js → compiler-KKIYPREA.js} +1 -1
  82. package/dist/{component-MMBTCMY3.js → component-ZUDCIGGD.js} +3 -3
  83. package/dist/{compositions-WT2577NJ.js → compositions-FNFI2QOA.js} +7 -7
  84. package/dist/{curve-HHKVZ6LX.js → curve-5BMBBCSZ.js} +5 -5
  85. package/dist/{cuts-66GBRT5P.js → cuts-OKUA6BWH.js} +5 -5
  86. package/dist/{delete-P3WYOC7I.js → delete-FYMFNSED.js} +7 -6
  87. package/dist/{deploy-OJ3M7QJQ.js → deploy-YZU2YITA.js} +8 -8
  88. package/dist/{describeProject-DN6YQU3X.js → describeProject-E44RWBJL.js} +1 -1
  89. package/dist/{diff-R74KQXXN.js → diff-5X6I6EG5.js} +20 -19
  90. package/dist/{dist-CCPYPKOC.js → dist-PUHEYGA5.js} +3 -3
  91. package/dist/{doctor-DT52W4UE.js → doctor-3DXWW63F.js} +9 -5
  92. package/dist/{energy-WOMDOOLC.js → energy-4HY7COXH.js} +5 -5
  93. package/dist/{events-YVQJLQWG.js → events-JAGPGK7R.js} +4 -4
  94. package/dist/{events-PCK4AIN5.js → events-TFVE7AUR.js} +3 -3
  95. package/dist/{events-WEVZ2ELP.js → events-ULVZ7V2C.js} +6 -6
  96. package/dist/{extract-CNXA3DWB.js → extract-5KTFRIH2.js} +11 -8
  97. package/dist/{face-2WNBW74C.js → face-T6D34LR7.js} +8 -7
  98. package/dist/{feedback-ADMM2XDS.js → feedback-QQQYENCU.js} +5 -5
  99. package/dist/{ffmpeg-PERZ6YHQ.js → ffmpeg-A2O4HSRD.js} +1 -1
  100. package/dist/{figma-5MMN5JUU.js → figma-4RODZMCT.js} +3 -3
  101. package/dist/fontLocalizeCli.js +3 -3
  102. package/dist/{frames-7CQGHRWT.js → frames-L43TSSAY.js} +5 -5
  103. package/dist/{generate-XOR4UJDW.js → generate-7HZKBLPZ.js} +9 -8
  104. package/dist/{get-5K6ALHBS.js → get-MXKV4NUL.js} +7 -6
  105. package/dist/{gpuPolicy-DUNSQM6M.js → gpuPolicy-TKHFDEH2.js} +2 -2
  106. package/dist/{grade-compare-DK63C776.js → grade-compare-KNXFKMFI.js} +18 -16
  107. package/dist/{heifImagePrep-YNPHFR6W.js → heifImagePrep-L2EY67F2.js} +1 -1
  108. package/dist/{help-AUF2KA6D.js → help-YN43ORVX.js} +3 -2
  109. package/dist/{history-G3FXVX4A.js → history-VAMN53LT.js} +7 -7
  110. package/dist/hyperframes-player.global.js +1 -1
  111. package/dist/{info-DGU3CIU5.js → info-QKEEGK2R.js} +6 -6
  112. package/dist/{init-LYZI2WCS.js → init-AAA44PYH.js} +15 -15
  113. package/dist/{ink-DYZG4BST.js → ink-V6CEFYB6.js} +5 -5
  114. package/dist/{inspect-BYQSCRKT.js → inspect-5JGTWCYO.js} +15 -15
  115. package/dist/{keyframes-XX2DIYPI.js → keyframes-FJNUSXAF.js} +7 -7
  116. package/dist/{lambda-RKI7KKWW.js → lambda-RYCG67CX.js} +3 -3
  117. package/dist/{layout-RQFOMQRO.js → layout-DXIPVY3W.js} +15 -15
  118. package/dist/{lint-LFCMCDEG.js → lint-JZADWIMR.js} +7 -7
  119. package/dist/{list-V4TGMQ3Y.js → list-YRLUJMP6.js} +7 -6
  120. package/dist/{localPage-6MQ6YFER.js → localPage-KIFKMB2B.js} +1 -1
  121. package/dist/{login-EXCG7PEH.js → login-H74JDEJ2.js} +4 -4
  122. package/dist/{look-RBHKHGMF.js → look-WVGBBYFE.js} +5 -5
  123. package/dist/{manager-ARXEX6OP.js → manager-T633Z2L4.js} +1 -1
  124. package/dist/{measure-SAV5K4WT.js → measure-DWQHHY3H.js} +11 -11
  125. package/dist/{media-treatment-2BVHRXJS.js → media-treatment-JHDDWRFU.js} +8 -8
  126. package/dist/{media-use-YEBYLITF.js → media-use-5SDC3MCE.js} +2 -1
  127. package/dist/{models-GMJODMZ5.js → models-6SOW23N6.js} +5 -5
  128. package/dist/{motionShot-Z63I3GO7.js → motionShot-B4K6LEU3.js} +12 -9
  129. package/dist/{normalize-audio-ILLUZPTO.js → normalize-audio-O6STMACD.js} +5 -5
  130. package/dist/{open-GTNLU7UF.js → open-VRCTXBD3.js} +5 -5
  131. package/dist/{parakeetRunner-K4EGDDVH.js → parakeetRunner-MNOIBRZZ.js} +5 -4
  132. package/dist/{pipeline-EKLTELWF.js → pipeline-N3M6VXBC.js} +4 -4
  133. package/dist/{play-F2HIXJKH.js → play-5WUZGJ4B.js} +10 -10
  134. package/dist/{preflight-QMXCKE5P.js → preflight-XZZXHV42.js} +1 -1
  135. package/dist/{present-GDR6LCKE.js → present-W7OODR7J.js} +10 -10
  136. package/dist/{preview-4TV5426Q.js → preview-NOQSYZAD.js} +9 -9
  137. package/dist/{probe-TYM7WKX2.js → probe-WFIYEXM5.js} +7 -6
  138. package/dist/{producer-NHQXKH7Y.js → producer-HI6M6755.js} +1 -1
  139. package/dist/{remove-background-LURZDSDJ.js → remove-background-SYHNGASQ.js} +5 -5
  140. package/dist/{render-GEAO2HAV.js → render-74JIGKTN.js} +13 -12
  141. package/dist/{render-YLAS7GVD.js → render-GYQZQB2O.js} +24 -21
  142. package/dist/{reverse-3KAZZXB2.js → reverse-NEC42AID.js} +1 -1
  143. package/dist/{run-XER4YJY5.js → run-Z6AW753F.js} +3 -3
  144. package/dist/{sherpa-D6FQ3CHN.js → sherpa-2ROE6TLC.js} +4 -3
  145. package/dist/skills/hyperframes/SKILL.md +2 -2
  146. package/dist/skills/hyperframes/references/plugin-installation.md +5 -6
  147. package/dist/skills/hyperframes/references/skill-lifecycle.md +15 -10
  148. package/dist/skills/hyperframes/scripts/plugin-cli.mjs +2 -2
  149. package/dist/skills/hyperframes-cli/SKILL.md +5 -3
  150. package/dist/skills/hyperframes-cli/references/init-and-scaffold.md +10 -14
  151. package/dist/skills/media-use/SKILL.md +2 -2
  152. package/dist/skills/media-use/audio/scripts/lib/sfx.mjs +2 -2
  153. package/dist/skills/media-use/audio/scripts/lib/tts.mjs +2 -0
  154. package/dist/skills/media-use/audio/scripts/lib/tts.test.mjs +14 -0
  155. package/dist/skills/media-use/references/heygen.md +1 -1
  156. package/dist/skills/media-use/scripts/lib/credit-limit.d.mts +3 -0
  157. package/dist/skills/media-use/scripts/lib/credit-limit.mjs +41 -0
  158. package/dist/skills/media-use/scripts/lib/credit-limit.test.mjs +39 -0
  159. package/dist/skills/media-use/scripts/lib/heygen-video-provider.mjs +2 -0
  160. package/dist/skills/media-use/scripts/lib/voice-provider.mjs +2 -0
  161. package/dist/skills-R56MSU2Y.js +49 -0
  162. package/dist/{skillsUpdateCheck-IG7KLWIA.js → skillsUpdateCheck-I6G3MQWO.js} +6 -4
  163. package/dist/{snapshot-RULSIRM6.js → snapshot-J2NU7WTJ.js} +18 -18
  164. package/dist/{src-DHBRQZFZ.js → src-5XQ6A3VE.js} +2 -2
  165. package/dist/{src-RL6YEPTD.js → src-L7UBHHKB.js} +1 -1
  166. package/dist/{start-GF3JCTGF.js → start-VUMSNLKC.js} +7 -6
  167. package/dist/{staticProjectServer-BX4RWEY5.js → staticProjectServer-2JYB7RLI.js} +5 -5
  168. package/dist/studio/assets/{hyperframes-player-BcELSci_.js → hyperframes-player-Dw-0BWQW.js} +1 -1
  169. package/dist/studio/assets/{index-DR2eua-L.js → index-BNZeN67E.js} +4 -4
  170. package/dist/studio/assets/{index-2SLNyxZG.js → index-NwWb1W86.js} +1 -1
  171. package/dist/studio/index.html +1 -1
  172. package/dist/{studio-api-PEUXVD7P.js → studio-api-MEZKFJBY.js} +3 -3
  173. package/dist/{studioServer-DOTRPHS3.js → studioServer-XGR4YPXX.js} +24 -24
  174. package/dist/{sync-XQPBXGGX.js → sync-ZIMGTQEN.js} +5 -5
  175. package/dist/{synthesize-YK3WLOEQ.js → synthesize-S3FF5KXC.js} +9 -6
  176. package/dist/{telemetry-7TIIOBVB.js → telemetry-PT5KSL5T.js} +4 -4
  177. package/dist/{telemetry-T73TKZOL.js → telemetry-WGNNQUSF.js} +1 -1
  178. package/dist/{templates-7DIQ52Y4.js → templates-7AT45DZI.js} +4 -1
  179. package/dist/{timeline-4JIUAUIP.js → timeline-IH422KGC.js} +9 -9
  180. package/dist/{tokens-4PQU4LVQ.js → tokens-ZVJMHDTM.js} +2 -2
  181. package/dist/{transcribe-IKUPC2R3.js → transcribe-FRRXA77O.js} +12 -11
  182. package/dist/{transcribe-N66QUYCS.js → transcribe-QIZGXMR5.js} +1 -1
  183. package/dist/{tts-HIQMJU6O.js → tts-IMW74GBX.js} +1 -1
  184. package/dist/update-E2RIAV5T.js +280 -0
  185. package/dist/{updateCheck-LBPTWEZV.js → updateCheck-EII7XDIR.js} +7 -3
  186. package/dist/upgrade-BKGP2TM7.js +40 -0
  187. package/dist/{upload-L5TSWWIU.js → upload-HMRWGZIO.js} +1 -1
  188. package/dist/{urlDownloader-YNI3Y3IE.js → urlDownloader-FOXK4FYP.js} +1 -1
  189. package/dist/{validate-MLVDUEK7.js → validate-M4FZVBRP.js} +13 -13
  190. package/dist/{video-2OEOTSPQ.js → video-AVEGMBDM.js} +1 -1
  191. package/dist/voices-E5RUGLJK.js +97 -0
  192. package/dist/warmCheck.js +23 -23
  193. package/package.json +1 -1
  194. package/dist/{destroy-C5GQLZVZ.js → destroy-IQLGADZM.js} +4 -4
@@ -15,23 +15,50 @@ import {
15
15
  resolveCloudAuthHeaders,
16
16
  resolveCloudBaseUrl
17
17
  } from "./chunk-TSQZ3DSC.js";
18
- import {
19
- HyperframesApiError,
20
- HyperframesCloudClient
21
- } from "./chunk-3XJM7XZN.js";
22
18
  import {
23
19
  AuthClient,
24
20
  buildAuthHeaders,
25
21
  resolveCredential
26
22
  } from "./chunk-ETYQYG6Q.js";
23
+ import {
24
+ HyperframesApiError,
25
+ HyperframesCloudClient
26
+ } from "./chunk-3XJM7XZN.js";
27
27
  import {
28
28
  configDir
29
29
  } from "./chunk-BVAPHHMQ.js";
30
30
 
31
31
  // src/heygen/v3.ts
32
32
  import { createHash } from "crypto";
33
- import { appendFileSync, existsSync, mkdirSync, readFileSync } from "fs";
34
- import { dirname, join } from "path";
33
+ import { appendFileSync, existsSync as existsSync2, mkdirSync, readFileSync as readFileSync2 } from "fs";
34
+ import { dirname, join as join2 } from "path";
35
+
36
+ // src/media-use/lib/credit-limit.mjs
37
+ import { existsSync, readFileSync } from "fs";
38
+ import { join } from "path";
39
+ var read = (file) => existsSync(file) ? readFileSync(file, "utf8") : "";
40
+ function creditLimit(projectDir) {
41
+ const text = read(join(projectDir, ".hyperframes", "credit-limit.json"));
42
+ if (!text) return void 0;
43
+ const credits = Number(JSON.parse(text)?.credits);
44
+ if (!Number.isFinite(credits) || credits < 0)
45
+ throw new Error(`${projectDir}/.hyperframes/credit-limit.json needs {"credits": <number>}`);
46
+ return credits;
47
+ }
48
+ function creditsSpent(projectDir) {
49
+ const charged = /* @__PURE__ */ new Map();
50
+ for (const row of read(join(projectDir, ".hyperframes", "heygen-jobs.jsonl")).split("\n")) {
51
+ if (!row) continue;
52
+ const { key, credits } = JSON.parse(row);
53
+ if (key && typeof credits === "number") charged.set(key, credits);
54
+ }
55
+ return {
56
+ total: [...charged.values()].reduce((a, b) => a + b, 0),
57
+ keys: new Set([...charged].filter(([, c]) => c > 0).map(([k]) => k))
58
+ };
59
+ }
60
+
61
+ // src/heygen/v3.ts
35
62
  var RUNNING = /* @__PURE__ */ new Set(["pending", "processing", "queued", "running", "waiting", "in_progress"]);
36
63
  var isRecord = (v) => typeof v === "object" && v !== null && !Array.isArray(v);
37
64
  function idempotencyKey(route, parts) {
@@ -43,7 +70,7 @@ var Refused = class extends Fix {
43
70
  status = 0;
44
71
  };
45
72
  var KEEPS_KEY = /* @__PURE__ */ new Set([401, 403, 408, 409, 425, 429]);
46
- var failedKeysFile = () => join(configDir(), "heygen-failed-keys");
73
+ var failedKeysFile = () => join2(configDir(), "heygen-failed-keys");
47
74
  var noSignIn = () => {
48
75
  throw new Fix("no HeyGen sign-in on this machine", "npx hyperframes auth login");
49
76
  };
@@ -58,7 +85,7 @@ async function jobSender() {
58
85
  }
59
86
  function failedKeys(scope) {
60
87
  const file = failedKeysFile();
61
- const lines = existsSync(file) ? readFileSync(file, "utf8").split("\n") : [];
88
+ const lines = existsSync2(file) ? readFileSync2(file, "utf8").split("\n") : [];
62
89
  return new Set(
63
90
  lines.filter((l) => l.startsWith(`${scope} `)).map((l) => l.slice(scope.length + 1))
64
91
  );
@@ -150,19 +177,41 @@ async function call(route, send, timeoutMs, estimate, auth) {
150
177
  }
151
178
  function log(entry, record) {
152
179
  if (!entry.projectDir) return;
153
- const dir = join(entry.projectDir, ".hyperframes");
180
+ const dir = join2(entry.projectDir, ".hyperframes");
154
181
  mkdirSync(dir, { recursive: true });
155
182
  appendFileSync(
156
- join(dir, "heygen-jobs.jsonl"),
183
+ join2(dir, "heygen-jobs.jsonl"),
157
184
  `${JSON.stringify({ at: (/* @__PURE__ */ new Date()).toISOString(), what: entry.what, ...record })}
158
185
  `
159
186
  );
160
187
  }
188
+ function withinLimit(limitLog, sent, credits) {
189
+ if (!limitLog?.projectDir) return false;
190
+ const limit = creditLimit(limitLog.projectDir);
191
+ if (limit === void 0) return false;
192
+ const spent = creditsSpent(limitLog.projectDir);
193
+ if (spent.keys.has(sent)) return false;
194
+ const left = limit - spent.total;
195
+ const fix = "tell the person what their limit leaves out, then ask whether to raise it or make the video without this piece";
196
+ if (credits === void 0)
197
+ throw new Fix(
198
+ `this call cannot be priced ahead, so it cannot be kept under the run's credit limit of ${limit}; nothing was made`,
199
+ fix
200
+ );
201
+ if (credits > left)
202
+ throw new Fix(
203
+ `this call is about ${credits} credits and the run's credit limit of ${limit} leaves ${Math.max(0, left)}; nothing was made or charged`,
204
+ fix
205
+ );
206
+ log(limitLog, { key: sent, status: "reserved", credits });
207
+ return true;
208
+ }
161
209
  async function runJob(jobRoute, body, key, opts = {}) {
162
210
  const started = Date.now();
163
211
  const route = jobRoute.path;
164
212
  const { auth, scope } = await jobSender();
165
213
  const sent = liveKey(key, scope);
214
+ const reserved = withinLimit(opts.log, sent, opts.credits);
166
215
  let job;
167
216
  try {
168
217
  job = await call(
@@ -173,11 +222,15 @@ async function runJob(jobRoute, body, key, opts = {}) {
173
222
  auth
174
223
  );
175
224
  } catch (err) {
176
- if (err instanceof Refused && !KEEPS_KEY.has(err.status)) markFailed(sent, scope);
225
+ if (err instanceof Refused && !KEEPS_KEY.has(err.status)) {
226
+ markFailed(sent, scope);
227
+ if (reserved && opts.log) log(opts.log, { key: sent, status: "refused", credits: 0 });
228
+ }
177
229
  throw err;
178
230
  }
179
231
  const waits = RUNNING.has(job.status.toLowerCase());
180
- if (opts.log && waits) log(opts.log, { route, id: job.id, key: sent, status: job.status });
232
+ if (opts.log && waits)
233
+ log(opts.log, { route, id: job.id, key: sent, status: job.status, credits: opts.credits });
181
234
  const status = jobRoute.status;
182
235
  while (status && RUNNING.has(job.status.toLowerCase())) {
183
236
  if (Date.now() - started > (opts.timeoutMs ?? 15 * 6e4))
@@ -194,7 +247,8 @@ async function runJob(jobRoute, body, key, opts = {}) {
194
247
  3e4
195
248
  );
196
249
  }
197
- if (opts.log) log(opts.log, { route, id: job.id, key: sent, status: job.status });
250
+ if (opts.log)
251
+ log(opts.log, { route, id: job.id, key: sent, status: job.status, credits: opts.credits });
198
252
  if (!/^(completed|succeeded|success|done)$/i.test(job.status)) {
199
253
  markFailed(sent, scope);
200
254
  throw await refusal(422, {
@@ -204,11 +258,14 @@ async function runJob(jobRoute, body, key, opts = {}) {
204
258
  return job;
205
259
  }
206
260
  var isVoice = (v) => isRecord(v) && typeof v.voice_id === "string" && typeof v.name === "string";
207
- async function publicVoices(language, limit) {
261
+ async function listVoices(query, limit) {
208
262
  const client = clientFor(await resolveCloudAuthHeaders().catch(noSignIn));
209
- const value = await client.listVoicesV3({ type: "public", language, limit, signal: AbortSignal.timeout(3e4) }).catch((err) => {
263
+ const value = await client.listVoicesV3({ ...query, limit, signal: AbortSignal.timeout(3e4) }).catch((err) => {
210
264
  if (err instanceof HyperframesApiError)
211
- throw new Fix(`HeyGen ${err.status} listing its voices`, "run the same command again");
265
+ throw new Fix(
266
+ `HeyGen ${err.status} listing its voices`,
267
+ err.status === 401 || err.status === 403 ? "npx hyperframes auth login" : "run the same command again"
268
+ );
212
269
  throw new Fix(
213
270
  `no answer from HeyGen for its voices (${err instanceof Error ? err.message : String(err)})`,
214
271
  "run the same command again"
@@ -216,16 +273,18 @@ async function publicVoices(language, limit) {
216
273
  });
217
274
  if (!isRecord(value) || !Array.isArray(value.data))
218
275
  throw new Fix("HeyGen answered its voices with no list", "run the same command again");
219
- return value.data.filter(isVoice).map(({ voice_id, name, language: language2, gender }) => ({ voice_id, name, language: language2, gender }));
276
+ return value.data.filter(isVoice).map(({ voice_id, name, language, gender }) => ({ voice_id, name, language, gender }));
220
277
  }
278
+ var publicVoices = (language, limit) => listVoices({ type: "public", language }, limit);
279
+ var ownVoices = (limit) => listVoices({ type: "private" }, limit);
221
280
  async function senderScope() {
222
281
  return (await jobSender()).scope;
223
282
  }
224
- var picksFile = (projectDir) => projectDir ? join(projectDir, ".hyperframes", "heygen-jobs.jsonl") : join(configDir(), "heygen-voice-picks.jsonl");
283
+ var picksFile = (projectDir) => projectDir ? join2(projectDir, ".hyperframes", "heygen-jobs.jsonl") : join2(configDir(), "heygen-voice-picks.jsonl");
225
284
  function keptVoice(projectDir, request) {
226
285
  const file = picksFile(projectDir);
227
- if (!existsSync(file)) return void 0;
228
- for (const line of readFileSync(file, "utf8").split("\n")) {
286
+ if (!existsSync2(file)) return void 0;
287
+ for (const line of readFileSync2(file, "utf8").split("\n")) {
229
288
  const entry = line ? JSON.parse(line) : null;
230
289
  if (isRecord(entry) && entry.voice_pick === request && isVoice(entry.voice)) return entry.voice;
231
290
  }
@@ -245,6 +304,7 @@ export {
245
304
  idempotencyKey,
246
305
  runJob,
247
306
  publicVoices,
307
+ ownVoices,
248
308
  senderScope,
249
309
  keptVoice,
250
310
  keepVoice
@@ -12,7 +12,7 @@ import {
12
12
  ensureHfIds,
13
13
  mintHfId,
14
14
  walkCompositionDescendants
15
- } from "./chunk-PPMCILED.js";
15
+ } from "./chunk-JS6ZTPYC.js";
16
16
  import {
17
17
  isAllowedHtmlAttribute,
18
18
  isSafeAttributeValue,
@@ -20,7 +20,7 @@ import {
20
20
  typeDirPath,
21
21
  updateRecord,
22
22
  withFigmaErrors
23
- } from "./chunk-MHZ7NSL5.js";
23
+ } from "./chunk-VECINIPA.js";
24
24
  import {
25
25
  defineCommand
26
26
  } from "./chunk-DL4OD7IA.js";
@@ -229,7 +229,7 @@ var asset_default = defineCommand({
229
229
  rendered > 0 ? `(${results.length} nodes, ${rendered} rendered in 1 figma request)` : `(${results.length} nodes, all reused from cache \u2014 no figma request)`
230
230
  );
231
231
  }
232
- const { trackFigmaImport } = await import("./telemetry-7TIIOBVB.js");
232
+ const { trackFigmaImport } = await import("./telemetry-PT5KSL5T.js");
233
233
  trackFigmaImport({
234
234
  phase: "asset",
235
235
  reused: results.every((r) => r.reused),
@@ -1010,10 +1010,10 @@ function inlineSubCompositions(document, hosts, options) {
1010
1010
  const compDoc = parseCopy(compHtml);
1011
1011
  let compId;
1012
1012
  let runtimeCompId;
1013
- if (hostIdentityMap) {
1014
- const identity = hostIdentityMap.get(hostEl);
1015
- compId = identity?.authoredCompositionId || null;
1016
- runtimeCompId = identity?.runtimeCompositionId || compId || "";
1013
+ const identity = hostIdentityMap?.get(hostEl);
1014
+ if (identity) {
1015
+ compId = identity.authoredCompositionId || null;
1016
+ runtimeCompId = identity.runtimeCompositionId || compId || "";
1017
1017
  } else {
1018
1018
  compId = hostEl.getAttribute("data-composition-id") || null;
1019
1019
  runtimeCompId = compId || "";
@@ -6,13 +6,13 @@ var __filename = __hf_fileURLToPath(import.meta.url);
6
6
  var __dirname = __hf_dirname(__filename);
7
7
  import {
8
8
  resolveProject
9
- } from "./chunk-7VOLQUA2.js";
9
+ } from "./chunk-64ZWPFAX.js";
10
10
  import {
11
11
  installPageFunctionGuard,
12
12
  resolveCliChromeGpuMode,
13
13
  seekCompositionTimeline,
14
14
  waitForRuntimeReady
15
- } from "./chunk-6HO6QKYG.js";
15
+ } from "./chunk-6R2PED3X.js";
16
16
  import {
17
17
  pageNavigationTimeoutMs
18
18
  } from "./chunk-E2YXF2EP.js";
@@ -22,7 +22,7 @@ import {
22
22
  import {
23
23
  launchManagedBrowser,
24
24
  resolveManagedGpuMode
25
- } from "./chunk-BHL4KN3H.js";
25
+ } from "./chunk-PKLZ5PV2.js";
26
26
  import {
27
27
  defineCommand
28
28
  } from "./chunk-DL4OD7IA.js";
@@ -38,7 +38,7 @@ import {
38
38
  import {
39
39
  printDeprecationNotice,
40
40
  withMeta
41
- } from "./chunk-NBWYATVA.js";
41
+ } from "./chunk-KT4KPBI7.js";
42
42
  import {
43
43
  failureMessage,
44
44
  jsonFailure
@@ -253,7 +253,7 @@ function extractCompositionErrorsFromLint(lintResult) {
253
253
  async function localizeRemoteAssets(html) {
254
254
  let dir;
255
255
  try {
256
- const { loadProducer } = await import("./producer-NHQXKH7Y.js");
256
+ const { loadProducer } = await import("./producer-HI6M6755.js");
257
257
  const { localizeRemoteMediaSources, localizeRemoteImageSources, localizeRemoteFontFaces } = await loadProducer();
258
258
  dir = mkdtempSync(join(tmpdir(), "hf-validate-assets-"));
259
259
  const assetDir = dir;
@@ -274,9 +274,9 @@ async function localizeRemoteAssets(html) {
274
274
  }
275
275
  async function validateInBrowser(project, opts) {
276
276
  const projectDir = project.dir;
277
- const { bundleToSingleHtml } = await import("./compiler-NAIDMQFU.js");
277
+ const { bundleToSingleHtml } = await import("./compiler-KKIYPREA.js");
278
278
  const { ensureBrowser } = await import("./manager-SAXHANEY.js");
279
- const { serveStaticProjectHtml } = await import("./staticProjectServer-BX4RWEY5.js");
279
+ const { serveStaticProjectHtml } = await import("./staticProjectServer-2JYB7RLI.js");
280
280
  const { lintProject } = await import("./lintProject-EV3EEBY3.js");
281
281
  const lintResult = await lintProject(projectDir);
282
282
  const compositionErrors = extractCompositionErrorsFromLint(lintResult);
@@ -298,9 +298,9 @@ async function validateInBrowser(project, opts) {
298
298
  try {
299
299
  const browser = await ensureBrowser();
300
300
  const puppeteer = await import("puppeteer-core");
301
- const { buildChromeArgs, analyzeClipMediaFit } = await import("./src-RL6YEPTD.js");
301
+ const { buildChromeArgs, analyzeClipMediaFit } = await import("./src-L7UBHHKB.js");
302
302
  const requestedGpuMode = resolveCliChromeGpuMode();
303
- const { assertWebGpuAdapterAvailable, compositionRequiresWebGpu, resolveLocalWebGpu } = await import("./gpuPolicy-DUNSQM6M.js");
303
+ const { assertWebGpuAdapterAvailable, compositionRequiresWebGpu, resolveLocalWebGpu } = await import("./gpuPolicy-TKHFDEH2.js");
304
304
  const resolvedGpuMode = await resolveManagedGpuMode(requestedGpuMode, browser.executablePath);
305
305
  const requiresWebGpu = compositionRequiresWebGpu(html);
306
306
  const { gpuConfig, softwareWebGpu } = resolveLocalWebGpu(resolvedGpuMode, requiresWebGpu);
@@ -8,10 +8,11 @@ import {
8
8
  hostAnswers
9
9
  } from "./chunk-BR2JQQC5.js";
10
10
  import {
11
+ CONFIG_PATH,
11
12
  readConfig,
12
13
  readConfigFresh,
13
14
  writeConfig
14
- } from "./chunk-BLBMPEBX.js";
15
+ } from "./chunk-BONBJJ35.js";
15
16
  import {
16
17
  isDevMode
17
18
  } from "./chunk-ISN5GRYI.js";
@@ -24,16 +25,59 @@ import {
24
25
  } from "./chunk-J3RXEDR2.js";
25
26
  import {
26
27
  VERSION
27
- } from "./chunk-7VGM5TLZ.js";
28
+ } from "./chunk-WQ4SMZDF.js";
28
29
 
29
30
  // src/utils/updateCheck.ts
30
- import { existsSync, readFileSync } from "fs";
31
- import { join } from "path";
31
+ import { existsSync as existsSync2, readFileSync as readFileSync2 } from "fs";
32
+ import { join as join2, resolve } from "path";
32
33
  import { compareVersions } from "compare-versions";
33
34
 
35
+ // src/utils/dailyNotice.ts
36
+ import { mkdirSync, readFileSync, renameSync, rmSync, writeFileSync } from "fs";
37
+ import { dirname, join } from "path";
38
+ var NOTICE_INTERVAL_MS = 24 * 60 * 60 * 1e3;
39
+ function readShown(noticeFile) {
40
+ let parsed;
41
+ try {
42
+ parsed = JSON.parse(readFileSync(noticeFile, "utf-8"));
43
+ } catch {
44
+ return {};
45
+ }
46
+ if (typeof parsed !== "object" || parsed === null || Array.isArray(parsed)) return {};
47
+ return Object.fromEntries(
48
+ Object.entries(parsed).filter((entry) => Number.isFinite(entry[1]))
49
+ );
50
+ }
51
+ var recent = (at, now) => at <= now && now - at < NOTICE_INTERVAL_MS;
52
+ function claimDailyNotice(kind, project, now = Date.now()) {
53
+ const noticeFile = join(dirname(CONFIG_PATH), `${kind}-notice.json`);
54
+ const shown = readShown(noticeFile);
55
+ if (recent(shown[project] ?? 0, now)) return false;
56
+ const kept = Object.entries(shown).filter(([, at]) => recent(at, now));
57
+ const tmp = `${noticeFile}.${process.pid}.tmp`;
58
+ try {
59
+ mkdirSync(dirname(noticeFile), { recursive: true, mode: 448 });
60
+ writeFileSync(tmp, JSON.stringify(Object.fromEntries([...kept, [project, now]])), {
61
+ mode: 384
62
+ });
63
+ renameSync(tmp, noticeFile);
64
+ } catch {
65
+ rmSync(tmp, { force: true });
66
+ return false;
67
+ }
68
+ return true;
69
+ }
70
+
34
71
  // src/utils/installerDetection.ts
35
- import { realpathSync } from "fs";
72
+ import { existsSync, realpathSync } from "fs";
36
73
  import { posix } from "path";
74
+
75
+ // src/utils/safeVersion.ts
76
+ function isSafeVersion(v) {
77
+ return /^[0-9]+\.[0-9]+\.[0-9]+(?:-[0-9A-Za-z.-]+)?(?:\+[0-9A-Za-z.-]+)?$/.test(v);
78
+ }
79
+
80
+ // src/utils/installerDetection.ts
37
81
  function resolveEntry() {
38
82
  const entry = process.argv[1];
39
83
  if (!entry) return null;
@@ -52,7 +96,8 @@ function isWorkspaceLink(realEntry) {
52
96
  }
53
97
  function isEphemeralExec(realEntry) {
54
98
  const normalized = normalizePath(realEntry);
55
- return normalized.includes("/_npx/") || normalized.includes("/.npm/_npx/") || posix.basename(posix.dirname(normalized)).startsWith("bunx-");
99
+ return normalized.includes("/_npx/") || normalized.includes("/.npm/_npx/") || posix.basename(posix.dirname(normalized)).startsWith("bunx-") || // bunx installs the package under its temp dir: `/tmp/bunx-<uid>-<spec>/node_modules/…`.
100
+ /\/bunx-[^/]+\/node_modules\//.test(normalized);
56
101
  }
57
102
  function isHomebrewInstall(realEntry) {
58
103
  return normalizePath(realEntry).includes("/Cellar/hyperframes/");
@@ -132,10 +177,58 @@ function installInvocation(kind, version) {
132
177
  return null;
133
178
  }
134
179
  }
135
-
136
- // src/utils/safeVersion.ts
137
- function isSafeVersion(v) {
138
- return /^[0-9]+\.[0-9]+\.[0-9]+(?:-[0-9A-Za-z.-]+)?(?:\+[0-9A-Za-z.-]+)?$/.test(v);
180
+ var CHANNEL_LABELS = {
181
+ npm: "npm global install",
182
+ pnpm: "pnpm global install",
183
+ bun: "bun global install",
184
+ brew: "Homebrew install",
185
+ npx: "npx / bunx (temporary cache)",
186
+ project: "project-local install (node_modules)",
187
+ workspace: "workspace link (monorepo dev)",
188
+ plugin: "agent plugin (version pinned by the plugin)",
189
+ unknown: "unrecognized install layout"
190
+ };
191
+ function installChannelLabel(channel) {
192
+ return CHANNEL_LABELS[channel];
193
+ }
194
+ function runningInstall() {
195
+ const path = resolveEntry();
196
+ if (process.env["HYPERFRAMES_PLUGIN_VERSION"]) return { channel: "plugin", path };
197
+ const installer = detectInstaller();
198
+ if (installer.kind !== "skip") return { channel: installer.kind, path };
199
+ if (!path) return { channel: "unknown", path };
200
+ if (isWorkspaceLink(path)) return { channel: "workspace", path };
201
+ if (isEphemeralExec(path)) return { channel: "npx", path };
202
+ if (normalizePath(path).includes("/node_modules/hyperframes/")) {
203
+ return { channel: "project", path };
204
+ }
205
+ return { channel: "unknown", path };
206
+ }
207
+ var PROJECT_LOCKFILES = [
208
+ ["bun.lock", (spec) => `bun add ${spec}`],
209
+ ["bun.lockb", (spec) => `bun add ${spec}`],
210
+ ["pnpm-lock.yaml", (spec) => `pnpm add ${spec}`],
211
+ ["yarn.lock", (spec) => `yarn add ${spec}`]
212
+ ];
213
+ function projectInstallCommand(path, version) {
214
+ const normalized = normalizePath(path);
215
+ const root = normalized.slice(0, normalized.indexOf("/node_modules/"));
216
+ const spec = `hyperframes@${version}`;
217
+ const lockfile = PROJECT_LOCKFILES.find(([name]) => existsSync(posix.join(root, name)));
218
+ return lockfile ? lockfile[1](spec) : `npm install ${spec}`;
219
+ }
220
+ function updateCommandFor(install, latest) {
221
+ if (install.channel === "plugin") return "update the HyperFrames plugin in your agent";
222
+ if (install.channel === "brew") return "brew upgrade hyperframes";
223
+ if (install.channel === "project" && install.path && isSafeVersion(latest)) {
224
+ return projectInstallCommand(install.path, latest);
225
+ }
226
+ const kind = install.channel;
227
+ if (kind === "npm" || kind === "pnpm" || kind === "bun") {
228
+ const invocation = installInvocation(kind, latest);
229
+ if (invocation) return `${invocation.bin} ${invocation.args.join(" ")}`;
230
+ }
231
+ return "npx hyperframes@latest";
139
232
  }
140
233
 
141
234
  // src/utils/projectPin.ts
@@ -182,7 +275,8 @@ function rewriteProjectPinnedScripts(scripts, targetVersion) {
182
275
 
183
276
  // src/utils/updateCheck.ts
184
277
  var NPM_REGISTRY_URL = "https://registry.npmjs.org/hyperframes/latest";
185
- var CHECK_INTERVAL_MS = 24 * 60 * 60 * 1e3;
278
+ var CHECK_INTERVAL_MS = 2 * 60 * 60 * 1e3;
279
+ var SKILLS_COUNT_MAX_AGE_MS = 24 * 60 * 60 * 1e3;
186
280
  var FETCH_TIMEOUT_MS = 3e3;
187
281
  function isNewerSemver(a, b) {
188
282
  try {
@@ -227,6 +321,7 @@ async function checkForUpdate(force) {
227
321
  function updateCheckDue(config = readConfig()) {
228
322
  if (updateCheckDisabled()) return false;
229
323
  if (!config.lastUpdateCheck || !isSafeCache(config.latestVersion)) return true;
324
+ if (isNewerSemver(VERSION, config.latestVersion)) return true;
230
325
  const fresh = Date.now() - new Date(config.lastUpdateCheck).getTime() < CHECK_INTERVAL_MS;
231
326
  return !fresh;
232
327
  }
@@ -246,15 +341,91 @@ function cachedVersionForThisInstall(value) {
246
341
  return isSafeCache(value) && !isNewerSemver(VERSION, value) ? value : void 0;
247
342
  }
248
343
  function getUpdateMeta() {
249
- const latestVersion = cachedVersionForThisInstall(readConfig().latestVersion);
344
+ const config = readConfig();
345
+ const latestVersion = cachedVersionForThisInstall(config.latestVersion);
346
+ const checkedAt = latestVersion ? config.lastUpdateCheck : void 0;
347
+ const skillsOutdated = cachedSkillsCount(config, config.skillsOutdatedCount);
348
+ const skillsMissing = cachedSkillsCount(config, config.skillsMissingCount);
250
349
  return {
251
350
  version: VERSION,
252
351
  latestVersion,
253
- updateAvailable: latestVersion ? isNewerSemver(latestVersion, VERSION) : false
352
+ updateAvailable: latestVersion ? isNewerSemver(latestVersion, VERSION) : false,
353
+ ...checkedAt ? { checkedAt } : {},
354
+ ...skillsOutdated === void 0 ? {} : { skillsOutdated },
355
+ ...skillsMissing === void 0 ? {} : { skillsMissing }
254
356
  };
255
357
  }
358
+ function cachedSkillsCount(config, count) {
359
+ if (process.env["HYPERFRAMES_SKIP_SKILLS"] === "1") return void 0;
360
+ if (!config.lastSkillsCheck || config.skillsCheckedVersion !== VERSION) return void 0;
361
+ const age = Date.now() - new Date(config.lastSkillsCheck).getTime();
362
+ if (!(age >= 0 && age < SKILLS_COUNT_MAX_AGE_MS)) return void 0;
363
+ return typeof count === "number" && Number.isInteger(count) && count >= 0 ? count : void 0;
364
+ }
365
+ function skillsBehindPhrase(meta) {
366
+ const outdated = meta.skillsOutdated ?? 0;
367
+ const missing = meta.skillsMissing ?? 0;
368
+ const parts = [];
369
+ if (outdated > 0) {
370
+ parts.push(
371
+ `${outdated} installed HyperFrames ${outdated === 1 ? "skill is" : "skills are"} out of date`
372
+ );
373
+ }
374
+ if (missing > 0) {
375
+ const which = outdated > 0 ? "core" : "core HyperFrames";
376
+ parts.push(`${missing} ${which} ${missing === 1 ? "skill is" : "skills are"} missing`);
377
+ }
378
+ return parts.length > 0 ? parts.join(" and ") : null;
379
+ }
380
+ var GLOBAL_CHANNELS = /* @__PURE__ */ new Set(["npm", "pnpm", "bun", "brew"]);
381
+ function projectNoticeCommand(install, cliBehind, skillsBehind, latest) {
382
+ if (!cliBehind) return "npx hyperframes update";
383
+ const bump = updateCommandFor(install, latest);
384
+ return skillsBehind ? `${bump}, then npx hyperframes update` : bump;
385
+ }
386
+ function updateCommandForThisInstall(cliBehind, skillsBehind, latest) {
387
+ const install = runningInstall();
388
+ if (GLOBAL_CHANNELS.has(install.channel)) {
389
+ return skillsBehind ? "hyperframes update" : updateCommandFor(install, latest);
390
+ }
391
+ if (install.channel === "project") {
392
+ return projectNoticeCommand(install, cliBehind, skillsBehind, latest);
393
+ }
394
+ return install.channel === "npx" && cliBehind ? "npx hyperframes@latest update" : "npx hyperframes update";
395
+ }
396
+ function noticeSentence(version, latest, skills, command) {
397
+ const cli = latest ? `HyperFrames CLI ${latest} is available (this run is ${version})` : null;
398
+ if (cli && skills) return `For the user: ${cli}, and ${skills}. To update both, run: ${command}`;
399
+ if (cli) return `For the user: ${cli}. To update, run: ${command}`;
400
+ return `For the user: ${skills} (this run is HyperFrames CLI ${version}). To update them, run: ${command}`;
401
+ }
402
+ function updateNoticeText(meta) {
403
+ if (updateCheckDisabled() || process.env["HYPERFRAMES_PLUGIN_VERSION"]) return null;
404
+ const latest = meta.updateAvailable ? meta.latestVersion ?? null : null;
405
+ const skills = skillsBehindPhrase(meta);
406
+ if (!latest && !skills) return null;
407
+ const command = updateCommandForThisInstall(
408
+ latest !== null,
409
+ skills !== null,
410
+ latest ?? meta.version
411
+ );
412
+ return noticeSentence(meta.version, latest, skills, command);
413
+ }
414
+ function noticeOrNull(meta) {
415
+ try {
416
+ const notice = updateNoticeText(meta);
417
+ return notice && claimDailyNotice("update", resolve(process.cwd())) ? notice : null;
418
+ } catch {
419
+ return null;
420
+ }
421
+ }
422
+ var NO_UPDATE_NOTICE = { updateNotice: false };
256
423
  function withMeta(data, options) {
257
424
  const meta = getUpdateMeta();
425
+ if (options?.updateNotice !== false) {
426
+ const notice = noticeOrNull(meta);
427
+ if (notice) meta.updateNotice = notice;
428
+ }
258
429
  if (options?.deprecated) meta.deprecated = true;
259
430
  return { ...data, _meta: meta };
260
431
  }
@@ -295,9 +466,9 @@ function printStalePinNotice(cwd = process.cwd()) {
295
466
  if (updateCheckDisabled()) return;
296
467
  let scripts = {};
297
468
  try {
298
- const pkgPath = join(cwd, "package.json");
299
- if (!existsSync(pkgPath)) return;
300
- scripts = JSON.parse(readFileSync(pkgPath, "utf-8")).scripts ?? {};
469
+ const pkgPath = join2(cwd, "package.json");
470
+ if (!existsSync2(pkgPath)) return;
471
+ scripts = JSON.parse(readFileSync2(pkgPath, "utf-8")).scripts ?? {};
301
472
  } catch {
302
473
  return;
303
474
  }
@@ -338,15 +509,21 @@ function printStalePinNotice(cwd = process.cwd()) {
338
509
  }
339
510
 
340
511
  export {
512
+ claimDailyNotice,
513
+ isSafeVersion,
341
514
  detectInstaller,
342
515
  installInvocation,
343
- isSafeVersion,
516
+ installChannelLabel,
517
+ runningInstall,
518
+ updateCommandFor,
344
519
  rewritePinnedHyperframesText,
345
520
  rewriteProjectPinnedScripts,
346
521
  checkForUpdate,
347
522
  updateCheckDue,
348
523
  cachedUpdateCheck,
349
524
  getUpdateMeta,
525
+ updateCommandForThisInstall,
526
+ NO_UPDATE_NOTICE,
350
527
  withMeta,
351
528
  printDeprecationNotice,
352
529
  updateCheckDisabled,
@@ -7,17 +7,17 @@ var __dirname = __hf_dirname(__filename);
7
7
  import {
8
8
  parseFeedbackRating,
9
9
  trackRenderFeedback
10
- } from "./chunk-5CDTGHED.js";
10
+ } from "./chunk-QFZ3ZSXI.js";
11
11
  import {
12
12
  shouldTrack
13
- } from "./chunk-PO7LSMN5.js";
13
+ } from "./chunk-UH62KSYV.js";
14
14
  import {
15
15
  c
16
16
  } from "./chunk-2GICKZ3I.js";
17
17
  import {
18
18
  readConfig,
19
19
  writeConfig
20
- } from "./chunk-BLBMPEBX.js";
20
+ } from "./chunk-BONBJJ35.js";
21
21
  import {
22
22
  detectAgentRuntime
23
23
  } from "./chunk-G7VEYUZ2.js";
@@ -84,7 +84,7 @@ async function getDoctorSummary() {
84
84
  try {
85
85
  const [{ getSystemMeta }, { findFFmpeg }] = await Promise.all([
86
86
  import("./system-FDPS57FU.js"),
87
- import("./ffmpeg-PERZ6YHQ.js")
87
+ import("./ffmpeg-A2O4HSRD.js")
88
88
  ]);
89
89
  const sys = getSystemMeta();
90
90
  const parts = [