hyperframes 0.8.175 → 0.8.177

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 (137) hide show
  1. package/bin/hyperframes.mjs +3 -0
  2. package/dist/{add-S4AOKSNH.js → add-YVP5YBNV.js} +5 -5
  3. package/dist/{animatedGifPrep-QRDM2NMV.js → animatedGifPrep-6SPYXSHE.js} +2 -2
  4. package/dist/api.d.ts +2 -0
  5. package/dist/api.js +10 -10
  6. package/dist/{asset-DQ45BUBL.js → asset-CZHAZMDR.js} +2 -2
  7. package/dist/{assetCataloger-NPDCMAYE.js → assetCataloger-5GGNQC3Y.js} +2 -2
  8. package/dist/{audio-OOAXEELO.js → audio-F37HJPGZ.js} +9 -9
  9. package/dist/{auth-33IY64LT.js → auth-CADZEUXD.js} +1 -1
  10. package/dist/{autoUpdate-KGLJUGNZ.js → autoUpdate-46XNDX2V.js} +2 -2
  11. package/dist/{backgroundChecks-DQPHYLVN.js → backgroundChecks-UWDSDJHJ.js} +3 -3
  12. package/dist/backgroundChecksWorker.js +3 -3
  13. package/dist/{beats-WDYSCACS.js → beats-COVC2QGG.js} +4 -4
  14. package/dist/{benchmark-WOAULMYW.js → benchmark-HDPPG2FE.js} +6 -6
  15. package/dist/{browser-2HX46R74.js → browser-JEIXZKJN.js} +3 -3
  16. package/dist/{bundleWithLocalizedFonts-32N7TVM6.js → bundleWithLocalizedFonts-PMRGOQWD.js} +1 -1
  17. package/dist/{capture-5ASPHTMF.js → capture-QVW6JPTF.js} +5 -5
  18. package/dist/{capture-7LR5UVM2.js → capture-YMF7J55W.js} +2 -2
  19. package/dist/captureCompositionFrame-QUYL3DEX.js +88 -0
  20. package/dist/{catalog-LVW3RT4U.js → catalog-DTB6S66P.js} +18 -10
  21. package/dist/{catch-up-W6Z73GXL.js → catch-up-Y4KO7XHK.js} +4 -4
  22. package/dist/{check-C23ZWACZ.js → check-3YLTRK6W.js} +44 -33
  23. package/dist/{checkBrowser-WS6FSLBJ.js → checkBrowser-LEUOWFNZ.js} +67 -47
  24. package/dist/{chunk-W5USVP6Z.js → chunk-2CEIKEFU.js} +1 -1
  25. package/dist/{chunk-XDK2FUAC.js → chunk-2PNLYDGZ.js} +12 -12
  26. package/dist/{chunk-IUOPF3DL.js → chunk-2YT3SCXL.js} +1 -1
  27. package/dist/{chunk-YMU42UU2.js → chunk-457OAAL2.js} +1 -1
  28. package/dist/{chunk-OUMYTLPP.js → chunk-4YBNQDZM.js} +1 -1
  29. package/dist/{chunk-ZGSLXWH2.js → chunk-5ZSLJXQX.js} +1 -1
  30. package/dist/{chunk-CEYY3SOX.js → chunk-6GMZRHYD.js} +52 -16
  31. package/dist/{chunk-J53AJK3Q.js → chunk-6OV3YGZF.js} +1 -1
  32. package/dist/{chunk-G7I3WZK4.js → chunk-7L4JOVV7.js} +1 -1
  33. package/dist/{chunk-QMQZXNGU.js → chunk-AFSBPASX.js} +29 -10
  34. package/dist/{chunk-7GUAZGSW.js → chunk-B7DJQFAC.js} +3 -3
  35. package/dist/{chunk-Z2R7CFWH.js → chunk-BEX7K4WO.js} +1 -1
  36. package/dist/{chunk-YCSCDQDS.js → chunk-BHFIITTD.js} +5 -5
  37. package/dist/{chunk-JT7PV3GL.js → chunk-BQTCQ6VN.js} +7 -13
  38. package/dist/{chunk-S354WIFQ.js → chunk-GVIH4ZQY.js} +1 -1
  39. package/dist/{chunk-WDFLYDKN.js → chunk-GZG3ZZOO.js} +4 -4
  40. package/dist/{chunk-7E4YFL4U.js → chunk-HLBAQBHT.js} +1 -1
  41. package/dist/{chunk-3X3CELOP.js → chunk-JWUKHXM6.js} +1 -1
  42. package/dist/{chunk-O6FWDZYJ.js → chunk-K535ASAM.js} +1 -1
  43. package/dist/{chunk-BHMWVRNS.js → chunk-KRKSY2AE.js} +1 -1
  44. package/dist/{chunk-V7T7WA2K.js → chunk-L3LJVYXS.js} +2 -2
  45. package/dist/{chunk-XRRDVRCY.js → chunk-L6XT6GSV.js} +1 -1
  46. package/dist/{chunk-KZQGUXG5.js → chunk-LEILKM2N.js} +903 -813
  47. package/dist/{chunk-MJZQ44NV.js → chunk-M3MXTYDE.js} +1 -1
  48. package/dist/{chunk-EKDTCSCL.js → chunk-MG66UO4N.js} +1 -1
  49. package/dist/{chunk-3SWMUZ4Y.js → chunk-MNEC244Z.js} +2 -2
  50. package/dist/{chunk-NELZN7SV.js → chunk-MPNVXG3J.js} +2 -2
  51. package/dist/{chunk-4XM6VXLN.js → chunk-MXFCQCKE.js} +2 -2
  52. package/dist/{chunk-NZRAS3FB.js → chunk-P3MMF2JQ.js} +1 -1
  53. package/dist/{chunk-UWUKJDTA.js → chunk-PL4WM5XE.js} +1 -1
  54. package/dist/{chunk-PBKOURSI.js → chunk-S3T3TDAB.js} +1 -1
  55. package/dist/{chunk-NSWIF4VH.js → chunk-SJFA4CZ3.js} +96 -11
  56. package/dist/{chunk-ZD7QKZSS.js → chunk-SSYUONVH.js} +2 -2
  57. package/dist/{chunk-KHR4IJAW.js → chunk-UEGULMAH.js} +84 -42
  58. package/dist/{chunk-KZHYAGC3.js → chunk-WNQUXBDU.js} +3 -3
  59. package/dist/{chunk-RAZVWSU5.js → chunk-X4PK5ZXP.js} +1 -1
  60. package/dist/{chunk-FRNKM4MG.js → chunk-X6HYBA4A.js} +1 -1
  61. package/dist/{chunk-ZDOWJ3NS.js → chunk-XXHHPB6E.js} +11 -11
  62. package/dist/{chunk-ZXHEOTYW.js → chunk-YCRX5APY.js} +1 -1
  63. package/dist/{chunk-RERXOG54.js → chunk-YWSXFFO3.js} +3 -1
  64. package/dist/{clean-KBNXV6DP.js → clean-BDXOJ4PW.js} +12 -12
  65. package/dist/cli.js +51 -51
  66. package/dist/{cloud-BWWKDRR6.js → cloud-HVG2LUBO.js} +4 -4
  67. package/dist/commands/contrast-audit.browser.js +166 -22
  68. package/dist/{compare-UWJRKF5K.js → compare-ZXORZDGQ.js} +20 -20
  69. package/dist/{component-SWOGSIO2.js → component-AZHVBBVP.js} +3 -3
  70. package/dist/{compositions-PIPVEXE3.js → compositions-WFILUFC4.js} +6 -6
  71. package/dist/{delete-OXIDK7N3.js → delete-I34NH2Q4.js} +2 -2
  72. package/dist/{doctor-KLQLFPCF.js → doctor-6YID47TF.js} +6 -6
  73. package/dist/{events-EGCYD45B.js → events-G76VOIBQ.js} +3 -3
  74. package/dist/{events-EVTTGISX.js → events-OKT2KO6S.js} +2 -2
  75. package/dist/{feedback-G4WZLOVD.js → feedback-EGU7SSXF.js} +4 -4
  76. package/dist/{ffmpeg-QIYSAPHO.js → ffmpeg-CSJLJAQ3.js} +2 -2
  77. package/dist/{figma-Q4CKDE7M.js → figma-SUJPNBQQ.js} +3 -3
  78. package/dist/fontLocalizeCli.js +4 -4
  79. package/dist/{get-NPRQH64W.js → get-7MYYFGO7.js} +2 -2
  80. package/dist/{gpuPolicy-L72BQRFR.js → gpuPolicy-C6JWEX7F.js} +2 -2
  81. package/dist/{grade-compare-H4NJEL4P.js → grade-compare-P22VRQLA.js} +21 -21
  82. package/dist/{help-2S3XXDEA.js → help-HL6QBZMC.js} +1 -1
  83. package/dist/{history-X4CGCVEQ.js → history-OG2IXOQA.js} +7 -7
  84. package/dist/hyperframes-player.global.js +1 -1
  85. package/dist/{info-YYUISGL7.js → info-7P77JIWI.js} +5 -5
  86. package/dist/{init-BAAI4ZMR.js → init-JI7QDJV4.js} +18 -18
  87. package/dist/{inspect-LXJ3XJUZ.js → inspect-7GSF776P.js} +19 -19
  88. package/dist/{keyframes-NXXJSQWG.js → keyframes-6NM477BA.js} +6 -6
  89. package/dist/{lambda-PG3JKNWS.js → lambda-4DNBHUPF.js} +2 -2
  90. package/dist/{layout-CBFO36IE.js → layout-IBDEMDYP.js} +19 -19
  91. package/dist/{lint-Y6NWQTKF.js → lint-BGAON4GT.js} +6 -6
  92. package/dist/{list-VY6KIYTX.js → list-PGWNFSLX.js} +2 -2
  93. package/dist/{login-426Q3H3P.js → login-IAGLU3R3.js} +4 -4
  94. package/dist/{manager-3RRUFZ4H.js → manager-VOGZQSK4.js} +7 -5
  95. package/dist/{media-treatment-ZVIXMJZJ.js → media-treatment-Z4N3JEDB.js} +8 -8
  96. package/dist/{models-KC2QBPVK.js → models-QUOIJVQI.js} +6 -6
  97. package/dist/{motionShot-3ZSLQJ4D.js → motionShot-GPNESXTN.js} +7 -7
  98. package/dist/{normalize-audio-DRU5LFYU.js → normalize-audio-C264N2QE.js} +5 -5
  99. package/dist/{open-LPBZQ4DC.js → open-HB5F4HSD.js} +4 -4
  100. package/dist/{parakeetRunner-IFY6NK5G.js → parakeetRunner-2ZQOINZQ.js} +7 -7
  101. package/dist/{pipeline-AGMCDT5A.js → pipeline-JWGTH2BJ.js} +3 -3
  102. package/dist/{play-WVWXNQED.js → play-VQ4HA4CC.js} +10 -10
  103. package/dist/{preflight-I5JGCCKM.js → preflight-4WTT4D5X.js} +3 -3
  104. package/dist/{present-IPTWJUKY.js → present-HU46P43M.js} +9 -9
  105. package/dist/{preview-JVLRQVD7.js → preview-LNTJ62DX.js} +8 -8
  106. package/dist/{producer-HKGHSAON.js → producer-UZZQX6IJ.js} +1 -1
  107. package/dist/{remove-background-WY7KA77M.js → remove-background-OX5WZTXY.js} +4 -4
  108. package/dist/{render-BEDATKWV.js → render-DV76TO7S.js} +5 -5
  109. package/dist/{render-P3PFNCBA.js → render-TPE44TOW.js} +27 -27
  110. package/dist/{sherpa-SQGEFX3S.js → sherpa-IBMU4WV6.js} +6 -6
  111. package/dist/skills/media-use/references/operations.md +3 -1
  112. package/dist/{skills-D2FIQ2JN.js → skills-M2ANTFD6.js} +5 -5
  113. package/dist/{skillsUpdateCheck-2OLTHCBX.js → skillsUpdateCheck-4WNEKKDW.js} +3 -3
  114. package/dist/{snapshot-R7U73M3N.js → snapshot-5AKBT5IQ.js} +36 -32
  115. package/dist/{src-4COYCAFY.js → src-JGPFLYBL.js} +1 -1
  116. package/dist/{src-WOD4AEI3.js → src-SGPA7DM7.js} +3 -3
  117. package/dist/{staticProjectServer-DG4VZO4G.js → staticProjectServer-UVFPQEUZ.js} +4 -4
  118. package/dist/studio/assets/{hyperframes-player-BByRREAU.js → hyperframes-player-BulZP0_1.js} +1 -1
  119. package/dist/studio/assets/{index-Wz-WEqHg.js → index-B1Gypobp.js} +4 -4
  120. package/dist/studio/assets/{index-CULLUqJo.js → index-CGncBUsJ.js} +1 -1
  121. package/dist/studio/index.html +1 -1
  122. package/dist/{studio-api-RGNBVLLL.js → studio-api-RVIU7JP2.js} +2 -2
  123. package/dist/{studioServer-LC5T4OXQ.js → studioServer-K22MWDLW.js} +30 -30
  124. package/dist/{telemetry-BLOE3TWY.js → telemetry-SUAMGBFK.js} +3 -3
  125. package/dist/{timeline-QQPPMADL.js → timeline-SGVBFT36.js} +13 -13
  126. package/dist/{tokens-E3SHBFDU.js → tokens-IFHWY5WC.js} +2 -2
  127. package/dist/{transcribe-D5N7SBDO.js → transcribe-GY4JHB7V.js} +12 -11
  128. package/dist/{transcribe-O2AQ5E2L.js → transcribe-KAOCI5CW.js} +7 -7
  129. package/dist/{updateCheck-ELOZ2CID.js → updateCheck-YUNDJDLW.js} +2 -2
  130. package/dist/{upgrade-JDFZEPZY.js → upgrade-PL2BFWTO.js} +2 -2
  131. package/dist/{urlDownloader-32OGC3EW.js → urlDownloader-FZ5ISJES.js} +1 -1
  132. package/dist/{validate-LQQEABER.js → validate-2NALRIFW.js} +17 -17
  133. package/dist/{video-HXIM27TO.js → video-7CDAIWYC.js} +2 -2
  134. package/package.json +1 -1
  135. package/dist/{chunk-3Q4Y33FT.js → chunk-PIH4P2G6.js} +4 -4
  136. package/dist/{deploy-NKWMPAMH.js → deploy-3TTQZGTF.js} +4 -4
  137. package/dist/{destroy-UKP522AE.js → destroy-BEL232I5.js} +3 -3
