hyperframes 0.8.150 → 0.8.152

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 (193) hide show
  1. package/dist/{add-3ZIFEN2U.js → add-SA33REHW.js} +14 -14
  2. package/dist/{animatedGifPrep-77LPFLKJ.js → animatedGifPrep-3YXJQZ7L.js} +9 -9
  3. package/dist/api.js +19 -19
  4. package/dist/{asset-EYSZEHM6.js → asset-PUVPTWPD.js} +2 -2
  5. package/dist/{assetCataloger-KX3HD7ZI.js → assetCataloger-VWE2PLBX.js} +4 -4
  6. package/dist/{auth-L6IWNRXY.js → auth-PS3M6AI7.js} +1 -1
  7. package/dist/{autoUpdate-2O3HZB65.js → autoUpdate-CMO4SHWU.js} +2 -2
  8. package/dist/{backgroundChecks-BH2LMJYE.js → backgroundChecks-EDZ2A55J.js} +3 -3
  9. package/dist/backgroundChecksWorker.js +3 -3
  10. package/dist/{batchRender-ZBKAYLWU.js → batchRender-7PLJISCN.js} +5 -5
  11. package/dist/{beats-IVLF2566.js → beats-2MDSIOE7.js} +15 -15
  12. package/dist/{benchmark-SYZFW2G7.js → benchmark-KBBXAPI4.js} +10 -10
  13. package/dist/{browser-OSW3L25S.js → browser-OMWKZRSW.js} +5 -5
  14. package/dist/{bundleWithLocalizedFonts-I4CWOXLK.js → bundleWithLocalizedFonts-76DMCRIW.js} +2 -2
  15. package/dist/{capture-AZOQ57TM.js → capture-LRUUXH5Q.js} +2 -2
  16. package/dist/{capture-V5ICGSVJ.js → capture-YGDC7GN3.js} +13 -13
  17. package/dist/{catalog-VBJOA2Y5.js → catalog-SMEBKEVO.js} +14 -14
  18. package/dist/{catch-up-TKSEDNJK.js → catch-up-OMILX3WE.js} +4 -4
  19. package/dist/{check-3HFISKDB.js → check-NUZ62LIW.js} +288 -64
  20. package/dist/{checkBrowser-MXBDNZJB.js → checkBrowser-MSTVEL4V.js} +181 -38
  21. package/dist/{chunk-73RBX2E7.js → chunk-3DZBQ7MH.js} +3 -3
  22. package/dist/{chunk-6QB7F2II.js → chunk-3E4OCOC5.js} +1 -1
  23. package/dist/{chunk-OQ7XMM3S.js → chunk-3HPJM5IQ.js} +1 -1
  24. package/dist/{chunk-UJB7356Y.js → chunk-3LO7BBJX.js} +3 -3
  25. package/dist/{chunk-APDLWWFG.js → chunk-3VGU2SH7.js} +1 -1
  26. package/dist/{chunk-DUUFDLC4.js → chunk-4MLYMDQ4.js} +1 -1
  27. package/dist/{chunk-AXPNVC3N.js → chunk-4UMKAUZI.js} +1 -1
  28. package/dist/{chunk-XPQSL5VS.js → chunk-54DMWFQZ.js} +8 -1
  29. package/dist/chunk-57GN6KWT.js +179 -0
  30. package/dist/{chunk-374QQGBQ.js → chunk-5CS4T6C6.js} +63 -12
  31. package/dist/{chunk-PCWOSS7G.js → chunk-5ERVRJMV.js} +3 -3
  32. package/dist/{chunk-TZPZE5PS.js → chunk-5VMSUW4Z.js} +6 -3
  33. package/dist/{chunk-M6UDJ2E7.js → chunk-6Z4YJ5Q3.js} +3 -3
  34. package/dist/{chunk-FJWEYVEM.js → chunk-7FYFEXD2.js} +658 -198
  35. package/dist/{chunk-UQYQ7TBA.js → chunk-7NPSXBIN.js} +2 -2
  36. package/dist/chunk-7TASSBN2.js +215 -0
  37. package/dist/{chunk-F2RLIE7P.js → chunk-ANS56TPS.js} +11 -11
  38. package/dist/{chunk-DOVJRUFM.js → chunk-BQK3J7XO.js} +1 -1
  39. package/dist/{chunk-FPAT5HTI.js → chunk-BYJYQWEX.js} +10 -10
  40. package/dist/{chunk-XXPYZBZ3.js → chunk-C6TPGUWD.js} +2 -2
  41. package/dist/{chunk-XQMEGSHG.js → chunk-D6RJXQLD.js} +1 -1
  42. package/dist/{chunk-RW7NLGPD.js → chunk-DFXK7KUO.js} +25 -17
  43. package/dist/{chunk-6SFPQ2RZ.js → chunk-E6EYZ33P.js} +2 -2
  44. package/dist/{chunk-AKYQGZLU.js → chunk-EVTHG34H.js} +2 -2
  45. package/dist/{chunk-5NAYNDBT.js → chunk-EXH6L2XZ.js} +6 -2
  46. package/dist/{chunk-AIJS74LG.js → chunk-FFDC5OWV.js} +8 -2
  47. package/dist/{chunk-4WFNTWKZ.js → chunk-FNN5QINS.js} +2 -2
  48. package/dist/{chunk-DMKI64EZ.js → chunk-FSZAFCU7.js} +1 -1
  49. package/dist/{chunk-S5F26DUL.js → chunk-GQETH4PE.js} +3 -3
  50. package/dist/{chunk-3UAIVF4L.js → chunk-H2SGM2V2.js} +1 -1
  51. package/dist/{chunk-O4DC5CHF.js → chunk-H7FXBK3Q.js} +1 -1
  52. package/dist/{chunk-UVVI2NJQ.js → chunk-HBCRRCTX.js} +109 -31
  53. package/dist/{chunk-NFQY7EIC.js → chunk-IBYC3VUA.js} +1 -1
  54. package/dist/{chunk-2KAL22B5.js → chunk-IEDT4EXE.js} +1 -1
  55. package/dist/{chunk-I6DATIHC.js → chunk-IZIRIDJH.js} +2 -2
  56. package/dist/{chunk-Z6WZDGCS.js → chunk-IZKXUYZE.js} +2 -2
  57. package/dist/chunk-KCFF4ENE.js +24 -0
  58. package/dist/{chunk-6KWA3XPS.js → chunk-KZ3L3W4Q.js} +1 -1
  59. package/dist/{chunk-7IEGPJ4P.js → chunk-LBT4AMSF.js} +1 -1
  60. package/dist/{chunk-7JTFPUMA.js → chunk-LECTCGGS.js} +1 -1
  61. package/dist/{chunk-7E4VHPKJ.js → chunk-LVPSWUS6.js} +5 -5
  62. package/dist/{chunk-6NPFJ255.js → chunk-MNHPG2UO.js} +1 -1
  63. package/dist/{chunk-FN6KAS7A.js → chunk-NHAG2KCE.js} +7 -7
  64. package/dist/{chunk-423DJVX2.js → chunk-PKO2EWO7.js} +1 -1
  65. package/dist/{chunk-ZNHAJCEA.js → chunk-PRXAOZWZ.js} +28 -13
  66. package/dist/{chunk-VQ7YIURZ.js → chunk-PTXZDSW5.js} +5 -5
  67. package/dist/{chunk-XANZ4R4P.js → chunk-QECEOV6W.js} +3 -3
  68. package/dist/{chunk-BLRJKBKP.js → chunk-QESSGUKX.js} +1 -1
  69. package/dist/{chunk-WLIUULZQ.js → chunk-RN5I2DP5.js} +29 -15
  70. package/dist/chunk-S3RCK56N.js +3795 -0
  71. package/dist/{chunk-UAIUVPZE.js → chunk-SWCSL6WS.js} +6 -6
  72. package/dist/{chunk-2PSPARWP.js → chunk-TYXH3EKP.js} +4 -0
  73. package/dist/{chunk-FMNVTKX2.js → chunk-U3BCDVZO.js} +1 -1
  74. package/dist/{chunk-LW5VFBSY.js → chunk-VS732BUG.js} +1 -1
  75. package/dist/{chunk-LFNQDTSH.js → chunk-VYKPBRCB.js} +63 -12
  76. package/dist/{chunk-M5B42RL5.js → chunk-WUUOFMHU.js} +3 -3
  77. package/dist/{chunk-A6ZO4BX7.js → chunk-XEFFJRYX.js} +2 -2
  78. package/dist/{chunk-EL5QVJEG.js → chunk-XINGD6MS.js} +4 -4
  79. package/dist/chunk-XSEGMQYA.js +30 -0
  80. package/dist/{chunk-CZQLCBWY.js → chunk-YG2Y55KF.js} +1 -1
  81. package/dist/{chunk-B3XLIBFL.js → chunk-YIJMVFEJ.js} +1 -1
  82. package/dist/{chunk-JDB65PPT.js → chunk-YOEGUBBY.js} +13 -12
  83. package/dist/{chunk-AFRXL75S.js → chunk-YYEYOFHW.js} +1 -1
  84. package/dist/{chunk-R5A7454P.js → chunk-ZTM3RMAD.js} +2 -2
  85. package/dist/{clean-7HU7S7DT.js → clean-F75G45BI.js} +56 -35
  86. package/dist/cli.js +53 -53
  87. package/dist/{cloud-HAXHBO25.js → cloud-KVJAOUWH.js} +4 -4
  88. package/dist/{cloudrun-A3PIJ6DX.js → cloudrun-Q7Q7O4GY.js} +6 -6
  89. package/dist/{compare-6IPSQMSM.js → compare-DGUJ4QWU.js} +30 -30
  90. package/dist/{compiler-UQP2VXN6.js → compiler-NCN6PTVH.js} +6 -6
  91. package/dist/{component-FF3AU24M.js → component-PSYGT3JV.js} +3 -3
  92. package/dist/{compositions-JSH4MZXB.js → compositions-J3GAETIC.js} +13 -13
  93. package/dist/{delete-G763SW64.js → delete-MR7LRGRP.js} +2 -2
  94. package/dist/{deterministicFonts-C5JQLCTS.js → deterministicFonts-EOMDR6ZF.js} +3 -3
  95. package/dist/{dist-HUMFCJ6T.js → dist-2YYJYYPY.js} +3 -3
  96. package/dist/{dist-Z7Q3JS7K.js → dist-3MHXG6EJ.js} +4 -4
  97. package/dist/{doctor-WZB6WMBY.js → doctor-JOUGR5UK.js} +15 -15
  98. package/dist/{events-T4YFQC5G.js → events-63BKDWVO.js} +3 -3
  99. package/dist/{events-MUWJJCC7.js → events-FZFBJCIH.js} +2 -2
  100. package/dist/{feedback-AUTHQNN2.js → feedback-QLKWUDXR.js} +8 -8
  101. package/dist/{ffmpeg-TZB5WAYE.js → ffmpeg-MJFMBBSF.js} +2 -2
  102. package/dist/{figma-NBG6WBI7.js → figma-YJ7HGVQC.js} +3 -3
  103. package/dist/fontLocalizeCli.js +12 -12
  104. package/dist/{get-OXBJLKLV.js → get-54MUUXMR.js} +2 -2
  105. package/dist/{gpuPolicy-HBCCEQUS.js → gpuPolicy-5OVNR75D.js} +9 -9
  106. package/dist/{grade-compare-2LX4FDH7.js → grade-compare-7IDUF673.js} +32 -32
  107. package/dist/{gsapParserAcorn-VXZ3ZIF2.js → gsapParserAcorn-7NCK2LVT.js} +2 -2
  108. package/dist/{help-LJI46EDO.js → help-GQFYO5LU.js} +1 -1
  109. package/dist/{history-MFKAQEHU.js → history-UI3O7CSO.js} +77 -205
  110. package/dist/hyperframe-runtime.js +54 -54
  111. package/dist/hyperframe.manifest.json +1 -1
  112. package/dist/hyperframe.runtime.iife.js +54 -54
  113. package/dist/hyperframes-player.global.js +3 -3
  114. package/dist/{info-D6Y5O2QE.js → info-VQV3APEX.js} +9 -9
  115. package/dist/{init-47NZPEBI.js → init-2UBFV5D7.js} +31 -31
  116. package/dist/{inspect-U5UXJK5D.js → inspect-36ACJ3CO.js} +31 -31
  117. package/dist/{installer-AW7VFVTQ.js → installer-GDUZDJG4.js} +7 -7
  118. package/dist/{keyframes-5G334NWB.js → keyframes-GPBU34BG.js} +227 -82
  119. package/dist/{lambda-GASGXN3A.js → lambda-CBJVLTHY.js} +7 -7
  120. package/dist/{layout-OXAQFLJS.js → layout-2IHFV6EI.js} +31 -31
  121. package/dist/{lint-F36QFSNF.js → lint-IR6IYCEO.js} +9 -9
  122. package/dist/{lintProject-SSEXWCH6.js → lintProject-XQWXJYSC.js} +3 -3
  123. package/dist/{list-TR6QCI53.js → list-UAGKWARH.js} +2 -2
  124. package/dist/{login-6LA2RWTC.js → login-2GYCNCZF.js} +4 -4
  125. package/dist/{manager-ES2UFT4X.js → manager-X44GKUEL.js} +3 -3
  126. package/dist/{manager-GWU5J6RJ.js → manager-ZLJD3EAY.js} +2 -2
  127. package/dist/{media-treatment-BOHYDWVY.js → media-treatment-Z553F7XI.js} +14 -14
  128. package/dist/{models-6GW5Q3IW.js → models-6AZTNNSO.js} +15 -15
  129. package/dist/{motionShot-O7AOMPUN.js → motionShot-ARRL7WXT.js} +29 -16
  130. package/dist/{normalize-audio-UO5B4O76.js → normalize-audio-CME4NUB6.js} +6 -6
  131. package/dist/{open-JV2EHVKM.js → open-HU2VXUFD.js} +4 -4
  132. package/dist/{parakeetRunner-23DZUF6G.js → parakeetRunner-X5MKFMCB.js} +16 -16
  133. package/dist/{pipeline-KTICSIK7.js → pipeline-MNFTEBJU.js} +11 -11
  134. package/dist/{play-CMUYPXBC.js → play-2BBJDDAZ.js} +24 -24
  135. package/dist/{preflight-JOD4OXGC.js → preflight-JYOX64YP.js} +4 -4
  136. package/dist/{present-ZDT5FM2H.js → present-OE2WL2NY.js} +20 -20
  137. package/dist/{preview-ASHLGKDD.js → preview-RYSCCAWJ.js} +21 -21
  138. package/dist/{producer-FFH2KUAZ.js → producer-SQWNRO66.js} +1 -1
  139. package/dist/{projectConfig-FHIAOPKW.js → projectConfig-B55Z7YKQ.js} +9 -9
  140. package/dist/{publication-WO5ZXURT.js → publication-MDZCOBJP.js} +4 -4
  141. package/dist/{publish-QWO2W7FB.js → publish-AILV36BO.js} +12 -12
  142. package/dist/{remove-background-BO5MQR25.js → remove-background-6F72LKHG.js} +12 -12
  143. package/dist/{render-XTJKGT3G.js → render-2MZKU3L5.js} +10 -10
  144. package/dist/{render-SDHFXL3Y.js → render-5EREH6YD.js} +95 -37
  145. package/dist/{render-HS3YOLSD.js → render-6GH5FSXU.js} +5 -5
  146. package/dist/{render-batch-J64AJHQY.js → render-batch-UMBUQWWS.js} +5 -5
  147. package/dist/renderSetupWorker.js +6 -6
  148. package/dist/{resolver-IHNWMDJA.js → resolver-KO6WWO5P.js} +6 -6
  149. package/dist/{sherpa-FXBBYMDR.js → sherpa-DADGYWNR.js} +15 -15
  150. package/dist/skills/hyperframes/references/frame-worker-core.md +11 -9
  151. package/dist/skills/hyperframes/references/subagent-dispatch.md +1 -1
  152. package/dist/skills/hyperframes-cli/SKILL.md +3 -0
  153. package/dist/skills/hyperframes-cli/references/lint-validate-inspect.md +5 -1
  154. package/dist/skills/media-use/audio/scripts/lib/tts.cleanup.test.mjs +175 -0
  155. package/dist/skills/media-use/audio/scripts/lib/tts.mjs +24 -19
  156. package/dist/skills/media-use/references/grading.md +1 -2
  157. package/dist/skills/media-use/references/meta.md +17 -17
  158. package/dist/skills/media-use/references/operations.md +6 -6
  159. package/dist/skills/media-use/references/setup-providers.md +3 -4
  160. package/dist/skills/media-use/scripts/lib/cutlist.mjs +9 -2
  161. package/dist/skills/media-use/scripts/lib/cutlist.test.mjs +12 -0
  162. package/dist/skills/media-use/scripts/lib/telemetry.mjs +4 -1
  163. package/dist/skills/media-use/scripts/lib/telemetry.test.mjs +20 -0
  164. package/dist/skills/media-use/scripts/transcript-cut.mjs +23 -4
  165. package/dist/skills/media-use/scripts/transcript-cut.test.mjs +224 -0
  166. package/dist/{skills-ALLSN7TB.js → skills-QLKSNU4Y.js} +5 -5
  167. package/dist/{skillsUpdateCheck-EIT5NWM6.js → skillsUpdateCheck-Z2QQGF2W.js} +3 -3
  168. package/dist/{snapshot-Y3I76OIZ.js → snapshot-D5BBFXOS.js} +342 -154
  169. package/dist/{src-7V6LBC56.js → src-AVQBAECC.js} +10 -8
  170. package/dist/{src-S5IZVJUX.js → src-V7263E47.js} +11 -11
  171. package/dist/{staticProjectServer-QLWWGHZE.js → staticProjectServer-HNWSVEWN.js} +20 -20
  172. package/dist/studio/assets/{hyperframes-player-kup62bDR.js → hyperframes-player-0BY7-PK7.js} +1 -1
  173. package/dist/studio/assets/{index-B8BBYY8L.js → index-COrWdzlj.js} +1 -1
  174. package/dist/studio/assets/{index-CS_m0TkX.js → index-p-VXwuJ2.js} +132 -132
  175. package/dist/studio/assets/{index-DQ5jGodF.js → index-rmD5k_ES.js} +1 -1
  176. package/dist/studio/index.html +1 -1
  177. package/dist/{studio-api-UBFLZ3DA.js → studio-api-UXKTDWLT.js} +30 -16
  178. package/dist/{studioServer-REOVCIFP.js → studioServer-JOVR24O3.js} +51 -51
  179. package/dist/{synthesize-22B7L5GX.js → synthesize-MBDVUSH3.js} +2 -1
  180. package/dist/{telemetry-C3GDIXHO.js → telemetry-UW7XAM5W.js} +3 -3
  181. package/dist/{timeline-H42EGLMT.js → timeline-JSGTZ3AN.js} +73 -20
  182. package/dist/{tokens-2K7ISTKV.js → tokens-ADDBGTQ7.js} +2 -2
  183. package/dist/{transcribe-NUPASAUP.js → transcribe-FEHOK626.js} +14 -14
  184. package/dist/{transcribe-DVM7UFZZ.js → transcribe-P6MJGSZJ.js} +20 -20
  185. package/dist/{tts-QSAQZVEZ.js → tts-POI553RG.js} +1 -1
  186. package/dist/{updateCheck-3RWFSEZD.js → updateCheck-IBWMLXQ4.js} +2 -2
  187. package/dist/{upgrade-YKKL36N7.js → upgrade-NHZ7AYPO.js} +2 -2
  188. package/dist/{urlDownloader-6JNJYLPN.js → urlDownloader-ULDRBWS5.js} +8 -8
  189. package/dist/{validate-Z7KQT7GO.js → validate-NVWNXNBV.js} +25 -25
  190. package/dist/{video-EXL2JDSL.js → video-74DRD2DN.js} +9 -9
  191. package/package.json +1 -1
  192. package/dist/chunk-CEND6BLF.js +0 -3795
  193. package/dist/chunk-WBLXWOYK.js +0 -15
