@nodaro/shared 3.61.0 → 3.63.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 (313) hide show
  1. package/dist/{chunk-4KYLNTR7.cjs → chunk-2PU3AGGS.cjs} +27 -4
  2. package/dist/chunk-2PU3AGGS.cjs.map +1 -0
  3. package/dist/{chunk-43TGSZRJ.js → chunk-2QKF7M2Z.js} +3 -3
  4. package/dist/{chunk-43TGSZRJ.js.map → chunk-2QKF7M2Z.js.map} +1 -1
  5. package/dist/{chunk-B6BG3LV2.js → chunk-34QLPTSA.js} +3 -3
  6. package/dist/{chunk-B6BG3LV2.js.map → chunk-34QLPTSA.js.map} +1 -1
  7. package/dist/chunk-3K24DWOH.js +453 -0
  8. package/dist/chunk-3K24DWOH.js.map +1 -0
  9. package/dist/{chunk-IRQ3SPX7.js → chunk-4DVWXEB6.js} +23 -4
  10. package/dist/chunk-4DVWXEB6.js.map +1 -0
  11. package/dist/{chunk-ZES6EZC4.js → chunk-4MMZD63H.js} +3 -3
  12. package/dist/{chunk-ZES6EZC4.js.map → chunk-4MMZD63H.js.map} +1 -1
  13. package/dist/{chunk-MQZRQ5LM.cjs → chunk-63H4C56Q.cjs} +8 -8
  14. package/dist/{chunk-MQZRQ5LM.cjs.map → chunk-63H4C56Q.cjs.map} +1 -1
  15. package/dist/{chunk-IVXSNW2B.cjs → chunk-6BZC2ZHC.cjs} +18 -332
  16. package/dist/chunk-6BZC2ZHC.cjs.map +1 -0
  17. package/dist/{chunk-M3SXUUWC.cjs → chunk-6FQBKI2A.cjs} +4 -11
  18. package/dist/chunk-6FQBKI2A.cjs.map +1 -0
  19. package/dist/{chunk-673E4KYC.js → chunk-6M563QE6.js} +134 -8
  20. package/dist/chunk-6M563QE6.js.map +1 -0
  21. package/dist/chunk-6TGB7ECA.cjs +48 -0
  22. package/dist/chunk-6TGB7ECA.cjs.map +1 -0
  23. package/dist/{chunk-XUJC6GHE.cjs → chunk-6XUG4L7X.cjs} +6 -6
  24. package/dist/{chunk-XUJC6GHE.cjs.map → chunk-6XUG4L7X.cjs.map} +1 -1
  25. package/dist/{chunk-XZKFZMRT.cjs → chunk-77WU3V3J.cjs} +6 -6
  26. package/dist/{chunk-XZKFZMRT.cjs.map → chunk-77WU3V3J.cjs.map} +1 -1
  27. package/dist/{chunk-ZFJN23V4.cjs → chunk-A2PX5IRC.cjs} +4 -4
  28. package/dist/{chunk-ZFJN23V4.cjs.map → chunk-A2PX5IRC.cjs.map} +1 -1
  29. package/dist/{chunk-ZDBPQBAA.js → chunk-AE3AAJ4O.js} +3 -3
  30. package/dist/{chunk-ZDBPQBAA.js.map → chunk-AE3AAJ4O.js.map} +1 -1
  31. package/dist/chunk-ALRXY4QH.cjs +13 -0
  32. package/dist/chunk-ALRXY4QH.cjs.map +1 -0
  33. package/dist/{chunk-UARGJ5IZ.js → chunk-BMJVKYVB.js} +56 -12
  34. package/dist/chunk-BMJVKYVB.js.map +1 -0
  35. package/dist/{chunk-6XVHYD5R.js → chunk-CLAKSLXF.js} +4 -9
  36. package/dist/chunk-CLAKSLXF.js.map +1 -0
  37. package/dist/chunk-CTANEPMY.js +61 -0
  38. package/dist/chunk-CTANEPMY.js.map +1 -0
  39. package/dist/chunk-CZ5IQB3L.js +42 -0
  40. package/dist/chunk-CZ5IQB3L.js.map +1 -0
  41. package/dist/{chunk-WGKAOUEQ.cjs → chunk-D34K455O.cjs} +3 -2
  42. package/dist/chunk-D34K455O.cjs.map +1 -0
  43. package/dist/chunk-EPXGG27L.js +331 -0
  44. package/dist/chunk-EPXGG27L.js.map +1 -0
  45. package/dist/{chunk-3M4BNKFJ.cjs → chunk-F6WGGYQW.cjs} +167 -3
  46. package/dist/chunk-F6WGGYQW.cjs.map +1 -0
  47. package/dist/{chunk-7FCTCWHD.js → chunk-FXGNRYQQ.js} +3 -3
  48. package/dist/{chunk-7FCTCWHD.js.map → chunk-FXGNRYQQ.js.map} +1 -1
  49. package/dist/{chunk-ZNM2LW3D.cjs → chunk-GMBDLNLD.cjs} +105 -56
  50. package/dist/chunk-GMBDLNLD.cjs.map +1 -0
  51. package/dist/{chunk-NJVOJXBS.cjs → chunk-GSKLPI3J.cjs} +104 -49
  52. package/dist/chunk-GSKLPI3J.cjs.map +1 -0
  53. package/dist/{chunk-EWS2VFO4.js → chunk-HBXF6RUU.js} +4 -4
  54. package/dist/{chunk-EWS2VFO4.js.map → chunk-HBXF6RUU.js.map} +1 -1
  55. package/dist/{chunk-MOMFX32D.js → chunk-HWQ2SYNA.js} +194 -325
  56. package/dist/chunk-HWQ2SYNA.js.map +1 -0
  57. package/dist/{chunk-SCMTN57Y.js → chunk-IY3Y462W.js} +3 -3
  58. package/dist/{chunk-SCMTN57Y.js.map → chunk-IY3Y462W.js.map} +1 -1
  59. package/dist/{chunk-ZZGQRRN7.js → chunk-KCZHQH2O.js} +6 -306
  60. package/dist/chunk-KCZHQH2O.js.map +1 -0
  61. package/dist/{chunk-XROE3CAS.cjs → chunk-KHH54GRP.cjs} +120 -79
  62. package/dist/chunk-KHH54GRP.cjs.map +1 -0
  63. package/dist/{chunk-FVVD6XY2.js → chunk-KL6GAYTT.js} +13 -4
  64. package/dist/chunk-KL6GAYTT.js.map +1 -0
  65. package/dist/{chunk-FVII3KHN.js → chunk-KMGCHV6O.js} +163 -4
  66. package/dist/chunk-KMGCHV6O.js.map +1 -0
  67. package/dist/{chunk-FMXFHJWX.cjs → chunk-L2TVY6XN.cjs} +4 -4
  68. package/dist/{chunk-FMXFHJWX.cjs.map → chunk-L2TVY6XN.cjs.map} +1 -1
  69. package/dist/{chunk-FQXRYPCX.cjs → chunk-LH72PQO2.cjs} +505 -68
  70. package/dist/chunk-LH72PQO2.cjs.map +1 -0
  71. package/dist/chunk-LMAQUR55.cjs +506 -0
  72. package/dist/chunk-LMAQUR55.cjs.map +1 -0
  73. package/dist/{chunk-F5YEMSNK.cjs → chunk-M5OCFGHF.cjs} +571 -30
  74. package/dist/chunk-M5OCFGHF.cjs.map +1 -0
  75. package/dist/{chunk-VOWJCUMR.js → chunk-MD4XHED4.js} +3 -3
  76. package/dist/{chunk-VOWJCUMR.js.map → chunk-MD4XHED4.js.map} +1 -1
  77. package/dist/chunk-N5HH46JF.cjs +68 -0
  78. package/dist/chunk-N5HH46JF.cjs.map +1 -0
  79. package/dist/{chunk-G4XWVWRI.js → chunk-NIAFR5EE.js} +5 -4
  80. package/dist/chunk-NIAFR5EE.js.map +1 -0
  81. package/dist/{chunk-CF4S4N5X.js → chunk-O2QOBA6Q.js} +2 -2
  82. package/dist/{chunk-CF4S4N5X.js.map → chunk-O2QOBA6Q.js.map} +1 -1
  83. package/dist/{chunk-4GGLKRYI.cjs → chunk-O6TBB4IF.cjs} +2 -2
  84. package/dist/{chunk-4GGLKRYI.cjs.map → chunk-O6TBB4IF.cjs.map} +1 -1
  85. package/dist/{chunk-SWVGHAYO.js → chunk-O7RZRUMZ.js} +110 -74
  86. package/dist/chunk-O7RZRUMZ.js.map +1 -0
  87. package/dist/{chunk-LLOIAGFB.js → chunk-OV3JTKBY.js} +449 -51
  88. package/dist/chunk-OV3JTKBY.js.map +1 -0
  89. package/dist/{chunk-A3FHTSLB.js → chunk-PSKZKLDG.js} +550 -31
  90. package/dist/chunk-PSKZKLDG.js.map +1 -0
  91. package/dist/{chunk-VB2ARGQ6.js → chunk-RGNHHIMN.js} +3 -3
  92. package/dist/chunk-RGNHHIMN.js.map +1 -0
  93. package/dist/chunk-SMOO5FAH.js +10 -0
  94. package/dist/chunk-SMOO5FAH.js.map +1 -0
  95. package/dist/{chunk-5XRRENHD.cjs → chunk-TM5JYSJF.cjs} +170 -17
  96. package/dist/chunk-TM5JYSJF.cjs.map +1 -0
  97. package/dist/{chunk-PONP5J5E.cjs → chunk-V24EPI5N.cjs} +13 -3
  98. package/dist/chunk-V24EPI5N.cjs.map +1 -0
  99. package/dist/{chunk-RQ4F3AJH.cjs → chunk-V5EEQR2U.cjs} +21 -21
  100. package/dist/{chunk-RQ4F3AJH.cjs.map → chunk-V5EEQR2U.cjs.map} +1 -1
  101. package/dist/chunk-WZVIBAKN.cjs +351 -0
  102. package/dist/chunk-WZVIBAKN.cjs.map +1 -0
  103. package/dist/{chunk-5M43XMRB.cjs → chunk-X5BAFW3Q.cjs} +8 -8
  104. package/dist/{chunk-5M43XMRB.cjs.map → chunk-X5BAFW3Q.cjs.map} +1 -1
  105. package/dist/{chunk-RUHKBEFF.js → chunk-XBTYGQ6Z.js} +63 -10
  106. package/dist/chunk-XBTYGQ6Z.js.map +1 -0
  107. package/dist/{chunk-JHTT2V4A.cjs → chunk-XGGZWA4A.cjs} +118 -52
  108. package/dist/chunk-XGGZWA4A.cjs.map +1 -0
  109. package/dist/{chunk-5I4T4QR5.cjs → chunk-XGVJGNZW.cjs} +5 -5
  110. package/dist/{chunk-5I4T4QR5.cjs.map → chunk-XGVJGNZW.cjs.map} +1 -1
  111. package/dist/{chunk-7ARKVJTN.cjs → chunk-Y35JQPT6.cjs} +228 -383
  112. package/dist/chunk-Y35JQPT6.cjs.map +1 -0
  113. package/dist/{chunk-AFQFGZN7.cjs → chunk-Y4GCJJPF.cjs} +8 -6
  114. package/dist/chunk-Y4GCJJPF.cjs.map +1 -0
  115. package/dist/{chunk-C77F4ZTL.js → chunk-YUER7TJG.js} +3 -3
  116. package/dist/{chunk-C77F4ZTL.js.map → chunk-YUER7TJG.js.map} +1 -1
  117. package/dist/{chunk-HGI2VKIV.js → chunk-YX6TFX7H.js} +67 -14
  118. package/dist/chunk-YX6TFX7H.js.map +1 -0
  119. package/dist/{chunk-TWF2OSH4.cjs → chunk-ZPE2ZTJ4.cjs} +4 -4
  120. package/dist/{chunk-TWF2OSH4.cjs.map → chunk-ZPE2ZTJ4.cjs.map} +1 -1
  121. package/dist/entries/apps.cjs +44 -44
  122. package/dist/entries/apps.js +9 -9
  123. package/dist/entries/credits.cjs +286 -153
  124. package/dist/entries/credits.d.cts +254 -5
  125. package/dist/entries/credits.d.ts +254 -5
  126. package/dist/entries/credits.js +14 -9
  127. package/dist/entries/entities.cjs +188 -143
  128. package/dist/entries/entities.d.cts +122 -1
  129. package/dist/entries/entities.d.ts +122 -1
  130. package/dist/entries/entities.js +2 -1
  131. package/dist/entries/llm-models.cjs +77 -57
  132. package/dist/entries/llm-models.d.cts +85 -5
  133. package/dist/entries/llm-models.d.ts +85 -5
  134. package/dist/entries/llm-models.js +2 -2
  135. package/dist/entries/media.cjs +92 -87
  136. package/dist/entries/media.d.cts +19 -1
  137. package/dist/entries/media.d.ts +19 -1
  138. package/dist/entries/media.js +3 -2
  139. package/dist/entries/model-catalog.cjs +211 -103
  140. package/dist/entries/model-catalog.d.cts +135 -19
  141. package/dist/entries/model-catalog.d.ts +135 -19
  142. package/dist/entries/model-catalog.js +5 -5
  143. package/dist/entries/models.cjs +504 -295
  144. package/dist/entries/models.d.cts +71 -4
  145. package/dist/entries/models.d.ts +71 -4
  146. package/dist/entries/models.js +7 -6
  147. package/dist/entries/nodes.cjs +249 -233
  148. package/dist/entries/nodes.d.cts +35 -6
  149. package/dist/entries/nodes.d.ts +35 -6
  150. package/dist/entries/nodes.js +10 -10
  151. package/dist/entries/pipeline.cjs +152 -152
  152. package/dist/entries/pipeline.d.cts +3 -2
  153. package/dist/entries/pipeline.d.ts +3 -2
  154. package/dist/entries/pipeline.js +3 -3
  155. package/dist/entries/runtime-config.cjs +29 -29
  156. package/dist/entries/runtime-config.d.cts +10 -7
  157. package/dist/entries/runtime-config.d.ts +10 -7
  158. package/dist/entries/runtime-config.js +1 -1
  159. package/dist/entries/social.cjs +177 -177
  160. package/dist/entries/social.js +2 -2
  161. package/dist/entries/types.d.cts +8 -0
  162. package/dist/entries/types.d.ts +8 -0
  163. package/dist/entries/ugc.cjs +71 -71
  164. package/dist/entries/ugc.js +4 -4
  165. package/dist/entries/video.cjs +316 -208
  166. package/dist/entries/video.d.cts +490 -99
  167. package/dist/entries/video.d.ts +490 -99
  168. package/dist/entries/video.js +8 -4
  169. package/dist/entries/workflow.cjs +102 -102
  170. package/dist/entries/workflow.d.cts +5 -4
  171. package/dist/entries/workflow.d.ts +5 -4
  172. package/dist/entries/workflow.js +2 -2
  173. package/dist/{gpt-image-2-6-BeZdT-pW.d.cts → gpt-image-2-6-jIRQBRag.d.cts} +6 -0
  174. package/dist/{gpt-image-2-6-BeZdT-pW.d.ts → gpt-image-2-6-jIRQBRag.d.ts} +6 -0
  175. package/dist/index.cjs +2727 -2092
  176. package/dist/index.d.cts +11 -11
  177. package/dist/index.d.ts +11 -11
  178. package/dist/index.js +30 -27
  179. package/dist/{model-catalog-BgSvskgY.d.ts → model-catalog-C_Eo35tL.d.cts} +158 -14
  180. package/dist/{model-catalog-BgSvskgY.d.cts → model-catalog-C_Eo35tL.d.ts} +158 -14
  181. package/dist/{model-constants-DHd9jwQ7.d.cts → model-constants-Bg4ccSQb.d.ts} +427 -34
  182. package/dist/{model-constants-DHd9jwQ7.d.ts → model-constants-DWcxOmaY.d.cts} +427 -34
  183. package/package.json +1 -1
  184. package/src/__tests__/credit-identifiers.test.ts +29 -0
  185. package/src/__tests__/extend-providers.test.ts +194 -0
  186. package/src/__tests__/fixtures/mask-composite-quote-parity.json +118 -0
  187. package/src/__tests__/fixtures/root-exports.baseline.json +68 -0
  188. package/src/__tests__/gpt-image-2-6-formats.test.ts +4 -1
  189. package/src/__tests__/grok-video-15-catalog.test.ts +189 -0
  190. package/src/__tests__/gvp-supported-providers.test.ts +32 -4
  191. package/src/__tests__/lip-sync-audio-rate.test.ts +74 -0
  192. package/src/__tests__/lip-sync-levers.test.ts +31 -0
  193. package/src/__tests__/llm-models.test.ts +132 -3
  194. package/src/__tests__/llm-price-key.test.ts +152 -1
  195. package/src/__tests__/minimax-h3-image.test.ts +140 -0
  196. package/src/__tests__/model-makers.test.ts +49 -11
  197. package/src/__tests__/model-tree.test.ts +13 -0
  198. package/src/__tests__/nemotron-transcribe-pricing.test.ts +61 -0
  199. package/src/__tests__/normalize-node-params.test.ts +25 -0
  200. package/src/__tests__/pixverse-v6-max-catalog.test.ts +271 -0
  201. package/src/__tests__/prompt-length-limits.test.ts +4 -0
  202. package/src/__tests__/retired-video-provider.test.ts +15 -5
  203. package/src/__tests__/seedance-25-catalog-modes.test.ts +1 -1
  204. package/src/__tests__/seedance-task-type.test.ts +188 -0
  205. package/src/__tests__/seedream-5-5.test.ts +117 -0
  206. package/src/__tests__/transcribe-capabilities.test.ts +39 -2
  207. package/src/__tests__/transcribe-preflight.test.ts +50 -1
  208. package/src/__tests__/unit-contract-compose.test.ts +27 -1
  209. package/src/__tests__/unit-contracts.test.ts +20 -6
  210. package/src/__tests__/upscale-factors.test.ts +107 -0
  211. package/src/__tests__/video-audio-capability.test.ts +35 -6
  212. package/src/__tests__/video-character-refs.test.ts +20 -2
  213. package/src/__tests__/video-collapse-parity.test.ts +19 -0
  214. package/src/__tests__/video-overlay-geometry.test.ts +68 -0
  215. package/src/__tests__/video-overlay-layer-plan.test.ts +3 -4
  216. package/src/__tests__/video-overlay-layouts.test.ts +529 -0
  217. package/src/__tests__/video-overlay-pricing.test.ts +61 -0
  218. package/src/__tests__/video-overlay-validate.test.ts +128 -0
  219. package/src/__tests__/video-overlay-wired-kind.test.ts +207 -0
  220. package/src/__tests__/video-overlay.test.ts +280 -194
  221. package/src/__tests__/video-ref-limits.test.ts +2 -1
  222. package/src/__tests__/video-reference-only.test.ts +6 -2
  223. package/src/__tests__/video-resolution-billed-as-named.test.ts +30 -0
  224. package/src/__tests__/video-start-frame-only.test.ts +98 -0
  225. package/src/__tests__/video-upscale-params.test.ts +62 -0
  226. package/src/__tests__/wired-character-names.test.ts +220 -0
  227. package/src/catalog-projection.ts +8 -0
  228. package/src/credit-estimators/index.ts +18 -0
  229. package/src/credit-estimators/nemotron-transcribe.ts +87 -0
  230. package/src/credit-estimators/video-overlay.ts +70 -0
  231. package/src/credit-identifiers.ts +183 -16
  232. package/src/entity-image-url.ts +21 -0
  233. package/src/entries/credits.ts +26 -1
  234. package/src/entries/entities.ts +14 -0
  235. package/src/entries/llm-models.ts +6 -0
  236. package/src/entries/model-catalog.ts +44 -1
  237. package/src/entries/models.ts +69 -0
  238. package/src/entries/nodes.ts +4 -0
  239. package/src/entries/video.ts +7 -1
  240. package/src/freecut-protocol.ts +8 -0
  241. package/src/generated/unit-contracts.ts +8 -1
  242. package/src/gpt-image-2-6.ts +6 -0
  243. package/src/input-image-pricing.ts +76 -0
  244. package/src/lip-sync-levers.ts +56 -0
  245. package/src/lip-sync-pricing.ts +91 -1
  246. package/src/llm-models.ts +249 -4
  247. package/src/mask-composite.ts +11 -0
  248. package/src/minimax-h3-image.ts +61 -0
  249. package/src/model-catalog.ts +604 -40
  250. package/src/model-constants.ts +860 -55
  251. package/src/model-tree.ts +2 -1
  252. package/src/nodaro-video-upscale.ts +48 -0
  253. package/src/node-default-mappings.ts +15 -2
  254. package/src/node-execution-state.ts +4 -3
  255. package/src/normalize-node-params.ts +49 -1
  256. package/src/producer-types.ts +23 -1
  257. package/src/runtime-config/contract.ts +10 -7
  258. package/src/seedance-draft.ts +2 -1
  259. package/src/seedance-task-type.ts +37 -0
  260. package/src/seedream-5-5.ts +45 -0
  261. package/src/transcribe-preflight.ts +58 -7
  262. package/src/unit-contract-compose.ts +4 -1
  263. package/src/upscale-factors.ts +111 -0
  264. package/src/video-character-refs.ts +7 -4
  265. package/src/video-duration.ts +9 -0
  266. package/src/video-overlay-geometry.ts +99 -0
  267. package/src/video-overlay-input.ts +25 -0
  268. package/src/video-overlay-layout-ids.ts +48 -0
  269. package/src/video-overlay-layouts.ts +315 -0
  270. package/src/video-overlay-validate.ts +223 -0
  271. package/src/video-overlay-video-layers.ts +304 -0
  272. package/src/video-overlay.ts +165 -297
  273. package/src/video-ui-defaults.ts +11 -7
  274. package/src/video-upscale-params.ts +67 -0
  275. package/src/wired-character-names.ts +202 -0
  276. package/dist/chunk-3M4BNKFJ.cjs.map +0 -1
  277. package/dist/chunk-4KYLNTR7.cjs.map +0 -1
  278. package/dist/chunk-5XRRENHD.cjs.map +0 -1
  279. package/dist/chunk-673E4KYC.js.map +0 -1
  280. package/dist/chunk-6XVHYD5R.js.map +0 -1
  281. package/dist/chunk-7ARKVJTN.cjs.map +0 -1
  282. package/dist/chunk-7WGKP3EU.js +0 -23
  283. package/dist/chunk-7WGKP3EU.js.map +0 -1
  284. package/dist/chunk-A3FHTSLB.js.map +0 -1
  285. package/dist/chunk-AFQFGZN7.cjs.map +0 -1
  286. package/dist/chunk-F5YEMSNK.cjs.map +0 -1
  287. package/dist/chunk-FQXRYPCX.cjs.map +0 -1
  288. package/dist/chunk-FVII3KHN.js.map +0 -1
  289. package/dist/chunk-FVVD6XY2.js.map +0 -1
  290. package/dist/chunk-G4XWVWRI.js.map +0 -1
  291. package/dist/chunk-HGI2VKIV.js.map +0 -1
  292. package/dist/chunk-IRQ3SPX7.js.map +0 -1
  293. package/dist/chunk-IVXSNW2B.cjs.map +0 -1
  294. package/dist/chunk-JHTT2V4A.cjs.map +0 -1
  295. package/dist/chunk-KHZAQGRP.js +0 -17
  296. package/dist/chunk-KHZAQGRP.js.map +0 -1
  297. package/dist/chunk-LLOIAGFB.js.map +0 -1
  298. package/dist/chunk-M3SXUUWC.cjs.map +0 -1
  299. package/dist/chunk-MOMFX32D.js.map +0 -1
  300. package/dist/chunk-NCOGGRRP.cjs +0 -27
  301. package/dist/chunk-NCOGGRRP.cjs.map +0 -1
  302. package/dist/chunk-NJVOJXBS.cjs.map +0 -1
  303. package/dist/chunk-PONP5J5E.cjs.map +0 -1
  304. package/dist/chunk-RUHKBEFF.js.map +0 -1
  305. package/dist/chunk-SWVGHAYO.js.map +0 -1
  306. package/dist/chunk-UARGJ5IZ.js.map +0 -1
  307. package/dist/chunk-VB2ARGQ6.js.map +0 -1
  308. package/dist/chunk-WGKAOUEQ.cjs.map +0 -1
  309. package/dist/chunk-XROE3CAS.cjs.map +0 -1
  310. package/dist/chunk-ZLDFPVVI.cjs +0 -19
  311. package/dist/chunk-ZLDFPVVI.cjs.map +0 -1
  312. package/dist/chunk-ZNM2LW3D.cjs.map +0 -1
  313. package/dist/chunk-ZZGQRRN7.js.map +0 -1