@@ -6,7 +6,7 @@ var __filename = __hf_fileURLToPath(import.meta.url);
6
6
  var __dirname = __hf_dirname(__filename);
7
7
  import {
8
8
  updateNoticesSuppressed
9
- } from "./chunk-YMU42UU2.js";
9
+ } from "./chunk-457OAAL2.js";
10
10
  import {
11
11
  hostAnswers
12
12
  } from "./chunk-K4WIOZFP.js";
@@ -7,7 +7,7 @@ var __dirname = __hf_dirname(__filename);
7
7
 
8
8
  // src/utils/producer.ts
9
9
  async function loadProducer() {
10
- return await import("./src-WOD4AEI3.js");
10
+ return await import("./src-SGPA7DM7.js");
11
11
  }
12
12
 
13
13
  export {
@@ -20,7 +20,7 @@ import {
20
20
  typeDirPath,
21
21
  updateRecord,
22
22
  withFigmaErrors
23
- } from "./chunk-G7I3WZK4.js";
23
+ } from "./chunk-7L4JOVV7.js";
24
24
  import {
25
25
  defineCommand
26
26
  } from "./chunk-S3S4TGEH.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-BLOE3TWY.js");
232
+ const { trackFigmaImport } = await import("./telemetry-SUAMGBFK.js");
233
233
  trackFigmaImport({
234
234
  phase: "asset",
235
235
  reused: results.every((r) => r.reused),
@@ -6,8 +6,8 @@ var __filename = __hf_fileURLToPath(import.meta.url);
6
6
  var __dirname = __hf_dirname(__filename);
7
7
 
8
8
  // src/version.ts
9
- var VERSION = true ? "0.8.175" : "0.0.0-dev";
10
- var PRODUCER_VERSION = true ? "0.8.175" : "0.0.0-dev";
9
+ var VERSION = true ? "0.8.177" : "0.0.0-dev";
10
+ var PRODUCER_VERSION = true ? "0.8.177" : "0.0.0-dev";
11
11
 
12
12
  export {
13
13
  VERSION,
@@ -7,7 +7,7 @@ var __dirname = __hf_dirname(__filename);
7
7
  import {
8
8
  RegistryCompatibilityError,
9
9
  gateRegistryItemsCompatibility
10
- } from "./chunk-NZRAS3FB.js";
10
+ } from "./chunk-P3MMF2JQ.js";
11
11
  import {
12
12
  DEFAULT_PROJECT_CONFIG,
13
13
  createProjectConfig,
@@ -29,7 +29,7 @@ import {
29
29
  } from "./chunk-OYEDHVSI.js";
30
30
  import {
31
31
  trackRegistryItemAdded
32
- } from "./chunk-PBKOURSI.js";
32
+ } from "./chunk-S3T3TDAB.js";
33
33
  import {
34
34
  defineCommand
35
35
  } from "./chunk-S3S4TGEH.js";
@@ -6,7 +6,7 @@ var __filename = __hf_fileURLToPath(import.meta.url);
6
6
  var __dirname = __hf_dirname(__filename);
7
7
  import {
8
8
  VERSION
9
- } from "./chunk-NELZN7SV.js";
9
+ } from "./chunk-MPNVXG3J.js";
10
10
 
11
11
  // src/registry/compatibility.ts
12
12
  import { compareVersions } from "compare-versions";
@@ -8,7 +8,7 @@ import {
8
8
  DEFAULT_VP9_CPU_USED,
9
9
  isHttpUrl,
10
10
  runFfmpeg
11
- } from "./chunk-RERXOG54.js";
11
+ } from "./chunk-YWSXFFO3.js";
12
12
  import {
13
13
  parseAnimatedGifMetadata
14
14
  } from "./chunk-VEQ7DKPG.js";
