@nodaro/shared 3.31.0 → 3.32.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 (372) hide show
  1. package/README.md +17 -0
  2. package/dist/chunk-2NIQO2J3.cjs +54 -0
  3. package/dist/chunk-2NIQO2J3.cjs.map +1 -0
  4. package/dist/chunk-2OJIVO7R.cjs +32 -0
  5. package/dist/chunk-2OJIVO7R.cjs.map +1 -0
  6. package/dist/chunk-2RF4Z7KG.cjs +803 -0
  7. package/dist/chunk-2RF4Z7KG.cjs.map +1 -0
  8. package/dist/chunk-3CUFITU7.js +1905 -0
  9. package/dist/chunk-3CUFITU7.js.map +1 -0
  10. package/dist/chunk-3RYKIUAE.js +86 -0
  11. package/dist/chunk-3RYKIUAE.js.map +1 -0
  12. package/dist/chunk-44I73CQS.cjs +194 -0
  13. package/dist/chunk-44I73CQS.cjs.map +1 -0
  14. package/dist/chunk-5AUSSJIM.cjs +3372 -0
  15. package/dist/chunk-5AUSSJIM.cjs.map +1 -0
  16. package/dist/chunk-5PC6JBGJ.cjs +1419 -0
  17. package/dist/chunk-5PC6JBGJ.cjs.map +1 -0
  18. package/dist/chunk-5RU2HCW2.js +30 -0
  19. package/dist/chunk-5RU2HCW2.js.map +1 -0
  20. package/dist/chunk-5THUHJ3E.js +46 -0
  21. package/dist/chunk-5THUHJ3E.js.map +1 -0
  22. package/dist/chunk-5U7VLG43.js +141 -0
  23. package/dist/chunk-5U7VLG43.js.map +1 -0
  24. package/dist/chunk-6DAWSVX2.cjs +103 -0
  25. package/dist/chunk-6DAWSVX2.cjs.map +1 -0
  26. package/dist/chunk-6DKDOWBL.js +1567 -0
  27. package/dist/chunk-6DKDOWBL.js.map +1 -0
  28. package/dist/chunk-6IJOPRZP.cjs +197 -0
  29. package/dist/chunk-6IJOPRZP.cjs.map +1 -0
  30. package/dist/chunk-7G7G42KS.js +86 -0
  31. package/dist/chunk-7G7G42KS.js.map +1 -0
  32. package/dist/chunk-AINCI23X.js +2171 -0
  33. package/dist/chunk-AINCI23X.js.map +1 -0
  34. package/dist/chunk-AROWPFO2.js +773 -0
  35. package/dist/chunk-AROWPFO2.js.map +1 -0
  36. package/dist/chunk-AVQK77G6.cjs +2000 -0
  37. package/dist/chunk-AVQK77G6.cjs.map +1 -0
  38. package/dist/chunk-C57NEO3X.js +3327 -0
  39. package/dist/chunk-C57NEO3X.js.map +1 -0
  40. package/dist/chunk-CK3GK34R.js +1381 -0
  41. package/dist/chunk-CK3GK34R.js.map +1 -0
  42. package/dist/chunk-E2TGXG6X.cjs +1770 -0
  43. package/dist/chunk-E2TGXG6X.cjs.map +1 -0
  44. package/dist/chunk-EK362Q45.cjs +38 -0
  45. package/dist/chunk-EK362Q45.cjs.map +1 -0
  46. package/dist/chunk-FBV5DF6D.js +95 -0
  47. package/dist/chunk-FBV5DF6D.js.map +1 -0
  48. package/dist/chunk-FG4E7MTG.cjs +4 -0
  49. package/dist/chunk-FG4E7MTG.cjs.map +1 -0
  50. package/dist/chunk-G6IIVKMO.js +26 -0
  51. package/dist/chunk-G6IIVKMO.js.map +1 -0
  52. package/dist/chunk-HGC5JNVA.cjs +1503 -0
  53. package/dist/chunk-HGC5JNVA.cjs.map +1 -0
  54. package/dist/chunk-HSHCCBIV.js +255 -0
  55. package/dist/chunk-HSHCCBIV.js.map +1 -0
  56. package/dist/chunk-IEBZHTPE.js +254 -0
  57. package/dist/chunk-IEBZHTPE.js.map +1 -0
  58. package/dist/chunk-ISJDAFKS.js +1604 -0
  59. package/dist/chunk-ISJDAFKS.js.map +1 -0
  60. package/dist/chunk-J6KHW2E5.cjs +1963 -0
  61. package/dist/chunk-J6KHW2E5.cjs.map +1 -0
  62. package/dist/chunk-J7BMO73N.cjs +114 -0
  63. package/dist/chunk-J7BMO73N.cjs.map +1 -0
  64. package/dist/chunk-JL4C5VJ7.cjs +488 -0
  65. package/dist/chunk-JL4C5VJ7.cjs.map +1 -0
  66. package/dist/chunk-JSGIEF6Z.cjs +1087 -0
  67. package/dist/chunk-JSGIEF6Z.cjs.map +1 -0
  68. package/dist/chunk-JSNV5O2F.cjs +34 -0
  69. package/dist/chunk-JSNV5O2F.cjs.map +1 -0
  70. package/dist/chunk-JWA5SGCS.js +203 -0
  71. package/dist/chunk-JWA5SGCS.js.map +1 -0
  72. package/dist/chunk-JX5YZ4DH.cjs +430 -0
  73. package/dist/chunk-JX5YZ4DH.cjs.map +1 -0
  74. package/dist/chunk-KHCBJ7KD.js +42 -0
  75. package/dist/chunk-KHCBJ7KD.js.map +1 -0
  76. package/dist/chunk-KU6S7IYV.cjs +210 -0
  77. package/dist/chunk-KU6S7IYV.cjs.map +1 -0
  78. package/dist/chunk-LKAIXWK3.js +181 -0
  79. package/dist/chunk-LKAIXWK3.js.map +1 -0
  80. package/dist/chunk-LPW3XNC2.js +471 -0
  81. package/dist/chunk-LPW3XNC2.js.map +1 -0
  82. package/dist/chunk-M36G6SRP.js +447 -0
  83. package/dist/chunk-M36G6SRP.js.map +1 -0
  84. package/dist/chunk-MRXGWL42.cjs +4 -0
  85. package/dist/chunk-MRXGWL42.cjs.map +1 -0
  86. package/dist/chunk-NB72XWXQ.cjs +54 -0
  87. package/dist/chunk-NB72XWXQ.cjs.map +1 -0
  88. package/dist/chunk-NEJ2PV4C.cjs +211 -0
  89. package/dist/chunk-NEJ2PV4C.cjs.map +1 -0
  90. package/dist/chunk-NT6IJH4L.cjs +273 -0
  91. package/dist/chunk-NT6IJH4L.cjs.map +1 -0
  92. package/dist/chunk-O5MP52U2.cjs +526 -0
  93. package/dist/chunk-O5MP52U2.cjs.map +1 -0
  94. package/dist/chunk-O7PUQLJ3.cjs +818 -0
  95. package/dist/chunk-O7PUQLJ3.cjs.map +1 -0
  96. package/dist/chunk-PQHS255G.js +1369 -0
  97. package/dist/chunk-PQHS255G.js.map +1 -0
  98. package/dist/chunk-PRYE7AZQ.cjs +1227 -0
  99. package/dist/chunk-PRYE7AZQ.cjs.map +1 -0
  100. package/dist/chunk-Q4CDQ2KO.js +21 -0
  101. package/dist/chunk-Q4CDQ2KO.js.map +1 -0
  102. package/dist/chunk-QELDJGDK.cjs +1714 -0
  103. package/dist/chunk-QELDJGDK.cjs.map +1 -0
  104. package/dist/chunk-QJRP44ZO.js +769 -0
  105. package/dist/chunk-QJRP44ZO.js.map +1 -0
  106. package/dist/chunk-QNGNOU4Z.js +29 -0
  107. package/dist/chunk-QNGNOU4Z.js.map +1 -0
  108. package/dist/chunk-RJL7RCEM.cjs +159 -0
  109. package/dist/chunk-RJL7RCEM.cjs.map +1 -0
  110. package/dist/chunk-RN3RMBJZ.js +1164 -0
  111. package/dist/chunk-RN3RMBJZ.js.map +1 -0
  112. package/dist/chunk-S5DMKUWK.cjs +1273 -0
  113. package/dist/chunk-S5DMKUWK.cjs.map +1 -0
  114. package/dist/chunk-SES6GDBQ.cjs +624 -0
  115. package/dist/chunk-SES6GDBQ.cjs.map +1 -0
  116. package/dist/chunk-TNPDV7I4.cjs +2346 -0
  117. package/dist/chunk-TNPDV7I4.cjs.map +1 -0
  118. package/dist/chunk-TZBIY5C3.js +187 -0
  119. package/dist/chunk-TZBIY5C3.js.map +1 -0
  120. package/dist/chunk-TZE673G6.js +3 -0
  121. package/dist/chunk-TZE673G6.js.map +1 -0
  122. package/dist/chunk-ULXI7A6Q.cjs +1047 -0
  123. package/dist/chunk-ULXI7A6Q.cjs.map +1 -0
  124. package/dist/chunk-VIWSWVAW.js +1782 -0
  125. package/dist/chunk-VIWSWVAW.js.map +1 -0
  126. package/dist/chunk-VWGNPMJZ.cjs +19 -0
  127. package/dist/chunk-VWGNPMJZ.cjs.map +1 -0
  128. package/dist/chunk-WDIBOWAA.js +1054 -0
  129. package/dist/chunk-WDIBOWAA.js.map +1 -0
  130. package/dist/chunk-WNG7HRVA.cjs +25 -0
  131. package/dist/chunk-WNG7HRVA.cjs.map +1 -0
  132. package/dist/chunk-WNVQ3SMB.cjs +96 -0
  133. package/dist/chunk-WNVQ3SMB.cjs.map +1 -0
  134. package/dist/chunk-WRSWH7US.cjs +285 -0
  135. package/dist/chunk-WRSWH7US.cjs.map +1 -0
  136. package/dist/chunk-XAMC4S53.js +17 -0
  137. package/dist/chunk-XAMC4S53.js.map +1 -0
  138. package/dist/chunk-XNISPHTZ.js +1039 -0
  139. package/dist/chunk-XNISPHTZ.js.map +1 -0
  140. package/dist/chunk-Y2PM3FFL.js +3 -0
  141. package/dist/chunk-Y2PM3FFL.js.map +1 -0
  142. package/dist/chunk-YBPBK5KI.js +1030 -0
  143. package/dist/chunk-YBPBK5KI.js.map +1 -0
  144. package/dist/chunk-YHRG7UOC.js +31 -0
  145. package/dist/chunk-YHRG7UOC.js.map +1 -0
  146. package/dist/chunk-YWNYGYI7.cjs +31 -0
  147. package/dist/chunk-YWNYGYI7.cjs.map +1 -0
  148. package/dist/chunk-YYV35XOS.js +122 -0
  149. package/dist/chunk-YYV35XOS.js.map +1 -0
  150. package/dist/chunk-Z2OL5AJD.cjs +133 -0
  151. package/dist/chunk-Z2OL5AJD.cjs.map +1 -0
  152. package/dist/chunk-Z4AZW6FY.js +920 -0
  153. package/dist/chunk-Z4AZW6FY.js.map +1 -0
  154. package/dist/chunk-ZDFHA2EC.js +572 -0
  155. package/dist/chunk-ZDFHA2EC.js.map +1 -0
  156. package/dist/chunk-ZNZDQAXN.js +175 -0
  157. package/dist/chunk-ZNZDQAXN.js.map +1 -0
  158. package/dist/chunk-ZRL2UFTH.cjs +1073 -0
  159. package/dist/chunk-ZRL2UFTH.cjs.map +1 -0
  160. package/dist/chunk-ZT77RY6R.js +404 -0
  161. package/dist/chunk-ZT77RY6R.js.map +1 -0
  162. package/dist/entries/apps.cjs +155 -0
  163. package/dist/entries/apps.cjs.map +1 -0
  164. package/dist/entries/apps.d.cts +283 -0
  165. package/dist/entries/apps.d.ts +283 -0
  166. package/dist/entries/apps.js +10 -0
  167. package/dist/entries/apps.js.map +1 -0
  168. package/dist/entries/captions.cjs +124 -0
  169. package/dist/entries/captions.cjs.map +1 -0
  170. package/dist/entries/captions.d.cts +354 -0
  171. package/dist/entries/captions.d.ts +354 -0
  172. package/dist/entries/captions.js +3 -0
  173. package/dist/entries/captions.js.map +1 -0
  174. package/dist/entries/catalogs.cjs +165 -0
  175. package/dist/entries/catalogs.cjs.map +1 -0
  176. package/dist/entries/catalogs.d.cts +385 -0
  177. package/dist/entries/catalogs.d.ts +385 -0
  178. package/dist/entries/catalogs.js +4 -0
  179. package/dist/entries/catalogs.js.map +1 -0
  180. package/dist/entries/credits.cjs +592 -0
  181. package/dist/entries/credits.cjs.map +1 -0
  182. package/dist/entries/credits.d.cts +1429 -0
  183. package/dist/entries/credits.d.ts +1429 -0
  184. package/dist/entries/credits.js +11 -0
  185. package/dist/entries/credits.js.map +1 -0
  186. package/dist/entries/edl.cjs +409 -0
  187. package/dist/entries/edl.cjs.map +1 -0
  188. package/dist/entries/edl.d.cts +1199 -0
  189. package/dist/entries/edl.d.ts +1199 -0
  190. package/dist/entries/edl.js +4 -0
  191. package/dist/entries/edl.js.map +1 -0
  192. package/dist/entries/entities.cjs +530 -0
  193. package/dist/entries/entities.cjs.map +1 -0
  194. package/dist/entries/entities.d.cts +1371 -0
  195. package/dist/entries/entities.d.ts +1371 -0
  196. package/dist/entries/entities.js +5 -0
  197. package/dist/entries/entities.js.map +1 -0
  198. package/dist/entries/i18n.cjs +48 -0
  199. package/dist/entries/i18n.cjs.map +1 -0
  200. package/dist/entries/i18n.d.cts +69 -0
  201. package/dist/entries/i18n.d.ts +69 -0
  202. package/dist/entries/i18n.js +3 -0
  203. package/dist/entries/i18n.js.map +1 -0
  204. package/dist/entries/llm-models.cjs +177 -0
  205. package/dist/entries/llm-models.cjs.map +1 -0
  206. package/dist/entries/llm-models.d.cts +435 -0
  207. package/dist/entries/llm-models.d.ts +435 -0
  208. package/dist/entries/llm-models.js +4 -0
  209. package/dist/entries/llm-models.js.map +1 -0
  210. package/dist/entries/media.cjs +335 -0
  211. package/dist/entries/media.cjs.map +1 -0
  212. package/dist/entries/media.d.cts +518 -0
  213. package/dist/entries/media.d.ts +518 -0
  214. package/dist/entries/media.js +6 -0
  215. package/dist/entries/media.js.map +1 -0
  216. package/dist/entries/model-catalog.cjs +247 -0
  217. package/dist/entries/model-catalog.cjs.map +1 -0
  218. package/dist/entries/model-catalog.d.cts +202 -0
  219. package/dist/entries/model-catalog.d.ts +202 -0
  220. package/dist/entries/model-catalog.js +6 -0
  221. package/dist/entries/model-catalog.js.map +1 -0
  222. package/dist/entries/models.cjs +833 -0
  223. package/dist/entries/models.cjs.map +1 -0
  224. package/dist/entries/models.d.cts +287 -0
  225. package/dist/entries/models.d.ts +287 -0
  226. package/dist/entries/models.js +8 -0
  227. package/dist/entries/models.js.map +1 -0
  228. package/dist/entries/nodes.cjs +789 -0
  229. package/dist/entries/nodes.cjs.map +1 -0
  230. package/dist/entries/nodes.d.cts +1600 -0
  231. package/dist/entries/nodes.d.ts +1600 -0
  232. package/dist/entries/nodes.js +16 -0
  233. package/dist/entries/nodes.js.map +1 -0
  234. package/dist/entries/organizations.cjs +80 -0
  235. package/dist/entries/organizations.cjs.map +1 -0
  236. package/dist/entries/organizations.d.cts +466 -0
  237. package/dist/entries/organizations.d.ts +466 -0
  238. package/dist/entries/organizations.js +3 -0
  239. package/dist/entries/organizations.js.map +1 -0
  240. package/dist/entries/pipeline.cjs +594 -0
  241. package/dist/entries/pipeline.cjs.map +1 -0
  242. package/dist/entries/pipeline.d.cts +2617 -0
  243. package/dist/entries/pipeline.d.ts +2617 -0
  244. package/dist/entries/pipeline.js +5 -0
  245. package/dist/entries/pipeline.js.map +1 -0
  246. package/dist/entries/scene3d.cjs +704 -0
  247. package/dist/entries/scene3d.cjs.map +1 -0
  248. package/dist/entries/scene3d.d.cts +4284 -0
  249. package/dist/entries/scene3d.d.ts +4284 -0
  250. package/dist/entries/scene3d.js +3 -0
  251. package/dist/entries/scene3d.js.map +1 -0
  252. package/dist/entries/social.cjs +714 -0
  253. package/dist/entries/social.cjs.map +1 -0
  254. package/dist/entries/social.d.cts +1366 -0
  255. package/dist/entries/social.d.ts +1366 -0
  256. package/dist/entries/social.js +5 -0
  257. package/dist/entries/social.js.map +1 -0
  258. package/dist/entries/types.cjs +13 -0
  259. package/dist/entries/types.cjs.map +1 -0
  260. package/dist/entries/types.d.cts +162 -0
  261. package/dist/entries/types.d.ts +162 -0
  262. package/dist/entries/types.js +4 -0
  263. package/dist/entries/types.js.map +1 -0
  264. package/dist/entries/ugc.cjs +279 -0
  265. package/dist/entries/ugc.cjs.map +1 -0
  266. package/dist/entries/ugc.d.cts +575 -0
  267. package/dist/entries/ugc.d.ts +575 -0
  268. package/dist/entries/ugc.js +6 -0
  269. package/dist/entries/ugc.js.map +1 -0
  270. package/dist/entries/video.cjs +549 -0
  271. package/dist/entries/video.cjs.map +1 -0
  272. package/dist/entries/video.d.cts +1791 -0
  273. package/dist/entries/video.d.ts +1791 -0
  274. package/dist/entries/video.js +8 -0
  275. package/dist/entries/video.js.map +1 -0
  276. package/dist/entries/workflow.cjs +574 -0
  277. package/dist/entries/workflow.cjs.map +1 -0
  278. package/dist/entries/workflow.d.cts +1733 -0
  279. package/dist/entries/workflow.d.ts +1733 -0
  280. package/dist/entries/workflow.js +5 -0
  281. package/dist/entries/workflow.js.map +1 -0
  282. package/dist/fan-out-meta-Bu6VyXcZ.d.cts +19 -0
  283. package/dist/fan-out-meta-Bu6VyXcZ.d.ts +19 -0
  284. package/dist/gemini-omni-voices-zeRXxSbZ.d.cts +174 -0
  285. package/dist/gemini-omni-voices-zeRXxSbZ.d.ts +174 -0
  286. package/dist/image-overlay-layers-CyBfRhxJ.d.cts +208 -0
  287. package/dist/image-overlay-layers-CyBfRhxJ.d.ts +208 -0
  288. package/dist/index.cjs +7731 -27084
  289. package/dist/index.cjs.map +1 -1
  290. package/dist/index.d.cts +32 -24198
  291. package/dist/index.d.ts +32 -24198
  292. package/dist/index.js +40 -25220
  293. package/dist/index.js.map +1 -1
  294. package/dist/model-catalog-flJYaa-g.d.cts +561 -0
  295. package/dist/model-catalog-flJYaa-g.d.ts +561 -0
  296. package/dist/presentation-types-0ENOCjoj.d.cts +61 -0
  297. package/dist/presentation-types-0ENOCjoj.d.ts +61 -0
  298. package/dist/presentation-utils-BIqiCzSA.d.cts +90 -0
  299. package/dist/presentation-utils-BdiObtwq.d.ts +90 -0
  300. package/dist/scene-node-types-DjenYFLO.d.cts +1949 -0
  301. package/dist/scene-node-types-DjenYFLO.d.ts +1949 -0
  302. package/dist/supported-fonts-CRoF1gOy.d.cts +16 -0
  303. package/dist/supported-fonts-CRoF1gOy.d.ts +16 -0
  304. package/dist/types-BRlFPEru.d.cts +511 -0
  305. package/dist/types-BRlFPEru.d.ts +511 -0
  306. package/dist/types-DffyGSy5.d.cts +67 -0
  307. package/dist/types-DffyGSy5.d.ts +67 -0
  308. package/package.json +102 -1
  309. package/src/__tests__/add-captions-plan.test.ts +6 -2
  310. package/src/__tests__/caption-edge-dash.test.ts +23 -0
  311. package/src/__tests__/fixtures/root-exports.baseline.json +4625 -0
  312. package/src/__tests__/input-field-extra-keys.test.ts +1 -0
  313. package/src/__tests__/no-internal-imports.test.ts +1 -1
  314. package/src/__tests__/node-aspect-ratio.test.ts +25 -0
  315. package/src/__tests__/node-runtime-keys.test.ts +9 -0
  316. package/src/__tests__/package-entries.test.ts +50 -0
  317. package/src/__tests__/pitch-tempo-pricing.test.ts +21 -0
  318. package/src/__tests__/preview-gate-use-case.test.ts +151 -0
  319. package/src/__tests__/run-continuation.test.ts +7 -1
  320. package/src/__tests__/site-capture-node.test.ts +58 -0
  321. package/src/__tests__/ugc-lane-wires.test.ts +228 -0
  322. package/src/__tests__/ugc-node-wires.test.ts +9 -3
  323. package/src/__tests__/ugc-run-state.test.ts +5 -4
  324. package/src/__tests__/video-analysis-catalog-sync.test.ts +1 -1
  325. package/src/__tests__/video-analysis-pricing.test.ts +6 -6
  326. package/src/__tests__/voice-changer-pro-quote.test.ts +79 -0
  327. package/src/add-captions-plan.ts +9 -3
  328. package/src/caption-edge-dash.ts +33 -0
  329. package/src/credit-estimators/index.ts +22 -1
  330. package/src/credit-estimators/pitch-tempo.ts +15 -1
  331. package/src/credit-estimators/speech.ts +72 -4
  332. package/src/credit-estimators/unit-quote.ts +52 -0
  333. package/src/credit-estimators/video-sfx.ts +15 -0
  334. package/src/credit-estimators/voice-changer-pro-quote.ts +138 -0
  335. package/src/entity-image-handle.ts +2 -0
  336. package/src/entries/apps.ts +63 -0
  337. package/src/entries/captions.ts +34 -0
  338. package/src/entries/catalogs.ts +65 -0
  339. package/src/entries/credits.ts +104 -0
  340. package/src/entries/edl.ts +42 -0
  341. package/src/entries/entities.ts +144 -0
  342. package/src/entries/i18n.ts +31 -0
  343. package/src/entries/llm-models.ts +63 -0
  344. package/src/entries/media.ts +36 -0
  345. package/src/entries/model-catalog.ts +89 -0
  346. package/src/entries/models.ts +266 -0
  347. package/src/entries/nodes.ts +245 -0
  348. package/src/entries/organizations.ts +9 -0
  349. package/src/entries/pipeline.ts +43 -0
  350. package/src/entries/scene3d.ts +27 -0
  351. package/src/entries/social.ts +297 -0
  352. package/src/entries/types.ts +26 -0
  353. package/src/entries/ugc.ts +14 -0
  354. package/src/entries/video.ts +59 -0
  355. package/src/entries/workflow.ts +172 -0
  356. package/src/fan-out-rows.ts +2 -0
  357. package/src/index.ts +25 -1845
  358. package/src/json-kinds.ts +4 -0
  359. package/src/model-catalog.ts +36 -34
  360. package/src/node-mappable-fields.ts +1 -0
  361. package/src/node-run-routes.ts +2 -0
  362. package/src/node-runtime-keys.ts +8 -0
  363. package/src/normalize-node-params.ts +30 -0
  364. package/src/presentation-utils.ts +5 -0
  365. package/src/preview-gate.ts +92 -14
  366. package/src/producer-types.ts +16 -2
  367. package/src/run-continuation.ts +21 -0
  368. package/src/site-capture-node.ts +82 -0
  369. package/src/ugc-lane-wires.ts +246 -0
  370. package/src/ugc-node-wires.ts +37 -7
  371. package/src/ugc-run-state.ts +5 -3
  372. package/src/video-analysis-pricing.ts +31 -29
