@nodaro/shared 3.30.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 (388) 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 -26444
  289. package/dist/index.cjs.map +1 -1
  290. package/dist/index.d.cts +32 -23733
  291. package/dist/index.d.ts +32 -23733
  292. package/dist/index.js +40 -24641
  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__/entity-image-handle.test.ts +61 -1
  312. package/src/__tests__/fixtures/root-exports.baseline.json +4625 -0
  313. package/src/__tests__/input-field-extra-keys.test.ts +1 -0
  314. package/src/__tests__/json-kinds.test.ts +10 -0
  315. package/src/__tests__/model-seed-capability.test.ts +34 -0
  316. package/src/__tests__/no-internal-imports.test.ts +1 -1
  317. package/src/__tests__/node-aspect-ratio.test.ts +25 -0
  318. package/src/__tests__/node-preset-extract.test.ts +8 -0
  319. package/src/__tests__/node-run-routes.test.ts +63 -0
  320. package/src/__tests__/node-runtime-keys.test.ts +70 -0
  321. package/src/__tests__/package-entries.test.ts +50 -0
  322. package/src/__tests__/pitch-tempo-pricing.test.ts +21 -0
  323. package/src/__tests__/presentation-utils.test.ts +14 -0
  324. package/src/__tests__/preview-gate-use-case.test.ts +151 -0
  325. package/src/__tests__/producer-types.test.ts +15 -0
  326. package/src/__tests__/run-continuation.test.ts +7 -1
  327. package/src/__tests__/seedance-draft.test.ts +74 -0
  328. package/src/__tests__/site-capture-node.test.ts +58 -0
  329. package/src/__tests__/ugc-clip-saved-list.test.ts +19 -0
  330. package/src/__tests__/ugc-lane-wires.test.ts +228 -0
  331. package/src/__tests__/ugc-node-wires.test.ts +606 -0
  332. package/src/__tests__/ugc-run-state.test.ts +85 -7
  333. package/src/__tests__/video-analysis-catalog-sync.test.ts +1 -1
  334. package/src/__tests__/video-analysis-pricing.test.ts +6 -6
  335. package/src/__tests__/voice-changer-pro-quote.test.ts +79 -0
  336. package/src/__tests__/workflow-export-strip.test.ts +14 -0
  337. package/src/add-captions-plan.ts +9 -3
  338. package/src/caption-edge-dash.ts +33 -0
  339. package/src/credit-estimators/index.ts +22 -1
  340. package/src/credit-estimators/pitch-tempo.ts +15 -1
  341. package/src/credit-estimators/speech.ts +72 -4
  342. package/src/credit-estimators/unit-quote.ts +52 -0
  343. package/src/credit-estimators/video-sfx.ts +15 -0
  344. package/src/credit-estimators/voice-changer-pro-quote.ts +138 -0
  345. package/src/entity-image-handle.ts +50 -1
  346. package/src/entries/apps.ts +63 -0
  347. package/src/entries/captions.ts +34 -0
  348. package/src/entries/catalogs.ts +65 -0
  349. package/src/entries/credits.ts +104 -0
  350. package/src/entries/edl.ts +42 -0
  351. package/src/entries/entities.ts +144 -0
  352. package/src/entries/i18n.ts +31 -0
  353. package/src/entries/llm-models.ts +63 -0
  354. package/src/entries/media.ts +36 -0
  355. package/src/entries/model-catalog.ts +89 -0
  356. package/src/entries/models.ts +266 -0
  357. package/src/entries/nodes.ts +245 -0
  358. package/src/entries/organizations.ts +9 -0
  359. package/src/entries/pipeline.ts +43 -0
  360. package/src/entries/scene3d.ts +27 -0
  361. package/src/entries/social.ts +297 -0
  362. package/src/entries/types.ts +26 -0
  363. package/src/entries/ugc.ts +14 -0
  364. package/src/entries/video.ts +59 -0
  365. package/src/entries/workflow.ts +172 -0
  366. package/src/fan-out-rows.ts +2 -0
  367. package/src/index.ts +25 -1838
  368. package/src/json-kinds.ts +13 -0
  369. package/src/model-catalog.ts +97 -36
  370. package/src/model-constants.ts +3 -0
  371. package/src/node-mappable-fields.ts +1 -0
  372. package/src/node-preset-export.ts +2 -2
  373. package/src/node-preset-extract.ts +6 -4
  374. package/src/node-run-routes.ts +78 -0
  375. package/src/node-runtime-keys.ts +50 -1
  376. package/src/normalize-node-params.ts +30 -0
  377. package/src/presentation-utils.ts +8 -0
  378. package/src/preview-gate.ts +92 -14
  379. package/src/producer-types.ts +26 -2
  380. package/src/run-continuation.ts +21 -0
  381. package/src/seedance-draft.ts +64 -0
  382. package/src/site-capture-node.ts +82 -0
  383. package/src/social-post.ts +13 -0
  384. package/src/ugc-lane-wires.ts +246 -0
  385. package/src/ugc-node-wires.ts +653 -0
  386. package/src/ugc-run-state.ts +65 -8
  387. package/src/video-analysis-pricing.ts +31 -29
  388. package/src/workflow-export.ts +3 -1