@@ -8,7 +8,7 @@ import {
8
8
  flush,
9
9
  shouldTrack,
10
10
  trackEvent
11
- } from "./chunk-W5USVP6Z.js";
11
+ } from "./chunk-2CEIKEFU.js";
12
12
  import {
13
13
  getPowerState
14
14
  } from "./chunk-T6AGUTZJ.js";
@@ -9,16 +9,31 @@ import {
9
9
  } from "./chunk-PO2SDVQA.js";
10
10
  import {
11
11
  findFFmpeg
12
- } from "./chunk-S354WIFQ.js";
12
+ } from "./chunk-GVIH4ZQY.js";
13
13
  import {
14
14
  stoppableExecFile
15
15
  } from "./chunk-HU2SPFNG.js";
16
16
 
17
17
  // src/whisper/manager.ts
18
18
  import { execFileSync } from "child_process";
19
- import { existsSync, mkdirSync, readdirSync, rmSync } from "fs";
19
+ import { existsSync, mkdirSync, readdirSync, renameSync, rmSync, statSync as statSync2 } from "fs";
20
20
  import { homedir, platform } from "os";
21
21
  import { join } from "path";
22
+
23
+ // src/whisper/modelFile.ts
24
+ import { createHash } from "crypto";
25
+ import { createReadStream, statSync } from "fs";
26
+ async function sha256File(path) {
27
+ const hash = createHash("sha256");
28
+ for await (const chunk of createReadStream(path)) hash.update(chunk);
29
+ return hash.digest("hex");
30
+ }
31
+ async function verifies(path, file) {
32
+ if (statSync(path, { throwIfNoEntry: false })?.size !== file.bytes) return false;
33
+ return await sha256File(path) === file.sha256;
34
+ }
35
+
36
+ // src/whisper/manager.ts
22
37
  var MODELS_DIR = join(homedir(), ".cache", "hyperframes", "whisper", "models");
