hyperframes 0.8.169 → 0.8.171

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 (181) hide show
  1. package/dist/{add-7GLP4BPM.js → add-VMMGTSGT.js} +12 -11
  2. package/dist/{animatedGifPrep-NEBEGVSO.js → animatedGifPrep-MVP5LCEM.js} +5 -5
  3. package/dist/api.js +11 -11
  4. package/dist/{asset-RORTT5HS.js → asset-ZERIT5FT.js} +2 -2
  5. package/dist/{assetCataloger-RLJ6MDGF.js → assetCataloger-RN5A2SVA.js} +5 -5
  6. package/dist/{audio-OKDGU7TY.js → audio-RQUGFWYT.js} +11 -11
  7. package/dist/{auth-QWYNCU5U.js → auth-I3FNB6N2.js} +1 -1
  8. package/dist/{autoUpdate-EDJJPWAU.js → autoUpdate-IBAS4JVK.js} +2 -2
  9. package/dist/{backgroundChecks-KQR6FGVU.js → backgroundChecks-7UQBIPQC.js} +3 -3
  10. package/dist/backgroundChecksWorker.js +3 -3
  11. package/dist/{batchRender-YKTTAIHH.js → batchRender-KWBVAUE3.js} +3 -3
  12. package/dist/{beats-I6AGLTLW.js → beats-F2GFGFCV.js} +4 -4
  13. package/dist/{benchmark-NBSV7PNB.js → benchmark-XPQYX3OX.js} +8 -8
  14. package/dist/{browser-FPEL5FGW.js → browser-QCV62F7R.js} +3 -3
  15. package/dist/{bundleWithLocalizedFonts-TYQXMNSU.js → bundleWithLocalizedFonts-42V34HJF.js} +2 -2
  16. package/dist/{capture-FXGOI23U.js → capture-OKPMCIAC.js} +8 -8
  17. package/dist/{capture-5BRJJMZB.js → capture-WE32B5UZ.js} +2 -2
  18. package/dist/{catalog-SG3ZIS45.js → catalog-2LWFMJM3.js} +12 -11
  19. package/dist/{catch-up-ETXUT6Q5.js → catch-up-OWUGMOBS.js} +4 -4
  20. package/dist/{check-KXNNIEUR.js → check-7BK6UM3M.js} +35 -34
  21. package/dist/{checkBrowser-546UMI3N.js → checkBrowser-VG745SEX.js} +32 -31
  22. package/dist/{chunk-YZRS3COO.js → chunk-4QIJFIR5.js} +1 -1
  23. package/dist/{chunk-UCNQE52B.js → chunk-4RXJG3SY.js} +197 -26
  24. package/dist/{chunk-JPN7SVWC.js → chunk-5GQB63WX.js} +7 -7
  25. package/dist/{chunk-FSX7GTBB.js → chunk-5HLJ4JMB.js} +1 -1
  26. package/dist/{chunk-FQJDV2RI.js → chunk-6I24ZSCR.js} +1 -1
  27. package/dist/chunk-6M3IPJS6.js +3803 -0
  28. package/dist/{chunk-7635SDI5.js → chunk-77QCYRQH.js} +2 -2
  29. package/dist/{chunk-TJSTGSAW.js → chunk-7FMUTGOH.js} +2 -77
  30. package/dist/{chunk-QD5VJOQK.js → chunk-7YZSOHSC.js} +3 -3
  31. package/dist/{chunk-AP5AVVAB.js → chunk-A3SQJCPU.js} +1 -1
  32. package/dist/{chunk-XK5SZNYE.js → chunk-AAYNQ7WL.js} +9 -9
  33. package/dist/{chunk-T4HL3SZH.js → chunk-AGHHZIZN.js} +1 -1
  34. package/dist/{chunk-A6K7M46D.js → chunk-AWSVUIWG.js} +1 -1
  35. package/dist/{chunk-RUYYAL3T.js → chunk-BMPNGUYD.js} +2 -2
  36. package/dist/{chunk-BNEKKUPG.js → chunk-BYFG74OA.js} +2 -2
  37. package/dist/{chunk-VCXVZRR2.js → chunk-CO6V4KXX.js} +1 -1
  38. package/dist/{chunk-5ETJPA5Z.js → chunk-CSABTZ6S.js} +9 -9
  39. package/dist/{chunk-DCG22HKT.js → chunk-D2QELIQB.js} +72 -22
  40. package/dist/{chunk-J5Z56PU3.js → chunk-EDGJ2OMH.js} +1 -1
  41. package/dist/{chunk-SJPNVLYS.js → chunk-ERJHLFPD.js} +2 -2
  42. package/dist/{chunk-P24X6CGY.js → chunk-FAORS3UR.js} +28 -13
  43. package/dist/{chunk-EEP5Y5IE.js → chunk-FE2XTCTM.js} +18 -1
  44. package/dist/{chunk-TVDXMJ43.js → chunk-GBWSBTEE.js} +1 -1
  45. package/dist/{chunk-JGYHWVXQ.js → chunk-GMJ3ILLW.js} +34 -13
  46. package/dist/{chunk-K5PU5ISL.js → chunk-GSABLXZV.js} +1 -1
  47. package/dist/{chunk-KA4LSAD5.js → chunk-GU5FLCZV.js} +1 -1
  48. package/dist/{chunk-YT6TFGIS.js → chunk-IWLOARQZ.js} +2 -2
  49. package/dist/{chunk-EFP25BUY.js → chunk-JAERN4RH.js} +1 -1
  50. package/dist/chunk-JHOCK3DG.js +27 -0
  51. package/dist/{chunk-5SQHHBAR.js → chunk-JMJTXBVF.js} +22 -12
  52. package/dist/{chunk-NKG3LTPI.js → chunk-KQCWIE76.js} +2 -2
  53. package/dist/{chunk-S6U7YLPJ.js → chunk-KUW4LWY6.js} +1 -1
  54. package/dist/{chunk-PVTHDNDZ.js → chunk-L32QQH2K.js} +1 -1
  55. package/dist/{chunk-TEFHMDVR.js → chunk-LMMFO5UV.js} +2 -2
  56. package/dist/{chunk-CESKA6VO.js → chunk-NSJLCWLG.js} +1 -1
  57. package/dist/{chunk-MCPDZWZY.js → chunk-NYCJCQNY.js} +4 -4
  58. package/dist/{chunk-2F4HJFGW.js → chunk-PAFCKH3S.js} +2 -2
  59. package/dist/{chunk-U7P2XTRY.js → chunk-PECICVTJ.js} +2 -2
  60. package/dist/{chunk-GVX2443P.js → chunk-PH3RS5X4.js} +2 -2
  61. package/dist/{chunk-Q5K73VW3.js → chunk-PXA4S6OE.js} +2 -2
  62. package/dist/{chunk-O3J7BHBU.js → chunk-QZUVPWC4.js} +1 -1
  63. package/dist/{chunk-ZFJ5RI7A.js → chunk-RSW6LGGW.js} +3 -3
  64. package/dist/{chunk-EELTMBCC.js → chunk-RTW6WSC7.js} +4 -3
  65. package/dist/{chunk-CNP6AMFM.js → chunk-SLTUINB4.js} +2 -2
  66. package/dist/{chunk-RZKQ3G6B.js → chunk-T5LGOTQR.js} +1 -1
  67. package/dist/{chunk-WAVFNZB7.js → chunk-TZ3I23TZ.js} +21 -7
  68. package/dist/{chunk-QLHXC4E6.js → chunk-UJQQITCY.js} +1 -1
  69. package/dist/{chunk-XZNHVWDD.js → chunk-UUP4KOMD.js} +4 -4
  70. package/dist/{chunk-UISU4SYG.js → chunk-V2T7FFPB.js} +1 -1
  71. package/dist/{chunk-7FHFPHEM.js → chunk-VKFYI7AQ.js} +182 -77
  72. package/dist/{chunk-QABAVWEX.js → chunk-W47D3KOB.js} +1 -1
  73. package/dist/{chunk-YLAREDAU.js → chunk-X3U6KEID.js} +1 -1
  74. package/dist/{chunk-5FWVFCQM.js → chunk-XGFYN53T.js} +2 -2
  75. package/dist/{chunk-M4N6IHCQ.js → chunk-XRQBHOBT.js} +7 -1
  76. package/dist/{chunk-XJQ6NN2L.js → chunk-ZBUGFQ7Y.js} +51 -25
  77. package/dist/{clean-ARH23EGW.js → clean-FCBNQ3W2.js} +13 -13
  78. package/dist/cli.js +53 -53
  79. package/dist/{cloud-GBY7MRZM.js → cloud-3FZBQBOM.js} +4 -4
  80. package/dist/{cloudrun-HBVA5UZB.js → cloudrun-CDFL5JBL.js} +9 -11
  81. package/dist/{compare-Z4YNESYN.js → compare-E4332OOZ.js} +26 -25
  82. package/dist/{compiler-6WJ5SVTD.js → compiler-GU5GPO5A.js} +2 -2
  83. package/dist/{component-AR4MS4R7.js → component-VKSV3OKW.js} +3 -3
  84. package/dist/{compositions-ERZVZBYW.js → compositions-GOVXHFXC.js} +9 -9
  85. package/dist/{delete-NWSW3BET.js → delete-JYZTEBLQ.js} +2 -2
  86. package/dist/{deterministicFonts-KXVO7QEL.js → deterministicFonts-RWGQPEZU.js} +2 -2
  87. package/dist/{dist-VKLSNKRZ.js → dist-IDZRZHGE.js} +2 -2
  88. package/dist/{doctor-P4QZQRCB.js → doctor-ND3FZM6S.js} +7 -7
  89. package/dist/{events-F2UVJQIC.js → events-27JU7QRQ.js} +2 -2
  90. package/dist/{events-SV46AWMI.js → events-VL2JIO4R.js} +3 -3
  91. package/dist/{feedback-XS4IK6SW.js → feedback-PKVQWCVT.js} +6 -6
  92. package/dist/{figma-DELISEUP.js → figma-FZ4T4SE3.js} +3 -3
  93. package/dist/fontLocalizeCli.js +9 -9
  94. package/dist/{get-DNGXCEFB.js → get-HUAIHWXR.js} +2 -2
  95. package/dist/{gpuPolicy-JG5PUOJP.js → gpuPolicy-QWJYZLVJ.js} +5 -5
  96. package/dist/{grade-compare-F46JWE4O.js → grade-compare-CJ2ROYD6.js} +26 -25
  97. package/dist/{help-XVEBMX3U.js → help-OJ3QDJYS.js} +1 -1
  98. package/dist/{history-NS4PKG4S.js → history-P4LA65T5.js} +7 -7
  99. package/dist/hyperframe-runtime.js +58 -57
  100. package/dist/hyperframe.manifest.json +1 -1
  101. package/dist/hyperframe.runtime.iife.js +58 -57
  102. package/dist/hyperframes-player.global.js +3 -3
  103. package/dist/{info-DJ6VNESS.js → info-QHRJW6Y3.js} +7 -7
  104. package/dist/{init-TSRTMVRN.js → init-AG6YVVJN.js} +21 -20
  105. package/dist/{inspect-VTZXXDJ4.js → inspect-TT66DYEC.js} +27 -26
  106. package/dist/{installer-3ERHU4CD.js → installer-5ZKUQBWW.js} +4 -4
  107. package/dist/{keyframes-6DN7BOYJ.js → keyframes-CJJGCW3R.js} +6 -6
  108. package/dist/{lambda-RCOIEGL6.js → lambda-3BMEOSP7.js} +10 -12
  109. package/dist/{layout-FFGRLVK4.js → layout-BSDCTMJK.js} +27 -26
  110. package/dist/{lint-MBYIDFKS.js → lint-6CL2R2FK.js} +6 -6
  111. package/dist/{list-KEZDFW5R.js → list-5VYOLEFN.js} +2 -2
  112. package/dist/{login-7ZV374QL.js → login-PNRREAOC.js} +4 -4
  113. package/dist/{media-treatment-LGWWRXAX.js → media-treatment-KHJX73WZ.js} +8 -8
  114. package/dist/{models-TC4K6UQP.js → models-INX67ETR.js} +8 -8
  115. package/dist/{motionShot-4E3RTV5O.js → motionShot-VIUXVMTV.js} +12 -12
  116. package/dist/{normalize-audio-XCGB2IQP.js → normalize-audio-T5QMN476.js} +4 -4
  117. package/dist/{open-JNNJSNTH.js → open-T57KLGFX.js} +4 -4
  118. package/dist/{parakeetRunner-S3DG4BJB.js → parakeetRunner-PCCBODBS.js} +8 -8
  119. package/dist/{pipeline-3SIYCBLU.js → pipeline-GDC7SL5N.js} +5 -5
  120. package/dist/{play-LBPOOD3V.js → play-TQWHYMAT.js} +19 -18
  121. package/dist/{present-PWEN5SDL.js → present-U5OFT6IF.js} +14 -14
  122. package/dist/{preview-IS32RLKM.js → preview-WWTDQQSB.js} +20 -16
  123. package/dist/{producer-4UUUEPPS.js → producer-23NJEJRO.js} +1 -1
  124. package/dist/{projectConfig-K347VIO3.js → projectConfig-OXNA35QN.js} +7 -6
  125. package/dist/{publication-4CQS532O.js → publication-GY3OJ6VH.js} +2 -2
  126. package/dist/{publish-OJYF37FY.js → publish-WZD4NLWM.js} +8 -7
  127. package/dist/{remove-background-HO6YL2HU.js → remove-background-Q7CQ3PJF.js} +6 -6
  128. package/dist/{render-L76SEAMC.js → render-24JWWXMA.js} +3 -3
  129. package/dist/{render-QBQYF2NC.js → render-FTVXKXSQ.js} +24 -23
  130. package/dist/{render-Q6QAXJCN.js → render-RZUU76V5.js} +8 -8
  131. package/dist/{render-batch-JLANN5Y2.js → render-batch-FCR7RX6U.js} +7 -20
  132. package/dist/renderSetupWorker.js +9 -1
  133. package/dist/{resolver-EDUM4DHG.js → resolver-4SPHOGY7.js} +5 -4
  134. package/dist/{sherpa-QEM5XYHD.js → sherpa-VMADZBF7.js} +7 -7
  135. package/dist/skills/media-use/SKILL.md +3 -3
  136. package/dist/skills/media-use/audio/references/requirements.md +7 -7
  137. package/dist/skills/media-use/audio/references/sfx.md +19 -13
  138. package/dist/skills/media-use/audio/scripts/audio.mjs +9 -9
  139. package/dist/skills/media-use/audio/scripts/audio.test.mjs +17 -10
  140. package/dist/skills/media-use/audio/scripts/lib/media-record.mjs +7 -3
  141. package/dist/skills/media-use/audio/scripts/lib/media-record.test.mjs +22 -3
  142. package/dist/skills/media-use/audio/scripts/lib/openverse.mjs +134 -0
  143. package/dist/skills/media-use/audio/scripts/lib/sfx.mjs +120 -89
  144. package/dist/skills/media-use/audio/scripts/lib/sfx.test.mjs +222 -12
  145. package/dist/skills/media-use/references/audio.md +1 -1
  146. package/dist/skills/media-use/references/resolve.md +1 -1
  147. package/dist/skills/media-use/references/setup-providers.md +13 -12
  148. package/dist/skills/media-use/scripts/lib/heygen-cli.mjs +4 -7
  149. package/dist/skills/media-use/scripts/lib/heygen-cli.test.mjs +5 -5
  150. package/dist/skills/media-use/scripts/lib/manifest.d.mts +1 -0
  151. package/dist/skills/media-use/scripts/lib/manifest.mjs +9 -6
  152. package/dist/skills/media-use/scripts/lib/openverse.mjs +134 -0
  153. package/dist/skills/media-use/scripts/lib/openverse.test.mjs +219 -0
  154. package/dist/skills/media-use/scripts/lib/registry.mjs +4 -2
  155. package/dist/skills/media-use/scripts/lib/registry.test.mjs +13 -13
  156. package/dist/skills/media-use/scripts/lib/sfx-provider.mjs +23 -13
  157. package/dist/skills/media-use/scripts/resolve.mjs +45 -55
  158. package/dist/{skills-FSZK6FIG.js → skills-7LBLAEH4.js} +5 -5
  159. package/dist/{skillsUpdateCheck-3354HXDJ.js → skillsUpdateCheck-AHK7CQUP.js} +3 -3
  160. package/dist/{snapshot-5VVMFEMM.js → snapshot-DOS6NQXM.js} +29 -28
  161. package/dist/{src-RYILCNU7.js → src-J6KABXGZ.js} +8 -8
  162. package/dist/{src-ZGMLMQ3B.js → src-VFTQPSQD.js} +4 -4
  163. package/dist/{staticProjectServer-PIVSGEAO.js → staticProjectServer-2YNWMUSU.js} +15 -14
  164. package/dist/studio/assets/{hyperframes-player-B04Yx96S.js → hyperframes-player-DohJxMIU.js} +2 -2
  165. package/dist/studio/assets/{index-D2e0J6kh.js → index-BOkm4Ooc.js} +101 -101
  166. package/dist/studio/assets/{index-D9CDX_Rr.js → index-DfwtrPPt.js} +1 -1
  167. package/dist/studio/index.html +1 -1
  168. package/dist/{studio-api-PHADR6VB.js → studio-api-NEBM56HH.js} +8 -8
  169. package/dist/{studioServer-5AVDKN5V.js → studioServer-LYDRHW7D.js} +45 -39
  170. package/dist/{telemetry-JCTHMPSB.js → telemetry-FAYON6XS.js} +3 -3
  171. package/dist/{timeline-QU2F6R2M.js → timeline-UKJ53XLC.js} +16 -16
  172. package/dist/{tokens-YYK4G36C.js → tokens-SO3ZXEFM.js} +2 -2
  173. package/dist/{transcribe-7ORH7R6O.js → transcribe-IM5UNBSH.js} +6 -6
  174. package/dist/{transcribe-PRG4FLLA.js → transcribe-PS5XSTXN.js} +12 -12
  175. package/dist/{updateCheck-NV7QNANK.js → updateCheck-ZV422M72.js} +2 -2
  176. package/dist/{upgrade-UZXN36J2.js → upgrade-GHG5FWZJ.js} +2 -2
  177. package/dist/{urlDownloader-AW57H722.js → urlDownloader-BOLOMGC7.js} +4 -4
  178. package/dist/{validate-QD53ABUM.js → validate-K4ZGXH2M.js} +20 -20
  179. package/dist/{video-VLVPYQQR.js → video-HUNOZDLT.js} +5 -5
  180. package/package.json +1 -1
  181. package/dist/chunk-BIV5HVTQ.js +0 -3803