@@ -23,7 +23,7 @@ export {
23
23
  VIDEO_CHARACTER_VOICE_EXAMPLE_MAX,
24
24
  } from "../video-character-refs.js"
25
25
  export type { VideoCharacterReference, VideoCharacterVoice, VideoCharacterRefProblem } from "../video-character-refs.js"
26
- export { extractVideoDurationFromNode, editPlanSourceDurationSec } from "../video-duration.js"
26
+ export { CONTAINER_OVERHANG_SEC, extractVideoDurationFromNode, editPlanSourceDurationSec } from "../video-duration.js"
27
27
  // --- Video URL node + social-video import (host allowlist, node output rule) ---
28
28
  export {
29
29
  SOCIAL_VIDEO_HOSTS,
@@ -52,6 +52,12 @@ export {
52
52
  } from "../video-link.js"
53
53
  export type { VideoLinkPlatform, VideoLinkNodeFields, VideoLinkInputProblem, VideoLinkNeed, VideoLinkGraphNode, VideoLinkGraphEdge } from "../video-link.js"
54
54
  export * from "../video-overlay.js"
55
+ export * from "../video-overlay-geometry.js"
56
+ export * from "../video-overlay-validate.js"
57
+ export { declaredOutputMediaType, listColumnMediaType, videoOverlayHasVideoLayer, videoOverlayWiredLayerKind, videoOverlayWireMediumBeforeRun, withoutImpliedVideoOverlayAnimate } from "../video-overlay-video-layers.js"
58
+ export type { VideoOverlayWiredLayerKind, VideoOverlayWiredSource, VideoOverlayWireBeforeRun, VideoOverlayWireMedium } from "../video-overlay-video-layers.js"
59
+ export * from "../video-overlay-layout-ids.js"
60
+ export * from "../video-overlay-layouts.js"
55
61
  // --- Video-analysis node (window/result schemas + slot-token + aspect helpers) ---
56
62
  export * from "../video-analysis.js"
57
63
  // --- Unified video node UI-default fills (panel snap == strip == DAG payload) ---
@@ -32,6 +32,14 @@ export interface NodaroLoadVideoPayload {
32
32
  readonly videoBuffer?: ArrayBuffer
33
33
  readonly projectJson?: unknown
34
34
  readonly additionalFiles?: ReadonlyArray<FreecutImportFile>
35
+ /**
36
+ * What the editor's Save & Exit hands back. "video": it renders the timeline
37
+ * and answers with FREECUT_EXPORT_COMPLETE (the video and the project JSON),
38
+ * for a parent that keeps an edit as a new video (the workflow editor).
39
+ * Absent or "project": it answers with the project JSON alone
40
+ * (FREECUT_SAVE_EXIT), for a parent that renders the cut itself (Studio).
41
+ */
42
+ readonly saveExit?: "video" | "project"
35
43
  }
36
44
 
37
45
  export interface NodaroLoadTimelinePayload {
@@ -2,7 +2,7 @@
2
2
  // The unit contract published in @nodaro/shared (decided 2026-10-16, widened 2026-10-18): node type
3
3
  // ids with closed vocabularies — each unit's producer kind, the use-case types, what each JSON pip
4
4
  // carries, the input pips that are never a prompt lane, the review holds, how a published app
5
- // presents the result and which outputs fan out item by item. Never a price, credit id, number,
5
+ // presents the result, which outputs fan out item by item and which carry a list. Never a price, credit id, number,
6
6
  // prompt or doctrine string. Each block feeds a published table that composes its rows with the
7
7
  // hand-written ones (unit-contract-compose.ts); every row is an irrevocable Apache grant.
8
8
 
@@ -13,6 +13,7 @@ export const UNIT_CONTRACTS: ReadonlyArray<readonly [type: string, producer: "au
13
13
  ["speaker-layout", "video"], // unit:speaker-layout
14
14
  ["remove-audio", "video"], // unit:remove-audio
15
15
  ["gif-to-video", "video"], // unit:gif-to-video
16
+ ["split-into-layers", "image"], // unit:split-into-layers
16
17
  ]
17
18
 
18
19
  // The use-case node units (execution.kind "use-case"), in position order — each a route POST /v1/<type> (+ /estimate, /continue).
@@ -32,6 +33,7 @@ export const UNIT_JSON_PIPS: ReadonlyArray<readonly [type: string, pips: Readonl
32
33
  ["clip-pack", { "json": "edl" }], // unit:clip-pack
33
34
  ["speaker-layout", { "json": "edl" }], // unit:speaker-layout
34
35
  ["speaker-map", { "edl": "edl", "json": "other" }], // unit:speaker-map
36
+ ["split-into-layers", { "layerData": "other" }], // unit:split-into-layers
35
37
  ["shot-cuts", { "firstFrames": "other", "json": "other", "lastFrames": "other" }], // unit:shot-cuts
36
38
  ]
37
39
 
@@ -63,3 +65,8 @@ export const UNIT_FAN_OUT_EACH: ReadonlyArray<readonly [type: string, handles: {
63
65
  ["episode-trailer", { "each": ["media"], "primary": "media" }], // unit:episode-trailer
64
66
  ["clip-pack", { "each": ["clips"], "primary": "clips" }], // unit:clip-pack
65
67
  ]
68
+
69
+ // The outputs that carry one run's list of files (handles.outputs[].list), whose wires run the next node once per item by default — producer-types.ts.
70
+ export const UNIT_LIST_PIPS: ReadonlyArray<readonly [type: string, pips: ReadonlyArray<string>]> = [
71
+ ["split-into-layers", ["layers"]], // unit:split-into-layers
72
+ ]
@@ -119,6 +119,9 @@ export function isGptImage26AutoRun(provider: unknown, quality: unknown): boolea
119
119
  * and, when it edits a base image, that image too (the worker puts it first,
120
120
  * unless it is already one of the references). Any other model is priced on its
121
121
  * references alone.
122
+ *
123
+ * @deprecated Use `pricedSentImages` (`input-image-pricing.ts`), which counts
124
+ * the base for every model priced per input image, MiniMax H3 Image included.
122
125
  */
123
126
  export function gptImage26SentImages(
124
127
  provider: string | undefined,
@@ -154,6 +157,9 @@ function namesMoodboard(direction: unknown): boolean {
154
157
  * per input image: every list on the node, its source or base image, what is
155
158
  * wired in, a moodboard its direction names, and an image-to-image model's own
156
159
  * source. An estimate may over-quote, never under.
160
+ *
161
+ * @deprecated Use `pricedEstimatedImages` (`input-image-pricing.ts`), which
162
+ * counts for every model priced per input image, MiniMax H3 Image included.
157
163
  */
158
164
  export function gptImage26EstimatedImages(
159
165
  model: string,
@@ -0,0 +1,76 @@
1
+ /**
2
+ * The image models whose price depends on how many input images a run sends:
3
+ * GPT Image 2.6 Flare and Sunburst, MiniMax H3 Image and Seedream 5.5. Every place that
4
+ * prices a run counts those images through here, so a model that joins
5
+ * `isPricedPerInputImage` is counted on every path at once.
6
+ */
7
+ import {
8
+ GPT_IMAGE_2_6_MOODBOARD_MAX_IMAGES,
9
+ isGptImage26I2i,
10
+ isGptImage26Tiered,
11
+ } from "./gpt-image-2-6.js"
12
+ import { isMinimaxH3Image, isMinimaxH3ImageI2i } from "./minimax-h3-image.js"
13
+ import { isSeedream55, isSeedream55I2i } from "./seedream-5-5.js"
14
+
15
+ /** True for a model whose price counts the input images a run sends. */
16
+ export function isPricedPerInputImage(model: unknown): boolean {
17
+ return typeof model === "string" && (isGptImage26Tiered(model) || isMinimaxH3Image(model) || isSeedream55(model))
18
+ }
19
+
20
+ /** True for the edit id of such a model: it always sends at least its source. */
21
+ export function isPricedPerInputImageEdit(model: unknown): boolean {
22
+ return typeof model === "string" && (isGptImage26I2i(model) || isMinimaxH3ImageI2i(model) || isSeedream55I2i(model))
23
+ }
24
+
25
+ /**
26
+ * The images a Generate Image run sends its provider: its references and, when
27
+ * it edits a base image, that image too (the worker puts it first, unless it is
28
+ * already one of the references). Counted only on a model priced per input
29
+ * image; any other model is priced on its references alone, as before.
30
+ */
31
+ export function pricedSentImages(
32
+ provider: string | undefined,
33
+ references: readonly string[],
34
+ baseImageUrl: unknown,
35
+ ): number {
36
+ const countsBase =
37
+ isPricedPerInputImage(provider) &&
38
+ typeof baseImageUrl === "string" &&
39
+ baseImageUrl.length > 0 &&
40
+ !references.includes(baseImageUrl)
41
+ return references.length + (countsBase ? 1 : 0)
42
+ }
43
+
44
+ function namesMoodboard(direction: unknown): boolean {
45
+ if (direction === null || typeof direction !== "object") return false
46
+ const style = (direction as Record<string, unknown>).style
47
+ return (Array.isArray(style) ? style : [style]).some(
48
+ (value) => typeof value === "string" && value.startsWith("moodboard:"),
49
+ )
50
+ }
51
+
52
+ /**
53
+ * The input images a workflow estimate counts for one node on a model priced
54
+ * per input image: every list on the node, its source or base image, what is
55
+ * wired in, a moodboard its direction names (at the most a moodboard holds),
56
+ * and an edit model's own source. An estimate may over-quote, never under.
57
+ */
58
+ export function pricedEstimatedImages(
59
+ model: string,
60
+ data: Record<string, unknown>,
61
+ wiredImages: number,
62
+ ): number {
63
+ const listed = (v: unknown) => (Array.isArray(v) ? v.length : 0)
64
+ const single = (v: unknown) => (typeof v === "string" && v.length > 0 ? 1 : 0)
65
+ return (
66
+ listed(data.referenceImageUrls) +
67
+ listed(data.characterDefinitionIds) +
68
+ listed(data.extraRefs) +
69
+ single(data.referenceImageUrl) +
70
+ single(data.baseImageUrl) +
71
+ single(data.sourceImageUrl) +
72
+ wiredImages +
73
+ (namesMoodboard(data.direction) ? GPT_IMAGE_2_6_MOODBOARD_MAX_IMAGES : 0) +
74
+ (isPricedPerInputImageEdit(model) ? 1 : 0)
75
+ )
76
+ }
@@ -0,0 +1,56 @@
1
+ /**
2
+ * The Lip Sync node's model-specific levers that a model may not take.
3
+ *
4
+ * OmniHuman 2.0 sits beside OmniHuman 1.5 but is not a superset of it: it has
5
+ * no resolution choice (always 720p), no fast mode and no seed (decided
6
+ * 2026-11-11). A node switched from 1.5 keeps those values in its data unless
7
+ * something clears them, and a node written straight into workflow JSON, an
8
+ * API body or an MCP call can carry them too. One table, read by every
9
+ * surface: the config panel (its dropdown and fail-safe effect), the quick
10
+ * strip's model switch, the lip-sync route and the workflow payload.
11
+ *
12
+ * Only models listed here lose anything: every other model's levers are left
13
+ * exactly as they were.
14
+ */
15
+
16
+ /** The generic levers the Lip Sync node carries beside its inputs and prompt. */
17
+ export const LIP_SYNC_MODEL_LEVERS = ["resolution", "fastMode", "seed"] as const
18
+ export type LipSyncModelLever = typeof LIP_SYNC_MODEL_LEVERS[number]
19
+
20
+ const LEVERS_NOT_TAKEN: Readonly<Record<string, readonly LipSyncModelLever[]>> = {
21
+ "omnihuman-2-0": ["resolution", "fastMode", "seed"],
22
+ }
23
+
24
+ /** The levers `provider` does not take (none for a model this table does not list). */
25
+ export function lipSyncLeversNotTaken(provider: unknown): readonly LipSyncModelLever[] {
26
+ return typeof provider === "string" && Object.prototype.hasOwnProperty.call(LEVERS_NOT_TAKEN, provider)
27
+ ? LEVERS_NOT_TAKEN[provider]!
28
+ : []
29
+ }
30
+
31
+ /** Does `provider` take this lever? */
32
+ export function lipSyncTakesLever(provider: unknown, lever: LipSyncModelLever): boolean {
33
+ return !lipSyncLeversNotTaken(provider).includes(lever)
34
+ }
35
+
36
+ /**
37
+ * A patch that clears every lever `provider` does not take and `data` still
38
+ * holds (each written as `undefined`). Empty when there is nothing to clear,
39
+ * so a caller can skip the write.
40
+ */
41
+ export function lipSyncLeverClearPatch(
42
+ provider: unknown,
43
+ data: Readonly<Record<string, unknown>>,
44
+ ): Partial<Record<LipSyncModelLever, undefined>> {
45
+ const patch: Partial<Record<LipSyncModelLever, undefined>> = {}
46
+ for (const lever of lipSyncLeversNotTaken(provider)) {
47
+ if (data[lever] !== undefined) patch[lever] = undefined
48
+ }
49
+ return patch
50
+ }
51
+
52
+ /** `data` without the levers `provider` does not take: a copy when any was dropped, else `data` itself. */
53
+ export function withoutLipSyncLeversNotTaken<T extends Readonly<Record<string, unknown>>>(provider: unknown, data: T): T {
54
+ const patch = lipSyncLeverClearPatch(provider, data)
55
+ return Object.keys(patch).length === 0 ? data : { ...data, ...patch }
56
+ }
@@ -7,7 +7,78 @@
7
7
  * (e.g. `kling-avatar:60s`) so credit reservation scales with input length.
8
8
  *
9
9
  * InfiniTalk still enforces a 15s upstream cap.
10
+ *
11
+ * A model listed in {@link LIP_SYNC_AUDIO_RATES} is priced differently: at a
12
+ * per-second RATE times the seconds of its audio, never by bucket.
13
+ */
14
+
15
+ import { unitQuoteCreditId } from "./credit-estimators/unit-quote.js"
16
+
17
+ /**
18
+ * A lip-sync model charged at a per-second rate: the rate's one-second price
19
+ * row times the seconds of the audio that drives it, rounded up once and marked
20
+ * up once by the pricing chain that charges every per-unit rate.
21
+ */
22
+ export interface LipSyncAudioRate {
23
+ /** The one-second price row (`model_pricing`, else `STATIC_CREDIT_COSTS`). */
24
+ readonly rateId: string
25
+ /** The fewest seconds a run is charged. Shorter audio is padded with silence to this length before the model sees it. */
26
+ readonly minSeconds: number
27
+ /** The longest audio the model takes. Longer audio is refused before anything is held. */
28
+ readonly maxSeconds: number
29
+ }
30
+
31
+ /** OmniHuman 2.0's one-second price row. */
32
+ export const OMNIHUMAN_2_0_PER_SECOND_CREDIT_ID = "omnihuman-2-0:per-second"
33
+
34
+ /**
35
+ * The lip-sync models charged per second of audio at a rate (decided
36
+ * 2026-11-11 for OmniHuman 2.0). Every price of such a run, its quote and its
37
+ * hold are the rate × {@link lipSyncBilledSeconds}.
38
+ */
39
+ export const LIP_SYNC_AUDIO_RATES: Readonly<Record<string, LipSyncAudioRate>> = {
40
+ // OmniHuman 2.0 (KIE): audio from 4 to 300 seconds; the output is as long as the audio.
41
+ "omnihuman-2-0": { rateId: OMNIHUMAN_2_0_PER_SECOND_CREDIT_ID, minSeconds: 4, maxSeconds: 300 },
42
+ }
43
+
44
+ /** The per-second rate a lip-sync model is charged at, or undefined for every model priced another way. */
45
+ export function lipSyncAudioRateOf(provider: unknown): LipSyncAudioRate | undefined {
46
+ return typeof provider === "string" && Object.prototype.hasOwnProperty.call(LIP_SYNC_AUDIO_RATES, provider)
47
+ ? LIP_SYNC_AUDIO_RATES[provider]
48
+ : undefined
49
+ }
50
+
51
+ /**
52
+ * The seconds a run of a per-second-rate model is charged for audio measured at
53
+ * `measuredSec`: rounded up to a whole second, and at least the rate's minimum.
54
+ * THE one place this rounding happens — the route, the workflow run, the
55
+ * estimates and the provider's own cost all read it. Pass the length of the
56
+ * audio as it was given, never of a copy padded to the minimum (a padded clip
57
+ * runs a hair past it and would round up a whole second more).
58
+ */
59
+ export function lipSyncBilledSeconds(rate: LipSyncAudioRate, measuredSec: number): number {
60
+ if (!Number.isFinite(measuredSec) || measuredSec <= 0) return rate.minSeconds
61
+ return Math.max(rate.minSeconds, Math.ceil(measuredSec))
62
+ }
63
+
64
+ /**
65
+ * The length the editor quotes a lip-sync run on while its audio's length is
66
+ * not known yet — the 15 seconds every model priced by its audio shows then
67
+ * (a bucketed model's `:15s` row), marked as an estimate.
10
68
  */
69
+ export const LIP_SYNC_UNMEASURED_ESTIMATE_SECONDS = 15
70
+
71
+ /**
72
+ * The seconds an ESTIMATE prices a per-second-rate run at: the billed seconds
73
+ * of the audio when its length is known (at most the model's maximum, the most
74
+ * a run can be charged), else `unknownSec` — by default the maximum, so a
75
+ * server estimate never quotes below what the run may hold; the editor passes
76
+ * {@link LIP_SYNC_UNMEASURED_ESTIMATE_SECONDS} and shows the figure as an estimate.
77
+ */
78
+ export function lipSyncEstimateSeconds(rate: LipSyncAudioRate, knownSec: number | undefined, unknownSec: number = rate.maxSeconds): number {
79
+ if (knownSec === undefined || !Number.isFinite(knownSec) || knownSec <= 0) return lipSyncBilledSeconds(rate, unknownSec)
80
+ return lipSyncBilledSeconds(rate, Math.min(knownSec, rate.maxSeconds))
81
+ }
11
82
 
12
83
  export const LIP_SYNC_DURATION_BUCKETS = [15, 30, 60, 120, 300] as const
13
84
 
@@ -42,13 +113,32 @@ export const LIP_SYNC_MAX_AUDIO_SECONDS: Record<string, number> = {
42
113
  "sync-lipsync-v3": 300,
43
114
  // Volcengine (KIE) — video-to-video dubbing, per-second, 5-min ceiling.
44
115
  "volcengine-lipsync": 300,
116
+ // The per-second-rate models: their own maximum (longer audio is refused, never trimmed).
117
+ ...Object.fromEntries(Object.entries(LIP_SYNC_AUDIO_RATES).map(([provider, rate]) => [provider, rate.maxSeconds])),
45
118
  }
46
119
 
47
120
  export function getLipSyncMaxAudioSeconds(provider: string): number {
48
121
  return LIP_SYNC_MAX_AUDIO_SECONDS[provider] ?? 15
49
122
  }
50
123
 
51
- /** Providers whose credit cost varies with audio duration. */
124
+ /**
125
+ * The id whose price is a 15-second run of a lip-sync model priced by the
126
+ * length of its audio — the bucket row of a bucketed model (`<provider>:15s`),
127
+ * the 15-second quote of a per-second-rate model — or undefined for a model
128
+ * with one price. A model menu shows a per-second rate from it.
129
+ */
130
+ export function lipSyncFifteenSecondCreditId(provider: string): string | undefined {
131
+ const rate = lipSyncAudioRateOf(provider)
132
+ if (rate) return unitQuoteCreditId(rate.rateId, LIP_SYNC_UNMEASURED_ESTIMATE_SECONDS)
133
+ return isPerSecondLipSyncProvider(provider) ? `${provider}:${LIP_SYNC_UNMEASURED_ESTIMATE_SECONDS}s` : undefined
134
+ }
135
+
136
+ /**
137
+ * Providers whose credit cost varies with audio duration, priced by BUCKET
138
+ * (`<provider>:<bucket>s`). A model charged at a per-second rate
139
+ * ({@link LIP_SYNC_AUDIO_RATES}) is never listed here: every caller that
140
+ * branches on this set would bucket it.
141
+ */
52
142
  const PER_SECOND_LIP_SYNC_PROVIDERS = new Set([
53
143
  "kling-avatar",
54
144
  "kling-avatar-pro",