@nodaro/shared 3.31.0 → 3.32.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (372) hide show
  1. package/README.md +17 -0
  2. package/dist/chunk-2NIQO2J3.cjs +54 -0
  3. package/dist/chunk-2NIQO2J3.cjs.map +1 -0
  4. package/dist/chunk-2OJIVO7R.cjs +32 -0
  5. package/dist/chunk-2OJIVO7R.cjs.map +1 -0
  6. package/dist/chunk-2RF4Z7KG.cjs +803 -0
  7. package/dist/chunk-2RF4Z7KG.cjs.map +1 -0
  8. package/dist/chunk-3CUFITU7.js +1905 -0
  9. package/dist/chunk-3CUFITU7.js.map +1 -0
  10. package/dist/chunk-3RYKIUAE.js +86 -0
  11. package/dist/chunk-3RYKIUAE.js.map +1 -0
  12. package/dist/chunk-44I73CQS.cjs +194 -0
  13. package/dist/chunk-44I73CQS.cjs.map +1 -0
  14. package/dist/chunk-5AUSSJIM.cjs +3372 -0
  15. package/dist/chunk-5AUSSJIM.cjs.map +1 -0
  16. package/dist/chunk-5PC6JBGJ.cjs +1419 -0
  17. package/dist/chunk-5PC6JBGJ.cjs.map +1 -0
  18. package/dist/chunk-5RU2HCW2.js +30 -0
  19. package/dist/chunk-5RU2HCW2.js.map +1 -0
  20. package/dist/chunk-5THUHJ3E.js +46 -0
  21. package/dist/chunk-5THUHJ3E.js.map +1 -0
  22. package/dist/chunk-5U7VLG43.js +141 -0
  23. package/dist/chunk-5U7VLG43.js.map +1 -0
  24. package/dist/chunk-6DAWSVX2.cjs +103 -0
  25. package/dist/chunk-6DAWSVX2.cjs.map +1 -0
  26. package/dist/chunk-6DKDOWBL.js +1567 -0
  27. package/dist/chunk-6DKDOWBL.js.map +1 -0
  28. package/dist/chunk-6IJOPRZP.cjs +197 -0
  29. package/dist/chunk-6IJOPRZP.cjs.map +1 -0
  30. package/dist/chunk-7G7G42KS.js +86 -0
  31. package/dist/chunk-7G7G42KS.js.map +1 -0
  32. package/dist/chunk-AINCI23X.js +2171 -0
  33. package/dist/chunk-AINCI23X.js.map +1 -0
  34. package/dist/chunk-AROWPFO2.js +773 -0
  35. package/dist/chunk-AROWPFO2.js.map +1 -0
  36. package/dist/chunk-AVQK77G6.cjs +2000 -0
  37. package/dist/chunk-AVQK77G6.cjs.map +1 -0
  38. package/dist/chunk-C57NEO3X.js +3327 -0
  39. package/dist/chunk-C57NEO3X.js.map +1 -0
  40. package/dist/chunk-CK3GK34R.js +1381 -0
  41. package/dist/chunk-CK3GK34R.js.map +1 -0
  42. package/dist/chunk-E2TGXG6X.cjs +1770 -0
  43. package/dist/chunk-E2TGXG6X.cjs.map +1 -0
  44. package/dist/chunk-EK362Q45.cjs +38 -0
  45. package/dist/chunk-EK362Q45.cjs.map +1 -0
  46. package/dist/chunk-FBV5DF6D.js +95 -0
  47. package/dist/chunk-FBV5DF6D.js.map +1 -0
  48. package/dist/chunk-FG4E7MTG.cjs +4 -0
  49. package/dist/chunk-FG4E7MTG.cjs.map +1 -0
  50. package/dist/chunk-G6IIVKMO.js +26 -0
  51. package/dist/chunk-G6IIVKMO.js.map +1 -0
  52. package/dist/chunk-HGC5JNVA.cjs +1503 -0
  53. package/dist/chunk-HGC5JNVA.cjs.map +1 -0
  54. package/dist/chunk-HSHCCBIV.js +255 -0
  55. package/dist/chunk-HSHCCBIV.js.map +1 -0
  56. package/dist/chunk-IEBZHTPE.js +254 -0
  57. package/dist/chunk-IEBZHTPE.js.map +1 -0
  58. package/dist/chunk-ISJDAFKS.js +1604 -0
  59. package/dist/chunk-ISJDAFKS.js.map +1 -0
  60. package/dist/chunk-J6KHW2E5.cjs +1963 -0
  61. package/dist/chunk-J6KHW2E5.cjs.map +1 -0
  62. package/dist/chunk-J7BMO73N.cjs +114 -0
  63. package/dist/chunk-J7BMO73N.cjs.map +1 -0
  64. package/dist/chunk-JL4C5VJ7.cjs +488 -0
  65. package/dist/chunk-JL4C5VJ7.cjs.map +1 -0
  66. package/dist/chunk-JSGIEF6Z.cjs +1087 -0
  67. package/dist/chunk-JSGIEF6Z.cjs.map +1 -0
  68. package/dist/chunk-JSNV5O2F.cjs +34 -0
  69. package/dist/chunk-JSNV5O2F.cjs.map +1 -0
  70. package/dist/chunk-JWA5SGCS.js +203 -0
  71. package/dist/chunk-JWA5SGCS.js.map +1 -0
  72. package/dist/chunk-JX5YZ4DH.cjs +430 -0
  73. package/dist/chunk-JX5YZ4DH.cjs.map +1 -0
  74. package/dist/chunk-KHCBJ7KD.js +42 -0
  75. package/dist/chunk-KHCBJ7KD.js.map +1 -0
  76. package/dist/chunk-KU6S7IYV.cjs +210 -0
  77. package/dist/chunk-KU6S7IYV.cjs.map +1 -0
  78. package/dist/chunk-LKAIXWK3.js +181 -0
  79. package/dist/chunk-LKAIXWK3.js.map +1 -0
  80. package/dist/chunk-LPW3XNC2.js +471 -0
  81. package/dist/chunk-LPW3XNC2.js.map +1 -0
  82. package/dist/chunk-M36G6SRP.js +447 -0
  83. package/dist/chunk-M36G6SRP.js.map +1 -0
  84. package/dist/chunk-MRXGWL42.cjs +4 -0
  85. package/dist/chunk-MRXGWL42.cjs.map +1 -0
  86. package/dist/chunk-NB72XWXQ.cjs +54 -0
  87. package/dist/chunk-NB72XWXQ.cjs.map +1 -0
  88. package/dist/chunk-NEJ2PV4C.cjs +211 -0
  89. package/dist/chunk-NEJ2PV4C.cjs.map +1 -0
  90. package/dist/chunk-NT6IJH4L.cjs +273 -0
  91. package/dist/chunk-NT6IJH4L.cjs.map +1 -0
  92. package/dist/chunk-O5MP52U2.cjs +526 -0
  93. package/dist/chunk-O5MP52U2.cjs.map +1 -0
  94. package/dist/chunk-O7PUQLJ3.cjs +818 -0
  95. package/dist/chunk-O7PUQLJ3.cjs.map +1 -0
  96. package/dist/chunk-PQHS255G.js +1369 -0
  97. package/dist/chunk-PQHS255G.js.map +1 -0
  98. package/dist/chunk-PRYE7AZQ.cjs +1227 -0
  99. package/dist/chunk-PRYE7AZQ.cjs.map +1 -0
  100. package/dist/chunk-Q4CDQ2KO.js +21 -0
  101. package/dist/chunk-Q4CDQ2KO.js.map +1 -0
  102. package/dist/chunk-QELDJGDK.cjs +1714 -0
  103. package/dist/chunk-QELDJGDK.cjs.map +1 -0
  104. package/dist/chunk-QJRP44ZO.js +769 -0
  105. package/dist/chunk-QJRP44ZO.js.map +1 -0
  106. package/dist/chunk-QNGNOU4Z.js +29 -0
  107. package/dist/chunk-QNGNOU4Z.js.map +1 -0
  108. package/dist/chunk-RJL7RCEM.cjs +159 -0
  109. package/dist/chunk-RJL7RCEM.cjs.map +1 -0
  110. package/dist/chunk-RN3RMBJZ.js +1164 -0
  111. package/dist/chunk-RN3RMBJZ.js.map +1 -0
  112. package/dist/chunk-S5DMKUWK.cjs +1273 -0
  113. package/dist/chunk-S5DMKUWK.cjs.map +1 -0
  114. package/dist/chunk-SES6GDBQ.cjs +624 -0
  115. package/dist/chunk-SES6GDBQ.cjs.map +1 -0
  116. package/dist/chunk-TNPDV7I4.cjs +2346 -0
  117. package/dist/chunk-TNPDV7I4.cjs.map +1 -0
  118. package/dist/chunk-TZBIY5C3.js +187 -0
  119. package/dist/chunk-TZBIY5C3.js.map +1 -0
  120. package/dist/chunk-TZE673G6.js +3 -0
  121. package/dist/chunk-TZE673G6.js.map +1 -0
  122. package/dist/chunk-ULXI7A6Q.cjs +1047 -0
  123. package/dist/chunk-ULXI7A6Q.cjs.map +1 -0
  124. package/dist/chunk-VIWSWVAW.js +1782 -0
  125. package/dist/chunk-VIWSWVAW.js.map +1 -0
  126. package/dist/chunk-VWGNPMJZ.cjs +19 -0
  127. package/dist/chunk-VWGNPMJZ.cjs.map +1 -0
  128. package/dist/chunk-WDIBOWAA.js +1054 -0
  129. package/dist/chunk-WDIBOWAA.js.map +1 -0
  130. package/dist/chunk-WNG7HRVA.cjs +25 -0
  131. package/dist/chunk-WNG7HRVA.cjs.map +1 -0
  132. package/dist/chunk-WNVQ3SMB.cjs +96 -0
  133. package/dist/chunk-WNVQ3SMB.cjs.map +1 -0
  134. package/dist/chunk-WRSWH7US.cjs +285 -0
  135. package/dist/chunk-WRSWH7US.cjs.map +1 -0
  136. package/dist/chunk-XAMC4S53.js +17 -0
  137. package/dist/chunk-XAMC4S53.js.map +1 -0
  138. package/dist/chunk-XNISPHTZ.js +1039 -0
  139. package/dist/chunk-XNISPHTZ.js.map +1 -0
  140. package/dist/chunk-Y2PM3FFL.js +3 -0
  141. package/dist/chunk-Y2PM3FFL.js.map +1 -0
  142. package/dist/chunk-YBPBK5KI.js +1030 -0
  143. package/dist/chunk-YBPBK5KI.js.map +1 -0
  144. package/dist/chunk-YHRG7UOC.js +31 -0
  145. package/dist/chunk-YHRG7UOC.js.map +1 -0
  146. package/dist/chunk-YWNYGYI7.cjs +31 -0
  147. package/dist/chunk-YWNYGYI7.cjs.map +1 -0
  148. package/dist/chunk-YYV35XOS.js +122 -0
  149. package/dist/chunk-YYV35XOS.js.map +1 -0
  150. package/dist/chunk-Z2OL5AJD.cjs +133 -0
  151. package/dist/chunk-Z2OL5AJD.cjs.map +1 -0
  152. package/dist/chunk-Z4AZW6FY.js +920 -0
  153. package/dist/chunk-Z4AZW6FY.js.map +1 -0
  154. package/dist/chunk-ZDFHA2EC.js +572 -0
  155. package/dist/chunk-ZDFHA2EC.js.map +1 -0
  156. package/dist/chunk-ZNZDQAXN.js +175 -0
  157. package/dist/chunk-ZNZDQAXN.js.map +1 -0
  158. package/dist/chunk-ZRL2UFTH.cjs +1073 -0
  159. package/dist/chunk-ZRL2UFTH.cjs.map +1 -0
  160. package/dist/chunk-ZT77RY6R.js +404 -0
  161. package/dist/chunk-ZT77RY6R.js.map +1 -0
  162. package/dist/entries/apps.cjs +155 -0
  163. package/dist/entries/apps.cjs.map +1 -0
  164. package/dist/entries/apps.d.cts +283 -0
  165. package/dist/entries/apps.d.ts +283 -0
  166. package/dist/entries/apps.js +10 -0
  167. package/dist/entries/apps.js.map +1 -0
  168. package/dist/entries/captions.cjs +124 -0
  169. package/dist/entries/captions.cjs.map +1 -0
  170. package/dist/entries/captions.d.cts +354 -0
  171. package/dist/entries/captions.d.ts +354 -0
  172. package/dist/entries/captions.js +3 -0
  173. package/dist/entries/captions.js.map +1 -0
  174. package/dist/entries/catalogs.cjs +165 -0
  175. package/dist/entries/catalogs.cjs.map +1 -0
  176. package/dist/entries/catalogs.d.cts +385 -0
  177. package/dist/entries/catalogs.d.ts +385 -0
  178. package/dist/entries/catalogs.js +4 -0
  179. package/dist/entries/catalogs.js.map +1 -0
  180. package/dist/entries/credits.cjs +592 -0
  181. package/dist/entries/credits.cjs.map +1 -0
  182. package/dist/entries/credits.d.cts +1429 -0
  183. package/dist/entries/credits.d.ts +1429 -0
  184. package/dist/entries/credits.js +11 -0
  185. package/dist/entries/credits.js.map +1 -0
  186. package/dist/entries/edl.cjs +409 -0
  187. package/dist/entries/edl.cjs.map +1 -0
  188. package/dist/entries/edl.d.cts +1199 -0
  189. package/dist/entries/edl.d.ts +1199 -0
  190. package/dist/entries/edl.js +4 -0
  191. package/dist/entries/edl.js.map +1 -0
  192. package/dist/entries/entities.cjs +530 -0
  193. package/dist/entries/entities.cjs.map +1 -0
  194. package/dist/entries/entities.d.cts +1371 -0
  195. package/dist/entries/entities.d.ts +1371 -0
  196. package/dist/entries/entities.js +5 -0
  197. package/dist/entries/entities.js.map +1 -0
  198. package/dist/entries/i18n.cjs +48 -0
  199. package/dist/entries/i18n.cjs.map +1 -0
  200. package/dist/entries/i18n.d.cts +69 -0
  201. package/dist/entries/i18n.d.ts +69 -0
  202. package/dist/entries/i18n.js +3 -0
  203. package/dist/entries/i18n.js.map +1 -0
  204. package/dist/entries/llm-models.cjs +177 -0
  205. package/dist/entries/llm-models.cjs.map +1 -0
  206. package/dist/entries/llm-models.d.cts +435 -0
  207. package/dist/entries/llm-models.d.ts +435 -0
  208. package/dist/entries/llm-models.js +4 -0
  209. package/dist/entries/llm-models.js.map +1 -0
  210. package/dist/entries/media.cjs +335 -0
  211. package/dist/entries/media.cjs.map +1 -0
  212. package/dist/entries/media.d.cts +518 -0
  213. package/dist/entries/media.d.ts +518 -0
  214. package/dist/entries/media.js +6 -0
  215. package/dist/entries/media.js.map +1 -0
  216. package/dist/entries/model-catalog.cjs +247 -0
  217. package/dist/entries/model-catalog.cjs.map +1 -0
  218. package/dist/entries/model-catalog.d.cts +202 -0
  219. package/dist/entries/model-catalog.d.ts +202 -0
  220. package/dist/entries/model-catalog.js +6 -0
  221. package/dist/entries/model-catalog.js.map +1 -0
  222. package/dist/entries/models.cjs +833 -0
  223. package/dist/entries/models.cjs.map +1 -0
  224. package/dist/entries/models.d.cts +287 -0
  225. package/dist/entries/models.d.ts +287 -0
  226. package/dist/entries/models.js +8 -0
  227. package/dist/entries/models.js.map +1 -0
  228. package/dist/entries/nodes.cjs +789 -0
  229. package/dist/entries/nodes.cjs.map +1 -0
  230. package/dist/entries/nodes.d.cts +1600 -0
  231. package/dist/entries/nodes.d.ts +1600 -0
  232. package/dist/entries/nodes.js +16 -0
  233. package/dist/entries/nodes.js.map +1 -0
  234. package/dist/entries/organizations.cjs +80 -0
  235. package/dist/entries/organizations.cjs.map +1 -0
  236. package/dist/entries/organizations.d.cts +466 -0
  237. package/dist/entries/organizations.d.ts +466 -0
  238. package/dist/entries/organizations.js +3 -0
  239. package/dist/entries/organizations.js.map +1 -0
  240. package/dist/entries/pipeline.cjs +594 -0
  241. package/dist/entries/pipeline.cjs.map +1 -0
  242. package/dist/entries/pipeline.d.cts +2617 -0
  243. package/dist/entries/pipeline.d.ts +2617 -0
  244. package/dist/entries/pipeline.js +5 -0
  245. package/dist/entries/pipeline.js.map +1 -0
  246. package/dist/entries/scene3d.cjs +704 -0
  247. package/dist/entries/scene3d.cjs.map +1 -0
  248. package/dist/entries/scene3d.d.cts +4284 -0
  249. package/dist/entries/scene3d.d.ts +4284 -0
  250. package/dist/entries/scene3d.js +3 -0
  251. package/dist/entries/scene3d.js.map +1 -0
  252. package/dist/entries/social.cjs +714 -0
  253. package/dist/entries/social.cjs.map +1 -0
  254. package/dist/entries/social.d.cts +1366 -0
  255. package/dist/entries/social.d.ts +1366 -0
  256. package/dist/entries/social.js +5 -0
  257. package/dist/entries/social.js.map +1 -0
  258. package/dist/entries/types.cjs +13 -0
  259. package/dist/entries/types.cjs.map +1 -0
  260. package/dist/entries/types.d.cts +162 -0
  261. package/dist/entries/types.d.ts +162 -0
  262. package/dist/entries/types.js +4 -0
  263. package/dist/entries/types.js.map +1 -0
  264. package/dist/entries/ugc.cjs +279 -0
  265. package/dist/entries/ugc.cjs.map +1 -0
  266. package/dist/entries/ugc.d.cts +575 -0
  267. package/dist/entries/ugc.d.ts +575 -0
  268. package/dist/entries/ugc.js +6 -0
  269. package/dist/entries/ugc.js.map +1 -0
  270. package/dist/entries/video.cjs +549 -0
  271. package/dist/entries/video.cjs.map +1 -0
  272. package/dist/entries/video.d.cts +1791 -0
  273. package/dist/entries/video.d.ts +1791 -0
  274. package/dist/entries/video.js +8 -0
  275. package/dist/entries/video.js.map +1 -0
  276. package/dist/entries/workflow.cjs +574 -0
  277. package/dist/entries/workflow.cjs.map +1 -0
  278. package/dist/entries/workflow.d.cts +1733 -0
  279. package/dist/entries/workflow.d.ts +1733 -0
  280. package/dist/entries/workflow.js +5 -0
  281. package/dist/entries/workflow.js.map +1 -0
  282. package/dist/fan-out-meta-Bu6VyXcZ.d.cts +19 -0
  283. package/dist/fan-out-meta-Bu6VyXcZ.d.ts +19 -0
  284. package/dist/gemini-omni-voices-zeRXxSbZ.d.cts +174 -0
  285. package/dist/gemini-omni-voices-zeRXxSbZ.d.ts +174 -0
  286. package/dist/image-overlay-layers-CyBfRhxJ.d.cts +208 -0
  287. package/dist/image-overlay-layers-CyBfRhxJ.d.ts +208 -0
  288. package/dist/index.cjs +7731 -27084
  289. package/dist/index.cjs.map +1 -1
  290. package/dist/index.d.cts +32 -24198
  291. package/dist/index.d.ts +32 -24198
  292. package/dist/index.js +40 -25220
  293. package/dist/index.js.map +1 -1
  294. package/dist/model-catalog-flJYaa-g.d.cts +561 -0
  295. package/dist/model-catalog-flJYaa-g.d.ts +561 -0
  296. package/dist/presentation-types-0ENOCjoj.d.cts +61 -0
  297. package/dist/presentation-types-0ENOCjoj.d.ts +61 -0
  298. package/dist/presentation-utils-BIqiCzSA.d.cts +90 -0
  299. package/dist/presentation-utils-BdiObtwq.d.ts +90 -0
  300. package/dist/scene-node-types-DjenYFLO.d.cts +1949 -0
  301. package/dist/scene-node-types-DjenYFLO.d.ts +1949 -0
  302. package/dist/supported-fonts-CRoF1gOy.d.cts +16 -0
  303. package/dist/supported-fonts-CRoF1gOy.d.ts +16 -0
  304. package/dist/types-BRlFPEru.d.cts +511 -0
  305. package/dist/types-BRlFPEru.d.ts +511 -0
  306. package/dist/types-DffyGSy5.d.cts +67 -0
  307. package/dist/types-DffyGSy5.d.ts +67 -0
  308. package/package.json +102 -1
  309. package/src/__tests__/add-captions-plan.test.ts +6 -2
  310. package/src/__tests__/caption-edge-dash.test.ts +23 -0
  311. package/src/__tests__/fixtures/root-exports.baseline.json +4625 -0
  312. package/src/__tests__/input-field-extra-keys.test.ts +1 -0
  313. package/src/__tests__/no-internal-imports.test.ts +1 -1
  314. package/src/__tests__/node-aspect-ratio.test.ts +25 -0
  315. package/src/__tests__/node-runtime-keys.test.ts +9 -0
  316. package/src/__tests__/package-entries.test.ts +50 -0
  317. package/src/__tests__/pitch-tempo-pricing.test.ts +21 -0
  318. package/src/__tests__/preview-gate-use-case.test.ts +151 -0
  319. package/src/__tests__/run-continuation.test.ts +7 -1
  320. package/src/__tests__/site-capture-node.test.ts +58 -0
  321. package/src/__tests__/ugc-lane-wires.test.ts +228 -0
  322. package/src/__tests__/ugc-node-wires.test.ts +9 -3
  323. package/src/__tests__/ugc-run-state.test.ts +5 -4
  324. package/src/__tests__/video-analysis-catalog-sync.test.ts +1 -1
  325. package/src/__tests__/video-analysis-pricing.test.ts +6 -6
  326. package/src/__tests__/voice-changer-pro-quote.test.ts +79 -0
  327. package/src/add-captions-plan.ts +9 -3
  328. package/src/caption-edge-dash.ts +33 -0
  329. package/src/credit-estimators/index.ts +22 -1
  330. package/src/credit-estimators/pitch-tempo.ts +15 -1
  331. package/src/credit-estimators/speech.ts +72 -4
  332. package/src/credit-estimators/unit-quote.ts +52 -0
  333. package/src/credit-estimators/video-sfx.ts +15 -0
  334. package/src/credit-estimators/voice-changer-pro-quote.ts +138 -0
  335. package/src/entity-image-handle.ts +2 -0
  336. package/src/entries/apps.ts +63 -0
  337. package/src/entries/captions.ts +34 -0
  338. package/src/entries/catalogs.ts +65 -0
  339. package/src/entries/credits.ts +104 -0
  340. package/src/entries/edl.ts +42 -0
  341. package/src/entries/entities.ts +144 -0
  342. package/src/entries/i18n.ts +31 -0
  343. package/src/entries/llm-models.ts +63 -0
  344. package/src/entries/media.ts +36 -0
  345. package/src/entries/model-catalog.ts +89 -0
  346. package/src/entries/models.ts +266 -0
  347. package/src/entries/nodes.ts +245 -0
  348. package/src/entries/organizations.ts +9 -0
  349. package/src/entries/pipeline.ts +43 -0
  350. package/src/entries/scene3d.ts +27 -0
  351. package/src/entries/social.ts +297 -0
  352. package/src/entries/types.ts +26 -0
  353. package/src/entries/ugc.ts +14 -0
  354. package/src/entries/video.ts +59 -0
  355. package/src/entries/workflow.ts +172 -0
  356. package/src/fan-out-rows.ts +2 -0
  357. package/src/index.ts +25 -1845
  358. package/src/json-kinds.ts +4 -0
  359. package/src/model-catalog.ts +36 -34
  360. package/src/node-mappable-fields.ts +1 -0
  361. package/src/node-run-routes.ts +2 -0
  362. package/src/node-runtime-keys.ts +8 -0
  363. package/src/normalize-node-params.ts +30 -0
  364. package/src/presentation-utils.ts +5 -0
  365. package/src/preview-gate.ts +92 -14
  366. package/src/producer-types.ts +16 -2
  367. package/src/run-continuation.ts +21 -0
  368. package/src/site-capture-node.ts +82 -0
  369. package/src/ugc-lane-wires.ts +246 -0
  370. package/src/ugc-node-wires.ts +37 -7
  371. package/src/ugc-run-state.ts +5 -3
  372. package/src/video-analysis-pricing.ts +31 -29
