@nodaro/shared 3.31.0 → 3.33.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 (378) hide show
  1. package/README.md +17 -0
  2. package/dist/chunk-23FJQTEA.js +1604 -0
  3. package/dist/chunk-23FJQTEA.js.map +1 -0
  4. package/dist/chunk-2NIQO2J3.cjs +54 -0
  5. package/dist/chunk-2NIQO2J3.cjs.map +1 -0
  6. package/dist/chunk-2NQLSLSN.cjs +19 -0
  7. package/dist/chunk-2NQLSLSN.cjs.map +1 -0
  8. package/dist/chunk-2OJIVO7R.cjs +32 -0
  9. package/dist/chunk-2OJIVO7R.cjs.map +1 -0
  10. package/dist/chunk-2RF4Z7KG.cjs +803 -0
  11. package/dist/chunk-2RF4Z7KG.cjs.map +1 -0
  12. package/dist/chunk-3RYKIUAE.js +86 -0
  13. package/dist/chunk-3RYKIUAE.js.map +1 -0
  14. package/dist/chunk-44I73CQS.cjs +194 -0
  15. package/dist/chunk-44I73CQS.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-5RYLK3MQ.js +267 -0
  21. package/dist/chunk-5RYLK3MQ.js.map +1 -0
  22. package/dist/chunk-5THUHJ3E.js +46 -0
  23. package/dist/chunk-5THUHJ3E.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-6WZ2VN7V.js +920 -0
  27. package/dist/chunk-6WZ2VN7V.js.map +1 -0
  28. package/dist/chunk-7G7G42KS.js +86 -0
  29. package/dist/chunk-7G7G42KS.js.map +1 -0
  30. package/dist/chunk-7Z5LUTGU.js +1567 -0
  31. package/dist/chunk-7Z5LUTGU.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-BG5D5CZ6.js +1922 -0
  35. package/dist/chunk-BG5D5CZ6.js.map +1 -0
  36. package/dist/chunk-CK3GK34R.js +1381 -0
  37. package/dist/chunk-CK3GK34R.js.map +1 -0
  38. package/dist/chunk-CUH22J4D.js +17 -0
  39. package/dist/chunk-CUH22J4D.js.map +1 -0
  40. package/dist/chunk-D26ENTN2.cjs +1770 -0
  41. package/dist/chunk-D26ENTN2.cjs.map +1 -0
  42. package/dist/chunk-D6GNRSCV.cjs +2017 -0
  43. package/dist/chunk-D6GNRSCV.cjs.map +1 -0
  44. package/dist/chunk-FBV5DF6D.js +95 -0
  45. package/dist/chunk-FBV5DF6D.js.map +1 -0
  46. package/dist/chunk-FG4E7MTG.cjs +4 -0
  47. package/dist/chunk-FG4E7MTG.cjs.map +1 -0
  48. package/dist/chunk-FT5CF6IA.js +42 -0
  49. package/dist/chunk-FT5CF6IA.js.map +1 -0
  50. package/dist/chunk-G6IIVKMO.js +26 -0
  51. package/dist/chunk-G6IIVKMO.js.map +1 -0
  52. package/dist/chunk-HC7VKIV5.cjs +430 -0
  53. package/dist/chunk-HC7VKIV5.cjs.map +1 -0
  54. package/dist/chunk-HGC5JNVA.cjs +1503 -0
  55. package/dist/chunk-HGC5JNVA.cjs.map +1 -0
  56. package/dist/chunk-HKFMXNVQ.cjs +1273 -0
  57. package/dist/chunk-HKFMXNVQ.cjs.map +1 -0
  58. package/dist/chunk-HRXEZ3SX.cjs +526 -0
  59. package/dist/chunk-HRXEZ3SX.cjs.map +1 -0
  60. package/dist/chunk-HSHCCBIV.js +255 -0
  61. package/dist/chunk-HSHCCBIV.js.map +1 -0
  62. package/dist/chunk-HUR6ZJ7S.cjs +159 -0
  63. package/dist/chunk-HUR6ZJ7S.cjs.map +1 -0
  64. package/dist/chunk-J7BMO73N.cjs +114 -0
  65. package/dist/chunk-J7BMO73N.cjs.map +1 -0
  66. package/dist/chunk-JFS3NWZ5.cjs +1714 -0
  67. package/dist/chunk-JFS3NWZ5.cjs.map +1 -0
  68. package/dist/chunk-JL4C5VJ7.cjs +488 -0
  69. package/dist/chunk-JL4C5VJ7.cjs.map +1 -0
  70. package/dist/chunk-JSGIEF6Z.cjs +1087 -0
  71. package/dist/chunk-JSGIEF6Z.cjs.map +1 -0
  72. package/dist/chunk-JWA5SGCS.js +203 -0
  73. package/dist/chunk-JWA5SGCS.js.map +1 -0
  74. package/dist/chunk-K3LLGRK7.cjs +3545 -0
  75. package/dist/chunk-K3LLGRK7.cjs.map +1 -0
  76. package/dist/chunk-KU6S7IYV.cjs +210 -0
  77. package/dist/chunk-KU6S7IYV.cjs.map +1 -0
  78. package/dist/chunk-M36G6SRP.js +447 -0
  79. package/dist/chunk-M36G6SRP.js.map +1 -0
  80. package/dist/chunk-M7GQBRZU.cjs +1963 -0
  81. package/dist/chunk-M7GQBRZU.cjs.map +1 -0
  82. package/dist/chunk-MRXGWL42.cjs +4 -0
  83. package/dist/chunk-MRXGWL42.cjs.map +1 -0
  84. package/dist/chunk-NEJ2PV4C.cjs +211 -0
  85. package/dist/chunk-NEJ2PV4C.cjs.map +1 -0
  86. package/dist/chunk-OTATNBMD.js +141 -0
  87. package/dist/chunk-OTATNBMD.js.map +1 -0
  88. package/dist/chunk-OZSACQ2V.js +471 -0
  89. package/dist/chunk-OZSACQ2V.js.map +1 -0
  90. package/dist/chunk-PHZ23DP3.js +1782 -0
  91. package/dist/chunk-PHZ23DP3.js.map +1 -0
  92. package/dist/chunk-PQHS255G.js +1369 -0
  93. package/dist/chunk-PQHS255G.js.map +1 -0
  94. package/dist/chunk-PRYE7AZQ.cjs +1227 -0
  95. package/dist/chunk-PRYE7AZQ.cjs.map +1 -0
  96. package/dist/chunk-PVJBAPYJ.js +404 -0
  97. package/dist/chunk-PVJBAPYJ.js.map +1 -0
  98. package/dist/chunk-PXFQVLBX.js +776 -0
  99. package/dist/chunk-PXFQVLBX.js.map +1 -0
  100. package/dist/chunk-QA3MVQ32.js +21 -0
  101. package/dist/chunk-QA3MVQ32.js.map +1 -0
  102. package/dist/chunk-QJRP44ZO.js +769 -0
  103. package/dist/chunk-QJRP44ZO.js.map +1 -0
  104. package/dist/chunk-SAW5OK36.cjs +54 -0
  105. package/dist/chunk-SAW5OK36.cjs.map +1 -0
  106. package/dist/chunk-SES6GDBQ.cjs +624 -0
  107. package/dist/chunk-SES6GDBQ.cjs.map +1 -0
  108. package/dist/chunk-SFW3UB2P.js +31 -0
  109. package/dist/chunk-SFW3UB2P.js.map +1 -0
  110. package/dist/chunk-TNPDV7I4.cjs +2346 -0
  111. package/dist/chunk-TNPDV7I4.cjs.map +1 -0
  112. package/dist/chunk-TU33KYKW.cjs +25 -0
  113. package/dist/chunk-TU33KYKW.cjs.map +1 -0
  114. package/dist/chunk-TZBIY5C3.js +187 -0
  115. package/dist/chunk-TZBIY5C3.js.map +1 -0
  116. package/dist/chunk-TZE673G6.js +3 -0
  117. package/dist/chunk-TZE673G6.js.map +1 -0
  118. package/dist/chunk-UCFWI6D4.js +29 -0
  119. package/dist/chunk-UCFWI6D4.js.map +1 -0
  120. package/dist/chunk-UTQSSKSG.js +1164 -0
  121. package/dist/chunk-UTQSSKSG.js.map +1 -0
  122. package/dist/chunk-VA42637J.cjs +287 -0
  123. package/dist/chunk-VA42637J.cjs.map +1 -0
  124. package/dist/chunk-VNQRI2RO.cjs +1047 -0
  125. package/dist/chunk-VNQRI2RO.cjs.map +1 -0
  126. package/dist/chunk-VXPLKQWY.cjs +821 -0
  127. package/dist/chunk-VXPLKQWY.cjs.map +1 -0
  128. package/dist/chunk-WD6HJRBG.cjs +197 -0
  129. package/dist/chunk-WD6HJRBG.cjs.map +1 -0
  130. package/dist/chunk-WDIBOWAA.js +1054 -0
  131. package/dist/chunk-WDIBOWAA.js.map +1 -0
  132. package/dist/chunk-WKOIGLQX.cjs +38 -0
  133. package/dist/chunk-WKOIGLQX.cjs.map +1 -0
  134. package/dist/chunk-WNVQ3SMB.cjs +96 -0
  135. package/dist/chunk-WNVQ3SMB.cjs.map +1 -0
  136. package/dist/chunk-WRSWH7US.cjs +285 -0
  137. package/dist/chunk-WRSWH7US.cjs.map +1 -0
  138. package/dist/chunk-XGFTL5XY.js +181 -0
  139. package/dist/chunk-XGFTL5XY.js.map +1 -0
  140. package/dist/chunk-XNISPHTZ.js +1039 -0
  141. package/dist/chunk-XNISPHTZ.js.map +1 -0
  142. package/dist/chunk-Y2PM3FFL.js +3 -0
  143. package/dist/chunk-Y2PM3FFL.js.map +1 -0
  144. package/dist/chunk-YBPBK5KI.js +1030 -0
  145. package/dist/chunk-YBPBK5KI.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-ZDFHA2EC.js +572 -0
  153. package/dist/chunk-ZDFHA2EC.js.map +1 -0
  154. package/dist/chunk-ZL7UM6PU.cjs +34 -0
  155. package/dist/chunk-ZL7UM6PU.cjs.map +1 -0
  156. package/dist/chunk-ZNZDQAXN.js +175 -0
  157. package/dist/chunk-ZNZDQAXN.js.map +1 -0
  158. package/dist/chunk-ZO5PBBFX.js +3497 -0
  159. package/dist/chunk-ZO5PBBFX.js.map +1 -0
  160. package/dist/chunk-ZRL2UFTH.cjs +1073 -0
  161. package/dist/chunk-ZRL2UFTH.cjs.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 +292 -0
  165. package/dist/entries/apps.d.ts +292 -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 +596 -0
  181. package/dist/entries/credits.cjs.map +1 -0
  182. package/dist/entries/credits.d.cts +1460 -0
  183. package/dist/entries/credits.d.ts +1460 -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 +259 -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 +1743 -0
  279. package/dist/entries/workflow.d.ts +1743 -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 +7747 -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-V-ZNzRSd.d.cts +651 -0
  295. package/dist/model-catalog-V-ZNzRSd.d.ts +651 -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-D0kxsWf9.d.cts +92 -0
  299. package/dist/presentation-utils-pZwlEAzo.d.ts +92 -0
  300. package/dist/scene-node-types-C3kl_zyK.d.cts +1949 -0
  301. package/dist/scene-node-types-C3kl_zyK.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__/model-makers.test.ts +76 -0
  314. package/src/__tests__/no-internal-imports.test.ts +1 -1
  315. package/src/__tests__/node-aspect-ratio.test.ts +25 -0
  316. package/src/__tests__/node-runtime-keys.test.ts +9 -0
  317. package/src/__tests__/package-entries.test.ts +50 -0
  318. package/src/__tests__/pitch-tempo-pricing.test.ts +21 -0
  319. package/src/__tests__/presentation-utils.test.ts +15 -0
  320. package/src/__tests__/preview-gate-use-case.test.ts +151 -0
  321. package/src/__tests__/private-host.test.ts +53 -0
  322. package/src/__tests__/run-continuation.test.ts +7 -1
  323. package/src/__tests__/site-capture-node.test.ts +58 -0
  324. package/src/__tests__/ugc-lane-wires.test.ts +228 -0
  325. package/src/__tests__/ugc-node-wires.test.ts +9 -3
  326. package/src/__tests__/ugc-run-state.test.ts +5 -4
  327. package/src/__tests__/video-analysis-catalog-sync.test.ts +1 -1
  328. package/src/__tests__/video-analysis-pricing.test.ts +6 -6
  329. package/src/__tests__/voice-changer-pro-quote.test.ts +79 -0
  330. package/src/add-captions-plan.ts +9 -3
  331. package/src/caption-edge-dash.ts +33 -0
  332. package/src/component-types.ts +9 -0
  333. package/src/credit-estimators/index.ts +22 -1
  334. package/src/credit-estimators/pitch-tempo.ts +15 -1
  335. package/src/credit-estimators/speech.ts +72 -4
  336. package/src/credit-estimators/unit-quote.ts +52 -0
  337. package/src/credit-estimators/video-sfx.ts +15 -0
  338. package/src/credit-estimators/voice-changer-pro-quote.ts +138 -0
  339. package/src/credit-identifiers.ts +62 -17
  340. package/src/entity-image-handle.ts +2 -0
  341. package/src/entries/apps.ts +63 -0
  342. package/src/entries/captions.ts +34 -0
  343. package/src/entries/catalogs.ts +65 -0
  344. package/src/entries/credits.ts +105 -0
  345. package/src/entries/edl.ts +42 -0
  346. package/src/entries/entities.ts +144 -0
  347. package/src/entries/i18n.ts +31 -0
  348. package/src/entries/llm-models.ts +63 -0
  349. package/src/entries/media.ts +36 -0
  350. package/src/entries/model-catalog.ts +95 -0
  351. package/src/entries/models.ts +266 -0
  352. package/src/entries/nodes.ts +245 -0
  353. package/src/entries/organizations.ts +9 -0
  354. package/src/entries/pipeline.ts +43 -0
  355. package/src/entries/scene3d.ts +27 -0
  356. package/src/entries/social.ts +297 -0
  357. package/src/entries/types.ts +26 -0
  358. package/src/entries/ugc.ts +14 -0
  359. package/src/entries/video.ts +59 -0
  360. package/src/entries/workflow.ts +172 -0
  361. package/src/fan-out-rows.ts +2 -0
  362. package/src/index.ts +25 -1845
  363. package/src/json-kinds.ts +4 -0
  364. package/src/model-catalog.ts +243 -34
  365. package/src/node-mappable-fields.ts +1 -0
  366. package/src/node-run-routes.ts +2 -0
  367. package/src/node-runtime-keys.ts +8 -0
  368. package/src/normalize-node-params.ts +30 -0
  369. package/src/presentation-utils.ts +12 -0
  370. package/src/preview-gate.ts +92 -14
  371. package/src/private-host.ts +89 -59
  372. package/src/producer-types.ts +16 -2
  373. package/src/run-continuation.ts +21 -0
  374. package/src/site-capture-node.ts +82 -0
  375. package/src/ugc-lane-wires.ts +246 -0
  376. package/src/ugc-node-wires.ts +37 -7
  377. package/src/ugc-run-state.ts +5 -3
  378. package/src/video-analysis-pricing.ts +31 -29