23
38
  var DEFAULT_MODEL = "small.en";
24
39
  var WhisperUnavailableError = class extends Error {
@@ -32,8 +47,62 @@ function isWhisperUnavailable(err) {
32
47
  if (err instanceof WhisperUnavailableError) return true;
33
48
  return err instanceof Error && "code" in err && err.code === "WHISPER_UNAVAILABLE";
34
49
  }
50
+ var MODEL_REVISION = "5359861c739e955e79d9a303bcbc70fb988958b1";
35
51
  function getModelUrl(model) {
36
- return `https://huggingface.co/ggerganov/whisper.cpp/resolve/main/ggml-${model}.bin`;
52
+ return `https://huggingface.co/ggerganov/whisper.cpp/resolve/${MODEL_REVISION}/ggml-${model}.bin`;
53
+ }
54
+ var pinned = (model, bytes, sha256) => [
55
+ model,
56
+ { name: `ggml-${model}.bin`, bytes, sha256 }
57
+ ];
58
+ var PINNED_MODELS = new Map([
59
+ pinned("tiny", 77691713, "be07e048e1e599ad46341c8d2a135645097a538221678b7acdd1b1919c6e1b21"),
60
+ pinned("tiny.en", 77704715, "921e4cf8686fdd993dcd081a5da5b6c365bfde1162e72b08d75ac75289920b1f"),
61
+ pinned("base", 147951465, "60ed5bc3dd14eea856493d334349b405782ddcaf0028d4b5df4088345fba2efe"),
62
+ pinned(
63
+ "base.en",
64
+ 147964211,
65
+ "a03779c86df3323075f5e796cb2ce5029f00ec8869eee3fdfb897afe36c6d002"
66
+ ),
67
+ pinned("small", 487601967, "1be3a9b2063867b937e64e2ec7483364a79917e157fa98c5d94b5c1fffea987b"),
68
+ pinned(
69
+ "small.en",
70
+ 487614201,
71
+ "c6138d6d58ecc8322097e0f987c32f1be8bb0a18532a3f88f734d1bbf9c41e5d"
72
+ ),
73
+ pinned(
74
+ "medium",
75
+ 1533763059,
76
+ "6c14d5adee5f86394037b4e4e8b59f1673b6cee10e3cf0b11bbdbee79c156208"
77
+ ),
78
+ pinned(
79
+ "medium.en",
80
+ 1533774781,
81
+ "cc37e93478338ec7700281a7ac30a10128929eb8f427dda2e865faa8f6da4356"
82
+ ),
83
+ pinned(
84
+ "large-v1",
85
+ 3094623691,
86
+ "7d99f41a10525d0206bddadd86760181fa920438b6b33237e3118ff6c83bb53d"
87
+ ),
88
+ pinned(
89
+ "large-v2",
90
+ 3094623691,
91
+ "9a423fe4d40c82774b6af34115b8b935f34152246eb19e80e376071d3f999487"
92
+ ),
93
+ pinned(
94
+ "large-v3",
95
+ 3095033483,
96
+ "64d182b440b98d5203c4f9bd541544d84c605196c4f7b845dfa11fb23594d1e2"
97
+ ),
98
+ pinned(
99
+ "large-v3-turbo",
100
+ 1624555275,
101
+ "1fc70f774d38eb169993ac391eea357ef47c88757ef72ee5943879b7e8e2bc69"
102
+ )
103
+ ]);
104
+ function pinnedWhisperModel(model) {
105
+ return PINNED_MODELS.get(model);
37
106
  }
38
107
  function whichBinary(name) {
39
108
  try {
@@ -189,15 +258,28 @@ async function ensureWhisper(options) {
189
258
  }
190
259
  async function ensureModel(model = DEFAULT_MODEL, options) {
191
260
  const modelPath = join(MODELS_DIR, `ggml-${model}.bin`);
192
- if (existsSync(modelPath)) return modelPath;
261
+ const pin = PINNED_MODELS.get(model);
262
+ const cachedBytes = statSync2(modelPath, { throwIfNoEntry: false })?.size;
263
+ if (cachedBytes !== void 0 && (!pin || cachedBytes === pin.bytes)) return modelPath;
193
264
  mkdirSync(MODELS_DIR, { recursive: true });
194
- options?.onProgress?.(`Downloading model ${model}...`);
195
- await downloadFile(getModelUrl(model), modelPath, {
196
- signal: options?.signal,
197
- onProgress: options?.onDownloadProgress
198
- });
199
- if (!existsSync(modelPath)) {
200
- throw new Error(`Model download failed: ${model}`);
265
+ rmSync(modelPath, { force: true });
266
+ options?.onProgress?.(
267
+ cachedBytes === void 0 ? `Downloading model ${model}...` : `Model ${model} is incomplete; downloading it again...`
268
+ );
269
+ const downloaded = `${modelPath}.${process.pid}.download`;
270
+ try {
271
+ await downloadFile(getModelUrl(model), downloaded, {
272
+ signal: options?.signal,
273
+ onProgress: options?.onDownloadProgress
274
+ });
275
+ if (pin && !await verifies(downloaded, pin)) {
276
+ throw new Error(
277
+ `${pin.name} did not match its pinned size and sha256, so it was discarded. Re-run to retry.`
278
+ );
279
+ }
280
+ renameSync(downloaded, modelPath);
281
+ } finally {
282
+ rmSync(downloaded, { force: true });
201
283
  }
202
284
  return modelPath;
203
285
  }
@@ -206,10 +288,13 @@ function hasFFmpeg() {
206
288
  }
207
289
 
208
290
  export {
291
+ sha256File,
292
+ verifies,
209
293
  MODELS_DIR,
210
294
  DEFAULT_MODEL,
211
295
  WhisperUnavailableError,
212
296
  isWhisperUnavailable,
297
+ pinnedWhisperModel,
213
298
  findWhisper,
214
299
  listWhisperModels,
215
300
  getInstallInstructions,
@@ -7,10 +7,10 @@ var __dirname = __hf_dirname(__filename);
7
7
  import {
8
8
  trackLintReport,
9
9
  trackLintRuleStreak
10
- } from "./chunk-PBKOURSI.js";
10
+ } from "./chunk-S3T3TDAB.js";
11
11
  import {
12
12
  shouldTrack
13
- } from "./chunk-W5USVP6Z.js";
13
+ } from "./chunk-2CEIKEFU.js";
14
14
  import {
15
15
  LINT_RULE_COUNT,
16
16
  LINT_RULE_GROUP_COUNTS
@@ -12,25 +12,25 @@ import {
12
12
  launchManagedBrowser,
13
13
  resolveManagedGpuMode,
14
14
  rethrowAfterBrowserCleanup
15
- } from "./chunk-XRRDVRCY.js";
15
+ } from "./chunk-L6XT6GSV.js";
16
16
  import {
17
17
  pageNavigationTimeoutMs,
18
18
  windowsChromeCrashRemediation
19
- } from "./chunk-RAZVWSU5.js";
19
+ } from "./chunk-X4PK5ZXP.js";
20
20
  import {
21
21
  oneProcessOverPipe
22
22
  } from "./chunk-BRHI7EIA.js";
23
23
  import {
24
24
  resolveLocalBrowserGpuMode,
25
25
  resolveLocalWebGpu
26
- } from "./chunk-V7T7WA2K.js";
26
+ } from "./chunk-L3LJVYXS.js";
27
27
  import {
28
28
  c
29
29
  } from "./chunk-ZTZA4UWZ.js";
30
30
  import {
31
31
  assertWebGpuAdapterAvailable,
32
32
  compositionRequiresWebGpu
33
- } from "./chunk-RERXOG54.js";
33
+ } from "./chunk-YWSXFFO3.js";
34
34
  import {
35
35
  normalizeErrorMessage
36
36
  } from "./chunk-KNU5COPB.js";