@@ -19,10 +19,10 @@ import {
19
19
  import {
20
20
  formatVariableValidationIssue,
21
21
  validateVariables
22
- } from "./chunk-PCWOSS7G.js";
22
+ } from "./chunk-5ERVRJMV.js";
23
23
  import {
24
24
  extractCompositionMetadata
25
- } from "./chunk-LFNQDTSH.js";
25
+ } from "./chunk-VYKPBRCB.js";
26
26
 
27
27
  // src/utils/variables.ts
28
28
  import { readFileSync } from "fs";
@@ -0,0 +1,215 @@
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
+ import {
8
+ DEFAULT_HISTORY_ROOT,
9
+ HistoryBusyError,
10
+ MAX_WINDOW_IDLE_MS,
11
+ openProjectHistory,
12
+ readProjectHistory
13
+ } from "./chunk-7FYFEXD2.js";
14
+ import {
15
+ resolveProject
16
+ } from "./chunk-IBYC3VUA.js";
17
+ import {
18
+ findPreviewServerForProject,
19
+ studioApiUrl
20
+ } from "./chunk-DQBY7FRR.js";
21
+
22
+ // src/utils/historyOwner.ts
23
+ import { randomUUID } from "crypto";
24
+ import { mkdirSync, readFileSync, renameSync, rmSync, writeFileSync } from "fs";
25
+ import { dirname, join, resolve } from "path";
26
+ var historyDeps = {
27
+ historyRoot: resolve(process.env.HYPERFRAMES_HISTORY_ROOT || DEFAULT_HISTORY_ROOT),
28
+ findServer: (projectDir) => findPreviewServerForProject(projectDir),
29
+ /** A turn with no write for this long has ended, through a preview or not. */
30
+ turnIdleMs: MAX_WINDOW_IDLE_MS,
31
+ ownerWaitMs: void 0,
32
+ now: () => Date.now()
33
+ };
34
+ var Refusal = class extends Error {
35
+ };
36
+ var turnFile = (dir) => join(dir, ".hyperframes", "history-turn.json");
37
+ function readTurn(dir) {
38
+ try {
39
+ const turn = JSON.parse(readFileSync(turnFile(dir), "utf-8"));
40
+ return typeof turn.lastWriteAt === "number" ? { ...turn, parts: turn.parts ?? [] } : null;
41
+ } catch {
42
+ return null;
43
+ }
44
+ }
45
+ function writeTurn(dir, turn) {
46
+ if (!turn) return rmSync(turnFile(dir), { force: true });
47
+ mkdirSync(dirname(turnFile(dir)), { recursive: true });
48
+ writeFileSync(turnFile(dir), JSON.stringify(turn));
49
+ }
50
+ var lastTurnsFile = (dir) => join(dir, ".hyperframes", "history-turns.json");
51
+ function readLastTurns(dir) {
52
+ try {
53
+ const turns = JSON.parse(readFileSync(lastTurnsFile(dir), "utf-8"));
54
+ return turns && typeof turns === "object" ? turns : {};
55
+ } catch {
56
+ return {};
57
+ }
58
+ }
59
+ function lastTurnParts(dir, name) {
60
+ return readLastTurns(dir)[name] ?? null;
61
+ }
62
+ var samePart = (a, b) => a.who.kind === b.who.kind && a.who.name === b.who.name && a.label === b.label && a.startedAt === b.startedAt;
63
+ async function endTurn(owner, turn, dir) {
64
+ const entry = await owner.end(turn.id);
65
+ const cut = (await owner.list()).filter((other) => samePart(other, entry ?? turn));
66
+ const own = entry ? [entry.id] : [];
67
+ const parts = [.../* @__PURE__ */ new Set([...turn.parts, ...cut.map((part) => part.id), ...own])];
68
+ const draft = `${lastTurnsFile(dir)}.${process.pid}.tmp`;
69
+ mkdirSync(dirname(draft), { recursive: true });
70
+ writeFileSync(draft, JSON.stringify({ ...readLastTurns(dir), [turn.who.name]: parts }));
71
+ renameSync(draft, lastTurnsFile(dir));
72
+ writeTurn(dir, null);
73
+ return { entry, parts };
74
+ }
75
+ function previewOwner(route) {
76
+ const call = async (path, body, signal) => {
77
+ const init = {
78
+ ...body && {
79
+ method: "POST",
80
+ headers: { "content-type": "application/json" },
81
+ body: JSON.stringify(body)
82
+ },
83
+ ...signal && { signal }
84
+ };
85
+ const response = await fetch(route(path), init);
86
+ if (response.ok) return response;
87
+ const error = await response.json().catch(() => null);
88
+ throw new Refusal(error?.error ?? `The preview answered ${response.status}.`);
89
+ };
90
+ const json = async (path, body, signal) => (await call(path, body, signal)).json();
91
+ const list = async () => (await json("")).entries;
92
+ return {
93
+ via: "preview",
94
+ list,
95
+ peek: async (point) => (await json(`/peek/${encodeURIComponent(point)}`)).files,
96
+ blob: async (hash) => Buffer.from(await (await call(`/blob/${hash}`)).arrayBuffer()),
97
+ undo: (id, who, mode) => json("/undo", { entryId: id, who, mode }),
98
+ restore: (point, who) => json("/restore", { point, who }),
99
+ pin: async (id, pinned) => void await json("/pin", { entryId: id, pinned }),
100
+ begin: async (who, label, exclusive) => {
101
+ const opened = await json("/window", {
102
+ who,
103
+ label,
104
+ idleMs: historyDeps.turnIdleMs,
105
+ ...exclusive && { exclusive: true }
106
+ });
107
+ return { id: opened.windowId, startedAt: opened.startedAt ?? historyDeps.now() };
108
+ },
109
+ // A preview restarted since begin committed the window on its way down.
110
+ end: (id) => json(`/window/${id}/close`, {}).then((closed) => closed.entry).catch(async () => (await list()).find((entry) => entry.id === id) ?? null),
111
+ checkpoint: async () => void await json("/checkpoint", {}, AbortSignal.timeout(5e3)),
112
+ close: async () => {
113
+ }
114
+ };
115
+ }
116
+ async function directOwner(projectDir) {
117
+ let turn = null;
118
+ const history = await openProjectHistory({
119
+ projectDir,
120
+ historyRoot: historyDeps.historyRoot,
121
+ now: () => historyDeps.now(),
122
+ pruneGoneProjectsBudgetMs: 1e3,
123
+ ownerWaitMs: historyDeps.ownerWaitMs,
124
+ closedWindowAfterOwnership: () => {
125
+ turn = readTurn(projectDir);
126
+ return turn ? {
127
+ id: turn.id,
128
+ who: turn.who,
129
+ label: turn.label,
130
+ startedAt: turn.startedAt,
131
+ lastWriteAt: turn.lastWriteAt,
132
+ idleMs: historyDeps.turnIdleMs
133
+ } : void 0;
134
+ }
135
+ });
136
+ return {
137
+ turn,
138
+ owner: {
139
+ via: "direct",
140
+ list: async () => history.list(),
141
+ peek: async (point) => history.peek(point),
142
+ blob: (hash) => history.readBlob(hash),
143
+ undo: (id, who, mode) => history.undo(id, { who, ...mode && { mode } }),
144
+ restore: (point, who) => history.restore(point, who),
145
+ pin: async (id, pinned) => history.pin(id, pinned),
146
+ // Opening filed every earlier write; the turn's own writes are filed to it when the next open passes it.
147
+ begin: async () => ({ id: randomUUID(), startedAt: historyDeps.now() }),
148
+ end: async (id) => history.list().find((entry) => entry.id === id) ?? null,
149
+ checkpoint: () => history.checkpoint(),
150
+ close: () => history.close()
151
+ }
152
+ };
153
+ }
154
+ async function connect(projectDir) {
155
+ const server = await historyDeps.findServer(projectDir);
156
+ if (server) {
157
+ const route = (path) => studioApiUrl(server, `history${path}`);
158
+ const status = await fetch(route("")).then(
159
+ (response) => response.status,
160
+ () => 404
161
+ );
162
+ if (status !== 404) return { owner: previewOwner(route), turn: readTurn(projectDir) };
163
+ }
164
+ return directOwner(projectDir);
165
+ }
166
+ async function withOwner(dir, task) {
167
+ const { dir: projectDir } = resolveProject(dir);
168
+ const { owner, turn } = await connect(projectDir);
169
+ try {
170
+ return await task(owner, turn, projectDir);
171
+ } finally {
172
+ try {
173
+ if (owner.via === "direct" && turn) {
174
+ const kept = (await owner.list()).find((entry) => entry.id === turn.id);
175
+ if (readTurn(projectDir)?.id === turn.id) {
176
+ const lastWriteAt = kept ? kept.endedAt : turn.lastWriteAt;
177
+ const parts = kept ? [...turn.parts, kept.id] : turn.parts;
178
+ writeTurn(projectDir, { ...turn, via: "direct", id: randomUUID(), lastWriteAt, parts });
179
+ }
180
+ }
181
+ } finally {
182
+ await owner.close();
183
+ }
184
+ }
185
+ }
186
+ async function withReader(dir, task) {
187
+ try {
188
+ return await withOwner(dir, (owner) => task(owner));
189
+ } catch (error) {
190
+ if (!(error instanceof HistoryBusyError)) throw error;
191
+ }
192
+ const view = readProjectHistory({
193
+ projectDir: resolveProject(dir).dir,
194
+ historyRoot: historyDeps.historyRoot
195
+ });
196
+ return task({
197
+ via: "direct",
198
+ list: async () => view.list(),
199
+ peek: async (point) => view.peek(point),
200
+ // The owner may have pruned a blob since its log was read.
201
+ blob: (hash) => view.readBlob(hash).catch((error) => {
202
+ throw error.code === "ENOENT" ? new Refusal("That point is no longer kept") : error;
203
+ })
204
+ });
205
+ }
206
+
207
+ export {
208
+ historyDeps,
209
+ Refusal,
210
+ writeTurn,
211
+ lastTurnParts,
212
+ endTurn,
213
+ withOwner,
214
+ withReader
215
+ };
@@ -9,17 +9,17 @@ import {
9
9
  resolveCliChromeGpuMode,
10
10
  seekCompositionTimeline,
11
11
  waitForRuntimeReady
12
- } from "./chunk-UAIUVPZE.js";
12
+ } from "./chunk-SWCSL6WS.js";
13
13
  import {
14
14
  resolveCompositionViewportFromHtml
15
15
  } from "./chunk-FH7WODJH.js";
