@nodaro/shared 3.63.0 → 3.65.0

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 (265) hide show
  1. package/dist/{chunk-3K24DWOH.js → chunk-222QM7CO.js} +3 -3
  2. package/dist/{chunk-3K24DWOH.js.map → chunk-222QM7CO.js.map} +1 -1
  3. package/dist/chunk-27HA6YOL.cjs +377 -0
  4. package/dist/chunk-27HA6YOL.cjs.map +1 -0
  5. package/dist/{chunk-4DVWXEB6.js → chunk-2NKF476Z.js} +3 -3
  6. package/dist/{chunk-4DVWXEB6.js.map → chunk-2NKF476Z.js.map} +1 -1
  7. package/dist/chunk-3AU52TSW.js +143 -0
  8. package/dist/chunk-3AU52TSW.js.map +1 -0
  9. package/dist/{chunk-F6WGGYQW.cjs → chunk-5NVGKXJV.cjs} +68 -29
  10. package/dist/chunk-5NVGKXJV.cjs.map +1 -0
  11. package/dist/{chunk-HWQ2SYNA.js → chunk-5SSMPYE5.js} +99 -9
  12. package/dist/chunk-5SSMPYE5.js.map +1 -0
  13. package/dist/{chunk-WRSWH7US.cjs → chunk-6BRWPJPP.cjs} +17 -2
  14. package/dist/chunk-6BRWPJPP.cjs.map +1 -0
  15. package/dist/{chunk-KHH54GRP.cjs → chunk-6ET3KDO4.cjs} +15 -338
  16. package/dist/chunk-6ET3KDO4.cjs.map +1 -0
  17. package/dist/{chunk-TM5JYSJF.cjs → chunk-6OSIOVF7.cjs} +98 -37
  18. package/dist/chunk-6OSIOVF7.cjs.map +1 -0
  19. package/dist/{chunk-YUER7TJG.js → chunk-6X5PBAC4.js} +13 -4
  20. package/dist/chunk-6X5PBAC4.js.map +1 -0
  21. package/dist/chunk-7BN4EDIC.cjs +185 -0
  22. package/dist/chunk-7BN4EDIC.cjs.map +1 -0
  23. package/dist/{chunk-6M563QE6.js → chunk-7OWXHW7Z.js} +78 -28
  24. package/dist/chunk-7OWXHW7Z.js.map +1 -0
  25. package/dist/{chunk-FXGNRYQQ.js → chunk-AT53ZQUC.js} +3 -3
  26. package/dist/{chunk-FXGNRYQQ.js.map → chunk-AT53ZQUC.js.map} +1 -1
  27. package/dist/{chunk-HSHCCBIV.js → chunk-BQYCZLMF.js} +16 -3
  28. package/dist/chunk-BQYCZLMF.js.map +1 -0
  29. package/dist/{chunk-34QLPTSA.js → chunk-BSTAAGLY.js} +3 -3
  30. package/dist/{chunk-34QLPTSA.js.map → chunk-BSTAAGLY.js.map} +1 -1
  31. package/dist/{chunk-PSKZKLDG.js → chunk-CW6MMQNO.js} +562 -26
  32. package/dist/chunk-CW6MMQNO.js.map +1 -0
  33. package/dist/{chunk-EPXGG27L.js → chunk-D5Y3EYRM.js} +5 -5
  34. package/dist/{chunk-EPXGG27L.js.map → chunk-D5Y3EYRM.js.map} +1 -1
  35. package/dist/{chunk-XGVJGNZW.cjs → chunk-DQ2PARNH.cjs} +15 -5
  36. package/dist/chunk-DQ2PARNH.cjs.map +1 -0
  37. package/dist/{chunk-6BZC2ZHC.cjs → chunk-E66HSC2E.cjs} +9 -9
  38. package/dist/{chunk-6BZC2ZHC.cjs.map → chunk-E66HSC2E.cjs.map} +1 -1
  39. package/dist/{chunk-NIAFR5EE.js → chunk-FGBGKBML.js} +32 -3
  40. package/dist/chunk-FGBGKBML.js.map +1 -0
  41. package/dist/{chunk-M5OCFGHF.cjs → chunk-FI3HJZWM.cjs} +588 -25
  42. package/dist/chunk-FI3HJZWM.cjs.map +1 -0
  43. package/dist/{chunk-L2TVY6XN.cjs → chunk-FJZTQTF4.cjs} +4 -4
  44. package/dist/{chunk-L2TVY6XN.cjs.map → chunk-FJZTQTF4.cjs.map} +1 -1
  45. package/dist/{chunk-XGGZWA4A.cjs → chunk-GJ3D5X4X.cjs} +52 -49
  46. package/dist/chunk-GJ3D5X4X.cjs.map +1 -0
  47. package/dist/{chunk-Q6IES3U2.js → chunk-H5KHWTAE.js} +5 -2
  48. package/dist/chunk-H5KHWTAE.js.map +1 -0
  49. package/dist/{chunk-MD4XHED4.js → chunk-H745DQ6V.js} +3 -3
  50. package/dist/{chunk-MD4XHED4.js.map → chunk-H745DQ6V.js.map} +1 -1
  51. package/dist/{chunk-KCZHQH2O.js → chunk-HAH2F7LT.js} +4 -4
  52. package/dist/{chunk-KCZHQH2O.js.map → chunk-HAH2F7LT.js.map} +1 -1
  53. package/dist/{chunk-V5EEQR2U.cjs → chunk-JQMFJAYU.cjs} +21 -21
  54. package/dist/{chunk-V5EEQR2U.cjs.map → chunk-JQMFJAYU.cjs.map} +1 -1
  55. package/dist/{chunk-WZVIBAKN.cjs → chunk-JYU5EIRM.cjs} +12 -12
  56. package/dist/{chunk-WZVIBAKN.cjs.map → chunk-JYU5EIRM.cjs.map} +1 -1
  57. package/dist/{chunk-Y35JQPT6.cjs → chunk-K6RIN3LW.cjs} +142 -45
  58. package/dist/chunk-K6RIN3LW.cjs.map +1 -0
  59. package/dist/{chunk-BLJUCPMV.cjs → chunk-KSHAAPQF.cjs} +5 -2
  60. package/dist/chunk-KSHAAPQF.cjs.map +1 -0
  61. package/dist/{chunk-2PU3AGGS.cjs → chunk-KTCEKGBJ.cjs} +7 -7
  62. package/dist/{chunk-2PU3AGGS.cjs.map → chunk-KTCEKGBJ.cjs.map} +1 -1
  63. package/dist/{chunk-LH72PQO2.cjs → chunk-KWYS4IIM.cjs} +165 -50
  64. package/dist/chunk-KWYS4IIM.cjs.map +1 -0
  65. package/dist/{chunk-GSKLPI3J.cjs → chunk-MIT2USTS.cjs} +118 -61
  66. package/dist/chunk-MIT2USTS.cjs.map +1 -0
  67. package/dist/{chunk-Y4GCJJPF.cjs → chunk-NYZQOIXJ.cjs} +35 -2
  68. package/dist/chunk-NYZQOIXJ.cjs.map +1 -0
  69. package/dist/{chunk-A2PX5IRC.cjs → chunk-PERUFUVH.cjs} +13 -13
  70. package/dist/{chunk-A2PX5IRC.cjs.map → chunk-PERUFUVH.cjs.map} +1 -1
  71. package/dist/{chunk-X5BAFW3Q.cjs → chunk-PGDR7CO3.cjs} +8 -8
  72. package/dist/{chunk-X5BAFW3Q.cjs.map → chunk-PGDR7CO3.cjs.map} +1 -1
  73. package/dist/{chunk-OV3JTKBY.js → chunk-PL7AQQV7.js} +123 -22
  74. package/dist/chunk-PL7AQQV7.js.map +1 -0
  75. package/dist/chunk-Q4YOLT4M.js +164 -0
  76. package/dist/chunk-Q4YOLT4M.js.map +1 -0
  77. package/dist/{chunk-GMBDLNLD.cjs → chunk-R5ILCNCC.cjs} +197 -60
  78. package/dist/chunk-R5ILCNCC.cjs.map +1 -0
  79. package/dist/chunk-RP4KQUNU.cjs +168 -0
  80. package/dist/chunk-RP4KQUNU.cjs.map +1 -0
  81. package/dist/{chunk-77WU3V3J.cjs → chunk-SPU7MUWE.cjs} +6 -6
  82. package/dist/{chunk-77WU3V3J.cjs.map → chunk-SPU7MUWE.cjs.map} +1 -1
  83. package/dist/{chunk-XBTYGQ6Z.js → chunk-ST7OBB5J.js} +8 -5
  84. package/dist/chunk-ST7OBB5J.js.map +1 -0
  85. package/dist/{chunk-2QKF7M2Z.js → chunk-TAPBDT47.js} +3 -3
  86. package/dist/{chunk-2QKF7M2Z.js.map → chunk-TAPBDT47.js.map} +1 -1
  87. package/dist/{chunk-BMJVKYVB.js → chunk-V5NLQ4L5.js} +123 -7
  88. package/dist/chunk-V5NLQ4L5.js.map +1 -0
  89. package/dist/{chunk-KMGCHV6O.js → chunk-V6OXSXIX.js} +63 -30
  90. package/dist/chunk-V6OXSXIX.js.map +1 -0
  91. package/dist/{chunk-LMAQUR55.cjs → chunk-WQMPIURW.cjs} +6 -6
  92. package/dist/{chunk-LMAQUR55.cjs.map → chunk-WQMPIURW.cjs.map} +1 -1
  93. package/dist/{chunk-ZPE2ZTJ4.cjs → chunk-WZG6GZIL.cjs} +4 -4
  94. package/dist/{chunk-ZPE2ZTJ4.cjs.map → chunk-WZG6GZIL.cjs.map} +1 -1
  95. package/dist/{chunk-AE3AAJ4O.js → chunk-XJANKTIL.js} +3 -3
  96. package/dist/{chunk-AE3AAJ4O.js.map → chunk-XJANKTIL.js.map} +1 -1
  97. package/dist/{chunk-O7RZRUMZ.js → chunk-XJWED257.js} +14 -309
  98. package/dist/chunk-XJWED257.js.map +1 -0
  99. package/dist/chunk-XSSLNINL.js +346 -0
  100. package/dist/chunk-XSSLNINL.js.map +1 -0
  101. package/dist/{chunk-6TGB7ECA.cjs → chunk-YD4XY74W.cjs} +12 -8
  102. package/dist/chunk-YD4XY74W.cjs.map +1 -0
  103. package/dist/{chunk-YX6TFX7H.js → chunk-YMZUE2IX.js} +66 -11
  104. package/dist/chunk-YMZUE2IX.js.map +1 -0
  105. package/dist/{chunk-4MMZD63H.js → chunk-Z77M7Q2R.js} +3 -3
  106. package/dist/{chunk-4MMZD63H.js.map → chunk-Z77M7Q2R.js.map} +1 -1
  107. package/dist/{chunk-CZ5IQB3L.js → chunk-ZSRXY5YT.js} +8 -5
  108. package/dist/chunk-ZSRXY5YT.js.map +1 -0
  109. package/dist/entries/apps.cjs +43 -42
  110. package/dist/entries/apps.js +8 -7
  111. package/dist/entries/captions.cjs +38 -30
  112. package/dist/entries/captions.d.cts +48 -2
  113. package/dist/entries/captions.d.ts +48 -2
  114. package/dist/entries/captions.js +1 -1
  115. package/dist/entries/credits.cjs +319 -191
  116. package/dist/entries/credits.d.cts +260 -19
  117. package/dist/entries/credits.d.ts +260 -19
  118. package/dist/entries/credits.js +11 -11
  119. package/dist/entries/entities.cjs +202 -193
  120. package/dist/entries/entities.d.cts +44 -9
  121. package/dist/entries/entities.d.ts +44 -9
  122. package/dist/entries/entities.js +2 -1
  123. package/dist/entries/llm-models.cjs +86 -62
  124. package/dist/entries/llm-models.d.cts +73 -20
  125. package/dist/entries/llm-models.d.ts +73 -20
  126. package/dist/entries/llm-models.js +2 -2
  127. package/dist/entries/media.cjs +79 -63
  128. package/dist/entries/media.d.cts +154 -1
  129. package/dist/entries/media.d.ts +154 -1
  130. package/dist/entries/media.js +1 -1
  131. package/dist/entries/model-catalog.cjs +205 -109
  132. package/dist/entries/model-catalog.d.cts +65 -58
  133. package/dist/entries/model-catalog.d.ts +65 -58
  134. package/dist/entries/model-catalog.js +4 -4
  135. package/dist/entries/models.cjs +527 -346
  136. package/dist/entries/models.d.cts +86 -7
  137. package/dist/entries/models.d.ts +86 -7
  138. package/dist/entries/models.js +6 -5
  139. package/dist/entries/nodes.cjs +220 -211
  140. package/dist/entries/nodes.d.cts +46 -3
  141. package/dist/entries/nodes.d.ts +46 -3
  142. package/dist/entries/nodes.js +10 -9
  143. package/dist/entries/pipeline.cjs +156 -152
  144. package/dist/entries/pipeline.d.cts +14 -4
  145. package/dist/entries/pipeline.d.ts +14 -4
  146. package/dist/entries/pipeline.js +3 -3
  147. package/dist/entries/social.cjs +177 -177
  148. package/dist/entries/social.js +2 -2
  149. package/dist/entries/ugc.cjs +71 -71
  150. package/dist/entries/ugc.js +4 -4
  151. package/dist/entries/video.cjs +174 -145
  152. package/dist/entries/video.d.cts +114 -2
  153. package/dist/entries/video.d.ts +114 -2
  154. package/dist/entries/video.js +7 -6
  155. package/dist/entries/workflow.cjs +150 -150
  156. package/dist/entries/workflow.d.cts +1 -1
  157. package/dist/entries/workflow.d.ts +1 -1
  158. package/dist/entries/workflow.js +2 -2
  159. package/dist/index.cjs +2430 -1929
  160. package/dist/index.d.cts +13 -12
  161. package/dist/index.d.ts +13 -12
  162. package/dist/index.js +28 -27
  163. package/dist/{model-catalog-C_Eo35tL.d.cts → model-catalog-BoUKGFNl.d.cts} +182 -3
  164. package/dist/{model-catalog-C_Eo35tL.d.ts → model-catalog-BoUKGFNl.d.ts} +182 -3
  165. package/dist/{model-constants-DWcxOmaY.d.cts → model-constants-BElS3AeE.d.ts} +142 -23
  166. package/dist/{model-constants-Bg4ccSQb.d.ts → model-constants-CpQz1bGa.d.cts} +142 -23
  167. package/dist/tts-capabilities-BtnDWK9K.d.ts +133 -0
  168. package/dist/tts-capabilities-C52UccTI.d.cts +133 -0
  169. package/package.json +1 -1
  170. package/src/__tests__/add-captions-nemotron-pricing.test.ts +111 -0
  171. package/src/__tests__/dialogue-capabilities.test.ts +167 -6
  172. package/src/__tests__/extend-providers.test.ts +353 -26
  173. package/src/__tests__/fixtures/mask-composite-quote-parity.json +1 -1
  174. package/src/__tests__/fixtures/measured-input-quote-parity.json +1435 -0
  175. package/src/__tests__/fixtures/planned-length-quote-parity.json +1866 -0
  176. package/src/__tests__/fixtures/video-utility-quote-parity.json +2343 -0
  177. package/src/__tests__/flux-3-klein.test.ts +203 -0
  178. package/src/__tests__/gpt-image-2-6-formats.test.ts +3 -1
  179. package/src/__tests__/kling4-catalog.test.ts +1 -1
  180. package/src/__tests__/llm-models.test.ts +48 -13
  181. package/src/__tests__/llm-price-key.test.ts +12 -0
  182. package/src/__tests__/model-makers.test.ts +3 -0
  183. package/src/__tests__/node-runtime-keys.test.ts +7 -0
  184. package/src/__tests__/normalize-node-params.test.ts +147 -1
  185. package/src/__tests__/retired-lip-sync-providers.test.ts +43 -0
  186. package/src/__tests__/seedance-extend-source-credit-id.test.ts +89 -0
  187. package/src/__tests__/sequence-execution.test.ts +22 -1
  188. package/src/__tests__/speech-pricing.test.ts +62 -1
  189. package/src/__tests__/suno-credit-type.test.ts +21 -2
  190. package/src/__tests__/transcribe-capabilities.test.ts +4 -2
  191. package/src/__tests__/tts-capabilities.test.ts +160 -4
  192. package/src/__tests__/video-analysis-catalog-sync.test.ts +4 -2
  193. package/src/__tests__/video-analysis-pricing.test.ts +22 -9
  194. package/src/__tests__/video-subjects.test.ts +192 -0
  195. package/src/__tests__/wired-character-names.test.ts +142 -0
  196. package/src/caption-styles.ts +62 -0
  197. package/src/credit-estimators/add-captions-nemotron.ts +73 -0
  198. package/src/credit-estimators/index.ts +14 -0
  199. package/src/credit-estimators/speech.ts +57 -9
  200. package/src/credit-identifiers.ts +284 -13
  201. package/src/dialogue-capabilities.ts +220 -3
  202. package/src/dubbing-structure.ts +186 -0
  203. package/src/entries/captions.ts +2 -0
  204. package/src/entries/credits.ts +25 -1
  205. package/src/entries/entities.ts +2 -0
  206. package/src/entries/llm-models.ts +7 -0
  207. package/src/entries/media.ts +3 -1
  208. package/src/entries/model-catalog.ts +30 -0
  209. package/src/entries/models.ts +54 -0
  210. package/src/entries/nodes.ts +2 -0
  211. package/src/entries/pipeline.ts +1 -1
  212. package/src/entries/video.ts +8 -1
  213. package/src/flux-3-klein.ts +69 -0
  214. package/src/gemini-tts.ts +144 -0
  215. package/src/input-image-pricing.ts +23 -6
  216. package/src/llm-models.ts +130 -36
  217. package/src/model-catalog.ts +539 -25
  218. package/src/model-constants.ts +247 -25
  219. package/src/node-default-mappings.ts +3 -0
  220. package/src/node-runtime-keys.ts +3 -0
  221. package/src/normalize-node-params.ts +123 -2
  222. package/src/seedance-extend-rate.ts +116 -0
  223. package/src/sequence-execution.ts +24 -0
  224. package/src/transcribe-preflight.ts +23 -0
  225. package/src/tts-capabilities.ts +193 -1
  226. package/src/video-analysis-pricing.ts +39 -15
  227. package/src/video-character-refs.ts +160 -3
  228. package/src/wired-character-names.ts +134 -18
  229. package/src/wired-character-video-subjects.ts +63 -0
  230. package/dist/chunk-63H4C56Q.cjs +0 -38
  231. package/dist/chunk-63H4C56Q.cjs.map +0 -1
  232. package/dist/chunk-6M563QE6.js.map +0 -1
  233. package/dist/chunk-6TGB7ECA.cjs.map +0 -1
  234. package/dist/chunk-6XUG4L7X.cjs +0 -54
  235. package/dist/chunk-6XUG4L7X.cjs.map +0 -1
  236. package/dist/chunk-BLJUCPMV.cjs.map +0 -1
  237. package/dist/chunk-BMJVKYVB.js.map +0 -1
  238. package/dist/chunk-CZ5IQB3L.js.map +0 -1
  239. package/dist/chunk-F6WGGYQW.cjs.map +0 -1
  240. package/dist/chunk-GMBDLNLD.cjs.map +0 -1
  241. package/dist/chunk-GSKLPI3J.cjs.map +0 -1
  242. package/dist/chunk-HBXF6RUU.js +0 -31
  243. package/dist/chunk-HBXF6RUU.js.map +0 -1
  244. package/dist/chunk-HSHCCBIV.js.map +0 -1
  245. package/dist/chunk-HWQ2SYNA.js.map +0 -1
  246. package/dist/chunk-IY3Y462W.js +0 -42
  247. package/dist/chunk-IY3Y462W.js.map +0 -1
  248. package/dist/chunk-KHH54GRP.cjs.map +0 -1
  249. package/dist/chunk-KMGCHV6O.js.map +0 -1
  250. package/dist/chunk-LH72PQO2.cjs.map +0 -1
  251. package/dist/chunk-M5OCFGHF.cjs.map +0 -1
  252. package/dist/chunk-NIAFR5EE.js.map +0 -1
  253. package/dist/chunk-O7RZRUMZ.js.map +0 -1
  254. package/dist/chunk-OV3JTKBY.js.map +0 -1
  255. package/dist/chunk-PSKZKLDG.js.map +0 -1
  256. package/dist/chunk-Q6IES3U2.js.map +0 -1
  257. package/dist/chunk-TM5JYSJF.cjs.map +0 -1
  258. package/dist/chunk-WRSWH7US.cjs.map +0 -1
  259. package/dist/chunk-XBTYGQ6Z.js.map +0 -1
  260. package/dist/chunk-XGGZWA4A.cjs.map +0 -1
  261. package/dist/chunk-XGVJGNZW.cjs.map +0 -1
  262. package/dist/chunk-Y35JQPT6.cjs.map +0 -1
  263. package/dist/chunk-Y4GCJJPF.cjs.map +0 -1
  264. package/dist/chunk-YUER7TJG.js.map +0 -1
  265. package/dist/chunk-YX6TFX7H.js.map +0 -1