@@ -59,6 +59,36 @@ var DENSE_GEOMETRY_SEEK_OPTIONS = {
59
59
  waitForVideoFrames: false,
60
60
  skipWebglDraws: true
61
61
  };
62
+ function launchKey(html, noListen, options) {
63
+ const viewport = resolveCompositionViewportFromHtml(html);
64
+ const gpuMode = options.browserGpuMode ?? resolveCliChromeGpuMode();
65
+ return JSON.stringify([viewport, compositionRequiresWebGpu(html), noListen, gpuMode]);
66
+ }
67
+ function prelaunchCompositionBrowser(html, browserGpuMode) {
68
+ const abort = new AbortController();
69
+ const options = { browserGpuMode, signal: abort.signal };
70
+ const key = launchKey(html, false, options);
71
+ const launched = launchCompositionBrowser(html, false, options).catch(() => void 0);
72
+ let taken = false;
73
+ const discard = async () => {
74
+ if (taken) return;
75
+ taken = true;
76
+ abort.abort();
77
+ await (await launched)?.browser.close().catch(() => void 0);
78
+ };
79
+ return {
80
+ launched,
81
+ take: async (wanted) => {
82
+ if (wanted !== key) return discard().then(() => void 0);
83
+ taken = true;
84
+ const result = await launched;
85
+ if (result?.browser.connected) return result;
86
+ await result?.browser.close().catch(() => void 0);
87
+ return void 0;
88
+ },
89
+ discard
90
+ };
91
+ }
62
92
  function resolveCliChromeGpuMode(envMode = process.env.PRODUCER_BROWSER_GPU_MODE) {
63
93
  return resolveLocalBrowserGpuMode(void 0, envMode);
64
94
  }
@@ -144,13 +174,37 @@ async function installPageFunctionGuard(page) {
144
174
  await page.evaluateOnNewDocument("self.__name = self.__name || ((fn) => fn);");
145
175
  }