16
16
  import {
17
17
  launchManagedBrowser,
18
18
  resolveManagedGpuMode
19
- } from "./chunk-AXPNVC3N.js";
19
+ } from "./chunk-4UMKAUZI.js";
20
20
  import {
21
21
  resolveProject
22
- } from "./chunk-NFQY7EIC.js";
22
+ } from "./chunk-IBYC3VUA.js";
23
23
  import {
24
24
  defineCommand
25
25
  } from "./chunk-S3S4TGEH.js";
@@ -33,7 +33,7 @@ import {
33
33
  import {
34
34
  printDeprecationNotice,
35
35
  withMeta
36
- } from "./chunk-AFRXL75S.js";
36
+ } from "./chunk-YYEYOFHW.js";
37
37
  import {
38
38
  decodeWellFormedEscapes
39
39
  } from "./chunk-BSQ7XANM.js";
@@ -228,7 +228,7 @@ function extractCompositionErrorsFromLint(lintResult) {
228
228
  async function localizeRemoteAssets(html) {
229
229
  let dir;
230
230
  try {
231
- const { loadProducer } = await import("./producer-FFH2KUAZ.js");
231
+ const { loadProducer } = await import("./producer-SQWNRO66.js");
232
232
  const { localizeRemoteMediaSources, localizeRemoteImageSources, localizeRemoteFontFaces } = await loadProducer();
233
233
  dir = mkdtempSync(join(tmpdir(), "hf-validate-assets-"));
234
234
  const assetDir = dir;
@@ -249,10 +249,10 @@ async function localizeRemoteAssets(html) {
249
249
  }
250
250
  async function validateInBrowser(project, opts) {
251
251
  const projectDir = project.dir;
252
- const { bundleToSingleHtml } = await import("./compiler-UQP2VXN6.js");
253
- const { ensureBrowser } = await import("./manager-GWU5J6RJ.js");
254
- const { serveStaticProjectHtml } = await import("./staticProjectServer-QLWWGHZE.js");
255
- const { lintProject } = await import("./lintProject-SSEXWCH6.js");
252
+ const { bundleToSingleHtml } = await import("./compiler-NCN6PTVH.js");
253
+ const { ensureBrowser } = await import("./manager-ZLJD3EAY.js");
254
+ const { serveStaticProjectHtml } = await import("./staticProjectServer-HNWSVEWN.js");
255
+ const { lintProject } = await import("./lintProject-XQWXJYSC.js");
256
256
  const lintResult = await lintProject(projectDir);
257
257
  const compositionErrors = extractCompositionErrorsFromLint(lintResult);
258
258
  const html = await bundleToSingleHtml(projectDir);
@@ -273,9 +273,9 @@ async function validateInBrowser(project, opts) {
273
273
  try {
274
274
  const browser = await ensureBrowser();
275
275
  const puppeteer = await import("puppeteer-core");
276
- const { buildChromeArgs, analyzeClipMediaFit } = await import("./src-7V6LBC56.js");
276
+ const { buildChromeArgs, analyzeClipMediaFit } = await import("./src-AVQBAECC.js");
277
277
  const requestedGpuMode = resolveCliChromeGpuMode();
278
- const { assertWebGpuAdapterAvailable, compositionRequiresWebGpu, resolveLocalWebGpu } = await import("./gpuPolicy-HBCCEQUS.js");
278
+ const { assertWebGpuAdapterAvailable, compositionRequiresWebGpu, resolveLocalWebGpu } = await import("./gpuPolicy-5OVNR75D.js");
279
279
  const resolvedGpuMode = await resolveManagedGpuMode(requestedGpuMode, browser.executablePath);
280
280
  const requiresWebGpu = compositionRequiresWebGpu(html);
281
281
  const { gpuConfig, softwareWebGpu } = resolveLocalWebGpu(resolvedGpuMode, requiresWebGpu);
@@ -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-I6DATIHC.js";
9
+ } from "./chunk-IZIRIDJH.js";
10
10
 
11
11
  // src/registry/compatibility.ts
12
12
  import { compareVersions } from "compare-versions";
@@ -6,24 +6,24 @@ var __filename = __hf_fileURLToPath(import.meta.url);
6
6
  var __dirname = __hf_dirname(__filename);
7
7
  import {
8
8
  serveStaticProjectHtml
9
- } from "./chunk-S5F26DUL.js";
9
+ } from "./chunk-GQETH4PE.js";
10
10
  import {
11
11
  AUDIT_SEEK_OPTIONS,
12
12
  installPageFunctionGuard,
13
13
  seekCompositionTimeline,
14
14
  waitForCompositionFonts,
15
15
  waitForRuntimeReady
16
- } from "./chunk-UAIUVPZE.js";
16
+ } from "./chunk-SWCSL6WS.js";
17
17
  import {
18
18
  launchManagedBrowser,
19
19
  resolveManagedGpuMode
20
- } from "./chunk-AXPNVC3N.js";
20
+ } from "./chunk-4UMKAUZI.js";
21
21
  import {
22
22
  resolveDiagnosticNavigationTimeoutMs
23
- } from "./chunk-423DJVX2.js";
23
+ } from "./chunk-PKO2EWO7.js";
24
24
  import {
25
25
  resolveProject
26
- } from "./chunk-NFQY7EIC.js";
26
+ } from "./chunk-IBYC3VUA.js";
27
27
  import {
28
28
  defineCommand
29
29
  } from "./chunk-S3S4TGEH.js";