@@ -1,7 +1,7 @@
1
- import { UGC_PRIMARY_HANDLE } from './chunk-MD4XHED4.js';
1
+ import { UGC_PRIMARY_HANDLE } from './chunk-H745DQ6V.js';
2
2
  import { composeUnitSet, unitProducers, composeUnitRecord, unitFanOutEach, unitListPips } from './chunk-KL6GAYTT.js';
3
- import { isSeedance2Provider, isMinimaxH3Provider, isWan3Provider, isKling4RunnerProvider, isViduQ4Provider, isGeminiOmniPerSecondProvider, isPixverseV6MaxProvider, PRICING_DEFAULT_RESOLUTION, isGeminiOmniProvider } from './chunk-OV3JTKBY.js';
4
- import { MODEL_CATALOG } from './chunk-PSKZKLDG.js';
3
+ import { isSeedance2Provider, isMinimaxH3Provider, isWan3Provider, isKling4RunnerProvider, isViduQ4Provider, isGeminiOmniPerSecondProvider, isPixverseV6MaxProvider, PRICING_DEFAULT_RESOLUTION, isGeminiOmniProvider } from './chunk-PL7AQQV7.js';
4
+ import { MODEL_CATALOG } from './chunk-CW6MMQNO.js';
5
5
 
6
6
  // src/producer-types.ts