146
176
  async function openSettledCompositionPage(html, url, options) {
177
+ const viewport = resolveCompositionViewportFromHtml(html);
178
+ const requiresWebGpu = compositionRequiresWebGpu(html);
179
+ const answer = (await import("./staticProjectServer-UVFPQEUZ.js")).inProcessAnswer(url);
180
+ const noListen = answer !== void 0;
181
+ let chromeBrowser;
182
+ try {
183
+ const launched = await options.prelaunched?.take(launchKey(html, noListen, options)) ?? await launchCompositionBrowser(html, noListen, options);
184
+ chromeBrowser = launched.browser;
185
+ const softwareWebGpu = launched.softwareWebGpu;
186
+ options.onBrowser?.(chromeBrowser);
187
+ options.onBrowserReady?.();
188
+ const page = await chromeBrowser.newPage();
189
+ await installPageFunctionGuard(page);
190
+ await page.setViewport(viewport);
191
+ if (answer) await answerPageInProcess(page, url, answer);
192
+ await options.beforeNavigate?.(page);
193
+ await gotoWhenSent(page, url, pageNavigationTimeoutMs(options.navigationTimeoutMs));
194
+ await assertWebGpuAdapterAvailable(page, requiresWebGpu, softwareWebGpu);
195
+ const renderReadyTimedOut = !await waitForCompositionSettle(page, options);
196
+ return { browser: chromeBrowser, page, renderReadyTimedOut };
197
+ } catch (err) {
198
+ return rethrowAfterBrowserCleanup(chromeBrowser, err);
199
+ }
200
+ }
201
+ async function launchCompositionBrowser(html, noListen, options) {
147
202
  const viewport = resolveCompositionViewportFromHtml(html);
148
203
  const { ensureBrowser, findSystemBrowser } = await import("./manager-HEUPD2YB.js");
149
204
  const browser = await ensureBrowser({ signal: options.signal });
150
205
  const puppeteer = await import("puppeteer-core");
151
- const { buildChromeArgs } = await import("./src-4COYCAFY.js");
206
+ const { buildChromeArgs } = await import("./src-JGPFLYBL.js");
152
207
  const requestedGpuMode = options.browserGpuMode ?? resolveCliChromeGpuMode();
153
- const answer = (await import("./staticProjectServer-DG4VZO4G.js")).inProcessAnswer(url);
154
208
  const requiresWebGpu = compositionRequiresWebGpu(html);
155
209
  let softwareWebGpu = false;
156
210
  const launch = async (executablePath) => {
@@ -158,7 +212,7 @@ async function openSettledCompositionPage(html, url, options) {
158
212
  const resolvedGpuMode = await resolveManagedGpuMode(requestedGpuMode, executablePath, {
159
213
  signal: options.signal,
160
214
  onBrowser: options.onBrowser,
161
- noListen: answer !== void 0
215
+ noListen
162
216
  });
163
217
  options.signal?.throwIfAborted();
164
218
  const webGpu = resolveLocalWebGpu(resolvedGpuMode, requiresWebGpu);
@@ -171,51 +225,37 @@ async function openSettledCompositionPage(html, url, options) {
171
225
  headless: true,
172
226
  signal: options.signal,
173
227
  executablePath,
174
- ...answer ? oneProcessOverPipe({ args }) : { args }
228
+ ...noListen ? oneProcessOverPipe({ args }) : { args }
175
229
  });
176
230
  };
177
231
  let chromeBrowser;
178
232
  try {
179
- try {
180
- chromeBrowser = await launch(browser.executablePath);
181
- } catch (launchError) {
182
- const message = normalizeErrorMessage(launchError);
183
- const remediation = windowsChromeCrashRemediation(message);
184
- if (!remediation) throw launchError;
185
- const systemBrowser = browser.source === "cache" || browser.source === "download" ? findSystemBrowser() : void 0;
186
- if (!systemBrowser || systemBrowser.executablePath === browser.executablePath) {
187
- throw new Error(`${message}
233
+ chromeBrowser = await launch(browser.executablePath);
234
+ } catch (launchError) {
235
+ const message = normalizeErrorMessage(launchError);
236
+ const remediation = windowsChromeCrashRemediation(message);
237
+ if (!remediation) throw launchError;
238
+ const systemBrowser = browser.source === "cache" || browser.source === "download" ? findSystemBrowser() : void 0;
239
+ if (!systemBrowser || systemBrowser.executablePath === browser.executablePath) {
240
+ throw new Error(`${message}
188
241
 
189
242
  ${remediation}`, { cause: launchError });
190
- }
191
- console.warn(
192
- `[hyperframes] Managed chrome-headless-shell crashed at launch; retrying once with system Chrome at ${systemBrowser.executablePath}.`
193
- );
194
- try {
195
- chromeBrowser = await launch(systemBrowser.executablePath);
196
- } catch (fallbackError) {
197
- throw new Error(
198
- `System Chrome fallback also failed: ${normalizeErrorMessage(fallbackError)}
243
+ }
244
+ console.warn(
245
+ `[hyperframes] Managed chrome-headless-shell crashed at launch; retrying once with system Chrome at ${systemBrowser.executablePath}.`
246
+ );
247
+ try {
248
+ chromeBrowser = await launch(systemBrowser.executablePath);
249
+ } catch (fallbackError) {
250
+ throw new Error(
251
+ `System Chrome fallback also failed: ${normalizeErrorMessage(fallbackError)}
199
252
 
200
253
  ${remediation}`,
201
- { cause: fallbackError }
202
- );
203
- }
254
+ { cause: fallbackError }
255
+ );
204
256
  }
205
- options.onBrowser?.(chromeBrowser);
206
- options.onBrowserReady?.();
207
- const page = await chromeBrowser.newPage();
208
- await installPageFunctionGuard(page);
209
- await page.setViewport(viewport);
210
- if (answer) await answerPageInProcess(page, url, answer);
211
- await options.beforeNavigate?.(page);
212
- await gotoWhenSent(page, url, pageNavigationTimeoutMs(options.navigationTimeoutMs));
213
- await assertWebGpuAdapterAvailable(page, requiresWebGpu, softwareWebGpu);
214
- const renderReadyTimedOut = !await waitForCompositionSettle(page, options);
215
- return { browser: chromeBrowser, page, renderReadyTimedOut };
216
- } catch (err) {
217
- return rethrowAfterBrowserCleanup(chromeBrowser, err);
218
257
  }
258
+ return { browser: chromeBrowser, softwareWebGpu };
219
259
  }