@@ -37,7 +37,7 @@ import {
37
37
  import {
38
38
  printDeprecationNotice,
39
39
  withMeta
40
- } from "./chunk-AFRXL75S.js";
40
+ } from "./chunk-YYEYOFHW.js";
41
41
  import {
42
42
  normalizeErrorMessage
43
43
  } from "./chunk-KNU5COPB.js";
@@ -707,7 +707,7 @@ async function collectTweenBoundaries(page) {
707
707
  });
708
708
  }
709
709
  async function bundleProjectHtml(projectDir) {
710
- const { bundleToSingleHtml } = await import("./compiler-UQP2VXN6.js");
710
+ const { bundleToSingleHtml } = await import("./compiler-NCN6PTVH.js");
711
711
  return bundleToSingleHtml(projectDir);
712
712
  }
713
713
  async function alignViewportToComposition(page, url) {
@@ -727,15 +727,15 @@ async function alignViewportToComposition(page, url) {
727
727
  });
728
728
  }
729
729
  async function runLayoutAudit(projectDir, opts) {
730
- const { ensureBrowser } = await import("./manager-GWU5J6RJ.js");
730
+ const { ensureBrowser } = await import("./manager-ZLJD3EAY.js");
731
731
  const puppeteer = await import("puppeteer-core");
732
- const { buildChromeArgs } = await import("./src-7V6LBC56.js");
732
+ const { buildChromeArgs } = await import("./src-AVQBAECC.js");
733
733
  const {
734
734
  assertWebGpuAdapterAvailable,
735
735
  compositionRequiresWebGpu,
736
736
  resolveLocalBrowserGpuMode,
737
737
  resolveLocalWebGpu
738
- } = await import("./gpuPolicy-HBCCEQUS.js");
738
+ } = await import("./gpuPolicy-5OVNR75D.js");
739
739
  const html = await bundleProjectHtml(projectDir);