package/src/json-kinds.ts CHANGED
@@ -59,6 +59,8 @@ const JSON_OUTPUT_KINDS: Readonly<Record<string, JsonOutputs>> = Object.freeze({
59
59
  "speaker-frames": { primary: "tracks", pips: { tracks: "other" } },
60
60
  // Text to Dialogue: the Transcript built from the model's own word timings (its default read is the audio).
61
61
  "text-to-dialogue": { pips: { json: "transcript" } },
62
+ // Tighten Episode: its json is the plan's EDL (dropped[] included); its default read is the media.
63
+ "tighten-episode": { pips: { json: "edl" } },
62
64
 
63
65
  // ── JSON that is neither a Transcript nor an EDL (decided 2026-10-08) ──
64
66
  // Forced Alignment: `{ alignment: [{ word, start, end }] }` in seconds — a word list, not a Transcript.
@@ -74,6 +76,8 @@ const JSON_OUTPUT_KINDS: Readonly<Record<string, JsonOutputs>> = Object.freeze({
74
76
  "meta-ads-scrape": { primary: "json", pips: { json: "other" } },
75
77
  "instagram-scrape": { primary: "json", pips: { json: "other" } },
76
78
  "social-search": { primary: "json", pips: { json: "other" } },
79
+ // Site Capture: the capture's output (title, sections, stills, page facts). Its stills are its `image` pip.
80
+ "site-capture": { pips: { json: "other" } },
77
81
  "telegram-channel-feed": { primary: "json", pips: { json: "other" } },
78
82
  // Content Recipe: the recipe's structured result.
79
83
  "content-recipe": { primary: "json", pips: { json: "other" } },
@@ -87,13 +87,15 @@ export interface PriceVariant {
87
87
  /**
88
88
  * The note on every speech model's `<model>:per-100-chars` pricing row. The
89
89
  * row is a rate: one started 100 characters of the text sent, at least 8 units
90
- * per request (`credit-estimators/speech.ts`). An instance serves the row only
91
- * while it prices speech by length; a client that does not see it quotes the
92
- * flat row. (The ids are literals on the entries — this file cannot import
90
+ * per request (`credit-estimators/speech.ts`). A request's total is rounded
91
+ * once, so its units × the listed figure is an upper bound of what it costs;
92
+ * the exact price of N units is the `<model>:per-100-chars:<N>u` id. An
93
+ * instance serves the row only while it prices speech by length; a client that
94
+ * does not see it quotes the flat row. (The ids are literals on the entries — this file cannot import
93
95
  * the speech estimator without a cycle through tts-capabilities.ts; the
94
96
  * pricing-coverage tests pin each literal to `speechUnitCreditId(id)`.)
95
97
  */
96
- export const SPEECH_UNIT_PRICE_NOTE = "per started 100 characters, at least 8 units — where length pricing is on"
98
+ export const SPEECH_UNIT_PRICE_NOTE = "per started 100 characters, at least 8 units — where length pricing is on; a request costs at most its units × this"
97
99
 
98
100
  /** A voice-setting lever a speech model honours. */
99
101
  export type TtsSettingLever = "stability" | "similarity" | "style" | "speed" | "speakerBoost"
@@ -2540,11 +2542,11 @@ const VIDEO_MODELS: Record<string, ModelCatalogEntry> = {
2540
2542
  description: "Analyze a video into a structured shot list (scenes, camera, audio) — fast, economy tier. Billed per duration bucket.",
2541
2543
  useCases: ["video-analysis", "shot-list", "fast"],
2542
2544
  pricing: [
2543
- { identifier: "video-analysis:gemini-3-flash", credits: 849, note: "10-min ceiling (no duration given)" },
2545
+ { identifier: "video-analysis:gemini-3-flash", credits: 848, note: "10-min ceiling (no duration given)" },
2544
2546
  { identifier: "video-analysis:gemini-3-flash:60s", credits: 181 },
2545
- { identifier: "video-analysis:gemini-3-flash:180s", credits: 186 },
2546
- { identifier: "video-analysis:gemini-3-flash:360s", credits: 516 },
2547
- { identifier: "video-analysis:gemini-3-flash:600s", credits: 849, note: "10-min ceiling" },
2547
+ { identifier: "video-analysis:gemini-3-flash:180s", credits: 185 },
2548
+ { identifier: "video-analysis:gemini-3-flash:360s", credits: 515 },
2549
+ { identifier: "video-analysis:gemini-3-flash:600s", credits: 848, note: "10-min ceiling" },
2548
2550
  ],
2549
2551
  },
2550
2552
  "gemini-3.6-flash-video-analysis": {
@@ -2557,11 +2559,11 @@ const VIDEO_MODELS: Record<string, ModelCatalogEntry> = {
2557
2559
  description: "Legacy fast-tier analysis model (backed the fast tier from 2026-07 until 2026-07-29). Kept so stored raw-model configs keep running and keep pricing under their own identifier; new fast-tier runs use the current fast model.",
2558
2560
  useCases: ["video-analysis", "shot-list", "fast"],
2559
2561
  pricing: [
2560
- { identifier: "video-analysis:gemini-3.6-flash", credits: 995, note: "10-min ceiling (no duration given)" },
2561
- { identifier: "video-analysis:gemini-3.6-flash:60s", credits: 205 },
2562
+ { identifier: "video-analysis:gemini-3.6-flash", credits: 992, note: "10-min ceiling (no duration given)" },
2563
+ { identifier: "video-analysis:gemini-3.6-flash:60s", credits: 204 },
2562
2564
  { identifier: "video-analysis:gemini-3.6-flash:180s", credits: 219 },
2563
- { identifier: "video-analysis:gemini-3.6-flash:360s", credits: 603 },
2564
- { identifier: "video-analysis:gemini-3.6-flash:600s", credits: 995, note: "10-min ceiling" },
2565
+ { identifier: "video-analysis:gemini-3.6-flash:360s", credits: 602 },
2566
+ { identifier: "video-analysis:gemini-3.6-flash:600s", credits: 992, note: "10-min ceiling" },
2565
2567
  ],
2566
2568
  },
2567
2569
  "gemini-3.1-pro-video-analysis": {
@@ -2574,11 +2576,11 @@ const VIDEO_MODELS: Record<string, ModelCatalogEntry> = {
2574
2576
  description: "Analyze a video into a structured shot list (scenes, camera, audio) — higher-fidelity, default tier. Billed per duration bucket.",
2575
2577
  useCases: ["video-analysis", "shot-list", "cinematic"],
2576
2578
  pricing: [
2577
- { identifier: "video-analysis:gemini-3.1-pro", credits: 1059, note: "10-min ceiling (no duration given)" },
2578
- { identifier: "video-analysis:gemini-3.1-pro:60s", credits: 217 },
2579
- { identifier: "video-analysis:gemini-3.1-pro:180s", credits: 233 },
2580
- { identifier: "video-analysis:gemini-3.1-pro:360s", credits: 642 },
2581
- { identifier: "video-analysis:gemini-3.1-pro:600s", credits: 1059, note: "10-min ceiling" },
2579
+ { identifier: "video-analysis:gemini-3.1-pro", credits: 1056, note: "10-min ceiling (no duration given)" },
2580
+ { identifier: "video-analysis:gemini-3.1-pro:60s", credits: 216 },
2581
+ { identifier: "video-analysis:gemini-3.1-pro:180s", credits: 232 },
2582
+ { identifier: "video-analysis:gemini-3.1-pro:360s", credits: 640 },
2583
+ { identifier: "video-analysis:gemini-3.1-pro:600s", credits: 1056, note: "10-min ceiling" },
2582
2584
  ],
2583
2585
  },
2584
2586
  // Both mixed tiers are variants of the same advanced multi-engine analysis
@@ -2594,11 +2596,11 @@ const VIDEO_MODELS: Record<string, ModelCatalogEntry> = {
2594
2596
  description: "Our most advanced analysis tier — multiple analysis engines combined into one result for maximum completeness and accuracy. Billed per duration bucket.",
2595
2597
  useCases: ["video-analysis", "shot-list", "premium", "most-complete"],
2596
2598
  pricing: [
2597
- { identifier: "video-analysis:mixed", credits: 1181, note: "10-min ceiling (no duration given)" },
2599
+ { identifier: "video-analysis:mixed", credits: 1177, note: "10-min ceiling (no duration given)" },
2598
2600
  { identifier: "video-analysis:mixed:60s", credits: 270 },
2599
- { identifier: "video-analysis:mixed:180s", credits: 292 },
2600
- { identifier: "video-analysis:mixed:360s", credits: 731 },
2601
- { identifier: "video-analysis:mixed:600s", credits: 1181, note: "10-min ceiling" },
2601
+ { identifier: "video-analysis:mixed:180s", credits: 291 },
2602
+ { identifier: "video-analysis:mixed:360s", credits: 729 },
2603
+ { identifier: "video-analysis:mixed:600s", credits: 1177, note: "10-min ceiling" },
2602
2604
  ],
2603
2605
  },
2604
2606
  // SMART — the accuracy tier. Since the 2026-08-03 hybrid re-plan it is a
@@ -2616,11 +2618,11 @@ const VIDEO_MODELS: Record<string, ModelCatalogEntry> = {
2616
2618
  description: "Highest-accuracy analysis — a hybrid pass that blends a native skeleton read with several donor analysis rolls, then always refines the merged result to find shot boundaries and identify the cast by appearance. Best choice when the shot list will drive regeneration. Billed per duration bucket.",
2617
2619
  useCases: ["video-analysis", "shot-list", "premium", "most-accurate"],
2618
2620
  pricing: [
2619
- { identifier: "video-analysis:smart", credits: 2081, note: "10-min ceiling (no duration given)" },
2620
- { identifier: "video-analysis:smart:60s", credits: 414 },
2621
- { identifier: "video-analysis:smart:180s", credits: 504 },
2622
- { identifier: "video-analysis:smart:360s", credits: 1270 },
2623
- { identifier: "video-analysis:smart:600s", credits: 2081, note: "10-min ceiling" },
2621
+ { identifier: "video-analysis:smart", credits: 2076, note: "10-min ceiling (no duration given)" },
2622
+ { identifier: "video-analysis:smart:60s", credits: 413 },
2623
+ { identifier: "video-analysis:smart:180s", credits: 503 },
2624
+ { identifier: "video-analysis:smart:360s", credits: 1267 },
2625
+ { identifier: "video-analysis:smart:600s", credits: 2076, note: "10-min ceiling" },
2624
2626
  ],
2625
2627
  },
2626
2628
  // ── AI Audit (`video-audit`) ── a SEPARATE node from video-analysis (own
@@ -2644,11 +2646,11 @@ const VIDEO_MODELS: Record<string, ModelCatalogEntry> = {
2644
2646
  description: "Re-watches a clip against a wired analysis, applies video-verified corrections under guards, and returns a disclosed report of what changed. Billed per duration bucket.",
2645
2647
  useCases: ["video-audit", "qa", "shot-list", "verification"],
2646
2648
  pricing: [
2647
- { identifier: "video-audit", credits: 1075, note: "10-min ceiling (no duration given)" },
2649
+ { identifier: "video-audit", credits: 1073, note: "10-min ceiling (no duration given)" },
2648
2650
  { identifier: "video-audit:60s", credits: 215 },
2649
- { identifier: "video-audit:180s", credits: 291 },
2650
- { identifier: "video-audit:360s", credits: 664 },
2651
- { identifier: "video-audit:600s", credits: 1075, note: "10-min ceiling" },
2651
+ { identifier: "video-audit:180s", credits: 290 },
2652
+ { identifier: "video-audit:360s", credits: 663 },
2653
+ { identifier: "video-audit:600s", credits: 1073, note: "10-min ceiling" },
2652
2654
  ],
2653
2655
  },
2654
2656
  "video-audit-auto": {
@@ -2660,11 +2662,11 @@ const VIDEO_MODELS: Record<string, ModelCatalogEntry> = {
2660
2662
  description: "Same video-verified audit as AI Audit, but auto-runs a fast analysis first when none is wired in, then applies corrections under guards and returns a disclosed report. Billed per duration bucket.",
2661
2663
  useCases: ["video-audit", "qa", "shot-list", "verification", "auto-analysis"],
2662
2664
  pricing: [
2663
- { identifier: "video-audit:auto", credits: 1924, note: "10-min ceiling (no duration given)" },
2665
+ { identifier: "video-audit:auto", credits: 1921, note: "10-min ceiling (no duration given)" },
2664
2666
  { identifier: "video-audit:auto:60s", credits: 396 },
2665
- { identifier: "video-audit:auto:180s", credits: 477 },
2666
- { identifier: "video-audit:auto:360s", credits: 1180 },
2667
- { identifier: "video-audit:auto:600s", credits: 1924, note: "10-min ceiling" },
2667
+ { identifier: "video-audit:auto:180s", credits: 475 },
2668
+ { identifier: "video-audit:auto:360s", credits: 1178 },
2669
+ { identifier: "video-audit:auto:600s", credits: 1921, note: "10-min ceiling" },
2668
2670
  ],
2669
2671
  },
2670
2672
  }
@@ -85,6 +85,7 @@ export const NODE_MAPPABLE_FIELDS: Readonly<Record<string, readonly string[]>> =
85
85
  "creature": ["creatureName", "description"],
86
86
  "location": ["locationName", "description"],
87
87
  "web-scrape": ["query", "url", "target"],
88
+ "site-capture": ["url"],
88
89
  "meta-ads-scrape": ["query", "pageUrls"],
89
90
  "instagram-scrape": ["targets"],
90
91
  // Content Recipe's material arrives on its `in` wire and the post link on
@@ -43,6 +43,8 @@ export const NODE_RUN_ROUTES: Readonly<Record<string, string>> = Object.freeze({
43
43
  "ugc-clips": "/v1/ugc/clips",
44
44
  "ugc-clip": "/v1/ugc/clip",
45
45
  "ugc-cards": "/v1/ugc/cards",
46
+ // UGC Finish: the finish job over a speech-first video's clips (an English video passes through with no call).
47
+ "ugc-finish-clips": "/v1/ugc/finish",
46
48
  // Every social post node publishes through the one route; the body's
47
49
  // `platform` says where (SOCIAL_POST_NODE_PLATFORM).
48
50
  ...Object.fromEntries([...SOCIAL_POST_NODE_TYPES].map((type) => [type, SOCIAL_PUBLISH_ROUTE])),
@@ -155,6 +155,12 @@ export const EXECUTION_DATA_KEYS: ReadonlySet<string> = new Set([
155
155
  // A fan-out's notes rows, every fan-out's (row-aligned with __listResults):
156
156
  // a row's warnings and length. A RESULT: persisted.
157
157
  "__listResultMeta",
158
+ // A use-case node's continuation of one of its runs (Tighten Episode): set
159
+ // for ONE run only, as that run's input override (an app's or the editor's
160
+ // Render final, the canvas Continue's run option). Never saved — also in
161
+ // TRANSIENT_RUNTIME_KEYS — so a saved one can never turn a later plain run
162
+ // into a continuation of an old run.
163
+ "useCaseContinue",
158
164
  ])
159
165
 
160
166
  /**
@@ -236,6 +242,8 @@ export const TRANSIENT_RUNTIME_KEYS: ReadonlySet<string> = new Set([
236
242
  // body, a Telegram message and its post). Never saved: the workflow is not
237
243
  // where a message's content is kept — runs are, under their retention.
238
244
  "__triggerData",
245
+ // A use-case node's continuation: one run's override, never config (above).
246
+ "useCaseContinue",
239
247
  ])
240
248
 
241
249
  /**
@@ -74,6 +74,36 @@ export const AUTO_ASPECT_AT_RUN_NODE_TYPES: ReadonlySet<string> = new Set([
74
74
  "generate-image",
75
75
  ])
76
76
 
77
+ /**
78
+ * The image nodes whose aspect-ratio dropdown leads with the photo "Auto" tile
79
+ * (Generate Image and Modify Image: `withPhotoAuto` in the editor). On these an
80
+ * UNSET ratio IS Auto — the dropdown shows Auto for it, and both engines send
81
+ * "auto" for it — so what the editor shows is what the run asks for.
82
+ *
83
+ * It used to send nothing, which handed the ratio to the provider's own
84
+ * default (16:9 on nearly every model) while the panel displayed "Auto" or the
85
+ * model's first listed ratio: a 3:4 photo through Modify Image came back 16:9
86
+ * (#2009). "auto" then resolves exactly as a chosen Auto does — natively on a
87
+ * model that lists it, else to the model's ratio nearest the photo, else (no
88
+ * photo) the model's first listed ratio.
89
+ */
90
+ export const PHOTO_AUTO_ASPECT_NODE_TYPES: ReadonlySet<string> = new Set([
91
+ "generate-image",
92
+ "modify-image",
93
+ ])
94
+
95
+ /**
96
+ * The aspect ratio a node asks for: its stored value, or "auto" when it is
97
+ * unset on a photo-Auto node (`PHOTO_AUTO_ASPECT_NODE_TYPES`). Every other node
98
+ * type gets its value back unchanged (undefined stays undefined).
99
+ */
100
+ export function nodeAspectRatio(nodeType: "generate-image" | "modify-image", aspectRatio: unknown): string
101
+ export function nodeAspectRatio(nodeType: string | undefined, aspectRatio: unknown): string | undefined
102
+ export function nodeAspectRatio(nodeType: string | undefined, aspectRatio: unknown): string | undefined {
103
+ if (typeof aspectRatio === "string" && aspectRatio.trim() !== "") return aspectRatio
104
+ return nodeType !== undefined && PHOTO_AUTO_ASPECT_NODE_TYPES.has(nodeType) ? "auto" : undefined
105
+ }
106
+
77
107
  export interface NodeParamAdjustment extends ModelInputAdjustment {
78
108
  nodeId: string
79
109
  provider: string
@@ -158,6 +158,9 @@ const VIDEO_OUTPUT_TYPES = new Set([
158
158
  // audio-only cut still plays in a video element). Asserted in
159
159
  // producer-types.test.ts.
160
160
  ...RENDER_NODE_TYPE_IDS,
161
+ // Tighten Episode: a published app shows the episode as media, never as data
162
+ // (it is not a render, so RENDER_NODE_TYPE_IDS does not bring it).
163
+ "tighten-episode",
161
164
  ])
162
165
 
163
166
  const AUDIO_OUTPUT_TYPES = new Set([
@@ -415,6 +418,8 @@ export const INPUT_FIELD_MAP: Record<string, InputFieldSchema> = {
415
418
  */
416
419
  export const INPUT_FIELD_EXTRA_KEYS: Readonly<Record<string, readonly InputFieldSchema[]>> = {
417
420
  "ugc-creator": [{ key: "gender", type: "select" }, { key: "photoUrl", type: "image-url" }],
421
+ // The script's language: changes together with UGC_OVERRIDABLE_FIELDS["ugc-script"] and UgcScriptData.language.
422
+ "ugc-script": [{ key: "language", type: "select" }],
418
423
  }
419
424
 
420
425
  /** The extra override fields of a node type (none for most types). */
@@ -2,8 +2,9 @@
2
2
  * The preview stop rule (Track A, decided 2026-10-04): a run stops at a
3
3
  * Preview render, and nothing downstream of it runs until Render final.
4
4
  *
5
- * It starts at a render node (`PREVIEW_RENDER_NODE_TYPES`) in either of two
6
- * cases:
5
+ * It starts at a render node (`PREVIEW_RENDER_NODE_TYPES`), or at a use-case
6
+ * node with review on (`REVIEW_HOLDING_USE_CASE_TYPES`, whose own run ends at
7
+ * a Preview), in either of two cases:
7
8
  * - the render EXECUTES in this run and its effective quality, after the
8
9
  * run's input overrides (`withRunOverrides`), is `proxy`;
9
10
  * - the render sits OUTSIDE the run and an item its saved output would hand
@@ -29,6 +30,19 @@ import { RENDER_NODE_TYPE_IDS } from "./render-nodes.js"
29
30
  /** Render nodes a run can stop at: every render in the registry (SV18). */
30
31
  export const PREVIEW_RENDER_NODE_TYPES: ReadonlySet<string> = new Set(RENDER_NODE_TYPE_IDS)
31
32
 
33
+ /**
34
+ * Use-case nodes whose review-on run ends at a Preview of their own: what
35
+ * follows them waits for their Render final, exactly as after a render at
36
+ * Preview. They are not render nodes (`PREVIEW_RENDER_NODE_TYPES` stays the
37
+ * renders), so they join the hold here.
38
+ */
39
+ export const REVIEW_HOLDING_USE_CASE_TYPES: ReadonlySet<string> = new Set(["tighten-episode"])
40
+
41
+ /** A node whose take can be a Preview that holds what follows it. */
42
+ export function isPreviewHoldingType(type: string | null | undefined): boolean {
43
+ return PREVIEW_RENDER_NODE_TYPES.has(type ?? "") || REVIEW_HOLDING_USE_CASE_TYPES.has(type ?? "")
44
+ }
45
+
32
46
  /**
33
47
  * Stable refusal code: a run with nobody to review it (a trigger, an API or
34
48
  * MCP call, a present link, an app run) holds a Preview render. Set the
@@ -42,6 +56,33 @@ export const PREVIEW_REVIEW_REQUIRED = "preview_review_required"
42
56
  */
43
57
  export const PREVIEW_RENDER_NESTED = "preview_render_nested"
44
58
 
59
+ /**
60
+ * The same two refusals when what holds the run is not (only) a render: a
61
+ * use-case node with "Review before render" on. `…_REVIEW_ON`: only such
62
+ * nodes hold it (turn their review off); `…_MIXED`: renders at Preview and
63
+ * such nodes both do. The two codes above stay what a render-held refusal
64
+ * (and every older one) carries. Branch on {@link isPreviewRefusalCode}, never
65
+ * on one code: all six mean "this run stops for a review nobody can give".
66
+ */
67
+ export const PREVIEW_REVIEW_REQUIRED_REVIEW_ON = "preview_review_required_review_on"
68
+ export const PREVIEW_REVIEW_REQUIRED_MIXED = "preview_review_required_mixed"
69
+ export const PREVIEW_RENDER_NESTED_REVIEW_ON = "preview_render_nested_review_on"
70
+ export const PREVIEW_RENDER_NESTED_MIXED = "preview_render_nested_mixed"
71
+
72
+ const PREVIEW_REFUSAL_CODES: ReadonlySet<string> = new Set([
73
+ PREVIEW_REVIEW_REQUIRED,
74
+ PREVIEW_REVIEW_REQUIRED_REVIEW_ON,
75
+ PREVIEW_REVIEW_REQUIRED_MIXED,
76
+ PREVIEW_RENDER_NESTED,
77
+ PREVIEW_RENDER_NESTED_REVIEW_ON,
78
+ PREVIEW_RENDER_NESTED_MIXED,
79
+ ])
80
+
81
+ /** Is `code` a preview refusal — a run that stops for a review nobody can give (any of the six codes)? */
82
+ export function isPreviewRefusalCode(code: unknown): boolean {
83
+ return typeof code === "string" && PREVIEW_REFUSAL_CODES.has(code)
84
+ }
85
+
45
86
  /** A node as the stop rule reads it (either engine's graph, or a saved one). */
46
87
  export interface PreviewGateNode {
47
88
  readonly id: string
@@ -98,9 +139,10 @@ export interface PreviewGateRun {
98
139
  }
99
140
 
100
141
  export interface PreviewStops {
101
- /** Render nodes that execute in this run at Preview quality. */
142
+ /** Render nodes that execute in this run at Preview quality (and review-on use-case nodes). */
102
143
  readonly previewRenderIds: readonly string[]
103
- /** Render nodes outside the run whose saved output hands a Preview on. */
144
+ /** Render nodes outside the run whose saved output hands a Preview on (and
145
+ * review-on use-case nodes whose saved take is a Preview, stamped `proxy`). */
104
146
  readonly savedPreviewRenderIds: readonly string[]
105
147
  /** Every node that would consume a preview: never executed in this run. */
106
148
  readonly gatedNodeIds: ReadonlySet<string>
@@ -113,9 +155,21 @@ const dataOf = (n: PreviewGateNode): Data =>
113
155
 
114
156
  const isPreviewStamp = (stamp: SavedRenderQualityStamp | null | undefined): boolean => stamp?.quality === "proxy"
115
157
 
116
- /** A render node set to Preview: its quality (after any run overrides) is `proxy`. */
158
+ /**
159
+ * A node that renders a Preview in this run: a render node whose quality
160
+ * (after any run overrides) is `proxy`, or a use-case node with review on
161
+ * that does not run as its own Render final — the continuation a Render final
162
+ * sets on it for that run only (`useCaseContinue`, render-final, naming the
163
+ * run it finishes), which renders the final and releases what follows.
164
+ */
117
165
  export function rendersAsPreview(node: PreviewGateNode): boolean {
118
- return PREVIEW_RENDER_NODE_TYPES.has(node.type ?? "") && dataOf(node).quality === "proxy"
166
+ const data = dataOf(node)
167
+ if (REVIEW_HOLDING_USE_CASE_TYPES.has(node.type ?? "")) {
168
+ const cont = data.useCaseContinue as { mode?: unknown; jobId?: unknown } | null | undefined
169
+ const rendersFinal = cont?.mode === "render-final" && typeof cont.jobId === "string"
170
+ return data.reviewBeforeRender === true && !rendersFinal
171
+ }
172
+ return PREVIEW_RENDER_NODE_TYPES.has(node.type ?? "") && data.quality === "proxy"
119
173
  }
120
174
 
121
175
  const TELEPORT_TYPES: ReadonlySet<string> = new Set(["teleport-send", "teleport-receive"])
@@ -200,7 +254,7 @@ export function previewStops(
200
254
  const savedPreviewRenderIds: string[] = []
201
255
  const seeds: string[] = []
202
256
  for (const n of nodes) {
203
- if (!PREVIEW_RENDER_NODE_TYPES.has(n.type ?? "")) continue
257
+ if (!isPreviewHoldingType(n.type)) continue
204
258
  const kids = children.get(n.id) ?? []
205
259
  if (executes(n.id)) {
206
260
  if (!rendersAsPreview(n)) continue
@@ -258,21 +312,45 @@ export const RUN_OVERRIDE_CLEARED_FIELDS = [
258
312
  "generatedText",
259
313
  ] as const
260
314
 
315
+ /**
316
+ * Node fields set for ONE run only, by that run's input override: a use-case
317
+ * node's continuation of an earlier run (`useCaseContinue` — a Render final, a
318
+ * Continue). Never saved (`TRANSIENT_RUNTIME_KEYS`); one found on a saved graph
319
+ * is stale, and every reader ignores it — the server's engine drops it before
320
+ * its override merge, and `withRunOverrides` before its own.
321
+ */
322
+ export const RUN_ONLY_NODE_FIELDS = ["useCaseContinue"] as const
323
+
324
+ /** `data` without its saved run-only fields, or `data` itself when it holds none. */
325
+ function withoutRunOnlyFields(data: Data): Data {
326
+ if (!RUN_ONLY_NODE_FIELDS.some((key) => key in data)) return data
327
+ const kept: Record<string, unknown> = { ...data }
328
+ for (const key of RUN_ONLY_NODE_FIELDS) delete kept[key]
329
+ return kept
330
+ }
331
+
261
332
  /**
262
333
  * The graph a run executes once its input overrides (`{ [nodeId]: fields }`)
263
- * are merged: the same shallow merge as the server's, clearing the overridden
264
- * node's saved results. Never mutates; a node with no override is returned as
265
- * is. Render final is a run with `{ [renderId]: { quality: "final" } }`.
334
+ * are merged: the same merge as the server's — a node's saved run-only fields
335
+ * (`RUN_ONLY_NODE_FIELDS`) dropped first, so only THIS run's override can set
336
+ * one; then the shallow merge, clearing the overridden node's saved results.
337
+ * Never mutates; a node with no override and no saved run-only field is
338
+ * returned as is. Render final is a run with `{ [renderId]: { quality: "final" } }`.
339
+ *
340
+ * Apply it ONCE, to the saved graph: on a graph it already produced it would
341
+ * drop the continuation that run's override set. With no overrides it is the
342
+ * saved graph as a plain run reads it.
266
343
  */
267
344
  export function withRunOverrides<N extends PreviewGateNode>(
268
345
  nodes: readonly N[],
269
346
  overrides: Readonly<Record<string, Readonly<Record<string, unknown>>>> | undefined,
270
347
  ): N[] {
271
- if (!overrides) return [...nodes]
272
348
  return nodes.map((n) => {
273
- const fields = overrides[n.id]
274
- if (!fields) return n
275
- const merged = mergeNodeInputOverrides(n.type ?? undefined, { ...dataOf(n) }, { ...fields })
349
+ const saved = dataOf(n)
350
+ const data = withoutRunOnlyFields(saved)
351
+ const fields = overrides?.[n.id]
352
+ if (!fields) return data === saved ? n : { ...n, data }
353
+ const merged = mergeNodeInputOverrides(n.type ?? undefined, { ...data }, { ...fields })
276
354
  for (const key of RUN_OVERRIDE_CLEARED_FIELDS) delete merged[key]
277
355
  return { ...n, data: merged }
278
356
  })
@@ -108,6 +108,9 @@ export const VIDEO_PRODUCER_TYPES: ReadonlySet<string> = new Set([
108
108
  // UGC Clip: renders one clip of a UGC video from its ticket — emits a video
109
109
  // URL on `video-out` (one per fan-out iteration).
110
110
  "ugc-clip",
111
+ // UGC Finish: the video's clips, finished, as one ordered list — a registered producer, so a
112
+ // Bundle edge into Combine Videos routes each one as a video, in order.
113
+ "ugc-finish-clips",
111
114
  ])
112
115
 
113
116
  /**
@@ -181,6 +184,9 @@ export const DYNAMIC_PRODUCER_TYPES: ReadonlySet<string> = new Set([
181
184
  // voice-changer/dubbing precedent. Asserted in producer-types.test.ts (the
182
185
  // suite does not fail on omission).
183
186
  "apply-edl",
187
+ // Tighten Episode (podcast use-case node): the episode is video OR audio by
188
+ // its `output` setting (an audio recording forces audio) — runtime-decided.
189
+ "tighten-episode",
184
190
  ])
185
191
 
186
192
  /**
@@ -335,12 +341,17 @@ export const FAN_OUT_ALL_OR_NOTHING_TYPES: ReadonlySet<string> = new Set(["ugc-c
335
341
  /**
336
342
  * Nodes whose saved list is the list their last run PRODUCED — `__listResults`
337
343
  * (Extract Field's JSON value on `generatedJson`) — and never a history in
338
- * `generatedResults`: Extract Field and JSON Process. No run of either writes
344
+ * `generatedResults`: Extract Field, JSON Process and Site Capture. No run of the first two writes
339
345
  * one; earlier builds' server runs did (the run's text, the links of a list of
340
346
  * links), and both engines' list readers leave it out for these two (decided
341
347
  * 2026-10-05). Single source of truth for the backend engine and the editor.
342
348
  */
343
- export const OWN_LIST_NODE_TYPES: ReadonlySet<string> = new Set(["extract-field", "json-process"])
349
+ export const OWN_LIST_NODE_TYPES: ReadonlySet<string> = new Set([
350
+ "extract-field",
351
+ "json-process",
352
+ // Site Capture: its stills, in page order — the last capture's, never every capture's (site-capture-node.ts).
353
+ "site-capture",
354
+ ])
344
355
 
345
356
  /** Whether a node's saved list is its own `__listResults`, never a history. */
346
357
  export function ownsItsList(nodeType: string | null | undefined): boolean {
@@ -409,6 +420,9 @@ export const FAN_IN_TARGETS: Readonly<Record<string, "*" | readonly string[]>> =
409
420
  // the union of the clips' spans — the pack's EDLs fold onto its `edl` wire
410
421
  // instead of running one detection job (and one minimum charge) per clip.
411
422
  "speaker-frames": ["edl"],
423
+ // UGC Finish: ONE run over every clip of the video, in clip order — the finish plans its
424
+ // cut and its sound over all of them at once, so it is never run once per clip.
425
+ "ugc-finish-clips": ["clips"],
412
426
  }
413
427
 
414
428
  export function isFanInNodeType(nodeType: string | undefined | null): boolean {
@@ -27,6 +27,25 @@ export const CONTINUATION_NOT_COMPLETED = "continuation_not_completed"
27
27
  * on the execution's output. */
28
28
  export const CONTINUATION_SUBSET_REQUIRED = "continuation_subset_required"
29
29
 
30
+ /** A continue-from-failed run (use-case nodes) needs an execution that ended
31
+ * `failed`: a completed run has nothing to resume, a running one is not over. */
32
+ export const CONTINUATION_NOT_FAILED = "continuation_not_failed"
33
+
34
+ /** A continue-from-failed (use-case nodes) of a run a later continuation of
35
+ * it has superseded — that later one failed too: continue it instead. */
36
+ export const CONTINUATION_SUPERSEDED = "continuation_superseded"
37
+
38
+ /** A continue-from-failed (use-case nodes) of a failed run whose wrapper is not
39
+ * settled yet (its fee not yet refunded): ask again in a moment. A retry
40
+ * answer, not a refusal — outside `RUN_CONTINUATION_CODES`. */
41
+ export const CONTINUATION_SETTLING = "continuation_settling"
42
+
43
+ /** A Render final (use-case nodes) of a preview with the very edit a COMPLETED
44
+ * final of it already rendered (decided 2026-10-13): nothing would change, so
45
+ * nothing runs — the answer names that final. A changed edit renders again. */
46
+ export const RENDER_FINAL_ALREADY_RENDERED = "render_final_already_rendered"
47
+ export const RENDER_FINAL_ALREADY_RENDERED_MESSAGE = "Already rendered with this edit."
48
+
30
49
  /** Every continuation refusal code. */
31
50
  export const RUN_CONTINUATION_CODES = [
32
51
  CONTINUATION_NOT_FOUND,
@@ -34,6 +53,8 @@ export const RUN_CONTINUATION_CODES = [
34
53
  CONTINUATION_VERSION_MISMATCH,
35
54
  CONTINUATION_NOT_COMPLETED,
36
55
  CONTINUATION_SUBSET_REQUIRED,
56
+ CONTINUATION_NOT_FAILED,
57
+ CONTINUATION_SUPERSEDED,
37
58
  ] as const
38
59
 
39
60
  export type RunContinuationCode = (typeof RUN_CONTINUATION_CODES)[number]
@@ -0,0 +1,82 @@
1
+ /**
2
+ * Site Capture node — the wire contract both engines read.
3
+ *
4
+ * The node runs `POST /v1/site-capture` (a web page captured the way a phone
5
+ * shows it: a full-page image, up to 8 section stills in page order, a section
6
+ * map and the page's exact figures) and polls its job. What it hands on is read
7
+ * from that job's output here, once, so the editor and a server run cannot
8
+ * disagree:
9
+ * - `image`: the stills, in page order. The first still is the pip's single
10
+ * value; every still is its list (an "each" wire runs once per still, a
11
+ * Bundle wire takes them all). The full-page image is never one of them.
12
+ * - `json`: the capture's output as the route returns it.
13
+ */
14
+
15
+ export const SITE_CAPTURE_NODE_TYPE = "site-capture" as const
16
+
17
+ /** The stills a capture may return — the route's `maxStills` bounds. */
18
+ export const SITE_CAPTURE_STILLS = { min: 3, max: 8, default: 8 } as const
19
+
20
+ /** A node's `maxStills`, clamped to the route's bounds; anything else is the default. */
21
+ export function siteCaptureMaxStills(value: unknown): number {
22
+ if (typeof value !== "number" || !Number.isFinite(value)) return SITE_CAPTURE_STILLS.default
23
+ return Math.min(SITE_CAPTURE_STILLS.max, Math.max(SITE_CAPTURE_STILLS.min, Math.round(value)))
24
+ }
25
+
26
+ /**
27
+ * The page a run captures: the address typed on the node, else the first web
28
+ * address in the text wired into it (a Text node, a list item), else that
29
+ * text's first word, which the route normalises ("example.com") or refuses.
30
+ */
31
+ export function siteCapturePageUrl(typed: unknown, upstream?: string | null): string {
32
+ const own = typeof typed === "string" ? typed.trim() : ""
33
+ if (own.length > 0) return own
34
+ const text = typeof upstream === "string" ? upstream.trim() : ""
35
+ if (text.length === 0) return ""
36
+ const link = text.match(/https?:\/\/[^\s<>"'`]+/i)
37
+ if (link) return link[0].replace(/[),.;:!?]+$/, "")
38
+ return text.split(/\s+/)[0] ?? ""
39
+ }
40
+
41
+ /** One still of a capture, as its output lists it. */
42
+ export interface SiteCaptureStill {
43
+ readonly url: string
44
+ readonly index: number
45
+ readonly label: string
46
+ readonly category: string
47
+ }
48
+
49
+ /** The stills of a capture's output, in page order; none when it holds none. */
50
+ export function siteCaptureStills(output: unknown): SiteCaptureStill[] {
51
+ if (!output || typeof output !== "object" || Array.isArray(output)) return []
52
+ const raw = (output as { stills?: unknown }).stills
53
+ if (!Array.isArray(raw)) return []
54
+ return raw
55
+ .filter((s): s is Record<string, unknown> => !!s && typeof s === "object" && typeof (s as { url?: unknown }).url === "string" && (s as { url: string }).url.length > 0)
56
+ .map((s, i) => ({
57
+ url: s.url as string,
58
+ index: typeof s.index === "number" ? s.index : i,
59
+ label: typeof s.label === "string" ? s.label : "",
60
+ category: typeof s.category === "string" ? s.category : "other",
61
+ }))
62
+ .sort((a, b) => a.index - b.index)
63
+ }
64
+
65
+ /** The still URLs of a capture's output, in page order. */
66
+ export function siteCaptureStillUrls(output: unknown): string[] {
67
+ return siteCaptureStills(output).map((s) => s.url)
68
+ }
69
+
70
+ /**
71
+ * What a capture hands on: `json` (the output itself), `imageUrl` (the first
72
+ * still) and `listResults` (every still, in page order). Nothing for an output
73
+ * that is not an object.
74
+ */
75
+ export function siteCaptureNodeOutputs(output: unknown): { json?: Record<string, unknown>; imageUrl?: string; listResults?: string[] } {
76
+ if (!output || typeof output !== "object" || Array.isArray(output)) return {}
77
+ const urls = siteCaptureStillUrls(output)
78
+ return {
79
+ json: output as Record<string, unknown>,
80
+ ...(urls.length > 0 ? { imageUrl: urls[0], listResults: urls } : {}),
81
+ }
82
+ }