@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,4284 @@
1
+ import { z } from 'zod';
2
+
3
+ /**
4
+ * Scene3D previsualization — the frozen wire contract (v1).
5
+ *
6
+ * ONE validated `Scene3DPlan` revision is shared by four consumers that must
7
+ * never disagree about what a scene IS: the authoring LLM jobs
8
+ * (`backend/src/routes/3d-scene.ts` + its worker), the browser preview and the
9
+ * frame-deterministic Remotion export (`packages/remotion`), the canvas
10
+ * (`frontend/`), and the SDK/MCP surface. Everything here is STRUCTURE —
11
+ * geometry, timing, identity, validation. No creative prompts, no provider
12
+ * names, no pricing: those live in the backend (see the IP-placement rule in
13
+ * the repo CLAUDE.md — this package is published Apache-2.0 and every
14
+ * published version is an irrevocable grant).
15
+ *
16
+ * ## World conventions (fixed for v1, relied on by the renderer)
17
+ *
18
+ * - Units are METERS, Y is up, right-handed (Three.js default).
19
+ * - Rotations are Euler angles in RADIANS applied XYZ.
20
+ * - Frames are ZERO-BASED; `fps` defaults to 24 at the authoring layer.
21
+ * - Interpolation between keyframes is deterministic and closed-form:
22
+ * `linear` or `easeInOut` (smoothstep). There is no spring, no physics and
23
+ * no randomness — the browser preview and the export MUST agree frame for
24
+ * frame, so nothing here may depend on wall-clock time or a RNG.
25
+ * - A channel's BASE value (the object's/camera's own `position`/`rotation`/
26
+ * `scale`/`target`/`focalLengthMm`) behaves as an implicit keyframe at frame
27
+ * 0. So a track whose first key is at frame 30 INTERPOLATES from the base
28
+ * value at frame 0 to that key — it does not hold the base and then jump.
29
+ * Author a real key at frame 0 when you want a hold. Before frame 0 and
30
+ * after the last key the nearest key's value is held.
31
+ * - `easing` belongs to the DESTINATION keyframe: the easing named on a key
32
+ * governs the segment ENDING at it. The easing on the first key therefore
33
+ * governs base → first key; a key's own easing never affects the segment
34
+ * leaving it.
35
+ * Sampling itself lives with the renderer (`packages/remotion`) — this file
36
+ * only guarantees the data it samples is well-formed.
37
+ *
38
+ * Camera and object RIGS are deliberately absent, and their absence is a
39
+ * decision rather than an unfinished TODO: spline rails, follow-path and
40
+ * track-to constraints, and procedural noise modifiers are authored UPSTREAM
41
+ * (in Blender) and reach this contract already BAKED — v1 as keyframes on the
42
+ * tracks above, v2 as one camera sample per frame. The format carries no
43
+ * constraint or noise vocabulary ON PURPOSE, because evaluating a rig in two
44
+ * different renderers cannot be guaranteed to agree frame for frame, and that
45
+ * agreement is the promise everything else here rests on.
46
+ *
47
+ * ## Revisions
48
+ *
49
+ * A plan is IMMUTABLE. Every accepted edit produces a NEW `revisionId` and
50
+ * records the one it came from in `parentRevisionId`; the input object is
51
+ * never mutated (deep-copied before any write). That is what lets an
52
+ * asynchronous job completion be REJECTED when the canvas has moved on — the
53
+ * completion carries the parent it was computed from.
54
+ */
55
+
56
+ /** Discriminates a Scene3D plan from every other composer plan on the wire. */
57
+ declare const SCENE3D_PLAN_TYPE = "3d-scene";
58
+ /** Bumped only for a BREAKING change to the shape below. */
59
+ declare const SCENE3D_SCHEMA_VERSION = 1;
60
+ /** Frames per second an authoring request gets when it does not say. */
61
+ declare const SCENE3D_DEFAULT_FPS = 24;
62
+ /** Seconds a generate request gets when it does not say. */
63
+ declare const SCENE3D_DEFAULT_DURATION_SECONDS = 4;
64
+ /**
65
+ * Every bound in one object so the route Zod, the canvas inputs, the LLM
66
+ * draft schema and the docs quote the SAME numbers. Widening one of these is
67
+ * a contract change, not a tweak.
68
+ */
69
+ declare const SCENE3D_LIMITS: {
70
+ readonly minDimensionPx: 100;
71
+ /** Applies to BOTH axes, so the worst admissible frame is SQUARE, not merely
72
+ * wider — 2560x2560 is 3.2x the pixels of 1920x1080, and that is the frame
73
+ * this bound was measured at. Raised from 1920 once that cost was measured
74
+ * rather than assumed: on the software GL path a container actually uses,
75
+ * an animated 2560x2560 frame costs ~154 ms/frame against ~65 ms at
76
+ * 1920x1080, so even `maxDurationInFrames` (3600) lands near 9 min against
77
+ * the render worker's 25-minute budget. Peak memory is the real price —
78
+ * ~3.1 GB across the browser process tree versus ~1.6 GB — and is the number
79
+ * to re-measure before widening this again. */
80
+ readonly maxDimensionPx: 2560;
81
+ readonly minFps: 15;
82
+ readonly maxFps: 60;
83
+ readonly minDurationInFrames: 1;
84
+ readonly maxDurationInFrames: 3600;
85
+ /** Shortest scene an authoring request may ask for, in seconds. One second
86
+ * is the frozen v1 floor the SDK/MCP surface and the public docs state; the
87
+ * route Zod and the canvas path both quote it from here so they cannot
88
+ * drift below it. */
89
+ readonly minDurationSeconds: 1;
90
+ /** Hard ceiling on wall-clock length, checked against fps × frames. */
91
+ readonly maxDurationSeconds: 60;
92
+ readonly minObjects: 1;
93
+ readonly maxObjects: 100;
94
+ /** Per-object and per-camera track length. */
95
+ readonly maxKeyframes: 240;
96
+ readonly maxReferences: 8;
97
+ readonly maxOperations: 100;
98
+ /** |x|, |y|, |z| ceiling for positions and camera/target coordinates. */
99
+ readonly maxCoordinate: 1000;
100
+ readonly minSize: 0.001;
101
+ readonly maxSize: 1000;
102
+ readonly minScale: 0.001;
103
+ readonly maxScale: 1000;
104
+ readonly minFocalLengthMm: 10;
105
+ readonly maxFocalLengthMm: 200;
106
+ readonly defaultSensorWidthMm: 36;
107
+ readonly minSensorWidthMm: 1;
108
+ readonly maxSensorWidthMm: 200;
109
+ readonly maxIntensity: 100;
110
+ /** How deep a parent chain may nest. Bounds the renderer's transform walk. */
111
+ readonly maxHierarchyDepth: 8;
112
+ readonly maxIdLength: 64;
113
+ readonly maxNameLength: 120;
114
+ readonly maxUrlLength: 2048;
115
+ readonly maxChangeSummaryLength: 2000;
116
+ };
117
+ type Vec3 = [number, number, number];
118
+ type Scene3DPrimitive = "box" | "sphere" | "cylinder" | "cone" | "plane" | "capsule"
119
+ /** A transform-only node: no geometry of its own, children inherit it. */
120
+ | "group";
121
+ declare const SCENE3D_PRIMITIVES: readonly Scene3DPrimitive[];
122
+ type Scene3DEasing = "linear" | "easeInOut";
123
+ type Scene3DReferenceKind = "image" | "video";
124
+ /**
125
+ * What the reference is FOR. The role is not decoration: it decides how the
126
+ * authoring backend conditions on the asset (appearance → colour/material
127
+ * cues, layout → placement, motion → timing), and it is stored with the job
128
+ * so a re-run reproduces the same conditioning.
129
+ */
130
+ type Scene3DReferenceRole = "appearance" | "layout" | "motion";
131
+ interface Scene3DObjectKeyframe {
132
+ /** Zero-based, integral, inside the scene's duration. */
133
+ frame: number;
134
+ position?: Vec3;
135
+ rotation?: Vec3;
136
+ scale?: Vec3;
137
+ easing?: Scene3DEasing;
138
+ }
139
+ interface Scene3DCameraKeyframe {
140
+ frame: number;
141
+ position?: Vec3;
142
+ target?: Vec3;
143
+ focalLengthMm?: number;
144
+ easing?: Scene3DEasing;
145
+ }
146
+ interface Scene3DObject {
147
+ id: string;
148
+ name: string;
149
+ primitive: Scene3DPrimitive;
150
+ /** Transform parent. Absent = a root object. Cycles are rejected. */
151
+ parentId?: string;
152
+ /** Intrinsic size in meters BEFORE `scale` (width/height/depth). */
153
+ dimensions: Vec3;
154
+ position: Vec3;
155
+ /** Euler XYZ, radians. */
156
+ rotation: Vec3;
157
+ scale: Vec3;
158
+ /** `#rgb`, `#rgba`, `#rrggbb` or `#rrggbbaa`. */
159
+ color: string;
160
+ keyframes?: Scene3DObjectKeyframe[];
161
+ }
162
+ interface Scene3DCamera {
163
+ position: Vec3;
164
+ target: Vec3;
165
+ focalLengthMm: number;
166
+ /** Full-frame 36mm by default; together with focal length it fixes the FOV. */
167
+ sensorWidthMm: number;
168
+ keyframes?: Scene3DCameraKeyframe[];
169
+ }
170
+ interface Scene3DLighting {
171
+ ambientIntensity: number;
172
+ keyIntensity: number;
173
+ keyPosition: Vec3;
174
+ }
175
+ interface Scene3DReference {
176
+ id: string;
177
+ /** HTTP(S) only — the BACKEND additionally applies `safeUrlSchema` and the
178
+ * platform's per-model reference limits before anything is fetched. */
179
+ url: string;
180
+ kind: Scene3DReferenceKind;
181
+ role: Scene3DReferenceRole;
182
+ /** Scopes the reference to one object instead of the whole scene. */
183
+ objectId?: string;
184
+ /** Window inside a video reference, in seconds. */
185
+ startSeconds?: number;
186
+ endSeconds?: number;
187
+ }
188
+ /**
189
+ * The v1 plan. `Scene3DPlan` is the DISCRIMINATED UNION of this and
190
+ * `Scene3DPlanV2` (see `scene3d-v2.ts`) — a consumer holding one must narrow
191
+ * with `isScene3DPlanV1` / `isScene3DPlanV2` before reading version-specific
192
+ * fields. Nothing about v1's shape, bounds or messages changed when v2 landed.
193
+ */
194
+ interface Scene3DPlanV1 {
195
+ planType: typeof SCENE3D_PLAN_TYPE;
196
+ schemaVersion: typeof SCENE3D_SCHEMA_VERSION;
197
+ /** UUID. Changes on EVERY accepted edit. */
198
+ revisionId: string;
199
+ /** The revision this one was derived from; absent on a first generation. */
200
+ parentRevisionId?: string;
201
+ width: number;
202
+ height: number;
203
+ fps: number;
204
+ durationInFrames: number;
205
+ backgroundColor: string;
206
+ camera: Scene3DCamera;
207
+ objects: Scene3DObject[];
208
+ lighting: Scene3DLighting;
209
+ references?: Scene3DReference[];
210
+ }
211
+ declare const vec3Schema: z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>;
212
+ declare const sizeVec3Schema: z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>;
213
+ declare const scaleVec3Schema: z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>;
214
+ /** Euler radians. Bounded well past ±2π so multi-turn spins stay expressible
215
+ * while a runaway value still cannot reach the renderer. */
216
+ declare const rotationVec3Schema: z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>;
217
+ declare const scene3DColorSchema: z.ZodString;
218
+ declare const scene3DIdSchema: z.ZodString;
219
+ /** HTTP(S) only. This is the STRUCTURAL half of URL safety; the backend adds
220
+ * `safeUrlSchema` (SSRF host rules) on top before anything is fetched. */
221
+ declare function isScene3DHttpUrl(value: string): boolean;
222
+ declare const scene3DUrlSchema: z.ZodString;
223
+ declare const scene3DEasingSchema: z.ZodEnum<{
224
+ linear: "linear";
225
+ easeInOut: "easeInOut";
226
+ }>;
227
+ declare const scene3DPrimitiveSchema: z.ZodEnum<{
228
+ group: "group";
229
+ box: "box";
230
+ sphere: "sphere";
231
+ cylinder: "cylinder";
232
+ cone: "cone";
233
+ plane: "plane";
234
+ capsule: "capsule";
235
+ }>;
236
+ declare const scene3DObjectKeyframeSchema: z.ZodObject<{
237
+ frame: z.ZodNumber;
238
+ position: z.ZodOptional<z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>>;
239
+ rotation: z.ZodOptional<z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>>;
240
+ scale: z.ZodOptional<z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>>;
241
+ easing: z.ZodOptional<z.ZodEnum<{
242
+ linear: "linear";
243
+ easeInOut: "easeInOut";
244
+ }>>;
245
+ }, z.core.$strict>;
246
+ declare const scene3DCameraKeyframeSchema: z.ZodObject<{
247
+ frame: z.ZodNumber;
248
+ position: z.ZodOptional<z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>>;
249
+ target: z.ZodOptional<z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>>;
250
+ focalLengthMm: z.ZodOptional<z.ZodNumber>;
251
+ easing: z.ZodOptional<z.ZodEnum<{
252
+ linear: "linear";
253
+ easeInOut: "easeInOut";
254
+ }>>;
255
+ }, z.core.$strict>;
256
+ declare const scene3DObjectSchema: z.ZodObject<{
257
+ id: z.ZodString;
258
+ name: z.ZodString;
259
+ primitive: z.ZodEnum<{
260
+ group: "group";
261
+ box: "box";
262
+ sphere: "sphere";
263
+ cylinder: "cylinder";
264
+ cone: "cone";
265
+ plane: "plane";
266
+ capsule: "capsule";
267
+ }>;
268
+ parentId: z.ZodOptional<z.ZodString>;
269
+ dimensions: z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>;
270
+ position: z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>;
271
+ rotation: z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>;
272
+ scale: z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>;
273
+ color: z.ZodString;
274
+ keyframes: z.ZodOptional<z.ZodArray<z.ZodObject<{
275
+ frame: z.ZodNumber;
276
+ position: z.ZodOptional<z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>>;
277
+ rotation: z.ZodOptional<z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>>;
278
+ scale: z.ZodOptional<z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>>;
279
+ easing: z.ZodOptional<z.ZodEnum<{
280
+ linear: "linear";
281
+ easeInOut: "easeInOut";
282
+ }>>;
283
+ }, z.core.$strict>>>;
284
+ }, z.core.$strict>;
285
+ declare const scene3DCameraSchema: z.ZodObject<{
286
+ position: z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>;
287
+ target: z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>;
288
+ focalLengthMm: z.ZodNumber;
289
+ sensorWidthMm: z.ZodDefault<z.ZodNumber>;
290
+ keyframes: z.ZodOptional<z.ZodArray<z.ZodObject<{
291
+ frame: z.ZodNumber;
292
+ position: z.ZodOptional<z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>>;
293
+ target: z.ZodOptional<z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>>;
294
+ focalLengthMm: z.ZodOptional<z.ZodNumber>;
295
+ easing: z.ZodOptional<z.ZodEnum<{
296
+ linear: "linear";
297
+ easeInOut: "easeInOut";
298
+ }>>;
299
+ }, z.core.$strict>>>;
300
+ }, z.core.$strict>;
301
+ declare const scene3DLightingSchema: z.ZodObject<{
302
+ ambientIntensity: z.ZodNumber;
303
+ keyIntensity: z.ZodNumber;
304
+ keyPosition: z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>;
305
+ }, z.core.$strict>;
306
+ declare const scene3DReferenceSchema: z.ZodObject<{
307
+ id: z.ZodString;
308
+ url: z.ZodString;
309
+ kind: z.ZodEnum<{
310
+ image: "image";
311
+ video: "video";
312
+ }>;
313
+ role: z.ZodEnum<{
314
+ motion: "motion";
315
+ layout: "layout";
316
+ appearance: "appearance";
317
+ }>;
318
+ objectId: z.ZodOptional<z.ZodString>;
319
+ startSeconds: z.ZodOptional<z.ZodNumber>;
320
+ endSeconds: z.ZodOptional<z.ZodNumber>;
321
+ }, z.core.$strict>;
322
+ /** One cross-field failure, in the shape `ctx.addIssue` wants. Shared by the
323
+ * v1 and v2 validators so both report the same way. */
324
+ interface Scene3DSemanticIssue {
325
+ path: (string | number)[];
326
+ message: string;
327
+ }
328
+ /** @internal Historic in-file name. */
329
+ type SemanticIssue = Scene3DSemanticIssue;
330
+ /**
331
+ * Every rule that needs more than one field: duration, identity, hierarchy,
332
+ * reference resolution and keyframe tracks.
333
+ *
334
+ * Split out of the schema's `superRefine` so `applyScene3DEditOperations` can
335
+ * report the SAME sentences without re-parsing, and so a caller holding an
336
+ * already-parsed plan can re-check it cheaply.
337
+ */
338
+ declare function scene3DPlanV1Issues(plan: Scene3DPlanV1): SemanticIssue[];
339
+ /**
340
+ * THE plan validator. Structure first (zod), then the cross-field rules — a
341
+ * consumer that parses with this cannot be handed a cycle, a dangling parent,
342
+ * an out-of-range keyframe or a 90-second "one-minute-max" scene.
343
+ */
344
+ /**
345
+ * The v1 object shape WITHOUT the cross-field pass. Exported only so
346
+ * `scene3DAnyPlanSchema` can discriminate on `schemaVersion` (zod cannot
347
+ * discriminate through a `superRefine`); parse with `scene3DPlanV1Schema`.
348
+ */
349
+ declare const scene3DPlanV1ObjectSchema: z.ZodObject<{
350
+ planType: z.ZodLiteral<"3d-scene">;
351
+ schemaVersion: z.ZodLiteral<1>;
352
+ revisionId: z.ZodUUID;
353
+ parentRevisionId: z.ZodOptional<z.ZodUUID>;
354
+ width: z.ZodNumber;
355
+ height: z.ZodNumber;
356
+ fps: z.ZodNumber;
357
+ durationInFrames: z.ZodNumber;
358
+ backgroundColor: z.ZodString;
359
+ camera: z.ZodObject<{
360
+ position: z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>;
361
+ target: z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>;
362
+ focalLengthMm: z.ZodNumber;
363
+ sensorWidthMm: z.ZodDefault<z.ZodNumber>;
364
+ keyframes: z.ZodOptional<z.ZodArray<z.ZodObject<{
365
+ frame: z.ZodNumber;
366
+ position: z.ZodOptional<z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>>;
367
+ target: z.ZodOptional<z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>>;
368
+ focalLengthMm: z.ZodOptional<z.ZodNumber>;
369
+ easing: z.ZodOptional<z.ZodEnum<{
370
+ linear: "linear";
371
+ easeInOut: "easeInOut";
372
+ }>>;
373
+ }, z.core.$strict>>>;
374
+ }, z.core.$strict>;
375
+ objects: z.ZodArray<z.ZodObject<{
376
+ id: z.ZodString;
377
+ name: z.ZodString;
378
+ primitive: z.ZodEnum<{
379
+ group: "group";
380
+ box: "box";
381
+ sphere: "sphere";
382
+ cylinder: "cylinder";
383
+ cone: "cone";
384
+ plane: "plane";
385
+ capsule: "capsule";
386
+ }>;
387
+ parentId: z.ZodOptional<z.ZodString>;
388
+ dimensions: z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>;
389
+ position: z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>;
390
+ rotation: z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>;
391
+ scale: z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>;
392
+ color: z.ZodString;
393
+ keyframes: z.ZodOptional<z.ZodArray<z.ZodObject<{
394
+ frame: z.ZodNumber;
395
+ position: z.ZodOptional<z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>>;
396
+ rotation: z.ZodOptional<z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>>;
397
+ scale: z.ZodOptional<z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>>;
398
+ easing: z.ZodOptional<z.ZodEnum<{
399
+ linear: "linear";
400
+ easeInOut: "easeInOut";
401
+ }>>;
402
+ }, z.core.$strict>>>;
403
+ }, z.core.$strict>>;
404
+ lighting: z.ZodObject<{
405
+ ambientIntensity: z.ZodNumber;
406
+ keyIntensity: z.ZodNumber;
407
+ keyPosition: z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>;
408
+ }, z.core.$strict>;
409
+ references: z.ZodOptional<z.ZodArray<z.ZodObject<{
410
+ id: z.ZodString;
411
+ url: z.ZodString;
412
+ kind: z.ZodEnum<{
413
+ image: "image";
414
+ video: "video";
415
+ }>;
416
+ role: z.ZodEnum<{
417
+ motion: "motion";
418
+ layout: "layout";
419
+ appearance: "appearance";
420
+ }>;
421
+ objectId: z.ZodOptional<z.ZodString>;
422
+ startSeconds: z.ZodOptional<z.ZodNumber>;
423
+ endSeconds: z.ZodOptional<z.ZodNumber>;
424
+ }, z.core.$strict>>>;
425
+ }, z.core.$strict>;
426
+ declare const scene3DPlanV1Schema: z.ZodObject<{
427
+ planType: z.ZodLiteral<"3d-scene">;
428
+ schemaVersion: z.ZodLiteral<1>;
429
+ revisionId: z.ZodUUID;
430
+ parentRevisionId: z.ZodOptional<z.ZodUUID>;
431
+ width: z.ZodNumber;
432
+ height: z.ZodNumber;
433
+ fps: z.ZodNumber;
434
+ durationInFrames: z.ZodNumber;
435
+ backgroundColor: z.ZodString;
436
+ camera: z.ZodObject<{
437
+ position: z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>;
438
+ target: z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>;
439
+ focalLengthMm: z.ZodNumber;
440
+ sensorWidthMm: z.ZodDefault<z.ZodNumber>;
441
+ keyframes: z.ZodOptional<z.ZodArray<z.ZodObject<{
442
+ frame: z.ZodNumber;
443
+ position: z.ZodOptional<z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>>;
444
+ target: z.ZodOptional<z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>>;
445
+ focalLengthMm: z.ZodOptional<z.ZodNumber>;
446
+ easing: z.ZodOptional<z.ZodEnum<{
447
+ linear: "linear";
448
+ easeInOut: "easeInOut";
449
+ }>>;
450
+ }, z.core.$strict>>>;
451
+ }, z.core.$strict>;
452
+ objects: z.ZodArray<z.ZodObject<{
453
+ id: z.ZodString;
454
+ name: z.ZodString;
455
+ primitive: z.ZodEnum<{
456
+ group: "group";
457
+ box: "box";
458
+ sphere: "sphere";
459
+ cylinder: "cylinder";
460
+ cone: "cone";
461
+ plane: "plane";
462
+ capsule: "capsule";
463
+ }>;
464
+ parentId: z.ZodOptional<z.ZodString>;
465
+ dimensions: z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>;
466
+ position: z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>;
467
+ rotation: z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>;
468
+ scale: z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>;
469
+ color: z.ZodString;
470
+ keyframes: z.ZodOptional<z.ZodArray<z.ZodObject<{
471
+ frame: z.ZodNumber;
472
+ position: z.ZodOptional<z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>>;
473
+ rotation: z.ZodOptional<z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>>;
474
+ scale: z.ZodOptional<z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>>;
475
+ easing: z.ZodOptional<z.ZodEnum<{
476
+ linear: "linear";
477
+ easeInOut: "easeInOut";
478
+ }>>;
479
+ }, z.core.$strict>>>;
480
+ }, z.core.$strict>>;
481
+ lighting: z.ZodObject<{
482
+ ambientIntensity: z.ZodNumber;
483
+ keyIntensity: z.ZodNumber;
484
+ keyPosition: z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>;
485
+ }, z.core.$strict>;
486
+ references: z.ZodOptional<z.ZodArray<z.ZodObject<{
487
+ id: z.ZodString;
488
+ url: z.ZodString;
489
+ kind: z.ZodEnum<{
490
+ image: "image";
491
+ video: "video";
492
+ }>;
493
+ role: z.ZodEnum<{
494
+ motion: "motion";
495
+ layout: "layout";
496
+ appearance: "appearance";
497
+ }>;
498
+ objectId: z.ZodOptional<z.ZodString>;
499
+ startSeconds: z.ZodOptional<z.ZodNumber>;
500
+ endSeconds: z.ZodOptional<z.ZodNumber>;
501
+ }, z.core.$strict>>>;
502
+ }, z.core.$strict>;
503
+ /** @deprecated v1-only, and it always was. Kept so every existing v1 call site
504
+ * keeps EXACTLY its current accept/reject set. Use `scene3DPlanV1Schema` for
505
+ * v1, or `scene3DAnyPlanSchema` when either version is acceptable. */
506
+ declare const scene3DPlanSchema: z.ZodObject<{
507
+ planType: z.ZodLiteral<"3d-scene">;
508
+ schemaVersion: z.ZodLiteral<1>;
509
+ revisionId: z.ZodUUID;
510
+ parentRevisionId: z.ZodOptional<z.ZodUUID>;
511
+ width: z.ZodNumber;
512
+ height: z.ZodNumber;
513
+ fps: z.ZodNumber;
514
+ durationInFrames: z.ZodNumber;
515
+ backgroundColor: z.ZodString;
516
+ camera: z.ZodObject<{
517
+ position: z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>;
518
+ target: z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>;
519
+ focalLengthMm: z.ZodNumber;
520
+ sensorWidthMm: z.ZodDefault<z.ZodNumber>;
521
+ keyframes: z.ZodOptional<z.ZodArray<z.ZodObject<{
522
+ frame: z.ZodNumber;
523
+ position: z.ZodOptional<z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>>;
524
+ target: z.ZodOptional<z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>>;
525
+ focalLengthMm: z.ZodOptional<z.ZodNumber>;
526
+ easing: z.ZodOptional<z.ZodEnum<{
527
+ linear: "linear";
528
+ easeInOut: "easeInOut";
529
+ }>>;
530
+ }, z.core.$strict>>>;
531
+ }, z.core.$strict>;
532
+ objects: z.ZodArray<z.ZodObject<{
533
+ id: z.ZodString;
534
+ name: z.ZodString;
535
+ primitive: z.ZodEnum<{
536
+ group: "group";
537
+ box: "box";
538
+ sphere: "sphere";
539
+ cylinder: "cylinder";
540
+ cone: "cone";
541
+ plane: "plane";
542
+ capsule: "capsule";
543
+ }>;
544
+ parentId: z.ZodOptional<z.ZodString>;
545
+ dimensions: z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>;
546
+ position: z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>;
547
+ rotation: z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>;
548
+ scale: z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>;
549
+ color: z.ZodString;
550
+ keyframes: z.ZodOptional<z.ZodArray<z.ZodObject<{
551
+ frame: z.ZodNumber;
552
+ position: z.ZodOptional<z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>>;
553
+ rotation: z.ZodOptional<z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>>;
554
+ scale: z.ZodOptional<z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>>;
555
+ easing: z.ZodOptional<z.ZodEnum<{
556
+ linear: "linear";
557
+ easeInOut: "easeInOut";
558
+ }>>;
559
+ }, z.core.$strict>>>;
560
+ }, z.core.$strict>>;
561
+ lighting: z.ZodObject<{
562
+ ambientIntensity: z.ZodNumber;
563
+ keyIntensity: z.ZodNumber;
564
+ keyPosition: z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>;
565
+ }, z.core.$strict>;
566
+ references: z.ZodOptional<z.ZodArray<z.ZodObject<{
567
+ id: z.ZodString;
568
+ url: z.ZodString;
569
+ kind: z.ZodEnum<{
570
+ image: "image";
571
+ video: "video";
572
+ }>;
573
+ role: z.ZodEnum<{
574
+ motion: "motion";
575
+ layout: "layout";
576
+ appearance: "appearance";
577
+ }>;
578
+ objectId: z.ZodOptional<z.ZodString>;
579
+ startSeconds: z.ZodOptional<z.ZodNumber>;
580
+ endSeconds: z.ZodOptional<z.ZodNumber>;
581
+ }, z.core.$strict>>>;
582
+ }, z.core.$strict>;
583
+ /** @deprecated Renamed to `scene3DPlanV1Issues`. */
584
+ declare const scene3DPlanIssues: typeof scene3DPlanV1Issues;
585
+ /** Order-insensitive deep equality over the JSON subset a plan is made of. */
586
+ declare function scene3DDeepEqual(a: unknown, b: unknown): boolean;
587
+ /** RFC-4122 v4 id, from the platform CSPRNG where there is one. Browser,
588
+ * Node 18+ and the Remotion renderer all expose `globalThis.crypto`. */
589
+ declare function newScene3DRevisionId(): string;
590
+ /** Narrowing helper for callers holding `unknown` (job output, workflow JSON).
591
+ * V1 ONLY — `isScene3DPlan` (in `scene3d-v2.ts`) accepts either version. */
592
+ declare function isScene3DPlanV1(value: unknown): value is Scene3DPlanV1;
593
+ /** What a finished `generate-3d-scene` / `edit-3d-scene` job carries in
594
+ * `output_data`. The canvas, the SDK and the DAG output extractor all read
595
+ * THIS shape — `scenePlan` is also the node's stored plan field. */
596
+ interface Scene3DJobOutput {
597
+ scenePlan: Scene3DPlanV1;
598
+ /** One paragraph naming what changed. Absent on a first generation. */
599
+ changeSummary?: string;
600
+ }
601
+ /** The node data field a Scene3D plan is stored under, on both nodes.
602
+ * `COMPOSER_PLAN_MAP` (model-constants.ts) must agree with this. */
603
+ declare const SCENE3D_PLAN_FIELD = "scenePlan";
604
+ /** The two canvas node types that produce a Scene3D plan. */
605
+ declare const SCENE3D_GENERATE_NODE_TYPE = "generate-3d-scene";
606
+ declare const SCENE3D_EDIT_NODE_TYPE = "edit-3d-scene";
607
+
608
+ /**
609
+ * Scene3D edit operations — the ONLY way a Scene3D plan changes.
610
+ *
611
+ * Split out of `scene3d.ts` (which owns the shape) because this file owns the
612
+ * TRANSITION: given a plan, a list of operations and the caller's locks, it
613
+ * produces the next immutable revision or an explained refusal. Both edit
614
+ * lanes go through it — the deterministic one (the caller sent operations) and
615
+ * the instruction one (an LLM authored the operations from a sentence) — so
616
+ * locks, staleness and whole-scene validation cannot be enforced twice and
617
+ * differently. The model never writes a plan and never writes code; it writes
618
+ * operations that this function is free to refuse.
619
+ */
620
+
621
+ /** Everything about an object EXCEPT its identity. `id` is deliberately absent
622
+ * (and the schema is strict) so no operation can rename an object out from
623
+ * under a lock, a parent link or a reference. */
624
+ declare const scene3DObjectChangesSchema: z.ZodObject<{
625
+ name: z.ZodOptional<z.ZodString>;
626
+ primitive: z.ZodOptional<z.ZodEnum<{
627
+ group: "group";
628
+ box: "box";
629
+ sphere: "sphere";
630
+ cylinder: "cylinder";
631
+ cone: "cone";
632
+ plane: "plane";
633
+ capsule: "capsule";
634
+ }>>;
635
+ parentId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
636
+ dimensions: z.ZodOptional<z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>>;
637
+ position: z.ZodOptional<z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>>;
638
+ rotation: z.ZodOptional<z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>>;
639
+ scale: z.ZodOptional<z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>>;
640
+ color: z.ZodOptional<z.ZodString>;
641
+ keyframes: z.ZodOptional<z.ZodArray<z.ZodObject<{
642
+ frame: z.ZodNumber;
643
+ position: z.ZodOptional<z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>>;
644
+ rotation: z.ZodOptional<z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>>;
645
+ scale: z.ZodOptional<z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>>;
646
+ easing: z.ZodOptional<z.ZodEnum<{
647
+ linear: "linear";
648
+ easeInOut: "easeInOut";
649
+ }>>;
650
+ }, z.core.$strict>>>;
651
+ }, z.core.$strict>;
652
+ declare const scene3DCameraChangesSchema: z.ZodObject<{
653
+ position: z.ZodOptional<z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>>;
654
+ target: z.ZodOptional<z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>>;
655
+ focalLengthMm: z.ZodOptional<z.ZodNumber>;
656
+ sensorWidthMm: z.ZodOptional<z.ZodNumber>;
657
+ keyframes: z.ZodOptional<z.ZodArray<z.ZodObject<{
658
+ frame: z.ZodNumber;
659
+ position: z.ZodOptional<z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>>;
660
+ target: z.ZodOptional<z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>>;
661
+ focalLengthMm: z.ZodOptional<z.ZodNumber>;
662
+ easing: z.ZodOptional<z.ZodEnum<{
663
+ linear: "linear";
664
+ easeInOut: "easeInOut";
665
+ }>>;
666
+ }, z.core.$strict>>>;
667
+ }, z.core.$strict>;
668
+ declare const scene3DLightingChangesSchema: z.ZodObject<{
669
+ ambientIntensity: z.ZodOptional<z.ZodNumber>;
670
+ keyIntensity: z.ZodOptional<z.ZodNumber>;
671
+ keyPosition: z.ZodOptional<z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>>;
672
+ }, z.core.$strict>;
673
+ declare const scene3DEditOperationSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
674
+ op: z.ZodLiteral<"set-object">;
675
+ objectId: z.ZodString;
676
+ changes: z.ZodObject<{
677
+ name: z.ZodOptional<z.ZodString>;
678
+ primitive: z.ZodOptional<z.ZodEnum<{
679
+ group: "group";
680
+ box: "box";
681
+ sphere: "sphere";
682
+ cylinder: "cylinder";
683
+ cone: "cone";
684
+ plane: "plane";
685
+ capsule: "capsule";
686
+ }>>;
687
+ parentId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
688
+ dimensions: z.ZodOptional<z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>>;
689
+ position: z.ZodOptional<z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>>;
690
+ rotation: z.ZodOptional<z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>>;
691
+ scale: z.ZodOptional<z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>>;
692
+ color: z.ZodOptional<z.ZodString>;
693
+ keyframes: z.ZodOptional<z.ZodArray<z.ZodObject<{
694
+ frame: z.ZodNumber;
695
+ position: z.ZodOptional<z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>>;
696
+ rotation: z.ZodOptional<z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>>;
697
+ scale: z.ZodOptional<z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>>;
698
+ easing: z.ZodOptional<z.ZodEnum<{
699
+ linear: "linear";
700
+ easeInOut: "easeInOut";
701
+ }>>;
702
+ }, z.core.$strict>>>;
703
+ }, z.core.$strict>;
704
+ }, z.core.$strict>, z.ZodObject<{
705
+ op: z.ZodLiteral<"add-object">;
706
+ object: z.ZodObject<{
707
+ id: z.ZodString;
708
+ name: z.ZodString;
709
+ primitive: z.ZodEnum<{
710
+ group: "group";
711
+ box: "box";
712
+ sphere: "sphere";
713
+ cylinder: "cylinder";
714
+ cone: "cone";
715
+ plane: "plane";
716
+ capsule: "capsule";
717
+ }>;
718
+ parentId: z.ZodOptional<z.ZodString>;
719
+ dimensions: z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>;
720
+ position: z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>;
721
+ rotation: z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>;
722
+ scale: z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>;
723
+ color: z.ZodString;
724
+ keyframes: z.ZodOptional<z.ZodArray<z.ZodObject<{
725
+ frame: z.ZodNumber;
726
+ position: z.ZodOptional<z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>>;
727
+ rotation: z.ZodOptional<z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>>;
728
+ scale: z.ZodOptional<z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>>;
729
+ easing: z.ZodOptional<z.ZodEnum<{
730
+ linear: "linear";
731
+ easeInOut: "easeInOut";
732
+ }>>;
733
+ }, z.core.$strict>>>;
734
+ }, z.core.$strict>;
735
+ }, z.core.$strict>, z.ZodObject<{
736
+ op: z.ZodLiteral<"remove-object">;
737
+ objectId: z.ZodString;
738
+ }, z.core.$strict>, z.ZodObject<{
739
+ op: z.ZodLiteral<"set-camera">;
740
+ changes: z.ZodObject<{
741
+ position: z.ZodOptional<z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>>;
742
+ target: z.ZodOptional<z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>>;
743
+ focalLengthMm: z.ZodOptional<z.ZodNumber>;
744
+ sensorWidthMm: z.ZodOptional<z.ZodNumber>;
745
+ keyframes: z.ZodOptional<z.ZodArray<z.ZodObject<{
746
+ frame: z.ZodNumber;
747
+ position: z.ZodOptional<z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>>;
748
+ target: z.ZodOptional<z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>>;
749
+ focalLengthMm: z.ZodOptional<z.ZodNumber>;
750
+ easing: z.ZodOptional<z.ZodEnum<{
751
+ linear: "linear";
752
+ easeInOut: "easeInOut";
753
+ }>>;
754
+ }, z.core.$strict>>>;
755
+ }, z.core.$strict>;
756
+ }, z.core.$strict>, z.ZodObject<{
757
+ op: z.ZodLiteral<"set-lighting">;
758
+ changes: z.ZodObject<{
759
+ ambientIntensity: z.ZodOptional<z.ZodNumber>;
760
+ keyIntensity: z.ZodOptional<z.ZodNumber>;
761
+ keyPosition: z.ZodOptional<z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>>;
762
+ }, z.core.$strict>;
763
+ }, z.core.$strict>, z.ZodObject<{
764
+ op: z.ZodLiteral<"set-background">;
765
+ color: z.ZodString;
766
+ }, z.core.$strict>], "op">;
767
+ declare const scene3DEditOperationsSchema: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
768
+ op: z.ZodLiteral<"set-object">;
769
+ objectId: z.ZodString;
770
+ changes: z.ZodObject<{
771
+ name: z.ZodOptional<z.ZodString>;
772
+ primitive: z.ZodOptional<z.ZodEnum<{
773
+ group: "group";
774
+ box: "box";
775
+ sphere: "sphere";
776
+ cylinder: "cylinder";
777
+ cone: "cone";
778
+ plane: "plane";
779
+ capsule: "capsule";
780
+ }>>;
781
+ parentId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
782
+ dimensions: z.ZodOptional<z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>>;
783
+ position: z.ZodOptional<z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>>;
784
+ rotation: z.ZodOptional<z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>>;
785
+ scale: z.ZodOptional<z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>>;
786
+ color: z.ZodOptional<z.ZodString>;
787
+ keyframes: z.ZodOptional<z.ZodArray<z.ZodObject<{
788
+ frame: z.ZodNumber;
789
+ position: z.ZodOptional<z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>>;
790
+ rotation: z.ZodOptional<z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>>;
791
+ scale: z.ZodOptional<z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>>;
792
+ easing: z.ZodOptional<z.ZodEnum<{
793
+ linear: "linear";
794
+ easeInOut: "easeInOut";
795
+ }>>;
796
+ }, z.core.$strict>>>;
797
+ }, z.core.$strict>;
798
+ }, z.core.$strict>, z.ZodObject<{
799
+ op: z.ZodLiteral<"add-object">;
800
+ object: z.ZodObject<{
801
+ id: z.ZodString;
802
+ name: z.ZodString;
803
+ primitive: z.ZodEnum<{
804
+ group: "group";
805
+ box: "box";
806
+ sphere: "sphere";
807
+ cylinder: "cylinder";
808
+ cone: "cone";
809
+ plane: "plane";
810
+ capsule: "capsule";
811
+ }>;
812
+ parentId: z.ZodOptional<z.ZodString>;
813
+ dimensions: z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>;
814
+ position: z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>;
815
+ rotation: z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>;
816
+ scale: z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>;
817
+ color: z.ZodString;
818
+ keyframes: z.ZodOptional<z.ZodArray<z.ZodObject<{
819
+ frame: z.ZodNumber;
820
+ position: z.ZodOptional<z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>>;
821
+ rotation: z.ZodOptional<z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>>;
822
+ scale: z.ZodOptional<z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>>;
823
+ easing: z.ZodOptional<z.ZodEnum<{
824
+ linear: "linear";
825
+ easeInOut: "easeInOut";
826
+ }>>;
827
+ }, z.core.$strict>>>;
828
+ }, z.core.$strict>;
829
+ }, z.core.$strict>, z.ZodObject<{
830
+ op: z.ZodLiteral<"remove-object">;
831
+ objectId: z.ZodString;
832
+ }, z.core.$strict>, z.ZodObject<{
833
+ op: z.ZodLiteral<"set-camera">;
834
+ changes: z.ZodObject<{
835
+ position: z.ZodOptional<z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>>;
836
+ target: z.ZodOptional<z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>>;
837
+ focalLengthMm: z.ZodOptional<z.ZodNumber>;
838
+ sensorWidthMm: z.ZodOptional<z.ZodNumber>;
839
+ keyframes: z.ZodOptional<z.ZodArray<z.ZodObject<{
840
+ frame: z.ZodNumber;
841
+ position: z.ZodOptional<z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>>;
842
+ target: z.ZodOptional<z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>>;
843
+ focalLengthMm: z.ZodOptional<z.ZodNumber>;
844
+ easing: z.ZodOptional<z.ZodEnum<{
845
+ linear: "linear";
846
+ easeInOut: "easeInOut";
847
+ }>>;
848
+ }, z.core.$strict>>>;
849
+ }, z.core.$strict>;
850
+ }, z.core.$strict>, z.ZodObject<{
851
+ op: z.ZodLiteral<"set-lighting">;
852
+ changes: z.ZodObject<{
853
+ ambientIntensity: z.ZodOptional<z.ZodNumber>;
854
+ keyIntensity: z.ZodOptional<z.ZodNumber>;
855
+ keyPosition: z.ZodOptional<z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>>;
856
+ }, z.core.$strict>;
857
+ }, z.core.$strict>, z.ZodObject<{
858
+ op: z.ZodLiteral<"set-background">;
859
+ color: z.ZodString;
860
+ }, z.core.$strict>], "op">>;
861
+ type Scene3DObjectChanges = z.infer<typeof scene3DObjectChangesSchema>;
862
+ type Scene3DCameraChanges = z.infer<typeof scene3DCameraChangesSchema>;
863
+ type Scene3DLightingChanges = z.infer<typeof scene3DLightingChangesSchema>;
864
+ type Scene3DEditOperation = z.infer<typeof scene3DEditOperationSchema>;
865
+ type Scene3DEditErrorCode =
866
+ /** `expectedRevisionId` did not match the plan handed in. */
867
+ "stale_revision"
868
+ /** The operation list itself is malformed or over the cap. */
869
+ | "invalid_operations"
870
+ /** An operation targets an object that is not in the scene. */
871
+ | "unknown_object"
872
+ /** `add-object` collided with an existing id. */
873
+ | "duplicate_object"
874
+ /** An operation touched an id the caller declared locked. */
875
+ | "locked_object"
876
+ /** The plan handed in, or the plan the operations produced, is invalid. */
877
+ | "invalid_plan";
878
+ interface Scene3DEditOptions {
879
+ /** Optimistic concurrency: reject unless the plan is still this revision. */
880
+ expectedRevisionId?: string;
881
+ /** Object ids the caller declared untouchable. Enforced as a POST-condition
882
+ * (see `applyScene3DEditOperations`), which is what makes it total. */
883
+ lockedObjectIds?: readonly string[];
884
+ /** Pin the produced revision id — tests and deterministic replay only. */
885
+ revisionId?: string;
886
+ }
887
+ type Scene3DEditResult = {
888
+ ok: true;
889
+ plan: Scene3DPlanV1;
890
+ changedObjectIds: string[];
891
+ changeSummary: string;
892
+ } | {
893
+ ok: false;
894
+ code: Scene3DEditErrorCode;
895
+ message: string;
896
+ operationIndex?: number;
897
+ };
898
+ /** One human sentence per operation — the deterministic lane's answer to the
899
+ * LLM lane's `changeSummary`, so both edit paths return the same shape. */
900
+ declare function summarizeScene3DOperations(operations: readonly Scene3DEditOperation[]): string;
901
+ /**
902
+ * Apply an operation list to a plan, producing a NEW revision.
903
+ *
904
+ * Guarantees, in this order — each one is a distinct failure mode that was
905
+ * cheap to get wrong:
906
+ *
907
+ * 1. The input plan is never mutated (deep clone before the first write).
908
+ * 2. A stale `expectedRevisionId` is refused before anything is applied, so a
909
+ * late async completion can never overwrite a newer manual edit.
910
+ * 3. Operations are schema-validated as a list; the failing INDEX is reported.
911
+ * 4. Locks are enforced as a POST-CONDITION — every locked object must still
912
+ * exist and be deep-equal to the original. Reasoning per-operation would
913
+ * have to anticipate remove + re-add, a reparent from a sibling's `set-
914
+ * object`, and whatever the next operation kind turns out to be; the
915
+ * post-condition covers all of them by construction. (`selectedObjectIds`
916
+ * is CONTEXT for the model, never permission — the caller passes locks
917
+ * explicitly and they are checked here, after the model has spoken.)
918
+ * 5. The WHOLE resulting plan is re-validated, which is what makes "no silent
919
+ * orphaning" free: removing a parent leaves a dangling `parentId` and the
920
+ * plan validator rejects it, as does removing an object a reference points
921
+ * at.
922
+ */
923
+ declare function applyScene3DEditOperations(plan: Scene3DPlanV1, operations: readonly Scene3DEditOperation[] | unknown, options?: Scene3DEditOptions): Scene3DEditResult;
924
+
925
+ /**
926
+ * Scene3D v2 — the PUBLIC wire contract for exported (GLB-backed) scenes.
927
+ *
928
+ * One Scene3D family, two schema versions. `Scene3DPlan` is the discriminated
929
+ * union `Scene3DPlanV1 | Scene3DPlanV2`, keyed on `schemaVersion`; v1 (see
930
+ * `scene3d.ts`) is untouched — same fields, same bounds, same messages — and a
931
+ * default v1 authoring request must never come back as v2.
932
+ *
933
+ * What v2 adds over v1's inline primitives:
934
+ *
935
+ * - **Assets.** Geometry lives in GLB files referenced by opaque id + SHA-256
936
+ * digest, never by an expiring URL. The camera lives in a sidecar
937
+ * (`scene3d-camera-track.ts`), one sample per frame, so a 720-frame baked
938
+ * move is not squeezed through v1's 240-keyframe budget.
939
+ * - **Semantic entities.** A user-selectable object or assembly — a person, a
940
+ * car, a prop, an environment — not every mesh in the export. Entities carry
941
+ * stable ids, anchors, identity colour and material-role bindings, so
942
+ * recolouring a person cannot recolour its chair.
943
+ * - **Shots.** Explicit contiguous integer ranges covering the whole timeline,
944
+ * with hard cuts. Interpolation never spans a cut.
945
+ * - **Overlays.** Deterministic entity/camera overrides applied over immutable
946
+ * baked bytes, in a fixed order, so a rebuild cannot silently drop a manual
947
+ * edit.
948
+ * - **Provenance.** Which engine/compiler/exporter/renderer produced this, and
949
+ * the canonical content hash of the revision.
950
+ *
951
+ * This file is STRUCTURE ONLY: shapes, bounds, cross-references. How a scene is
952
+ * authored, how a camera move is solved and what any of it costs are not part
953
+ * of the published contract and are not here.
954
+ *
955
+ * It owns the VOCABULARY — constants, types and per-component schemas. The
956
+ * whole-plan schema and every cross-field rule live in `scene3d-v2-plan.ts`,
957
+ * which builds on this; the dense camera sidecar lives in
958
+ * `scene3d-camera-track.ts`. Consumers import all three from the package root.
959
+ *
960
+ * ## World conventions (identical to v1, and now stated on the wire)
961
+ *
962
+ * Meters, Y up, right-handed, zero-based frames. `units`/`upAxis`/`handedness`
963
+ * are required literals so a reader can refuse a manifest that assumes anything
964
+ * else instead of quietly rendering a Z-up scene on its side. Conversion from
965
+ * the authoring package's basis happens exactly once, at export: a GLB that is
966
+ * already Y-up must not be rotated again, and the renderer must not replace an
967
+ * exported camera quaternion with a `lookAt()`.
968
+ */
969
+
970
+ /** The v2 discriminator value. v1's `SCENE3D_SCHEMA_VERSION` is unchanged. */
971
+ declare const SCENE3D_SCHEMA_VERSION_V2 = 2;
972
+ /** Every version this package can parse AND validate. An SDK consumer checks a
973
+ * plan against this BEFORE trying to render one it cannot understand. */
974
+ declare const SCENE3D_SUPPORTED_SCHEMA_VERSIONS: readonly [1, 2];
975
+ type Scene3DSupportedSchemaVersion = (typeof SCENE3D_SUPPORTED_SCHEMA_VERSIONS)[number];
976
+ /** Authoring engines a v2 manifest may name. Open-ended on the wire (the field
977
+ * is a bounded slug) so a new engine does not need a package release; this
978
+ * list is what the current platform ships. */
979
+ declare const SCENE3D_V2_ENGINES: readonly ["blender-cloud", "blender-local"];
980
+ type Scene3DKnownEngine = (typeof SCENE3D_V2_ENGINES)[number];
981
+ /**
982
+ * Admission bounds for v2. Server-configured ceilings are returned in
983
+ * capabilities; these are the contract's hard maxima, quoted by the route Zod,
984
+ * the builder, the renderer and the docs so they cannot drift apart.
985
+ *
986
+ * v1's `SCENE3D_LIMITS` is NOT changed by any of this — "raise maxObjects" was
987
+ * never the v2 design.
988
+ */
989
+ declare const SCENE3D_V2_LIMITS: {
990
+ /** Both the seconds and the frame ceiling apply; neither waives the other. */
991
+ readonly maxDurationSeconds: 60;
992
+ readonly minDurationInFrames: 1;
993
+ readonly maxDurationInFrames: 3600;
994
+ readonly minFps: 15;
995
+ readonly maxFps: 60;
996
+ readonly defaultFps: 24;
997
+ /** Even integers only — an odd axis breaks H.264 chroma subsampling. */
998
+ readonly minDimensionPx: 100;
999
+ /** Deliberately kept equal to v1's `SCENE3D_LIMITS.maxDimensionPx`: one
1000
+ * renderer draws both versions, so one measured ceiling bounds both. */
1001
+ readonly maxDimensionPx: 2560;
1002
+ readonly minEntities: 1;
1003
+ /** SEMANTIC entities, not exported mesh nodes. */
1004
+ readonly maxEntities: 100;
1005
+ /** Enforced during asset normalization, after decode — see
1006
+ * `scene3DV2NormalizationIssues` in `scene3d-v2-resources.ts`. */
1007
+ readonly maxMeshNodes: 2000;
1008
+ readonly maxTriangles: 200000;
1009
+ readonly maxHierarchyDepth: 16;
1010
+ /** Decoded manifest JSON. Measured on the bytes, before `JSON.parse`. */
1011
+ readonly maxManifestBytes: number;
1012
+ /** Decoded camera-track JSON. */
1013
+ readonly maxCameraTrackBytes: number;
1014
+ /** Total DECLARED bytes of the assets the renderer downloads. Compression
1015
+ * does not waive the decoded geometry limits above. */
1016
+ readonly maxRendererAssetBytes: number;
1017
+ /** A `blend-source` is a separately authorized download, never handed to the
1018
+ * browser renderer, and therefore not part of the renderer budget. */
1019
+ readonly maxBlendSourceBytes: number;
1020
+ readonly maxAssets: 64;
1021
+ readonly maxShots: 32;
1022
+ readonly maxShotEntityIds: 16;
1023
+ /** v1's reference limit, unchanged until deliberately expanded. */
1024
+ readonly maxReferences: 8;
1025
+ readonly maxAnchorsPerEntity: 32;
1026
+ readonly maxMaterialBindingsPerEntity: 16;
1027
+ readonly maxOverrides: 200;
1028
+ readonly minPosterDimensionPx: 16;
1029
+ readonly maxPosterDimensionPx: 4096;
1030
+ readonly maxIdLength: 64;
1031
+ readonly maxAssetIdLength: 128;
1032
+ readonly maxNodeIdLength: 128;
1033
+ readonly maxNodeNameLength: 256;
1034
+ readonly maxNameLength: 120;
1035
+ readonly maxLabelLength: 120;
1036
+ readonly maxMaterialNameLength: 120;
1037
+ readonly maxVersionLength: 64;
1038
+ readonly maxCoordinate: 1000;
1039
+ readonly minSize: 0.001;
1040
+ readonly maxSize: 1000;
1041
+ readonly maxIntensity: 100;
1042
+ };
1043
+ /** The overlay operation vocabulary this package understands. An override
1044
+ * written by a NEWER writer is rejected with an explicit message rather than
1045
+ * silently skipped — a dropped edit is worse than a refused manifest. */
1046
+ declare const SCENE3D_V2_OVERRIDE_OPERATION_VERSION = 1;
1047
+ /**
1048
+ * The GLB `extras` keys the exporter writes and the importer reads. Blender
1049
+ * display names and array indices are NOT durable identifiers: a re-export
1050
+ * renames `Cube.003` and reorders children, and a hit-test would then select a
1051
+ * different entity. Both ends import these constants — never the literals.
1052
+ */
1053
+ declare const SCENE3D_GLB_EXTRAS_ENTITY_ID = "nodaroEntityId";
1054
+ declare const SCENE3D_GLB_EXTRAS_SUBPART_ID = "nodaroSubpartId";
1055
+ declare const SCENE3D_GLB_EXTRAS_MATERIAL_ROLE = "nodaroMaterialRole";
1056
+ /** Nothing outside this set is read from `extras`; an importer ignores the rest
1057
+ * rather than trusting arbitrary exporter metadata. */
1058
+ declare const SCENE3D_GLB_EXTRAS_ALLOWLIST: readonly ["nodaroEntityId", "nodaroSubpartId", "nodaroMaterialRole"];
1059
+ /** What an entity IS, for selection, grouping and validation reporting. It is
1060
+ * advisory: no rule anywhere requires a head on a car or a wheel on a person. */
1061
+ type Scene3DEntityRole = "person" | "vehicle" | "prop" | "environment" | "other";
1062
+ declare const SCENE3D_ENTITY_ROLES: readonly Scene3DEntityRole[];
1063
+ /** The v1 primitive vocabulary MINUS `group` — grouping is `visual.kind:"group"`
1064
+ * in v2, so there is exactly one way to say "no geometry". */
1065
+ type Scene3DV2Primitive = Exclude<Scene3DPrimitive, "group">;
1066
+ declare const SCENE3D_V2_PRIMITIVES: readonly Scene3DV2Primitive[];
1067
+ /** Deterministic overlays an entity accepts. Geometry and pose are deliberately
1068
+ * absent: those rebuild through the authoring engine, they are not overlays. */
1069
+ type Scene3DEntityCapability = "transform" | "color" | "visibility";
1070
+ declare const SCENE3D_ENTITY_CAPABILITIES: readonly Scene3DEntityCapability[];
1071
+ /** What an entity accepts when it does not say. */
1072
+ declare const SCENE3D_DEFAULT_ENTITY_CAPABILITIES: readonly Scene3DEntityCapability[];
1073
+ type Scene3DAssetKind = "glb" | "camera-track-json" | "poster" | "validation-report" | "blend-source";
1074
+ declare const SCENE3D_ASSET_KINDS: readonly Scene3DAssetKind[];
1075
+ type Scene3DAssetRole = "scene-geometry" | "entity-geometry" | "camera-track" | "poster" | "validation-report" | "source";
1076
+ declare const SCENE3D_ASSET_ROLES: readonly Scene3DAssetRole[];
1077
+ /** Which kinds may carry which role. A role is not decoration — it is what lets
1078
+ * a resolver decide whether bytes go to the renderer, the UI or an authorized
1079
+ * download, without sniffing the file. */
1080
+ declare const SCENE3D_ASSET_ROLE_KINDS: Readonly<Record<Scene3DAssetRole, Scene3DAssetKind>>;
1081
+ /** The kinds the BROWSER downloads. `blend-source` is never in this set: it is
1082
+ * a separately authorized download and it does not spend the renderer budget. */
1083
+ declare const SCENE3D_RENDERER_ASSET_KINDS: readonly Scene3DAssetKind[];
1084
+ /** The one material role a `primitive` entity has: its own `color`. */
1085
+ declare const SCENE3D_PRIMITIVE_MATERIAL_ROLE = "identity";
1086
+ /** The standardized clay look, pinned by id. Browser preview, critic stills and
1087
+ * the final export must implement a given preset identically. */
1088
+ declare const SCENE3D_CLAY_LIGHTING_PRESETS: readonly ["clay-studio-v1", "clay-studio-v2"];
1089
+ type Scene3DClayLightingPreset = (typeof SCENE3D_CLAY_LIGHTING_PRESETS)[number];
1090
+ /** A stable contact/selection location in entity-local space, or in the local
1091
+ * space of an explicitly bound GLB node. Names are free
1092
+ * structural labels (`face`, `seat`, `wheel.frontLeft`, `roof`, `lookAt`) —
1093
+ * human anatomy is never required. */
1094
+ interface Scene3DAnchor {
1095
+ name: string;
1096
+ position: Vec3;
1097
+ /** Owned raw GLB node name. When present, position/rotation use that node's
1098
+ * local coordinates and follow its animation. Only asset visuals bind nodes. */
1099
+ nodeName?: string;
1100
+ /** Euler XYZ radians in the same space as position. Absent = identity. */
1101
+ rotation?: Vec3;
1102
+ }
1103
+ /** Binds an editable colour ROLE to a real material inside the entity's own
1104
+ * asset root. Recolouring `bodyPaint` on a car must not touch its tires, and
1105
+ * cannot reach a material that belongs to a different entity. */
1106
+ interface Scene3DMaterialBinding {
1107
+ role: string;
1108
+ materialName: string;
1109
+ /** Baked colour for the role, sRGB opaque hex. */
1110
+ color?: string;
1111
+ roughness?: number;
1112
+ }
1113
+ /** Maps a clip inside the referenced GLB onto public frames. Sampling is
1114
+ * `time = (frame - startFrame) / fps` — never a wall-clock mixer delta, or
1115
+ * scrubbing backwards would not reproduce the rendered frame. */
1116
+ interface Scene3DAssetAnimation {
1117
+ clipName: string;
1118
+ startFrame: number;
1119
+ endFrameExclusive: number;
1120
+ /** Absent/false = hold the last sample after the window. */
1121
+ loop?: boolean;
1122
+ }
1123
+ type Scene3DEntityVisual =
1124
+ /** Organizational identity: a transform and a name, no geometry of its own. */
1125
+ {
1126
+ kind: "group";
1127
+ }
1128
+ /** The v1 primitive vocabulary and validated dimensions. */
1129
+ | {
1130
+ kind: "primitive";
1131
+ primitive: Scene3DV2Primitive;
1132
+ dimensions: Vec3;
1133
+ color: string;
1134
+ }
1135
+ /** An authorized GLB plus the exported node that roots this entity. */
1136
+ | {
1137
+ kind: "asset";
1138
+ assetId: string;
1139
+ rootNodeId: string;
1140
+ animation?: Scene3DAssetAnimation;
1141
+ };
1142
+ interface Scene3DEntityV2 {
1143
+ id: string;
1144
+ name: string;
1145
+ /** Transform parent, another entity. Cycles are rejected. */
1146
+ parentId?: string;
1147
+ role?: Scene3DEntityRole;
1148
+ /**
1149
+ * Local base transform. REQUIRED for `group` and `primitive`.
1150
+ *
1151
+ * OPTIONAL for `asset`, where the GLB node's own transform is authoritative:
1152
+ * a value here is an informational frame-0 snapshot and the renderer must NOT
1153
+ * apply it on top of the node transform. Applying both is the
1154
+ * double-transform bug that puts a car at twice its offset.
1155
+ */
1156
+ position?: Vec3;
1157
+ rotation?: Vec3;
1158
+ scale?: Vec3;
1159
+ /** Baked visibility before manual overlays. Absent means visible. */
1160
+ visible?: boolean;
1161
+ /** The selection/identity chip colour. Opaque hex, sRGB. */
1162
+ identityColor?: string;
1163
+ anchors?: Scene3DAnchor[];
1164
+ /** Deterministic overlays this entity accepts. Absent = all of them. */
1165
+ capabilities?: Scene3DEntityCapability[];
1166
+ /** Currently frozen subset. An overlay is accepted iff its capability is
1167
+ * advertised AND not locked. */
1168
+ locks?: Scene3DEntityCapability[];
1169
+ /** `asset` entities only. */
1170
+ materialBindings?: Scene3DMaterialBinding[];
1171
+ visual: Scene3DEntityVisual;
1172
+ }
1173
+ /** A reference to immutable bytes. IDs and digests are persisted; short-lived
1174
+ * transport URLs are issued by the authenticated resolver and never stored. */
1175
+ interface Scene3DAssetRef {
1176
+ assetId: string;
1177
+ kind: Scene3DAssetKind;
1178
+ role: Scene3DAssetRole;
1179
+ byteLength: number;
1180
+ /** Lowercase hex SHA-256 of the bytes. */
1181
+ sha256: string;
1182
+ /** Set when this revision reuses an earlier revision's immutable bytes. */
1183
+ originRevisionId?: string;
1184
+ }
1185
+ /** A contiguous half-open frame range `[startFrame, endFrameExclusive)`. */
1186
+ interface Scene3DShot {
1187
+ id: string;
1188
+ startFrame: number;
1189
+ endFrameExclusive: number;
1190
+ label?: string;
1191
+ /** Who the shot is ABOUT — used by validation reporting and the UI. */
1192
+ subjectEntityIds?: string[];
1193
+ /** Who is deliberately in front of the lens (an over-the-shoulder anchor). */
1194
+ foregroundEntityIds?: string[];
1195
+ }
1196
+ interface Scene3DClayLighting {
1197
+ preset: Scene3DClayLightingPreset;
1198
+ ambientIntensity: number;
1199
+ keyIntensity: number;
1200
+ keyPosition: Vec3;
1201
+ }
1202
+ /** Which space a constant transform override is expressed in. Declared, so the
1203
+ * renderer never multiplies the same parent transform in twice. */
1204
+ type Scene3DOverrideSpace = "local" | "world";
1205
+ interface Scene3DOverrideProvenance {
1206
+ id: string;
1207
+ /** The revision this override was authored against. */
1208
+ sourceRevisionId: string;
1209
+ /** That revision's canonical content hash when the override was authored. */
1210
+ sourceContentHash: string;
1211
+ operationVersion: number;
1212
+ }
1213
+ type Scene3DOverride = Scene3DOverrideProvenance & ({
1214
+ kind: "entity-transform";
1215
+ entityId: string;
1216
+ space: Scene3DOverrideSpace;
1217
+ position?: Vec3;
1218
+ rotation?: Vec3;
1219
+ scale?: Vec3;
1220
+ } | {
1221
+ kind: "entity-color";
1222
+ entityId: string;
1223
+ materialRole: string;
1224
+ color: string;
1225
+ } | {
1226
+ kind: "entity-visibility";
1227
+ entityId: string;
1228
+ visible: boolean;
1229
+ } | {
1230
+ kind: "camera-shot-offset";
1231
+ shotId: string;
1232
+ positionOffset?: Vec3;
1233
+ targetOffset?: Vec3;
1234
+ });
1235
+ /**
1236
+ * Who built this revision and from what. Source versioning and renderer
1237
+ * versioning are independent — a renderer upgrade does not invalidate a scene.
1238
+ *
1239
+ * Every string here is a bounded slug, which is a structural guarantee that no
1240
+ * native path or block of prose fits in one. Scrubbing credentials
1241
+ * out of the values it does accept remains the producer's duty.
1242
+ */
1243
+ interface Scene3DProvenance {
1244
+ engine: string;
1245
+ engineVersion: string;
1246
+ recipeVersion: string;
1247
+ compilerVersion: string;
1248
+ exporterVersion: string;
1249
+ rendererVersion: string;
1250
+ sourceRevisionId?: string;
1251
+ /** The retained `blend-source` asset, when one was kept. */
1252
+ sourceArtifactId?: string;
1253
+ /** Canonical content hash of this revision — see `scene3d-v2-resources.ts`. */
1254
+ contentHash: string;
1255
+ }
1256
+ interface Scene3DPlanV2 {
1257
+ planType: typeof SCENE3D_PLAN_TYPE;
1258
+ schemaVersion: typeof SCENE3D_SCHEMA_VERSION_V2;
1259
+ revisionId: string;
1260
+ parentRevisionId?: string;
1261
+ width: number;
1262
+ height: number;
1263
+ fps: number;
1264
+ durationInFrames: number;
1265
+ units: "meters";
1266
+ upAxis: "Y";
1267
+ handedness: "right";
1268
+ objects: Scene3DEntityV2[];
1269
+ assets: Scene3DAssetRef[];
1270
+ cameraTrackAssetId: string;
1271
+ shots: Scene3DShot[];
1272
+ lighting: Scene3DClayLighting;
1273
+ backgroundColor: string;
1274
+ references?: Scene3DReference[];
1275
+ overrides?: Scene3DOverride[];
1276
+ provenance: Scene3DProvenance;
1277
+ }
1278
+ /** Opaque storage id. Deliberately slash-free: an asset id is an ID, resolved
1279
+ * server-side against ownership — never a path and never a URL. */
1280
+ declare const scene3DAssetIdSchema: z.ZodString;
1281
+ /** A node name inside an exported GLB. */
1282
+ declare const scene3DNodeIdSchema: z.ZodString;
1283
+ /** Subparts retain raw GLB names, including separators that a root ID forbids. */
1284
+ declare const scene3DNodeNameSchema: z.ZodString;
1285
+ declare const scene3DSha256Schema: z.ZodString;
1286
+ /**
1287
+ * A version/engine token. The charset excludes `/`, `\`, `:` and whitespace, so
1288
+ * a native filesystem path cannot be spelled as one; the 64-character cap
1289
+ * excludes prose.
1290
+ */
1291
+ declare const scene3DVersionTokenSchema: z.ZodString;
1292
+ declare const scene3DEngineIdSchema: z.ZodString;
1293
+ /** Anchor names and material roles share the id charset (dots allowed, so
1294
+ * `wheel.frontLeft` is one name and not a path). */
1295
+ declare const scene3DAnchorNameSchema: z.ZodString;
1296
+ declare const scene3DMaterialRoleSchema: z.ZodString;
1297
+ declare const scene3DMaterialNameSchema: z.ZodString;
1298
+ declare const scene3DEntityCapabilitySchema: z.ZodEnum<{
1299
+ color: "color";
1300
+ transform: "transform";
1301
+ visibility: "visibility";
1302
+ }>;
1303
+ declare const scene3DAnchorSchema: z.ZodObject<{
1304
+ name: z.ZodString;
1305
+ position: z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>;
1306
+ nodeName: z.ZodOptional<z.ZodString>;
1307
+ rotation: z.ZodOptional<z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>>;
1308
+ }, z.core.$strict>;
1309
+ declare const scene3DMaterialBindingSchema: z.ZodObject<{
1310
+ role: z.ZodString;
1311
+ materialName: z.ZodString;
1312
+ color: z.ZodOptional<z.ZodString>;
1313
+ roughness: z.ZodOptional<z.ZodNumber>;
1314
+ }, z.core.$strict>;
1315
+ declare const scene3DAssetAnimationSchema: z.ZodObject<{
1316
+ clipName: z.ZodString;
1317
+ startFrame: z.ZodNumber;
1318
+ endFrameExclusive: z.ZodNumber;
1319
+ loop: z.ZodOptional<z.ZodBoolean>;
1320
+ }, z.core.$strict>;
1321
+ declare const scene3DEntityVisualSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
1322
+ kind: z.ZodLiteral<"group">;
1323
+ }, z.core.$strict>, z.ZodObject<{
1324
+ kind: z.ZodLiteral<"primitive">;
1325
+ primitive: z.ZodEnum<{
1326
+ box: "box";
1327
+ sphere: "sphere";
1328
+ cylinder: "cylinder";
1329
+ cone: "cone";
1330
+ plane: "plane";
1331
+ capsule: "capsule";
1332
+ }>;
1333
+ dimensions: z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>;
1334
+ color: z.ZodString;
1335
+ }, z.core.$strict>, z.ZodObject<{
1336
+ kind: z.ZodLiteral<"asset">;
1337
+ assetId: z.ZodString;
1338
+ rootNodeId: z.ZodString;
1339
+ animation: z.ZodOptional<z.ZodObject<{
1340
+ clipName: z.ZodString;
1341
+ startFrame: z.ZodNumber;
1342
+ endFrameExclusive: z.ZodNumber;
1343
+ loop: z.ZodOptional<z.ZodBoolean>;
1344
+ }, z.core.$strict>>;
1345
+ }, z.core.$strict>], "kind">;
1346
+ declare const scene3DEntityV2Schema: z.ZodObject<{
1347
+ id: z.ZodString;
1348
+ name: z.ZodString;
1349
+ parentId: z.ZodOptional<z.ZodString>;
1350
+ role: z.ZodOptional<z.ZodEnum<{
1351
+ other: "other";
1352
+ person: "person";
1353
+ vehicle: "vehicle";
1354
+ prop: "prop";
1355
+ environment: "environment";
1356
+ }>>;
1357
+ position: z.ZodOptional<z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>>;
1358
+ rotation: z.ZodOptional<z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>>;
1359
+ scale: z.ZodOptional<z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>>;
1360
+ visible: z.ZodOptional<z.ZodBoolean>;
1361
+ identityColor: z.ZodOptional<z.ZodString>;
1362
+ anchors: z.ZodOptional<z.ZodArray<z.ZodObject<{
1363
+ name: z.ZodString;
1364
+ position: z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>;
1365
+ nodeName: z.ZodOptional<z.ZodString>;
1366
+ rotation: z.ZodOptional<z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>>;
1367
+ }, z.core.$strict>>>;
1368
+ capabilities: z.ZodOptional<z.ZodArray<z.ZodEnum<{
1369
+ color: "color";
1370
+ transform: "transform";
1371
+ visibility: "visibility";
1372
+ }>>>;
1373
+ locks: z.ZodOptional<z.ZodArray<z.ZodEnum<{
1374
+ color: "color";
1375
+ transform: "transform";
1376
+ visibility: "visibility";
1377
+ }>>>;
1378
+ materialBindings: z.ZodOptional<z.ZodArray<z.ZodObject<{
1379
+ role: z.ZodString;
1380
+ materialName: z.ZodString;
1381
+ color: z.ZodOptional<z.ZodString>;
1382
+ roughness: z.ZodOptional<z.ZodNumber>;
1383
+ }, z.core.$strict>>>;
1384
+ visual: z.ZodDiscriminatedUnion<[z.ZodObject<{
1385
+ kind: z.ZodLiteral<"group">;
1386
+ }, z.core.$strict>, z.ZodObject<{
1387
+ kind: z.ZodLiteral<"primitive">;
1388
+ primitive: z.ZodEnum<{
1389
+ box: "box";
1390
+ sphere: "sphere";
1391
+ cylinder: "cylinder";
1392
+ cone: "cone";
1393
+ plane: "plane";
1394
+ capsule: "capsule";
1395
+ }>;
1396
+ dimensions: z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>;
1397
+ color: z.ZodString;
1398
+ }, z.core.$strict>, z.ZodObject<{
1399
+ kind: z.ZodLiteral<"asset">;
1400
+ assetId: z.ZodString;
1401
+ rootNodeId: z.ZodString;
1402
+ animation: z.ZodOptional<z.ZodObject<{
1403
+ clipName: z.ZodString;
1404
+ startFrame: z.ZodNumber;
1405
+ endFrameExclusive: z.ZodNumber;
1406
+ loop: z.ZodOptional<z.ZodBoolean>;
1407
+ }, z.core.$strict>>;
1408
+ }, z.core.$strict>], "kind">;
1409
+ }, z.core.$strict>;
1410
+ declare const scene3DAssetRefSchema: z.ZodObject<{
1411
+ assetId: z.ZodString;
1412
+ kind: z.ZodEnum<{
1413
+ glb: "glb";
1414
+ "camera-track-json": "camera-track-json";
1415
+ poster: "poster";
1416
+ "validation-report": "validation-report";
1417
+ "blend-source": "blend-source";
1418
+ }>;
1419
+ role: z.ZodEnum<{
1420
+ source: "source";
1421
+ poster: "poster";
1422
+ "validation-report": "validation-report";
1423
+ "scene-geometry": "scene-geometry";
1424
+ "entity-geometry": "entity-geometry";
1425
+ "camera-track": "camera-track";
1426
+ }>;
1427
+ byteLength: z.ZodNumber;
1428
+ sha256: z.ZodString;
1429
+ originRevisionId: z.ZodOptional<z.ZodUUID>;
1430
+ }, z.core.$strict>;
1431
+ declare const scene3DShotSchema: z.ZodObject<{
1432
+ id: z.ZodString;
1433
+ startFrame: z.ZodNumber;
1434
+ endFrameExclusive: z.ZodNumber;
1435
+ label: z.ZodOptional<z.ZodString>;
1436
+ subjectEntityIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
1437
+ foregroundEntityIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
1438
+ }, z.core.$strict>;
1439
+ declare const scene3DClayLightingSchema: z.ZodObject<{
1440
+ preset: z.ZodEnum<{
1441
+ "clay-studio-v1": "clay-studio-v1";
1442
+ "clay-studio-v2": "clay-studio-v2";
1443
+ }>;
1444
+ ambientIntensity: z.ZodNumber;
1445
+ keyIntensity: z.ZodNumber;
1446
+ keyPosition: z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>;
1447
+ }, z.core.$strict>;
1448
+ declare const scene3DOverrideSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
1449
+ kind: z.ZodLiteral<"entity-transform">;
1450
+ entityId: z.ZodString;
1451
+ space: z.ZodEnum<{
1452
+ local: "local";
1453
+ world: "world";
1454
+ }>;
1455
+ position: z.ZodOptional<z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>>;
1456
+ rotation: z.ZodOptional<z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>>;
1457
+ scale: z.ZodOptional<z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>>;
1458
+ id: z.ZodString;
1459
+ sourceRevisionId: z.ZodUUID;
1460
+ sourceContentHash: z.ZodString;
1461
+ operationVersion: z.ZodNumber;
1462
+ }, z.core.$strict>, z.ZodObject<{
1463
+ kind: z.ZodLiteral<"entity-color">;
1464
+ entityId: z.ZodString;
1465
+ materialRole: z.ZodString;
1466
+ color: z.ZodString;
1467
+ id: z.ZodString;
1468
+ sourceRevisionId: z.ZodUUID;
1469
+ sourceContentHash: z.ZodString;
1470
+ operationVersion: z.ZodNumber;
1471
+ }, z.core.$strict>, z.ZodObject<{
1472
+ kind: z.ZodLiteral<"entity-visibility">;
1473
+ entityId: z.ZodString;
1474
+ visible: z.ZodBoolean;
1475
+ id: z.ZodString;
1476
+ sourceRevisionId: z.ZodUUID;
1477
+ sourceContentHash: z.ZodString;
1478
+ operationVersion: z.ZodNumber;
1479
+ }, z.core.$strict>, z.ZodObject<{
1480
+ kind: z.ZodLiteral<"camera-shot-offset">;
1481
+ shotId: z.ZodString;
1482
+ positionOffset: z.ZodOptional<z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>>;
1483
+ targetOffset: z.ZodOptional<z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>>;
1484
+ id: z.ZodString;
1485
+ sourceRevisionId: z.ZodUUID;
1486
+ sourceContentHash: z.ZodString;
1487
+ operationVersion: z.ZodNumber;
1488
+ }, z.core.$strict>], "kind">;
1489
+ declare const scene3DProvenanceSchema: z.ZodObject<{
1490
+ engine: z.ZodString;
1491
+ engineVersion: z.ZodString;
1492
+ recipeVersion: z.ZodString;
1493
+ compilerVersion: z.ZodString;
1494
+ exporterVersion: z.ZodString;
1495
+ rendererVersion: z.ZodString;
1496
+ sourceRevisionId: z.ZodOptional<z.ZodUUID>;
1497
+ sourceArtifactId: z.ZodOptional<z.ZodString>;
1498
+ contentHash: z.ZodString;
1499
+ }, z.core.$strict>;
1500
+ type Issue$3 = Scene3DSemanticIssue;
1501
+ /** Decoded byte length of a JSON payload, browser and Node alike. Size is
1502
+ * checked on the BYTES, before `JSON.parse` allocates anything. */
1503
+ declare function scene3DJsonByteLength(text: string): number;
1504
+ /** What every `parse…Json` admission helper returns: the value, or the issues
1505
+ * that stopped it — never a throw, so a route can map issues to a 400. */
1506
+ type Scene3DParseResult<T> = {
1507
+ ok: true;
1508
+ value: T;
1509
+ } | {
1510
+ ok: false;
1511
+ issues: Issue$3[];
1512
+ };
1513
+ /** Flattens a zod failure into the same issue shape the semantic validators use. */
1514
+ declare function scene3DZodIssues(error: z.ZodError): Issue$3[];
1515
+
1516
+ /**
1517
+ * What a Scene3D authoring run says about its OWN answer, in the published result.
1518
+ *
1519
+ * An advanced authoring engine knows things about the scene it just made that nothing else can
1520
+ * reconstruct afterwards: which parts of the brief it had to ASSUME, what it thinks it authored,
1521
+ * what it spent getting there, and — when the scene was delivered without the visual reviewer's
1522
+ * approval — what that reviewer wanted changed, or that it gave no usable verdict at all. All of it
1523
+ * rides the completed job's `output_data`, in slots the delivery contract already had:
1524
+ *
1525
+ * | What | Where | Shape |
1526
+ * |---|---|---|
1527
+ * | the planner's assumptions, each with the engine's own normalizations prefixed | `validation.warnings[]` | one entry per assumption, `code` = {@link SCENE3D_AUTHORING_ASSUMPTION_CODE} |
1528
+ * | the planner's one-or-two-sentence description of what it authored (on a repaired run, of the REPAIR) | `metadata.summary` | string |
1529
+ * | repair passes actually RUN — never the authoring-pass count | `repairPasses` | top-level number |
1530
+ * | pre-build planner retries that did NOT spend a repair pass | `admissionRetries` | top-level number |
1531
+ * | repairs the engine applied from the compiler's OWN remedy, on their own quoted allowance | `mechanicalPasses` | top-level number, counted APART from `repairPasses` |
1532
+ * | the per-remedy account of what one of those applied | `validation.warnings[]` | one entry per remedy, `code` = {@link SCENE3D_REMEDY_AUTO_APPLIED_CODE} |
1533
+ * | mandatory assertions the engine put BACK after a planner answer re-shaped them | `restoredAssertions` | array of {@link Scene3DRestoredAssertion} |
1534
+ * | the per-assertion account of one of those restores | `validation.warnings[]` | one entry per restore, `code` = {@link SCENE3D_ASSERTION_RESTORED_CODE} |
1535
+ * | the visual reviewer's refusal of a scene that was delivered anyway | `metadata.review` + `validation.warnings[]` | {@link Scene3DReviewVerdict} with `verdict: "refused"`, plus one entry per objection coded {@link SCENE3D_REVIEW_REFUSED_CODE} |
1536
+ * | that the review produced no usable verdict at all — its provider was never reached, or answered unusably — and the scene was delivered unreviewed | `metadata.review` + `validation.warnings[]` | {@link Scene3DReviewVerdict} with `verdict: "unavailable"` and a `reason` from {@link SCENE3D_REVIEW_UNAVAILABLE_REASONS}, plus one LEADING entry coded {@link SCENE3D_REVIEW_UNAVAILABLE_CODE} |
1537
+ *
1538
+ * Every one of them is OPTIONAL, and absent is a first-class answer:
1539
+ *
1540
+ * - the deterministic Basic lane authors nothing with a model, so it carries none of them;
1541
+ * - a render-only export authored nothing either — it reports no `summary` and omits
1542
+ * `repairPasses` entirely rather than claiming `0` about a run that never happened;
1543
+ * - a run whose recipe was refused on every pass has no composition to describe, so it carries
1544
+ * the assumptions and `repairPasses` but NO `summary` and no `metadata` block to hold one;
1545
+ * what it DOES carry is {@link Scene3DAuthoringValidation.sourceRetained}, saying whether the
1546
+ * recipe it was refused for is retrievable from its delivery;
1547
+ * - `repairPasses` is `0`, not absent, on a run that was accepted first time;
1548
+ * - `admissionRetries` is absent on a run that never had one, and counts only the pre-build
1549
+ * planner retries — a slip the compiler would not admit, re-asked without spending a repair;
1550
+ * - `mechanicalPasses` is counted APART from `repairPasses`, the same way `admissionRetries` is,
1551
+ * because it buys a different thing and is BOUGHT differently: a mandatory finding that carries
1552
+ * the compiler's own structured remedy is answered by applying that remedy and rebuilding, with
1553
+ * no planner call, and those passes have their own quoted allowance — a `mechanical` line on the
1554
+ * quote, released when unspent — rather than spending one of the caller's repairs. So they are
1555
+ * never folded into `repairPasses`, and the pass identity the pricing keeps is
1556
+ * `buildPasses === authoringPasses + repairPasses + mechanicalPasses`. Absent on a run that took
1557
+ * none and on an engine that does not report it, so absent is never evidence that the planner
1558
+ * authored every repair;
1559
+ * - the ONE exception is a run quoted BEFORE that allowance existed. Its quote carries no
1560
+ * `mechanical` line, and there the older accounting still holds: the pass charged a repair, so
1561
+ * the count is a SUBSET of `repairPasses` rather than a sibling of it. The discriminant is the
1562
+ * quote, not the result — the result reports the same field either way — so a reader that must
1563
+ * know which accounting applies reads the quote it was given rather than inferring one;
1564
+ * - `review` is present ONLY on a delivery the reviewer did not APPROVE (below) — one it refused,
1565
+ * or one it never got to judge because its provider could not be reached. A scene the reviewer
1566
+ * accepted carries no `review` at all — absent means "nothing to report", never "passed
1567
+ * silently", and never "nobody looked".
1568
+ *
1569
+ * ## The advisory delivery
1570
+ *
1571
+ * The visual reviewer's refusal drives a repair for as long as the repair budget lasts. Once the
1572
+ * budget is spent, a scene whose every MANDATORY assertion passed is delivered rather than
1573
+ * withheld: the job completes, the video is real, and the refusal rides along as
1574
+ * {@link Scene3DAuthoringDeliveryMetadata.review} plus one `SCENE_REVIEW_REFUSED` warning per
1575
+ * objection. `validation.status` stays `"passed"` on such a result — the assertions DID pass —
1576
+ * so the presence of `review` is the only thing that tells an advisory delivery apart from a
1577
+ * clean one. A caller that wants the stricter reading tests for it explicitly.
1578
+ *
1579
+ * A refusal that raised NO objection is still a verdict, and still arrives: `objections: []` says
1580
+ * the reviewer refused without naming anything actionable, which an absent field would hide.
1581
+ *
1582
+ * ## The UNREVIEWED delivery
1583
+ *
1584
+ * The second way a scene is delivered without approval: the review produced no usable verdict.
1585
+ * That is the advisory situation with a different cause, and it differs in exactly one way — a
1586
+ * repair answers an objection, and a missing opinion raises none, so waiting for the repair budget
1587
+ * to run out buys nothing. The review is asked once more — after a bounded pause when its provider
1588
+ * was unreachable, at once when it answered unusably, and not at all when a provider broke after it
1589
+ * had already reported usage — and if there is still no usable answer, the assertion-passing scene
1590
+ * is delivered immediately with `{ verdict: "unavailable", reason, attempts }` on {@link
1591
+ * Scene3DAuthoringDeliveryMetadata.review}, and `validation.warnings[]` LEADS with one
1592
+ * `SCENE_REVIEW_UNAVAILABLE` entry. `reason` is one of {@link SCENE3D_REVIEW_UNAVAILABLE_REASONS}:
1593
+ * `"provider"` when no asking reached the provider, `"unusable"` when one did and answered with
1594
+ * nothing usable. `attempts` is how many times the review was asked, so one unlucky call is
1595
+ * distinguishable from a provider that was down for the whole minute.
1596
+ *
1597
+ * `objections` may still be non-empty on that arm. A review is BATCHED, and batches that answered
1598
+ * before the provider went away are evidence a caller is entitled to; each arrives as a
1599
+ * `SCENE_REVIEW_REFUSED` warning UNDER the leading one, which qualifies every line below it. A
1600
+ * caller reading only `objections: []` would otherwise take the silence for approval.
1601
+ *
1602
+ * With the advisory policy off, that scene is RETAINED as a draft on a `failed` job instead of
1603
+ * delivered. There is no `metadata.review` on that lane — a retained failure publishes no
1604
+ * metadata block — and the `SCENE_REVIEW_UNAVAILABLE` warning is what says nobody judged it. The
1605
+ * pinned validation report says `review: "unavailable"` on both lanes.
1606
+ *
1607
+ * Nothing here is new wire surface: the schemas that read these results are `.passthrough()`
1608
+ * and the fields were already arriving. Declaring them is what makes them visible to SDK
1609
+ * users, typed for a TypeScript caller, and documentable — instead of reachable only by
1610
+ * casting the result to `Record<string, unknown>`.
1611
+ */
1612
+ /**
1613
+ * The `code` on a `validation.warnings[]` entry that is an authoring ASSUMPTION rather than a
1614
+ * reviewer finding — "the brief did not say, so the run decided". Consumers tell the two apart
1615
+ * by this code alone, without knowing anything about the engine that produced them.
1616
+ */
1617
+ declare const SCENE3D_AUTHORING_ASSUMPTION_CODE = "SCENE_AUTHORING_ASSUMPTION";
1618
+ /** One advisory about a delivered scene. Same shape as `Pro3DRenderValidationWarning`. */
1619
+ interface Scene3DDeliveryWarning {
1620
+ /**
1621
+ * `SCENE_AUTHORING_ASSUMPTION` for an authoring caveat; `SCENE_REVIEW_REFUSED` for one
1622
+ * objection the reviewer raised against a scene that was DELIVERED anyway;
1623
+ * `SCENE_REVIEW_UNAVAILABLE` for a scene delivered or retained with NO reviewer verdict at all,
1624
+ * because the review's provider never answered or answered unusably — it leads the array when it
1625
+ * is there;
1626
+ * `REMEDY_AUTO_APPLIED` for one remedy the engine applied itself on a mechanical repair;
1627
+ * `ASSERTION_RESTORED` for one mandatory assertion it put back after a planner answer
1628
+ * re-shaped it; a `SCENE_QUALITY_*` code for a reviewer finding on a job that FAILED.
1629
+ * Open-ended on purpose — an unknown code is shown, never refused.
1630
+ */
1631
+ code: string;
1632
+ message: string;
1633
+ /** The shot the advisory is about, when it is about exactly one. */
1634
+ shotId?: string;
1635
+ }
1636
+ /**
1637
+ * The validation block an authoring lane publishes.
1638
+ *
1639
+ * Indexed on purpose: the block carries more than `warnings` (status, the pinned report, the
1640
+ * scope, and on a retained failure the pass count and phase), and a reader of THIS version
1641
+ * must keep reading those as it always did rather than have them typed away.
1642
+ */
1643
+ interface Scene3DAuthoringValidation {
1644
+ /** Advisories about the delivered scene, including the authoring assumptions. */
1645
+ warnings?: Scene3DDeliveryWarning[];
1646
+ /**
1647
+ * Whether a run that never COMPILED kept its last admitted recipe.
1648
+ *
1649
+ * Present only on the refused-authoring shape — a job that failed with no `scenePlan` and no
1650
+ * `sceneRevisionId`, because the compiler refused the recipe on every pass. `true` means the
1651
+ * recipe is retrievable: `GET /v1/3d-scene/deliveries/{deliveryId}` lists a `source-json`
1652
+ * descriptor beside the refusal report, and its bytes come back from the delivery assets
1653
+ * route, to a caller with `edit` on the job's workflow. `false` means no pass ever cleared
1654
+ * admission, so there is no recipe to fetch — only the report.
1655
+ *
1656
+ * A row-level flag rather than only a descriptor, because it answers "is there anything to
1657
+ * fetch" without a round trip, and answers it honestly when the caller's access would hide
1658
+ * the descriptor anyway.
1659
+ */
1660
+ sourceRetained?: boolean;
1661
+ [key: string]: unknown;
1662
+ }
1663
+ /** The composition metadata block, plus the planner's own account of what it authored. */
1664
+ interface Scene3DAuthoringDeliveryMetadata {
1665
+ /**
1666
+ * The planner's one-or-two-sentence description of the scene it authored — on a repaired
1667
+ * run, of the repair it made. Routinely absent: a model that returns no summary is not an
1668
+ * error, and a lane that compiled nothing has nothing to describe.
1669
+ */
1670
+ summary?: string;
1671
+ /**
1672
+ * The visual reviewer's whole verdict, present ONLY on a delivery it did not approve — a scene
1673
+ * whose mandatory assertions all passed, delivered either once the repair budget was spent and
1674
+ * the reviewer still objected (`verdict: "refused"`), or without any verdict at all because the
1675
+ * review's provider could not be reached (`verdict: "unavailable"`). Absent on every other
1676
+ * result, including a clean one. Read it with {@link scene3DReviewVerdictOf} rather than by
1677
+ * hand, and render it with {@link scene3DReviewNote}.
1678
+ */
1679
+ review?: Scene3DReviewVerdict;
1680
+ [key: string]: unknown;
1681
+ }
1682
+ /**
1683
+ * The additive fields every Scene3D AUTHORING delivery may carry. Mixed into the job output
1684
+ * types rather than repeated, so a lane that grows one grows all of them.
1685
+ */
1686
+ interface Scene3DAuthoringDelivery {
1687
+ /** Advisories about this result. Absent on the deterministic Basic lane. */
1688
+ validation?: Scene3DAuthoringValidation;
1689
+ /** Composition metadata, including the planner's `summary`. */
1690
+ metadata?: Scene3DAuthoringDeliveryMetadata;
1691
+ /**
1692
+ * Repair passes actually RUN, never the number of authoring passes: `0` on a scene accepted
1693
+ * first time, absent on a lane that authored nothing.
1694
+ */
1695
+ repairPasses?: number;
1696
+ /**
1697
+ * Pre-build planner retries, counted separately from {@link repairPasses} because they cost a
1698
+ * different thing: a recipe the compiler would not ADMIT is re-asked of the planner without a
1699
+ * build, so no repair pass was spent on it. Absent on a run that needed none and on a lane
1700
+ * that authored nothing.
1701
+ */
1702
+ admissionRetries?: number;
1703
+ /**
1704
+ * Repairs the engine authored ITSELF, from the compiler's own structured remedy, without asking
1705
+ * the planner.
1706
+ *
1707
+ * Counted APART from {@link repairPasses} and never folded into it — the same way
1708
+ * {@link admissionRetries} is — because these passes have their own quoted allowance: a
1709
+ * `mechanical` line on the quote, bounded and released when unspent, rather than one of the
1710
+ * caller's repairs. The pass identity the pricing keeps is
1711
+ * `buildPasses === authoringPasses + repairPasses + mechanicalPasses`.
1712
+ *
1713
+ * ONE exception, and the discriminant is the QUOTE rather than this result: a run quoted before
1714
+ * that allowance existed carries no `mechanical` quote line, and there the older accounting
1715
+ * still holds — the pass charged a repair, so the count is a subset of {@link repairPasses}.
1716
+ * The result reports the same field either way, so a reader that must know which accounting
1717
+ * applies reads the quote it was given rather than inferring one from the counts.
1718
+ *
1719
+ * Absent on a run that took none, on a lane that authored nothing, and on an engine that does
1720
+ * not report it — so absent means "not reported", never "the planner authored every repair".
1721
+ */
1722
+ mechanicalPasses?: number;
1723
+ /**
1724
+ * Mandatory assertions the engine put BACK, each because a planner answer re-shaped one the
1725
+ * feedback had not named.
1726
+ *
1727
+ * A repair is invited to change what the feedback names and nothing else. When an answer
1728
+ * re-shapes a mandatory assertion outside that invitation, the engine restores it to the last
1729
+ * admitted recipe's exact form and carries on, instead of refusing the answer and spending a
1730
+ * retry to be told to put back a value it already held. An assertion the feedback DOES name is
1731
+ * left alone — re-shaping one you were invited to re-shape is a disagreement, not a slip.
1732
+ *
1733
+ * Each entry is also one `ASSERTION_RESTORED` warning. Absent on a run that restored nothing
1734
+ * and on an engine that does not report it; `[]` is possible and means the same thing.
1735
+ */
1736
+ restoredAssertions?: Scene3DRestoredAssertion[];
1737
+ }
1738
+ /**
1739
+ * The `code` on a `validation.warnings[]` entry that is one objection the visual reviewer raised
1740
+ * against a scene that was DELIVERED anyway.
1741
+ *
1742
+ * Distinct from the `SCENE_QUALITY_*` codes on purpose: those appear on a job that FAILED, where
1743
+ * the finding is the reason there is no video. This one appears on a job that COMPLETED, where
1744
+ * the video is real and the finding is advice about it. One entry per objection, carrying the
1745
+ * `shotId` when every frame the objection cites falls inside one shot.
1746
+ */
1747
+ declare const SCENE3D_REVIEW_REFUSED_CODE = "SCENE_REVIEW_REFUSED";
1748
+ /**
1749
+ * The `code` on the `validation.warnings[]` entry that says NOBODY reviewed this scene, because
1750
+ * the review produced no usable verdict: its provider never answered, or answered unusably (the
1751
+ * message says which, in the words {@link scene3DReviewNote} uses).
1752
+ *
1753
+ * Its own code rather than a {@link SCENE3D_REVIEW_REFUSED_CODE} with an apologetic message:
1754
+ * "the reviewer objected to X" and "there is no reviewer verdict at all" are different facts
1755
+ * about the scene a caller is holding, and only the second one is answered by running the job
1756
+ * again later.
1757
+ *
1758
+ * It LEADS the warning array wherever it appears, because it qualifies every line under it — an
1759
+ * objection below it came from a review that never finished, and a reader shown only the
1760
+ * objection would take the silence on everything else for approval. It appears on the DELIVERED
1761
+ * lane beside `metadata.review`, and on the RETAINED failure lane, which publishes no metadata
1762
+ * block and where this warning is therefore the only thing that says nobody judged the draft.
1763
+ */
1764
+ declare const SCENE3D_REVIEW_UNAVAILABLE_CODE = "SCENE_REVIEW_UNAVAILABLE";
1765
+ /**
1766
+ * The `code` on a `validation.warnings[]` entry that records one remedy the engine applied ITSELF
1767
+ * — a mechanical repair, counted by {@link Scene3DAuthoringDelivery.mechanicalPasses}.
1768
+ *
1769
+ * Written down here for the same reason the other two codes are: so a consumer that wants to tell
1770
+ * "the platform fixed this from the compiler's own instruction" apart from "the planner was asked"
1771
+ * has one place to read the string from, rather than spelling it at each call site. The entry
1772
+ * names the assertion that refused the build, the ops applied, and the measurement before them.
1773
+ */
1774
+ declare const SCENE3D_REMEDY_AUTO_APPLIED_CODE = "REMEDY_AUTO_APPLIED";
1775
+ /**
1776
+ * The `code` on a `validation.warnings[]` entry that records one mandatory assertion the engine
1777
+ * RESTORED after a planner answer re-shaped it without being asked to.
1778
+ *
1779
+ * Distinct from {@link SCENE3D_REMEDY_AUTO_APPLIED_CODE}: that one says the engine changed the
1780
+ * SCENE to satisfy an assertion, this one says it changed the ANSWER back to leave an assertion
1781
+ * as it was. Both appear on runs that completed normally — neither is a failure.
1782
+ */
1783
+ declare const SCENE3D_ASSERTION_RESTORED_CODE = "ASSERTION_RESTORED";
1784
+ /**
1785
+ * One mandatory assertion put back to its last admitted form, with the edit that did it.
1786
+ *
1787
+ * Read tolerantly and declared loosely on purpose: `op` and `path` describe an edit in the
1788
+ * engine's own vocabulary rather than a format this package pins, and `value` is whatever the
1789
+ * restored assertion holds — a number, a string, an object — so it is `unknown` rather than
1790
+ * narrowed to whatever today's assertions happen to use.
1791
+ */
1792
+ interface Scene3DRestoredAssertion {
1793
+ /** The edit applied to put it back, in the engine's vocabulary (e.g. `"replace"`). */
1794
+ op: string;
1795
+ /** Where in the recipe it was put back. */
1796
+ path: string;
1797
+ /** The restored value. Absent for an edit that carries none, such as a removal. */
1798
+ value?: unknown;
1799
+ /** The assertion's own id, the same one the refusal would have named. */
1800
+ assertionId: string;
1801
+ /** Why it was restored, in the engine's words. Open-ended; shown, never matched on. */
1802
+ reason: string;
1803
+ }
1804
+ /**
1805
+ * One thing the visual reviewer wanted changed, with the frames it was looking at.
1806
+ *
1807
+ * There is no `severity` here because severity is the FILTER, not a field: only the reviewer's
1808
+ * blocking findings become objections, so every entry in this list is blocking by construction.
1809
+ */
1810
+ interface Scene3DReviewObjection {
1811
+ /** The reviewer's own category for the finding, e.g. `"evidence"`. Open-ended. */
1812
+ category: string;
1813
+ /** What is wrong — the finding's own description, never the reviewer's summary. */
1814
+ what: string;
1815
+ /** The recipe-level change the reviewer asked for. Absent when it named none. */
1816
+ correction?: string;
1817
+ /** The frames it cited, in the order the report gave them. Empty when it cited none. */
1818
+ frames: number[];
1819
+ }
1820
+ /**
1821
+ * What every verdict carries, whichever way the review ended.
1822
+ *
1823
+ * Shared by both arms of {@link Scene3DReviewVerdict} so a consumer that only wants the findings
1824
+ * can take this type and stay indifferent to why the review did not approve the scene.
1825
+ */
1826
+ interface Scene3DReviewFindings {
1827
+ /**
1828
+ * Every blocking finding across the run's reviews, de-duplicated. May be EMPTY: a refusal that
1829
+ * named nothing actionable is still a refusal, and `[]` reports it honestly. On the
1830
+ * `"unavailable"` arm it holds whichever review BATCHES answered usably before the one that did
1831
+ * not, and is `[]` in the common case where the first batch is the one that failed.
1832
+ */
1833
+ objections: Scene3DReviewObjection[];
1834
+ /** The reviewer's own account of what it found CORRECT. Never a substitute for an objection. */
1835
+ observed?: string;
1836
+ }
1837
+ /** The reviewer answered, and objected. {@link Scene3DReviewFindings.objections} is what it wants changed. */
1838
+ type Scene3DReviewRefused = {
1839
+ verdict: "refused";
1840
+ } & Scene3DReviewFindings;
1841
+ /**
1842
+ * The review never produced an answer, so the scene was delivered with nobody's opinion on it.
1843
+ *
1844
+ * `objections` may still be non-empty here — see {@link Scene3DReviewFindings.objections} — which
1845
+ * is exactly why this is a distinct verdict rather than a refusal with a flag: the findings that
1846
+ * DID arrive are real, and the fact that they are not the whole verdict is the thing a caller
1847
+ * must not lose.
1848
+ */
1849
+ type Scene3DReviewUnavailable = {
1850
+ verdict: "unavailable";
1851
+ /**
1852
+ * Why the verdict is missing — one of {@link SCENE3D_REVIEW_UNAVAILABLE_REASONS}. `"provider"`:
1853
+ * the review never reached its provider. `"unusable"`: it was reached, and answered with nothing
1854
+ * usable. The delivery is the same unreviewed scene either way; the reason changes the sentence
1855
+ * ({@link scene3DReviewNote}), because "did not reach its provider" is untrue of a provider that
1856
+ * answered.
1857
+ */
1858
+ reason: Scene3DReviewUnavailableReason;
1859
+ /**
1860
+ * How many times the review was ASKED — the call plus its retry, so `2` on the common outage and
1861
+ * on an unusable answer. `1` when a provider broke after it had already reported usage: that
1862
+ * asking was paid, so it is not asked a second time. Always a positive integer.
1863
+ */
1864
+ attempts: number;
1865
+ } & Scene3DReviewFindings;
1866
+ /**
1867
+ * Every cause a {@link Scene3DReviewUnavailable} verdict can name, written down ONCE.
1868
+ *
1869
+ * The reader schema (`pro3DRenderReviewVerdictSchema`), {@link scene3DReviewVerdictOf} and
1870
+ * {@link scene3DReviewNote} all read this list rather than spelling their own, so a cause the
1871
+ * engine adds is taught here and nowhere else. A wire value NOT in it is read as `"provider"` by
1872
+ * both tolerant readers — the only cause an older engine emits — instead of discarding a verdict
1873
+ * on a scene that was delivered and paid for.
1874
+ *
1875
+ * - `"provider"` — the review never reached its provider: an outage, or a call that broke before it
1876
+ * produced an answer.
1877
+ * - `"unusable"` — at least one asking REACHED the provider, and no asking got a usable answer
1878
+ * back: an answer that failed the review contract, one that cited a frame the batch never
1879
+ * supplied, or a host refusal that is not a transport fault.
1880
+ */
1881
+ declare const SCENE3D_REVIEW_UNAVAILABLE_REASONS: readonly ["provider", "unusable"];
1882
+ /** One of {@link SCENE3D_REVIEW_UNAVAILABLE_REASONS}. */
1883
+ type Scene3DReviewUnavailableReason = (typeof SCENE3D_REVIEW_UNAVAILABLE_REASONS)[number];
1884
+ /** Whether a wire value is a reason this package knows. The one guard both tolerant readers share. */
1885
+ declare function isScene3DReviewUnavailableReason(value: unknown): value is Scene3DReviewUnavailableReason;
1886
+ /**
1887
+ * The visual reviewer's verdict on a scene that was delivered WITHOUT its approval.
1888
+ *
1889
+ * `verdict` is the discriminant, and it is the only one: an ACCEPTED review produces no verdict
1890
+ * at all, because a result that carries this field is by definition one the reviewer did not
1891
+ * approve. The two arms say WHY it did not — it objected, or it gave no usable answer — and a consumer
1892
+ * that switches on `verdict` gets a compile-time answer for both.
1893
+ *
1894
+ * Deliberately NOT a second `status` field beside `verdict`: a caller written against the
1895
+ * refused-only shape needs one new arm and no re-typing of the arm it already has.
1896
+ */
1897
+ type Scene3DReviewVerdict = Scene3DReviewRefused | Scene3DReviewUnavailable;
1898
+ /**
1899
+ * Whether a delivered result was published WITHOUT the visual reviewer's approval — accepted by
1900
+ * every mandatory assertion, and then either refused by that reviewer or never judged by it.
1901
+ *
1902
+ * The one reader every surface should use, because the discriminant is easy to get wrong:
1903
+ * `validation.status` is `"passed"` on such a result (the assertions did pass), and the warning
1904
+ * array may legitimately hold zero `SCENE_REVIEW_REFUSED` entries for a refusal that raised no
1905
+ * objection. The presence of the verdict is the only reliable test.
1906
+ *
1907
+ * Reading the `"unavailable"` arm is equally the point: a surface that checked
1908
+ * `verdict === "refused"` and stopped would show NOTHING for an unreviewed delivery, which is
1909
+ * indistinguishable from a clean one — the silence this whole module exists to prevent.
1910
+ *
1911
+ * Tolerant like the schemas that parse these results: an `attempts` that is not a positive
1912
+ * integer is clamped to `1` rather than discarding a verdict that is otherwise well-formed. A
1913
+ * verdict this cannot recognise at all returns `undefined`, which the caller reads as "no
1914
+ * verdict" — the same answer an older engine gives.
1915
+ */
1916
+ declare function scene3DReviewVerdictOf(output: unknown): Scene3DReviewVerdict | undefined;
1917
+ /**
1918
+ * One user-safe sentence for a verdict, so the same run is never described two different ways.
1919
+ *
1920
+ * Written down once here for the reason the codes above are: a surface that spells this itself
1921
+ * gets it wrong on the arm it was not thinking about — a banner that reads "the reviewer refused
1922
+ * this scene" for a scene NO reviewer ever saw is worse than no banner, because it invents an
1923
+ * opinion. Callers that want their own wording still have the structured verdict; this is the
1924
+ * default they do not have to write.
1925
+ *
1926
+ * Phrased for the DELIVERED lane, which is the only lane `metadata.review` appears on: the
1927
+ * retained-draft lane publishes no metadata block, and says the same thing through its leading
1928
+ * {@link SCENE3D_REVIEW_UNAVAILABLE_CODE} warning instead.
1929
+ */
1930
+ declare function scene3DReviewNote(verdict: Scene3DReviewVerdict): string;
1931
+
1932
+ /**
1933
+ * The Scene3D v2 PLAN: whole-manifest schema, every cross-field rule, and the
1934
+ * V1|V2 union the rest of the platform reads.
1935
+ *
1936
+ * `scene3d-v2.ts` says what a v2 entity, asset, shot or override looks like on
1937
+ * its own. Nothing there can catch the failures that actually reach a renderer,
1938
+ * because every one of them is a relationship:
1939
+ *
1940
+ * - an entity whose GLB is not in `assets`, or two entities claiming the same
1941
+ * exported root node;
1942
+ * - a parent chain that loops, or nests deeper than the transform walk allows;
1943
+ * - shots with a one-frame gap, so some frame belongs to no shot at all;
1944
+ * - a colour override naming a material role its entity never declared — the
1945
+ * bug where recolouring a person also repaints its chair;
1946
+ * - two overrides driving one channel, or one driving a locked entity;
1947
+ * - declared asset bytes over the download budget.
1948
+ *
1949
+ * All of it runs in `scene3DPlanV2Issues`, which the schema calls from a
1950
+ * `superRefine` and a caller holding an already-parsed plan can call directly —
1951
+ * the same split v1 uses, so both versions report failures identically.
1952
+ */
1953
+
1954
+ /** THE plan type. Narrow with `isScene3DPlanV1` / `isScene3DPlanV2` before
1955
+ * reading version-specific fields. */
1956
+ type Scene3DPlan = Scene3DPlanV1 | Scene3DPlanV2;
1957
+ /**
1958
+ * An advanced (engine-authored) scene job's output. The three
1959
+ * {@link Scene3DAuthoringDelivery} fields are additive and optional — a result from a
1960
+ * deployment without an advanced engine, or from one that predates them, simply has none.
1961
+ */
1962
+ interface Scene3DJobOutputV2 extends Scene3DAuthoringDelivery {
1963
+ scenePlan: Scene3DPlanV2;
1964
+ changeSummary?: string;
1965
+ }
1966
+ /** Job output when either version may come back. */
1967
+ interface Scene3DJobOutputAny extends Scene3DAuthoringDelivery {
1968
+ scenePlan: Scene3DPlan;
1969
+ changeSummary?: string;
1970
+ }
1971
+ type Issue$2 = Scene3DSemanticIssue;
1972
+ /** An overlay is accepted iff the entity advertises the capability AND has not
1973
+ * frozen it. One rule, checked in exactly one place. */
1974
+ declare function scene3DEntityAcceptsOverlay(entity: Scene3DEntityV2, capability: Scene3DEntityCapability): boolean;
1975
+ /**
1976
+ * Every v2 rule that needs more than one field: timing, identity, hierarchy,
1977
+ * asset resolution and budgets, shot coverage, overlay ownership and locks.
1978
+ *
1979
+ * Split out of the schema's `superRefine` (exactly as v1 does) so a caller
1980
+ * holding an already-parsed plan can re-check it without re-parsing.
1981
+ */
1982
+ declare function scene3DPlanV2Issues(plan: Scene3DPlanV2): Issue$2[];
1983
+ /**
1984
+ * The v2 object shape WITHOUT the cross-field pass. Exported so
1985
+ * `scene3DAnyPlanSchema` can discriminate on `schemaVersion`; parse with
1986
+ * `scene3DPlanV2Schema`.
1987
+ *
1988
+ * Deliberately free of `.default()`: `parse(x)` must deep-equal `x`, or a
1989
+ * producer hashing raw JSON and a consumer hashing parsed output would compute
1990
+ * different content hashes for the same revision.
1991
+ */
1992
+ declare const scene3DPlanV2ObjectSchema: z.ZodObject<{
1993
+ planType: z.ZodLiteral<"3d-scene">;
1994
+ schemaVersion: z.ZodLiteral<2>;
1995
+ revisionId: z.ZodUUID;
1996
+ parentRevisionId: z.ZodOptional<z.ZodUUID>;
1997
+ width: z.ZodNumber;
1998
+ height: z.ZodNumber;
1999
+ fps: z.ZodNumber;
2000
+ durationInFrames: z.ZodNumber;
2001
+ units: z.ZodLiteral<"meters">;
2002
+ upAxis: z.ZodLiteral<"Y">;
2003
+ handedness: z.ZodLiteral<"right">;
2004
+ objects: z.ZodArray<z.ZodObject<{
2005
+ id: z.ZodString;
2006
+ name: z.ZodString;
2007
+ parentId: z.ZodOptional<z.ZodString>;
2008
+ role: z.ZodOptional<z.ZodEnum<{
2009
+ other: "other";
2010
+ person: "person";
2011
+ vehicle: "vehicle";
2012
+ prop: "prop";
2013
+ environment: "environment";
2014
+ }>>;
2015
+ position: z.ZodOptional<z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>>;
2016
+ rotation: z.ZodOptional<z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>>;
2017
+ scale: z.ZodOptional<z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>>;
2018
+ visible: z.ZodOptional<z.ZodBoolean>;
2019
+ identityColor: z.ZodOptional<z.ZodString>;
2020
+ anchors: z.ZodOptional<z.ZodArray<z.ZodObject<{
2021
+ name: z.ZodString;
2022
+ position: z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>;
2023
+ nodeName: z.ZodOptional<z.ZodString>;
2024
+ rotation: z.ZodOptional<z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>>;
2025
+ }, z.core.$strict>>>;
2026
+ capabilities: z.ZodOptional<z.ZodArray<z.ZodEnum<{
2027
+ color: "color";
2028
+ transform: "transform";
2029
+ visibility: "visibility";
2030
+ }>>>;
2031
+ locks: z.ZodOptional<z.ZodArray<z.ZodEnum<{
2032
+ color: "color";
2033
+ transform: "transform";
2034
+ visibility: "visibility";
2035
+ }>>>;
2036
+ materialBindings: z.ZodOptional<z.ZodArray<z.ZodObject<{
2037
+ role: z.ZodString;
2038
+ materialName: z.ZodString;
2039
+ color: z.ZodOptional<z.ZodString>;
2040
+ roughness: z.ZodOptional<z.ZodNumber>;
2041
+ }, z.core.$strict>>>;
2042
+ visual: z.ZodDiscriminatedUnion<[z.ZodObject<{
2043
+ kind: z.ZodLiteral<"group">;
2044
+ }, z.core.$strict>, z.ZodObject<{
2045
+ kind: z.ZodLiteral<"primitive">;
2046
+ primitive: z.ZodEnum<{
2047
+ box: "box";
2048
+ sphere: "sphere";
2049
+ cylinder: "cylinder";
2050
+ cone: "cone";
2051
+ plane: "plane";
2052
+ capsule: "capsule";
2053
+ }>;
2054
+ dimensions: z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>;
2055
+ color: z.ZodString;
2056
+ }, z.core.$strict>, z.ZodObject<{
2057
+ kind: z.ZodLiteral<"asset">;
2058
+ assetId: z.ZodString;
2059
+ rootNodeId: z.ZodString;
2060
+ animation: z.ZodOptional<z.ZodObject<{
2061
+ clipName: z.ZodString;
2062
+ startFrame: z.ZodNumber;
2063
+ endFrameExclusive: z.ZodNumber;
2064
+ loop: z.ZodOptional<z.ZodBoolean>;
2065
+ }, z.core.$strict>>;
2066
+ }, z.core.$strict>], "kind">;
2067
+ }, z.core.$strict>>;
2068
+ assets: z.ZodArray<z.ZodObject<{
2069
+ assetId: z.ZodString;
2070
+ kind: z.ZodEnum<{
2071
+ glb: "glb";
2072
+ "camera-track-json": "camera-track-json";
2073
+ poster: "poster";
2074
+ "validation-report": "validation-report";
2075
+ "blend-source": "blend-source";
2076
+ }>;
2077
+ role: z.ZodEnum<{
2078
+ source: "source";
2079
+ poster: "poster";
2080
+ "validation-report": "validation-report";
2081
+ "scene-geometry": "scene-geometry";
2082
+ "entity-geometry": "entity-geometry";
2083
+ "camera-track": "camera-track";
2084
+ }>;
2085
+ byteLength: z.ZodNumber;
2086
+ sha256: z.ZodString;
2087
+ originRevisionId: z.ZodOptional<z.ZodUUID>;
2088
+ }, z.core.$strict>>;
2089
+ cameraTrackAssetId: z.ZodString;
2090
+ shots: z.ZodArray<z.ZodObject<{
2091
+ id: z.ZodString;
2092
+ startFrame: z.ZodNumber;
2093
+ endFrameExclusive: z.ZodNumber;
2094
+ label: z.ZodOptional<z.ZodString>;
2095
+ subjectEntityIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
2096
+ foregroundEntityIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
2097
+ }, z.core.$strict>>;
2098
+ lighting: z.ZodObject<{
2099
+ preset: z.ZodEnum<{
2100
+ "clay-studio-v1": "clay-studio-v1";
2101
+ "clay-studio-v2": "clay-studio-v2";
2102
+ }>;
2103
+ ambientIntensity: z.ZodNumber;
2104
+ keyIntensity: z.ZodNumber;
2105
+ keyPosition: z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>;
2106
+ }, z.core.$strict>;
2107
+ backgroundColor: z.ZodString;
2108
+ references: z.ZodOptional<z.ZodArray<z.ZodObject<{
2109
+ id: z.ZodString;
2110
+ url: z.ZodString;
2111
+ kind: z.ZodEnum<{
2112
+ image: "image";
2113
+ video: "video";
2114
+ }>;
2115
+ role: z.ZodEnum<{
2116
+ motion: "motion";
2117
+ layout: "layout";
2118
+ appearance: "appearance";
2119
+ }>;
2120
+ objectId: z.ZodOptional<z.ZodString>;
2121
+ startSeconds: z.ZodOptional<z.ZodNumber>;
2122
+ endSeconds: z.ZodOptional<z.ZodNumber>;
2123
+ }, z.core.$strict>>>;
2124
+ overrides: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
2125
+ kind: z.ZodLiteral<"entity-transform">;
2126
+ entityId: z.ZodString;
2127
+ space: z.ZodEnum<{
2128
+ local: "local";
2129
+ world: "world";
2130
+ }>;
2131
+ position: z.ZodOptional<z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>>;
2132
+ rotation: z.ZodOptional<z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>>;
2133
+ scale: z.ZodOptional<z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>>;
2134
+ id: z.ZodString;
2135
+ sourceRevisionId: z.ZodUUID;
2136
+ sourceContentHash: z.ZodString;
2137
+ operationVersion: z.ZodNumber;
2138
+ }, z.core.$strict>, z.ZodObject<{
2139
+ kind: z.ZodLiteral<"entity-color">;
2140
+ entityId: z.ZodString;
2141
+ materialRole: z.ZodString;
2142
+ color: z.ZodString;
2143
+ id: z.ZodString;
2144
+ sourceRevisionId: z.ZodUUID;
2145
+ sourceContentHash: z.ZodString;
2146
+ operationVersion: z.ZodNumber;
2147
+ }, z.core.$strict>, z.ZodObject<{
2148
+ kind: z.ZodLiteral<"entity-visibility">;
2149
+ entityId: z.ZodString;
2150
+ visible: z.ZodBoolean;
2151
+ id: z.ZodString;
2152
+ sourceRevisionId: z.ZodUUID;
2153
+ sourceContentHash: z.ZodString;
2154
+ operationVersion: z.ZodNumber;
2155
+ }, z.core.$strict>, z.ZodObject<{
2156
+ kind: z.ZodLiteral<"camera-shot-offset">;
2157
+ shotId: z.ZodString;
2158
+ positionOffset: z.ZodOptional<z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>>;
2159
+ targetOffset: z.ZodOptional<z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>>;
2160
+ id: z.ZodString;
2161
+ sourceRevisionId: z.ZodUUID;
2162
+ sourceContentHash: z.ZodString;
2163
+ operationVersion: z.ZodNumber;
2164
+ }, z.core.$strict>], "kind">>>;
2165
+ provenance: z.ZodObject<{
2166
+ engine: z.ZodString;
2167
+ engineVersion: z.ZodString;
2168
+ recipeVersion: z.ZodString;
2169
+ compilerVersion: z.ZodString;
2170
+ exporterVersion: z.ZodString;
2171
+ rendererVersion: z.ZodString;
2172
+ sourceRevisionId: z.ZodOptional<z.ZodUUID>;
2173
+ sourceArtifactId: z.ZodOptional<z.ZodString>;
2174
+ contentHash: z.ZodString;
2175
+ }, z.core.$strict>;
2176
+ }, z.core.$strict>;
2177
+ /** THE v2 plan validator: structure first, then the cross-field rules. */
2178
+ declare const scene3DPlanV2Schema: z.ZodObject<{
2179
+ planType: z.ZodLiteral<"3d-scene">;
2180
+ schemaVersion: z.ZodLiteral<2>;
2181
+ revisionId: z.ZodUUID;
2182
+ parentRevisionId: z.ZodOptional<z.ZodUUID>;
2183
+ width: z.ZodNumber;
2184
+ height: z.ZodNumber;
2185
+ fps: z.ZodNumber;
2186
+ durationInFrames: z.ZodNumber;
2187
+ units: z.ZodLiteral<"meters">;
2188
+ upAxis: z.ZodLiteral<"Y">;
2189
+ handedness: z.ZodLiteral<"right">;
2190
+ objects: z.ZodArray<z.ZodObject<{
2191
+ id: z.ZodString;
2192
+ name: z.ZodString;
2193
+ parentId: z.ZodOptional<z.ZodString>;
2194
+ role: z.ZodOptional<z.ZodEnum<{
2195
+ other: "other";
2196
+ person: "person";
2197
+ vehicle: "vehicle";
2198
+ prop: "prop";
2199
+ environment: "environment";
2200
+ }>>;
2201
+ position: z.ZodOptional<z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>>;
2202
+ rotation: z.ZodOptional<z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>>;
2203
+ scale: z.ZodOptional<z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>>;
2204
+ visible: z.ZodOptional<z.ZodBoolean>;
2205
+ identityColor: z.ZodOptional<z.ZodString>;
2206
+ anchors: z.ZodOptional<z.ZodArray<z.ZodObject<{
2207
+ name: z.ZodString;
2208
+ position: z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>;
2209
+ nodeName: z.ZodOptional<z.ZodString>;
2210
+ rotation: z.ZodOptional<z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>>;
2211
+ }, z.core.$strict>>>;
2212
+ capabilities: z.ZodOptional<z.ZodArray<z.ZodEnum<{
2213
+ color: "color";
2214
+ transform: "transform";
2215
+ visibility: "visibility";
2216
+ }>>>;
2217
+ locks: z.ZodOptional<z.ZodArray<z.ZodEnum<{
2218
+ color: "color";
2219
+ transform: "transform";
2220
+ visibility: "visibility";
2221
+ }>>>;
2222
+ materialBindings: z.ZodOptional<z.ZodArray<z.ZodObject<{
2223
+ role: z.ZodString;
2224
+ materialName: z.ZodString;
2225
+ color: z.ZodOptional<z.ZodString>;
2226
+ roughness: z.ZodOptional<z.ZodNumber>;
2227
+ }, z.core.$strict>>>;
2228
+ visual: z.ZodDiscriminatedUnion<[z.ZodObject<{
2229
+ kind: z.ZodLiteral<"group">;
2230
+ }, z.core.$strict>, z.ZodObject<{
2231
+ kind: z.ZodLiteral<"primitive">;
2232
+ primitive: z.ZodEnum<{
2233
+ box: "box";
2234
+ sphere: "sphere";
2235
+ cylinder: "cylinder";
2236
+ cone: "cone";
2237
+ plane: "plane";
2238
+ capsule: "capsule";
2239
+ }>;
2240
+ dimensions: z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>;
2241
+ color: z.ZodString;
2242
+ }, z.core.$strict>, z.ZodObject<{
2243
+ kind: z.ZodLiteral<"asset">;
2244
+ assetId: z.ZodString;
2245
+ rootNodeId: z.ZodString;
2246
+ animation: z.ZodOptional<z.ZodObject<{
2247
+ clipName: z.ZodString;
2248
+ startFrame: z.ZodNumber;
2249
+ endFrameExclusive: z.ZodNumber;
2250
+ loop: z.ZodOptional<z.ZodBoolean>;
2251
+ }, z.core.$strict>>;
2252
+ }, z.core.$strict>], "kind">;
2253
+ }, z.core.$strict>>;
2254
+ assets: z.ZodArray<z.ZodObject<{
2255
+ assetId: z.ZodString;
2256
+ kind: z.ZodEnum<{
2257
+ glb: "glb";
2258
+ "camera-track-json": "camera-track-json";
2259
+ poster: "poster";
2260
+ "validation-report": "validation-report";
2261
+ "blend-source": "blend-source";
2262
+ }>;
2263
+ role: z.ZodEnum<{
2264
+ source: "source";
2265
+ poster: "poster";
2266
+ "validation-report": "validation-report";
2267
+ "scene-geometry": "scene-geometry";
2268
+ "entity-geometry": "entity-geometry";
2269
+ "camera-track": "camera-track";
2270
+ }>;
2271
+ byteLength: z.ZodNumber;
2272
+ sha256: z.ZodString;
2273
+ originRevisionId: z.ZodOptional<z.ZodUUID>;
2274
+ }, z.core.$strict>>;
2275
+ cameraTrackAssetId: z.ZodString;
2276
+ shots: z.ZodArray<z.ZodObject<{
2277
+ id: z.ZodString;
2278
+ startFrame: z.ZodNumber;
2279
+ endFrameExclusive: z.ZodNumber;
2280
+ label: z.ZodOptional<z.ZodString>;
2281
+ subjectEntityIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
2282
+ foregroundEntityIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
2283
+ }, z.core.$strict>>;
2284
+ lighting: z.ZodObject<{
2285
+ preset: z.ZodEnum<{
2286
+ "clay-studio-v1": "clay-studio-v1";
2287
+ "clay-studio-v2": "clay-studio-v2";
2288
+ }>;
2289
+ ambientIntensity: z.ZodNumber;
2290
+ keyIntensity: z.ZodNumber;
2291
+ keyPosition: z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>;
2292
+ }, z.core.$strict>;
2293
+ backgroundColor: z.ZodString;
2294
+ references: z.ZodOptional<z.ZodArray<z.ZodObject<{
2295
+ id: z.ZodString;
2296
+ url: z.ZodString;
2297
+ kind: z.ZodEnum<{
2298
+ image: "image";
2299
+ video: "video";
2300
+ }>;
2301
+ role: z.ZodEnum<{
2302
+ motion: "motion";
2303
+ layout: "layout";
2304
+ appearance: "appearance";
2305
+ }>;
2306
+ objectId: z.ZodOptional<z.ZodString>;
2307
+ startSeconds: z.ZodOptional<z.ZodNumber>;
2308
+ endSeconds: z.ZodOptional<z.ZodNumber>;
2309
+ }, z.core.$strict>>>;
2310
+ overrides: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
2311
+ kind: z.ZodLiteral<"entity-transform">;
2312
+ entityId: z.ZodString;
2313
+ space: z.ZodEnum<{
2314
+ local: "local";
2315
+ world: "world";
2316
+ }>;
2317
+ position: z.ZodOptional<z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>>;
2318
+ rotation: z.ZodOptional<z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>>;
2319
+ scale: z.ZodOptional<z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>>;
2320
+ id: z.ZodString;
2321
+ sourceRevisionId: z.ZodUUID;
2322
+ sourceContentHash: z.ZodString;
2323
+ operationVersion: z.ZodNumber;
2324
+ }, z.core.$strict>, z.ZodObject<{
2325
+ kind: z.ZodLiteral<"entity-color">;
2326
+ entityId: z.ZodString;
2327
+ materialRole: z.ZodString;
2328
+ color: z.ZodString;
2329
+ id: z.ZodString;
2330
+ sourceRevisionId: z.ZodUUID;
2331
+ sourceContentHash: z.ZodString;
2332
+ operationVersion: z.ZodNumber;
2333
+ }, z.core.$strict>, z.ZodObject<{
2334
+ kind: z.ZodLiteral<"entity-visibility">;
2335
+ entityId: z.ZodString;
2336
+ visible: z.ZodBoolean;
2337
+ id: z.ZodString;
2338
+ sourceRevisionId: z.ZodUUID;
2339
+ sourceContentHash: z.ZodString;
2340
+ operationVersion: z.ZodNumber;
2341
+ }, z.core.$strict>, z.ZodObject<{
2342
+ kind: z.ZodLiteral<"camera-shot-offset">;
2343
+ shotId: z.ZodString;
2344
+ positionOffset: z.ZodOptional<z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>>;
2345
+ targetOffset: z.ZodOptional<z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>>;
2346
+ id: z.ZodString;
2347
+ sourceRevisionId: z.ZodUUID;
2348
+ sourceContentHash: z.ZodString;
2349
+ operationVersion: z.ZodNumber;
2350
+ }, z.core.$strict>], "kind">>>;
2351
+ provenance: z.ZodObject<{
2352
+ engine: z.ZodString;
2353
+ engineVersion: z.ZodString;
2354
+ recipeVersion: z.ZodString;
2355
+ compilerVersion: z.ZodString;
2356
+ exporterVersion: z.ZodString;
2357
+ rendererVersion: z.ZodString;
2358
+ sourceRevisionId: z.ZodOptional<z.ZodUUID>;
2359
+ sourceArtifactId: z.ZodOptional<z.ZodString>;
2360
+ contentHash: z.ZodString;
2361
+ }, z.core.$strict>;
2362
+ }, z.core.$strict>;
2363
+ /**
2364
+ * Either version, discriminated on `schemaVersion` — so an unknown version
2365
+ * reports "Invalid discriminator value. Expected '1' | '2'" instead of a pile
2366
+ * of unknown-key errors from whichever branch failed last.
2367
+ */
2368
+ declare const scene3DAnyPlanSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
2369
+ planType: z.ZodLiteral<"3d-scene">;
2370
+ schemaVersion: z.ZodLiteral<1>;
2371
+ revisionId: z.ZodUUID;
2372
+ parentRevisionId: z.ZodOptional<z.ZodUUID>;
2373
+ width: z.ZodNumber;
2374
+ height: z.ZodNumber;
2375
+ fps: z.ZodNumber;
2376
+ durationInFrames: z.ZodNumber;
2377
+ backgroundColor: z.ZodString;
2378
+ camera: z.ZodObject<{
2379
+ position: z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>;
2380
+ target: z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>;
2381
+ focalLengthMm: z.ZodNumber;
2382
+ sensorWidthMm: z.ZodDefault<z.ZodNumber>;
2383
+ keyframes: z.ZodOptional<z.ZodArray<z.ZodObject<{
2384
+ frame: z.ZodNumber;
2385
+ position: z.ZodOptional<z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>>;
2386
+ target: z.ZodOptional<z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>>;
2387
+ focalLengthMm: z.ZodOptional<z.ZodNumber>;
2388
+ easing: z.ZodOptional<z.ZodEnum<{
2389
+ linear: "linear";
2390
+ easeInOut: "easeInOut";
2391
+ }>>;
2392
+ }, z.core.$strict>>>;
2393
+ }, z.core.$strict>;
2394
+ objects: z.ZodArray<z.ZodObject<{
2395
+ id: z.ZodString;
2396
+ name: z.ZodString;
2397
+ primitive: z.ZodEnum<{
2398
+ group: "group";
2399
+ box: "box";
2400
+ sphere: "sphere";
2401
+ cylinder: "cylinder";
2402
+ cone: "cone";
2403
+ plane: "plane";
2404
+ capsule: "capsule";
2405
+ }>;
2406
+ parentId: z.ZodOptional<z.ZodString>;
2407
+ dimensions: z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>;
2408
+ position: z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>;
2409
+ rotation: z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>;
2410
+ scale: z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>;
2411
+ color: z.ZodString;
2412
+ keyframes: z.ZodOptional<z.ZodArray<z.ZodObject<{
2413
+ frame: z.ZodNumber;
2414
+ position: z.ZodOptional<z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>>;
2415
+ rotation: z.ZodOptional<z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>>;
2416
+ scale: z.ZodOptional<z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>>;
2417
+ easing: z.ZodOptional<z.ZodEnum<{
2418
+ linear: "linear";
2419
+ easeInOut: "easeInOut";
2420
+ }>>;
2421
+ }, z.core.$strict>>>;
2422
+ }, z.core.$strict>>;
2423
+ lighting: z.ZodObject<{
2424
+ ambientIntensity: z.ZodNumber;
2425
+ keyIntensity: z.ZodNumber;
2426
+ keyPosition: z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>;
2427
+ }, z.core.$strict>;
2428
+ references: z.ZodOptional<z.ZodArray<z.ZodObject<{
2429
+ id: z.ZodString;
2430
+ url: z.ZodString;
2431
+ kind: z.ZodEnum<{
2432
+ image: "image";
2433
+ video: "video";
2434
+ }>;
2435
+ role: z.ZodEnum<{
2436
+ motion: "motion";
2437
+ layout: "layout";
2438
+ appearance: "appearance";
2439
+ }>;
2440
+ objectId: z.ZodOptional<z.ZodString>;
2441
+ startSeconds: z.ZodOptional<z.ZodNumber>;
2442
+ endSeconds: z.ZodOptional<z.ZodNumber>;
2443
+ }, z.core.$strict>>>;
2444
+ }, z.core.$strict>, z.ZodObject<{
2445
+ planType: z.ZodLiteral<"3d-scene">;
2446
+ schemaVersion: z.ZodLiteral<2>;
2447
+ revisionId: z.ZodUUID;
2448
+ parentRevisionId: z.ZodOptional<z.ZodUUID>;
2449
+ width: z.ZodNumber;
2450
+ height: z.ZodNumber;
2451
+ fps: z.ZodNumber;
2452
+ durationInFrames: z.ZodNumber;
2453
+ units: z.ZodLiteral<"meters">;
2454
+ upAxis: z.ZodLiteral<"Y">;
2455
+ handedness: z.ZodLiteral<"right">;
2456
+ objects: z.ZodArray<z.ZodObject<{
2457
+ id: z.ZodString;
2458
+ name: z.ZodString;
2459
+ parentId: z.ZodOptional<z.ZodString>;
2460
+ role: z.ZodOptional<z.ZodEnum<{
2461
+ other: "other";
2462
+ person: "person";
2463
+ vehicle: "vehicle";
2464
+ prop: "prop";
2465
+ environment: "environment";
2466
+ }>>;
2467
+ position: z.ZodOptional<z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>>;
2468
+ rotation: z.ZodOptional<z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>>;
2469
+ scale: z.ZodOptional<z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>>;
2470
+ visible: z.ZodOptional<z.ZodBoolean>;
2471
+ identityColor: z.ZodOptional<z.ZodString>;
2472
+ anchors: z.ZodOptional<z.ZodArray<z.ZodObject<{
2473
+ name: z.ZodString;
2474
+ position: z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>;
2475
+ nodeName: z.ZodOptional<z.ZodString>;
2476
+ rotation: z.ZodOptional<z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>>;
2477
+ }, z.core.$strict>>>;
2478
+ capabilities: z.ZodOptional<z.ZodArray<z.ZodEnum<{
2479
+ color: "color";
2480
+ transform: "transform";
2481
+ visibility: "visibility";
2482
+ }>>>;
2483
+ locks: z.ZodOptional<z.ZodArray<z.ZodEnum<{
2484
+ color: "color";
2485
+ transform: "transform";
2486
+ visibility: "visibility";
2487
+ }>>>;
2488
+ materialBindings: z.ZodOptional<z.ZodArray<z.ZodObject<{
2489
+ role: z.ZodString;
2490
+ materialName: z.ZodString;
2491
+ color: z.ZodOptional<z.ZodString>;
2492
+ roughness: z.ZodOptional<z.ZodNumber>;
2493
+ }, z.core.$strict>>>;
2494
+ visual: z.ZodDiscriminatedUnion<[z.ZodObject<{
2495
+ kind: z.ZodLiteral<"group">;
2496
+ }, z.core.$strict>, z.ZodObject<{
2497
+ kind: z.ZodLiteral<"primitive">;
2498
+ primitive: z.ZodEnum<{
2499
+ box: "box";
2500
+ sphere: "sphere";
2501
+ cylinder: "cylinder";
2502
+ cone: "cone";
2503
+ plane: "plane";
2504
+ capsule: "capsule";
2505
+ }>;
2506
+ dimensions: z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>;
2507
+ color: z.ZodString;
2508
+ }, z.core.$strict>, z.ZodObject<{
2509
+ kind: z.ZodLiteral<"asset">;
2510
+ assetId: z.ZodString;
2511
+ rootNodeId: z.ZodString;
2512
+ animation: z.ZodOptional<z.ZodObject<{
2513
+ clipName: z.ZodString;
2514
+ startFrame: z.ZodNumber;
2515
+ endFrameExclusive: z.ZodNumber;
2516
+ loop: z.ZodOptional<z.ZodBoolean>;
2517
+ }, z.core.$strict>>;
2518
+ }, z.core.$strict>], "kind">;
2519
+ }, z.core.$strict>>;
2520
+ assets: z.ZodArray<z.ZodObject<{
2521
+ assetId: z.ZodString;
2522
+ kind: z.ZodEnum<{
2523
+ glb: "glb";
2524
+ "camera-track-json": "camera-track-json";
2525
+ poster: "poster";
2526
+ "validation-report": "validation-report";
2527
+ "blend-source": "blend-source";
2528
+ }>;
2529
+ role: z.ZodEnum<{
2530
+ source: "source";
2531
+ poster: "poster";
2532
+ "validation-report": "validation-report";
2533
+ "scene-geometry": "scene-geometry";
2534
+ "entity-geometry": "entity-geometry";
2535
+ "camera-track": "camera-track";
2536
+ }>;
2537
+ byteLength: z.ZodNumber;
2538
+ sha256: z.ZodString;
2539
+ originRevisionId: z.ZodOptional<z.ZodUUID>;
2540
+ }, z.core.$strict>>;
2541
+ cameraTrackAssetId: z.ZodString;
2542
+ shots: z.ZodArray<z.ZodObject<{
2543
+ id: z.ZodString;
2544
+ startFrame: z.ZodNumber;
2545
+ endFrameExclusive: z.ZodNumber;
2546
+ label: z.ZodOptional<z.ZodString>;
2547
+ subjectEntityIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
2548
+ foregroundEntityIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
2549
+ }, z.core.$strict>>;
2550
+ lighting: z.ZodObject<{
2551
+ preset: z.ZodEnum<{
2552
+ "clay-studio-v1": "clay-studio-v1";
2553
+ "clay-studio-v2": "clay-studio-v2";
2554
+ }>;
2555
+ ambientIntensity: z.ZodNumber;
2556
+ keyIntensity: z.ZodNumber;
2557
+ keyPosition: z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>;
2558
+ }, z.core.$strict>;
2559
+ backgroundColor: z.ZodString;
2560
+ references: z.ZodOptional<z.ZodArray<z.ZodObject<{
2561
+ id: z.ZodString;
2562
+ url: z.ZodString;
2563
+ kind: z.ZodEnum<{
2564
+ image: "image";
2565
+ video: "video";
2566
+ }>;
2567
+ role: z.ZodEnum<{
2568
+ motion: "motion";
2569
+ layout: "layout";
2570
+ appearance: "appearance";
2571
+ }>;
2572
+ objectId: z.ZodOptional<z.ZodString>;
2573
+ startSeconds: z.ZodOptional<z.ZodNumber>;
2574
+ endSeconds: z.ZodOptional<z.ZodNumber>;
2575
+ }, z.core.$strict>>>;
2576
+ overrides: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
2577
+ kind: z.ZodLiteral<"entity-transform">;
2578
+ entityId: z.ZodString;
2579
+ space: z.ZodEnum<{
2580
+ local: "local";
2581
+ world: "world";
2582
+ }>;
2583
+ position: z.ZodOptional<z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>>;
2584
+ rotation: z.ZodOptional<z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>>;
2585
+ scale: z.ZodOptional<z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>>;
2586
+ id: z.ZodString;
2587
+ sourceRevisionId: z.ZodUUID;
2588
+ sourceContentHash: z.ZodString;
2589
+ operationVersion: z.ZodNumber;
2590
+ }, z.core.$strict>, z.ZodObject<{
2591
+ kind: z.ZodLiteral<"entity-color">;
2592
+ entityId: z.ZodString;
2593
+ materialRole: z.ZodString;
2594
+ color: z.ZodString;
2595
+ id: z.ZodString;
2596
+ sourceRevisionId: z.ZodUUID;
2597
+ sourceContentHash: z.ZodString;
2598
+ operationVersion: z.ZodNumber;
2599
+ }, z.core.$strict>, z.ZodObject<{
2600
+ kind: z.ZodLiteral<"entity-visibility">;
2601
+ entityId: z.ZodString;
2602
+ visible: z.ZodBoolean;
2603
+ id: z.ZodString;
2604
+ sourceRevisionId: z.ZodUUID;
2605
+ sourceContentHash: z.ZodString;
2606
+ operationVersion: z.ZodNumber;
2607
+ }, z.core.$strict>, z.ZodObject<{
2608
+ kind: z.ZodLiteral<"camera-shot-offset">;
2609
+ shotId: z.ZodString;
2610
+ positionOffset: z.ZodOptional<z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>>;
2611
+ targetOffset: z.ZodOptional<z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>>;
2612
+ id: z.ZodString;
2613
+ sourceRevisionId: z.ZodUUID;
2614
+ sourceContentHash: z.ZodString;
2615
+ operationVersion: z.ZodNumber;
2616
+ }, z.core.$strict>], "kind">>>;
2617
+ provenance: z.ZodObject<{
2618
+ engine: z.ZodString;
2619
+ engineVersion: z.ZodString;
2620
+ recipeVersion: z.ZodString;
2621
+ compilerVersion: z.ZodString;
2622
+ exporterVersion: z.ZodString;
2623
+ rendererVersion: z.ZodString;
2624
+ sourceRevisionId: z.ZodOptional<z.ZodUUID>;
2625
+ sourceArtifactId: z.ZodOptional<z.ZodString>;
2626
+ contentHash: z.ZodString;
2627
+ }, z.core.$strict>;
2628
+ }, z.core.$strict>], "schemaVersion">;
2629
+ /** Zod for a client's `acceptedSceneSchemaVersions`. */
2630
+ declare const scene3DAcceptedSchemaVersionsSchema: z.ZodArray<z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>]>>;
2631
+ declare function isScene3DPlanV2(value: unknown): value is Scene3DPlanV2;
2632
+ /** Accepts EITHER version. `isScene3DPlanV1` (in `scene3d.ts`) is the v1-only
2633
+ * form; narrow with one of them before reading version-specific fields. */
2634
+ declare function isScene3DPlan(value: unknown): value is Scene3DPlan;
2635
+ /**
2636
+ * The schema version a value CLAIMS, without validating the rest of it.
2637
+ *
2638
+ * Returns the number even when this package cannot handle it, so an SDK
2639
+ * consumer can say "this scene is v3, upgrade to render it" instead of "invalid
2640
+ * plan". `null` means it is not a Scene3D plan at all.
2641
+ */
2642
+ declare function scene3DPlanSchemaVersion(value: unknown): number | null;
2643
+ declare function isScene3DSchemaVersionSupported(version: number): version is Scene3DSupportedSchemaVersion;
2644
+ declare function isKnownScene3DEngine(engine: string): engine is Scene3DKnownEngine;
2645
+ /**
2646
+ * The shot owning `frame`, or `-1`. Ranges are half-open and contiguous, so
2647
+ * this is total over `[0, durationInFrames)` on a validated plan — and it is
2648
+ * the ONLY place a renderer decides which side of a cut a frame is on.
2649
+ */
2650
+ declare function scene3DShotIndexForFrame(shots: readonly Scene3DShot[], frame: number): number;
2651
+ declare function scene3DShotForFrame(shots: readonly Scene3DShot[], frame: number): Scene3DShot | undefined;
2652
+
2653
+ /**
2654
+ * Scene3D v2 resource admission and revision identity.
2655
+ *
2656
+ * Two gates and one hash, all of which have to agree across the builder, the
2657
+ * platform route and the renderer — so they live in one published place instead
2658
+ * of being re-derived three times.
2659
+ *
2660
+ * **Pre-allocation gate** (`scene3DV2AdmissionIssues`). Everything checkable
2661
+ * from the manifest alone, BEFORE a byte is fetched or a decoder is handed
2662
+ * anything: declared asset sizes, counts, timeline length, hierarchy depth, and
2663
+ * the decoded size of the manifest itself. A limit enforced after the download
2664
+ * is not a limit.
2665
+ *
2666
+ * **Post-decode gate** (`scene3DV2NormalizationIssues`). What only the actual
2667
+ * bytes can answer: real length versus declared, digest versus declared,
2668
+ * triangles, mesh nodes, node depth, image dimensions. A 2 MiB GLB can decode
2669
+ * to a hundred million triangles, so compression never waives a geometry
2670
+ * budget.
2671
+ *
2672
+ * **Content hash.** The canonical form of a revision, which is what makes
2673
+ * "these two revisions are the same scene" a decidable question — for
2674
+ * content-addressed caching, and for asserting after a rebuild that the entities
2675
+ * the user locked really did come back unchanged.
2676
+ */
2677
+
2678
+ type Issue$1 = Scene3DSemanticIssue;
2679
+ interface Scene3DV2ResourceUsage {
2680
+ entities: number;
2681
+ assets: number;
2682
+ shots: number;
2683
+ overrides: number;
2684
+ references: number;
2685
+ frames: number;
2686
+ durationSeconds: number;
2687
+ /** Deepest entity parent chain, 1 for a flat scene. */
2688
+ hierarchyDepth: number;
2689
+ /** Declared bytes of everything the browser downloads. */
2690
+ rendererAssetBytes: number;
2691
+ /** Declared bytes of the camera sidecar. */
2692
+ cameraTrackBytes: number;
2693
+ /** Declared bytes of the retained native source, which the browser never sees. */
2694
+ blendSourceBytes: number;
2695
+ }
2696
+ /** Deepest parent chain, counting the entity itself. Bounded by the entity
2697
+ * count even on a cyclic plan, so it is safe to call before validation. */
2698
+ declare function scene3DV2HierarchyDepth(entities: readonly Scene3DEntityV2[]): number;
2699
+ /** What this manifest CLAIMS it will cost. Also the shape a capabilities or
2700
+ * quote surface displays — it is derived, never authored. */
2701
+ declare function scene3DV2ResourceUsage(plan: Scene3DPlanV2): Scene3DV2ResourceUsage;
2702
+ /**
2703
+ * The pre-allocation gate. `manifestBytes` is the DECODED size of the manifest
2704
+ * as it arrived — pass it when admitting a downloaded manifest, omit it when
2705
+ * the plan is already in memory.
2706
+ *
2707
+ * Most of these are also enforced by `scene3DPlanV2Schema`; this function is
2708
+ * what a caller runs when it wants the budget answer without re-parsing, and
2709
+ * what makes the ceilings quotable in one place by capabilities and docs.
2710
+ */
2711
+ declare function scene3DV2AdmissionIssues(plan: Scene3DPlanV2, manifestBytes?: number): Issue$1[];
2712
+ /**
2713
+ * What the normalizer measured on the ACTUAL bytes of one asset. Optional
2714
+ * fields are "not applicable to this kind" — a poster has image dimensions and
2715
+ * no triangles; a GLB is the other way round.
2716
+ */
2717
+ interface Scene3DNormalizedAssetStats {
2718
+ assetId: string;
2719
+ kind: Scene3DAssetKind;
2720
+ /** Decoded length, after any transport compression. */
2721
+ byteLength: number;
2722
+ /** Digest of the decoded bytes, lowercase hex, when computed. */
2723
+ sha256?: string;
2724
+ meshNodes?: number;
2725
+ triangles?: number;
2726
+ /** Deepest node chain inside the asset's own scene graph. */
2727
+ maxNodeDepth?: number;
2728
+ imageWidth?: number;
2729
+ imageHeight?: number;
2730
+ }
2731
+ /**
2732
+ * The post-decode gate: does what arrived match what the manifest promised, and
2733
+ * does the resolved geometry fit the budget?
2734
+ *
2735
+ * Mesh nodes and triangles are summed ACROSS assets — the ceiling is on the
2736
+ * scene the renderer assembles, not on any single file.
2737
+ */
2738
+ declare function scene3DV2NormalizationIssues(plan: Scene3DPlanV2, stats: readonly Scene3DNormalizedAssetStats[]): Issue$1[];
2739
+ /** Size-gate on the bytes, then parse, then the full v2 schema. Refuses an
2740
+ * oversized manifest before `JSON.parse` allocates it. */
2741
+ declare function parseScene3DPlanV2Json(text: string): Scene3DParseResult<Scene3DPlanV2>;
2742
+ /**
2743
+ * Fields excluded from the canonical form.
2744
+ *
2745
+ * `revisionId`/`parentRevisionId` are IDENTITY, not content: two revisions with
2746
+ * the same scene must hash the same, or a content-addressed cache never hits
2747
+ * and "did the rebuild preserve the locked entities?" cannot be answered by
2748
+ * comparing hashes. `provenance.contentHash` is excluded because a value cannot
2749
+ * contain its own hash.
2750
+ *
2751
+ * Everything else is in — entities, anchors, material bindings, overrides, asset
2752
+ * digests, shots, lighting, provenance versions.
2753
+ */
2754
+ declare const SCENE3D_V2_CONTENT_HASH_EXCLUDED: readonly ["revisionId", "parentRevisionId"];
2755
+ /**
2756
+ * The exact bytes a revision's content hash is computed over: recursively
2757
+ * key-sorted JSON with the identity fields removed. Key order in the input
2758
+ * cannot change the result, so a manifest that survives a round-trip through a
2759
+ * database or a re-serialization still hashes the same.
2760
+ */
2761
+ declare function canonicalScene3DPlanV2Json(plan: Scene3DPlanV2): string;
2762
+ /**
2763
+ * SHA-256 of the canonical form, lowercase hex — the value that belongs in
2764
+ * `provenance.contentHash`. Uses WebCrypto, which the browser, Node 18+ and the
2765
+ * Remotion renderer all expose, so producer and consumer compute it the same
2766
+ * way.
2767
+ */
2768
+ declare function computeScene3DPlanV2ContentHash(plan: Scene3DPlanV2): Promise<string>;
2769
+ /** Does the manifest's declared `provenance.contentHash` match its content? */
2770
+ declare function verifyScene3DPlanV2ContentHash(plan: Scene3DPlanV2): Promise<boolean>;
2771
+
2772
+ /**
2773
+ * The Scene3D v2 camera sidecar — one baked sample per frame.
2774
+ *
2775
+ * A 30-second scene is 720 camera samples. V1's 240-keyframe interpolated track
2776
+ * cannot carry that, and interpolating a sparse track across a hard cut blends
2777
+ * two shots into a frame that belongs to neither. So v2 moves the camera out of
2778
+ * the manifest into this dense JSON asset, and the rule becomes trivial:
2779
+ *
2780
+ * **at integer frame `f`, use `samples[f]`.**
2781
+ *
2782
+ * No interpolation, no easing, no "nearest key". Pausing, scrubbing backwards
2783
+ * and rendering frames out of order therefore produce identical state, which is
2784
+ * the whole reason preview and export can be trusted to agree.
2785
+ *
2786
+ * Two things this format refuses to guess at:
2787
+ *
2788
+ * - **Orientation is a quaternion, not a look-at.** A renderer that replaces the
2789
+ * exported quaternion with `lookAt(target)` throws away the authored roll and
2790
+ * the handheld component. `target` is carried for inspection and intent only.
2791
+ * - **Projection is a matrix, not a lens number.** A focal length cannot express
2792
+ * sensor fit or lens shift, and re-deriving a projection at a different aspect
2793
+ * silently reframes every shot. `focalLengthMm` is metadata; the 16-element
2794
+ * column-major matrix is authoritative.
2795
+ *
2796
+ * Changing fps or aspect ratio is an explicit resample/reprojection producing a
2797
+ * NEW revision — never a render-time override. `scene3DCameraTrackPlanIssues`
2798
+ * is what makes that non-negotiable.
2799
+ */
2800
+
2801
+ declare const SCENE3D_CAMERA_TRACK_FORMAT = "scene3d-camera-track";
2802
+ declare const SCENE3D_CAMERA_TRACK_VERSION = 1;
2803
+ declare const SCENE3D_CAMERA_TRACK_LIMITS: {
2804
+ readonly maxJsonBytes: number;
2805
+ readonly maxFrameCount: 3600;
2806
+ readonly minFps: 15;
2807
+ readonly maxFps: 60;
2808
+ /** A unit quaternion off by more than this is a bug, not float noise. */
2809
+ readonly quaternionTolerance: 0.0001;
2810
+ /** Absolute tolerance on the projection entries that must be exactly zero
2811
+ * (or exactly ∓1) in a perspective matrix. */
2812
+ readonly projectionEpsilon: 0.000001;
2813
+ /** Relative tolerance when comparing declared near/far against the values the
2814
+ * projection matrix implies. */
2815
+ readonly nearFarRelativeTolerance: 0.001;
2816
+ /** Relative tolerance on `m[0]/m[5]` vs the manifest's `height/width`. */
2817
+ readonly aspectRelativeTolerance: 0.001;
2818
+ readonly minNear: 0.0001;
2819
+ readonly maxFar: 10000000;
2820
+ };
2821
+ interface Scene3DCameraSample {
2822
+ position: Vec3;
2823
+ /** `[x, y, z, w]` — that order, normalized. */
2824
+ quaternion: [number, number, number, number];
2825
+ /** Exactly 16 entries, COLUMN-MAJOR (Three.js `Matrix4.elements` order). */
2826
+ projectionMatrix: number[];
2827
+ near: number;
2828
+ far: number;
2829
+ /** Authoring intent, for inspection and validation reporting. A renderer must
2830
+ * never feed this back through `lookAt()`. */
2831
+ target?: Vec3;
2832
+ /** Metadata only; the projection matrix wins. */
2833
+ focalLengthMm?: number;
2834
+ }
2835
+ interface Scene3DCameraTrackV1 {
2836
+ format: typeof SCENE3D_CAMERA_TRACK_FORMAT;
2837
+ version: typeof SCENE3D_CAMERA_TRACK_VERSION;
2838
+ /** Always 0: public frames are zero-based, and the exporter has already
2839
+ * subtracted the authoring package's start frame. */
2840
+ frameStart: 0;
2841
+ frameCount: number;
2842
+ fps: number;
2843
+ samples: Scene3DCameraSample[];
2844
+ }
2845
+ declare const scene3DCameraSampleSchema: z.ZodObject<{
2846
+ position: z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>;
2847
+ quaternion: z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber, z.ZodNumber], null>;
2848
+ projectionMatrix: z.ZodArray<z.ZodNumber>;
2849
+ near: z.ZodNumber;
2850
+ far: z.ZodNumber;
2851
+ target: z.ZodOptional<z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>>;
2852
+ focalLengthMm: z.ZodOptional<z.ZodNumber>;
2853
+ }, z.core.$strict>;
2854
+ /** Structure only; `scene3DCameraTrackIssues` carries the numeric rules. */
2855
+ declare const scene3DCameraTrackObjectSchema: z.ZodObject<{
2856
+ format: z.ZodLiteral<"scene3d-camera-track">;
2857
+ version: z.ZodLiteral<1>;
2858
+ frameStart: z.ZodLiteral<0>;
2859
+ frameCount: z.ZodNumber;
2860
+ fps: z.ZodNumber;
2861
+ samples: z.ZodArray<z.ZodObject<{
2862
+ position: z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>;
2863
+ quaternion: z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber, z.ZodNumber], null>;
2864
+ projectionMatrix: z.ZodArray<z.ZodNumber>;
2865
+ near: z.ZodNumber;
2866
+ far: z.ZodNumber;
2867
+ target: z.ZodOptional<z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>>;
2868
+ focalLengthMm: z.ZodOptional<z.ZodNumber>;
2869
+ }, z.core.$strict>>;
2870
+ }, z.core.$strict>;
2871
+ type Issue = Scene3DSemanticIssue;
2872
+ /**
2873
+ * Is this a real PERSPECTIVE projection, and does it agree with the declared
2874
+ * near/far?
2875
+ *
2876
+ * Column-major layout produced by every Three.js/glTF perspective camera:
2877
+ *
2878
+ * ```text
2879
+ * m0 0 m8 0
2880
+ * 0 m5 m9 0
2881
+ * 0 0 m10 m14
2882
+ * 0 0 -1 0
2883
+ * ```
2884
+ *
2885
+ * `m8`/`m9` carry lens shift and are free. Everything else is pinned. Inverting
2886
+ * the two depth terms recovers `near = m14 / (m10 - 1)` and
2887
+ * `far = m14 / (m10 + 1)`, which is how a matrix that quietly disagrees with its
2888
+ * own declared clip planes gets caught.
2889
+ *
2890
+ * Exported because the builder validates its export with the same function the
2891
+ * renderer admits it with.
2892
+ */
2893
+ declare function scene3DProjectionIssues(matrix: readonly number[], near: number, far: number, path: (string | number)[]): Issue[];
2894
+ /**
2895
+ * The numeric rules the schema cannot express: exact sample count, normalized
2896
+ * quaternions, and a real perspective projection on every frame.
2897
+ *
2898
+ * Split out of the schema (as v1 does) so a caller holding a parsed track can
2899
+ * re-check it, and so the per-sample walk stays one readable loop over up to
2900
+ * 3,600 samples.
2901
+ */
2902
+ declare function scene3DCameraTrackIssues(track: Scene3DCameraTrackV1): Issue[];
2903
+ /** THE camera-track validator: structure, then the numeric rules. */
2904
+ declare const scene3DCameraTrackSchema: z.ZodObject<{
2905
+ format: z.ZodLiteral<"scene3d-camera-track">;
2906
+ version: z.ZodLiteral<1>;
2907
+ frameStart: z.ZodLiteral<0>;
2908
+ frameCount: z.ZodNumber;
2909
+ fps: z.ZodNumber;
2910
+ samples: z.ZodArray<z.ZodObject<{
2911
+ position: z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>;
2912
+ quaternion: z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber, z.ZodNumber], null>;
2913
+ projectionMatrix: z.ZodArray<z.ZodNumber>;
2914
+ near: z.ZodNumber;
2915
+ far: z.ZodNumber;
2916
+ target: z.ZodOptional<z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>>;
2917
+ focalLengthMm: z.ZodOptional<z.ZodNumber>;
2918
+ }, z.core.$strict>>;
2919
+ }, z.core.$strict>;
2920
+ declare function isScene3DCameraTrack(value: unknown): value is Scene3DCameraTrackV1;
2921
+ /**
2922
+ * Track ↔ manifest agreement. A track that is valid on its own can still be the
2923
+ * WRONG track for this scene: a different fps, a different length, or a
2924
+ * projection baked for another aspect ratio. Each of those silently reframes or
2925
+ * retimes every shot, so each is an error here rather than a render-time
2926
+ * surprise.
2927
+ */
2928
+ declare function scene3DCameraTrackPlanIssues(track: Scene3DCameraTrackV1, plan: Pick<Scene3DPlanV2, "fps" | "durationInFrames" | "width" | "height">): Issue[];
2929
+ /**
2930
+ * The sample for an integer frame. `undefined` outside `[0, frameCount)` — a
2931
+ * caller must fail rather than clamp, because a clamped frame is a wrong frame
2932
+ * that looks plausible.
2933
+ */
2934
+ declare function scene3DSampleForFrame(track: Scene3DCameraTrackV1, frame: number): Scene3DCameraSample | undefined;
2935
+ /**
2936
+ * Size-gate, then parse, then validate. This is the admission path for a
2937
+ * downloaded camera track: an 80 MiB "8 MiB" track is refused before
2938
+ * `JSON.parse` gets a chance to allocate it.
2939
+ */
2940
+ declare function parseScene3DCameraTrackJson(text: string): Scene3DParseResult<Scene3DCameraTrackV1>;
2941
+
2942
+ /** Immutable 3D inputs are selected by revision and artifact, never by URL or caller receipt. */
2943
+ declare const scene3DInputAssetSchema: z.ZodObject<{
2944
+ id: z.ZodString;
2945
+ revisionId: z.ZodUUID;
2946
+ assetId: z.ZodUUID;
2947
+ label: z.ZodOptional<z.ZodString>;
2948
+ }, z.core.$strict>;
2949
+ declare const scene3DInputAssetsSchema: z.ZodArray<z.ZodObject<{
2950
+ id: z.ZodString;
2951
+ revisionId: z.ZodUUID;
2952
+ assetId: z.ZodUUID;
2953
+ label: z.ZodOptional<z.ZodString>;
2954
+ }, z.core.$strict>>;
2955
+ type Scene3DInputAsset = z.infer<typeof scene3DInputAssetSchema>;
2956
+ /** Both workflow engines refuse unsupported imports before starting a paid Basic run. */
2957
+ declare function scene3DInputAssetsForEngine(value: unknown, engine: string | undefined): Scene3DInputAsset[];
2958
+
2959
+ /**
2960
+ * The `pro-3d-render` ("3D Render Pro") WIRE CONTRACT.
2961
+ *
2962
+ * ONE durable operation, three ways in. A `source` says WHERE the scene comes
2963
+ * from — a new brief, an existing revision, or a completed desktop export —
2964
+ * and the settled job carries BOTH halves of the result: the exact composition
2965
+ * (`scenePlan`) and the standard video field every downstream consumer already
2966
+ * reads (`videoUrl`).
2967
+ *
2968
+ * The `source` is a strict discriminated union rather than a bag of optional
2969
+ * fields, and that is the load-bearing decision here. "Prompt present" and
2970
+ * "revisionId present" are not two settings on one request: they select
2971
+ * different pipelines with different costs. A flat shape lets a caller send
2972
+ * both, or neither, and pushes the "what did they actually mean" decision into
2973
+ * whichever surface reads it last — which is how an existing scene silently
2974
+ * becomes a paid re-authoring run.
2975
+ *
2976
+ * The same union is what makes RENDER-ONLY expressible: `{kind:'scene'}` with
2977
+ * NO `editPrompt` means "export this revision", and its absence must survive
2978
+ * every hop unchanged. Nothing may helpfully substitute an empty string or
2979
+ * copy the node's brief into it — that converts a free export into an
2980
+ * authoring run the user never asked for.
2981
+ *
2982
+ * What lives here is only what a client needs to CALL the operation, QUOTE it
2983
+ * and READ its result. How the scene is planned, compiled, built, priced or
2984
+ * authorized is not part of this contract and is not described here.
2985
+ *
2986
+ * Deliberately NOT here:
2987
+ * - a model chooser. The planner is fixed and server-owned.
2988
+ * - a credit number. The cost is resolved server-side and returned by the
2989
+ * quote endpoint; a constant in a published package would be a wrong answer
2990
+ * shipped to every consumer (see `PRO3D_RENDER_CREDIT_ID`).
2991
+ */
2992
+
2993
+ /** Canvas/API/MCP node type. */
2994
+ declare const PRO3D_RENDER_NODE_TYPE = "pro-3d-render";
2995
+ /** Display name. One string, so every surface spells it the same way. */
2996
+ declare const PRO3D_RENDER_LABEL = "3D Render Pro";
2997
+ /**
2998
+ * The credit identifier the operation settles under.
2999
+ *
3000
+ * An IDENTIFIER, not a price: the number is operator/deployment configuration
3001
+ * (a `model_pricing` row), and the per-run ceiling comes from a quote. There is
3002
+ * deliberately no fallback constant — a flat default would underprice an
3003
+ * operation that plans, builds and renders, and "cheap by accident" is not a
3004
+ * failure mode you notice from the outside.
3005
+ */
3006
+ declare const PRO3D_RENDER_CREDIT_ID = "pro-3d-render";
3007
+ /**
3008
+ * Where the scene is built. `blender-local` is a paired desktop and is refused
3009
+ * unless the deployment both enables it and has an engine advertising it — an
3010
+ * unknown or unavailable engine is an error, never a downgrade to the cheaper
3011
+ * cloud path.
3012
+ */
3013
+ declare const PRO3D_RENDER_ENGINES: readonly ["blender-cloud", "blender-local"];
3014
+ type Pro3DRenderEngine = (typeof PRO3D_RENDER_ENGINES)[number];
3015
+ declare const PRO3D_RENDER_DEFAULT_ENGINE: Pro3DRenderEngine;
3016
+ /**
3017
+ * Render quality profiles.
3018
+ *
3019
+ * One today. A surface must advertise only what the installed engine reports
3020
+ * (`capabilities().pro.qualityProfiles`) rather than this list — offering a
3021
+ * profile the engine cannot serve is a run that fails after the user chose it.
3022
+ */
3023
+ declare const PRO3D_RENDER_QUALITY_PROFILES: readonly ["standard"];
3024
+ type Pro3DRenderQuality = (typeof PRO3D_RENDER_QUALITY_PROFILES)[number];
3025
+ declare const PRO3D_RENDER_DEFAULT_QUALITY: Pro3DRenderQuality;
3026
+ /** Material/lighting treatment. Clay is the movement-reference default. */
3027
+ declare const PRO3D_RENDER_STYLES: readonly ["clay"];
3028
+ type Pro3DRenderStyle = (typeof PRO3D_RENDER_STYLES)[number];
3029
+ declare const PRO3D_RENDER_DEFAULT_STYLE: Pro3DRenderStyle;
3030
+ /**
3031
+ * The correction budget: how many repair passes the engine may spend after its
3032
+ * first attempt. Displayed to the user because each pass is paid work.
3033
+ */
3034
+ declare const PRO3D_RENDER_MIN_REPAIR_PASSES = 0;
3035
+ declare const PRO3D_RENDER_MAX_REPAIR_PASSES = 2;
3036
+ declare const PRO3D_RENDER_DEFAULT_REPAIR_PASSES = 2;
3037
+ /**
3038
+ * Aspect ratios the node authors at.
3039
+ *
3040
+ * `21:9` is not decoration: the acceptance fixture is a 30-second 21:9 scene,
3041
+ * so a set that omitted it could not express the case the feature is measured
3042
+ * against. Its canonical pixel pair is the contract's explicitly supported
3043
+ * 1680×720 (see `ASPECT_RATIO_DIMENSIONS`).
3044
+ */
3045
+ declare const PRO3D_RENDER_ASPECT_RATIOS: readonly ["16:9", "9:16", "1:1", "4:5", "21:9"];
3046
+ type Pro3DRenderAspectRatio = (typeof PRO3D_RENDER_ASPECT_RATIOS)[number];
3047
+ /** Same prompt ceiling the Basic authoring routes enforce. */
3048
+ declare const PRO3D_RENDER_PROMPT_MAX = 8000;
3049
+ /**
3050
+ * Request bounds shared by every ingress (HTTP route, orchestrator, MCP, SDK).
3051
+ *
3052
+ * Timing/reference limits reuse the Basic authoring limits verbatim rather
3053
+ * than declaring a second set: the two nodes describe the same kind of scene,
3054
+ * and two drifting ceilings is how one surface starts accepting what another
3055
+ * refuses.
3056
+ */
3057
+ declare const PRO3D_RENDER_LIMITS: {
3058
+ readonly promptMax: 8000;
3059
+ readonly editPromptMax: 8000;
3060
+ readonly minDurationSeconds: 1;
3061
+ readonly maxDurationSeconds: 60;
3062
+ readonly minFps: 15;
3063
+ readonly maxFps: 60;
3064
+ readonly maxReferences: 8;
3065
+ /** Opaque ids the caller echoes back (quote, export, connection). */
3066
+ readonly maxIdLength: 200;
3067
+ /** `Idempotency-Key` bounds — the platform's floor, with a ceiling so an
3068
+ * unbounded header can never reach a lookup or a database column. */
3069
+ readonly minIdempotencyKeyLength: 8;
3070
+ readonly maxIdempotencyKeyLength: 255;
3071
+ };
3072
+ declare const PRO3D_RENDER_SOURCE_KINDS: readonly ["prompt", "scene", "local-export"];
3073
+ type Pro3DRenderSourceKind = (typeof PRO3D_RENDER_SOURCE_KINDS)[number];
3074
+ /** A new scene, authored from a brief plus optional image/video references. */
3075
+ interface Pro3DRenderPromptSource {
3076
+ kind: "prompt";
3077
+ prompt: string;
3078
+ references?: readonly Scene3DReference[];
3079
+ inputAssets?: readonly Scene3DInputAsset[];
3080
+ }
3081
+ /**
3082
+ * An existing immutable revision.
3083
+ *
3084
+ * `editPrompt` ABSENT is the render-only path — export this revision, spend no
3085
+ * authoring or build credits. Its absence is meaningful and must be preserved
3086
+ * verbatim; an empty string is not the same request.
3087
+ *
3088
+ * Retained revisions are authorized through their current scene permissions.
3089
+ * `sourceJobId` locates Basic scenes stored only in job history; it is required
3090
+ * for that source, but optional for retained scenes (including manual edits).
3091
+ */
3092
+ interface Pro3DRenderSceneSource {
3093
+ kind: "scene";
3094
+ revisionId: string;
3095
+ sourceJobId?: string;
3096
+ editPrompt?: string;
3097
+ }
3098
+ /** A completed export from a paired desktop Blender. */
3099
+ interface Pro3DRenderLocalExportSource {
3100
+ kind: "local-export";
3101
+ exportId: string;
3102
+ connectionId: string;
3103
+ }
3104
+ type Pro3DRenderSource = Pro3DRenderPromptSource | Pro3DRenderSceneSource | Pro3DRenderLocalExportSource;
3105
+ /** True when this source exports an existing revision without re-authoring it. */
3106
+ declare function isPro3DRenderRenderOnly(source: Pro3DRenderSource): boolean;
3107
+ /**
3108
+ * Which scene-schema version a source PRODUCES, or `null` when only the server
3109
+ * can know.
3110
+ *
3111
+ * A `prompt` or `local-export` source always mints a fresh v2 manifest, so a
3112
+ * client that cannot read v2 is refusable for free, before any work. A `scene`
3113
+ * source inherits whatever version the named revision already is — the host
3114
+ * does not resolve revisions, so demanding v2 there would refuse a perfectly
3115
+ * renderable retained v1 scene.
3116
+ */
3117
+ declare function pro3DRenderProducedSchemaVersion(source: Pro3DRenderSource): number | null;
3118
+ /** One priced component of a quote. Display copy, not economics. */
3119
+ interface Pro3DRenderQuoteLine {
3120
+ code: string;
3121
+ label: string;
3122
+ credits: number;
3123
+ }
3124
+ /**
3125
+ * The paired quote's answer.
3126
+ *
3127
+ * `maxCredits` is a CEILING, not a charge: quoting reserves nothing and spends
3128
+ * nothing. `normalizedInputHash` is what run admission re-checks, so a body
3129
+ * edited between quote and run is refused rather than executed at a price it
3130
+ * was never quoted for.
3131
+ */
3132
+ interface Pro3DRenderQuote {
3133
+ quoteId: string;
3134
+ /** ISO-8601. After this the quote is stale and run answers "quote again". */
3135
+ expiresAt: string;
3136
+ maxCredits: number;
3137
+ breakdown: Pro3DRenderQuoteLine[];
3138
+ pricingVersion: string;
3139
+ capabilitiesVersion: string;
3140
+ normalizedInputHash: string;
3141
+ }
3142
+ declare const pro3DRenderQuoteSchema: z.ZodObject<{
3143
+ quoteId: z.ZodString;
3144
+ expiresAt: z.ZodString;
3145
+ maxCredits: z.ZodNumber;
3146
+ breakdown: z.ZodArray<z.ZodObject<{
3147
+ code: z.ZodString;
3148
+ label: z.ZodString;
3149
+ credits: z.ZodNumber;
3150
+ }, z.core.$loose>>;
3151
+ pricingVersion: z.ZodString;
3152
+ capabilitiesVersion: z.ZodString;
3153
+ normalizedInputHash: z.ZodString;
3154
+ }, z.core.$loose>;
3155
+ declare function isPro3DRenderQuote(value: unknown): value is Pro3DRenderQuote;
3156
+ /**
3157
+ * What this deployment can actually serve.
3158
+ *
3159
+ * Every surface that offers a control reads it from here rather than from the
3160
+ * vocabularies above: the constants say what the CONTRACT can express, this
3161
+ * says what the INSTALLED engine will accept.
3162
+ */
3163
+ interface Pro3DRenderCapabilities {
3164
+ available: boolean;
3165
+ engines: Pro3DRenderEngine[];
3166
+ qualityProfiles: Pro3DRenderQuality[];
3167
+ styles: Pro3DRenderStyle[];
3168
+ aspectRatios: Pro3DRenderAspectRatio[];
3169
+ maxRepairPasses: number;
3170
+ }
3171
+ /**
3172
+ * One advisory about a delivered composition.
3173
+ *
3174
+ * `code` is open-ended — an unknown one is shown, never refused — and it is what tells the two
3175
+ * KINDS of advisory apart without knowing anything about the engine that produced them:
3176
+ * `SCENE_AUTHORING_ASSUMPTION` (exported as `SCENE3D_AUTHORING_ASSUMPTION_CODE`) is an authoring
3177
+ * caveat, "the brief did not say, so the run decided", carrying the planner's own assumption
3178
+ * with any normalization the engine applied to it; `SCENE_REVIEW_REFUSED` (exported as
3179
+ * `SCENE3D_REVIEW_REFUSED_CODE`) is one objection the paid visual reviewer raised against a
3180
+ * scene this job DELIVERED anyway; `SCENE_REVIEW_UNAVAILABLE` (exported as
3181
+ * `SCENE3D_REVIEW_UNAVAILABLE_CODE`) says that reviewer gave no usable verdict at all — it was
3182
+ * never reached, or answered with nothing usable — so the scene was
3183
+ * delivered — or, with the advisory policy off, retained — with no verdict on it, and it LEADS
3184
+ * the array because it qualifies every line under it; a `SCENE_QUALITY_*` code is that same
3185
+ * reviewer's finding on a job that FAILED, where the finding is the reason there is no video.
3186
+ */
3187
+ interface Pro3DRenderValidationWarning {
3188
+ code: string;
3189
+ message: string;
3190
+ shotId?: string;
3191
+ }
3192
+ /**
3193
+ * One still per shot of the exported composition.
3194
+ *
3195
+ * A render's contact sheet: the frame a shot OPENS on, which is the frame that
3196
+ * says what the shot is of. `shotIndex` is the 0-based position in the v2
3197
+ * composition's `shots` array — a v1 (single-shot) scene has exactly one still,
3198
+ * index 0 at frame 0 — and `frame` is that shot's own first frame in the
3199
+ * composition's frame space, so a caller can line a still up against the MP4
3200
+ * without re-deriving shot boundaries.
3201
+ */
3202
+ interface Pro3DRenderShotStill {
3203
+ shotIndex: number;
3204
+ frame: number;
3205
+ assetId: string;
3206
+ url: string;
3207
+ }
3208
+ interface Pro3DRenderResultMetadata {
3209
+ width: number;
3210
+ height: number;
3211
+ fps: number;
3212
+ frames: number;
3213
+ duration: number;
3214
+ /**
3215
+ * The planner's own one-or-two-sentence description of what it authored — on a repaired run,
3216
+ * of the REPAIR it made, which is the pass that was actually published. Optional and
3217
+ * routinely absent: a model that returns no summary is not an error, and a render-only export
3218
+ * authored nothing to describe.
3219
+ */
3220
+ summary?: string;
3221
+ /**
3222
+ * The visual reviewer's verdict, present ONLY on a delivery it did not APPROVE — a scene whose
3223
+ * every mandatory assertion passed, published either once the repair budget was spent and the
3224
+ * reviewer still objected (`verdict: "refused"`), or with no verdict at all because the review
3225
+ * never reached its provider or answered with nothing usable (`verdict: "unavailable"`, with
3226
+ * `reason` saying which and `attempts` how many times it was asked). `validation.status` is
3227
+ * `"passed"` on both, so this field's presence — not the
3228
+ * status, and not the warning count — is what tells them from a clean result.
3229
+ *
3230
+ * Use {@link scene3DReviewVerdictOf} rather than reading it by hand, and
3231
+ * {@link scene3DReviewNote} rather than writing the sentence for it: a banner that says "the
3232
+ * reviewer refused this scene" about one NO reviewer saw invents an opinion.
3233
+ */
3234
+ review?: Scene3DReviewVerdict;
3235
+ }
3236
+ /**
3237
+ * The completed job's `output_data`.
3238
+ *
3239
+ * `videoUrl` is the platform's existing resolved-video field (the contract's
3240
+ * `resultUrl` mapped onto the envelope this platform already has), so the node
3241
+ * connects to every existing video consumer without a second video result type
3242
+ * producer validators cannot parse. `scenePlan` + `sceneRevisionId` are the
3243
+ * exact revision that video was rendered from, so a later render-only re-run
3244
+ * costs no authoring.
3245
+ *
3246
+ * Everything else is what the spec requires a caller to be able to act on: the
3247
+ * poster to show before playback, the validation report to read warnings from,
3248
+ * the renderer/metadata to check the export against a downstream model's
3249
+ * limits, and the optional source artifact to offer as a download.
3250
+ */
3251
+ interface Pro3DRenderJobOutput {
3252
+ videoUrl: string;
3253
+ scenePlan: Scene3DPlan;
3254
+ sceneRevisionId: string;
3255
+ posterAssetId: string;
3256
+ /**
3257
+ * One still per shot, ordered by `shotIndex`. Optional and additive: a
3258
+ * runtime that does not render stills yet returns a complete result without
3259
+ * them, and a result that HAS them has one for every shot.
3260
+ */
3261
+ shotStills?: Pro3DRenderShotStill[];
3262
+ /** Present when an editable native source was retained for this revision. */
3263
+ sourceArtifactId?: string;
3264
+ validation: {
3265
+ status: "passed";
3266
+ reportAssetId: string;
3267
+ warnings: Pro3DRenderValidationWarning[];
3268
+ };
3269
+ renderer: string;
3270
+ metadata: Pro3DRenderResultMetadata;
3271
+ /**
3272
+ * Repair passes actually RUN — never the number of authoring passes, so a composition
3273
+ * accepted first time reports `0` rather than `1`. Optional and ABSENT (not `0`) on the
3274
+ * render-only lane, which authored nothing and had no repair budget to spend: reporting a
3275
+ * count there would be a claim about a run that never happened.
3276
+ */
3277
+ repairPasses?: number;
3278
+ /**
3279
+ * Pre-build planner retries, counted apart from {@link repairPasses} because they spent a
3280
+ * different thing: a recipe the compiler would not ADMIT is re-asked of the planner without
3281
+ * a build, so no repair pass went with it. Optional, and absent on a run that needed none.
3282
+ */
3283
+ admissionRetries?: number;
3284
+ /**
3285
+ * Repairs the engine authored ITSELF, by applying the compiler's own structured remedy instead
3286
+ * of asking the planner.
3287
+ *
3288
+ * Counted APART from {@link repairPasses} and never folded into it, the same way
3289
+ * {@link admissionRetries} is: these passes have their own quoted allowance — a `mechanical`
3290
+ * line on the quote, released when unspent — rather than spending one of the caller's repairs.
3291
+ * The identity the pricing keeps is
3292
+ * `buildPasses === authoringPasses + repairPasses + mechanicalPasses`.
3293
+ *
3294
+ * ONE exception, discriminated by the QUOTE and not by this result: a run quoted before that
3295
+ * allowance existed has no `mechanical` quote line, and there the pass charged a repair, making
3296
+ * the count a subset of `repairPasses`. Read the quote you were given rather than inferring the
3297
+ * accounting from the counts.
3298
+ *
3299
+ * Optional, and absent both on a run that needed none and on an engine that does not report it.
3300
+ */
3301
+ mechanicalPasses?: number;
3302
+ /**
3303
+ * Mandatory assertions the engine put BACK after a planner answer re-shaped one the feedback
3304
+ * had not named — restored to the last admitted recipe's exact form so the run continues
3305
+ * instead of refusing over a value the engine already held. Each is also an
3306
+ * `ASSERTION_RESTORED` warning. Optional; absent on a run that restored nothing.
3307
+ */
3308
+ restoredAssertions?: Scene3DRestoredAssertion[];
3309
+ /** Short, user-safe note about what this revision contains. Never diagnostics. */
3310
+ changeSummary?: string;
3311
+ }
3312
+ declare const pro3DRenderReviewVerdictSchema: z.ZodUnion<readonly [z.ZodObject<{
3313
+ objections: z.ZodArray<z.ZodObject<{
3314
+ category: z.ZodString;
3315
+ what: z.ZodString;
3316
+ correction: z.ZodOptional<z.ZodString>;
3317
+ frames: z.ZodDefault<z.ZodArray<z.ZodNumber>>;
3318
+ }, z.core.$loose>>;
3319
+ observed: z.ZodOptional<z.ZodString>;
3320
+ verdict: z.ZodLiteral<"refused">;
3321
+ }, z.core.$loose>, z.ZodObject<{
3322
+ objections: z.ZodArray<z.ZodObject<{
3323
+ category: z.ZodString;
3324
+ what: z.ZodString;
3325
+ correction: z.ZodOptional<z.ZodString>;
3326
+ frames: z.ZodDefault<z.ZodArray<z.ZodNumber>>;
3327
+ }, z.core.$loose>>;
3328
+ observed: z.ZodOptional<z.ZodString>;
3329
+ verdict: z.ZodLiteral<"unavailable">;
3330
+ reason: z.ZodCatch<z.ZodEnum<{
3331
+ provider: "provider";
3332
+ unusable: "unusable";
3333
+ }>>;
3334
+ attempts: z.ZodCatch<z.ZodNumber>;
3335
+ }, z.core.$loose>]>;
3336
+ declare const pro3DRenderShotStillSchema: z.ZodObject<{
3337
+ shotIndex: z.ZodNumber;
3338
+ frame: z.ZodNumber;
3339
+ assetId: z.ZodString;
3340
+ url: z.ZodString;
3341
+ }, z.core.$loose>;
3342
+ declare const pro3DRenderJobOutputSchema: z.ZodObject<{
3343
+ videoUrl: z.ZodString;
3344
+ scenePlan: z.ZodDiscriminatedUnion<[z.ZodObject<{
3345
+ planType: z.ZodLiteral<"3d-scene">;
3346
+ schemaVersion: z.ZodLiteral<1>;
3347
+ revisionId: z.ZodUUID;
3348
+ parentRevisionId: z.ZodOptional<z.ZodUUID>;
3349
+ width: z.ZodNumber;
3350
+ height: z.ZodNumber;
3351
+ fps: z.ZodNumber;
3352
+ durationInFrames: z.ZodNumber;
3353
+ backgroundColor: z.ZodString;
3354
+ camera: z.ZodObject<{
3355
+ position: z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>;
3356
+ target: z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>;
3357
+ focalLengthMm: z.ZodNumber;
3358
+ sensorWidthMm: z.ZodDefault<z.ZodNumber>;
3359
+ keyframes: z.ZodOptional<z.ZodArray<z.ZodObject<{
3360
+ frame: z.ZodNumber;
3361
+ position: z.ZodOptional<z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>>;
3362
+ target: z.ZodOptional<z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>>;
3363
+ focalLengthMm: z.ZodOptional<z.ZodNumber>;
3364
+ easing: z.ZodOptional<z.ZodEnum<{
3365
+ linear: "linear";
3366
+ easeInOut: "easeInOut";
3367
+ }>>;
3368
+ }, z.core.$strict>>>;
3369
+ }, z.core.$strict>;
3370
+ objects: z.ZodArray<z.ZodObject<{
3371
+ id: z.ZodString;
3372
+ name: z.ZodString;
3373
+ primitive: z.ZodEnum<{
3374
+ group: "group";
3375
+ box: "box";
3376
+ sphere: "sphere";
3377
+ cylinder: "cylinder";
3378
+ cone: "cone";
3379
+ plane: "plane";
3380
+ capsule: "capsule";
3381
+ }>;
3382
+ parentId: z.ZodOptional<z.ZodString>;
3383
+ dimensions: z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>;
3384
+ position: z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>;
3385
+ rotation: z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>;
3386
+ scale: z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>;
3387
+ color: z.ZodString;
3388
+ keyframes: z.ZodOptional<z.ZodArray<z.ZodObject<{
3389
+ frame: z.ZodNumber;
3390
+ position: z.ZodOptional<z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>>;
3391
+ rotation: z.ZodOptional<z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>>;
3392
+ scale: z.ZodOptional<z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>>;
3393
+ easing: z.ZodOptional<z.ZodEnum<{
3394
+ linear: "linear";
3395
+ easeInOut: "easeInOut";
3396
+ }>>;
3397
+ }, z.core.$strict>>>;
3398
+ }, z.core.$strict>>;
3399
+ lighting: z.ZodObject<{
3400
+ ambientIntensity: z.ZodNumber;
3401
+ keyIntensity: z.ZodNumber;
3402
+ keyPosition: z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>;
3403
+ }, z.core.$strict>;
3404
+ references: z.ZodOptional<z.ZodArray<z.ZodObject<{
3405
+ id: z.ZodString;
3406
+ url: z.ZodString;
3407
+ kind: z.ZodEnum<{
3408
+ image: "image";
3409
+ video: "video";
3410
+ }>;
3411
+ role: z.ZodEnum<{
3412
+ motion: "motion";
3413
+ layout: "layout";
3414
+ appearance: "appearance";
3415
+ }>;
3416
+ objectId: z.ZodOptional<z.ZodString>;
3417
+ startSeconds: z.ZodOptional<z.ZodNumber>;
3418
+ endSeconds: z.ZodOptional<z.ZodNumber>;
3419
+ }, z.core.$strict>>>;
3420
+ }, z.core.$strict>, z.ZodObject<{
3421
+ planType: z.ZodLiteral<"3d-scene">;
3422
+ schemaVersion: z.ZodLiteral<2>;
3423
+ revisionId: z.ZodUUID;
3424
+ parentRevisionId: z.ZodOptional<z.ZodUUID>;
3425
+ width: z.ZodNumber;
3426
+ height: z.ZodNumber;
3427
+ fps: z.ZodNumber;
3428
+ durationInFrames: z.ZodNumber;
3429
+ units: z.ZodLiteral<"meters">;
3430
+ upAxis: z.ZodLiteral<"Y">;
3431
+ handedness: z.ZodLiteral<"right">;
3432
+ objects: z.ZodArray<z.ZodObject<{
3433
+ id: z.ZodString;
3434
+ name: z.ZodString;
3435
+ parentId: z.ZodOptional<z.ZodString>;
3436
+ role: z.ZodOptional<z.ZodEnum<{
3437
+ other: "other";
3438
+ person: "person";
3439
+ vehicle: "vehicle";
3440
+ prop: "prop";
3441
+ environment: "environment";
3442
+ }>>;
3443
+ position: z.ZodOptional<z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>>;
3444
+ rotation: z.ZodOptional<z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>>;
3445
+ scale: z.ZodOptional<z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>>;
3446
+ visible: z.ZodOptional<z.ZodBoolean>;
3447
+ identityColor: z.ZodOptional<z.ZodString>;
3448
+ anchors: z.ZodOptional<z.ZodArray<z.ZodObject<{
3449
+ name: z.ZodString;
3450
+ position: z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>;
3451
+ nodeName: z.ZodOptional<z.ZodString>;
3452
+ rotation: z.ZodOptional<z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>>;
3453
+ }, z.core.$strict>>>;
3454
+ capabilities: z.ZodOptional<z.ZodArray<z.ZodEnum<{
3455
+ color: "color";
3456
+ transform: "transform";
3457
+ visibility: "visibility";
3458
+ }>>>;
3459
+ locks: z.ZodOptional<z.ZodArray<z.ZodEnum<{
3460
+ color: "color";
3461
+ transform: "transform";
3462
+ visibility: "visibility";
3463
+ }>>>;
3464
+ materialBindings: z.ZodOptional<z.ZodArray<z.ZodObject<{
3465
+ role: z.ZodString;
3466
+ materialName: z.ZodString;
3467
+ color: z.ZodOptional<z.ZodString>;
3468
+ roughness: z.ZodOptional<z.ZodNumber>;
3469
+ }, z.core.$strict>>>;
3470
+ visual: z.ZodDiscriminatedUnion<[z.ZodObject<{
3471
+ kind: z.ZodLiteral<"group">;
3472
+ }, z.core.$strict>, z.ZodObject<{
3473
+ kind: z.ZodLiteral<"primitive">;
3474
+ primitive: z.ZodEnum<{
3475
+ box: "box";
3476
+ sphere: "sphere";
3477
+ cylinder: "cylinder";
3478
+ cone: "cone";
3479
+ plane: "plane";
3480
+ capsule: "capsule";
3481
+ }>;
3482
+ dimensions: z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>;
3483
+ color: z.ZodString;
3484
+ }, z.core.$strict>, z.ZodObject<{
3485
+ kind: z.ZodLiteral<"asset">;
3486
+ assetId: z.ZodString;
3487
+ rootNodeId: z.ZodString;
3488
+ animation: z.ZodOptional<z.ZodObject<{
3489
+ clipName: z.ZodString;
3490
+ startFrame: z.ZodNumber;
3491
+ endFrameExclusive: z.ZodNumber;
3492
+ loop: z.ZodOptional<z.ZodBoolean>;
3493
+ }, z.core.$strict>>;
3494
+ }, z.core.$strict>], "kind">;
3495
+ }, z.core.$strict>>;
3496
+ assets: z.ZodArray<z.ZodObject<{
3497
+ assetId: z.ZodString;
3498
+ kind: z.ZodEnum<{
3499
+ glb: "glb";
3500
+ "camera-track-json": "camera-track-json";
3501
+ poster: "poster";
3502
+ "validation-report": "validation-report";
3503
+ "blend-source": "blend-source";
3504
+ }>;
3505
+ role: z.ZodEnum<{
3506
+ source: "source";
3507
+ poster: "poster";
3508
+ "validation-report": "validation-report";
3509
+ "scene-geometry": "scene-geometry";
3510
+ "entity-geometry": "entity-geometry";
3511
+ "camera-track": "camera-track";
3512
+ }>;
3513
+ byteLength: z.ZodNumber;
3514
+ sha256: z.ZodString;
3515
+ originRevisionId: z.ZodOptional<z.ZodUUID>;
3516
+ }, z.core.$strict>>;
3517
+ cameraTrackAssetId: z.ZodString;
3518
+ shots: z.ZodArray<z.ZodObject<{
3519
+ id: z.ZodString;
3520
+ startFrame: z.ZodNumber;
3521
+ endFrameExclusive: z.ZodNumber;
3522
+ label: z.ZodOptional<z.ZodString>;
3523
+ subjectEntityIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
3524
+ foregroundEntityIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
3525
+ }, z.core.$strict>>;
3526
+ lighting: z.ZodObject<{
3527
+ preset: z.ZodEnum<{
3528
+ "clay-studio-v1": "clay-studio-v1";
3529
+ "clay-studio-v2": "clay-studio-v2";
3530
+ }>;
3531
+ ambientIntensity: z.ZodNumber;
3532
+ keyIntensity: z.ZodNumber;
3533
+ keyPosition: z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>;
3534
+ }, z.core.$strict>;
3535
+ backgroundColor: z.ZodString;
3536
+ references: z.ZodOptional<z.ZodArray<z.ZodObject<{
3537
+ id: z.ZodString;
3538
+ url: z.ZodString;
3539
+ kind: z.ZodEnum<{
3540
+ image: "image";
3541
+ video: "video";
3542
+ }>;
3543
+ role: z.ZodEnum<{
3544
+ motion: "motion";
3545
+ layout: "layout";
3546
+ appearance: "appearance";
3547
+ }>;
3548
+ objectId: z.ZodOptional<z.ZodString>;
3549
+ startSeconds: z.ZodOptional<z.ZodNumber>;
3550
+ endSeconds: z.ZodOptional<z.ZodNumber>;
3551
+ }, z.core.$strict>>>;
3552
+ overrides: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
3553
+ kind: z.ZodLiteral<"entity-transform">;
3554
+ entityId: z.ZodString;
3555
+ space: z.ZodEnum<{
3556
+ local: "local";
3557
+ world: "world";
3558
+ }>;
3559
+ position: z.ZodOptional<z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>>;
3560
+ rotation: z.ZodOptional<z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>>;
3561
+ scale: z.ZodOptional<z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>>;
3562
+ id: z.ZodString;
3563
+ sourceRevisionId: z.ZodUUID;
3564
+ sourceContentHash: z.ZodString;
3565
+ operationVersion: z.ZodNumber;
3566
+ }, z.core.$strict>, z.ZodObject<{
3567
+ kind: z.ZodLiteral<"entity-color">;
3568
+ entityId: z.ZodString;
3569
+ materialRole: z.ZodString;
3570
+ color: z.ZodString;
3571
+ id: z.ZodString;
3572
+ sourceRevisionId: z.ZodUUID;
3573
+ sourceContentHash: z.ZodString;
3574
+ operationVersion: z.ZodNumber;
3575
+ }, z.core.$strict>, z.ZodObject<{
3576
+ kind: z.ZodLiteral<"entity-visibility">;
3577
+ entityId: z.ZodString;
3578
+ visible: z.ZodBoolean;
3579
+ id: z.ZodString;
3580
+ sourceRevisionId: z.ZodUUID;
3581
+ sourceContentHash: z.ZodString;
3582
+ operationVersion: z.ZodNumber;
3583
+ }, z.core.$strict>, z.ZodObject<{
3584
+ kind: z.ZodLiteral<"camera-shot-offset">;
3585
+ shotId: z.ZodString;
3586
+ positionOffset: z.ZodOptional<z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>>;
3587
+ targetOffset: z.ZodOptional<z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>>;
3588
+ id: z.ZodString;
3589
+ sourceRevisionId: z.ZodUUID;
3590
+ sourceContentHash: z.ZodString;
3591
+ operationVersion: z.ZodNumber;
3592
+ }, z.core.$strict>], "kind">>>;
3593
+ provenance: z.ZodObject<{
3594
+ engine: z.ZodString;
3595
+ engineVersion: z.ZodString;
3596
+ recipeVersion: z.ZodString;
3597
+ compilerVersion: z.ZodString;
3598
+ exporterVersion: z.ZodString;
3599
+ rendererVersion: z.ZodString;
3600
+ sourceRevisionId: z.ZodOptional<z.ZodUUID>;
3601
+ sourceArtifactId: z.ZodOptional<z.ZodString>;
3602
+ contentHash: z.ZodString;
3603
+ }, z.core.$strict>;
3604
+ }, z.core.$strict>], "schemaVersion">;
3605
+ sceneRevisionId: z.ZodString;
3606
+ posterAssetId: z.ZodString;
3607
+ shotStills: z.ZodOptional<z.ZodArray<z.ZodObject<{
3608
+ shotIndex: z.ZodNumber;
3609
+ frame: z.ZodNumber;
3610
+ assetId: z.ZodString;
3611
+ url: z.ZodString;
3612
+ }, z.core.$loose>>>;
3613
+ sourceArtifactId: z.ZodOptional<z.ZodString>;
3614
+ validation: z.ZodObject<{
3615
+ status: z.ZodLiteral<"passed">;
3616
+ reportAssetId: z.ZodString;
3617
+ warnings: z.ZodArray<z.ZodObject<{
3618
+ code: z.ZodString;
3619
+ message: z.ZodString;
3620
+ shotId: z.ZodOptional<z.ZodString>;
3621
+ }, z.core.$loose>>;
3622
+ }, z.core.$loose>;
3623
+ renderer: z.ZodString;
3624
+ metadata: z.ZodObject<{
3625
+ width: z.ZodNumber;
3626
+ height: z.ZodNumber;
3627
+ fps: z.ZodNumber;
3628
+ frames: z.ZodNumber;
3629
+ duration: z.ZodNumber;
3630
+ summary: z.ZodOptional<z.ZodString>;
3631
+ review: z.ZodCatch<z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
3632
+ objections: z.ZodArray<z.ZodObject<{
3633
+ category: z.ZodString;
3634
+ what: z.ZodString;
3635
+ correction: z.ZodOptional<z.ZodString>;
3636
+ frames: z.ZodDefault<z.ZodArray<z.ZodNumber>>;
3637
+ }, z.core.$loose>>;
3638
+ observed: z.ZodOptional<z.ZodString>;
3639
+ verdict: z.ZodLiteral<"refused">;
3640
+ }, z.core.$loose>, z.ZodObject<{
3641
+ objections: z.ZodArray<z.ZodObject<{
3642
+ category: z.ZodString;
3643
+ what: z.ZodString;
3644
+ correction: z.ZodOptional<z.ZodString>;
3645
+ frames: z.ZodDefault<z.ZodArray<z.ZodNumber>>;
3646
+ }, z.core.$loose>>;
3647
+ observed: z.ZodOptional<z.ZodString>;
3648
+ verdict: z.ZodLiteral<"unavailable">;
3649
+ reason: z.ZodCatch<z.ZodEnum<{
3650
+ provider: "provider";
3651
+ unusable: "unusable";
3652
+ }>>;
3653
+ attempts: z.ZodCatch<z.ZodNumber>;
3654
+ }, z.core.$loose>]>>>;
3655
+ }, z.core.$loose>;
3656
+ repairPasses: z.ZodOptional<z.ZodNumber>;
3657
+ admissionRetries: z.ZodOptional<z.ZodNumber>;
3658
+ mechanicalPasses: z.ZodOptional<z.ZodNumber>;
3659
+ restoredAssertions: z.ZodOptional<z.ZodArray<z.ZodObject<{
3660
+ op: z.ZodString;
3661
+ path: z.ZodString;
3662
+ value: z.ZodOptional<z.ZodUnknown>;
3663
+ assertionId: z.ZodString;
3664
+ reason: z.ZodString;
3665
+ }, z.core.$loose>>>;
3666
+ changeSummary: z.ZodOptional<z.ZodString>;
3667
+ }, z.core.$loose>;
3668
+ declare function isPro3DRenderJobOutput(value: unknown): value is Pro3DRenderJobOutput;
3669
+ /**
3670
+ * The stills on a result, in shot order — the ONE reader every surface uses.
3671
+ *
3672
+ * Tolerant on purpose: this runs on canvas node data, on a job row read back
3673
+ * from the database and on an MCP result envelope, and in every one of those a
3674
+ * missing or malformed list means "this result has no stills", never "refuse
3675
+ * the whole result". Sorting here is what lets `shotStills[i]` mean shot `i`
3676
+ * at every call site without each one remembering to sort.
3677
+ */
3678
+ declare function pro3DRenderShotStills(output: unknown): Pro3DRenderShotStill[];
3679
+ /**
3680
+ * The two fields every EXECUTION SURFACE must be able to resolve, whatever
3681
+ * else a runtime does or does not attach yet.
3682
+ *
3683
+ * Separate from the full reader above on purpose: canvas wiring, the DAG
3684
+ * extractors and the render-only re-run need "is there a video and a scene
3685
+ * here", and gating those on complete metadata would blank a node over a
3686
+ * missing poster id.
3687
+ */
3688
+ declare const pro3DRenderCoreOutputSchema: z.ZodObject<{
3689
+ videoUrl: z.ZodString;
3690
+ scenePlan: z.ZodDiscriminatedUnion<[z.ZodObject<{
3691
+ planType: z.ZodLiteral<"3d-scene">;
3692
+ schemaVersion: z.ZodLiteral<1>;
3693
+ revisionId: z.ZodUUID;
3694
+ parentRevisionId: z.ZodOptional<z.ZodUUID>;
3695
+ width: z.ZodNumber;
3696
+ height: z.ZodNumber;
3697
+ fps: z.ZodNumber;
3698
+ durationInFrames: z.ZodNumber;
3699
+ backgroundColor: z.ZodString;
3700
+ camera: z.ZodObject<{
3701
+ position: z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>;
3702
+ target: z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>;
3703
+ focalLengthMm: z.ZodNumber;
3704
+ sensorWidthMm: z.ZodDefault<z.ZodNumber>;
3705
+ keyframes: z.ZodOptional<z.ZodArray<z.ZodObject<{
3706
+ frame: z.ZodNumber;
3707
+ position: z.ZodOptional<z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>>;
3708
+ target: z.ZodOptional<z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>>;
3709
+ focalLengthMm: z.ZodOptional<z.ZodNumber>;
3710
+ easing: z.ZodOptional<z.ZodEnum<{
3711
+ linear: "linear";
3712
+ easeInOut: "easeInOut";
3713
+ }>>;
3714
+ }, z.core.$strict>>>;
3715
+ }, z.core.$strict>;
3716
+ objects: z.ZodArray<z.ZodObject<{
3717
+ id: z.ZodString;
3718
+ name: z.ZodString;
3719
+ primitive: z.ZodEnum<{
3720
+ group: "group";
3721
+ box: "box";
3722
+ sphere: "sphere";
3723
+ cylinder: "cylinder";
3724
+ cone: "cone";
3725
+ plane: "plane";
3726
+ capsule: "capsule";
3727
+ }>;
3728
+ parentId: z.ZodOptional<z.ZodString>;
3729
+ dimensions: z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>;
3730
+ position: z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>;
3731
+ rotation: z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>;
3732
+ scale: z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>;
3733
+ color: z.ZodString;
3734
+ keyframes: z.ZodOptional<z.ZodArray<z.ZodObject<{
3735
+ frame: z.ZodNumber;
3736
+ position: z.ZodOptional<z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>>;
3737
+ rotation: z.ZodOptional<z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>>;
3738
+ scale: z.ZodOptional<z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>>;
3739
+ easing: z.ZodOptional<z.ZodEnum<{
3740
+ linear: "linear";
3741
+ easeInOut: "easeInOut";
3742
+ }>>;
3743
+ }, z.core.$strict>>>;
3744
+ }, z.core.$strict>>;
3745
+ lighting: z.ZodObject<{
3746
+ ambientIntensity: z.ZodNumber;
3747
+ keyIntensity: z.ZodNumber;
3748
+ keyPosition: z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>;
3749
+ }, z.core.$strict>;
3750
+ references: z.ZodOptional<z.ZodArray<z.ZodObject<{
3751
+ id: z.ZodString;
3752
+ url: z.ZodString;
3753
+ kind: z.ZodEnum<{
3754
+ image: "image";
3755
+ video: "video";
3756
+ }>;
3757
+ role: z.ZodEnum<{
3758
+ motion: "motion";
3759
+ layout: "layout";
3760
+ appearance: "appearance";
3761
+ }>;
3762
+ objectId: z.ZodOptional<z.ZodString>;
3763
+ startSeconds: z.ZodOptional<z.ZodNumber>;
3764
+ endSeconds: z.ZodOptional<z.ZodNumber>;
3765
+ }, z.core.$strict>>>;
3766
+ }, z.core.$strict>, z.ZodObject<{
3767
+ planType: z.ZodLiteral<"3d-scene">;
3768
+ schemaVersion: z.ZodLiteral<2>;
3769
+ revisionId: z.ZodUUID;
3770
+ parentRevisionId: z.ZodOptional<z.ZodUUID>;
3771
+ width: z.ZodNumber;
3772
+ height: z.ZodNumber;
3773
+ fps: z.ZodNumber;
3774
+ durationInFrames: z.ZodNumber;
3775
+ units: z.ZodLiteral<"meters">;
3776
+ upAxis: z.ZodLiteral<"Y">;
3777
+ handedness: z.ZodLiteral<"right">;
3778
+ objects: z.ZodArray<z.ZodObject<{
3779
+ id: z.ZodString;
3780
+ name: z.ZodString;
3781
+ parentId: z.ZodOptional<z.ZodString>;
3782
+ role: z.ZodOptional<z.ZodEnum<{
3783
+ other: "other";
3784
+ person: "person";
3785
+ vehicle: "vehicle";
3786
+ prop: "prop";
3787
+ environment: "environment";
3788
+ }>>;
3789
+ position: z.ZodOptional<z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>>;
3790
+ rotation: z.ZodOptional<z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>>;
3791
+ scale: z.ZodOptional<z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>>;
3792
+ visible: z.ZodOptional<z.ZodBoolean>;
3793
+ identityColor: z.ZodOptional<z.ZodString>;
3794
+ anchors: z.ZodOptional<z.ZodArray<z.ZodObject<{
3795
+ name: z.ZodString;
3796
+ position: z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>;
3797
+ nodeName: z.ZodOptional<z.ZodString>;
3798
+ rotation: z.ZodOptional<z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>>;
3799
+ }, z.core.$strict>>>;
3800
+ capabilities: z.ZodOptional<z.ZodArray<z.ZodEnum<{
3801
+ color: "color";
3802
+ transform: "transform";
3803
+ visibility: "visibility";
3804
+ }>>>;
3805
+ locks: z.ZodOptional<z.ZodArray<z.ZodEnum<{
3806
+ color: "color";
3807
+ transform: "transform";
3808
+ visibility: "visibility";
3809
+ }>>>;
3810
+ materialBindings: z.ZodOptional<z.ZodArray<z.ZodObject<{
3811
+ role: z.ZodString;
3812
+ materialName: z.ZodString;
3813
+ color: z.ZodOptional<z.ZodString>;
3814
+ roughness: z.ZodOptional<z.ZodNumber>;
3815
+ }, z.core.$strict>>>;
3816
+ visual: z.ZodDiscriminatedUnion<[z.ZodObject<{
3817
+ kind: z.ZodLiteral<"group">;
3818
+ }, z.core.$strict>, z.ZodObject<{
3819
+ kind: z.ZodLiteral<"primitive">;
3820
+ primitive: z.ZodEnum<{
3821
+ box: "box";
3822
+ sphere: "sphere";
3823
+ cylinder: "cylinder";
3824
+ cone: "cone";
3825
+ plane: "plane";
3826
+ capsule: "capsule";
3827
+ }>;
3828
+ dimensions: z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>;
3829
+ color: z.ZodString;
3830
+ }, z.core.$strict>, z.ZodObject<{
3831
+ kind: z.ZodLiteral<"asset">;
3832
+ assetId: z.ZodString;
3833
+ rootNodeId: z.ZodString;
3834
+ animation: z.ZodOptional<z.ZodObject<{
3835
+ clipName: z.ZodString;
3836
+ startFrame: z.ZodNumber;
3837
+ endFrameExclusive: z.ZodNumber;
3838
+ loop: z.ZodOptional<z.ZodBoolean>;
3839
+ }, z.core.$strict>>;
3840
+ }, z.core.$strict>], "kind">;
3841
+ }, z.core.$strict>>;
3842
+ assets: z.ZodArray<z.ZodObject<{
3843
+ assetId: z.ZodString;
3844
+ kind: z.ZodEnum<{
3845
+ glb: "glb";
3846
+ "camera-track-json": "camera-track-json";
3847
+ poster: "poster";
3848
+ "validation-report": "validation-report";
3849
+ "blend-source": "blend-source";
3850
+ }>;
3851
+ role: z.ZodEnum<{
3852
+ source: "source";
3853
+ poster: "poster";
3854
+ "validation-report": "validation-report";
3855
+ "scene-geometry": "scene-geometry";
3856
+ "entity-geometry": "entity-geometry";
3857
+ "camera-track": "camera-track";
3858
+ }>;
3859
+ byteLength: z.ZodNumber;
3860
+ sha256: z.ZodString;
3861
+ originRevisionId: z.ZodOptional<z.ZodUUID>;
3862
+ }, z.core.$strict>>;
3863
+ cameraTrackAssetId: z.ZodString;
3864
+ shots: z.ZodArray<z.ZodObject<{
3865
+ id: z.ZodString;
3866
+ startFrame: z.ZodNumber;
3867
+ endFrameExclusive: z.ZodNumber;
3868
+ label: z.ZodOptional<z.ZodString>;
3869
+ subjectEntityIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
3870
+ foregroundEntityIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
3871
+ }, z.core.$strict>>;
3872
+ lighting: z.ZodObject<{
3873
+ preset: z.ZodEnum<{
3874
+ "clay-studio-v1": "clay-studio-v1";
3875
+ "clay-studio-v2": "clay-studio-v2";
3876
+ }>;
3877
+ ambientIntensity: z.ZodNumber;
3878
+ keyIntensity: z.ZodNumber;
3879
+ keyPosition: z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>;
3880
+ }, z.core.$strict>;
3881
+ backgroundColor: z.ZodString;
3882
+ references: z.ZodOptional<z.ZodArray<z.ZodObject<{
3883
+ id: z.ZodString;
3884
+ url: z.ZodString;
3885
+ kind: z.ZodEnum<{
3886
+ image: "image";
3887
+ video: "video";
3888
+ }>;
3889
+ role: z.ZodEnum<{
3890
+ motion: "motion";
3891
+ layout: "layout";
3892
+ appearance: "appearance";
3893
+ }>;
3894
+ objectId: z.ZodOptional<z.ZodString>;
3895
+ startSeconds: z.ZodOptional<z.ZodNumber>;
3896
+ endSeconds: z.ZodOptional<z.ZodNumber>;
3897
+ }, z.core.$strict>>>;
3898
+ overrides: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
3899
+ kind: z.ZodLiteral<"entity-transform">;
3900
+ entityId: z.ZodString;
3901
+ space: z.ZodEnum<{
3902
+ local: "local";
3903
+ world: "world";
3904
+ }>;
3905
+ position: z.ZodOptional<z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>>;
3906
+ rotation: z.ZodOptional<z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>>;
3907
+ scale: z.ZodOptional<z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>>;
3908
+ id: z.ZodString;
3909
+ sourceRevisionId: z.ZodUUID;
3910
+ sourceContentHash: z.ZodString;
3911
+ operationVersion: z.ZodNumber;
3912
+ }, z.core.$strict>, z.ZodObject<{
3913
+ kind: z.ZodLiteral<"entity-color">;
3914
+ entityId: z.ZodString;
3915
+ materialRole: z.ZodString;
3916
+ color: z.ZodString;
3917
+ id: z.ZodString;
3918
+ sourceRevisionId: z.ZodUUID;
3919
+ sourceContentHash: z.ZodString;
3920
+ operationVersion: z.ZodNumber;
3921
+ }, z.core.$strict>, z.ZodObject<{
3922
+ kind: z.ZodLiteral<"entity-visibility">;
3923
+ entityId: z.ZodString;
3924
+ visible: z.ZodBoolean;
3925
+ id: z.ZodString;
3926
+ sourceRevisionId: z.ZodUUID;
3927
+ sourceContentHash: z.ZodString;
3928
+ operationVersion: z.ZodNumber;
3929
+ }, z.core.$strict>, z.ZodObject<{
3930
+ kind: z.ZodLiteral<"camera-shot-offset">;
3931
+ shotId: z.ZodString;
3932
+ positionOffset: z.ZodOptional<z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>>;
3933
+ targetOffset: z.ZodOptional<z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>>;
3934
+ id: z.ZodString;
3935
+ sourceRevisionId: z.ZodUUID;
3936
+ sourceContentHash: z.ZodString;
3937
+ operationVersion: z.ZodNumber;
3938
+ }, z.core.$strict>], "kind">>>;
3939
+ provenance: z.ZodObject<{
3940
+ engine: z.ZodString;
3941
+ engineVersion: z.ZodString;
3942
+ recipeVersion: z.ZodString;
3943
+ compilerVersion: z.ZodString;
3944
+ exporterVersion: z.ZodString;
3945
+ rendererVersion: z.ZodString;
3946
+ sourceRevisionId: z.ZodOptional<z.ZodUUID>;
3947
+ sourceArtifactId: z.ZodOptional<z.ZodString>;
3948
+ contentHash: z.ZodString;
3949
+ }, z.core.$strict>;
3950
+ }, z.core.$strict>], "schemaVersion">;
3951
+ }, z.core.$loose>;
3952
+ /** What a canvas node / DAG builder holds before it can name a source. */
3953
+ interface Pro3DRenderSourceInput {
3954
+ inputAssets?: readonly Scene3DInputAsset[];
3955
+ /** `"scene"` selects the existing-revision path; anything else is a brief. */
3956
+ sourceMode?: string;
3957
+ /** The brief, already resolved and affix-applied by the caller. */
3958
+ prompt?: string;
3959
+ references?: readonly Scene3DReference[];
3960
+ /** The revision to export or edit, and the run that produced it. */
3961
+ revisionId?: string;
3962
+ sourceJobId?: string;
3963
+ /** Absent/blank keeps the render-only path. */
3964
+ editPrompt?: string;
3965
+ }
3966
+ type Pro3DRenderSourceResult = {
3967
+ ok: true;
3968
+ source: Pro3DRenderSource;
3969
+ } | {
3970
+ ok: false;
3971
+ message: string;
3972
+ };
3973
+ /**
3974
+ * Turn node/DAG state into the wire `source`.
3975
+ *
3976
+ * Shared by BOTH execution engines because the alternative — one copy in the
3977
+ * browser executor and one in the orchestrator — is the drift that lets a
3978
+ * canvas run and a headless run of the same node mean different things. The
3979
+ * refusals are part of that: a scene source missing its correlation must fail
3980
+ * the same way on both.
3981
+ *
3982
+ * A blank `editPrompt` is treated as ABSENT, never as an empty instruction: a
3983
+ * user who cleared the box asked for a plain export, and forwarding `""` would
3984
+ * buy them an authoring pass.
3985
+ */
3986
+ declare function buildPro3DRenderSource(input: Pro3DRenderSourceInput): Pro3DRenderSourceResult;
3987
+ /**
3988
+ * Which timing fields a request may carry.
3989
+ *
3990
+ * A `scene` source already HAS timing, and the contract forbids silently
3991
+ * overriding it — so the node's own duration/fps/aspect are withheld unless
3992
+ * the user explicitly asked to re-time, in which case they are sent and the
3993
+ * engine decides whether the change is compatible. For a new scene the node's
3994
+ * settings simply are the request.
3995
+ *
3996
+ * Returning an object with the keys omitted (rather than set to `undefined`)
3997
+ * matters: these bodies are JSON-serialized, and an explicit `undefined` and a
3998
+ * missing key are the same on the wire only by luck of the serializer.
3999
+ */
4000
+ declare function pro3DRenderTimingOverrides(input: {
4001
+ source: Pro3DRenderSource;
4002
+ overrideSourceTiming?: boolean;
4003
+ durationSeconds?: number;
4004
+ fps?: number;
4005
+ aspectRatio?: string;
4006
+ }): {
4007
+ durationSeconds?: number;
4008
+ fps?: number;
4009
+ aspectRatio?: string;
4010
+ };
4011
+
4012
+ /** Cheapest first. A vocabulary, so a surface can render the whole ladder. */
4013
+ declare const SCENE3D_RENDER_TIERS: readonly ["base", "large", "xlarge"];
4014
+ type Scene3DRenderTier = (typeof SCENE3D_RENDER_TIERS)[number];
4015
+ /**
4016
+ * The longest side (px) that still renders at the base price.
4017
+ *
4018
+ * Deliberately NOT `SCENE3D_LIMITS.maxDimensionPx` minus something: it is the
4019
+ * old ceiling, frozen, because its job is to hold every pre-cap frame at the
4020
+ * price it already had. Raising the cap again moves `maxDimensionPx` and must
4021
+ * leave this alone.
4022
+ */
4023
+ declare const SCENE3D_RENDER_BASE_MAX_PX = 1920;
4024
+ /**
4025
+ * Pixel area at which a frame stops being priced as 2560x1440 and starts being
4026
+ * priced as 2560x2560 — the exact midpoint of those two measured frames
4027
+ * (3,686,400 and 6,553,600). Only consulted for frames past the 1920 gate.
4028
+ */
4029
+ declare const SCENE3D_RENDER_XLARGE_MIN_AREA_PX = 5120000;
4030
+ /** The measured cost ratios, rounded to halves. `base` is 1 by definition. */
4031
+ declare const SCENE3D_RENDER_TIER_MULTIPLIERS: Readonly<Record<Scene3DRenderTier, number>>;
4032
+ /**
4033
+ * Which tier a frame renders at.
4034
+ *
4035
+ * Total and defensive on purpose: it is read from a route guard, an
4036
+ * orchestrator payload builder and a canvas badge, all of which hold a plan
4037
+ * that has not necessarily been parsed yet. Anything that is not a pair of
4038
+ * positive finite numbers is `base` — the safe answer for a display, and
4039
+ * harmless for a charge because the route's Zod refuses such a plan anyway.
4040
+ */
4041
+ declare function scene3DRenderTier(width: unknown, height: unknown): Scene3DRenderTier;
4042
+ /**
4043
+ * A tier's price, from the base render's price.
4044
+ *
4045
+ * `Math.ceil` matches how the platform rounds every other derived credit
4046
+ * figure, so a tier can never round DOWN into charging less than the base
4047
+ * render it is a multiple of.
4048
+ */
4049
+ declare function scene3DRenderTierCredits(baseCredits: number, tier: Scene3DRenderTier): number;
4050
+ /** The flat identifier a render settles under when its frame is base-sized. */
4051
+ declare const RENDER_VIDEO_CREDIT_ID = "render-video";
4052
+ /**
4053
+ * The identifier one render-video request settles under.
4054
+ *
4055
+ * `base` keeps the BARE `render-video` id rather than gaining a `:base`
4056
+ * suffix. That is what makes this change free of a price move: an existing
4057
+ * deployment's configured `render-video` row keeps pricing every frame it
4058
+ * priced before, and the two new rows only ever describe frames that were not
4059
+ * renderable at all until the cap moved.
4060
+ *
4061
+ * Only `3d-scene` plans are tiered. A scene-graph or template render admits
4062
+ * frames up to 3840 px today at the flat price, and re-tiering those would be
4063
+ * a price INCREASE on work people already run — a separate decision, not a
4064
+ * side effect of this one.
4065
+ */
4066
+ declare function renderVideoCreditId(input: unknown): string;
4067
+ /**
4068
+ * The per-frame unit a 3D Render Pro run's render stage reads.
4069
+ *
4070
+ * Pro prices its render per OUTPUT FRAME, so the frame-size tier belongs on
4071
+ * that unit rather than on a whole-run identifier — the same ladder, applied
4072
+ * where Pro actually multiplies. `base` keeps the existing
4073
+ * `pro-3d-render:render-frame:<quality>` spelling so the rows an operator has
4074
+ * already configured keep serving every frame they serve today.
4075
+ *
4076
+ * The rates themselves are deployment configuration and live nowhere in this
4077
+ * repository; this function only says which row to read.
4078
+ */
4079
+ declare function pro3DRenderFrameUnit(quality: string, tier?: Scene3DRenderTier): string;
4080
+
4081
+ /** Immutable, deterministic edits over a baked scene. No asset bytes are mutated. */
4082
+
4083
+ /** Callers describe values. Revision identity and provenance are assigned here. */
4084
+ declare const scene3DV2OverrideInputSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
4085
+ kind: z.ZodLiteral<"entity-transform">;
4086
+ entityId: z.ZodString;
4087
+ space: z.ZodEnum<{
4088
+ local: "local";
4089
+ world: "world";
4090
+ }>;
4091
+ position: z.ZodOptional<z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>>;
4092
+ rotation: z.ZodOptional<z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>>;
4093
+ scale: z.ZodOptional<z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>>;
4094
+ }, z.core.$strict>, z.ZodObject<{
4095
+ kind: z.ZodLiteral<"entity-color">;
4096
+ entityId: z.ZodString;
4097
+ materialRole: z.ZodString;
4098
+ color: z.ZodString;
4099
+ }, z.core.$strict>, z.ZodObject<{
4100
+ kind: z.ZodLiteral<"entity-visibility">;
4101
+ entityId: z.ZodString;
4102
+ visible: z.ZodBoolean;
4103
+ }, z.core.$strict>, z.ZodObject<{
4104
+ kind: z.ZodLiteral<"camera-shot-offset">;
4105
+ shotId: z.ZodString;
4106
+ positionOffset: z.ZodOptional<z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>>;
4107
+ targetOffset: z.ZodOptional<z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>>;
4108
+ }, z.core.$strict>], "kind">;
4109
+ declare const scene3DV2EditOperationSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
4110
+ op: z.ZodLiteral<"set-override">;
4111
+ override: z.ZodDiscriminatedUnion<[z.ZodObject<{
4112
+ kind: z.ZodLiteral<"entity-transform">;
4113
+ entityId: z.ZodString;
4114
+ space: z.ZodEnum<{
4115
+ local: "local";
4116
+ world: "world";
4117
+ }>;
4118
+ position: z.ZodOptional<z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>>;
4119
+ rotation: z.ZodOptional<z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>>;
4120
+ scale: z.ZodOptional<z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>>;
4121
+ }, z.core.$strict>, z.ZodObject<{
4122
+ kind: z.ZodLiteral<"entity-color">;
4123
+ entityId: z.ZodString;
4124
+ materialRole: z.ZodString;
4125
+ color: z.ZodString;
4126
+ }, z.core.$strict>, z.ZodObject<{
4127
+ kind: z.ZodLiteral<"entity-visibility">;
4128
+ entityId: z.ZodString;
4129
+ visible: z.ZodBoolean;
4130
+ }, z.core.$strict>, z.ZodObject<{
4131
+ kind: z.ZodLiteral<"camera-shot-offset">;
4132
+ shotId: z.ZodString;
4133
+ positionOffset: z.ZodOptional<z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>>;
4134
+ targetOffset: z.ZodOptional<z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>>;
4135
+ }, z.core.$strict>], "kind">;
4136
+ }, z.core.$strict>, z.ZodObject<{
4137
+ op: z.ZodLiteral<"remove-override">;
4138
+ overrideId: z.ZodString;
4139
+ }, z.core.$strict>], "op">;
4140
+ declare const scene3DV2EditOperationsSchema: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
4141
+ op: z.ZodLiteral<"set-override">;
4142
+ override: z.ZodDiscriminatedUnion<[z.ZodObject<{
4143
+ kind: z.ZodLiteral<"entity-transform">;
4144
+ entityId: z.ZodString;
4145
+ space: z.ZodEnum<{
4146
+ local: "local";
4147
+ world: "world";
4148
+ }>;
4149
+ position: z.ZodOptional<z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>>;
4150
+ rotation: z.ZodOptional<z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>>;
4151
+ scale: z.ZodOptional<z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>>;
4152
+ }, z.core.$strict>, z.ZodObject<{
4153
+ kind: z.ZodLiteral<"entity-color">;
4154
+ entityId: z.ZodString;
4155
+ materialRole: z.ZodString;
4156
+ color: z.ZodString;
4157
+ }, z.core.$strict>, z.ZodObject<{
4158
+ kind: z.ZodLiteral<"entity-visibility">;
4159
+ entityId: z.ZodString;
4160
+ visible: z.ZodBoolean;
4161
+ }, z.core.$strict>, z.ZodObject<{
4162
+ kind: z.ZodLiteral<"camera-shot-offset">;
4163
+ shotId: z.ZodString;
4164
+ positionOffset: z.ZodOptional<z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>>;
4165
+ targetOffset: z.ZodOptional<z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>>;
4166
+ }, z.core.$strict>], "kind">;
4167
+ }, z.core.$strict>, z.ZodObject<{
4168
+ op: z.ZodLiteral<"remove-override">;
4169
+ overrideId: z.ZodString;
4170
+ }, z.core.$strict>], "op">>;
4171
+ type Scene3DV2OverrideInput = z.infer<typeof scene3DV2OverrideInputSchema>;
4172
+ type Scene3DV2EditOperation = z.infer<typeof scene3DV2EditOperationSchema>;
4173
+ interface Scene3DV2EditOptions {
4174
+ expectedRevisionId: string;
4175
+ expectedContentHash?: string;
4176
+ lockedObjectIds?: readonly string[];
4177
+ /** Hosts may allocate identity at admission for idempotent job replay. */
4178
+ newRevisionId?: string;
4179
+ }
4180
+ type Scene3DV2EditResult = {
4181
+ ok: true;
4182
+ plan: Scene3DPlanV2;
4183
+ changeSummary: string;
4184
+ } | {
4185
+ ok: false;
4186
+ code: "invalid_plan" | "invalid_operations" | "stale_revision" | "locked";
4187
+ message: string;
4188
+ };
4189
+ /**
4190
+ * Edits are all-or-nothing. The expected revision and content hash are checked
4191
+ * before writing, and the result is validated and hashed before acceptance.
4192
+ * A source file belongs to its exact base revision: until the host materializes
4193
+ * these edits, the new revision must not advertise the old native download.
4194
+ */
4195
+ declare function applyScene3DV2EditOperations(input: Scene3DPlanV2, operations: readonly Scene3DV2EditOperation[], options: Scene3DV2EditOptions): Promise<Scene3DV2EditResult>;
4196
+
4197
+ /** The value that names the Basic lane explicitly. Absent means the same. */
4198
+ declare const SCENE3D_BASIC_ENGINE = "basic";
4199
+ /** Everything a caller may put in `engine` on a Generate/Edit request. */
4200
+ declare const SCENE3D_AUTHORING_ENGINES: readonly ["basic", "blender-cloud", "blender-local"];
4201
+ type Scene3DAuthoringEngine = (typeof SCENE3D_AUTHORING_ENGINES)[number];
4202
+ /**
4203
+ * The engine an Advanced run picks when nothing else names one.
4204
+ *
4205
+ * Hosted cloud, because that is the contract's default lane; `blender-local`
4206
+ * is never inferred — it needs a paired desktop and its own deployment flag,
4207
+ * so it is only ever used when it was explicitly asked for or when the scene
4208
+ * under edit was authored by it and this install still offers it.
4209
+ */
4210
+ declare const SCENE3D_DEFAULT_ADVANCED_ENGINE: Scene3DKnownEngine;
4211
+ declare function isScene3DAuthoringEngine(value: unknown): value is Scene3DAuthoringEngine;
4212
+ interface Scene3DEngineChoiceInput {
4213
+ /** The node's/caller's explicit selection. `undefined` = "not chosen". */
4214
+ requested?: string | null;
4215
+ /**
4216
+ * The plan the run edits, for an edit. Omit for generate.
4217
+ *
4218
+ * The raw plan rather than a version number on purpose: the caller already
4219
+ * holds it, and reading the version here is the ONE place the "v2 never goes
4220
+ * to Basic" rule can be enforced for every surface at once.
4221
+ */
4222
+ plan?: unknown;
4223
+ /**
4224
+ * Advanced engines this install can actually serve, from
4225
+ * `GET /v1/3d-scene/capabilities`.
4226
+ *
4227
+ * `undefined` means NOT KNOWN (the headless orchestrator never asks, and the
4228
+ * browser has not had the answer back yet) — which is different from "none".
4229
+ * Unknown proceeds and lets the route refuse honestly with
4230
+ * `SCENE_CAPABILITY_UNAVAILABLE`; a known-empty list refuses here, before a
4231
+ * request that cannot succeed is sent.
4232
+ */
4233
+ availableEngines?: readonly string[] | undefined;
4234
+ }
4235
+ /** The extra body fields an Advanced request carries. Empty on Basic, so the
4236
+ * Basic request stays byte-identical to what it has always been. */
4237
+ interface Scene3DEngineRequestFields {
4238
+ engine?: Scene3DKnownEngine;
4239
+ /**
4240
+ * Which scene schema versions the CALLER can read back.
4241
+ *
4242
+ * Contract §5: an advanced authoring request declares this so the engine
4243
+ * never answers with a revision the caller cannot render. Both of our
4244
+ * surfaces read v1 and v2, so both send the same list.
4245
+ */
4246
+ acceptedSceneSchemaVersions?: number[];
4247
+ }
4248
+ type Scene3DEngineChoiceRefusalCode =
4249
+ /** The name is not an engine this contract knows. */
4250
+ "unknown_engine"
4251
+ /** Explicitly asked for an engine this install does not serve. */
4252
+ | "engine_unavailable"
4253
+ /** A v2 scene was pointed at the Basic lane. */
4254
+ | "schema_requires_advanced"
4255
+ /** The scene claims a version nothing here can author against. */
4256
+ | "unsupported_schema_version"
4257
+ /** v2 scene, and no Advanced engine installed at all. */
4258
+ | "advanced_unavailable";
4259
+ type Scene3DEngineChoice = {
4260
+ ok: true;
4261
+ lane: "basic";
4262
+ engine: undefined;
4263
+ fields: Scene3DEngineRequestFields;
4264
+ } | {
4265
+ ok: true;
4266
+ lane: "advanced";
4267
+ engine: Scene3DKnownEngine;
4268
+ fields: Scene3DEngineRequestFields;
4269
+ } | {
4270
+ ok: false;
4271
+ code: Scene3DEngineChoiceRefusalCode;
4272
+ message: string;
4273
+ };
4274
+ /**
4275
+ * Resolve the lane, or refuse with a sentence the user can act on.
4276
+ *
4277
+ * Pure and synchronous: every caller already holds the three inputs, and the
4278
+ * answer must be identical on the canvas and in the orchestrator.
4279
+ */
4280
+ declare function resolveScene3DAuthoringEngine(input: Scene3DEngineChoiceInput): Scene3DEngineChoice;
4281
+ /** v1's version constant, re-exported for callers narrowing a plan by hand. */
4282
+ declare const SCENE3D_BASIC_SCHEMA_VERSION = 1;
4283
+
4284
+ export { PRO3D_RENDER_ASPECT_RATIOS, PRO3D_RENDER_CREDIT_ID, PRO3D_RENDER_DEFAULT_ENGINE, PRO3D_RENDER_DEFAULT_QUALITY, PRO3D_RENDER_DEFAULT_REPAIR_PASSES, PRO3D_RENDER_DEFAULT_STYLE, PRO3D_RENDER_ENGINES, PRO3D_RENDER_LABEL, PRO3D_RENDER_LIMITS, PRO3D_RENDER_MAX_REPAIR_PASSES, PRO3D_RENDER_MIN_REPAIR_PASSES, PRO3D_RENDER_NODE_TYPE, PRO3D_RENDER_PROMPT_MAX, PRO3D_RENDER_QUALITY_PROFILES, PRO3D_RENDER_SOURCE_KINDS, PRO3D_RENDER_STYLES, type Pro3DRenderAspectRatio, type Pro3DRenderCapabilities, type Pro3DRenderEngine, type Pro3DRenderJobOutput, type Pro3DRenderLocalExportSource, type Pro3DRenderPromptSource, type Pro3DRenderQuality, type Pro3DRenderQuote, type Pro3DRenderQuoteLine, type Pro3DRenderResultMetadata, type Pro3DRenderSceneSource, type Pro3DRenderShotStill, type Pro3DRenderSource, type Pro3DRenderSourceInput, type Pro3DRenderSourceKind, type Pro3DRenderSourceResult, type Pro3DRenderStyle, type Pro3DRenderValidationWarning, RENDER_VIDEO_CREDIT_ID, SCENE3D_ASSERTION_RESTORED_CODE, SCENE3D_ASSET_KINDS, SCENE3D_ASSET_ROLES, SCENE3D_ASSET_ROLE_KINDS, SCENE3D_AUTHORING_ASSUMPTION_CODE, SCENE3D_AUTHORING_ENGINES, SCENE3D_BASIC_ENGINE, SCENE3D_BASIC_SCHEMA_VERSION, SCENE3D_CAMERA_TRACK_FORMAT, SCENE3D_CAMERA_TRACK_LIMITS, SCENE3D_CAMERA_TRACK_VERSION, SCENE3D_CLAY_LIGHTING_PRESETS, SCENE3D_DEFAULT_ADVANCED_ENGINE, SCENE3D_DEFAULT_DURATION_SECONDS, SCENE3D_DEFAULT_ENTITY_CAPABILITIES, SCENE3D_DEFAULT_FPS, SCENE3D_EDIT_NODE_TYPE, SCENE3D_ENTITY_CAPABILITIES, SCENE3D_ENTITY_ROLES, SCENE3D_GENERATE_NODE_TYPE, SCENE3D_GLB_EXTRAS_ALLOWLIST, SCENE3D_GLB_EXTRAS_ENTITY_ID, SCENE3D_GLB_EXTRAS_MATERIAL_ROLE, SCENE3D_GLB_EXTRAS_SUBPART_ID, SCENE3D_LIMITS, SCENE3D_PLAN_FIELD, SCENE3D_PLAN_TYPE, SCENE3D_PRIMITIVES, SCENE3D_PRIMITIVE_MATERIAL_ROLE, SCENE3D_REMEDY_AUTO_APPLIED_CODE, SCENE3D_RENDERER_ASSET_KINDS, SCENE3D_RENDER_BASE_MAX_PX, SCENE3D_RENDER_TIERS, SCENE3D_RENDER_TIER_MULTIPLIERS, SCENE3D_RENDER_XLARGE_MIN_AREA_PX, SCENE3D_REVIEW_REFUSED_CODE, SCENE3D_REVIEW_UNAVAILABLE_CODE, SCENE3D_REVIEW_UNAVAILABLE_REASONS, SCENE3D_SCHEMA_VERSION, SCENE3D_SCHEMA_VERSION_V2, SCENE3D_SUPPORTED_SCHEMA_VERSIONS, SCENE3D_V2_CONTENT_HASH_EXCLUDED, SCENE3D_V2_ENGINES, SCENE3D_V2_LIMITS, SCENE3D_V2_OVERRIDE_OPERATION_VERSION, SCENE3D_V2_PRIMITIVES, type Scene3DAnchor, type Scene3DAssetAnimation, type Scene3DAssetKind, type Scene3DAssetRef, type Scene3DAssetRole, type Scene3DAuthoringDelivery, type Scene3DAuthoringDeliveryMetadata, type Scene3DAuthoringEngine, type Scene3DAuthoringValidation, type Scene3DCamera, type Scene3DCameraChanges, type Scene3DCameraKeyframe, type Scene3DCameraSample, type Scene3DCameraTrackV1, type Scene3DClayLighting, type Scene3DClayLightingPreset, type Scene3DDeliveryWarning, type Scene3DEasing, type Scene3DEditErrorCode, type Scene3DEditOperation, type Scene3DEditOptions, type Scene3DEditResult, type Scene3DEngineChoice, type Scene3DEngineChoiceInput, type Scene3DEngineChoiceRefusalCode, type Scene3DEngineRequestFields, type Scene3DEntityCapability, type Scene3DEntityRole, type Scene3DEntityV2, type Scene3DEntityVisual, type Scene3DInputAsset, type Scene3DJobOutput, type Scene3DJobOutputAny, type Scene3DJobOutputV2, type Scene3DKnownEngine, type Scene3DLighting, type Scene3DLightingChanges, type Scene3DMaterialBinding, type Scene3DNormalizedAssetStats, type Scene3DObject, type Scene3DObjectChanges, type Scene3DObjectKeyframe, type Scene3DOverride, type Scene3DOverrideSpace, type Scene3DParseResult, type Scene3DPlan, type Scene3DPlanV1, type Scene3DPlanV2, type Scene3DPrimitive, type Scene3DProvenance, type Scene3DReference, type Scene3DReferenceKind, type Scene3DReferenceRole, type Scene3DRenderTier, type Scene3DRestoredAssertion, type Scene3DReviewFindings, type Scene3DReviewObjection, type Scene3DReviewRefused, type Scene3DReviewUnavailable, type Scene3DReviewUnavailableReason, type Scene3DReviewVerdict, type Scene3DSemanticIssue, type Scene3DShot, type Scene3DSupportedSchemaVersion, type Scene3DV2EditOperation, type Scene3DV2EditOptions, type Scene3DV2EditResult, type Scene3DV2OverrideInput, type Scene3DV2Primitive, type Scene3DV2ResourceUsage, type Vec3, applyScene3DEditOperations, applyScene3DV2EditOperations, buildPro3DRenderSource, canonicalScene3DPlanV2Json, computeScene3DPlanV2ContentHash, isKnownScene3DEngine, isPro3DRenderJobOutput, isPro3DRenderQuote, isPro3DRenderRenderOnly, isScene3DAuthoringEngine, isScene3DCameraTrack, isScene3DHttpUrl, isScene3DPlan, isScene3DPlanV1, isScene3DPlanV2, isScene3DReviewUnavailableReason, isScene3DSchemaVersionSupported, newScene3DRevisionId, parseScene3DCameraTrackJson, parseScene3DPlanV2Json, pro3DRenderCoreOutputSchema, pro3DRenderFrameUnit, pro3DRenderJobOutputSchema, pro3DRenderProducedSchemaVersion, pro3DRenderQuoteSchema, pro3DRenderReviewVerdictSchema, pro3DRenderShotStillSchema, pro3DRenderShotStills, pro3DRenderTimingOverrides, renderVideoCreditId, resolveScene3DAuthoringEngine, rotationVec3Schema, scaleVec3Schema, scene3DAcceptedSchemaVersionsSchema, scene3DAnchorNameSchema, scene3DAnchorSchema, scene3DAnyPlanSchema, scene3DAssetAnimationSchema, scene3DAssetIdSchema, scene3DAssetRefSchema, scene3DCameraChangesSchema, scene3DCameraKeyframeSchema, scene3DCameraSampleSchema, scene3DCameraSchema, scene3DCameraTrackIssues, scene3DCameraTrackObjectSchema, scene3DCameraTrackPlanIssues, scene3DCameraTrackSchema, scene3DClayLightingSchema, scene3DColorSchema, scene3DDeepEqual, scene3DEasingSchema, scene3DEditOperationSchema, scene3DEditOperationsSchema, scene3DEngineIdSchema, scene3DEntityAcceptsOverlay, scene3DEntityCapabilitySchema, scene3DEntityV2Schema, scene3DEntityVisualSchema, scene3DIdSchema, scene3DInputAssetSchema, scene3DInputAssetsForEngine, scene3DInputAssetsSchema, scene3DJsonByteLength, scene3DLightingChangesSchema, scene3DLightingSchema, scene3DMaterialBindingSchema, scene3DMaterialNameSchema, scene3DMaterialRoleSchema, scene3DNodeIdSchema, scene3DNodeNameSchema, scene3DObjectChangesSchema, scene3DObjectKeyframeSchema, scene3DObjectSchema, scene3DOverrideSchema, scene3DPlanIssues, scene3DPlanSchema, scene3DPlanSchemaVersion, scene3DPlanV1Issues, scene3DPlanV1ObjectSchema, scene3DPlanV1Schema, scene3DPlanV2Issues, scene3DPlanV2ObjectSchema, scene3DPlanV2Schema, scene3DPrimitiveSchema, scene3DProjectionIssues, scene3DProvenanceSchema, scene3DReferenceSchema, scene3DRenderTier, scene3DRenderTierCredits, scene3DReviewNote, scene3DReviewVerdictOf, scene3DSampleForFrame, scene3DSha256Schema, scene3DShotForFrame, scene3DShotIndexForFrame, scene3DShotSchema, scene3DUrlSchema, scene3DV2AdmissionIssues, scene3DV2EditOperationSchema, scene3DV2EditOperationsSchema, scene3DV2HierarchyDepth, scene3DV2NormalizationIssues, scene3DV2OverrideInputSchema, scene3DV2ResourceUsage, scene3DVersionTokenSchema, scene3DZodIssues, sizeVec3Schema, summarizeScene3DOperations, vec3Schema, verifyScene3DPlanV2ContentHash };