740
740
  const server = await serveStaticProjectHtml(
741
741
  projectDir,
@@ -6,7 +6,7 @@ var __filename = __hf_fileURLToPath(import.meta.url);
6
6
  var __dirname = __hf_dirname(__filename);
7
7
  import {
8
8
  resolveWithinProject
9
- } from "./chunk-AIJS74LG.js";
9
+ } from "./chunk-FFDC5OWV.js";
10
10
  import {
11
11
  MAX_AUDIO_GAIN_DB,
12
12
  formatAudioGain,
@@ -21,7 +21,7 @@ import {
21
21
  readMediaOffsetSeconds
22
22
  } from "./chunk-BSQ7XANM.js";
23
23
 
24
- // ../studio-server/dist/chunk-VMT4OC5B.js
24
+ // ../studio-server/dist/chunk-KR3B6IJC.js
25
25
  import { execFile } from "child_process";
26
26
  import { isAbsolute, relative, resolve } from "path";
27
27
  import { promisify } from "util";
@@ -12,7 +12,7 @@ import {
12
12
  } from "./chunk-HVW7ABXD.js";
13
13
  import {
14
14
  DEFAULT_REGISTRY_URL
15
- } from "./chunk-OQ7XMM3S.js";
15
+ } from "./chunk-3HPJM5IQ.js";
16
16
 