@@ -18,7 +18,7 @@ import {
18
18
  mkdirWithinProject
19
19
  } from "./chunk-OFQWTKPW.js";
20
20
 
21
- // ../studio-server/dist/chunk-SZF3L5MT.js
21
+ // ../studio-server/dist/chunk-GG4AS4RK.js
22
22
  import { randomUUID as randomUUID7 } from "crypto";
23
23
  import { mkdir as mkdir2, readdir as readdir3, rm as rm3, rmdir, writeFile } from "fs/promises";
24
24
  import {
@@ -37,7 +37,7 @@ import { createHash, randomUUID } from "crypto";
37
37
  import { readFileSync as readFileSync2 } from "fs";
38
38
  import { isAbsolute, relative, resolve, sep } from "path";
39
39
  import { randomUUID as randomUUID2 } from "crypto";
40
- import { linkSync, mkdirSync, readFileSync, rmSync, writeFileSync } from "fs";
40
+ import { linkSync, mkdirSync, readFileSync, renameSync, rmSync, writeFileSync } from "fs";
41
41
  import { join } from "path";
42
42
  import { createHash as createHash2 } from "crypto";
43
43
  import { lstatSync, readFileSync as readFileSync3, readdirSync } from "fs";
@@ -61,14 +61,14 @@ var PREVIEW_IGNORED_DIRS = /* @__PURE__ */ new Set([
61
61
  "renders"
62
62
  ]);
63
63
 
64
- // ../studio-server/dist/chunk-SZF3L5MT.js
64
+ // ../studio-server/dist/chunk-GG4AS4RK.js
65
65
  import { createHash as createHash3, randomUUID as randomUUID3 } from "crypto";
66
- import { constants, createReadStream, createWriteStream, renameSync } from "fs";
66
+ import { constants, createReadStream, createWriteStream, renameSync as renameSync2 } from "fs";
67
67
  import { copyFile, mkdir, readdir, readFile, rename, rm, stat } from "fs/promises";
68
68
  import { dirname, join as join2 } from "path";
69
69
  import { pipeline } from "stream/promises";
70
70
  import { randomUUID as randomUUID5 } from "crypto";
71
- import { readdirSync as readdirSync2, readFileSync as readFileSync5, renameSync as renameSync2, statSync as statSync2, writeFileSync as writeFileSync3 } from "fs";
71
+ import { readdirSync as readdirSync2, readFileSync as readFileSync5, renameSync as renameSync3, statSync as statSync2, writeFileSync as writeFileSync3 } from "fs";
72
72
  import { lstat, readdir as readdir2, rm as rm2 } from "fs/promises";
73
73
  import { tmpdir } from "os";
74
74
  import { dirname as dirname2, join as join4 } from "path";
@@ -76,7 +76,7 @@ import { randomUUID as randomUUID4 } from "crypto";
76
76
  import { existsSync, mkdirSync as mkdirSync2, readFileSync as readFileSync4, statSync, writeFileSync as writeFileSync2 } from "fs";
77
77
  import { basename, join as join3, resolve as resolve3 } from "path";
78
78
  import { createHash as createHash5, randomUUID as randomUUID6 } from "crypto";
79
- import { createReadStream as createReadStream2, existsSync as existsSync2, readFileSync as readFileSync8, renameSync as renameSync3, statSync as statSync3 } from "fs";
79
+ import { createReadStream as createReadStream2, existsSync as existsSync2, readFileSync as readFileSync8, renameSync as renameSync4, statSync as statSync3 } from "fs";
80
80
  import { isAbsolute as isAbsolute4, join as join7, resolve as resolve6 } from "path";
81
81
  import { createHash as createHash4 } from "crypto";
82
82
  import {
@@ -182,12 +182,14 @@ function newestReceipt(absPath, expectedVersion) {
182
182
  }
183
183
  var consumeFileWriteReceipt = identifyFileWrite;
184
184
  var HistoryBusyError = class extends Error {
185
- constructor(pid) {
185
+ constructor(pid, url) {
186
186
  super(`This project's history is open in another process (pid ${pid}).`);
187
187
  this.pid = pid;
188
+ this.url = url;
188
189
  this.name = "HistoryBusyError";
189
190
  }
190
191
  pid;
192
+ url;
191
193
  };
192
194
  function alive(pid) {
193
195
  if (!Number.isInteger(pid) || pid <= 0) return false;
@@ -238,14 +240,32 @@ function evictDeadOwner(file) {
238
240
  releaseOwn(evictor);
239
241
  }
240
242
  }
241
- async function takeHistoryOwnership(home, waitMs) {
243
+ function advertise(urlFile, url) {
244
+ if (!url) return rmSync(urlFile, { force: true });
245
+ const draft = `${urlFile}-${process.pid}-${randomUUID2()}.tmp`;
246
+ writeFileSync(draft, JSON.stringify({ pid: process.pid, url }));
247
+ renameSync(draft, urlFile);
248
+ }
249
+ function servedBy(file, urlFile, pid) {
250
+ try {
251
+ const said = JSON.parse(readFileSync(urlFile, "utf-8"));
252
+ const live = said.pid === pid && alive(pid) && ownerOf(file) === pid;
253
+ return live && typeof said.url === "string" ? said.url : void 0;
254
+ } catch {
255
+ return void 0;
256
+ }
257
+ }
258
+ async function takeHistoryOwnership(home, waitMs, url) {
242
259
  const file = join(home, "owner.pid");
260
+ const urlFile = join(home, "owner-url.json");
243
261
  const deadline = Date.now() + waitMs;
244
262
  mkdirSync(home, { recursive: true });
245
263
  for (; ; ) {
246
264
  if (claim(file)) {
265
+ advertise(urlFile, url);
247
266
  let held = true;
248
267
  return () => {
268
+ if (held && servedBy(file, urlFile, process.pid)) rmSync(urlFile, { force: true });
249
269
  if (held) releaseOwn(file);
250
270
  held = false;
251
271
  };
@@ -253,7 +273,7 @@ async function takeHistoryOwnership(home, waitMs) {
253
273
  const pid = ownerOf(file);
254
274
  if (pid === null) continue;
255
275
  if (!alive(pid) && evictDeadOwner(file)) continue;
256
- if (Date.now() >= deadline) throw new HistoryBusyError(pid);
276
+ if (Date.now() >= deadline) throw new HistoryBusyError(pid, servedBy(file, urlFile, pid));
257
277
  await new Promise((settle) => setTimeout(settle, 50));
258
278
  }
259
279
  }
@@ -496,7 +516,7 @@ async function cloneOrCopy(from, to, beforeReplace) {
496
516
  try {
497
517
  await copyFile(from, temp, constants.COPYFILE_FICLONE);
498
518
  beforeReplace?.();
499
- renameSync(temp, to);
519
+ renameSync2(temp, to);
500
520
  } catch (error) {
501
521
  await rm(temp, { force: true });
502
522
  throw error;
@@ -697,7 +717,7 @@ function recheckAndMoveAway(historyRoot, id, { now, dryRun, tempDir }) {
697
717
  if (projectDir === null) return null;
698
718
  if (dryRun) return { projectDir, trash: null };
699
719
  const trash = join4(historyRoot, `${PRUNED_PREFIX}${id}-${randomUUID5()}`);
700
- renameSync2(home, trash);
720
+ renameSync3(home, trash);
701
721
  return { projectDir, trash };
702
722
  }
703
723
  function abandonedProject(home, id, now, tempDir) {
@@ -1119,7 +1139,7 @@ async function updateState(dir, update) {
1119
1139
  state = readState(dir);
1120
1140
  } catch (error) {
1121
1141
  if (!(error instanceof SyntaxError)) throw error;
1122
- renameSync3(statePath(dir), `${statePath(dir)}.invalid-${randomUUID6()}`);
1142
+ renameSync4(statePath(dir), `${statePath(dir)}.invalid-${randomUUID6()}`);
1123
1143
  state = emptyState();
1124
1144
  }
1125
1145
  update(state);
@@ -2401,7 +2421,8 @@ async function openProjectHistory(options) {
2401
2421
  const projectId = projectHistoryId(options.projectDir, options.historyRoot);
2402
2422
  const release = await takeHistoryOwnership(
2403
2423
  join8(options.historyRoot, projectId),
2404
- options.ownerWaitMs ?? 5e3
2424
+ options.ownerWaitMs ?? 5e3,
2425
+ options.ownerUrl
2405
2426
  );
2406
2427
  try {
2407
2428
  const blobs = await openBlobStore(join8(options.historyRoot, projectId, "blobs"));
@@ -17,7 +17,7 @@ import {
17
17
  } from "./chunk-ISN5GRYI.js";
18
18
  import {
19
19
  VERSION
20
- } from "./chunk-BNEKKUPG.js";
20
+ } from "./chunk-BYFG74OA.js";
21
21
 
22
22
  // src/utils/updateCheck.ts
23
23
  import { existsSync, readFileSync } from "fs";
@@ -14,7 +14,7 @@ import {
14
14
  } from "./chunk-AWDFDFI3.js";
15
15
  import {
16
16
  isBlockedNetworkHost
17
- } from "./chunk-7FHFPHEM.js";
17
+ } from "./chunk-VKFYI7AQ.js";
18
18
  import {
19
19
  DOMParser,
20
20
  parseHTML
@@ -6,14 +6,14 @@ var __filename = __hf_fileURLToPath(import.meta.url);
6
6
  var __dirname = __hf_dirname(__filename);
7
7
  import {
8
8
  resolveProject
9
- } from "./chunk-AP5AVVAB.js";
9
+ } from "./chunk-A3SQJCPU.js";
10
10
  import {
11
11
  DEFAULT_HISTORY_ROOT,
12
12
  HistoryBusyError,
13
13
  MAX_WINDOW_IDLE_MS,
14
14
  openProjectHistory,
15
15
  readProjectHistory
16
- } from "./chunk-JGYHWVXQ.js";
16
+ } from "./chunk-GMJ3ILLW.js";
17
17
  import {
18
18
  findPreviewServerForProject,
19
19
  studioApiUrl
@@ -10,7 +10,7 @@ import {
10
10
  import {
11
11
  DISTRIBUTED_FPS,
12
12
  isDistributedFps
13
- } from "./chunk-O3J7BHBU.js";
13
+ } from "./chunk-QZUVPWC4.js";
14
14
  import {
15
15
  parseHTML
16
16
  } from "./chunk-SDYDNHEE.js";
@@ -0,0 +1,27 @@
1
+ import { createRequire as __hf_createRequire } from "node:module";
2
+ import { fileURLToPath as __hf_fileURLToPath } from "node:url";
3
+ import { dirname as __hf_dirname } from "node:path";
4
+ var require = __hf_createRequire(import.meta.url);
5
+ var __filename = __hf_fileURLToPath(import.meta.url);
6
+ var __dirname = __hf_dirname(__filename);
7
+
8
+ // src/utils/concurrency.ts
9
+ async function runWithConcurrencyLimit(inputs, limit, worker) {
10
+ if (limit < 1) throw new Error(`runWithConcurrencyLimit: limit must be \u2265 1, got ${limit}`);
11
+ const results = new Array(inputs.length);
12
+ let cursor = 0;
13
+ const workerCount = Math.min(limit, inputs.length);
14
+ await Promise.all(
15
+ Array.from({ length: workerCount }, async () => {
16
+ while (cursor < inputs.length) {
17
+ const idx = cursor++;
18
+ results[idx] = await worker(inputs[idx], idx);
19
+ }
20
+ })
21
+ );
22
+ return results;
23
+ }
24
+
25
+ export {
26
+ runWithConcurrencyLimit
27
+ };
@@ -4,11 +4,14 @@ 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
+ runWithConcurrencyLimit
9
+ } from "./chunk-JHOCK3DG.js";
7
10
  import {
8
11
  DEFAULT_REGISTRY_URL,
9
12
  fetchItemManifest,
10
13
  fetchRegistryManifest
11
- } from "./chunk-EELTMBCC.js";
14
+ } from "./chunk-RTW6WSC7.js";
12
15
 
13
16
  // src/registry/resolver.ts
14
17
  function defaultWarn(message) {
@@ -22,22 +25,29 @@ async function listRegistryItems(filter, options = {}) {
22
25
  if (!filter?.type) return manifest.items;
23
26
  return manifest.items.filter((item) => item.type === filter.type);
24
27
  }
28
+ var ITEM_FETCH_CONCURRENCY = 32;
25
29
  async function loadAllItems(entries, options = {}) {
26
30
  const baseUrl = options.baseUrl ?? DEFAULT_REGISTRY_URL;
27
31
  const warn = options.onWarn ?? defaultWarn;
28
- const results = await Promise.allSettled(
29
- entries.map((e) => fetchItemManifest(e.name, e.type, baseUrl))
30
- );
31
- const items = [];
32
- results.forEach((r, i) => {
33
- if (r.status === "fulfilled") {
34
- items.push(r.value);
35
- } else {
36
- const name = entries[i]?.name ?? "<unknown>";
37
- warn(`skipped item "${name}": ${String(r.reason)}`);
32
+ const skipped = [];
33
+ let firstReason = "";
34
+ let timedOut = false;
35
+ const loaded = await runWithConcurrencyLimit(entries, ITEM_FETCH_CONCURRENCY, async (e) => {
36
+ try {
37
+ return await fetchItemManifest(e.name, e.type, baseUrl, { cacheOnly: timedOut });
38
+ } catch (err) {
39
+ if (err instanceof Error && err.name === "TimeoutError") timedOut = true;
40
+ skipped.push(`"${e.name}"`);
41
+ firstReason ||= String(err);
42
+ return void 0;
38
43
  }
39
44
  });
40
- return items;
45
+ if (skipped.length === 1) warn(`skipped item ${skipped[0]}: ${firstReason}`);
46
+ else if (skipped.length > 1)
47
+ warn(
48
+ `skipped ${skipped.length} items (${skipped.slice(0, 3).join(", ")}${skipped.length > 3 ? ", ..." : ""}): ${firstReason}`
49
+ );
50
+ return loaded.filter((item) => item !== void 0);
41
51
  }
42
52
  async function resolveItem(name, options = {}) {
43
53
  const items = await resolveItemWithDependencies(name, options);
@@ -6,10 +6,10 @@ var __filename = __hf_fileURLToPath(import.meta.url);
6
6
  var __dirname = __hf_dirname(__filename);
7
7
  import {
8
8
  withOwner
9
- } from "./chunk-YT6TFGIS.js";
9
+ } from "./chunk-IWLOARQZ.js";
10
10
  import {
11
11
  beginArtifactCapture
12
- } from "./chunk-JGYHWVXQ.js";
12
+ } from "./chunk-GMJ3ILLW.js";
13
13
 
14
14
  // src/utils/artifactCapture.ts
15
15
  var SKIP_BUSY_HISTORY = { ownerWaitMs: 0 };
@@ -7,7 +7,7 @@ var __dirname = __hf_dirname(__filename);
7
7
  import {
8
8
  sherpaParakeetInstalled,
9
9
  sherpaUnsupportedReason
10
- } from "./chunk-U7P2XTRY.js";
10
+ } from "./chunk-PECICVTJ.js";
11
11
  import {
12
12
  findParakeet
13
13
  } from "./chunk-JZIEZCQM.js";
@@ -1278,7 +1278,7 @@ async function withFigmaErrors(command, fn) {
1278
1278
  } catch (err) {
1279
1279
  if (err instanceof Error) {
1280
1280
  try {
1281
- const { trackCommandFailure } = await import("./events-SV46AWMI.js");
1281
+ const { trackCommandFailure } = await import("./events-VL2JIO4R.js");
1282
1282
  trackCommandFailure(
1283
1283
  command,
1284
1284
  err,
@@ -6,7 +6,7 @@ var __filename = __hf_fileURLToPath(import.meta.url);
6
6
  var __dirname = __hf_dirname(__filename);
7
7
  import {
8
8
  readCompositionFps
9
- } from "./chunk-EFP25BUY.js";
9
+ } from "./chunk-JAERN4RH.js";
10
10
  import {
11
11
  errorBox
12
12
  } from "./chunk-K2FLNJVB.js";
@@ -15,7 +15,7 @@ import {
15
15
  } from "./chunk-PBN6GBJE.js";
16
16
  import {
17
17
  parseFps
18
- } from "./chunk-O3J7BHBU.js";
18
+ } from "./chunk-QZUVPWC4.js";
19
19
 
20
20
  // src/browser/windowsCrash.ts
21
21
  var STATUS_STACK_BUFFER_OVERRUN_DEC = "3221225595";
@@ -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-RYILCNU7.js");
10
+ return await import("./src-J6KABXGZ.js");
11
11
  }
12
12
 
13
13
  export {
@@ -6,21 +6,21 @@ var __filename = __hf_fileURLToPath(import.meta.url);
6
6
  var __dirname = __hf_dirname(__filename);
7
7
  import {
8
8
  parakeetRunner
9
- } from "./chunk-S6U7YLPJ.js";
9
+ } from "./chunk-KUW4LWY6.js";
10
10
  import {
11
11
  DecodeCancelled,
12
12
  prepareSherpaWav,
13
13
  sherpaUnsupportedReason,
14
14
  transcribeWithSherpa
15
- } from "./chunk-U7P2XTRY.js";
15
+ } from "./chunk-PECICVTJ.js";
16
16
  import {
17
17
  initialModelForLanguage,
18
18
  transcribe
19
- } from "./chunk-UISU4SYG.js";
19
+ } from "./chunk-V2T7FFPB.js";
20
20
  import {
21
21
  createRenderCancellationScope,
22
22
  stoppedByCancelSignal
23
- } from "./chunk-A6K7M46D.js";
23
+ } from "./chunk-AWSVUIWG.js";
24
24
  import {
25
25
  formatSrt,
26
26
  formatVtt,
@@ -7,10 +7,10 @@ var __dirname = __hf_dirname(__filename);
7
7
  import {
8
8
  parseFeedbackRating,
9
9
  trackRenderFeedback
10
- } from "./chunk-FQJDV2RI.js";
10
+ } from "./chunk-6I24ZSCR.js";
11
11
  import {
12
12
  shouldTrack
13
- } from "./chunk-FSX7GTBB.js";
13
+ } from "./chunk-5HLJ4JMB.js";
14
14
  import {
15
15
  detectAgentRuntime
16
16
  } from "./chunk-QWQ6GQTI.js";
@@ -21,10 +21,10 @@ import {
21
21
  emitWords,
22
22
  getPreparedWavDurationSeconds,
23
23
  prepareWav
24
- } from "./chunk-UISU4SYG.js";
24
+ } from "./chunk-V2T7FFPB.js";
25
25
  import {
26
26
  stoppedByCancelSignal
27
- } from "./chunk-A6K7M46D.js";
27
+ } from "./chunk-AWSVUIWG.js";
28
28
  import {
29
29
  PARAKEET_MODEL_LABEL,
30
30
  SHERPA_ERROR_PREFIX,
@@ -8,10 +8,10 @@ import {
8
8
  DEFAULT_VP9_CPU_USED,
9
9
  isHttpUrl,
10
10
  runFfmpeg
11
- } from "./chunk-7FHFPHEM.js";
11
+ } from "./chunk-VKFYI7AQ.js";
12
12
  import {
13
13
  parseAnimatedGifMetadata
14
- } from "./chunk-O3J7BHBU.js";
14
+ } from "./chunk-QZUVPWC4.js";
15
15
  import {
16
16
  parseHTML
17
17
  } from "./chunk-SDYDNHEE.js";
@@ -7,7 +7,7 @@ var __dirname = __hf_dirname(__filename);
7
7
  import {
8
8
  resolveConfig,
9
9
  usesSoftwareWebGpu
10
- } from "./chunk-7FHFPHEM.js";
10
+ } from "./chunk-VKFYI7AQ.js";
11
11
 
12
12
  // src/browser/gpuPolicy.ts
13
13
  function resolveLocalBrowserGpuMode(browserGpuArg, envMode = process.env.PRODUCER_BROWSER_GPU_MODE) {
@@ -17,7 +17,7 @@ function resolveLocalBrowserGpuMode(browserGpuArg, envMode = process.env.PRODUCE
17
17
  return "auto";
18
18
  }
19
19
  async function resolveCaptureBrowserGpuMode(requestedMode, chromePath, probeLifecycle) {
20
- const { resolveBrowserGpuMode } = await import("./src-ZGMLMQ3B.js");
20
+ const { resolveBrowserGpuMode } = await import("./src-VFTQPSQD.js");
21
21
  return resolveBrowserGpuMode(requestedMode, { chromePath, probeLifecycle });
22
22
  }
23
23
  function resolveLocalWebGpu(browserGpuMode, requiresWebGpu) {
@@ -9,7 +9,7 @@ import {
9
9
  parseStrictFiniteTimingNumber,
10
10
  resolveNaturalMediaTimelineDuration,
11
11
  resolveTimedImageDurationSeconds
12
- } from "./chunk-BIV5HVTQ.js";
12
+ } from "./chunk-6M3IPJS6.js";
13
13
  import {
14
14
  CANVAS_DIMENSIONS,
15
15
  isCompositionElement,
@@ -32,21 +32,21 @@ import {
32
32
  import {
33
33
  getUpdateMeta,
34
34
  withMeta
35
- } from "./chunk-K5PU5ISL.js";
35
+ } from "./chunk-GSABLXZV.js";
36
36
  import {
37
37
  CONFIG_PATH,
38
38
  withFileLock
39
39
  } from "./chunk-XUXGIA7H.js";
40
40
  import {
41
41
  VERSION
42
- } from "./chunk-BNEKKUPG.js";
42
+ } from "./chunk-BYFG74OA.js";
43
43
  import {
44
44
  OPTIONAL_PACKAGES,
45
45
  installedOptionalPackageVersion
46
46
  } from "./chunk-3DKN5WKL.js";
47
47
  import {
48
48
  resolveExtractCacheDir
49
- } from "./chunk-7FHFPHEM.js";
49
+ } from "./chunk-VKFYI7AQ.js";
50
50
  import {
51
51
  normalizeErrorMessage
52
52
  } from "./chunk-KNU5COPB.js";
@@ -27,7 +27,7 @@ import {
27
27
  } from "./chunk-GMECXFAN.js";
28
28
  import {
29
29
  ITEM_TYPE_DIRS
30
- } from "./chunk-O3J7BHBU.js";
30
+ } from "./chunk-QZUVPWC4.js";
31
31
  import {
32
32
  realProjectRoot
33
33
  } from "./chunk-OFQWTKPW.js";
@@ -2866,7 +2866,7 @@ async function fetchRegistryManifest(baseUrl = DEFAULT_REGISTRY_URL, options) {
2866
2866
  return cached?.data;
2867
2867
  }
2868
2868
  }
