@cueframe/kernel 0.2.58 → 0.2.59-rc.1

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 (339) hide show
  1. package/dist/_members/account-model/testing/conversationStoreContract.d.ts +3 -4
  2. package/dist/_members/account-model/testing/restorePointStoreContract.d.ts +3 -4
  3. package/dist/_members/account-model/validators/index.d.ts +0 -1
  4. package/dist/_members/animate/index.d.ts +0 -2
  5. package/dist/_members/authoring/index.d.ts +1 -1
  6. package/dist/_members/authoring/prompts/index.d.ts +0 -1
  7. package/dist/_members/authoring/resources.d.ts +2 -11
  8. package/dist/_members/cloud-import/CloudImportService.d.ts +0 -1
  9. package/dist/_members/cloud-import/index.d.ts +0 -2
  10. package/dist/_members/component-runtime/allowedImports.d.ts +6 -0
  11. package/dist/_members/component-runtime/allowedImports.d.ts.map +1 -1
  12. package/dist/_members/component-runtime/browserIdentity.d.ts +2 -12
  13. package/dist/_members/component-runtime/browserIdentity.d.ts.map +1 -1
  14. package/dist/_members/component-runtime/canonicalIdentity.d.ts +8 -1
  15. package/dist/_members/component-runtime/canonicalIdentity.d.ts.map +1 -1
  16. package/dist/_members/component-runtime/contracts.d.ts +2 -1
  17. package/dist/_members/component-runtime/contracts.d.ts.map +1 -1
  18. package/dist/_members/component-runtime/identity.d.ts +2 -3
  19. package/dist/_members/component-runtime/identity.d.ts.map +1 -1
  20. package/dist/_members/component-runtime/importPolicy.d.ts +5 -0
  21. package/dist/_members/component-runtime/importPolicy.d.ts.map +1 -1
  22. package/dist/_members/component-runtime/template/checks.d.ts +71 -0
  23. package/dist/_members/component-runtime/template/checks.d.ts.map +1 -0
  24. package/dist/_members/component-runtime/template/extract.d.ts +4 -0
  25. package/dist/_members/component-runtime/template/extract.d.ts.map +1 -1
  26. package/dist/_members/component-runtime/template/index.d.ts +1 -0
  27. package/dist/_members/component-runtime/template/index.d.ts.map +1 -1
  28. package/dist/_members/component-runtime/template/schema.d.ts +14 -13
  29. package/dist/_members/component-runtime/template/schema.d.ts.map +1 -1
  30. package/dist/_members/component-runtime/template/testing/templateApplyContract.d.ts +3 -4
  31. package/dist/_members/component-runtime/template/testing/templateApplyContract.d.ts.map +1 -1
  32. package/dist/_members/component-runtime/testing/sourcePolicyCases.d.ts +15 -0
  33. package/dist/_members/component-runtime/testing/sourcePolicyCases.d.ts.map +1 -0
  34. package/dist/_members/component-runtime/webglProbe.d.ts.map +1 -1
  35. package/dist/_members/compose/index.d.ts +1 -1
  36. package/dist/_members/compose/primitiveRegistry.d.ts +0 -2
  37. package/dist/_members/composition/audio/audioMix.d.ts +0 -1
  38. package/dist/_members/composition/audio/mixStaging.d.ts +0 -5
  39. package/dist/_members/composition/fixtures/index.d.ts +0 -1
  40. package/dist/_members/composition/graphics-plan/index.d.ts +0 -2
  41. package/dist/_members/composition/graphics-plan/schemas.d.ts +4 -4
  42. package/dist/_members/composition/invariants/etag.d.ts +0 -1
  43. package/dist/_members/composition/invariants/index.d.ts +0 -1
  44. package/dist/_members/composition/ops/compositionOps.d.ts +0 -1
  45. package/dist/_members/composition/ops/compositionOps.shared.d.ts +6 -0
  46. package/dist/_members/composition/ops/index.d.ts +2 -1
  47. package/dist/_members/composition/primitive-catalog/index.d.ts +0 -2
  48. package/dist/_members/composition/projection/behind-readiness.d.ts +0 -6
  49. package/dist/_members/composition/timeline/link.d.ts +0 -4
  50. package/dist/_members/composition/timeline/plan.d.ts +0 -1
  51. package/dist/_members/composition/validators/brandKit.d.ts +4 -4
  52. package/dist/_members/composition/validators/brandKitBody.d.ts +8 -8
  53. package/dist/_members/composition/validators/cardHtml.d.ts +11 -0
  54. package/dist/_members/composition/validators/composition.d.ts +2 -5
  55. package/dist/_members/composition/validators/css-tree-subpaths.d.ts +16 -0
  56. package/dist/_members/composition/validators/index.d.ts +0 -3
  57. package/dist/_members/composition/validators/session.d.ts +3 -3
  58. package/dist/_members/composition/validators/webhook.d.ts +4 -4
  59. package/dist/_members/composition-ops/alphaLayers.d.ts +0 -5
  60. package/dist/_members/composition-ops/index.d.ts +2 -2
  61. package/dist/_members/composition-ops/opRecorder.d.ts +23 -3
  62. package/dist/_members/core/render/exportSettings.d.ts +4 -2
  63. package/dist/_members/core/render/index.d.ts +1 -1
  64. package/dist/_members/core/render/vcam/requiredRegion.d.ts +0 -1
  65. package/dist/_members/director/ai-sdk/index.d.ts +0 -1
  66. package/dist/_members/director/ai-sdk/messages.d.ts +0 -1
  67. package/dist/_members/director/domain/chat.d.ts +0 -78
  68. package/dist/_members/director/domain/index.d.ts +0 -1
  69. package/dist/_members/errors/registry.d.ts +6 -0
  70. package/dist/_members/foundation/canonical/index.d.ts +14 -0
  71. package/dist/_members/foundation/index.d.ts +1 -1
  72. package/dist/_members/foundation/primitives/index.d.ts +0 -2
  73. package/dist/_members/foundation/testing/index.d.ts +1 -0
  74. package/dist/_members/foundation/testing/knownRed.d.ts +13 -0
  75. package/dist/_members/mcp/adapter.d.ts +21 -0
  76. package/dist/_members/mcp/compositionOps.d.ts +10 -0
  77. package/dist/_members/mcp/server.d.ts +0 -5
  78. package/dist/_members/mcp/wait.d.ts +3 -1
  79. package/dist/_members/media-model/generation.d.ts +0 -25
  80. package/dist/_members/nle-export/xml-utils.d.ts +0 -8
  81. package/dist/_members/plane/conformance.d.ts +20 -0
  82. package/dist/_members/primitives/index.d.ts +1 -11
  83. package/dist/_members/primitives/lib/index.d.ts +1 -1
  84. package/dist/_members/primitives/lib/tokens.d.ts +0 -16
  85. package/dist/_members/render-harness/cardAssetAdmission.d.ts +1 -0
  86. package/dist/_members/render-harness/cardAssetAdmission.d.ts.map +1 -1
  87. package/dist/_members/render-harness/cardRender.d.ts.map +1 -1
  88. package/dist/_members/render-harness/materializeSources.d.ts.map +1 -1
  89. package/dist/_members/render-harness/mediaServer.d.ts +6 -1
  90. package/dist/_members/render-harness/mediaServer.d.ts.map +1 -1
  91. package/dist/account-model/testing.js +15 -5
  92. package/dist/account-model/validators.js +5 -7
  93. package/dist/account-model.js +5 -7
  94. package/dist/animate/preparation-facts.js +1 -1
  95. package/dist/animate.js +2 -6
  96. package/dist/authoring/composer.js +1 -1
  97. package/dist/authoring/context.js +8 -7
  98. package/dist/authoring/models/defaults.d.ts +1 -0
  99. package/dist/authoring/models/defaults.js +7 -0
  100. package/dist/authoring/models.js +5 -3
  101. package/dist/authoring/motion.d.ts +1 -0
  102. package/dist/authoring/motion.js +25 -0
  103. package/dist/authoring/prompts.js +4 -14
  104. package/dist/authoring/providers.js +1 -1
  105. package/dist/authoring/resource-routing.js +2 -2
  106. package/dist/authoring/resources.js +4 -22
  107. package/dist/authoring/scene.js +3 -2
  108. package/dist/authoring.js +662 -219
  109. package/dist/brand-derivation/constants.js +1 -1
  110. package/dist/brand-derivation.js +1 -1
  111. package/dist/{chunk-LBJ5LI5V.js → chunk-2K2GBFLU.js} +17 -8
  112. package/dist/{chunk-RAXHCRVV.js → chunk-2PAP5LO5.js} +1 -1
  113. package/dist/{chunk-MNO6AO2J.js → chunk-3HLDIIWA.js} +1 -1
  114. package/dist/{chunk-PTVTWQ4T.js → chunk-3JEUNKDK.js} +2 -2
  115. package/dist/chunk-3VWJ3H4X.js +68 -0
  116. package/dist/{chunk-S5H6GH6M.js → chunk-3Z7CN54H.js} +1 -1
  117. package/dist/{chunk-FVDFPJHT.js → chunk-46WBCUPE.js} +1 -1
  118. package/dist/chunk-4VBLQIM5.js +30 -0
  119. package/dist/{chunk-N2OZDD44.js → chunk-6HA55CRU.js} +4 -5
  120. package/dist/{chunk-WL2MLKWU.js → chunk-6HPEMDQW.js} +1 -1
  121. package/dist/{chunk-PWWZTY3G.js → chunk-6KZCXAYL.js} +5 -2
  122. package/dist/{chunk-IEXAKOEX.js → chunk-6QGARSV6.js} +2 -15
  123. package/dist/{chunk-3YVIAWET.js → chunk-7II5OM7R.js} +13 -1
  124. package/dist/{chunk-UFD4EZHM.js → chunk-AFUITAH6.js} +4 -5
  125. package/dist/{chunk-HGCYZMII.js → chunk-AK6QPX7A.js} +9 -9
  126. package/dist/{chunk-EC6VFQE6.js → chunk-BZVOCVQV.js} +1 -0
  127. package/dist/{chunk-RBWS5XHE.js → chunk-CAF7BRNE.js} +2 -2
  128. package/dist/{chunk-TR53N6HB.js → chunk-CEO47DIE.js} +6 -3
  129. package/dist/chunk-CIOUDOGN.js +12 -0
  130. package/dist/{chunk-GQ6XGAFB.js → chunk-DCKADD5B.js} +1 -1
  131. package/dist/{chunk-4NIJWK45.js → chunk-EISHFHU5.js} +0 -8
  132. package/dist/chunk-EQH37KNZ.js +224 -0
  133. package/dist/{chunk-EXY4JJPH.js → chunk-F6PLDBAK.js} +2 -11
  134. package/dist/{chunk-DAARYRNT.js → chunk-FKSXKS35.js} +6 -6
  135. package/dist/{chunk-KBDUEU4W.js → chunk-FZB7UX44.js} +1 -1
  136. package/dist/chunk-H2ZZXISB.js +24 -0
  137. package/dist/{chunk-WSMCZRJ2.js → chunk-I2HNC4PQ.js} +1 -1
  138. package/dist/{chunk-NVXSKKRN.js → chunk-IUJABAG2.js} +14 -10
  139. package/dist/{chunk-7NIOFHMH.js → chunk-IVFMOHAC.js} +1 -9
  140. package/dist/{chunk-UKDBU7HM.js → chunk-JNBNDHEF.js} +3 -3
  141. package/dist/{chunk-JWMWVP64.js → chunk-KC4LNZL5.js} +4 -9
  142. package/dist/{chunk-GCQ7Z7S7.js → chunk-KKATUGRU.js} +3 -9
  143. package/dist/{chunk-Q5P5UFOP.js → chunk-KLQ53NX3.js} +13 -1
  144. package/dist/{chunk-UMXES6ED.js → chunk-LVMWPFV4.js} +1 -1
  145. package/dist/{chunk-TKFLSGAS.js → chunk-MMJYII7Y.js} +5 -5
  146. package/dist/{chunk-REST55RC.js → chunk-NECN7TT4.js} +5 -4
  147. package/dist/{chunk-4ZE564YF.js → chunk-NM7NWXGF.js} +0 -146
  148. package/dist/{chunk-5T655LYZ.js → chunk-NY6EI5YW.js} +4 -4
  149. package/dist/{chunk-UXRSEMJJ.js → chunk-ONSGT6UJ.js} +66 -35
  150. package/dist/{chunk-VZ7TYX6Z.js → chunk-P3EFZDM5.js} +0 -17
  151. package/dist/{chunk-BEFSJMFF.js → chunk-P6RVYHLT.js} +9 -9
  152. package/dist/{chunk-TBHSOEYK.js → chunk-PLWDYWK6.js} +4 -34
  153. package/dist/{chunk-KYRDKK2D.js → chunk-Q6CJ6HCU.js} +1 -6
  154. package/dist/{chunk-FWSJLHSV.js → chunk-R642352J.js} +1 -1
  155. package/dist/{chunk-XELS2BGA.js → chunk-R6HTIP3N.js} +1 -3
  156. package/dist/{chunk-RL5SO653.js → chunk-RQRPSSRT.js} +1 -1
  157. package/dist/chunk-RR7UBEBV.js +172 -0
  158. package/dist/{chunk-FHMTAZD4.js → chunk-RWJHZCOR.js} +1 -71
  159. package/dist/{chunk-73DQTUWY.js → chunk-TIAJMEQ4.js} +2 -22
  160. package/dist/{chunk-2ESYSVXG.js → chunk-U67V476Y.js} +2 -15
  161. package/dist/{chunk-3VLDQE26.js → chunk-U7KSOA2L.js} +4 -21
  162. package/dist/{chunk-VLJOIUHL.js → chunk-UGEUB763.js} +6 -6
  163. package/dist/{chunk-K66NLMGX.js → chunk-UGWJC4GA.js} +62 -18
  164. package/dist/chunk-VBYINB74.js +136 -0
  165. package/dist/{chunk-W2245F6G.js → chunk-WTQRLFR2.js} +1 -1
  166. package/dist/{chunk-JN3GF36B.js → chunk-X2RTLS6K.js} +2 -23
  167. package/dist/chunk-XHMKPTHV.js +20 -0
  168. package/dist/{chunk-2L33CKIY.js → chunk-XOT2VWCO.js} +18 -31
  169. package/dist/{chunk-AK5QBHOB.js → chunk-XQGQ5EFS.js} +10 -1
  170. package/dist/chunk-XR76OZKC.js +21 -0
  171. package/dist/chunk-ZCEYEIRB.js +179 -0
  172. package/dist/{chunk-IMIUHG2E.js → chunk-ZPJQ3TQL.js} +1 -3
  173. package/dist/cloud-import.js +1 -16
  174. package/dist/component-runtime/browserOptions.js +4 -3
  175. package/dist/component-runtime/contracts.js +2 -2
  176. package/dist/component-runtime/identity/browser.js +2 -17
  177. package/dist/component-runtime/identity.js +5 -7
  178. package/dist/component-runtime/importPolicy.js +3 -3
  179. package/dist/component-runtime/mediaResolution.js +1 -1
  180. package/dist/component-runtime/render.js +8 -7
  181. package/dist/component-runtime/sourceAdmission.js +3 -3
  182. package/dist/component-runtime/template/testing.js +15 -12
  183. package/dist/component-runtime/template.js +165 -13
  184. package/dist/component-runtime.js +27 -28
  185. package/dist/compose.js +30 -47
  186. package/dist/composition/audio.js +4 -8
  187. package/dist/composition/brand-kit.js +1 -1
  188. package/dist/composition/brief.js +1 -1
  189. package/dist/composition/card-html.d.ts +1 -0
  190. package/dist/composition/card-html.js +15 -0
  191. package/dist/composition/depth.js +1 -1
  192. package/dist/composition/floors.js +2 -2
  193. package/dist/composition/fonts.js +1 -1
  194. package/dist/composition/graphics-plan.js +4 -44
  195. package/dist/composition/invariants.js +5 -12
  196. package/dist/composition/ops.js +7 -6
  197. package/dist/composition/primitive-catalog.js +2 -6
  198. package/dist/composition/projection.js +3 -5
  199. package/dist/composition/reframe/coverage.js +1 -1
  200. package/dist/composition/reframe/kenBurns.js +1 -1
  201. package/dist/composition/reframe/shotScale.js +1 -1
  202. package/dist/composition/reframe/trajectory.js +1 -1
  203. package/dist/composition/reframe.js +1 -1
  204. package/dist/composition/scene/budget-policy.js +1 -1
  205. package/dist/composition/scene.js +1 -1
  206. package/dist/composition/timeline.js +4 -8
  207. package/dist/composition/validators/brand-kit-body.js +5 -4
  208. package/dist/composition/validators/graphic-kinds.js +1 -1
  209. package/dist/composition/validators.js +8 -65
  210. package/dist/composition-ops.js +17 -16
  211. package/dist/composition.js +13 -79
  212. package/dist/context-7SWSVJ6Z.js +17 -0
  213. package/dist/core/render.js +13 -9
  214. package/dist/core/select.js +3 -3
  215. package/dist/core.js +9 -9
  216. package/dist/director/ai-sdk.js +7 -11
  217. package/dist/director/domain.js +9 -17
  218. package/dist/director.js +9 -21
  219. package/dist/{dist-LAJ2363K.js → dist-6FO67KVA.js} +1 -1
  220. package/dist/errors.js +2 -2
  221. package/dist/foundation/canonical.d.ts +1 -0
  222. package/dist/foundation/canonical.js +7 -0
  223. package/dist/foundation/primitives.js +4 -6
  224. package/dist/foundation/testing.d.ts +1 -0
  225. package/dist/foundation/testing.js +7 -0
  226. package/dist/foundation.js +7 -9
  227. package/dist/{magic-string.es-SDTMJBWP.js → magic-string.es-KVSW34UD.js} +1 -1
  228. package/dist/mcp/adapter.js +11 -19
  229. package/dist/mcp/composition-ops.d.ts +1 -0
  230. package/dist/mcp/composition-ops.js +11 -0
  231. package/dist/mcp/core.js +2 -2
  232. package/dist/mcp/curation.js +1 -1
  233. package/dist/mcp/executor.js +1 -1
  234. package/dist/mcp/scene-shot.js +3 -3
  235. package/dist/mcp/server.js +6 -7
  236. package/dist/mcp/wire-schema.js +13 -2
  237. package/dist/mcp.js +11 -10
  238. package/dist/media-model/generation.js +6 -8
  239. package/dist/media-model/media-kind.js +1 -1
  240. package/dist/media-model/testing.js +2 -2
  241. package/dist/media-model/transcriptSearch.js +1 -1
  242. package/dist/media-model.js +6 -8
  243. package/dist/nle-export/xml.js +1 -1
  244. package/dist/nle-export.js +2 -2
  245. package/dist/perception.js +1 -1
  246. package/dist/plane/conformance.js +8 -4
  247. package/dist/plane/contract.js +1 -1
  248. package/dist/plane.js +8 -4
  249. package/dist/primitives/backgrounds.js +3 -3
  250. package/dist/primitives/captions.js +2 -2
  251. package/dist/primitives/effects.js +5 -5
  252. package/dist/primitives/hero-text.js +4 -4
  253. package/dist/primitives/layouts.js +4 -4
  254. package/dist/primitives/lib/easings.js +1 -1
  255. package/dist/primitives/lib/frameScale.js +1 -1
  256. package/dist/primitives/lib/index.js +7 -13
  257. package/dist/primitives/lib/palette.js +2 -2
  258. package/dist/primitives/lib/preview.js +1 -1
  259. package/dist/primitives/lib/schema.js +1 -1
  260. package/dist/primitives/lib/seeded-random.js +1 -1
  261. package/dist/primitives/lib/text/contrast.js +3 -3
  262. package/dist/primitives/lib/text/fill.js +1 -1
  263. package/dist/primitives/lib/text/fitText.js +1 -1
  264. package/dist/primitives/lib/text/marker.js +1 -1
  265. package/dist/primitives/lib/text/motion.js +1 -1
  266. package/dist/primitives/lib/text/recolor.js +1 -1
  267. package/dist/primitives/lib/text/stage.js +1 -1
  268. package/dist/primitives/lib/text/typeface.js +1 -1
  269. package/dist/primitives/lib/tokens.js +4 -11
  270. package/dist/primitives/lib.js +7 -13
  271. package/dist/primitives/scenes.js +5 -5
  272. package/dist/primitives/subject-foreground.js +1 -1
  273. package/dist/primitives/text.js +4 -4
  274. package/dist/primitives/transitions.js +3 -3
  275. package/dist/primitives/ui-blocks.js +6 -6
  276. package/dist/primitives/workspace.js +1 -1
  277. package/dist/primitives.js +26 -40
  278. package/dist/render-harness/cardAssetAdmission.js +4 -4
  279. package/dist/render-harness/cardFonts.js +3 -3
  280. package/dist/render-harness/renderInputAssets.js +4 -4
  281. package/dist/render-harness.js +104 -86
  282. package/dist/{src-ZP6727AA.js → src-XI5MULKD.js} +17 -16
  283. package/package.json +38 -60
  284. package/dist/_members/account-model/validators/workingComposition.d.ts +0 -11
  285. package/dist/_members/animate/animations/index.d.ts +0 -9
  286. package/dist/_members/animate/easing/index.d.ts +0 -3
  287. package/dist/_members/animate/mobjects/index.d.ts +0 -4
  288. package/dist/_members/animate/scene/internal.d.ts +0 -29
  289. package/dist/_members/authoring/prompts/graphics.d.ts +0 -9
  290. package/dist/_members/cloud-import/cloudConfig.d.ts +0 -2
  291. package/dist/_members/composition/autozoom/index.d.ts +0 -25
  292. package/dist/_members/composition/graphics-plan/instantiateMotif.d.ts +0 -34
  293. package/dist/_members/composition/invariants/time.d.ts +0 -14
  294. package/dist/_members/composition/types/index.d.ts +0 -8
  295. package/dist/_members/composition/validators/font.d.ts +0 -58
  296. package/dist/_members/composition/validators/registry.d.ts +0 -79
  297. package/dist/_members/composition/validators/render.d.ts +0 -2068
  298. package/dist/_members/director/ai-sdk/chunks.d.ts +0 -14
  299. package/dist/_members/director/domain/ports.d.ts +0 -32
  300. package/dist/_members/director/testing/contract.d.ts +0 -52
  301. package/dist/_members/director/testing/index.d.ts +0 -1
  302. package/dist/_members/foundation/codes/index.d.ts +0 -10
  303. package/dist/_members/nle-export/server/index.d.ts +0 -1
  304. package/dist/_members/nle-export/server/pack-zip.d.ts +0 -6
  305. package/dist/_members/render-harness/assetRefs.d.ts +0 -26
  306. package/dist/_members/render-harness/assetRefs.d.ts.map +0 -1
  307. package/dist/_members/render-harness/remotion-runtime.d.ts +0 -87
  308. package/dist/authoring/build-tools.d.ts +0 -1
  309. package/dist/authoring/build-tools.js +0 -28
  310. package/dist/authoring/capabilities.d.ts +0 -1
  311. package/dist/authoring/capabilities.js +0 -11
  312. package/dist/authoring/pipelineTrace.d.ts +0 -1
  313. package/dist/authoring/pipelineTrace.js +0 -7
  314. package/dist/authoring/tools.d.ts +0 -1
  315. package/dist/authoring/tools.js +0 -31
  316. package/dist/chunk-6UZYUWBX.js +0 -197
  317. package/dist/chunk-7EDLPIUN.js +0 -384
  318. package/dist/chunk-GF52TW4I.js +0 -51
  319. package/dist/chunk-IG3YAOUZ.js +0 -418
  320. package/dist/chunk-JOURGVOR.js +0 -27
  321. package/dist/chunk-MFMR3LHO.js +0 -116
  322. package/dist/chunk-OSMXQV5V.js +0 -18
  323. package/dist/chunk-QDBVYZSF.js +0 -128
  324. package/dist/chunk-U3JPILZS.js +0 -15
  325. package/dist/chunk-Y4HPN4BC.js +0 -364
  326. package/dist/composition/autozoom.d.ts +0 -1
  327. package/dist/composition/autozoom.js +0 -76
  328. package/dist/composition/fixtures.d.ts +0 -1
  329. package/dist/composition/fixtures.js +0 -154
  330. package/dist/composition/types.d.ts +0 -1
  331. package/dist/composition/types.js +0 -0
  332. package/dist/context-4WSFPRLX.js +0 -16
  333. package/dist/director/testing.d.ts +0 -1
  334. package/dist/director/testing.js +0 -22
  335. package/dist/foundation/codes.d.ts +0 -1
  336. package/dist/foundation/codes.js +0 -7
  337. package/dist/nle-export/server.d.ts +0 -1
  338. package/dist/nle-export/server.js +0 -25856
  339. /package/dist/{chunk-FTVZF4GO.js → chunk-S432RE6G.js} +0 -0