7
7
  var VIDEO_PRODUCER_TYPES = composeUnitSet("VIDEO_PRODUCER_TYPES", [
@@ -327,5 +327,5 @@ function uiDurationFill(provider) {
327
327
  }
328
328
 
329
329
  export { AUDIO_PRODUCER_TYPES, DYNAMIC_PRODUCER_TYPES, FAN_IN_TARGETS, FAN_OUT_ALL_OR_NOTHING_TYPES, FAN_OUT_EACH_HANDLES, FAN_OUT_EACH_TYPES, IMAGE_PRODUCER_TYPES, LIST_OUTPUT_HANDLES, OWN_LIST_NODE_TYPES, VIDEO_PRODUCER_TYPES, defaultEdgeOutputMode, isFanInEdge, isFanInNodeType, isListOutputHandle, listResultsServeHandle, ownsItsList, uiAspectRatioFill, uiDurationFill, uiResolutionFill };
330
- //# sourceMappingURL=chunk-EPXGG27L.js.map
331
- //# sourceMappingURL=chunk-EPXGG27L.js.map
330
+ //# sourceMappingURL=chunk-D5Y3EYRM.js.map
331
+ //# sourceMappingURL=chunk-D5Y3EYRM.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/producer-types.ts","../src/video-ui-defaults.ts"],"names":[],"mappings":";;;;;;AA2BO,IAAM,oBAAA,GAA4C,eAAe,sBAAA,EAAwB;AAAA,EAC9F,gBAAA;AAAA,EACA,gBAAA;AAAA,EACA,SAAA;AAAA;AAAA,EACA,eAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAMA,gBAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAKA,oBAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAKA,gBAAA;AAAA,EACA,cAAA;AAAA,EACA,eAAA;AAAA,EACA,gBAAA;AAAA,EACA,UAAA;AAAA,EACA,iBAAA;AAAA,EACA,iBAAA;AAAA,EAC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consumed by:\n * - backend/src/services/workflow-engine/execution-graph.ts (orchestrator\n * dispatch + asset-type tagging in payload-builder, output-extractor,\n * inline-executor — re-exported there as VIDEO_SOURCE_TYPES /\n * AUDIO_SOURCE_TYPES for backwards compatibility).\n * - frontend/src/lib/generate-video-handles.ts (handle connection\n * validation on the Generate Video node).\n *\n * Lifting these here ensures the frontend handle validator can never reject\n * a connection from a node type that the backend would happily route at\n * execution time (the prior drift bug, see issue 1 of the Task 4.1 review).\n */\nimport { UGC_PRIMARY_HANDLE } from \"./ugc-node-wires.js\"\nimport { composeUnitRecord, composeUnitSet, unitFanOutEach, unitListPips, unitProducers } from \"./unit-contract-compose.js\"\n\n// Each producer set below is its hand-written members ∪ the node units\n// (tools/units/README.md) of that producer kind, from their generated contract\n// rows, in that order — a type in both throws at load (composeUnitSet).\n\n/**\n * Source node types whose primary output is a video URL.\n * Mirrors the backend execution-graph VIDEO_SOURCE_TYPES verbatim.\n */\nexport const VIDEO_PRODUCER_TYPES: ReadonlySet<string> = composeUnitSet(\"VIDEO_PRODUCER_TYPES\", [\n \"image-to-video\",\n \"video-to-video\",\n \"switchx\", // Beeble SwitchX relight/composite\n \"text-to-video\",\n // Unified video node — emits videoUrl identically to i2v/t2v (its payload-builder\n // case dispatches dynamically to \"image-to-video\" or \"text-to-video\" jobName based\n // on whether a start frame is wired). Without this, getPrimaryOutput would fall\n // through to the imageUrl/videoUrl/audioUrl/text default and downstream consumers\n // could silently misroute the output.\n \"generate-video\",\n // Generate Video Pro — Seedance-2-family multi-segment stitch variant of\n // generate-video (same \"emits videoUrl\" contract; a trimmed provider +\n // handle set). Must mirror generate-video here or its output can't connect\n // downstream (the recurring \"cannot connect the outputs\" bug class).\n \"generate-video-pro\",\n // Edit Video Pro — Seedance-2-family span-replace sibling of generate-\n // video-pro (same \"emits videoUrl\" contract; source video + prompt in,\n // ONE video out). Must mirror generate-video-pro here or its output can't\n // connect downstream (the recurring \"cannot connect the outputs\" bug class).\n \"edit-video-pro\",\n \"upload-video\",\n \"youtube-video\",\n \"combine-videos\",\n \"lip-sync\",\n \"speech-to-video\",\n \"motion-transfer\",\n \"video-upscale\",\n \"video-depth\",\n \"extend-video\",\n // face-swap output is video (writes generatedVideoUrl, per-result `url`).\n // Frontend execution-graph already includes it in VIDEO_SOURCE_TYPES; this\n // entry brings the shared set in line so canvas typed-handle validation\n // doesn't reject face-swap → video-consumer edges that the orchestrator\n // would happily route at runtime.\n \"face-swap\",\n // Speaker View (C3.2): an EDL rendered with its speakers framed — one VIDEO\n // out (no audio-only render). Registered in RENDER_NODE_TYPES as well.\n \"speaker-view\",\n \"video-retake\",\n // video-sfx: adds an SFX track to a video → emits a video URL. Belongs here so\n // canvas handle validation accepts video-sfx → video-consumer edges and the\n // backend routes its output as video (it was previously relying on a fallback).\n \"video-sfx\",\n \"suno-music-video\",\n \"merge-video-audio\",\n \"add-captions\",\n \"resize-video\",\n \"social-media-format\",\n \"trim-video\",\n \"render-video\",\n \"speed-ramp\",\n \"loop-video\",\n \"fade-video\",\n // Video Mask emits its mask as a video; Mask Composite its composite.\n \"video-mask\",\n \"mask-composite\",\n \"transcode-video\",\n \"manual-edit\",\n // AI Avatar (HeyGen): avatar + voice/audio → video.\n \"ai-avatar\",\n // Cinematic Avatar (HeyGen cinematic_avatar): prompt + 1–3 avatar looks → video.\n \"cinematic-avatar\",\n // Assemble Narrated Video: fits N (clip, voice) blocks into one MP4 → video.\n \"assemble-narrated-video\",\n // Still to Video: one still image + one audio track → MP4 (local FFmpeg,\n // no provider). Emits generatedVideoUrl like every other ffmpeg video node.\n \"still-to-video\",\n // Slideshow: 2-100 stills + one optional audio track → MP4 (local FFmpeg,\n // no provider). Same contract; images arrive via the image-collage lane.\n \"slideshow\",\n // 3D Render Pro: authors a scene AND exports it in one operation, settling\n // with the standard `videoUrl` field. It is a video producer as much as it\n // is a composition producer — omitting it here is the \"cannot connect the\n // outputs\" bug, and its `composition` handle is typed separately.\n \"pro-3d-render\",\n // Video Overlay: timed image layers over a video in one local FFmpeg pass\n // (the base audio copied) — emits a video URL on `video-out`.\n \"video-overlay\",\n // UGC Clip: renders one clip of a UGC video from its ticket — emits a video\n // URL on `video-out` (one per fan-out iteration).\n \"ugc-clip\",\n // UGC Finish: the video's clips, finished, as one ordered list — a registered producer, so a\n // Bundle edge into Combine Videos routes each one as a video, in order.\n \"ugc-finish-clips\",\n], unitProducers(\"video\"))\n\n/**\n * Source node types whose output media-type cannot be classified\n * statically — iterators, dynamic dispatchers, sub-workflow wrappers.\n * The orchestrator decides their actual output type at execution time\n * based on what's wired upstream (loop iterates upstream column type;\n * sub-workflow emits its leaf node's type; adjust-volume passes through\n * video or audio based on its `lastInputType` runtime field;\n * voice-changer emits audio in audio mode, video+audio in video mode).\n *\n * Typed-handle validators (frontend/src/lib/{generate-image,generate-\n * video,ffmpeg}-handles.ts) must include these as acceptors on EVERY\n * media-typed input handle — otherwise the canvas validator hard-\n * rejects edges that the orchestrator would happily route at runtime.\n *\n * Lifted here from `frontend/src/lib/ffmpeg-handles.ts` (where the\n * escape hatch was first added) so the same set drives ALL handle\n * validators uniformly. Adding a new dynamic-output node type means\n * one edit here instead of N across sibling validator files.\n *\n * Intentionally OMITTED:\n * - `webhook-trigger` / `schedule-trigger` — their outputs are\n * user-defined JSON shapes, not media URLs. Accepting them as\n * media producers creates false-positive drops at the canvas\n * that fail at execution. Users wanting trigger → media flows\n * should wire through an upload node.\n */\nexport const DYNAMIC_PRODUCER_TYPES: ReadonlySet<string> = composeUnitSet(\"DYNAMIC_PRODUCER_TYPES\", [\n \"list\",\n \"sub-workflow\",\n \"adjust-volume\",\n // Pitch & Tempo: audio in → audio out, video in → video out (picture\n // copied). Dual-mode like adjust-volume; stays in AUDIO_PRODUCER_TYPES as\n // its default.\n \"pitch-tempo\",\n // Dual-mode: audio in → audio out; video in → video out (+ revoiced audio).\n // Listed here so canvas validators accept its output on BOTH audio and video\n // input handles (it also stays in AUDIO_PRODUCER_TYPES as its default).\n \"voice-changer\",\n // voice-changer-pro (renamed from voice-recast in #3581) is a behavioral\n // twin of voice-changer — identical dual-mode output. Must mirror it in\n // EVERY producer set or its outputs can't connect (was the \"cannot connect\n // the outputs of voice-changer-pro\" bug). Guarded by producer-types.test.ts.\n \"voice-changer-pro\",\n // Dubbing joined the dual-mode family with the full-surface upgrade:\n // audio in → dubbed audio; video in (or a video sourceUrl) → dubbed VIDEO\n // (+ audio sidecar). Same wiring contract as voice-changer; stays in\n // AUDIO_PRODUCER_TYPES as its default. Explicitly asserted in\n // producer-types.test.ts (the suite does not fail on omission).\n \"dubbing\",\n \"reduce\",\n // Dual-output time chunker (UI label \"Split into Chunks\"; type id stays\n // \"split-media\"): video in → video chunks, audio in → audio chunks — two\n // independent lanes on two output handles. Like voice-changer, the canvas\n // validator only sees the source NODE type, not which handle a wire leaves,\n // so it lives here to be accepted on BOTH audio and video input handles. The\n // backend routes the correct lane by sourceHandle in getPrimaryOutput\n // (output-extractor.ts); the frontend does so in extractNodeOutput.\n \"split-media\",\n // apply-edl renders an EDL into ONE media output whose type is decided at\n // run time by the node's `output` setting (video OR audio) — so its static\n // medium is genuinely unknown and it belongs here, letting canvas validators\n // accept its default media handle on BOTH audio and video input handles. It\n // ALSO emits a fixed `json` handle (the remapped Transcript); that half lives\n // in JSON_PRODUCER_TYPES (frontend/src/lib/data-handles.ts). The FIRST node\n // with both a dynamic media handle and a fixed json handle. Because\n // getOutputType (presentation-utils.ts) deliberately returns \"data\" for\n // DYNAMIC members, apply-edl is ALSO added to the literal VIDEO_OUTPUT_TYPES\n // there so a published app renders the cut as video, mirroring the\n // voice-changer/dubbing precedent. Asserted in producer-types.test.ts (the\n // suite does not fail on omission).\n \"apply-edl\",\n], unitProducers(\"dynamic\"))\n\n/**\n * Source node types whose primary output is an audio URL.\n * Mirrors the backend execution-graph AUDIO_SOURCE_TYPES verbatim.\n */\nexport const AUDIO_PRODUCER_TYPES: ReadonlySet<string> = composeUnitSet(\"AUDIO_PRODUCER_TYPES\", [\n \"text-to-speech\",\n \"text-to-audio\",\n \"generate-music\",\n \"upload-audio\",\n \"suno-generate\",\n \"suno-cover\",\n \"suno-extend\",\n \"suno-separate\",\n \"audio-separation\",\n \"suno-mashup\",\n \"suno-replace-section\",\n \"suno-add-instrumental\",\n \"suno-add-vocals\",\n \"suno-convert-wav\",\n \"suno-upload-extend\",\n \"trim-audio\",\n \"mix-audio\",\n \"combine-audio\",\n \"adjust-volume\",\n \"audio-fx\",\n \"pitch-tempo\",\n \"reference-audio\",\n \"audio-isolation\",\n \"text-to-dialogue\",\n \"voice-changer\",\n // Twin of voice-changer (see DYNAMIC_PRODUCER_TYPES note). Audio is its\n // default output mode; video mode is handled via DYNAMIC membership.\n \"voice-changer-pro\",\n \"dubbing\",\n \"voice-remix\",\n \"voice-design\",\n // Extract Audio: demuxes a video's audio track to a standalone MP3.\n \"extract-audio\",\n], unitProducers(\"audio\"))\n\n/**\n * Source node types whose output is an IMAGE URL — what feeds a References\n * input. ONE set for the canvas validators (`frontend/src/lib/\n * generate-image-handles.ts` re-exports it), the backend's Generate Image\n * handle migration and the MCP edge normalizer (`llm-chat`'s legacy `in`):\n * they used to keep separate copies, and the backend's lagged by eight types.\n */\nexport const IMAGE_PRODUCER_TYPES: ReadonlySet<string> = composeUnitSet(\"IMAGE_PRODUCER_TYPES\", [\n \"upload-image\", \"generate-image\", \"edit-image\", \"image-to-image\", \"modify-image\", \"upscale-image\", \"remove-background\",\n // extract-frame produces a single still image extracted from a video source.\n \"extract-frame\",\n // generate-mask emits the source image AND a mask PNG; its `image` source\n // pip is the passthrough (the same image as the input).\n \"generate-mask\",\n // paint-mask emits the hand-painted mask PNG (a plain image at runtime).\n // Membership is what makes mask targets accept it — mask is an advisory\n // color, not a gated type.\n \"paint-mask\",\n // reference-sheet's `sheet` is one composited image and `panels` carries\n // clean reference images; both resolve to image URLs at runtime.\n \"reference-sheet\",\n // reference-board's `image` pip emits a real generated board image.\n \"reference-board\",\n // image-collage composites N images → ONE image.\n \"image-collage\",\n // image-overlay places layers on a base → ONE image.\n \"image-overlay\",\n // 3D Render Pro's `stills` handle carries one PNG per shot of the exported\n // composition (spread into referenceImageUrls like reference-sheet\n // `panels`). A validator sees only the source NODE type, so this also makes\n // its `video` pip droppable on an image input — the handle-blind trade\n // reference-sheet and split-media already make; the input resolvers route\n // by handle, so only `stills` becomes an image at runtime. Deliberately NOT\n // in IMAGE_SOURCE_TYPES on either engine: that set types the node's PRIMARY\n // asset, and 3D Render Pro's is the MP4.\n \"pro-3d-render\",\n], unitProducers(\"image\"))\n\n/**\n * Source node types whose primary output is a LIST that, by default, fans out\n * one downstream execution per element when an edge leaves them WITHOUT an\n * explicit `outputMode` (all other edges default to \"last\"). `selector` is\n * included because its picked/rest channels are lists too.\n *\n * Single source of truth for the fan-out \"each\" default, consumed by:\n * - backend/src/services/workflow-engine/input-resolver.ts (DEFAULT_EACH_TYPES)\n * - frontend/src/components/editor/workflow-editor/types.ts (FAN_OUT_EACH_TYPES)\n * - frontend/src/components/editor/workflow-editor/node-input-resolver.ts\n *\n * These three previously kept independent copies; the backend copy drifted\n * (missing the four list-transform types), so server-side workflow runs\n * silently dropped all-but-the-first item for filter-list / deduplicate /\n * merge-lists / sort-list sources while the canvas fanned out N ways. Lifting\n * the set here makes that drift impossible.\n */\nexport const FAN_OUT_EACH_TYPES: ReadonlySet<string> = new Set([\n \"list\",\n \"split-text\",\n \"filter-list\",\n \"deduplicate\",\n \"merge-lists\",\n \"sort-list\",\n \"selector\",\n // edit-plan `clips` mode emits a bare `Edl[]` on `data.generatedJson`, so an\n // edge leaving it defaults to \"each\" — one downstream execution (typically an\n // apply-edl render) per clip. The `tighten`/`chapters` modes emit an OBJECT,\n // for which the list extractors return undefined, so an \"each\" edge falls back\n // to the scalar `edl` value (no fan-out) — the same graceful degradation\n // web-scrape relies on. See `unwrapEditPlanOutput` in `edit-plan-contract.ts`.\n \"edit-plan\",\n // Content Ideas emits one creative brief per idea on `listResults`, so an\n // edge leaving it defaults to \"each\" — the node after it (typically\n // Generate Script) runs once per idea, on the server too.\n \"content-ideas\",\n])\n\n/**\n * Per-HANDLE \"each\" defaults, for a node whose outputs differ in kind: on the\n * `each` handles an edge without an explicit `outputMode` defaults to \"each\",\n * on its other handles to \"last\". `primary` is the handle an edge with no\n * `sourceHandle` reads (agent-written workflow JSON often omits it).\n *\n * The list an \"each\" edge reads is the node's per-iteration results\n * (`listResults`) — it exists only when the node itself ran once per item, so\n * after a single run the edge degrades to the single value, exactly like a\n * `FAN_OUT_EACH_TYPES` member with one item.\n *\n * Its hand-written rows ∪ the node units' rows (`contract.fanOutEach`,\n * generated/unit-contracts.ts); a type in both refuses to load.\n */\nexport const FAN_OUT_EACH_HANDLES: Readonly<Record<string, { readonly each: readonly string[]; readonly primary: string }>> = composeUnitRecord(\"FAN_OUT_EACH_HANDLES\", {\n // Camera Switch run once per clip (Edit Plan in clips mode): each clip's\n // switched EDL is its own Apply EDL render. Its transcript is the same for\n // every clip (the master clock, renamed), so that handle stays one value\n // (decided 2026-10-04).\n \"camera-switch\": { each: [\"edl\"], primary: \"edl\" },\n // UGC Clips: one ticket per clip on `clips` (each); `plan-out` and\n // `transcript` carry one value. Not a FAN_OUT_EACH_TYPES member — every\n // handle of such a member would fan out. Its one run writes the tickets as\n // its list (`listResults`, the editor's `__listResults`). The pip an edge\n // with no handle reads is the UGC wires' own (UGC_PRIMARY_HANDLE).\n \"ugc-clips\": { each: [\"clips\"], primary: UGC_PRIMARY_HANDLE[\"ugc-clips\"]! },\n // A node unit declares its row in unit.json (contract.fanOutEach); it is added after these.\n}, unitFanOutEach())\n\n/**\n * Fan-out nodes whose iterations must ALL succeed: one failed item fails the\n * node (today's rule tolerates a partial list). UGC Clip — a missing clip\n * silently drops a beat from the script (spec R17). Already-started items\n * finish and settle; their jobs are reused on the next run.\n */\nexport const FAN_OUT_ALL_OR_NOTHING_TYPES: ReadonlySet<string> = new Set([\"ugc-clip\"])\n\n/**\n * Nodes whose saved list is the list their last run PRODUCED — `__listResults`\n * (Extract Field's JSON value on `generatedJson`) — and never a history in\n * `generatedResults`: Extract Field, JSON Process and Site Capture. No run of the first two writes\n * one; earlier builds' server runs did (the run's text, the links of a list of\n * links), and both engines' list readers leave it out for these two (decided\n * 2026-10-05). Single source of truth for the backend engine and the editor.\n */\nexport const OWN_LIST_NODE_TYPES: ReadonlySet<string> = new Set([\n \"extract-field\",\n \"json-process\",\n // Site Capture: its stills, in page order — the last capture's, never every capture's (site-capture-node.ts).\n \"site-capture\",\n])\n\n/** Whether a node's saved list is its own `__listResults`, never a history. */\nexport function ownsItsList(nodeType: string | null | undefined): boolean {\n return typeof nodeType === \"string\" && OWN_LIST_NODE_TYPES.has(nodeType)\n}\n\n/**\n * The output pips that carry the LIST one run produced — several files on one\n * pip (a node unit's `handles.outputs[].list`: each layer of a split image). An\n * edge leaving one runs the next node once per item by default (\"each\"); a\n * Bundle hands the whole list to a node that takes several. Unlike\n * FAN_OUT_EACH_HANDLES, the list is what ONE run made on that pip, never the\n * node's per-iteration results. An edge naming no pip reads the node's primary\n * output, which is never a list pip (tools/units/json-output-rules.mjs).\n * Node units only (generated/unit-contracts.ts UNIT_LIST_PIPS).\n */\nexport const LIST_OUTPUT_HANDLES: Readonly<Record<string, readonly string[]>> = composeUnitRecord(\"LIST_OUTPUT_HANDLES\", {}, unitListPips())\n\n/** Whether an edge leaving `sourceHandle` of a `sourceType` node carries a list one run produced (LIST_OUTPUT_HANDLES). */\nexport function isListOutputHandle(\n sourceType: string | null | undefined,\n sourceHandle: string | null | undefined,\n): boolean {\n if (typeof sourceType !== \"string\" || typeof sourceHandle !== \"string\" || !Object.hasOwn(LIST_OUTPUT_HANDLES, sourceType)) return false\n return LIST_OUTPUT_HANDLES[sourceType]!.includes(sourceHandle)\n}\n\n/** The `outputMode` an edge has when none is set on it — the ONE rule both\n * engines, the credit estimate and the editor read. */\nexport function defaultEdgeOutputMode(\n sourceType: string | null | undefined,\n sourceHandle: string | null | undefined,\n): \"each\" | \"last\" {\n if (typeof sourceType !== \"string\") return \"last\"\n if (FAN_OUT_EACH_TYPES.has(sourceType)) return \"each\"\n if (isListOutputHandle(sourceType, sourceHandle)) return \"each\"\n const entry = FAN_OUT_EACH_HANDLES[sourceType]\n if (!entry) return \"last\"\n return entry.each.includes(sourceHandle || entry.primary) ? \"each\" : \"last\"\n}\n\n/** Whether an edge from `sourceHandle` reads the node's per-iteration results\n * (`listResults` — each iteration's PRIMARY output). False on the other\n * handles of a `FAN_OUT_EACH_HANDLES` node: Camera Switch's transcript is one\n * value, never the list of switched EDLs, whatever mode its edge is set to. */\nexport function listResultsServeHandle(\n sourceType: string | null | undefined,\n sourceHandle: string | null | undefined,\n): boolean {\n const entry = typeof sourceType === \"string\" ? FAN_OUT_EACH_HANDLES[sourceType] : undefined\n return !entry || entry.each.includes(sourceHandle || entry.primary)\n}\n\n/**\n * FAN-IN targets: nodes that FOLD everything wired into them into ONE run,\n * instead of running once per upstream item. Keyed by node type; the value\n * names the target handles that fold (`\"*\"` = every handle). An edge into any\n * other handle of such a node is routed normally — Content Ideas folds its\n * recipes but reads its brand from a `field-brand` wire like any field.\n *\n * Single source of truth for both engines' input resolvers (the backend and\n * the editor each used to keep a private `new Set([\"reduce\"])`). A fan-in\n * node is never itself fanned out by an upstream list.\n */\nexport const FAN_IN_TARGETS: Readonly<Record<string, \"*\" | readonly string[]>> = {\n // Choose Best — every wire is a candidate.\n reduce: \"*\",\n // Content Ideas — one or more recipes, from several Content Recipe nodes\n // and/or one that ran once per post.\n \"content-ideas\": [\"recipes\"],\n // Telegram Reply — one message per run, whatever is wired into its text\n // input: a list (or a writer that ran once per item) arrives as one\n // message, never as a burst of sends to the owner's chat.\n \"telegram-account-send\": [\"in\"],\n // The list operators — they READ the whole list wired into them (their\n // executors collect every upstream item themselves) and emit a list. Run\n // once per item by an \"each\" wire (a Split Text, a List, a node that ran per\n // item), every iteration saw the same whole list and answered with its\n // first match: a Filter List fed 11 stories handed 11 copies of story one\n // downstream, and every paid stage after it ran 11 times on it\n // (2026-10-06). A list operator is never fanned out, on any wire.\n \"filter-list\": \"*\",\n deduplicate: \"*\",\n \"merge-lists\": \"*\",\n \"sort-list\": \"*\",\n selector: \"*\",\n // Speaker Frames on a clip pack (P3-24 (a), decided 2026-10-06): ONE run over\n // the union of the clips' spans — the pack's EDLs fold onto its `edl` wire\n // instead of running one detection job (and one minimum charge) per clip.\n \"speaker-frames\": [\"edl\"],\n // UGC Finish: ONE run over every clip of the video, in clip order — the finish plans its\n // cut and its sound over all of them at once, so it is never run once per clip.\n \"ugc-finish-clips\": [\"clips\"],\n}\n\nexport function isFanInNodeType(nodeType: string | undefined | null): boolean {\n return typeof nodeType === \"string\" && Object.prototype.hasOwnProperty.call(FAN_IN_TARGETS, nodeType)\n}\n\n/** True when an edge into `targetHandle` of a `targetType` node is folded.\n * An edge with NO target handle (workflow JSON written by an agent often\n * omits it) lands on the node's primary input, which is the folding one. */\nexport function isFanInEdge(targetType: string | undefined | null, targetHandle: string | null | undefined): boolean {\n if (!isFanInNodeType(targetType)) return false\n const spec = FAN_IN_TARGETS[targetType as string]!\n if (spec === \"*\") return true\n return targetHandle == null || targetHandle === \"\" || spec.includes(targetHandle)\n}\n","/**\n * UI-default fills for the unified video nodes — the ONE source of truth shared\n * by the backend DAG payload builder, the config-panel fail-safe snaps and the\n * node's hover/run strip.\n *\n * Several config panels RENDER a default without persisting it to node data, so\n * an untouched node submits `aspectRatio` / `resolution` undefined and the\n * enqueued job row (and the /v1/jobs echo) then disagrees with what actually\n * renders. Worse, the panels' generic snap writes `resolutions[0]` for a stale\n * value, which is the CHEAPEST tier under the repo's ascending-resolution\n * convention — not necessarily the tier the model renders and bills.\n *\n * These helpers were local to `backend/src/services/workflow-engine/payload-builder.ts`\n * until the Wan 3.0 launch gave the platform its first provider whose declared\n * billing default differs from `resolutions[0]`; three surfaces then had to\n * agree, so they live here.\n *\n * The resolution fill is per-family ON PURPOSE. Wan 3.0 (and Vidu Q4, whose\n * ascending list starts at 540p) reads its DECLARED\n * billing default (PRICING_DEFAULT_RESOLUTION = 720p) because its catalog list\n * is ascending, so an index-0 fill would write 480p — a tier both `runWan3`\n * (which renders 720P) and the credit identifier (which bills the 720p row)\n * disagree with. The Seedance family keeps its historical first-catalog-tier\n * fill, deliberately: switching it to PRICING_DEFAULT_RESOLUTION would reprice\n * live seedance-2-5 runs, whose declared default (720p) differs from the 480p\n * this has always filled. That 480p-fill vs 720p-billing-default divergence on\n * seedance-2-5 is a KNOWN pre-existing gap, out of scope here — do not \"align\"\n * the branches without repricing it deliberately.\n */\n\nimport {\n PRICING_DEFAULT_RESOLUTION,\n isSeedance2Provider,\n isMinimaxH3Provider,\n isWan3Provider,\n isViduQ4Provider,\n isKling4RunnerProvider,\n isGeminiOmniProvider,\n isGeminiOmniPerSecondProvider,\n isPixverseV6MaxProvider,\n} from \"./model-constants.js\"\nimport { MODEL_CATALOG } from \"./model-catalog.js\"\n\n/** `adaptive` is the aspect default for Seedance 2, MiniMax H3 and Wan 3.0. */\nexport function uiAspectRatioFill(provider: string): string | undefined {\n if (isSeedance2Provider(provider) || isMinimaxH3Provider(provider) || isWan3Provider(provider)) return \"adaptive\"\n // Kling 4.0 (and Flash): `auto` follows the materials (frames / references)\n // and renders 16:9 with none — KIE's own default when the field is omitted.\n // Flash's keyframe endpoint has no `auto`, but it runs only with a start\n // frame, where the ratio is never sent (the clip follows the frame).\n if (isKling4RunnerProvider(provider)) return \"auto\"\n return undefined\n}\n\n/** See the file docstring — per-family on purpose; never a generic\n * PRICING_DEFAULT_RESOLUTION read (that would reprice seedance-2-5). */\nexport function uiResolutionFill(provider: string): string | undefined {\n if (isWan3Provider(provider) || isViduQ4Provider(provider) || isKling4RunnerProvider(provider) || isGeminiOmniPerSecondProvider(provider) || isPixverseV6MaxProvider(provider)) return PRICING_DEFAULT_RESOLUTION[provider]\n if (isSeedance2Provider(provider)) return MODEL_CATALOG[provider]?.resolutions?.[0]\n return undefined\n}\n\n/**\n * Duration the node RENDERS and BILLS when `data.duration` is unset, for the\n * families whose credit identifier declares a duration fallback that is NOT\n * `durations[0]`. Wan 3.0's bare identifier is the 5s tier while its ladder\n * starts at 2s; Vidu Q4's is the 5s tier while its ladder starts at 3s;\n * PixVerse V6 Max's is the 5s tier while its ladder starts at 1s; the\n * Gemini Omni family's is the 8s tier while its ladder starts at 4s. Everyone else falls back to the first listed duration, so this returns\n * undefined and the caller keeps `durations[0]`.\n */\nexport function uiDurationFill(provider: string): number | undefined {\n if (isWan3Provider(provider) || isViduQ4Provider(provider) || isKling4RunnerProvider(provider) || isPixverseV6MaxProvider(provider)) return 5\n if (isGeminiOmniProvider(provider)) return 8\n return undefined\n}\n"]}
1
+ {"version":3,"sources":["../src/producer-types.ts","../src/video-ui-defaults.ts"],"names":[],"mappings":";;;;;;AA2BO,IAAM,oBAAA,GAA4C,eAAe,sBAAA,EAAwB;AAAA,EAC9F,gBAAA;AAAA,EACA,gBAAA;AAAA,EACA,SAAA;AAAA;AAAA,EACA,eAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAMA,gBAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAKA,oBAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAKA,gBAAA;AAAA,EACA,cAAA;AAAA,EACA,eAAA;AAAA,EACA,gBAAA;AAAA,EACA,UAAA;AAAA,EACA,iBAAA;AAAA,EACA,iBAAA;AAAA,EACA,eAAA;AAAA,EACA,aAAA;AAAA,EACA,cAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAMA,WAAA;AAAA;AAAA;AAAA,EAGA,cAAA;AAAA,EACA,cAAA;AAAA;AAAA;AAAA;AAAA,EAIA,WAAA;AAAA,EACA,kBAAA;AAAA,EACA,mBAAA;AAAA,EACA,cAAA;AAAA,EACA,cAAA;AAAA,EACA,qBAAA;AAAA,EACA,YAAA;AAAA,EACA,cAAA;AAAA,EACA,YAAA;AAAA,EACA,YAAA;AAAA,EACA,YAAA;AAAA;AAAA,EAEA,YAAA;AAAA,EACA,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OAAO,UAAA;AAKvG,EAAA,IAAI,sBAAA,CAAuB,QAAQ,CAAA,EAAG,OAAO,MAAA;AAC7C,EAAA,OAAO,MAAA;AACT;AAIO,SAAS,iBAAiB,QAAA,EAAsC;AACrE,EAAA,IAAI,eAAe,QAAQ,CAAA,IAAK,gBAAA,CAAiB,QAAQ,KAAK,sBAAA,CAAuB,QAAQ,CAAA,IAAK,6BAAA,CAA8B,QAAQ,CAAA,IAAK,uBAAA,CAAwB,QAAQ,CAAA,EAAG,OAAO,2BAA2B,QAAQ,CAAA;AAC1N,EAAA,IAAI,mBAAA,CAAoB,QAAQ,CAAA,EAAG,OAAO,cAAc,QAAQ,CAAA,EAAG,cAAc,CAAC,CAAA;AAClF,EAAA,OAAO,MAAA;AACT;AAWO,SAAS,eAAe,QAAA,EAAsC;AACnE,EAAA,IAAI,cAAA,CAAe,QAAQ,CAAA,IAAK,gBAAA,CAAiB,QAAQ,CAAA,IAAK,sBAAA,CAAuB,QAAQ,CAAA,IAAK,uBAAA,CAAwB,QAAQ,CAAA,EAAG,OAAO,CAAA;AAC5I,EAAA,IAAI,oBAAA,CAAqB,QAAQ,CAAA,EAAG,OAAO,CAAA;AAC3C,EAAA,OAAO,MAAA;AACT","file":"chunk-D5Y3EYRM.js","sourcesContent":["/**\n * Producer-type sets — single source of truth for the node types whose\n * primary output is a video URL, audio URL, etc.\n *\n * Consumed by:\n * - backend/src/services/workflow-engine/execution-graph.ts (orchestrator\n * dispatch + asset-type tagging in payload-builder, output-extractor,\n * inline-executor — re-exported there as VIDEO_SOURCE_TYPES /\n * AUDIO_SOURCE_TYPES for backwards compatibility).\n * - frontend/src/lib/generate-video-handles.ts (handle connection\n * validation on the Generate Video node).\n *\n * Lifting these here ensures the frontend handle validator can never reject\n * a connection from a node type that the backend would happily route at\n * execution time (the prior drift bug, see issue 1 of the Task 4.1 review).\n */\nimport { UGC_PRIMARY_HANDLE } from \"./ugc-node-wires.js\"\nimport { composeUnitRecord, composeUnitSet, unitFanOutEach, unitListPips, unitProducers } from \"./unit-contract-compose.js\"\n\n// Each producer set below is its hand-written members ∪ the node units\n// (tools/units/README.md) of that producer kind, from their generated contract\n// rows, in that order — a type in both throws at load (composeUnitSet).\n\n/**\n * Source node types whose primary output is a video URL.\n * Mirrors the backend execution-graph VIDEO_SOURCE_TYPES verbatim.\n */\nexport const VIDEO_PRODUCER_TYPES: ReadonlySet<string> = composeUnitSet(\"VIDEO_PRODUCER_TYPES\", [\n \"image-to-video\",\n \"video-to-video\",\n \"switchx\", // Beeble SwitchX relight/composite\n \"text-to-video\",\n // Unified video node — emits videoUrl identically to i2v/t2v (its payload-builder\n // case dispatches dynamically to \"image-to-video\" or \"text-to-video\" jobName based\n // on whether a start frame is wired). Without this, getPrimaryOutput would fall\n // through to the imageUrl/videoUrl/audioUrl/text default and downstream consumers\n // could silently misroute the output.\n \"generate-video\",\n // Generate Video Pro — Seedance-2-family multi-segment stitch variant of\n // generate-video (same \"emits videoUrl\" contract; a trimmed provider +\n // handle set). Must mirror generate-video here or its output can't connect\n // downstream (the recurring \"cannot connect the outputs\" bug class).\n \"generate-video-pro\",\n // Edit Video Pro — Seedance-2-family span-replace sibling of generate-\n // video-pro (same \"emits videoUrl\" contract; source video + prompt in,\n // ONE video out). Must mirror generate-video-pro here or its output can't\n // connect downstream (the recurring \"cannot connect the outputs\" bug class).\n \"edit-video-pro\",\n \"upload-video\",\n \"youtube-video\",\n \"combine-videos\",\n \"lip-sync\",\n \"speech-to-video\",\n \"motion-transfer\",\n \"video-upscale\",\n \"video-depth\",\n \"extend-video\",\n // face-swap output is video (writes generatedVideoUrl, per-result `url`).\n // Frontend execution-graph already includes it in VIDEO_SOURCE_TYPES; this\n // entry brings the shared set in line so canvas typed-handle validation\n // doesn't reject face-swap → video-consumer edges that the orchestrator\n // would happily route at runtime.\n \"face-swap\",\n // Speaker View (C3.2): an EDL rendered with its speakers framed — one VIDEO\n // out (no audio-only render). Registered in RENDER_NODE_TYPES as well.\n \"speaker-view\",\n \"video-retake\",\n // video-sfx: adds an SFX track to a video → emits a video URL. Belongs here so\n // canvas handle validation accepts video-sfx → video-consumer edges and the\n // backend routes its output as video (it was previously relying on a fallback).\n \"video-sfx\",\n \"suno-music-video\",\n \"merge-video-audio\",\n \"add-captions\",\n \"resize-video\",\n \"social-media-format\",\n \"trim-video\",\n \"render-video\",\n \"speed-ramp\",\n \"loop-video\",\n \"fade-video\",\n // Video Mask emits its mask as a video; Mask Composite its composite.\n \"video-mask\",\n \"mask-composite\",\n \"transcode-video\",\n \"manual-edit\",\n // AI Avatar (HeyGen): avatar + voice/audio → video.\n \"ai-avatar\",\n // Cinematic Avatar (HeyGen cinematic_avatar): prompt + 1–3 avatar looks → video.\n \"cinematic-avatar\",\n // Assemble Narrated Video: fits N (clip, voice) blocks into one MP4 → video.\n \"assemble-narrated-video\",\n // Still to Video: one still image + one audio track → MP4 (local FFmpeg,\n // no provider). Emits generatedVideoUrl like every other ffmpeg video node.\n \"still-to-video\",\n // Slideshow: 2-100 stills + one optional audio track → MP4 (local FFmpeg,\n // no provider). Same contract; images arrive via the image-collage lane.\n \"slideshow\",\n // 3D Render Pro: authors a scene AND exports it in one operation, settling\n // with the standard `videoUrl` field. It is a video producer as much as it\n // is a composition producer — omitting it here is the \"cannot connect the\n // outputs\" bug, and its `composition` handle is typed separately.\n \"pro-3d-render\",\n // Video Overlay: timed image layers over a video in one local FFmpeg pass\n // (the base audio copied) — emits a video URL on `video-out`.\n \"video-overlay\",\n // UGC Clip: renders one clip of a UGC video from its ticket — emits a video\n // URL on `video-out` (one per fan-out iteration).\n \"ugc-clip\",\n // UGC Finish: the video's clips, finished, as one ordered list — a registered producer, so a\n // Bundle edge into Combine Videos routes each one as a video, in order.\n \"ugc-finish-clips\",\n], unitProducers(\"video\"))\n\n/**\n * Source node types whose output media-type cannot be classified\n * statically — iterators, dynamic dispatchers, sub-workflow wrappers.\n * The orchestrator decides their actual output type at execution time\n * based on what's wired upstream (loop iterates upstream column type;\n * sub-workflow emits its leaf node's type; adjust-volume passes through\n * video or audio based on its `lastInputType` runtime field;\n * voice-changer emits audio in audio mode, video+audio in video mode).\n *\n * Typed-handle validators (frontend/src/lib/{generate-image,generate-\n * video,ffmpeg}-handles.ts) must include these as acceptors on EVERY\n * media-typed input handle — otherwise the canvas validator hard-\n * rejects edges that the orchestrator would happily route at runtime.\n *\n * Lifted here from `frontend/src/lib/ffmpeg-handles.ts` (where the\n * escape hatch was first added) so the same set drives ALL handle\n * validators uniformly. Adding a new dynamic-output node type means\n * one edit here instead of N across sibling validator files.\n *\n * Intentionally OMITTED:\n * - `webhook-trigger` / `schedule-trigger` — their outputs are\n * user-defined JSON shapes, not media URLs. Accepting them as\n * media producers creates false-positive drops at the canvas\n * that fail at execution. Users wanting trigger → media flows\n * should wire through an upload node.\n */\nexport const DYNAMIC_PRODUCER_TYPES: ReadonlySet<string> = composeUnitSet(\"DYNAMIC_PRODUCER_TYPES\", [\n \"list\",\n \"sub-workflow\",\n \"adjust-volume\",\n // Pitch & Tempo: audio in → audio out, video in → video out (picture\n // copied). Dual-mode like adjust-volume; stays in AUDIO_PRODUCER_TYPES as\n // its default.\n \"pitch-tempo\",\n // Dual-mode: audio in → audio out; video in → video out (+ revoiced audio).\n // Listed here so canvas validators accept its output on BOTH audio and video\n // input handles (it also stays in AUDIO_PRODUCER_TYPES as its default).\n \"voice-changer\",\n // voice-changer-pro (renamed from voice-recast in #3581) is a behavioral\n // twin of voice-changer — identical dual-mode output. Must mirror it in\n // EVERY producer set or its outputs can't connect (was the \"cannot connect\n // the outputs of voice-changer-pro\" bug). Guarded by producer-types.test.ts.\n \"voice-changer-pro\",\n // Dubbing joined the dual-mode family with the full-surface upgrade:\n // audio in → dubbed audio; video in (or a video sourceUrl) → dubbed VIDEO\n // (+ audio sidecar). Same wiring contract as voice-changer; stays in\n // AUDIO_PRODUCER_TYPES as its default. Explicitly asserted in\n // producer-types.test.ts (the suite does not fail on omission).\n \"dubbing\",\n \"reduce\",\n // Dual-output time chunker (UI label \"Split into Chunks\"; type id stays\n // \"split-media\"): video in → video chunks, audio in → audio chunks — two\n // independent lanes on two output handles. Like voice-changer, the canvas\n // validator only sees the source NODE type, not which handle a wire leaves,\n // so it lives here to be accepted on BOTH audio and video input handles. The\n // backend routes the correct lane by sourceHandle in getPrimaryOutput\n // (output-extractor.ts); the frontend does so in extractNodeOutput.\n \"split-media\",\n // apply-edl renders an EDL into ONE media output whose type is decided at\n // run time by the node's `output` setting (video OR audio) — so its static\n // medium is genuinely unknown and it belongs here, letting canvas validators\n // accept its default media handle on BOTH audio and video input handles. It\n // ALSO emits a fixed `json` handle (the remapped Transcript); that half lives\n // in JSON_PRODUCER_TYPES (frontend/src/lib/data-handles.ts). The FIRST node\n // with both a dynamic media handle and a fixed json handle. Because\n // getOutputType (presentation-utils.ts) deliberately returns \"data\" for\n // DYNAMIC members, apply-edl is ALSO added to the literal VIDEO_OUTPUT_TYPES\n // there so a published app renders the cut as video, mirroring the\n // voice-changer/dubbing precedent. Asserted in producer-types.test.ts (the\n // suite does not fail on omission).\n \"apply-edl\",\n], unitProducers(\"dynamic\"))\n\n/**\n * Source node types whose primary output is an audio URL.\n * Mirrors the backend execution-graph AUDIO_SOURCE_TYPES verbatim.\n */\nexport const AUDIO_PRODUCER_TYPES: ReadonlySet<string> = composeUnitSet(\"AUDIO_PRODUCER_TYPES\", [\n \"text-to-speech\",\n \"text-to-audio\",\n \"generate-music\",\n \"upload-audio\",\n \"suno-generate\",\n \"suno-cover\",\n \"suno-extend\",\n \"suno-separate\",\n \"audio-separation\",\n \"suno-mashup\",\n \"suno-replace-section\",\n \"suno-add-instrumental\",\n \"suno-add-vocals\",\n \"suno-convert-wav\",\n \"suno-upload-extend\",\n \"trim-audio\",\n \"mix-audio\",\n \"combine-audio\",\n \"adjust-volume\",\n \"audio-fx\",\n \"pitch-tempo\",\n \"reference-audio\",\n \"audio-isolation\",\n \"text-to-dialogue\",\n \"voice-changer\",\n // Twin of voice-changer (see DYNAMIC_PRODUCER_TYPES note). Audio is its\n // default output mode; video mode is handled via DYNAMIC membership.\n \"voice-changer-pro\",\n \"dubbing\",\n \"voice-remix\",\n \"voice-design\",\n // Extract Audio: demuxes a video's audio track to a standalone MP3.\n \"extract-audio\",\n], unitProducers(\"audio\"))\n\n/**\n * Source node types whose output is an IMAGE URL — what feeds a References\n * input. ONE set for the canvas validators (`frontend/src/lib/\n * generate-image-handles.ts` re-exports it), the backend's Generate Image\n * handle migration and the MCP edge normalizer (`llm-chat`'s legacy `in`):\n * they used to keep separate copies, and the backend's lagged by eight types.\n */\nexport const IMAGE_PRODUCER_TYPES: ReadonlySet<string> = composeUnitSet(\"IMAGE_PRODUCER_TYPES\", [\n \"upload-image\", \"generate-image\", \"edit-image\", \"image-to-image\", \"modify-image\", \"upscale-image\", \"remove-background\",\n // extract-frame produces a single still image extracted from a video source.\n \"extract-frame\",\n // generate-mask emits the source image AND a mask PNG; its `image` source\n // pip is the passthrough (the same image as the input).\n \"generate-mask\",\n // paint-mask emits the hand-painted mask PNG (a plain image at runtime).\n // Membership is what makes mask targets accept it — mask is an advisory\n // color, not a gated type.\n \"paint-mask\",\n // reference-sheet's `sheet` is one composited image and `panels` carries\n // clean reference images; both resolve to image URLs at runtime.\n \"reference-sheet\",\n // reference-board's `image` pip emits a real generated board image.\n \"reference-board\",\n // image-collage composites N images → ONE image.\n \"image-collage\",\n // image-overlay places layers on a base → ONE image.\n \"image-overlay\",\n // 3D Render Pro's `stills` handle carries one PNG per shot of the exported\n // composition (spread into referenceImageUrls like reference-sheet\n // `panels`). A validator sees only the source NODE type, so this also makes\n // its `video` pip droppable on an image input — the handle-blind trade\n // reference-sheet and split-media already make; the input resolvers route\n // by handle, so only `stills` becomes an image at runtime. Deliberately NOT\n // in IMAGE_SOURCE_TYPES on either engine: that set types the node's PRIMARY\n // asset, and 3D Render Pro's is the MP4.\n \"pro-3d-render\",\n], unitProducers(\"image\"))\n\n/**\n * Source node types whose primary output is a LIST that, by default, fans out\n * one downstream execution per element when an edge leaves them WITHOUT an\n * explicit `outputMode` (all other edges default to \"last\"). `selector` is\n * included because its picked/rest channels are lists too.\n *\n * Single source of truth for the fan-out \"each\" default, consumed by:\n * - backend/src/services/workflow-engine/input-resolver.ts (DEFAULT_EACH_TYPES)\n * - frontend/src/components/editor/workflow-editor/types.ts (FAN_OUT_EACH_TYPES)\n * - frontend/src/components/editor/workflow-editor/node-input-resolver.ts\n *\n * These three previously kept independent copies; the backend copy drifted\n * (missing the four list-transform types), so server-side workflow runs\n * silently dropped all-but-the-first item for filter-list / deduplicate /\n * merge-lists / sort-list sources while the canvas fanned out N ways. Lifting\n * the set here makes that drift impossible.\n */\nexport const FAN_OUT_EACH_TYPES: ReadonlySet<string> = new Set([\n \"list\",\n \"split-text\",\n \"filter-list\",\n \"deduplicate\",\n \"merge-lists\",\n \"sort-list\",\n \"selector\",\n // edit-plan `clips` mode emits a bare `Edl[]` on `data.generatedJson`, so an\n // edge leaving it defaults to \"each\" — one downstream execution (typically an\n // apply-edl render) per clip. The `tighten`/`chapters` modes emit an OBJECT,\n // for which the list extractors return undefined, so an \"each\" edge falls back\n // to the scalar `edl` value (no fan-out) — the same graceful degradation\n // web-scrape relies on. See `unwrapEditPlanOutput` in `edit-plan-contract.ts`.\n \"edit-plan\",\n // Content Ideas emits one creative brief per idea on `listResults`, so an\n // edge leaving it defaults to \"each\" — the node after it (typically\n // Generate Script) runs once per idea, on the server too.\n \"content-ideas\",\n])\n\n/**\n * Per-HANDLE \"each\" defaults, for a node whose outputs differ in kind: on the\n * `each` handles an edge without an explicit `outputMode` defaults to \"each\",\n * on its other handles to \"last\". `primary` is the handle an edge with no\n * `sourceHandle` reads (agent-written workflow JSON often omits it).\n *\n * The list an \"each\" edge reads is the node's per-iteration results\n * (`listResults`) — it exists only when the node itself ran once per item, so\n * after a single run the edge degrades to the single value, exactly like a\n * `FAN_OUT_EACH_TYPES` member with one item.\n *\n * Its hand-written rows ∪ the node units' rows (`contract.fanOutEach`,\n * generated/unit-contracts.ts); a type in both refuses to load.\n */\nexport const FAN_OUT_EACH_HANDLES: Readonly<Record<string, { readonly each: readonly string[]; readonly primary: string }>> = composeUnitRecord(\"FAN_OUT_EACH_HANDLES\", {\n // Camera Switch run once per clip (Edit Plan in clips mode): each clip's\n // switched EDL is its own Apply EDL render. Its transcript is the same for\n // every clip (the master clock, renamed), so that handle stays one value\n // (decided 2026-10-04).\n \"camera-switch\": { each: [\"edl\"], primary: \"edl\" },\n // UGC Clips: one ticket per clip on `clips` (each); `plan-out` and\n // `transcript` carry one value. Not a FAN_OUT_EACH_TYPES member — every\n // handle of such a member would fan out. Its one run writes the tickets as\n // its list (`listResults`, the editor's `__listResults`). The pip an edge\n // with no handle reads is the UGC wires' own (UGC_PRIMARY_HANDLE).\n \"ugc-clips\": { each: [\"clips\"], primary: UGC_PRIMARY_HANDLE[\"ugc-clips\"]! },\n // A node unit declares its row in unit.json (contract.fanOutEach); it is added after these.\n}, unitFanOutEach())\n\n/**\n * Fan-out nodes whose iterations must ALL succeed: one failed item fails the\n * node (today's rule tolerates a partial list). UGC Clip — a missing clip\n * silently drops a beat from the script (spec R17). Already-started items\n * finish and settle; their jobs are reused on the next run.\n */\nexport const FAN_OUT_ALL_OR_NOTHING_TYPES: ReadonlySet<string> = new Set([\"ugc-clip\"])\n\n/**\n * Nodes whose saved list is the list their last run PRODUCED — `__listResults`\n * (Extract Field's JSON value on `generatedJson`) — and never a history in\n * `generatedResults`: Extract Field, JSON Process and Site Capture. No run of the first two writes\n * one; earlier builds' server runs did (the run's text, the links of a list of\n * links), and both engines' list readers leave it out for these two (decided\n * 2026-10-05). Single source of truth for the backend engine and the editor.\n */\nexport const OWN_LIST_NODE_TYPES: ReadonlySet<string> = new Set([\n \"extract-field\",\n \"json-process\",\n // Site Capture: its stills, in page order — the last capture's, never every capture's (site-capture-node.ts).\n \"site-capture\",\n])\n\n/** Whether a node's saved list is its own `__listResults`, never a history. */\nexport function ownsItsList(nodeType: string | null | undefined): boolean {\n return typeof nodeType === \"string\" && OWN_LIST_NODE_TYPES.has(nodeType)\n}\n\n/**\n * The output pips that carry the LIST one run produced — several files on one\n * pip (a node unit's `handles.outputs[].list`: each layer of a split image). An\n * edge leaving one runs the next node once per item by default (\"each\"); a\n * Bundle hands the whole list to a node that takes several. Unlike\n * FAN_OUT_EACH_HANDLES, the list is what ONE run made on that pip, never the\n * node's per-iteration results. An edge naming no pip reads the node's primary\n * output, which is never a list pip (tools/units/json-output-rules.mjs).\n * Node units only (generated/unit-contracts.ts UNIT_LIST_PIPS).\n */\nexport const LIST_OUTPUT_HANDLES: Readonly<Record<string, readonly string[]>> = composeUnitRecord(\"LIST_OUTPUT_HANDLES\", {}, unitListPips())\n\n/** Whether an edge leaving `sourceHandle` of a `sourceType` node carries a list one run produced (LIST_OUTPUT_HANDLES). */\nexport function isListOutputHandle(\n sourceType: string | null | undefined,\n sourceHandle: string | null | undefined,\n): boolean {\n if (typeof sourceType !== \"string\" || typeof sourceHandle !== \"string\" || !Object.hasOwn(LIST_OUTPUT_HANDLES, sourceType)) return false\n return LIST_OUTPUT_HANDLES[sourceType]!.includes(sourceHandle)\n}\n\n/** The `outputMode` an edge has when none is set on it — the ONE rule both\n * engines, the credit estimate and the editor read. */\nexport function defaultEdgeOutputMode(\n sourceType: string | null | undefined,\n sourceHandle: string | null | undefined,\n): \"each\" | \"last\" {\n if (typeof sourceType !== \"string\") return \"last\"\n if (FAN_OUT_EACH_TYPES.has(sourceType)) return \"each\"\n if (isListOutputHandle(sourceType, sourceHandle)) return \"each\"\n const entry = FAN_OUT_EACH_HANDLES[sourceType]\n if (!entry) return \"last\"\n return entry.each.includes(sourceHandle || entry.primary) ? \"each\" : \"last\"\n}\n\n/** Whether an edge from `sourceHandle` reads the node's per-iteration results\n * (`listResults` — each iteration's PRIMARY output). False on the other\n * handles of a `FAN_OUT_EACH_HANDLES` node: Camera Switch's transcript is one\n * value, never the list of switched EDLs, whatever mode its edge is set to. */\nexport function listResultsServeHandle(\n sourceType: string | null | undefined,\n sourceHandle: string | null | undefined,\n): boolean {\n const entry = typeof sourceType === \"string\" ? FAN_OUT_EACH_HANDLES[sourceType] : undefined\n return !entry || entry.each.includes(sourceHandle || entry.primary)\n}\n\n/**\n * FAN-IN targets: nodes that FOLD everything wired into them into ONE run,\n * instead of running once per upstream item. Keyed by node type; the value\n * names the target handles that fold (`\"*\"` = every handle). An edge into any\n * other handle of such a node is routed normally — Content Ideas folds its\n * recipes but reads its brand from a `field-brand` wire like any field.\n *\n * Single source of truth for both engines' input resolvers (the backend and\n * the editor each used to keep a private `new Set([\"reduce\"])`). A fan-in\n * node is never itself fanned out by an upstream list.\n */\nexport const FAN_IN_TARGETS: Readonly<Record<string, \"*\" | readonly string[]>> = {\n // Choose Best — every wire is a candidate.\n reduce: \"*\",\n // Content Ideas — one or more recipes, from several Content Recipe nodes\n // and/or one that ran once per post.\n \"content-ideas\": [\"recipes\"],\n // Telegram Reply — one message per run, whatever is wired into its text\n // input: a list (or a writer that ran once per item) arrives as one\n // message, never as a burst of sends to the owner's chat.\n \"telegram-account-send\": [\"in\"],\n // The list operators — they READ the whole list wired into them (their\n // executors collect every upstream item themselves) and emit a list. Run\n // once per item by an \"each\" wire (a Split Text, a List, a node that ran per\n // item), every iteration saw the same whole list and answered with its\n // first match: a Filter List fed 11 stories handed 11 copies of story one\n // downstream, and every paid stage after it ran 11 times on it\n // (2026-10-06). A list operator is never fanned out, on any wire.\n \"filter-list\": \"*\",\n deduplicate: \"*\",\n \"merge-lists\": \"*\",\n \"sort-list\": \"*\",\n selector: \"*\",\n // Speaker Frames on a clip pack (P3-24 (a), decided 2026-10-06): ONE run over\n // the union of the clips' spans — the pack's EDLs fold onto its `edl` wire\n // instead of running one detection job (and one minimum charge) per clip.\n \"speaker-frames\": [\"edl\"],\n // UGC Finish: ONE run over every clip of the video, in clip order — the finish plans its\n // cut and its sound over all of them at once, so it is never run once per clip.\n \"ugc-finish-clips\": [\"clips\"],\n}\n\nexport function isFanInNodeType(nodeType: string | undefined | null): boolean {\n return typeof nodeType === \"string\" && Object.prototype.hasOwnProperty.call(FAN_IN_TARGETS, nodeType)\n}\n\n/** True when an edge into `targetHandle` of a `targetType` node is folded.\n * An edge with NO target handle (workflow JSON written by an agent often\n * omits it) lands on the node's primary input, which is the folding one. */\nexport function isFanInEdge(targetType: string | undefined | null, targetHandle: string | null | undefined): boolean {\n if (!isFanInNodeType(targetType)) return false\n const spec = FAN_IN_TARGETS[targetType as string]!\n if (spec === \"*\") return true\n return targetHandle == null || targetHandle === \"\" || spec.includes(targetHandle)\n}\n","/**\n * UI-default fills for the unified video nodes — the ONE source of truth shared\n * by the backend DAG payload builder, the config-panel fail-safe snaps and the\n * node's hover/run strip.\n *\n * Several config panels RENDER a default without persisting it to node data, so\n * an untouched node submits `aspectRatio` / `resolution` undefined and the\n * enqueued job row (and the /v1/jobs echo) then disagrees with what actually\n * renders. Worse, the panels' generic snap writes `resolutions[0]` for a stale\n * value, which is the CHEAPEST tier under the repo's ascending-resolution\n * convention — not necessarily the tier the model renders and bills.\n *\n * These helpers were local to `backend/src/services/workflow-engine/payload-builder.ts`\n * until the Wan 3.0 launch gave the platform its first provider whose declared\n * billing default differs from `resolutions[0]`; three surfaces then had to\n * agree, so they live here.\n *\n * The resolution fill is per-family ON PURPOSE. Wan 3.0 (and Vidu Q4, whose\n * ascending list starts at 540p) reads its DECLARED\n * billing default (PRICING_DEFAULT_RESOLUTION = 720p) because its catalog list\n * is ascending, so an index-0 fill would write 480p — a tier both `runWan3`\n * (which renders 720P) and the credit identifier (which bills the 720p row)\n * disagree with. The Seedance family keeps its historical first-catalog-tier\n * fill, deliberately: switching it to PRICING_DEFAULT_RESOLUTION would reprice\n * live seedance-2-5 runs, whose declared default (720p) differs from the 480p\n * this has always filled. That 480p-fill vs 720p-billing-default divergence on\n * seedance-2-5 is a KNOWN pre-existing gap, out of scope here — do not \"align\"\n * the branches without repricing it deliberately.\n */\n\nimport {\n PRICING_DEFAULT_RESOLUTION,\n isSeedance2Provider,\n isMinimaxH3Provider,\n isWan3Provider,\n isViduQ4Provider,\n isKling4RunnerProvider,\n isGeminiOmniProvider,\n isGeminiOmniPerSecondProvider,\n isPixverseV6MaxProvider,\n} from \"./model-constants.js\"\nimport { MODEL_CATALOG } from \"./model-catalog.js\"\n\n/** `adaptive` is the aspect default for Seedance 2, MiniMax H3 and Wan 3.0. */\nexport function uiAspectRatioFill(provider: string): string | undefined {\n if (isSeedance2Provider(provider) || isMinimaxH3Provider(provider) || isWan3Provider(provider)) return \"adaptive\"\n // Kling 4.0 (and Flash): `auto` follows the materials (frames / references)\n // and renders 16:9 with none — KIE's own default when the field is omitted.\n // Flash's keyframe endpoint has no `auto`, but it runs only with a start\n // frame, where the ratio is never sent (the clip follows the frame).\n if (isKling4RunnerProvider(provider)) return \"auto\"\n return undefined\n}\n\n/** See the file docstring — per-family on purpose; never a generic\n * PRICING_DEFAULT_RESOLUTION read (that would reprice seedance-2-5). */\nexport function uiResolutionFill(provider: string): string | undefined {\n if (isWan3Provider(provider) || isViduQ4Provider(provider) || isKling4RunnerProvider(provider) || isGeminiOmniPerSecondProvider(provider) || isPixverseV6MaxProvider(provider)) return PRICING_DEFAULT_RESOLUTION[provider]\n if (isSeedance2Provider(provider)) return MODEL_CATALOG[provider]?.resolutions?.[0]\n return undefined\n}\n\n/**\n * Duration the node RENDERS and BILLS when `data.duration` is unset, for the\n * families whose credit identifier declares a duration fallback that is NOT\n * `durations[0]`. Wan 3.0's bare identifier is the 5s tier while its ladder\n * starts at 2s; Vidu Q4's is the 5s tier while its ladder starts at 3s;\n * PixVerse V6 Max's is the 5s tier while its ladder starts at 1s; the\n * Gemini Omni family's is the 8s tier while its ladder starts at 4s. Everyone else falls back to the first listed duration, so this returns\n * undefined and the caller keeps `durations[0]`.\n */\nexport function uiDurationFill(provider: string): number | undefined {\n if (isWan3Provider(provider) || isViduQ4Provider(provider) || isKling4RunnerProvider(provider) || isPixverseV6MaxProvider(provider)) return 5\n if (isGeminiOmniProvider(provider)) return 8\n return undefined\n}\n"]}
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var chunkLH72PQO2_cjs = require('./chunk-LH72PQO2.cjs');
3
+ var chunkKWYS4IIM_cjs = require('./chunk-KWYS4IIM.cjs');
4
4
  var zod = require('zod');
5
5
 
6
6
  // src/pipeline-defaults.ts
@@ -273,7 +273,7 @@ var SceneNodeDataSchema = zod.z.object({
273
273
  emotional_beat: zod.z.string(),
274
274
  duration_seconds: zod.z.number().positive(),
275
275
  // Input mode — gates which video_model values are valid
276
- shot_input_mode: chunkLH72PQO2_cjs.SceneInputModeSchema,
276
+ shot_input_mode: chunkKWYS4IIM_cjs.SceneInputModeSchema,
277
277
  // Echoed inputs (Scene Director copies from SceneSpec)
278
278
  cast_keys: zod.z.array(zod.z.string()),
279
279
  location_key: zod.z.string(),
@@ -394,7 +394,7 @@ var PIPELINE_ACCEPTED_SCRIPT_LLMS = [
394
394
  ...PIPELINE_LEGACY_PINNED_SCRIPT_LLMS
395
395
  ];
396
396
  var ImageModelEnum = zod.z.enum(PIPELINE_ACCEPTED_IMAGE_MODELS);
397
- var VideoModelEnum = zod.z.preprocess(chunkLH72PQO2_cjs.canonicalVideoProvider, zod.z.enum(PIPELINE_PINNABLE_VIDEO_MODELS));
397
+ var VideoModelEnum = zod.z.preprocess(chunkKWYS4IIM_cjs.canonicalVideoProvider, zod.z.enum(PIPELINE_PINNABLE_VIDEO_MODELS));
398
398
  var ScriptLlmEnum = zod.z.enum(PIPELINE_ACCEPTED_SCRIPT_LLMS);
399
399
  var StageModelsSchema = zod.z.object({
400
400
  characters_image: ImageModelEnum.optional(),
@@ -1596,6 +1596,15 @@ function stripStudioDraftWorkflow(row) {
1596
1596
 
1597
1597
  // src/sequence-execution.ts
1598
1598
  var STUDIO_DEPENDENT_FRAMES_CAPABILITY = "studio-dependent-frames-v1";
1599
+ var record = (value) => value && typeof value === "object" && !Array.isArray(value) ? value : {};
1600
+ var declaresDependentFrames = (data) => Array.isArray(data.requiredCapabilities) && data.requiredCapabilities.includes(STUDIO_DEPENDENT_FRAMES_CAPABILITY);
1601
+ function isCodecOwnedDocument(nodes, settings) {
1602
+ const studio = record(record(settings).studio);
1603
+ return ["keyframes", "sequences", "settledJobIds"].some((key) => Object.hasOwn(studio, key)) || declaresDependentFrames(studio) || Array.isArray(nodes) && nodes.some((node) => {
1604
+ const data = record(record(node).data);
1605
+ return Object.hasOwn(data, "keyframeId") || Object.hasOwn(data, "sequenceBinding") || declaresDependentFrames(data);
1606
+ });
1607
+ }
1599
1608
  var SequenceExecutionRequiredError = class extends Error {
1600
1609
  constructor(nodeIds) {
1601
1610
  super("Generate linked frames and clips in Studio or through its production API so the reviewed images are used.");
@@ -1753,6 +1762,7 @@ exports.VoiceMatchSchema = VoiceMatchSchema;
1753
1762
  exports.assertCanvasExecutionAllowed = assertCanvasExecutionAllowed;
1754
1763
  exports.clearImageCriticMetadata = clearImageCriticMetadata;
1755
1764
  exports.clearVideoCriticMetadata = clearVideoCriticMetadata;
1765
+ exports.isCodecOwnedDocument = isCodecOwnedDocument;
1756
1766
  exports.parseAttributedDialogue = parseAttributedDialogue;
1757
1767
  exports.requiresSequenceExecution = requiresSequenceExecution;
1758
1768
  exports.resolveDialogueVoices = resolveDialogueVoices;
@@ -1765,5 +1775,5 @@ exports.stripStudioTransientSettings = stripStudioTransientSettings;
1765
1775
  exports.validateDurationForFormat = validateDurationForFormat;
1766
1776
  exports.validateModeActivation = validateModeActivation;
1767
1777
  exports.validateObjects = validateObjects;
1768
- //# sourceMappingURL=chunk-XGVJGNZW.cjs.map
1769
- //# sourceMappingURL=chunk-XGVJGNZW.cjs.map
1778
+ //# sourceMappingURL=chunk-DQ2PARNH.cjs.map
1779
+ //# sourceMappingURL=chunk-DQ2PARNH.cjs.map