17
17
  // src/utils/projectConfig.ts
18
18
  import { readFileSync, writeFileSync } from "fs";
@@ -11,12 +11,12 @@ import {
11
11
  iterateFontFamilyDeclarations,
12
12
  normalizeSystemFontPrimaryFamilies,
13
13
  resolveFontFamilyDeclarationFamilies
14
- } from "./chunk-FMNVTKX2.js";
14
+ } from "./chunk-U3BCDVZO.js";
15
15
  import {
16
16
  EncoderInterruptedError,
17
17
  encoderFailureError,
18
18
  prepareAnimatedGifInputs
19
- } from "./chunk-R5A7454P.js";
19
+ } from "./chunk-ZTM3RMAD.js";
20
20
  import {
21
21
  createStudioPositionSeekReapplyScript
22
22
  } from "./chunk-EOOEC32M.js";
@@ -147,7 +147,7 @@ import {
147
147
  validateEngineConfigSnapshot,
148
148
  verifyDiskDrawElementSamples,
149
149
  writeCapturedFrame
150
- } from "./chunk-5NAYNDBT.js";
150
+ } from "./chunk-EXH6L2XZ.js";
151
151
  import {
152
152
  assignBundledRuntimeCompositionIds,
153
153
  buildVariablesByCompScript,
@@ -160,7 +160,7 @@ import {
160
160
  isTemplateEntry,
161
161
  parsesAsScript,
162
162
  prepareFlattenedInnerRoot
163
- } from "./chunk-WLIUULZQ.js";
163
+ } from "./chunk-RN5I2DP5.js";
164
164
  import {
165
165
  LOW_MEMORY_TOTAL_MB_THRESHOLD,
166
166
  getCgroupMemoryLimitMb,
@@ -184,7 +184,7 @@ import {
184
184
  resolveAbsoluteMediaStartSeconds,
185
185
  resolveAuthoredTimingWindow,
186
186
  toFps
187
- } from "./chunk-PCWOSS7G.js";
187
+ } from "./chunk-5ERVRJMV.js";
188
188
  import {
189
189
  COMPOSITION_SOURCE_URL,
190
190
  HF_COLOR_GRADING_ATTR,
@@ -212,7 +212,7 @@ import {
212
212
  shouldClampResolvedMediaDuration,
213
213
  sourceTimeAt,
214
214
  styleElementsFor
215
- } from "./chunk-CEND6BLF.js";
215
+ } from "./chunk-S3RCK56N.js";
216
216
  import {
217
217
  MAX_AUDIO_GAIN
218
218
  } from "./chunk-UJKQWGFF.js";