package/dist/authoring.js CHANGED
@@ -4,65 +4,58 @@ import {
4
4
  hasSceneOp,
5
5
  isSceneOp,
6
6
  materializeSceneOpsCore
7
- } from "./chunk-N2OZDD44.js";
8
- import {
9
- ZERO_USAGE,
10
- buildDirectorTools,
11
- buildPlannerTools,
12
- buildToolsFromSchemas,
13
- extractProviderError
14
- } from "./chunk-6UZYUWBX.js";
15
- import {
16
- COMPOSE_MOTION_TOOLS,
17
- COMPOSE_MOTION_VERIFY_TOOLS,
18
- COMPOSE_PLANNER_REPAIR_TOOLS,
19
- COMPOSE_PLANNER_TOOLS,
20
- COMPOSE_ROLE_TOOLS,
21
- COMPOSE_ROLE_TOOL_NAMES,
22
- dispatchComposeRoleTool
23
- } from "./chunk-7EDLPIUN.js";
24
- import {
25
- AgentFixableCaptureError,
26
- getExcludedTools
27
- } from "./chunk-JOURGVOR.js";
7
+ } from "./chunk-6HA55CRU.js";
28
8
  import {
29
9
  buildDirectorContext
30
- } from "./chunk-UMXES6ED.js";
10
+ } from "./chunk-LVMWPFV4.js";
31
11
  import {
32
12
  buildFastModel,
33
13
  buildModel,
34
14
  makeLangfuseFetch
35
- } from "./chunk-GCQ7Z7S7.js";
15
+ } from "./chunk-KKATUGRU.js";
16
+ import "./chunk-CIOUDOGN.js";
36
17
  import {
37
- PipelineTrace
38
- } from "./chunk-GF52TW4I.js";
18
+ MOTION_PRESETS,
19
+ MotionPresetError,
20
+ generateMotionShell,
21
+ hasMotionPresetOp,
22
+ isMotionPresetOp,
23
+ materializeMotionPresetOpsCore,
24
+ resolveMotionPresetCard
25
+ } from "./chunk-RR7UBEBV.js";
39
26
  import {
40
- CODE_GEN_FEW_SHOT_EXAMPLES,
41
- COMPONENT_CONTRACT,
42
- DESIGN_QUALITY_RULES,
43
27
  EVALUATOR_PROMPT,
44
28
  PLANNING_INSTRUCTIONS,
45
- TOOLKIT_REFERENCE,
46
29
  buildExecutionTask,
47
30
  buildPlannerUserMessage,
48
- formatPlanSteps,
49
- initCodeGenPrompts
50
- } from "./chunk-Y4HPN4BC.js";
51
- import "./chunk-4NIJWK45.js";
52
- import "./chunk-LBJ5LI5V.js";
53
- import "./chunk-IG3YAOUZ.js";
54
- import "./chunk-PWWZTY3G.js";
55
- import "./chunk-UFD4EZHM.js";
31
+ formatPlanSteps
32
+ } from "./chunk-VBYINB74.js";
33
+ import {
34
+ canonicalJson
35
+ } from "./chunk-XHMKPTHV.js";
36
+ import {
37
+ getPrimitiveSubtextParam,
38
+ getPrimitiveTextParam
39
+ } from "./chunk-EISHFHU5.js";
40
+ import {
41
+ selectAllOverlays
42
+ } from "./chunk-2K2GBFLU.js";
43
+ import {
44
+ ComposePlan
45
+ } from "./chunk-ZCEYEIRB.js";
46
+ import "./chunk-6KZCXAYL.js";
47
+ import {
48
+ OverlayClipSource
49
+ } from "./chunk-AFUITAH6.js";
56
50
  import "./chunk-WPZKOVYF.js";