220
260
  function seekInPage(t, fallbackToBridgeAndTimelines, exactTime, skipDraws) {
221
261
  const getProperty = (target, key) => {
@@ -502,6 +542,7 @@ export {
502
542
  AUDIT_SEEK_OPTIONS,
503
543
  SCREENSHOT_SEEK_OPTIONS,
504
544
  DENSE_GEOMETRY_SEEK_OPTIONS,
545
+ prelaunchCompositionBrowser,
505
546
  resolveCliChromeGpuMode,
506
547
  waitForRuntimeReady,
507
548
  installPageFunctionGuard,
@@ -513,6 +554,7 @@ export {
513
554
  DEFAULT_ZOOM_PADDING_PX,
514
555
  DEFAULT_ZOOM_SCALE,
515
556
  parseZoomTarget,
557
+ clampCropRegion,
516
558
  padCropRegion,
517
559
  resolveCropRegion,
518
560
  captureRegionCrop,
@@ -7,10 +7,10 @@ var __dirname = __hf_dirname(__filename);
7
7
  import {
8
8
  parseFeedbackRating,
9
9
  trackRenderFeedback
10
- } from "./chunk-PBKOURSI.js";
10
+ } from "./chunk-S3T3TDAB.js";
11
11
  import {
12
12
  shouldTrack
13
- } from "./chunk-W5USVP6Z.js";
13
+ } from "./chunk-2CEIKEFU.js";
14
14
  import {
15
15
  detectAgentRuntime
16
16
  } from "./chunk-T6AGUTZJ.js";
@@ -84,7 +84,7 @@ async function getDoctorSummary() {
84
84
  try {
85
85
  const [{ getSystemMeta }, { findFFmpeg }] = await Promise.all([
86
86
  import("./system-7F3UEHQT.js"),
87
- import("./ffmpeg-QIYSAPHO.js")
87
+ import("./ffmpeg-CSJLJAQ3.js")
88
88
  ]);
89
89
  const sys = getSystemMeta();
90
90
  const parts = [
@@ -16,7 +16,7 @@ import {
16
16
  import {
17
17
  DEFAULT_CONFIG,
18
18
  resolvePageNavigationTimeout
19
- } from "./chunk-RERXOG54.js";
19
+ } from "./chunk-YWSXFFO3.js";
20
20
  import {
21
21
  parseFps
22
22
  } from "./chunk-VEQ7DKPG.js";
@@ -6,7 +6,7 @@ var __filename = __hf_fileURLToPath(import.meta.url);
6
6
  var __dirname = __hf_dirname(__filename);
7
7
  import {
8
8
  setHostHandlesSigint
9
- } from "./chunk-RERXOG54.js";
9
+ } from "./chunk-YWSXFFO3.js";
10
10
  import {
11
11
  processAncestorSnapshot,
12
12
  processIdentity,
@@ -4,25 +4,25 @@ import { dirname as __hf_dirname } from "node:path";
4
4
  var require = __hf_createRequire(import.meta.url);
5
5
  var __filename = __hf_fileURLToPath(import.meta.url);
6
6
  var __dirname = __hf_dirname(__filename);
7
+ import {
8
+ resolveProject
9
+ } from "./chunk-HLBAQBHT.js";
7
10
  import {
8
11
  installPageFunctionGuard,
9
12
  resolveCliChromeGpuMode,
10
13
  seekCompositionTimeline,
11
14
  waitForRuntimeReady
12
- } from "./chunk-KHR4IJAW.js";
15
+ } from "./chunk-UEGULMAH.js";
13
16
  import {
14
17
  resolveCompositionViewportFromHtml
15
18
  } from "./chunk-FH7WODJH.js";
16
19
  import {
17
20
  launchManagedBrowser,
18
21
  resolveManagedGpuMode
19
- } from "./chunk-XRRDVRCY.js";
22
+ } from "./chunk-L6XT6GSV.js";
20
23
  import {
21
24
  pageNavigationTimeoutMs
22
- } from "./chunk-RAZVWSU5.js";
23
- import {
24
- resolveProject
25
- } from "./chunk-7E4YFL4U.js";
25
+ } from "./chunk-X4PK5ZXP.js";
26
26
  import {
27
27
  defineCommand
28
28
  } from "./chunk-S3S4TGEH.js";
@@ -36,7 +36,7 @@ import {
36
36
  import {
37
37
  printDeprecationNotice,
38
38
  withMeta
39
- } from "./chunk-YMU42UU2.js";
39
+ } from "./chunk-457OAAL2.js";
40
40
  import {
41
41
  decodeWellFormedEscapes
42
42
  } from "./chunk-BSQ7XANM.js";
@@ -227,7 +227,7 @@ function extractCompositionErrorsFromLint(lintResult) {
227
227
  async function localizeRemoteAssets(html) {
228
228
  let dir;
229
229
  try {
230
- const { loadProducer } = await import("./producer-HKGHSAON.js");
230
+ const { loadProducer } = await import("./producer-UZZQX6IJ.js");
231
231
  const { localizeRemoteMediaSources, localizeRemoteImageSources, localizeRemoteFontFaces } = await loadProducer();
232
232
  dir = mkdtempSync(join(tmpdir(), "hf-validate-assets-"));
233
233
  const assetDir = dir;
@@ -250,7 +250,7 @@ async function validateInBrowser(project, opts) {
250
250
  const projectDir = project.dir;
251
251
  const { bundleToSingleHtml } = await import("./compiler-5TFPJPQQ.js");
252
252
  const { ensureBrowser } = await import("./manager-HEUPD2YB.js");
253
- const { serveStaticProjectHtml } = await import("./staticProjectServer-DG4VZO4G.js");
253
+ const { serveStaticProjectHtml } = await import("./staticProjectServer-UVFPQEUZ.js");
254
254
  const { lintProject } = await import("./lintProject-ARKJXDQF.js");
255
255
  const lintResult = await lintProject(projectDir);
256
256
  const compositionErrors = extractCompositionErrorsFromLint(lintResult);
@@ -272,9 +272,9 @@ async function validateInBrowser(project, opts) {
272
272
  try {
273
273
  const browser = await ensureBrowser();
274
274
  const puppeteer = await import("puppeteer-core");
275
- const { buildChromeArgs, analyzeClipMediaFit } = await import("./src-4COYCAFY.js");
275
+ const { buildChromeArgs, analyzeClipMediaFit } = await import("./src-JGPFLYBL.js");
276
276
  const requestedGpuMode = resolveCliChromeGpuMode();
277
- const { assertWebGpuAdapterAvailable, compositionRequiresWebGpu, resolveLocalWebGpu } = await import("./gpuPolicy-L72BQRFR.js");
277
+ const { assertWebGpuAdapterAvailable, compositionRequiresWebGpu, resolveLocalWebGpu } = await import("./gpuPolicy-C6JWEX7F.js");
278
278
  const resolvedGpuMode = await resolveManagedGpuMode(requestedGpuMode, browser.executablePath);
279
279
  const requiresWebGpu = compositionRequiresWebGpu(html);
280
280
  const { gpuConfig, softwareWebGpu } = resolveLocalWebGpu(resolvedGpuMode, requiresWebGpu);
@@ -7,7 +7,7 @@ var __dirname = __hf_dirname(__filename);
7
7
  import {
8
8
  sherpaParakeetInstalled,
9
9
  sherpaUnsupportedReason
10
- } from "./chunk-JT7PV3GL.js";
10
+ } from "./chunk-BQTCQ6VN.js";
11
11
  import {
12
12
  findParakeet
13
13
  } from "./chunk-JZIEZCQM.js";
@@ -1918,6 +1918,7 @@ function buildSrgbToSignalLut(transfer) {
1918
1918
  const hlgA = 0.17883277;
1919
1919
  const hlgB = 1 - 4 * hlgA;
1920
1920
  const hlgC = 0.5 - hlgA * Math.log(4 * hlgA);
1921
+ const hlgSdrWhite = (Math.exp((0.75 - hlgC) / hlgA) + hlgB) / 12;
1921
1922
  const pqM1 = 0.1593017578125;
1922
1923
  const pqM2 = 78.84375;
1923
1924
  const pqC1 = 0.8359375;
@@ -1933,7 +1934,8 @@ function buildSrgbToSignalLut(transfer) {
1933
1934
  const linear = srgbByteToLinear(i);
1934
1935
  let signal;
1935
1936
  if (transfer === "hlg") {
1936
- signal = linear <= 1 / 12 ? Math.sqrt(3 * linear) : hlgA * Math.log(12 * linear - hlgB) + hlgC;
1937
+ const scene = linear * hlgSdrWhite;
1938
+ signal = scene <= 1 / 12 ? Math.sqrt(3 * scene) : hlgA * Math.log(12 * scene - hlgB) + hlgC;
1937
1939
  } else {
1938
1940
  const Lp = Math.max(0, linear * sdrNits / pqMaxNits);
1939
1941
  const Lm1 = Math.pow(Lp, pqM1);
@@ -6,19 +6,16 @@ var __filename = __hf_fileURLToPath(import.meta.url);
6
6
  var __dirname = __hf_dirname(__filename);
7
7
  import {
8
8
  redactHome
9
- } from "./chunk-YCSCDQDS.js";
9
+ } from "./chunk-BHFIITTD.js";
10
10
  import "./chunk-Z27A7NUB.js";
11
11
  import "./chunk-5ETJX6WM.js";
12
12
  import {
13
13
  loadProducer
14
- } from "./chunk-EKDTCSCL.js";
15
- import {
16
- formatBytes
17
- } from "./chunk-K2FLNJVB.js";
18
- import "./chunk-3Q4Y33FT.js";
14
+ } from "./chunk-MG66UO4N.js";
15
+ import "./chunk-PIH4P2G6.js";
19
16
  import "./chunk-TNDNFZOK.js";
20
- import "./chunk-6JR2XUEE.js";
21
17
  import "./chunk-C6TPGUWD.js";
18
+ import "./chunk-6JR2XUEE.js";
22
19
  import {
23
20
  CACHE_DIR_NAME,
24
21
  cleanupProxyCache
@@ -29,7 +26,10 @@ import {
29
26
  pruneGoneProjectHistories
30
27
  } from "./chunk-GMJ3ILLW.js";
31
28
  import "./chunk-FFDC5OWV.js";
32
- import "./chunk-ZGSLXWH2.js";
29
+ import {
30
+ formatBytes
31
+ } from "./chunk-K2FLNJVB.js";
32
+ import "./chunk-5ZSLJXQX.js";
33
33
  import "./chunk-5CS4T6C6.js";
34
34
  import "./chunk-T6AGUTZJ.js";
35
35
  import {
@@ -47,23 +47,23 @@ import "./chunk-7FMUTGOH.js";
47
47
  import "./chunk-XRKMITSS.js";
48
48
  import {
49
49
  withMeta
50
- } from "./chunk-YMU42UU2.js";
50
+ } from "./chunk-457OAAL2.js";
51
51
  import "./chunk-K4WIOZFP.js";
52
52
  import "./chunk-XUXGIA7H.js";
53
53
  import "./chunk-WERLJGIC.js";
54
54
  import "./chunk-ISN5GRYI.js";
55
- import "./chunk-NELZN7SV.js";
55
+ import "./chunk-MPNVXG3J.js";
56
56
  import "./chunk-3DKN5WKL.js";
57
57
  import "./chunk-EOVYQ3IG.js";
58
58
  import "./chunk-6BEFEWFB.js";
59
- import "./chunk-S354WIFQ.js";
59
+ import "./chunk-GVIH4ZQY.js";
60
60
  import "./chunk-XT6MXC7A.js";
61
61
  import {
62
62
  EXTRACT_CACHE_MIN_AGE_MS,
63
63
  directorySizeBytes,
64
64
  gcExtractionCache,
65
65
  resolveExtractCacheDir
66
- } from "./chunk-RERXOG54.js";
66
+ } from "./chunk-YWSXFFO3.js";
67
67
  import "./chunk-JNL3RMDG.js";
68
68
  import "./chunk-W2LGJSEN.js";
69
69
  import "./chunk-VEQ7DKPG.js";