@@ -0,0 +1,1949 @@
1
+ import { z } from 'zod';
2
+
3
+ /**
4
+ * Model constants shared between frontend and backend.
5
+ * Single source of truth for model capability sets and variable pricing rules.
6
+ */
7
+
8
+ /** Base USD value of 1 Nodaro credit. Used for cost→credit conversion. */
9
+ declare const CREDIT_BASE_USD = 0.002;
10
+ /** Max characters for the (assembled) prompt accepted by the image-generation routes
11
+ * (generate-image, image-to-image, edit-image). Single source of truth — the route Zod
12
+ * schemas and the factory-preset guard test all read this. Prompt cap ONLY (not negativePrompt). */
13
+ declare const IMAGE_PROMPT_MAX = 5000;
14
+ /**
15
+ * The ONE aspect-ratio vocabulary the image routes' Zod enums are built from —
16
+ * `/v1/generate-image`, `/v1/image-to-image` and `/v1/edit-image` all declare
17
+ * `z.enum(IMAGE_ASPECT_RATIO_VALUES)` instead of keeping three literal lists
18
+ * that drift.
19
+ *
20
+ * It is the UNION of every ratio any `kind: "image"` catalog entry declares, so
21
+ * a value the picker offers can never 400 at the route. That gap has shipped
22
+ * twice — Wan 2.7's ultra-wide `8:1`/`1:8` (fixed on generate-image only) and
23
+ * Nano Banana 2 Lite's banner `4:1`/`1:4` (still open until this tuple landed).
24
+ * `packages/shared/src/__tests__/image-pricing-catalog-coverage.test.ts` fails
25
+ * the build if a new model declares a ratio this tuple is missing.
26
+ *
27
+ * This enum is a VOCABULARY BOUND, not a per-model gate: it only stops a
28
+ * free-form string from reaching a provider as `image_size`. The per-model gate
29
+ * is the catalog snap (`resolveNormalizedImageGen` → `normalizeModelInput`),
30
+ * which CORRECTS an unsupported ratio and discloses it in the response's
31
+ * `adjustments` — never rejects. So widening this tuple is always safe: it
32
+ * defers a rejection to the correcting snap, which is the desired behaviour.
33
+ *
34
+ * `auto` is model-specific (GPT Image 2 / Nano Banana 2 Lite treat it as
35
+ * "native"); it lives here for the same reason as the rest — the snap drops or
36
+ * replaces it for models that do not declare it.
37
+ */
38
+ declare const IMAGE_ASPECT_RATIO_VALUES: readonly ["auto", "1:1", "16:9", "9:16", "4:3", "3:4", "3:2", "2:3", "5:4", "4:5", "21:9", "4:1", "1:4", "8:1", "1:8", "27:16", "16:27", "9:8", "8:9"];
39
+ /** A ratio string the image routes accept (pre-snap vocabulary, not a per-model guarantee). */
40
+ type ImageAspectRatio = typeof IMAGE_ASPECT_RATIO_VALUES[number];
41
+ /**
42
+ * Per-provider maximum ASSEMBLED image-prompt length (chars), VERIFIED against
43
+ * each model's official docs.kie.ai schema (2026-06). Providers absent here use
44
+ * {@link IMAGE_PROMPT_MAX} (the documented KIE "standard" of 5000). Read via
45
+ * {@link getMaxImagePromptChars} by the prompt assembler's truncation AND the
46
+ * frontend over-limit warning — the data-driven replacement for the old
47
+ * hardcoded 2000 that silently severed appended cinematography hints + the
48
+ * `Avoid:` negative on long prompts.
49
+ *
50
+ * Both directions matter: some models accept FAR MORE than 5000 (nano-banana-2 /
51
+ * gpt-image-2-i2i = 20000) and some FAR LESS (seedream-5-lite = 1000) — sending
52
+ * 5000 to a 1000-char model is a provider-side rejection. Only list a value you
53
+ * can quote from the official schema; the t2i / i2i / edit siblings of one family
54
+ * genuinely differ (verified: qwen t2i 3000 vs qwen-i2i 5000 vs qwen-edit 2000),
55
+ * so never copy a sibling's number.
56
+ *
57
+ * Truncation is a graceful safety net, never a hard reject — the editor warns the
58
+ * user BEFORE submit (switch model / trim) and the assembler truncates if they
59
+ * proceed. So the image routes stay generous (a single high ceiling) and the
60
+ * per-model enforcement lives here.
61
+ */
62
+ declare const MAX_IMAGE_PROMPT_CHARS_BY_PROVIDER: Record<string, number>;
63
+ /** Max assembled image-prompt length (chars) for a provider: its verified
64
+ * override from {@link MAX_IMAGE_PROMPT_CHARS_BY_PROVIDER}, else the
65
+ * {@link IMAGE_PROMPT_MAX} default. Single source of truth shared by the prompt
66
+ * assembler, the over-limit warning, and the image-route ceiling. */
67
+ declare function getMaxImagePromptChars(provider: string | undefined): number;
68
+ /**
69
+ * Video prompt/negative cap shared by routes + editor (MCP verbs already use
70
+ * 8000). Providers allow far more (KIE seedance-2: 20k chars) — the old
71
+ * per-route 2500 was a false-positive blocker for legitimate multi-shot
72
+ * Seedance prompts.
73
+ */
74
+ declare const VIDEO_PROMPT_MAX = 8000;
75
+ /**
76
+ * Suno prompt / lyrics / content ceiling — the LARGEST any Suno version accepts
77
+ * in custom mode (V6 family and V4.5+ / V5 / V5.5 = 5000). NOT the route
78
+ * Zod bound — the routes bind at {@link SUNO_HARD_CEILING} and clamp to the
79
+ * per-version cap via {@link getMaxSunoPromptChars} (3000 non-custom for every
80
+ * version; in custom mode 3000 for V4/V3.5, 5000 for V4.5+/V5/V6) before the job
81
+ * is built. This constant is shared with the editor `maxLength` / counter
82
+ * (warn-don't-block at the per-version cap). `style` and `title` have their
83
+ * own caps ({@link getMaxSunoStyleChars} / {@link SUNO_TITLE_MAX}).
84
+ */
85
+ declare const SUNO_TEXT_MAX = 5000;
86
+ /**
87
+ * Absolute ceiling for every Suno text field on the route Zod schemas
88
+ * (`prompt`, `lyrics`, `fullLyrics`, `content`, `userPrompt`).
89
+ *
90
+ * WARN-DON'T-BLOCK. The per-version caps ({@link getMaxSunoPromptChars} /
91
+ * {@link getMaxSunoStyleChars}) do the real work — the routes CLAMP to them
92
+ * before building the job. The Zod bound only exists to stop abuse, so it must
93
+ * stay generous: until 2026-09 the routes bounded these fields at
94
+ * {@link SUNO_TEXT_MAX} (5000), which meant a programmatically-set prompt (an
95
+ * agent, an app run, a FieldMapping) was hard-REJECTED with a 400 before the
96
+ * clamp could trim it — three app-report rows on 2026-08-19..31.
97
+ *
98
+ * DISTINCT FROM {@link PROMPT_HARD_CEILING} on purpose: that one is an
99
+ * image/video budget pinned to MAX_IMAGE/VIDEO_PROMPT_CHARS_BY_PROVIDER by its
100
+ * own drift guard. Coupling them would let one modality's limits move the
101
+ * other's. This one has a single invariant, enforced in
102
+ * `__tests__/prompt-length-limits.test.ts`: it MUST stay >= every value
103
+ * getMaxSunoPromptChars / getMaxSunoStyleChars can return.
104
+ */
105
+ declare const SUNO_HARD_CEILING = 30000;
106
+ /**
107
+ * Absolute ceiling for the `prompt` / `negativePrompt` fields on the image and
108
+ * video routes' Zod schemas. The PER-MODEL limits below (and the editor warning)
109
+ * do the real work; the routes stay generous so they never hard-reject a legit
110
+ * long prompt — the assembler/payload truncates to the model cap as a graceful
111
+ * safety net (warn-don't-block). 30000 = the largest verified per-model image/
112
+ * video limit (seedance-2-5; seedance-2 / nano-banana-2 / gemini-omni sit at
113
+ * 20000). Anything past this is abuse, not a real prompt.
114
+ *
115
+ * This MUST stay >= the largest entry in MAX_VIDEO_PROMPT_CHARS_BY_PROVIDER /
116
+ * MAX_IMAGE_PROMPT_CHARS_BY_PROVIDER — otherwise the route's Zod hard-rejects a
117
+ * prompt the model itself would have accepted, which is exactly the
118
+ * block-instead-of-warn behaviour this ceiling exists to avoid. A drift guard in
119
+ * `__tests__/prompt-length-limits.test.ts` enforces that relationship.
120
+ */
121
+ declare const PROMPT_HARD_CEILING = 30000;
122
+ /**
123
+ * Ceiling for LLM TEXT-generation node inputs (the "Generate Text"/llm-chat node
124
+ * + AI Writer + Generate Script `systemPrompt`/`userInput`/`prompt` fields).
125
+ * Distinct from PROMPT_HARD_CEILING (an image/video PROMPT budget): these inputs
126
+ * go straight into an LLM whose context is huge (Claude 200K / GPT 128K+ /
127
+ * Gemini 1M tokens), so the old flat 10000 was a false blocker on pasting a
128
+ * document to summarize or rewrite. 100000 chars (~25K input tokens) covers
129
+ * long-form inputs while still bounding abuse; the OUTPUT stays capped by each
130
+ * route's maxTokens.
131
+ */
132
+ declare const LLM_TEXT_INPUT_MAX = 100000;
133
+ /**
134
+ * Per-provider maximum VIDEO prompt length (chars), VERIFIED against each model's
135
+ * official docs.kie.ai schema (2026-06). Absent → {@link VIDEO_PROMPT_MAX} (8000)
136
+ * default (used for models whose schema states NO limit: veo3 family, kling-3.0,
137
+ * kling-3-omni, runway-aleph). Read via {@link getMaxVideoPromptChars}.
138
+ *
139
+ * Most video models cap WELL BELOW the old flat 8000 (kling 2.6 = 1000!), so the
140
+ * 8000 route value was over-sending to nearly every provider. A few accept much
141
+ * more (seedance-2 = 20000). Mode note: where a model's t2v and i2v schemas
142
+ * differ, the SMALLER is used so neither mode over-sends (hailuo-2.3-pro: t2v
143
+ * 1500 / i2v 5000 → 1500).
144
+ */
145
+ declare const MAX_VIDEO_PROMPT_CHARS_BY_PROVIDER: Record<string, number>;
146
+ /** Max video-prompt length (chars) for a provider: verified override, else
147
+ * {@link VIDEO_PROMPT_MAX}. Shared by the video routes/payload truncation and
148
+ * the editor over-limit warning. */
149
+ declare function getMaxVideoPromptChars(provider: string | undefined): number;
150
+ /** Default negative-prompt cap when a provider has no specific verified limit. */
151
+ declare const NEGATIVE_PROMPT_MAX = 5000;
152
+ /**
153
+ * Per-provider native `negative_prompt` cap (chars), VERIFIED from docs.kie.ai.
154
+ * Only matters for providers that send the negative as a NATIVE param
155
+ * ({@link NATIVE_NEGATIVE_PROMPT_MODELS} / {@link NATIVE_NEGATIVE_VIDEO_PROVIDERS});
156
+ * everywhere else the negative is folded into the prompt as `Avoid: …` and rides
157
+ * the prompt cap. Absent → {@link NEGATIVE_PROMPT_MAX}.
158
+ */
159
+ declare const MAX_NEGATIVE_PROMPT_CHARS_BY_PROVIDER: Record<string, number>;
160
+ /** Max native negative-prompt length (chars) for a provider. */
161
+ declare function getMaxNegativePromptChars(provider: string | undefined): number;
162
+ /** What {@link getMaxTtsChars} answers for an id with no entry of its own: the legacy `elevenlabs` alias (which runs as turbo — pass `canonicalTtsProvider(id)` to get that model's cap), a missing id and an unknown id. */
163
+ declare const TTS_TEXT_MAX = 5000;
164
+ /**
165
+ * Per-model Text-to-Speech character cap (PER REQUEST). DERIVED from each
166
+ * speech model's capability sheet (`tts.maxChars` in `MODEL_CATALOG`) — set the
167
+ * cap there, never here. Absent → {@link TTS_TEXT_MAX}.
168
+ */
169
+ declare const MAX_TTS_CHARS_BY_PROVIDER: Record<string, number>;
170
+ /**
171
+ * Max TTS text length (chars) for a provider: verified override, else
172
+ * {@link TTS_TEXT_MAX}. The legacy `elevenlabs` alias has no entry of its own
173
+ * (callers that mean the model it runs as pass `canonicalTtsProvider(id)`), and
174
+ * an id named like an inherited object member (`constructor`) is just unknown.
175
+ */
176
+ declare function getMaxTtsChars(provider: string | undefined): number;
177
+ /**
178
+ * Suno per-version field caps (from docs.kie.ai/suno-api/generate-music). The
179
+ * original flat 3000 cap was simultaneously too low for V4.5+/V5 prompts
180
+ * (5000) and too high for `style` (1000) and `title` (80). ({@link
181
+ * SUNO_TEXT_MAX} is 5000 today — the largest per-version prompt cap; the
182
+ * route Zod bound is {@link SUNO_HARD_CEILING}.)
183
+ * - prompt / lyrics: 3000 in non-custom mode (all versions); in custom mode
184
+ * 3000 for V4/V3.5 and 5000 for V4.5 / V4.5PLUS / V4.5ALL / V5 / V5.5 and
185
+ * the whole V6 family (V6 / V6_WILD / V6_MINI).
186
+ * - style: 200 for V4/V3.5, 1000 for V4.5+ and V6.
187
+ * - title: 80 (all versions; the extend docs quote 100 for V6 — we keep the
188
+ * stricter generate cap so one value is right everywhere).
189
+ */
190
+ declare const SUNO_TITLE_MAX = 80;
191
+ /**
192
+ * Max Suno `prompt` (= lyrics in custom mode) length for a model version.
193
+ *
194
+ * NON-CUSTOM WAS 500 UNTIL 2026-08-19 — six times under the provider's
195
+ * documented 3000, and the route TRUNCATES to this number instead of
196
+ * rejecting, so everything past it vanished without a trace. Field evidence:
197
+ * a 950-character recast score brief (instruments, vocal, the source's own
198
+ * scat syllables, the arrangement's arc) reached Suno as exactly 500
199
+ * characters, cut mid-word.
200
+ */
201
+ declare function getMaxSunoPromptChars(model: string | undefined, customMode: boolean): number;
202
+ /** Max Suno `style` length for a model version. */
203
+ declare function getMaxSunoStyleChars(model: string | undefined): number;
204
+ declare const NATIVE_NEGATIVE_PROMPT_MODELS: Set<string>;
205
+ /**
206
+ * Video providers that accept `negative_prompt` natively in their KIE.ai
207
+ * request payload. Everywhere else, the helper below appends `Avoid: <text>`
208
+ * to the prompt instead so the negative intent still reaches the model.
209
+ *
210
+ * Sourced from inline comments in `backend/src/providers/kie/video.ts`
211
+ * (Kling family + Wan family) plus the wan-s2v speech-to-video flow.
212
+ *
213
+ * NOT included (KIE will silently drop the param):
214
+ * minimax / hailuo-* family, veo3.* family, sora2 / sora2-pro,
215
+ * bytedance-* family, grok / grok-i2v, seedance-* family,
216
+ * happyhorse-*, ltx-* family, runway-kie, wan-animate-move/replace
217
+ * (Wan Animate is a separate model from regular Wan and doesn't take
218
+ * negative_prompt — verified against KIE docs 2026-05-28).
219
+ */
220
+ declare const NATIVE_NEGATIVE_VIDEO_PROVIDERS: Set<string>;
221
+ /**
222
+ * The `Avoid: …` suffix `applyVideoNegativePrompt` folds into a prompt, with the
223
+ * separator the base prompt calls for: a blank line when the base ends INSIDE an
224
+ * unterminated `[style]` section, a single newline otherwise.
225
+ *
226
+ * `base` omitted = the WIDEST form, which is what a caller reserving room before
227
+ * the prompt exists must budget for (`effectiveVideoPromptCeiling`).
228
+ */
229
+ declare function videoNegativeSuffix(negativePrompt: string, base?: string): string;
230
+ /**
231
+ * Apply the negative prompt to a video-provider request.
232
+ *
233
+ * If the provider natively accepts `negative_prompt` (Kling / Wan families),
234
+ * the helper returns the original prompt and the trimmed negative as
235
+ * `nativeNegativePrompt` — the caller should forward it as the API's
236
+ * dedicated field.
237
+ *
238
+ * Otherwise, the helper appends `Avoid: <negativePrompt>` to the prompt
239
+ * (consistent with `buildImagePrompt` in `prompt-builder.ts`) so the model
240
+ * still sees the negative intent, and returns `nativeNegativePrompt = undefined`.
241
+ * The line is separated by {@link videoNegativeSuffix}, which closes an open
242
+ * `[style]` section with a blank line rather than reading as a look clause.
243
+ *
244
+ * Empty / missing negative is a no-op.
245
+ *
246
+ * Naming mirrors the established image-side pattern. Keep the wording
247
+ * identical to `prompt-builder.ts` ("Avoid: ...") so users moving between
248
+ * image and video nodes see consistent behavior.
249
+ */
250
+ declare function applyVideoNegativePrompt(prompt: string | undefined, negativePrompt: string | undefined, provider: string): {
251
+ prompt: string | undefined;
252
+ nativeNegativePrompt: string | undefined;
253
+ };
254
+ declare const MODELS_WITH_REFERENCE_IMAGE_SUPPORT: Set<string>;
255
+ /**
256
+ * T2I provider → i2i sibling. When a generate-image node carries reference
257
+ * images and the chosen provider is in this map, the backend route
258
+ * transparently routes to the i2i variant so the refs are actually used.
259
+ *
260
+ * The user keeps seeing the T2I name in the UI; the warning component shows
261
+ * an info hint that the i2i variant is being used under the hood.
262
+ */
263
+ declare const T2I_TO_I2I_VARIANT: Record<string, string>;
264
+ /**
265
+ * Maximum number of reference images each provider accepts.
266
+ * Sourced from the corresponding KIE.ai endpoint's documented input array
267
+ * size, or from the model's natural input shape (single-source i2i = 1).
268
+ *
269
+ * Providers absent from this map default to `DEFAULT_REF_IMAGE_MAX` (4).
270
+ * Providers absent from `MODELS_WITH_REFERENCE_IMAGE_SUPPORT` ignore
271
+ * reference images entirely regardless of this value.
272
+ */
273
+ declare const REF_IMAGE_MAX_LIMITS: Record<string, number>;
274
+ declare const DEFAULT_REF_IMAGE_MAX = 4;
275
+ /**
276
+ * Maximum reference images the UI should advertise for an IMAGE model — the
277
+ * scalar image analogue of the video side's `videoReferenceLimits` (images have
278
+ * a single reference kind, so a scalar suffices). Studio's Framing picker reads
279
+ * this for its "References" chip; the editor's reference-handle popover reads it
280
+ * too (via `getHandleConnectionLimit`).
281
+ *
282
+ * Returns 0 when the model accepts no reference images at all (so callers can
283
+ * hide the chip / disable the handle), else the per-model cap from
284
+ * {@link REF_IMAGE_MAX_LIMITS} (fallback {@link DEFAULT_REF_IMAGE_MAX}).
285
+ * Therefore `imageReferenceLimit(p) > 0` is an exact "supports references" gate.
286
+ *
287
+ * Two behaviors keep the count matching what a user actually gets:
288
+ * 1. T2I → i2i resolution. Pickers list text-to-image ids (grok, gpt-image-2,
289
+ * seedream-5-lite, flux, …). When references are attached the generate-image
290
+ * route silently routes to the i2i sibling ({@link T2I_TO_I2I_VARIANT}) —
291
+ * the endpoint that actually consumes refs — so the advertised cap is the
292
+ * SIBLING's (grok→grok-i2i = 1, gpt-image-2→gpt-image-2-i2i = 16), never the
293
+ * t2i id's absent default. Mirrors the swap `resolveNormalizedImageGen`
294
+ * makes for the route and the workflow run alike.
295
+ * 2. {@link REF_IMAGE_MAX_LIMITS} is the PRODUCT/UI cap, which may be
296
+ * intentionally TIGHTER than the raw provider schema (e.g. flux-2-pro = 4
297
+ * here though the BFL schema accepts 8; flux-2-klein = 1 though the array
298
+ * slices at 5). The user-facing count must reflect the product cap, so the
299
+ * reader reads this map verbatim — do NOT "fix" these to the schema maxima.
300
+ */
301
+ declare function imageReferenceLimit(provider: string | undefined): number;
302
+ declare const VARIABLE_PRICING_MODELS: Record<string, "quality" | "resolution" | "rendering-speed">;
303
+ declare const HIGH_QUALITY_PROVIDERS: Set<string>;
304
+ declare const TWO_K_RESOLUTION_PROVIDERS: Set<string>;
305
+ declare const IDEOGRAM_PROVIDERS: Set<string>;
306
+ /** Text-to-image providers (no input image required) */
307
+ declare const IMAGE_GEN_PROVIDERS: readonly ["nano-banana", "flux", "nano-banana-pro", "nano-banana-2", "nano-banana-2-lite", "nano-banana-2-1", "grok", "grok-2", "gpt-image", "gpt-image-2", "gpt-image-2-5-flare", "gpt-image-2-5-sunburst", "imagen4", "imagen4-fast", "imagen4-ultra", "ideogram-v3", "qwen", "seedream", "seedream-5-lite", "seedream-5-pro", "seedream-5-flash", "flux-flex", "flux-kontext", "flux-kontext-max", "z-image", "wan-2.7", "wan-2.7-pro", "flux-2-klein", "flux-2-pro", "flux-2-max"];
308
+ /** Image-to-image providers (require input image) */
309
+ declare const IMAGE_I2I_PROVIDERS: readonly ["nano-banana", "nano-banana-2", "nano-banana-2-lite", "nano-banana-2-1", "nano-banana-pro", "grok-i2i", "flux-i2i", "flux-pro-i2i", "gpt-image-i2i", "gpt-image-2-i2i", "gpt-image-2-5-flare-i2i", "gpt-image-2-5-sunburst-i2i", "grok-2-i2i", "ideogram-edit", "ideogram-remix", "qwen-i2i", "qwen-edit", "seedream-edit", "seedream-5-lite-i2i", "seedream-5-pro-i2i", "seedream-5-flash-i2i", "flux-kontext", "flux-kontext-max", "kontext-multi", "flux-2-pro", "flux-fill", "flux-2-max", "flux-fill"];
310
+ /** Image editing providers (upscale, remove bg, etc.) */
311
+ declare const IMAGE_EDIT_PROVIDERS: readonly ["recraft-upscale", "recraft-remove-bg", "nano-banana-edit", "topaz-image-upscale", "grok-upscale", "grok-2-edit", "grok-2-segment"];
312
+ /**
313
+ * Edit providers that take a PRIOR KIE Grok generation's task id instead of
314
+ * an image URL. Single source of truth for the taskId-vs-imageUrl branching:
315
+ * the edit-image route requires `taskId` (imageUrl alone is rejected), the
316
+ * worker routes `taskId` into the provider call, and the KIE model config
317
+ * (`imageParam: "task_id"`) places it in the request body. Membership here
318
+ * must match the KIE configs with `imageParam: "task_id"` — guarded by
319
+ * backend/src/routes/__tests__/edit-image.test.ts.
320
+ */
321
+ declare const TASK_CHAINED_EDIT_PROVIDERS: ReadonlySet<string>;
322
+ /** Modify image providers (I2I + edit-with-prompt) */
323
+ declare const MODIFY_IMAGE_PROVIDERS: readonly ["nano-banana", "nano-banana-2", "nano-banana-2-lite", "nano-banana-2-1", "nano-banana-pro", "grok-i2i", "flux-i2i", "flux-pro-i2i", "gpt-image-i2i", "gpt-image-2-i2i", "gpt-image-2-5-flare-i2i", "gpt-image-2-5-sunburst-i2i", "grok-2-i2i", "ideogram-edit", "ideogram-remix", "qwen-i2i", "qwen-edit", "seedream-edit", "seedream-5-lite-i2i", "seedream-5-pro-i2i", "seedream-5-flash-i2i", "flux-kontext", "flux-kontext-max", "kontext-multi", "flux-2-pro", "flux-fill", "flux-2-max", "flux-fill", "nano-banana-edit"];
324
+ type ModifyImageProvider = typeof MODIFY_IMAGE_PROVIDERS[number];
325
+ /** Image upscale providers */
326
+ declare const UPSCALE_IMAGE_PROVIDERS: readonly ["recraft-upscale", "topaz-image-upscale"];
327
+ type UpscaleImageProvider = typeof UPSCALE_IMAGE_PROVIDERS[number];
328
+ type ImageGenProvider = typeof IMAGE_GEN_PROVIDERS[number];
329
+ type ImageI2IProvider = typeof IMAGE_I2I_PROVIDERS[number];
330
+ type ImageEditProvider = typeof IMAGE_EDIT_PROVIDERS[number];
331
+ /** Image-to-video providers */
332
+ declare const IMAGE_TO_VIDEO_PROVIDERS: readonly ["minimax", "veo3", "veo3.1", "veo3_lite", "kling", "kling-turbo", "kling-3.0", "kling-master", "seedance", "seedance-2", "seedance-2-fast", "seedance-2-mini", "seedance-2-5", "minimax-h3", "hailuo-2.3-pro", "hailuo-2.3", "hailuo-standard", "wan-i2v", "wan-turbo", "bytedance-lite", "bytedance-pro", "bytedance-pro-fast", "grok-i2v", "wan-2.7-i2v", "happyhorse-i2v", "happyhorse-ref2v", "runway-kie", "kling-3-omni", "gemini-omni-video", "gemini-omni-flash", "wan-3", "wan-3-prime", "ltx-2.3-pro", "ltx-2.3-fast", "grok-imagine-video-1.5"];
333
+ type ImageToVideoProvider = typeof IMAGE_TO_VIDEO_PROVIDERS[number];
334
+ /** Text-to-video providers */
335
+ declare const TEXT_TO_VIDEO_PROVIDERS: readonly ["minimax", "veo3", "veo3.1", "veo3_lite", "kling", "kling-turbo", "kling-3.0", "grok", "seedance", "seedance-2", "seedance-2-fast", "seedance-2-mini", "seedance-2-5", "minimax-h3", "wan", "hailuo-standard", "bytedance-lite", "bytedance-pro", "wan-turbo", "wan-2.7-t2v", "happyhorse", "runway-kie", "gemini-omni-video", "gemini-omni-flash", "wan-3", "wan-3-prime", "ltx-2.3-pro", "ltx-2.3-fast", "grok-imagine-video-1.5", "kling-3-omni", "kling-master", "hailuo-2.3", "hailuo-2.3-pro", "bytedance-pro-fast", "happyhorse-ref2v"];
336
+ type TextToVideoProvider = typeof TEXT_TO_VIDEO_PROVIDERS[number];
337
+ /** Unified video-generation providers (image-to-video ∪ text-to-video) for the generate-video node. */
338
+ declare const VIDEO_GEN_PROVIDERS: readonly ["minimax", "veo3", "veo3.1", "veo3_lite", "kling", "kling-turbo", "kling-3.0", "kling-master", "seedance", "seedance-2", "seedance-2-fast", "seedance-2-mini", "seedance-2-5", "minimax-h3", "hailuo-2.3-pro", "hailuo-2.3", "hailuo-standard", "wan-i2v", "wan-turbo", "bytedance-lite", "bytedance-pro", "bytedance-pro-fast", "grok-i2v", "wan-2.7-i2v", "happyhorse-i2v", "happyhorse-ref2v", "runway-kie", "kling-3-omni", "gemini-omni-video", "gemini-omni-flash", "wan-3", "wan-3-prime", "ltx-2.3-pro", "ltx-2.3-fast", "grok-imagine-video-1.5", ...("seedance-2-5" | "veo3" | "kling-3.0" | "seedance-2" | "veo3.1" | "wan-turbo" | "bytedance-lite" | "kling-turbo" | "minimax" | "hailuo-standard" | "grok" | "minimax-h3" | "hailuo-2.3-pro" | "hailuo-2.3" | "veo3_lite" | "gemini-omni-video" | "gemini-omni-flash" | "kling" | "kling-master" | "kling-3-omni" | "grok-imagine-video-1.5" | "seedance" | "seedance-2-fast" | "seedance-2-mini" | "wan-3" | "wan-3-prime" | "wan" | "wan-2.7-t2v" | "ltx-2.3-pro" | "ltx-2.3-fast" | "happyhorse" | "happyhorse-ref2v" | "bytedance-pro" | "bytedance-pro-fast" | "runway-kie")[]];
339
+ type VideoGenProvider = typeof VIDEO_GEN_PROVIDERS[number];
340
+ /**
341
+ * Video models that expose DISTINCT provider ids per mode (text-to-video vs
342
+ * image-to-video) but represent ONE user-facing model. KIE keys i2v and t2v off
343
+ * different ids in different maps (KIE_VIDEO_MODELS vs KIE_TEXT_TO_VIDEO_MODELS),
344
+ * so each id only resolves to a real model in its native mode.
345
+ *
346
+ * The unified Generate Video node shows ONE picker row (the `base` id) and
347
+ * auto-selects the mode by whether an input image is present; execution remaps
348
+ * base→mode id via {@link resolveVideoProviderForMode}. This registry is the
349
+ * single source of truth shared by the picker collapse (frontend
350
+ * `model-options.ts`), the frontend DAG executor (`execute-node.ts`), and the
351
+ * backend orchestrator (`payload-builder.ts`) so they can't drift.
352
+ *
353
+ * `base` MUST be one of the group's own mode ids (kept = the i2v id, since the
354
+ * unified picker's i2v entries win on collision). Honesty invariants are guarded
355
+ * in `__tests__/video-mode-aliases.test.ts`.
356
+ */
357
+ interface VideoModeAlias {
358
+ /** Canonical id stored on the node + shown in the unified picker. */
359
+ base: string;
360
+ /** KIE id to use when an input image is present (image-to-video). */
361
+ i2v: string;
362
+ /** KIE id to use for pure text-to-video. */
363
+ t2v: string;
364
+ }
365
+ declare const VIDEO_MODE_ALIASES: readonly VideoModeAlias[];
366
+ /**
367
+ * Resolve a (possibly base / cross-mode) video provider id to the concrete KIE
368
+ * id for the given execution mode. Accepts any member id of an alias group
369
+ * (base, i2v, or t2v) so existing workflows that stored either mode's id keep
370
+ * working. Non-aliased providers (single-id models, VEO, Replicate, etc.) pass
371
+ * through unchanged.
372
+ */
373
+ declare function resolveVideoProviderForMode(provider: string, mode: "image-to-video" | "text-to-video"): string;
374
+ /**
375
+ * Which execution mode a unified Generate Video run takes from what is wired.
376
+ * Shared by the frontend DAG executor (`execute-node.ts`) and the backend
377
+ * orchestrator (`payload-builder.ts`) so the two cannot disagree.
378
+ *
379
+ * A start frame is image-to-video, full stop. Reference images ALONE are the
380
+ * nuance: most models forward refs on either path, but a split-id model
381
+ * (VIDEO_MODE_ALIASES) can carry them on one twin only — Grok Imagine 1's
382
+ * text-to-video endpoint has no image parameter at all, while its i2v twin
383
+ * takes up to 7. Refs wired without a start frame used to resolve to t2v →
384
+ * `grok` → silently dropped (#861). When refs are present and ONLY the i2v
385
+ * twin can carry them, the run is image-to-video with the refs as its images.
386
+ * Derived from VIDEO_REF_LIMITS_BY_PROVIDER (= the catalog's `reference-image`
387
+ * feature), never from a provider name; single-id models are untouched
388
+ * because both twins are the same id.
389
+ */
390
+ declare function resolveVideoModeForInputs(provider: string | undefined, inputs: {
391
+ readonly hasStartFrame: boolean;
392
+ readonly hasImageRefs: boolean;
393
+ }): "image-to-video" | "text-to-video";
394
+ /**
395
+ * t2v twin ids hidden from the unified Generate Video picker — the i2v/base
396
+ * entry already represents both modes (execution remaps by image presence).
397
+ * Only includes twins whose `base` is NOT the t2v id, so the surviving picker
398
+ * entry is the base. Consumed by the frontend `VIDEO_GEN_MODELS` collapse.
399
+ */
400
+ declare const VIDEO_GEN_COLLAPSED_T2V_IDS: ReadonlySet<string>;
401
+ /** Video-to-video providers */
402
+ declare const VIDEO_TO_VIDEO_PROVIDERS: readonly ["wan", "wan-flash", "wan-videoedit", "luma-modify", "runway-aleph", "happyhorse-edit"];
403
+ type VideoToVideoProvider = typeof VIDEO_TO_VIDEO_PROVIDERS[number];
404
+ /**
405
+ * Seedance models the Video to Video NODE offers as a whole-clip, prompt-driven
406
+ * EDIT ("make it black and white", "she wears @image_1").
407
+ *
408
+ * These are deliberately NOT members of {@link VIDEO_TO_VIDEO_PROVIDERS} (the
409
+ * `/v1/video-to-video` route's own enum): Seedance has no separate edit
410
+ * endpoint — it edits a REFERENCE video when the prompt reads as an edit. So
411
+ * every surface (single-node run, DAG payload builder, MCP `modify_video`)
412
+ * dispatches these through the ONE existing Seedance reference-video lane
413
+ * (`text-to-video`), with the source clip as `@video_1` and the edit shape
414
+ * below. Reference-clip bounds, the unit×(input+output) reservation, the
415
+ * measured settlement, the edit-mode retry and the reconcile recovery are that
416
+ * lane's — there is no second copy to keep in step.
417
+ */
418
+ declare const SEEDANCE_VIDEO_EDIT_PROVIDERS: readonly ["seedance-2-5"];
419
+ type SeedanceVideoEditProvider = typeof SEEDANCE_VIDEO_EDIT_PROVIDERS[number];
420
+ declare function isSeedanceVideoEditProvider(provider: string | undefined): provider is SeedanceVideoEditProvider;
421
+ /** Every model the Video to Video node can be set to: the route's own providers
422
+ * plus the Seedance edit models dispatched through the text-to-video lane. */
423
+ declare const VIDEO_TO_VIDEO_NODE_PROVIDERS: readonly ["wan", "wan-flash", "wan-videoedit", "luma-modify", "runway-aleph", "happyhorse-edit", "seedance-2-5"];
424
+ type VideoToVideoNodeProvider = typeof VIDEO_TO_VIDEO_NODE_PROVIDERS[number];
425
+ /**
426
+ * The request shape Seedance edit mode requires, sent UP FRONT by the Video to
427
+ * Video node: the output takes the source clip's own ratio and length
428
+ * (`adaptive`, and Auto = `VIDEO_DURATION_AUTO`). Camel-cased twin of the KIE
429
+ * wire pair the provider layer resubmits with when Seedance reclassifies an
430
+ * ordinary run as an edit.
431
+ */
432
+ declare const SEEDANCE_VIDEO_EDIT_SHAPE: {
433
+ readonly aspectRatio: "adaptive";
434
+ readonly duration: -1;
435
+ };
436
+ /** Face swap providers */
437
+ declare const FACE_SWAP_PROVIDERS: readonly ["roop"];
438
+ type FaceSwapProvider = typeof FACE_SWAP_PROVIDERS[number];
439
+ /** Video upscale providers */
440
+ declare const VIDEO_UPSCALE_PROVIDERS: readonly ["topaz", "veo-1080p", "veo-4k", "seedance-2-5-hd"];
441
+ type VideoUpscaleProvider = typeof VIDEO_UPSCALE_PROVIDERS[number];
442
+ /** Extend video providers */
443
+ declare const EXTEND_VIDEO_PROVIDERS: readonly ["veo-extend", "runway-extend", "ltx-2.3-pro", "seedance-2-extend"];
444
+ type ExtendVideoProvider = typeof EXTEND_VIDEO_PROVIDERS[number];
445
+ /** Lip sync providers */
446
+ declare const LIP_SYNC_PROVIDERS: readonly ["kling-avatar", "kling-avatar-pro", "infinitalk", "omnihuman-1-5", "latentsync", "wav2lip", "video-retalking", "sadtalker", "heygen-lipsync-precision", "lipsync-2-pro", "sync-lipsync-v3", "volcengine-lipsync", "seedance-2", "seedance-2-fast", "seedance-2-mini", "seedance-2-5", "minimax-h3"];
447
+ type LipSyncProvider = typeof LIP_SYNC_PROVIDERS[number];
448
+ /** Multimodal video models exposed via the lip-sync surface (Seedance 2 family
449
+ * + MiniMax Hailuo 3). They go through the i2v provider with the audio
450
+ * plumbed as `reference_audio_urls` rather than a dedicated lip-sync flow.
451
+ * (Name kept for the Seedance-era public export.) */
452
+ declare const SEEDANCE_LIP_SYNC_PROVIDERS: Set<string>;
453
+ /** Replicate-based lip-sync providers (video or image+audio via Replicate SDK) */
454
+ declare const REPLICATE_LIP_SYNC_PROVIDERS: Set<"latentsync" | "wav2lip" | "video-retalking" | "sadtalker" | "heygen-lipsync-precision" | "lipsync-2-pro">;
455
+ /** fal.ai-based lip-sync providers (video+audio → video via the fal queue API).
456
+ * Routed through `falLipSync` in the worker's `handleLipSync` fal branch. */
457
+ declare const FAL_LIP_SYNC_PROVIDERS: Set<"sync-lipsync-v3">;
458
+ /** Lip-sync providers that require video input (not image) */
459
+ declare const VIDEO_INPUT_LIP_SYNC_PROVIDERS: Set<"sync-lipsync-v3" | "volcengine-lipsync" | "latentsync" | "video-retalking" | "heygen-lipsync-precision" | "lipsync-2-pro">;
460
+ /** Lip-sync providers that accept either video or image input */
461
+ declare const FLEXIBLE_INPUT_LIP_SYNC_PROVIDERS: Set<"wav2lip">;
462
+ /** Standard aspect ratio → pixel dimensions for composition nodes */
463
+ declare const ASPECT_RATIO_DIMENSIONS: Record<string, {
464
+ width: number;
465
+ height: number;
466
+ }>;
467
+ /** Motion transfer providers */
468
+ declare const MOTION_TRANSFER_PROVIDERS: readonly ["kling", "kling-3.0", "wan-animate-move", "wan-animate-replace"];
469
+ type MotionTransferProviderType = typeof MOTION_TRANSFER_PROVIDERS[number];
470
+ /** Text-to-speech providers */
471
+ declare const TTS_PROVIDERS: readonly ["elevenlabs-v3", "elevenlabs-v4", "elevenlabs-v4-turbo", "elevenlabs-turbo", "elevenlabs-multilingual", "elevenlabs"];
472
+ type TtsProvider = typeof TTS_PROVIDERS[number];
473
+ /**
474
+ * Text-to-dialogue models (the `provider` of `/v1/text-to-dialogue` and of the
475
+ * Text to Dialogue node). Each IS its catalog id and its credit identifier.
476
+ * Never members of TTS_PROVIDERS: a dialogue model takes a script of lines, not
477
+ * one text (`dialogue-capabilities.test.ts` pins both directions).
478
+ */
479
+ declare const DIALOGUE_PROVIDERS: readonly ["elevenlabs-dialogue", "elevenlabs-dialogue-v4"];
480
+ type DialogueProvider = typeof DIALOGUE_PROVIDERS[number];
481
+ /** The model a dialogue request runs on when its provider is missing or unknown: v3 dialogue (decided 2026-10-04 — v3 stays the default). */
482
+ declare const DEFAULT_DIALOGUE_PROVIDER: DialogueProvider;
483
+ /**
484
+ * The speech model a request runs on when it names none — ElevenLabs v4 since the
485
+ * default flip (decided 2026-10-05; v3 stays selectable). The REST route's credit
486
+ * guard and handler, the workflow engine's text-to-speech dispatch, the worker's
487
+ * defensive default, the MCP `generate_speech` tool, the narration pipeline, the
488
+ * video director and the editor's new-node default all read THIS, so they can never
489
+ * disagree about which model ran and which one was billed. A request with no model
490
+ * also follows a length rule: text longer than this model's cap runs on turbo instead.
491
+ * The REST route, the workflow engine, the narration pipeline and the worker apply it
492
+ * through one backend function; the MCP tool refuses such text with the number.
493
+ */
494
+ declare const DEFAULT_TTS_PROVIDER: TtsProvider;
495
+ /** Text-to-audio providers */
496
+ declare const TEXT_TO_AUDIO_PROVIDERS: readonly ["elevenlabs-sfx"];
497
+ type TextToAudioProvider = typeof TEXT_TO_AUDIO_PROVIDERS[number];
498
+ /**
499
+ * The Text to Audio engine used when a request names none — the route's
500
+ * credit reservation, the worker, the orchestrator payload and the editor's
501
+ * node default all read THIS, so they can never disagree about which model
502
+ * ran and which one was billed.
503
+ */
504
+ declare const DEFAULT_TEXT_TO_AUDIO_PROVIDER: TextToAudioProvider;
505
+ /** Music generation providers */
506
+ declare const MUSIC_PROVIDERS: readonly ["minimax"];
507
+ type MusicProvider = typeof MUSIC_PROVIDERS[number];
508
+ /** The model a Generate Music node runs when its data names none it offers. */
509
+ declare const DEFAULT_MUSIC_PROVIDER: MusicProvider;
510
+ /** Each music model's name as the node shows it. The catalog's "minimax" is the
511
+ * MiniMax VIDEO model, so its label cannot stand in. */
512
+ declare const MUSIC_PROVIDER_LABELS: Readonly<Record<MusicProvider, string>>;
513
+ /**
514
+ * The credit id every Generate Music run reserves on — the route's guard and
515
+ * the orchestrator's payload both use it, whatever the model. The estimates
516
+ * and the node's price read it too: the model id would price the MiniMax VIDEO
517
+ * model that shares the name ("minimax").
518
+ */
519
+ declare const MUSIC_CREDIT_ID = "generate-music";
520
+ /**
521
+ * The music model a Generate Music node runs: its `provider` when the node
522
+ * offers it, else the default. Nodes saved with a model that is gone ("suno",
523
+ * "musicgen", "lyria", "bark" — or the "suno" new nodes started on) run the
524
+ * default instead of failing validation. Coerces rather than rejects, like
525
+ * `normalizeModelInput`: the only model to fall back to is the one there is.
526
+ */
527
+ declare function resolveMusicProvider(value: unknown): MusicProvider;
528
+ /**
529
+ * Transcription providers a caller may name — on `/v1/transcribe`, the SDK/CLI
530
+ * and the canvas Transcribe node. All three lanes are served on cloud again
531
+ * (the canvas picker re-offered the two Replicate lanes in #768 while this enum
532
+ * still hid them, so a single-node Run on Whisper 400'd where the same node in a
533
+ * workflow Run worked). `elevenlabs-stt` stays FIRST: several call sites take
534
+ * "the first enabled word-capable provider" from this order.
535
+ */
536
+ declare const TRANSCRIBE_PROVIDERS: readonly ["elevenlabs-stt", "whisper", "incredibly-fast-whisper"];
537
+ type TranscribeProvider = typeof TRANSCRIBE_PROVIDERS[number];
538
+ /**
539
+ * Every transcription LANE the platform implements. Today this is the same set
540
+ * as `TRANSCRIBE_PROVIDERS`; it stays a separate name because the two answer
541
+ * different questions — "what may a caller name" vs "what can run" — and they
542
+ * have diverged before (the Replicate lanes were hidden from callers for months
543
+ * while still reached at runtime via the route default and add-captions'
544
+ * auto-transcribe). Capability questions must be asked over THIS union.
545
+ */
546
+ declare const TRANSCRIBE_LANES: readonly ["whisper", "incredibly-fast-whisper", "elevenlabs-stt"];
547
+ type TranscribeLane = typeof TRANSCRIBE_LANES[number];
548
+ /**
549
+ * What each transcription lane can actually DO. Single source of truth — never
550
+ * re-derive a capability from a provider-name check.
551
+ *
552
+ * `wordTimestamps`: does the lane return per-word start/end times?
553
+ * - `whisper` (Replicate `openai/whisper`) — NO. Its input schema has no
554
+ * `word_timestamps` field in ANY published version, so Replicate silently
555
+ * drops the key and the segments come back without `words`. Asking this lane
556
+ * for word timings yields an empty array, never an error.
557
+ * - `incredibly-fast-whisper` — yes, via `timestamp: "word"`.
558
+ * - `elevenlabs-stt` (direct Scribe) — always word-level, flag or not.
559
+ */
560
+ declare const TRANSCRIBE_PROVIDER_CAPABILITIES: Record<TranscribeLane, {
561
+ wordTimestamps: boolean;
562
+ }>;
563
+ /** The lanes that can honour a word-timestamps request, in declaration order. */
564
+ declare function transcribeProvidersWithWordTimestamps(): TranscribeLane[];
565
+ /**
566
+ * Capability question for a lane id that came from UNTRUSTED data — node data,
567
+ * an imported workflow, a wire body — where the string may be anything at all.
568
+ * An unknown lane answers `false`: we cannot promise word timings from a lane
569
+ * we know nothing about, and "false" is always the safe answer (it suppresses
570
+ * an INFERRED request, and turns an EXPLICIT one into the honest refusal in
571
+ * `transcribe()` instead of a `Cannot read properties of undefined` TypeError).
572
+ */
573
+ declare function transcribeLaneSupportsWordTimestamps(lane: string | null | undefined): boolean;
574
+ /**
575
+ * The lane an absent `provider` resolves to — the historical `/v1/transcribe`
576
+ * default, kept as-is because the credit guard reserves on the provider id
577
+ * (changing it would silently change what bills).
578
+ */
579
+ declare const DEFAULT_TRANSCRIBE_PROVIDER: TranscribeLane;
580
+ /**
581
+ * The lane a transcribe NODE with no `provider` in its data resolves to —
582
+ * deliberately NOT `DEFAULT_TRANSCRIBE_PROVIDER`. The route's default is the
583
+ * legacy whisper lane and exists only so a pre-existing REST caller keeps
584
+ * billing the same id; a node authored/imported without a provider is a fresh
585
+ * request, and the canvas picker's own default is this one. Single-sourced so
586
+ * the backend DAG (`payload-builder.ts`) and the frontend run
587
+ * (`execute-node.ts`) cannot drift into sending different engines for the same
588
+ * node — they did, and the frontend's silent whisper fallback started 400ing
589
+ * once the Replicate lanes left `TRANSCRIBE_PROVIDERS`.
590
+ */
591
+ declare const DEFAULT_TRANSCRIBE_NODE_PROVIDER: TranscribeLane;
592
+ /** Script generation providers */
593
+ declare const SCRIPT_PROVIDERS: readonly ["gemini", "claude", "gpt"];
594
+ type ScriptProvider = typeof SCRIPT_PROVIDERS[number];
595
+ /** AI writer providers */
596
+ declare const AI_WRITER_PROVIDERS: readonly ["claude"];
597
+ type AiWriterProvider = typeof AI_WRITER_PROVIDERS[number];
598
+ /** QA check providers */
599
+ declare const QA_CHECK_PROVIDERS: readonly ["claude", "gpt"];
600
+ type QaCheckProvider = typeof QA_CHECK_PROVIDERS[number];
601
+ /**
602
+ * The current Suno generation (docs.kie.ai/suno-api/generate-music, 2026-09:
603
+ * the V6 family), listed first in every picker; V6 is the default.
604
+ *
605
+ * - V6 — flagship: greater musical expression, more natural vocals, richer details.
606
+ * - V6_WILD — bolder, more distinctive, less predictable output for exploration.
607
+ * - V6_MINI — lightweight and fast; quality/speed balance.
608
+ *
609
+ * This is also the set that honours `duration` ({@link SUNO_DURATION_MODELS}).
610
+ */
611
+ declare const SUNO_ACTIVE_MODELS: readonly ["V6", "V6_WILD", "V6_MINI"];
612
+ /**
613
+ * The earlier Suno generations. Still offered in every picker as ordinary
614
+ * choices (users report each has its own character), still accepted by every
615
+ * route, and confirmed generating on 2026-09-11. KIE's docs tag them
616
+ * "Discontinued"; if KIE ever stops serving one, coerce it to
617
+ * {@link DEFAULT_SUNO_MODEL} at the provider send seam — never remove it from
618
+ * {@link SUNO_MODELS}, which would 400 every saved music workflow.
619
+ */
620
+ declare const SUNO_LEGACY_MODELS: readonly ["V5_5", "V5", "V4_5PLUS", "V4_5ALL", "V4_5", "V4"];
621
+ type SunoLegacyModel = typeof SUNO_LEGACY_MODELS[number];
622
+ /**
623
+ * Every Suno model version — the picker order, the route / MCP Zod enum and
624
+ * the `data.model` type on Suno nodes. Current generation first (V6 = default),
625
+ * then the earlier generations newest-first.
626
+ */
627
+ declare const SUNO_MODELS: readonly ["V6", "V6_WILD", "V6_MINI", "V5_5", "V5", "V4_5PLUS", "V4_5ALL", "V4_5", "V4"];
628
+ type SunoModel = typeof SUNO_MODELS[number];
629
+ /** The Suno version used when a caller omits `model` — KIE's own default. */
630
+ declare const DEFAULT_SUNO_MODEL = "V6";
631
+ declare function isLegacySunoModel(model: string | undefined): model is SunoLegacyModel;
632
+ /**
633
+ * Suno versions that HONOUR `duration` (custom mode only). Per the generate /
634
+ * extend docs the field "will only take effect when the model is V6, V6_MINI,
635
+ * or V6_WILD" — V5_5 was struck from that sentence when V6 shipped. The
636
+ * provider client's send-gate (`sunoGenerate` in suno-client.ts) is the single
637
+ * chokepoint that consults this set; the editor uses it only to decide whether
638
+ * to SHOW the duration field.
639
+ */
640
+ declare const SUNO_DURATION_MODELS: ReadonlySet<string>;
641
+ declare function sunoModelHonoursDuration(model: string | undefined): boolean;
642
+ /**
643
+ * Suno models accepted by add-instrumental / add-vocals (docs enum: the V6
644
+ * family plus V4_5PLUS / V5 / V5_5). Same current-then-earlier order as
645
+ * {@link SUNO_MODELS}.
646
+ */
647
+ declare const SUNO_ADD_TRACK_MODELS: readonly ["V6", "V6_WILD", "V6_MINI", "V4_5PLUS", "V5", "V5_5"];
648
+ type SunoAddTrackModel = typeof SUNO_ADD_TRACK_MODELS[number];
649
+ /** Voice design models */
650
+ declare const VOICE_DESIGN_MODELS: readonly ["eleven_ttv_v3", "eleven_multilingual_ttv_v2"];
651
+ type VoiceDesignModel = typeof VOICE_DESIGN_MODELS[number];
652
+ /**
653
+ * ElevenLabs' newest text-to-voice model (all languages) — the default when
654
+ * a voice-design caller omits `model`. Single-sourced here so the route
655
+ * (`backend/src/routes/voice-design.ts`) and the direct-API provider
656
+ * (`backend/src/providers/elevenlabs/voice-design.ts`) can't drift.
657
+ */
658
+ declare const DEFAULT_VOICE_DESIGN_MODEL: VoiceDesignModel;
659
+ /** I2I providers that support mask-based inpainting */
660
+ declare const I2I_MASK_SUPPORT: Set<string>;
661
+ /**
662
+ * Mask edit tier per image-gen provider (single source of truth for inpaint).
663
+ * - "native" → provider takes a real mask param (reserved for Phase 1.5; none today)
664
+ * - "prompt" → strong instruction editor; inject a region descriptor into the prompt
665
+ * - "composite" → rely on the always-on server-side composite floor only
666
+ * Floor (B·(1−M)+E·M) applies to EVERY tier, so any provider is correct.
667
+ */
668
+ type ImageMaskMode = "native" | "prompt" | "composite";
669
+ declare const IMAGE_MASK_MODE: Record<ImageGenProvider, ImageMaskMode>;
670
+ /** I2I providers that support a strength/denoising parameter */
671
+ declare const I2I_STRENGTH_SUPPORT: Record<string, {
672
+ min: number;
673
+ max: number;
674
+ step: number;
675
+ default: number;
676
+ }>;
677
+ /** Models that accept a seed parameter for reproducible generation */
678
+ declare const SEED_SUPPORT: Set<string>;
679
+ /** Ideogram models that support rendering_speed selection (TURBO/BALANCED/QUALITY) */
680
+ declare const RENDERING_SPEED_SUPPORT: Set<string>;
681
+ /** Models that accept guidance_scale for controlling prompt adherence */
682
+ declare const GUIDANCE_SCALE_SUPPORT: Record<string, {
683
+ min: number;
684
+ max: number;
685
+ step: number;
686
+ default: number;
687
+ }>;
688
+ /**
689
+ * Video models where credit cost varies by duration.
690
+ * Maps provider key → duration tier breakpoints.
691
+ * Values are verified by the pricing verification script (backend/scripts/verify-kie-pricing.ts).
692
+ * TODO: Run verification script and update costs after confirming actual KIE pricing.
693
+ */
694
+ declare const DURATION_PRICED_PROVIDERS: Set<string>;
695
+ /**
696
+ * Seedance 2.0 family — shared across UI gating, payload building, and pricing.
697
+ * Expanded whenever a new Seedance 2.x variant ships.
698
+ */
699
+ declare const SEEDANCE_2_PROVIDERS: Set<string>;
700
+ declare function isSeedance2Provider(provider: string | undefined): boolean;
701
+ /**
702
+ * MiniMax Hailuo 3 family — the KIE "minimax-h3" market model. One Nodaro id
703
+ * covers three KIE endpoints (text-to-video / image-to-video /
704
+ * reference-to-video); the provider layer swaps the endpoint by which inputs
705
+ * are present. Mirrors the Seedance 2 multimodal surface (frames + image/video/
706
+ * audio references) with a two-rate resolution lever (2K default / 768P,
707
+ * added 2026-08-03) and per-second pricing at the selected resolution's rate.
708
+ * Exact-membership set — NEVER match on a "minimax" prefix (the unrelated
709
+ * Hailuo 02 id "minimax" would collide).
710
+ */
711
+ declare const MINIMAX_H3_PROVIDERS: Set<string>;
712
+ declare function isMinimaxH3Provider(provider: string | undefined): boolean;
713
+ /** MiniMax Hailuo 3 resolution the model renders when the param is omitted or
714
+ * unknown — the KIE-side default. */
715
+ declare const MINIMAX_H3_DEFAULT_RESOLUTION = "2K";
716
+ /**
717
+ * SINGLE normalization for the MiniMax Hailuo 3 resolution lever (KIE wire
718
+ * enum "768P" | "2K", default 2K) — shared by billing (credit-identifier
719
+ * suffix, r2v compute hook, GVP per-second anchor) and the provider layer's
720
+ * KIE forwarding. Only a case-insensitive "768p" selects the cheaper tier;
721
+ * ANYTHING else (undefined, a stale Seedance "720p", garbage) collapses to
722
+ * "2K" — exactly what KIE renders when the param is omitted/unknown, so the
723
+ * billed tier can never undercut the rendered one.
724
+ */
725
+ declare function normalizeMinimaxH3Resolution(resolution: string | undefined): "768P" | "2K";
726
+ /**
727
+ * Wan 3.0 family — the KIE "wan/3-0-video" market model and its high-speed
728
+ * "wan/3-0-video-prime" sibling. The two share a BYTE-IDENTICAL input schema
729
+ * (first/last frame OR an all-purpose reference mode with images/videos/audio,
730
+ * native `audio` boolean, 2-30s, 480P/720P/1080P, six aspect ratios with
731
+ * `adaptive` as the default); only the per-second rate differs. Prime is the
732
+ * FASTER tier at a higher rate — never describe it as "higher quality".
733
+ *
734
+ * Exact-membership set — NEVER match on a "wan" prefix: "wan", "wan-i2v",
735
+ * "wan-turbo", "wan-flash", "wan-videoedit" and the "wan-2.7-*" ids are
736
+ * unrelated 2.x models with a different surface (and a different reference
737
+ * token format — see WAN_3_DOCTRINE in @nodaro/prompts).
738
+ */
739
+ declare const WAN_3_PROVIDERS: Set<string>;
740
+ declare function isWan3Provider(provider: string | undefined): boolean;
741
+ /** Wan 3.0 resolution the PLATFORM renders when the param is omitted or unknown.
742
+ * Deliberately NOT KIE's own default (1080P): 720p is the tier the bare credit
743
+ * identifier prices, so the provider layer pins it to keep render == billed. */
744
+ declare const WAN_3_DEFAULT_RESOLUTION = "720P";
745
+ /**
746
+ * SINGLE normalization for the Wan 3.0 resolution lever (KIE wire enum
747
+ * "480P" | "720P" | "1080P"). Everything INTERNAL — the catalog, QUALITY_MAP,
748
+ * dropdowns, RESOLUTION_DURATION_PRICING keys and every emitted credit
749
+ * identifier — stays LOWERCASE; this helper is the ONE place the uppercase wire
750
+ * form is produced (backend KIE payload build), the twin of
751
+ * {@link normalizeMinimaxH3Resolution}.
752
+ *
753
+ * Case-insensitive. Anything else (undefined, garbage, a stale "4k") collapses
754
+ * to {@link WAN_3_DEFAULT_RESOLUTION} — the tier the default credit identifier
755
+ * reserves — so the billed tier can never undercut the rendered one.
756
+ */
757
+ declare function normalizeWan3Resolution(resolution: string | undefined): "480P" | "720P" | "1080P";
758
+ /**
759
+ * Google Gemini Omni family — the KIE "gemini-omni-video" market model and its
760
+ * faster/cheaper "google/gemini-omni-flash-1-1" sibling. Both take the SAME
761
+ * request shape (prompt + image_urls references, video-edit through the i2v
762
+ * handle, 4/6/8/10s, 720p/1080p or a 4K band) and are dispatched through the
763
+ * same runner, so every behavioural branch that used to compare against the
764
+ * literal "gemini-omni-video" must ask this predicate instead — V2V routing,
765
+ * the 7-slot reference quota, the mode swap and the aspect-ratio panels.
766
+ *
767
+ * Exact-membership set — NEVER match on a "gemini" prefix (the Gemini LLM ids
768
+ * would collide).
769
+ */
770
+ declare const GEMINI_OMNI_PROVIDERS: Set<string>;
771
+ declare function isGeminiOmniProvider(provider: string | undefined): boolean;
772
+ /**
773
+ * Video models that are CATALOGUED and priced but have NO working dispatch
774
+ * path today — selecting one fails at the router, not at validation.
775
+ *
776
+ * `kling-3-omni` has a Replicate implementation but the i2v routing chain is
777
+ * KIE-only and it has no worker short-circuit (the way LTX does), so every run
778
+ * failed at the router. It was pulled from the frontend picker for that
779
+ * reason; the backend enum and cost rows stay so legacy saved workflows still
780
+ * validate.
781
+ *
782
+ * This lives in shared rather than as a comment in the frontend picker list
783
+ * because it is a REAL capability fact that more than one consumer must
784
+ * respect: `deriveGvpSupportedProviders` below would otherwise offer
785
+ * `kling-3-omni` (it is i2v, takes reference images, declares durations, and
786
+ * carries ref limits — it passes every capability check) and every selection
787
+ * would fail at run time.
788
+ *
789
+ * Remove an entry only after wiring its dispatch AND verifying a live
790
+ * generation.
791
+ */
792
+ declare const VIDEO_PROVIDERS_WITHOUT_DISPATCH: Set<string>;
793
+ /** The SKU a stale/unsupported generate-video-pro selection snaps back to, and
794
+ * the one that lists first in every pro provider dropdown. */
795
+ declare const GVP_DEFAULT_PROVIDER = "seedance-2";
796
+ declare const GVP_SUPPORTED_PROVIDERS: readonly VideoGenProvider[];
797
+ declare function isGvpSupportedProvider(provider: string | undefined): boolean;
798
+ /**
799
+ * The generate-video-pro SKUs whose transport supports the `extend` render
800
+ * method — a continuation TAIL of the previous segment sent as a conditioning
801
+ * reference video (KIE `reference_video_urls`, built by
802
+ * `resolveSeedance2Inputs`).
803
+ *
804
+ * Derived from the catalog's `"video-reference"` feature, so a future r2v SKU
805
+ * flows in on its own instead of needing a family predicate edited. Today this
806
+ * resolves to exactly the Seedance-2 family + minimax-h3 — identical to the
807
+ * hardcoded gate it replaces, so the change is behaviour-neutral.
808
+ *
809
+ * Every other blessed SKU renders `keyframes` only: each segment is generated
810
+ * from its own anchor stills, nothing conditions on another segment's video.
811
+ */
812
+ declare const GVP_EXTEND_PROVIDERS: readonly VideoGenProvider[];
813
+ declare function supportsExtendRender(provider: string | undefined): boolean;
814
+ /**
815
+ * The generate-video-pro SKUs that honour a strict CLOSING frame, so the
816
+ * keyframes anchor wave generates an end still for them as well as a start
817
+ * still. Derived from the catalog's `"end-frame"` feature — the plugin's
818
+ * `wantEndAnchor` reads this instead of a provider-family name check.
819
+ */
820
+ declare const GVP_END_FRAME_PROVIDERS: readonly VideoGenProvider[];
821
+ declare function supportsEndAnchor(provider: string | undefined): boolean;
822
+ /**
823
+ * KEYFRAMES ANCHOR CHOICE — how much a keyframes run pins its shots to
824
+ * pre-generated stills. The node stores this product vocabulary; the plugin
825
+ * wire speaks its own `anchorMode`, and `resolveGvpAnchorWire` is the SINGLE
826
+ * translation both send paths go through (canvas Run in `execute-node.ts` and
827
+ * the DAG's `payload-builder.ts`), so the two cannot disagree about what the
828
+ * user picked — the drift that left `renderMethod` unreachable from the canvas
829
+ * until 2026-08-05.
830
+ */
831
+ declare const GVP_ANCHOR_CHOICES: readonly ["auto", "start-end", "start-only", "reference"];
832
+ type GvpAnchorChoice = (typeof GVP_ANCHOR_CHOICES)[number];
833
+ /** The plugin engine's own chain-mode vocabulary. */
834
+ type GvpAnchorWireMode = "upfront" | "progressive" | "none";
835
+ /**
836
+ * Translate the node's anchor choice into the plugin's `anchorMode` field.
837
+ *
838
+ * - `auto` (and absent/unknown) → `undefined`: send NOTHING, leaving the
839
+ * engine's own default and env flags in charge exactly as they are for
840
+ * callers predating this lever. Existing payloads stay byte-identical.
841
+ * - `start-end` → `upfront`: anchors pre-generated from plan text, and the
842
+ * engine's own closing-frame policy applies (capability-gated, longer
843
+ * scenes only). Today's shipped behaviour.
844
+ * - `start-only` → `progressive`: each start anchor is generated just-in-time
845
+ * from the PREVIOUS render's real last frame, and no closing still is ever
846
+ * pinned — so a shot can never warp its world to reach a pre-motion guess.
847
+ * - `reference` → `none`: no frame conditioning at all; identity/location
848
+ * references plus the prompt carry the shot.
849
+ *
850
+ * Deliberately NOT emitting the per-segment `endAnchors` array: that is a
851
+ * per-scene lever whose natural home is a per-scene surface, and emitting it
852
+ * here would mean duplicating the plugin's `MAX_SEGMENTS` cap in this repo
853
+ * where nothing could keep the two in step.
854
+ */
855
+ declare function resolveGvpAnchorWire(choice: string | undefined): GvpAnchorWireMode | undefined;
856
+ /** Allowed single-segment durations (seconds, ascending) for a pro provider.
857
+ * Empty for anything not in the catalog — callers treat that as ineligible
858
+ * rather than falling back to a window the provider may reject. */
859
+ declare function segmentDurationsFor(provider: string | undefined): readonly number[];
860
+ /** Shortest single segment the provider can render. 0 when unknown. */
861
+ declare function minSegmentSecFor(provider: string | undefined): number;
862
+ /** Longest single segment the provider can render — the value above which a
863
+ * request must split. 0 when unknown. */
864
+ declare function maxSegmentSecFor(provider: string | undefined): number;
865
+ /** True when the provider's durations are every integer between its min and
866
+ * max (Seedance-2 family, minimax-h3, kling-3-omni, happyhorse-ref2v). Those
867
+ * can use the classic arithmetic splitter; sparse providers (veo3's 4/6/8,
868
+ * grok-i2v's 6/10) need the discrete packer. */
869
+ declare function hasContiguousSegmentDurations(provider: string | undefined): boolean;
870
+ /** Most segments a run can hold for this provider at a given total cap — the
871
+ * dynamic replacement for the old fixed 24. 0 when the provider is unknown. */
872
+ declare function maxSegmentsFor(provider: string | undefined, capSec: number): number;
873
+ /**
874
+ * Default aspect ratio for a video provider when the node carries no explicit
875
+ * `aspectRatio`. Seedance 2.x defaults to `"adaptive"` (output matches the
876
+ * wired input — fits the unified-inputs model); every other provider keeps the
877
+ * historical `"16:9"`. Single source of truth so every run-default / display-
878
+ * fallback site stays in lock-step (preview = run). Applies to ALL Seedance
879
+ * modes incl. text-to-video — KIE accepts `adaptive` there too.
880
+ *
881
+ * MiniMax Hailuo 3 also defaults to `adaptive`: its r2v endpoint takes
882
+ * `adaptive` natively (the KIE default) and its i2v endpoint has no aspect
883
+ * param at all (inferred from the frame). Only the pure-t2v endpoint requires
884
+ * a concrete ratio — the KIE provider layer coerces `adaptive` → `16:9` there
885
+ * (see applyMinimaxH3Params in backend kie/video.ts).
886
+ *
887
+ * Wan 3.0 also defaults to `adaptive` — it is the model's own KIE default and
888
+ * the first value in its aspect enum, so an un-set node must not silently run
889
+ * at 16:9 while the panel displays Adaptive.
890
+ */
891
+ declare function defaultVideoAspectRatio(provider: string | undefined): string;
892
+ /**
893
+ * Google VEO family (Quality / Fast / Lite). VEO goes through its own KIE
894
+ * endpoint and image-handling path, so callers branch on this in several places.
895
+ */
896
+ declare const VEO_PROVIDERS: Set<string>;
897
+ declare function isVeoProvider(provider: string | undefined): boolean;
898
+ /** KIE.ai limits for Seedance 2.0 multimodal reference arrays. */
899
+ declare const SEEDANCE_2_REF_LIMITS: {
900
+ readonly images: 9;
901
+ readonly videos: 3;
902
+ readonly audio: 3;
903
+ };
904
+ /**
905
+ * Seedance 2.5 raises every reference cap well above the 2.0 family's
906
+ * (docs.kie.ai/market/bytedance/seedance-2-5): 30 images, 10 videos, 10 audio.
907
+ * Kept as its own constant rather than widening {@link SEEDANCE_2_REF_LIMITS}
908
+ * so the 2.0 SKUs can't silently start advertising caps KIE rejects for them.
909
+ */
910
+ declare const SEEDANCE_2_5_REF_LIMITS: {
911
+ readonly images: 30;
912
+ readonly videos: 10;
913
+ readonly audio: 10;
914
+ };
915
+ /**
916
+ * KIE r2v REFERENCE-VIDEO MINIMUM (seconds) for the Seedance 2.0 family — the
917
+ * provider hard-rejects shorter reference clips with a 400 BEFORE generation:
918
+ * "the parameter video duration (seconds) specified in the request must be
919
+ * greater than or equal to 1.8 for model dreamina-seedance-2-0-fast in r2v"
920
+ * (2026-07-13, job dbf95612 — every 1.0s continuation tail failed
921
+ * deterministically). Mirror of the reference-AUDIO maximum below.
922
+ */
923
+ declare const SEEDANCE_2_R2V_MIN_REF_VIDEO_SEC = 1.8;
924
+ /**
925
+ * The continuation-reference length (seconds) every Seedance-2 chaining
926
+ * feature actually cuts — extend-node tails, generate-video-pro segment
927
+ * tails, edit-video-pro refOut/refIn brackets — AND the length the gvp/evp
928
+ * credit formulas bill per continuation join. Clears the provider floor
929
+ * above with margin while staying short enough to keep the model focused on
930
+ * continuing the boundary motion instead of re-staging the whole clip.
931
+ * Guarded ≥ floor by model-constants tests; the plugin repo carries a twin
932
+ * constant guarded by its own tests — keep the two in sync.
933
+ */
934
+ declare const SEEDANCE_2_CONTINUATION_REF_SEC = 2;
935
+ /**
936
+ * Trim-stitch parameters for the seedance-2-extend provider (spike-validated
937
+ * 2026-06-11):
938
+ * the model's extension output wobbles for its first ~3 frames and the source
939
+ * tail's last ~4 frames lead into it; dropping both and butt-joining yields a
940
+ * seam SMOOTHER than ordinary in-clip motion (PSNR 34.4dB vs 30.6dB
941
+ * adjacent-frame baseline). The 0.15s timeline-anchored audio fades kill
942
+ * boundary clicks without shifting sync (combineVideos cut+crossfade path).
943
+ */
944
+ declare const SEEDANCE_2_EXTEND_STITCH: {
945
+ /** Frames dropped from the END of the source clip (smart-cut FALLBACK —
946
+ * used only when the PSNR boundary matcher finds no genuine match). */
947
+ readonly trimTailFrames: 4;
948
+ /** Frames dropped from the START of the generated extension (smart-cut
949
+ * fallback, see above). */
950
+ readonly trimHeadFrames: 3;
951
+ /** Boundary audio fade length (seconds), timeline-preserving. */
952
+ readonly audioFadeSec: 0.15;
953
+ /** Seconds of the source's TAIL passed as the @video_1 reference — short
954
+ * keeps the model focused on continuing the boundary motion; the value is
955
+ * floored by SEEDANCE_2_R2V_MIN_REF_VIDEO_SEC (the original spike's 1s
956
+ * tail is now provider-rejected). */
957
+ readonly referenceTailSeconds: 2;
958
+ };
959
+ /**
960
+ * Per-provider max reference-audio duration (seconds) for Seedance 2.0 r2v
961
+ * (audio-driven image-to-video). KIE rejects longer clips with a 400 BEFORE
962
+ * generation (e.g. "audio duration must be ≤ 15.2 for dreamina-seedance-2-0-fast
963
+ * in r2v"). Data-driven: only providers with a VERIFIED limit are listed, so an
964
+ * unknown provider is never false-rejected.
965
+ * - seedance-2-fast: 15.2s (verified against KIE).
966
+ * - seedance-2 (non-fast): limit unverified → not enforced yet (add after
967
+ * confirming via docs.kie.ai).
968
+ */
969
+ declare const SEEDANCE_2_R2V_MAX_AUDIO_SEC_BY_PROVIDER: Record<string, number>;
970
+ /** The verified r2v reference-audio cap (seconds) for a provider, or null when
971
+ * none is enforced. */
972
+ declare function seedance2AudioLimitSec(provider: string | undefined): number | null;
973
+ /**
974
+ * First reference-audio duration (seconds) that exceeds the provider's r2v cap,
975
+ * or null when all are within limit (or the provider has no enforced cap).
976
+ * Non-finite durations (probe failures) are ignored. Used to reject over-long
977
+ * audio BEFORE submitting to the provider — which would otherwise 400.
978
+ */
979
+ declare function findSeedance2AudioOverLimit(provider: string | undefined, durationsSec: readonly number[]): number | null;
980
+ /**
981
+ * Per-provider connection caps for the typed reference handles on Generate Video
982
+ * AND the cap for the server-side `connectedReferences` assembly (`imageCap`).
983
+ *
984
+ * The KEY SET is bound 1:1 to MODEL_CATALOG (kind:"video" + features:
985
+ * ["reference-image"]) by the drift guard in `__tests__/video-ref-limits.test.ts`:
986
+ * adding a ref-capable video model to the catalog without a cap here — or a cap
987
+ * here without the catalog flag — fails CI. So the CATALOG is the single source
988
+ * for "is this model ref-capable", and this map is the single source for the
989
+ * NUMERIC caps (sourced from the provider configs, see per-line notes).
990
+ * Providers absent from the map = 0 caps (the popover dims the handle with
991
+ * "Not supported by [Model]"; the API assembly strips `{image:N}` tokens).
992
+ */
993
+ declare const VIDEO_REF_LIMITS_BY_PROVIDER: Record<string, {
994
+ images?: number;
995
+ videos?: number;
996
+ audio?: number;
997
+ characters?: number;
998
+ voices?: number;
999
+ } | undefined>;
1000
+ /** Per-reference-video duration bounds, in seconds. */
1001
+ interface RefVideoDurationLimit {
1002
+ minSec: number;
1003
+ maxSec: number;
1004
+ /** Cap on the SUM of all reference-video durations, when the provider has one. */
1005
+ maxTotalSec?: number;
1006
+ }
1007
+ /**
1008
+ * Reference-video duration limits, provider-declared.
1009
+ *
1010
+ * `VIDEO_REF_LIMITS_BY_PROVIDER` above caps the reference COUNT; these cap the
1011
+ * duration of each clip. Both routes already ffprobe every reference video to
1012
+ * price the run (ee/billing/seedance2-ref-video-credits.ts and
1013
+ * minimax-h3-credits.ts), so the numbers are in hand before the job exists —
1014
+ * and until 2026-09-02 they were discarded, which is why "Each reference video
1015
+ * must be between 2 and 30 seconds" and "video duration 52838 ms, expected
1016
+ * [2000, 15000] ms" were reaching users as post-payment provider rejects
1017
+ * (app-reports §11.3).
1018
+ *
1019
+ * Data-driven, exactly like SEEDANCE_2_R2V_MAX_AUDIO_SEC_BY_PROVIDER above:
1020
+ * only providers with a VERIFIED documented limit are listed, so an unknown
1021
+ * provider is never false-rejected.
1022
+ *
1023
+ * Sources: docs.kie.ai/market/bytedance/seedance-2-5 ("Single video duration:
1024
+ * [2, 30] seconds"; "Total duration of reference videos must not exceed 30
1025
+ * seconds") and docs.kie.ai/market/minimax-h3/reference-to-video (reference
1026
+ * videos are "2 to 15 seconds" each and "the total duration of all reference
1027
+ * videos cannot exceed 15 seconds", up to 3 videos) — both fetched 2026-09-02.
1028
+ */
1029
+ declare const VIDEO_REF_VIDEO_DURATION_LIMITS: Record<string, RefVideoDurationLimit | undefined>;
1030
+ /**
1031
+ * Validate probed reference-video durations against the provider's limits.
1032
+ *
1033
+ * Non-finite / non-positive entries are IGNORED, never rejected: the probe
1034
+ * helpers treat an unreadable clip as a worst-case duration for pricing, and
1035
+ * turning a failed ffprobe into a user-facing 400 would block legitimate runs
1036
+ * on a transient probe failure. Callers therefore pass the RAW per-URL probe
1037
+ * outcomes (a rejected ffprobe arrives here as NaN) — an ignored entry also
1038
+ * contributes nothing to the `maxTotalSec` sum, so a probe blip can never push
1039
+ * an otherwise-legal set over the total cap either.
1040
+ */
1041
+ declare function checkRefVideoDurations(provider: string, durationsSec: readonly number[]): {
1042
+ ok: true;
1043
+ } | {
1044
+ ok: false;
1045
+ message: string;
1046
+ };
1047
+ /**
1048
+ * Video generation models whose provider API natively accepts a "match the
1049
+ * visual input's aspect" token, mapped to that provider's EXACT token.
1050
+ * Consumed by the backend's `resolveSourceMatchedAspect`: members get the
1051
+ * native token (no probe round-trip, exact match even for off-catalog ratios
1052
+ * like 4:5); everyone else falls back to ffprobe + closest catalog ratio.
1053
+ *
1054
+ * Only add entries whose match-the-input semantics are verified against the
1055
+ * provider's docs AND a live job — e.g. grok-imagine-video-1.5 accepts
1056
+ * "auto", but that means "provider default", NOT "match input", so it does
1057
+ * not belong here.
1058
+ *
1059
+ * seedance-2 family: `adaptive` per docs.kie.ai/market/bytedance/seedance-2
1060
+ * + seedance-2-fast (enum'd alongside the fixed ratios; default 16:9).
1061
+ */
1062
+ declare const NATIVE_ADAPTIVE_ASPECT: Record<string, string>;
1063
+ /**
1064
+ * Video providers that accept ONLY the "adaptive" aspect ratio once a START
1065
+ * FRAME is present (first-frame or first+last-frame mode). Sending any explicit
1066
+ * ratio in that mode is a hard 422 from the provider, so the payload builder
1067
+ * coerces the value to `adaptive` for these instead of forwarding it.
1068
+ *
1069
+ * UNDOCUMENTED — KIE's schema advertises the full ratio enum unconditionally and
1070
+ * only rejects the combination at request time:
1071
+ * "Seedance 2.5 first-frame and first-last-frame tasks only support adaptive
1072
+ * aspect ratio"
1073
+ * (live probe against api.kie.ai, 2026-08-08). Verified as 2.5-ONLY: the same
1074
+ * probe against the 2.0 SKUs accepts explicit ratios with a start frame, which
1075
+ * is why this is a set and not a family-wide rule.
1076
+ *
1077
+ * Behaviourally this costs nothing — with a start frame the output aspect is
1078
+ * derived from that frame anyway, which is exactly what `adaptive` means.
1079
+ */
1080
+ declare const FRAME_MODE_ADAPTIVE_ONLY_ASPECT: ReadonlySet<string>;
1081
+ /**
1082
+ * Video providers that REQUIRE an input image (image-to-video only) even though
1083
+ * they're listed in TEXT_TO_VIDEO_PROVIDERS for unified-node visibility. The
1084
+ * `/v1/text-to-video` route early-returns a clean 400 for these before any job
1085
+ * is created, instead of letting the prompt-only request fail at the provider.
1086
+ *
1087
+ * DERIVED from MODEL_CATALOG (the capability source of truth): every video
1088
+ * model whose `modes` lacks "t2v" and that isn't remapped to a t2v twin by
1089
+ * VIDEO_MODE_ALIASES. Hand-listing this set is what let kling-3-omni,
1090
+ * kling-master, hailuo-2.3(-pro), bytedance-pro-fast and happyhorse-ref2v
1091
+ * crash the t2v route with a raw Zod enum error — new i2v-only models now get
1092
+ * the friendly gate automatically when their catalog entry is added.
1093
+ */
1094
+ declare const VIDEO_PROVIDERS_REQUIRING_IMAGE: ReadonlySet<string>;
1095
+ /** True when a video provider can only run image-to-video (image required). */
1096
+ declare function videoProviderRequiresImage(provider: string | undefined): boolean;
1097
+ /**
1098
+ * True when the provider's image-to-video path FOLDS a lone closing frame into
1099
+ * its reference images — i.e. an end frame with no start frame is a reference
1100
+ * the model actually receives, not a half-formed frame pair.
1101
+ *
1102
+ * The Seedance 2.x, MiniMax Hailuo 3 and Wan 3 families all assemble their KIE
1103
+ * input through the shared `resolveSeedance2Inputs` (`@nodaro/prompts`), whose
1104
+ * reference mode takes a lone last frame as the sole reference image plus a
1105
+ * closing-frame prompt hint. NOTHING else does: VEO ships `[imageUrl,
1106
+ * endFrameUrl]` verbatim (a lone end frame would reach KIE as `[null, url]`),
1107
+ * the Gemini Omni branch drops the frame when there is no start frame, and the
1108
+ * generic KIE path sends `end_frame` with no image param at all. So the
1109
+ * exemption is keyed to the FOLD, not to "carries image references" — the
1110
+ * catalog has no capability for it, and these three family predicates are the
1111
+ * same membership the provider layer itself branches on (the backend's
1112
+ * `kie/video.ts::applySeedance2Params` / `applyMinimaxH3Params` / `runWan3`).
1113
+ * A ref-capable provider that grows the fold gets the exemption by joining a
1114
+ * family here; one that does not keeps the honest `image_required` 400.
1115
+ */
1116
+ declare function videoProviderFoldsLoneEndFrame(provider: string): boolean;
1117
+ /**
1118
+ * Video models where enabling audio/sound incurs an additional cost.
1119
+ * The audio addon is expressed as a separate composite identifier suffix.
1120
+ */
1121
+ declare const AUDIO_ADDON_PROVIDERS: Set<string>;
1122
+ /**
1123
+ * How a video model handles an audio track. Single source of truth for
1124
+ * audio/speech capability across the whole stack — the config-panel audio
1125
+ * toggle (show / lock / disable + warn), the Story→Video dialogue auto-pick
1126
+ * (revoice vs TTS + lip-sync), provider option wiring (`sound` vs
1127
+ * `generateAudio`), and the audio credit suffix.
1128
+ *
1129
+ * Consolidates signals that were previously scattered + inconsistent:
1130
+ * - `KIE_VIDEO_MODELS` / `KIE_TEXT_TO_VIDEO_MODELS` `extraParams.sound` (Kling)
1131
+ * - `…extraParams.generate_audio` (Seedance)
1132
+ * - VEO native audio (implicit, always on)
1133
+ * - `AUDIO_ADDON_PROVIDERS` (cost) + `SEEDANCE_2_PROVIDERS` (reference audio)
1134
+ *
1135
+ * "none" — silent model; no audio output. UI disables the audio
1136
+ * toggle with an explanatory note; the pipeline uses TTS +
1137
+ * lip-sync for any dialogue.
1138
+ * "ambient" — generates ambient sound / SFX matched to the scene, NOT
1139
+ * lip-synced spoken dialogue. Toggle is offered; the
1140
+ * pipeline still uses TTS + lip-sync for dialogue.
1141
+ * "native_speech" — bakes spoken dialogue + lip movement from the prompt
1142
+ * (VEO 3.x always-on; Kling 2.6/3.0 behind the `sound`
1143
+ * toggle — probe-verified 2026-07-16: scripted lines come
1144
+ * back word-for-word with articulated lips on the KIE
1145
+ * path, matching the official Kling 2.6 audio guide and
1146
+ * Kling 3.0 prompting docs). The pipeline injects the
1147
+ * dialogue line, enables audio, and revoices the clip to
1148
+ * the character's saved voice.
1149
+ * "audio_driven" — lip-syncs to a supplied reference-audio track (Seedance
1150
+ * 2.0 multimodal). The pipeline synthesises the character's
1151
+ * voice first, feeds it as reference audio, and skips the
1152
+ * separate lip-sync pass.
1153
+ */
1154
+ type VideoAudioMode = "none" | "ambient" | "native_speech" | "audio_driven";
1155
+ interface VideoAudioCapability {
1156
+ mode: VideoAudioMode;
1157
+ /** Provider-option field carrying the on/off toggle, when user-controllable.
1158
+ * `audio` is Wan 3.0's own boolean lever (KIE `input.audio`, default true). */
1159
+ field?: "generateAudio" | "sound" | "audio";
1160
+ /** Audio is always produced and can't be turned off by the user (VEO 3.x). */
1161
+ alwaysOn?: boolean;
1162
+ /** Enabling audio raises the credit cost (Kling — see AUDIO_ADDON_PROVIDERS). */
1163
+ affectsCost?: boolean;
1164
+ /**
1165
+ * The model generates audio when the caller expresses NO intent (its own
1166
+ * config default is on — kling-3.0's `sound: true`, kling-3-omni's
1167
+ * `generate_audio: true`). The `:audio` credit suffix mirrors this default
1168
+ * so an intent-less request is billed for the audio it actually produces
1169
+ * (see buildVideoCreditModelIdentifier). Absent ⇒ default off.
1170
+ */
1171
+ defaultOn?: boolean;
1172
+ }
1173
+ /**
1174
+ * Per-model audio capability. Only models that produce SOME audio are listed;
1175
+ * anything absent defaults to `{ mode: "none" }` via `getVideoAudioCapability`,
1176
+ * so silent models (minimax, hailuo, wan-i2v, grok-i2v, runway, pika, …) need
1177
+ * no entry. New audio-capable models MUST be added here — the
1178
+ * `video-audio-capability` guard test cross-checks this map against the model
1179
+ * configs' `extraParams.sound` / `generate_audio` + VEO/Seedance-2 sets so a
1180
+ * forgotten entry fails CI rather than silently disabling audio.
1181
+ */
1182
+ declare const VIDEO_AUDIO_CAPABILITY: Record<string, VideoAudioCapability>;
1183
+ /** Audio capability for a video model. Unlisted/undefined → silent (`none`). */
1184
+ declare function getVideoAudioCapability(model: string | undefined): VideoAudioCapability;
1185
+ /**
1186
+ * True when the model produces any audio track at all. Drives the config-panel
1187
+ * audio toggle: `false` → disable the toggle + show a "this model has no audio"
1188
+ * note (never restrict the model choice — just explain the limitation).
1189
+ */
1190
+ declare function videoModelSupportsAudio(model: string | undefined): boolean;
1191
+ /**
1192
+ * True when the model can produce lip-synced spoken DIALOGUE — either natively
1193
+ * (VEO 3.x, Kling 2.6/3.0/Omni) or driven by a supplied audio track (Seedance
1194
+ * 2.0). Drives the Story→Video dialogue auto-pick: in-model speech + character
1195
+ * revoice (VEO, Kling) / character-voiced reference audio (Seedance 2.0) vs.
1196
+ * the TTS + separate-lip-sync fallback. Ambient-only models (Seedance 1.x)
1197
+ * return `false` — their audio is SFX, not speech.
1198
+ */
1199
+ declare function videoModelCanSpeakDialogue(model: string | undefined): boolean;
1200
+ /**
1201
+ * Write the caller's neutral "enable native audio" intent onto a KIE provider
1202
+ * `input` under whichever field the chosen model actually reads, per
1203
+ * `VIDEO_AUDIO_CAPABILITY.field`. This is the single dispatch point that fixes
1204
+ * the recurring "sound toggle dropped on Seedance/VEO" bug class: callers pass
1205
+ * the model-agnostic toggle ONCE and never need to know that Kling's lever is
1206
+ * `sound` while Seedance's is `generate_audio`.
1207
+ *
1208
+ * - `sound` is the canonical neutral name; `generateAudio` is accepted as a
1209
+ * legacy alias (the workflow node + some clients send that key). `sound` wins
1210
+ * if both are present.
1211
+ * - **Cost-affecting models (Kling) honour ONLY the canonical `sound` lever** —
1212
+ * the same field the `:audio` credit surcharge keys off (`AUDIO_ADDON_PROVIDERS`
1213
+ * in `credit-identifiers.ts`). This makes a billed-but-not-generated (or
1214
+ * generated-but-not-billed) divergence structurally impossible: the model and
1215
+ * the surcharge read the same flag. Free models accept the `generateAudio`
1216
+ * alias too, where mis-billing isn't possible.
1217
+ * - No-op for `alwaysOn` models (VEO — audio can't be toggled) and silent /
1218
+ * unlisted models (no `field`), and when the caller expressed no intent
1219
+ * (leaves the model's own default in place).
1220
+ *
1221
+ * Future audio models are covered automatically by adding a
1222
+ * `VIDEO_AUDIO_CAPABILITY` entry — already guarded by the
1223
+ * `video-audio-capability` drift test, so this never silently regresses.
1224
+ */
1225
+ declare function applyVideoAudioToggle(input: Record<string, unknown>, provider: string | undefined, opts: {
1226
+ sound?: boolean;
1227
+ generateAudio?: boolean;
1228
+ } | undefined): void;
1229
+ /**
1230
+ * Video variable pricing config — which params affect credit cost per model.
1231
+ * "duration" = cost varies by video length
1232
+ * "duration+audio" = cost varies by length AND audio on/off
1233
+ */
1234
+ declare const VIDEO_VARIABLE_PRICING: Record<string, "duration" | "duration+audio" | "duration+mode" | "duration+resolution+ref" | "duration+resolution">;
1235
+ /**
1236
+ * @deprecated Read {@link pricedOutputDurationSec} (or the catalog's
1237
+ * `defaultDuration`). Kept only as a derived view of `MODEL_CATALOG` for
1238
+ * consumers of the published package that imported the old hand-kept map; no
1239
+ * pricing path reads it (`pricing-default-duration-guard.test.ts` fails the
1240
+ * build if one does).
1241
+ */
1242
+ declare const PRICING_DEFAULT_DURATION_SEC: Readonly<Record<string, number>>;
1243
+ /**
1244
+ * The legal length nearest to `requested` — ties go to the earlier (shorter)
1245
+ * entry of the list. This is the SAME rule every video runner snaps a request
1246
+ * with (`snapToAllowedDuration` delegates here), so the length a request is
1247
+ * priced at and the length it renders can never be two different numbers.
1248
+ */
1249
+ declare function snapToNearestDuration(requested: number, allowed: readonly number[] | undefined): number;
1250
+ /**
1251
+ * The length a model renders when the request names none, from the model
1252
+ * catalog (`defaultDuration`); else its shortest legal length; else 5 for an id
1253
+ * the catalog does not list. A video model that is priced by length MUST
1254
+ * declare `defaultDuration` (`pricing-default-duration-sync.test.ts`).
1255
+ */
1256
+ declare function videoDefaultDurationSec(provider: string): number;
1257
+ /**
1258
+ * The output seconds a video request is CHARGED at — the ONE funnel every
1259
+ * price path reads (the credit identifier's tier, the run reservation and
1260
+ * commit, the editor and server estimates, the Seedance and MiniMax
1261
+ * reference-video reservations and the Loop Trim refund).
1262
+ *
1263
+ * - no duration (or an unusable one) → the model's own default render length
1264
+ * (`MODEL_CATALOG[provider].defaultDuration`), never a global 5;
1265
+ * - a duration the model does not offer → the nearest one it does
1266
+ * ({@link snapToNearestDuration}, the runners' own rule), because that is the
1267
+ * length it renders;
1268
+ * - AUTO (`VIDEO_DURATION_AUTO`) → the model's longest clip: the model picks
1269
+ * the length, `commit_credits` refunds a surplus but never collects a
1270
+ * deficit, and the delivered clip is measured at settle time
1271
+ * (lib/seedance2-ref-video-settle.ts).
1272
+ *
1273
+ * A literal `?? 5` (or `?? 8`) at any pricing site re-opens the gap this closes;
1274
+ * `pricing-default-duration-guard.test.ts` fails the build on one.
1275
+ */
1276
+ declare function pricedOutputDurationSec(provider: string, requested: number | string | undefined): number;
1277
+ /** Models that accept `VIDEO_DURATION_AUTO` — a catalog capability (docs.kie.ai:
1278
+ * the Seedance 2 family, "4-15 seconds or -1" / 2.5 "Special values -1"). */
1279
+ declare function supportsAutoVideoDuration(provider: string | undefined): boolean;
1280
+ /** The longest clip a duration-tiered provider can render (its top priced tier). */
1281
+ declare function maxVideoDurationSec(provider: string): number | undefined;
1282
+ /**
1283
+ * Resolution assumed for PRICING when a request names a provider but omits
1284
+ * `resolution` — the resolution twin of {@link PRICING_DEFAULT_DURATION_SEC},
1285
+ * and it MUST match the provider's KIE-side default (`extraParams.resolution`
1286
+ * in backend kie/models.ts) so an intent-less request reserves what it will
1287
+ * actually render.
1288
+ *
1289
+ * Without an entry, `buildVideoCreditModelIdentifier` falls back to the
1290
+ * CHEAPEST tier (480p) for a resolution-priced provider. That is safe only for
1291
+ * a model whose KIE default IS the cheapest tier; for one defaulting to 720p it
1292
+ * reserves the 480p price against a 720p render, and `commit_credits` cannot
1293
+ * collect the difference afterwards.
1294
+ *
1295
+ * Providers absent here keep the historical 480p fallback — deliberately, so
1296
+ * adding this map cannot reprice anything already live.
1297
+ */
1298
+ declare const PRICING_DEFAULT_RESOLUTION: Record<string, string>;
1299
+ /**
1300
+ * Duration tier breakpoints for variable-priced video models.
1301
+ * Maps provider → array of { maxSeconds, suffix } in ascending order.
1302
+ * The first tier whose maxSeconds >= requested duration is used.
1303
+ */
1304
+ declare const VIDEO_DURATION_TIERS: Record<string, Array<{
1305
+ maxSeconds: number;
1306
+ suffix: string;
1307
+ }>>;
1308
+ /**
1309
+ * Maps composer node types to their plan type identifier and the node data field
1310
+ * where the plan is stored. Used by render-video payload building, plan syncing,
1311
+ * and the frontend DAG executor.
1312
+ */
1313
+ declare const COMPOSER_PLAN_MAP: Readonly<Record<string, {
1314
+ planType: string;
1315
+ planField: string;
1316
+ }>>;
1317
+ /** Every composer plan-field name, derived from COMPOSER_PLAN_MAP (single source
1318
+ * of truth — consumed by preset plan-state hygiene and job-output extraction). */
1319
+ declare const COMPOSER_PLAN_FIELDS: readonly string[];
1320
+ /** Curated i2v providers compatible with character portrait reference input.
1321
+ * Subset of IMAGE_TO_VIDEO_PROVIDERS — excludes text-to-video-only models. */
1322
+ declare const CHARACTER_MOTION_PROVIDERS: readonly ["kling", "kling-turbo", "kling-3.0", "wan-i2v", "wan-2.7-i2v"];
1323
+ type CharacterMotionProvider = typeof CHARACTER_MOTION_PROVIDERS[number];
1324
+ /**
1325
+ * Atmospheric video providers available to the Location Studio's motion tab.
1326
+ *
1327
+ * Tuned for ambient camera moves (dolly, pan, drift, parallax) rather than
1328
+ * character-driven motion. Subset of registered i2v providers; `seedance-2`
1329
+ * added as the cinematic option for establishing shots.
1330
+ *
1331
+ * Mirrors `CHARACTER_MOTION_PROVIDERS` shape — see entity-prompts.ts for the
1332
+ * naming convention.
1333
+ */
1334
+ declare const LOCATION_ATMOSPHERE_PROVIDERS: readonly ["kling", "kling-turbo", "kling-3.0", "wan-i2v", "wan-2.7-i2v", "seedance-2"];
1335
+ type LocationAtmosphereProvider = (typeof LOCATION_ATMOSPHERE_PROVIDERS)[number];
1336
+ /**
1337
+ * Subset of i2v providers tuned for short ambient object-motion clips (rotate,
1338
+ * hover, spin, parallax). Excludes premium models (Veo3, Veo3.1, Grok-i2v,
1339
+ * Sora2, Sora2-pro, Hailuo-2.3-pro) which are cost-prohibitive for the
1340
+ * product-loop use case (several times kling-turbo's per-clip cost).
1341
+ * Phase 2 candidate for adding veo3.1 if demand for premium hero shots
1342
+ * materializes.
1343
+ */
1344
+ declare const OBJECT_MOTION_PROVIDERS: readonly ["kling-turbo", "kling", "kling-3.0", "minimax", "hailuo-2.3", "wan-i2v", "seedance", "bytedance-lite"];
1345
+ type ObjectMotionProvider = (typeof OBJECT_MOTION_PROVIDERS)[number];
1346
+ /**
1347
+ * SceneInputMode — the input-shape contract a video model exposes to the
1348
+ * Scene Director. Gates which `video_model` values are valid for a given
1349
+ * scene's `shot_input_mode`. Consumed by Scene Director LLM prompting,
1350
+ * route Zod validation, and the frontend SceneNode config panel.
1351
+ *
1352
+ * See architecture spec §6.10 + v4.1 Methods 2/3/8/10 for per-mode semantics.
1353
+ */
1354
+ declare const SceneInputModeSchema: z.ZodEnum<{
1355
+ text: "text";
1356
+ first_frame: "first_frame";
1357
+ first_last_frame: "first_last_frame";
1358
+ ref_images: "ref_images";
1359
+ multi_shot: "multi_shot";
1360
+ video_continuation: "video_continuation";
1361
+ frame_interpolation: "frame_interpolation";
1362
+ camera_path: "camera_path";
1363
+ }>;
1364
+ type SceneInputMode = z.infer<typeof SceneInputModeSchema>;
1365
+ /**
1366
+ * Prompting style each model expects from the Scene Director.
1367
+ * Veo-family wants comma-separated cinematic tags; Kling-family wants
1368
+ * natural-language prose; Hailuo-family wants compact single-sentence prompts.
1369
+ */
1370
+ type ModelPromptingStyle = "cinematic_tag_heavy" | "natural_language" | "compact";
1371
+ interface VideoModelCapabilities {
1372
+ inputModes: SceneInputMode[];
1373
+ maxShotsPerCall?: number;
1374
+ supportsLipSyncIntegrated?: boolean;
1375
+ supportsVideoExtension?: boolean;
1376
+ supportsCameraPath?: boolean;
1377
+ maxInterpolationKeyframes?: number;
1378
+ maxDurationSeconds: number;
1379
+ prompting_style: ModelPromptingStyle;
1380
+ /**
1381
+ * Maximum number of reference IMAGES the model accepts in one call,
1382
+ * including the start frame. Drives `allocateReferenceSlots` in
1383
+ * `backend/src/ee/pipelines/continuity.ts` (Phase 1C.1 §5.13.3) — when
1384
+ * the budget is 1, multi-shot/character/object refs are silently
1385
+ * dropped and the slot allocator emits a `pipeline:warning` event.
1386
+ * Defaults to 1 when omitted.
1387
+ */
1388
+ maxReferenceImages?: number;
1389
+ }
1390
+ /**
1391
+ * VIDEO_MODEL_CAPS — single source of truth for what each video model supports.
1392
+ * Consumed by: Scene Director LLM (filters eligible models), route Zod validation
1393
+ * (rejects invalid video_model for the chosen shot_input_mode), frontend SceneNode
1394
+ * config panel (filters dropdown options).
1395
+ *
1396
+ * Adding a new video model: add an entry here, run audit-providers skill to verify
1397
+ * downstream wiring.
1398
+ */
1399
+ declare const VIDEO_MODEL_CAPS: Record<string, VideoModelCapabilities>;
1400
+ /**
1401
+ * modelsForInputMode — filter VIDEO_MODEL_CAPS to models that support the given mode.
1402
+ * Used at three call sites: Scene Director prompt construction, route Zod validation,
1403
+ * frontend config panel dropdown options.
1404
+ */
1405
+ declare const modelsForInputMode: (mode: SceneInputMode) => string[];
1406
+ /**
1407
+ * preferredInputModeForModel — pick the best `shot_input_mode` for a pinned
1408
+ * video model so the pipeline adapts its input wiring to the chosen model:
1409
+ *
1410
+ * - models that accept `ref_images` (Seedance 2, Kling Omni) → `"ref_images"`,
1411
+ * so the character/location reference portraits feed the video model
1412
+ * directly (strongest identity lock).
1413
+ * - otherwise models that accept a start frame → `"first_frame"`, so the
1414
+ * per-scene keyframe is connected as the opening frame.
1415
+ *
1416
+ * Returns `undefined` for unknown/unregistered models (not in VIDEO_MODEL_CAPS)
1417
+ * or models that expose neither mode, so the caller keeps its own default.
1418
+ *
1419
+ * `first_last_frame` is deliberately NOT auto-selected — the animate stage
1420
+ * does not yet implement paired start+end keyframes (Method 2), so a
1421
+ * first_last_frame-capable model still resolves to `first_frame` here.
1422
+ */
1423
+ declare function preferredInputModeForModel(model: string | undefined): SceneInputMode | undefined;
1424
+ declare const DEFAULT_VIDEO_PROVIDER = "seedance-2-fast";
1425
+ /**
1426
+ * Duration paired with the default provider when BOTH provider and duration
1427
+ * are omitted. Pins the nothing-specified request to the default model's
1428
+ * cheapest seeded tier (4s @ 480p — resolution omission already resolves to
1429
+ * 480p in buildVideoCreditModelIdentifier), so first-touch cost stays at
1430
+ * entry level and longer clips are an explicit choice.
1431
+ */
1432
+ declare const DEFAULT_VIDEO_DURATION_SEC = 4;
1433
+ /**
1434
+ * Resolve the effective (provider, duration) for a video request.
1435
+ *
1436
+ * - provider omitted → DEFAULT_VIDEO_PROVIDER
1437
+ * - duration omitted AND provider was omitted → DEFAULT_VIDEO_DURATION_SEC
1438
+ * - an explicitly chosen provider keeps its own duration semantics (an
1439
+ * omitted duration falls through to that model's natural default)
1440
+ *
1441
+ * Used by both single-node routes AND the workflow payload builder so the
1442
+ * two execution paths cannot drift (the route/DAG default previously
1443
+ * disagreed: "minimax" vs "kling").
1444
+ */
1445
+ declare function applyDefaultVideoSelection<D>(input: {
1446
+ provider?: string | null;
1447
+ duration?: D;
1448
+ }): {
1449
+ provider: string;
1450
+ duration: D | number | undefined;
1451
+ };
1452
+
1453
+ /**
1454
+ * TransitionType — the set of allowed shot-to-shot transitions emitted by the
1455
+ * Editor LLM stage. Single source of truth shared across:
1456
+ * - ShotSpec.cut_decision.transition_to_next (this file)
1457
+ * - backend/src/ee/pipelines/llms/editor.ts (LLM result schema)
1458
+ * - backend/src/ee/pipelines/services/pipeline-final-merge.ts
1459
+ * - backend/src/ee/pipelines/freecut-export.ts
1460
+ */
1461
+ declare const TransitionTypeSchema: z.ZodEnum<{
1462
+ dissolve: "dissolve";
1463
+ hard_cut: "hard_cut";
1464
+ match_cut: "match_cut";
1465
+ overlap: "overlap";
1466
+ }>;
1467
+ type TransitionType = z.infer<typeof TransitionTypeSchema>;
1468
+ /**
1469
+ * Tags a ShotSpec field that only a render or the user writes — measured
1470
+ * audio, the Editor LLM's cut, the dialogue no-cut zone, an accepted
1471
+ * match-cut break — and never the plan. Fields named for a url or an asset id
1472
+ * need no tag (their name already says so). A custom registry, not `.meta()`,
1473
+ * so the tag never appears in a JSON schema rendered from ShotSpecSchema.
1474
+ */
1475
+ declare const sceneRenderStateRegistry: z.core.$ZodRegistry<{
1476
+ render_state: true;
1477
+ }, z.core.$ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
1478
+ /**
1479
+ * ShotSpec — one shot inside a SceneNodeData.
1480
+ * Mirrors Architecture §6.9.1 + v4.1 Method-2/3/5/7/8/10 field additions.
1481
+ */
1482
+ declare const ShotSpecSchema: z.ZodObject<{
1483
+ shot_id: z.ZodString;
1484
+ camera: z.ZodObject<{
1485
+ shot_type: z.ZodEnum<{
1486
+ wide: "wide";
1487
+ medium: "medium";
1488
+ close_up: "close_up";
1489
+ extreme_close_up: "extreme_close_up";
1490
+ pov: "pov";
1491
+ over_shoulder: "over_shoulder";
1492
+ }>;
1493
+ angle: z.ZodEnum<{
1494
+ high: "high";
1495
+ low: "low";
1496
+ eye_level: "eye_level";
1497
+ dutch: "dutch";
1498
+ birds_eye: "birds_eye";
1499
+ }>;
1500
+ motion: z.ZodEnum<{
1501
+ pan: "pan";
1502
+ static: "static";
1503
+ tilt: "tilt";
1504
+ dolly: "dolly";
1505
+ tracking: "tracking";
1506
+ handheld: "handheld";
1507
+ }>;
1508
+ }, z.core.$strip>;
1509
+ shot_intensity_kind: z.ZodEnum<{
1510
+ establishing_shot: "establishing_shot";
1511
+ action_shot: "action_shot";
1512
+ dialogue_shot: "dialogue_shot";
1513
+ reaction_shot: "reaction_shot";
1514
+ climactic_shot: "climactic_shot";
1515
+ transition_shot: "transition_shot";
1516
+ }>;
1517
+ action: z.ZodString;
1518
+ dialogue_line: z.ZodNullable<z.ZodString>;
1519
+ duration_seconds: z.ZodNumber;
1520
+ motion_prompt: z.ZodString;
1521
+ start_state: z.ZodString;
1522
+ end_state: z.ZodString;
1523
+ continuity_with_previous: z.ZodNullable<z.ZodString>;
1524
+ shot_intent: z.ZodObject<{
1525
+ needs_multishot_reference: z.ZodDefault<z.ZodBoolean>;
1526
+ is_loopable: z.ZodDefault<z.ZodBoolean>;
1527
+ needs_music_suppression: z.ZodDefault<z.ZodBoolean>;
1528
+ is_match_cut: z.ZodDefault<z.ZodBoolean>;
1529
+ }, z.core.$strip>;
1530
+ visual_keyframe_prompt: z.ZodString;
1531
+ end_keyframe_prompt: z.ZodOptional<z.ZodString>;
1532
+ extends_shot_id: z.ZodOptional<z.ZodString>;
1533
+ bridge_image_prompt: z.ZodOptional<z.ZodString>;
1534
+ interpolation_keyframes: z.ZodOptional<z.ZodArray<z.ZodObject<{
1535
+ timestamp_sec: z.ZodNumber;
1536
+ prompt: z.ZodString;
1537
+ }, z.core.$strip>>>;
1538
+ interpolation_keyframe_urls: z.ZodOptional<z.ZodArray<z.ZodString>>;
1539
+ camera_path_directive: z.ZodOptional<z.ZodObject<{
1540
+ path_kind: z.ZodEnum<{
1541
+ dolly: "dolly";
1542
+ orbit: "orbit";
1543
+ crane: "crane";
1544
+ arc: "arc";
1545
+ reveal: "reveal";
1546
+ }>;
1547
+ parameters: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1548
+ }, z.core.$strip>>;
1549
+ keyframe_asset_id: z.ZodOptional<z.ZodString>;
1550
+ keyframe_url: z.ZodOptional<z.ZodString>;
1551
+ video_asset_id: z.ZodOptional<z.ZodString>;
1552
+ video_url: z.ZodOptional<z.ZodString>;
1553
+ last_frame_asset_id: z.ZodOptional<z.ZodString>;
1554
+ last_frame_url: z.ZodOptional<z.ZodString>;
1555
+ audio_asset_id: z.ZodOptional<z.ZodString>;
1556
+ audio_url: z.ZodOptional<z.ZodString>;
1557
+ lipsynced_asset_id: z.ZodOptional<z.ZodString>;
1558
+ lipsynced_url: z.ZodOptional<z.ZodString>;
1559
+ bridged_frame_url: z.ZodOptional<z.ZodString>;
1560
+ accepted_match_cut_break: z.ZodOptional<z.ZodBoolean>;
1561
+ has_dialogue: z.ZodDefault<z.ZodBoolean>;
1562
+ actual_audio_duration_sec: z.ZodOptional<z.ZodNumber>;
1563
+ dialogue_no_cut_zone: z.ZodOptional<z.ZodNullable<z.ZodObject<{
1564
+ start: z.ZodNumber;
1565
+ end: z.ZodNumber;
1566
+ }, z.core.$strip>>>;
1567
+ cut_decision: z.ZodOptional<z.ZodObject<{
1568
+ in_offset_sec: z.ZodDefault<z.ZodNumber>;
1569
+ out_offset_sec: z.ZodDefault<z.ZodNumber>;
1570
+ transition_to_next: z.ZodEnum<{
1571
+ dissolve: "dissolve";
1572
+ hard_cut: "hard_cut";
1573
+ match_cut: "match_cut";
1574
+ overlap: "overlap";
1575
+ }>;
1576
+ transition_duration_sec: z.ZodOptional<z.ZodNumber>;
1577
+ beat_snap_seconds: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
1578
+ }, z.core.$strip>>;
1579
+ }, z.core.$strip>;
1580
+ type ShotSpec = z.infer<typeof ShotSpecSchema>;
1581
+ /**
1582
+ * AssetRef — minimal asset reference shape for execution-state fields.
1583
+ * Phase 1B.2 doesn't populate these (Stage 6+ work) but the schema must accept them
1584
+ * for parse round-trips.
1585
+ */
1586
+ declare const AssetRefSchema: z.ZodObject<{
1587
+ asset_id: z.ZodString;
1588
+ url: z.ZodString;
1589
+ }, z.core.$strip>;
1590
+ type AssetRef = z.infer<typeof AssetRefSchema>;
1591
+ /**
1592
+ * SceneNodeData — what the Scene Director emits, what the SceneNode renders,
1593
+ * what the engine persists on `pipeline_entities.metadata` (for entity_type='scene').
1594
+ * Mirrors Architecture §6.9.1.
1595
+ */
1596
+ declare const SceneNodeDataSchema: z.ZodObject<{
1597
+ scene_index: z.ZodNumber;
1598
+ description: z.ZodString;
1599
+ emotional_beat: z.ZodString;
1600
+ duration_seconds: z.ZodNumber;
1601
+ shot_input_mode: z.ZodEnum<{
1602
+ text: "text";
1603
+ first_frame: "first_frame";
1604
+ first_last_frame: "first_last_frame";
1605
+ ref_images: "ref_images";
1606
+ multi_shot: "multi_shot";
1607
+ video_continuation: "video_continuation";
1608
+ frame_interpolation: "frame_interpolation";
1609
+ camera_path: "camera_path";
1610
+ }>;
1611
+ cast_keys: z.ZodArray<z.ZodString>;
1612
+ location_key: z.ZodString;
1613
+ object_keys: z.ZodArray<z.ZodString>;
1614
+ continuity_from_prev: z.ZodEnum<{
1615
+ dissolve: "dissolve";
1616
+ hard_cut: "hard_cut";
1617
+ match_last_frame: "match_last_frame";
1618
+ }>;
1619
+ image_model: z.ZodString;
1620
+ video_model: z.ZodString;
1621
+ shots: z.ZodArray<z.ZodObject<{
1622
+ shot_id: z.ZodString;
1623
+ camera: z.ZodObject<{
1624
+ shot_type: z.ZodEnum<{
1625
+ wide: "wide";
1626
+ medium: "medium";
1627
+ close_up: "close_up";
1628
+ extreme_close_up: "extreme_close_up";
1629
+ pov: "pov";
1630
+ over_shoulder: "over_shoulder";
1631
+ }>;
1632
+ angle: z.ZodEnum<{
1633
+ high: "high";
1634
+ low: "low";
1635
+ eye_level: "eye_level";
1636
+ dutch: "dutch";
1637
+ birds_eye: "birds_eye";
1638
+ }>;
1639
+ motion: z.ZodEnum<{
1640
+ pan: "pan";
1641
+ static: "static";
1642
+ tilt: "tilt";
1643
+ dolly: "dolly";
1644
+ tracking: "tracking";
1645
+ handheld: "handheld";
1646
+ }>;
1647
+ }, z.core.$strip>;
1648
+ shot_intensity_kind: z.ZodEnum<{
1649
+ establishing_shot: "establishing_shot";
1650
+ action_shot: "action_shot";
1651
+ dialogue_shot: "dialogue_shot";
1652
+ reaction_shot: "reaction_shot";
1653
+ climactic_shot: "climactic_shot";
1654
+ transition_shot: "transition_shot";
1655
+ }>;
1656
+ action: z.ZodString;
1657
+ dialogue_line: z.ZodNullable<z.ZodString>;
1658
+ duration_seconds: z.ZodNumber;
1659
+ motion_prompt: z.ZodString;
1660
+ start_state: z.ZodString;
1661
+ end_state: z.ZodString;
1662
+ continuity_with_previous: z.ZodNullable<z.ZodString>;
1663
+ shot_intent: z.ZodObject<{
1664
+ needs_multishot_reference: z.ZodDefault<z.ZodBoolean>;
1665
+ is_loopable: z.ZodDefault<z.ZodBoolean>;
1666
+ needs_music_suppression: z.ZodDefault<z.ZodBoolean>;
1667
+ is_match_cut: z.ZodDefault<z.ZodBoolean>;
1668
+ }, z.core.$strip>;
1669
+ visual_keyframe_prompt: z.ZodString;
1670
+ end_keyframe_prompt: z.ZodOptional<z.ZodString>;
1671
+ extends_shot_id: z.ZodOptional<z.ZodString>;
1672
+ bridge_image_prompt: z.ZodOptional<z.ZodString>;
1673
+ interpolation_keyframes: z.ZodOptional<z.ZodArray<z.ZodObject<{
1674
+ timestamp_sec: z.ZodNumber;
1675
+ prompt: z.ZodString;
1676
+ }, z.core.$strip>>>;
1677
+ interpolation_keyframe_urls: z.ZodOptional<z.ZodArray<z.ZodString>>;
1678
+ camera_path_directive: z.ZodOptional<z.ZodObject<{
1679
+ path_kind: z.ZodEnum<{
1680
+ dolly: "dolly";
1681
+ orbit: "orbit";
1682
+ crane: "crane";
1683
+ arc: "arc";
1684
+ reveal: "reveal";
1685
+ }>;
1686
+ parameters: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1687
+ }, z.core.$strip>>;
1688
+ keyframe_asset_id: z.ZodOptional<z.ZodString>;
1689
+ keyframe_url: z.ZodOptional<z.ZodString>;
1690
+ video_asset_id: z.ZodOptional<z.ZodString>;
1691
+ video_url: z.ZodOptional<z.ZodString>;
1692
+ last_frame_asset_id: z.ZodOptional<z.ZodString>;
1693
+ last_frame_url: z.ZodOptional<z.ZodString>;
1694
+ audio_asset_id: z.ZodOptional<z.ZodString>;
1695
+ audio_url: z.ZodOptional<z.ZodString>;
1696
+ lipsynced_asset_id: z.ZodOptional<z.ZodString>;
1697
+ lipsynced_url: z.ZodOptional<z.ZodString>;
1698
+ bridged_frame_url: z.ZodOptional<z.ZodString>;
1699
+ accepted_match_cut_break: z.ZodOptional<z.ZodBoolean>;
1700
+ has_dialogue: z.ZodDefault<z.ZodBoolean>;
1701
+ actual_audio_duration_sec: z.ZodOptional<z.ZodNumber>;
1702
+ dialogue_no_cut_zone: z.ZodOptional<z.ZodNullable<z.ZodObject<{
1703
+ start: z.ZodNumber;
1704
+ end: z.ZodNumber;
1705
+ }, z.core.$strip>>>;
1706
+ cut_decision: z.ZodOptional<z.ZodObject<{
1707
+ in_offset_sec: z.ZodDefault<z.ZodNumber>;
1708
+ out_offset_sec: z.ZodDefault<z.ZodNumber>;
1709
+ transition_to_next: z.ZodEnum<{
1710
+ dissolve: "dissolve";
1711
+ hard_cut: "hard_cut";
1712
+ match_cut: "match_cut";
1713
+ overlap: "overlap";
1714
+ }>;
1715
+ transition_duration_sec: z.ZodOptional<z.ZodNumber>;
1716
+ beat_snap_seconds: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
1717
+ }, z.core.$strip>>;
1718
+ }, z.core.$strip>>;
1719
+ scene_anchor_keyframe: z.ZodDefault<z.ZodNullable<z.ZodObject<{
1720
+ asset_id: z.ZodString;
1721
+ url: z.ZodString;
1722
+ }, z.core.$strip>>>;
1723
+ style_directives: z.ZodOptional<z.ZodObject<{
1724
+ visualStyle: z.ZodOptional<z.ZodOptional<z.ZodString>>;
1725
+ colorPalette: z.ZodOptional<z.ZodOptional<z.ZodString>>;
1726
+ lighting: z.ZodOptional<z.ZodOptional<z.ZodString>>;
1727
+ cameraLanguage: z.ZodOptional<z.ZodOptional<z.ZodString>>;
1728
+ avoid: z.ZodOptional<z.ZodOptional<z.ZodString>>;
1729
+ }, z.core.$strip>>;
1730
+ generated_keyframes: z.ZodDefault<z.ZodArray<z.ZodObject<{
1731
+ asset_id: z.ZodString;
1732
+ url: z.ZodString;
1733
+ }, z.core.$strip>>>;
1734
+ generated_clips: z.ZodDefault<z.ZodArray<z.ZodObject<{
1735
+ asset_id: z.ZodString;
1736
+ url: z.ZodString;
1737
+ }, z.core.$strip>>>;
1738
+ composite_video: z.ZodDefault<z.ZodNullable<z.ZodObject<{
1739
+ asset_id: z.ZodString;
1740
+ url: z.ZodString;
1741
+ }, z.core.$strip>>>;
1742
+ last_frame: z.ZodDefault<z.ZodNullable<z.ZodObject<{
1743
+ asset_id: z.ZodString;
1744
+ url: z.ZodString;
1745
+ }, z.core.$strip>>>;
1746
+ scene_audio_track: z.ZodDefault<z.ZodNullable<z.ZodObject<{
1747
+ asset_id: z.ZodString;
1748
+ url: z.ZodString;
1749
+ }, z.core.$strip>>>;
1750
+ composite_video_asset_id: z.ZodOptional<z.ZodString>;
1751
+ composite_video_url: z.ZodOptional<z.ZodString>;
1752
+ }, z.core.$strip>;
1753
+ type SceneNodeData = z.infer<typeof SceneNodeDataSchema>;
1754
+ /**
1755
+ * SceneMetadataSchema — what gets persisted on `pipeline_entities.metadata`
1756
+ * for entity_type='scene'. The discriminated union in pipeline-types.ts already has
1757
+ * Character/Object/Location entries from 1A; this Phase 1B.2 task extends it.
1758
+ */
1759
+ declare const SceneMetadataSchema: z.ZodObject<{
1760
+ entity_type: z.ZodLiteral<"scene">;
1761
+ scene_id: z.ZodString;
1762
+ shot_ids: z.ZodArray<z.ZodString>;
1763
+ emotional_beat: z.ZodString;
1764
+ scene_node_id: z.ZodString;
1765
+ exploded_to_workflow_id: z.ZodDefault<z.ZodNullable<z.ZodString>>;
1766
+ scene_node_data: z.ZodOptional<z.ZodObject<{
1767
+ scene_index: z.ZodNumber;
1768
+ description: z.ZodString;
1769
+ emotional_beat: z.ZodString;
1770
+ duration_seconds: z.ZodNumber;
1771
+ shot_input_mode: z.ZodEnum<{
1772
+ text: "text";
1773
+ first_frame: "first_frame";
1774
+ first_last_frame: "first_last_frame";
1775
+ ref_images: "ref_images";
1776
+ multi_shot: "multi_shot";
1777
+ video_continuation: "video_continuation";
1778
+ frame_interpolation: "frame_interpolation";
1779
+ camera_path: "camera_path";
1780
+ }>;
1781
+ cast_keys: z.ZodArray<z.ZodString>;
1782
+ location_key: z.ZodString;
1783
+ object_keys: z.ZodArray<z.ZodString>;
1784
+ continuity_from_prev: z.ZodEnum<{
1785
+ dissolve: "dissolve";
1786
+ hard_cut: "hard_cut";
1787
+ match_last_frame: "match_last_frame";
1788
+ }>;
1789
+ image_model: z.ZodString;
1790
+ video_model: z.ZodString;
1791
+ shots: z.ZodArray<z.ZodObject<{
1792
+ shot_id: z.ZodString;
1793
+ camera: z.ZodObject<{
1794
+ shot_type: z.ZodEnum<{
1795
+ wide: "wide";
1796
+ medium: "medium";
1797
+ close_up: "close_up";
1798
+ extreme_close_up: "extreme_close_up";
1799
+ pov: "pov";
1800
+ over_shoulder: "over_shoulder";
1801
+ }>;
1802
+ angle: z.ZodEnum<{
1803
+ high: "high";
1804
+ low: "low";
1805
+ eye_level: "eye_level";
1806
+ dutch: "dutch";
1807
+ birds_eye: "birds_eye";
1808
+ }>;
1809
+ motion: z.ZodEnum<{
1810
+ pan: "pan";
1811
+ static: "static";
1812
+ tilt: "tilt";
1813
+ dolly: "dolly";
1814
+ tracking: "tracking";
1815
+ handheld: "handheld";
1816
+ }>;
1817
+ }, z.core.$strip>;
1818
+ shot_intensity_kind: z.ZodEnum<{
1819
+ establishing_shot: "establishing_shot";
1820
+ action_shot: "action_shot";
1821
+ dialogue_shot: "dialogue_shot";
1822
+ reaction_shot: "reaction_shot";
1823
+ climactic_shot: "climactic_shot";
1824
+ transition_shot: "transition_shot";
1825
+ }>;
1826
+ action: z.ZodString;
1827
+ dialogue_line: z.ZodNullable<z.ZodString>;
1828
+ duration_seconds: z.ZodNumber;
1829
+ motion_prompt: z.ZodString;
1830
+ start_state: z.ZodString;
1831
+ end_state: z.ZodString;
1832
+ continuity_with_previous: z.ZodNullable<z.ZodString>;
1833
+ shot_intent: z.ZodObject<{
1834
+ needs_multishot_reference: z.ZodDefault<z.ZodBoolean>;
1835
+ is_loopable: z.ZodDefault<z.ZodBoolean>;
1836
+ needs_music_suppression: z.ZodDefault<z.ZodBoolean>;
1837
+ is_match_cut: z.ZodDefault<z.ZodBoolean>;
1838
+ }, z.core.$strip>;
1839
+ visual_keyframe_prompt: z.ZodString;
1840
+ end_keyframe_prompt: z.ZodOptional<z.ZodString>;
1841
+ extends_shot_id: z.ZodOptional<z.ZodString>;
1842
+ bridge_image_prompt: z.ZodOptional<z.ZodString>;
1843
+ interpolation_keyframes: z.ZodOptional<z.ZodArray<z.ZodObject<{
1844
+ timestamp_sec: z.ZodNumber;
1845
+ prompt: z.ZodString;
1846
+ }, z.core.$strip>>>;
1847
+ interpolation_keyframe_urls: z.ZodOptional<z.ZodArray<z.ZodString>>;
1848
+ camera_path_directive: z.ZodOptional<z.ZodObject<{
1849
+ path_kind: z.ZodEnum<{
1850
+ dolly: "dolly";
1851
+ orbit: "orbit";
1852
+ crane: "crane";
1853
+ arc: "arc";
1854
+ reveal: "reveal";
1855
+ }>;
1856
+ parameters: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1857
+ }, z.core.$strip>>;
1858
+ keyframe_asset_id: z.ZodOptional<z.ZodString>;
1859
+ keyframe_url: z.ZodOptional<z.ZodString>;
1860
+ video_asset_id: z.ZodOptional<z.ZodString>;
1861
+ video_url: z.ZodOptional<z.ZodString>;
1862
+ last_frame_asset_id: z.ZodOptional<z.ZodString>;
1863
+ last_frame_url: z.ZodOptional<z.ZodString>;
1864
+ audio_asset_id: z.ZodOptional<z.ZodString>;
1865
+ audio_url: z.ZodOptional<z.ZodString>;
1866
+ lipsynced_asset_id: z.ZodOptional<z.ZodString>;
1867
+ lipsynced_url: z.ZodOptional<z.ZodString>;
1868
+ bridged_frame_url: z.ZodOptional<z.ZodString>;
1869
+ accepted_match_cut_break: z.ZodOptional<z.ZodBoolean>;
1870
+ has_dialogue: z.ZodDefault<z.ZodBoolean>;
1871
+ actual_audio_duration_sec: z.ZodOptional<z.ZodNumber>;
1872
+ dialogue_no_cut_zone: z.ZodOptional<z.ZodNullable<z.ZodObject<{
1873
+ start: z.ZodNumber;
1874
+ end: z.ZodNumber;
1875
+ }, z.core.$strip>>>;
1876
+ cut_decision: z.ZodOptional<z.ZodObject<{
1877
+ in_offset_sec: z.ZodDefault<z.ZodNumber>;
1878
+ out_offset_sec: z.ZodDefault<z.ZodNumber>;
1879
+ transition_to_next: z.ZodEnum<{
1880
+ dissolve: "dissolve";
1881
+ hard_cut: "hard_cut";
1882
+ match_cut: "match_cut";
1883
+ overlap: "overlap";
1884
+ }>;
1885
+ transition_duration_sec: z.ZodOptional<z.ZodNumber>;
1886
+ beat_snap_seconds: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
1887
+ }, z.core.$strip>>;
1888
+ }, z.core.$strip>>;
1889
+ scene_anchor_keyframe: z.ZodDefault<z.ZodNullable<z.ZodObject<{
1890
+ asset_id: z.ZodString;
1891
+ url: z.ZodString;
1892
+ }, z.core.$strip>>>;
1893
+ style_directives: z.ZodOptional<z.ZodObject<{
1894
+ visualStyle: z.ZodOptional<z.ZodOptional<z.ZodString>>;
1895
+ colorPalette: z.ZodOptional<z.ZodOptional<z.ZodString>>;
1896
+ lighting: z.ZodOptional<z.ZodOptional<z.ZodString>>;
1897
+ cameraLanguage: z.ZodOptional<z.ZodOptional<z.ZodString>>;
1898
+ avoid: z.ZodOptional<z.ZodOptional<z.ZodString>>;
1899
+ }, z.core.$strip>>;
1900
+ generated_keyframes: z.ZodDefault<z.ZodArray<z.ZodObject<{
1901
+ asset_id: z.ZodString;
1902
+ url: z.ZodString;
1903
+ }, z.core.$strip>>>;
1904
+ generated_clips: z.ZodDefault<z.ZodArray<z.ZodObject<{
1905
+ asset_id: z.ZodString;
1906
+ url: z.ZodString;
1907
+ }, z.core.$strip>>>;
1908
+ composite_video: z.ZodDefault<z.ZodNullable<z.ZodObject<{
1909
+ asset_id: z.ZodString;
1910
+ url: z.ZodString;
1911
+ }, z.core.$strip>>>;
1912
+ last_frame: z.ZodDefault<z.ZodNullable<z.ZodObject<{
1913
+ asset_id: z.ZodString;
1914
+ url: z.ZodString;
1915
+ }, z.core.$strip>>>;
1916
+ scene_audio_track: z.ZodDefault<z.ZodNullable<z.ZodObject<{
1917
+ asset_id: z.ZodString;
1918
+ url: z.ZodString;
1919
+ }, z.core.$strip>>>;
1920
+ composite_video_asset_id: z.ZodOptional<z.ZodString>;
1921
+ composite_video_url: z.ZodOptional<z.ZodString>;
1922
+ }, z.core.$strip>>;
1923
+ }, z.core.$strip>;
1924
+ type SceneMetadata = z.infer<typeof SceneMetadataSchema>;
1925
+ /**
1926
+ * MatchCutVerdictSchema — Phase 1D.1 Method 7.
1927
+ *
1928
+ * What Stage 6 persists in `pipeline_stages.output.match_cut_verdicts` for
1929
+ * each match-cut shot pair. Keyed by the TARGET shot_id (the shot with
1930
+ * `shot_intent.is_match_cut=true`). The pair is [target, next-shot].
1931
+ *
1932
+ * Stage 6 runs `runValidateMatchCut` for every eligible target and stores
1933
+ * one MatchCutVerdict per pair. The `pendingBreaks` list in the orchestrator
1934
+ * result identifies shots the user must explicitly accept before Stage 7 runs.
1935
+ */
1936
+ declare const MatchCutVerdictSchema: z.ZodObject<{
1937
+ shot_pair: z.ZodTuple<[z.ZodString, z.ZodString], null>;
1938
+ match_strength: z.ZodEnum<{
1939
+ strong: "strong";
1940
+ moderate: "moderate";
1941
+ weak: "weak";
1942
+ break: "break";
1943
+ }>;
1944
+ suggested_adjustments: z.ZodString;
1945
+ checked_at: z.ZodString;
1946
+ }, z.core.$strip>;
1947
+ type MatchCutVerdict = z.infer<typeof MatchCutVerdictSchema>;
1948
+
1949
+ export { type ImageEditProvider as $, AI_WRITER_PROVIDERS as A, type FaceSwapProvider as B, CHARACTER_MOTION_PROVIDERS as C, DEFAULT_DIALOGUE_PROVIDER as D, EXTEND_VIDEO_PROVIDERS as E, FACE_SWAP_PROVIDERS as F, GEMINI_OMNI_PROVIDERS as G, GUIDANCE_SCALE_SUPPORT as H, GVP_ANCHOR_CHOICES as I, GVP_DEFAULT_PROVIDER as J, GVP_END_FRAME_PROVIDERS as K, GVP_EXTEND_PROVIDERS as L, GVP_SUPPORTED_PROVIDERS as M, type GvpAnchorChoice as N, type GvpAnchorWireMode as O, HIGH_QUALITY_PROVIDERS as P, I2I_MASK_SUPPORT as Q, I2I_STRENGTH_SUPPORT as R, IDEOGRAM_PROVIDERS as S, IMAGE_ASPECT_RATIO_VALUES as T, IMAGE_EDIT_PROVIDERS as U, IMAGE_GEN_PROVIDERS as V, IMAGE_I2I_PROVIDERS as W, IMAGE_MASK_MODE as X, IMAGE_PROMPT_MAX as Y, IMAGE_TO_VIDEO_PROVIDERS as Z, type ImageAspectRatio as _, ASPECT_RATIO_DIMENSIONS as a, SceneInputModeSchema as a$, type ImageGenProvider as a0, type ImageI2IProvider as a1, type ImageMaskMode as a2, type ImageToVideoProvider as a3, LIP_SYNC_PROVIDERS as a4, LLM_TEXT_INPUT_MAX as a5, LOCATION_ATMOSPHERE_PROVIDERS as a6, type LipSyncProvider as a7, type LocationAtmosphereProvider as a8, MAX_IMAGE_PROMPT_CHARS_BY_PROVIDER as a9, QA_CHECK_PROVIDERS as aA, type QaCheckProvider as aB, REF_IMAGE_MAX_LIMITS as aC, RENDERING_SPEED_SUPPORT as aD, REPLICATE_LIP_SYNC_PROVIDERS as aE, type RefVideoDurationLimit as aF, SCRIPT_PROVIDERS as aG, SEEDANCE_2_5_REF_LIMITS as aH, SEEDANCE_2_CONTINUATION_REF_SEC as aI, SEEDANCE_2_EXTEND_STITCH as aJ, SEEDANCE_2_PROVIDERS as aK, SEEDANCE_2_R2V_MAX_AUDIO_SEC_BY_PROVIDER as aL, SEEDANCE_2_R2V_MIN_REF_VIDEO_SEC as aM, SEEDANCE_2_REF_LIMITS as aN, SEEDANCE_LIP_SYNC_PROVIDERS as aO, SEEDANCE_VIDEO_EDIT_PROVIDERS as aP, SEEDANCE_VIDEO_EDIT_SHAPE as aQ, SEED_SUPPORT as aR, SUNO_ACTIVE_MODELS as aS, SUNO_ADD_TRACK_MODELS as aT, SUNO_DURATION_MODELS as aU, SUNO_HARD_CEILING as aV, SUNO_LEGACY_MODELS as aW, SUNO_MODELS as aX, SUNO_TEXT_MAX as aY, SUNO_TITLE_MAX as aZ, type SceneInputMode as a_, MAX_NEGATIVE_PROMPT_CHARS_BY_PROVIDER as aa, MAX_TTS_CHARS_BY_PROVIDER as ab, MAX_VIDEO_PROMPT_CHARS_BY_PROVIDER as ac, MINIMAX_H3_DEFAULT_RESOLUTION as ad, MINIMAX_H3_PROVIDERS as ae, MODELS_WITH_REFERENCE_IMAGE_SUPPORT as af, MODIFY_IMAGE_PROVIDERS as ag, MOTION_TRANSFER_PROVIDERS as ah, MUSIC_CREDIT_ID as ai, MUSIC_PROVIDERS as aj, MUSIC_PROVIDER_LABELS as ak, type MatchCutVerdict as al, MatchCutVerdictSchema as am, type ModelPromptingStyle as an, type ModifyImageProvider as ao, type MotionTransferProviderType as ap, type MusicProvider as aq, NATIVE_ADAPTIVE_ASPECT as ar, NATIVE_NEGATIVE_PROMPT_MODELS as as, NATIVE_NEGATIVE_VIDEO_PROVIDERS as at, NEGATIVE_PROMPT_MAX as au, OBJECT_MOTION_PROVIDERS as av, type ObjectMotionProvider as aw, PRICING_DEFAULT_DURATION_SEC as ax, PRICING_DEFAULT_RESOLUTION as ay, PROMPT_HARD_CEILING as az, AUDIO_ADDON_PROVIDERS as b, defaultVideoAspectRatio as b$, type SceneMetadata as b0, SceneMetadataSchema as b1, type SceneNodeData as b2, SceneNodeDataSchema as b3, type ScriptProvider as b4, type SeedanceVideoEditProvider as b5, type ShotSpec as b6, ShotSpecSchema as b7, type SunoAddTrackModel as b8, type SunoModel as b9, VIDEO_MODEL_CAPS as bA, VIDEO_MODE_ALIASES as bB, VIDEO_PROMPT_MAX as bC, VIDEO_PROVIDERS_REQUIRING_IMAGE as bD, VIDEO_PROVIDERS_WITHOUT_DISPATCH as bE, VIDEO_REF_LIMITS_BY_PROVIDER as bF, VIDEO_REF_VIDEO_DURATION_LIMITS as bG, VIDEO_TO_VIDEO_NODE_PROVIDERS as bH, VIDEO_TO_VIDEO_PROVIDERS as bI, VIDEO_UPSCALE_PROVIDERS as bJ, VIDEO_VARIABLE_PRICING as bK, VOICE_DESIGN_MODELS as bL, type VideoAudioCapability as bM, type VideoAudioMode as bN, type VideoGenProvider as bO, type VideoModeAlias as bP, type VideoModelCapabilities as bQ, type VideoToVideoNodeProvider as bR, type VideoToVideoProvider as bS, type VideoUpscaleProvider as bT, type VoiceDesignModel as bU, WAN_3_DEFAULT_RESOLUTION as bV, WAN_3_PROVIDERS as bW, applyDefaultVideoSelection as bX, applyVideoAudioToggle as bY, applyVideoNegativePrompt as bZ, checkRefVideoDurations as b_, T2I_TO_I2I_VARIANT as ba, TASK_CHAINED_EDIT_PROVIDERS as bb, TEXT_TO_AUDIO_PROVIDERS as bc, TEXT_TO_VIDEO_PROVIDERS as bd, TRANSCRIBE_LANES as be, TRANSCRIBE_PROVIDERS as bf, TRANSCRIBE_PROVIDER_CAPABILITIES as bg, TTS_PROVIDERS as bh, TTS_TEXT_MAX as bi, TWO_K_RESOLUTION_PROVIDERS as bj, type TextToAudioProvider as bk, type TextToVideoProvider as bl, type TranscribeLane as bm, type TranscribeProvider as bn, type TransitionType as bo, TransitionTypeSchema as bp, type TtsProvider as bq, UPSCALE_IMAGE_PROVIDERS as br, type UpscaleImageProvider as bs, VARIABLE_PRICING_MODELS as bt, VEO_PROVIDERS as bu, VIDEO_AUDIO_CAPABILITY as bv, VIDEO_DURATION_TIERS as bw, VIDEO_GEN_COLLAPSED_T2V_IDS as bx, VIDEO_GEN_PROVIDERS as by, VIDEO_INPUT_LIP_SYNC_PROVIDERS as bz, type AiWriterProvider as c, findSeedance2AudioOverLimit as c0, getMaxImagePromptChars as c1, getMaxNegativePromptChars as c2, getMaxSunoPromptChars as c3, getMaxSunoStyleChars as c4, getMaxTtsChars as c5, getMaxVideoPromptChars as c6, getVideoAudioCapability as c7, hasContiguousSegmentDurations as c8, imageReferenceLimit as c9, supportsAutoVideoDuration as cA, supportsEndAnchor as cB, supportsExtendRender as cC, transcribeLaneSupportsWordTimestamps as cD, transcribeProvidersWithWordTimestamps as cE, videoDefaultDurationSec as cF, videoModelCanSpeakDialogue as cG, videoModelSupportsAudio as cH, videoNegativeSuffix as cI, videoProviderFoldsLoneEndFrame as cJ, videoProviderRequiresImage as cK, isGeminiOmniProvider as ca, isGvpSupportedProvider as cb, isLegacySunoModel as cc, isMinimaxH3Provider as cd, isSeedance2Provider as ce, isSeedanceVideoEditProvider as cf, isVeoProvider as cg, isWan3Provider as ch, maxSegmentSecFor as ci, maxSegmentsFor as cj, maxVideoDurationSec as ck, minSegmentSecFor as cl, modelsForInputMode as cm, normalizeMinimaxH3Resolution as cn, normalizeWan3Resolution as co, preferredInputModeForModel as cp, pricedOutputDurationSec as cq, resolveGvpAnchorWire as cr, resolveMusicProvider as cs, resolveVideoModeForInputs as ct, resolveVideoProviderForMode as cu, sceneRenderStateRegistry as cv, seedance2AudioLimitSec as cw, segmentDurationsFor as cx, snapToNearestDuration as cy, sunoModelHonoursDuration as cz, type AssetRef as d, AssetRefSchema as e, COMPOSER_PLAN_FIELDS as f, COMPOSER_PLAN_MAP as g, CREDIT_BASE_USD as h, type CharacterMotionProvider as i, DEFAULT_MUSIC_PROVIDER as j, DEFAULT_REF_IMAGE_MAX as k, DEFAULT_SUNO_MODEL as l, DEFAULT_TEXT_TO_AUDIO_PROVIDER as m, DEFAULT_TRANSCRIBE_NODE_PROVIDER as n, DEFAULT_TRANSCRIBE_PROVIDER as o, DEFAULT_TTS_PROVIDER as p, DEFAULT_VIDEO_DURATION_SEC as q, DEFAULT_VIDEO_PROVIDER as r, DEFAULT_VOICE_DESIGN_MODEL as s, DIALOGUE_PROVIDERS as t, DURATION_PRICED_PROVIDERS as u, type DialogueProvider as v, type ExtendVideoProvider as w, FAL_LIP_SYNC_PROVIDERS as x, FLEXIBLE_INPUT_LIP_SYNC_PROVIDERS as y, FRAME_MODE_ADAPTIVE_ONLY_ASPECT as z };