@@ -226,7 +226,7 @@ import {
226
226
  isAspectAgnosticResolutionAlias,
227
227
  normalizeResolutionFlag,
228
228
  suggestMatchingPreset
229
- } from "./chunk-LFNQDTSH.js";
229
+ } from "./chunk-VYKPBRCB.js";
230
230
  import {
231
231
  redactKnownPaths,
232
232
  redactTelemetryString
@@ -236,7 +236,7 @@ import {
236
236
  } from "./chunk-TWWSYAKJ.js";
237
237
  import {
238
238
  lintHyperframeHtml
239
- } from "./chunk-JDB65PPT.js";
239
+ } from "./chunk-YOEGUBBY.js";
240
240
  import {
241
241
  isUnresolvedAssetPlaceholder,
242
242
  readProjectFile,
@@ -4425,7 +4425,8 @@ function computeSegmentPlanHash(input) {
4425
4425
  input.imageFormat,
4426
4426
  input.useGpu ? "gpu" : "cpu",
4427
4427
  `${input.outputWidth}x${input.outputHeight}`,
4428
- input.motionBlur
4428
+ input.motionBlur,
4429
+ input.captureQuality === void 0 ? "" : String(input.captureQuality)
4429
4430
  ].join(" ");
4430
4431
  return createHash2("sha256").update(ordered).digest("hex").slice(0, 16);
4431
4432
  }
@@ -6562,7 +6563,7 @@ async function readLocalFont(absPath) {
6562
6563
  return { kind: "inline", buffer: Buffer.concat(chunks, totalBytes) };
6563
6564
  }
6564
6565
  async function embedLocalFontFaces(html, projectDir) {
6565
- const { fontToDataUri: toDataUri } = await import("./deterministicFonts-C5JQLCTS.js");
6566
+ const { fontToDataUri: toDataUri } = await import("./deterministicFonts-EOMDR6ZF.js");
6566
6567
  const styleBlockRe = /<style\b[^>]*>([\s\S]*?)<\/style>/gi;
6567
6568
  const fontFaceRe = /@font-face\s*\{([^}]*)\}/gi;
6568
6569
  let result = html;