57
51
  import "./chunk-B7J5UUUV.js";
58
- import "./chunk-KYRDKK2D.js";
59
- import "./chunk-7NIOFHMH.js";
60
- import {
61
- cssLayoutVars
62
- } from "./chunk-DKBFAQCW.js";
52
+ import "./chunk-EQH37KNZ.js";
53
+ import "./chunk-Q6CJ6HCU.js";
63
54
  import "./chunk-WREYUH2E.js";
55
+ import "./chunk-IVFMOHAC.js";
56
+ import "./chunk-DKBFAQCW.js";
64
57
  import "./chunk-ILO4NEZ3.js";
65
- import "./chunk-AK5QBHOB.js";
58
+ import "./chunk-XQGQ5EFS.js";
66
59
  import "./chunk-7PA7FGLD.js";
67
60
  import "./chunk-VG2ND6PX.js";
68
61
  import {
@@ -71,11 +64,522 @@ import {
71
64
  } from "./chunk-CL5Y6V6K.js";
72
65
  import "./chunk-2L7PYYJK.js";
73
66
  import "./chunk-OOL7ZUG7.js";
74
- import "./chunk-2ESYSVXG.js";
67
+ import "./chunk-U67V476Y.js";
75
68
 
76
69
  // ../authoring/src/agent.ts
77
70
  import { ToolLoopAgent, generateText, isStepCount } from "ai";
78
71
 
72
+ // ../authoring/src/capabilities.ts
73
+ var AgentFixableCaptureError = class extends Error {
74
+ agentFixable = true;
75
+ constructor(message) {
76
+ super(message);
77
+ this.name = "AgentFixableCaptureError";
78
+ }
79
+ };
80
+ var CAPABILITY_GATED_TOOLS = Object.freeze({
81
+ capture_frames: "capture",
82
+ score_composition: "verify",
83
+ apply_motion_preset: "motionPreset",
84
+ search_library: "resources"
85
+ });
86
+ function getExcludedTools(capabilities) {
87
+ const ex = /* @__PURE__ */ new Set();
88
+ for (const [tool2, cap] of Object.entries(CAPABILITY_GATED_TOOLS)) {
89
+ if (!capabilities[cap]) ex.add(tool2);
90
+ }
91
+ return ex;
92
+ }
93
+
94
+ // ../authoring/src/agent/buildTools.ts
95
+ import { tool } from "ai";
96
+
97
+ // ../authoring/src/tools/toolSets.ts
98
+ var COMPOSE_PLANNER_TOOLS = [
99
+ "get_context",
100
+ "get_word_timings",
101
+ "search_library",
102
+ "capture_frames",
103
+ "submit_compose_plan"
104
+ ];
105
+ var COMPOSE_PLANNER_REPAIR_TOOLS = [
106
+ "get_context",
107
+ "get_word_timings",
108
+ "search_library",
109
+ "capture_frames",
110
+ "amend_compose_plan"
111
+ ];
112
+ var COMPOSE_MOTION_TOOLS = [
113
+ "get_context",
114
+ "get_word_timings",
115
+ "inspect_overlay",
116
+ "capture_frames",
117
+ "update_overlay",
118
+ "apply_motion_preset",
119
+ "score_composition"
120
+ ];
121
+ var COMPOSE_MOTION_VERIFY_TOOLS = COMPOSE_MOTION_TOOLS.filter(
122
+ (t) => t !== "update_overlay" && t !== "apply_motion_preset"
123
+ );
124
+
125
+ // ../authoring/src/tools/composeRoleTools.ts
126
+ import { z } from "zod";
127
+ function overlayViews(capabilities) {
128
+ return selectAllOverlays(capabilities.composition.getState().composition).flatMap(
129
+ (o) => o.source.kind === "overlay" ? [{
130
+ id: o.id,
131
+ template: o.source.primitiveId,
132
+ startTime: o.startTime,
133
+ duration: o.duration,
134
+ params: { ...o.source.params }
135
+ }] : []
136
+ );
137
+ }
138
+ var COMPOSE_ROLE_TOOLS = Object.freeze({
139
+ get_context: {
140
+ name: "get_context",
141
+ description: "Get current project state: transcript with word-level timings, clips on timeline, overlays, brand kit, imported assets, playhead time, timeline duration, and FPS. Always call this first.",
142
+ schema: z.object({}),
143
+ metadata: { label: "Get Context" },
144
+ handler: async (_args, capabilities) => {
145
+ const { buildDirectorContext: buildDirectorContext2 } = await import("./context-7SWSVJ6Z.js");
146
+ return buildDirectorContext2(capabilities);
147
+ }
148
+ },
149
+ get_word_timings: {
150
+ name: "get_word_timings",
151
+ description: "Get precise word-level timestamps for a section of the transcript. Call this BEFORE you name a cut range, so the range lands on real word boundaries instead of a rounded guess. On the library page, pass poolItemId to read a specific media item.",
152
+ schema: z.object({
153
+ startTime: z.coerce.number().min(0).describe("Start of time range in seconds"),
154
+ endTime: z.coerce.number().min(0).describe("End of time range in seconds"),
155
+ poolItemId: z.string().optional().describe("Pool item ID to read. If omitted, reads the current timeline transcript.")
156
+ }),
157
+ metadata: { label: "Get Word Timings" },
158
+ inputExamples: [{ input: { startTime: 12, endTime: 15 } }],
159
+ handler: async (args, capabilities) => {
160
+ const startTime = args.startTime;
161
+ const endTime = args.endTime;
162
+ if (endTime <= startTime) {
163
+ return { error: `Invalid range: endTime (${endTime}) must be greater than startTime (${startTime})` };
164
+ }
165
+ return capabilities.transcript.getWordTimings(startTime, endTime);
166
+ }
167
+ },
168
+ inspect_overlay: {
169
+ name: "inspect_overlay",
170
+ description: "Retrieve the full details of an existing overlay, including its JSX source code. Use this to inspect fonts, colors, animations, or any implementation detail of a placed overlay.",
171
+ schema: z.object({
172
+ id: z.string().describe("The ID of the overlay to inspect")
173
+ }),
174
+ metadata: { label: "Inspect Overlay" },
175
+ strict: true,
176
+ handler: async (args, capabilities) => {
177
+ const overlay = overlayViews(capabilities).find((o) => o.id === args.id);
178
+ if (!overlay) return { error: `Overlay ${args.id} not found` };
179
+ const lines = [
180
+ `Overlay ${overlay.id}:`,
181
+ ` template: ${overlay.template}`,
182
+ ` startTime: ${overlay.startTime}s`,
183
+ ` duration: ${overlay.duration}s`,
184
+ ` text: "${overlay.params.text}"`
185
+ ];
186
+ if (overlay.params.subtext) lines.push(` subtext: "${overlay.params.subtext}"`);
187
+ if (overlay.params.position) lines.push(` position: ${overlay.params.position}`);
188
+ if (overlay.params.accentColor) lines.push(` accentColor: ${overlay.params.accentColor}`);
189
+ if (overlay.params.transition) lines.push(` transition: ${overlay.params.transition}`);
190
+ if (overlay.params.sequenceGroup) lines.push(` sequenceGroup: ${overlay.params.sequenceGroup}`);
191
+ if (overlay.params.jsxSource) {
192
+ lines.push(`
193
+ Source code:
194
+ ${overlay.params.jsxSource}`);
195
+ } else {
196
+ lines.push(`
197
+ (No custom source code \u2014 uses built-in template rendering)`);
198
+ }
199
+ return lines.join("\n");
200
+ }
201
+ },
202
+ update_overlay: {
203
+ name: "update_overlay",
204
+ description: "Update properties of an existing motion graphic overlay. Only include the fields you want to change. Provide authored jsxSource to re-generate a custom component.",
205
+ schema: z.object({
206
+ id: z.string().min(1).describe("The overlay clip ID (a UUID). Use the exact id inspect_overlay reports \u2014 never fabricate IDs."),
207
+ startTime: z.coerce.number().min(0).optional().describe("New start time in seconds"),
208
+ duration: z.coerce.number().min(0.5).max(60).optional().describe("New duration in seconds"),
209
+ text: z.string().min(1).max(200).optional().describe("New primary text"),
210
+ subtext: z.string().max(200).optional().describe("New secondary text"),
211
+ position: z.string().optional().transform((v) => {
212
+ if (!v) return v;
213
+ const match = v.match(/(left|center|right)/i);
214
+ return match ? match[1].toLowerCase() : "center";
215
+ }),
216
+ accentColor: z.string().regex(/^#[0-9a-fA-F]{3,8}$/, "Must be a hex color (e.g., #D4AF37)").optional().describe("New accent color as hex"),
217
+ textColor: z.string().regex(/^#[0-9a-fA-F]{3,8}$/, "Must be a hex color").optional().describe("New text color as hex"),
218
+ fontFamily: z.string().optional().describe("New font family"),
219
+ backgroundColor: z.string().regex(/^#[0-9a-fA-F]{3,8}$/, "Must be a hex color").optional().describe("New background color as hex"),
220
+ jsxSource: z.string().max(5e4).optional().describe("New canonical TSX module source for the overlay"),
221
+ transition: z.enum(["fade", "slide", "wipe", "none"]).optional().describe("New transition type"),
222
+ sequenceGroup: z.string().optional().describe("New sequence group ID"),
223
+ primitiveId: z.string().optional().describe(
224
+ 'Switch the overlay to a different primitive component ID (e.g. "lower-third", "heroText"). Omit to keep the current primitive.'
225
+ ),
226
+ params: z.record(z.string(), z.unknown()).optional().describe(
227
+ "Per-primitive params bag to merge over the overlay\u2019s existing params. Only the keys you set change; existing params are preserved."
228
+ ),
229
+ zPlane: OverlayClipSource.shape.zPlane.describe(
230
+ 'Depth plane. "front" renders over the video; "behind-subject" renders UNDER the subject cut-out (the launch-video hero-text look). Omit to keep the overlay\u2019s current plane.'
231
+ ),
232
+ parallax: OverlayClipSource.shape.parallax.describe(
233
+ "Depth parallax for a behind-subject overlay (differential motion vs the camera; 0 locks to the scene). Omit to keep the current value."
234
+ ),
235
+ anchor: z.object({
236
+ x: z.number().min(0).max(1).describe("Horizontal anchor, source-normalized [0,1]."),
237
+ y: z.number().min(0).max(1).describe("Vertical anchor, source-normalized [0,1].")
238
+ }).optional().describe(
239
+ "Durable scene-space anchor for a behind-subject overlay. Omit to keep the system-placed (or previously set) anchor."
240
+ )
241
+ }),
242
+ metadata: { label: "Update Overlay" },
243
+ inputExamples: [
244
+ { input: { id: "abc-123", text: "Updated Title", accentColor: "#6366f1" } },
245
+ { input: { id: "def-456", startTime: 10, duration: 5, jsxSource: "export default function..." } },
246
+ { input: { id: "ghi-789", zPlane: "behind-subject", anchor: { x: 0.5, y: 0.4 }, parallax: 0.1 } }
247
+ ],
248
+ handler: async (args, capabilities) => {
249
+ const composition = capabilities.composition.getState().composition;
250
+ const allOverlays = selectAllOverlays(composition);
251
+ const existingClip = allOverlays.find((o) => o.id === args.id);
252
+ if (!existingClip || existingClip.source.kind !== "overlay") {
253
+ const valid = allOverlays.filter((o) => o.source.kind === "overlay").map((o) => `'${o.id}'`);
254
+ return {
255
+ error: `Overlay ${args.id} not found. ` + (valid.length > 0 ? `Overlay clip ids in this composition: ${valid.join(", ")}.` : `This composition has no overlay clips.`)
256
+ };
257
+ }
258
+ const existingSource = existingClip.source;
259
+ const updates = {};
260
+ if (args.startTime != null) updates.startTime = args.startTime;
261
+ if (args.duration != null) updates.duration = args.duration;
262
+ const existingTemplate = existingSource.primitiveId;
263
+ if (args.text != null && existingTemplate) {
264
+ if (getPrimitiveTextParam(existingTemplate) === null) {
265
+ return { error: `Overlay template "${existingTemplate}" does not accept a text payload.` };
266
+ }
267
+ }
268
+ if (args.subtext != null && existingTemplate) {
269
+ if (getPrimitiveSubtextParam(existingTemplate) === null) {
270
+ return { error: `Overlay template "${existingTemplate}" does not accept a subtext payload.` };
271
+ }
272
+ }
273
+ const newParams = {
274
+ ...existingSource.params,
275
+ ...args.params ?? {}
276
+ };
277
+ if (args.text != null) newParams.text = args.text;
278
+ if (args.subtext != null) newParams.subtext = args.subtext;
279
+ if (args.accentColor != null) newParams.accentColor = args.accentColor;
280
+ if (args.textColor != null) newParams.textColor = args.textColor;
281
+ if (args.backgroundColor != null) newParams.backgroundColor = args.backgroundColor;
282
+ if (args.fontFamily != null) newParams.fontFamily = args.fontFamily;
283
+ if (args.position != null) newParams.position = args.position;
284
+ if (args.transition != null) newParams.transition = args.transition;
285
+ if (args.sequenceGroup != null) newParams.sequenceGroup = args.sequenceGroup;
286
+ const jsxSource = args.jsxSource;
287
+ let primitiveId = args.primitiveId ?? existingTemplate;
288
+ if (jsxSource) {
289
+ newParams.jsxSource = jsxSource;
290
+ newParams.componentManifest ??= {
291
+ version: 2,
292
+ assets: {},
293
+ graphics: { api: "canvas2d", required: true, accelerationPreference: "software-allowed" },
294
+ alphaPolicy: "requires-transparency"
295
+ };
296
+ primitiveId = "custom";
297
+ }
298
+ const newSource = { ...existingSource, primitiveId, params: newParams };
299
+ if (args.zPlane != null) newSource.zPlane = args.zPlane;
300
+ if (args.parallax != null) newSource.parallax = args.parallax;
301
+ if (args.anchor != null) {
302
+ const a = args.anchor;
303
+ newSource.anchor = { space: "scene", x: a.x, y: a.y };
304
+ }
305
+ updates.source = newSource;
306
+ capabilities.composition.updateOverlay(args.id, updates);
307
+ return { success: true, message: `Updated overlay ${args.id}` };
308
+ }
309
+ },
310
+ capture_frames: {
311
+ name: "capture_frames",
312
+ description: "Capture rendered video frames at specific frame numbers for visual verification. Returns base64 JPEG images. Call this after creating/updating overlays to verify they look correct.",
313
+ schema: z.object({
314
+ frames: z.array(z.coerce.number().int().min(0)).min(1).max(4).describe("Frame numbers to capture (max 4)")
315
+ }),
316
+ metadata: { label: "Capture Frames", imageResponse: true, dedupExempt: true },
317
+ handler: async (args, capabilities) => {
318
+ if (!capabilities.capture) return { error: "Frame capture not available." };
319
+ const MAX_RETRIES = 2;
320
+ let lastErr;
321
+ for (let attempt = 0; attempt <= MAX_RETRIES; attempt++) {
322
+ try {
323
+ if (attempt > 0) {
324
+ console.info("[compose-role-tools] Retrying capture_frames", {
325
+ attempt,
326
+ cause: lastErr instanceof Error ? lastErr.message.slice(0, 300) : String(lastErr).slice(0, 300)
327
+ });
328
+ await new Promise((r) => setTimeout(r, 500 * attempt));
329
+ }
330
+ return await capabilities.capture.captureFrames(args.frames);
331
+ } catch (err) {
332
+ if (err instanceof AgentFixableCaptureError) return { error: err.message };
333
+ lastErr = err;
334
+ }
335
+ }
336
+ return {
337
+ error: `capture_frames failed after ${MAX_RETRIES + 1} attempts: ${lastErr instanceof Error ? lastErr.message : String(lastErr)}. You are now BLIND \u2014 you cannot see what you are authoring. Do not keep editing on guesswork; this run will be failed.`
338
+ };
339
+ }
340
+ },
341
+ score_composition: {
342
+ name: "score_composition",
343
+ description: "Score the CURRENT composition against the CueFrame quality rubric (editorial, spatial, brand, caption). Renders the meaningful beats, runs the vision judge, and returns per-criterion scores (0\u201310) plus the single weakest criterion to fix next. This is your OBJECTIVE check on whether the cut is good enough \u2014 use it instead of judging from your own eyes. Call it before finalizing, and after a fix to confirm the score moved.",
344
+ schema: z.object({}),
345
+ metadata: { label: "Score Composition", dedupExempt: true },
346
+ toModelOutput: (result) => ({ type: "text", value: result.slice(0, 1200) }),
347
+ handler: async (_args, capabilities) => {
348
+ if (!capabilities.verify) return { error: "Composition scoring not available." };
349
+ return await capabilities.verify.verify();
350
+ }
351
+ },
352
+ apply_motion_preset: {
353
+ name: "apply_motion_preset",
354
+ description: "Apply a vetted motion preset to a STATIC card clip: the approved layout is carried verbatim; only entrance/hold/exit animate. Presets: fade-up (calm default) | slide-in-left | slide-in-right (directional) | scale-pop (punchy stat) | stagger-reveal (enumerations \u2014 needs a [data-stagger] container in the markup). Library overlays already animate \u2014 tune their params/timing with update_overlay instead; custom components already carry their authored motion.",
355
+ schema: z.object({
356
+ clipId: z.string().min(1).describe("The card clip to animate (its id in the working composition)."),
357
+ preset: z.enum(["fade-up", "slide-in-left", "slide-in-right", "scale-pop", "stagger-reveal"]),
358
+ enterMs: z.number().int().min(80).max(1200).optional().describe("Entrance duration; default 300."),
359
+ exitMs: z.number().int().min(80).max(1200).optional().describe("Exit duration (completes at clip end); default 300."),
360
+ staggerMs: z.number().int().min(40).max(400).optional().describe("stagger-reveal only: per-child delay; default 120.")
361
+ }),
362
+ metadata: { label: "Apply Motion Preset", dedupExempt: true },
363
+ handler: async (args, capabilities) => {
364
+ if (!capabilities.motionPreset) return { error: "Motion presets not available." };
365
+ return await capabilities.motionPreset.apply(
366
+ args
367
+ );
368
+ }
369
+ },
370
+ search_library: {
371
+ name: "search_library",
372
+ description: 'Search across all media in the library. Combines transcript text search (fast, exact match) with semantic scene search (CLIP text-to-image similarity). Use for questions like "find clips about pricing" or "find scenes with mountains".',
373
+ schema: z.object({
374
+ query: z.string().min(1).describe("Search query \u2014 a word/phrase or a visual concept")
375
+ }),
376
+ metadata: { label: "Search Library" },
377
+ inputExamples: [{ input: { query: "pricing discussion" } }],
378
+ handler: async (args, capabilities) => {
379
+ const searchFn = capabilities.resources?.searchLibrary;
380
+ if (!searchFn) return { error: "Library search not available. Configure a resource provider." };
381
+ try {
382
+ const results = await searchFn(args.query);
383
+ if (!Array.isArray(results)) {
384
+ return {
385
+ error: `Library search returned ${results === null ? "null" : typeof results}, not the candidate array this lane expects. The compose capability contract is an array of {mediaId, kind, provider, query, \u2026} \u2014 see composeCapabilities.ts.`
386
+ };
387
+ }
388
+ const candidates = results;
389
+ if (candidates.length === 0) return "No enrichment candidates available for this clip.";
390
+ const lines = [
391
+ `Enrichment candidate pool (${candidates.length} item${candidates.length === 1 ? "" : "s"}, pre-curated by upstream relevance gate):`
392
+ ];
393
+ for (const c of candidates) {
394
+ const score = typeof c.relevanceScore === "number" ? ` (${c.relevanceScore.toFixed(1)}/10)` : "";
395
+ const dim = c.width && c.height ? ` ${c.width}x${c.height}` : "";
396
+ const dur = c.duration ? `${c.duration.toFixed(1)}s` : "?s";
397
+ const reason = c.relevanceReason ? `
398
+ \u2192 ${c.relevanceReason}` : "";
399
+ lines.push(` [${c.mediaId}] ${c.kind}/${c.provider}: "${c.query}" ${dur}${dim}${score}${reason}`);
400
+ }
401
+ return lines.join("\n");
402
+ } catch (err) {
403
+ return { error: `Library search failed: ${err instanceof Error ? err.message : String(err)}` };
404
+ }
405
+ }
406
+ },
407
+ submit_compose_plan: {
408
+ name: "submit_compose_plan",
409
+ description: "Submit the FULL compose plan \u2014 framing per beat (frame or trim), pacing cuts, caption style intent, asset requests (resolved from the pool), graphics/hero beats, markers. Call exactly once at the end of planning. The plan is validated and then LOCKED for execution.",
410
+ schema: ComposePlan,
411
+ metadata: { label: "Submit Compose Plan" },
412
+ strict: true,
413
+ handler: async (args, capabilities) => {
414
+ if (!capabilities.planSink) {
415
+ return { error: "submit_compose_plan is only available in the planning phase." };
416
+ }
417
+ capabilities.planSink.submit(args);
418
+ return "Plan received. Planning phase complete \u2014 stop here.";
419
+ }
420
+ },
421
+ amend_compose_plan: {
422
+ name: "amend_compose_plan",
423
+ description: "REPAIR the current plan with targeted ops \u2014 you CANNOT resubmit the whole plan in repair mode. Emit ONLY ops for the sections the errors name; every other section is preserved by the system exactly as-is. Ops: framing.set/cuts.set/captions.set/markers.set (replace that whole section), graphics.add|update|remove and assets.add|update|remove (address ONE element by its exact id \u2014 ids are stable addresses; never invent or renumber them). One logical fix per op.",
424
+ schema: z.object({
425
+ ops: z.array(z.object({ type: z.string().min(1) }).passthrough()).min(1).max(20).describe(
426
+ "Amendment ops. The worker validates each op against the canonical PlanOp union and rejects the whole batch on any invalid op (atomic)."
427
+ )
428
+ }),
429
+ metadata: { label: "Amend Compose Plan" },
430
+ handler: async (args, capabilities) => {
431
+ if (!capabilities.planSink) {
432
+ return { error: "amend_compose_plan is only available in the planning phase." };
433
+ }
434
+ capabilities.planSink.submit({ __planOps: args.ops });
435
+ return "Amendment ops received. Repair round complete \u2014 stop here.";
436
+ }
437
+ }
438
+ });
439
+ var COMPOSE_ROLE_TOOL_NAMES = Object.keys(COMPOSE_ROLE_TOOLS);
440
+ async function dispatchComposeRoleTool(toolName, args, capabilities, opts) {
441
+ const entry = COMPOSE_ROLE_TOOLS[toolName];
442
+ if (!entry) {
443
+ return {
444
+ error: `Unknown tool: ${toolName}. This lane serves ${COMPOSE_ROLE_TOOL_NAMES.join(", ")} \u2014 every other verb moved to the curated /v1 surface.`
445
+ };
446
+ }
447
+ const result = entry.schema.safeParse(args);
448
+ if (!result.success) {
449
+ const issues = result.error.issues.map((i) => `${i.path.join(".")}: ${i.message}`).join("; ");
450
+ return { error: `Invalid tool arguments: ${issues}` };
451
+ }
452
+ return entry.handler(result.data, capabilities, opts);
453
+ }
454
+
455
+ // ../authoring/src/agent/buildTools.ts
456
+ function formatToolResult(name, result) {
457
+ if (!COMPOSE_ROLE_TOOLS[name]?.metadata.imageResponse) {
458
+ return typeof result === "string" ? result : JSON.stringify(result);
459
+ }
460
+ if (Array.isArray(result)) {
461
+ const images = result;
462
+ return {
463
+ type: "content",
464
+ value: images.map((b64) => ({
465
+ type: "image-data",
466
+ mediaType: "image/jpeg",
467
+ data: b64
468
+ }))
469
+ };
470
+ }
471
+ return typeof result === "string" ? result : JSON.stringify(result);
472
+ }
473
+ var DEDUP_MAX = 3;
474
+ function makeCallKey(name, args) {
475
+ return `${name}:${canonicalJson(args)}`;
476
+ }
477
+ var APPROVAL_TIMEOUT_MS = 2 * 60 * 1e3;
478
+ function buildToolsFromSchemas(params) {
479
+ const capabilities = params.capabilities;
480
+ const toolOpts = {
481
+ ...params.toolOptions ?? {},
482
+ ...params.cachedContext ? { cachedContext: params.cachedContext } : {},
483
+ onProgress: params.onProgress
484
+ };
485
+ const recentCalls = /* @__PURE__ */ new Map();
486
+ const tools = {};
487
+ for (const [name, schema] of Object.entries(COMPOSE_ROLE_TOOLS)) {
488
+ if (params.allowedTools && !params.allowedTools.includes(name)) continue;
489
+ const meta = schema.metadata;
490
+ const needsApproval = params.approvalRequired?.has(name) ?? false;
491
+ tools[name] = tool({
492
+ description: schema.description,
493
+ inputSchema: schema.schema,
494
+ execute: async (args) => {
495
+ const toolCallId = `tc_${crypto.randomUUID().slice(0, 8)}`;
496
+ if (!meta.dedupExempt) {
497
+ const callKey = makeCallKey(name, args);
498
+ const callCount = (recentCalls.get(callKey) ?? 0) + 1;
499
+ recentCalls.set(callKey, callCount);
500
+ if (callCount >= DEDUP_MAX) {
501
+ const msg = `Tool "${name}" called ${callCount} times with identical arguments. This looks like a loop \u2014 try a different approach or different arguments.`;
502
+ params.onProgress({
503
+ type: "tool-result",
504
+ agent: "router",
505
+ toolName: name,
506
+ success: false,
507
+ message: msg,
508
+ toolCallId,
509
+ timestamp: Date.now()
510
+ });
511
+ return JSON.stringify({ error: msg });
512
+ }
513
+ }
514
+ params.onProgress({
515
+ type: "tool-call",
516
+ agent: "router",
517
+ toolName: name,
518
+ args,
519
+ toolCallId,
520
+ timestamp: Date.now()
521
+ });
522
+ if (needsApproval && params.requestApproval) {
523
+ const approved = await Promise.race([
524
+ params.requestApproval(toolCallId, name, args),
525
+ new Promise(
526
+ (resolve) => setTimeout(() => resolve(false), APPROVAL_TIMEOUT_MS)
527
+ )
528
+ ]);
529
+ if (!approved) {
530
+ const msg = "User denied this tool call (or approval timed out).";
531
+ params.onProgress({
532
+ type: "tool-result",
533
+ agent: "router",
534
+ toolName: name,
535
+ success: false,
536
+ message: msg,
537
+ toolCallId,
538
+ timestamp: Date.now()
539
+ });
540
+ return JSON.stringify({ error: msg });
541
+ }
542
+ }
543
+ try {
544
+ const result = await dispatchComposeRoleTool(name, args, capabilities, toolOpts);
545
+ params.onProgress({
546
+ type: "tool-result",
547
+ agent: "router",
548
+ toolName: name,
549
+ success: true,
550
+ message: typeof result === "string" ? result.slice(0, 200) : JSON.stringify(result).slice(0, 200),
551
+ toolCallId,
552
+ timestamp: Date.now()
553
+ });
554
+ return result;
555
+ } catch (err) {
556
+ const errMsg = err instanceof Error ? err.message : String(err);
557
+ params.onProgress({
558
+ type: "tool-result",
559
+ agent: "router",
560
+ toolName: name,
561
+ success: false,
562
+ message: errMsg,
563
+ toolCallId,
564
+ timestamp: Date.now()
565
+ });
566
+ return JSON.stringify({ error: errMsg });
567
+ }
568
+ },
569
+ toModelOutput: ({ output }) => {
570
+ const formatted = formatToolResult(name, output);
571
+ return typeof formatted === "string" ? { type: "text", value: formatted } : formatted;
572
+ }
573
+ });
574
+ }
575
+ return tools;
576
+ }
577
+ var buildDirectorTools = buildToolsFromSchemas;
578
+ var buildPlannerTools = (p) => {
579
+ const { toolNames = COMPOSE_PLANNER_TOOLS, ...rest } = p;
580
+ return buildToolsFromSchemas({ ...rest, allowedTools: [...toolNames] });
581
+ };
582
+
79
583
  // ../authoring/src/agent/contextManagement.ts
80
584
  import { pruneMessages } from "ai";
81
585
  var EVICTED_IMAGE_STUB = "[capture still evicted to save context \u2014 the frame was seen and acted on; re-capture ONLY if you must re-verify pixels]";
@@ -158,16 +662,71 @@ var cachePrepareStep = ({ model, messages }) => ({
158
662
  messages: isAnthropicModel(model) ? addCacheControlToLastMessage(messages) : messages
159
663
  });
160
664
 
665
+ // ../authoring/src/agent/errors.ts
666
+ import { APICallError, TypeValidationError } from "ai";
667
+ var BODY_EXCERPT = 200;
668
+ function providerMessage(responseBody) {
669
+ if (!responseBody) return void 0;
670
+ try {
671
+ const body = JSON.parse(responseBody);
672
+ const msg = body?.error?.message ?? body?.message;
673
+ return msg == null ? void 0 : String(msg);
674
+ } catch {
675
+ return void 0;
676
+ }
677
+ }
678
+ function bodyExcerpt(responseBody) {
679
+ const trimmed = responseBody?.trim();
680
+ if (!trimmed) return void 0;
681
+ return trimmed.replace(/\s+/g, " ").slice(0, BODY_EXCERPT);
682
+ }
683
+ function extractProviderError(err) {
684
+ if (APICallError.isInstance(err)) {
685
+ const status = err.statusCode;
686
+ if (status === 401 || status === 403) {
687
+ return "Authentication failed. Check your API key or gateway configuration in Settings.";
688
+ }
689
+ if (status === 429) {
690
+ return "API rate limit or quota exceeded. Try again later.";
691
+ }
692
+ const detail = providerMessage(err.responseBody);
693
+ if (status === 413 || status === 400) {
694
+ if (detail) return detail.slice(0, 200);
695
+ }
696
+ const where = status === void 0 ? "" : ` (HTTP ${status})`;
697
+ const evidence = detail ?? bodyExcerpt(err.responseBody);
698
+ return (evidence ? `${err.message}${where}: ${evidence}` : `${err.message}${where}`).slice(
699
+ 0,
700
+ 300
701
+ );
702
+ }
703
+ if (TypeValidationError.isInstance(err)) {
704
+ return "Invalid response from AI provider. The provider may be misconfigured or unavailable.";
705
+ }
706
+ const raw = err instanceof Error ? err.message : String(err);
707
+ if (raw.includes("API key not valid")) {
708
+ return "API key not valid. Check your gateway or provider configuration in Settings.";
709
+ }
710
+ return raw.slice(0, 300);
711
+ }
712
+ var ZERO_USAGE = {
713
+ inputTokens: 0,
714
+ outputTokens: 0,
715
+ totalTokens: 0,
716
+ inputTokenDetails: { noCacheTokens: void 0, cacheReadTokens: void 0, cacheWriteTokens: void 0 },
717
+ outputTokenDetails: { textTokens: void 0, reasoningTokens: void 0 }
718
+ };
719
+
161
720
  // ../authoring/src/evaluate.ts
162
721
  import { generateObject } from "ai";
163
- import { z } from "zod";
164
- var CriterionResultSchema = z.object({
165
- name: z.string(),
166
- passed: z.boolean(),
167
- feedback: z.string().optional()
722
+ import { z as z2 } from "zod";
723
+ var CriterionResultSchema = z2.object({
724
+ name: z2.string(),
725
+ passed: z2.boolean(),
726
+ feedback: z2.string().optional()
168
727
  });
169
- var CriteriaEvaluationSchema = z.object({
170
- criteria: z.array(CriterionResultSchema)
728
+ var CriteriaEvaluationSchema = z2.object({
729
+ criteria: z2.array(CriterionResultSchema)
171
730
  });
172
731
  var CRITERIA_EVALUATOR_PROMPT = `You are a strict QA evaluator. For each criterion you are given, determine whether the work passes or fails.
173
732
 
@@ -239,11 +798,11 @@ Above are ${frames.length} captured frames. Use them to evaluate visual criteria
239
798
 
240
799
  // ../authoring/src/evaluator.ts
241
800
  import { generateObject as generateObject2 } from "ai";
242
- import { z as z2 } from "zod";
243
- var EvaluationSchema = z2.object({
244
- scores: z2.record(z2.string(), z2.number()),
245
- critique: z2.string(),
246
- evidence: z2.array(z2.string())
801
+ import { z as z3 } from "zod";
802
+ var EvaluationSchema = z3.object({
803
+ scores: z3.record(z3.string(), z3.number()),
804
+ critique: z3.string(),
805
+ evidence: z3.array(z3.string())
247
806
  });
248
807
  var TIMELINE_RUBRIC = {
249
808
  dimensions: [
@@ -945,7 +1504,7 @@ ${body}`;
945
1504
 
946
1505
  // ../authoring/src/decomposer.ts
947
1506
  import { generateObject as generateObject3 } from "ai";
948
- import { z as z3 } from "zod";
1507
+ import { z as z4 } from "zod";
949
1508
 
950
1509
  // ../authoring/src/prompts/decomposerPrompt.ts
951
1510
  var DECOMPOSER_PROMPT = `You decompose video editing tasks into sequential phases.
@@ -978,13 +1537,13 @@ OUTPUT FORMAT (JSON only, no markdown):
978
1537
  Set evaluationPasses to 1 for timeline edits and scene compositions, 3 for artifacts (content gets more critique passes).`;
979
1538
 
980
1539
  // ../authoring/src/decomposer.ts
981
- var PhaseSchema = z3.object({
982
- phases: z3.array(z3.object({
983
- name: z3.string(),
984
- output: z3.enum(["timeline_edit", "artifact", "scene_composition"]).default("timeline_edit"),
985
- description: z3.string(),
986
- verificationCriteria: z3.array(z3.string()).default([]),
987
- evaluationPasses: z3.number().default(1)
1540
+ var PhaseSchema = z4.object({
1541
+ phases: z4.array(z4.object({
1542
+ name: z4.string(),
1543
+ output: z4.enum(["timeline_edit", "artifact", "scene_composition"]).default("timeline_edit"),
1544
+ description: z4.string(),
1545
+ verificationCriteria: z4.array(z4.string()).default([]),
1546
+ evaluationPasses: z4.number().default(1)
988
1547
  }))
989
1548
  });
990
1549
  var COMPLEX_KEYWORDS = /\b(workflow|produce|post-?produce|podcast|episode|batch|multi|series|sequence|blog|show.?notes|thumbnail|description)\b/i;
@@ -1028,177 +1587,63 @@ ${context}`,
1028
1587
  }
1029
1588
  }
1030
1589
 
1031
- // ../authoring/src/motion/shell.ts
1032
- var MOTION_PRESETS = [
1033
- "fade-up",
1034
- "slide-in-left",
1035
- "slide-in-right",
1036
- "scale-pop",
1037
- "stagger-reveal"
1038
- ];
1039
- var PRESET_FROM = {
1040
- "fade-up": { dx: 0, dy: 24, scale: 1 },
1041
- "slide-in-left": { dx: -48, dy: 0, scale: 1 },
1042
- "slide-in-right": { dx: 48, dy: 0, scale: 1 },
1043
- "scale-pop": { dx: 0, dy: 0, scale: 0.92 },
1044
- "stagger-reveal": { dx: 0, dy: 12, scale: 1 }
1045
- };
1046
- var PRESET_SUSTAIN = {
1047
- "fade-up": { dx: 0, dy: -6, scale: 0.012 },
1048
- "slide-in-left": { dx: 14, dy: 0, scale: 8e-3 },
1049
- "slide-in-right": { dx: -14, dy: 0, scale: 8e-3 },
1050
- "scale-pop": { dx: 0, dy: -4, scale: 0.012 },
1051
- "stagger-reveal": { dx: 0, dy: -4, scale: 0.01 }
1590
+ // ../authoring/src/pipelineTrace.ts
1591
+ var DEFAULT_LOGGER = {
1592
+ info: (msg, data) => console.info(`[pipeline-trace] ${msg}`, ...data ? [data] : []),
1593
+ warn: (msg, data) => console.warn(`[pipeline-trace] ${msg}`, ...data ? [data] : []),
1594
+ error: (msg, data) => console.error(`[pipeline-trace] ${msg}`, ...data ? [data] : []),
1595
+ debug: (msg, data) => console.debug(`[pipeline-trace] ${msg}`, ...data ? [data] : [])
1052
1596
  };
1053
- var POP_WOBBLE = { amp: 8e-3, tau: 0.45, hz: 1.8 };
1054
- var STAGGER_BREATHE = { amp: 2, periodS: 3.4, phase: 0.9 };
1055
- var MAX_STAGGER_CHILDREN = 8;
1056
- function generateMotionShell(cardHtml, opts) {
1057
- if (!cardHtml.trim()) throw new Error("generateMotionShell: empty card markup");
1058
- const enterMs = opts.enterMs ?? 300;
1059
- const exitMs = opts.exitMs ?? 300;
1060
- const staggerMs = opts.staggerMs ?? 120;
1061
- const from = PRESET_FROM[opts.preset];
1062
- if (!from) throw new Error(`generateMotionShell: unknown preset '${opts.preset}'`);
1063
- const sustain = PRESET_SUSTAIN[opts.preset];
1064
- const tokenVars = cssLayoutVars(opts.tokens, void 0);
1065
- const staggerBlock = opts.preset === "stagger-reveal" ? `
1066
- const staggerF = Math.max(1, Math.round((${staggerMs} / 1000) * fps));
1067
- const staggerRules = Array.from({ length: ${MAX_STAGGER_CHILDREN} }, (_, i) => {
1068
- const s = enterF + i * staggerF;
1069
- const o = interpolate(frame, [s, s + enterF], [0, 1], { extrapolateLeft: 'clamp', extrapolateRight: 'clamp' });
1070
- const breathe = ${STAGGER_BREATHE.amp} * Math.sin((tSec / ${STAGGER_BREATHE.periodS}) * Math.PI * 2 + i * ${STAGGER_BREATHE.phase});
1071
- return '[data-stagger] > *:nth-child(' + (i + 1) + ') { opacity: ' + o + '; translate: 0 ' + breathe.toFixed(3) + 'px; }';
1072
- }).join('\\n');` : "";
1073
- const staggerStyleEl = opts.preset === "stagger-reveal" ? `<style>{staggerRules}</style>` : "";
1074
- return `// generated by @cueframe/authoring generateMotionShell \u2014 preset: ${opts.preset}
1075
- import { Easing, interpolate, useCurrentFrame, useVideoConfig } from 'remotion';
1076
-
1077
- export default function CardMotionShell({ durationInFrames, params }) {
1078
- const frame = useCurrentFrame();
1079
- const { fps } = useVideoConfig();
1080
- const CARD_HTML = ${JSON.stringify(cardHtml)};
1081
- const enterF = Math.max(1, Math.round((${enterMs} / 1000) * fps));
1082
- const exitF = Math.max(1, Math.round((${exitMs} / 1000) * fps));
1083
- const enter = interpolate(frame, [0, enterF], [0, 1],
1084
- { easing: Easing.out(Easing.cubic), extrapolateLeft: 'clamp', extrapolateRight: 'clamp' });
1085
- const exit = interpolate(frame,
1086
- [Math.max(enterF + 1, durationInFrames - exitF), durationInFrames], [1, 0],
1087
- { easing: Easing.in(Easing.cubic), extrapolateLeft: 'clamp', extrapolateRight: 'clamp' });
1088
- const opacity = Math.min(enter, exit);
1089
- const hold = interpolate(frame, [enterF, durationInFrames], [0, 1],
1090
- { extrapolateLeft: 'clamp', extrapolateRight: 'clamp' });
1091
- const tSec = Math.max(0, frame - enterF) / fps;
1092
- const wobble = ${opts.preset === "scale-pop" ? `${POP_WOBBLE.amp} * Math.exp(-tSec / ${POP_WOBBLE.tau}) * Math.sin(tSec * Math.PI * 2 * ${POP_WOBBLE.hz})` : "0"};
1093
- const dx = ${from.dx} * (1 - enter) + ${sustain.dx} * hold;
1094
- const dy = ${from.dy} * (1 - enter) + ${sustain.dy} * hold;
1095
- const scale = ${from.scale} + (1 - ${from.scale}) * enter + ${sustain.scale} * hold + wobble;${staggerBlock}
1096
- const TOKEN_VARS = ${JSON.stringify(tokenVars)};
1097
- return (
1098
- <div style={{ position: 'absolute', inset: 0, ...TOKEN_VARS,
1099
- opacity, transform: 'translate(' + dx + 'px,' + dy + 'px) scale(' + scale + ')' }}>
1100
- ${staggerStyleEl}<div style={{ width: '100%', height: '100%' }}
1101
- dangerouslySetInnerHTML={{ __html: CARD_HTML }} />
1102
- </div>
1103
- );
1104
- }
1105
- `;
1106
- }
1107
-
1108
- // ../authoring/src/motion/applyMotionPreset.ts
1109
- var MotionPresetError = class extends Error {
1110
- constructor(code, message, opIndex) {
1111
- super(message);
1112
- this.code = code;
1113
- this.opIndex = opIndex;
1114
- this.name = "MotionPresetError";
1597
+ var PipelineTrace = class {
1598
+ t0 = performance.now();
1599
+ openSpans = /* @__PURE__ */ new Map();
1600
+ spans = [];
1601
+ toolCallCount = 0;
1602
+ log;
1603
+ constructor(logger) {
1604
+ this.log = logger ?? DEFAULT_LOGGER;
1115
1605
  }
1116
- code;
1117
- opIndex;
1118
- };
1119
- function resolveMotionPresetCard(composition, input) {
1120
- if (!MOTION_PRESETS.includes(input.preset)) {
1121
- throw new MotionPresetError(
1122
- "motion_preset_unknown",
1123
- `unknown motion preset '${input.preset}' \u2014 pick one of: ${MOTION_PRESETS.join(", ")}`
1124
- );
1606
+ start(name) {
1607
+ this.openSpans.set(name, performance.now());
1125
1608
  }
1126
- const tracks = composition.tracks ?? [];
1127
- const sourced = tracks.flatMap((t) => t?.contents ?? []).filter((c) => !!c && typeof c === "object" && "source" in c && "id" in c);
1128
- const clip = sourced.find((c) => c.id === input.clipId);
1129
- if (!clip) {
1130
- const cards = sourced.filter((c) => c.source.kind === "card").map((c) => `'${c.id}'`);
1131
- throw new MotionPresetError(
1132
- "motion_preset_target_invalid",
1133
- `applyMotionPreset: no clip '${input.clipId}' in the composition. ` + (cards.length > 0 ? `Static card clip ids present: ${cards.join(", ")}.` : `No static card clips remain (already shelled or none authored).`)
1134
- );
1609
+ end(name) {
1610
+ const startMs = this.openSpans.get(name);
1611
+ if (startMs === void 0) return;
1612
+ this.openSpans.delete(name);
1613
+ this.spans.push({ name, startMs, endMs: performance.now() });
1135
1614
  }
1136
- if (clip.source.kind !== "card" || !clip.source.html) {
1137
- throw new MotionPresetError(
1138
- "motion_preset_target_invalid",
1139
- `applyMotionPreset targets only static card clips \u2014 clip '${input.clipId}' is '${clip.source.kind}'. Library overlays already move (update them directly); components already carry their authored motion.`
1140
- );
1615
+ recordToolCall() {
1616
+ this.toolCallCount++;
1141
1617
  }
1142
- return {
1143
- cardHtml: clip.source.html,
1144
- ...clip.source.tokens !== void 0 ? { tokens: clip.source.tokens } : {},
1145
- ...clip.source.zPlane !== void 0 ? { zPlane: clip.source.zPlane } : {}
1146
- };
1147
- }
1148
-
1149
- // ../authoring/src/motion/materializeMotionPresetOps.ts
1150
- var isMotionPresetOp = (op) => !!op && typeof op === "object" && op.type === "applyMotionPreset";
1151
- var hasMotionPresetOp = (ops) => ops.some(isMotionPresetOp);
1152
- async function materializeMotionPresetOpsCore(composition, ops, deps) {
1153
- const out = [];
1154
- let current = composition;
1155
- for (let i = 0; i < ops.length; i++) {
1156
- const op = ops[i];
1157
- if (!isMotionPresetOp(op)) {
1158
- out.push(op);
1159
- if (deps.apply) current = deps.apply(current, op);
1160
- continue;
1618
+ summary() {
1619
+ const totalMs = performance.now() - this.t0;
1620
+ const accounted = this.spans.reduce((sum, s) => sum + (s.endMs - s.startMs), 0);
1621
+ const unaccounted = totalMs - accounted;
1622
+ this.log.info(`Pipeline trace: ${Math.round(totalMs)}ms total, ${this.toolCallCount} tool calls`, {
1623
+ totalMs: Math.round(totalMs),
1624
+ toolCalls: this.toolCallCount
1625
+ });
1626
+ for (const span of this.spans) {
1627
+ const dur = span.endMs - span.startMs;
1628
+ const pct = totalMs > 0 ? (dur / totalMs * 100).toFixed(0) : "0";
1629
+ this.log.info(` ${span.name.padEnd(24)} ${dur.toFixed(0).padStart(6)}ms ${pct.padStart(3)}%`);
1161
1630
  }
1162
- let card;
1163
- try {
1164
- card = resolveMotionPresetCard(current, { clipId: op.clipId, preset: op.preset });
1165
- } catch (err) {
1166
- if (err instanceof MotionPresetError) err.opIndex = i;
1167
- throw err;
1631
+ if (unaccounted > 50) {
1632
+ const pct = (unaccounted / totalMs * 100).toFixed(0);
1633
+ this.log.info(` ${"(unaccounted)".padEnd(24)} ${unaccounted.toFixed(0).padStart(6)}ms ${pct.padStart(3)}%`);
1168
1634
  }
1169
- const componentId = `motion-shell-${op.clipId}`;
1170
- const tsxSource = generateMotionShell(card.cardHtml, {
1171
- preset: op.preset,
1172
- ...op.params?.enterMs !== void 0 ? { enterMs: op.params.enterMs } : {},
1173
- ...op.params?.exitMs !== void 0 ? { exitMs: op.params.exitMs } : {},
1174
- ...op.params?.staggerMs !== void 0 ? { staggerMs: op.params.staggerMs } : {},
1175
- ...card.tokens !== void 0 ? { tokens: card.tokens } : {}
1176
- });
1177
- const materialized = await deps.sink({
1178
- componentId,
1179
- clipId: op.clipId,
1180
- preset: op.preset,
1181
- tsxSource,
1182
- ...card.zPlane !== void 0 ? { zPlane: card.zPlane } : {}
1183
- });
1184
- out.push(materialized);
1185
- if (deps.apply) current = deps.apply(current, materialized);
1186
1635
  }
1187
- return out;
1188
- }
1636
+ };
1189
1637
  export {
1190
1638
  ARTIFACT_RUBRIC,
1191
1639
  Agent,
1192
1640
  AgentFixableCaptureError,
1193
- CODE_GEN_FEW_SHOT_EXAMPLES,
1194
- COMPONENT_CONTRACT,
1195
1641
  COMPOSE_MOTION_TOOLS,
1196
1642
  COMPOSE_MOTION_VERIFY_TOOLS,
1197
1643
  COMPOSE_PLANNER_REPAIR_TOOLS,
1198
1644
  COMPOSE_PLANNER_TOOLS,
1199
1645
  COMPOSE_ROLE_TOOLS,
1200
1646
  COMPOSE_ROLE_TOOL_NAMES,
1201
- DESIGN_QUALITY_RULES,
1202
1647
  EVALUATOR_PROMPT,
1203
1648
  MOTION_PRESETS,
1204
1649
  MotionPresetError,
@@ -1206,7 +1651,6 @@ export {
1206
1651
  PipelineTrace as RequestTrace,
1207
1652
  SceneAuthoringError,
1208
1653
  TIMELINE_RUBRIC,
1209
- TOOLKIT_REFERENCE,
1210
1654
  ZERO_USAGE,
1211
1655
  buildDirectorContext as buildAgentContext,
1212
1656
  buildDirectorContext,
@@ -1233,7 +1677,6 @@ export {
1233
1677
  getExcludedTools,
1234
1678
  hasMotionPresetOp,
1235
1679
  hasSceneOp,
1236
- initCodeGenPrompts,
1237
1680
  isMotionPresetOp,
1238
1681
  isSceneOp,
1239
1682
  isSceneShotClip,