@@ -0,0 +1,246 @@
1
+ /**
2
+ * The UGC wires of a language whose clips are cut from one recorded speech (the
3
+ * segmented lane): UGC Clips' prelude (record the speech, time its words, split
4
+ * it at its pauses, then ask for the clips again with the segments) and UGC
5
+ * Finish (lay the speech back over the rendered clips and trim the dead air,
6
+ * as one job over all of them). One pure implementation both engines call, as
7
+ * the rest of the UGC wires (`ugc-node-wires.ts`).
8
+ *
9
+ * Content-free: an answer is read only for `phase`, its three calls' `tool`
10
+ * and `args` (argument names, never their meaning), the `finish` call's
11
+ * `args`, and a finished job's clip list. Which language takes this lane, which
12
+ * voice speaks and what the calls say are the builder's.
13
+ */
14
+ import {
15
+ UGC_FINISH_NEEDS_CLIPS_MESSAGE,
16
+ UGC_FINISH_NOT_READY_MESSAGE,
17
+ UGC_NEEDS_FINISH_MESSAGE,
18
+ UGC_NEWER_APP_MESSAGE,
19
+ UGC_NODE_MESSAGES,
20
+ UGC_OVER_HOLD_MESSAGE,
21
+ UGC_SCRIPT_LANGUAGES,
22
+ readUgcWire,
23
+ ugcPlanLengthSec,
24
+ ugcPlanScreenshotCount,
25
+ } from "./ugc-node-wires.js"
26
+ import type { FanOutItemMeta } from "./fan-out-meta.js"
27
+
28
+ type Obj = Record<string, unknown>
29
+ const isObject = (x: unknown): x is Obj => !!x && typeof x === "object" && !Array.isArray(x)
30
+
31
+ /** UGC Finish's node type. Not the plugin job it runs (`ugc-finish`): a price, a dispatch or a reconcile keyed on a type never confuses the two. */
32
+ export const UGC_FINISH_CLIPS_TYPE = "ugc-finish-clips"
33
+
34
+ /** The child steps of UGC Clips' prelude, in run order: each is a job of its own, keyed by its step. */
35
+ export const UGC_PRELUDE_STEPS = ["speech", "alignment", "split"] as const
36
+ export type UgcPreludeStep = (typeof UGC_PRELUDE_STEPS)[number]
37
+
38
+ /** The public route each prelude step runs on, and the node type its job is read as. */
39
+ export const UGC_PRELUDE_ROUTES: Readonly<Record<UgcPreludeStep, { readonly path: string; readonly jobType: string }>> = {
40
+ speech: { path: "/v1/text-to-speech", jobType: "text-to-speech" },
41
+ alignment: { path: "/v1/forced-alignment", jobType: "forced-alignment" },
42
+ split: { path: "/v1/ugc/segments", jobType: "ugc-segments" },
43
+ }
44
+
45
+ /** The `/v1/ugc/clips` answer's phase: 1 = the prelude must run first, 2 = the clips; null = an answer with no phase (one call, as English). */
46
+ export function ugcClipsPhase(answer: Readonly<Obj>): 1 | 2 | null {
47
+ return answer.phase === 1 ? 1 : answer.phase === 2 ? 2 : null
48
+ }
49
+
50
+ const callOf = (raw: unknown, tool: string): Obj | undefined => {
51
+ if (!isObject(raw) || raw.tool !== tool || !isObject(raw.args)) return undefined
52
+ return raw.args
53
+ }
54
+ const pick = (a: Readonly<Obj>, from: string, to: string): Obj => (a[from] !== undefined && a[from] !== null ? { [to]: a[from] } : {})
55
+
56
+ /** What the prelude runs: the speech's route body, and the two that need the step before them. */
57
+ export interface UgcPrelude {
58
+ readonly speech: Obj
59
+ readonly alignment: (audioUrl: string) => Obj
60
+ readonly split: (audioUrl: string, alignment: unknown) => Obj
61
+ }
62
+
63
+ /**
64
+ * A phase-1 answer's three calls (`speech`, `align`, `split`, MCP argument names) → the REST bodies of
65
+ * the public routes their MCP tools dispatch to: `generate_speech` → `/v1/text-to-speech` (text, voice,
66
+ * voice type, model as provider, language code, as the verb maps them), `forced_alignment` →
67
+ * `/v1/forced-alignment` (the transcript, with the speech's audio), `ugc_split_speech` →
68
+ * `/v1/ugc/segments` (the plan, with the speech's audio and its word timings). A call that is missing
69
+ * or names another tool → the newer-app sentence: the app never guesses.
70
+ */
71
+ export function ugcPrelude(answer: Readonly<Obj>): UgcPrelude | { readonly error: string } {
72
+ const speech = callOf(answer.speech, "generate_speech")
73
+ const align = callOf(answer.align, "forced_alignment")
74
+ const split = callOf(answer.split, "ugc_split_speech")
75
+ if (!speech || !align || !split || typeof speech.text !== "string" || !isObject(split.plan)) return { error: UGC_NEWER_APP_MESSAGE }
76
+ return {
77
+ speech: {
78
+ text: speech.text,
79
+ ...pick(speech, "voice_id", "voice"),
80
+ ...pick(speech, "voice_type", "voiceType"),
81
+ ...pick(speech, "model", "provider"),
82
+ ...pick(speech, "language_code", "languageCode"),
83
+ },
84
+ alignment: (audioUrl) => ({ ...pick(align, "transcript", "transcript"), audioUrl }),
85
+ split: (audioUrl, alignment) => ({ plan: split.plan, audioUrl, alignment }),
86
+ }
87
+ }
88
+
89
+ /** The finished speech job's audio, its word timings and its segments, as their jobs write them. */
90
+ export function ugcPreludeOutput(step: UgcPreludeStep, output: Readonly<Obj> | undefined): { value: unknown } | { error: string } {
91
+ const value = step === "speech" ? output?.audioUrl : step === "alignment" ? output?.alignment : output?.segments
92
+ const ok = step === "speech" ? typeof value === "string" && value !== "" : Array.isArray(value) && value.length > 0
93
+ return ok ? { value } : { error: UGC_NEWER_APP_MESSAGE }
94
+ }
95
+
96
+ /** The second `/v1/ugc/clips` call: the first call's body with the segments the split returned. */
97
+ export function ugcClipsPhase2Body(body: Readonly<Obj>, segments: readonly unknown[]): Obj {
98
+ return { ...body, segments: [...segments] }
99
+ }
100
+
101
+ // ── The hold check once the speech is split ──────────────────────────────────
102
+
103
+ /** The estimate input of a video cut from one recorded speech, as the hold check names it (`runEstimate`). */
104
+ export interface UgcRunEstimateInput {
105
+ readonly targetDurationSec: number
106
+ readonly screenshotCount: number
107
+ readonly source: "sampled"
108
+ readonly language: string
109
+ }
110
+
111
+ /**
112
+ * The estimate input of the video a UGC Clips run belongs to, read from the plan the node was sent: its
113
+ * length, its screenshot cards and its language — the reading a kept plan is priced with. Read on a
114
+ * phase-1 answer, before the prelude spends anything, so a plan the check cannot read refuses the run
115
+ * while nothing is paid. The creator's source prices no clip, so it is not read. A plan without a length,
116
+ * or without a language this lane takes → the newer-app sentence: the check never guesses.
117
+ */
118
+ export function ugcRunEstimateInput(plan: unknown): { runEstimate: UgcRunEstimateInput } | { error: string } {
119
+ const targetDurationSec = ugcPlanLengthSec(plan)
120
+ const language = planOf(plan)?.language
121
+ if (targetDurationSec === undefined || typeof language !== "string" || language === "en" || !(UGC_SCRIPT_LANGUAGES as readonly unknown[]).includes(language)) {
122
+ return { error: UGC_NEWER_APP_MESSAGE }
123
+ }
124
+ return { runEstimate: { targetDurationSec, screenshotCount: ugcPlanScreenshotCount(plan) ?? 0, source: "sampled", language } }
125
+ }
126
+
127
+ /**
128
+ * The quote that checks a video cut from one recorded speech before any of its clips renders: the clips
129
+ * the second `/v1/ugc/clips` call handed on, priced as the UGC Clips quote prices them (`tickets`,
130
+ * `hasCards`, `finishes`), with `runEstimate` (`ugcRunEstimateInput`). The route then also answers
131
+ * `runHold`, the most the video's estimate holds for the clips and the steps after them, which the run's
132
+ * balance was checked against before it started (`ugcRenderHoldVerdict`). No clips → the newer-app sentence.
133
+ */
134
+ export function ugcRenderHoldBody(input: { runEstimate: UgcRunEstimateInput; tickets: unknown; hasCards: boolean; finishes: boolean }): { path: "/v1/ugc/quote"; body: Obj } | { error: string } {
135
+ if (!Array.isArray(input.tickets) || input.tickets.length === 0) return { error: UGC_NEWER_APP_MESSAGE }
136
+ return {
137
+ path: "/v1/ugc/quote",
138
+ body: {
139
+ tickets: [...input.tickets],
140
+ hasCards: input.hasCards,
141
+ ...(input.finishes ? { finishes: true } : {}),
142
+ runEstimate: { ...input.runEstimate },
143
+ },
144
+ }
145
+ }
146
+
147
+ /** A plan, or its wire (a JSON string), as an object; undefined for anything else. */
148
+ function planOf(plan: unknown): Obj | undefined {
149
+ if (typeof plan !== "string") return isObject(plan) ? plan : undefined
150
+ try {
151
+ const parsed: unknown = JSON.parse(plan)
152
+ return isObject(parsed) ? parsed : undefined
153
+ } catch {
154
+ return undefined
155
+ }
156
+ }
157
+
158
+ const isCredits = (x: unknown): x is number => typeof x === "number" && Number.isFinite(x) && x >= 0
159
+
160
+ /**
161
+ * The hold check's answer → go on, or stop before any clip renders: the clips and the steps after them
162
+ * (`ceiling`, each clip at its hold) over what the run was checked for (`runHold`) → the over-hold
163
+ * sentence. An answer without both figures stops too (the newer-app sentence): a clip never renders
164
+ * on a figure nobody checked.
165
+ */
166
+ export function ugcRenderHoldVerdict(answer: unknown): { readonly ok: true } | { readonly error: string } {
167
+ if (!isObject(answer) || !isCredits(answer.ceiling) || !isCredits(answer.runHold)) return { error: UGC_NEWER_APP_MESSAGE }
168
+ return answer.ceiling > answer.runHold ? { error: UGC_OVER_HOLD_MESSAGE } : { ok: true }
169
+ }
170
+
171
+ // ── UGC Finish ───────────────────────────────────────────────────────────────
172
+
173
+ /** What UGC Finish does with the clips it was handed. */
174
+ export type UgcFinishPlan =
175
+ /** No finish call on the plan (English): the clips go on as they came, no call, no job. */
176
+ | { readonly kind: "pass"; readonly clips: readonly string[] }
177
+ /** The finish job's body: the segments with their room, one roll per clip, in order. */
178
+ | { readonly kind: "job"; readonly path: "/v1/ugc/finish"; readonly body: Obj }
179
+
180
+ /**
181
+ * UGC Finish's input → what it does. The `plan` input is UGC Clips' Script (sized) output; a plan
182
+ * carrying `finish` (the segmented lane) asks for the finish job over the clips, in order; any other
183
+ * plan passes the clips through. Clips are the fan-in list (`inputs.inputs`), in clip order.
184
+ */
185
+ export function ugcFinishPlan(input: { planOutWire: unknown; clipUrls: readonly unknown[] }): UgcFinishPlan | { readonly error: string } {
186
+ const clips = input.clipUrls.filter((u): u is string => typeof u === "string" && u !== "")
187
+ if (clips.length === 0) return { error: UGC_FINISH_NEEDS_CLIPS_MESSAGE }
188
+ const read = readUgcWire(input.planOutWire, UGC_NODE_MESSAGES.needsPlanOut)
189
+ if ("error" in read) return read
190
+ const finish = read.value.finish
191
+ if (finish === undefined) return { kind: "pass", clips }
192
+ if (!isObject(finish) || !Array.isArray(finish.segments) || finish.segments.length === 0) return { error: UGC_NEWER_APP_MESSAGE }
193
+ if (finish.segments.length !== clips.length) return { error: UGC_NEWER_APP_MESSAGE }
194
+ return {
195
+ kind: "job",
196
+ path: "/v1/ugc/finish",
197
+ body: { segments: finish.segments, clips: clips.map((url, i) => ({ clip: i + 1, rolls: [url] })) },
198
+ }
199
+ }
200
+
201
+ /** A finished clip, as UGC Finish hands it on: its URL and the notes its downstream nodes read. */
202
+ export interface UgcFinishedClip { readonly url: string; readonly meta: FanOutItemMeta }
203
+
204
+ /**
205
+ * A finished `ugc-finish` job → the finished clips in clip order, each with its real length. `ready: false`
206
+ * (a clip that does not follow its speech) → the not-ready sentence: the node fails, never hands on a
207
+ * partial list. A dry finish's warning rides every clip's notes.
208
+ */
209
+ export function ugcFinishOutputs(output: Readonly<Obj> | undefined): { clips: UgcFinishedClip[] } | { error: string } {
210
+ if (!output) return { error: UGC_NEWER_APP_MESSAGE }
211
+ if (output.ready === false) return { error: UGC_FINISH_NOT_READY_MESSAGE }
212
+ if (output.ready !== true || !Array.isArray(output.clips) || output.clips.length === 0) return { error: UGC_NEWER_APP_MESSAGE }
213
+ const warnings = Array.isArray(output.warnings)
214
+ ? output.warnings.flatMap((w) => (isObject(w) && typeof w.code === "string" ? [w.code] : typeof w === "string" ? [w] : []))
215
+ : []
216
+ const rows = [...output.clips].filter(isObject).sort((a, b) => Number(a.clip) - Number(b.clip))
217
+ if (rows.length !== output.clips.length || rows.some((r, i) => r.clip !== i + 1 || typeof r.url !== "string" || r.url === "")) return { error: UGC_NEWER_APP_MESSAGE }
218
+ return {
219
+ clips: rows.map((r) => ({
220
+ url: r.url as string,
221
+ meta: { warnings, durationSec: typeof r.sec === "number" && Number.isFinite(r.sec) && r.sec > 0 ? r.sec : null },
222
+ })),
223
+ }
224
+ }
225
+
226
+ /**
227
+ * Whether a UGC Finish reads this UGC Clips node's Script (sized) output: the graph can finish a video
228
+ * whose clips are cut from one recorded speech. Read before the prelude spends anything.
229
+ */
230
+ export function ugcFinishWired(
231
+ edges: ReadonlyArray<{ readonly source?: string; readonly target?: string; readonly sourceHandle?: string | null; readonly targetHandle?: string | null }>,
232
+ nodes: ReadonlyArray<{ readonly id?: string; readonly type?: string | null }>,
233
+ clipsId: string,
234
+ ): boolean {
235
+ const finishIds = new Set(nodes.filter((n) => n.type === UGC_FINISH_CLIPS_TYPE && typeof n.id === "string").map((n) => n.id as string))
236
+ return edges.some((e) => e.source === clipsId && e.sourceHandle === "plan-out" && e.target !== undefined && finishIds.has(e.target) && (e.targetHandle ?? "") === "plan")
237
+ }
238
+
239
+ /** UGC Clips' refusal before its prelude: the sentence when no UGC Finish reads its Script (sized) output, else null. */
240
+ export function ugcLaneNeedsFinish(
241
+ edges: Parameters<typeof ugcFinishWired>[0],
242
+ nodes: Parameters<typeof ugcFinishWired>[1],
243
+ clipsId: string,
244
+ ): string | null {
245
+ return ugcFinishWired(edges, nodes, clipsId) ? null : UGC_NEEDS_FINISH_MESSAGE
246
+ }