2869
- async function fetchItemManifest(name, type, baseUrl = DEFAULT_REGISTRY_URL) {
2869
+ async function fetchItemManifest(name, type, baseUrl = DEFAULT_REGISTRY_URL, options) {
2870
2870
  if (!validRegistryName(name) || !Object.hasOwn(ITEM_TYPE_DIRS, type))
2871
2871
  throw new Error("Invalid registry item name or type");
2872
2872
  const dir = ITEM_TYPE_DIRS[type];
@@ -2874,7 +2874,8 @@ async function fetchItemManifest(name, type, baseUrl = DEFAULT_REGISTRY_URL) {
2874
2874
  const url = registryPathUrl(baseUrl, dir, name, "registry-item.json");
2875
2875
  const cacheFile = cachePath(baseUrl, `${dir}__${name}`);
2876
2876
  const cached = readCacheEntry(cacheFile, validate);
2877
- if (cached && isFresh(cached)) return cached.data;
2877
+ if (cached && (isFresh(cached) || options?.cacheOnly)) return cached.data;
2878
+ if (options?.cacheOnly) throw new Error("not fetched after an earlier registry timeout");
2878
2879
  try {
2879
2880
  const item = await fetchJson(url, validate);
2880
2881
  writeCache(cacheFile, item);
@@ -6,10 +6,10 @@ var __filename = __hf_fileURLToPath(import.meta.url);
6
6
  var __dirname = __hf_dirname(__filename);
7
7
  import {
8
8
  getMimeType
9
- } from "./chunk-XJQ6NN2L.js";
9
+ } from "./chunk-ZBUGFQ7Y.js";
10
10
  import {
11
11
  injectTagsAtHeadStart
12
- } from "./chunk-BIV5HVTQ.js";
12
+ } from "./chunk-6M3IPJS6.js";
13
13
 
14
14
  // src/utils/compositionServer.ts
15
15
  import { createHash } from "crypto";
@@ -19,7 +19,7 @@ import {
19
19
  import {
20
20
  formatVariableValidationIssue,
21
21
  validateVariables
22
- } from "./chunk-O3J7BHBU.js";
22
+ } from "./chunk-QZUVPWC4.js";
23
23
  import {
24
24
  extractCompositionMetadata
25
25
  } from "./chunk-YMS5FOMC.js";
@@ -13,7 +13,7 @@ import {
13
13
  } from "./chunk-WICIV6R3.js";
14
14
  import {
15
15
  resolveCaptureBrowserGpuMode
16
- } from "./chunk-Q5K73VW3.js";
16
+ } from "./chunk-PXA4S6OE.js";
17
17
  import {
18
18
  isNavigationTimeoutError,
19
19
  withRemainingBudget
@@ -36,6 +36,7 @@ var closing = /* @__PURE__ */ new WeakMap();
36
36
  var pending = /* @__PURE__ */ new Map();
37
37
  var sessionCleanups = /* @__PURE__ */ new Set();
38
38
  var CLOSE_GRACE_MS = 1e3;
39
+ var LAUNCH_TIMEOUT_MS = 3e4;
39
40
  var EXIT_POLL_MS = 50;
40
41
  var listening = false;
41
42
  var shutdown;
@@ -58,6 +59,7 @@ function ownSignals() {
58
59
  }
59
60
  async function resolveManagedGpuMode(requestedMode, chromePath, context = {}) {
60
61
  ownSignals();
62
+ if (requestedMode === "auto" && inAgentSandbox()) return "software";
61
63
  return resolveCaptureBrowserGpuMode(requestedMode, chromePath, {
62
64
  launch: async (puppeteer, options) => {
63
65
  context.signal?.throwIfAborted();
@@ -99,12 +101,15 @@ async function launchOwnedBrowser(puppeteer, options) {
99
101
  ownSignals();
100
102
  const abort = new AbortController();
101
103
  const signal = options.signal ? AbortSignal.any([options.signal, abort.signal]) : abort.signal;
102
- const launch = puppeteer.launch({
103
- ...options,
104
- signal,
105
- handleSIGINT: false,
106
- handleSIGTERM: false
107
- });
104
+ const launch = untilLaunchOrAbort(
105
+ puppeteer.launch({ ...options, signal, handleSIGINT: false, handleSIGTERM: false }),
106
+ signal
107
+ );
108
+ const limit = options.timeout ?? LAUNCH_TIMEOUT_MS;
109
+ const timer = limit > 0 ? setTimeout(
110
+ () => abort.abort(new Error(`The browser did not finish starting within ${limit} ms.`)),
111
+ limit
112
+ ) : void 0;
108
113
  pending.set(launch, abort);
109
114
  try {
110
115
  const browser = await launch;
@@ -114,9 +119,18 @@ async function launchOwnedBrowser(puppeteer, options) {
114
119
  child.once("exit", () => browsers.delete(browser));
115
120
  return browser;
116
121
  } finally {
122
+ clearTimeout(timer);
117
123
  pending.delete(launch);
118
124
  }
119
125
  }
126
+ function untilLaunchOrAbort(launch, signal) {
127
+ const aborted = new Promise((_, reject) => {
128
+ if (signal.aborted) reject(signal.reason);
129
+ signal.addEventListener("abort", () => reject(signal.reason), { once: true });
130
+ });
131
+ void launch.then((late) => signal.aborted ? closeManagedBrowser(late) : void 0).catch(() => void 0);
132
+ return Promise.race([launch, aborted]);
133
+ }
120
134
  async function closeManagedBrowsers() {
121
135
  for (const abort of pending.values()) abort.abort();
122
136
  await Promise.allSettled(pending.keys());
@@ -6,7 +6,7 @@ var __filename = __hf_fileURLToPath(import.meta.url);
6
6
  var __dirname = __hf_dirname(__filename);
7
7
  import {
8
8
  shouldTrack
9
- } from "./chunk-FSX7GTBB.js";
9
+ } from "./chunk-5HLJ4JMB.js";
10
10
 
11
11
  // src/telemetry/renderObservability.ts
12
12
  function renderObservabilityTelemetryPayload(observability) {
@@ -6,7 +6,7 @@ var __filename = __hf_fileURLToPath(import.meta.url);
6
6
  var __dirname = __hf_dirname(__filename);
7
7
  import {
8
8
  readCompositionFps
9
- } from "./chunk-EFP25BUY.js";
9
+ } from "./chunk-JAERN4RH.js";
10
10
  import {
11
11
  findSyncPartner,
12
12
  readLinkTiming,
@@ -18,7 +18,7 @@ import {
18
18
  extractMediaMetadata,
19
19
  resolveReferencedDuration,
20
20
  resolveReferencedStart
21
- } from "./chunk-7FHFPHEM.js";
21
+ } from "./chunk-VKFYI7AQ.js";
22
22
  import {
23
23
  byStart,
24
24
  compositionOriginSeconds,
@@ -27,14 +27,14 @@ import {
27
27
  hostInPointSeconds,
28
28
  parseFpsWithDefault,
29
29
  resolveMediaStartSeconds
30
- } from "./chunk-O3J7BHBU.js";
30
+ } from "./chunk-QZUVPWC4.js";
31
31
  import {
32
32
  HF_AUDIO_AUTOMATION_ATTR,
33
33
  HF_AUDIO_FX_ATTR,
34
34
  parseAudioFxChain,
35
35
  parseAutomation,
36
36
  resolveAutomation
37
- } from "./chunk-BIV5HVTQ.js";
37
+ } from "./chunk-6M3IPJS6.js";
38
38
  import {
39
39
  isSubCompositionHost,
40
40
  topLevelElements,
@@ -6,7 +6,7 @@ var __filename = __hf_fileURLToPath(import.meta.url);
6
6
  var __dirname = __hf_dirname(__filename);
7
7
  import {
8
8
  stoppedByCancelSignal
9
- } from "./chunk-A6K7M46D.js";
9
+ } from "./chunk-AWSVUIWG.js";
10
10
  import {
11
11
  DEFAULT_MODEL,
12
12
  ensureModel,