@@ -0,0 +1,651 @@
1
+ /**
2
+ * Model catalog — single source of truth for what each Nodaro-exposed model
3
+ * is, who made it, what it's good for, and which knobs it accepts.
4
+ *
5
+ * Consumed by:
6
+ * - Backend MCP `list_models` tool (renders the nested per-kind / per-family
7
+ * response so Claude can pick the right model for a user's intent)
8
+ * - (future) Frontend config panels — today they read parallel registries
9
+ * in `frontend/src/components/editor/config-panels/model-options.ts`; a
10
+ * follow-up will migrate them to import from here.
11
+ *
12
+ * Authoring rules:
13
+ * - Keep `description` to one line (≤120 chars). It's what Claude reads to
14
+ * decide which model to use.
15
+ * - `useCases` is a small set of short tags (1-3 words) — verbs/nouns Claude
16
+ * can match against user intent ("typography", "character", "fast",
17
+ * "cinematic"). Stay consistent across entries: don't write "text" in one
18
+ * and "typography" in another.
19
+ * - `aspectRatios` / `resolutions` / `qualities` only appear when the model
20
+ * actually exposes that lever (e.g., Nano Banana base has no `resolution`).
21
+ * - `durations` is in seconds.
22
+ * - `pricing[0]` is ALWAYS the default variant (the bare id without a
23
+ * composite suffix like `:4K` or `:high`).
24
+ * - Costs are sourced from `STATIC_CREDIT_COSTS` (see backend
25
+ * `src/billing/credits.ts`). Keep them in sync if the table changes.
26
+ * - After editing `MODEL_CATALOG` or `MODEL_RECOMMENDATIONS`, run
27
+ * `npm run gen:skills` (from `backend/`) to refresh the public
28
+ * `docs/choosing-models.md` guide. CI (`gen:skills:check`) fails on drift.
29
+ */
30
+ type ModelKind = "image" | "video" | "audio";
31
+ type ModelMode = "t2i" | "i2i" | "edit" | "upscale" | "remove-bg" | "i2v" | "t2v" | "v2v" | "extend" | "motion-transfer" | "lip-sync" | "video-upscale" | "video-depth" | "tts" | "music" | "sfx" | "stt" | "voice-design" | "voice-changer" | "isolation" | "dubbing" | "forced-alignment" | "dialogue" | "video-analysis" | "video-audit";
32
+ interface PriceVariant {
33
+ /** Composite identifier as it appears in `STATIC_CREDIT_COSTS`. */
34
+ identifier: string;
35
+ /** The catalog's list price in credits. `GET /v1/models` and the MCP
36
+ * `list_models` tool serve the price a run is charged on the instance,
37
+ * which may differ. */
38
+ credits: number;
39
+ /** Short human-readable note describing this variant ("1K default", "4K", "with audio"). */
40
+ note?: string;
41
+ }
42
+ /**
43
+ * The note on every speech model's `<model>:per-100-chars` pricing row. The
44
+ * row is a rate: one started 100 characters of the text sent, at least 8 units
45
+ * per request (`credit-estimators/speech.ts`). A request's total is rounded
46
+ * once, so its units × the listed figure is an upper bound of what it costs;
47
+ * the exact price of N units is the `<model>:per-100-chars:<N>u` id. An
48
+ * instance serves the row only while it prices speech by length; a client that
49
+ * does not see it quotes the flat row. (The ids are literals on the entries — this file cannot import
50
+ * the speech estimator without a cycle through tts-capabilities.ts; the
51
+ * pricing-coverage tests pin each literal to `speechUnitCreditId(id)`.)
52
+ */
53
+ declare const SPEECH_UNIT_PRICE_NOTE = "per started 100 characters, at least 8 units \u2014 where length pricing is on; a request costs at most its units \u00D7 this";
54
+ /** A voice-setting lever a speech model honours. */
55
+ type TtsSettingLever = "stability" | "similarity" | "style" | "speed" | "speakerBoost";
56
+ /**
57
+ * What a speech model (text-to-speech or dialogue) accepts. The ONE source for
58
+ * every "does this model do X" decision — tag stripping, which voice settings
59
+ * are sent and shown, the language picker, the per-request character cap. Never
60
+ * compare a provider id by hand; read the sheet through the helpers in
61
+ * `tts-capabilities.ts` (the text-to-speech lane) or `dialogue-capabilities.ts`
62
+ * (the dialogue lane). Each lane's helpers answer only for its own models.
63
+ */
64
+ interface TtsCapabilities {
65
+ /** Inline `[audio tags]` are performed. false ⇒ strip them before sending (the model reads them aloud). */
66
+ audioTags: boolean;
67
+ /** SSML `<break time="…"/>` tags are honoured. */
68
+ ssmlBreaks: boolean;
69
+ /** Voice settings the model honours. A lever not listed is never sent and never shown. */
70
+ levers: readonly TtsSettingLever[];
71
+ /**
72
+ * The stability values THIS PLATFORM accepts for the model, when it offers
73
+ * steps instead of a 0–1 range (ascending). Absent ⇒ any value from 0 to 1.
74
+ * A product choice, not a vendor limit: ElevenLabs takes other values too on
75
+ * some models; the steps are what our routes validate and our pickers offer.
76
+ */
77
+ stabilitySteps?: readonly number[];
78
+ /** The request may carry a language code. false ⇒ the field is omitted. */
79
+ languageCode: boolean;
80
+ /**
81
+ * The model answers the `/with-timestamps` form of its endpoint with
82
+ * character timings (and, for dialogue, per-line `voice_segments`). When true
83
+ * the platform ALWAYS renders dialogue through it and the job output carries a
84
+ * `transcript` (decided 2026-10-06); when false the plain endpoint is used
85
+ * and the request is byte-identical to before the field existed.
86
+ */
87
+ timestamps: boolean;
88
+ /**
89
+ * The model conditions a request on the text spoken before and after it
90
+ * (`previous_text` / `next_text`), for continuous intonation across clips
91
+ * produced separately. false ⇒ the fields are never sent: a model that does
92
+ * not take them rejects the request (eleven_v3: 400), which would fail a paid
93
+ * job. Values from live calls, never assumed (phase 6 plan, Task 0).
94
+ */
95
+ stitching: boolean;
96
+ /**
97
+ * Per-request character cap (the total across lines for a dialogue model).
98
+ * `getMaxTtsChars` reads it by exact id and answers {@link TTS_TEXT_MAX}'s 5,000 for
99
+ * the legacy alias and for ids with no sheet, while the sheet lookups answer
100
+ * with the cap of the model such a request actually runs as (turbo's 40,000).
101
+ */
102
+ maxChars: number;
103
+ /** Languages offered in pickers (ISO 639-1; `fil` has no two-letter code). A curated list, not the vendor's full one. */
104
+ languages: readonly string[];
105
+ }
106
+ /**
107
+ * The companies that make the catalog's models: ONE id per company, and the id
108
+ * is a public fact (the company's name, lowercased and hyphenated). Part of the
109
+ * `GET /v1/models` wire contract (`maker: { id, name }`), and the key a
110
+ * deployment publishes a maker's mark under (`logoUrl`), so an id never changes
111
+ * once shipped — a client may key its own assets on it.
112
+ *
113
+ * `maker` is not `family`: the family is the grouping label clients filter on,
114
+ * and a few name a lab, a product line or a cloud brand rather than the company
115
+ * (Tongyi-MAI and HappyHorse are Alibaba's, Depth Anything and Volcengine are
116
+ * ByteDance's, InfiniTalk is Meituan's). Every model of one family has one
117
+ * maker (`model-makers.test.ts`), and every maker here makes at least one model.
118
+ */
119
+ declare const MODEL_MAKERS: {
120
+ readonly alibaba: {
121
+ readonly name: "Alibaba";
122
+ };
123
+ readonly "black-forest-labs": {
124
+ readonly name: "Black Forest Labs";
125
+ };
126
+ readonly bytedance: {
127
+ readonly name: "ByteDance";
128
+ };
129
+ readonly elevenlabs: {
130
+ readonly name: "ElevenLabs";
131
+ };
132
+ readonly google: {
133
+ readonly name: "Google";
134
+ };
135
+ readonly ideogram: {
136
+ readonly name: "Ideogram";
137
+ };
138
+ readonly kuaishou: {
139
+ readonly name: "Kuaishou";
140
+ };
141
+ readonly lightricks: {
142
+ readonly name: "Lightricks";
143
+ };
144
+ readonly meituan: {
145
+ readonly name: "Meituan";
146
+ };
147
+ readonly minimax: {
148
+ readonly name: "MiniMax";
149
+ };
150
+ readonly nodaro: {
151
+ readonly name: "Nodaro";
152
+ };
153
+ readonly openai: {
154
+ readonly name: "OpenAI";
155
+ };
156
+ readonly recraft: {
157
+ readonly name: "Recraft";
158
+ };
159
+ readonly runway: {
160
+ readonly name: "Runway";
161
+ };
162
+ readonly suno: {
163
+ readonly name: "Suno";
164
+ };
165
+ readonly "sync-labs": {
166
+ readonly name: "Sync Labs";
167
+ };
168
+ readonly "topaz-labs": {
169
+ readonly name: "Topaz Labs";
170
+ };
171
+ readonly xai: {
172
+ readonly name: "xAI";
173
+ };
174
+ };
175
+ /** A company id from {@link MODEL_MAKERS}. */
176
+ type ModelMakerId = keyof typeof MODEL_MAKERS;
177
+ /** A model's maker as `GET /v1/models` serves it: the stable id and the company's name. */
178
+ interface ModelMaker {
179
+ id: ModelMakerId;
180
+ name: string;
181
+ }
182
+ /** True for an id of {@link MODEL_MAKERS} (and nothing it inherits). */
183
+ declare function isModelMakerId(value: unknown): value is ModelMakerId;
184
+ /**
185
+ * The maker of a catalog entry, in its wire shape — undefined when its `maker`
186
+ * is not a registry id (an entry built at run time without one). Never throws,
187
+ * so one bad entry cannot fail a whole model listing.
188
+ */
189
+ declare function modelMakerOf(entry: Pick<ModelCatalogEntry, "maker">): ModelMaker | undefined;
190
+ interface ModelCatalogEntry {
191
+ id: string;
192
+ kind: ModelKind;
193
+ /**
194
+ * Operations this model supports. Many video models (minimax, veo3,
195
+ * seedance) support BOTH i2v AND t2v under the same id — the route handler
196
+ * picks which KIE endpoint to hit based on whether an image was supplied.
197
+ * For those, list both modes here so MCP filters and frontend pickers see
198
+ * the model in either context.
199
+ */
200
+ modes: readonly ModelMode[];
201
+ /** Vendor / lab that produced the model. Used for UI grouping. */
202
+ family: string;
203
+ /**
204
+ * The company that made the model (see {@link MODEL_MAKERS}). REQUIRED, so a
205
+ * new model cannot ship without one; every model of a `family` names the same
206
+ * maker.
207
+ */
208
+ maker: ModelMakerId;
209
+ /** Display name (NOT the id — the id is the API enum value). */
210
+ label: string;
211
+ /**
212
+ * Model LINE for the add-node Models tab — the brand-agnostic product line a
213
+ * user thinks in ("Nano Banana", "Flux", "VEO", "Kling", "ElevenLabs").
214
+ * Distinct from `family` (the lab: Google covers Nano Banana + Imagen + VEO).
215
+ * REQUIRED for every node-creatable model; a completeness guard in
216
+ * `@nodaro/shared` (model-tree.test.ts) fails if one is missing.
217
+ */
218
+ series?: string;
219
+ /**
220
+ * The value written into the creating node's data field when this model is
221
+ * picked from the Models tab, for models whose catalog id differs from the
222
+ * stored value. Only `suno-generate` diverges today (id `suno-v5` → `data.model`
223
+ * "V5"). Omit when the id IS the stored value (the common case).
224
+ */
225
+ dataValue?: string;
226
+ /** One-liner. Visible to Claude in MCP `list_models` output. */
227
+ description: string;
228
+ /** Short tags Claude matches against user intent. */
229
+ useCases: readonly string[];
230
+ /**
231
+ * Capabilities flags: "reference-image", "end-frame", "audio", etc.
232
+ *
233
+ * `"video-reference"` (video models only) means the model accepts a
234
+ * reference VIDEO as a CONDITIONING clip — the r2v transport that
235
+ * `resolveSeedance2Inputs` builds and that KIE receives as
236
+ * `reference_video_urls`. It is what generate-video-pro's `extend` render
237
+ * method needs (a continuation tail off the previous segment), and
238
+ * `GVP_EXTEND_PROVIDERS` derives from it.
239
+ *
240
+ * It is deliberately NOT set on `gemini-omni-video`: that model's
241
+ * `video_list` input is a V2V SOURCE clip with a trim window, an
242
+ * auto-determined duration and flat per-generation pricing (see
243
+ * `runGeminiOmni` in `backend/src/providers/kie/video.ts`) — a different
244
+ * transport, not a continuation reference.
245
+ */
246
+ features?: readonly string[];
247
+ aspectRatios?: readonly string[];
248
+ resolutions?: readonly string[];
249
+ /**
250
+ * What this model actually RENDERS for a resolution outside `resolutions`.
251
+ *
252
+ * Most providers honour whatever band they are sent, so an off-list value is
253
+ * best snapped to the NEAREST supported one — a 4k request on a 1080p-max
254
+ * model renders 1080p. A few instead COLLAPSE anything unrecognised to a
255
+ * fixed default (MiniMax H3 → 2K, Wan 3.0 → 720p), and for those the nearest
256
+ * band is the wrong answer in the most expensive direction: snapping a stale
257
+ * "720p" to H3's cheap 768P would send a value the provider ignores, so we
258
+ * would bill the 768P tier against a 2K render, and `commit_credits` never
259
+ * collects the shortfall.
260
+ *
261
+ * Declare it in the catalog's own spelling. `normalizeVideoRequestParams`
262
+ * uses it in place of the nearest-band snap; `video-collapse-parity.test.ts`
263
+ * pins each declaration to what the provider normalizer actually returns, so
264
+ * the two cannot drift.
265
+ */
266
+ unlistedResolutionRendersAs?: string;
267
+ qualities?: readonly string[];
268
+ durations?: readonly number[];
269
+ /**
270
+ * The length (seconds) this model renders when the request names no duration
271
+ * — a capability fact, and the length an unset duration is CHARGED at
272
+ * (`pricedOutputDurationSec`). A member of `durations`. REQUIRED on every
273
+ * video model priced by length (`pricing-default-duration-sync.test.ts`), and
274
+ * where the KIE config pins `extraParams.duration` it must equal that pin.
275
+ */
276
+ defaultDuration?: number;
277
+ /**
278
+ * The model accepts an AUTO duration (`duration: -1`, see
279
+ * `VIDEO_DURATION_AUTO`): it picks the clip length itself — the source clip's
280
+ * length on a video edit, a length within `durations` otherwise. A capability,
281
+ * not a member of `durations` (which stay real seconds). Runs are reserved at
282
+ * the longest clip and settled on the delivered one.
283
+ */
284
+ autoDuration?: boolean;
285
+ /**
286
+ * The model takes NO seed: its provider schema has none, so a seed the
287
+ * request carries is dropped before the provider call and repeat runs vary.
288
+ * Absent means a seed is forwarded as usual. Read through
289
+ * {@link modelTakesSeed} — the editor hides its Seed field off it and clears
290
+ * a stale `data.seed` when the provider switches. Pinned to the KIE configs'
291
+ * `omitSeed` in both directions by `seed-capability-parity.test.ts`.
292
+ */
293
+ noSeed?: boolean;
294
+ pricing: readonly PriceVariant[];
295
+ /** Editorial highlight — "best in tier". Surfaces in MCP output as a ⭐. */
296
+ featured?: boolean;
297
+ /**
298
+ * Per-model overrides for the global value label decorations (e.g. Hailuo
299
+ * 2.3 Pro labels its 1080P resolution as "1080P (6s max)" because the
300
+ * model caps long durations at lower resolution). Falls back to
301
+ * `MODEL_VALUE_LABELS` for values not listed here.
302
+ */
303
+ valueLabels?: Record<string, string>;
304
+ /**
305
+ * Hide from MCP `list_models` output and tool model enums. Used for legacy
306
+ * model versions superseded by newer entries — they remain in the catalog
307
+ * (and accessible via direct API / frontend pickers for back-compat) but
308
+ * stop showing up in Claude.ai's model picker, which keeps the surface
309
+ * tight and steers the agent to the current generation.
310
+ *
311
+ * Frontend pickers ignore this flag.
312
+ */
313
+ mcpHidden?: boolean;
314
+ /**
315
+ * The provider's safety filter is known to be non-deterministic on this
316
+ * model — the platform retries a blocked request once; `fallback` names
317
+ * the catalog model to offer when it blocks again.
318
+ */
319
+ safetyFilter?: {
320
+ stochastic: true;
321
+ fallback?: string;
322
+ };
323
+ /**
324
+ * Capability sheet of a speech model. REQUIRED on every entry whose `modes`
325
+ * include "tts" or "dialogue" — `tts-capabilities.test.ts` fails otherwise.
326
+ */
327
+ tts?: TtsCapabilities;
328
+ }
329
+ /**
330
+ * Editorial recommendations — short "best for X" picks Claude can echo back
331
+ * to the user when they don't know which model to use. Surfaces as a "Quick
332
+ * recommendations" footer in MCP `list_models` output.
333
+ */
334
+ interface ModelRecommendation {
335
+ intent: string;
336
+ modelIds: readonly string[];
337
+ note: string;
338
+ }
339
+ declare const MODEL_RECOMMENDATIONS: readonly ModelRecommendation[];
340
+ declare const MODEL_CATALOG: Record<string, ModelCatalogEntry>;
341
+ /**
342
+ * Lookup helpers for MCP and the future frontend migration.
343
+ */
344
+ declare function listModels(filter?: {
345
+ kind?: ModelKind;
346
+ mode?: ModelMode;
347
+ family?: string;
348
+ }): ModelCatalogEntry[];
349
+ /**
350
+ * Group entries by family, returning a stable order.
351
+ * Returns Array<{ family: string; models: ModelCatalogEntry[] }>.
352
+ */
353
+ declare function groupByFamily(entries: ModelCatalogEntry[]): Array<{
354
+ family: string;
355
+ models: ModelCatalogEntry[];
356
+ }>;
357
+ declare const MODEL_KINDS: readonly ["image", "video", "audio"];
358
+ /**
359
+ * The Image / Video / Audio envelope every model-discovery surface renders
360
+ * (`GET /v1/models`, MCP `list_models`): each model is filed under ITS OWN
361
+ * kind, then by vendor family within that kind — so a vendor that ships more
362
+ * than one kind (Google: Imagen + VEO, ByteDance: Seedream + Seedance, …)
363
+ * appears once per kind it actually ships.
364
+ *
365
+ * This is the ONE grouping both surfaces call. Grouping by family first and
366
+ * letting the family's first model pick the section filed every VEO, Seedance,
367
+ * Wan and ByteDance video model under "image" whenever the call carried no
368
+ * `kind` filter (#1332) — an explicit `kind` pre-filtered the list and hid it.
369
+ * Empty sections are omitted; section order is fixed image → video → audio.
370
+ */
371
+ declare function groupByKindAndFamily(entries: ModelCatalogEntry[]): Array<{
372
+ kind: ModelKind;
373
+ families: Array<{
374
+ family: string;
375
+ models: ModelCatalogEntry[];
376
+ }>;
377
+ }>;
378
+ declare function getModel(id: string): ModelCatalogEntry | undefined;
379
+ type ValidationField = "aspectRatio" | "resolution" | "quality" | "duration";
380
+ interface ModelValidationIssue {
381
+ field: ValidationField;
382
+ message: string;
383
+ allowed: readonly (string | number)[] | null;
384
+ }
385
+ /**
386
+ * Validate that the user's lever values are supported by the chosen model.
387
+ *
388
+ * Returns null on success or the FIRST issue found. We surface a single issue
389
+ * rather than collecting all so the agent doesn't get a wall of complaints —
390
+ * fix one thing, retry. Order: aspectRatio → resolution → quality → duration.
391
+ *
392
+ * Semantics:
393
+ * - If the field is undefined, it's never an issue.
394
+ * - If the catalog entry doesn't list a corresponding lever (e.g. base
395
+ * nano-banana has no `resolutions`), passing that field IS an issue —
396
+ * silently dropping it has caused two bugs already.
397
+ * - If the value is in the allow list, it's valid.
398
+ *
399
+ * Unknown model ids are NOT flagged here — the route handler / Zod model
400
+ * enum is the right gate for that. We just skip validation.
401
+ */
402
+ declare function validateModelInput(modelId: string, input: {
403
+ aspectRatio?: string;
404
+ resolution?: string;
405
+ quality?: string;
406
+ duration?: number;
407
+ }): ModelValidationIssue | null;
408
+ /**
409
+ * The resolution a Flux 2 model should land on when its stored value is absent
410
+ * or invalid. Flux 2 exposes ascending megapixel options ("0.5 MP"…"4 MP"), so
411
+ * snapping to `options[0]` would silently downgrade every node to the cheapest
412
+ * tier; each variant has a sensible mid default instead. Returns undefined for
413
+ * every non-Flux-2 model (they snap to `options[0]` normally).
414
+ */
415
+ declare function defaultResolutionFor(modelId: string): string | undefined;
416
+ /** One correction `normalizeModelInput` made, for disclosure to the user. */
417
+ interface ModelInputAdjustment {
418
+ field: "aspectRatio" | "resolution" | "quality" | "duration";
419
+ /** The value that was asked for. */
420
+ from: string | number;
421
+ /** What it became — `undefined` means the lever was dropped entirely. */
422
+ to: string | number | undefined;
423
+ reason: string;
424
+ }
425
+ interface NormalizedModelInput {
426
+ aspectRatio?: string;
427
+ resolution?: string;
428
+ quality?: string;
429
+ duration?: number;
430
+ /** Empty when the input was already valid. */
431
+ adjustments: ModelInputAdjustment[];
432
+ }
433
+ /** A source image's pixel size as it is DISPLAYED (EXIF orientation applied). */
434
+ interface SourceImageSize {
435
+ width: number;
436
+ height: number;
437
+ }
438
+ /** What a request knows beyond its own levers. */
439
+ interface ModelInputContext {
440
+ /**
441
+ * The image an image-to-image or edit request transforms. Only read to
442
+ * resolve "auto" on a model without a native auto; absent or unusable means
443
+ * the size is unknown and "auto" snaps the way it always has.
444
+ */
445
+ sourceImage?: SourceImageSize;
446
+ }
447
+ /** True for the "auto" aspect token in any case or padding. */
448
+ declare function isAutoAspectToken(value: unknown): boolean;
449
+ /**
450
+ * The ratio in `ratios` nearest a `sourceWidth` x `sourceHeight` image:
451
+ * minimises |ln(w/h) - ln(rw/rh)|, so a portrait and its landscape mirror are
452
+ * equally far from a square. Entries that are not ratios ("auto", "adaptive",
453
+ * "match_input_image") are skipped, and a tie goes to the ratio listed first
454
+ * (`ASPECT_TIE_EPSILON`). `undefined` for unusable dimensions or a list
455
+ * without a single ratio.
456
+ */
457
+ declare function nearestCatalogAspectRatio(sourceWidth: number, sourceHeight: number, ratios: readonly string[]): string | undefined;
458
+ /**
459
+ * True when `aspectRatio` is "auto" and `modelId`'s catalog ratio list does not
460
+ * carry "auto" — the one case where the source image's size decides the ratio.
461
+ * A caller that has to fetch the size asks this first, so a request that will
462
+ * not use it never pays for the read.
463
+ */
464
+ declare function autoAspectNeedsSourceImage(modelId: string | undefined, aspectRatio: unknown): boolean;
465
+ /**
466
+ * Coerce a model's parameters into a combination the model actually accepts.
467
+ *
468
+ * The correcting twin of `validateModelInput`. Validation is right when a
469
+ * human/agent is composing a single call and can retry (MCP verbs do this).
470
+ * It is the WRONG answer at a persistence or execution boundary: rejecting
471
+ * there turns a fixable typo into a failed run — and a failed run takes every
472
+ * already-generated, already-billed sibling node down with it. Incident
473
+ * 2026-08-09: one node carrying `gpt-image` + `16:9` (a pair the config panel
474
+ * cannot produce, written straight into workflow JSON by a non-UI author)
475
+ * aborted a run whose five other nodes had already produced images.
476
+ *
477
+ * Rules, mirroring the config panels' provider-change snap:
478
+ * - Model has no such lever → drop the value (sending it 400s upstream).
479
+ * - "auto" on a model whose list lacks it, with a known `context.sourceImage`
480
+ * → the listed ratio nearest the source's shape (`nearestCatalogAspectRatio`).
481
+ * "auto" asks to keep the source photo's shape; the first listed ratio
482
+ * would reframe every source of another shape.
483
+ * - Value outside the model's allow-list → snap to the model's default
484
+ * (`defaultResolutionFor`) or the first valid option.
485
+ * - Then apply cross-field constraints that only hold for certain models.
486
+ *
487
+ * Unknown model ids pass through untouched — the route's Zod model enum is the
488
+ * right gate for those, exactly as in `validateModelInput`.
489
+ *
490
+ * Every correction is reported in `adjustments` so callers can disclose what
491
+ * changed rather than silently handing back something else.
492
+ */
493
+ declare function normalizeModelInput(modelId: string, input: {
494
+ aspectRatio?: string;
495
+ resolution?: string;
496
+ quality?: string;
497
+ duration?: number;
498
+ }, context?: ModelInputContext): NormalizedModelInput;
499
+ /**
500
+ * `ratio` as `modelId` renders it: the catalog's own spelling when the model
501
+ * lists it (any case), else the nearest ratio it lists (log space — a portrait
502
+ * request stays portrait). "auto" / "adaptive", an empty token, a model without
503
+ * a ratio list and an unknown model pass through unchanged. The ONE fitting
504
+ * rule: the video lane's normalizer applies it, and so does a node's Settings
505
+ * input for a wired Aspect Ratio (settings-input.ts), image models included.
506
+ */
507
+ declare function fitAspectRatioToModel(modelId: string, ratio: string): string;
508
+ interface NormalizedVideoRequest {
509
+ aspectRatio?: string;
510
+ resolution?: string;
511
+ adjustments: ModelInputAdjustment[];
512
+ }
513
+ /**
514
+ * The video lane's LIMITED normalizer: `aspectRatio` + `resolution` only, and
515
+ * only when the catalog actually declares the option list.
516
+ *
517
+ * Three deliberate differences from `normalizeModelInput`:
518
+ * 1. It never DROPS a lever. `normalizeModelInput` removes a value whose list
519
+ * the catalog doesn't declare; on the video lane `resolution` is a pricing
520
+ * input, so dropping it would lower the reserved tier and `commit_credits`
521
+ * never collects an upward delta — a params fix would become a money bug.
522
+ * 2. "Auto" / "adaptive" pass through (see PASSTHROUGH_ASPECT_TOKENS).
523
+ * 3. It snaps to the NEAREST option, not to `allowed[0]`. `normalizeModelInput`
524
+ * would turn a portrait 9:21 into landscape 16:9 and a 4k request into the
525
+ * cheapest 480p; nearest matches what the provider adapters and the MCP
526
+ * normalizer already do, so all three give ONE answer. Its snap policy is
527
+ * deliberately left alone — it is shared with the image lane and the
528
+ * copilot, and PR 4 defers changing it.
529
+ *
530
+ * `duration` is deliberately NOT normalized here: the LTX bands make duration
531
+ * legality resolution-dependent, which a flat catalog list can't express, and
532
+ * `buildVideoCreditModelIdentifier` already snaps duration onto a seeded tier.
533
+ * Carrying THAT tier to the wire is `pricedVideoSelection`'s job
534
+ * (`credit-identifiers.ts`), which runs after this one, once resolution is known.
535
+ *
536
+ * An OMITTED lever stays omitted here — filling it is a pricing decision, not a
537
+ * catalog one, and likewise belongs to `pricedVideoSelection`.
538
+ *
539
+ * Case is canonicalised to the catalog's own spelling — the credit identifiers
540
+ * key their tables case-SENSITIVELY (LTX_DURATION_TIERS), so this is the single
541
+ * place a "4K" becomes "4k", and it runs before every identifier site.
542
+ *
543
+ * Pure — so the credit-identifier preHandler, `computeCredits`, the reservation
544
+ * site and the payload build can all call it and cannot disagree (spec §4).
545
+ */
546
+ declare function normalizeVideoRequestParams(modelId: string, input: {
547
+ aspectRatio?: string;
548
+ resolution?: string;
549
+ draft?: boolean;
550
+ }): NormalizedVideoRequest;
551
+ interface LabeledOption {
552
+ value: string;
553
+ label: string;
554
+ }
555
+ /** Return `{value, label}[]` for the model's aspect ratios, or `null` if none. */
556
+ declare function getAspectRatioOptions(modelId: string): LabeledOption[] | null;
557
+ /** Return `{value, label}[]` for the model's resolution lever, or `null` if none. */
558
+ declare function getResolutionOptions(modelId: string): LabeledOption[] | null;
559
+ /** Return `{value, label}[]` for the model's quality lever, or `null` if none. */
560
+ declare function getQualityOptions(modelId: string): LabeledOption[] | null;
561
+ /** Return the model's allowed durations (in seconds), or `null` if none. */
562
+ declare function getDurationsForModel(modelId: string): number[] | null;
563
+ /**
564
+ * Min/max credits across all pricing variants — used by the frontend's
565
+ * "5–8 cr" range badge in the model dropdown. `null` for models with a
566
+ * single price point.
567
+ */
568
+ declare function getCreditRange(modelId: string): {
569
+ min: number;
570
+ max: number;
571
+ } | null;
572
+ /** Whether the model declares a given capability flag in its `features` array. */
573
+ declare function hasFeature(modelId: string, feature: string): boolean;
574
+ /**
575
+ * Whether a seed on this model does anything — false only for a catalog entry
576
+ * that declares `noSeed`. An unknown or missing id answers true, so a surface
577
+ * never hides a Seed field for a model it knows nothing about.
578
+ */
579
+ declare function modelTakesSeed(modelId: string | undefined): boolean;
580
+ /**
581
+ * All ids in the catalog whose `features` includes the given flag. Used by
582
+ * frontend to build PROVIDERS_WITH_END_FRAME / PROVIDERS_WITH_REFERENCES
583
+ * lists derived from the catalog.
584
+ */
585
+ declare function modelsWithFeature(feature: string): string[];
586
+ /**
587
+ * Map of `{modelId: durations[]}` for every catalog entry whose `modes`
588
+ * includes the given mode. Used to derive KIE_VIDEO_DURATIONS (mode i2v)
589
+ * and KIE_T2V_DURATIONS (mode t2v) on the frontend.
590
+ */
591
+ declare function durationsByMode(mode: ModelMode): Record<string, number[]>;
592
+ /**
593
+ * Map of `{modelId: LabeledOption[]}` for every catalog entry of the given
594
+ * kind that exposes a resolution lever. Used to derive
595
+ * IMAGE_RESOLUTION_OPTIONS / VIDEO_RESOLUTION_OPTIONS on the frontend.
596
+ */
597
+ declare function resolutionOptionsByKind(kind: ModelKind): Record<string, LabeledOption[]>;
598
+ /**
599
+ * Map of `{modelId: LabeledOption[]}` for every catalog entry of the given
600
+ * kind that exposes an aspect_ratio lever.
601
+ */
602
+ declare function aspectRatioOptionsByKind(kind: ModelKind): Record<string, LabeledOption[]>;
603
+ /** Same shape as `aspectRatioOptionsByKind` but for `qualities`. */
604
+ declare function qualityOptionsByKind(kind: ModelKind): Record<string, LabeledOption[]>;
605
+ /** One shaped model row for a picker — capabilities derived from the catalog. */
606
+ interface ModelMenuOption {
607
+ /** Catalog id (the API enum value). */
608
+ id: string;
609
+ /** Human-readable display name from the catalog. */
610
+ label: string;
611
+ /** Resolution levers, `[]` when the model exposes none. */
612
+ resolutions: LabeledOption[];
613
+ /** Aspect-ratio levers, `[]` when the model exposes none. */
614
+ aspectRatios: LabeledOption[];
615
+ /** Duration levers in seconds (union of i2v+t2v modes); `[]` for image / fixed-duration models. */
616
+ durations: {
617
+ value: number;
618
+ label: string;
619
+ }[];
620
+ }
621
+ /**
622
+ * Build shaped picker rows for one catalog `kind` from a caller-supplied id
623
+ * allowlist (the curation — which ids, in what order, stays the caller's). Every
624
+ * CAPABILITY is derived from the catalog accessors, never hardcoded, so the menu
625
+ * can't drift as the catalog evolves. Ids absent from the catalog or of the
626
+ * wrong kind are skipped (so a stale allowlist entry drops out cleanly). Pure;
627
+ * returns fresh arrays (never aliases the accessor maps).
628
+ */
629
+ declare function buildModelMenu(kind: ModelKind, allowlist: readonly string[]): ModelMenuOption[];
630
+ /** All `{modelId: {min, max}}` entries that have variable pricing (>1 variant). */
631
+ declare function creditRangesAll(): Record<string, {
632
+ min: number;
633
+ max: number;
634
+ }>;
635
+ /**
636
+ * Tuple of model ids for a given kind + one or more modes. Built for use as
637
+ * a Zod `z.enum()` argument so MCP tool input schemas stay in sync with the
638
+ * catalog without manual maintenance.
639
+ *
640
+ * Filters out `mcpHidden: true` entries by default — pass `includeHidden`
641
+ * to surface legacy versions (used internally by validators that still need
642
+ * to recognize older ids forwarded by direct API callers).
643
+ *
644
+ * Pass `kind: null` to skip the kind filter — useful for cross-kind ids
645
+ * like "grok" (catalog kind=image, modes include both t2i and t2v).
646
+ */
647
+ declare function modelIdsByKindMode(kind: ModelKind | null, modes: readonly ModelMode[], opts?: {
648
+ includeHidden?: boolean;
649
+ }): [string, ...string[]];
650
+
651
+ export { getModel as A, getQualityOptions as B, getResolutionOptions as C, groupByFamily as D, groupByKindAndFamily as E, hasFeature as F, isAutoAspectToken as G, isModelMakerId as H, listModels as I, modelIdsByKindMode as J, modelMakerOf as K, type LabeledOption as L, MODEL_CATALOG as M, type NormalizedModelInput as N, modelTakesSeed as O, type PriceVariant as P, modelsWithFeature as Q, nearestCatalogAspectRatio as R, SPEECH_UNIT_PRICE_NOTE as S, type TtsCapabilities as T, normalizeModelInput as U, type ValidationField as V, normalizeVideoRequestParams as W, qualityOptionsByKind as X, resolutionOptionsByKind as Y, validateModelInput as Z, MODEL_KINDS as a, MODEL_MAKERS as b, MODEL_RECOMMENDATIONS as c, type ModelCatalogEntry as d, type ModelInputAdjustment as e, type ModelInputContext as f, type ModelKind as g, type ModelMaker as h, type ModelMakerId as i, type ModelMenuOption as j, type ModelMode as k, type ModelRecommendation as l, type ModelValidationIssue as m, type NormalizedVideoRequest as n, type SourceImageSize as o, type TtsSettingLever as p, aspectRatioOptionsByKind as q, autoAspectNeedsSourceImage as r, buildModelMenu as s, creditRangesAll as t, defaultResolutionFor as u, durationsByMode as v, fitAspectRatioToModel as w, getAspectRatioOptions as x, getCreditRange as y, getDurationsForModel as z };