@@ -7289,6 +7290,9 @@ function isActionableProbeFailure(line) {
7289
7290
  function resolveCaptureImageFormat(input) {
7290
7291
  return input.needsAlpha || input.motionBlur ? "png" : "jpeg";
7291
7292
  }
7293
+ function resolveCaptureJpegQuality(quality) {
7294
+ return quality === "draft" ? 80 : 100;
7295
+ }
7292
7296
 
7293
7297
  // ../producer/src/services/render/stages/probeStage.ts
7294
7298
  var FRAME_BOUNDARY_EPSILON = 1e-3;
@@ -7444,7 +7448,7 @@ async function runProbeStage(input) {
7444
7448
  height,
7445
7449
  fps: job.config.fps,
7446
7450
  format: captureFormat,
7447
- quality: captureFormat === "png" ? void 0 : 80,
7451
+ quality: captureFormat === "png" ? void 0 : resolveCaptureJpegQuality(job.config.quality),
7448
7452
  variables: job.config.variables,
7449
7453
  deviceScaleFactor,
7450
7454
  motionBlur,
@@ -8393,13 +8397,16 @@ function shouldAllowAdaptiveCaptureRetry(workerCount, _explicitlyConfigured) {
8393
8397
  return workerCount > 1;
8394
8398
  }
8395
8399
  var JPEG_RAW_RGBA_DIVISOR = 8;
8400
+ var HIGH_QUALITY_JPEG_RAW_RGBA_DIVISOR = 4;
8396
8401
  var DISK_PROJECTION_SAMPLE_FRAMES = 10;
8397
8402
  function estimateDiskCaptureBytes(totalFrames, captureOptions) {
8398
8403
  const scale = captureOptions.deviceScaleFactor ?? 1;
8399
8404
  const outputWidth = Math.ceil(captureOptions.width * scale);
8400
8405
  const outputHeight = Math.ceil(captureOptions.height * scale);
8401
8406
  const rawBytes = Math.ceil(totalFrames) * outputWidth * outputHeight * 4;
8402
- return frameFileExtension(captureOptions.format) === "jpg" ? Math.ceil(rawBytes / JPEG_RAW_RGBA_DIVISOR) : rawBytes;
8407
+ return frameFileExtension(captureOptions.format) === "jpg" ? Math.ceil(
8408
+ rawBytes / ((captureOptions.quality ?? 80) > 80 ? HIGH_QUALITY_JPEG_RAW_RGBA_DIVISOR : JPEG_RAW_RGBA_DIVISOR)
8409
+ ) : rawBytes;
8403
8410
  }
8404
8411
  function freeDiskBytesAt(path) {
8405
8412
  try {
@@ -11815,7 +11822,7 @@ async function executeRenderPipeline(input) {
11815
11822
  height,
11816
11823
  fps: job.config.fps,
11817
11824
  format: captureImageFormat,
11818
- quality: captureImageFormat === "png" ? void 0 : job.config.quality === "draft" ? 80 : 95,
11825
+ quality: captureImageFormat === "png" ? void 0 : resolveCaptureJpegQuality(job.config.quality),
11819
11826
  variables: job.config.variables,
11820
11827
  deviceScaleFactor,
11821
11828
  motionBlur: job.config.motionBlur,
@@ -12443,7 +12450,8 @@ async function executeRenderPipeline(input) {
12443
12450
  // Device-scaled: the capture buffer, not the CSS composition size.
12444
12451
  outputWidth: captureCompositionWidth ?? width,
12445
12452
  outputHeight: captureCompositionHeight ?? height,
12446
- motionBlur: job.config.motionBlur ? JSON.stringify(job.config.motionBlur) : ""
12453
+ motionBlur: job.config.motionBlur ? JSON.stringify(job.config.motionBlur) : "",
12454
+ captureQuality: captureOptions.quality
12447
12455
  });
12448
12456
  const segmentDir = segmentDirFor(join25(projectDir, "renders"), segmentPlanHash);
12449
12457
  let completedSegments = /* @__PURE__ */ new Set();
@@ -14393,7 +14401,7 @@ function startServer(options = {}) {
14393
14401
  });
14394
14402
  async function shutdown(signal) {
14395
14403
  log.info(`Received ${signal}, shutting down`);
14396
- const { drainBrowserPool } = await import("./src-7V6LBC56.js");
14404
+ const { drainBrowserPool } = await import("./src-AVQBAECC.js");
14397
14405
  await drainBrowserPool().catch(() => {
14398
14406
  });
14399
14407
  const handle = await Promise.race([
@@ -15579,7 +15587,7 @@ async function buildLocalExecutionPlan(projectDir, config, executionPlanDir, opt
15579
15587
  if (probeResult.fileServer) closeFileServerSafely(probeResult.fileServer, "plan", log);
15580
15588
  if (probeResult.probeSession) {
15581
15589
  try {
15582
- const { closeCaptureSession: closeCaptureSession2 } = await import("./src-7V6LBC56.js");
15590
+ const { closeCaptureSession: closeCaptureSession2 } = await import("./src-AVQBAECC.js");
15583
15591
  await closeCaptureSession2(probeResult.probeSession);
15584
15592
  } catch (err) {
15585
15593
  log.warn("[plan] probe session close failed", {
@@ -17221,7 +17229,7 @@ async function renderChunk(planDir, chunkIndex, outputChunkPath) {
17221
17229
  height: plan2.dimensions.height,
17222
17230
  fps: { num: plan2.dimensions.fpsNum, den: plan2.dimensions.fpsDen },
17223
17231
  format: plan2.dimensions.format === "mp4" ? "jpeg" : "png",
17224
- quality: plan2.dimensions.format === "mp4" ? 80 : void 0,
17232
+ quality: plan2.dimensions.format === "mp4" ? resolveCaptureJpegQuality(job.config.quality) : void 0,
17225
17233
  deviceScaleFactor: encoder.deviceScaleFactor,
17226
17234
  // Re-inject the controller's snapshotted variables so the chunk's
17227
17235
  // first capture sees the same `window.__hfVariables` the in-process
@@ -21,10 +21,10 @@ import {
21
21
  emitWords,
22
22
  getPreparedWavDurationSeconds,
23
23
  prepareWav
24
- } from "./chunk-XANZ4R4P.js";
24
+ } from "./chunk-QECEOV6W.js";
25
25
  import {
26
26
  stoppedByCancelSignal
27
- } from "./chunk-4WFNTWKZ.js";
27
+ } from "./chunk-FNN5QINS.js";
28
28
  import {
29
29
  PARAKEET_MODEL_LABEL,
30
30
  SHERPA_ERROR_PREFIX,
@@ -7,7 +7,7 @@ var __dirname = __hf_dirname(__filename);
7
7
  import {
8
8
  resolveConfig,
9
9
  usesSoftwareWebGpu
10
- } from "./chunk-5NAYNDBT.js";
10
+ } from "./chunk-EXH6L2XZ.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) {
20
- const { resolveBrowserGpuMode } = await import("./src-7V6LBC56.js");
20
+ const { resolveBrowserGpuMode } = await import("./src-AVQBAECC.js");
21
21
  return resolveBrowserGpuMode(requestedMode, { chromePath });
22
22
  }
23
23
  function resolveLocalWebGpu(browserGpuMode, requiresWebGpu) {
@@ -26,7 +26,7 @@ import {
26
26
  renderFrameIdForRenderId,
27
27
  resolveAuthoredTimingWindow,
28
28
  toFps
29
- } from "./chunk-PCWOSS7G.js";
29
+ } from "./chunk-5ERVRJMV.js";
30
30
  import {
31
31
  AUDIO_GROUP_RENDER_ID_ATTR,
32
32
  COLOR_GRADING_SOURCE_HIDDEN_ATTR,
@@ -55,7 +55,7 @@ import {
55
55
  shiftRateLane,
56
56
  sourceTimeAt,
57
57
  timeAtSourceTime
58
- } from "./chunk-CEND6BLF.js";
58
+ } from "./chunk-S3RCK56N.js";
59
59
  import {
60
60
  clampAudioGain,
61
61
  isAudibleVideoElement
@@ -559,6 +559,7 @@ function applyConcreteGpuScreenshotClamp(currentForceScreenshot, resolvedGpuMode
559
559
  // ../engine/src/utils/sdrCaptureColor.ts
560
560
  var SDR_RGB_TO_BT709_FILTER = "scale=out_color_matrix=bt709:out_range=tv:flags=neighbor";
561
561
  var SDR_CAPTURE_TO_BT709_FILTER = `scale=in_color_matrix=bt601:in_range=pc:flags=neighbor,format=gbrp,${SDR_RGB_TO_BT709_FILTER}`;
562
+ var SDR_RGB_TO_TAGGED_BT709_FILTER = `${SDR_RGB_TO_BT709_FILTER},setparams=color_primaries=bt709:color_trc=bt709:colorspace=bt709:range=tv`;
562
563
 
563
564
  // ../parsers/dist/htmlAttributeSpans.js
564
565
  function readAttributeValue(html, at) {
@@ -8979,6 +8980,7 @@ function buildEncoderArgs(options, inputArgs, outputPath, gpuEncoder = null) {
8979
8980
  }
8980
8981
  } else if (codec === "prores") {
8981
8982
  args.push("-c:v", "prores_ks", "-profile:v", preset, "-vendor", "apl0");
8983
+ args.push("-vf", SDR_RGB_TO_TAGGED_BT709_FILTER);
8982
8984
  args.push("-pix_fmt", pixelFormat);
8983
8985
  appendRenderProvenanceArgs(args, outputPath);
8984
8986
  return [...args, "-y", outputPath];
@@ -9640,6 +9642,7 @@ function buildStreamingArgs(options, outputPath, gpuEncoder = null) {
9640
9642
  }
9641
9643
  } else if (codec === "prores") {
9642
9644
  args.push("-c:v", "prores_ks", "-profile:v", preset, "-vendor", "apl0");
9645
+ args.push("-vf", SDR_RGB_TO_TAGGED_BT709_FILTER);
9643
9646
  args.push("-pix_fmt", pixelFormat);
9644
9647
  appendRenderProvenanceArgs(args, outputPath);
9645
9648
  return [...args, "-y", outputPath];
@@ -16848,6 +16851,7 @@ export {
16848
16851
  shouldClampToScreenshotForConcreteGpu,
16849
16852
  applyConcreteGpuScreenshotClamp,
16850
16853
  SDR_RGB_TO_BT709_FILTER,
16854
+ SDR_RGB_TO_TAGGED_BT709_FILTER,
16851
16855
  BrowserLeasePool,
16852
16856
  setHostHandlesSigint,
16853
16857
  resolveHeadlessShellPath,
@@ -199,7 +199,7 @@ function studioMotionRenderRuntime(manifestContent, activeCompositionPath) {
199
199
  applyManifest();
200
200
  }
201
201
 
202
- // ../studio-server/dist/chunk-M62HDRLX.js
202
+ // ../studio-server/dist/chunk-K56J3CL7.js
203
203
  import { basename, dirname, isAbsolute, join, relative, sep } from "path";
204
204
  import { readdirSync } from "fs";
205
205
  function resolveWithinProject2(base, relativePath) {
@@ -227,7 +227,12 @@ function isPrivateProjectFile(projectDir, filePath) {
227
227
  );
228
228
  }
229
229
  function pinWithinProject(base, relativePath) {
230
- const checked = resolveWithinProject2(base, relativePath);
230
+ return pinResolved(base, resolveWithinProject2(base, relativePath));
231
+ }
232
+ function pinProjectRecord(base, relativePath) {
233
+ return pinResolved(base, resolveWithinProject(base, relativePath));
234
+ }
235
+ function pinResolved(base, checked) {
231
236
  if (!checked) return null;
232
237
  const inside = relative(realFilePath(base), realFilePath(checked));
233
238
  const escapes = inside === ".." || inside.startsWith(`..${sep}`) || isAbsolute(inside);
@@ -278,6 +283,7 @@ export {
278
283
  isPrivateProjectPath,
279
284
  isPrivateProjectFile,
280
285
  pinWithinProject,
286
+ pinProjectRecord,
281
287
  isInHiddenOrVendorDir,
282
288
  walkDir
283
289
  };